@zydon/common 2.6.95 → 2.6.96
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/{chunk-VGB7HPN6.js → chunk-EPSIFEA7.js} +1 -1
- package/dist/{chunk-PF7OFL6X.js → chunk-G2EXNBOF.js} +1 -1
- package/dist/components/ActionButton/index.js +1 -1
- package/dist/components/Autocomplete/index.js +1 -1
- package/dist/components/AvatarButton/index.js +5 -5
- package/dist/components/BuilderLayout/index.js +1 -1
- package/dist/components/BuilderSidebar/index.js +1 -1
- package/dist/components/Common/index.js +3 -3
- package/dist/components/DataView/index.js +2 -2
- package/dist/components/DragButton/index.js +1 -1
- package/dist/components/Drawer/index.js +1 -1
- package/dist/components/EasyCropModal/index.js +1 -1
- package/dist/components/Error/index.js +1 -1
- package/dist/components/ExpandableGroup/index.js +1 -1
- package/dist/components/FileUpload/index.d.ts +356 -8
- package/dist/components/FileUpload/index.js +12 -14
- package/dist/components/FrameSkeleton/index.js +1 -1
- package/dist/components/HelpButton/index.js +1 -1
- package/dist/components/Icon/index.js +1 -1
- package/dist/components/IconButton/index.js +1 -1
- package/dist/components/ImageCropModal/index.js +1 -1
- package/dist/components/Incrementer/index.js +1 -1
- package/dist/components/InfoCircle/index.js +1 -1
- package/dist/components/ListBundles/index.js +1 -1
- package/dist/components/MenuItem/index.js +1 -1
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/MoreMenu/index.js +1 -1
- package/dist/components/PasswordRules/index.js +1 -1
- package/dist/components/PopoverSelect/index.js +1 -1
- package/dist/components/SearchInput/index.js +1 -1
- package/dist/components/SelectableCards/index.js +1 -1
- package/dist/components/SeoPreview/index.js +1 -1
- package/dist/components/StateDisplay/index.js +1 -1
- package/dist/components/Steps/index.js +1 -1
- package/dist/components/StyledTab/index.js +1 -1
- package/dist/components/SwapList/index.js +1 -1
- package/dist/components/ToggleTheme/index.js +4 -4
- package/dist/components/WebhookCard/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/form/Address/index.js +2 -2
- package/dist/components/form/Autocomplete/index.js +1 -1
- package/dist/components/form/Incrementer/index.js +1 -1
- package/dist/components/form/Password/index.js +1 -1
- package/dist/components/form/SelectableCards/index.js +1 -1
- package/dist/components/form/UploadAvatarWithCrop/index.js +1 -1
- package/dist/components/form/UploadWithCrop/index.js +1 -1
- package/dist/components/form/Webhook/index.js +1 -1
- package/dist/components/lightbox/index.js +1 -1
- package/dist/components/table/index.js +1 -1
- package/dist/components/upload/index.js +1 -1
- package/dist/hooks/useThemeToggle.js +3 -3
- package/dist/index.js +3 -3
- package/dist/theme/theme-provider.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-ORQNUG2V.js +0 -6
- package/dist/components/FileUpload/hooks/useFileUploadService.d.ts +0 -7
- package/dist/components/FileUpload/hooks/useFileUploadService.js +0 -2
- package/dist/useFileUploadService-1a2d0cf5.d.ts +0 -358
- package/dist/{chunk-L4KD6JF2.js → chunk-CASOITDH.js} +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { a as a$4 } from '../../chunk-FP2AYD66.js';
|
|
2
|
-
import { a as a$5 } from '../../chunk-
|
|
2
|
+
import { a as a$5 } from '../../chunk-EPSIFEA7.js';
|
|
3
3
|
import { a } from '../../chunk-X2EIL7EB.js';
|
|
4
4
|
import { a as a$2 } from '../../chunk-NF42ENKE.js';
|
|
5
5
|
import { a as a$3 } from '../../chunk-BFAYY2AM.js';
|
|
6
|
-
import '../../chunk-FO7JCJ76.js';
|
|
7
6
|
import '../../chunk-JJM24URR.js';
|
|
7
|
+
import '../../chunk-FO7JCJ76.js';
|
|
8
8
|
import { a as a$1 } from '../../chunk-ORYAES3Q.js';
|
|
9
|
-
import '../../chunk-
|
|
10
|
-
import '../../chunk-
|
|
9
|
+
import '../../chunk-G2EXNBOF.js';
|
|
10
|
+
import '../../chunk-CASOITDH.js';
|
|
11
11
|
import '../../chunk-SO64ZYQB.js';
|
|
12
|
-
import '../../chunk-GUFT6XPG.js';
|
|
13
12
|
import '../../chunk-FT5VGKNM.js';
|
|
14
13
|
import '../../chunk-KHS3U6GK.js';
|
|
15
14
|
import '../../chunk-DXGMZFNS.js';
|
|
16
15
|
import '../../chunk-CFVUZ4S5.js';
|
|
17
16
|
import '../../chunk-7KH2T72T.js';
|
|
17
|
+
import '../../chunk-GUFT6XPG.js';
|
|
18
18
|
import '../../chunk-7J53ZUIF.js';
|
|
19
19
|
import '../../chunk-S7QQBC4I.js';
|
|
20
20
|
import '../../chunk-QQDMA4TE.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as a$1 } from '../../chunk-DSFPGTNS.js';
|
|
2
2
|
import '../../chunk-BFAYY2AM.js';
|
|
3
|
-
import '../../chunk-FO7JCJ76.js';
|
|
4
3
|
import '../../chunk-JJM24URR.js';
|
|
4
|
+
import '../../chunk-FO7JCJ76.js';
|
|
5
5
|
import a from '@mui/material/Stack';
|
|
6
6
|
import { styled, alpha } from '@mui/material/styles';
|
|
7
7
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as a$1 } from '../../chunk-W3MYAMTH.js';
|
|
2
2
|
import { a as a$2 } from '../../chunk-BFAYY2AM.js';
|
|
3
|
-
import '../../chunk-FO7JCJ76.js';
|
|
4
3
|
import '../../chunk-JJM24URR.js';
|
|
4
|
+
import '../../chunk-FO7JCJ76.js';
|
|
5
5
|
import a from '@mui/material/Stack';
|
|
6
6
|
import { styled } from '@mui/material/styles';
|
|
7
7
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { a as a$1 } from '../../chunk-UBRDWK4B.js';
|
|
2
2
|
import { a } from '../../chunk-BFAYY2AM.js';
|
|
3
|
-
import '../../chunk-FO7JCJ76.js';
|
|
4
3
|
import '../../chunk-JJM24URR.js';
|
|
5
|
-
import
|
|
4
|
+
import '../../chunk-FO7JCJ76.js';
|
|
5
|
+
import { c, b as b$2 } from '../../chunk-CASOITDH.js';
|
|
6
6
|
import '../../chunk-SO64ZYQB.js';
|
|
7
|
-
import '../../chunk-GUFT6XPG.js';
|
|
8
7
|
import { b as b$1 } from '../../chunk-FT5VGKNM.js';
|
|
9
8
|
import '../../chunk-KHS3U6GK.js';
|
|
10
9
|
import '../../chunk-DXGMZFNS.js';
|
|
11
10
|
import '../../chunk-CFVUZ4S5.js';
|
|
12
11
|
import '../../chunk-7KH2T72T.js';
|
|
12
|
+
import '../../chunk-GUFT6XPG.js';
|
|
13
13
|
import { k } from '../../chunk-7J53ZUIF.js';
|
|
14
14
|
import '../../chunk-S7QQBC4I.js';
|
|
15
15
|
import '../../chunk-QQDMA4TE.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as a$5 } from '../../chunk-QAB3RH43.js';
|
|
2
|
-
import { a as a$6 } from '../../chunk-TWGGHTU5.js';
|
|
3
2
|
import { a as a$2 } from '../../chunk-5YJTSVA2.js';
|
|
3
|
+
import { a as a$6 } from '../../chunk-TWGGHTU5.js';
|
|
4
4
|
import { a } from '../../chunk-NPXVOPB2.js';
|
|
5
5
|
import { a as a$9 } from '../../chunk-T7AZE2TB.js';
|
|
6
6
|
import { a as a$7 } from '../../chunk-FK7DDO5L.js';
|
|
@@ -9,8 +9,8 @@ import '../../chunk-U26IUEAG.js';
|
|
|
9
9
|
import { a as a$4 } from '../../chunk-X2EIL7EB.js';
|
|
10
10
|
import { a as a$8 } from '../../chunk-26GV7WKC.js';
|
|
11
11
|
import { a as a$1 } from '../../chunk-BFAYY2AM.js';
|
|
12
|
-
import '../../chunk-FO7JCJ76.js';
|
|
13
12
|
import '../../chunk-JJM24URR.js';
|
|
13
|
+
import '../../chunk-FO7JCJ76.js';
|
|
14
14
|
import { a as a$3 } from '../../chunk-ORYAES3Q.js';
|
|
15
15
|
import { b as b$1 } from '../../chunk-ILHUUK4X.js';
|
|
16
16
|
import '../../chunk-7J53ZUIF.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as a$2 } from '../../chunk-26GV7WKC.js';
|
|
2
2
|
import { a as a$1 } from '../../chunk-BFAYY2AM.js';
|
|
3
|
-
import '../../chunk-FO7JCJ76.js';
|
|
4
3
|
import '../../chunk-JJM24URR.js';
|
|
4
|
+
import '../../chunk-FO7JCJ76.js';
|
|
5
5
|
import g from '@mui/material/Drawer';
|
|
6
6
|
import x from '@mui/material/IconButton';
|
|
7
7
|
import a from '@mui/material/Stack';
|
|
@@ -2,6 +2,6 @@ export { a as default } from '../../chunk-RQ4T6IDM.js';
|
|
|
2
2
|
import '../../chunk-BPY2UXIB.js';
|
|
3
3
|
import '../../chunk-7AZX7L27.js';
|
|
4
4
|
import '../../chunk-BFAYY2AM.js';
|
|
5
|
-
import '../../chunk-FO7JCJ76.js';
|
|
6
5
|
import '../../chunk-JJM24URR.js';
|
|
6
|
+
import '../../chunk-FO7JCJ76.js';
|
|
7
7
|
import '../../chunk-ILHUUK4X.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a } from '../../chunk-BFAYY2AM.js';
|
|
2
|
-
import '../../chunk-FO7JCJ76.js';
|
|
3
2
|
import '../../chunk-JJM24URR.js';
|
|
3
|
+
import '../../chunk-FO7JCJ76.js';
|
|
4
4
|
import F from '@mui/material/Button';
|
|
5
5
|
import i from '@mui/material/Stack';
|
|
6
6
|
import l from '@mui/material/Typography';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a } from '../../chunk-W3MYAMTH.js';
|
|
2
2
|
import { a as a$1 } from '../../chunk-BFAYY2AM.js';
|
|
3
|
-
import '../../chunk-FO7JCJ76.js';
|
|
4
3
|
import '../../chunk-JJM24URR.js';
|
|
4
|
+
import '../../chunk-FO7JCJ76.js';
|
|
5
5
|
import s from '@mui/material/IconButton';
|
|
6
6
|
import n from '@mui/material/Stack';
|
|
7
7
|
import m from '@mui/material/Typography';
|
|
@@ -1,12 +1,334 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import '
|
|
6
|
-
import '
|
|
7
|
-
import '@
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import { DropzoneOptions, DropzoneRootProps, FileRejection, DropzoneInputProps, useDropzone } from 'react-dropzone';
|
|
4
|
+
import { Area } from 'react-easy-crop';
|
|
5
|
+
import { DraggableAttributes, DraggableSyntheticListeners } from '@dnd-kit/core';
|
|
6
|
+
import { StackProps } from '@mui/material/Stack';
|
|
7
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
8
|
+
|
|
9
|
+
interface ExtendFile extends File {
|
|
10
|
+
id: string;
|
|
11
|
+
url: string;
|
|
12
|
+
}
|
|
13
|
+
interface FileDetails {
|
|
14
|
+
id: string;
|
|
15
|
+
url: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
}
|
|
18
|
+
interface FileUpload {
|
|
19
|
+
url: string;
|
|
20
|
+
file: ExtendFile;
|
|
21
|
+
contentType: string;
|
|
22
|
+
resourceIds: string[];
|
|
23
|
+
}
|
|
24
|
+
type CropSize = {
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
} | number;
|
|
28
|
+
type CreateFilesMutation = (files: ExtendFile[]) => Promise<string[] | undefined>;
|
|
29
|
+
interface FileCreateRequest {
|
|
30
|
+
files: Array<{
|
|
31
|
+
content_type: keyof typeof ContentType;
|
|
32
|
+
name: string;
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
interface FileGetResponse {
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
organization_id: string;
|
|
39
|
+
url: string;
|
|
40
|
+
status: 'PENDING' | 'COMPLETED' | 'FAILED';
|
|
41
|
+
content_type: string;
|
|
42
|
+
content_length: number;
|
|
43
|
+
created_by: string;
|
|
44
|
+
created_at: string;
|
|
45
|
+
updated_by: string;
|
|
46
|
+
updated_at: string;
|
|
47
|
+
}
|
|
48
|
+
interface FileCreateResponse {
|
|
49
|
+
files: FileGetResponse[];
|
|
50
|
+
}
|
|
51
|
+
interface FileQueryRequest {
|
|
52
|
+
ids: string[];
|
|
53
|
+
}
|
|
54
|
+
interface FileQueryResponse {
|
|
55
|
+
files: FileGetResponse[];
|
|
56
|
+
}
|
|
57
|
+
interface SingleFilePreviewProps extends StackProps {
|
|
58
|
+
file: ExtendFile;
|
|
59
|
+
aspectRatio?: number;
|
|
60
|
+
isLoading?: boolean;
|
|
61
|
+
cropSize?: CropSize;
|
|
62
|
+
onLoading?: (isLoading: boolean) => void;
|
|
63
|
+
isUploading?: boolean;
|
|
64
|
+
maxWidth?: number;
|
|
65
|
+
maxHeight?: number;
|
|
66
|
+
}
|
|
67
|
+
interface LoadingPreviewImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
68
|
+
aspectRatio: number;
|
|
69
|
+
maxWidth?: number | string;
|
|
70
|
+
maxHeight?: number | string;
|
|
71
|
+
isLoading?: boolean;
|
|
72
|
+
isUploading?: boolean;
|
|
73
|
+
cropSize?: CropSize;
|
|
74
|
+
onLoading?: (isLoading: boolean) => void;
|
|
75
|
+
alt?: string;
|
|
76
|
+
src?: string;
|
|
77
|
+
loading: 'lazy';
|
|
78
|
+
}
|
|
79
|
+
interface PlaceholderProps extends StackProps {
|
|
80
|
+
header?: React.ReactNode;
|
|
81
|
+
description?: React.ReactNode;
|
|
82
|
+
}
|
|
83
|
+
interface FileUploadProps {
|
|
84
|
+
createFilesMutation: (params: FileCreateRequest) => {
|
|
85
|
+
unwrap: () => Promise<FileCreateResponse>;
|
|
86
|
+
};
|
|
87
|
+
filesDetails: FileDetails[];
|
|
88
|
+
}
|
|
89
|
+
interface SingleFileUploadProps extends DropzoneOptions {
|
|
90
|
+
onRemove?: (file?: ExtendFile) => void;
|
|
91
|
+
onFileSelect?: (file: ExtendFile) => void;
|
|
92
|
+
createFilesMutation: FileUploadProps['createFilesMutation'];
|
|
93
|
+
fileDetails?: FileDetails;
|
|
94
|
+
placeholderProps?: PlaceholderProps;
|
|
95
|
+
placeholderAlt?: React.ReactNode;
|
|
96
|
+
name?: string;
|
|
97
|
+
label?: string;
|
|
98
|
+
id?: string;
|
|
99
|
+
disabled?: boolean;
|
|
100
|
+
error?: string;
|
|
101
|
+
helperText?: string | React.ReactNode;
|
|
102
|
+
sx?: SxProps<Theme>;
|
|
103
|
+
dropZoneSxProps?: SxProps<Theme>;
|
|
104
|
+
uploading?: boolean;
|
|
105
|
+
tabIndex?: number;
|
|
106
|
+
maxSize?: number;
|
|
107
|
+
}
|
|
108
|
+
interface SingleImageUploadProps extends SingleFileUploadProps {
|
|
109
|
+
aspectRatio?: number;
|
|
110
|
+
enableCrop?: boolean;
|
|
111
|
+
convertToWebp?: boolean;
|
|
112
|
+
cropSize?: CropSize;
|
|
113
|
+
maxWidth?: number;
|
|
114
|
+
maxHeight?: number;
|
|
115
|
+
compressionQuality?: number;
|
|
116
|
+
maxCompressedWidth?: number;
|
|
117
|
+
maxCompressedHeight?: number;
|
|
118
|
+
}
|
|
119
|
+
interface MultiFileUploadProps extends Omit<SingleFileUploadProps, 'filesDetails' | 'onFileSelect'> {
|
|
120
|
+
onFilesSelect?: (files: ExtendFile[]) => void;
|
|
121
|
+
onRemoveAll?: (files?: ExtendFile[]) => void;
|
|
122
|
+
onReorder?: (oldIndex: number, newIndex: number, files: ExtendFile[]) => void;
|
|
123
|
+
filesDetails?: FileDetails[];
|
|
124
|
+
maxFiles?: number;
|
|
125
|
+
thumbnail?: boolean;
|
|
126
|
+
}
|
|
127
|
+
interface MultiImageUploadProps extends MultiFileUploadProps {
|
|
128
|
+
aspectRatio?: number;
|
|
129
|
+
enableCrop?: boolean;
|
|
130
|
+
convertToWebp?: boolean;
|
|
131
|
+
cropSize?: CropSize;
|
|
132
|
+
maxWidth?: number;
|
|
133
|
+
maxHeight?: number;
|
|
134
|
+
compressionQuality?: number;
|
|
135
|
+
maxCompressedWidth?: number;
|
|
136
|
+
maxCompressedHeight?: number;
|
|
137
|
+
}
|
|
138
|
+
interface SortableItemProps extends StackProps {
|
|
139
|
+
onRemove?: (file?: ExtendFile) => void;
|
|
140
|
+
file: ExtendFile;
|
|
141
|
+
thumbnail?: boolean;
|
|
142
|
+
disableDrag?: boolean;
|
|
143
|
+
}
|
|
144
|
+
interface MultiFilePreviewProps extends StackProps {
|
|
145
|
+
onReorder?: (oldIndex: number, newIndex: number, files: ExtendFile[]) => void;
|
|
146
|
+
onRemove?: (file?: ExtendFile) => void;
|
|
147
|
+
files: ExtendFile[];
|
|
148
|
+
lastNode?: React.ReactNode;
|
|
149
|
+
firstNode?: React.ReactNode;
|
|
150
|
+
thumbnail: boolean;
|
|
151
|
+
slotProps?: {
|
|
152
|
+
thumbnail?: Omit<FileThumbnailProps, 'file'>;
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
interface StyledDropZoneProps extends StackProps {
|
|
156
|
+
isDragActive: boolean;
|
|
157
|
+
isError: boolean;
|
|
158
|
+
disabled: boolean;
|
|
159
|
+
}
|
|
160
|
+
type StyledDropZonePropsType = Omit<DropzoneRootProps, 'children' | 'onDrop' | 'onError'> & StyledDropZoneProps;
|
|
161
|
+
interface RejectionFilesProps extends StackProps {
|
|
162
|
+
files: FileRejection[];
|
|
163
|
+
}
|
|
164
|
+
interface ThumbnailBadgeProps {
|
|
165
|
+
onRemove?: (file?: ExtendFile) => void;
|
|
166
|
+
file: ExtendFile;
|
|
167
|
+
attributes: DraggableAttributes;
|
|
168
|
+
listeners: DraggableSyntheticListeners;
|
|
169
|
+
innerWidth: number;
|
|
170
|
+
isDragging: boolean;
|
|
171
|
+
disableDrag?: boolean;
|
|
172
|
+
sx?: SxProps<Theme>;
|
|
173
|
+
}
|
|
174
|
+
interface DropZoneProps {
|
|
175
|
+
sx?: SxProps;
|
|
176
|
+
uploading?: boolean;
|
|
177
|
+
id?: string;
|
|
178
|
+
tabIndex?: number;
|
|
179
|
+
getRootProps: () => DropzoneRootProps;
|
|
180
|
+
getInputProps: () => DropzoneInputProps;
|
|
181
|
+
isDragActive: boolean;
|
|
182
|
+
isError: boolean;
|
|
183
|
+
disabled?: boolean;
|
|
184
|
+
dropZoneSxProps?: SxProps<Theme>;
|
|
185
|
+
dropZoneContent?: React.ReactNode;
|
|
186
|
+
children?: React.ReactNode;
|
|
187
|
+
name?: string;
|
|
188
|
+
}
|
|
189
|
+
interface HelperTextProps {
|
|
190
|
+
helperText?: string | React.ReactNode;
|
|
191
|
+
disabled?: boolean;
|
|
192
|
+
isError?: boolean;
|
|
193
|
+
}
|
|
194
|
+
interface UseDropzoneUploaderProps {
|
|
195
|
+
onReorder?: (oldIndex: number, newIndex: number, files: ExtendFile[]) => void;
|
|
196
|
+
onFileSelect?: (file: ExtendFile) => void;
|
|
197
|
+
onFilesSelect?: (files: ExtendFile[]) => void;
|
|
198
|
+
onRemove?: (file?: ExtendFile) => void;
|
|
199
|
+
uploadFiles: (files: File[]) => Promise<ExtendFile[] | undefined>;
|
|
200
|
+
filesPreview?: ExtendFile[];
|
|
201
|
+
dropzoneOptions?: Omit<DropzoneOptions, 'onDrop' | 'onDropRejected'>;
|
|
202
|
+
enableCrop?: boolean;
|
|
203
|
+
customAspectRatio?: number;
|
|
204
|
+
convertToWebp?: boolean;
|
|
205
|
+
maxFiles?: number;
|
|
206
|
+
cropSize?: {
|
|
207
|
+
width: number;
|
|
208
|
+
height: number;
|
|
209
|
+
} | number;
|
|
210
|
+
compressionQuality?: number;
|
|
211
|
+
maxCompressedWidth?: number;
|
|
212
|
+
maxCompressedHeight?: number;
|
|
213
|
+
}
|
|
214
|
+
interface UseDropzoneUploaderReturn {
|
|
215
|
+
file: ExtendFile | null;
|
|
216
|
+
files: ExtendFile[];
|
|
217
|
+
aspectRatio: number;
|
|
218
|
+
dropzoneProps: {
|
|
219
|
+
getRootProps: ReturnType<typeof useDropzone>['getRootProps'];
|
|
220
|
+
getInputProps: ReturnType<typeof useDropzone>['getInputProps'];
|
|
221
|
+
isDragActive: boolean;
|
|
222
|
+
isDragReject: boolean;
|
|
223
|
+
fileRejections: readonly FileRejection[];
|
|
224
|
+
};
|
|
225
|
+
cropState: {
|
|
226
|
+
cropModalOpen: boolean;
|
|
227
|
+
imagePreview: string;
|
|
228
|
+
cropLoading: boolean;
|
|
229
|
+
setCropModalOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
230
|
+
onCropInitialized: (croppedArea: Area, croppedAreaPixels: Area) => void;
|
|
231
|
+
handleCropSave: () => Promise<void>;
|
|
232
|
+
handleCropCancel: () => void;
|
|
233
|
+
currentImageIndex: number;
|
|
234
|
+
totalPendingImages: number;
|
|
235
|
+
};
|
|
236
|
+
setInitialFiles?: (files: ExtendFile[]) => void;
|
|
237
|
+
handleRemove: (fileToRemove?: ExtendFile) => void;
|
|
238
|
+
handleReorder: (oldIndex: number, newIndex: number, files: ExtendFile[]) => void;
|
|
239
|
+
}
|
|
240
|
+
declare enum ContentType {
|
|
241
|
+
APPLICATION_OCTET_STREAM = "application/octet-stream",
|
|
242
|
+
IMAGE_JPEG = "image/jpeg",
|
|
243
|
+
IMAGE_JPG = "image/jpg",
|
|
244
|
+
IMAGE_PNG = "image/png",
|
|
245
|
+
IMAGE_GIF = "image/gif",
|
|
246
|
+
IMAGE_WEBP = "image/webp",
|
|
247
|
+
IMAGE_SVG = "image/svg+xml",
|
|
248
|
+
IMAGE_BMP = "image/bmp",
|
|
249
|
+
IMAGE_TIFF = "image/tiff",
|
|
250
|
+
IMAGE_ICO = "image/x-icon",
|
|
251
|
+
IMAGE_AVIF = "image/avif",
|
|
252
|
+
APPLICATION_PDF = "application/pdf",
|
|
253
|
+
TEXT_PLAIN = "text/plain",
|
|
254
|
+
TEXT_CSV = "text/csv",
|
|
255
|
+
APPLICATION_RTF = "application/rtf",
|
|
256
|
+
APPLICATION_MSWORD = "application/msword",
|
|
257
|
+
APPLICATION_DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
258
|
+
APPLICATION_MSEXCEL = "application/vnd.ms-excel",
|
|
259
|
+
APPLICATION_XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
260
|
+
APPLICATION_MSPOWERPOINT = "application/vnd.ms-powerpoint",
|
|
261
|
+
APPLICATION_PPTX = "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
262
|
+
APPLICATION_ODT = "application/vnd.oasis.opendocument.text",
|
|
263
|
+
APPLICATION_ODS = "application/vnd.oasis.opendocument.spreadsheet",
|
|
264
|
+
APPLICATION_ODP = "application/vnd.oasis.opendocument.presentation",
|
|
265
|
+
APPLICATION_XML = "application/xml",
|
|
266
|
+
TEXT_XML = "text/xml",
|
|
267
|
+
TEXT_HTML = "text/html",
|
|
268
|
+
TEXT_CSS = "text/css",
|
|
269
|
+
APPLICATION_JSON = "application/json",
|
|
270
|
+
TEXT_JAVASCRIPT = "text/javascript",
|
|
271
|
+
APPLICATION_ZIP = "application/zip",
|
|
272
|
+
APPLICATION_GZIP = "application/gzip",
|
|
273
|
+
APPLICATION_RAR = "application/vnd.rar",
|
|
274
|
+
APPLICATION_7Z = "application/x-7z-compressed",
|
|
275
|
+
AUDIO_MPEG = "audio/mpeg",
|
|
276
|
+
AUDIO_WAV = "audio/wav",
|
|
277
|
+
AUDIO_OGG = "audio/ogg",
|
|
278
|
+
AUDIO_WEBM = "audio/webm",
|
|
279
|
+
AUDIO_AAC = "audio/aac",
|
|
280
|
+
VIDEO_MP4 = "video/mp4",
|
|
281
|
+
VIDEO_MPEG = "video/mpeg",
|
|
282
|
+
VIDEO_OGG = "video/ogg",
|
|
283
|
+
VIDEO_WEBM = "video/webm",
|
|
284
|
+
VIDEO_QUICKTIME = "video/quicktime"
|
|
285
|
+
}
|
|
286
|
+
declare enum FileContentType {
|
|
287
|
+
'application/octet-stream' = "APPLICATION_OCTET_STREAM",
|
|
288
|
+
'image/jpeg' = "IMAGE_JPEG",
|
|
289
|
+
'image/jpg' = "IMAGE_JPG",
|
|
290
|
+
'image/png' = "IMAGE_PNG",
|
|
291
|
+
'image/gif' = "IMAGE_GIF",
|
|
292
|
+
'image/webp' = "IMAGE_WEBP",
|
|
293
|
+
'image/svg+xml' = "IMAGE_SVG",
|
|
294
|
+
'image/bmp' = "IMAGE_BMP",
|
|
295
|
+
'image/tiff' = "IMAGE_TIFF",
|
|
296
|
+
'image/x-icon' = "IMAGE_ICO",
|
|
297
|
+
'image/avif' = "IMAGE_AVIF",
|
|
298
|
+
'application/pdf' = "APPLICATION_PDF",
|
|
299
|
+
'text/plain' = "TEXT_PLAIN",
|
|
300
|
+
'text/csv' = "TEXT_CSV",
|
|
301
|
+
'application/rtf' = "APPLICATION_RTF",
|
|
302
|
+
'application/msword' = "APPLICATION_MSWORD",
|
|
303
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document' = "APPLICATION_DOCX",
|
|
304
|
+
'application/vnd.ms-excel' = "APPLICATION_MSEXCEL",
|
|
305
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' = "APPLICATION_XLSX",
|
|
306
|
+
'application/vnd.ms-powerpoint' = "APPLICATION_MSPOWERPOINT",
|
|
307
|
+
'application/vnd.openxmlformats-officedocument.presentationml.presentation' = "APPLICATION_PPTX",
|
|
308
|
+
'application/vnd.oasis.opendocument.text' = "APPLICATION_ODT",
|
|
309
|
+
'application/vnd.oasis.opendocument.spreadsheet' = "APPLICATION_ODS",
|
|
310
|
+
'application/vnd.oasis.opendocument.presentation' = "APPLICATION_ODP",
|
|
311
|
+
'application/xml' = "APPLICATION_XML",
|
|
312
|
+
'text/xml' = "TEXT_XML",
|
|
313
|
+
'text/html' = "TEXT_HTML",
|
|
314
|
+
'text/css' = "TEXT_CSS",
|
|
315
|
+
'application/json' = "APPLICATION_JSON",
|
|
316
|
+
'text/javascript' = "TEXT_JAVASCRIPT",
|
|
317
|
+
'application/zip' = "APPLICATION_ZIP",
|
|
318
|
+
'application/gzip' = "APPLICATION_GZIP",
|
|
319
|
+
'application/vnd.rar' = "APPLICATION_RAR",
|
|
320
|
+
'application/x-7z-compressed' = "APPLICATION_7Z",
|
|
321
|
+
'audio/mpeg' = "AUDIO_MPEG",
|
|
322
|
+
'audio/wav' = "AUDIO_WAV",
|
|
323
|
+
'audio/ogg' = "AUDIO_OGG",
|
|
324
|
+
'audio/webm' = "AUDIO_WEBM",
|
|
325
|
+
'audio/aac' = "AUDIO_AAC",
|
|
326
|
+
'video/mp4' = "VIDEO_MP4",
|
|
327
|
+
'video/mpeg' = "VIDEO_MPEG",
|
|
328
|
+
'video/ogg' = "VIDEO_OGG",
|
|
329
|
+
'video/webm' = "VIDEO_WEBM",
|
|
330
|
+
'video/quicktime' = "VIDEO_QUICKTIME"
|
|
331
|
+
}
|
|
10
332
|
|
|
11
333
|
declare const _default$8: react.MemoExoticComponent<({ helperText, disabled, isError }: HelperTextProps) => react_jsx_runtime.JSX.Element | null>;
|
|
12
334
|
|
|
@@ -14,6 +336,21 @@ declare const _default$7: react.MemoExoticComponent<({ thumbnail, files, onRemov
|
|
|
14
336
|
|
|
15
337
|
declare const _default$6: react.MemoExoticComponent<({ file, aspectRatio, isUploading, isLoading, onLoading, cropSize, maxWidth, maxHeight, }: SingleFilePreviewProps) => react_jsx_runtime.JSX.Element | null>;
|
|
16
338
|
|
|
339
|
+
type FileThumbnailProps = StackProps & {
|
|
340
|
+
tooltip?: boolean;
|
|
341
|
+
file: ExtendFile;
|
|
342
|
+
imageView?: boolean;
|
|
343
|
+
sx?: SxProps<Theme>;
|
|
344
|
+
onDownload?: () => void;
|
|
345
|
+
onRemove?: () => void;
|
|
346
|
+
slotProps?: {
|
|
347
|
+
img?: SxProps<Theme>;
|
|
348
|
+
icon?: SxProps<Theme>;
|
|
349
|
+
removeBtn?: SxProps<Theme>;
|
|
350
|
+
downloadBtn?: SxProps<Theme>;
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
|
|
17
354
|
declare const fileThumbnailClasses: {
|
|
18
355
|
root: string;
|
|
19
356
|
img: string;
|
|
@@ -30,6 +367,17 @@ declare function fileNameByUrl(fileUrl: string): string | undefined;
|
|
|
30
367
|
|
|
31
368
|
declare const useDropzoneUploader: ({ onFilesSelect, onFileSelect, onReorder, onRemove, uploadFiles, filesPreview, dropzoneOptions, enableCrop, customAspectRatio, convertToWebp, cropSize, maxFiles, compressionQuality, maxCompressedWidth, maxCompressedHeight, }: UseDropzoneUploaderProps) => UseDropzoneUploaderReturn;
|
|
32
369
|
|
|
370
|
+
declare const useFileUploadService: ({ createFilesMutation, filesDetails, }: FileUploadProps) => {
|
|
371
|
+
setFilesPreview: react.Dispatch<react.SetStateAction<ExtendFile[]>>;
|
|
372
|
+
uploadFiles: (files: File[]) => Promise<ExtendFile[] | undefined>;
|
|
373
|
+
filesPreview: ExtendFile[];
|
|
374
|
+
filePreview: ExtendFile;
|
|
375
|
+
isLoadingPreview: boolean;
|
|
376
|
+
isUploadingFiles: boolean;
|
|
377
|
+
isUploadOrLoadingFiles: boolean;
|
|
378
|
+
uploadErrorText: string;
|
|
379
|
+
};
|
|
380
|
+
|
|
33
381
|
declare const _default$5: react.MemoExoticComponent<({ onRemove, onReorder, onFilesSelect, createFilesMutation, filesDetails, id, disabled, error, helperText, thumbnail, dropZoneSxProps, uploading, tabIndex, maxFiles, placeholderAlt, placeholderProps, ...other }: MultiFileUploadProps) => react_jsx_runtime.JSX.Element>;
|
|
34
382
|
|
|
35
383
|
declare const _default$4: react.MemoExoticComponent<({ onRemove, onReorder, onFilesSelect, createFilesMutation, filesDetails, id, disabled, error, helperText, dropZoneSxProps, placeholderProps, placeholderAlt, uploading, tabIndex, maxFiles, aspectRatio: customAspectRatio, enableCrop, convertToWebp, cropSize, name, label: customLabel, ...other }: MultiImageUploadProps) => react_jsx_runtime.JSX.Element>;
|
|
@@ -48,4 +396,4 @@ declare const compressImageWithoutCrop: (file: File, quality?: number, maxWidth?
|
|
|
48
396
|
declare const getFileNameFromContentDisposition: (contentDisposition: string) => string;
|
|
49
397
|
declare const encodeFilenameForHeader: (filename: string) => string;
|
|
50
398
|
|
|
51
|
-
export { FileThumbnail, FileThumbnailProps, _default$8 as HelperText, HelperTextProps, _default$7 as MultiFilePreview, MultiFilePreviewProps, MultiFileUploadProps, MultiImageUploadProps, _default$5 as MultipleFileUpload, _default$4 as MultipleImageUpload, _default$6 as SingleFilePreview, SingleFilePreviewProps, _default$3 as SingleFileUpload, SingleFileUploadProps, _default$2 as SingleImageUpload, SingleImageUploadProps, _default$1 as UploadAvatar, _default as UploadSimpleBox, UseDropzoneUploaderProps, UseDropzoneUploaderReturn, compressImageWithoutCrop, convertToWebP, encodeFilenameForHeader, fileFormat, fileNameByUrl, fileThumb, fileThumbnailClasses, fileTypeByUrl, getFileNameFromContentDisposition, isImageFile, useDropzoneUploader };
|
|
399
|
+
export { ContentType, CreateFilesMutation, CropSize, DropZoneProps, ExtendFile, FileContentType, FileCreateRequest, FileCreateResponse, FileDetails, FileGetResponse, FileQueryRequest, FileQueryResponse, FileThumbnail, FileThumbnailProps, FileUpload, FileUploadProps, _default$8 as HelperText, HelperTextProps, LoadingPreviewImageProps, _default$7 as MultiFilePreview, MultiFilePreviewProps, MultiFileUploadProps, MultiImageUploadProps, _default$5 as MultipleFileUpload, _default$4 as MultipleImageUpload, PlaceholderProps, RejectionFilesProps, _default$6 as SingleFilePreview, SingleFilePreviewProps, _default$3 as SingleFileUpload, SingleFileUploadProps, _default$2 as SingleImageUpload, SingleImageUploadProps, SortableItemProps, StyledDropZoneProps, StyledDropZonePropsType, ThumbnailBadgeProps, _default$1 as UploadAvatar, _default as UploadSimpleBox, UseDropzoneUploaderProps, UseDropzoneUploaderReturn, compressImageWithoutCrop, convertToWebP, encodeFilenameForHeader, fileFormat, fileNameByUrl, fileThumb, fileThumbnailClasses, fileTypeByUrl, getFileNameFromContentDisposition, isImageFile, useDropzoneUploader, useFileUploadService };
|