@uniformdev/mesh-sdk-react 19.214.0 → 19.214.1-alpha.10
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 +75 -477
- package/dist/index.d.ts +75 -477
- package/dist/index.esm.js +885 -3345
- package/dist/index.js +1007 -3535
- package/dist/index.mjs +885 -3345
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
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
|
-
import { TDate } from 'timeago.js';
|
|
5
|
-
import * as _emotion_react from '@emotion/react';
|
|
6
|
-
import { Interpolation, Theme, SerializedStyles } from '@emotion/react';
|
|
7
4
|
import * as _uniformdev_mesh_sdk from '@uniformdev/mesh-sdk';
|
|
8
5
|
import { DynamicInputs, MeshLocation, SetValueOptions, EditConnectedDataResponseCancellationContext, DataSourceLocationValue, DataTypeLocationValue, BindableTypes } from '@uniformdev/mesh-sdk';
|
|
9
6
|
export * from '@uniformdev/mesh-sdk';
|
|
10
7
|
import { DataVariableDefinition, DataResourceVariables, DataType, DataSourceVariantsKeys } from '@uniformdev/canvas';
|
|
11
8
|
import { Emitter } from 'mitt';
|
|
12
|
-
import {
|
|
13
|
-
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';
|
|
9
|
+
import { TDate } from 'timeago.js';
|
|
14
10
|
import * as lexical from 'lexical';
|
|
15
11
|
import { SerializedEditorState, SerializedLexicalNode, Spread, DecoratorNode, NodeKey, LexicalNode, LexicalEditor, EditorState, SerializedRootNode } from 'lexical';
|
|
12
|
+
import { Interpolation, Theme, SerializedStyles } from '@emotion/react';
|
|
13
|
+
import { InputSelectProps, IconType } from '@uniformdev/design-system';
|
|
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';
|
|
16
15
|
import { MenuOption } from '@lexical/react/LexicalTypeaheadMenuPlugin';
|
|
17
16
|
|
|
18
17
|
declare const SvgCaution: (props: SVGProps<SVGSVGElement>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -45,346 +44,6 @@ declare namespace index {
|
|
|
45
44
|
export { SvgCaution as Caution, SvgCheckmark as Checkmark, SvgChevronDown as ChevronDown, SvgClose as Close, SvgDanger as Danger, SvgExclamationPoint as ExclamationPoint, SvgInfo as Info, SvgLightbulb as Lightbulb, SvgMagnifyingGlass as MagnifyingGlass, SvgMaximizeAlt as MaximizeAlt, SvgMinus as Minus, SvgMoreVerticalAlt as MoreVerticalAlt, SvgPlus as Plus };
|
|
46
45
|
}
|
|
47
46
|
|
|
48
|
-
/** @deprecated please use ObjectSearchListItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-list-item */
|
|
49
|
-
interface EntrySearchSelectedItemProps<TResult extends EntrySearchResult = EntrySearchResult> {
|
|
50
|
-
selectedItem: TResult;
|
|
51
|
-
logoIcon: string | React__default.ComponentType<{
|
|
52
|
-
className?: string;
|
|
53
|
-
}>;
|
|
54
|
-
onDeselect: (item: TResult) => void;
|
|
55
|
-
onEditClosed?: (item: TResult) => void;
|
|
56
|
-
}
|
|
57
|
-
/** @deprecated please use ObjectSearchListItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-list-item */
|
|
58
|
-
declare const DefaultSelectedItem: React__default.FC<EntrySearchSelectedItemProps>;
|
|
59
|
-
|
|
60
|
-
/** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-container-with-inputs for implementation details */
|
|
61
|
-
type EntrySearchQueryOptions = {
|
|
62
|
-
count: number;
|
|
63
|
-
offset: number;
|
|
64
|
-
contentType?: string;
|
|
65
|
-
cursor?: string;
|
|
66
|
-
};
|
|
67
|
-
/** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-container-with-inputs for implementation details */
|
|
68
|
-
type EntrySearchProps<TResult extends EntrySearchResult = EntrySearchResult> = {
|
|
69
|
-
search: (text: string, options: EntrySearchQueryOptions) => void;
|
|
70
|
-
results: TResult[] | undefined;
|
|
71
|
-
totalResults?: number | undefined;
|
|
72
|
-
cursor?: string;
|
|
73
|
-
contentTypes?: EntrySearchContentType[];
|
|
74
|
-
selectedItems: TResult[] | undefined;
|
|
75
|
-
logoIcon: string | React$1.ComponentType<{
|
|
76
|
-
className?: string;
|
|
77
|
-
}>;
|
|
78
|
-
select: (items: TResult[], selectedContentType?: string) => void;
|
|
79
|
-
requireContentType?: boolean;
|
|
80
|
-
multiSelectId?: string;
|
|
81
|
-
multiSelect?: boolean;
|
|
82
|
-
rowComponent?: React$1.FC<EntrySearchRowProps<TResult>>;
|
|
83
|
-
selectedItemComponent?: React$1.FC<EntrySearchSelectedItemProps<TResult>>;
|
|
84
|
-
onAddNew?: (type: EntrySearchContentType) => void;
|
|
85
|
-
onEditClosed?: (item: EntrySearchResult) => void;
|
|
86
|
-
onCancel?: () => void;
|
|
87
|
-
resultsLoading?: boolean;
|
|
88
|
-
noResultsComponent?: React$1.FC<{
|
|
89
|
-
searchText?: string;
|
|
90
|
-
selectedContentType?: string;
|
|
91
|
-
}>;
|
|
92
|
-
helpComponent?: JSX.Element;
|
|
93
|
-
onSort?: (items: TResult[]) => void;
|
|
94
|
-
typeSelectorLabel?: string;
|
|
95
|
-
typeSelectorAllTypesOptionText?: string;
|
|
96
|
-
/** Specifies how long (in milliseconds) to wait before showing the loading indicator when `resultsLoading` is true.
|
|
97
|
-
* @default 1000
|
|
98
|
-
*/
|
|
99
|
-
loadingIndicatorDelay?: number;
|
|
100
|
-
};
|
|
101
|
-
/** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-container-with-inputs for implementation details */
|
|
102
|
-
interface EntrySearchResult {
|
|
103
|
-
id: string;
|
|
104
|
-
title: string | JSX.Element;
|
|
105
|
-
createdDate?: TDate;
|
|
106
|
-
editLink?: string;
|
|
107
|
-
metadata?: Record<string, string | JSX.Element>;
|
|
108
|
-
popoverData?: Record<string, string | JSX.Element>;
|
|
109
|
-
}
|
|
110
|
-
/** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-container-with-inputs for implementation details */
|
|
111
|
-
interface EntrySearchContentType {
|
|
112
|
-
id: string;
|
|
113
|
-
name: string;
|
|
114
|
-
}
|
|
115
|
-
/** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-container-with-inputs for implementation details */
|
|
116
|
-
interface NoResultsProps {
|
|
117
|
-
searchText: string | undefined;
|
|
118
|
-
selectedContentType: string | undefined;
|
|
119
|
-
}
|
|
120
|
-
/** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-container-with-inputs for implementation details */
|
|
121
|
-
declare const EntrySearch: <TResult extends EntrySearchResult>({ search, results, contentTypes, selectedItems, logoIcon, select, multiSelect, multiSelectId, rowComponent, selectedItemComponent, totalResults, cursor, resultsLoading, requireContentType, onAddNew, onEditClosed, onCancel, noResultsComponent, helpComponent, onSort, typeSelectorLabel, typeSelectorAllTypesOptionText, loadingIndicatorDelay, }: EntrySearchProps<TResult>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
122
|
-
|
|
123
|
-
/** @deprecated please use ObjectSearchResultItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-result-item */
|
|
124
|
-
interface EntrySearchRowProps<TResult extends EntrySearchResult = EntrySearchResult> {
|
|
125
|
-
result: TResult;
|
|
126
|
-
isSelected: boolean;
|
|
127
|
-
triggerSelection: () => void;
|
|
128
|
-
}
|
|
129
|
-
/** @deprecated please use ObjectSearchResultItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-result-item */
|
|
130
|
-
declare const DefaultSearchRow: React__default.FC<EntrySearchRowProps>;
|
|
131
|
-
|
|
132
|
-
declare const searchRowContainer: _emotion_react.SerializedStyles;
|
|
133
|
-
declare const searchRowContainerWithPopover: _emotion_react.SerializedStyles;
|
|
134
|
-
declare const searchRowContainerActive: _emotion_react.SerializedStyles;
|
|
135
|
-
declare const searchRowTextSmall: _emotion_react.SerializedStyles;
|
|
136
|
-
declare const searchRowText: _emotion_react.SerializedStyles;
|
|
137
|
-
declare const searchRowPopover: _emotion_react.SerializedStyles;
|
|
138
|
-
declare const searchRowBtn: _emotion_react.SerializedStyles;
|
|
139
|
-
|
|
140
|
-
declare const selectedItemContainer: _emotion_react.SerializedStyles;
|
|
141
|
-
declare const selectedItemInner: _emotion_react.SerializedStyles;
|
|
142
|
-
declare const selectedItemDetails: _emotion_react.SerializedStyles;
|
|
143
|
-
declare const selectedItemCopy: _emotion_react.SerializedStyles;
|
|
144
|
-
declare const selectedItemTitle: _emotion_react.SerializedStyles;
|
|
145
|
-
declare const selectedItemIcon: _emotion_react.SerializedStyles;
|
|
146
|
-
declare const selectItemPopover: _emotion_react.SerializedStyles;
|
|
147
|
-
declare const selectItemSmallText: _emotion_react.SerializedStyles;
|
|
148
|
-
declare const selectItemPopoverLabel: _emotion_react.SerializedStyles;
|
|
149
|
-
declare const selectItemLinkContainer: _emotion_react.SerializedStyles;
|
|
150
|
-
declare const selectItemLinkBtn: _emotion_react.SerializedStyles;
|
|
151
|
-
|
|
152
|
-
declare const entrySearchWrapper: _emotion_react.SerializedStyles;
|
|
153
|
-
declare const entrySearchBtn: _emotion_react.SerializedStyles;
|
|
154
|
-
declare const entrySearchLoadMoreBtn: _emotion_react.SerializedStyles;
|
|
155
|
-
declare const entrySearchConfig: _emotion_react.SerializedStyles;
|
|
156
|
-
declare const entrySearchConfigHidden: _emotion_react.SerializedStyles;
|
|
157
|
-
declare const entrySearchResultList: _emotion_react.SerializedStyles;
|
|
158
|
-
declare const entrySearchSelectInput: _emotion_react.SerializedStyles;
|
|
159
|
-
declare const entrySearchSelectIcon: _emotion_react.SerializedStyles;
|
|
160
|
-
declare const entrySearchSelectImg: _emotion_react.SerializedStyles;
|
|
161
|
-
declare const entrySearchSelectOption: _emotion_react.SerializedStyles;
|
|
162
|
-
declare const draggableContainer: _emotion_react.SerializedStyles;
|
|
163
|
-
declare const draggableIconWrapper: _emotion_react.SerializedStyles;
|
|
164
|
-
declare const draggableIcon: _emotion_react.SerializedStyles;
|
|
165
|
-
declare const draggableIconOffset: _emotion_react.SerializedStyles;
|
|
166
|
-
declare const badgeIcon: _emotion_react.SerializedStyles;
|
|
167
|
-
|
|
168
|
-
type GetProductsOptions = {
|
|
169
|
-
keyword?: string;
|
|
170
|
-
count?: number;
|
|
171
|
-
categories?: string[];
|
|
172
|
-
brand?: string;
|
|
173
|
-
sort?: string;
|
|
174
|
-
sortOrder?: string;
|
|
175
|
-
ids?: string[];
|
|
176
|
-
offset?: number;
|
|
177
|
-
};
|
|
178
|
-
type ProductSearchResult = EntrySearchResult & {
|
|
179
|
-
price?: number | string;
|
|
180
|
-
sku?: string;
|
|
181
|
-
thumbnailUrl?: string;
|
|
182
|
-
categories?: Array<{
|
|
183
|
-
id: string;
|
|
184
|
-
name: string;
|
|
185
|
-
}>;
|
|
186
|
-
};
|
|
187
|
-
interface ProductSearchResults {
|
|
188
|
-
total: number;
|
|
189
|
-
products: ProductSearchResult[];
|
|
190
|
-
}
|
|
191
|
-
interface ProductCategory {
|
|
192
|
-
id: string;
|
|
193
|
-
name: string;
|
|
194
|
-
children?: ProductCategory[];
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
|
|
198
|
-
declare const ProductPreviewList: ({ products, }: {
|
|
199
|
-
products: ProductSearchResults["products"] | undefined;
|
|
200
|
-
}) => _emotion_react_jsx_runtime.JSX.Element;
|
|
201
|
-
|
|
202
|
-
/** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
|
|
203
|
-
interface ProductDynamicSelectorValue {
|
|
204
|
-
count: number;
|
|
205
|
-
categories?: string[];
|
|
206
|
-
brand?: string;
|
|
207
|
-
keyword?: string;
|
|
208
|
-
sort?: string;
|
|
209
|
-
sortOrder?: string;
|
|
210
|
-
}
|
|
211
|
-
/** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
|
|
212
|
-
interface ProductQueryProps<TValue extends ProductDynamicSelectorValue = ProductDynamicSelectorValue> {
|
|
213
|
-
value: TValue | undefined;
|
|
214
|
-
setValue: (value: TValue) => Promise<void>;
|
|
215
|
-
brands: Brand[] | undefined;
|
|
216
|
-
categories: ProductQueryCategory[] | undefined;
|
|
217
|
-
loading?: boolean;
|
|
218
|
-
categoriesLoading?: boolean;
|
|
219
|
-
brandsLoading?: boolean;
|
|
220
|
-
logoIcon?: string | React__default.ComponentType<{
|
|
221
|
-
className?: string;
|
|
222
|
-
}>;
|
|
223
|
-
onGetProducts: (options?: GetProductsOptions) => Promise<ProductSearchResults>;
|
|
224
|
-
sortOptions?: Array<{
|
|
225
|
-
name: string;
|
|
226
|
-
sortKey: string;
|
|
227
|
-
}>;
|
|
228
|
-
sortOrderOptions?: Array<{
|
|
229
|
-
name: string;
|
|
230
|
-
sortOrderKey: string;
|
|
231
|
-
}>;
|
|
232
|
-
categoryLabel?: string;
|
|
233
|
-
brandLabel?: string;
|
|
234
|
-
disableBrands?: boolean;
|
|
235
|
-
restrictToSingleCategory?: boolean;
|
|
236
|
-
}
|
|
237
|
-
/** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
|
|
238
|
-
interface ProductQueryCategory {
|
|
239
|
-
id: string;
|
|
240
|
-
name: string;
|
|
241
|
-
children?: ProductQueryCategory[];
|
|
242
|
-
}
|
|
243
|
-
/** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
|
|
244
|
-
interface Brand {
|
|
245
|
-
id: string;
|
|
246
|
-
name: string;
|
|
247
|
-
}
|
|
248
|
-
/** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
|
|
249
|
-
declare const ProductQuery: ({ value, setValue, brands, categories, loading, categoriesLoading, brandsLoading, logoIcon, onGetProducts, sortOptions, sortOrderOptions, categoryLabel, brandLabel, disableBrands, restrictToSingleCategory, }: ProductQueryProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
250
|
-
/** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
|
|
251
|
-
interface ProductQueryContextValue {
|
|
252
|
-
categories: ProductQueryProps['categories'];
|
|
253
|
-
logoIcon: ProductQueryProps['logoIcon'];
|
|
254
|
-
}
|
|
255
|
-
/** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
|
|
256
|
-
declare const ProductQueryContext: React__default.Context<ProductQueryContextValue | undefined>;
|
|
257
|
-
/** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
|
|
258
|
-
declare const useProductQueryContext: () => ProductQueryContextValue;
|
|
259
|
-
|
|
260
|
-
type ProductSearchProps<TResult extends ProductSearchResult = ProductSearchResult> = Pick<EntrySearchProps<TResult>, 'multiSelect' | 'multiSelectId' | 'logoIcon' | 'rowComponent' | 'selectedItemComponent' | 'helpComponent' | 'noResultsComponent' | 'onSort' | 'typeSelectorAllTypesOptionText' | 'typeSelectorLabel'> & {
|
|
261
|
-
selectedProducts: TResult[] | undefined;
|
|
262
|
-
setSelectedProducts: (products: TResult[] | undefined) => Promise<void>;
|
|
263
|
-
onGetCategories: () => Promise<ProductCategory[]>;
|
|
264
|
-
onSearchProducts: (args: {
|
|
265
|
-
text: string;
|
|
266
|
-
options?: GetProductOptions;
|
|
267
|
-
}) => Promise<{
|
|
268
|
-
total: number;
|
|
269
|
-
products: TResult[];
|
|
270
|
-
cursor?: string;
|
|
271
|
-
}>;
|
|
272
|
-
errorComponent?: React__default.ComponentType<{
|
|
273
|
-
categoriesError?: Error;
|
|
274
|
-
searchError?: Error;
|
|
275
|
-
}>;
|
|
276
|
-
};
|
|
277
|
-
/** @deprecated */
|
|
278
|
-
interface GetProductOptions {
|
|
279
|
-
limit?: number;
|
|
280
|
-
offset?: number;
|
|
281
|
-
categoryId?: string;
|
|
282
|
-
cursor?: string;
|
|
283
|
-
}
|
|
284
|
-
/** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs for implementation details */
|
|
285
|
-
declare function ProductSearch({ selectedProducts, setSelectedProducts, onGetCategories, onSearchProducts, logoIcon, multiSelect, multiSelectId, selectedItemComponent, rowComponent, errorComponent, helpComponent, noResultsComponent, onSort, typeSelectorAllTypesOptionText, typeSelectorLabel, }: ProductSearchProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
286
|
-
interface ProductSearchContextValue {
|
|
287
|
-
logoIcon: ProductSearchProps['logoIcon'];
|
|
288
|
-
categories: ProductCategory[] | undefined;
|
|
289
|
-
}
|
|
290
|
-
declare const ProductSearchContext: React__default.Context<ProductSearchContextValue | undefined>;
|
|
291
|
-
declare const useProductSearchContext: () => ProductSearchContextValue;
|
|
292
|
-
|
|
293
|
-
/** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
|
|
294
|
-
declare function ProductSearchRow({ result, isSelected, triggerSelection, }: EntrySearchRowProps<ProductSearchResult>): _emotion_react_jsx_runtime.JSX.Element;
|
|
295
|
-
|
|
296
|
-
/** @deprecated please use ObjectSearchResultItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-result-item*/
|
|
297
|
-
declare function ProductSelectedItem({ selectedItem, onDeselect, }: EntrySearchSelectedItemProps<ProductSearchResult>): _emotion_react_jsx_runtime.JSX.Element;
|
|
298
|
-
|
|
299
|
-
/** @deprecated please use DataRefreshButtonProps - https://mesh-design-system.netlify.app/?path=/story/object-search--data-refresh-button */
|
|
300
|
-
declare const ResolvableLoadingValue: ({ value, text, loading, }: {
|
|
301
|
-
value: string;
|
|
302
|
-
text: string | undefined;
|
|
303
|
-
loading: boolean;
|
|
304
|
-
}) => _emotion_react_jsx_runtime.JSX.Element;
|
|
305
|
-
|
|
306
|
-
/** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
|
|
307
|
-
type SelectionFieldValue = {
|
|
308
|
-
id: string;
|
|
309
|
-
name: string;
|
|
310
|
-
};
|
|
311
|
-
/** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
|
|
312
|
-
declare const SelectionField: ({ id, label, loading, selectedValues, values, onAdd, onRemove, }: {
|
|
313
|
-
id: string;
|
|
314
|
-
label: string;
|
|
315
|
-
loading: boolean;
|
|
316
|
-
selectedValues: string[] | undefined;
|
|
317
|
-
values: SelectionFieldValue[];
|
|
318
|
-
onAdd: (id: string) => void;
|
|
319
|
-
onRemove: (id: string) => void;
|
|
320
|
-
}) => _emotion_react_jsx_runtime.JSX.Element;
|
|
321
|
-
|
|
322
|
-
declare const productSearchRowContainer: _emotion_react.SerializedStyles;
|
|
323
|
-
declare const productSearchRowContent: _emotion_react.SerializedStyles;
|
|
324
|
-
declare const productSearchRowContentActive: _emotion_react.SerializedStyles;
|
|
325
|
-
declare const productSearchRowTitle: _emotion_react.SerializedStyles;
|
|
326
|
-
declare const productSearchRowCategory: _emotion_react.SerializedStyles;
|
|
327
|
-
declare const productSearchRowDetails: _emotion_react.SerializedStyles;
|
|
328
|
-
declare const productSearchRowActiveIcon: _emotion_react.SerializedStyles;
|
|
329
|
-
|
|
330
|
-
declare const productSelectedItemContainer: _emotion_react.SerializedStyles;
|
|
331
|
-
declare const productSelectedItemDetails: _emotion_react.SerializedStyles;
|
|
332
|
-
declare const productSelectedItemContent: _emotion_react.SerializedStyles;
|
|
333
|
-
declare const productSelectedItemImage: _emotion_react.SerializedStyles;
|
|
334
|
-
declare const productedSelectedItemLinkBtn: _emotion_react.SerializedStyles;
|
|
335
|
-
declare const productedSelectedItemSmallText: _emotion_react.SerializedStyles;
|
|
336
|
-
declare const productSelectedItemIcon: _emotion_react.SerializedStyles;
|
|
337
|
-
declare const productSelectedItemLinkContainer: _emotion_react.SerializedStyles;
|
|
338
|
-
|
|
339
|
-
interface DamItem {
|
|
340
|
-
id: string;
|
|
341
|
-
title: string | JSX.Element;
|
|
342
|
-
createdDate?: Date | string | number;
|
|
343
|
-
editLink?: string | JSX.Element;
|
|
344
|
-
metadata?: Record<string, string | JSX.Element>;
|
|
345
|
-
popoverData?: Record<string, string | JSX.Element>;
|
|
346
|
-
previewUrl?: string | JSX.Element;
|
|
347
|
-
type: 'image' | 'video' | 'file' | 'other';
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
/** @deprecated please use ObjectSearchResultItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-result-item */
|
|
351
|
-
interface DamSelectedItemProps<TResult extends DamItem = DamItem> {
|
|
352
|
-
/** The item used for rendering this component. */
|
|
353
|
-
selectedItem: TResult;
|
|
354
|
-
/** Logo icon is used for the `editLink` if `editLink` is a string value, otherwise the icon is not used. */
|
|
355
|
-
logoIcon?: string | React__default.ComponentType<{
|
|
356
|
-
className?: string;
|
|
357
|
-
}>;
|
|
358
|
-
/** Callback that is invoked when the "Unlink" (deselect) button is clicked. */
|
|
359
|
-
onDeselect: (item: TResult) => void;
|
|
360
|
-
/** If `editLink` is a string value, an `<a>` element will be rendered for the `editLink` and
|
|
361
|
-
* the `onEditClosed` callback will be invoked when the tab opened by clicking the `<a>` element is closed. */
|
|
362
|
-
onEditClosed?: (item: TResult) => void;
|
|
363
|
-
/** Allows for customizing how item details, e.g. item preview, item metadata, are rendered. If not defined,
|
|
364
|
-
* item details will be rendered using the default (built-in) renderer.
|
|
365
|
-
*/
|
|
366
|
-
itemDetailsRendererComponent?: React__default.ComponentType<{
|
|
367
|
-
item: TResult;
|
|
368
|
-
}>;
|
|
369
|
-
}
|
|
370
|
-
/** @deprecated please use ObjectSearchResultItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-result-item */
|
|
371
|
-
declare function DamSelectedItem({ selectedItem, onDeselect, onEditClosed, logoIcon, itemDetailsRendererComponent, }: DamSelectedItemProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
372
|
-
|
|
373
|
-
declare const damSelectedItemContainer: _emotion_react.SerializedStyles;
|
|
374
|
-
declare const damSelectedItemInner: _emotion_react.SerializedStyles;
|
|
375
|
-
declare const damSelectedItemDetails: _emotion_react.SerializedStyles;
|
|
376
|
-
declare const damSelectedItemCopy: _emotion_react.SerializedStyles;
|
|
377
|
-
declare const damSelectedItemTitle: _emotion_react.SerializedStyles;
|
|
378
|
-
declare const damSelectedItemIcon: _emotion_react.SerializedStyles;
|
|
379
|
-
declare const damSelectedItemPopover: _emotion_react.SerializedStyles;
|
|
380
|
-
declare const damSelectedItemSmallText: _emotion_react.SerializedStyles;
|
|
381
|
-
declare const damSelectedItemPopoverLabel: _emotion_react.SerializedStyles;
|
|
382
|
-
declare const damSelectedItemLinkContainer: _emotion_react.SerializedStyles;
|
|
383
|
-
declare const damSelectedItemLinkBtn: _emotion_react.SerializedStyles;
|
|
384
|
-
declare const damSelectedItemMediaContainer: _emotion_react.SerializedStyles;
|
|
385
|
-
declare const damSelectedItemInfoBtn: _emotion_react.SerializedStyles;
|
|
386
|
-
declare const damSelectItemImage: _emotion_react.SerializedStyles;
|
|
387
|
-
|
|
388
47
|
type DataResourceDynamicInputProviderProps = {
|
|
389
48
|
/** Explicitly provide dynamic input values. If not set, Mesh location will be used */
|
|
390
49
|
dynamicInputs?: DynamicInputs;
|
|
@@ -819,16 +478,6 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
819
478
|
label?: string | ReactNode;
|
|
820
479
|
/** sets the input aria-label value. */
|
|
821
480
|
'aria-label'?: string;
|
|
822
|
-
/**
|
|
823
|
-
* Turns off the 'Reset' menu option that is added when:
|
|
824
|
-
* - inputWhenNoVariables is passed in
|
|
825
|
-
* - variables are, or have have been bound to
|
|
826
|
-
*
|
|
827
|
-
* The reset button returns the editor to the inputWithNoVariables state
|
|
828
|
-
*
|
|
829
|
-
* @deprecated this is ignored if passed, computation is now automatic
|
|
830
|
-
*/
|
|
831
|
-
disableReset?: boolean;
|
|
832
481
|
/**
|
|
833
482
|
* By default when keyDown happens in the variables input, any active variable editor is dismissed automatically.
|
|
834
483
|
* This makes sense, until you want to put a variables input _into_ a variables editor component. In that case,
|
|
@@ -842,8 +491,6 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
842
491
|
/**
|
|
843
492
|
* Defines single place to render "Insert variable" menu buttons.
|
|
844
493
|
* Be aware that it will override "disableInlineMenu" if set.
|
|
845
|
-
*
|
|
846
|
-
* @deprecated beta
|
|
847
494
|
*/
|
|
848
495
|
showMenuPosition?: 'label' | 'input' | 'inline-right';
|
|
849
496
|
/**
|
|
@@ -1106,12 +753,6 @@ declare function useVariableEditor<TEditorContext = unknown, TEditVariableComple
|
|
|
1106
753
|
/** Converts a connected data map entry to a VariablesProvider-format variable */
|
|
1107
754
|
declare function convertConnectedDataToVariable(bindExpression: string, value: unknown): MeshDataVariableDefinition;
|
|
1108
755
|
|
|
1109
|
-
/**
|
|
1110
|
-
* Returns true if the string expression has variable references in it
|
|
1111
|
-
* @deprecated use the same named function from @uniformdev/canvas instead
|
|
1112
|
-
*/
|
|
1113
|
-
declare function hasReferencedVariables(value: string): boolean;
|
|
1114
|
-
|
|
1115
756
|
declare function prettifyBindExpression(bindExpression: string): string;
|
|
1116
757
|
|
|
1117
758
|
/**
|
|
@@ -1283,8 +924,6 @@ type ObjectSearchFilterProps = {
|
|
|
1283
924
|
selectLabel?: string;
|
|
1284
925
|
/** sets the select input options, if empty - only keyword search field will be rendered */
|
|
1285
926
|
selectOptions?: Array<{
|
|
1286
|
-
id?: string;
|
|
1287
|
-
name?: string;
|
|
1288
927
|
label: string;
|
|
1289
928
|
value?: string;
|
|
1290
929
|
}>;
|
|
@@ -1304,11 +943,6 @@ type ObjectSearchFilterProps = {
|
|
|
1304
943
|
declare const ObjectSearchFilter: ({ requireContentType, typeSelectorAllTypesOptionText, searchInputName, searchInputPlaceholderText, selectLabel, selectOptions, }: ObjectSearchFilterProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1305
944
|
|
|
1306
945
|
type ObjectSearchFilterContainerProps = {
|
|
1307
|
-
/**
|
|
1308
|
-
* sets the title for the container
|
|
1309
|
-
* @deprecated we recommend setting the label on ObjectSearchContainer instead
|
|
1310
|
-
*/
|
|
1311
|
-
label?: string;
|
|
1312
946
|
/** sets child components in an opinionated layout */
|
|
1313
947
|
children?: React.ReactNode;
|
|
1314
948
|
};
|
|
@@ -1316,7 +950,28 @@ type ObjectSearchFilterContainerProps = {
|
|
|
1316
950
|
* @description an opinionated layout for search filters
|
|
1317
951
|
* @example <ObjectSearchFilterContainer label="my label"><input type="text" aria-label="my input" /></ObjectSearchFilterContainer>
|
|
1318
952
|
*/
|
|
1319
|
-
declare const ObjectSearchFilterContainer: ({
|
|
953
|
+
declare const ObjectSearchFilterContainer: ({ children }: ObjectSearchFilterContainerProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
954
|
+
|
|
955
|
+
type BadgeThemeProps = 'caution' | 'info' | 'note' | 'success' | 'error' | 'unimportant';
|
|
956
|
+
type ObjectSearchResultItemProps = SelectedItemProps & {
|
|
957
|
+
/** sets additional remove functionality onto of default removal */
|
|
958
|
+
onRemove?: () => void;
|
|
959
|
+
/** sets whether to show or hide the remove button
|
|
960
|
+
* @default false
|
|
961
|
+
*/
|
|
962
|
+
hideRemoveButton?: boolean;
|
|
963
|
+
/** sets user defined child nodes that are uncontrolled by Uniform */
|
|
964
|
+
children?: ReactNode;
|
|
965
|
+
/** disable or enable drag and drop functionality
|
|
966
|
+
* @default false
|
|
967
|
+
*/
|
|
968
|
+
disableDnD?: boolean;
|
|
969
|
+
};
|
|
970
|
+
/**
|
|
971
|
+
* @description An opinionated result item, best used for selected results
|
|
972
|
+
* @example <ObjectSearchResultItem id="my-result" title="title" />
|
|
973
|
+
*/
|
|
974
|
+
declare const ObjectSearchResultItem: ({ id, title, contentType, popoverData, publishStatus, editLinkIcon, editLink, imageUrl, onRemove, createdAt, publishedAt, hideRemoveButton, disableDnD, children, }: ObjectSearchResultItemProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1320
975
|
|
|
1321
976
|
type SearchQueryProps<TExtraFilters = unknown> = {
|
|
1322
977
|
/** sets the content type in the search context */
|
|
@@ -1331,16 +986,6 @@ type SelectedItemProps<TExtraProps = unknown> = {
|
|
|
1331
986
|
id: string;
|
|
1332
987
|
/** sets the title value */
|
|
1333
988
|
title: string;
|
|
1334
|
-
/**
|
|
1335
|
-
* sets the name value, sometimes used for products
|
|
1336
|
-
* @deprecated use title instead
|
|
1337
|
-
*/
|
|
1338
|
-
name?: string;
|
|
1339
|
-
/**
|
|
1340
|
-
* sets the subtitle value
|
|
1341
|
-
* @deprecated this is unused
|
|
1342
|
-
*/
|
|
1343
|
-
subtitle?: string;
|
|
1344
989
|
/** sets the content type value */
|
|
1345
990
|
contentType?: string | string[];
|
|
1346
991
|
/** sets the created date value using TimeAgo to transform the date */
|
|
@@ -1410,22 +1055,6 @@ declare function useObjectSearchContext<TExtraSearchFilters = unknown, TExtraIte
|
|
|
1410
1055
|
type ObjectSearchListItemProps = SelectedItemProps & {
|
|
1411
1056
|
/** sets the content type value, this is normally used for subtitles e.g. Kitchens */
|
|
1412
1057
|
contentType?: string | string[];
|
|
1413
|
-
/** sets image parameters
|
|
1414
|
-
* @deprecated Please use imageUrl to make it compatible with */
|
|
1415
|
-
image?: {
|
|
1416
|
-
/** sets the src value */
|
|
1417
|
-
src: string;
|
|
1418
|
-
/** sets the alt text value */
|
|
1419
|
-
alt: string;
|
|
1420
|
-
/** set the width attribute of the image
|
|
1421
|
-
* if both width and height are set the image loading attribute is set to `lazy`
|
|
1422
|
-
*/
|
|
1423
|
-
width?: number;
|
|
1424
|
-
/** set the height attribute of the image
|
|
1425
|
-
* if both width and height are set the image loading attribute is set to `lazy`
|
|
1426
|
-
*/
|
|
1427
|
-
height?: number;
|
|
1428
|
-
};
|
|
1429
1058
|
imageUrl?: string;
|
|
1430
1059
|
/** sets the function call on the role="button" wrapping element */
|
|
1431
1060
|
onSelect?: (data?: Record<string, unknown>) => void;
|
|
@@ -1434,8 +1063,7 @@ type ObjectSearchListItemProps = SelectedItemProps & {
|
|
|
1434
1063
|
/** allows authors to add any child component that is not controlled by Uniform */
|
|
1435
1064
|
children?: React$1.ReactNode;
|
|
1436
1065
|
/** sets whether multiple entries can be added to the results list context
|
|
1437
|
-
* @default false
|
|
1438
|
-
* @deprecated Please use isMulti property in <ObjectSearchProvider />
|
|
1066
|
+
* @default inherit from context or false
|
|
1439
1067
|
*/
|
|
1440
1068
|
isMulti?: boolean;
|
|
1441
1069
|
/** sets disabled state to the interactive element */
|
|
@@ -1444,33 +1072,13 @@ type ObjectSearchListItemProps = SelectedItemProps & {
|
|
|
1444
1072
|
/**
|
|
1445
1073
|
* @description entry search list item is an opinionated UI component best used for initial retrieved results
|
|
1446
1074
|
* @example <ObjectSearchListItem id="my-result-item" title="title" popoverData={<p>some data info</p>}><div>example of uncontrolled content</div></ObjectSearchListItem> */
|
|
1447
|
-
declare const ObjectSearchListItem: ({ id, title, contentType,
|
|
1075
|
+
declare const ObjectSearchListItem: ({ id, title, contentType, imageUrl, popoverData, onSelect, isMulti, disabled, children, ...props }: ObjectSearchListItemProps & React$1.HTMLAttributes<HTMLDivElement>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1448
1076
|
/**
|
|
1449
1077
|
* An opinionated loading skeleton component best used with ObjectSearchListItem
|
|
1450
1078
|
* @example <ObjectSearchListItemLoadingSkeleton />
|
|
1451
1079
|
*/
|
|
1452
1080
|
declare const ObjectSearchListItemLoadingSkeleton: () => _emotion_react_jsx_runtime.JSX.Element;
|
|
1453
1081
|
|
|
1454
|
-
type ObjectSearchResultItemProps = SelectedItemProps & {
|
|
1455
|
-
/** sets additional remove functionality onto of default removal */
|
|
1456
|
-
onRemove?: () => void;
|
|
1457
|
-
/** sets whether to show or hide the remove button
|
|
1458
|
-
* @default false
|
|
1459
|
-
*/
|
|
1460
|
-
hideRemoveButton?: boolean;
|
|
1461
|
-
/** sets user defined child nodes that are uncontrolled by Uniform */
|
|
1462
|
-
children?: ReactNode;
|
|
1463
|
-
/** disable or enable drag and drop functionality
|
|
1464
|
-
* @default false
|
|
1465
|
-
*/
|
|
1466
|
-
disableDnD?: boolean;
|
|
1467
|
-
};
|
|
1468
|
-
/**
|
|
1469
|
-
* @description An opinionated result item, best used for selected results
|
|
1470
|
-
* @example <ObjectSearchResultItem id="my-result" title="title" />
|
|
1471
|
-
*/
|
|
1472
|
-
declare const ObjectSearchResultItem: ({ id, title, name, contentType, popoverData, publishStatus, editLinkIcon, editLink, imageUrl, onRemove, createdAt, publishedAt, hideRemoveButton, disableDnD, children, }: ObjectSearchResultItemProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1473
|
-
|
|
1474
1082
|
type ObjectSearchResultItemButtonProps<THtml extends HTMLAttributes<HTMLElement> = HTMLAttributes<HTMLButtonElement>> = {
|
|
1475
1083
|
/** sets the button or link text value */
|
|
1476
1084
|
text: string;
|
|
@@ -1544,10 +1152,6 @@ type QueryFilterSearchProps = {
|
|
|
1544
1152
|
sortOrder: string;
|
|
1545
1153
|
};
|
|
1546
1154
|
type QueryFilterSelectionOptionProps = Array<{
|
|
1547
|
-
/** @deprecated please use value instead */
|
|
1548
|
-
id?: string;
|
|
1549
|
-
/** @deprecated please use value or label instead */
|
|
1550
|
-
name?: string;
|
|
1551
1155
|
/** contains id or machine values. will be used as value attribute in <option> */
|
|
1552
1156
|
value?: string;
|
|
1553
1157
|
/** Contains human-readable display name for select options.
|
|
@@ -1575,11 +1179,6 @@ type QueryFilterProps<TSelectOptions extends QueryFilterSelectionOptionProps = Q
|
|
|
1575
1179
|
* @default 'Count'
|
|
1576
1180
|
*/
|
|
1577
1181
|
countLabel?: string;
|
|
1578
|
-
/** sets the count value or items to show. As a string you can pass dynamic variables ${countFromQuery} for example
|
|
1579
|
-
* @default 5
|
|
1580
|
-
* @deprecated please use ObjectSearchProviderProps['defaultQuery'] to pass initial count value
|
|
1581
|
-
*/
|
|
1582
|
-
countValue?: number | string;
|
|
1583
1182
|
/** sets the sort label text
|
|
1584
1183
|
* @default 'Sort'
|
|
1585
1184
|
*/
|
|
@@ -1611,7 +1210,7 @@ type QueryFilterProps<TSelectOptions extends QueryFilterSelectionOptionProps = Q
|
|
|
1611
1210
|
* @description An opinionated multi query filter UI component, best used for querying product data or more complex scenarios
|
|
1612
1211
|
* @example <QueryFilter contentTypeOptions={[{ id: 'id', name: 'name' }]} sortOptions={[{ id: 'id', name: 'name' }]} sortOrderOptions={[{ id: 'id', name: 'name' }]} />
|
|
1613
1212
|
*/
|
|
1614
|
-
declare const QueryFilter: ({ requireContentType, queryFilterTitle, contentTypeLabel, typeSelectorAllTypesOptionText, contentTypeOptions, searchInputName, searchInputPlaceholderText, searchInputLabel, countLabel,
|
|
1213
|
+
declare const QueryFilter: ({ requireContentType, queryFilterTitle, contentTypeLabel, typeSelectorAllTypesOptionText, contentTypeOptions, searchInputName, searchInputPlaceholderText, searchInputLabel, countLabel, sortLabel, sortOptions, sortOrderLabel, sortOrderOptions, children, }: QueryFilterProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1615
1214
|
|
|
1616
1215
|
type ParamTypeDynamicDataProviderProps = {
|
|
1617
1216
|
/** Child components of the provider. Variables-using components, such as ParameterVariables, can be used here. */
|
|
@@ -1756,11 +1355,11 @@ declare function useRequestParameter(paramName: string): {
|
|
|
1756
1355
|
update: (value: string) => void;
|
|
1757
1356
|
};
|
|
1758
1357
|
|
|
1759
|
-
/**
|
|
1358
|
+
/** Filter editor component names */
|
|
1760
1359
|
type FilterEditor = 'singleChoice' | 'multiChoice' | 'dateRange' | 'date' | 'text' | 'textMultiChoice' | 'empty' | 'number' | 'numberRange' | 'statusMultiChoice' | 'statusSingleChoice' | (string & {});
|
|
1761
|
-
/**
|
|
1360
|
+
/** Input option props */
|
|
1762
1361
|
type InputOption = InputOptionGroup | InputOptionValue;
|
|
1763
|
-
/**
|
|
1362
|
+
/** Input option group props */
|
|
1764
1363
|
type InputOptionGroup = {
|
|
1765
1364
|
type: 'group';
|
|
1766
1365
|
/** The label for the option group */
|
|
@@ -1773,7 +1372,7 @@ type InputOptionGroup = {
|
|
|
1773
1372
|
/** Options in the option group */
|
|
1774
1373
|
options: InputOptionValue[];
|
|
1775
1374
|
};
|
|
1776
|
-
/**
|
|
1375
|
+
/** Input option props */
|
|
1777
1376
|
type InputOptionValue = {
|
|
1778
1377
|
/** The label for the option */
|
|
1779
1378
|
label: string;
|
|
@@ -1784,7 +1383,7 @@ type InputOptionValue = {
|
|
|
1784
1383
|
*/
|
|
1785
1384
|
value: string | string[];
|
|
1786
1385
|
};
|
|
1787
|
-
/**
|
|
1386
|
+
/** Operator option props */
|
|
1788
1387
|
type Operator = {
|
|
1789
1388
|
/** The label for the operator */
|
|
1790
1389
|
label: string;
|
|
@@ -1821,14 +1420,14 @@ type Operator = {
|
|
|
1821
1420
|
*/
|
|
1822
1421
|
expectedValueType: ('single' | 'array' | 'between' | 'none') | {} | undefined;
|
|
1823
1422
|
};
|
|
1824
|
-
/**
|
|
1423
|
+
/** Filter option props */
|
|
1825
1424
|
type FilterOptionLeftHandComponentProps = {
|
|
1826
1425
|
deselectFilterOption: () => void;
|
|
1827
1426
|
filterOption: FilterOption;
|
|
1828
1427
|
filter: Filter;
|
|
1829
1428
|
setFilterDynamicValue: ((dynamicValue: string | undefined) => void) | undefined;
|
|
1830
1429
|
};
|
|
1831
|
-
/**
|
|
1430
|
+
/** Filter option props */
|
|
1832
1431
|
type FilterOption = {
|
|
1833
1432
|
/** The label for the option */
|
|
1834
1433
|
label: string;
|
|
@@ -1860,7 +1459,7 @@ type FilterOption = {
|
|
|
1860
1459
|
*/
|
|
1861
1460
|
leftHandSideComponentWhenSelected?: ComponentType<FilterOptionLeftHandComponentProps>;
|
|
1862
1461
|
};
|
|
1863
|
-
/**
|
|
1462
|
+
/** Filter option props */
|
|
1864
1463
|
type FilterOptionGroup = {
|
|
1865
1464
|
/** The label for the option group */
|
|
1866
1465
|
label: string;
|
|
@@ -1869,7 +1468,7 @@ type FilterOptionGroup = {
|
|
|
1869
1468
|
/** The options for the option */
|
|
1870
1469
|
options?: FilterOption[];
|
|
1871
1470
|
};
|
|
1872
|
-
/**
|
|
1471
|
+
/** Filter selected and query value props */
|
|
1873
1472
|
type Filter = {
|
|
1874
1473
|
/** The field value selected */
|
|
1875
1474
|
field: string;
|
|
@@ -1898,70 +1497,70 @@ type FilterEditorRendererProps<TValue extends string | string[]> = Pick<FilterOp
|
|
|
1898
1497
|
filterFieldName: string;
|
|
1899
1498
|
};
|
|
1900
1499
|
|
|
1901
|
-
/**
|
|
1500
|
+
/** a list of possible operator values that sync with uniform search api */
|
|
1902
1501
|
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';
|
|
1903
1502
|
type OperatorValueType = {
|
|
1904
1503
|
value: OperatorValue;
|
|
1905
1504
|
};
|
|
1906
|
-
/**
|
|
1505
|
+
/** a list of possible operator types */
|
|
1907
1506
|
type OperatorType = Array<Omit<Operator, 'value'> & OperatorValueType>;
|
|
1908
|
-
/**
|
|
1507
|
+
/** uniform number operators */
|
|
1909
1508
|
declare const NUMBER_OPERATORS: OperatorType;
|
|
1910
|
-
/**
|
|
1509
|
+
/** uniform date operators */
|
|
1911
1510
|
declare const DATE_OPERATORS: OperatorType;
|
|
1912
|
-
/**
|
|
1511
|
+
/** uniform textbox operators */
|
|
1913
1512
|
declare const TEXTBOX_OPERATORS: OperatorType;
|
|
1914
|
-
/**
|
|
1513
|
+
/** uniform user operators */
|
|
1915
1514
|
declare const USER_OPERATORS: OperatorType;
|
|
1916
|
-
/**
|
|
1515
|
+
/** uniform system date operators */
|
|
1917
1516
|
declare const DATE_TIME_OPERATORS: OperatorType;
|
|
1918
|
-
/**
|
|
1517
|
+
/** uniform rich text operators */
|
|
1919
1518
|
declare const RICHTEXT_OPERATORS: OperatorType;
|
|
1920
|
-
/**
|
|
1519
|
+
/** uniform checkbox operators */
|
|
1921
1520
|
declare const CHECKBOX_OPERATORS: OperatorType;
|
|
1922
|
-
/**
|
|
1521
|
+
/** uniform system field operators */
|
|
1923
1522
|
declare const SYSTEM_FIELD_OPERATORS: OperatorType;
|
|
1924
|
-
/**
|
|
1523
|
+
/** uniform optional system field operators */
|
|
1925
1524
|
declare const OPTIONAL_SYSTEM_FIELD_OPERATORS: OperatorType;
|
|
1926
|
-
/**
|
|
1525
|
+
/** uniform publish status field operators */
|
|
1927
1526
|
declare const PUBLISH_STATUS_FIELD_OPERATORS: OperatorType;
|
|
1928
|
-
/**
|
|
1527
|
+
/** uniform select field operators */
|
|
1929
1528
|
declare const SELECT_OPERATORS: OperatorType;
|
|
1930
|
-
/**
|
|
1529
|
+
/** uniform multi-select field operators */
|
|
1931
1530
|
declare const MULTI_SELECT_OPERATORS: OperatorType;
|
|
1932
1531
|
|
|
1933
1532
|
/**
|
|
1934
|
-
*
|
|
1533
|
+
* Renders a date input field for filtering
|
|
1935
1534
|
* @example <DateEditor ariaLabel="Date" value={value} onChange={onChange} />
|
|
1936
1535
|
*/
|
|
1937
1536
|
declare const DateEditor: ({ onChange, ariaLabel, disabled, value, readOnly, valueTestId, }: FilterEditorRendererProps<string>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1938
1537
|
|
|
1939
1538
|
/**
|
|
1940
|
-
*
|
|
1539
|
+
* Renders a date range input field for filtering
|
|
1941
1540
|
* @example <DateRangeEditor ariaLabel="Date Range" value={value} onChange={onChange} />
|
|
1942
1541
|
*/
|
|
1943
1542
|
declare const DateRangeEditor: ({ ariaLabel, onChange, disabled, value, readOnly, valueTestId, }: FilterEditorRendererProps<string[]>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1944
1543
|
|
|
1945
1544
|
/**
|
|
1946
|
-
*
|
|
1545
|
+
* Multi select filter component
|
|
1947
1546
|
* @example <FilterMultiChoiceEditor options={options} value={options.filter((option) => values.includes(option.value)} onChange={(e) => onChange(e.map((option) => option.value))} />
|
|
1948
1547
|
*/
|
|
1949
1548
|
declare const FilterMultiChoiceEditor: ({ value, options, disabled, readOnly, valueTestId, ...props }: FilterEditorRendererProps<string[]>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1950
1549
|
|
|
1951
1550
|
/**
|
|
1952
|
-
*
|
|
1551
|
+
* Single select filter component
|
|
1953
1552
|
* @example <FilterSingleChoiceEditor options={options} value={options.find((option) => values.includes(option.value)} onChange={(e) => onChange(e.value)} />
|
|
1954
1553
|
*/
|
|
1955
1554
|
declare const FilterSingleChoiceEditor: ({ options, value, disabled, readOnly, onChange, valueTestId, }: FilterEditorRendererProps<string>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1956
1555
|
|
|
1957
1556
|
/**
|
|
1958
|
-
*
|
|
1557
|
+
* Renders a number input field for filtering
|
|
1959
1558
|
* @example <NumberEditor ariaLabel="Number" value={value} onChange={onChange} />
|
|
1960
1559
|
*/
|
|
1961
1560
|
declare const NumberEditor: ({ ariaLabel, onChange, disabled, value, readOnly, valueTestId, }: FilterEditorRendererProps<string>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1962
1561
|
|
|
1963
1562
|
/**
|
|
1964
|
-
*
|
|
1563
|
+
* Renders a number range input field for filtering
|
|
1965
1564
|
* @example <NumberRangeEditor ariaLabel="Number Range" value={value} onChange={onChange} />
|
|
1966
1565
|
*/
|
|
1967
1566
|
declare const NumberRangeEditor: ({ onChange, disabled, ariaLabel, value, readOnly, valueTestId, }: FilterEditorRendererProps<string[]>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -1973,29 +1572,28 @@ declare const readOnlyAttributes: {
|
|
|
1973
1572
|
};
|
|
1974
1573
|
|
|
1975
1574
|
/**
|
|
1976
|
-
*
|
|
1575
|
+
* Status multi select filter component that renders a custom dropdown menu
|
|
1977
1576
|
* @example <StatusMultiEditor options={options} value={value} onChange={onChange} />
|
|
1978
1577
|
*/
|
|
1979
1578
|
declare const StatusMultiEditor: ({ options, value, disabled, readOnly, onChange, valueTestId, }: FilterEditorRendererProps<string[]>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1980
1579
|
|
|
1981
1580
|
/**
|
|
1982
|
-
*
|
|
1581
|
+
* Status single select filter component that renders a custom dropdown menu
|
|
1983
1582
|
* @example <StatusSingleEditor options={options} value={value} onChange={onChange} />
|
|
1984
1583
|
*/
|
|
1985
1584
|
declare const StatusSingleEditor: ({ options, value, disabled, readOnly, onChange, valueTestId, }: FilterEditorRendererProps<string>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1986
1585
|
|
|
1987
1586
|
/**
|
|
1988
|
-
*
|
|
1587
|
+
* Renders a text input field for filtering
|
|
1989
1588
|
* @example <TextEditor ariaLabel="Search" value={value} onChange={onChange} />
|
|
1990
1589
|
*/
|
|
1991
1590
|
declare const TextEditor: ({ onChange, ariaLabel, value, readOnly, valueTestId, }: FilterEditorRendererProps<string>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1992
1591
|
|
|
1993
1592
|
/**
|
|
1994
|
-
*
|
|
1593
|
+
* Text value multi select filter component
|
|
1995
1594
|
*/
|
|
1996
1595
|
declare const TextMultiChoiceEditor: ({ value, disabled, readOnly, valueTestId, ...props }: FilterEditorRendererProps<string[]>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1997
1596
|
|
|
1998
|
-
/** @description beta - filter button type */
|
|
1999
1597
|
type FilterButtonProps = {
|
|
2000
1598
|
/** text to display on the button
|
|
2001
1599
|
* @default "Filters"
|
|
@@ -2015,13 +1613,13 @@ type FilterButtonProps = {
|
|
|
2015
1613
|
showDropdownIcon?: boolean;
|
|
2016
1614
|
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
2017
1615
|
/**
|
|
2018
|
-
*
|
|
1616
|
+
* A filter button component used to display filter menu options
|
|
2019
1617
|
* @example <FilterButton text="Filters" filterCount={3} />
|
|
2020
1618
|
*/
|
|
2021
1619
|
declare const FilterButton: ({ text, icon, filterCount, hasSelectedValue, dataTestId, showDropdownIcon, ...props }: FilterButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2022
1620
|
|
|
2023
1621
|
/**
|
|
2024
|
-
*
|
|
1622
|
+
* Default filter controls for search and filter
|
|
2025
1623
|
* @example <FilterControls />
|
|
2026
1624
|
*/
|
|
2027
1625
|
declare const FilterControls: ({ children, hideSearchInput, }: {
|
|
@@ -2032,11 +1630,11 @@ declare const FilterControls: ({ children, hideSearchInput, }: {
|
|
|
2032
1630
|
}) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2033
1631
|
|
|
2034
1632
|
/**
|
|
2035
|
-
*
|
|
1633
|
+
* Renders a filter editor component
|
|
2036
1634
|
* @example <FilterEditorRenderer editorType="multiChoice" options={options} value={value} onChange={onChange} />
|
|
2037
1635
|
*/
|
|
2038
1636
|
declare const FilterEditorRenderer: ({ editorType, ...props }: FilterEditorRendererProps<never>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2039
|
-
/**
|
|
1637
|
+
/** A mapper for filter editor components */
|
|
2040
1638
|
declare const filterMapper: Record<FilterEditor, ComponentType<FilterEditorRendererProps<any>> | null>;
|
|
2041
1639
|
declare const bindableFiltersMapper: typeof filterMapper;
|
|
2042
1640
|
|
|
@@ -2060,7 +1658,7 @@ type FilterItemProps = {
|
|
|
2060
1658
|
/** How multiple criteria are joined together */
|
|
2061
1659
|
criteriaGroupOperator?: 'and' | 'or';
|
|
2062
1660
|
};
|
|
2063
|
-
/**
|
|
1661
|
+
/** A filter item component used to display filter options */
|
|
2064
1662
|
declare const FilterItem: ({ index, operatorOptions, valueOptions, onFilterOptionChange, onFilterDynamicChange, onOperatorChange, onValueChange, initialCriteriaTitle, criteriaGroupOperator, }: FilterItemProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2065
1663
|
|
|
2066
1664
|
type FilterMapper = Record<string, ComponentType<any> | null>;
|
|
@@ -2124,11 +1722,11 @@ type SearchAndFilterContextProps = {
|
|
|
2124
1722
|
};
|
|
2125
1723
|
declare const SearchAndFilterContext: React$1.Context<SearchAndFilterContextProps>;
|
|
2126
1724
|
/**
|
|
2127
|
-
*
|
|
1725
|
+
* Search and filter provider
|
|
2128
1726
|
* @example <SearchAndFilterProvider filters={filters} filterOptions={filterOptions} onSearchChange={onSearchChange} onChange={onChange}>Children</SearchAndFilterProvider>
|
|
2129
1727
|
* */
|
|
2130
1728
|
declare const SearchAndFilterProvider: ({ filters, filterOptions, filterVisible, alwaysVisible, defaultSearchTerm, onSearchChange, onChange, resetFilterValues, totalResults, filterMapper, children, allowBindingSearchTerm, }: SearchAndFilterProviderProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2131
|
-
/**
|
|
1729
|
+
/** Search and filter hook
|
|
2132
1730
|
* @example const { searchTerm, setSearchTerm, filterVisibility, setFilterVisibility, filters, setFilters, handleAddFilter, handleResetFilters, handleDeleteFilter, filterOptions, validFilterQuery } = useSearchAndFilter();
|
|
2133
1731
|
*/
|
|
2134
1732
|
declare const useSearchAndFilter: () => {
|
|
@@ -2187,7 +1785,7 @@ type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
|
|
|
2187
1785
|
additionalFiltersContainer?: React$1.ReactNode;
|
|
2188
1786
|
};
|
|
2189
1787
|
/**
|
|
2190
|
-
*
|
|
1788
|
+
* Search and filter component
|
|
2191
1789
|
* @example <SearchAndFilter filters={filters} filterOptions={filterOptions} onChange={onChange} onSearchChange={onSearchChange} onSearchReset={onSearchReset} totalResults={totalResults} />
|
|
2192
1790
|
* */
|
|
2193
1791
|
declare const SearchAndFilter: ({ filters, filterOptions, filterVisible, filterControls, viewSwitchControls, resultsContainerView, filterMapper, additionalFiltersContainer, onChange, defaultSearchTerm, onSearchChange, totalResults, allowBindingSearchTerm, resetFilterValues, }: SearchAndFilterProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -2199,7 +1797,7 @@ type FilterItemsProps = {
|
|
|
2199
1797
|
filterTitle?: string;
|
|
2200
1798
|
resetButtonText?: string;
|
|
2201
1799
|
} & Pick<FilterItemProps, 'initialCriteriaTitle' | 'criteriaGroupOperator'>;
|
|
2202
|
-
/**
|
|
1800
|
+
/** A filter items component used to display filter options */
|
|
2203
1801
|
declare const FilterItems: ({ addButtonText, additionalFiltersContainer, filterTitle, resetButtonText, initialCriteriaTitle, criteriaGroupOperator, }: FilterItemsProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2204
1802
|
|
|
2205
1803
|
type SearchAndFilterOptionsContainerProps = {
|
|
@@ -2210,7 +1808,7 @@ type SearchAndFilterOptionsContainerProps = {
|
|
|
2210
1808
|
additionalFiltersContainer?: SearchAndFilterProps['additionalFiltersContainer'];
|
|
2211
1809
|
};
|
|
2212
1810
|
/**
|
|
2213
|
-
*
|
|
1811
|
+
* A container component for search and filter options
|
|
2214
1812
|
* @example <SearchAndFilterOptionsContainer buttonRow={<button>Button</button>}>Children</SearchAndFilterOptionsContainer>
|
|
2215
1813
|
* */
|
|
2216
1814
|
declare const SearchAndFilterOptionsContainer: ({ buttonRow, additionalFiltersContainer, children, }: SearchAndFilterOptionsContainerProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -2232,7 +1830,7 @@ type FiltersProps = {
|
|
|
2232
1830
|
additionalFiltersContainer?: SearchAndFilterProps['additionalFiltersContainer'];
|
|
2233
1831
|
};
|
|
2234
1832
|
/**
|
|
2235
|
-
*
|
|
1833
|
+
* A filter menu component used to display filter options
|
|
2236
1834
|
* @example <FilterMenu id="search-and-filter-options">Children</FilterMenu>
|
|
2237
1835
|
* */
|
|
2238
1836
|
declare const FilterMenu: ({ id, filterTitle, menuControls, additionalFiltersContainer, children, dataTestId, resetButtonText, }: FiltersProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -2253,7 +1851,7 @@ type SearchAndFilterResultContainerProps = {
|
|
|
2253
1851
|
/** Sets whether to show or hide both clear search buttons */
|
|
2254
1852
|
hideClearButton?: boolean;
|
|
2255
1853
|
};
|
|
2256
|
-
/**
|
|
1854
|
+
/** Search and filter results container */
|
|
2257
1855
|
declare const SearchAndFilterResultContainer: ({ buttonText, clearButtonLabel, calloutTitle, calloutText, onHandleClear, hideClearButton, }: SearchAndFilterResultContainerProps) => _emotion_react_jsx_runtime.JSX.Element | null;
|
|
2258
1856
|
|
|
2259
1857
|
declare const SearchOnlyContext: React$1.Context<Pick<SearchAndFilterContextProps, "searchTerm" | "setSearchTerm">>;
|
|
@@ -2350,4 +1948,4 @@ type ContentDataResourceLocaleInfoProps = {
|
|
|
2350
1948
|
};
|
|
2351
1949
|
declare function useContentDataResourceLocaleInfo({ locale, defaultLocale, setLocale, dynamicInputs, }: ContentDataResourceLocaleInfoProps): ContentDataResourceLocaleInfoResult;
|
|
2352
1950
|
|
|
2353
|
-
export { $createVariableNode, $isVariableNode, type
|
|
1951
|
+
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 };
|