From 8bd8216c8821c48455edc7dce1de174b1b0216d0 Mon Sep 17 00:00:00 2001 From: rouftomb Date: Sat, 31 Dec 2022 22:17:22 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20release=20v0.4.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/index.esm.js | 2 +- dist/index.esm.js.map | 2 +- dist/index.umd.js | 2 +- dist/index.umd.js.map | 2 +- package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/index.esm.js b/dist/index.esm.js index bee35cc..417764e 100644 --- a/dist/index.esm.js +++ b/dist/index.esm.js @@ -386,7 +386,7 @@ function FileUpload(props) { setAction(null); } if (onFilesChange) { - onFilesChange(_toConsumableArray(files)); + onFilesChange(getBase64 ? files : originalFiles); onContextReady(getContext()); } // eslint-disable-next-line diff --git a/dist/index.esm.js.map b/dist/index.esm.js.map index 311b086..04a9a94 100644 --- a/dist/index.esm.js.map +++ b/dist/index.esm.js.map @@ -1 +1 @@ -{"version":3,"file":"index.esm.js","sources":["../src/FileAttachment.jsx","../src/FileUpload.jsx"],"sourcesContent":["import React from 'react'\nimport PropTypes from 'prop-types'\nimport { useTheme } from '@mui/material/styles'\nimport {Typography, Avatar, IconButton, Box} from \"@mui/material\"\nimport CloseIcon from \"@mui/icons-material/Close\"\nimport ArchiveOutlinedIcon from '@mui/icons-material/ArchiveOutlined'\nimport PlayCircleOutlineIcon from '@mui/icons-material/PlayCircleOutline'\nimport InsertDriveFileOutlinedIcon from '@mui/icons-material/InsertDriveFileOutlined'\n\nfunction FileAttachment (props) {\n const {\n size,\n file,\n index,\n disabled,\n hanfleRemoveFile\n } = props\n const theme = useTheme()\n let icon = \n\n // Set icon for compressed files\n if (/\\.(g?zip|tar|gz|rar)$/i.test(file?.name)) {\n icon = \n }\n\n // Set icon for media files\n if (/\\.(mp.|midi|mkv|avi)$/i.test(file?.name)) {\n icon = \n }\n \n return (\n \n \n \n {icon}\n \n \n \n {file?.name}\n \n \n {size} | {file?.extension?.toLowerCase()}\n \n \n \n\n \n hanfleRemoveFile(index)}\n >\n \n \n \n \n )\n}\n\nFileAttachment.propTypes = {\n size: PropTypes.string.isRequired,\n file: PropTypes.object.isRequired,\n index: PropTypes.number.isRequired,\n disabled: PropTypes.bool,\n hanfleRemoveFile: PropTypes.func.isRequired\n}\n\nexport default FileAttachment","import React, { useState, useRef, useEffect, useCallback } from 'react'\nimport PropTypes from 'prop-types'\nimport {\n Button,\n Grid,\n Alert,\n Paper,\n Box,\n Hidden,\n Typography,\n useMediaQuery,\n} from '@mui/material'\nimport FileAttachment from \"./FileAttachment.jsx\"\nimport { useTheme, styled } from '@mui/material/styles'\nimport uploadImage from '../public/Files And Folder_Two Color_2.svg'\n\nconst StyledContainer = styled(Typography)(({ theme }) => ({\n \"&::-webkit-scrollbar\": {\n width: 7,\n height: 6\n },\n \"&::-webkit-scrollbar-track\": {\n WebkitBoxShadow: \"inset 0 0 6px rgb(125, 161, 196, 0.5)\"\n },\n \"&::-webkit-scrollbar-thumb\": {\n WebkitBorderRadius: 4,\n borderRadius: 4,\n background: \"rgba(0, 172, 193, .5)\",\n WebkitBoxShadow: \"inset 0 0 6px rgba(25, 118, 210, .5)\"\n },\n \"&::-webkit-scrollbar-thumb:window-inactive\": {\n background: \"rgba(125, 161, 196, 0.5)\"\n }\n}))\n\nconst oneMega = 1024 * 1024\n\n/**\n * @name FileUpload\n * @description Upload file component wrapper\n * @param props object\n * @returns React.Component\n */\nfunction FileUpload(props) {\n const {\n title,\n header,\n onError,\n disabled,\n imageSrc,\n getBase64,\n imageSrcAlt,\n multiFile,\n leftLabel,\n rightLabel,\n buttonLabel,\n maxFileSize,\n /*\n * @deprecated Since version 0.3.0, please use BannerProps instead. Will be delete in next release\n */\n bannerProps,\n BannerProps,\n acceptedType,\n defaultFiles,\n onFilesChange,\n maxUploadFiles,\n /*\n * @deprecated Since version 0.3.0, , please use ContainerProps instead. Will be delete in next release\n */\n containerProps,\n ContainerProps,\n onContextReady,\n errorSizeMessage,\n allowedExtensions,\n buttonRemoveLabel,\n filesContainerHeight,\n maxFilesContainerHeight,\n /*\n * @deprecated Since version 0.3.0, , please use PlaceholderImageDimension instead. Will be delete in next release\n */\n placeholderImageDimension,\n PlaceholderImageDimension,\n } = props\n\n const theme = useTheme()\n\n const bannnerCompatibilityProps = { ...bannerProps, ...BannerProps }\n const containerCompatibilityProps = { ...containerProps, ...ContainerProps }\n const placeholderCompatibilityProps = {\n ...placeholderImageDimension,\n ...PlaceholderImageDimension\n }\n\n\n const [error, setError] = useState()\n const [action, setAction] = useState()\n const [animate, setAnimate] = useState()\n const [files, setFiles] = useState([])\n const [originalFiles, setOriginalFiles] = useState([])\n\n const inputRef = useRef()\n const filesCardRef = useRef()\n let imageDimension = { width: 128, height: 128 }\n\n if (useMediaQuery(theme.breakpoints.up('xs')) && placeholderCompatibilityProps?.xs) {\n imageDimension = placeholderCompatibilityProps.xs\n }\n\n if (useMediaQuery(theme.breakpoints.up('sm')) && placeholderCompatibilityProps?.sm) {\n imageDimension = placeholderCompatibilityProps.sm\n }\n\n if (useMediaQuery(theme.breakpoints.up('md')) && placeholderCompatibilityProps?.md) {\n imageDimension = placeholderCompatibilityProps.md\n }\n\n if (useMediaQuery(theme.breakpoints.up('lg')) && placeholderCompatibilityProps?.lg) {\n imageDimension = placeholderCompatibilityProps.lg\n }\n\n /**\n * @name addFile\n * @description\n * @param event\n * @param filesTab\n * @returns void\n */\n const addFile = (event, filesTab) => {\n setAnimate(false)\n setError(null)\n\n if (!filesTab && event?.target?.files) {\n filesTab = event?.target?.files\n }\n\n if (!filesTab || filesTab.length === 0) {\n return onError(`Empty file input`)\n }\n\n if (maxUploadFiles) {\n if (maxUploadFiles - files.length <= 0) {\n setError(`You cannot attach more than ${maxUploadFiles} files`)\n return onError(`You cannot attach more than ${maxUploadFiles} files`)\n }\n }\n\n if (window.File && window.FileReader && window.FileList && window.Blob) {\n try {\n\n for (let i = 0; i < filesTab?.length; i++) {\n let file = filesTab[i]\n let reader = new FileReader()\n let extension = file?.type?.split('/')[1]\n\n if (maxFileSize && maxFileSize > 0) {\n if (file.size > (1024 * 1024 * maxFileSize)) {\n let message = (\n errorSizeMessage\n || `The size of files cannot exceed ${maxFileSize}Mb`\n )\n\n setError(message)\n onError(message)\n //break\n continue\n }\n }\n\n if (allowedExtensions?.length > 0) {\n let isAllowed = allowedExtensions\n .findIndex(\n ext => ext?.toLowerCase() === extension.toLowerCase()\n ) !== -1\n\n if (!isAllowed) {\n let message = `Extension .${extension} has been excluded`\n setError(message)\n onError(message)\n continue\n }\n }\n\n if (!getBase64) {\n originalFiles.push(file)\n setOriginalFiles(originalFiles)\n }\n\n reader.addEventListener(\"load\", function () {\n let obj = {\n name: file.name,\n size: file.size,\n path: this.result,\n contentType: file.type,\n lastModified: file.lastModified,\n extension: extension?.toLowerCase()\n }\n\n files.push(obj)\n setFiles([ ...files ])\n }, false)\n\n reader.readAsDataURL(file)\n }\n\n event.target.value = ''\n\n } catch (e) {\n setError(e.toString())\n }\n }\n }\n\n /**\n * @name removeFile\n * @description\n * @param index\n * @returns void\n */\n const removeFile = (index) => {\n setError(null)\n\n inputRef.current.value = ''\n\n if (typeof index !== 'number') {\n setOriginalFiles([])\n return setFiles([])\n }\n\n if (index < 0 || index > files.length-1) {\n return console.error(\"item's index not found...\")\n }\n\n files?.splice(index, 1)\n originalFiles?.splice(index, 1)\n\n setFiles([ ...files ])\n setOriginalFiles([ ...originalFiles ])\n }\n\n /**\n * @name handleDragEnter\n * @description\n * @returns void\n */\n const handleDragEnter = useCallback((event) => {\n event.preventDefault()\n setAnimate(true)\n }, [])\n\n /**\n * @name handleDragOver\n * @description\n * @returns void\n */\n const handleDragOver = useCallback((event) => {\n event.stopPropagation()\n event.preventDefault()\n }, [])\n\n /**\n * @name handleDrop\n * @description\n * @returns void\n */\n const handleDrop = useCallback((event) => {\n event.stopPropagation()\n event.preventDefault()\n\n setAnimate(false)\n\n setAction({\n event,\n files: event.dataTransfer?.files,\n })\n }, [])\n\n /**\n * @name handleDragLeave\n * @description\n * @returns void\n */\n const handleDragLeave = useCallback(() => {\n setAnimate(false)\n }, [])\n\n const getContext = () => ({\n addFile: addFile,\n removeFile: removeFile,\n input: inputRef.current,\n files: getBase64 ? files : originalFiles\n })\n\n useEffect(() => {\n if (\n inputRef.current\n && onContextReady\n && typeof onContextReady === 'function') {\n onContextReady(getContext())\n }\n // eslint-disable-next-line\n }, [inputRef.current])\n\n useEffect(() => {\n let dragDiv = filesCardRef.current\n\n if (dragDiv && !dragDiv.ondrop && !disabled) {\n dragDiv.ondrop = handleDrop\n dragDiv.ondragend = handleDragLeave\n dragDiv.ondragover = handleDragOver\n dragDiv.ondragenter = handleDragEnter\n }\n // eslint-disable-next-line\n }, [filesCardRef.current])\n\n useEffect(() => {\n if (\n defaultFiles?.length > 0\n && files?.length !== defaultFiles?.length) {\n setFiles(defaultFiles)\n }\n // eslint-disable-next-line\n }, [defaultFiles])\n\n useEffect(() => {\n if (action?.event && action?.files) {\n addFile(action.event, action.files)\n setAction(null)\n }\n\n if (onFilesChange) {\n onFilesChange([ ...files ])\n onContextReady(getContext())\n }\n // eslint-disable-next-line\n }, [files, action])\n\n const background = animate ?\n theme.palette.secondary.light : theme.palette.primary.light\n\n return (\n \n \n \n {title}\n \n\n {files?.length > 0 &&\n \n {files.length}\n\n {maxUploadFiles > 0 &&\n `/${maxUploadFiles}`} file{files?.length > 0 && 's'} joined\n }\n \n\n \n \n \n \n \n \n \n \n {header}\n \n \n \n \n {header}\n \n \n \n {leftLabel}\n inputRef.current?.click()}\n sx={{\n m: .5,\n color: theme.palette.grey[\"50\"],\n borderColor: theme.palette.grey[\"50\"],\n '&:hover': {\n borderColor: theme.palette.grey[\"50\"]\n }\n }}\n >\n {buttonLabel}\n \n {rightLabel}\n \n \n \n \n \n\n {error &&\n setError(null)}\n >\n {error}\n }\n\n {files?.length > 0 &&\n \n \n {files?.map((file, index) => {\n let size = file.size\n\n if (size > oneMega) {\n size = (file.size/oneMega).toFixed(2) + ' Mb'\n } else {\n size = (file.size/1024).toFixed(2) + ' Kb'\n }\n\n return (\n \n )\n })}\n \n\n \n \n {buttonRemoveLabel || 'Remove all'}\n \n \n }\n \n )\n}\n\nFileUpload.propTypes = {\n getBase64: PropTypes.bool,\n maxUploadFiles: PropTypes.number,\n title: PropTypes.string,\n header: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.instanceOf(React.Component),\n ]),\n leftLabel: PropTypes.string,\n rightLabel: PropTypes.string,\n buttonLabel: PropTypes.string,\n multiFile: PropTypes.bool,\n disabled: PropTypes.bool,\n maxFileSize: PropTypes.number,\n maxFilesContainerHeight: PropTypes.number,\n errorSizeMessage: PropTypes.string,\n imageSrc: PropTypes.string,\n imageSrcAlt: PropTypes.string,\n acceptedType: PropTypes.string,\n bannerProps: PropTypes.object,\n BannerProps: PropTypes.object,\n containerProps: PropTypes.object,\n ContainerProps: PropTypes.object,\n allowedExtensions: PropTypes.array,\n onError: PropTypes.func,\n onContextReady: PropTypes.func,\n onFilesChange: PropTypes.func,\n placeholderImageDimension: PropTypes.object,\n PlaceholderImageDimension: PropTypes.object,\n}\n\nFileUpload.defaultProps = {\n getBase64: false,\n multiFile: true,\n maxFileSize: 0,\n maxUploadFiles: 0,\n acceptedType: \"*/*\",\n allowedExtensions: [],\n title: \"My awesome file uploader\",\n header: \">[Drag to drop]<\",\n leftLabel: \"or\",\n rightLabel: \"to select files\",\n buttonLabel: \"click here\",\n imageSrcAlt: \"Placeholder image\",\n maxFilesContainerHeight: 300,\n placeholderImageDimension: {},\n PlaceholderImageDimension: {},\n bannerProps: {},\n BannerProps: {},\n containerProps: {},\n ContainerProps: {},\n}\n\nexport default FileUpload\n"],"names":["FileAttachment","props","size","file","index","disabled","hanfleRemoveFile","theme","useTheme","icon","test","name","mb","display","alignItems","backgroundColor","palette","action","hover","flexGrow","path","m","width","height","background","extension","toLowerCase","mr","textAlign","propTypes","PropTypes","string","isRequired","object","number","bool","func","StyledContainer","styled","Typography","WebkitBoxShadow","WebkitBorderRadius","borderRadius","oneMega","FileUpload","title","header","onError","imageSrc","getBase64","imageSrcAlt","multiFile","leftLabel","rightLabel","buttonLabel","maxFileSize","bannerProps","BannerProps","acceptedType","defaultFiles","onFilesChange","maxUploadFiles","containerProps","ContainerProps","onContextReady","errorSizeMessage","allowedExtensions","buttonRemoveLabel","filesContainerHeight","maxFilesContainerHeight","placeholderImageDimension","PlaceholderImageDimension","bannnerCompatibilityProps","containerCompatibilityProps","placeholderCompatibilityProps","useState","error","setError","setAction","animate","setAnimate","files","setFiles","originalFiles","setOriginalFiles","inputRef","useRef","filesCardRef","imageDimension","useMediaQuery","breakpoints","up","xs","sm","md","lg","addFile","event","filesTab","target","length","window","File","FileReader","FileList","Blob","i","reader","type","split","message","isAllowed","findIndex","ext","push","addEventListener","obj","result","contentType","lastModified","readAsDataURL","value","e","toString","removeFile","current","console","splice","handleDragEnter","useCallback","preventDefault","handleDragOver","stopPropagation","handleDrop","dataTransfer","handleDragLeave","getContext","input","useEffect","dragDiv","ondrop","ondragend","ondragover","ondragenter","secondary","light","primary","p","fontSize","transition","mt","uploadImage","color","click","grey","borderColor","overflowY","pr","maxHeight","map","toFixed","oneOfType","instanceOf","React","Component","array","defaultProps"],"mappings":";;;;;;;;;;;;;AASA,SAASA,cAAc,CAAEC,KAAK,EAAE;AAAA,EAAA,IAAA,eAAA,CAAA;AAC9B,EAAA,IACEC,IAAI,GAKFD,KAAK,CALPC,IAAI;IACJC,IAAI,GAIFF,KAAK,CAJPE,IAAI;IACJC,KAAK,GAGHH,KAAK,CAHPG,KAAK;IACLC,QAAQ,GAENJ,KAAK,CAFPI,QAAQ;IACRC,gBAAgB,GACdL,KAAK,CADPK,gBAAgB,CAAA;EAElB,IAAMC,KAAK,GAAGC,QAAQ,EAAE,CAAA;EACxB,IAAIC,IAAI,gBAAG,KAAA,CAAA,aAAA,CAAC,2BAA2B,EAAA;AAAC,IAAA,K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"index.esm.js","sources":["../src/FileAttachment.jsx","../src/FileUpload.jsx"],"sourcesContent":["import React from 'react'\nimport PropTypes from 'prop-types'\nimport { useTheme } from '@mui/material/styles'\nimport {Typography, Avatar, IconButton, Box} from \"@mui/material\"\nimport CloseIcon from \"@mui/icons-material/Close\"\nimport ArchiveOutlinedIcon from '@mui/icons-material/ArchiveOutlined'\nimport PlayCircleOutlineIcon from '@mui/icons-material/PlayCircleOutline'\nimport InsertDriveFileOutlinedIcon from '@mui/icons-material/InsertDriveFileOutlined'\n\nfunction FileAttachment (props) {\n const {\n size,\n file,\n index,\n disabled,\n hanfleRemoveFile\n } = props\n const theme = useTheme()\n let icon = \n\n // Set icon for compressed files\n if (/\\.(g?zip|tar|gz|rar)$/i.test(file?.name)) {\n icon = \n }\n\n // Set icon for media files\n if (/\\.(mp.|midi|mkv|avi)$/i.test(file?.name)) {\n icon = \n }\n \n return (\n \n \n \n {icon}\n \n \n \n {file?.name}\n \n \n {size} | {file?.extension?.toLowerCase()}\n \n \n \n\n \n hanfleRemoveFile(index)}\n >\n \n \n \n \n )\n}\n\nFileAttachment.propTypes = {\n size: PropTypes.string.isRequired,\n file: PropTypes.object.isRequired,\n index: PropTypes.number.isRequired,\n disabled: PropTypes.bool,\n hanfleRemoveFile: PropTypes.func.isRequired\n}\n\nexport default FileAttachment","import React, { useState, useRef, useEffect, useCallback } from 'react'\nimport PropTypes from 'prop-types'\nimport {\n Button,\n Grid,\n Alert,\n Paper,\n Box,\n Hidden,\n Typography,\n useMediaQuery,\n} from '@mui/material'\nimport FileAttachment from \"./FileAttachment.jsx\"\nimport { useTheme, styled } from '@mui/material/styles'\nimport uploadImage from '../public/Files And Folder_Two Color_2.svg'\n\nconst StyledContainer = styled(Typography)(({ theme }) => ({\n \"&::-webkit-scrollbar\": {\n width: 7,\n height: 6\n },\n \"&::-webkit-scrollbar-track\": {\n WebkitBoxShadow: \"inset 0 0 6px rgb(125, 161, 196, 0.5)\"\n },\n \"&::-webkit-scrollbar-thumb\": {\n WebkitBorderRadius: 4,\n borderRadius: 4,\n background: \"rgba(0, 172, 193, .5)\",\n WebkitBoxShadow: \"inset 0 0 6px rgba(25, 118, 210, .5)\"\n },\n \"&::-webkit-scrollbar-thumb:window-inactive\": {\n background: \"rgba(125, 161, 196, 0.5)\"\n }\n}))\n\nconst oneMega = 1024 * 1024\n\n/**\n * @name FileUpload\n * @description Upload file component wrapper\n * @param props object\n * @returns React.Component\n */\nfunction FileUpload(props) {\n const {\n title,\n header,\n onError,\n disabled,\n imageSrc,\n getBase64,\n imageSrcAlt,\n multiFile,\n leftLabel,\n rightLabel,\n buttonLabel,\n maxFileSize,\n /*\n * @deprecated Since version 0.3.0, please use BannerProps instead. Will be delete in next release\n */\n bannerProps,\n BannerProps,\n acceptedType,\n defaultFiles,\n onFilesChange,\n maxUploadFiles,\n /*\n * @deprecated Since version 0.3.0, , please use ContainerProps instead. Will be delete in next release\n */\n containerProps,\n ContainerProps,\n onContextReady,\n errorSizeMessage,\n allowedExtensions,\n buttonRemoveLabel,\n filesContainerHeight,\n maxFilesContainerHeight,\n /*\n * @deprecated Since version 0.3.0, , please use PlaceholderImageDimension instead. Will be delete in next release\n */\n placeholderImageDimension,\n PlaceholderImageDimension,\n } = props\n\n const theme = useTheme()\n\n const bannnerCompatibilityProps = { ...bannerProps, ...BannerProps }\n const containerCompatibilityProps = { ...containerProps, ...ContainerProps }\n const placeholderCompatibilityProps = {\n ...placeholderImageDimension,\n ...PlaceholderImageDimension\n }\n\n\n const [error, setError] = useState()\n const [action, setAction] = useState()\n const [animate, setAnimate] = useState()\n const [files, setFiles] = useState([])\n const [originalFiles, setOriginalFiles] = useState([])\n\n const inputRef = useRef()\n const filesCardRef = useRef()\n let imageDimension = { width: 128, height: 128 }\n\n if (useMediaQuery(theme.breakpoints.up('xs')) && placeholderCompatibilityProps?.xs) {\n imageDimension = placeholderCompatibilityProps.xs\n }\n\n if (useMediaQuery(theme.breakpoints.up('sm')) && placeholderCompatibilityProps?.sm) {\n imageDimension = placeholderCompatibilityProps.sm\n }\n\n if (useMediaQuery(theme.breakpoints.up('md')) && placeholderCompatibilityProps?.md) {\n imageDimension = placeholderCompatibilityProps.md\n }\n\n if (useMediaQuery(theme.breakpoints.up('lg')) && placeholderCompatibilityProps?.lg) {\n imageDimension = placeholderCompatibilityProps.lg\n }\n\n /**\n * @name addFile\n * @description\n * @param event\n * @param filesTab\n * @returns void\n */\n const addFile = (event, filesTab) => {\n setAnimate(false)\n setError(null)\n\n if (!filesTab && event?.target?.files) {\n filesTab = event?.target?.files\n }\n\n if (!filesTab || filesTab.length === 0) {\n return onError(`Empty file input`)\n }\n\n if (maxUploadFiles) {\n if (maxUploadFiles - files.length <= 0) {\n setError(`You cannot attach more than ${maxUploadFiles} files`)\n return onError(`You cannot attach more than ${maxUploadFiles} files`)\n }\n }\n\n if (window.File && window.FileReader && window.FileList && window.Blob) {\n try {\n\n for (let i = 0; i < filesTab?.length; i++) {\n let file = filesTab[i]\n let reader = new FileReader()\n let extension = file?.type?.split('/')[1]\n\n if (maxFileSize && maxFileSize > 0) {\n if (file.size > (1024 * 1024 * maxFileSize)) {\n let message = (\n errorSizeMessage\n || `The size of files cannot exceed ${maxFileSize}Mb`\n )\n\n setError(message)\n onError(message)\n //break\n continue\n }\n }\n\n if (allowedExtensions?.length > 0) {\n let isAllowed = allowedExtensions\n .findIndex(\n ext => ext?.toLowerCase() === extension.toLowerCase()\n ) !== -1\n\n if (!isAllowed) {\n let message = `Extension .${extension} has been excluded`\n setError(message)\n onError(message)\n continue\n }\n }\n\n if (!getBase64) {\n originalFiles.push(file)\n setOriginalFiles(originalFiles)\n }\n\n reader.addEventListener(\"load\", function () {\n let obj = {\n name: file.name,\n size: file.size,\n path: this.result,\n contentType: file.type,\n lastModified: file.lastModified,\n extension: extension?.toLowerCase()\n }\n\n files.push(obj)\n setFiles([ ...files ])\n }, false)\n\n reader.readAsDataURL(file)\n }\n\n event.target.value = ''\n\n } catch (e) {\n setError(e.toString())\n }\n }\n }\n\n /**\n * @name removeFile\n * @description\n * @param index\n * @returns void\n */\n const removeFile = (index) => {\n setError(null)\n\n inputRef.current.value = ''\n\n if (typeof index !== 'number') {\n setOriginalFiles([])\n return setFiles([])\n }\n\n if (index < 0 || index > files.length-1) {\n return console.error(\"item's index not found...\")\n }\n\n files?.splice(index, 1)\n originalFiles?.splice(index, 1)\n\n setFiles([ ...files ])\n setOriginalFiles([ ...originalFiles ])\n }\n\n /**\n * @name handleDragEnter\n * @description\n * @returns void\n */\n const handleDragEnter = useCallback((event) => {\n event.preventDefault()\n setAnimate(true)\n }, [])\n\n /**\n * @name handleDragOver\n * @description\n * @returns void\n */\n const handleDragOver = useCallback((event) => {\n event.stopPropagation()\n event.preventDefault()\n }, [])\n\n /**\n * @name handleDrop\n * @description\n * @returns void\n */\n const handleDrop = useCallback((event) => {\n event.stopPropagation()\n event.preventDefault()\n\n setAnimate(false)\n\n setAction({\n event,\n files: event.dataTransfer?.files,\n })\n }, [])\n\n /**\n * @name handleDragLeave\n * @description\n * @returns void\n */\n const handleDragLeave = useCallback(() => {\n setAnimate(false)\n }, [])\n\n const getContext = () => ({\n addFile: addFile,\n removeFile: removeFile,\n input: inputRef.current,\n files: getBase64 ? files : originalFiles\n })\n\n useEffect(() => {\n if (\n inputRef.current\n && onContextReady\n && typeof onContextReady === 'function') {\n onContextReady(getContext())\n }\n // eslint-disable-next-line\n }, [inputRef.current])\n\n useEffect(() => {\n let dragDiv = filesCardRef.current\n\n if (dragDiv && !dragDiv.ondrop && !disabled) {\n dragDiv.ondrop = handleDrop\n dragDiv.ondragend = handleDragLeave\n dragDiv.ondragover = handleDragOver\n dragDiv.ondragenter = handleDragEnter\n }\n // eslint-disable-next-line\n }, [filesCardRef.current])\n\n useEffect(() => {\n if (\n defaultFiles?.length > 0\n && files?.length !== defaultFiles?.length) {\n setFiles(defaultFiles)\n }\n // eslint-disable-next-line\n }, [defaultFiles])\n\n useEffect(() => {\n if (action?.event && action?.files) {\n addFile(action.event, action.files)\n setAction(null)\n }\n\n if (onFilesChange) {\n onFilesChange(getBase64 ? files : originalFiles)\n onContextReady(getContext())\n }\n // eslint-disable-next-line\n }, [files, action])\n\n const background = animate ?\n theme.palette.secondary.light : theme.palette.primary.light\n\n return (\n \n \n \n {title}\n \n\n {files?.length > 0 &&\n \n {files.length}\n\n {maxUploadFiles > 0 &&\n `/${maxUploadFiles}`} file{files?.length > 0 && 's'} joined\n }\n \n\n \n \n \n \n \n \n \n \n {header}\n \n \n \n \n {header}\n \n \n \n {leftLabel}\n inputRef.current?.click()}\n sx={{\n m: .5,\n color: theme.palette.grey[\"50\"],\n borderColor: theme.palette.grey[\"50\"],\n '&:hover': {\n borderColor: theme.palette.grey[\"50\"]\n }\n }}\n >\n {buttonLabel}\n \n {rightLabel}\n \n \n \n \n \n\n {error &&\n setError(null)}\n >\n {error}\n }\n\n {files?.length > 0 &&\n \n \n {files?.map((file, index) => {\n let size = file.size\n\n if (size > oneMega) {\n size = (file.size/oneMega).toFixed(2) + ' Mb'\n } else {\n size = (file.size/1024).toFixed(2) + ' Kb'\n }\n\n return (\n \n )\n })}\n \n\n \n \n {buttonRemoveLabel || 'Remove all'}\n \n \n }\n \n )\n}\n\nFileUpload.propTypes = {\n getBase64: PropTypes.bool,\n maxUploadFiles: PropTypes.number,\n title: PropTypes.string,\n header: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.instanceOf(React.Component),\n ]),\n leftLabel: PropTypes.string,\n rightLabel: PropTypes.string,\n buttonLabel: PropTypes.string,\n multiFile: PropTypes.bool,\n disabled: PropTypes.bool,\n maxFileSize: PropTypes.number,\n maxFilesContainerHeight: PropTypes.number,\n errorSizeMessage: PropTypes.string,\n imageSrc: PropTypes.string,\n imageSrcAlt: PropTypes.string,\n acceptedType: PropTypes.string,\n bannerProps: PropTypes.object,\n BannerProps: PropTypes.object,\n containerProps: PropTypes.object,\n ContainerProps: PropTypes.object,\n allowedExtensions: PropTypes.array,\n onError: PropTypes.func,\n onContextReady: PropTypes.func,\n onFilesChange: PropTypes.func,\n placeholderImageDimension: PropTypes.object,\n PlaceholderImageDimension: PropTypes.object,\n}\n\nFileUpload.defaultProps = {\n getBase64: false,\n multiFile: true,\n maxFileSize: 0,\n maxUploadFiles: 0,\n acceptedType: \"*/*\",\n allowedExtensions: [],\n title: \"My awesome file uploader\",\n header: \">[Drag to drop]<\",\n leftLabel: \"or\",\n rightLabel: \"to select files\",\n buttonLabel: \"click here\",\n imageSrcAlt: \"Placeholder image\",\n maxFilesContainerHeight: 300,\n placeholderImageDimension: {},\n PlaceholderImageDimension: {},\n bannerProps: {},\n BannerProps: {},\n containerProps: {},\n ContainerProps: {},\n}\n\nexport default FileUpload\n"],"names":["FileAttachment","props","size","file","index","disabled","hanfleRemoveFile","theme","useTheme","icon","test","name","mb","display","alignItems","backgroundColor","palette","action","hover","flexGrow","path","m","width","height","background","extension","toLowerCase","mr","textAlign","propTypes","PropTypes","string","isRequired","object","number","bool","func","StyledContainer","styled","Typography","WebkitBoxShadow","WebkitBorderRadius","borderRadius","oneMega","FileUpload","title","header","onError","imageSrc","getBase64","imageSrcAlt","multiFile","leftLabel","rightLabel","buttonLabel","maxFileSize","bannerProps","BannerProps","acceptedType","defaultFiles","onFilesChange","maxUploadFiles","containerProps","ContainerProps","onContextReady","errorSizeMessage","allowedExtensions","buttonRemoveLabel","filesContainerHeight","maxFilesContainerHeight","placeholderImageDimension","PlaceholderImageDimension","bannnerCompatibilityProps","containerCompatibilityProps","placeholderCompatibilityProps","useState","error","setError","setAction","animate","setAnimate","files","setFiles","originalFiles","setOriginalFiles","inputRef","useRef","filesCardRef","imageDimension","useMediaQuery","breakpoints","up","xs","sm","md","lg","addFile","event","filesTab","target","length","window","File","FileReader","FileList","Blob","i","reader","type","split","message","isAllowed","findIndex","ext","push","addEventListener","obj","result","contentType","lastModified","readAsDataURL","value","e","toString","removeFile","current","console","splice","handleDragEnter","useCallback","preventDefault","handleDragOver","stopPropagation","handleDrop","dataTransfer","handleDragLeave","getContext","input","useEffect","dragDiv","ondrop","ondragend","ondragover","ondragenter","secondary","light","primary","p","fontSize","transition","mt","uploadImage","color","click","grey","borderColor","overflowY","pr","maxHeight","map","toFixed","oneOfType","instanceOf","React","Component","array","defaultProps"],"mappings":";;;;;;;;;;;;;AASA,SAASA,cAAc,CAAEC,KAAK,EAAE;AAAA,EAAA,IAAA,eAAA,CAAA;AAC9B,EAAA,IACEC,IAAI,GAKFD,KAAK,CALPC,IAAI;IACJC,IAAI,GAIFF,KAAK,CAJPE,IAAI;IACJC,KAAK,GAGHH,KAAK,CAHPG,KAAK;IACLC,QAAQ,GAENJ,KAAK,CAFPI,QAAQ;IACRC,gBAAgB,GACdL,KAAK,CADPK,gBAAgB,CAAA;EAElB,IAAMC,KAAK,GAAGC,QAAQ,EAAE,CAAA;EACxB,IAAIC,IAAI,gBAAG,KAAA,CAAA,aAAA,CAAC,2BAA2B,EAAA;AAAC,IAAA,KAAK,EAAC,SAAS;AAAC,IAAA,QAAQ,EAAC,OAAA;GAAU,CAAA,CAAA;;AAE3E;AACA,EAAA,IAAI,wBAAwB,CAACC,IAAI,CAACP,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAJA,IAAI,CAAEQ,IAAI,CAAC,EAAE;IAC7CF,IAAI,gBAAG,oBAAC,mBAAmB,EAAA;AAAC,MAAA,KAAK,EAAC,SAAS;AAAC,MAAA,QAAQ,EAAC,OAAA;KAAU,CAAA,CAAA;AACjE,GAAA;;AAEA;AACA,EAAA,IAAI,wBAAwB,CAACC,IAAI,CAACP,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAJA,IAAI,CAAEQ,IAAI,CAAC,EAAE;IAC7CF,IAAI,gBAAG,oBAAC,qBAAqB,EAAA;AAAC,MAAA,KAAK,EAAC,SAAS;AAAC,MAAA,QAAQ,EAAC,OAAA;KAAU,CAAA,CAAA;AACnE,GA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,EAAE,IAAI;AACfI,EAAAA,WAAW,EAAE,CAAC;AACdM,EAAAA,cAAc,EAAE,CAAC;AACjBH,EAAAA,YAAY,EAAE,KAAK;AACnBQ,EAAAA,iBAAiB,EAAE,EAAE;AACrBrB,EAAAA,KAAK,EAAE,0BAA0B;AACjCC,EAAAA,MAAM,EAAE,kBAAkB;AAC1BM,EAAAA,SAAS,EAAE,IAAI;AACfC,EAAAA,UAAU,EAAE,iBAAiB;AAC7BC,EAAAA,WAAW,EAAE,YAAY;AACzBJ,EAAAA,WAAW,EAAE,mBAAmB;AAChCmB,EAAAA,uBAAuB,EAAE,GAAG;EAC5BC,yBAAyB,EAAE,EAAE;EAC7BC,yBAAyB,EAAE,EAAE;EAC7Bf,WAAW,EAAE,EAAE;EACfC,WAAW,EAAE,EAAE;EACfK,cAAc,EAAE,EAAE;AAClBC,EAAAA,cAAc,EAAE,EAAC;AACnB,CAAC;;;;"} \ No newline at end of file diff --git a/dist/index.umd.js b/dist/index.umd.js index 2f64de8..c42c6e2 100644 --- a/dist/index.umd.js +++ b/dist/index.umd.js @@ -379,7 +379,7 @@ setAction(null); } if (onFilesChange) { - onFilesChange(_toConsumableArray(files)); + onFilesChange(getBase64 ? files : originalFiles); onContextReady(getContext()); } // eslint-disable-next-line diff --git a/dist/index.umd.js.map b/dist/index.umd.js.map index 92cf86f..574c1d4 100644 --- a/dist/index.umd.js.map +++ b/dist/index.umd.js.map @@ -1 +1 @@ -{"version":3,"file":"index.umd.js","sources":["../src/FileAttachment.jsx","../src/FileUpload.jsx"],"sourcesContent":["import React from 'react'\nimport PropTypes from 'prop-types'\nimport { useTheme } from '@mui/material/styles'\nimport {Typography, Avatar, IconButton, Box} from \"@mui/material\"\nimport CloseIcon from \"@mui/icons-material/Close\"\nimport ArchiveOutlinedIcon from '@mui/icons-material/ArchiveOutlined'\nimport PlayCircleOutlineIcon from '@mui/icons-material/PlayCircleOutline'\nimport InsertDriveFileOutlinedIcon from '@mui/icons-material/InsertDriveFileOutlined'\n\nfunction FileAttachment (props) {\n const {\n size,\n file,\n index,\n disabled,\n hanfleRemoveFile\n } = props\n const theme = useTheme()\n let icon = \n\n // Set icon for compressed files\n if (/\\.(g?zip|tar|gz|rar)$/i.test(file?.name)) {\n icon = \n }\n\n // Set icon for media files\n if (/\\.(mp.|midi|mkv|avi)$/i.test(file?.name)) {\n icon = \n }\n \n return (\n \n \n \n {icon}\n \n \n \n {file?.name}\n \n \n {size} | {file?.extension?.toLowerCase()}\n \n \n \n\n \n hanfleRemoveFile(index)}\n >\n \n \n \n \n )\n}\n\nFileAttachment.propTypes = {\n size: PropTypes.string.isRequired,\n file: PropTypes.object.isRequired,\n index: PropTypes.number.isRequired,\n disabled: PropTypes.bool,\n hanfleRemoveFile: PropTypes.func.isRequired\n}\n\nexport default FileAttachment","import React, { useState, useRef, useEffect, useCallback } from 'react'\nimport PropTypes from 'prop-types'\nimport {\n Button,\n Grid,\n Alert,\n Paper,\n Box,\n Hidden,\n Typography,\n useMediaQuery,\n} from '@mui/material'\nimport FileAttachment from \"./FileAttachment.jsx\"\nimport { useTheme, styled } from '@mui/material/styles'\nimport uploadImage from '../public/Files And Folder_Two Color_2.svg'\n\nconst StyledContainer = styled(Typography)(({ theme }) => ({\n \"&::-webkit-scrollbar\": {\n width: 7,\n height: 6\n },\n \"&::-webkit-scrollbar-track\": {\n WebkitBoxShadow: \"inset 0 0 6px rgb(125, 161, 196, 0.5)\"\n },\n \"&::-webkit-scrollbar-thumb\": {\n WebkitBorderRadius: 4,\n borderRadius: 4,\n background: \"rgba(0, 172, 193, .5)\",\n WebkitBoxShadow: \"inset 0 0 6px rgba(25, 118, 210, .5)\"\n },\n \"&::-webkit-scrollbar-thumb:window-inactive\": {\n background: \"rgba(125, 161, 196, 0.5)\"\n }\n}))\n\nconst oneMega = 1024 * 1024\n\n/**\n * @name FileUpload\n * @description Upload file component wrapper\n * @param props object\n * @returns React.Component\n */\nfunction FileUpload(props) {\n const {\n title,\n header,\n onError,\n disabled,\n imageSrc,\n getBase64,\n imageSrcAlt,\n multiFile,\n leftLabel,\n rightLabel,\n buttonLabel,\n maxFileSize,\n /*\n * @deprecated Since version 0.3.0, please use BannerProps instead. Will be delete in next release\n */\n bannerProps,\n BannerProps,\n acceptedType,\n defaultFiles,\n onFilesChange,\n maxUploadFiles,\n /*\n * @deprecated Since version 0.3.0, , please use ContainerProps instead. Will be delete in next release\n */\n containerProps,\n ContainerProps,\n onContextReady,\n errorSizeMessage,\n allowedExtensions,\n buttonRemoveLabel,\n filesContainerHeight,\n maxFilesContainerHeight,\n /*\n * @deprecated Since version 0.3.0, , please use PlaceholderImageDimension instead. Will be delete in next release\n */\n placeholderImageDimension,\n PlaceholderImageDimension,\n } = props\n\n const theme = useTheme()\n\n const bannnerCompatibilityProps = { ...bannerProps, ...BannerProps }\n const containerCompatibilityProps = { ...containerProps, ...ContainerProps }\n const placeholderCompatibilityProps = {\n ...placeholderImageDimension,\n ...PlaceholderImageDimension\n }\n\n\n const [error, setError] = useState()\n const [action, setAction] = useState()\n const [animate, setAnimate] = useState()\n const [files, setFiles] = useState([])\n const [originalFiles, setOriginalFiles] = useState([])\n\n const inputRef = useRef()\n const filesCardRef = useRef()\n let imageDimension = { width: 128, height: 128 }\n\n if (useMediaQuery(theme.breakpoints.up('xs')) && placeholderCompatibilityProps?.xs) {\n imageDimension = placeholderCompatibilityProps.xs\n }\n\n if (useMediaQuery(theme.breakpoints.up('sm')) && placeholderCompatibilityProps?.sm) {\n imageDimension = placeholderCompatibilityProps.sm\n }\n\n if (useMediaQuery(theme.breakpoints.up('md')) && placeholderCompatibilityProps?.md) {\n imageDimension = placeholderCompatibilityProps.md\n }\n\n if (useMediaQuery(theme.breakpoints.up('lg')) && placeholderCompatibilityProps?.lg) {\n imageDimension = placeholderCompatibilityProps.lg\n }\n\n /**\n * @name addFile\n * @description\n * @param event\n * @param filesTab\n * @returns void\n */\n const addFile = (event, filesTab) => {\n setAnimate(false)\n setError(null)\n\n if (!filesTab && event?.target?.files) {\n filesTab = event?.target?.files\n }\n\n if (!filesTab || filesTab.length === 0) {\n return onError(`Empty file input`)\n }\n\n if (maxUploadFiles) {\n if (maxUploadFiles - files.length <= 0) {\n setError(`You cannot attach more than ${maxUploadFiles} files`)\n return onError(`You cannot attach more than ${maxUploadFiles} files`)\n }\n }\n\n if (window.File && window.FileReader && window.FileList && window.Blob) {\n try {\n\n for (let i = 0; i < filesTab?.length; i++) {\n let file = filesTab[i]\n let reader = new FileReader()\n let extension = file?.type?.split('/')[1]\n\n if (maxFileSize && maxFileSize > 0) {\n if (file.size > (1024 * 1024 * maxFileSize)) {\n let message = (\n errorSizeMessage\n || `The size of files cannot exceed ${maxFileSize}Mb`\n )\n\n setError(message)\n onError(message)\n //break\n continue\n }\n }\n\n if (allowedExtensions?.length > 0) {\n let isAllowed = allowedExtensions\n .findIndex(\n ext => ext?.toLowerCase() === extension.toLowerCase()\n ) !== -1\n\n if (!isAllowed) {\n let message = `Extension .${extension} has been excluded`\n setError(message)\n onError(message)\n continue\n }\n }\n\n if (!getBase64) {\n originalFiles.push(file)\n setOriginalFiles(originalFiles)\n }\n\n reader.addEventListener(\"load\", function () {\n let obj = {\n name: file.name,\n size: file.size,\n path: this.result,\n contentType: file.type,\n lastModified: file.lastModified,\n extension: extension?.toLowerCase()\n }\n\n files.push(obj)\n setFiles([ ...files ])\n }, false)\n\n reader.readAsDataURL(file)\n }\n\n event.target.value = ''\n\n } catch (e) {\n setError(e.toString())\n }\n }\n }\n\n /**\n * @name removeFile\n * @description\n * @param index\n * @returns void\n */\n const removeFile = (index) => {\n setError(null)\n\n inputRef.current.value = ''\n\n if (typeof index !== 'number') {\n setOriginalFiles([])\n return setFiles([])\n }\n\n if (index < 0 || index > files.length-1) {\n return console.error(\"item's index not found...\")\n }\n\n files?.splice(index, 1)\n originalFiles?.splice(index, 1)\n\n setFiles([ ...files ])\n setOriginalFiles([ ...originalFiles ])\n }\n\n /**\n * @name handleDragEnter\n * @description\n * @returns void\n */\n const handleDragEnter = useCallback((event) => {\n event.preventDefault()\n setAnimate(true)\n }, [])\n\n /**\n * @name handleDragOver\n * @description\n * @returns void\n */\n const handleDragOver = useCallback((event) => {\n event.stopPropagation()\n event.preventDefault()\n }, [])\n\n /**\n * @name handleDrop\n * @description\n * @returns void\n */\n const handleDrop = useCallback((event) => {\n event.stopPropagation()\n event.preventDefault()\n\n setAnimate(false)\n\n setAction({\n event,\n files: event.dataTransfer?.files,\n })\n }, [])\n\n /**\n * @name handleDragLeave\n * @description\n * @returns void\n */\n const handleDragLeave = useCallback(() => {\n setAnimate(false)\n }, [])\n\n const getContext = () => ({\n addFile: addFile,\n removeFile: removeFile,\n input: inputRef.current,\n files: getBase64 ? files : originalFiles\n })\n\n useEffect(() => {\n if (\n inputRef.current\n && onContextReady\n && typeof onContextReady === 'function') {\n onContextReady(getContext())\n }\n // eslint-disable-next-line\n }, [inputRef.current])\n\n useEffect(() => {\n let dragDiv = filesCardRef.current\n\n if (dragDiv && !dragDiv.ondrop && !disabled) {\n dragDiv.ondrop = handleDrop\n dragDiv.ondragend = handleDragLeave\n dragDiv.ondragover = handleDragOver\n dragDiv.ondragenter = handleDragEnter\n }\n // eslint-disable-next-line\n }, [filesCardRef.current])\n\n useEffect(() => {\n if (\n defaultFiles?.length > 0\n && files?.length !== defaultFiles?.length) {\n setFiles(defaultFiles)\n }\n // eslint-disable-next-line\n }, [defaultFiles])\n\n useEffect(() => {\n if (action?.event && action?.files) {\n addFile(action.event, action.files)\n setAction(null)\n }\n\n if (onFilesChange) {\n onFilesChange([ ...files ])\n onContextReady(getContext())\n }\n // eslint-disable-next-line\n }, [files, action])\n\n const background = animate ?\n theme.palette.secondary.light : theme.palette.primary.light\n\n return (\n \n \n \n {title}\n \n\n {files?.length > 0 &&\n \n {files.length}\n\n {maxUploadFiles > 0 &&\n `/${maxUploadFiles}`} file{files?.length > 0 && 's'} joined\n }\n \n\n \n \n \n \n \n \n \n \n {header}\n \n \n \n \n {header}\n \n \n \n {leftLabel}\n inputRef.current?.click()}\n sx={{\n m: .5,\n color: theme.palette.grey[\"50\"],\n borderColor: theme.palette.grey[\"50\"],\n '&:hover': {\n borderColor: theme.palette.grey[\"50\"]\n }\n }}\n >\n {buttonLabel}\n \n {rightLabel}\n \n \n \n \n \n\n {error &&\n setError(null)}\n >\n {error}\n }\n\n {files?.length > 0 &&\n \n \n {files?.map((file, index) => {\n let size = file.size\n\n if (size > oneMega) {\n size = (file.size/oneMega).toFixed(2) + ' Mb'\n } else {\n size = (file.size/1024).toFixed(2) + ' Kb'\n }\n\n return (\n \n )\n })}\n \n\n \n \n {buttonRemoveLabel || 'Remove all'}\n \n \n }\n \n )\n}\n\nFileUpload.propTypes = {\n getBase64: PropTypes.bool,\n maxUploadFiles: PropTypes.number,\n title: PropTypes.string,\n header: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.instanceOf(React.Component),\n ]),\n leftLabel: PropTypes.string,\n rightLabel: PropTypes.string,\n buttonLabel: PropTypes.string,\n multiFile: PropTypes.bool,\n disabled: PropTypes.bool,\n maxFileSize: PropTypes.number,\n maxFilesContainerHeight: PropTypes.number,\n errorSizeMessage: PropTypes.string,\n imageSrc: PropTypes.string,\n imageSrcAlt: PropTypes.string,\n acceptedType: PropTypes.string,\n bannerProps: PropTypes.object,\n BannerProps: PropTypes.object,\n containerProps: PropTypes.object,\n ContainerProps: PropTypes.object,\n allowedExtensions: PropTypes.array,\n onError: PropTypes.func,\n onContextReady: PropTypes.func,\n onFilesChange: PropTypes.func,\n placeholderImageDimension: PropTypes.object,\n PlaceholderImageDimension: PropTypes.object,\n}\n\nFileUpload.defaultProps = {\n getBase64: false,\n multiFile: true,\n maxFileSize: 0,\n maxUploadFiles: 0,\n acceptedType: \"*/*\",\n allowedExtensions: [],\n title: \"My awesome file uploader\",\n header: \">[Drag to drop]<\",\n leftLabel: \"or\",\n rightLabel: \"to select files\",\n buttonLabel: \"click here\",\n imageSrcAlt: \"Placeholder image\",\n maxFilesContainerHeight: 300,\n placeholderImageDimension: {},\n PlaceholderImageDimension: {},\n bannerProps: {},\n BannerProps: {},\n containerProps: {},\n ContainerProps: {},\n}\n\nexport default FileUpload\n"],"names":["FileAttachment","props","size","file","index","disabled","hanfleRemoveFile","theme","useTheme","icon","test","name","Box","mb","display","alignItems","backgroundColor","palette","action","hover","flexGrow","Avatar","path","m","width","height","background","Typography","extension","toLowerCase","mr","textAlign","IconButton","propTypes","PropTypes","string","isRequired","object","number","bool","func","StyledContainer","styled","WebkitBoxShadow","WebkitBorderRadius","borderRadius","oneMega","FileUpload","title","header","onError","imageSrc","getBase64","imageSrcAlt","multiFile","leftLabel","rightLabel","buttonLabel","maxFileSize","bannerProps","BannerProps","acceptedType","defaultFiles","onFilesChange","maxUploadFiles","containerProps","ContainerProps","onContextReady","errorSizeMessage","allowedExtensions","buttonRemoveLabel","filesContainerHeight","maxFilesContainerHeight","placeholderImageDimension","PlaceholderImageDimension","bannnerCompatibilityProps","containerCompatibilityProps","placeholderCompatibilityProps","useState","error","setError","setAction","animate","setAnimate","files","setFiles","originalFiles","setOriginalFiles","inputRef","useRef","filesCardRef","imageDimension","useMediaQuery","breakpoints","up","xs","sm","md","lg","addFile","event","filesTab","target","length","window","File","FileReader","FileList","Blob","i","reader","type","split","message","isAllowed","findIndex","ext","push","addEventListener","obj","result","contentType","lastModified","readAsDataURL","value","e","toString","removeFile","current","console","splice","handleDragEnter","useCallback","preventDefault","handleDragOver","stopPropagation","handleDrop","dataTransfer","handleDragLeave","getContext","input","useEffect","dragDiv","ondrop","ondragend","ondragover","ondragenter","secondary","light","primary","Paper","p","fontSize","transition","Grid","mt","uploadImage","color","Hidden","Button","click","grey","borderColor","Alert","overflowY","pr","maxHeight","map","toFixed","oneOfType","instanceOf","React","Component","array","defaultProps"],"mappings":";;;;;;EASA,SAASA,cAAc,CAAEC,KAAK,EAAE;EAAA,EAAA,IAAA,eAAA,CAAA;EAC9B,EAAA,IACEC,IAAI,GAKFD,KAAK,CALPC,IAAI;MACJC,IA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AU,EAAE,iBAAiB;EAC7BC,EAAAA,WAAW,EAAE,YAAY;EACzBJ,EAAAA,WAAW,EAAE,mBAAmB;EAChCmB,EAAAA,uBAAuB,EAAE,GAAG;IAC5BC,yBAAyB,EAAE,EAAE;IAC7BC,yBAAyB,EAAE,EAAE;IAC7Bf,WAAW,EAAE,EAAE;IACfC,WAAW,EAAE,EAAE;IACfK,cAAc,EAAE,EAAE;EAClBC,EAAAA,cAAc,EAAE,EAAC;EACnB,CAAC;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"index.umd.js","sources":["../src/FileAttachment.jsx","../src/FileUpload.jsx"],"sourcesContent":["import React from 'react'\nimport PropTypes from 'prop-types'\nimport { useTheme } from '@mui/material/styles'\nimport {Typography, Avatar, IconButton, Box} from \"@mui/material\"\nimport CloseIcon from \"@mui/icons-material/Close\"\nimport ArchiveOutlinedIcon from '@mui/icons-material/ArchiveOutlined'\nimport PlayCircleOutlineIcon from '@mui/icons-material/PlayCircleOutline'\nimport InsertDriveFileOutlinedIcon from '@mui/icons-material/InsertDriveFileOutlined'\n\nfunction FileAttachment (props) {\n const {\n size,\n file,\n index,\n disabled,\n hanfleRemoveFile\n } = props\n const theme = useTheme()\n let icon = \n\n // Set icon for compressed files\n if (/\\.(g?zip|tar|gz|rar)$/i.test(file?.name)) {\n icon = \n }\n\n // Set icon for media files\n if (/\\.(mp.|midi|mkv|avi)$/i.test(file?.name)) {\n icon = \n }\n \n return (\n \n \n \n {icon}\n \n \n \n {file?.name}\n \n \n {size} | {file?.extension?.toLowerCase()}\n \n \n \n\n \n hanfleRemoveFile(index)}\n >\n \n \n \n \n )\n}\n\nFileAttachment.propTypes = {\n size: PropTypes.string.isRequired,\n file: PropTypes.object.isRequired,\n index: PropTypes.number.isRequired,\n disabled: PropTypes.bool,\n hanfleRemoveFile: PropTypes.func.isRequired\n}\n\nexport default FileAttachment","import React, { useState, useRef, useEffect, useCallback } from 'react'\nimport PropTypes from 'prop-types'\nimport {\n Button,\n Grid,\n Alert,\n Paper,\n Box,\n Hidden,\n Typography,\n useMediaQuery,\n} from '@mui/material'\nimport FileAttachment from \"./FileAttachment.jsx\"\nimport { useTheme, styled } from '@mui/material/styles'\nimport uploadImage from '../public/Files And Folder_Two Color_2.svg'\n\nconst StyledContainer = styled(Typography)(({ theme }) => ({\n \"&::-webkit-scrollbar\": {\n width: 7,\n height: 6\n },\n \"&::-webkit-scrollbar-track\": {\n WebkitBoxShadow: \"inset 0 0 6px rgb(125, 161, 196, 0.5)\"\n },\n \"&::-webkit-scrollbar-thumb\": {\n WebkitBorderRadius: 4,\n borderRadius: 4,\n background: \"rgba(0, 172, 193, .5)\",\n WebkitBoxShadow: \"inset 0 0 6px rgba(25, 118, 210, .5)\"\n },\n \"&::-webkit-scrollbar-thumb:window-inactive\": {\n background: \"rgba(125, 161, 196, 0.5)\"\n }\n}))\n\nconst oneMega = 1024 * 1024\n\n/**\n * @name FileUpload\n * @description Upload file component wrapper\n * @param props object\n * @returns React.Component\n */\nfunction FileUpload(props) {\n const {\n title,\n header,\n onError,\n disabled,\n imageSrc,\n getBase64,\n imageSrcAlt,\n multiFile,\n leftLabel,\n rightLabel,\n buttonLabel,\n maxFileSize,\n /*\n * @deprecated Since version 0.3.0, please use BannerProps instead. Will be delete in next release\n */\n bannerProps,\n BannerProps,\n acceptedType,\n defaultFiles,\n onFilesChange,\n maxUploadFiles,\n /*\n * @deprecated Since version 0.3.0, , please use ContainerProps instead. Will be delete in next release\n */\n containerProps,\n ContainerProps,\n onContextReady,\n errorSizeMessage,\n allowedExtensions,\n buttonRemoveLabel,\n filesContainerHeight,\n maxFilesContainerHeight,\n /*\n * @deprecated Since version 0.3.0, , please use PlaceholderImageDimension instead. Will be delete in next release\n */\n placeholderImageDimension,\n PlaceholderImageDimension,\n } = props\n\n const theme = useTheme()\n\n const bannnerCompatibilityProps = { ...bannerProps, ...BannerProps }\n const containerCompatibilityProps = { ...containerProps, ...ContainerProps }\n const placeholderCompatibilityProps = {\n ...placeholderImageDimension,\n ...PlaceholderImageDimension\n }\n\n\n const [error, setError] = useState()\n const [action, setAction] = useState()\n const [animate, setAnimate] = useState()\n const [files, setFiles] = useState([])\n const [originalFiles, setOriginalFiles] = useState([])\n\n const inputRef = useRef()\n const filesCardRef = useRef()\n let imageDimension = { width: 128, height: 128 }\n\n if (useMediaQuery(theme.breakpoints.up('xs')) && placeholderCompatibilityProps?.xs) {\n imageDimension = placeholderCompatibilityProps.xs\n }\n\n if (useMediaQuery(theme.breakpoints.up('sm')) && placeholderCompatibilityProps?.sm) {\n imageDimension = placeholderCompatibilityProps.sm\n }\n\n if (useMediaQuery(theme.breakpoints.up('md')) && placeholderCompatibilityProps?.md) {\n imageDimension = placeholderCompatibilityProps.md\n }\n\n if (useMediaQuery(theme.breakpoints.up('lg')) && placeholderCompatibilityProps?.lg) {\n imageDimension = placeholderCompatibilityProps.lg\n }\n\n /**\n * @name addFile\n * @description\n * @param event\n * @param filesTab\n * @returns void\n */\n const addFile = (event, filesTab) => {\n setAnimate(false)\n setError(null)\n\n if (!filesTab && event?.target?.files) {\n filesTab = event?.target?.files\n }\n\n if (!filesTab || filesTab.length === 0) {\n return onError(`Empty file input`)\n }\n\n if (maxUploadFiles) {\n if (maxUploadFiles - files.length <= 0) {\n setError(`You cannot attach more than ${maxUploadFiles} files`)\n return onError(`You cannot attach more than ${maxUploadFiles} files`)\n }\n }\n\n if (window.File && window.FileReader && window.FileList && window.Blob) {\n try {\n\n for (let i = 0; i < filesTab?.length; i++) {\n let file = filesTab[i]\n let reader = new FileReader()\n let extension = file?.type?.split('/')[1]\n\n if (maxFileSize && maxFileSize > 0) {\n if (file.size > (1024 * 1024 * maxFileSize)) {\n let message = (\n errorSizeMessage\n || `The size of files cannot exceed ${maxFileSize}Mb`\n )\n\n setError(message)\n onError(message)\n //break\n continue\n }\n }\n\n if (allowedExtensions?.length > 0) {\n let isAllowed = allowedExtensions\n .findIndex(\n ext => ext?.toLowerCase() === extension.toLowerCase()\n ) !== -1\n\n if (!isAllowed) {\n let message = `Extension .${extension} has been excluded`\n setError(message)\n onError(message)\n continue\n }\n }\n\n if (!getBase64) {\n originalFiles.push(file)\n setOriginalFiles(originalFiles)\n }\n\n reader.addEventListener(\"load\", function () {\n let obj = {\n name: file.name,\n size: file.size,\n path: this.result,\n contentType: file.type,\n lastModified: file.lastModified,\n extension: extension?.toLowerCase()\n }\n\n files.push(obj)\n setFiles([ ...files ])\n }, false)\n\n reader.readAsDataURL(file)\n }\n\n event.target.value = ''\n\n } catch (e) {\n setError(e.toString())\n }\n }\n }\n\n /**\n * @name removeFile\n * @description\n * @param index\n * @returns void\n */\n const removeFile = (index) => {\n setError(null)\n\n inputRef.current.value = ''\n\n if (typeof index !== 'number') {\n setOriginalFiles([])\n return setFiles([])\n }\n\n if (index < 0 || index > files.length-1) {\n return console.error(\"item's index not found...\")\n }\n\n files?.splice(index, 1)\n originalFiles?.splice(index, 1)\n\n setFiles([ ...files ])\n setOriginalFiles([ ...originalFiles ])\n }\n\n /**\n * @name handleDragEnter\n * @description\n * @returns void\n */\n const handleDragEnter = useCallback((event) => {\n event.preventDefault()\n setAnimate(true)\n }, [])\n\n /**\n * @name handleDragOver\n * @description\n * @returns void\n */\n const handleDragOver = useCallback((event) => {\n event.stopPropagation()\n event.preventDefault()\n }, [])\n\n /**\n * @name handleDrop\n * @description\n * @returns void\n */\n const handleDrop = useCallback((event) => {\n event.stopPropagation()\n event.preventDefault()\n\n setAnimate(false)\n\n setAction({\n event,\n files: event.dataTransfer?.files,\n })\n }, [])\n\n /**\n * @name handleDragLeave\n * @description\n * @returns void\n */\n const handleDragLeave = useCallback(() => {\n setAnimate(false)\n }, [])\n\n const getContext = () => ({\n addFile: addFile,\n removeFile: removeFile,\n input: inputRef.current,\n files: getBase64 ? files : originalFiles\n })\n\n useEffect(() => {\n if (\n inputRef.current\n && onContextReady\n && typeof onContextReady === 'function') {\n onContextReady(getContext())\n }\n // eslint-disable-next-line\n }, [inputRef.current])\n\n useEffect(() => {\n let dragDiv = filesCardRef.current\n\n if (dragDiv && !dragDiv.ondrop && !disabled) {\n dragDiv.ondrop = handleDrop\n dragDiv.ondragend = handleDragLeave\n dragDiv.ondragover = handleDragOver\n dragDiv.ondragenter = handleDragEnter\n }\n // eslint-disable-next-line\n }, [filesCardRef.current])\n\n useEffect(() => {\n if (\n defaultFiles?.length > 0\n && files?.length !== defaultFiles?.length) {\n setFiles(defaultFiles)\n }\n // eslint-disable-next-line\n }, [defaultFiles])\n\n useEffect(() => {\n if (action?.event && action?.files) {\n addFile(action.event, action.files)\n setAction(null)\n }\n\n if (onFilesChange) {\n onFilesChange(getBase64 ? files : originalFiles)\n onContextReady(getContext())\n }\n // eslint-disable-next-line\n }, [files, action])\n\n const background = animate ?\n theme.palette.secondary.light : theme.palette.primary.light\n\n return (\n \n \n \n {title}\n \n\n {files?.length > 0 &&\n \n {files.length}\n\n {maxUploadFiles > 0 &&\n `/${maxUploadFiles}`} file{files?.length > 0 && 's'} joined\n }\n \n\n \n \n \n \n \n \n \n \n {header}\n \n \n \n \n {header}\n \n \n \n {leftLabel}\n inputRef.current?.click()}\n sx={{\n m: .5,\n color: theme.palette.grey[\"50\"],\n borderColor: theme.palette.grey[\"50\"],\n '&:hover': {\n borderColor: theme.palette.grey[\"50\"]\n }\n }}\n >\n {buttonLabel}\n \n {rightLabel}\n \n \n \n \n \n\n {error &&\n setError(null)}\n >\n {error}\n }\n\n {files?.length > 0 &&\n \n \n {files?.map((file, index) => {\n let size = file.size\n\n if (size > oneMega) {\n size = (file.size/oneMega).toFixed(2) + ' Mb'\n } else {\n size = (file.size/1024).toFixed(2) + ' Kb'\n }\n\n return (\n \n )\n })}\n \n\n \n \n {buttonRemoveLabel || 'Remove all'}\n \n \n }\n \n )\n}\n\nFileUpload.propTypes = {\n getBase64: PropTypes.bool,\n maxUploadFiles: PropTypes.number,\n title: PropTypes.string,\n header: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.instanceOf(React.Component),\n ]),\n leftLabel: PropTypes.string,\n rightLabel: PropTypes.string,\n buttonLabel: PropTypes.string,\n multiFile: PropTypes.bool,\n disabled: PropTypes.bool,\n maxFileSize: PropTypes.number,\n maxFilesContainerHeight: PropTypes.number,\n errorSizeMessage: PropTypes.string,\n imageSrc: PropTypes.string,\n imageSrcAlt: PropTypes.string,\n acceptedType: PropTypes.string,\n bannerProps: PropTypes.object,\n BannerProps: PropTypes.object,\n containerProps: PropTypes.object,\n ContainerProps: PropTypes.object,\n allowedExtensions: PropTypes.array,\n onError: PropTypes.func,\n onContextReady: PropTypes.func,\n onFilesChange: PropTypes.func,\n placeholderImageDimension: PropTypes.object,\n PlaceholderImageDimension: PropTypes.object,\n}\n\nFileUpload.defaultProps = {\n getBase64: false,\n multiFile: true,\n maxFileSize: 0,\n maxUploadFiles: 0,\n acceptedType: \"*/*\",\n allowedExtensions: [],\n title: \"My awesome file uploader\",\n header: \">[Drag to drop]<\",\n leftLabel: \"or\",\n rightLabel: \"to select files\",\n buttonLabel: \"click here\",\n imageSrcAlt: \"Placeholder image\",\n maxFilesContainerHeight: 300,\n placeholderImageDimension: {},\n PlaceholderImageDimension: {},\n bannerProps: {},\n BannerProps: {},\n containerProps: {},\n ContainerProps: {},\n}\n\nexport default FileUpload\n"],"names":["FileAttachment","props","size","file","index","disabled","hanfleRemoveFile","theme","useTheme","icon","test","name","Box","mb","display","alignItems","backgroundColor","palette","action","hover","flexGrow","Avatar","path","m","width","height","background","Typography","extension","toLowerCase","mr","textAlign","IconButton","propTypes","PropTypes","string","isRequired","object","number","bool","func","StyledContainer","styled","WebkitBoxShadow","WebkitBorderRadius","borderRadius","oneMega","FileUpload","title","header","onError","imageSrc","getBase64","imageSrcAlt","multiFile","leftLabel","rightLabel","buttonLabel","maxFileSize","bannerProps","BannerProps","acceptedType","defaultFiles","onFilesChange","maxUploadFiles","containerProps","ContainerProps","onContextReady","errorSizeMessage","allowedExtensions","buttonRemoveLabel","filesContainerHeight","maxFilesContainerHeight","placeholderImageDimension","PlaceholderImageDimension","bannnerCompatibilityProps","containerCompatibilityProps","placeholderCompatibilityProps","useState","error","setError","setAction","animate","setAnimate","files","setFiles","originalFiles","setOriginalFiles","inputRef","useRef","filesCardRef","imageDimension","useMediaQuery","breakpoints","up","xs","sm","md","lg","addFile","event","filesTab","target","length","window","File","FileReader","FileList","Blob","i","reader","type","split","message","isAllowed","findIndex","ext","push","addEventListener","obj","result","contentType","lastModified","readAsDataURL","value","e","toString","removeFile","current","console","splice","handleDragEnter","useCallback","preventDefault","handleDragOver","stopPropagation","handleDrop","dataTransfer","handleDragLeave","getContext","input","useEffect","dragDiv","ondrop","ondragend","ondragover","ondragenter","secondary","light","primary","Paper","p","fontSize","transition","Grid","mt","uploadImage","color","Hidden","Button","click","grey","borderColor","Alert","overflowY","pr","maxHeight","map","toFixed","oneOfType","instanceOf","React","Component","array","defaultProps"],"mappings":";;;;;;EASA,SAASA,cAAc,CAAEC,KAAK,EAAE;EAAA,EAAA,IAAA,eAAA,CAAA;EAC9B,EAAA,IACEC,IAAI,GAKFD,KAAK,CALPC,IAAI;MACJC,IAAI,GAIFF,KAAK,CAJPE,IAAI;MACJC,KAAK,GAGHH,KAAK,CAHPG,KAAK;MACLC,QAAQ,GAENJ,KAAK,CAFPI,QAAQ;MACRC,gBAAgB,GACdL,KAAK,CADPK,gBAAgB,CAAA;IAElB,IAAMC,KAAK,GAAGC,eAAQ,EAAE,CAAA;IACxB,IAAIC,IAAI,gBAAG,KAAA,CAAA,aAAA,CAAC,2BAA2B,EAAA;EAAC,IAAA,KAAK,EAAC,SAAS;EAAC,IAAA,QAAQ,EAAC,OAAA;KAAU,CAAA,CAAA;;EAE3E;EACA,EAAA,IAAI,wBAAwB,CAACC,IAAI,CAACP,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAJA,IAAI,CAAEQ,IAAI,CAAC,EAAE;MAC7CF,IAAI,gBAAG,oBAAC,mBAAmB,EAAA;EAAC,MAAA,K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,CAACG,MAAM;IAChC6B,cAAc,EAAEhC,SAAS,CAACG,MAAM;IAChCgC,iBAAiB,EAAEnC,SAAS,CAAC2I,KAAK;IAClC3H,OAAO,EAAEhB,SAAS,CAACM,IAAI;IACvB2B,cAAc,EAAEjC,SAAS,CAACM,IAAI;IAC9BuB,aAAa,EAAE7B,SAAS,CAACM,IAAI;IAC7BiC,yBAAyB,EAAEvC,SAAS,CAACG,MAAM;IAC3CqC,yBAAyB,EAAExC,SAAS,CAACG,MAAAA;EACvC,CAAC,CAAA;EAEDU,UAAU,CAAC+H,YAAY,GAAG;EACxB1H,EAAAA,SAAS,EAAE,KAAK;EAChBE,EAAAA,SAAS,EAAE,IAAI;EACfI,EAAAA,WAAW,EAAE,CAAC;EACdM,EAAAA,cAAc,EAAE,CAAC;EACjBH,EAAAA,YAAY,EAAE,KAAK;EACnBQ,EAAAA,iBAAiB,EAAE,EAAE;EACrBrB,EAAAA,KAAK,EAAE,0BAA0B;EACjCC,EAAAA,MAAM,EAAE,kBAAkB;EAC1BM,EAAAA,SAAS,EAAE,IAAI;EACfC,EAAAA,UAAU,EAAE,iBAAiB;EAC7BC,EAAAA,WAAW,EAAE,YAAY;EACzBJ,EAAAA,WAAW,EAAE,mBAAmB;EAChCmB,EAAAA,uBAAuB,EAAE,GAAG;IAC5BC,yBAAyB,EAAE,EAAE;IAC7BC,yBAAyB,EAAE,EAAE;IAC7Bf,WAAW,EAAE,EAAE;IACfC,WAAW,EAAE,EAAE;IACfK,cAAc,EAAE,EAAE;EAClBC,EAAAA,cAAc,EAAE,EAAC;EACnB,CAAC;;;;;;;;"} \ No newline at end of file diff --git a/package.json b/package.json index 74bdc75..5dfe31d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-mui-fileuploader", - "version": "0.4.0", + "version": "0.4.1", "description": "🗃️ React mui fileuploader is a react component based on @mui v5 that allows you to upload files with an awesome ui component", "main": "dist/index.esm.js", "typings": "index.d.ts",