eaff37e557fcb73819a7fd2cd6186e5a.json
34.1 KB
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport * as React from 'react';\nimport RcUpload from 'rc-upload';\nimport classNames from 'classnames';\nimport Dragger from './Dragger';\nimport UploadList from './UploadList';\nimport { T, fileToObject, getFileItem, removeFileItem } from './utils';\nimport LocaleReceiver from '../locale-provider/LocaleReceiver';\nimport defaultLocale from '../locale/default';\nimport { ConfigContext } from '../config-provider';\nimport devWarning from '../_util/devWarning';\nimport useForceUpdate from '../_util/hooks/useForceUpdate';\nimport useFreshState from './useFreshState';\n\nvar InternalUpload = function InternalUpload(props, ref) {\n var _classNames2;\n\n var fileListProp = props.fileList,\n defaultFileList = props.defaultFileList,\n onRemove = props.onRemove,\n showUploadList = props.showUploadList,\n listType = props.listType,\n onPreview = props.onPreview,\n onDownload = props.onDownload,\n previewFile = props.previewFile,\n disabled = props.disabled,\n propLocale = props.locale,\n iconRender = props.iconRender,\n isImageUrl = props.isImageUrl,\n progress = props.progress,\n customizePrefixCls = props.prefixCls,\n className = props.className,\n type = props.type,\n children = props.children,\n style = props.style,\n itemRender = props.itemRender;\n\n var _React$useState = React.useState('drop'),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n dragState = _React$useState2[0],\n setDragState = _React$useState2[1];\n\n var forceUpdate = useForceUpdate(); // Refresh always use fresh data\n\n var _useFreshState = useFreshState(fileListProp || defaultFileList || [], fileListProp),\n _useFreshState2 = _slicedToArray(_useFreshState, 2),\n getFileList = _useFreshState2[0],\n setFileList = _useFreshState2[1];\n\n var upload = React.useRef();\n React.useEffect(function () {\n devWarning('fileList' in props || !('value' in props), 'Upload', '`value` is not a valid prop, do you mean `fileList`?');\n }, []);\n\n var onChange = function onChange(info) {\n setFileList(info.fileList);\n var onChangeProp = props.onChange;\n\n if (onChangeProp) {\n onChangeProp(_extends(_extends({}, info), {\n fileList: _toConsumableArray(info.fileList)\n }));\n }\n };\n\n var onStart = function onStart(file) {\n var targetItem = fileToObject(file);\n targetItem.status = 'uploading';\n var nextFileList = getFileList().concat();\n var fileIndex = nextFileList.findIndex(function (_ref) {\n var uid = _ref.uid;\n return uid === targetItem.uid;\n });\n\n if (fileIndex === -1) {\n nextFileList.push(targetItem);\n } else {\n nextFileList[fileIndex] = targetItem;\n }\n\n onChange({\n file: targetItem,\n fileList: nextFileList\n });\n };\n\n var onSuccess = function onSuccess(response, file, xhr) {\n try {\n if (typeof response === 'string') {\n response = JSON.parse(response);\n }\n } catch (e) {\n /* do nothing */\n }\n\n var targetItem = getFileItem(file, getFileList()); // removed\n\n if (!targetItem) {\n return;\n }\n\n targetItem.status = 'done';\n targetItem.response = response;\n targetItem.xhr = xhr;\n onChange({\n file: _extends({}, targetItem),\n fileList: getFileList().concat()\n });\n };\n\n var onProgress = function onProgress(e, file) {\n var targetItem = getFileItem(file, getFileList()); // removed\n\n if (!targetItem) {\n return;\n }\n\n targetItem.percent = e.percent;\n onChange({\n event: e,\n file: _extends({}, targetItem),\n fileList: getFileList().concat()\n });\n };\n\n var onError = function onError(error, response, file) {\n var targetItem = getFileItem(file, getFileList()); // removed\n\n if (!targetItem) {\n return;\n }\n\n targetItem.error = error;\n targetItem.response = response;\n targetItem.status = 'error';\n onChange({\n file: _extends({}, targetItem),\n fileList: getFileList().concat()\n });\n };\n\n var handleRemove = function handleRemove(file) {\n Promise.resolve(typeof onRemove === 'function' ? onRemove(file) : onRemove).then(function (ret) {\n // Prevent removing file\n if (ret === false) {\n return;\n }\n\n var removedFileList = removeFileItem(file, getFileList());\n\n if (removedFileList) {\n file.status = 'removed';\n\n if (upload.current) {\n upload.current.abort(file);\n }\n\n onChange({\n file: file,\n fileList: removedFileList\n });\n }\n });\n };\n\n var onFileDrop = function onFileDrop(e) {\n setDragState(e.type);\n };\n\n var beforeUpload = function beforeUpload(file, fileListArgs) {\n var beforeUploadProp = props.beforeUpload;\n\n if (!beforeUploadProp) {\n return true;\n }\n\n var result = beforeUploadProp(file, fileListArgs);\n\n if (result === false) {\n // Get unique file list\n var uniqueList = [];\n getFileList().concat(fileListArgs.map(fileToObject)).forEach(function (f) {\n if (uniqueList.every(function (uf) {\n return uf.uid !== f.uid;\n })) {\n uniqueList.push(f);\n }\n });\n onChange({\n file: file,\n fileList: uniqueList\n });\n return false;\n }\n\n if (result && result.then) {\n return result;\n }\n\n return true;\n }; // Test needs\n\n\n React.useImperativeHandle(ref, function () {\n return {\n onStart: onStart,\n onSuccess: onSuccess,\n onProgress: onProgress,\n onError: onError,\n fileList: getFileList(),\n upload: upload.current,\n forceUpdate: forceUpdate\n };\n });\n\n var _React$useContext = React.useContext(ConfigContext),\n getPrefixCls = _React$useContext.getPrefixCls,\n direction = _React$useContext.direction;\n\n var prefixCls = getPrefixCls('upload', customizePrefixCls);\n\n var rcUploadProps = _extends(_extends({\n onStart: onStart,\n onError: onError,\n onProgress: onProgress,\n onSuccess: onSuccess\n }, props), {\n prefixCls: prefixCls,\n beforeUpload: beforeUpload\n });\n\n delete rcUploadProps.className;\n delete rcUploadProps.style; // Remove id to avoid open by label when trigger is hidden\n // !children: https://github.com/ant-design/ant-design/issues/14298\n // disabled: https://github.com/ant-design/ant-design/issues/16478\n // https://github.com/ant-design/ant-design/issues/24197\n\n if (!children || disabled) {\n delete rcUploadProps.id;\n }\n\n var renderUploadList = function renderUploadList(button) {\n return showUploadList ? /*#__PURE__*/React.createElement(LocaleReceiver, {\n componentName: \"Upload\",\n defaultLocale: defaultLocale.Upload\n }, function (locale) {\n var _ref2 = typeof showUploadList === 'boolean' ? {} : showUploadList,\n showRemoveIcon = _ref2.showRemoveIcon,\n showPreviewIcon = _ref2.showPreviewIcon,\n showDownloadIcon = _ref2.showDownloadIcon,\n removeIcon = _ref2.removeIcon,\n downloadIcon = _ref2.downloadIcon;\n\n return /*#__PURE__*/React.createElement(UploadList, {\n listType: listType,\n items: getFileList(true),\n previewFile: previewFile,\n onPreview: onPreview,\n onDownload: onDownload,\n onRemove: handleRemove,\n showRemoveIcon: !disabled && showRemoveIcon,\n showPreviewIcon: showPreviewIcon,\n showDownloadIcon: showDownloadIcon,\n removeIcon: removeIcon,\n downloadIcon: downloadIcon,\n iconRender: iconRender,\n locale: _extends(_extends({}, locale), propLocale),\n isImageUrl: isImageUrl,\n progress: progress,\n appendAction: button,\n itemRender: itemRender\n });\n }) : button;\n };\n\n if (type === 'drag') {\n var _classNames;\n\n var dragCls = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-drag\"), true), _defineProperty(_classNames, \"\".concat(prefixCls, \"-drag-uploading\"), getFileList().some(function (file) {\n return file.status === 'uploading';\n })), _defineProperty(_classNames, \"\".concat(prefixCls, \"-drag-hover\"), dragState === 'dragover'), _defineProperty(_classNames, \"\".concat(prefixCls, \"-disabled\"), disabled), _defineProperty(_classNames, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _classNames), className);\n return /*#__PURE__*/React.createElement(\"span\", null, /*#__PURE__*/React.createElement(\"div\", {\n className: dragCls,\n onDrop: onFileDrop,\n onDragOver: onFileDrop,\n onDragLeave: onFileDrop,\n style: style\n }, /*#__PURE__*/React.createElement(RcUpload, _extends({}, rcUploadProps, {\n ref: upload,\n className: \"\".concat(prefixCls, \"-btn\")\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-drag-container\")\n }, children))), renderUploadList());\n }\n\n var uploadButtonCls = classNames(prefixCls, (_classNames2 = {}, _defineProperty(_classNames2, \"\".concat(prefixCls, \"-select\"), true), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-select-\").concat(listType), true), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-disabled\"), disabled), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _classNames2));\n var uploadButton = /*#__PURE__*/React.createElement(\"div\", {\n className: uploadButtonCls,\n style: children ? undefined : {\n display: 'none'\n }\n }, /*#__PURE__*/React.createElement(RcUpload, _extends({}, rcUploadProps, {\n ref: upload\n })));\n\n if (listType === 'picture-card') {\n return /*#__PURE__*/React.createElement(\"span\", {\n className: classNames(\"\".concat(prefixCls, \"-picture-card-wrapper\"), className)\n }, renderUploadList(uploadButton));\n }\n\n return /*#__PURE__*/React.createElement(\"span\", {\n className: className\n }, uploadButton, renderUploadList());\n};\n\nvar Upload = /*#__PURE__*/React.forwardRef(InternalUpload);\nUpload.Dragger = Dragger;\nUpload.displayName = 'Upload';\nUpload.defaultProps = {\n type: 'select',\n multiple: false,\n action: '',\n data: {},\n accept: '',\n beforeUpload: T,\n showUploadList: true,\n listType: 'text',\n className: '',\n disabled: false,\n supportServerRender: true\n};\nexport default Upload;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/antd/es/upload/Upload.js"],"names":["_defineProperty","_toConsumableArray","_extends","_slicedToArray","React","RcUpload","classNames","Dragger","UploadList","T","fileToObject","getFileItem","removeFileItem","LocaleReceiver","defaultLocale","ConfigContext","devWarning","useForceUpdate","useFreshState","InternalUpload","props","ref","_classNames2","fileListProp","fileList","defaultFileList","onRemove","showUploadList","listType","onPreview","onDownload","previewFile","disabled","propLocale","locale","iconRender","isImageUrl","progress","customizePrefixCls","prefixCls","className","type","children","style","itemRender","_React$useState","useState","_React$useState2","dragState","setDragState","forceUpdate","_useFreshState","_useFreshState2","getFileList","setFileList","upload","useRef","useEffect","onChange","info","onChangeProp","onStart","file","targetItem","status","nextFileList","concat","fileIndex","findIndex","_ref","uid","push","onSuccess","response","xhr","JSON","parse","e","onProgress","percent","event","onError","error","handleRemove","Promise","resolve","then","ret","removedFileList","current","abort","onFileDrop","beforeUpload","fileListArgs","beforeUploadProp","result","uniqueList","map","forEach","f","every","uf","useImperativeHandle","_React$useContext","useContext","getPrefixCls","direction","rcUploadProps","id","renderUploadList","button","createElement","componentName","Upload","_ref2","showRemoveIcon","showPreviewIcon","showDownloadIcon","removeIcon","downloadIcon","items","appendAction","_classNames","dragCls","some","onDrop","onDragOver","onDragLeave","uploadButtonCls","uploadButton","undefined","display","forwardRef","displayName","defaultProps","multiple","action","data","accept","supportServerRender"],"mappings":"AAAA,OAAOA,eAAP,MAA4B,uCAA5B;AACA,OAAOC,kBAAP,MAA+B,0CAA/B;AACA,OAAOC,QAAP,MAAqB,gCAArB;AACA,OAAOC,cAAP,MAA2B,sCAA3B;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,OAAOC,QAAP,MAAqB,WAArB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,SAASC,CAAT,EAAYC,YAAZ,EAA0BC,WAA1B,EAAuCC,cAAvC,QAA6D,SAA7D;AACA,OAAOC,cAAP,MAA2B,mCAA3B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,SAASC,aAAT,QAA8B,oBAA9B;AACA,OAAOC,UAAP,MAAuB,qBAAvB;AACA,OAAOC,cAAP,MAA2B,+BAA3B;AACA,OAAOC,aAAP,MAA0B,iBAA1B;;AAEA,IAAIC,cAAc,GAAG,SAASA,cAAT,CAAwBC,KAAxB,EAA+BC,GAA/B,EAAoC;AACvD,MAAIC,YAAJ;;AAEA,MAAIC,YAAY,GAAGH,KAAK,CAACI,QAAzB;AAAA,MACIC,eAAe,GAAGL,KAAK,CAACK,eAD5B;AAAA,MAEIC,QAAQ,GAAGN,KAAK,CAACM,QAFrB;AAAA,MAGIC,cAAc,GAAGP,KAAK,CAACO,cAH3B;AAAA,MAIIC,QAAQ,GAAGR,KAAK,CAACQ,QAJrB;AAAA,MAKIC,SAAS,GAAGT,KAAK,CAACS,SALtB;AAAA,MAMIC,UAAU,GAAGV,KAAK,CAACU,UANvB;AAAA,MAOIC,WAAW,GAAGX,KAAK,CAACW,WAPxB;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SAAS,EAAElC,UAAU,CAAC,GAAG4D,MAAH,CAAU3B,SAAV,EAAqB,uBAArB,CAAD,EAAgDC,SAAhD;AADyB,KAA5B,EAEjBqE,gBAAgB,CAACoB,YAAD,CAFC,CAApB;AAGD;;AAED,SAAO,aAAa7H,KAAK,CAAC2G,aAAN,CAAoB,MAApB,EAA4B;AAC9CvE,IAAAA,SAAS,EAAEA;AADmC,GAA5B,EAEjByF,YAFiB,EAEHpB,gBAAgB,EAFb,CAApB;AAGD,CA5SD;;AA8SA,IAAII,MAAM,GAAG,aAAa7G,KAAK,CAACgI,UAAN,CAAiBjH,cAAjB,CAA1B;AACA8F,MAAM,CAAC1G,OAAP,GAAiBA,OAAjB;AACA0G,MAAM,CAACoB,WAAP,GAAqB,QAArB;AACApB,MAAM,CAACqB,YAAP,GAAsB;AACpB7F,EAAAA,IAAI,EAAE,QADc;AAEpB8F,EAAAA,QAAQ,EAAE,KAFU;AAGpBC,EAAAA,MAAM,EAAE,EAHY;AAIpBC,EAAAA,IAAI,EAAE,EAJc;AAKpBC,EAAAA,MAAM,EAAE,EALY;AAMpB9C,EAAAA,YAAY,EAAEnF,CANM;AAOpBkB,EAAAA,cAAc,EAAE,IAPI;AAQpBC,EAAAA,QAAQ,EAAE,MARU;AASpBY,EAAAA,SAAS,EAAE,EATS;AAUpBR,EAAAA,QAAQ,EAAE,KAVU;AAWpB2G,EAAAA,mBAAmB,EAAE;AAXD,CAAtB;AAaA,eAAe1B,MAAf","sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport * as React from 'react';\nimport RcUpload from 'rc-upload';\nimport classNames from 'classnames';\nimport Dragger from './Dragger';\nimport UploadList from './UploadList';\nimport { T, fileToObject, getFileItem, removeFileItem } from './utils';\nimport LocaleReceiver from '../locale-provider/LocaleReceiver';\nimport defaultLocale from '../locale/default';\nimport { ConfigContext } from '../config-provider';\nimport devWarning from '../_util/devWarning';\nimport useForceUpdate from '../_util/hooks/useForceUpdate';\nimport useFreshState from './useFreshState';\n\nvar InternalUpload = function InternalUpload(props, ref) {\n var _classNames2;\n\n var fileListProp = props.fileList,\n defaultFileList = props.defaultFileList,\n onRemove = props.onRemove,\n showUploadList = props.showUploadList,\n listType = props.listType,\n onPreview = props.onPreview,\n onDownload = props.onDownload,\n previewFile = props.previewFile,\n disabled = props.disabled,\n propLocale = props.locale,\n iconRender = props.iconRender,\n isImageUrl = props.isImageUrl,\n progress = props.progress,\n customizePrefixCls = props.prefixCls,\n className = props.className,\n type = props.type,\n children = props.children,\n style = props.style,\n itemRender = props.itemRender;\n\n var _React$useState = React.useState('drop'),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n dragState = _React$useState2[0],\n setDragState = _React$useState2[1];\n\n var forceUpdate = useForceUpdate(); // Refresh always use fresh data\n\n var _useFreshState = useFreshState(fileListProp || defaultFileList || [], fileListProp),\n _useFreshState2 = _slicedToArray(_useFreshState, 2),\n getFileList = _useFreshState2[0],\n setFileList = _useFreshState2[1];\n\n var upload = React.useRef();\n React.useEffect(function () {\n devWarning('fileList' in props || !('value' in props), 'Upload', '`value` is not a valid prop, do you mean `fileList`?');\n }, []);\n\n var onChange = function onChange(info) {\n setFileList(info.fileList);\n var onChangeProp = props.onChange;\n\n if (onChangeProp) {\n onChangeProp(_extends(_extends({}, info), {\n fileList: _toConsumableArray(info.fileList)\n }));\n }\n };\n\n var onStart = function onStart(file) {\n var targetItem = fileToObject(file);\n targetItem.status = 'uploading';\n var nextFileList = getFileList().concat();\n var fileIndex = nextFileList.findIndex(function (_ref) {\n var uid = _ref.uid;\n return uid === targetItem.uid;\n });\n\n if (fileIndex === -1) {\n nextFileList.push(targetItem);\n } else {\n nextFileList[fileIndex] = targetItem;\n }\n\n onChange({\n file: targetItem,\n fileList: nextFileList\n });\n };\n\n var onSuccess = function onSuccess(response, file, xhr) {\n try {\n if (typeof response === 'string') {\n response = JSON.parse(response);\n }\n } catch (e) {\n /* do nothing */\n }\n\n var targetItem = getFileItem(file, getFileList()); // removed\n\n if (!targetItem) {\n return;\n }\n\n targetItem.status = 'done';\n targetItem.response = response;\n targetItem.xhr = xhr;\n onChange({\n file: _extends({}, targetItem),\n fileList: getFileList().concat()\n });\n };\n\n var onProgress = function onProgress(e, file) {\n var targetItem = getFileItem(file, getFileList()); // removed\n\n if (!targetItem) {\n return;\n }\n\n targetItem.percent = e.percent;\n onChange({\n event: e,\n file: _extends({}, targetItem),\n fileList: getFileList().concat()\n });\n };\n\n var onError = function onError(error, response, file) {\n var targetItem = getFileItem(file, getFileList()); // removed\n\n if (!targetItem) {\n return;\n }\n\n targetItem.error = error;\n targetItem.response = response;\n targetItem.status = 'error';\n onChange({\n file: _extends({}, targetItem),\n fileList: getFileList().concat()\n });\n };\n\n var handleRemove = function handleRemove(file) {\n Promise.resolve(typeof onRemove === 'function' ? onRemove(file) : onRemove).then(function (ret) {\n // Prevent removing file\n if (ret === false) {\n return;\n }\n\n var removedFileList = removeFileItem(file, getFileList());\n\n if (removedFileList) {\n file.status = 'removed';\n\n if (upload.current) {\n upload.current.abort(file);\n }\n\n onChange({\n file: file,\n fileList: removedFileList\n });\n }\n });\n };\n\n var onFileDrop = function onFileDrop(e) {\n setDragState(e.type);\n };\n\n var beforeUpload = function beforeUpload(file, fileListArgs) {\n var beforeUploadProp = props.beforeUpload;\n\n if (!beforeUploadProp) {\n return true;\n }\n\n var result = beforeUploadProp(file, fileListArgs);\n\n if (result === false) {\n // Get unique file list\n var uniqueList = [];\n getFileList().concat(fileListArgs.map(fileToObject)).forEach(function (f) {\n if (uniqueList.every(function (uf) {\n return uf.uid !== f.uid;\n })) {\n uniqueList.push(f);\n }\n });\n onChange({\n file: file,\n fileList: uniqueList\n });\n return false;\n }\n\n if (result && result.then) {\n return result;\n }\n\n return true;\n }; // Test needs\n\n\n React.useImperativeHandle(ref, function () {\n return {\n onStart: onStart,\n onSuccess: onSuccess,\n onProgress: onProgress,\n onError: onError,\n fileList: getFileList(),\n upload: upload.current,\n forceUpdate: forceUpdate\n };\n });\n\n var _React$useContext = React.useContext(ConfigContext),\n getPrefixCls = _React$useContext.getPrefixCls,\n direction = _React$useContext.direction;\n\n var prefixCls = getPrefixCls('upload', customizePrefixCls);\n\n var rcUploadProps = _extends(_extends({\n onStart: onStart,\n onError: onError,\n onProgress: onProgress,\n onSuccess: onSuccess\n }, props), {\n prefixCls: prefixCls,\n beforeUpload: beforeUpload\n });\n\n delete rcUploadProps.className;\n delete rcUploadProps.style; // Remove id to avoid open by label when trigger is hidden\n // !children: https://github.com/ant-design/ant-design/issues/14298\n // disabled: https://github.com/ant-design/ant-design/issues/16478\n // https://github.com/ant-design/ant-design/issues/24197\n\n if (!children || disabled) {\n delete rcUploadProps.id;\n }\n\n var renderUploadList = function renderUploadList(button) {\n return showUploadList ? /*#__PURE__*/React.createElement(LocaleReceiver, {\n componentName: \"Upload\",\n defaultLocale: defaultLocale.Upload\n }, function (locale) {\n var _ref2 = typeof showUploadList === 'boolean' ? {} : showUploadList,\n showRemoveIcon = _ref2.showRemoveIcon,\n showPreviewIcon = _ref2.showPreviewIcon,\n showDownloadIcon = _ref2.showDownloadIcon,\n removeIcon = _ref2.removeIcon,\n downloadIcon = _ref2.downloadIcon;\n\n return /*#__PURE__*/React.createElement(UploadList, {\n listType: listType,\n items: getFileList(true),\n previewFile: previewFile,\n onPreview: onPreview,\n onDownload: onDownload,\n onRemove: handleRemove,\n showRemoveIcon: !disabled && showRemoveIcon,\n showPreviewIcon: showPreviewIcon,\n showDownloadIcon: showDownloadIcon,\n removeIcon: removeIcon,\n downloadIcon: downloadIcon,\n iconRender: iconRender,\n locale: _extends(_extends({}, locale), propLocale),\n isImageUrl: isImageUrl,\n progress: progress,\n appendAction: button,\n itemRender: itemRender\n });\n }) : button;\n };\n\n if (type === 'drag') {\n var _classNames;\n\n var dragCls = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-drag\"), true), _defineProperty(_classNames, \"\".concat(prefixCls, \"-drag-uploading\"), getFileList().some(function (file) {\n return file.status === 'uploading';\n })), _defineProperty(_classNames, \"\".concat(prefixCls, \"-drag-hover\"), dragState === 'dragover'), _defineProperty(_classNames, \"\".concat(prefixCls, \"-disabled\"), disabled), _defineProperty(_classNames, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _classNames), className);\n return /*#__PURE__*/React.createElement(\"span\", null, /*#__PURE__*/React.createElement(\"div\", {\n className: dragCls,\n onDrop: onFileDrop,\n onDragOver: onFileDrop,\n onDragLeave: onFileDrop,\n style: style\n }, /*#__PURE__*/React.createElement(RcUpload, _extends({}, rcUploadProps, {\n ref: upload,\n className: \"\".concat(prefixCls, \"-btn\")\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-drag-container\")\n }, children))), renderUploadList());\n }\n\n var uploadButtonCls = classNames(prefixCls, (_classNames2 = {}, _defineProperty(_classNames2, \"\".concat(prefixCls, \"-select\"), true), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-select-\").concat(listType), true), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-disabled\"), disabled), _defineProperty(_classNames2, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _classNames2));\n var uploadButton = /*#__PURE__*/React.createElement(\"div\", {\n className: uploadButtonCls,\n style: children ? undefined : {\n display: 'none'\n }\n }, /*#__PURE__*/React.createElement(RcUpload, _extends({}, rcUploadProps, {\n ref: upload\n })));\n\n if (listType === 'picture-card') {\n return /*#__PURE__*/React.createElement(\"span\", {\n className: classNames(\"\".concat(prefixCls, \"-picture-card-wrapper\"), className)\n }, renderUploadList(uploadButton));\n }\n\n return /*#__PURE__*/React.createElement(\"span\", {\n className: className\n }, uploadButton, renderUploadList());\n};\n\nvar Upload = /*#__PURE__*/React.forwardRef(InternalUpload);\nUpload.Dragger = Dragger;\nUpload.displayName = 'Upload';\nUpload.defaultProps = {\n type: 'select',\n multiple: false,\n action: '',\n data: {},\n accept: '',\n beforeUpload: T,\n showUploadList: true,\n listType: 'text',\n className: '',\n disabled: false,\n supportServerRender: true\n};\nexport default Upload;"]},"metadata":{},"sourceType":"module"}