@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.
Files changed (59) hide show
  1. package/dist/{chunk-VGB7HPN6.js → chunk-EPSIFEA7.js} +1 -1
  2. package/dist/{chunk-PF7OFL6X.js → chunk-G2EXNBOF.js} +1 -1
  3. package/dist/components/ActionButton/index.js +1 -1
  4. package/dist/components/Autocomplete/index.js +1 -1
  5. package/dist/components/AvatarButton/index.js +5 -5
  6. package/dist/components/BuilderLayout/index.js +1 -1
  7. package/dist/components/BuilderSidebar/index.js +1 -1
  8. package/dist/components/Common/index.js +3 -3
  9. package/dist/components/DataView/index.js +2 -2
  10. package/dist/components/DragButton/index.js +1 -1
  11. package/dist/components/Drawer/index.js +1 -1
  12. package/dist/components/EasyCropModal/index.js +1 -1
  13. package/dist/components/Error/index.js +1 -1
  14. package/dist/components/ExpandableGroup/index.js +1 -1
  15. package/dist/components/FileUpload/index.d.ts +356 -8
  16. package/dist/components/FileUpload/index.js +12 -14
  17. package/dist/components/FrameSkeleton/index.js +1 -1
  18. package/dist/components/HelpButton/index.js +1 -1
  19. package/dist/components/Icon/index.js +1 -1
  20. package/dist/components/IconButton/index.js +1 -1
  21. package/dist/components/ImageCropModal/index.js +1 -1
  22. package/dist/components/Incrementer/index.js +1 -1
  23. package/dist/components/InfoCircle/index.js +1 -1
  24. package/dist/components/ListBundles/index.js +1 -1
  25. package/dist/components/MenuItem/index.js +1 -1
  26. package/dist/components/Modal/index.js +1 -1
  27. package/dist/components/MoreMenu/index.js +1 -1
  28. package/dist/components/PasswordRules/index.js +1 -1
  29. package/dist/components/PopoverSelect/index.js +1 -1
  30. package/dist/components/SearchInput/index.js +1 -1
  31. package/dist/components/SelectableCards/index.js +1 -1
  32. package/dist/components/SeoPreview/index.js +1 -1
  33. package/dist/components/StateDisplay/index.js +1 -1
  34. package/dist/components/Steps/index.js +1 -1
  35. package/dist/components/StyledTab/index.js +1 -1
  36. package/dist/components/SwapList/index.js +1 -1
  37. package/dist/components/ToggleTheme/index.js +4 -4
  38. package/dist/components/WebhookCard/index.js +1 -1
  39. package/dist/components/carousel/index.js +1 -1
  40. package/dist/components/form/Address/index.js +2 -2
  41. package/dist/components/form/Autocomplete/index.js +1 -1
  42. package/dist/components/form/Incrementer/index.js +1 -1
  43. package/dist/components/form/Password/index.js +1 -1
  44. package/dist/components/form/SelectableCards/index.js +1 -1
  45. package/dist/components/form/UploadAvatarWithCrop/index.js +1 -1
  46. package/dist/components/form/UploadWithCrop/index.js +1 -1
  47. package/dist/components/form/Webhook/index.js +1 -1
  48. package/dist/components/lightbox/index.js +1 -1
  49. package/dist/components/table/index.js +1 -1
  50. package/dist/components/upload/index.js +1 -1
  51. package/dist/hooks/useThemeToggle.js +3 -3
  52. package/dist/index.js +3 -3
  53. package/dist/theme/theme-provider.js +2 -2
  54. package/package.json +1 -1
  55. package/dist/chunk-ORQNUG2V.js +0 -6
  56. package/dist/components/FileUpload/hooks/useFileUploadService.d.ts +0 -7
  57. package/dist/components/FileUpload/hooks/useFileUploadService.js +0 -2
  58. package/dist/useFileUploadService-1a2d0cf5.d.ts +0 -358
  59. package/dist/{chunk-L4KD6JF2.js → chunk-CASOITDH.js} +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.6.95",
