@react-magma/dropzone 13.0.0 → 13.0.1-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fileuploader.js.map +1 -1
- package/dist/{fileuploader.modern.mjs → fileuploader.modern.js} +1 -1
- package/dist/fileuploader.modern.js.map +1 -0
- package/dist/fileuploader.modern.module.js.map +1 -1
- package/dist/fileuploader.umd.js.map +1 -1
- package/dist/src/src/components/dropzone/Dropzone.d.ts +101 -101
- package/dist/src/src/components/dropzone/Dropzone.stories.d.ts +48 -0
- package/dist/src/src/components/dropzone/Dropzone.test.d.ts +1 -1
- package/dist/src/src/components/dropzone/FileIcon.d.ts +8 -7
- package/dist/src/src/components/dropzone/FilePreview.d.ts +15 -15
- package/dist/src/src/components/dropzone/Preview.d.ts +18 -18
- package/dist/src/src/components/dropzone/index.d.ts +4 -4
- package/dist/src/src/components/dropzone/utils.d.ts +1 -1
- package/dist/src/src/index.d.ts +1 -1
- package/package.json +15 -18
- package/src/components/dropzone/Dropzone.stories.tsx +0 -4
- package/src/components/dropzone/Dropzone.test.js +120 -205
- package/src/components/dropzone/Dropzone.tsx +1 -4
- package/src/components/dropzone/Preview.tsx +150 -152
- package/src/components/dropzone/utils.ts +0 -1
- package/dist/fileuploader.modern.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-magma/dropzone",
|
|
3
|
-
"version": "13.0.0",
|
|
3
|
+
"version": "13.0.1-next.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/fileuploader.js",
|
|
6
6
|
"umd:main": "dist/fileuploader.umd.js",
|
|
@@ -15,31 +15,28 @@
|
|
|
15
15
|
"build": "microbundle build --jsx jsx --jsxImportSource react --globals react/jsx-runtime=jsx",
|
|
16
16
|
"build-watch": "microbundle watch --jsx jsx --jsxImportSource react --globals react/jsx-runtime=jsx",
|
|
17
17
|
"lint": "eslint ./src",
|
|
18
|
-
"lint:fix": "eslint ./src --fix",
|
|
19
|
-
"lint:check": "eslint ./src --max-warnings=0",
|
|
20
18
|
"test": "jest",
|
|
21
|
-
"test-watch": "jest --watch"
|
|
22
|
-
"compiler-checks": "tsc --noEmit --project ./tsconfig.json"
|
|
19
|
+
"test-watch": "jest --watch"
|
|
23
20
|
},
|
|
24
21
|
"dependencies": {
|
|
25
|
-
"polished": "3.
|
|
22
|
+
"polished": "^3.2.0",
|
|
26
23
|
"react-dropzone": "11.3.2"
|
|
27
24
|
},
|
|
28
25
|
"devDependencies": {
|
|
29
|
-
"@emotion/react": "11.
|
|
30
|
-
"@emotion/styled": "11.
|
|
31
|
-
"react": "
|
|
32
|
-
"react-dom": "
|
|
33
|
-
"react-magma-dom": "^4.
|
|
34
|
-
"react-magma-icons": "^3.
|
|
26
|
+
"@emotion/react": "^11.13.0",
|
|
27
|
+
"@emotion/styled": "^11.13.0",
|
|
28
|
+
"react": "^17.0.2",
|
|
29
|
+
"react-dom": "^17.0.2",
|
|
30
|
+
"react-magma-dom": "^4.11.1-next.0",
|
|
31
|
+
"react-magma-icons": "^3.2.4"
|
|
35
32
|
},
|
|
36
33
|
"peerDependencies": {
|
|
37
|
-
"@emotion/react": "11.
|
|
38
|
-
"@emotion/styled": "11.
|
|
39
|
-
"react": "
|
|
40
|
-
"react-dom": "
|
|
41
|
-
"react-magma-dom": "^4.
|
|
42
|
-
"react-magma-icons": "^3.2.
|
|
34
|
+
"@emotion/react": "^11.13.0",
|
|
35
|
+
"@emotion/styled": "^11.13.0",
|
|
36
|
+
"react": "^17.0.2",
|
|
37
|
+
"react-dom": "^17.0.2",
|
|
38
|
+
"react-magma-dom": "^4.11.1-next.0",
|
|
39
|
+
"react-magma-icons": "^3.2.4"
|
|
43
40
|
},
|
|
44
41
|
"engines": {
|
|
45
42
|
"node": ">=14.15.0",
|
|
@@ -138,7 +138,6 @@ export const Image = {
|
|
|
138
138
|
const onSendFile = (props: OnSendFileProps) => {
|
|
139
139
|
const { file, onFinish } = props;
|
|
140
140
|
const reader = new FileReader();
|
|
141
|
-
|
|
142
141
|
reader.onload = function (evt) {
|
|
143
142
|
setFile(
|
|
144
143
|
(evt &&
|
|
@@ -184,7 +183,6 @@ export const Text = {
|
|
|
184
183
|
const onSendFile = (props: OnSendFileProps) => {
|
|
185
184
|
const { file, onFinish } = props;
|
|
186
185
|
const reader = new FileReader();
|
|
187
|
-
|
|
188
186
|
reader.onload = function (evt) {
|
|
189
187
|
setFile(
|
|
190
188
|
(evt &&
|
|
@@ -231,7 +229,6 @@ export const Csv = {
|
|
|
231
229
|
const onSendFile = (props: OnSendFileProps) => {
|
|
232
230
|
const { file, onFinish } = props;
|
|
233
231
|
const reader = new FileReader();
|
|
234
|
-
|
|
235
232
|
reader.onload = function (evt) {
|
|
236
233
|
const [columns, rows] =
|
|
237
234
|
(evt &&
|
|
@@ -239,7 +236,6 @@ export const Csv = {
|
|
|
239
236
|
evt.target.result &&
|
|
240
237
|
csvJSON(evt.target.result.toString())) ||
|
|
241
238
|
[];
|
|
242
|
-
|
|
243
239
|
setColumns(columns);
|
|
244
240
|
setFile(rows);
|
|
245
241
|
onFinish && onFinish({ file });
|