@natoora-libs/core 0.1.19 → 0.1.20
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/components/index.cjs +1852 -1557
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +1174 -0
- package/dist/components/index.d.ts +1174 -0
- package/dist/components/index.js +1756 -1471
- package/dist/components/index.js.map +1 -1
- package/dist/hooks/index.d.cts +3 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/providers/index.d.cts +37 -0
- package/dist/providers/index.d.ts +37 -0
- package/package.json +1 -1
|
@@ -0,0 +1,1174 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default, { MouseEvent, ReactNode, ChangeEvent, FC, ComponentType, ReactElement, ComponentProps, SVGProps } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import { SelectChangeEvent, SxProps, Theme, MenuProps, Typography } from '@mui/material';
|
|
5
|
+
import { Control, ControllerRenderProps, ControllerFieldState, UseFormTrigger, UseFormReturn, FieldValues } from 'react-hook-form';
|
|
6
|
+
import { UseMutateAsyncFunction } from 'react-query';
|
|
7
|
+
import { DateRangePickerShape } from 'react-dates';
|
|
8
|
+
|
|
9
|
+
type ActiveFiltersIconButtonProps = {
|
|
10
|
+
label?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
enableRipple?: boolean;
|
|
13
|
+
numActiveFilters: number;
|
|
14
|
+
handleClick: (event: MouseEvent<HTMLElement>) => void;
|
|
15
|
+
};
|
|
16
|
+
declare const ActiveFiltersIconButton: React.MemoExoticComponent<({ label, className, enableRipple, numActiveFilters, handleClick, }: ActiveFiltersIconButtonProps) => react_jsx_runtime.JSX.Element>;
|
|
17
|
+
|
|
18
|
+
interface AlertDialogProps {
|
|
19
|
+
open: boolean;
|
|
20
|
+
alertTitle?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
23
|
+
fullWidth?: boolean;
|
|
24
|
+
content?: ReactNode;
|
|
25
|
+
fullScreen?: boolean;
|
|
26
|
+
handleAlertAccept?: () => void;
|
|
27
|
+
handleAlertReject?: () => void;
|
|
28
|
+
rejectCopy?: string;
|
|
29
|
+
acceptCopy?: string;
|
|
30
|
+
disabledContentPadding?: boolean;
|
|
31
|
+
}
|
|
32
|
+
declare const AlertDialog: React.FC<AlertDialogProps>;
|
|
33
|
+
|
|
34
|
+
interface AlertDialogFullScreenProps {
|
|
35
|
+
acceptCopy?: any;
|
|
36
|
+
content?: any;
|
|
37
|
+
fullScreen?: any;
|
|
38
|
+
handleAlertAccept?: any;
|
|
39
|
+
handleAlertReject?: any;
|
|
40
|
+
open?: any;
|
|
41
|
+
rejectCopy?: any;
|
|
42
|
+
}
|
|
43
|
+
declare const AlertDialogFullScreen: ({ handleAlertAccept, handleAlertReject, fullScreen, open, rejectCopy, acceptCopy, content, }: AlertDialogFullScreenProps) => react_jsx_runtime.JSX.Element;
|
|
44
|
+
|
|
45
|
+
interface IAppLabel {
|
|
46
|
+
appName: string;
|
|
47
|
+
}
|
|
48
|
+
declare const AppLabel: ({ appName }: IAppLabel) => react_jsx_runtime.JSX.Element;
|
|
49
|
+
|
|
50
|
+
type TableDesktopFooterProps = {
|
|
51
|
+
numPages: number;
|
|
52
|
+
page: number;
|
|
53
|
+
pageSize: number;
|
|
54
|
+
pageSizeOptions: number[];
|
|
55
|
+
onPageChange: (event: ChangeEvent<unknown>, page: number) => void;
|
|
56
|
+
onPageSizeChange: (event: SelectChangeEvent<number>) => void;
|
|
57
|
+
refetch: () => Promise<unknown>;
|
|
58
|
+
isFetching: boolean;
|
|
59
|
+
};
|
|
60
|
+
declare const TableDesktopFooter: FC<TableDesktopFooterProps>;
|
|
61
|
+
|
|
62
|
+
type Order = 'asc' | 'desc';
|
|
63
|
+
type EditableCellType = 'select' | 'checkbox' | 'text' | 'numeric';
|
|
64
|
+
type HeaderFilterObject = {
|
|
65
|
+
id: number | string;
|
|
66
|
+
[key: string]: number | string;
|
|
67
|
+
};
|
|
68
|
+
type HeaderFilterOptions = string[] | HeaderFilterObject[];
|
|
69
|
+
type HeaderFilters = {
|
|
70
|
+
[key: string]: HeaderFilterOptions;
|
|
71
|
+
};
|
|
72
|
+
type HeadCell = {
|
|
73
|
+
id: string;
|
|
74
|
+
label?: string;
|
|
75
|
+
labelTooltip?: string;
|
|
76
|
+
fieldName?: string;
|
|
77
|
+
numeric?: boolean;
|
|
78
|
+
disablePadding?: boolean;
|
|
79
|
+
width?: number | string;
|
|
80
|
+
enabled?: boolean;
|
|
81
|
+
disableSort?: boolean;
|
|
82
|
+
RenderHeader?: ReactNode;
|
|
83
|
+
editableCellType?: EditableCellType;
|
|
84
|
+
validateInput?: (value: string | null) => boolean;
|
|
85
|
+
onUpdateEditableCell?: (rowId: number, field: string, value: string | number | boolean, label: string | number | boolean) => void;
|
|
86
|
+
filterOptions?: HeaderFilterOptions;
|
|
87
|
+
refetchFilterOptions?: () => void;
|
|
88
|
+
isFetchingFilterOptions?: boolean;
|
|
89
|
+
isAutocompleteFilterMenu?: boolean;
|
|
90
|
+
onAutocompleteFilterChange?: (value: string) => void;
|
|
91
|
+
};
|
|
92
|
+
type TableDesktopProps = {
|
|
93
|
+
data: any[];
|
|
94
|
+
headCells: HeadCell[];
|
|
95
|
+
RenderItem: ComponentType<any>;
|
|
96
|
+
components?: {
|
|
97
|
+
toolbar?: ComponentType<any>;
|
|
98
|
+
};
|
|
99
|
+
componentsProps?: {
|
|
100
|
+
toolbarProps?: any;
|
|
101
|
+
footerProps?: TableDesktopFooterProps;
|
|
102
|
+
};
|
|
103
|
+
appliedFilters?: any;
|
|
104
|
+
headerFilters?: HeaderFilters;
|
|
105
|
+
children?: ReactNode;
|
|
106
|
+
height?: number | string;
|
|
107
|
+
rowHeight?: number;
|
|
108
|
+
totalDataCount?: number;
|
|
109
|
+
isLoading?: boolean;
|
|
110
|
+
rowsPerPage?: number;
|
|
111
|
+
enableEditMode?: boolean;
|
|
112
|
+
enableCheckboxSelection?: boolean;
|
|
113
|
+
disableInternalSort?: boolean;
|
|
114
|
+
updateSort?: (sortField: string, sortDir: Order) => void;
|
|
115
|
+
showClearFilterButton?: boolean;
|
|
116
|
+
handleClickOnClearFiltersButton?: () => void;
|
|
117
|
+
deleteItem?: (id: number, contentTypeName?: string, appTypeName?: string) => void;
|
|
118
|
+
keyField?: string;
|
|
119
|
+
tableLayout?: 'fixed' | 'auto';
|
|
120
|
+
onApplyFilters?: (updatedFilters: HeaderFilters, shouldSave: boolean) => void;
|
|
121
|
+
shouldShowCheckOnFilter?: (columnId: string, filterOption: string | HeaderFilterObject) => boolean;
|
|
122
|
+
};
|
|
123
|
+
declare const TableDesktop: ({ data, headCells, RenderItem, appliedFilters, headerFilters, children, height, rowHeight, totalDataCount, isLoading, rowsPerPage, enableEditMode, enableCheckboxSelection, disableInternalSort, updateSort, showClearFilterButton, handleClickOnClearFiltersButton, deleteItem, keyField, tableLayout, onApplyFilters, shouldShowCheckOnFilter, components, componentsProps, }: TableDesktopProps) => react_jsx_runtime.JSX.Element;
|
|
124
|
+
|
|
125
|
+
type AutocompleteFilterMenuContentProps = {
|
|
126
|
+
columnId: string;
|
|
127
|
+
labelFieldName: string;
|
|
128
|
+
selectedFilterOptions: HeaderFilterOptions;
|
|
129
|
+
isLoading?: boolean;
|
|
130
|
+
maxWidth?: number;
|
|
131
|
+
maxHeight?: number;
|
|
132
|
+
onFilterOptionChange: (option: string | HeaderFilterObject) => void;
|
|
133
|
+
onApplyFiltersClick: (shouldSave: boolean) => void;
|
|
134
|
+
filterOptions: HeadCell["filterOptions"];
|
|
135
|
+
onAutocompleteFilterChange: HeadCell["onAutocompleteFilterChange"];
|
|
136
|
+
shouldShowCheckOnFilter?: TableDesktopProps["shouldShowCheckOnFilter"];
|
|
137
|
+
};
|
|
138
|
+
declare const AutocompleteFilterMenuContent: FC<AutocompleteFilterMenuContentProps>;
|
|
139
|
+
|
|
140
|
+
interface BackHeaderProps {
|
|
141
|
+
appName: string;
|
|
142
|
+
onGoBackClick?: () => void;
|
|
143
|
+
}
|
|
144
|
+
declare const BackHeader: React.FC<BackHeaderProps>;
|
|
145
|
+
|
|
146
|
+
interface BottomBarProps {
|
|
147
|
+
className?: string;
|
|
148
|
+
children?: React.ReactNode;
|
|
149
|
+
isLoading?: boolean;
|
|
150
|
+
onRefreshClick?: (() => void) | null;
|
|
151
|
+
}
|
|
152
|
+
declare const BottomBar: ({ className, children, isLoading, onRefreshClick, }: BottomBarProps) => react_jsx_runtime.JSX.Element;
|
|
153
|
+
|
|
154
|
+
interface BoxButtonProps {
|
|
155
|
+
label?: any;
|
|
156
|
+
onClick?: any;
|
|
157
|
+
main?: any;
|
|
158
|
+
extra?: any;
|
|
159
|
+
borderColor?: any;
|
|
160
|
+
}
|
|
161
|
+
declare const _default$k: React.MemoExoticComponent<(props: BoxButtonProps) => react_jsx_runtime.JSX.Element>;
|
|
162
|
+
|
|
163
|
+
interface IExtendedButton {
|
|
164
|
+
buttonType?: 'button' | 'submit';
|
|
165
|
+
className?: string;
|
|
166
|
+
color?: 'inherit' | 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning' | 'default' | 'noOutline' | undefined;
|
|
167
|
+
copy: string;
|
|
168
|
+
disabled?: boolean;
|
|
169
|
+
href?: string;
|
|
170
|
+
onClick?: () => void;
|
|
171
|
+
subcopy?: string;
|
|
172
|
+
tooltip?: string;
|
|
173
|
+
component?: React.ElementType;
|
|
174
|
+
type?: 'add' | 'apps' | 'childCare' | 'delete' | 'edit' | 'importExport' | 'notes' | 'print' | 'save' | 'upload' | 'refresh' | 'download' | 'publish' | 'compare';
|
|
175
|
+
variant?: 'contained' | 'outlined' | 'text';
|
|
176
|
+
copyColor?: string;
|
|
177
|
+
}
|
|
178
|
+
declare const _default$j: React.MemoExoticComponent<({ buttonType, color, disabled, href, tooltip, component, type, className, onClick, copy, subcopy, variant, copyColor, }: IExtendedButton) => react_jsx_runtime.JSX.Element>;
|
|
179
|
+
|
|
180
|
+
interface IFilledButton {
|
|
181
|
+
autoFocus?: boolean;
|
|
182
|
+
className?: string;
|
|
183
|
+
color?: 'default' | 'error' | 'info' | 'inherit' | 'primary' | 'secondary' | 'success' | 'warning';
|
|
184
|
+
copy: string;
|
|
185
|
+
isLoading?: boolean;
|
|
186
|
+
disabled?: boolean;
|
|
187
|
+
href?: string;
|
|
188
|
+
onClick?: () => void;
|
|
189
|
+
type?: 'button' | 'submit';
|
|
190
|
+
variant?: 'contained' | 'outlined' | 'text';
|
|
191
|
+
}
|
|
192
|
+
declare const _default$i: React.MemoExoticComponent<({ autoFocus, className, color, copy, disabled, href, isLoading, onClick, type, variant, }: IFilledButton) => react_jsx_runtime.JSX.Element>;
|
|
193
|
+
|
|
194
|
+
interface FilledButtonLgProps {
|
|
195
|
+
classes?: any;
|
|
196
|
+
disabled?: any;
|
|
197
|
+
variant?: string;
|
|
198
|
+
color?: string;
|
|
199
|
+
copy?: any;
|
|
200
|
+
handleClick?: any;
|
|
201
|
+
loading?: boolean;
|
|
202
|
+
loadingProps?: {
|
|
203
|
+
color?: 'primary' | 'secondary' | 'inherit';
|
|
204
|
+
size?: number;
|
|
205
|
+
style?: string;
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
declare const _default$h: React.MemoExoticComponent<({ classes, disabled, variant, color, copy, handleClick, loading, loadingProps, }: FilledButtonLgProps) => react_jsx_runtime.JSX.Element>;
|
|
209
|
+
|
|
210
|
+
interface ImageButtonProps {
|
|
211
|
+
src?: any;
|
|
212
|
+
onClick?: any;
|
|
213
|
+
value?: any;
|
|
214
|
+
}
|
|
215
|
+
declare const _default$g: React.MemoExoticComponent<(props: ImageButtonProps) => react_jsx_runtime.JSX.Element>;
|
|
216
|
+
|
|
217
|
+
interface SquareButtonProps {
|
|
218
|
+
children: any;
|
|
219
|
+
disabled?: any;
|
|
220
|
+
hasContentLeftSide?: any;
|
|
221
|
+
onClick: any;
|
|
222
|
+
type: any;
|
|
223
|
+
}
|
|
224
|
+
declare const SquareButton: ({ children, disabled, hasContentLeftSide, onClick, type, }: SquareButtonProps) => react_jsx_runtime.JSX.Element;
|
|
225
|
+
|
|
226
|
+
interface UploadButtonProps {
|
|
227
|
+
name?: string;
|
|
228
|
+
onChange?(...args: any[]): any;
|
|
229
|
+
onBlur?(...args: any[]): any;
|
|
230
|
+
}
|
|
231
|
+
declare const UploadButton: React.ForwardRefExoticComponent<UploadButtonProps & React.RefAttributes<HTMLElement>>;
|
|
232
|
+
|
|
233
|
+
interface OutlinedButtonProps {
|
|
234
|
+
className?: any;
|
|
235
|
+
color?: any;
|
|
236
|
+
copy: any;
|
|
237
|
+
disabled?: any;
|
|
238
|
+
href?: any;
|
|
239
|
+
isLoading?: any;
|
|
240
|
+
onClick?: any;
|
|
241
|
+
startIcon?: any;
|
|
242
|
+
style?: any;
|
|
243
|
+
subcopy?: any;
|
|
244
|
+
type?: any;
|
|
245
|
+
}
|
|
246
|
+
declare const _default$f: React.MemoExoticComponent<({ className, color, copy, disabled, href, isLoading, onClick, startIcon, style, subcopy, type, }: OutlinedButtonProps) => react_jsx_runtime.JSX.Element>;
|
|
247
|
+
|
|
248
|
+
interface AButtonProps {
|
|
249
|
+
classes?: any;
|
|
250
|
+
variant?: string;
|
|
251
|
+
color?: string;
|
|
252
|
+
copy?: any;
|
|
253
|
+
}
|
|
254
|
+
declare const _default$e: React.MemoExoticComponent<({ classes, variant, color, copy }: AButtonProps) => react_jsx_runtime.JSX.Element>;
|
|
255
|
+
|
|
256
|
+
interface IRoundButton {
|
|
257
|
+
active?: boolean;
|
|
258
|
+
children?: string;
|
|
259
|
+
className?: string;
|
|
260
|
+
disabled?: boolean;
|
|
261
|
+
focused?: boolean;
|
|
262
|
+
icon?: 'add' | 'apps' | 'arrowBack' | 'arrowForward' | 'avocado' | 'backspaceOutlined' | 'banana' | 'block' | 'bulk' | 'callSplit' | 'chevronRight' | 'chevronUp' | 'chevronDown' | 'close' | 'delete' | 'done' | 'edit' | 'email' | 'grape' | 'groupAdd' | 'history' | 'menu' | 'notes' | 'refresh' | 'remove' | 'search' | 'send' | 'strawberry' | 'thumbDown' | 'threeDots' | 'thumbUp' | 'undo' | 'play' | 'snail' | 'bus' | 'spoon' | 'fork' | 'car' | 'knife' | 'bicycle' | 'heart' | 'airplane' | 'threeDots';
|
|
263
|
+
iconColor?: 'inherit' | 'disabled' | 'primary' | 'secondary' | 'action' | 'error';
|
|
264
|
+
isContrast?: boolean;
|
|
265
|
+
isTableButton?: boolean;
|
|
266
|
+
noStrokes?: boolean;
|
|
267
|
+
onClick?: (event: any) => void;
|
|
268
|
+
size?: 'small' | 'medium' | 'large' | 'double';
|
|
269
|
+
tooltip?: string;
|
|
270
|
+
variant?: 'default' | 'defaultPrimary' | 'defaultError' | 'filled' | 'primary' | 'secondary';
|
|
271
|
+
testID?: string;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* A Rounded button component that is abstracted from MUI Fab component.
|
|
275
|
+
* Can render an icon or a single character.
|
|
276
|
+
* https://v4.mui.com/api/fab/#fab-api.
|
|
277
|
+
*/
|
|
278
|
+
declare const RoundButton: ({ active, children, className, disabled, focused, icon, iconColor, isContrast, isTableButton, noStrokes, onClick, size, tooltip, variant, testID, }: IRoundButton) => react_jsx_runtime.JSX.Element;
|
|
279
|
+
|
|
280
|
+
declare const _default$d: React.MemoExoticComponent<() => react_jsx_runtime.JSX.Element>;
|
|
281
|
+
|
|
282
|
+
interface ActionButtonProps {
|
|
283
|
+
app?: any;
|
|
284
|
+
}
|
|
285
|
+
declare function ActionButton(props: ActionButtonProps): react_jsx_runtime.JSX.Element;
|
|
286
|
+
|
|
287
|
+
type CheckboxFilterMenuContentProps = {
|
|
288
|
+
columnId: string;
|
|
289
|
+
labelFieldName: string;
|
|
290
|
+
isLoading?: boolean;
|
|
291
|
+
selectedFilterOptions: HeaderFilterOptions;
|
|
292
|
+
filterOptions: HeaderFilterOptions;
|
|
293
|
+
maxHeight?: number;
|
|
294
|
+
width?: number;
|
|
295
|
+
shouldShowCheckOnFilter?: TableDesktopProps["shouldShowCheckOnFilter"];
|
|
296
|
+
onSelectAllChange: (checked: boolean) => void;
|
|
297
|
+
onFilterOptionChange: (option: string | HeaderFilterObject) => void;
|
|
298
|
+
onApplyFiltersClick: (shouldSave: boolean) => void;
|
|
299
|
+
};
|
|
300
|
+
declare const CheckboxFilterMenuContent: FC<CheckboxFilterMenuContentProps>;
|
|
301
|
+
|
|
302
|
+
interface ICompanyLogo {
|
|
303
|
+
size: 'small' | 'medium';
|
|
304
|
+
color: 'light' | 'dark';
|
|
305
|
+
imageLogoDarkSmall: string;
|
|
306
|
+
imageLogoLightSmall: string;
|
|
307
|
+
}
|
|
308
|
+
declare const CompanyLogo: ({ size, color, imageLogoDarkSmall, imageLogoLightSmall, }: ICompanyLogo) => react_jsx_runtime.JSX.Element;
|
|
309
|
+
|
|
310
|
+
interface ConfirmationDialogProps {
|
|
311
|
+
ctaText?: string;
|
|
312
|
+
hideCancel?: boolean;
|
|
313
|
+
isLoading?: boolean;
|
|
314
|
+
hideConfirm?: boolean;
|
|
315
|
+
closeModal: () => void;
|
|
316
|
+
content: string | string[] | React.JSX.Element;
|
|
317
|
+
cancelCopy?: string;
|
|
318
|
+
isOpen: boolean;
|
|
319
|
+
onConfirm?: () => void;
|
|
320
|
+
title: string;
|
|
321
|
+
disableContentPadding?: boolean;
|
|
322
|
+
}
|
|
323
|
+
declare const ConfirmationDialog: {
|
|
324
|
+
({ ctaText, hideCancel, isLoading, hideConfirm, closeModal, content, cancelCopy, isOpen, onConfirm, title, disableContentPadding, }: ConfirmationDialogProps): react_jsx_runtime.JSX.Element;
|
|
325
|
+
defaultProps: {
|
|
326
|
+
ctaText: string;
|
|
327
|
+
hideCancel: boolean;
|
|
328
|
+
hideConfirm: boolean;
|
|
329
|
+
cancelCopy: string;
|
|
330
|
+
isLoading: boolean;
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
interface ControlledCheckboxProps {
|
|
335
|
+
name: string;
|
|
336
|
+
label: string;
|
|
337
|
+
id: string;
|
|
338
|
+
control: Control<any, any>;
|
|
339
|
+
className?: string;
|
|
340
|
+
tooltipDescription?: string;
|
|
341
|
+
'data-testid'?: string;
|
|
342
|
+
color?: 'primary' | 'secondary' | 'default';
|
|
343
|
+
handleChange: (checked: boolean, field: ControllerRenderProps<any, string>) => void;
|
|
344
|
+
disabled?: boolean;
|
|
345
|
+
}
|
|
346
|
+
declare const ControlledCheckbox: React.FC<ControlledCheckboxProps>;
|
|
347
|
+
|
|
348
|
+
interface ControlledNumberInputProps {
|
|
349
|
+
/**
|
|
350
|
+
* control from react-hook-form
|
|
351
|
+
* */
|
|
352
|
+
control: Control<any>;
|
|
353
|
+
/**
|
|
354
|
+
* name in the form data
|
|
355
|
+
* */
|
|
356
|
+
name: string;
|
|
357
|
+
/**
|
|
358
|
+
* label name to be shown in the component
|
|
359
|
+
* */
|
|
360
|
+
label: string;
|
|
361
|
+
/**
|
|
362
|
+
* mininum number allowed
|
|
363
|
+
* */
|
|
364
|
+
min?: number;
|
|
365
|
+
/**
|
|
366
|
+
* maximum number allowed
|
|
367
|
+
* */
|
|
368
|
+
max?: number;
|
|
369
|
+
/**
|
|
370
|
+
* step to change the number
|
|
371
|
+
* */
|
|
372
|
+
step?: number;
|
|
373
|
+
/**
|
|
374
|
+
* optional error message
|
|
375
|
+
* */
|
|
376
|
+
error?: string;
|
|
377
|
+
/**
|
|
378
|
+
* should shrink the label name
|
|
379
|
+
* */
|
|
380
|
+
shrink?: boolean;
|
|
381
|
+
/**
|
|
382
|
+
* opcional className to customize the component
|
|
383
|
+
* */
|
|
384
|
+
className?: string;
|
|
385
|
+
}
|
|
386
|
+
declare const ControlledNumberInput: ({ name, control, label, min, max, step, error, shrink, className, }: ControlledNumberInputProps) => react_jsx_runtime.JSX.Element;
|
|
387
|
+
|
|
388
|
+
interface ControlledNumericFieldProps {
|
|
389
|
+
control: Control<any>;
|
|
390
|
+
label: string;
|
|
391
|
+
min?: number;
|
|
392
|
+
max?: number;
|
|
393
|
+
step?: number;
|
|
394
|
+
fullWidth?: boolean;
|
|
395
|
+
margin?: 'dense' | 'normal' | 'none';
|
|
396
|
+
helperText?: string;
|
|
397
|
+
variant?: 'standard' | 'outlined' | 'filled';
|
|
398
|
+
onChange?: (field: ControllerRenderProps<any, string>, value: number | string) => void;
|
|
399
|
+
onArrowClick?: (field: ControllerRenderProps<any, string>, value: number | string) => void;
|
|
400
|
+
onBlur?: (field: ControllerRenderProps<any, string>, value: number | string, fieldState: ControllerFieldState) => void;
|
|
401
|
+
className?: string;
|
|
402
|
+
fieldName: string;
|
|
403
|
+
'data-testid'?: string;
|
|
404
|
+
}
|
|
405
|
+
declare const ControlledNumericField: React.FC<ControlledNumericFieldProps>;
|
|
406
|
+
|
|
407
|
+
interface ControlledSelectWithArrayProps {
|
|
408
|
+
/**
|
|
409
|
+
* control from react-hook-form
|
|
410
|
+
* */
|
|
411
|
+
control: Control<any>;
|
|
412
|
+
/**
|
|
413
|
+
* name in the form data
|
|
414
|
+
* */
|
|
415
|
+
name: string;
|
|
416
|
+
/**
|
|
417
|
+
* label name to be shown in the component
|
|
418
|
+
* */
|
|
419
|
+
label: string;
|
|
420
|
+
/**
|
|
421
|
+
* options to be rendered in the dropbown
|
|
422
|
+
* */
|
|
423
|
+
options?: (string | number)[];
|
|
424
|
+
/**
|
|
425
|
+
* optional error message
|
|
426
|
+
* */
|
|
427
|
+
error?: string;
|
|
428
|
+
/**
|
|
429
|
+
* optional onChange event
|
|
430
|
+
* */
|
|
431
|
+
onChange?: (value: any) => void;
|
|
432
|
+
/**
|
|
433
|
+
* opcional className to customize the component
|
|
434
|
+
* */
|
|
435
|
+
className?: string;
|
|
436
|
+
/**
|
|
437
|
+
* opcional function to revalidate the form when changing the dropdown value ( trigger function )
|
|
438
|
+
* */
|
|
439
|
+
revalidateFormFunction?: UseFormTrigger<any>;
|
|
440
|
+
}
|
|
441
|
+
declare const ControlledSelectWithArray: ({ name, control, label, options, error, onChange, className, revalidateFormFunction, }: ControlledSelectWithArrayProps) => react_jsx_runtime.JSX.Element;
|
|
442
|
+
|
|
443
|
+
interface ControlledSelectWithObjectProps {
|
|
444
|
+
/**
|
|
445
|
+
* control from react-hook-form
|
|
446
|
+
* */
|
|
447
|
+
control: Control<any>;
|
|
448
|
+
/**
|
|
449
|
+
* name in the form data
|
|
450
|
+
* */
|
|
451
|
+
name: string;
|
|
452
|
+
/**
|
|
453
|
+
* label name to be shown in the component
|
|
454
|
+
* */
|
|
455
|
+
label: string;
|
|
456
|
+
/**
|
|
457
|
+
* options to be rendered in the dropbown
|
|
458
|
+
* */
|
|
459
|
+
options?: {
|
|
460
|
+
value: string | number;
|
|
461
|
+
label: string;
|
|
462
|
+
}[];
|
|
463
|
+
/**
|
|
464
|
+
* optional error message
|
|
465
|
+
* */
|
|
466
|
+
error?: string;
|
|
467
|
+
/**
|
|
468
|
+
* optional onChange event
|
|
469
|
+
* */
|
|
470
|
+
onChange?: (value: any) => void;
|
|
471
|
+
/**
|
|
472
|
+
* opcional className to customize the component
|
|
473
|
+
* */
|
|
474
|
+
className?: string;
|
|
475
|
+
/**
|
|
476
|
+
* opcional boolean to disable the dropdown option (based on the options.value)
|
|
477
|
+
* */
|
|
478
|
+
listToDisableFromOptions?: Array<any>;
|
|
479
|
+
/**
|
|
480
|
+
* opcional function to revalidate the form when changing the dropdown value ( trigger function )
|
|
481
|
+
* */
|
|
482
|
+
revalidateFormFunction?: UseFormTrigger<any>;
|
|
483
|
+
}
|
|
484
|
+
declare const ControlledSelectWithObject: ({ name, control, label, options, error, onChange, className, listToDisableFromOptions, revalidateFormFunction, }: ControlledSelectWithObjectProps) => react_jsx_runtime.JSX.Element;
|
|
485
|
+
|
|
486
|
+
interface ControlledValidTextInputBaseProps {
|
|
487
|
+
label: string;
|
|
488
|
+
fieldName: string;
|
|
489
|
+
helperText?: string;
|
|
490
|
+
disabled?: boolean;
|
|
491
|
+
variant?: 'standard' | 'outlined' | 'filled';
|
|
492
|
+
className?: string;
|
|
493
|
+
maxLength?: number;
|
|
494
|
+
'data-testid'?: string;
|
|
495
|
+
form: UseFormReturn<any>;
|
|
496
|
+
}
|
|
497
|
+
/** Ensure AT MOST ONE of 'updateCustomerData' or 'customHandleBlurValidationAndSubmit' can be provided. */
|
|
498
|
+
type ControlledValidTextInputDefaultProps = ControlledValidTextInputBaseProps & {
|
|
499
|
+
updateCustomerData?: UseMutateAsyncFunction<any, unknown, any, unknown>;
|
|
500
|
+
customHandleBlurValidationAndSubmit?: never;
|
|
501
|
+
};
|
|
502
|
+
type ControlledValidTextInputCustomProps = ControlledValidTextInputBaseProps & {
|
|
503
|
+
updateCustomerData?: never;
|
|
504
|
+
customHandleBlurValidationAndSubmit?: (controlledField: ControllerRenderProps<FieldValues, string>, isDirty: boolean) => void;
|
|
505
|
+
};
|
|
506
|
+
type ControlledValidTextInputProps = ControlledValidTextInputDefaultProps | ControlledValidTextInputCustomProps;
|
|
507
|
+
declare const ControlledValidTextInput: React.FC<ControlledValidTextInputProps>;
|
|
508
|
+
|
|
509
|
+
interface DataGridProps {
|
|
510
|
+
isLoading?: boolean;
|
|
511
|
+
children?: React.ReactElement;
|
|
512
|
+
height: string;
|
|
513
|
+
sortField?: string;
|
|
514
|
+
sortDir?: string;
|
|
515
|
+
columns: any;
|
|
516
|
+
rows: any;
|
|
517
|
+
handleCellEdition?: any;
|
|
518
|
+
}
|
|
519
|
+
declare const DataGrid: ({ columns, rows, handleCellEdition, sortField, sortDir, isLoading, height, children, }: DataGridProps) => react_jsx_runtime.JSX.Element;
|
|
520
|
+
|
|
521
|
+
interface DateProps {
|
|
522
|
+
datetime: string | Date;
|
|
523
|
+
format?: string;
|
|
524
|
+
}
|
|
525
|
+
declare const Date: React.FC<DateProps>;
|
|
526
|
+
|
|
527
|
+
interface IDeleteSubstitutionDialogContent {
|
|
528
|
+
closeDialog: () => void;
|
|
529
|
+
deleteSubstitution: () => void;
|
|
530
|
+
substitutionName: string;
|
|
531
|
+
}
|
|
532
|
+
declare const _default$c: React.MemoExoticComponent<({ closeDialog, substitutionName, deleteSubstitution, }: IDeleteSubstitutionDialogContent) => react_jsx_runtime.JSX.Element>;
|
|
533
|
+
|
|
534
|
+
interface IDeleteUserDialogContent {
|
|
535
|
+
closeDialog: () => void;
|
|
536
|
+
deleteUser: () => void;
|
|
537
|
+
userName: string;
|
|
538
|
+
}
|
|
539
|
+
declare const _default$b: React.MemoExoticComponent<({ closeDialog, userName, deleteUser, }: IDeleteUserDialogContent) => react_jsx_runtime.JSX.Element>;
|
|
540
|
+
|
|
541
|
+
type DynamicOverflowTooltipProps = {
|
|
542
|
+
arrow?: boolean;
|
|
543
|
+
maxWidth?: number | string;
|
|
544
|
+
children: ReactElement | string | number | null;
|
|
545
|
+
tooltipDescription: string;
|
|
546
|
+
};
|
|
547
|
+
declare const DynamicOverflowTooltip: FC<DynamicOverflowTooltipProps>;
|
|
548
|
+
|
|
549
|
+
interface FileCardProps {
|
|
550
|
+
document: string;
|
|
551
|
+
}
|
|
552
|
+
declare const FileCard: ({ document }: FileCardProps) => react_jsx_runtime.JSX.Element;
|
|
553
|
+
|
|
554
|
+
interface FilledLabelProps {
|
|
555
|
+
color?: string;
|
|
556
|
+
copy?: any;
|
|
557
|
+
}
|
|
558
|
+
declare const _default$a: React.MemoExoticComponent<(props: FilledLabelProps) => react_jsx_runtime.JSX.Element>;
|
|
559
|
+
|
|
560
|
+
type IFilterGroupSelector = {
|
|
561
|
+
name?: string;
|
|
562
|
+
categoryIdentification?: string;
|
|
563
|
+
selectedOptions: string[];
|
|
564
|
+
setSelectedOptions: React.Dispatch<React.SetStateAction<string[]>>;
|
|
565
|
+
handleClickOnApply: () => void;
|
|
566
|
+
optionsList?: {
|
|
567
|
+
category: string;
|
|
568
|
+
options: string[];
|
|
569
|
+
}[];
|
|
570
|
+
};
|
|
571
|
+
declare const FilterGroupSelector: ({ name, categoryIdentification, selectedOptions, setSelectedOptions, handleClickOnApply, optionsList, }: IFilterGroupSelector) => react_jsx_runtime.JSX.Element;
|
|
572
|
+
|
|
573
|
+
type IFilterSimpleSelector = {
|
|
574
|
+
name?: string;
|
|
575
|
+
options?: string[];
|
|
576
|
+
selectedOptions: string[];
|
|
577
|
+
setSelectedOptions: React.Dispatch<React.SetStateAction<string[]>>;
|
|
578
|
+
handleClickOnApply: () => void;
|
|
579
|
+
};
|
|
580
|
+
declare const FilterSimpleSelector: ({ name, options, selectedOptions, setSelectedOptions, handleClickOnApply, }: IFilterSimpleSelector) => react_jsx_runtime.JSX.Element;
|
|
581
|
+
|
|
582
|
+
type FilterOptionsCheckboxesProps = {
|
|
583
|
+
columnId: string;
|
|
584
|
+
labelFieldName: string;
|
|
585
|
+
maxWidth?: number;
|
|
586
|
+
filterOptions: HeaderFilterOptions;
|
|
587
|
+
selectedFilterOptions: HeaderFilterOptions;
|
|
588
|
+
onFilterOptionChange: (option: string | HeaderFilterObject) => void;
|
|
589
|
+
shouldShowCheckOnFilter?: TableDesktopProps["shouldShowCheckOnFilter"];
|
|
590
|
+
};
|
|
591
|
+
declare const FilterOptionsCheckboxes: FC<FilterOptionsCheckboxesProps>;
|
|
592
|
+
|
|
593
|
+
interface FixedFooterProps {
|
|
594
|
+
children: React.ReactNode;
|
|
595
|
+
justifyContent?: string;
|
|
596
|
+
}
|
|
597
|
+
declare const _default$9: React.MemoExoticComponent<({ justifyContent, children }: FixedFooterProps) => react_jsx_runtime.JSX.Element>;
|
|
598
|
+
|
|
599
|
+
interface HeaderProps {
|
|
600
|
+
appName: any;
|
|
601
|
+
children?: any;
|
|
602
|
+
wrappedHeader?: any;
|
|
603
|
+
}
|
|
604
|
+
declare const Header: ({ appName, children, wrappedHeader, }: HeaderProps) => react_jsx_runtime.JSX.Element;
|
|
605
|
+
|
|
606
|
+
declare const icons: {
|
|
607
|
+
SvgSamsaraLogo: (props: any) => react_jsx_runtime.JSX.Element;
|
|
608
|
+
SvgIconHome: (props: any) => react_jsx_runtime.JSX.Element;
|
|
609
|
+
SvgIconNotification: (props: any) => react_jsx_runtime.JSX.Element;
|
|
610
|
+
SvgIconPhone: (props: any) => react_jsx_runtime.JSX.Element;
|
|
611
|
+
SvgIconAccount: (props: any) => react_jsx_runtime.JSX.Element;
|
|
612
|
+
SvgIconOrders: (props: any) => react_jsx_runtime.JSX.Element;
|
|
613
|
+
SvgIconPriceList: (props: any) => react_jsx_runtime.JSX.Element;
|
|
614
|
+
SvgIconSpecialPrice: (props: any) => react_jsx_runtime.JSX.Element;
|
|
615
|
+
SvgIconBuying: (props: any) => react_jsx_runtime.JSX.Element;
|
|
616
|
+
SvgIconContentManagement: (props: any) => react_jsx_runtime.JSX.Element;
|
|
617
|
+
SvgIconProducts: (props: any) => react_jsx_runtime.JSX.Element;
|
|
618
|
+
SvgIconStock: (props: any) => react_jsx_runtime.JSX.Element;
|
|
619
|
+
SvgIconSupplier: (props: any) => react_jsx_runtime.JSX.Element;
|
|
620
|
+
SvgIconSupplierPrices: (props: any) => react_jsx_runtime.JSX.Element;
|
|
621
|
+
SvgIconGoodsin: (props: any) => react_jsx_runtime.JSX.Element;
|
|
622
|
+
SvgIconVkc: (props: any) => react_jsx_runtime.JSX.Element;
|
|
623
|
+
SvgIconLocation: (props: any) => react_jsx_runtime.JSX.Element;
|
|
624
|
+
SvgIconScales: (props: any) => react_jsx_runtime.JSX.Element;
|
|
625
|
+
SvgIconQc: (props: any) => react_jsx_runtime.JSX.Element;
|
|
626
|
+
SvgIconRetail: (props: any) => react_jsx_runtime.JSX.Element;
|
|
627
|
+
SvgIconRuns: (props: any) => react_jsx_runtime.JSX.Element;
|
|
628
|
+
SvgIconAccounts: (props: any) => react_jsx_runtime.JSX.Element;
|
|
629
|
+
SvgIconReports: (props: any) => react_jsx_runtime.JSX.Element;
|
|
630
|
+
SvgIconSetting: (props: any) => react_jsx_runtime.JSX.Element;
|
|
631
|
+
SvgIconLogin: (props: any) => react_jsx_runtime.JSX.Element;
|
|
632
|
+
SvgBallsLogo: (props: any) => react_jsx_runtime.JSX.Element;
|
|
633
|
+
SvgIconAvocado: () => react_jsx_runtime.JSX.Element;
|
|
634
|
+
SvgIconBanana: () => react_jsx_runtime.JSX.Element;
|
|
635
|
+
SvgIconGrape: (props: any) => react_jsx_runtime.JSX.Element;
|
|
636
|
+
SvgIconStrawberry: () => react_jsx_runtime.JSX.Element;
|
|
637
|
+
SvgIconPromoCode: (props: any) => react_jsx_runtime.JSX.Element;
|
|
638
|
+
SvgIconOpsMetrics: (props: any) => react_jsx_runtime.JSX.Element;
|
|
639
|
+
SvgIconSearchCategories: (props: any) => react_jsx_runtime.JSX.Element;
|
|
640
|
+
SvgIconImport: (props: any) => react_jsx_runtime.JSX.Element;
|
|
641
|
+
SvgIconSnail: (props: any) => react_jsx_runtime.JSX.Element;
|
|
642
|
+
SvgEmptyGlassIcon: (props: any) => react_jsx_runtime.JSX.Element;
|
|
643
|
+
SvgIconUserManagement: () => react_jsx_runtime.JSX.Element;
|
|
644
|
+
SvgIconTableEdit: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
645
|
+
};
|
|
646
|
+
|
|
647
|
+
interface VirtualizedListProps {
|
|
648
|
+
headers?: any;
|
|
649
|
+
items?: any;
|
|
650
|
+
renderItem?: any;
|
|
651
|
+
}
|
|
652
|
+
declare function VirtualizedList(props: VirtualizedListProps): react_jsx_runtime.JSX.Element;
|
|
653
|
+
|
|
654
|
+
interface ILoading {
|
|
655
|
+
isLoading: boolean;
|
|
656
|
+
}
|
|
657
|
+
declare const Loading: ({ isLoading }: ILoading) => react_jsx_runtime.JSX.Element;
|
|
658
|
+
|
|
659
|
+
interface ILocationsSectionInfo {
|
|
660
|
+
principalLocation: string;
|
|
661
|
+
secondaryLocation?: string[];
|
|
662
|
+
isPicking?: boolean;
|
|
663
|
+
isStock?: boolean;
|
|
664
|
+
}
|
|
665
|
+
declare const LocationsSectionInfo: ({ principalLocation, secondaryLocation, isPicking, isStock, }: ILocationsSectionInfo) => react_jsx_runtime.JSX.Element;
|
|
666
|
+
|
|
667
|
+
interface NotesProps {
|
|
668
|
+
initialNotes?: any;
|
|
669
|
+
isDisabled?: any;
|
|
670
|
+
isEditable?: any;
|
|
671
|
+
isLoading?: any;
|
|
672
|
+
maxLength?: any;
|
|
673
|
+
onBlur?: any;
|
|
674
|
+
onChange?: any;
|
|
675
|
+
onClearNotes?: any;
|
|
676
|
+
}
|
|
677
|
+
declare const Notes: ({ initialNotes, isDisabled, isEditable, isLoading, maxLength, onBlur, onChange, onClearNotes, }: NotesProps) => react_jsx_runtime.JSX.Element;
|
|
678
|
+
|
|
679
|
+
interface NumpadProps {
|
|
680
|
+
handleClick: any;
|
|
681
|
+
handleUndo: any;
|
|
682
|
+
}
|
|
683
|
+
declare const Numpad: ({ handleClick, handleUndo }: NumpadProps) => react_jsx_runtime.JSX.Element;
|
|
684
|
+
|
|
685
|
+
interface NumpadInputProps {
|
|
686
|
+
handleNextClick?(...args: any[]): any;
|
|
687
|
+
inputLabel?: string;
|
|
688
|
+
children?: any;
|
|
689
|
+
}
|
|
690
|
+
declare const _default$8: React.MemoExoticComponent<(props: NumpadInputProps) => react_jsx_runtime.JSX.Element>;
|
|
691
|
+
|
|
692
|
+
interface NumpadPlusProps {
|
|
693
|
+
handleClick: any;
|
|
694
|
+
handleUndo: any;
|
|
695
|
+
}
|
|
696
|
+
declare const NumpadPlus: ({ handleClick, handleUndo }: NumpadPlusProps) => react_jsx_runtime.JSX.Element;
|
|
697
|
+
|
|
698
|
+
interface PaginationForTableProps {
|
|
699
|
+
appliedFilters?: any;
|
|
700
|
+
className?: any;
|
|
701
|
+
page?: any;
|
|
702
|
+
pagination?: any;
|
|
703
|
+
position?: any;
|
|
704
|
+
style?: any;
|
|
705
|
+
updateFilters: any;
|
|
706
|
+
}
|
|
707
|
+
declare const PaginationForTable: ({ appliedFilters, className, page, pagination, position, style, updateFilters, }: PaginationForTableProps) => react_jsx_runtime.JSX.Element;
|
|
708
|
+
|
|
709
|
+
interface PhoneInputProps {
|
|
710
|
+
value?: string | null;
|
|
711
|
+
onChange?: (phone: string | null) => void;
|
|
712
|
+
placeholder?: string;
|
|
713
|
+
className?: string;
|
|
714
|
+
label?: string;
|
|
715
|
+
error?: boolean;
|
|
716
|
+
}
|
|
717
|
+
declare const PhoneInput: React.FC<PhoneInputProps>;
|
|
718
|
+
|
|
719
|
+
interface PlusMinusInputProps {
|
|
720
|
+
allowNegative?: any;
|
|
721
|
+
buttonsPosition?: any;
|
|
722
|
+
disabled?: any;
|
|
723
|
+
initialValue?: any;
|
|
724
|
+
inputSize?: any;
|
|
725
|
+
label: any;
|
|
726
|
+
updateInputValue: any;
|
|
727
|
+
}
|
|
728
|
+
declare const PlusMinusInput: ({ allowNegative, buttonsPosition, disabled, initialValue, inputSize, label, updateInputValue, }: PlusMinusInputProps) => react_jsx_runtime.JSX.Element;
|
|
729
|
+
|
|
730
|
+
interface PBustProps {
|
|
731
|
+
buttonData?: any;
|
|
732
|
+
classes?: any;
|
|
733
|
+
locationData?: any;
|
|
734
|
+
locationId?: any;
|
|
735
|
+
primaryData?: any;
|
|
736
|
+
product?: any;
|
|
737
|
+
secondaryData?: any;
|
|
738
|
+
size?: any;
|
|
739
|
+
LocationHistoryDialog: ComponentType<any>;
|
|
740
|
+
}
|
|
741
|
+
declare const ProductBust: ({ classes, size, product, locationData, primaryData, secondaryData, buttonData, locationId, LocationHistoryDialog, }: PBustProps) => react_jsx_runtime.JSX.Element;
|
|
742
|
+
|
|
743
|
+
interface PImageProps {
|
|
744
|
+
classes?: any;
|
|
745
|
+
image?: any;
|
|
746
|
+
size?: any;
|
|
747
|
+
status?: any;
|
|
748
|
+
}
|
|
749
|
+
declare const ProductImage: ({ classes, image, size, status, }: PImageProps) => react_jsx_runtime.JSX.Element;
|
|
750
|
+
|
|
751
|
+
interface IRenderAvatar {
|
|
752
|
+
active?: boolean;
|
|
753
|
+
}
|
|
754
|
+
declare const RenderAvatar: ({ active }: IRenderAvatar) => react_jsx_runtime.JSX.Element;
|
|
755
|
+
|
|
756
|
+
interface IRenderContentList {
|
|
757
|
+
items: string[];
|
|
758
|
+
warningItems?: string[] | null;
|
|
759
|
+
warningMessage?: string;
|
|
760
|
+
activeSection: string;
|
|
761
|
+
}
|
|
762
|
+
declare const RenderContentList: ({ items, activeSection, warningItems, warningMessage, }: IRenderContentList) => react_jsx_runtime.JSX.Element;
|
|
763
|
+
|
|
764
|
+
type ProductSize = 'small' | 'medium' | 'large';
|
|
765
|
+
interface Column {
|
|
766
|
+
title: string;
|
|
767
|
+
value: string | React.ReactNode;
|
|
768
|
+
}
|
|
769
|
+
interface Product {
|
|
770
|
+
image: string;
|
|
771
|
+
name: string;
|
|
772
|
+
status?: string;
|
|
773
|
+
}
|
|
774
|
+
interface RowProductCardProps {
|
|
775
|
+
/**
|
|
776
|
+
* Possible actions or buttons that the card can have
|
|
777
|
+
*/
|
|
778
|
+
children?: React.ReactNode;
|
|
779
|
+
/**
|
|
780
|
+
* Details about the product
|
|
781
|
+
*/
|
|
782
|
+
columns?: Column[];
|
|
783
|
+
/**
|
|
784
|
+
* Where is the product location
|
|
785
|
+
*/
|
|
786
|
+
location?: string;
|
|
787
|
+
/**
|
|
788
|
+
* Product information
|
|
789
|
+
*/
|
|
790
|
+
product: Product;
|
|
791
|
+
/**
|
|
792
|
+
* Size of the product image
|
|
793
|
+
*/
|
|
794
|
+
size?: ProductSize;
|
|
795
|
+
}
|
|
796
|
+
/**
|
|
797
|
+
* A card on row format that can display informations about a product
|
|
798
|
+
* It can be very detailed or lean
|
|
799
|
+
*/
|
|
800
|
+
declare const RowProductCard: ({ children, columns, location, product, size, }: RowProductCardProps) => react_jsx_runtime.JSX.Element;
|
|
801
|
+
|
|
802
|
+
interface ScrollableDialogProps {
|
|
803
|
+
body: ReactNode;
|
|
804
|
+
footer?: ReactNode;
|
|
805
|
+
header?: ReactNode;
|
|
806
|
+
isOpen: boolean;
|
|
807
|
+
title: string;
|
|
808
|
+
}
|
|
809
|
+
declare const ScrollableDialog: ({ body, footer, header, isOpen, title, }: ScrollableDialogProps) => react_jsx_runtime.JSX.Element;
|
|
810
|
+
|
|
811
|
+
interface ISearchAndFilterHeaderProps {
|
|
812
|
+
appName: string;
|
|
813
|
+
enterPressedInSearch?: () => void;
|
|
814
|
+
extraButton?: React.ReactNode;
|
|
815
|
+
filtersComponent?: React.ReactNode;
|
|
816
|
+
appliedFiltersComponent?: React.ReactNode;
|
|
817
|
+
filterClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
818
|
+
showFilters: boolean;
|
|
819
|
+
updateFilters?: (filters: any) => void;
|
|
820
|
+
searchValue?: string;
|
|
821
|
+
}
|
|
822
|
+
declare const SearchAndFilterHeader: ({ appName, enterPressedInSearch, extraButton, filterClick, showFilters, updateFilters, filtersComponent, appliedFiltersComponent, searchValue, }: ISearchAndFilterHeaderProps) => react_jsx_runtime.JSX.Element;
|
|
823
|
+
|
|
824
|
+
interface SearchAndFilterHeaderForTableProps {
|
|
825
|
+
appName: string;
|
|
826
|
+
button?: React.ReactNode;
|
|
827
|
+
copy?: string;
|
|
828
|
+
enterPressedInSearch?(...args: any[]): any;
|
|
829
|
+
isOpen?: boolean;
|
|
830
|
+
onFilterButtonClick?(...args: any[]): any;
|
|
831
|
+
searchedValue?: string;
|
|
832
|
+
showFilterButton?: boolean;
|
|
833
|
+
updateSearch?(...args: any[]): any;
|
|
834
|
+
}
|
|
835
|
+
declare const _default$7: React.MemoExoticComponent<(props: SearchAndFilterHeaderForTableProps) => react_jsx_runtime.JSX.Element>;
|
|
836
|
+
|
|
837
|
+
type SearchFieldDebouncedProps = {
|
|
838
|
+
onSearch: (value: string) => void;
|
|
839
|
+
variant?: "outlined" | "filled" | "standard";
|
|
840
|
+
hideSearchIcon?: boolean;
|
|
841
|
+
initialValue?: string;
|
|
842
|
+
debounceDelay?: number;
|
|
843
|
+
minCharacters?: number;
|
|
844
|
+
sx?: SxProps<Theme>;
|
|
845
|
+
inputProps?: {
|
|
846
|
+
sx: SxProps<Theme>;
|
|
847
|
+
};
|
|
848
|
+
};
|
|
849
|
+
declare const SearchFieldDebounced: React__default.FC<SearchFieldDebouncedProps>;
|
|
850
|
+
|
|
851
|
+
interface ISearchWithFiltersProps {
|
|
852
|
+
enterPressedInSearch?: () => void;
|
|
853
|
+
filterClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
854
|
+
handleClick?: () => void;
|
|
855
|
+
searchValue?: string;
|
|
856
|
+
showFilters: boolean;
|
|
857
|
+
updateFilters?: (filters: {
|
|
858
|
+
search: string;
|
|
859
|
+
}) => void;
|
|
860
|
+
disabled?: boolean;
|
|
861
|
+
}
|
|
862
|
+
declare const _default$6: React.MemoExoticComponent<({ enterPressedInSearch, filterClick, handleClick, searchValue, showFilters, updateFilters, disabled, }: ISearchWithFiltersProps) => react_jsx_runtime.JSX.Element>;
|
|
863
|
+
|
|
864
|
+
interface SearchWithFiltersForTableProps {
|
|
865
|
+
onFilterButtonClick?(...args: any[]): any;
|
|
866
|
+
isOpen?: boolean;
|
|
867
|
+
updateSearch?(...args: any[]): any;
|
|
868
|
+
enterPressedInSearch?(...args: any[]): any;
|
|
869
|
+
showFilterButton?: boolean;
|
|
870
|
+
searchedValue?: string;
|
|
871
|
+
}
|
|
872
|
+
declare const _default$5: React.MemoExoticComponent<(props: SearchWithFiltersForTableProps) => react_jsx_runtime.JSX.Element>;
|
|
873
|
+
|
|
874
|
+
interface ISectionName {
|
|
875
|
+
name: string;
|
|
876
|
+
tooltipDescription?: string;
|
|
877
|
+
sectionId?: string;
|
|
878
|
+
buttonText?: string;
|
|
879
|
+
buttonType?: 'add' | 'apps' | 'childCare' | 'delete' | 'edit' | 'importExport' | 'notes' | 'print' | 'save' | 'upload' | 'refresh' | 'download' | 'publish';
|
|
880
|
+
handleButtonClick?: () => void;
|
|
881
|
+
buttonDisabled?: boolean;
|
|
882
|
+
openHistoryLog?: () => void;
|
|
883
|
+
}
|
|
884
|
+
declare const SectionName: ({ name, tooltipDescription, sectionId, handleButtonClick, buttonText, buttonType, buttonDisabled, openHistoryLog, }: ISectionName) => react_jsx_runtime.JSX.Element;
|
|
885
|
+
|
|
886
|
+
type Option = {
|
|
887
|
+
value?: string | number;
|
|
888
|
+
label?: string;
|
|
889
|
+
disabled?: boolean;
|
|
890
|
+
};
|
|
891
|
+
interface SmartSelectProps {
|
|
892
|
+
/**
|
|
893
|
+
* The current selected value of the select input. It can be a string, number, or null.
|
|
894
|
+
* If null, it indicates that no value is selected.
|
|
895
|
+
*/
|
|
896
|
+
value?: string | number | null;
|
|
897
|
+
/**
|
|
898
|
+
* The default option that is displayed when no value is selected.
|
|
899
|
+
* This is an object with a value and a label. If null, no default option is shown.
|
|
900
|
+
*/
|
|
901
|
+
defaultOption?: Option;
|
|
902
|
+
/**
|
|
903
|
+
* An array of available options to display in the select dropdown.
|
|
904
|
+
* Each option is an object with `value` and `label` properties.
|
|
905
|
+
*/
|
|
906
|
+
options?: Option[];
|
|
907
|
+
/**
|
|
908
|
+
* A function to refetch data if there are no options available in the dropdown.
|
|
909
|
+
* It can be called when the dropdown is opened and the list of options is empty.
|
|
910
|
+
*/
|
|
911
|
+
refetch?: () => void;
|
|
912
|
+
/**
|
|
913
|
+
* A boolean indicating whether the component is fetching data.
|
|
914
|
+
* If true, the loading spinner will be shown in the dropdown.
|
|
915
|
+
*/
|
|
916
|
+
isFetching?: boolean;
|
|
917
|
+
/**
|
|
918
|
+
* Callback function called when an option is selected from the dropdown.
|
|
919
|
+
* The selected option is passed as an argument to this function.
|
|
920
|
+
*/
|
|
921
|
+
onChange: (selectedOption: Option) => void;
|
|
922
|
+
/**
|
|
923
|
+
* A label for the select input. It will be displayed above the select dropdown.
|
|
924
|
+
*/
|
|
925
|
+
inputLabel?: string;
|
|
926
|
+
/**
|
|
927
|
+
* Style variant to choose.
|
|
928
|
+
*/
|
|
929
|
+
variant?: 'standard' | 'outlined' | 'filled';
|
|
930
|
+
/**
|
|
931
|
+
* Size to choose.
|
|
932
|
+
*/
|
|
933
|
+
size?: 'medium' | 'small';
|
|
934
|
+
/**
|
|
935
|
+
* A boolean indicating validation error.
|
|
936
|
+
* It allows use of error styling when validation is required.
|
|
937
|
+
*/
|
|
938
|
+
error?: boolean;
|
|
939
|
+
/**
|
|
940
|
+
* Helper text that is displayed below the select input.
|
|
941
|
+
* It can be used to provide additional information or instructions to the user.
|
|
942
|
+
*/
|
|
943
|
+
helperText?: string;
|
|
944
|
+
/**
|
|
945
|
+
* A boolean indicating whether the select input is disabled.
|
|
946
|
+
* If true, the input will be disabled, and users will not be able to interact with it.
|
|
947
|
+
*/
|
|
948
|
+
disabled?: boolean;
|
|
949
|
+
/**
|
|
950
|
+
* A boolean indicating whether the select should include a blank option.
|
|
951
|
+
*/
|
|
952
|
+
allowBlankOption?: boolean;
|
|
953
|
+
/**
|
|
954
|
+
* The `data-testid` attribute used for testing purposes.
|
|
955
|
+
* It is helpful to uniquely identify the component in automated tests.
|
|
956
|
+
*/
|
|
957
|
+
'data-testid'?: string;
|
|
958
|
+
/**
|
|
959
|
+
* A message to display when there are no options available in the dropdown.
|
|
960
|
+
* It will be shown when `isFetching` is false and `options` is empty.
|
|
961
|
+
* The default message is 'No options'.
|
|
962
|
+
*/
|
|
963
|
+
emptyMessage?: string;
|
|
964
|
+
/**
|
|
965
|
+
* Manage the MenuProps
|
|
966
|
+
*/
|
|
967
|
+
menuProps?: Partial<MenuProps>;
|
|
968
|
+
}
|
|
969
|
+
declare const SmartSelect: React.ForwardRefExoticComponent<SmartSelectProps & React.RefAttributes<unknown>>;
|
|
970
|
+
|
|
971
|
+
interface SquareLabelProps {
|
|
972
|
+
color?: string;
|
|
973
|
+
copy?: any;
|
|
974
|
+
}
|
|
975
|
+
declare const _default$4: React.MemoExoticComponent<({ color, copy }: SquareLabelProps) => react_jsx_runtime.JSX.Element>;
|
|
976
|
+
|
|
977
|
+
interface LSwitchProps {
|
|
978
|
+
classes?: any;
|
|
979
|
+
checked?: any;
|
|
980
|
+
labelOn?: any;
|
|
981
|
+
labelOff?: any;
|
|
982
|
+
handleChange?: any;
|
|
983
|
+
disabled: any;
|
|
984
|
+
}
|
|
985
|
+
declare const _default$3: React.MemoExoticComponent<({ checked, labelOn, labelOff, handleChange, classes, disabled, }: LSwitchProps) => react_jsx_runtime.JSX.Element>;
|
|
986
|
+
|
|
987
|
+
type SmartTableHeaderFilterMenuProps = {
|
|
988
|
+
headCell: HeadCell;
|
|
989
|
+
headerFilters: HeaderFilters;
|
|
990
|
+
numActiveFilters: number;
|
|
991
|
+
shouldShowCheckOnFilter?: TableDesktopProps["shouldShowCheckOnFilter"];
|
|
992
|
+
onApplyFilters?: TableDesktopProps["onApplyFilters"];
|
|
993
|
+
};
|
|
994
|
+
declare const SmartTableHeaderFilterMenu: React__default.MemoExoticComponent<({ headCell, numActiveFilters, headerFilters, shouldShowCheckOnFilter, onApplyFilters, }: SmartTableHeaderFilterMenuProps) => react_jsx_runtime.JSX.Element>;
|
|
995
|
+
|
|
996
|
+
type SmartTableHeaderProps = {
|
|
997
|
+
order: Order;
|
|
998
|
+
orderBy: string;
|
|
999
|
+
headCells: HeadCell[];
|
|
1000
|
+
numSelectedRows: number;
|
|
1001
|
+
numRows: number;
|
|
1002
|
+
enableCheckboxSelection?: boolean;
|
|
1003
|
+
headerFilters: HeaderFilters;
|
|
1004
|
+
onRequestSort: (event: MouseEvent<unknown>, property: string) => void;
|
|
1005
|
+
onSelectAllClick: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
1006
|
+
onApplyFilters?: TableDesktopProps["onApplyFilters"];
|
|
1007
|
+
shouldShowCheckOnFilter?: TableDesktopProps["shouldShowCheckOnFilter"];
|
|
1008
|
+
};
|
|
1009
|
+
declare const SmartTableHeader: React.MemoExoticComponent<({ order, orderBy, headCells, numSelectedRows, numRows, enableCheckboxSelection, headerFilters, onRequestSort, onSelectAllClick, onApplyFilters, shouldShowCheckOnFilter, }: SmartTableHeaderProps) => react_jsx_runtime.JSX.Element>;
|
|
1010
|
+
|
|
1011
|
+
interface TableProps {
|
|
1012
|
+
headCells?: {
|
|
1013
|
+
id?: string;
|
|
1014
|
+
label?: string;
|
|
1015
|
+
numeric?: boolean;
|
|
1016
|
+
disablePadding?: boolean;
|
|
1017
|
+
}[];
|
|
1018
|
+
data?: {}[];
|
|
1019
|
+
RenderItem?: React.ComponentType<any> | null;
|
|
1020
|
+
isLoading?: boolean;
|
|
1021
|
+
updateSort?(...args: any[]): any;
|
|
1022
|
+
page?: number;
|
|
1023
|
+
rowsPerPage?: number;
|
|
1024
|
+
onRowClick?(...args: any[]): any;
|
|
1025
|
+
serverRendered?: boolean;
|
|
1026
|
+
appliedFilters?: any;
|
|
1027
|
+
doNotCalculateRows?: any;
|
|
1028
|
+
}
|
|
1029
|
+
declare const Table: ({ appliedFilters, data, doNotCalculateRows, headCells, isLoading, onRowClick, page, RenderItem, rowsPerPage: defaultRowsPerPage, serverRendered, updateSort, }: TableProps) => react_jsx_runtime.JSX.Element;
|
|
1030
|
+
|
|
1031
|
+
type TableDesktopEditableFieldProps = {
|
|
1032
|
+
editInitialValue?: any;
|
|
1033
|
+
rowId?: number;
|
|
1034
|
+
field: string;
|
|
1035
|
+
fieldName: string;
|
|
1036
|
+
disabled?: boolean;
|
|
1037
|
+
showCheckboxLabel?: boolean;
|
|
1038
|
+
variant?: "standard" | "outlined" | "filled";
|
|
1039
|
+
size?: "medium" | "small";
|
|
1040
|
+
inputLabel: string;
|
|
1041
|
+
editableCellType: EditableCellType;
|
|
1042
|
+
filterOptions?: HeadCell["filterOptions"];
|
|
1043
|
+
refetchFilterOptions?: HeadCell["refetchFilterOptions"];
|
|
1044
|
+
isFetchingFilterOptions?: HeadCell["isFetchingFilterOptions"];
|
|
1045
|
+
validateInput?: HeadCell["validateInput"];
|
|
1046
|
+
onUpdateEditableCell?: HeadCell["onUpdateEditableCell"];
|
|
1047
|
+
};
|
|
1048
|
+
declare const TableDesktopEditableField: React.NamedExoticComponent<TableDesktopEditableFieldProps>;
|
|
1049
|
+
|
|
1050
|
+
type TableDesktopCellProps = {
|
|
1051
|
+
editableCellType?: EditableCellType;
|
|
1052
|
+
editInitialValue: any;
|
|
1053
|
+
rowId: number;
|
|
1054
|
+
field: string;
|
|
1055
|
+
fieldName: string;
|
|
1056
|
+
enableEditMode: boolean;
|
|
1057
|
+
disabled?: boolean;
|
|
1058
|
+
readOnlyValue: string | number | boolean;
|
|
1059
|
+
width?: HeadCell["width"];
|
|
1060
|
+
inputLabel: HeadCell["label"];
|
|
1061
|
+
filterOptions?: HeadCell["filterOptions"];
|
|
1062
|
+
refetchFilterOptions?: HeadCell["refetchFilterOptions"];
|
|
1063
|
+
isFetchingFilterOptions?: HeadCell["isFetchingFilterOptions"];
|
|
1064
|
+
validateInput?: HeadCell["validateInput"];
|
|
1065
|
+
onUpdateEditableCell?: HeadCell["onUpdateEditableCell"];
|
|
1066
|
+
onCellClick?: (event: MouseEvent<HTMLTableCellElement>, isEditMode: boolean) => void;
|
|
1067
|
+
};
|
|
1068
|
+
declare const TableDesktopCell: FC<TableDesktopCellProps>;
|
|
1069
|
+
|
|
1070
|
+
interface ITableEmptyResult {
|
|
1071
|
+
colSpan: number;
|
|
1072
|
+
showClearFilterButton?: boolean;
|
|
1073
|
+
handleClickOnClearFiltersButton?: () => void;
|
|
1074
|
+
}
|
|
1075
|
+
declare const TableEmptyResult: ({ colSpan, showClearFilterButton, handleClickOnClearFiltersButton, }: ITableEmptyResult) => react_jsx_runtime.JSX.Element;
|
|
1076
|
+
|
|
1077
|
+
interface TableLoadingProps {
|
|
1078
|
+
rowsPerPage?: number;
|
|
1079
|
+
rowHeight?: number;
|
|
1080
|
+
}
|
|
1081
|
+
declare const TableLoading: React__default.FC<TableLoadingProps>;
|
|
1082
|
+
|
|
1083
|
+
interface TableHeaderProps {
|
|
1084
|
+
cells: any;
|
|
1085
|
+
onSort?: any;
|
|
1086
|
+
}
|
|
1087
|
+
declare const _default$2: React.MemoExoticComponent<({ cells, onSort }: TableHeaderProps) => react_jsx_runtime.JSX.Element>;
|
|
1088
|
+
|
|
1089
|
+
interface TextDividerProps {
|
|
1090
|
+
title: string;
|
|
1091
|
+
icon?: React.ElementType;
|
|
1092
|
+
onClick?: () => void;
|
|
1093
|
+
color?: string;
|
|
1094
|
+
iconPosition?: 'left' | 'right';
|
|
1095
|
+
titleWeight?: '400' | '500' | '600' | '700' | '800' | '900';
|
|
1096
|
+
}
|
|
1097
|
+
declare const TextDivider: React.FC<TextDividerProps>;
|
|
1098
|
+
|
|
1099
|
+
type ThemedDateRangePickerProps = DateRangePickerShape & {
|
|
1100
|
+
className?: string;
|
|
1101
|
+
};
|
|
1102
|
+
/**
|
|
1103
|
+
* DateRangePicker component with dark mode theming support.
|
|
1104
|
+
* Props are forwarded directly to the underlying DateRangePicker.
|
|
1105
|
+
*/
|
|
1106
|
+
declare const ThemedDateRangePicker: ({ className, ...props }: ThemedDateRangePickerProps) => react_jsx_runtime.JSX.Element;
|
|
1107
|
+
|
|
1108
|
+
type Props = {
|
|
1109
|
+
imageLogoDarkSmall: string;
|
|
1110
|
+
imageLogoLightSmall: string;
|
|
1111
|
+
handleOpen: () => void;
|
|
1112
|
+
LeftDrawer: ReactNode;
|
|
1113
|
+
leftSection?: ReactNode;
|
|
1114
|
+
rightSection?: ReactNode;
|
|
1115
|
+
};
|
|
1116
|
+
declare const _default$1: React.MemoExoticComponent<({ imageLogoDarkSmall, imageLogoLightSmall, handleOpen, LeftDrawer, leftSection, rightSection, }: Props) => react_jsx_runtime.JSX.Element>;
|
|
1117
|
+
|
|
1118
|
+
type IToastMessage = {
|
|
1119
|
+
toastType: 'success' | 'info' | 'warning' | 'error';
|
|
1120
|
+
toastMessage: string;
|
|
1121
|
+
open: boolean;
|
|
1122
|
+
onClose: () => void;
|
|
1123
|
+
};
|
|
1124
|
+
/**
|
|
1125
|
+
*@param toastType 'success' | 'info' | 'warning' | 'error';.
|
|
1126
|
+
*@param toastMessage Value to be displayed on screen;.
|
|
1127
|
+
*@param open Boolean to open the toast;.
|
|
1128
|
+
*@param updateToast Reducer function to update the reducer value
|
|
1129
|
+
*/
|
|
1130
|
+
declare const ToastMessage: ({ toastType, toastMessage, open, onClose, }: IToastMessage) => react_jsx_runtime.JSX.Element;
|
|
1131
|
+
|
|
1132
|
+
interface ITwoButtonDialogProps {
|
|
1133
|
+
confirmButton: () => void;
|
|
1134
|
+
cancelButton?: () => void;
|
|
1135
|
+
dialogLoading?: boolean;
|
|
1136
|
+
title: string;
|
|
1137
|
+
subtitle1?: string | React.ReactNode;
|
|
1138
|
+
subtitle2?: string | React.ReactNode;
|
|
1139
|
+
open: boolean;
|
|
1140
|
+
setOpen: (open: boolean) => void;
|
|
1141
|
+
confirmLabel?: string;
|
|
1142
|
+
cancelLabel?: string;
|
|
1143
|
+
}
|
|
1144
|
+
declare const TwoButtonDialog: FC<ITwoButtonDialogProps>;
|
|
1145
|
+
|
|
1146
|
+
type UserBustProps = {
|
|
1147
|
+
user: {
|
|
1148
|
+
profile_picture: string;
|
|
1149
|
+
first_name: string;
|
|
1150
|
+
last_name: string;
|
|
1151
|
+
username: string;
|
|
1152
|
+
};
|
|
1153
|
+
avatarProps: {
|
|
1154
|
+
height: number;
|
|
1155
|
+
width: number;
|
|
1156
|
+
};
|
|
1157
|
+
typographyProps: {
|
|
1158
|
+
name?: {
|
|
1159
|
+
variant: ComponentProps<typeof Typography>['variant'];
|
|
1160
|
+
component: string;
|
|
1161
|
+
};
|
|
1162
|
+
username?: {
|
|
1163
|
+
variant: ComponentProps<typeof Typography>['variant'];
|
|
1164
|
+
component: string;
|
|
1165
|
+
};
|
|
1166
|
+
};
|
|
1167
|
+
};
|
|
1168
|
+
declare const _default: React.MemoExoticComponent<({ user, avatarProps, typographyProps }: UserBustProps) => react_jsx_runtime.JSX.Element>;
|
|
1169
|
+
|
|
1170
|
+
declare const SvgIconCompare: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
1171
|
+
|
|
1172
|
+
declare const SvgIconChart: (props: SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
1173
|
+
|
|
1174
|
+
export { ActiveFiltersIconButton, AlertDialog, AlertDialogFullScreen, AppLabel, AutocompleteFilterMenuContent, BackHeader, BottomBar, _default$k as BoxButton, CheckboxFilterMenuContent, CompanyLogo, ConfirmationDialog, ControlledCheckbox, ControlledNumberInput, ControlledNumericField, ControlledSelectWithArray, ControlledSelectWithObject, ControlledValidTextInput, DataGrid, Date, _default$c as DeleteSubstitutionDialogContent, _default$b as DeleteUserDialogContent, DynamicOverflowTooltip, type EditableCellType, _default$j as ExtendedButton, FileCard, _default$i as FilledButton, _default$h as FilledButtonLg, _default$a as FilledLabel, FilterGroupSelector, FilterOptionsCheckboxes, FilterSimpleSelector, _default$9 as FixedFooter, type HeadCell, Header, type HeaderFilterObject, type HeaderFilterOptions, type HeaderFilters, SvgIconChart as IconChart, SvgIconCompare as IconCompare, _default$g as ImageButton, VirtualizedList as List, Loading, LocationsSectionInfo, Notes, Numpad, _default$8 as NumpadInput, NumpadPlus, type Order, _default$f as OutlinedButton, _default$e as OutlinedButtonLg, PaginationForTable as Pagination, PhoneInput, _default$d as Pin, ActionButton as PinnedApp, PlusMinusInput, ProductBust, ProductImage, RenderAvatar, RenderContentList, RoundButton, RowProductCard, ScrollableDialog, SearchAndFilterHeader, _default$7 as SearchAndFilterHeaderForTable, SearchFieldDebounced, _default$6 as SearchWithFilters, _default$5 as SearchWithFiltersForTable, SectionName, SmartSelect, SmartTableHeader, SmartTableHeaderFilterMenu, SquareButton, _default$4 as SquareLabel, _default$3 as Switch, Table, TableDesktop, TableDesktopCell, TableDesktopEditableField, TableDesktopFooter, TableEmptyResult, _default$2 as TableHeader, TableLoading, TextDivider, _default$1 as TheToolbar, ThemedDateRangePicker, ToastMessage, TwoButtonDialog, UploadButton, _default as UserBust, icons };
|