react-dropzone 4.1.1 → 4.1.2
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/.eslintrc +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +18 -18
- package/src/index.js +1 -1
- package/src/index.spec.js +25 -25
- package/yarn.lock +402 -312
package/.eslintrc
CHANGED
package/dist/index.js
CHANGED
|
@@ -537,7 +537,7 @@ exports.default = Dropzone;
|
|
|
537
537
|
Dropzone.propTypes = {
|
|
538
538
|
/**
|
|
539
539
|
* Allow specific types of files. See https://github.com/okonet/attr-accept for more information.
|
|
540
|
-
* Keep in mind that mime type determination is not reliable
|
|
540
|
+
* Keep in mind that mime type determination is not reliable across platforms. CSV files,
|
|
541
541
|
* for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
|
|
542
542
|
* Windows. In some cases there might not be a mime type set at all.
|
|
543
543
|
* See: https://github.com/react-dropzone/react-dropzone/issues/276
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 467681149e61e608f63a","webpack:///./src/index.js","webpack:///./node_modules/process/browser.js","webpack:///external \"react\"","webpack:///external \"prop-types\"","webpack:///./src/utils/index.js","webpack:///./node_modules/attr-accept/dist/index.js","webpack:///./src/utils/styles.js"],"names":["Dropzone","props","context","renderChildren","children","isDragActive","isDragAccept","isDragReject","state","composeHandlers","bind","onClick","onDocumentDrop","onDragEnter","onDragLeave","onDragOver","onDragStart","onDrop","onFileDialogCancel","onInputElementClick","setRef","setRefs","isFileDialogActive","draggedFiles","acceptedFiles","rejectedFiles","preventDropOnDocument","dragTargets","document","addEventListener","fileInputEl","body","onfocus","removeEventListener","handler","disabled","evt","node","contains","target","preventDefault","call","indexOf","push","setState","stopPropagation","dataTransfer","dropEffect","err","filter","el","length","onDropAccepted","onDropRejected","multiple","disablePreview","accept","fileList","forEach","file","preview","window","URL","createObjectURL","process","env","NODE_ENV","console","error","maxSize","minSize","splice","disableClick","setTimeout","open","inputProps","FileList","files","ref","value","click","acceptClassName","activeClassName","disabledClassName","name","rejectClassName","rest","acceptStyle","activeStyle","className","disabledStyle","rejectStyle","style","filesCount","isMultipleAllowed","noStyles","default","active","rejected","appliedStyle","inputAttributes","type","display","onChange","autoComplete","customProps","divProps","prop","Component","propTypes","string","oneOfType","func","bool","object","number","defaultProps","Infinity","getDataTransferItems","fileAccepted","fileMatchSize","allFilesAccepted","onDocumentDragOver","supportMultiple","createElement","event","dataTransferItemsList","dt","items","Array","prototype","slice","size","every","borderStyle","borderColor","backgroundColor","opacity","width","height","borderWidth","borderRadius"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;AC3DA;;;;AACA;;;;AACA;;AAQA;;;;;;;;;;;;;;+eAZA;;IAcMA,Q;;;AACJ,oBAAYC,KAAZ,EAAmBC,OAAnB,EAA4B;AAAA;;AAAA,oHACpBD,KADoB,EACbC,OADa;;AAAA,UA0P5BC,cA1P4B,GA0PX,UAACC,QAAD,EAAWC,YAAX,EAAyBC,YAAzB,EAAuCC,YAAvC,EAAwD;AACvE,UAAI,OAAOH,QAAP,KAAoB,UAAxB,EAAoC;AAClC,eAAOA,sBACF,MAAKI,KADH;AAELH,oCAFK;AAGLC,oCAHK;AAILC;AAJK,W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AACtB1F,yBAAuB,IADD;AAEtBS,YAAU,KAFY;AAGtBoB,kBAAgB,KAHM;AAItBiB,gBAAc,KAJQ;AAKtBlB,YAAU,IALY;AAMtBe,WAASgD,QANa;AAOtB/C,WAAS;AAPa,CAAxB;;;;;;;;AC3jBA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;ACvLtC,+C;;;;;;ACAA,+C;;;;;;;;;;;;;QCOgBgD,oB,GAAAA,oB;QAoBAC,Y,GAAAA,Y;QAI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D,qBAAqB,iBAAiB,4BAA4B,kCAAkC,MAAM,eAAe,UAAU,IAAI,EAAE,eAAe,6BAA6B,sBAAsB,mCAAmC,iBAAiB,uBAAuB,sBAAsB,uCAAuC,iBAAiB,aAAa,gDAAgD,6BAA6B,qBAAqB,iHAAiH,kDAAkD,EAAE,iBAAiB,0CAA0C,iBAAiB,qCAAqC,wEAAwE,GAAG,kOAAkO,G;;;;;;;;;;;;kBCAr2J;AACb0D,YAAU;AACRoC,iBAAa,OADL;AAERC,iBAAa,MAFL;AAGRC,qBAAiB;AAHT,GADG;AAMbrG,YAAU;AACRsG,aAAS;AADD,GANG;AASbxC,UAAQ;AACNqC,iBAAa,OADP;AAENC,iBAAa,MAFP;AAGNC,qBAAiB;AAHX,GATK;AAcbxC,WAAS;AACP0C,WAAO,GADA;AAEPC,YAAQ,GAFD;AAGPC,iBAAa,CAHN;AAIPL,iBAAa,MAJN;AAKPD,iBAAa,QALN;AAMPO,kBAAc;AANP;AAdI,C","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"prop-types\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"prop-types\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Dropzone\"] = factory(require(\"react\"), require(\"prop-types\"));\n\telse\n\t\troot[\"Dropzone\"] = factory(root[\"react\"], root[\"prop-types\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 467681149e61e608f63a","/* eslint prefer-template: 0 */\n\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport {\n supportMultiple,\n fileAccepted,\n allFilesAccepted,\n fileMatchSize,\n onDocumentDragOver,\n getDataTransferItems\n} from './utils'\nimport styles from './utils/styles'\n\nclass Dropzone extends React.Component {\n constructor(props, context) {\n super(props, context)\n this.composeHandlers = this.composeHandlers.bind(this)\n this.onClick = this.onClick.bind(this)\n this.onDocumentDrop = this.onDocumentDrop.bind(this)\n this.onDragEnter = this.onDragEnter.bind(this)\n this.onDragLeave = this.onDragLeave.bind(this)\n this.onDragOver = this.onDragOver.bind(this)\n this.onDragStart = this.onDragStart.bind(this)\n this.onDrop = this.onDrop.bind(this)\n this.onFileDialogCancel = this.onFileDialogCancel.bind(this)\n this.onInputElementClick = this.onInputElementClick.bind(this)\n\n this.setRef = this.setRef.bind(this)\n this.setRefs = this.setRefs.bind(this)\n\n this.isFileDialogActive = false\n\n this.state = {\n draggedFiles: [],\n acceptedFiles: [],\n rejectedFiles: []\n }\n }\n\n componentDidMount() {\n const { preventDropOnDocument } = this.props\n this.dragTargets = []\n\n if (preventDropOnDocument) {\n document.addEventListener('dragover', onDocumentDragOver, false)\n document.addEventListener('drop', this.onDocumentDrop, false)\n }\n this.fileInputEl.addEventListener('click', this.onInputElementClick, false)\n // Tried implementing addEventListener, but didn't work out\n document.body.onfocus = this.onFileDialogCancel\n }\n\n componentWillUnmount() {\n const { preventDropOnDocument } = this.props\n if (preventDropOnDocument) {\n document.removeEventListener('dragover', onDocumentDragOver)\n document.removeEventListener('drop', this.onDocumentDrop)\n }\n this.fileInputEl.removeEventListener('click', this.onInputElementClick, false)\n // Can be replaced with removeEventListener, if addEventListener works\n document.body.onfocus = null\n }\n\n composeHandlers(handler) {\n if (this.props.disabled) {\n return null\n }\n\n return handler\n }\n\n onDocumentDrop(evt) {\n if (this.node.contains(evt.target)) {\n // if we intercepted an event for our instance, let it propagate down to the instance's onDrop handler\n return\n }\n evt.preventDefault()\n this.dragTargets = []\n }\n\n onDragStart(evt) {\n if (this.props.onDragStart) {\n this.props.onDragStart.call(this, evt)\n }\n }\n\n onDragEnter(evt) {\n evt.preventDefault()\n\n // Count the dropzone and any children that are entered.\n if (this.dragTargets.indexOf(evt.target) === -1) {\n this.dragTargets.push(evt.target)\n }\n\n this.setState({\n isDragActive: true, // Do not rely on files for the drag state. It doesn't work in Safari.\n draggedFiles: getDataTransferItems(evt)\n })\n\n if (this.props.onDragEnter) {\n this.props.onDragEnter.call(this, evt)\n }\n }\n\n onDragOver(evt) {\n // eslint-disable-line class-methods-use-this\n evt.preventDefault()\n evt.stopPropagation()\n try {\n evt.dataTransfer.dropEffect = 'copy' // eslint-disable-line no-param-reassign\n } catch (err) {\n // continue regardless of error\n }\n\n if (this.props.onDragOver) {\n this.props.onDragOver.call(this, evt)\n }\n return false\n }\n\n onDragLeave(evt) {\n evt.preventDefault()\n\n // Only deactivate once the dropzone and all children have been left.\n this.dragTargets = this.dragTargets.filter(el => el !== evt.target && this.node.contains(el))\n if (this.dragTargets.length > 0) {\n return\n }\n\n // Clear dragging files state\n this.setState({\n isDragActive: false,\n draggedFiles: []\n })\n\n if (this.props.onDragLeave) {\n this.props.onDragLeave.call(this, evt)\n }\n }\n\n onDrop(evt) {\n const { onDrop, onDropAccepted, onDropRejected, multiple, disablePreview, accept } = this.props\n const fileList = getDataTransferItems(evt)\n const acceptedFiles = []\n const rejectedFiles = []\n\n // Stop default browser behavior\n evt.preventDefault()\n\n // Reset the counter along with the drag on a drop.\n this.dragTargets = []\n this.isFileDialogActive = false\n\n fileList.forEach(file => {\n if (!disablePreview) {\n try {\n file.preview = window.URL.createObjectURL(file) // eslint-disable-line no-param-reassign\n } catch (err) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Failed to generate preview for file', file, err) // eslint-disable-line no-console\n }\n }\n }\n\n if (\n fileAccepted(file, accept) &&\n fileMatchSize(file, this.props.maxSize, this.props.minSize)\n ) {\n acceptedFiles.push(file)\n } else {\n rejectedFiles.push(file)\n }\n })\n\n if (!multiple) {\n // if not in multi mode add any extra accepted files to rejected.\n // This will allow end users to easily ignore a multi file drop in \"single\" mode.\n rejectedFiles.push(...acceptedFiles.splice(1))\n }\n\n if (onDrop) {\n onDrop.call(this, acceptedFiles, rejectedFiles, evt)\n }\n\n if (rejectedFiles.length > 0 && onDropRejected) {\n onDropRejected.call(this, rejectedFiles, evt)\n }\n\n if (acceptedFiles.length > 0 && onDropAccepted) {\n onDropAccepted.call(this, acceptedFiles, evt)\n }\n\n // Clear files value\n this.draggedFiles = null\n\n // Reset drag state\n this.setState({\n isDragActive: false,\n draggedFiles: [],\n acceptedFiles,\n rejectedFiles\n })\n }\n\n onClick(evt) {\n const { onClick, disableClick } = this.props\n if (!disableClick) {\n evt.stopPropagation()\n\n if (onClick) {\n onClick.call(this, evt)\n }\n\n // in IE11/Edge the file-browser dialog is blocking, ensure this is behind setTimeout\n // this is so react can handle state changes in the onClick prop above above\n // see: https://github.com/react-dropzone/react-dropzone/issues/450\n setTimeout(this.open.bind(this), 0)\n }\n }\n\n onInputElementClick(evt) {\n evt.stopPropagation()\n if (this.props.inputProps && this.props.inputProps.onClick) {\n this.props.inputProps.onClick()\n }\n }\n\n onFileDialogCancel() {\n // timeout will not recognize context of this method\n const { onFileDialogCancel } = this.props\n const { fileInputEl } = this\n let { isFileDialogActive } = this\n // execute the timeout only if the onFileDialogCancel is defined and FileDialog\n // is opened in the browser\n if (onFileDialogCancel && isFileDialogActive) {\n setTimeout(() => {\n // Returns an object as FileList\n const FileList = fileInputEl.files\n if (!FileList.length) {\n isFileDialogActive = false\n onFileDialogCancel()\n }\n }, 300)\n }\n }\n\n setRef(ref) {\n this.node = ref\n }\n\n setRefs(ref) {\n this.fileInputEl = ref\n }\n /**\n * Open system file upload dialog.\n *\n * @public\n */\n open() {\n this.isFileDialogActive = true\n this.fileInputEl.value = null\n this.fileInputEl.click()\n }\n\n renderChildren = (children, isDragActive, isDragAccept, isDragReject) => {\n if (typeof children === 'function') {\n return children({\n ...this.state,\n isDragActive,\n isDragAccept,\n isDragReject\n })\n }\n return children\n }\n\n render() {\n const {\n accept,\n acceptClassName,\n activeClassName,\n children,\n disabled,\n disabledClassName,\n inputProps,\n multiple,\n name,\n rejectClassName,\n ...rest\n } = this.props\n\n let {\n acceptStyle,\n activeStyle,\n className,\n disabledStyle,\n rejectStyle,\n style,\n ...props // eslint-disable-line prefer-const\n } = rest\n\n const { isDragActive, draggedFiles } = this.state\n const filesCount = draggedFiles.length\n const isMultipleAllowed = multiple || filesCount <= 1\n const isDragAccept = filesCount > 0 && allFilesAccepted(draggedFiles, this.props.accept)\n const isDragReject = filesCount > 0 && (!isDragAccept || !isMultipleAllowed)\n className = className || ''\n const noStyles =\n !className && !style && !activeStyle && !acceptStyle && !rejectStyle && !disabledStyle\n\n if (isDragActive && activeClassName) {\n className += ' ' + activeClassName\n }\n if (isDragAccept && acceptClassName) {\n className += ' ' + acceptClassName\n }\n if (isDragReject && rejectClassName) {\n className += ' ' + rejectClassName\n }\n if (disabled && disabledClassName) {\n className += ' ' + disabledClassName\n }\n\n if (noStyles) {\n style = styles.default\n activeStyle = styles.active\n acceptStyle = style.active\n rejectStyle = styles.rejected\n disabledStyle = styles.disabled\n }\n\n let appliedStyle = { ...style }\n if (activeStyle && isDragActive) {\n appliedStyle = {\n ...style,\n ...activeStyle\n }\n }\n if (acceptStyle && isDragAccept) {\n appliedStyle = {\n ...appliedStyle,\n ...acceptStyle\n }\n }\n if (rejectStyle && isDragReject) {\n appliedStyle = {\n ...appliedStyle,\n ...rejectStyle\n }\n }\n if (disabledStyle && disabled) {\n appliedStyle = {\n ...style,\n ...disabledStyle\n }\n }\n\n const inputAttributes = {\n accept,\n disabled,\n type: 'file',\n style: { display: 'none' },\n multiple: supportMultiple && multiple,\n ref: this.setRefs,\n onChange: this.onDrop,\n autoComplete: 'off'\n }\n\n if (name && name.length) {\n inputAttributes.name = name\n }\n\n // Remove custom properties before passing them to the wrapper div element\n const customProps = [\n 'acceptedFiles',\n 'preventDropOnDocument',\n 'disablePreview',\n 'disableClick',\n 'onDropAccepted',\n 'onDropRejected',\n 'onFileDialogCancel',\n 'maxSize',\n 'minSize'\n ]\n const divProps = { ...props }\n customProps.forEach(prop => delete divProps[prop])\n\n return (\n <div\n className={className}\n style={appliedStyle}\n {...divProps /* expand user provided props first so event handlers are never overridden */}\n onClick={this.composeHandlers(this.onClick)}\n onDragStart={this.composeHandlers(this.onDragStart)}\n onDragEnter={this.composeHandlers(this.onDragEnter)}\n onDragOver={this.composeHandlers(this.onDragOver)}\n onDragLeave={this.composeHandlers(this.onDragLeave)}\n onDrop={this.composeHandlers(this.onDrop)}\n ref={this.setRef}\n aria-disabled={disabled}\n >\n {this.renderChildren(children, isDragActive, isDragAccept, isDragReject)}\n <input\n {...inputProps /* expand user provided inputProps first so inputAttributes override them */}\n {...inputAttributes}\n />\n </div>\n )\n }\n}\n\nexport default Dropzone\n\nDropzone.propTypes = {\n /**\n * Allow specific types of files. See https://github.com/okonet/attr-accept for more information.\n * Keep in mind that mime type determination is not reliable accross platforms. CSV files,\n * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under\n * Windows. In some cases there might not be a mime type set at all.\n * See: https://github.com/react-dropzone/react-dropzone/issues/276\n */\n accept: PropTypes.string,\n\n /**\n * Contents of the dropzone\n */\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n\n /**\n * Disallow clicking on the dropzone container to open file dialog\n */\n disableClick: PropTypes.bool,\n\n /**\n * Enable/disable the dropzone entirely\n */\n disabled: PropTypes.bool,\n\n /**\n * Enable/disable preview generation\n */\n disablePreview: PropTypes.bool,\n\n /**\n * If false, allow dropped items to take over the current browser window\n */\n preventDropOnDocument: PropTypes.bool,\n\n /**\n * Pass additional attributes to the `<input type=\"file\"/>` tag\n */\n inputProps: PropTypes.object,\n\n /**\n * Allow dropping multiple files\n */\n multiple: PropTypes.bool,\n\n /**\n * `name` attribute for the input tag\n */\n name: PropTypes.string,\n\n /**\n * Maximum file size\n */\n maxSize: PropTypes.number,\n\n /**\n * Minimum file size\n */\n minSize: PropTypes.number,\n\n /**\n * className\n */\n className: PropTypes.string,\n\n /**\n * className for active state\n */\n activeClassName: PropTypes.string,\n\n /**\n * className for accepted state\n */\n acceptClassName: PropTypes.string,\n\n /**\n * className for rejected state\n */\n rejectClassName: PropTypes.string,\n\n /**\n * className for disabled state\n */\n disabledClassName: PropTypes.string,\n\n /**\n * CSS styles to apply\n */\n style: PropTypes.object,\n\n /**\n * CSS styles to apply when drag is active\n */\n activeStyle: PropTypes.object,\n\n /**\n * CSS styles to apply when drop will be accepted\n */\n acceptStyle: PropTypes.object,\n\n /**\n * CSS styles to apply when drop will be rejected\n */\n rejectStyle: PropTypes.object,\n\n /**\n * CSS styles to apply when dropzone is disabled\n */\n disabledStyle: PropTypes.object,\n\n /**\n * onClick callback\n * @param {Event} event\n */\n onClick: PropTypes.func,\n\n /**\n * onDrop callback\n */\n onDrop: PropTypes.func,\n\n /**\n * onDropAccepted callback\n */\n onDropAccepted: PropTypes.func,\n\n /**\n * onDropRejected callback\n */\n onDropRejected: PropTypes.func,\n\n /**\n * onDragStart callback\n */\n onDragStart: PropTypes.func,\n\n /**\n * onDragEnter callback\n */\n onDragEnter: PropTypes.func,\n\n /**\n * onDragOver callback\n */\n onDragOver: PropTypes.func,\n\n /**\n * onDragLeave callback\n */\n onDragLeave: PropTypes.func,\n\n /**\n * Provide a callback on clicking the cancel button of the file dialog\n */\n onFileDialogCancel: PropTypes.func\n}\n\nDropzone.defaultProps = {\n preventDropOnDocument: true,\n disabled: false,\n disablePreview: false,\n disableClick: false,\n multiple: true,\n maxSize: Infinity,\n minSize: 0\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/process/browser.js\n// module id = 1\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 2\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"prop-types\"\n// module id = 3\n// module chunks = 0","import accepts from 'attr-accept'\n\nexport const supportMultiple =\n typeof document !== 'undefined' && document && document.createElement\n ? 'multiple' in document.createElement('input')\n : true\n\nexport function getDataTransferItems(event) {\n let dataTransferItemsList = []\n if (event.dataTransfer) {\n const dt = event.dataTransfer\n if (dt.files && dt.files.length) {\n dataTransferItemsList = dt.files\n } else if (dt.items && dt.items.length) {\n // During the drag even the dataTransfer.files is null\n // but Chrome implements some drag store, which is accesible via dataTransfer.items\n dataTransferItemsList = dt.items\n }\n } else if (event.target && event.target.files) {\n dataTransferItemsList = event.target.files\n }\n // Convert from DataTransferItemsList to the native Array\n return Array.prototype.slice.call(dataTransferItemsList)\n}\n\n// Firefox versions prior to 53 return a bogus MIME type for every file drag, so dragovers with\n// that MIME type will always be accepted\nexport function fileAccepted(file, accept) {\n return file.type === 'application/x-moz-file' || accepts(file, accept)\n}\n\nexport function fileMatchSize(file, maxSize, minSize) {\n return file.size <= maxSize && file.size >= minSize\n}\n\nexport function allFilesAccepted(files, accept) {\n return files.every(file => fileAccepted(file, accept))\n}\n\n// allow the entire document to be a drag target\nexport function onDocumentDragOver(evt) {\n evt.preventDefault()\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/index.js","module.exports=function(t){function n(e){if(r[e])return r[e].exports;var o=r[e]={exports:{},id:e,loaded:!1};return t[e].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=t,n.c=r,n.p=\"\",n(0)}([function(t,n,r){\"use strict\";n.__esModule=!0,r(8),r(9),n[\"default\"]=function(t,n){if(t&&n){var r=function(){var r=Array.isArray(n)?n:n.split(\",\"),e=t.name||\"\",o=t.type||\"\",i=o.replace(/\\/.*$/,\"\");return{v:r.some(function(t){var n=t.trim();return\".\"===n.charAt(0)?e.toLowerCase().endsWith(n.toLowerCase()):/\\/\\*$/.test(n)?i===n.replace(/\\/.*$/,\"\"):o===n})}}();if(\"object\"==typeof r)return r.v}return!0},t.exports=n[\"default\"]},function(t,n){var r=t.exports={version:\"1.2.2\"};\"number\"==typeof __e&&(__e=r)},function(t,n){var r=t.exports=\"undefined\"!=typeof window&&window.Math==Math?window:\"undefined\"!=typeof self&&self.Math==Math?self:Function(\"return this\")();\"number\"==typeof __g&&(__g=r)},function(t,n,r){var e=r(2),o=r(1),i=r(4),u=r(19),c=\"prototype\",f=function(t,n){return function(){return t.apply(n,arguments)}},s=function(t,n,r){var a,p,l,y,d=t&s.G,h=t&s.P,v=d?e:t&s.S?e[n]||(e[n]={}):(e[n]||{})[c],x=d?o:o[n]||(o[n]={});d&&(r=n);for(a in r)p=!(t&s.F)&&v&&a in v,l=(p?v:r)[a],y=t&s.B&&p?f(l,e):h&&\"function\"==typeof l?f(Function.call,l):l,v&&!p&&u(v,a,l),x[a]!=l&&i(x,a,y),h&&((x[c]||(x[c]={}))[a]=l)};e.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,t.exports=s},function(t,n,r){var e=r(5),o=r(18);t.exports=r(22)?function(t,n,r){return e.setDesc(t,n,o(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n){var r=Object;t.exports={create:r.create,getProto:r.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:r.getOwnPropertyDescriptor,setDesc:r.defineProperty,setDescs:r.defineProperties,getKeys:r.keys,getNames:r.getOwnPropertyNames,getSymbols:r.getOwnPropertySymbols,each:[].forEach}},function(t,n){var r=0,e=Math.random();t.exports=function(t){return\"Symbol(\".concat(void 0===t?\"\":t,\")_\",(++r+e).toString(36))}},function(t,n,r){var e=r(20)(\"wks\"),o=r(2).Symbol;t.exports=function(t){return e[t]||(e[t]=o&&o[t]||(o||r(6))(\"Symbol.\"+t))}},function(t,n,r){r(26),t.exports=r(1).Array.some},function(t,n,r){r(25),t.exports=r(1).String.endsWith},function(t,n){t.exports=function(t){if(\"function\"!=typeof t)throw TypeError(t+\" is not a function!\");return t}},function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n,r){var e=r(10);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,o){return t.call(n,r,e,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError(\"Can't call method on \"+t);return t}},function(t,n,r){t.exports=function(t){var n=/./;try{\"/./\"[t](n)}catch(e){try{return n[r(7)(\"match\")]=!1,!\"/./\"[t](n)}catch(o){}}return!0}},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n){t.exports=function(t){return\"object\"==typeof t?null!==t:\"function\"==typeof t}},function(t,n,r){var e=r(16),o=r(11),i=r(7)(\"match\");t.exports=function(t){var n;return e(t)&&(void 0!==(n=t[i])?!!n:\"RegExp\"==o(t))}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,r){var e=r(2),o=r(4),i=r(6)(\"src\"),u=\"toString\",c=Function[u],f=(\"\"+c).split(u);r(1).inspectSource=function(t){return c.call(t)},(t.exports=function(t,n,r,u){\"function\"==typeof r&&(o(r,i,t[n]?\"\"+t[n]:f.join(String(n))),\"name\"in r||(r.name=n)),t===e?t[n]=r:(u||delete t[n],o(t,n,r))})(Function.prototype,u,function(){return\"function\"==typeof this&&this[i]||c.call(this)})},function(t,n,r){var e=r(2),o=\"__core-js_shared__\",i=e[o]||(e[o]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,n,r){var e=r(17),o=r(13);t.exports=function(t,n,r){if(e(n))throw TypeError(\"String#\"+r+\" doesn't accept regex!\");return String(o(t))}},function(t,n,r){t.exports=!r(15)(function(){return 7!=Object.defineProperty({},\"a\",{get:function(){return 7}}).a})},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},function(t,n,r){var e=r(23),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},function(t,n,r){\"use strict\";var e=r(3),o=r(24),i=r(21),u=\"endsWith\",c=\"\"[u];e(e.P+e.F*r(14)(u),\"String\",{endsWith:function(t){var n=i(this,t,u),r=arguments,e=r.length>1?r[1]:void 0,f=o(n.length),s=void 0===e?f:Math.min(o(e),f),a=String(t);return c?c.call(n,a,s):n.slice(s-a.length,s)===a}})},function(t,n,r){var e=r(5),o=r(3),i=r(1).Array||Array,u={},c=function(t,n){e.each.call(t.split(\",\"),function(t){void 0==n&&t in i?u[t]=i[t]:t in[]&&(u[t]=r(12)(Function.call,[][t],n))})};c(\"pop,reverse,shift,keys,values,entries\",1),c(\"indexOf,every,some,forEach,map,filter,find,findIndex,includes\",3),c(\"join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill\"),o(o.S,\"Array\",u)}]);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/attr-accept/dist/index.js\n// module id = 5\n// module chunks = 0","export default {\n rejected: {\n borderStyle: 'solid',\n borderColor: '#c66',\n backgroundColor: '#eee'\n },\n disabled: {\n opacity: 0.5\n },\n active: {\n borderStyle: 'solid',\n borderColor: '#6c6',\n backgroundColor: '#eee'\n },\n default: {\n width: 200,\n height: 200,\n borderWidth: 2,\n borderColor: '#666',\n borderStyle: 'dashed',\n borderRadius: 5\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/styles.js"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap f899e2522fa0c493f660","webpack:///./src/index.js","webpack:///./node_modules/process/browser.js","webpack:///external \"react\"","webpack:///external \"prop-types\"","webpack:///./src/utils/index.js","webpack:///./node_modules/attr-accept/dist/index.js","webpack:///./src/utils/styles.js"],"names":["Dropzone","props","context","renderChildren","children","isDragActive","isDragAccept","isDragReject","state","composeHandlers","bind","onClick","onDocumentDrop","onDragEnter","onDragLeave","onDragOver","onDragStart","onDrop","onFileDialogCancel","onInputElementClick","setRef","setRefs","isFileDialogActive","draggedFiles","acceptedFiles","rejectedFiles","preventDropOnDocument","dragTargets","document","addEventListener","fileInputEl","body","onfocus","removeEventListener","handler","disabled","evt","node","contains","target","preventDefault","call","indexOf","push","setState","stopPropagation","dataTransfer","dropEffect","err","filter","el","length","onDropAccepted","onDropRejected","multiple","disablePreview","accept","fileList","forEach","file","preview","window","URL","createObjectURL","process","env","NODE_ENV","console","error","maxSize","minSize","splice","disableClick","setTimeout","open","inputProps","FileList","files","ref","value","click","acceptClassName","activeClassName","disabledClassName","name","rejectClassName","rest","acceptStyle","activeStyle","className","disabledStyle","rejectStyle","style","filesCount","isMultipleAllowed","noStyles","default","active","rejected","appliedStyle","inputAttributes","type","display","onChange","autoComplete","customProps","divProps","prop","Component","propTypes","string","oneOfType","func","bool","object","number","defaultProps","Infinity","getDataTransferItems","fileAccepted","fileMatchSize","allFilesAccepted","onDocumentDragOver","supportMultiple","createElement","event","dataTransferItemsList","dt","items","Array","prototype","slice","size","every","borderStyle","borderColor","backgroundColor","opacity","width","height","borderWidth","borderRadius"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;AC3DA;;;;AACA;;;;AACA;;AAQA;;;;;;;;;;;;;;+eAZA;;IAcMA,Q;;;AACJ,oBAAYC,KAAZ,EAAmBC,OAAnB,EAA4B;AAAA;;AAAA,oHACpBD,KADoB,EACbC,OADa;;AAAA,UA0P5BC,cA1P4B,GA0PX,UAACC,QAAD,EAAWC,YAAX,EAAyBC,YA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AY,oBAAUiG,IAhJH;;AAkJnB;;;AAGAlG,eAAa,oBAAUkG,IArJJ;;AAuJnB;;;AAGA9F,sBAAoB,oBAAU8F;AA1JX,CAArB;;AA6JAhH,SAASoH,YAAT,GAAwB;AACtB1F,yBAAuB,IADD;AAEtBS,YAAU,KAFY;AAGtBoB,kBAAgB,KAHM;AAItBiB,gBAAc,KAJQ;AAKtBlB,YAAU,IALY;AAMtBe,WAASgD,QANa;AAOtB/C,WAAS;AAPa,CAAxB;;;;;;;;AC3jBA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAE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AiB,6EAA6E,+BAA+B,iBAAiB,8BAA8B,4HAA4H,kCAAkC,qDAAqD,EAAE,iBAAiB,kDAAkD,EAAE,sBAAsB,qBAAqB,GAAG,iBAAiB,oBAAoB,0BAA0B,8DAA8D,qBAAqB,iBAAiB,4BAA4B,kCAAkC,MAAM,eAAe,UAAU,IAAI,EAAE,eAAe,6BAA6B,sBAAsB,mCAAmC,iBAAiB,uBAAuB,sBAAsB,uCAAuC,iBAAiB,aAAa,gDAAgD,6BAA6B,qBAAqB,iHAAiH,kDAAkD,EAAE,iBAAiB,0CAA0C,iBAAiB,qCAAqC,wEAAwE,GAAG,kOAAkO,G;;;;;;;;;;;;kBCAr2J;AACb0D,YAAU;AACRoC,iBAAa,OADL;AAERC,iBAAa,MAFL;AAGRC,qBAAiB;AAHT,GADG;AAMbrG,YAAU;AACRsG,aAAS;AADD,GANG;AASbxC,UAAQ;AACNqC,iBAAa,OADP;AAENC,iBAAa,MAFP;AAGNC,qBAAiB;AAHX,GATK;AAcbxC,WAAS;AACP0C,WAAO,GADA;AAEPC,YAAQ,GAFD;AAGPC,iBAAa,CAHN;AAIPL,iBAAa,MAJN;AAKPD,iBAAa,QALN;AAMPO,kBAAc;AANP;AAdI,C","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"prop-types\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"prop-types\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Dropzone\"] = factory(require(\"react\"), require(\"prop-types\"));\n\telse\n\t\troot[\"Dropzone\"] = factory(root[\"react\"], root[\"prop-types\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap f899e2522fa0c493f660","/* eslint prefer-template: 0 */\n\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport {\n supportMultiple,\n fileAccepted,\n allFilesAccepted,\n fileMatchSize,\n onDocumentDragOver,\n getDataTransferItems\n} from './utils'\nimport styles from './utils/styles'\n\nclass Dropzone extends React.Component {\n constructor(props, context) {\n super(props, context)\n this.composeHandlers = this.composeHandlers.bind(this)\n this.onClick = this.onClick.bind(this)\n this.onDocumentDrop = this.onDocumentDrop.bind(this)\n this.onDragEnter = this.onDragEnter.bind(this)\n this.onDragLeave = this.onDragLeave.bind(this)\n this.onDragOver = this.onDragOver.bind(this)\n this.onDragStart = this.onDragStart.bind(this)\n this.onDrop = this.onDrop.bind(this)\n this.onFileDialogCancel = this.onFileDialogCancel.bind(this)\n this.onInputElementClick = this.onInputElementClick.bind(this)\n\n this.setRef = this.setRef.bind(this)\n this.setRefs = this.setRefs.bind(this)\n\n this.isFileDialogActive = false\n\n this.state = {\n draggedFiles: [],\n acceptedFiles: [],\n rejectedFiles: []\n }\n }\n\n componentDidMount() {\n const { preventDropOnDocument } = this.props\n this.dragTargets = []\n\n if (preventDropOnDocument) {\n document.addEventListener('dragover', onDocumentDragOver, false)\n document.addEventListener('drop', this.onDocumentDrop, false)\n }\n this.fileInputEl.addEventListener('click', this.onInputElementClick, false)\n // Tried implementing addEventListener, but didn't work out\n document.body.onfocus = this.onFileDialogCancel\n }\n\n componentWillUnmount() {\n const { preventDropOnDocument } = this.props\n if (preventDropOnDocument) {\n document.removeEventListener('dragover', onDocumentDragOver)\n document.removeEventListener('drop', this.onDocumentDrop)\n }\n this.fileInputEl.removeEventListener('click', this.onInputElementClick, false)\n // Can be replaced with removeEventListener, if addEventListener works\n document.body.onfocus = null\n }\n\n composeHandlers(handler) {\n if (this.props.disabled) {\n return null\n }\n\n return handler\n }\n\n onDocumentDrop(evt) {\n if (this.node.contains(evt.target)) {\n // if we intercepted an event for our instance, let it propagate down to the instance's onDrop handler\n return\n }\n evt.preventDefault()\n this.dragTargets = []\n }\n\n onDragStart(evt) {\n if (this.props.onDragStart) {\n this.props.onDragStart.call(this, evt)\n }\n }\n\n onDragEnter(evt) {\n evt.preventDefault()\n\n // Count the dropzone and any children that are entered.\n if (this.dragTargets.indexOf(evt.target) === -1) {\n this.dragTargets.push(evt.target)\n }\n\n this.setState({\n isDragActive: true, // Do not rely on files for the drag state. It doesn't work in Safari.\n draggedFiles: getDataTransferItems(evt)\n })\n\n if (this.props.onDragEnter) {\n this.props.onDragEnter.call(this, evt)\n }\n }\n\n onDragOver(evt) {\n // eslint-disable-line class-methods-use-this\n evt.preventDefault()\n evt.stopPropagation()\n try {\n evt.dataTransfer.dropEffect = 'copy' // eslint-disable-line no-param-reassign\n } catch (err) {\n // continue regardless of error\n }\n\n if (this.props.onDragOver) {\n this.props.onDragOver.call(this, evt)\n }\n return false\n }\n\n onDragLeave(evt) {\n evt.preventDefault()\n\n // Only deactivate once the dropzone and all children have been left.\n this.dragTargets = this.dragTargets.filter(el => el !== evt.target && this.node.contains(el))\n if (this.dragTargets.length > 0) {\n return\n }\n\n // Clear dragging files state\n this.setState({\n isDragActive: false,\n draggedFiles: []\n })\n\n if (this.props.onDragLeave) {\n this.props.onDragLeave.call(this, evt)\n }\n }\n\n onDrop(evt) {\n const { onDrop, onDropAccepted, onDropRejected, multiple, disablePreview, accept } = this.props\n const fileList = getDataTransferItems(evt)\n const acceptedFiles = []\n const rejectedFiles = []\n\n // Stop default browser behavior\n evt.preventDefault()\n\n // Reset the counter along with the drag on a drop.\n this.dragTargets = []\n this.isFileDialogActive = false\n\n fileList.forEach(file => {\n if (!disablePreview) {\n try {\n file.preview = window.URL.createObjectURL(file) // eslint-disable-line no-param-reassign\n } catch (err) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Failed to generate preview for file', file, err) // eslint-disable-line no-console\n }\n }\n }\n\n if (\n fileAccepted(file, accept) &&\n fileMatchSize(file, this.props.maxSize, this.props.minSize)\n ) {\n acceptedFiles.push(file)\n } else {\n rejectedFiles.push(file)\n }\n })\n\n if (!multiple) {\n // if not in multi mode add any extra accepted files to rejected.\n // This will allow end users to easily ignore a multi file drop in \"single\" mode.\n rejectedFiles.push(...acceptedFiles.splice(1))\n }\n\n if (onDrop) {\n onDrop.call(this, acceptedFiles, rejectedFiles, evt)\n }\n\n if (rejectedFiles.length > 0 && onDropRejected) {\n onDropRejected.call(this, rejectedFiles, evt)\n }\n\n if (acceptedFiles.length > 0 && onDropAccepted) {\n onDropAccepted.call(this, acceptedFiles, evt)\n }\n\n // Clear files value\n this.draggedFiles = null\n\n // Reset drag state\n this.setState({\n isDragActive: false,\n draggedFiles: [],\n acceptedFiles,\n rejectedFiles\n })\n }\n\n onClick(evt) {\n const { onClick, disableClick } = this.props\n if (!disableClick) {\n evt.stopPropagation()\n\n if (onClick) {\n onClick.call(this, evt)\n }\n\n // in IE11/Edge the file-browser dialog is blocking, ensure this is behind setTimeout\n // this is so react can handle state changes in the onClick prop above above\n // see: https://github.com/react-dropzone/react-dropzone/issues/450\n setTimeout(this.open.bind(this), 0)\n }\n }\n\n onInputElementClick(evt) {\n evt.stopPropagation()\n if (this.props.inputProps && this.props.inputProps.onClick) {\n this.props.inputProps.onClick()\n }\n }\n\n onFileDialogCancel() {\n // timeout will not recognize context of this method\n const { onFileDialogCancel } = this.props\n const { fileInputEl } = this\n let { isFileDialogActive } = this\n // execute the timeout only if the onFileDialogCancel is defined and FileDialog\n // is opened in the browser\n if (onFileDialogCancel && isFileDialogActive) {\n setTimeout(() => {\n // Returns an object as FileList\n const FileList = fileInputEl.files\n if (!FileList.length) {\n isFileDialogActive = false\n onFileDialogCancel()\n }\n }, 300)\n }\n }\n\n setRef(ref) {\n this.node = ref\n }\n\n setRefs(ref) {\n this.fileInputEl = ref\n }\n /**\n * Open system file upload dialog.\n *\n * @public\n */\n open() {\n this.isFileDialogActive = true\n this.fileInputEl.value = null\n this.fileInputEl.click()\n }\n\n renderChildren = (children, isDragActive, isDragAccept, isDragReject) => {\n if (typeof children === 'function') {\n return children({\n ...this.state,\n isDragActive,\n isDragAccept,\n isDragReject\n })\n }\n return children\n }\n\n render() {\n const {\n accept,\n acceptClassName,\n activeClassName,\n children,\n disabled,\n disabledClassName,\n inputProps,\n multiple,\n name,\n rejectClassName,\n ...rest\n } = this.props\n\n let {\n acceptStyle,\n activeStyle,\n className,\n disabledStyle,\n rejectStyle,\n style,\n ...props // eslint-disable-line prefer-const\n } = rest\n\n const { isDragActive, draggedFiles } = this.state\n const filesCount = draggedFiles.length\n const isMultipleAllowed = multiple || filesCount <= 1\n const isDragAccept = filesCount > 0 && allFilesAccepted(draggedFiles, this.props.accept)\n const isDragReject = filesCount > 0 && (!isDragAccept || !isMultipleAllowed)\n className = className || ''\n const noStyles =\n !className && !style && !activeStyle && !acceptStyle && !rejectStyle && !disabledStyle\n\n if (isDragActive && activeClassName) {\n className += ' ' + activeClassName\n }\n if (isDragAccept && acceptClassName) {\n className += ' ' + acceptClassName\n }\n if (isDragReject && rejectClassName) {\n className += ' ' + rejectClassName\n }\n if (disabled && disabledClassName) {\n className += ' ' + disabledClassName\n }\n\n if (noStyles) {\n style = styles.default\n activeStyle = styles.active\n acceptStyle = style.active\n rejectStyle = styles.rejected\n disabledStyle = styles.disabled\n }\n\n let appliedStyle = { ...style }\n if (activeStyle && isDragActive) {\n appliedStyle = {\n ...style,\n ...activeStyle\n }\n }\n if (acceptStyle && isDragAccept) {\n appliedStyle = {\n ...appliedStyle,\n ...acceptStyle\n }\n }\n if (rejectStyle && isDragReject) {\n appliedStyle = {\n ...appliedStyle,\n ...rejectStyle\n }\n }\n if (disabledStyle && disabled) {\n appliedStyle = {\n ...style,\n ...disabledStyle\n }\n }\n\n const inputAttributes = {\n accept,\n disabled,\n type: 'file',\n style: { display: 'none' },\n multiple: supportMultiple && multiple,\n ref: this.setRefs,\n onChange: this.onDrop,\n autoComplete: 'off'\n }\n\n if (name && name.length) {\n inputAttributes.name = name\n }\n\n // Remove custom properties before passing them to the wrapper div element\n const customProps = [\n 'acceptedFiles',\n 'preventDropOnDocument',\n 'disablePreview',\n 'disableClick',\n 'onDropAccepted',\n 'onDropRejected',\n 'onFileDialogCancel',\n 'maxSize',\n 'minSize'\n ]\n const divProps = { ...props }\n customProps.forEach(prop => delete divProps[prop])\n\n return (\n <div\n className={className}\n style={appliedStyle}\n {...divProps /* expand user provided props first so event handlers are never overridden */}\n onClick={this.composeHandlers(this.onClick)}\n onDragStart={this.composeHandlers(this.onDragStart)}\n onDragEnter={this.composeHandlers(this.onDragEnter)}\n onDragOver={this.composeHandlers(this.onDragOver)}\n onDragLeave={this.composeHandlers(this.onDragLeave)}\n onDrop={this.composeHandlers(this.onDrop)}\n ref={this.setRef}\n aria-disabled={disabled}\n >\n {this.renderChildren(children, isDragActive, isDragAccept, isDragReject)}\n <input\n {...inputProps /* expand user provided inputProps first so inputAttributes override them */}\n {...inputAttributes}\n />\n </div>\n )\n }\n}\n\nexport default Dropzone\n\nDropzone.propTypes = {\n /**\n * Allow specific types of files. See https://github.com/okonet/attr-accept for more information.\n * Keep in mind that mime type determination is not reliable across platforms. CSV files,\n * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under\n * Windows. In some cases there might not be a mime type set at all.\n * See: https://github.com/react-dropzone/react-dropzone/issues/276\n */\n accept: PropTypes.string,\n\n /**\n * Contents of the dropzone\n */\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n\n /**\n * Disallow clicking on the dropzone container to open file dialog\n */\n disableClick: PropTypes.bool,\n\n /**\n * Enable/disable the dropzone entirely\n */\n disabled: PropTypes.bool,\n\n /**\n * Enable/disable preview generation\n */\n disablePreview: PropTypes.bool,\n\n /**\n * If false, allow dropped items to take over the current browser window\n */\n preventDropOnDocument: PropTypes.bool,\n\n /**\n * Pass additional attributes to the `<input type=\"file\"/>` tag\n */\n inputProps: PropTypes.object,\n\n /**\n * Allow dropping multiple files\n */\n multiple: PropTypes.bool,\n\n /**\n * `name` attribute for the input tag\n */\n name: PropTypes.string,\n\n /**\n * Maximum file size\n */\n maxSize: PropTypes.number,\n\n /**\n * Minimum file size\n */\n minSize: PropTypes.number,\n\n /**\n * className\n */\n className: PropTypes.string,\n\n /**\n * className for active state\n */\n activeClassName: PropTypes.string,\n\n /**\n * className for accepted state\n */\n acceptClassName: PropTypes.string,\n\n /**\n * className for rejected state\n */\n rejectClassName: PropTypes.string,\n\n /**\n * className for disabled state\n */\n disabledClassName: PropTypes.string,\n\n /**\n * CSS styles to apply\n */\n style: PropTypes.object,\n\n /**\n * CSS styles to apply when drag is active\n */\n activeStyle: PropTypes.object,\n\n /**\n * CSS styles to apply when drop will be accepted\n */\n acceptStyle: PropTypes.object,\n\n /**\n * CSS styles to apply when drop will be rejected\n */\n rejectStyle: PropTypes.object,\n\n /**\n * CSS styles to apply when dropzone is disabled\n */\n disabledStyle: PropTypes.object,\n\n /**\n * onClick callback\n * @param {Event} event\n */\n onClick: PropTypes.func,\n\n /**\n * onDrop callback\n */\n onDrop: PropTypes.func,\n\n /**\n * onDropAccepted callback\n */\n onDropAccepted: PropTypes.func,\n\n /**\n * onDropRejected callback\n */\n onDropRejected: PropTypes.func,\n\n /**\n * onDragStart callback\n */\n onDragStart: PropTypes.func,\n\n /**\n * onDragEnter callback\n */\n onDragEnter: PropTypes.func,\n\n /**\n * onDragOver callback\n */\n onDragOver: PropTypes.func,\n\n /**\n * onDragLeave callback\n */\n onDragLeave: PropTypes.func,\n\n /**\n * Provide a callback on clicking the cancel button of the file dialog\n */\n onFileDialogCancel: PropTypes.func\n}\n\nDropzone.defaultProps = {\n preventDropOnDocument: true,\n disabled: false,\n disablePreview: false,\n disableClick: false,\n multiple: true,\n maxSize: Infinity,\n minSize: 0\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/process/browser.js\n// module id = 1\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 2\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"prop-types\"\n// module id = 3\n// module chunks = 0","import accepts from 'attr-accept'\n\nexport const supportMultiple =\n typeof document !== 'undefined' && document && document.createElement\n ? 'multiple' in document.createElement('input')\n : true\n\nexport function getDataTransferItems(event) {\n let dataTransferItemsList = []\n if (event.dataTransfer) {\n const dt = event.dataTransfer\n if (dt.files && dt.files.length) {\n dataTransferItemsList = dt.files\n } else if (dt.items && dt.items.length) {\n // During the drag even the dataTransfer.files is null\n // but Chrome implements some drag store, which is accesible via dataTransfer.items\n dataTransferItemsList = dt.items\n }\n } else if (event.target && event.target.files) {\n dataTransferItemsList = event.target.files\n }\n // Convert from DataTransferItemsList to the native Array\n return Array.prototype.slice.call(dataTransferItemsList)\n}\n\n// Firefox versions prior to 53 return a bogus MIME type for every file drag, so dragovers with\n// that MIME type will always be accepted\nexport function fileAccepted(file, accept) {\n return file.type === 'application/x-moz-file' || accepts(file, accept)\n}\n\nexport function fileMatchSize(file, maxSize, minSize) {\n return file.size <= maxSize && file.size >= minSize\n}\n\nexport function allFilesAccepted(files, accept) {\n return files.every(file => fileAccepted(file, accept))\n}\n\n// allow the entire document to be a drag target\nexport function onDocumentDragOver(evt) {\n evt.preventDefault()\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/index.js","module.exports=function(t){function n(e){if(r[e])return r[e].exports;var o=r[e]={exports:{},id:e,loaded:!1};return t[e].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=t,n.c=r,n.p=\"\",n(0)}([function(t,n,r){\"use strict\";n.__esModule=!0,r(8),r(9),n[\"default\"]=function(t,n){if(t&&n){var r=function(){var r=Array.isArray(n)?n:n.split(\",\"),e=t.name||\"\",o=t.type||\"\",i=o.replace(/\\/.*$/,\"\");return{v:r.some(function(t){var n=t.trim();return\".\"===n.charAt(0)?e.toLowerCase().endsWith(n.toLowerCase()):/\\/\\*$/.test(n)?i===n.replace(/\\/.*$/,\"\"):o===n})}}();if(\"object\"==typeof r)return r.v}return!0},t.exports=n[\"default\"]},function(t,n){var r=t.exports={version:\"1.2.2\"};\"number\"==typeof __e&&(__e=r)},function(t,n){var r=t.exports=\"undefined\"!=typeof window&&window.Math==Math?window:\"undefined\"!=typeof self&&self.Math==Math?self:Function(\"return this\")();\"number\"==typeof __g&&(__g=r)},function(t,n,r){var e=r(2),o=r(1),i=r(4),u=r(19),c=\"prototype\",f=function(t,n){return function(){return t.apply(n,arguments)}},s=function(t,n,r){var a,p,l,y,d=t&s.G,h=t&s.P,v=d?e:t&s.S?e[n]||(e[n]={}):(e[n]||{})[c],x=d?o:o[n]||(o[n]={});d&&(r=n);for(a in r)p=!(t&s.F)&&v&&a in v,l=(p?v:r)[a],y=t&s.B&&p?f(l,e):h&&\"function\"==typeof l?f(Function.call,l):l,v&&!p&&u(v,a,l),x[a]!=l&&i(x,a,y),h&&((x[c]||(x[c]={}))[a]=l)};e.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,t.exports=s},function(t,n,r){var e=r(5),o=r(18);t.exports=r(22)?function(t,n,r){return e.setDesc(t,n,o(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n){var r=Object;t.exports={create:r.create,getProto:r.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:r.getOwnPropertyDescriptor,setDesc:r.defineProperty,setDescs:r.defineProperties,getKeys:r.keys,getNames:r.getOwnPropertyNames,getSymbols:r.getOwnPropertySymbols,each:[].forEach}},function(t,n){var r=0,e=Math.random();t.exports=function(t){return\"Symbol(\".concat(void 0===t?\"\":t,\")_\",(++r+e).toString(36))}},function(t,n,r){var e=r(20)(\"wks\"),o=r(2).Symbol;t.exports=function(t){return e[t]||(e[t]=o&&o[t]||(o||r(6))(\"Symbol.\"+t))}},function(t,n,r){r(26),t.exports=r(1).Array.some},function(t,n,r){r(25),t.exports=r(1).String.endsWith},function(t,n){t.exports=function(t){if(\"function\"!=typeof t)throw TypeError(t+\" is not a function!\");return t}},function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n,r){var e=r(10);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,o){return t.call(n,r,e,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError(\"Can't call method on \"+t);return t}},function(t,n,r){t.exports=function(t){var n=/./;try{\"/./\"[t](n)}catch(e){try{return n[r(7)(\"match\")]=!1,!\"/./\"[t](n)}catch(o){}}return!0}},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n){t.exports=function(t){return\"object\"==typeof t?null!==t:\"function\"==typeof t}},function(t,n,r){var e=r(16),o=r(11),i=r(7)(\"match\");t.exports=function(t){var n;return e(t)&&(void 0!==(n=t[i])?!!n:\"RegExp\"==o(t))}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,r){var e=r(2),o=r(4),i=r(6)(\"src\"),u=\"toString\",c=Function[u],f=(\"\"+c).split(u);r(1).inspectSource=function(t){return c.call(t)},(t.exports=function(t,n,r,u){\"function\"==typeof r&&(o(r,i,t[n]?\"\"+t[n]:f.join(String(n))),\"name\"in r||(r.name=n)),t===e?t[n]=r:(u||delete t[n],o(t,n,r))})(Function.prototype,u,function(){return\"function\"==typeof this&&this[i]||c.call(this)})},function(t,n,r){var e=r(2),o=\"__core-js_shared__\",i=e[o]||(e[o]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,n,r){var e=r(17),o=r(13);t.exports=function(t,n,r){if(e(n))throw TypeError(\"String#\"+r+\" doesn't accept regex!\");return String(o(t))}},function(t,n,r){t.exports=!r(15)(function(){return 7!=Object.defineProperty({},\"a\",{get:function(){return 7}}).a})},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},function(t,n,r){var e=r(23),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},function(t,n,r){\"use strict\";var e=r(3),o=r(24),i=r(21),u=\"endsWith\",c=\"\"[u];e(e.P+e.F*r(14)(u),\"String\",{endsWith:function(t){var n=i(this,t,u),r=arguments,e=r.length>1?r[1]:void 0,f=o(n.length),s=void 0===e?f:Math.min(o(e),f),a=String(t);return c?c.call(n,a,s):n.slice(s-a.length,s)===a}})},function(t,n,r){var e=r(5),o=r(3),i=r(1).Array||Array,u={},c=function(t,n){e.each.call(t.split(\",\"),function(t){void 0==n&&t in i?u[t]=i[t]:t in[]&&(u[t]=r(12)(Function.call,[][t],n))})};c(\"pop,reverse,shift,keys,values,entries\",1),c(\"indexOf,every,some,forEach,map,filter,find,findIndex,includes\",3),c(\"join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill\"),o(o.S,\"Array\",u)}]);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/attr-accept/dist/index.js\n// module id = 5\n// module chunks = 0","export default {\n rejected: {\n borderStyle: 'solid',\n borderColor: '#c66',\n backgroundColor: '#eee'\n },\n disabled: {\n opacity: 0.5\n },\n active: {\n borderStyle: 'solid',\n borderColor: '#6c6',\n backgroundColor: '#eee'\n },\n default: {\n width: 200,\n height: 200,\n borderWidth: 2,\n borderColor: '#666',\n borderStyle: 'dashed',\n borderRadius: 5\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/styles.js"],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -58,41 +58,41 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"attr-accept": "^1.0.3",
|
|
61
|
-
"babel-preset-env": "^1.6.0",
|
|
62
|
-
"babel-preset-stage-1": "^6.24.1",
|
|
63
|
-
"eslint-config-prettier": "^2.3.0",
|
|
64
|
-
"eslint-plugin-prettier": "^2.2.0",
|
|
65
61
|
"prop-types": "^15.5.7"
|
|
66
62
|
},
|
|
67
63
|
"devDependencies": {
|
|
68
|
-
"@commitlint/cli": "^3.0
|
|
64
|
+
"@commitlint/cli": "^3.2.0",
|
|
69
65
|
"@commitlint/config-angular": "^3.0.3",
|
|
70
|
-
"@commitlint/prompt": "^3.
|
|
71
|
-
"@commitlint/prompt-cli": "^3.0
|
|
66
|
+
"@commitlint/prompt": "^3.2.0",
|
|
67
|
+
"@commitlint/prompt-cli": "^3.2.0",
|
|
72
68
|
"babel-cli": "^6.9.0",
|
|
73
69
|
"babel-core": "^6.9.1",
|
|
74
70
|
"babel-eslint": "^7.1.1",
|
|
75
|
-
"babel-jest": "^
|
|
76
|
-
"babel-loader": "^7.1.
|
|
71
|
+
"babel-jest": "^21.0.0",
|
|
72
|
+
"babel-loader": "^7.1.2",
|
|
77
73
|
"babel-plugin-add-module-exports": "^0.2.1",
|
|
74
|
+
"babel-preset-env": "^1.6.0",
|
|
78
75
|
"babel-preset-react": "^6.3.13",
|
|
76
|
+
"babel-preset-stage-1": "^6.24.1",
|
|
79
77
|
"babel-register": "^6.9.0",
|
|
80
78
|
"commitizen": "^2.9.6",
|
|
81
|
-
"css-loader": "^0.28.
|
|
79
|
+
"css-loader": "^0.28.7",
|
|
82
80
|
"enzyme": "^2.6.0",
|
|
83
|
-
"eslint": "^4.
|
|
84
|
-
"eslint-config-okonet": "^
|
|
81
|
+
"eslint": "^4.6.1",
|
|
82
|
+
"eslint-config-okonet": "^5.0.1",
|
|
83
|
+
"eslint-config-prettier": "^2.4.0",
|
|
84
|
+
"eslint-plugin-prettier": "^2.2.0",
|
|
85
85
|
"husky": "^0.14.3",
|
|
86
86
|
"imagemin-cli": "^3.0.0",
|
|
87
87
|
"imagemin-pngquant": "^5.0.0",
|
|
88
|
-
"jest": "^
|
|
89
|
-
"jest-enzyme": "^3.2
|
|
90
|
-
"lint-staged": "^4.
|
|
88
|
+
"jest": "^21.0.1",
|
|
89
|
+
"jest-enzyme": "^3.8.2",
|
|
90
|
+
"lint-staged": "^4.1.0",
|
|
91
91
|
"markdownlint-cli": "^0.3.1",
|
|
92
|
-
"prettier": "^1.
|
|
92
|
+
"prettier": "^1.6.1",
|
|
93
93
|
"react": "^15.4.1",
|
|
94
94
|
"react-dom": "^15.4.1",
|
|
95
|
-
"react-styleguidist": "^6.0.
|
|
95
|
+
"react-styleguidist": "^6.0.23",
|
|
96
96
|
"react-test-renderer": "^15.6.1",
|
|
97
97
|
"rimraf": "^2.5.2",
|
|
98
98
|
"semantic-release": "^7.0.2",
|
|
@@ -105,5 +105,5 @@
|
|
|
105
105
|
"path": "@commitlint/prompt"
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
|
-
"version": "4.1.
|
|
108
|
+
"version": "4.1.2"
|
|
109
109
|
}
|
package/src/index.js
CHANGED
|
@@ -415,7 +415,7 @@ export default Dropzone
|
|
|
415
415
|
Dropzone.propTypes = {
|
|
416
416
|
/**
|
|
417
417
|
* Allow specific types of files. See https://github.com/okonet/attr-accept for more information.
|
|
418
|
-
* Keep in mind that mime type determination is not reliable
|
|
418
|
+
* Keep in mind that mime type determination is not reliable across platforms. CSV files,
|
|
419
419
|
* for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
|
|
420
420
|
* Windows. In some cases there might not be a mime type set at all.
|
|
421
421
|
* See: https://github.com/react-dropzone/react-dropzone/issues/276
|
package/src/index.spec.js
CHANGED
|
@@ -99,16 +99,8 @@ describe('Dropzone', () => {
|
|
|
99
99
|
|
|
100
100
|
it('should render children function', () => {
|
|
101
101
|
const content = <p>some content</p>
|
|
102
|
-
const dropzone = mount(
|
|
103
|
-
|
|
104
|
-
{content}
|
|
105
|
-
</Dropzone>
|
|
106
|
-
)
|
|
107
|
-
const dropzoneWithFunction = mount(
|
|
108
|
-
<Dropzone>
|
|
109
|
-
{() => content}
|
|
110
|
-
</Dropzone>
|
|
111
|
-
)
|
|
102
|
+
const dropzone = mount(<Dropzone>{content}</Dropzone>)
|
|
103
|
+
const dropzoneWithFunction = mount(<Dropzone>{() => content}</Dropzone>)
|
|
112
104
|
expect(dropzoneWithFunction.html()).toEqual(dropzone.html())
|
|
113
105
|
})
|
|
114
106
|
})
|
|
@@ -224,10 +216,25 @@ describe('Dropzone', () => {
|
|
|
224
216
|
|
|
225
217
|
it('should reset the value of input', () => {
|
|
226
218
|
const dropzone = mount(<Dropzone />)
|
|
227
|
-
expect(
|
|
228
|
-
|
|
219
|
+
expect(
|
|
220
|
+
dropzone
|
|
221
|
+
.render()
|
|
222
|
+
.find('input')
|
|
223
|
+
.attr('value')
|
|
224
|
+
).toBeUndefined()
|
|
225
|
+
expect(
|
|
226
|
+
dropzone
|
|
227
|
+
.render()
|
|
228
|
+
.find('input')
|
|
229
|
+
.attr('value', 10)
|
|
230
|
+
).not.toBeUndefined()
|
|
229
231
|
dropzone.simulate('click')
|
|
230
|
-
expect(
|
|
232
|
+
expect(
|
|
233
|
+
dropzone
|
|
234
|
+
.render()
|
|
235
|
+
.find('input')
|
|
236
|
+
.attr('value')
|
|
237
|
+
).toBeUndefined()
|
|
231
238
|
})
|
|
232
239
|
|
|
233
240
|
it('should trigger click even on the input', done => {
|
|
@@ -355,11 +362,7 @@ describe('Dropzone', () => {
|
|
|
355
362
|
})
|
|
356
363
|
|
|
357
364
|
it('should set proper dragActive state on dragEnter', () => {
|
|
358
|
-
const dropzone = mount(
|
|
359
|
-
<Dropzone>
|
|
360
|
-
{props => <DummyChildComponent {...props} />}
|
|
361
|
-
</Dropzone>
|
|
362
|
-
)
|
|
365
|
+
const dropzone = mount(<Dropzone>{props => <DummyChildComponent {...props} />}</Dropzone>)
|
|
363
366
|
const child = dropzone.find(DummyChildComponent)
|
|
364
367
|
dropzone.simulate('dragEnter', { dataTransfer: { files } })
|
|
365
368
|
expect(child).toHaveProp('isDragActive', true)
|
|
@@ -369,9 +372,7 @@ describe('Dropzone', () => {
|
|
|
369
372
|
|
|
370
373
|
it('should set proper dragReject state on dragEnter', () => {
|
|
371
374
|
const dropzone = mount(
|
|
372
|
-
<Dropzone accept="image/*">
|
|
373
|
-
{props => <DummyChildComponent {...props} />}
|
|
374
|
-
</Dropzone>
|
|
375
|
+
<Dropzone accept="image/*">{props => <DummyChildComponent {...props} />}</Dropzone>
|
|
375
376
|
)
|
|
376
377
|
const child = dropzone.find(DummyChildComponent)
|
|
377
378
|
dropzone.simulate('dragEnter', {
|
|
@@ -462,9 +463,7 @@ describe('Dropzone', () => {
|
|
|
462
463
|
|
|
463
464
|
it('should set proper dragActive state if accept prop changes mid-drag', () => {
|
|
464
465
|
const dropzone = mount(
|
|
465
|
-
<Dropzone accept="image/*">
|
|
466
|
-
{props => <DummyChildComponent {...props} />}
|
|
467
|
-
</Dropzone>
|
|
466
|
+
<Dropzone accept="image/*">{props => <DummyChildComponent {...props} />}</Dropzone>
|
|
468
467
|
)
|
|
469
468
|
const child = dropzone.find(DummyChildComponent)
|
|
470
469
|
dropzone.simulate('dragEnter', { dataTransfer: { files: images } })
|
|
@@ -942,7 +941,7 @@ describe('Dropzone', () => {
|
|
|
942
941
|
|
|
943
942
|
const InnerDragAccepted = () => <p>Accepted</p>
|
|
944
943
|
const InnerDragRejected = () => <p>Rejected</p>
|
|
945
|
-
const InnerDropzone = () =>
|
|
944
|
+
const InnerDropzone = () => (
|
|
946
945
|
<Dropzone
|
|
947
946
|
onDrop={innerDropSpy}
|
|
948
947
|
onDropAccepted={innerDropAcceptedSpy}
|
|
@@ -955,6 +954,7 @@ describe('Dropzone', () => {
|
|
|
955
954
|
return <p>No drag</p>
|
|
956
955
|
}}
|
|
957
956
|
</Dropzone>
|
|
957
|
+
)
|
|
958
958
|
|
|
959
959
|
describe('dropping on the inner dropzone', () => {
|
|
960
960
|
it('mounts both dropzones', () => {
|