3
+ "version": "2.6.96",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",
@@ -1,6 +0,0 @@
1
- import { a } from './chunk-GFJT57TO.js';
2
- import { useState, useMemo, useCallback, useRef, useEffect } from 'react';
3
-
4
- var M=(o=>(o.APPLICATION_OCTET_STREAM="application/octet-stream",o.IMAGE_JPEG="image/jpeg",o.IMAGE_JPG="image/jpg",o.IMAGE_PNG="image/png",o.IMAGE_GIF="image/gif",o.IMAGE_WEBP="image/webp",o.IMAGE_SVG="image/svg+xml",o.IMAGE_BMP="image/bmp",o.IMAGE_TIFF="image/tiff",o.IMAGE_ICO="image/x-icon",o.IMAGE_AVIF="image/avif",o.APPLICATION_PDF="application/pdf",o.TEXT_PLAIN="text/plain",o.TEXT_CSV="text/csv",o.APPLICATION_RTF="application/rtf",o.APPLICATION_MSWORD="application/msword",o.APPLICATION_DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",o.APPLICATION_MSEXCEL="application/vnd.ms-excel",o.APPLICATION_XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",o.APPLICATION_MSPOWERPOINT="application/vnd.ms-powerpoint",o.APPLICATION_PPTX="application/vnd.openxmlformats-officedocument.presentationml.presentation",o.APPLICATION_ODT="application/vnd.oasis.opendocument.text",o.APPLICATION_ODS="application/vnd.oasis.opendocument.spreadsheet",o.APPLICATION_ODP="application/vnd.oasis.opendocument.presentation",o.APPLICATION_XML="application/xml",o.TEXT_XML="text/xml",o.TEXT_HTML="text/html",o.TEXT_CSS="text/css",o.APPLICATION_JSON="application/json",o.TEXT_JAVASCRIPT="text/javascript",o.APPLICATION_ZIP="application/zip",o.APPLICATION_GZIP="application/gzip",o.APPLICATION_RAR="application/vnd.rar",o.APPLICATION_7Z="application/x-7z-compressed",o.AUDIO_MPEG="audio/mpeg",o.AUDIO_WAV="audio/wav",o.AUDIO_OGG="audio/ogg",o.AUDIO_WEBM="audio/webm",o.AUDIO_AAC="audio/aac",o.VIDEO_MP4="video/mp4",o.VIDEO_MPEG="video/mpeg",o.VIDEO_OGG="video/ogg",o.VIDEO_WEBM="video/webm",o.VIDEO_QUICKTIME="video/quicktime",o))(M||{}),R=(e=>(e["application/octet-stream"]="APPLICATION_OCTET_STREAM",e["image/jpeg"]="IMAGE_JPEG",e["image/jpg"]="IMAGE_JPG",e["image/png"]="IMAGE_PNG",e["image/gif"]="IMAGE_GIF",e["image/webp"]="IMAGE_WEBP",e["image/svg+xml"]="IMAGE_SVG",e["image/bmp"]="IMAGE_BMP",e["image/tiff"]="IMAGE_TIFF",e["image/x-icon"]="IMAGE_ICO",e["image/avif"]="IMAGE_AVIF",e["application/pdf"]="APPLICATION_PDF",e["text/plain"]="TEXT_PLAIN",e["text/csv"]="TEXT_CSV",e["application/rtf"]="APPLICATION_RTF",e["application/msword"]="APPLICATION_MSWORD",e["application/vnd.openxmlformats-officedocument.wordprocessingml.document"]="APPLICATION_DOCX",e["application/vnd.ms-excel"]="APPLICATION_MSEXCEL",e["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]="APPLICATION_XLSX",e["application/vnd.ms-powerpoint"]="APPLICATION_MSPOWERPOINT",e["application/vnd.openxmlformats-officedocument.presentationml.presentation"]="APPLICATION_PPTX",e["application/vnd.oasis.opendocument.text"]="APPLICATION_ODT",e["application/vnd.oasis.opendocument.spreadsheet"]="APPLICATION_ODS",e["application/vnd.oasis.opendocument.presentation"]="APPLICATION_ODP",e["application/xml"]="APPLICATION_XML",e["text/xml"]="TEXT_XML",e["text/html"]="TEXT_HTML",e["text/css"]="TEXT_CSS",e["application/json"]="APPLICATION_JSON",e["text/javascript"]="TEXT_JAVASCRIPT",e["application/zip"]="APPLICATION_ZIP",e["application/gzip"]="APPLICATION_GZIP",e["application/vnd.rar"]="APPLICATION_RAR",e["application/x-7z-compressed"]="APPLICATION_7Z",e["audio/mpeg"]="AUDIO_MPEG",e["audio/wav"]="AUDIO_WAV",e["audio/ogg"]="AUDIO_OGG",e["audio/webm"]="AUDIO_WEBM",e["audio/aac"]="AUDIO_AAC",e["video/mp4"]="VIDEO_MP4",e["video/mpeg"]="VIDEO_MPEG",e["video/ogg"]="VIDEO_OGG",e["video/webm"]="VIDEO_WEBM",e["video/quicktime"]="VIDEO_QUICKTIME",e))(R||{});var Z=e=>e.startsWith("image/"),B=(e,s=.8)=>new Promise((l,p)=>{let P=document.createElement("canvas"),u=P.getContext("2d"),r=new Image;r.onload=()=>{P.width=r.width,P.height=r.height,u?(u.drawImage(r,0,0),P.toBlob(a=>{if(a){let g=new File([a],e.name.replace(/\.[^/.]+$/,".webp"),{type:"image/webp",lastModified:Date.now()});l(g);}else p(new Error("Falha ao converter para WebP"));},"image/webp",s)):p(new Error("N\xE3o foi poss\xEDvel obter contexto do canvas"));},r.onerror=()=>p(new Error("Falha ao carregar imagem")),r.src=URL.createObjectURL(e);}),H=(e,s=.8,l,p)=>new Promise((P,u)=>{let r=document.createElement("canvas"),a=r.getContext("2d"),g=new Image;g.onload=()=>{let{width:d,height:n}=g;l&&d>l&&(n=n*l/d,d=l),p&&n>p&&(d=d*p/n,n=p),r.width=d,r.height=n,a?(a.imageSmoothingEnabled=!0,a.imageSmoothingQuality="high",a.drawImage(g,0,0,d,n),r.toBlob(E=>{if(E){let _=new File([E],e.name.replace(/\.[^/.]+$/,".webp"),{type:"image/webp",lastModified:Date.now()});P(_);}else u(new Error("Falha ao comprimir imagem"));},"image/webp",s)):u(new Error("N\xE3o foi poss\xEDvel obter contexto do canvas"));},g.onerror=()=>u(new Error("Falha ao carregar imagem")),g.src=URL.createObjectURL(e);}),N=e=>{let s=e.match(/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i);return s?.[1]||s?.[2]||""},G=e=>`UTF-8''${encodeURIComponent(e)}`;var j=({createFilesMutation:e,filesDetails:s})=>{let{showErrorMessage:l}=a(),[p,P]=useState(!1),[u,r]=useState(!1),[a$1,g]=useState(null),[d,n]=useState([]),E=useMemo(()=>d?.[0],[d]),_=u||p,w=useCallback(async I=>{if(!I.length){n([]),r(!1);return}r(!0);try{let c=(await Promise.all(I.map(async({url:A,id:b,name:F})=>{try{if(!A)return null;let i=await fetch(A);if(!i.ok)throw new Error(i.statusText);let t=await i.blob(),m=null;if(!F){let S=i.headers.get("content-disposition")||void 0;if(S){let h=N(S);if(h)try{m=decodeURIComponent(h);}catch{m=h;}}}let x=m||F||b,O=new File([t],x,{type:t.type});return O.id=b,O.url=A,O}catch{return null}}))).filter(Boolean);n(c),r(!1);}catch(f){l(f,"Erro ao carregar arquivos"),n([]),r(!1);}},[l]),D=useRef("");useEffect(()=>{let I=s?.map(({id:f})=>f).join(",")||"";I!==D.current&&(async()=>(D.current=I,await w(s)))();},[s,w]);let z=async I=>{if(!I||!Array.isArray(I))throw new Error("Arquivos inv\xE1lidos");let f=I.filter(c=>c instanceof File);if(f?.length){P(!0);try{let c=f.map(i=>{let t=i.type||"application/octet-stream",m=R[t];if(!m)throw new Error(`Tipo de arquivo n\xE3o suportado: ${t}`);return {file:i,mimeType:t,contentTypeEnum:m}}),A=await e({files:c.map(({file:i,contentTypeEnum:t})=>({content_type:t,name:i.name}))}).unwrap(),b=A.files.map((i,t)=>{let m=c[t].file,x=m;return x.id=i.id,x.url=URL.createObjectURL(m),x});return await(await Promise.all(A.files.map((i,t)=>{let{mimeType:m}=c[t],x=b[t];return fetch(i.url,{method:"PUT",headers:{"Content-Type":m,"Content-Disposition":`inline; filename*=${G(x.name)}`,"X-File-Id":i.id},body:x})}))).forEach(async i=>{if(!i.ok)throw new Error("Erro no upload do arquivo.")}),b}catch(c){throw g(c),l(c,"Erro no upload"),c}finally{P(!1);}}},T=useMemo(()=>a$1&&a$1 instanceof Error?a$1.message:a$1,[a$1]);return {setFilesPreview:n,uploadFiles:z,filesPreview:d,filePreview:E,isLoadingPreview:u,isUploadingFiles:p,isUploadOrLoadingFiles:_,uploadErrorText:T}},ee=j;
5
-
6
- export { Z as a, B as b, H as c, N as d, G as e, M as f, R as g, ee as h };
@@ -1,7 +0,0 @@
1
- import 'react';
2
- export { u as default } from '../../../useFileUploadService-1a2d0cf5.js';
3
- import 'react-dropzone';
4
- import 'react-easy-crop';
5
- import '@dnd-kit/core';
6
- import '@mui/material/Stack';
7
- import '@mui/material/styles';
@@ -1,2 +0,0 @@
1
- export { h as default } from '../../../chunk-ORQNUG2V.js';
2
- import '../../../chunk-GFJT57TO.js';
@@ -1,358 +0,0 @@
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 };
@@ -1,9 +1,9 @@
1
1
  import { a } from './chunk-SO64ZYQB.js';
2
- import { a as a$7 } from './chunk-GUFT6XPG.js';
3
2
  import { c, b as b$1 } from './chunk-FT5VGKNM.js';
4
3
  import { a as a$1, e } from './chunk-KHS3U6GK.js';
5
4
  import { a as a$3, b } from './chunk-DXGMZFNS.js';
6
5
  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';