@panneau/modal-upload 4.0.39 → 4.0.40-alpha.1
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/index.d.ts +2 -2
- package/dist/index.js +85 -26
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ interface UploadModalProps {
|
|
|
5
5
|
title?: string | null;
|
|
6
6
|
uppy?: uppy | null;
|
|
7
7
|
plugins?: string[];
|
|
8
|
-
|
|
8
|
+
onClosed?: (() => void) | null;
|
|
9
9
|
}
|
|
10
|
-
declare function UploadModal({ id, title, uppy, plugins,
|
|
10
|
+
declare function UploadModal({ id, title, uppy, plugins, onClosed, ...props }: UploadModalProps): react_jsx_runtime.JSX.Element;
|
|
11
11
|
|
|
12
12
|
export { UploadModal as default };
|
package/dist/index.js
CHANGED
|
@@ -1,41 +1,100 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
3
2
|
import Dashboard from '@uppy/react/dashboard';
|
|
3
|
+
import { useState } from 'react';
|
|
4
4
|
import Dialog from '@panneau/modal-dialog';
|
|
5
5
|
import '@uppy/core/css/style.css';
|
|
6
6
|
import '@uppy/dashboard/css/style.css';
|
|
7
7
|
import { jsx } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
9
|
+
const DEFAULT_PLUGINS = [];
|
|
10
|
+
function UploadModal(t0) {
|
|
11
|
+
const $ = c(18);
|
|
12
|
+
let id;
|
|
13
|
+
let props;
|
|
14
|
+
let t1;
|
|
15
|
+
let t2;
|
|
16
|
+
let t3;
|
|
17
|
+
let t4;
|
|
18
|
+
if ($[0] !== t0) {
|
|
19
|
+
({
|
|
20
|
+
id,
|
|
21
|
+
title: t1,
|
|
22
|
+
uppy: t2,
|
|
23
|
+
plugins: t3,
|
|
24
|
+
onClosed: t4,
|
|
25
|
+
...props
|
|
26
|
+
} = t0);
|
|
27
|
+
$[0] = t0;
|
|
28
|
+
$[1] = id;
|
|
29
|
+
$[2] = props;
|
|
30
|
+
$[3] = t1;
|
|
31
|
+
$[4] = t2;
|
|
32
|
+
$[5] = t3;
|
|
33
|
+
$[6] = t4;
|
|
34
|
+
} else {
|
|
35
|
+
id = $[1];
|
|
36
|
+
props = $[2];
|
|
37
|
+
t1 = $[3];
|
|
38
|
+
t2 = $[4];
|
|
39
|
+
t3 = $[5];
|
|
40
|
+
t4 = $[6];
|
|
41
|
+
}
|
|
42
|
+
const title = t1 === undefined ? null : t1;
|
|
43
|
+
const uppy = t2 === undefined ? null : t2;
|
|
44
|
+
const plugins = t3 === undefined ? DEFAULT_PLUGINS : t3;
|
|
45
|
+
const onClosed = t4 === undefined ? null : t4;
|
|
46
|
+
const [opened, setOpened] = useState(true);
|
|
47
|
+
let t5;
|
|
48
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
49
|
+
t5 = () => {
|
|
50
|
+
setOpened(false);
|
|
51
|
+
};
|
|
52
|
+
$[7] = t5;
|
|
53
|
+
} else {
|
|
54
|
+
t5 = $[7];
|
|
55
|
+
}
|
|
56
|
+
const requestClose = t5;
|
|
57
|
+
let t6;
|
|
58
|
+
if ($[8] !== plugins || $[9] !== props || $[10] !== uppy) {
|
|
59
|
+
t6 = uppy !== null ? /*#__PURE__*/jsx(Dashboard, {
|
|
28
60
|
inline: true,
|
|
29
61
|
width: "100%",
|
|
30
62
|
height: "350px",
|
|
31
63
|
showAddFilesPanel: true,
|
|
32
|
-
proudlyDisplayPoweredByUppy: false
|
|
33
|
-
|
|
64
|
+
proudlyDisplayPoweredByUppy: false,
|
|
65
|
+
...props,
|
|
34
66
|
uppy: uppy,
|
|
35
|
-
onRequestClose:
|
|
67
|
+
onRequestClose: requestClose,
|
|
36
68
|
plugins: plugins
|
|
37
|
-
})
|
|
38
|
-
|
|
69
|
+
}) : null;
|
|
70
|
+
$[8] = plugins;
|
|
71
|
+
$[9] = props;
|
|
72
|
+
$[10] = uppy;
|
|
73
|
+
$[11] = t6;
|
|
74
|
+
} else {
|
|
75
|
+
t6 = $[11];
|
|
76
|
+
}
|
|
77
|
+
let t7;
|
|
78
|
+
if ($[12] !== id || $[13] !== onClosed || $[14] !== opened || $[15] !== t6 || $[16] !== title) {
|
|
79
|
+
t7 = /*#__PURE__*/jsx(Dialog, {
|
|
80
|
+
id: id,
|
|
81
|
+
title: title,
|
|
82
|
+
size: "lg",
|
|
83
|
+
visible: opened,
|
|
84
|
+
onClosed: onClosed,
|
|
85
|
+
requestClose: requestClose,
|
|
86
|
+
children: t6
|
|
87
|
+
});
|
|
88
|
+
$[12] = id;
|
|
89
|
+
$[13] = onClosed;
|
|
90
|
+
$[14] = opened;
|
|
91
|
+
$[15] = t6;
|
|
92
|
+
$[16] = title;
|
|
93
|
+
$[17] = t7;
|
|
94
|
+
} else {
|
|
95
|
+
t7 = $[17];
|
|
96
|
+
}
|
|
97
|
+
return t7;
|
|
39
98
|
}
|
|
40
99
|
|
|
41
100
|
export { UploadModal as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/modal-upload",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.40-alpha.1",
|
|
4
4
|
"description": "File upload modal",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@babel/runtime": "^7.28.6",
|
|
63
|
-
"@panneau/core": "^4.0.
|
|
64
|
-
"@panneau/modal-dialog": "^4.0.
|
|
65
|
-
"@panneau/uppy": "^4.0.
|
|
63
|
+
"@panneau/core": "^4.0.40-alpha.1",
|
|
64
|
+
"@panneau/modal-dialog": "^4.0.40-alpha.1",
|
|
65
|
+
"@panneau/uppy": "^4.0.40-alpha.1",
|
|
66
66
|
"@uppy/core": "^5.1.1",
|
|
67
67
|
"@uppy/dashboard": "^5.0.4",
|
|
68
68
|
"@uppy/react": "^5.1.1",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "66520f92373b3aa371222b354d60ed3cf3d20c96"
|
|
77
77
|
}
|