@zydon/common 2.8.17 → 2.8.18
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-ZLLJ2NCY.js +35 -0
- package/dist/chunk-ZLLJ2NCY.js.map +1 -0
- package/dist/components/FileUpload/index.d.ts +5 -4
- package/dist/components/FileUpload/index.js +1 -1
- package/dist/components/form/FileUpload/index.d.ts +1 -1
- package/dist/components/form/FileUpload/index.js +1 -1
- package/dist/{types-9a354a30.d.ts → types-5c87e7bf.d.ts} +2 -1
- package/package.json +1 -1
- package/dist/chunk-4FDXL2WQ.js +0 -35
- package/dist/chunk-4FDXL2WQ.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/FileUpload/components/HelperText.tsx","../src/components/FileUpload/components/MultiFilePreview.tsx","../src/components/FileUpload/components/SortableFile.tsx","../src/components/FileUpload/styles.ts","../src/components/FileUpload/components/ThumbnailBadge.tsx","../src/components/FileUpload/components/SingleFilePreview.tsx","../src/components/FileUpload/components/LoadingPreviewImage.tsx","../src/components/FileUpload/FileThumbnail/index.tsx","../src/components/FileUpload/FileThumbnail/utils.ts","../src/components/FileUpload/hooks/useDropzoneUploader.ts","../src/components/FileUpload/utils.ts","../src/components/FileUpload/hooks/useFileUploadService.ts","../src/components/FileUpload/props.ts","../src/components/FileUpload/MultipleFileUpload.tsx","../src/components/FileUpload/components/DropZone.tsx","../src/components/FileUpload/components/DropZonePlaceholder.tsx","../src/assets/illustrations/UploadIllustration.tsx","../src/assets/illustrations/BackgroundShape.tsx","../src/components/FileUpload/MultipleImageUpload.tsx","../src/components/FileUpload/SingleFileUpload.tsx","../src/components/FileUpload/SingleImageUpload.tsx","../src/components/FileUpload/UploadAvatar.tsx","../src/components/FileUpload/UploadSimpleBox.tsx"],"names":["memo","FormHelperText","jsx","HelperText","helperText","disabled","isError","theme","HelperText_default","useCallback","useState","closestCenter","DndContext","KeyboardSensor","PointerSensor","useSensor","useSensors","restrictToHorizontalAxis","restrictToParentElement","restrictToWindowEdges","horizontalListSortingStrategy","SortableContext","sortableKeyboardCoordinates","AnimatePresence","useSortable","CSS","Stack","Typography","Box","IconButtonMui","Paper","alpha","styled","m","Container","Actions","StyledDropZone","prop","isDragActive","CloseIconButton","DragWrapper","FrameFileThumbnail","width","isDragging","FrameImageThumbnail","DeleteButton","IconButton_default","BoxUpload","hasError","SingleFilePreviewBox","SingleFilePreviewImg","aspectRatio","maxWidth","maxHeight","isLoading","isUploading","fill","SingleFilePreviewBlurImg","SingleFilePreviewHoverOverlay","AvatarContainer","RejectionFilesPaper","UploadPlaceholder","hasFile","PlaceholderLoading","PlaceholderUploadImageAltBox","UploadAvatarBox","ImagePreview","ActionsIconButton","Badge","jsxs","ThumbnailBadge","onRemove","sx","file","disableDrag","attributes","listeners","innerWidth","id","varFade","DragButton_default","FileThumbnail","ThumbnailBadge_default","SortableFile","thumbnail","disableTransitions","size","name","isNotFormatFile","setNodeRef","transform","transition","style","Tooltip_default","fData","SortableFile_default","MultiFilePreview","files","onReorder","setDisableTransitions","sensors","handleDragEnd","event","active","over","oldIndex","newIndex","sortableFile","MultiFilePreview_default","useRef","forwardRef","useLayoutEffect","useMemo","LoadingPreviewImage","onLoading","cropSize","props","imageRef","useMount_default","handleFinish","LoadingPreviewImage_default","SingleFilePreview","hoverAlt","fileId","fileName","previewUrl","SingleFilePreview_default","ButtonBase","IconButton","Tooltip","FORMAT_PDF","FORMAT_TEXT","FORMAT_PHOTOSHOP","FORMAT_WORD","FORMAT_EXCEL","FORMAT_ZIP","FORMAT_ILLUSTRATOR","FORMAT_POWERPOINT","FORMAT_AUDIO","FORMAT_IMG","FORMAT_VIDEO","fileFormatByMimeType","mimeType","fileFormatByName","formatByMime","extension","fileTypeByUrl","fileFormat","fileUrl","fileThumb","thumb","fileNameByUrl","fileThumbnailClasses","tooltip","imageView","slotProps","onDownload","other","format","renderImg","renderIcon","Icon_default","renderContent","useEffect","useDropzone","isImageFile","convertToWebP","quality","resolve","reject","canvas","ctx","img","blob","webpFile","compressImageWithoutCrop","height","compressedFile","getFileNameFromContentDisposition","contentDisposition","match","encodeFilenameForHeader","filename","useDropzoneUploader","onFilesSelect","onFileSelect","uploadFiles","filesPreview","dropzoneOptions","enableCrop","customAspectRatio","convertToWebp","maxFiles","compressionQuality","maxCompressedWidth","maxCompressedHeight","showErrorMessage","useApiMessage_default","internalFiles","setInternalFiles","cropModalOpen","setCropModalOpen","originalImage","setOriginalImage","croppedAreaPixels","setCroppedAreaPixels","imagePreview","setImagePreview","cropLoading","setCropLoading","pendingImages","setPendingImages","currentImageIndex","setCurrentImageIndex","totalPendingImages","setTotalPendingImages","processNextImage","images","nextImageData","prev","reader","onCropInitialized","_croppedArea","createCroppedImage","x","y","ratio","finalWidth","finalHeight","croppedFile","error","extendedFile","handleCropSave","currentImageData","croppedImage","remainingImages","handleCropCancel","onDrop","acceptedFiles","isImageUpload","key","totalFiles","imageFilesWithTempIds","index","processedFiles","handleDropRejected","fileRejections","errorCode","maxSizeInBytes","getRootProps","getInputProps","isDragReject","handleRemove","fileToRemove","newFiles","handleReorder","filesIdRef","idRef","useDropzoneUploader_default","ContentType","FileContentType","useFileUploadService","createFilesMutation","filesDetails","isUploadingFiles","setIsUploadingFiles","isLoadingPreview","setIsLoadingPreview","uploadFilesError","setUploadFilesError","setFilesPreview","filePreview","isUploadOrLoadingFiles","fetchFiles","details","validFiles","url","response","nameFromDisposition","previewFile","filesUrlRef","urlKey","filesWithContentType","contentTypeEnum","createResponse","extendedFiles","responseFile","originalFile","uploadErrorText","invalidFiles","preview","useFileUploadService_default","DropZone","tabIndex","uploading","dropZoneSxProps","dropZoneContent","children","FixedProgressBar_default","DropZone_default","useTheme","useId","Fragment","BackgroundShape","gradientId","PRIMARY_MAIN","UploadIllustration","hideBackground","PRIMARY_DARK","PRIMARY_DARKER","UploadIllustration_default","DropZonePlaceholder","header","description","DropZonePlaceholder_default","MultipleFileUpload","placeholderAlt","placeholderProps","dropzoneProps","hasFiles","MultipleFileUpload_default","MultipleImageUpload","customLabel","keepInvalidFiles","originalFiles","cropState","fakeInvalidFiles","label","labelText","labelProcessing","EasyCropModal_default","MultipleImageUpload_default","SingleFileUpload","fileDetails","onRemoveFile","e","SingleFileUpload_default","SingleImageUpload","imagePreviewLoading","setImagePreviewLoading","hidePlaceholder","dropZoneSxWidth","SingleImageUpload_default","CircularProgress","UploadAvatar","maxSize","canRemove","imgSrc","loadedFileKey","objectUrl","handleImageLoad","handleClick","UploadAvatar_default","UploadBox","UploadSimpleBox_default"],"mappings":"yZAAA,OAAS,QAAAA,OAAY,QACrB,OAAOC,OAAoB,+BAQvB,cAAAC,OAAA,oBAJJ,IAAMC,GAAa,CAAC,CAAE,WAAAC,EAAY,SAAAC,EAAU,QAAAC,CAAQ,IAC7CF,EAGHF,GAACD,GAAA,CACC,MAAOK,EACP,GAAIC,IAAU,CACZ,GAAI,OACJ,MAAOF,EAAWE,EAAM,QAAQ,KAAK,GAAG,EAAI,MAC9C,GAEC,SAAAH,EACH,EAXsB,KAenBI,EAAQR,GAAKG,EAAU,ECrB9B,OAAS,QAAAH,GAAM,eAAAS,GAAa,YAAAC,OAAgB,QAC5C,OACE,iBAAAC,GACA,cAAAC,GAEA,kBAAAC,GACA,iBAAAC,GAEA,aAAAC,GACA,cAAAC,OACK,gBACP,OACE,4BAAAC,GACA,2BAAAC,GACA,yBAAAC,OACK,qBACP,OACE,iCAAAC,GACA,mBAAAC,GACA,+BAAAC,OACK,oBACP,OAAS,mBAAAC,OAAuB,gBCrBhC,OAAS,QAAAvB,OAAY,QACrB,OAAS,eAAAwB,OAAmB,oBAC5B,OAAS,OAAAC,OAAW,qBACpB,OAAOC,OAAW,sBAClB,OAAOC,OAAgB,2BCJvB,OAAOC,OAAS,oBAChB,OAAOC,OAAmB,2BAC1B,OAAOC,OAAW,sBAClB,OAAOJ,OAAW,sBAClB,OAAS,SAAAK,EAAO,UAAAC,MAAc,uBAC9B,OAA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,GAAKwV,EAAY,EC3NhC,OAAS,QAAAxV,OAAY,QACrB,OAAS,eAAAoK,OAAmB,iBAqBxB,OAQE,OAAAlK,GARF,QAAAmE,OAAA,oBAhBJ,IAAM4R,GAAY,CAAC,CACjB,MAAA3H,EACA,KAAA/I,EACA,SAAAlF,EACA,GAAAmE,EACA,GAAGqF,CACL,IAA6B,CAC3B,GAAM,CAAE,aAAA4F,EAAc,cAAAC,EAAe,aAAApN,EAAc,aAAAqN,CAAa,EAC9DvF,GAAY,CACV,SAAA/J,EACA,GAAGwJ,CACL,CAAC,EAEG7G,EAAW2M,GAAgBrB,EAEjC,OACEjK,GAACtB,GAAA,CACE,GAAG0M,EAAa,EACjB,aAAcnN,EACd,SAAU,CAAC,CAACU,EACZ,SAAU,CAAC,CAAC3C,EACZ,GAAImE,EACJ,cAAY,aAEZ,UAAAtE,GAAC,SAAM,KAAMqF,EAAO,GAAGmK,EAAc,EAAG,EAAE,sBAE5C,CAEJ,EAEOwG,GAAQlW,GAAKiW,EAAS","sourcesContent":["import { memo } from 'react';\nimport FormHelperText from '@mui/material/FormHelperText';\n\nimport { HelperTextProps } from '../props';\n\nconst HelperText = ({ helperText, disabled, isError }: HelperTextProps) => {\n if (!helperText) return null;\n\n return (\n <FormHelperText\n error={isError}\n sx={theme => ({\n mx: '14px',\n color: disabled ? theme.palette.grey[500] : undefined,\n })}\n >\n {helperText}\n </FormHelperText>\n );\n};\n\nexport default memo(HelperText);\n","import { memo, useCallback, useState } from 'react';\nimport {\n closestCenter,\n DndContext,\n DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n UniqueIdentifier,\n useSensor,\n useSensors,\n} from '@dnd-kit/core';\nimport {\n restrictToHorizontalAxis,\n restrictToParentElement,\n restrictToWindowEdges,\n} from '@dnd-kit/modifiers';\nimport {\n horizontalListSortingStrategy,\n SortableContext,\n sortableKeyboardCoordinates,\n} from '@dnd-kit/sortable';\nimport { AnimatePresence } from 'framer-motion';\n\nimport { ExtendFile, MultiFilePreviewProps } from '../props';\n\nimport SortableFile from './SortableFile';\n\nconst MultiFilePreview = ({\n thumbnail,\n files,\n onRemove,\n onReorder,\n sx,\n}: MultiFilePreviewProps) => {\n const [disableTransitions, setDisableTransitions] = useState(false);\n const sensors = useSensors(\n useSensor(PointerSensor, {\n activationConstraint: {\n distance: 8,\n },\n }),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const handleDragEnd = useCallback(\n (event: DragEndEvent) => {\n const { active, over } = event;\n\n if (!active || !over || active.id === over.id) return;\n\n if (onReorder) {\n const oldIndex = files.findIndex(\n ({ id }: ExtendFile) => id === active.id,\n );\n const newIndex = files.findIndex(\n ({ id }: ExtendFile) => id === over.id,\n );\n\n if (oldIndex !== -1 && newIndex !== -1) {\n onReorder(oldIndex, newIndex, files);\n setDisableTransitions(true);\n setTimeout(() => {\n setDisableTransitions(false);\n }, 300);\n }\n }\n },\n [files, onReorder],\n );\n\n const sortableFile = (\n <AnimatePresence initial={false}>\n {files.map((file: ExtendFile) => (\n <SortableFile\n sx={sx}\n id={`preview-file-${file.id}`}\n file={file}\n onRemove={onRemove}\n thumbnail={thumbnail}\n disableDrag={!onReorder}\n disableTransitions={disableTransitions}\n key={`preview-file-${file.id}`}\n />\n ))}\n </AnimatePresence>\n );\n\n if (!onReorder) {\n return sortableFile;\n }\n\n return (\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n modifiers={[\n restrictToHorizontalAxis,\n restrictToParentElement,\n restrictToWindowEdges,\n ]}\n >\n <SortableContext\n items={files.map((file: ExtendFile) => file.id as UniqueIdentifier)}\n strategy={horizontalListSortingStrategy}\n >\n {sortableFile}\n </SortableContext>\n </DndContext>\n );\n};\n\nexport default memo(MultiFilePreview);\n","import { memo } from 'react';\nimport { useSortable } from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\n\nimport { varFade } from 'components/animate';\nimport DragButton from 'components/DragButton';\nimport { FileThumbnail } from 'components/FileUpload';\nimport IconButton from 'components/IconButton';\nimport Tooltip from 'components/Tooltip';\nimport { fData } from 'utils/formatNumber';\n\nimport { SortableItemProps } from '../props';\nimport { Actions, DragWrapper, FrameFileThumbnail } from '../styles';\n\nimport ThumbnailBadge from './ThumbnailBadge';\n\nconst SortableFile = ({\n file,\n thumbnail,\n onRemove,\n sx,\n disableDrag = false,\n disableTransitions = false,\n}: SortableItemProps) => {\n /* istanbul ignore next */\n const size = file.size || 0;\n /* istanbul ignore next */\n const name = file.name || file.id;\n const id = file.id;\n const isNotFormatFile = typeof file === 'string';\n const innerWidth = disableDrag ? 70 : 80;\n\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isDragging,\n } = useSortable({\n id,\n disabled: disableDrag,\n });\n\n const style = {\n transform: disableTransitions\n ? undefined\n : CSS.Transform.toString(transform),\n transition: disableTransitions ? 'none' : transition,\n opacity: disableTransitions ? 0.2 : 1,\n display: 'inline-block',\n alignItems: 'center',\n justifyContent: 'center',\n width: `${innerWidth + 8}px`,\n height: '68px',\n };\n\n if (thumbnail && file) {\n return (\n <DragWrapper ref={setNodeRef} style={style}>\n <ThumbnailBadge\n innerWidth={innerWidth}\n isDragging={isDragging}\n sx={sx}\n file={file}\n disableDrag={disableDrag}\n attributes={attributes}\n listeners={listeners}\n onRemove={onRemove}\n />\n </DragWrapper>\n );\n }\n\n return (\n <DragWrapper\n ref={setNodeRef}\n style={{\n ...style,\n height: '80px',\n width: `${innerWidth + 38}px`,\n }}\n >\n <FrameFileThumbnail\n width={innerWidth + 30}\n isDragging={isDragging}\n data-testid={`preview-multi-img-${id}`}\n {...varFade().inUp}\n sx={sx}\n >\n <DragButton disableDrag={disableDrag} {...attributes} {...listeners} />\n\n {file && <FileThumbnail file={file} />}\n\n <Stack flexGrow={1} sx={{ width: '100%' }}>\n <Tooltip title={name}>\n <Typography variant=\"subtitle2\" noWrap>\n {name}\n </Typography>\n </Tooltip>\n\n <Typography variant=\"caption\" sx={{ color: 'text.secondary' }}>\n {isNotFormatFile ? '' : fData(size)}\n </Typography>\n </Stack>\n\n <Actions>\n {onRemove && (\n <IconButton\n size=\"small\"\n label=\"Remover arquivo\"\n onClick={() => onRemove(file)}\n icon=\"DELETE_MARK_BUTTON_02\"\n />\n )}\n </Actions>\n </FrameFileThumbnail>\n </DragWrapper>\n );\n};\n\nexport default memo(SortableFile);\n","import Box from '@mui/material/Box';\nimport IconButtonMui from '@mui/material/IconButton';\nimport Paper from '@mui/material/Paper';\nimport Stack from '@mui/material/Stack';\nimport { alpha, styled } from '@mui/material/styles';\nimport { m } from 'framer-motion';\n\nimport IconButton from 'components/IconButton';\n\nimport { LoadingPreviewImageProps, StyledDropZonePropsType } from './props';\n\nexport const Container = styled(Stack)({\n position: 'relative',\n width: '100%',\n borderRadius: 8,\n overflow: 'hidden',\n\n '&:hover .actions': {\n display: 'flex',\n },\n});\n\nexport const Actions = styled(Stack)({\n position: 'absolute',\n top: 4,\n right: 4,\n gap: 0.5,\n '& svg': {\n width: 16,\n height: 16,\n },\n});\n\nexport const StyledDropZone = styled(Box, {\n shouldForwardProp: prop =>\n !['isDragActive', 'isError', 'disabled'].includes(prop as string),\n})<StyledDropZonePropsType>(({ theme, isDragActive, isError, disabled }) => ({\n outline: 'none',\n cursor: 'pointer',\n overflow: 'hidden',\n position: 'relative',\n padding: theme.spacing(5),\n borderRadius: theme.shape.borderRadius,\n transition: theme.transitions.create('padding'),\n backgroundColor: theme.palette.background.neutral,\n border: `dashed 1px ${theme.palette.divider}`,\n ...(isDragActive && {\n opacity: 0.72,\n }),\n ...(isError && {\n color: theme.palette.error.main,\n backgroundColor: theme.palette.error.lighter,\n borderColor: theme.palette.error.light,\n }),\n ...(disabled && {\n opacity: 0.48,\n pointerEvents: 'none',\n }),\n '&:hover': {\n opacity: 0.72,\n },\n}));\n\nexport const CloseIconButton = styled(IconButtonMui)(({ theme }) => ({\n position: 'relative',\n zIndex: 999,\n pointerEvents: 'auto',\n color: theme.palette.grey[700],\n backgroundColor: theme.palette.grey[100],\n\n '&:hover': {\n color: theme.palette.grey[900],\n backgroundColor: theme.palette.grey[300],\n },\n}));\n\nexport const DragWrapper = styled('div')({\n position: 'relative',\n zIndex: 1,\n userSelect: 'none',\n '&:hover': {\n zIndex: 2,\n },\n});\n\nexport const FrameFileThumbnail = styled(Stack, {\n shouldForwardProp: prop => !['isDragging'].includes(prop as string),\n})<{\n width: number;\n isDragging: boolean;\n}>(({ theme, width, isDragging }) => ({\n width,\n height: 100,\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n margin: theme.spacing(0.5),\n padding: theme.spacing(2, 1, 2, 1),\n gap: theme.spacing(1),\n borderRadius: theme.spacing(1.25),\n overflow: 'hidden',\n position: 'relative',\n border: `solid 1px ${theme.palette.divider}`,\n backgroundColor: theme.palette.common.white,\n zIndex: 1,\n transition: 'box-shadow 150ms ease-in-out',\n boxShadow: !isDragging\n ? '0px 0px 0px 0px rgba(0, 0, 0, 0)'\n : `0 0 0 2px ${theme.palette.primary.main}, ${theme.customShadows.z8}, inset 0 0 0 1000px ${alpha(\n theme.palette.primary.main,\n 0.06,\n )}`,\n}));\n\nexport const FrameImageThumbnail = styled(m.div)<{\n width: number;\n isDragging: boolean;\n}>(({ theme, width, isDragging }) => ({\n width,\n height: 60,\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n margin: theme.spacing(0.5),\n padding: theme.spacing(2),\n borderRadius: theme.spacing(1.25),\n overflow: 'hidden',\n position: 'relative',\n border: `solid 1px ${theme.palette.divider}`,\n backgroundColor: theme.palette.common.white,\n zIndex: 1,\n transition: 'box-shadow 150ms ease-in-out',\n boxShadow: !isDragging\n ? '0px 0px 0px 0px rgba(0, 0, 0, 0)'\n : `0 0 0 2px ${theme.palette.primary.main}, ${theme.customShadows.z8}, inset 0 0 0 1000px ${alpha(\n theme.palette.primary.main,\n 0.06,\n )}`,\n}));\n\nexport const DeleteButton = styled(IconButton)(({ theme }) => ({\n top: 16,\n right: 16,\n zIndex: 9,\n position: 'absolute',\n color: theme.palette.common.white,\n backgroundColor: alpha(theme.palette.grey[900], 0.72),\n '&:hover': {\n backgroundColor: alpha(theme.palette.grey[900], 0.48),\n },\n}));\n\nexport const BoxUpload = styled(Box, {\n shouldForwardProp: prop =>\n prop !== 'isDragActive' && prop !== 'disabled' && prop !== 'hasError',\n})<{\n isDragActive: boolean;\n disabled: boolean;\n hasError: boolean;\n}>(({ theme, isDragActive, disabled, hasError }) => ({\n width: 64,\n height: 64,\n flexShrink: 0,\n display: 'flex',\n borderRadius: 1,\n cursor: 'pointer',\n alignItems: 'center',\n color: theme.palette.text.disabled,\n justifyContent: 'center',\n backgroundColor: alpha(theme.palette.grey[500], 0.08),\n border: `dashed 1px ${alpha(theme.palette.grey[500], 0.16)}`,\n ...(isDragActive && { opacity: 0.72 }),\n ...(disabled && { opacity: 0.48, pointerEvents: 'none' }),\n ...(hasError && {\n color: theme.palette.error.main,\n borderColor: theme.palette.error.main,\n backgroundColor: alpha(theme.palette.error.main, 0.08),\n }),\n '&:hover': { opacity: 0.72 },\n}));\n\nexport const SingleFilePreviewBox = styled(Box)(({ theme }) => ({\n padding: theme.spacing(1),\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n position: 'absolute',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n transition: 'all 0.3s ease-in-out',\n filter: 'blur(0)',\n '&:hover .single-file-preview-img': {\n filter: 'blur(3px)',\n transition: 'all 0.1s ease-in-out',\n },\n '&:hover .single-file-preview-hover-overlay': {\n opacity: 1,\n },\n}));\n\nexport const SingleFilePreviewImg = styled('img', {\n shouldForwardProp: prop =>\n prop !== 'aspectRatio' &&\n prop !== 'isLoading' &&\n prop !== 'isUploading' &&\n prop !== 'maxWidth' &&\n prop !== 'maxHeight' &&\n prop !== 'cropSize' &&\n prop !== 'fill',\n})<\n LoadingPreviewImageProps & {\n maxWidth: number | string;\n maxHeight: number | string;\n }\n>(\n ({\n theme,\n aspectRatio,\n maxWidth,\n maxHeight,\n isLoading,\n isUploading,\n fill,\n }) => ({\n borderRadius: theme.shape.borderRadius,\n objectFit: 'cover',\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%) scale(1)',\n filter: 'blur(0)',\n zIndex: 1,\n backgroundColor: theme.palette.background.paper,\n ...(fill && {\n width: '100%',\n height: '100%',\n }),\n ...(!fill &&\n Math.abs(aspectRatio) >= 1 && {\n maxWidth,\n maxHeight,\n aspectRatio: Math.abs(aspectRatio),\n width: 'calc(100% - 16px)',\n height: undefined,\n }),\n ...(!fill &&\n Math.abs(aspectRatio) < 1 && {\n maxWidth,\n maxHeight,\n aspectRatio: Math.abs(aspectRatio),\n width: undefined,\n height: 'calc(100% - 16px)',\n }),\n transition: 'all 0.3s ease-in-out',\n ...(isLoading || isUploading\n ? {\n opacity: 0,\n filter: 'blur(1.5rem)',\n transform: 'translate(-50%, -50%) scale(0.7)',\n }\n : {}),\n }),\n);\n\nexport const SingleFilePreviewBlurImg = styled('img', {\n shouldForwardProp: prop => prop !== 'isLoading' && prop !== 'isUploading',\n})<{\n isLoading?: boolean;\n isUploading?: boolean;\n}>(({ isLoading, isUploading }) => ({\n width: '100%',\n height: '100%',\n objectFit: 'cover',\n top: 0,\n left: 0,\n filter: 'blur(1.5rem)',\n transform: 'scale(1.1)',\n position: 'absolute',\n zIndex: 0,\n transition: 'opacity 0.3s ease-in-out',\n ...(isLoading && { opacity: 0 }),\n ...(isUploading && { opacity: 0.7, filter: 'blur(2rem)' }),\n}));\n\nexport const SingleFilePreviewHoverOverlay = styled(Stack)(({ theme }) => ({\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: alpha(theme.palette.primary.darker, 0.75),\n zIndex: 2,\n pointerEvents: 'none',\n opacity: 0,\n transition: 'opacity 0.3s ease-in-out',\n}));\n\nexport const AvatarContainer = styled(Stack)({\n width: '100%',\n height: '100%',\n position: 'relative',\n overflow: 'hidden',\n borderRadius: '50%',\n justifyContent: 'center',\n alignItems: 'center',\n});\n\nexport const RejectionFilesPaper = styled(Paper)(({ theme }) => ({\n py: 1,\n px: 2,\n mt: 3,\n textAlign: 'left',\n borderStyle: 'dashed',\n borderColor: 'error.main',\n backgroundColor: alpha(theme.palette.error.main, 0.08),\n}));\n\nexport const UploadPlaceholder = styled(Box, {\n shouldForwardProp: prop => prop !== 'isError' && prop !== 'hasFile',\n})<{ isError: boolean; hasFile: boolean }>(({ theme, isError, hasFile }) => ({\n top: 0,\n gap: theme.spacing(1),\n left: 0,\n width: '100%',\n height: '100%',\n zIndex: 9,\n display: 'flex',\n borderRadius: '50%',\n position: 'absolute',\n alignItems: 'center',\n color: theme.palette.text.disabled,\n flexDirection: 'column',\n justifyContent: 'center',\n backgroundColor: alpha(theme.palette.grey[500], 0.08),\n transition: theme.transitions.create(['opacity'], {\n duration: theme.transitions.duration.shorter,\n }),\n '&:hover': { opacity: 0.92 },\n ...(isError && {\n color: theme.palette.error.main,\n }),\n ...(hasFile && {\n zIndex: 9,\n opacity: 0,\n color: theme.palette.common.white,\n backgroundColor: alpha(theme.palette.common.black, 0.54),\n }),\n}));\n\nexport const PlaceholderLoading = styled(Stack)({\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n position: 'absolute',\n zIndex: 10,\n alignItems: 'center',\n justifyContent: 'center',\n opacity: 0.8,\n});\n\nexport const PlaceholderUploadImageAltBox = styled(Stack)(({ theme }) => ({\n padding: 20,\n justifyContent: 'center',\n alignItems: 'center',\n gap: 4,\n alignSelf: 'stretch',\n borderRadius: 12,\n background: theme.palette.divider,\n color: theme.palette.text.disabled,\n height: 160,\n}));\n\nexport const UploadAvatarBox = styled(Box, {\n shouldForwardProp: prop =>\n prop !== 'isDragActive' && prop !== 'isError' && prop !== 'hasFile',\n})<{\n isDragActive: boolean;\n disabled?: string;\n isError: boolean;\n hasFile: boolean;\n}>(({ theme, isDragActive, disabled, isError, hasFile }) => ({\n padding: theme.spacing(1),\n margin: 'auto',\n width: 144,\n height: 144,\n cursor: 'pointer',\n overflow: 'hidden',\n borderRadius: '50%',\n border: `1px dashed ${theme.palette.divider}`,\n ...(isDragActive && { opacity: 0.72 }),\n ...(disabled && { opacity: 0.48, pointerEvents: 'none' }),\n ...(isError && { borderColor: 'error.main' }),\n ...(hasFile && {\n ...(isError && {\n bgcolor: alpha(theme.palette.error.main, 0.08),\n }),\n '&:hover .upload-placeholder': { opacity: 1 },\n '& img': {\n filter: 'blur(0)',\n },\n '&:hover img': {\n filter: 'blur(3px)',\n },\n }),\n}));\n\nexport const ImagePreview = styled('img')({\n width: '100%',\n height: '100%',\n borderRadius: '50%',\n objectFit: 'cover',\n transition: 'all 0.3s ease-in-out',\n});\n\nexport const ActionsIconButton = styled(IconButton)<{\n icon: string;\n}>(({ theme }) => ({\n backgroundColor: alpha(theme.palette.grey[900], 0.72),\n color: theme.palette.common.white,\n '&:hover': {\n backgroundColor: alpha(theme.palette.grey[600], 0.64),\n color: theme.palette.common.white,\n },\n '& svg': {\n width: 14,\n height: 14,\n },\n}));\n","import { memo } from 'react';\nimport Badge from '@mui/material/Badge';\n\nimport { varFade } from 'components/animate';\nimport DragButton from 'components/DragButton';\nimport { FileThumbnail } from 'components/FileUpload';\n\nimport { ThumbnailBadgeProps } from '../props';\nimport { Actions, ActionsIconButton, FrameImageThumbnail } from '../styles';\n\nconst ThumbnailBadge = ({\n onRemove,\n sx,\n file,\n disableDrag,\n attributes,\n listeners,\n innerWidth,\n isDragging,\n}: ThumbnailBadgeProps) => {\n const id = file?.id;\n if (!id) return null;\n\n return (\n <Badge\n key={`badge-${id}`}\n anchorOrigin={{ vertical: 'top', horizontal: 'left' }}\n >\n <FrameImageThumbnail\n width={innerWidth}\n isDragging={isDragging}\n data-testid={`preview-multi-img-${id}`}\n {...varFade().inUp}\n sx={sx}\n >\n <DragButton disableDrag={disableDrag} {...attributes} {...listeners} />\n\n <FileThumbnail imageView file={file} />\n\n <Actions sx={{ position: 'absolute', right: 3, top: 3, zIndex: 1 }}>\n {onRemove && (\n <ActionsIconButton\n size=\"small\"\n label=\"Remover arquivo\"\n onClick={() => onRemove(file)}\n icon=\"DELETE_MARK_BUTTON_02\"\n />\n )}\n </Actions>\n </FrameImageThumbnail>\n </Badge>\n );\n};\n\nexport default memo(ThumbnailBadge);\n","import { memo, useRef } from 'react';\n\nimport type { SingleFilePreviewProps } from '../props';\nimport {\n SingleFilePreviewBlurImg,\n SingleFilePreviewBox,\n SingleFilePreviewHoverOverlay,\n} from '../styles';\n\nimport LoadingPreviewImage from './LoadingPreviewImage';\n\nconst SingleFilePreview = ({\n file,\n aspectRatio = 1,\n isUploading,\n isLoading,\n onLoading,\n cropSize,\n maxWidth,\n maxHeight,\n hoverAlt,\n fill,\n}: SingleFilePreviewProps) => {\n const imageRef = useRef<HTMLImageElement>(null);\n const fileId = file?.id || '';\n const fileName = file?.name || '';\n const previewUrl = URL.createObjectURL(file);\n\n if (!fileId) {\n return null;\n }\n\n return (\n <SingleFilePreviewBox className=\"single-file-preview-box\">\n <LoadingPreviewImage\n className=\"single-file-preview-img\"\n key={`image-preview-${fileId}`}\n aspectRatio={aspectRatio}\n cropSize={cropSize}\n isLoading={isLoading}\n isUploading={isUploading}\n alt={fileName}\n src={previewUrl}\n ref={imageRef}\n loading=\"lazy\"\n onLoading={onLoading}\n onLoad={() => onLoading?.(false)}\n onError={() => onLoading?.(false)}\n maxWidth={maxWidth}\n maxHeight={maxHeight}\n fill={fill}\n />\n <SingleFilePreviewBlurImg\n className=\"single-file-preview-bg\"\n alt={fileName}\n src={previewUrl}\n isLoading={isLoading}\n isUploading={isUploading}\n />\n\n {hoverAlt && (\n <SingleFilePreviewHoverOverlay className=\"single-file-preview-hover-overlay\">\n {hoverAlt}\n </SingleFilePreviewHoverOverlay>\n )}\n </SingleFilePreviewBox>\n );\n};\n\nexport default memo(SingleFilePreview);\n","import { forwardRef, useLayoutEffect, useMemo } from 'react';\n\nimport useMount from 'hooks/useMount';\n\nimport { LoadingPreviewImageProps } from '../props';\nimport { SingleFilePreviewImg } from '../styles';\n\n// Componente de imagem que gerencia o estado de carrisLoadingegamento e o cálculo de tamanho\nconst LoadingPreviewImage = forwardRef<\n HTMLImageElement,\n LoadingPreviewImageProps\n>(({ onLoading, aspectRatio, cropSize, ...props }, imageRef) => {\n const { maxWidth, maxHeight } = useMemo(() => {\n if (cropSize && typeof cropSize === 'object') {\n return {\n maxWidth: cropSize.width,\n maxHeight: cropSize.height,\n };\n }\n if (cropSize && typeof cropSize === 'number') {\n return {\n maxWidth: cropSize,\n maxHeight: cropSize,\n };\n }\n\n return {\n maxWidth: '100%',\n maxHeight: '100%',\n };\n }, [cropSize]);\n\n useMount(() => {\n onLoading?.(true);\n });\n\n useLayoutEffect(() => {\n if (typeof imageRef === 'object' && imageRef?.current) {\n onLoading?.(!imageRef.current.complete);\n } else {\n onLoading?.(false);\n }\n }, [imageRef, onLoading]);\n\n function handleFinish() {\n onLoading?.(false);\n }\n\n return (\n <SingleFilePreviewImg\n {...props}\n maxWidth={maxWidth}\n maxHeight={maxHeight}\n ref={imageRef}\n aspectRatio={aspectRatio}\n onLoad={handleFinish}\n onError={handleFinish}\n />\n );\n});\n\nLoadingPreviewImage.displayName = 'LoadingPreviewImage';\n\nexport default LoadingPreviewImage;\n","import Box from '@mui/material/Box';\nimport ButtonBase from '@mui/material/ButtonBase';\nimport IconButton from '@mui/material/IconButton';\nimport Stack from '@mui/material/Stack';\nimport Tooltip from '@mui/material/Tooltip';\n\nimport Icon from 'components/Icon';\nimport { Icon as IconEnum } from 'types/icon';\n\nimport type { FileThumbnailProps } from './types';\nimport { fileFormatByName, fileThumb } from './utils';\n\nexport const fileThumbnailClasses = {\n root: 'mnl__file__thumbnail__root',\n img: 'mnl__file__thumbnail__img',\n icon: 'mnl__file__thumbnail__icon',\n removeBtn: 'mnl__file__thumbnail__remove__button',\n downloadBtn: 'mnl__file__thumbnail__download__button',\n};\n\nexport const FileThumbnail = ({\n sx,\n file,\n tooltip,\n onRemove,\n imageView,\n slotProps,\n onDownload,\n ...other\n}: FileThumbnailProps) => {\n const previewUrl = file.size > 0 ? URL.createObjectURL(file) : file.url;\n const name = file?.name || '';\n const format = fileFormatByName(name, file.type);\n\n const renderImg = (\n <Box\n component=\"img\"\n src={previewUrl}\n className={fileThumbnailClasses.img}\n sx={{\n width: 1,\n height: 1,\n objectFit: 'cover',\n borderRadius: 'inherit',\n ...slotProps?.img,\n }}\n />\n );\n\n const renderIcon = (\n <Icon\n icon={fileThumb(format) as keyof typeof IconEnum}\n sx={{\n width: 32,\n height: 32,\n flexShrink: 0,\n ...sx,\n }}\n />\n );\n\n const renderContent = (\n <Stack\n component=\"span\"\n className={fileThumbnailClasses.root}\n sx={{\n width: 36,\n height: 36,\n flexShrink: 0,\n borderRadius: 1.25,\n alignItems: 'center',\n position: 'relative',\n display: 'inline-flex',\n justifyContent: 'center',\n ...sx,\n }}\n {...other}\n >\n {format === 'image' && imageView ? renderImg : renderIcon}\n\n {onRemove && (\n <ButtonBase\n onClick={onRemove}\n className={fileThumbnailClasses.removeBtn}\n sx={slotProps?.removeBtn}\n >\n <Icon icon=\"CLOSE_MARK_BUTTON\" width={24} />\n </ButtonBase>\n )}\n\n {onDownload && (\n <IconButton\n onClick={onDownload}\n className={fileThumbnailClasses.downloadBtn}\n sx={slotProps?.downloadBtn}\n size=\"small\"\n >\n <Icon icon=\"ARROW_DOWN_CICLE\" width={12} />\n </IconButton>\n )}\n </Stack>\n );\n\n if (tooltip) {\n return (\n <Tooltip\n arrow\n title={name}\n slotProps={{\n popper: {\n modifiers: [{ name: 'offset', options: { offset: [0, -12] } }],\n },\n }}\n >\n {renderContent}\n </Tooltip>\n );\n }\n\n return renderContent;\n};\n","const FORMAT_PDF = ['pdf'];\nconst FORMAT_TEXT = ['txt'];\nconst FORMAT_PHOTOSHOP = ['psd'];\nconst FORMAT_WORD = ['doc', 'docx'];\nconst FORMAT_EXCEL = ['xls', 'xlsx'];\nconst FORMAT_ZIP = ['zip', 'rar', 'iso'];\nconst FORMAT_ILLUSTRATOR = ['ai', 'eps'];\nconst FORMAT_POWERPOINT = ['ppt', 'pptx'];\nconst FORMAT_AUDIO = ['wav', 'aif', 'mp3', 'aac'];\nconst FORMAT_IMG = ['jpg', 'jpeg', 'gif', 'bmp', 'png', 'svg', 'webp'];\nconst FORMAT_VIDEO = ['m4v', 'avi', 'mpg', 'mp4', 'webm'];\n\nexport function fileFormatByMimeType(mimeType: string): string | null {\n if (mimeType.startsWith('image/')) return 'image';\n if (mimeType.startsWith('video/')) return 'video';\n if (mimeType.startsWith('audio/')) return 'audio';\n if (mimeType === 'application/pdf') return 'pdf';\n if (mimeType === 'text/plain') return 'txt';\n if (\n mimeType === 'application/msword' ||\n mimeType ===\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'\n )\n return 'word';\n if (\n mimeType === 'application/vnd.ms-excel' ||\n mimeType ===\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'\n )\n return 'excel';\n if (\n mimeType === 'application/vnd.ms-powerpoint' ||\n mimeType ===\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation'\n )\n return 'powerpoint';\n if (\n mimeType === 'application/zip' ||\n mimeType === 'application/x-rar-compressed' ||\n mimeType === 'application/x-iso9660-image'\n )\n return 'zip';\n if (mimeType === 'image/vnd.adobe.photoshop') return 'photoshop';\n if (\n mimeType === 'application/illustrator' ||\n mimeType === 'application/postscript'\n )\n return 'illustrator';\n return null;\n}\n\nexport function fileFormatByName(fileName: string, mimeType?: string): string {\n if (mimeType) {\n const formatByMime = fileFormatByMimeType(mimeType);\n if (formatByMime) return formatByMime;\n }\n const extension = fileTypeByUrl(fileName);\n if (FORMAT_TEXT.includes(extension)) return 'txt';\n if (FORMAT_ZIP.includes(extension)) return 'zip';\n if (FORMAT_AUDIO.includes(extension)) return 'audio';\n if (FORMAT_IMG.includes(extension)) return 'image';\n if (FORMAT_VIDEO.includes(extension)) return 'video';\n if (FORMAT_WORD.includes(extension)) return 'word';\n if (FORMAT_EXCEL.includes(extension)) return 'excel';\n if (FORMAT_POWERPOINT.includes(extension)) return 'powerpoint';\n if (FORMAT_PDF.includes(extension)) return 'pdf';\n if (FORMAT_PHOTOSHOP.includes(extension)) return 'photoshop';\n if (FORMAT_ILLUSTRATOR.includes(extension)) return 'illustrator';\n return 'file';\n}\n\nexport function fileFormat(fileUrl: string): string {\n const extension = fileTypeByUrl(fileUrl);\n if (FORMAT_TEXT.includes(extension)) return 'txt';\n if (FORMAT_ZIP.includes(extension)) return 'zip';\n if (FORMAT_AUDIO.includes(extension)) return 'audio';\n if (FORMAT_IMG.includes(extension)) return 'image';\n if (FORMAT_VIDEO.includes(extension)) return 'video';\n if (FORMAT_WORD.includes(extension)) return 'word';\n if (FORMAT_EXCEL.includes(extension)) return 'excel';\n if (FORMAT_POWERPOINT.includes(extension)) return 'powerpoint';\n if (FORMAT_PDF.includes(extension)) return 'pdf';\n if (FORMAT_PHOTOSHOP.includes(extension)) return 'photoshop';\n if (FORMAT_ILLUSTRATOR.includes(extension)) return 'illustrator';\n if (fileUrl?.startsWith('http')) return 'image';\n return extension || 'file';\n}\n\nexport function fileThumb(fileUrl: string) {\n let thumb;\n\n switch (fileFormat(fileUrl)) {\n case 'folder':\n thumb = 'IC_FOLDER';\n break;\n case 'txt':\n thumb = 'IC_TXT';\n break;\n case 'zip':\n thumb = 'IC_ZIP';\n break;\n case 'audio':\n thumb = 'IC_AUDIO';\n break;\n case 'video':\n thumb = 'IC_VIDEO';\n break;\n case 'word':\n thumb = 'IC_WORD';\n break;\n case 'excel':\n thumb = 'IC_EXCEL';\n break;\n case 'powerpoint':\n thumb = 'IC_POWER_POINT';\n break;\n case 'pdf':\n thumb = 'IC_PDF';\n break;\n case 'photoshop':\n thumb = 'IC_PTS';\n break;\n case 'illustrator':\n thumb = 'IC_AI';\n break;\n case 'image':\n thumb = 'IC_IMG';\n break;\n default:\n thumb = 'IC_FILE';\n }\n return thumb;\n}\n\nexport function fileTypeByUrl(fileUrl: string) {\n return (fileUrl && fileUrl.split('.').pop()) || '';\n}\n\nexport function fileNameByUrl(fileUrl: string) {\n return fileUrl.split('/').pop();\n}\n","import { useEffect, useMemo, useRef, useState } from 'react';\nimport { FileRejection, useDropzone } from 'react-dropzone';\nimport { Area } from 'react-easy-crop';\n\nimport useApiMessage from 'hooks/useApiMessage';\nimport { fData } from 'utils/formatNumber';\n\nimport {\n ExtendFile,\n UseDropzoneUploaderProps,\n UseDropzoneUploaderReturn,\n} from '../props';\nimport { compressImageWithoutCrop, convertToWebP } from '../utils';\n\nconst useDropzoneUploader = ({\n onFilesSelect,\n onFileSelect,\n onReorder,\n onRemove,\n uploadFiles,\n filesPreview,\n dropzoneOptions,\n enableCrop = false,\n customAspectRatio,\n convertToWebp = true,\n cropSize,\n maxFiles,\n compressionQuality = 0.8,\n maxCompressedWidth,\n maxCompressedHeight,\n}: UseDropzoneUploaderProps): UseDropzoneUploaderReturn => {\n const { showErrorMessage } = useApiMessage();\n\n const aspectRatio = useMemo(() => {\n if (customAspectRatio) {\n return customAspectRatio;\n }\n\n if (cropSize && typeof cropSize !== 'number') {\n return cropSize.width / cropSize.height;\n }\n\n return 1;\n }, [customAspectRatio, cropSize]);\n\n const [internalFiles, setInternalFiles] = useState<Array<ExtendFile>>([]);\n const [cropModalOpen, setCropModalOpen] = useState(false);\n const [originalImage, setOriginalImage] = useState<File | null>(null);\n const [croppedAreaPixels, setCroppedAreaPixels] = useState<Area | null>(null);\n const [imagePreview, setImagePreview] = useState<string>('');\n const [cropLoading, setCropLoading] = useState(false);\n const [pendingImages, setPendingImages] = useState<Array<ExtendFile>>([]);\n const [currentImageIndex, setCurrentImageIndex] = useState<number>(0);\n const [totalPendingImages, setTotalPendingImages] = useState<number>(0);\n\n const processNextImage = (images: Array<ExtendFile>) => {\n if (images.length < 1) return;\n const nextImageData = images[0];\n setOriginalImage(nextImageData);\n setCurrentImageIndex(prev => prev + 1);\n\n const reader = new FileReader();\n reader.onload = () => {\n setImagePreview(reader.result as string);\n setCropModalOpen(true);\n };\n reader.readAsDataURL(nextImageData);\n };\n\n const onCropInitialized = (_croppedArea: Area, croppedAreaPixels: Area) => {\n setCroppedAreaPixels(croppedAreaPixels);\n };\n\n const createCroppedImage = async (\n fileId: string,\n ): Promise<ExtendFile | null> => {\n if (!originalImage || !croppedAreaPixels) return null;\n\n return new Promise(resolve => {\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n const img = new Image();\n\n img.onload = async () => {\n const { width, height, x, y } = croppedAreaPixels;\n const ratio = Math.abs(aspectRatio);\n let finalWidth = width;\n let finalHeight = height;\n\n if (cropSize && typeof cropSize === 'object') {\n finalWidth = cropSize.width;\n finalHeight = cropSize.height;\n } else if (cropSize && typeof cropSize === 'number') {\n finalWidth = cropSize;\n finalHeight = cropSize / ratio;\n }\n\n canvas.width = finalWidth;\n canvas.height = finalHeight;\n\n if (ctx) {\n ctx.drawImage(\n img,\n x,\n y,\n width,\n height,\n 0,\n 0,\n finalWidth,\n finalHeight,\n );\n\n canvas.toBlob(async blob => {\n if (blob) {\n let croppedFile = new File([blob], originalImage.name, {\n type: originalImage.type,\n lastModified: Date.now(),\n });\n\n if (convertToWebp) {\n try {\n croppedFile = await convertToWebP(\n croppedFile,\n compressionQuality,\n );\n } catch (error) {\n showErrorMessage(error, 'Erro ao converter para WebP');\n }\n }\n\n // Converter File para ExtendFile adicionando o ID\n const extendedFile = croppedFile as ExtendFile;\n extendedFile.id = fileId;\n\n resolve(extendedFile);\n } else {\n resolve(null);\n }\n }, 'image/png');\n } else {\n resolve(null);\n }\n };\n\n img.src = imagePreview;\n });\n };\n\n const handleCropSave = async () => {\n if (!originalImage || !croppedAreaPixels || pendingImages.length === 0)\n return;\n\n setCropLoading(true);\n try {\n const currentImageData = pendingImages[0];\n const croppedImage = await createCroppedImage(currentImageData.id);\n\n if (croppedImage) {\n const files = await uploadFiles([croppedImage]);\n if (files) {\n if (!onFilesSelect && !onFileSelect) {\n setInternalFiles(prev => [...prev, ...files]);\n }\n onFilesSelect?.([...(filesPreview || []), ...files]);\n onFileSelect?.(croppedImage);\n }\n }\n\n setCropModalOpen(false);\n setCropLoading(false);\n setImagePreview('');\n setOriginalImage(null);\n\n const remainingImages = pendingImages.slice(1);\n setPendingImages(remainingImages);\n processNextImage(remainingImages);\n } catch (error) {\n showErrorMessage(error, 'Erro ao processar imagem');\n setCropLoading(false);\n }\n };\n\n const handleCropCancel = () => {\n setCropModalOpen(false);\n setCropLoading(false);\n setImagePreview('');\n setOriginalImage(null);\n setPendingImages([]);\n setCurrentImageIndex(0);\n setTotalPendingImages(0);\n };\n\n const onDrop = async (acceptedFiles: File[]) => {\n if (acceptedFiles.length === 0) return;\n\n const isImageUpload = Object.keys(dropzoneOptions?.accept || {}).some(key =>\n key.includes('image/'),\n );\n const totalFiles = internalFiles.length + acceptedFiles.length;\n\n if (maxFiles && totalFiles > maxFiles) {\n showErrorMessage(\n new Error(`Máximo de ${maxFiles} arquivos`),\n 'Erro ao fazer upload',\n );\n return;\n }\n\n try {\n if (isImageUpload && enableCrop) {\n const imageFiles = acceptedFiles.filter(file =>\n file.type.startsWith('image/'),\n );\n\n const imageFilesWithTempIds = imageFiles.map((file, index) => {\n const extendedFile = file as ExtendFile;\n extendedFile.id = `temp-crop-${Date.now()}-${index}`;\n return extendedFile;\n });\n\n setTotalPendingImages(imageFilesWithTempIds.length);\n setCurrentImageIndex(0);\n setPendingImages(imageFilesWithTempIds);\n processNextImage(imageFilesWithTempIds);\n } else {\n const processedFiles: File[] = [];\n\n for (const file of acceptedFiles) {\n if (file.type.startsWith('image/') && convertToWebp) {\n try {\n const compressedFile = await compressImageWithoutCrop(\n file,\n compressionQuality,\n maxCompressedWidth,\n maxCompressedHeight,\n );\n processedFiles.push(compressedFile);\n } catch (error) {\n showErrorMessage(error, 'Erro ao comprimir imagem');\n processedFiles.push(file);\n }\n } else {\n processedFiles.push(file);\n }\n }\n\n const files = await uploadFiles(processedFiles);\n if (files) {\n if (!onFilesSelect && !onFileSelect) {\n setInternalFiles(prev => [...prev, ...files]);\n }\n onFilesSelect?.([...(filesPreview || []), ...files]);\n onFileSelect?.(files[0]);\n }\n }\n } catch (error) {\n showErrorMessage(error, 'Erro ao processar arquivos');\n }\n };\n\n const handleDropRejected = (fileRejections: FileRejection[]) => {\n if (!fileRejections.length) return;\n\n const errorCode = fileRejections[0]?.errors[0]?.code;\n const maxSizeInBytes = dropzoneOptions?.maxSize || 3145728; // 3MB padrão\n if (errorCode === 'file-too-large') {\n showErrorMessage(\n new Error(\n `O arquivo excede o tamanho máximo de ${fData(maxSizeInBytes)}`,\n ),\n 'Erro ao fazer upload',\n );\n } else if (errorCode === 'file-invalid-type') {\n showErrorMessage(\n new Error('Formato de arquivo não suportado'),\n 'Erro ao fazer upload',\n );\n } else {\n showErrorMessage(\n fileRejections[0]?.errors[0] || new Error('Erro ao enviar arquivo'),\n 'Erro ao fazer upload',\n );\n }\n };\n\n const {\n getRootProps,\n getInputProps,\n isDragActive,\n isDragReject,\n fileRejections,\n } = useDropzone({\n onDrop,\n onDropRejected: handleDropRejected,\n ...dropzoneOptions,\n });\n\n const handleRemove = (fileToRemove?: ExtendFile) => {\n if (!fileToRemove) {\n if (!onRemove) setInternalFiles([]);\n onRemove?.(undefined);\n return;\n }\n\n const newFiles = internalFiles.filter(file => file.id !== fileToRemove.id);\n if (!onRemove) setInternalFiles(newFiles);\n onRemove?.(fileToRemove);\n };\n\n const handleReorder = (\n oldIndex: number,\n newIndex: number,\n files: ExtendFile[],\n ) => {\n onReorder?.(oldIndex, newIndex, files);\n };\n\n const filesIdRef = useRef<string>('');\n useEffect(() => {\n const idRef = filesPreview?.map(file => file.id).join(',') || '';\n if (idRef !== filesIdRef.current) {\n filesIdRef.current = idRef;\n setInternalFiles(filesPreview || []);\n }\n }, [filesPreview]);\n\n return {\n file: internalFiles?.[0],\n files: internalFiles,\n aspectRatio,\n dropzoneProps: {\n getRootProps,\n getInputProps,\n isDragActive,\n isDragReject,\n fileRejections,\n },\n cropState: {\n cropModalOpen,\n imagePreview,\n cropLoading,\n setCropModalOpen,\n onCropInitialized,\n handleCropSave,\n handleCropCancel,\n currentImageIndex,\n totalPendingImages,\n },\n setInitialFiles: setInternalFiles,\n handleRemove,\n handleReorder,\n };\n};\n\nexport default useDropzoneUploader;\n","export const isImageFile = (mimeType: string): boolean => {\n return mimeType.startsWith('image/');\n};\n\nexport const convertToWebP = (file: File, quality = 0.8): Promise<File> => {\n return new Promise((resolve, reject) => {\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n const img = new Image();\n\n img.onload = () => {\n canvas.width = img.width;\n canvas.height = img.height;\n\n if (ctx) {\n ctx.drawImage(img, 0, 0);\n\n canvas.toBlob(\n blob => {\n if (blob) {\n const webpFile = new File(\n [blob],\n file.name.replace(/\\.[^/.]+$/, '.webp'),\n {\n type: 'image/webp',\n lastModified: Date.now(),\n },\n );\n resolve(webpFile);\n } else {\n reject(new Error('Falha ao converter para WebP'));\n }\n },\n 'image/webp',\n quality,\n );\n } else {\n reject(new Error('Não foi possível obter contexto do canvas'));\n }\n };\n\n img.onerror = () => reject(new Error('Falha ao carregar imagem'));\n img.src = URL.createObjectURL(file);\n });\n};\n\nexport const compressImageWithoutCrop = (\n file: File,\n quality = 0.8,\n maxWidth?: number,\n maxHeight?: number,\n): Promise<File> => {\n return new Promise((resolve, reject) => {\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n const img = new Image();\n\n img.onload = () => {\n let { width, height } = img;\n\n if (maxWidth && width > maxWidth) {\n height = (height * maxWidth) / width;\n width = maxWidth;\n }\n if (maxHeight && height > maxHeight) {\n width = (width * maxHeight) / height;\n height = maxHeight;\n }\n\n canvas.width = width;\n canvas.height = height;\n\n if (ctx) {\n ctx.imageSmoothingEnabled = true;\n ctx.imageSmoothingQuality = 'high';\n\n ctx.drawImage(img, 0, 0, width, height);\n\n canvas.toBlob(\n blob => {\n if (blob) {\n const compressedFile = new File(\n [blob],\n file.name.replace(/\\.[^/.]+$/, '.webp'),\n {\n type: 'image/webp',\n lastModified: Date.now(),\n },\n );\n resolve(compressedFile);\n } else {\n reject(new Error('Falha ao comprimir imagem'));\n }\n },\n 'image/webp',\n quality,\n );\n } else {\n reject(new Error('Não foi possível obter contexto do canvas'));\n }\n };\n\n img.onerror = () => reject(new Error('Falha ao carregar imagem'));\n img.src = URL.createObjectURL(file);\n });\n};\n\nexport const getFileNameFromContentDisposition = (\n contentDisposition: string,\n): string => {\n const match = contentDisposition.match(\n /filename\\*=UTF-8''([^;]+)|filename=\"?([^\";]+)\"?/i,\n );\n const filename = match?.[1] || match?.[2];\n\n return filename || '';\n};\n\nexport const encodeFilenameForHeader = (filename: string): string => {\n const encodedFilename = encodeURIComponent(filename);\n\n return `UTF-8''${encodedFilename}`;\n};\n","import { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport useApiMessage from 'hooks/useApiMessage';\n\nimport {\n ContentType,\n ExtendFile,\n FileContentType,\n FileDetails,\n FileUploadProps,\n} from '../props';\nimport {\n encodeFilenameForHeader,\n getFileNameFromContentDisposition,\n} from '../utils';\n\nconst useFileUploadService = ({\n createFilesMutation,\n filesDetails,\n}: FileUploadProps) => {\n const { showErrorMessage } = useApiMessage();\n const [isUploadingFiles, setIsUploadingFiles] = useState(false);\n const [isLoadingPreview, setIsLoadingPreview] = useState(false);\n const [uploadFilesError, setUploadFilesError] = useState<unknown | null>(\n null,\n );\n const [filesPreview, setFilesPreview] = useState<ExtendFile[]>([]);\n\n const filePreview = useMemo(() => filesPreview?.[0], [filesPreview]);\n const isUploadOrLoadingFiles = isLoadingPreview || isUploadingFiles;\n\n const fetchFiles = useCallback(\n async (details: FileDetails[]) => {\n if (!details.length) {\n setFilesPreview([]);\n setIsLoadingPreview(false);\n return;\n }\n\n setIsLoadingPreview(true);\n try {\n const newFiles = await Promise.all(\n details.map(async ({ url, id, name }) => {\n try {\n if (!url) return null;\n\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(response.statusText);\n }\n\n const blob = await response.blob();\n\n let nameFromDisposition: string | null = null;\n if (!name) {\n const contentDisposition =\n response.headers.get('content-disposition') || undefined;\n\n if (contentDisposition) {\n const filename =\n getFileNameFromContentDisposition(contentDisposition);\n if (filename) {\n try {\n nameFromDisposition = decodeURIComponent(filename);\n } catch {\n nameFromDisposition = filename;\n }\n }\n }\n }\n\n const filename = nameFromDisposition || name || id;\n const previewFile = new File([blob], filename, {\n type: blob.type,\n }) as ExtendFile;\n previewFile.id = id;\n previewFile.url = url;\n\n return previewFile;\n } catch (error) {\n return null;\n }\n }),\n );\n\n const validFiles = newFiles.filter(Boolean) as ExtendFile[];\n setFilesPreview(validFiles);\n setIsLoadingPreview(false);\n } catch (error) {\n showErrorMessage(error, 'Erro ao carregar arquivos');\n setFilesPreview([]);\n setIsLoadingPreview(false);\n }\n },\n [showErrorMessage],\n );\n\n const filesUrlRef = useRef('');\n useEffect(() => {\n const urlKey = filesDetails?.map(({ id }) => id).join(',') || '';\n\n if (urlKey !== filesUrlRef.current) {\n const run = async () => {\n filesUrlRef.current = urlKey;\n await fetchFiles(filesDetails);\n };\n\n run();\n }\n }, [filesDetails, fetchFiles]);\n\n const uploadFiles = async (files: File[]) => {\n if (!files || !Array.isArray(files)) {\n throw new Error('Arquivos inválidos');\n }\n\n const newFiles = files.filter(file => file instanceof File);\n if (!newFiles?.length) return;\n\n setIsUploadingFiles(true);\n\n try {\n const filesWithContentType = newFiles.map(file => {\n const mimeType =\n (file.type as ContentType) || ContentType.APPLICATION_OCTET_STREAM;\n const contentTypeEnum = FileContentType[mimeType];\n\n if (!contentTypeEnum) {\n throw new Error(`Tipo de arquivo não suportado: ${mimeType}`);\n }\n\n return { file, mimeType, contentTypeEnum };\n });\n\n const createResponse = await createFilesMutation({\n files: filesWithContentType.map(({ file, contentTypeEnum }) => ({\n content_type: contentTypeEnum,\n name: file.name,\n })),\n }).unwrap();\n\n // Converte cada File para ExtendFile adicionando o ID e URL recebidos\n const extendedFiles: ExtendFile[] = createResponse.files.map(\n (responseFile, index) => {\n const originalFile = filesWithContentType[index].file;\n const extendedFile = originalFile as ExtendFile;\n extendedFile.id = responseFile.id;\n extendedFile.url = URL.createObjectURL(originalFile);\n return extendedFile;\n },\n );\n\n // Upload dos arquivos com ID e nome no header\n const responses = await Promise.all(\n createResponse.files.map((responseFile, index) => {\n const { mimeType } = filesWithContentType[index];\n const extendedFile = extendedFiles[index];\n\n return fetch(responseFile.url, {\n method: 'PUT',\n headers: {\n 'Content-Type': mimeType,\n 'Content-Disposition': `inline; filename*=${encodeFilenameForHeader(extendedFile.name)}`,\n 'X-File-Id': responseFile.id,\n },\n body: extendedFile,\n });\n }),\n );\n\n // Garante que o upload foi concluído\n await responses.forEach(async response => {\n if (!response.ok) {\n throw new Error('Erro no upload do arquivo.');\n }\n });\n\n return extendedFiles;\n } catch (error) {\n setUploadFilesError(error);\n showErrorMessage(error, 'Erro no upload');\n throw error;\n } finally {\n setIsUploadingFiles(false);\n }\n };\n\n const uploadErrorText = useMemo(() => {\n if (uploadFilesError && uploadFilesError instanceof Error) {\n return uploadFilesError.message;\n }\n\n return uploadFilesError as string;\n }, [uploadFilesError]);\n\n const invalidFiles = useMemo(\n () =>\n filesDetails.filter(\n file => !filesPreview.some(preview => preview.id === file.id),\n ),\n [filesDetails, filesPreview],\n );\n\n return {\n setFilesPreview,\n uploadFiles,\n filesPreview,\n filePreview,\n isLoadingPreview,\n isUploadingFiles,\n isUploadOrLoadingFiles,\n uploadErrorText,\n invalidFiles,\n };\n};\n\nexport default useFileUploadService;\n","import type {\n DropzoneInputProps,\n DropzoneRootProps,\n FileRejection,\n useDropzone,\n} from 'react-dropzone';\nimport type { DropzoneOptions } from 'react-dropzone';\nimport { Area } from 'react-easy-crop';\nimport {\n DraggableAttributes,\n DraggableSyntheticListeners,\n} from '@dnd-kit/core';\nimport type { StackProps } from '@mui/material/Stack';\nimport type { SxProps, Theme } from '@mui/material/styles';\n\nimport type { FileThumbnailProps } from 'components/FileUpload';\n\nexport interface ExtendFile extends File {\n id: string;\n url: string;\n}\n\nexport interface FileDetails {\n id: string;\n url: string;\n name?: string;\n}\n\nexport interface FileUpload {\n url: string;\n file: ExtendFile;\n contentType: string;\n resourceIds: string[];\n}\n\nexport type CropSize =\n | {\n width: number;\n height: number;\n }\n | number;\n\nexport type CreateFilesMutation = (\n files: ExtendFile[],\n) => Promise<string[] | undefined>;\n\nexport interface FileCreateRequest {\n files: Array<{\n content_type: keyof typeof ContentType;\n name: string;\n }>;\n}\n\nexport interface FileGetResponse {\n id: string;\n name: string;\n organization_id: string;\n url: string;\n status: 'PENDING' | 'COMPLETED' | 'FAILED' | 'READY';\n content_type: string;\n content_length: number;\n created_by: string;\n created_at: string;\n updated_by: string;\n updated_at: string;\n}\n\nexport interface FileCreateResponse {\n files: FileGetResponse[];\n}\n\nexport interface FileQueryRequest {\n ids: string[];\n}\n\nexport interface FileQueryResponse {\n files: FileGetResponse[];\n}\n\nexport interface SingleFilePreviewProps extends StackProps {\n file: ExtendFile;\n aspectRatio?: number;\n isLoading?: boolean;\n cropSize?: CropSize;\n onLoading?: (isLoading: boolean) => void;\n isUploading?: boolean;\n maxWidth?: number;\n maxHeight?: number;\n hoverAlt?: React.ReactNode;\n fill?: boolean;\n}\n\nexport interface LoadingPreviewImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {\n aspectRatio: number;\n maxWidth?: number | string;\n maxHeight?: number | string;\n isLoading?: boolean;\n isUploading?: boolean;\n cropSize?: CropSize;\n onLoading?: (isLoading: boolean) => void;\n alt?: string;\n src?: string;\n loading: 'lazy';\n fill?: boolean;\n}\n\nexport interface PlaceholderProps extends StackProps {\n header?: React.ReactNode;\n description?: React.ReactNode;\n}\n\nexport interface FileUploadProps {\n createFilesMutation: (params: FileCreateRequest) => {\n unwrap: () => Promise<FileCreateResponse>;\n };\n filesDetails: FileDetails[];\n}\n\nexport interface SingleFileUploadProps extends DropzoneOptions {\n onRemove?: (file?: ExtendFile) => void;\n onFileSelect?: (file: ExtendFile) => void;\n createFilesMutation: FileUploadProps['createFilesMutation'];\n fileDetails?: FileDetails;\n placeholderProps?: PlaceholderProps;\n placeholderAlt?: React.ReactNode;\n name?: string;\n label?: string;\n id?: string;\n disabled?: boolean;\n error?: string;\n helperText?: string | React.ReactNode;\n sx?: SxProps<Theme>;\n dropZoneSxProps?: SxProps<Theme>;\n uploading?: boolean;\n tabIndex?: number;\n maxSize?: number;\n keepInvalidFiles?: boolean;\n}\n\nexport interface SingleImageUploadProps extends SingleFileUploadProps {\n aspectRatio?: number;\n enableCrop?: boolean;\n convertToWebp?: boolean;\n cropSize?: CropSize;\n maxWidth?: number;\n maxHeight?: number;\n compressionQuality?: number;\n maxCompressedWidth?: number;\n maxCompressedHeight?: number;\n hoverAlt?: React.ReactNode;\n fill?: boolean;\n}\n\nexport interface MultiFileUploadProps extends Omit<\n SingleFileUploadProps,\n 'filesDetails' | 'onFileSelect'\n> {\n onFilesSelect?: (files: ExtendFile[]) => void;\n onRemoveAll?: (files?: ExtendFile[]) => void;\n onReorder?: (oldIndex: number, newIndex: number, files: ExtendFile[]) => void;\n filesDetails?: FileDetails[];\n maxFiles?: number;\n thumbnail?: boolean;\n}\n\nexport interface MultiImageUploadProps extends MultiFileUploadProps {\n aspectRatio?: number;\n enableCrop?: boolean;\n convertToWebp?: boolean;\n cropSize?: CropSize;\n maxWidth?: number;\n maxHeight?: number;\n compressionQuality?: number;\n maxCompressedWidth?: number;\n maxCompressedHeight?: number;\n}\n\nexport interface SortableItemProps extends StackProps {\n onRemove?: (file?: ExtendFile) => void;\n file: ExtendFile;\n thumbnail?: boolean;\n disableDrag?: boolean;\n disableTransitions?: boolean;\n}\n\nexport interface MultiFilePreviewProps extends StackProps {\n onReorder?: (oldIndex: number, newIndex: number, files: ExtendFile[]) => void;\n onRemove?: (file?: ExtendFile) => void;\n files: ExtendFile[];\n lastNode?: React.ReactNode;\n firstNode?: React.ReactNode;\n thumbnail: boolean;\n slotProps?: {\n thumbnail?: Omit<FileThumbnailProps, 'file'>;\n };\n}\n\nexport interface StyledDropZoneProps extends StackProps {\n isDragActive: boolean;\n isError: boolean;\n disabled: boolean;\n}\n\nexport type StyledDropZonePropsType = Omit<\n DropzoneRootProps,\n 'children' | 'onDrop' | 'onError'\n> &\n StyledDropZoneProps;\n\nexport interface RejectionFilesProps extends StackProps {\n files: FileRejection[];\n}\n\nexport interface ThumbnailBadgeProps {\n onRemove?: (file?: ExtendFile) => void;\n file: ExtendFile;\n attributes: DraggableAttributes;\n listeners: DraggableSyntheticListeners;\n innerWidth: number;\n isDragging: boolean;\n disableDrag?: boolean;\n sx?: SxProps<Theme>;\n}\n\nexport interface DropZoneProps {\n sx?: SxProps;\n uploading?: boolean;\n id?: string;\n tabIndex?: number;\n getRootProps: () => DropzoneRootProps;\n getInputProps: () => DropzoneInputProps;\n isDragActive: boolean;\n isError: boolean;\n disabled?: boolean;\n dropZoneSxProps?: SxProps<Theme>;\n dropZoneContent?: React.ReactNode;\n children?: React.ReactNode;\n name?: string;\n}\n\nexport interface HelperTextProps {\n helperText?: string | React.ReactNode;\n disabled?: boolean;\n isError?: boolean;\n}\n\nexport interface UseDropzoneUploaderProps {\n onReorder?: (oldIndex: number, newIndex: number, files: ExtendFile[]) => void;\n onFileSelect?: (file: ExtendFile) => void;\n onFilesSelect?: (files: ExtendFile[]) => void;\n onRemove?: (file?: ExtendFile) => void;\n uploadFiles: (files: File[]) => Promise<ExtendFile[] | undefined>;\n filesPreview?: ExtendFile[];\n dropzoneOptions?: Omit<DropzoneOptions, 'onDrop' | 'onDropRejected'>;\n enableCrop?: boolean;\n customAspectRatio?: number;\n convertToWebp?: boolean;\n maxFiles?: number;\n cropSize?: { width: number; height: number } | number;\n compressionQuality?: number;\n maxCompressedWidth?: number;\n maxCompressedHeight?: number;\n}\n\nexport interface UseDropzoneUploaderReturn {\n file: ExtendFile | null;\n files: ExtendFile[];\n aspectRatio: number;\n dropzoneProps: {\n getRootProps: ReturnType<typeof useDropzone>['getRootProps'];\n getInputProps: ReturnType<typeof useDropzone>['getInputProps'];\n isDragActive: boolean;\n isDragReject: boolean;\n fileRejections: readonly FileRejection[];\n };\n cropState: {\n cropModalOpen: boolean;\n imagePreview: string;\n cropLoading: boolean;\n setCropModalOpen: React.Dispatch<React.SetStateAction<boolean>>;\n onCropInitialized: (croppedArea: Area, croppedAreaPixels: Area) => void;\n handleCropSave: () => Promise<void>;\n handleCropCancel: () => void;\n currentImageIndex: number;\n totalPendingImages: number;\n };\n setInitialFiles?: (files: ExtendFile[]) => void;\n handleRemove: (fileToRemove?: ExtendFile) => void;\n handleReorder: (\n oldIndex: number,\n newIndex: number,\n files: ExtendFile[],\n ) => void;\n}\n\nexport enum ContentType {\n APPLICATION_OCTET_STREAM = 'application/octet-stream',\n IMAGE_JPEG = 'image/jpeg',\n IMAGE_JPG = 'image/jpg',\n IMAGE_PNG = 'image/png',\n IMAGE_GIF = 'image/gif',\n IMAGE_WEBP = 'image/webp',\n IMAGE_SVG = 'image/svg+xml',\n IMAGE_BMP = 'image/bmp',\n IMAGE_TIFF = 'image/tiff',\n IMAGE_ICO = 'image/x-icon',\n IMAGE_AVIF = 'image/avif',\n APPLICATION_PDF = 'application/pdf',\n TEXT_PLAIN = 'text/plain',\n TEXT_CSV = 'text/csv',\n APPLICATION_RTF = 'application/rtf',\n APPLICATION_MSWORD = 'application/msword',\n APPLICATION_DOCX = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n APPLICATION_MSEXCEL = 'application/vnd.ms-excel',\n APPLICATION_XLSX = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n APPLICATION_MSPOWERPOINT = 'application/vnd.ms-powerpoint',\n APPLICATION_PPTX = 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n APPLICATION_ODT = 'application/vnd.oasis.opendocument.text',\n APPLICATION_ODS = 'application/vnd.oasis.opendocument.spreadsheet',\n APPLICATION_ODP = 'application/vnd.oasis.opendocument.presentation',\n APPLICATION_XML = 'application/xml',\n TEXT_XML = 'text/xml',\n TEXT_HTML = 'text/html',\n TEXT_CSS = 'text/css',\n APPLICATION_JSON = 'application/json',\n TEXT_JAVASCRIPT = 'text/javascript',\n APPLICATION_ZIP = 'application/zip',\n APPLICATION_GZIP = 'application/gzip',\n APPLICATION_RAR = 'application/vnd.rar',\n APPLICATION_7Z = 'application/x-7z-compressed',\n AUDIO_MPEG = 'audio/mpeg',\n AUDIO_WAV = 'audio/wav',\n AUDIO_OGG = 'audio/ogg',\n AUDIO_WEBM = 'audio/webm',\n AUDIO_AAC = 'audio/aac',\n VIDEO_MP4 = 'video/mp4',\n VIDEO_MPEG = 'video/mpeg',\n VIDEO_OGG = 'video/ogg',\n VIDEO_WEBM = 'video/webm',\n VIDEO_QUICKTIME = 'video/quicktime',\n}\n\nexport enum FileContentType {\n 'application/octet-stream' = 'APPLICATION_OCTET_STREAM',\n 'image/jpeg' = 'IMAGE_JPEG',\n 'image/jpg' = 'IMAGE_JPG',\n 'image/png' = 'IMAGE_PNG',\n 'image/gif' = 'IMAGE_GIF',\n 'image/webp' = 'IMAGE_WEBP',\n 'image/svg+xml' = 'IMAGE_SVG',\n 'image/bmp' = 'IMAGE_BMP',\n 'image/tiff' = 'IMAGE_TIFF',\n 'image/x-icon' = 'IMAGE_ICO',\n 'image/avif' = 'IMAGE_AVIF',\n 'application/pdf' = 'APPLICATION_PDF',\n 'text/plain' = 'TEXT_PLAIN',\n 'text/csv' = 'TEXT_CSV',\n 'application/rtf' = 'APPLICATION_RTF',\n 'application/msword' = 'APPLICATION_MSWORD',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' = 'APPLICATION_DOCX',\n 'application/vnd.ms-excel' = 'APPLICATION_MSEXCEL',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' = 'APPLICATION_XLSX',\n 'application/vnd.ms-powerpoint' = 'APPLICATION_MSPOWERPOINT',\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation' = 'APPLICATION_PPTX',\n 'application/vnd.oasis.opendocument.text' = 'APPLICATION_ODT',\n 'application/vnd.oasis.opendocument.spreadsheet' = 'APPLICATION_ODS',\n 'application/vnd.oasis.opendocument.presentation' = 'APPLICATION_ODP',\n 'application/xml' = 'APPLICATION_XML',\n 'text/xml' = 'TEXT_XML',\n 'text/html' = 'TEXT_HTML',\n 'text/css' = 'TEXT_CSS',\n 'application/json' = 'APPLICATION_JSON',\n 'text/javascript' = 'TEXT_JAVASCRIPT',\n 'application/zip' = 'APPLICATION_ZIP',\n 'application/gzip' = 'APPLICATION_GZIP',\n 'application/vnd.rar' = 'APPLICATION_RAR',\n 'application/x-7z-compressed' = 'APPLICATION_7Z',\n 'audio/mpeg' = 'AUDIO_MPEG',\n 'audio/wav' = 'AUDIO_WAV',\n 'audio/ogg' = 'AUDIO_OGG',\n 'audio/webm' = 'AUDIO_WEBM',\n 'audio/aac' = 'AUDIO_AAC',\n 'video/mp4' = 'VIDEO_MP4',\n 'video/mpeg' = 'VIDEO_MPEG',\n 'video/ogg' = 'VIDEO_OGG',\n 'video/webm' = 'VIDEO_WEBM',\n 'video/quicktime' = 'VIDEO_QUICKTIME',\n}\n","import { memo } from 'react';\nimport Box from '@mui/material/Box';\nimport Stack from '@mui/material/Stack';\n\nimport DropZone from './components/DropZone';\nimport DropZonePlaceholder from './components/DropZonePlaceholder';\nimport HelperText from './components/HelperText';\nimport MultiFilePreview from './components/MultiFilePreview';\nimport useDropzoneUploader from './hooks/useDropzoneUploader';\nimport useFileUploadService from './hooks/useFileUploadService';\nimport { MultiFileUploadProps } from './props';\n\nconst MultipleFileUpload = ({\n onRemove,\n onReorder,\n onFilesSelect,\n createFilesMutation,\n filesDetails = [],\n id,\n disabled,\n error,\n helperText,\n thumbnail,\n dropZoneSxProps,\n uploading,\n tabIndex,\n maxFiles,\n placeholderAlt,\n placeholderProps,\n ...other\n}: MultiFileUploadProps) => {\n const { filesPreview, isUploadOrLoadingFiles, uploadErrorText, uploadFiles } =\n useFileUploadService({\n createFilesMutation,\n filesDetails,\n });\n\n const { files, dropzoneProps, handleRemove, handleReorder } =\n useDropzoneUploader({\n onFilesSelect,\n onReorder,\n onRemove,\n filesPreview,\n dropzoneOptions: {\n multiple: true,\n disabled,\n ...other,\n },\n maxFiles,\n uploadFiles,\n });\n\n const { getRootProps, getInputProps, isDragActive, isDragReject } =\n dropzoneProps;\n const hasFiles = !!files?.filter(file => !!file.id).length;\n const isError = isDragReject || !!error || !!uploadErrorText;\n\n return (\n <DropZone\n id={id}\n uploading={uploading || isUploadOrLoadingFiles}\n disabled={disabled}\n dropZoneSxProps={dropZoneSxProps}\n tabIndex={tabIndex}\n getRootProps={getRootProps}\n getInputProps={getInputProps}\n isDragActive={isDragActive}\n isError={isError}\n dropZoneContent={\n <>\n {placeholderAlt ? (\n <Stack>{placeholderAlt}</Stack>\n ) : (\n <DropZonePlaceholder\n header={placeholderProps?.header}\n description={placeholderProps?.description}\n />\n )}\n </>\n }\n >\n <HelperText\n disabled={disabled}\n helperText={helperText}\n isError={isError}\n />\n {error ? <HelperText helperText={error} isError /> : null}\n {uploadErrorText ? (\n <HelperText helperText={uploadErrorText} isError />\n ) : null}\n\n {hasFiles && (\n <Box sx={{ my: 3 }}>\n <MultiFilePreview\n files={files}\n thumbnail={!!thumbnail}\n onRemove={onRemove ? handleRemove : undefined}\n onReorder={onReorder ? handleReorder : undefined}\n />\n </Box>\n )}\n </DropZone>\n );\n};\n\nexport default memo(MultipleFileUpload);\n","import Box from '@mui/material/Box';\n\nimport FixedProgressBar from 'components/FixedProgressBar';\n\nimport { DropZoneProps } from '../props';\nimport { Container, StyledDropZone } from '../styles';\n\nconst DropZone = ({\n sx,\n id,\n name,\n tabIndex,\n uploading,\n getRootProps,\n getInputProps,\n isDragActive,\n isError,\n disabled,\n dropZoneSxProps,\n dropZoneContent,\n children,\n ...props\n}: DropZoneProps) => {\n return (\n <Container>\n {uploading && (\n <FixedProgressBar\n data-testid=\"uploading-progress-bar\"\n sx={{ zIndex: 1 }}\n />\n )}\n <Box sx={{ width: 1, position: 'relative', ...sx }}>\n <StyledDropZone\n {...getRootProps()}\n data-testid=\"drop-zone-styled-area\"\n isError={isError}\n isDragActive={isDragActive}\n disabled={!!disabled}\n sx={dropZoneSxProps}\n {...props}\n >\n <input {...getInputProps()} id={id} tabIndex={tabIndex} name={name} />\n\n {dropZoneContent}\n </StyledDropZone>\n {children}\n </Box>\n </Container>\n );\n};\n\nexport default DropZone;\n","import { memo } from 'react';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\n\nimport UploadIllustration from 'assets/illustrations/UploadIllustration';\n\nimport { PlaceholderProps } from '../props';\n\nconst DropZonePlaceholder = ({\n header,\n description,\n sx,\n ...other\n}: PlaceholderProps) => {\n return (\n <Stack\n spacing={5}\n alignItems=\"center\"\n justifyContent=\"center\"\n direction={{\n xs: 'column',\n md: 'row',\n }}\n sx={{\n width: 1,\n textAlign: {\n xs: 'center',\n md: 'left',\n },\n ...sx,\n }}\n {...other}\n >\n <UploadIllustration sx={{ width: 220 }} />\n\n <div>\n <Typography gutterBottom variant=\"h5\">\n {header || 'Soltar ou selecionar arquivos'}\n </Typography>\n\n <Typography variant=\"body2\" sx={{ color: 'text.secondary' }}>\n {description || (\n <>\n Solte os arquivos aqui ou clique\n <Typography\n variant=\"body2\"\n component=\"span\"\n sx={{\n mx: 0.5,\n color: 'primary.main',\n textDecoration: 'underline',\n }}\n >\n procurar\n </Typography>\n na sua máquina\n </>\n )}\n </Typography>\n </div>\n </Stack>\n );\n};\n\nexport default memo(DropZonePlaceholder);\n","/* eslint-disable react/function-component-definition */\nimport { memo } from 'react';\nimport type { BoxProps } from '@mui/material/Box';\nimport Box from '@mui/material/Box';\nimport { useTheme } from '@mui/material/styles';\n\nimport { BackgroundShape } from './BackgroundShape';\n\ntype Props = BoxProps & {\n hideBackground?: boolean;\n};\n\nfunction UploadIllustration({ hideBackground, sx, ...other }: Props) {\n const theme = useTheme();\n\n const PRIMARY_MAIN = theme.vars.palette.primary.main;\n\n const PRIMARY_DARK = theme.vars.palette.primary.dark;\n\n const PRIMARY_DARKER = theme.vars.palette.primary.darker;\n\n return (\n <Box\n component=\"svg\"\n width=\"100%\"\n height=\"100%\"\n viewBox=\"0 0 480 360\"\n xmlns=\"http://www.w3.org/2000/svg\"\n sx={{ width: 320, maxWidth: 1, flexShrink: 0, height: 'auto', ...sx }}\n {...other}\n >\n {!hideBackground && <BackgroundShape />}\n\n <defs>\n <linearGradient\n id=\"linearGradient-2\"\n x1=\"30.113%\"\n x2=\"30.113%\"\n y1=\"0%\"\n y2=\"100%\"\n >\n <stop offset=\"0%\" stopOpacity=\"0\" />\n <stop offset=\"100%\" />\n </linearGradient>\n </defs>\n\n <path\n fill=\"#FF4842\"\n fillRule=\"nonzero\"\n d=\"M293.006 206.192c-2.248 2.672-4.676 2.628-6.123 2.251l.054-1.384s5.979-2.733 5.827-2.159c-.057.215.057.733.242 1.292zM309.393 209.217c-3.818 2.206-6.058-.38-6.578-1.112.32-.84.801-2.204.703-2.592-.144-.577 5.827 2.155 5.827 2.155l.048 1.549zM305.303 187.204s3.632-2.093 4.425-1.151c.792.942-4.425 1.151-4.425 1.151zM307.497 188.355s-.598.299.721.681c1.318.383-.721-.681-.721-.681zM285.532 182.599c-.123.036 3.022 2.123 5.862.395-.012 0-5.154-.61-5.862-.395zM291.239 186.591s-.861 1.692-2.625 1.943c-1.764.251 2.625-1.943 2.625-1.943zM302.785 190.262s4.138 6.578 3.346 8.129c-.793 1.552-3.346-8.129-3.346-8.129zM294.62 216.416c0 .368 0 .712-.036.996-.107 1.33-3.381.828-3.381.828-2.99.416-4.066-1.019-4.422-2.392a5.444 5.444 0 01-.164-1.363 5.606 5.606 0 01.054-.819v-.272a1.998 1.998 0 011.859.379c1.331 1.08 3.095.252 3.095.252s1.294.107 1.793.538c.281.242.745-.341 1.098-.897.021.359.054 1.007.074 1.701.024.356.03.714.03 1.049z\"\n opacity=\"0.05\"\n />\n\n <path\n fill=\"#FF4842\"\n fillRule=\"nonzero\"\n d=\"M289.37 216.339s-.897.879-2.589-.479a5.444 5.444 0 01-.164-1.363c.864.658 2.466 1.842 2.753 1.842zM294.62 216.416a.67.67 0 01-.519.132.672.672 0 01-.452-.287c.348-.266.669-.566.956-.897.009.359.015.717.015 1.052zM301.637 217.032c0 .371 0 .715.033.996.108 1.333 3.382.828 3.382.828 2.989.419 4.066-1.017 4.421-2.392a5.728 5.728 0 00.111-2.182v-.272a2.024 2.024 0 00-1.862.379c-1.331 1.08-3.092.251-3.092.251s-1.294.111-1.794.542c-.281.242-.744-.341-1.094-.897a61.426 61.426 0 00-.078 1.701c-.024.35-.03.708-.027 1.046z\"\n opacity=\"0.05\"\n />\n\n <path\n fill=\"#FF4842\"\n fillRule=\"nonzero\"\n d=\"M306.887 216.949s.897.879 2.587-.479c.112-.444.169-.901.167-1.36-.867.655-2.47 1.839-2.754 1.839zM301.637 217.032a.67.67 0 00.969-.155 6.35 6.35 0 01-.957-.897c-.009.356-.014.714-.012 1.052zM319.614 106.269c.063-.138.123-.275.18-.41.057-.134.077-.209.11-.317-.11.237-.206.48-.29.727z\"\n opacity=\"0.05\"\n />\n\n <path\n fill={PRIMARY_DARKER}\n fillRule=\"nonzero\"\n d=\"M157.592 279.461a4.114 4.114 0 01-.917-3.131l13.196-107.979 1.094-8.97a4.142 4.142 0 014.078-3.635l38.654-.257a4.135 4.135 0 004.108-4.249l-.015-.409a4.14 4.14 0 014.135-4.279h40.619a4.134 4.134 0 014.098 4.682 4.137 4.137 0 003.995 4.682l39.01.996a4.13 4.13 0 013.97 4.831l-19.502 113.909-.368 2.152a4.042 4.042 0 01-.598 1.543l-135.557.114z\"\n />\n\n <path\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n d=\"M251.256817 123.296578L274.098317 123.296578 274.098317 200.823078 251.256817 200.823078z\"\n transform=\"rotate(34.64 262.678 162.06)\"\n />\n\n <path\n fill=\"#FFC107\"\n fillRule=\"nonzero\"\n d=\"M270.624591 129.857671L286.750291 129.857671 286.750291 145.983371 270.624591 145.983371z\"\n transform=\"rotate(34.804 278.687 137.92)\"\n />\n\n <path\n fill=\"#FFC107\"\n fillRule=\"nonzero\"\n d=\"M260.275579 145.813111L276.423079 145.813111 276.423079 161.960611 260.275579 161.960611z\"\n opacity=\"0.5\"\n transform=\"rotate(34.64 268.35 153.887)\"\n />\n\n <path\n fill=\"#FFC107\"\n fillRule=\"nonzero\"\n d=\"M249.191579 161.852111L265.339079 161.852111 265.339079 177.999611 249.191579 177.999611z\"\n opacity=\"0.3\"\n transform=\"rotate(34.64 257.265 169.926)\"\n />\n\n <path\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n d=\"M237.472537 121.334214L260.314037 121.334214 260.314037 198.567714 237.472537 198.567714z\"\n transform=\"rotate(16.29 248.893 159.951)\"\n />\n\n <path\n fill=\"#FF4842\"\n fillRule=\"nonzero\"\n d=\"M249.053192 123.761554L265.200692 123.761554 265.200692 139.909054 249.053192 139.909054z\"\n transform=\"rotate(16.29 257.127 131.835)\"\n />\n\n <path\n fill=\"#FF4842\"\n fillRule=\"nonzero\"\n d=\"M243.584192 142.473554L259.731692 142.473554 259.731692 158.621053 243.584192 158.621053z\"\n opacity=\"0.5\"\n transform=\"rotate(16.29 251.658 150.547)\"\n />\n\n <path\n fill=\"#FF4842\"\n fillRule=\"nonzero\"\n d=\"M238.116192 161.182554L254.263692 161.182554 254.263692 177.330054 238.116192 177.330054z\"\n opacity=\"0.3\"\n transform=\"rotate(16.29 246.19 169.256)\"\n />\n\n <path\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n d=\"M230.099192 121.641542L252.940692 121.641542 252.940692 198.875042 230.099192 198.875042z\"\n transform=\"rotate(4.6 241.52 160.258)\"\n />\n\n <path\n fill=\"#1890FF\"\n fillRule=\"nonzero\"\n d=\"M235.800489 122.985499L251.947989 122.985499 251.947989 139.132999 235.800489 139.132999z\"\n transform=\"rotate(4.6 243.874 131.06)\"\n />\n\n <path\n fill=\"#1890FF\"\n fillRule=\"nonzero\"\n d=\"M234.234488 142.413498L250.381988 142.413498 250.381988 158.560998 234.234488 158.560998z\"\n opacity=\"0.5\"\n transform=\"rotate(4.6 242.308 150.487)\"\n />\n\n <path\n fill=\"#1890FF\"\n fillRule=\"nonzero\"\n d=\"M232.672488 161.846499L248.819988 161.846499 248.819988 177.993999 232.672488 177.993999z\"\n opacity=\"0.3\"\n transform=\"rotate(4.6 240.746 169.92)\"\n />\n\n <path\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n d=\"M224.736657 123.384871L247.578157 123.384871 247.578157 200.618371 224.736657 200.618371z\"\n transform=\"rotate(-2.61 236.157 162.002)\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M226.751283 124.659968L242.898783 124.659968 242.898783 140.807468 226.751283 140.807468z\"\n transform=\"rotate(-2.61 234.825 132.734)\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M228.305601 143.479224L244.473301 143.479224 244.473301 159.646924 228.305601 159.646924z\"\n opacity=\"0.5\"\n transform=\"rotate(-2.862 236.39 151.563)\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M228.525282 163.608968L244.672782 163.608968 244.672782 179.756468 228.525282 179.756468z\"\n opacity=\"0.3\"\n transform=\"rotate(-2.61 236.599 171.683)\"\n />\n\n <path\n fill=\"#F4F6F8\"\n fillRule=\"nonzero\"\n d=\"M232.679 225.726l-20.294 7.851-29.661 11.466c-1.121-2.093-2.771-4.921-4.813-8.297-7.026-11.642-18.65-29.75-29.001-45.665-11.66-17.938-21.696-33.075-21.696-33.075l7.265-2.093 59.346-17.23 38.854 87.043z\"\n />\n\n <path\n fill=\"#000\"\n fillRule=\"nonzero\"\n d=\"M232.679 225.726l-20.294 7.851a152.535 152.535 0 01-34.484 3.169c-7.026-11.642-18.65-29.75-29-45.665l-14.42-35.18 59.343-17.218 38.855 87.043z\"\n opacity=\"0.1\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M247.777 220.841s-31.526 18.65-78.596 14.432l-37.525-91.486 17.984-3.091 62.168-10.677 35.279 89.043.69 1.779z\"\n />\n\n <path\n fill=\"#FF4842\"\n fillRule=\"nonzero\"\n d=\"M247.075 219.074c-7.424.365-16.013.329-24.654-.702-9.351-1.101-18.757-3.367-26.82-7.523-6.742-3.471-12.506-7.247-17.532-11.776-13.074-11.759-21.164-28.579-28.429-58.365l62.168-10.677 35.267 89.043z\"\n opacity=\"0.1\"\n />\n\n <path\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n d=\"M270.203 213.959s-23.239 4.55-46.894 1.749c-9.351-1.1-18.757-3.367-26.82-7.522-6.742-3.471-12.503-7.247-17.532-11.777-16.181-14.557-24.725-36.866-33.536-81.918 0 0 38.633 9.325 76.836-11.101-.012.015 12.865 80.373 47.946 110.569z\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M165.405 131.03s31.416-1.776 40.187-8.548l1.331 4.276s-20.758 9.157-41.518 9.268v-4.996zM165.405 152.137s30.417-1.665 53.399-12.766l.777 1.776s-18.237 10.647-54.176 13.433v-2.443zM167.853 160.362s30.418-1.665 53.397-12.766l.777 1.776s-18.237 10.643-54.174 13.433v-2.443zM170.299 168.599s30.417-1.666 53.399-12.766l.774 1.775s-18.237 10.647-54.173 13.433v-2.442zM172.748 176.835s30.417-1.665 53.396-12.766l.777 1.776s-18.237 10.647-54.173 13.433v-2.443zM175.193 185.075s30.417-1.665 53.399-12.766l.774 1.776s-18.237 10.643-54.173 13.433v-2.443z\"\n opacity=\"0.3\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M389.069 287.344s-12.641-.762-11.152 8.097c0 0-.299 1.563 1.124 2.275 0 0 .021-.658 1.295-.434.454.077.916.099 1.375.066a2.832 2.832 0 001.677-.694c.468-.409 3.555-1.468 4.936-7.274 0 0 1.023-1.267.981-1.593l-2.132.897s.73 1.54.156 2.816c0 0-.069-2.759-.479-2.691-.083 0-1.109.533-1.109.533s1.253 2.69.299 4.628c0 0 .359-3.304-.699-4.434l-1.495.876s1.465 2.768.472 5.029c0 0 .254-3.465-.789-4.817l-1.361 1.062s1.379 2.729.539 4.604c0 0-.111-4.036-.835-4.341 0 0-1.195 1.049-1.369 1.494 0 0 .942 1.98.356 3.026 0 0-.359-2.691-.652-2.691 0 0-1.196 1.794-1.309 2.99 0 0 .051-1.818 1.022-3.172a3.593 3.593 0 00-1.818.942s.186-1.262 2.111-1.37c0 0 .981-1.351 1.241-1.435 0 0-1.914-.158-3.074.356 0 0 1.023-1.196 3.427-.649l1.342-1.094s-2.52-.347-3.588.036c0 0 1.229-1.052 3.95-.299l1.462-.873s-2.147-.463-3.426-.299c0 0 1.348-.729 3.856.06l1.044-.47s-1.573-.299-2.033-.358c-.461-.06-.488-.174-.488-.174a5.426 5.426 0 012.957.329s2.222-.813 2.186-.954z\"\n />\n\n <ellipse\n cx=\"380.363\"\n cy=\"298.487\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n rx=\"8.945\"\n ry=\"1.513\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M394.956 258.102s-7.125-.43-6.279 4.565a1.218 1.218 0 00.631 1.283s.015-.371.733-.245c.255.042.515.054.774.036.349-.023.681-.159.945-.389.264-.23 2.003-.828 2.783-4.102 0 0 .577-.714.553-.897l-1.196.511s.41.87.087 1.591c0 0-.039-1.558-.269-1.522-.048 0-.625.299-.625.299s.706 1.495.173 2.61c0 0 .204-1.862-.394-2.502l-.846.496s.825 1.561.266 2.834c0 0 .143-1.955-.446-2.714l-.765.598s.774 1.539.299 2.595c0 0-.063-2.275-.469-2.446a4.75 4.75 0 00-.775.834s.532 1.118.204 1.707c0 0-.204-1.515-.368-1.521 0 0-.67 1.001-.739 1.689a3.671 3.671 0 01.577-1.794 2.007 2.007 0 00-1.025.532s.104-.711 1.196-.771c0 0 .553-.763.699-.81 0 0-1.079-.09-1.734.2 0 0 .577-.67 1.932-.365l.759-.619s-1.423-.194-2.024.021c0 0 .694-.598 2.227-.161l.826-.494a7.445 7.445 0 00-1.935-.164s.763-.413 2.174.033l.598-.263s-.897-.177-1.148-.203c-.252-.027-.275-.099-.275-.099a3.078 3.078 0 011.668.185s1.232-.46 1.208-.538z\"\n />\n\n <ellipse\n cx=\"390.052\"\n cy=\"264.383\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n rx=\"5.044\"\n ry=\"1\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M352.896 262.437s-8.604-.52-7.588 5.51a1.47 1.47 0 00.763 1.549s0-.449.897-.299c.309.052.623.067.935.045a1.923 1.923 0 001.142-.473c.318-.279 2.419-.998 3.361-4.951 0 0 .697-.861.667-1.085l-1.468.622s.496 1.046.104 1.916c0 0-.048-1.877-.326-1.835-.056 0-.753.364-.753.364s.852 1.824.209 3.152c0 0 .245-2.249-.475-3.02l-1.023.598s.996 1.886.32 3.423c0 0 .174-2.359-.535-3.289l-.927.724s.939 1.857.365 3.133c0 0-.072-2.747-.565-2.954 0 0-.81.715-.933 1.008 0 0 .64 1.348.242 2.06 0 0-.245-1.83-.445-1.839 0 0-.804 1.214-.897 2.042.04-.768.28-1.512.697-2.159a2.427 2.427 0 00-1.235.643s.125-.858 1.435-.933c0 0 .667-.92.846-.974 0 0-1.303-.111-2.093.239 0 0 .694-.807 2.329-.44l.915-.747s-1.713-.233-2.442.024c0 0 .837-.715 2.69-.191l.996-.598s-1.462-.314-2.335-.201c0 0 .921-.496 2.625.042l.711-.32s-1.07-.209-1.384-.242c-.314-.033-.329-.119-.329-.119a3.69 3.69 0 012.012.221s1.519-.553 1.492-.646z\"\n />\n\n <ellipse\n cx=\"346.97\"\n cy=\"270.022\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n rx=\"6.09\"\n ry=\"1.028\"\n />\n\n <rect\n width=\"51.026\"\n height=\"91.312\"\n x=\"303.926\"\n y=\"69.211\"\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n rx=\"4.737\"\n transform=\"rotate(-71.99 329.44 114.867)\"\n />\n\n <circle\n cx=\"303.613\"\n cy=\"103.507\"\n r=\"9.376\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.2\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M344.582495 86.4883769L347.150665 86.4883769 347.150665 127.336977 344.582495 127.336977z\"\n opacity=\"0.2\"\n transform=\"rotate(-71.99 345.867 106.913)\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M333.028401 99.6373982L335.596571 99.6373982 335.596571 120.445898 333.028401 120.445898z\"\n opacity=\"0.2\"\n transform=\"rotate(-71.99 334.312 110.042)\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M337.109071 101.431004L339.677241 101.431004 339.677241 135.086304 337.109071 135.086304z\"\n opacity=\"0.2\"\n transform=\"rotate(-71.99 338.393 118.259)\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M338.505494 105.174377L341.073664 105.174377 341.073664 146.022978 338.505494 146.022978z\"\n opacity=\"0.2\"\n transform=\"rotate(-71.99 339.79 125.599)\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M348.060839 134.648161L353.026769 134.648161 353.026769 145.952261 348.060839 145.952261z\"\n opacity=\"0.5\"\n transform=\"rotate(-71.99 350.544 140.3)\"\n />\n\n <rect\n width=\"50.3\"\n height=\"78.305\"\n x=\"291.549\"\n y=\"174.486\"\n fill=\"#FFF\"\n fillRule=\"nonzero\"\n rx=\"4\"\n transform=\"rotate(-57.265 316.7 213.638)\"\n />\n\n <path\n fill=\"#DFE3E8\"\n fillRule=\"nonzero\"\n d=\"M278.038439 203.88874L292.269539 203.88874 292.269539 207.23723 278.038439 207.23723z\"\n transform=\"rotate(-57.57 285.154 205.563)\"\n />\n\n <path\n fill=\"#DFE3E8\"\n fillRule=\"nonzero\"\n d=\"M283.007935 199.201889L314.262535 199.201889 314.262535 202.272339 283.007935 202.272339z\"\n transform=\"rotate(-57.57 298.635 200.737)\"\n />\n\n <path\n fill=\"#DFE3E8\"\n fillRule=\"nonzero\"\n d=\"M288.543935 202.715889L319.798535 202.715889 319.798535 205.786339 288.543935 205.786339z\"\n transform=\"rotate(-57.57 304.171 204.251)\"\n />\n\n <path\n fill=\"#DFE3E8\"\n fillRule=\"nonzero\"\n d=\"M294.078936 206.235889L325.333536 206.235889 325.333536 209.306339 294.078936 209.306339z\"\n transform=\"rotate(-57.57 309.706 207.771)\"\n />\n\n <path\n fill=\"#DFE3E8\"\n fillRule=\"nonzero\"\n d=\"M299.879919 211.40702L331.090719 211.40702 331.090719 214.47316 299.879919 214.47316z\"\n transform=\"rotate(-57.265 315.485 212.94)\"\n />\n\n <path\n fill=\"#F4F6F8\"\n fillRule=\"nonzero\"\n d=\"M305.149936 213.268889L336.404536 213.268889 336.404536 216.339339 305.149936 216.339339z\"\n transform=\"rotate(-57.57 320.777 214.804)\"\n />\n\n <path\n fill=\"#F4F6F8\"\n fillRule=\"nonzero\"\n d=\"M310.685935 216.782889L341.940535 216.782889 341.940535 219.853339 310.685935 219.853339z\"\n transform=\"rotate(-57.57 326.313 218.318)\"\n />\n\n <path\n fill=\"#DFE3E8\"\n fillRule=\"nonzero\"\n d=\"M341.417983 210.406958L349.511163 210.406958 349.511163 218.500138 341.417983 218.500138z\"\n transform=\"rotate(-57.57 345.465 214.454)\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z\"\n />\n\n <path\n fill={PRIMARY_DARK}\n fillRule=\"nonzero\"\n d=\"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z\"\n opacity=\"0.243\"\n />\n\n <path\n fill=\"url(#linearGradient-2)\"\n fillRule=\"nonzero\"\n d=\"M269.277 168.76l-45.767.493a3.127 3.127 0 00-3.094 3.125v3.782a3.127 3.127 0 01-3.05 3.124l-33.024.792a3.124 3.124 0 01-3.095-2.308l-1.551-5.701a3.124 3.124 0 00-3.053-2.308l-44.113.475a3.125 3.125 0 00-3.05 3.648l17.747 104.449a3.129 3.129 0 003.071 2.604l139.363.598a3.129 3.129 0 003.082-3.714l-20.366-106.521a3.125 3.125 0 00-3.1-2.538z\"\n opacity=\"0.32\"\n />\n\n <ellipse\n cx=\"119.593\"\n cy=\"258.664\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n rx=\"4.846\"\n ry=\"1\"\n />\n\n <ellipse\n cx=\"101.03\"\n cy=\"260.545\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n rx=\"4.846\"\n ry=\"1\"\n />\n\n <ellipse\n cx=\"108.459\"\n cy=\"265.905\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n rx=\"3.444\"\n ry=\"1\"\n />\n\n <ellipse\n cx=\"89.193\"\n cy=\"265.433\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n rx=\"3.444\"\n ry=\"1\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M100.925 260.398s6.796-22.279-1.064-31.204c-5.881-6.676-12.557-5.877-15.547-5.052a5.528 5.528 0 00-3.564 2.963c-1.046 2.254-.858 5.913 6.521 10.186 12.35 7.151 13.119 16.96 13.119 16.96l.535 6.147z\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M85.382 227.302s20.031 6.278 15.546 33.096M97.083 229.547s-2.76 1.86-1.88 4.655M87.39 231.203s1.687-1.716 3.741-.768M95.31 239.832s2.963-1.495 3.728.379M102.638 242.962s-2.224-.176-2.263.897\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M101.2 260.575s-7.961-16.193-10.147-15.846c-1.037.17-1.516 1.196-1.734 2.218a6.516 6.516 0 00.434 3.941c1.13 2.601 4.165 7.519 11.447 9.687z\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M91.113 247.808s8.353 12.115 9.968 12.647\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M90.344 249.701L92.293 249.701\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M92.68 254.132L95.738 254.263\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M94.542 250.586L94.21 252.179\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M97.792 255.432L97.732 256.879\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M100.964 260.575s7.959-16.193 10.144-15.846c1.041.17 1.519 1.196 1.734 2.218a6.514 6.514 0 01-.433 3.941c-1.13 2.601-4.168 7.519-11.445 9.687z\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M111.051 247.808s-8.371 12.115-9.97 12.647\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M111.82 249.701L109.871 249.701\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M109.485 254.132L106.426 254.263\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M107.622 250.586L107.954 252.179\"\n />\n\n <path\n stroke={PRIMARY_DARKER}\n strokeLinecap=\"round\"\n strokeWidth=\"0.5\"\n d=\"M104.372 255.432L104.432 256.879\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M87.295 264.357a1.375 1.375 0 01-.452-.685.599.599 0 01.317-.697c.3-.11.598.09.837.299.24.21.512.431.81.38a1.237 1.237 0 01-.382-1.16.47.47 0 01.105-.236c.161-.174.454-.099.648.039.598.43.787 1.264.79 2.018.03-.277.03-.555 0-.831a.853.853 0 01.334-.727.938.938 0 01.476-.114.988.988 0 01.774.222.767.767 0 01-.03.947c-.229.257-.5.474-.801.64a1.805 1.805 0 00-.571.547.399.399 0 00-.042.096h-1.74a4.826 4.826 0 01-1.073-.738zM117.626 257.833a1.355 1.355 0 01-.452-.682.599.599 0 01.314-.696c.299-.111.598.089.837.299.239.209.509.436.817.391a1.236 1.236 0 01-.386-1.157.472.472 0 01.107-.236c.162-.173.455-.099.649.036.613.433.787 1.268.79 2.021a4.008 4.008 0 000-.834.852.852 0 01.299-.736.955.955 0 01.475-.11.998.998 0 01.774.218.768.768 0 01-.033.951 2.996 2.996 0 01-.798.64 1.767 1.767 0 00-.571.544.499.499 0 00-.042.098h-1.701a4.78 4.78 0 01-1.079-.747zM107.518 264.357a1.406 1.406 0 01-.455-.685.6.6 0 01.317-.697c.299-.11.598.09.837.299.239.21.505.437.816.395a1.247 1.247 0 01-.385-1.16.472.472 0 01.107-.236c.162-.174.455-.099.649.039.613.43.783 1.264.789 2.018.03-.277.03-.555 0-.832a.855.855 0 01.314-.735.93.93 0 01.476-.114.988.988 0 01.774.222.764.764 0 01-.033.947 3.028 3.028 0 01-.798.64 1.798 1.798 0 00-.571.547.411.411 0 00-.042.096h-1.734c-.385-.2-.742-.45-1.061-.744z\"\n />\n\n <circle\n cx=\"84.467\"\n cy=\"87.003\"\n r=\"6.467\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n />\n\n <circle\n cx=\"395.425\"\n cy=\"138.681\"\n r=\"6.467\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n />\n\n <circle\n cx=\"279.178\"\n cy=\"66.467\"\n r=\"6.467\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n />\n\n <circle\n cx=\"97.4\"\n cy=\"122.68\"\n r=\"10.838\"\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n opacity=\"0.1\"\n />\n\n <path\n fill={PRIMARY_DARK}\n fillRule=\"nonzero\"\n d=\"M206.029 209.911c-7.975 0-14.44 6.465-14.44 14.44s6.465 14.44 14.44 14.44 14.44-6.465 14.44-14.44-6.465-14.44-14.44-14.44z\"\n />\n\n <path\n fill={PRIMARY_MAIN}\n fillRule=\"nonzero\"\n d=\"M206.029 211.59c7.047 0 12.761 5.714 12.761 12.761 0 7.048-5.714 12.761-12.761 12.761-7.048 0-12.761-5.713-12.761-12.761.006-7.045 5.716-12.754 12.761-12.761\"\n opacity=\"0.72\"\n />\n\n <path\n fill={PRIMARY_DARK}\n fillRule=\"nonzero\"\n d=\"M200.058 225.406l-.699-.681a.721.721 0 010-1.065l6.127-5.984a.753.753 0 01.546-.231c.206 0 .404.083.545.231l6.127 5.978a.733.733 0 010 1.065l-.699.682a.768.768 0 01-1.091 0l-3.622-3.727v8.843a.725.725 0 01-.219.523.76.76 0 01-.534.217h-1.009a.75.75 0 01-.759-.74v-8.832l-3.622 3.726a.768.768 0 01-1.091-.005z\"\n />\n </Box>\n );\n}\n\nexport default memo(UploadIllustration);\n","/* eslint-disable react/function-component-definition */\nimport { useId } from 'react';\nimport { useTheme } from '@mui/material/styles';\n\nexport function BackgroundShape() {\n const theme = useTheme();\n\n const gradientId = useId();\n\n const PRIMARY_MAIN = theme.vars.palette.primary.main;\n\n return (\n <>\n <defs>\n <linearGradient\n id={gradientId}\n x1=\"19.496%\"\n x2=\"77.479%\"\n y1=\"71.822%\"\n y2=\"16.69%\"\n >\n <stop offset=\"0%\" stopColor={PRIMARY_MAIN} />\n <stop offset=\"100%\" stopColor={PRIMARY_MAIN} stopOpacity=\"0\" />\n </linearGradient>\n </defs>\n\n <path\n fill={`url(#${gradientId})`}\n fillRule=\"nonzero\"\n d=\"M0 198.78c0 41.458 14.945 79.236 39.539 107.786 28.214 32.765 69.128 53.365 114.734 53.434a148.44 148.44 0 0056.495-11.036c9.051-3.699 19.182-3.274 27.948 1.107a75.779 75.779 0 0033.957 8.01c5.023 0 9.942-.494 14.7-1.433 13.58-2.67 25.94-8.99 36.09-17.94 6.378-5.627 14.547-8.456 22.897-8.446h.142c27.589 0 53.215-8.732 74.492-23.696 19.021-13.36 34.554-31.696 44.904-53.224C474.92 234.58 480 213.388 480 190.958c0-76.93-59.774-139.305-133.498-139.305-7.516 0-14.88.663-22.063 1.899C305.418 21.42 271.355 0 232.499 0a103.651 103.651 0 00-45.88 10.661c-13.24 6.487-25.011 15.705-34.64 26.939-32.698.544-62.931 11.69-87.676 30.291C25.351 97.155 0 144.882 0 198.781z\"\n opacity=\"0.2\"\n />\n </>\n );\n}\n","import { memo, useMemo } from 'react';\nimport Box from '@mui/material/Box';\nimport Stack from '@mui/material/Stack';\n\nimport ImageCropModal from '../EasyCropModal';\n\nimport DropZone from './components/DropZone';\nimport DropZonePlaceholder from './components/DropZonePlaceholder';\nimport HelperText from './components/HelperText';\nimport MultiFilePreview from './components/MultiFilePreview';\nimport useDropzoneUploader from './hooks/useDropzoneUploader';\nimport useFileUploadService from './hooks/useFileUploadService';\nimport { ExtendFile, MultiImageUploadProps } from './props';\n\nconst MultipleImageUpload = ({\n onRemove,\n onReorder,\n onFilesSelect,\n createFilesMutation,\n filesDetails = [],\n id,\n disabled,\n error,\n helperText,\n dropZoneSxProps,\n placeholderProps,\n placeholderAlt,\n uploading,\n tabIndex,\n maxFiles,\n aspectRatio: customAspectRatio,\n enableCrop = true,\n convertToWebp = true,\n cropSize,\n name,\n label: customLabel,\n keepInvalidFiles = false,\n ...other\n}: MultiImageUploadProps) => {\n const {\n filesPreview,\n isUploadOrLoadingFiles,\n uploadErrorText,\n uploadFiles,\n invalidFiles,\n } = useFileUploadService({\n createFilesMutation,\n filesDetails,\n });\n const isLoading = uploading || isUploadOrLoadingFiles;\n\n const {\n files: originalFiles,\n dropzoneProps,\n cropState,\n aspectRatio,\n handleRemove,\n handleReorder,\n } = useDropzoneUploader({\n onFilesSelect,\n onReorder,\n onRemove,\n filesPreview,\n dropzoneOptions: {\n accept: {\n 'image/*': ['.jpeg', '.jpg', '.png', '.gif', '.webp'],\n },\n multiple: true,\n disabled,\n ...other,\n },\n enableCrop,\n customAspectRatio,\n convertToWebp,\n maxFiles,\n cropSize,\n uploadFiles,\n });\n\n const { getRootProps, getInputProps, isDragActive, isDragReject } =\n dropzoneProps;\n\n const {\n cropModalOpen,\n imagePreview,\n cropLoading,\n onCropInitialized,\n handleCropSave,\n handleCropCancel,\n currentImageIndex,\n totalPendingImages,\n } = cropState;\n\n const files = useMemo(() => {\n if (!keepInvalidFiles) return originalFiles;\n\n const fakeInvalidFiles = invalidFiles.map(file => ({\n ...new File([], file.name ?? 'invalid-file'),\n id: file.id,\n url: 'url.invalid',\n })) as ExtendFile[];\n\n return [...originalFiles, ...fakeInvalidFiles];\n }, [keepInvalidFiles, originalFiles, invalidFiles]);\n\n const hasFiles = !!files?.filter(file => !!file.id).length;\n const isError = isDragReject || !!error || !!uploadErrorText;\n\n const label = useMemo(() => {\n const labelText = customLabel ?? 'Ajustar Imagem';\n const labelProcessing =\n totalPendingImages > 1 || currentImageIndex > 1\n ? ` (${currentImageIndex} de ${totalPendingImages})`\n : '';\n return `${labelText}${labelProcessing}`;\n }, [customLabel, totalPendingImages, currentImageIndex]);\n\n return (\n <DropZone\n id={id}\n name={name}\n uploading={isLoading}\n disabled={disabled}\n dropZoneSxProps={dropZoneSxProps}\n tabIndex={tabIndex}\n getRootProps={getRootProps}\n getInputProps={getInputProps}\n isDragActive={isDragActive}\n isError={isError}\n dropZoneContent={\n <>\n {placeholderAlt ? (\n <Stack>{placeholderAlt}</Stack>\n ) : (\n <DropZonePlaceholder\n header={placeholderProps?.header}\n description={placeholderProps?.description}\n />\n )}\n </>\n }\n >\n <HelperText\n disabled={disabled}\n helperText={helperText}\n isError={isError}\n />\n {error ? <HelperText helperText={error} isError /> : null}\n {uploadErrorText ? (\n <HelperText helperText={uploadErrorText} isError />\n ) : null}\n\n {hasFiles && (\n <Box sx={{ my: 3, ml: 0.5 }}>\n <MultiFilePreview\n files={files}\n thumbnail={true}\n onRemove={handleRemove}\n onReorder={onReorder ? handleReorder : undefined}\n />\n </Box>\n )}\n <ImageCropModal\n open={cropModalOpen}\n onClose={handleCropCancel}\n label={label}\n imageSrc={imagePreview}\n aspectRatio={aspectRatio}\n onInitialized={onCropInitialized}\n onSave={handleCropSave}\n loading={cropLoading}\n cropSize={cropSize}\n />\n </DropZone>\n );\n};\n\nexport default memo(MultipleImageUpload);\n","import { memo, useCallback } from 'react';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\nimport { m } from 'framer-motion';\n\nimport { varFade } from 'components/animate';\nimport { FileThumbnail, useFileUploadService } from 'components/FileUpload';\nimport Icon from 'components/Icon';\nimport Tooltip from 'components/Tooltip';\nimport { fData } from 'utils/formatNumber';\n\nimport DropZone from './components/DropZone';\nimport DropZonePlaceholder from './components/DropZonePlaceholder';\nimport HelperText from './components/HelperText';\nimport useDropzoneUploader from './hooks/useDropzoneUploader';\nimport { SingleFileUploadProps } from './props';\nimport { CloseIconButton } from './styles';\n\nconst SingleFileUpload = ({\n onFileSelect,\n onRemove,\n createFilesMutation,\n fileDetails,\n id,\n disabled,\n error,\n helperText,\n sx,\n dropZoneSxProps,\n uploading,\n tabIndex,\n placeholderAlt,\n placeholderProps,\n ...other\n}: SingleFileUploadProps) => {\n const { filesPreview, isUploadOrLoadingFiles, uploadErrorText, uploadFiles } =\n useFileUploadService({\n createFilesMutation,\n filesDetails: fileDetails ? [fileDetails] : [],\n });\n const isLoading = isUploadOrLoadingFiles || uploading;\n const {\n file,\n dropzoneProps,\n handleRemove: onRemoveFile,\n } = useDropzoneUploader({\n uploadFiles,\n onFileSelect,\n onRemove,\n filesPreview,\n dropzoneOptions: {\n multiple: false,\n disabled,\n ...other,\n },\n });\n\n const { getRootProps, getInputProps, isDragActive, isDragReject } =\n dropzoneProps;\n\n const handleRemove = useCallback(\n (e: React.MouseEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n onRemoveFile(file || undefined);\n },\n [file, onRemoveFile],\n );\n\n const hasFile = !!file;\n const isNotFormatFile = typeof file === 'string';\n const isError = isDragReject || !!error || !!uploadErrorText;\n\n return (\n <DropZone\n id={id}\n uploading={isLoading}\n disabled={disabled}\n dropZoneSxProps={dropZoneSxProps}\n tabIndex={tabIndex}\n getRootProps={getRootProps}\n getInputProps={getInputProps}\n isDragActive={isDragActive}\n isError={isError}\n dropZoneContent={\n <>\n {!hasFile &&\n (placeholderAlt ? (\n <Stack {...placeholderProps}>{placeholderAlt}</Stack>\n ) : (\n <DropZonePlaceholder />\n ))}\n\n {hasFile && (\n <Stack\n component={m.div}\n {...varFade().inUp}\n spacing={2}\n direction=\"row\"\n alignItems=\"center\"\n sx={{\n my: 1,\n px: 1,\n py: 0.75,\n borderRadius: 0.75,\n border: theme => `solid 1px ${theme.palette.divider}`,\n ...sx,\n }}\n >\n <FileThumbnail file={file} />\n\n <Stack flexGrow={1} sx={{ minWidth: 0 }}>\n <Typography variant=\"subtitle2\" noWrap>\n {isNotFormatFile ? file : file.name}\n </Typography>\n\n <Typography variant=\"caption\" sx={{ color: 'text.secondary' }}>\n {isNotFormatFile ? '' : fData(file.size)}\n </Typography>\n </Stack>\n\n {onRemove && (\n <Tooltip title=\"Remover arquivo\">\n <CloseIconButton\n edge=\"end\"\n size=\"small\"\n disabled={disabled}\n aria-label=\"Remover arquivo\"\n onClick={handleRemove}\n >\n <Icon icon=\"DELETE_MARK_BUTTON_02\" width={16} />\n </CloseIconButton>\n </Tooltip>\n )}\n </Stack>\n )}\n </>\n }\n >\n <HelperText\n disabled={disabled}\n helperText={helperText}\n isError={isError}\n />\n {error ? <HelperText helperText={error} isError /> : null}\n {uploadErrorText ? (\n <HelperText helperText={uploadErrorText} isError />\n ) : null}\n </DropZone>\n );\n};\n\nexport default memo(SingleFileUpload);\n","import { CSSProperties, memo, useCallback, useEffect, useState } from 'react';\nimport Stack from '@mui/material/Stack';\n\nimport ImageCropModal from 'components/EasyCropModal';\nimport FixedProgressBar from 'components/FixedProgressBar';\nimport Icon from 'components/Icon';\n\nimport DropZone from './components/DropZone';\nimport DropZonePlaceholder from './components/DropZonePlaceholder';\nimport HelperText from './components/HelperText';\nimport SingleFilePreview from './components/SingleFilePreview';\nimport useDropzoneUploader from './hooks/useDropzoneUploader';\nimport useFileUploadService from './hooks/useFileUploadService';\nimport { SingleImageUploadProps } from './props';\nimport { Container, DeleteButton } from './styles';\n\nconst SingleImageUpload = ({\n onRemove,\n onFileSelect,\n createFilesMutation,\n fileDetails,\n id,\n disabled,\n error,\n helperText,\n dropZoneSxProps,\n placeholderProps,\n placeholderAlt,\n hoverAlt,\n uploading,\n tabIndex,\n aspectRatio: customAspectRatio,\n enableCrop = true,\n convertToWebp = true,\n name,\n label,\n cropSize,\n sx,\n maxWidth,\n maxHeight,\n compressionQuality = 0.8,\n maxCompressedWidth,\n maxCompressedHeight,\n fill,\n ...other\n}: SingleImageUploadProps) => {\n const { filesPreview, isUploadOrLoadingFiles, uploadErrorText, uploadFiles } =\n useFileUploadService({\n createFilesMutation,\n filesDetails: fileDetails ? [fileDetails] : [],\n });\n\n const [imagePreviewLoading, setImagePreviewLoading] = useState(false);\n const {\n file,\n dropzoneProps,\n cropState,\n handleRemove: onRemoveFile,\n aspectRatio,\n } = useDropzoneUploader({\n onFileSelect,\n onRemove,\n dropzoneOptions: {\n accept: {\n 'image/*': ['.jpeg', '.jpg', '.png', '.gif', '.webp'],\n },\n multiple: false,\n disabled,\n ...other,\n },\n filesPreview,\n enableCrop,\n customAspectRatio,\n convertToWebp,\n cropSize,\n uploadFiles,\n compressionQuality,\n maxCompressedWidth,\n maxCompressedHeight,\n });\n\n const { getRootProps, getInputProps, isDragActive, isDragReject } =\n dropzoneProps;\n\n const {\n cropModalOpen,\n imagePreview,\n cropLoading,\n onCropInitialized,\n handleCropSave,\n handleCropCancel,\n } = cropState;\n\n const handleRemove = useCallback(() => {\n onRemoveFile(file || undefined);\n }, [file, onRemoveFile]);\n\n const hasFile = !!file;\n const isError = isDragReject || !!error || !!uploadErrorText;\n const isLoading = uploading || isUploadOrLoadingFiles;\n\n const hidePlaceholder = hasFile ? { opacity: 0 } : { opacity: 1 };\n const dropZoneSxWidth = (dropZoneSxProps as CSSProperties)?.width;\n\n useEffect(() => {\n if (!hasFile) setImagePreviewLoading(false);\n }, [hasFile]);\n\n return (\n <Container\n sx={{\n ...sx,\n ...(dropZoneSxWidth && { width: dropZoneSxWidth }),\n }}\n >\n {(isLoading || imagePreviewLoading) && <FixedProgressBar />}\n <DropZone\n id={id}\n uploading={isLoading}\n disabled={disabled}\n dropZoneSxProps={dropZoneSxProps}\n tabIndex={tabIndex}\n getRootProps={getRootProps}\n getInputProps={getInputProps}\n isDragActive={isDragActive}\n isError={isError}\n name={name}\n dropZoneContent={\n <>\n {placeholderAlt ? (\n <Stack sx={hidePlaceholder}>{placeholderAlt}</Stack>\n ) : (\n <DropZonePlaceholder\n sx={hidePlaceholder}\n header={placeholderProps?.title}\n description={placeholderProps?.description}\n />\n )}\n\n {hasFile && (\n <SingleFilePreview\n file={file}\n cropSize={cropSize}\n isLoading={imagePreviewLoading}\n isUploading={isLoading}\n onLoading={setImagePreviewLoading}\n aspectRatio={aspectRatio}\n maxWidth={maxWidth}\n maxHeight={maxHeight}\n hoverAlt={hoverAlt}\n fill={fill}\n />\n )}\n </>\n }\n >\n <HelperText\n disabled={disabled}\n helperText={helperText}\n isError={isError}\n />\n {error ? <HelperText helperText={error} isError /> : null}\n {uploadErrorText ? (\n <HelperText helperText={uploadErrorText} isError />\n ) : null}\n\n {hasFile && onRemove && (\n <DeleteButton\n size=\"small\"\n onClick={handleRemove}\n disabled={disabled}\n label=\"Remover arquivo\"\n >\n <Icon icon=\"DELETE_MARK_BUTTON_02\" width={16} />\n </DeleteButton>\n )}\n\n <ImageCropModal\n open={cropModalOpen}\n onClose={handleCropCancel}\n label={label ?? 'Ajustar Imagem'}\n imageSrc={imagePreview}\n aspectRatio={aspectRatio}\n onInitialized={onCropInitialized}\n onSave={handleCropSave}\n loading={cropLoading}\n cropSize={cropSize}\n />\n </DropZone>\n </Container>\n );\n};\n\nexport default memo(SingleImageUpload);\n","import { memo, useCallback, useEffect, useRef, useState } from 'react';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\n\nimport ImageCropModal from 'components/EasyCropModal';\nimport Icon from 'components/Icon';\n\nimport HelperText from './components/HelperText';\nimport useDropzoneUploader from './hooks/useDropzoneUploader';\nimport useFileUploadService from './hooks/useFileUploadService';\nimport { SingleImageUploadProps } from './props';\nimport {\n AvatarContainer,\n ImagePreview,\n PlaceholderLoading,\n UploadAvatarBox,\n UploadPlaceholder,\n} from './styles';\n\nconst UploadAvatar = ({\n onRemove,\n onFileSelect,\n createFilesMutation,\n fileDetails,\n disabled,\n label,\n id,\n tabIndex,\n error,\n helperText,\n sx,\n name,\n maxSize,\n uploading,\n aspectRatio = 1,\n enableCrop = true,\n convertToWebp = true,\n cropSize,\n ...other\n}: SingleImageUploadProps) => {\n const [imagePreviewLoading, setImagePreviewLoading] = useState(false);\n const { filesPreview, isUploadOrLoadingFiles, uploadErrorText, uploadFiles } =\n useFileUploadService({\n createFilesMutation,\n filesDetails: fileDetails ? [fileDetails] : [],\n });\n\n const {\n file,\n dropzoneProps,\n cropState,\n handleRemove: onRemoveFile,\n } = useDropzoneUploader({\n filesPreview,\n onFileSelect,\n onRemove,\n dropzoneOptions: {\n accept: {\n 'image/*': ['.jpeg', '.jpg', '.png', '.gif', '.webp'],\n },\n multiple: false,\n disabled,\n maxSize,\n ...other,\n },\n enableCrop,\n customAspectRatio: aspectRatio,\n convertToWebp,\n cropSize,\n uploadFiles,\n });\n\n const { getRootProps, getInputProps, isDragActive, isDragReject } =\n dropzoneProps;\n const {\n cropModalOpen,\n imagePreview,\n cropLoading,\n onCropInitialized,\n handleCropSave,\n handleCropCancel,\n } = cropState;\n\n const isError = isDragReject || !!error || !!uploadErrorText;\n const isLoading = imagePreviewLoading || isUploadOrLoadingFiles || uploading;\n const canRemove = !!onRemove;\n\n const imgSrc = useRef(fileDetails?.url || '');\n const loadedFileKey = useRef<string | number | undefined>(undefined);\n\n useEffect(() => {\n if (!file) {\n imgSrc.current = '';\n loadedFileKey.current = undefined;\n return;\n }\n\n if (loadedFileKey.current === file.id) return;\n loadedFileKey.current = file.id;\n setImagePreviewLoading(true);\n const objectUrl = URL.createObjectURL(file);\n imgSrc.current = objectUrl;\n\n return () => {\n URL.revokeObjectURL(objectUrl);\n };\n }, [file]);\n\n const handleImageLoad = () => {\n setImagePreviewLoading(false);\n };\n\n const handleClick = useCallback(() => {\n if (canRemove && file) {\n return () => onRemoveFile(file);\n }\n\n return getRootProps().onClick;\n }, [canRemove, file, getRootProps, onRemoveFile]);\n\n return (\n <>\n <Stack sx={{ alignItems: 'center' }}>\n <UploadAvatarBox\n sx={sx}\n isError={isError}\n isDragActive={isDragActive}\n hasFile={!!file}\n {...getRootProps()}\n onClick={handleClick()}\n >\n <AvatarContainer>\n {isLoading && (\n <PlaceholderLoading>\n <CircularProgress size={135} thickness={2} color=\"primary\" />\n </PlaceholderLoading>\n )}\n\n {file && (\n <ImagePreview\n alt=\"Avatar Preview\"\n src={imgSrc.current}\n onLoad={handleImageLoad}\n {...(isLoading && {\n sx: {\n filter: 'blur(5px) !important',\n scale: 1.2,\n opacity: 0.7,\n },\n })}\n />\n )}\n\n {!file && !isLoading && (\n <UploadPlaceholder isError={isError} hasFile={false}>\n <Icon icon=\"ADD_IMAGE\" width={32} />\n\n <Typography\n variant=\"caption\"\n textAlign=\"center\"\n sx={{ color: isError ? 'error.main' : 'text.disabled' }}\n >\n Adicionar foto\n </Typography>\n </UploadPlaceholder>\n )}\n\n {file && !isLoading && (\n <UploadPlaceholder isError={isError} hasFile={true}>\n <Icon\n icon={!canRemove ? 'ADD_IMAGE' : 'DELETE_MARK_BUTTON_02'}\n width={32}\n />\n\n <Typography\n variant=\"caption\"\n textAlign=\"center\"\n sx={{ color: isError ? 'error.main' : 'common.white' }}\n >\n {!canRemove ? 'Alterar foto' : 'Remover foto'}\n </Typography>\n </UploadPlaceholder>\n )}\n </AvatarContainer>\n <input name={name} id={id} tabIndex={tabIndex} {...getInputProps()} />\n </UploadAvatarBox>\n\n <Stack sx={{ alignItems: 'center', mt: -0.5 }}>\n <HelperText\n helperText={helperText}\n disabled={disabled}\n isError={isError}\n />\n </Stack>\n {uploadErrorText ? (\n <HelperText helperText={uploadErrorText} isError />\n ) : null}\n {error ? <HelperText helperText={error} isError /> : null}\n </Stack>\n\n {cropModalOpen && imagePreview && (\n <ImageCropModal\n open={cropModalOpen}\n onClose={handleCropCancel}\n label={label ?? 'Ajustar Imagem'}\n imageSrc={imagePreview}\n aspectRatio={aspectRatio}\n onInitialized={onCropInitialized}\n onSave={handleCropSave}\n loading={cropLoading}\n cropSize={cropSize}\n cropShape=\"round\"\n />\n )}\n </>\n );\n};\n\nexport default memo(UploadAvatar);\n","import { memo } from 'react';\nimport { useDropzone } from 'react-dropzone';\n\nimport { SingleFileUploadProps } from './props';\nimport { BoxUpload } from './styles';\n\nconst UploadBox = ({\n error,\n name,\n disabled,\n sx,\n ...other\n}: SingleFileUploadProps) => {\n const { getRootProps, getInputProps, isDragActive, isDragReject } =\n useDropzone({\n disabled,\n ...other,\n });\n\n const hasError = isDragReject || error;\n\n return (\n <BoxUpload\n {...getRootProps()}\n isDragActive={isDragActive}\n hasError={!!hasError}\n disabled={!!disabled}\n sx={sx}\n data-testid=\"upload-box\"\n >\n <input name={name} {...getInputProps()} />\n Selecionar arquivo\n </BoxUpload>\n );\n};\n\nexport default memo(UploadBox);\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { H as HelperTextProps, c as MultiFilePreviewProps, d as SingleFilePreviewProps, e as FileThumbnailProps, U as UseDropzoneUploaderProps, f as UseDropzoneUploaderReturn, g as FileUploadProps, E as ExtendFile, b as MultiFileUploadProps, M as MultiImageUploadProps, a as SingleFileUploadProps, S as SingleImageUploadProps } from '../../types-
|
|
4
|
-
export { C as ContentType, l as CreateFilesMutation, k as CropSize, D as DropZoneProps,
|
|
3
|
+
import { H as HelperTextProps, c as MultiFilePreviewProps, d as SingleFilePreviewProps, e as FileThumbnailProps, U as UseDropzoneUploaderProps, f as UseDropzoneUploaderReturn, g as FileUploadProps, E as ExtendFile, h as FileDetails, b as MultiFileUploadProps, M as MultiImageUploadProps, a as SingleFileUploadProps, S as SingleImageUploadProps } from '../../types-5c87e7bf.js';
|
|
4
|
+
export { C as ContentType, l as CreateFilesMutation, k as CropSize, D as DropZoneProps, i as FileContentType, m as FileCreateRequest, n as FileCreateResponse, F as FileGetResponse, o as FileQueryRequest, p as FileQueryResponse, j as FileUpload, L as LoadingPreviewImageProps, P as PlaceholderProps, R as RejectionFilesProps, q as SortableItemProps, r as StyledDropZoneProps, s as StyledDropZonePropsType, T as ThumbnailBadgeProps } from '../../types-5c87e7bf.js';
|
|
5
5
|
import '@mui/material/Stack';
|
|
6
6
|
import '@mui/material/styles';
|
|
7
7
|
import 'react-dropzone';
|
|
@@ -41,11 +41,12 @@ declare const useFileUploadService: ({ createFilesMutation, filesDetails, }: Fil
|
|
|
41
41
|
isUploadingFiles: boolean;
|
|
42
42
|
isUploadOrLoadingFiles: boolean;
|
|
43
43
|
uploadErrorText: string;
|
|
44
|
+
invalidFiles: FileDetails[];
|
|
44
45
|
};
|
|
45
46
|
|
|
46
47
|
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>;
|
|
47
48
|
|
|
48
|
-
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>;
|
|
49
|
+
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, keepInvalidFiles, ...other }: MultiImageUploadProps) => react_jsx_runtime.JSX.Element>;
|
|
49
50
|
|
|
50
51
|
declare const _default$3: react.MemoExoticComponent<({ onFileSelect, onRemove, createFilesMutation, fileDetails, id, disabled, error, helperText, sx, dropZoneSxProps, uploading, tabIndex, placeholderAlt, placeholderProps, ...other }: SingleFileUploadProps) => react_jsx_runtime.JSX.Element>;
|
|
51
52
|
|
|
@@ -61,4 +62,4 @@ declare const compressImageWithoutCrop: (file: File, quality?: number, maxWidth?
|
|
|
61
62
|
declare const getFileNameFromContentDisposition: (contentDisposition: string) => string;
|
|
62
63
|
declare const encodeFilenameForHeader: (filename: string) => string;
|
|
63
64
|
|
|
64
|
-
export { ExtendFile, FileThumbnail, FileThumbnailProps, FileUploadProps, _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, fileFormatByMimeType, fileFormatByName, fileNameByUrl, fileThumb, fileThumbnailClasses, fileTypeByUrl, getFileNameFromContentDisposition, isImageFile, useDropzoneUploader, useFileUploadService };
|
|
65
|
+
export { ExtendFile, FileDetails, FileThumbnail, FileThumbnailProps, FileUploadProps, _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, fileFormatByMimeType, fileFormatByName, fileNameByUrl, fileThumb, fileThumbnailClasses, fileTypeByUrl, getFileNameFromContentDisposition, isImageFile, useDropzoneUploader, useFileUploadService };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { r as ContentType, s as FileContentType, k as FileThumbnail, a as HelperText, b as MultiFilePreview, u as MultipleFileUpload, v as MultipleImageUpload, c as SingleFilePreview, w as SingleFileUpload, x as SingleImageUpload, y as UploadAvatar, z as UploadSimpleBox, n as compressImageWithoutCrop, m as convertToWebP, p as encodeFilenameForHeader, f as fileFormat, d as fileFormatByMimeType, e as fileFormatByName, i as fileNameByUrl, g as fileThumb, j as fileThumbnailClasses, h as fileTypeByUrl, o as getFileNameFromContentDisposition, l as isImageFile, q as useDropzoneUploader, t as useFileUploadService } from '../../chunk-
|
|
1
|
+
export { r as ContentType, s as FileContentType, k as FileThumbnail, a as HelperText, b as MultiFilePreview, u as MultipleFileUpload, v as MultipleImageUpload, c as SingleFilePreview, w as SingleFileUpload, x as SingleImageUpload, y as UploadAvatar, z as UploadSimpleBox, n as compressImageWithoutCrop, m as convertToWebP, p as encodeFilenameForHeader, f as fileFormat, d as fileFormatByMimeType, e as fileFormatByName, i as fileNameByUrl, g as fileThumb, j as fileThumbnailClasses, h as fileTypeByUrl, o as getFileNameFromContentDisposition, l as isImageFile, q as useDropzoneUploader, t as useFileUploadService } from '../../chunk-ZLLJ2NCY.js';
|
|
2
2
|
import '../../chunk-U5YMUW4E.js';
|
|
3
3
|
import '../../chunk-TS23ND2I.js';
|
|
4
4
|
import '../../chunk-FPZ25CEJ.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { RegisterOptions } from 'react-hook-form';
|
|
3
|
-
import { F as FileGetResponse, S as SingleImageUploadProps, M as MultiImageUploadProps, a as SingleFileUploadProps, b as MultiFileUploadProps } from '../../../types-
|
|
3
|
+
import { F as FileGetResponse, S as SingleImageUploadProps, M as MultiImageUploadProps, a as SingleFileUploadProps, b as MultiFileUploadProps } from '../../../types-5c87e7bf.js';
|
|
4
4
|
import '@mui/material/Stack';
|
|
5
5
|
import '@mui/material/styles';
|
|
6
6
|
import 'react-dropzone';
|
|
@@ -105,6 +105,7 @@ interface SingleFileUploadProps extends DropzoneOptions {
|
|
|
105
105
|
uploading?: boolean;
|
|
106
106
|
tabIndex?: number;
|
|
107
107
|
maxSize?: number;
|
|
108
|
+
keepInvalidFiles?: boolean;
|
|
108
109
|
}
|
|
109
110
|
interface SingleImageUploadProps extends SingleFileUploadProps {
|
|
110
111
|
aspectRatio?: number;
|
|
@@ -349,4 +350,4 @@ type FileThumbnailProps = StackProps & {
|
|
|
349
350
|
};
|
|
350
351
|
};
|
|
351
352
|
|
|
352
|
-
export { ContentType as C, DropZoneProps as D, ExtendFile as E, FileGetResponse as F, HelperTextProps as H, LoadingPreviewImageProps as L, MultiImageUploadProps as M, PlaceholderProps as P, RejectionFilesProps as R, SingleImageUploadProps as S, ThumbnailBadgeProps as T, UseDropzoneUploaderProps as U, SingleFileUploadProps as a, MultiFileUploadProps as b, MultiFilePreviewProps as c, SingleFilePreviewProps as d, FileThumbnailProps as e, UseDropzoneUploaderReturn as f, FileUploadProps as g,
|
|
353
|
+
export { ContentType as C, DropZoneProps as D, ExtendFile as E, FileGetResponse as F, HelperTextProps as H, LoadingPreviewImageProps as L, MultiImageUploadProps as M, PlaceholderProps as P, RejectionFilesProps as R, SingleImageUploadProps as S, ThumbnailBadgeProps as T, UseDropzoneUploaderProps as U, SingleFileUploadProps as a, MultiFileUploadProps as b, MultiFilePreviewProps as c, SingleFilePreviewProps as d, FileThumbnailProps as e, UseDropzoneUploaderReturn as f, FileUploadProps as g, FileDetails as h, FileContentType as i, FileUpload as j, CropSize as k, CreateFilesMutation as l, FileCreateRequest as m, FileCreateResponse as n, FileQueryRequest as o, FileQueryResponse as p, SortableItemProps as q, StyledDropZoneProps as r, StyledDropZonePropsType as s };
|