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