react-dropzone 3.13.0 → 3.13.4
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 +3 -54
- package/.travis.yml +2 -7
- package/README.md +12 -78
- package/commitlint.config.js +1 -0
- package/dist/index.js +94 -71
- package/dist/index.js.map +1 -1
- package/examples/.eslintrc +3 -0
- package/examples/Accept/Readme.md +63 -11
- package/examples/Basic/Readme.md +9 -12
- package/examples/File Dialog/Readme.md +16 -0
- package/examples/Fullscreen/Readme.md +19 -20
- package/examples/Styling/Readme.md +23 -0
- package/package.json +28 -30
- package/src/__snapshots__/index.spec.js.snap +5 -3
- package/src/getDataTransferItems.js +7 -12
- package/src/getDataTransferItems.spec.js +48 -61
- package/src/index.js +164 -142
- package/src/index.spec.js +604 -592
- package/styleguide.config.js +28 -5
- package/testSetup.js +3 -2
- package/wallaby.config.js +3 -9
- package/webpack.config.js +3 -6
- package/yarn.lock +1549 -1029
- package/examples/Accept/index.js +0 -38
- package/examples/Basic/index.js +0 -26
- package/examples/Fullscreen/index.js +0 -78
- package/examples/Readme.md +0 -1
package/styleguide.config.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
const path = require('path')
|
|
1
|
+
const path = require('path')
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
title: 'react-dropzone',
|
|
5
5
|
styleguideDir: path.join(__dirname, 'styleguide'),
|
|
6
|
-
showCode:
|
|
6
|
+
showCode: true,
|
|
7
|
+
showUsage: true,
|
|
7
8
|
showSidebar: false,
|
|
8
9
|
serverPort: 8080,
|
|
9
10
|
sections: [
|
|
@@ -11,14 +12,36 @@ module.exports = {
|
|
|
11
12
|
content: 'README.md'
|
|
12
13
|
},
|
|
13
14
|
{
|
|
15
|
+
name: 'PropTypes',
|
|
14
16
|
components: './src/index.js'
|
|
15
17
|
},
|
|
16
18
|
{
|
|
17
19
|
name: 'Examples',
|
|
18
|
-
components: './examples/**/*.js',
|
|
19
20
|
context: {
|
|
20
21
|
Dropzone: './src/index'
|
|
21
|
-
}
|
|
22
|
+
},
|
|
23
|
+
sections: [
|
|
24
|
+
{
|
|
25
|
+
name: 'Basic example',
|
|
26
|
+
content: 'examples/Basic/Readme.md'
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Styling Dropzone',
|
|
30
|
+
content: 'examples/Styling/Readme.md'
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'Accepting specific file types',
|
|
34
|
+
content: 'examples/Accept/Readme.md'
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'Opening File Dialog Programmatically',
|
|
38
|
+
content: 'examples/File Dialog/Readme.md'
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'Full Screen Dropzone',
|
|
42
|
+
content: 'examples/Fullscreen/Readme.md'
|
|
43
|
+
}
|
|
44
|
+
]
|
|
22
45
|
}
|
|
23
46
|
]
|
|
24
|
-
}
|
|
47
|
+
}
|
package/testSetup.js
CHANGED
package/wallaby.config.js
CHANGED
|
@@ -2,12 +2,7 @@
|
|
|
2
2
|
/* eslint import/no-extraneous-dependencies: 0 */
|
|
3
3
|
|
|
4
4
|
module.exports = wallaby => ({
|
|
5
|
-
files: [
|
|
6
|
-
'package.json',
|
|
7
|
-
'src/*.js',
|
|
8
|
-
'src/**/*.js.snap',
|
|
9
|
-
'!src/*.spec.js'
|
|
10
|
-
],
|
|
5
|
+
files: ['package.json', 'src/*.js', 'src/**/*.js.snap', '!src/*.spec.js'],
|
|
11
6
|
|
|
12
7
|
tests: ['src/*.spec.js'],
|
|
13
8
|
|
|
@@ -26,7 +21,6 @@ module.exports = wallaby => ({
|
|
|
26
21
|
testFramework: 'jest',
|
|
27
22
|
|
|
28
23
|
setup: () => {
|
|
29
|
-
wallaby.testFramework.configure(require('./package.json').jest)
|
|
24
|
+
wallaby.testFramework.configure(require('./package.json').jest)
|
|
30
25
|
}
|
|
31
|
-
|
|
32
|
-
});
|
|
26
|
+
})
|
package/webpack.config.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint prefer-template: 0 */
|
|
2
2
|
/* eslint no-var: 0 */
|
|
3
3
|
|
|
4
|
-
var path = require('path')
|
|
4
|
+
var path = require('path')
|
|
5
5
|
|
|
6
6
|
module.exports = {
|
|
7
7
|
entry: './src/index.js',
|
|
@@ -15,10 +15,7 @@ module.exports = {
|
|
|
15
15
|
module: {
|
|
16
16
|
loaders: [
|
|
17
17
|
{
|
|
18
|
-
include: [
|
|
19
|
-
path.resolve(__dirname, 'src'),
|
|
20
|
-
path.resolve(__dirname, 'examples')
|
|
21
|
-
],
|
|
18
|
+
include: [path.resolve(__dirname, 'src'), path.resolve(__dirname, 'examples')],
|
|
22
19
|
test: /\.js$/,
|
|
23
20
|
loader: 'babel-loader'
|
|
24
21
|
}
|
|
@@ -33,4 +30,4 @@ module.exports = {
|
|
|
33
30
|
'prop-types': 'prop-types'
|
|
34
31
|
},
|
|
35
32
|
plugins: []
|
|
36
|
-
}
|
|
33
|
+
}
|