@panneau/modal-upload 3.0.105 → 3.0.112
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/es/index.js +39 -40
- package/lib/index.js +40 -39
- package/package.json +3 -2
package/es/index.js
CHANGED
|
@@ -1,53 +1,52 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
2
|
+
import { Dashboard } from '@uppy/react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
|
-
import React
|
|
4
|
-
import
|
|
5
|
-
import '@uppy/core/dist/style.css';
|
|
6
|
-
import '@uppy/dashboard/dist/style.css';
|
|
7
|
-
import '@uppy/drag-drop/dist/style.css';
|
|
8
|
-
import '@uppy/status-bar/dist/style.css';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import Dialog from '@panneau/modal-dialog';
|
|
6
|
+
import '@uppy/core/dist/style.min.css';
|
|
7
|
+
import '@uppy/dashboard/dist/style.min.css';
|
|
8
|
+
import '@uppy/drag-drop/dist/style.min.css';
|
|
9
|
+
import '@uppy/status-bar/dist/style.min.css';
|
|
9
10
|
|
|
10
11
|
var styles = {};
|
|
11
12
|
|
|
13
|
+
var _excluded = ["title", "uppy", "plugins", "onClose"];
|
|
12
14
|
var propTypes = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
title: PropTypes.string,
|
|
16
|
+
uppy: PropTypes.shape({
|
|
17
|
+
reset: PropTypes.func
|
|
18
|
+
}),
|
|
19
|
+
plugins: PropTypes.arrayOf(PropTypes.string),
|
|
20
|
+
onClose: PropTypes.func
|
|
17
21
|
};
|
|
18
22
|
var defaultProps = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
title: null,
|
|
24
|
+
uppy: null,
|
|
25
|
+
plugins: [],
|
|
26
|
+
onClose: null
|
|
23
27
|
};
|
|
24
28
|
var UploadModal = function UploadModal(_ref) {
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}, [uppy, opened]);
|
|
43
|
-
return uppy !== null ? /*#__PURE__*/React.createElement(DashboardModal, {
|
|
29
|
+
var title = _ref.title,
|
|
30
|
+
uppy = _ref.uppy,
|
|
31
|
+
plugins = _ref.plugins,
|
|
32
|
+
onClose = _ref.onClose,
|
|
33
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
+
return /*#__PURE__*/React.createElement(Dialog, {
|
|
35
|
+
size: "lg",
|
|
36
|
+
onClose: onClose,
|
|
37
|
+
title: title
|
|
38
|
+
}, uppy !== null ? /*#__PURE__*/React.createElement(Dashboard, Object.assign({
|
|
39
|
+
inline: true,
|
|
40
|
+
width: "100%",
|
|
41
|
+
height: "350px",
|
|
42
|
+
showAddFilesPanel: true,
|
|
43
|
+
proudlyDisplayPoweredByUppy: false
|
|
44
|
+
}, props, {
|
|
45
|
+
className: styles.container,
|
|
44
46
|
uppy: uppy,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
plugins: sources,
|
|
49
|
-
className: styles.container
|
|
50
|
-
}) : null;
|
|
47
|
+
onRequestClose: onClose,
|
|
48
|
+
plugins: plugins
|
|
49
|
+
})) : null);
|
|
51
50
|
};
|
|
52
51
|
UploadModal.propTypes = propTypes;
|
|
53
52
|
UploadModal.defaultProps = defaultProps;
|
package/lib/index.js
CHANGED
|
@@ -2,61 +2,62 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
6
|
var react = require('@uppy/react');
|
|
6
7
|
var PropTypes = require('prop-types');
|
|
7
8
|
var React = require('react');
|
|
8
|
-
var
|
|
9
|
-
require('@uppy/core/dist/style.css');
|
|
10
|
-
require('@uppy/dashboard/dist/style.css');
|
|
11
|
-
require('@uppy/drag-drop/dist/style.css');
|
|
12
|
-
require('@uppy/status-bar/dist/style.css');
|
|
9
|
+
var Dialog = require('@panneau/modal-dialog');
|
|
10
|
+
require('@uppy/core/dist/style.min.css');
|
|
11
|
+
require('@uppy/dashboard/dist/style.min.css');
|
|
12
|
+
require('@uppy/drag-drop/dist/style.min.css');
|
|
13
|
+
require('@uppy/status-bar/dist/style.min.css');
|
|
13
14
|
|
|
14
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
16
|
|
|
17
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
16
18
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
17
19
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
20
|
+
var Dialog__default = /*#__PURE__*/_interopDefaultLegacy(Dialog);
|
|
18
21
|
|
|
19
22
|
var styles = {};
|
|
20
23
|
|
|
24
|
+
var _excluded = ["title", "uppy", "plugins", "onClose"];
|
|
21
25
|
var propTypes = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
title: PropTypes__default["default"].string,
|
|
27
|
+
uppy: PropTypes__default["default"].shape({
|
|
28
|
+
reset: PropTypes__default["default"].func
|
|
29
|
+
}),
|
|
30
|
+
plugins: PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),
|
|
31
|
+
onClose: PropTypes__default["default"].func
|
|
26
32
|
};
|
|
27
33
|
var defaultProps = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
title: null,
|
|
35
|
+
uppy: null,
|
|
36
|
+
plugins: [],
|
|
37
|
+
onClose: null
|
|
32
38
|
};
|
|
33
39
|
var UploadModal = function UploadModal(_ref) {
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
closeAfterFinish: true,
|
|
56
|
-
onRequestClose: onRequestClose,
|
|
57
|
-
plugins: sources,
|
|
58
|
-
className: styles.container
|
|
59
|
-
}) : null;
|
|
40
|
+
var title = _ref.title,
|
|
41
|
+
uppy = _ref.uppy,
|
|
42
|
+
plugins = _ref.plugins,
|
|
43
|
+
onClose = _ref.onClose,
|
|
44
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
45
|
+
return /*#__PURE__*/React__default["default"].createElement(Dialog__default["default"], {
|
|
46
|
+
size: "lg",
|
|
47
|
+
onClose: onClose,
|
|
48
|
+
title: title
|
|
49
|
+
}, uppy !== null ? /*#__PURE__*/React__default["default"].createElement(react.Dashboard, Object.assign({
|
|
50
|
+
inline: true,
|
|
51
|
+
width: "100%",
|
|
52
|
+
height: "350px",
|
|
53
|
+
showAddFilesPanel: true,
|
|
54
|
+
proudlyDisplayPoweredByUppy: false
|
|
55
|
+
}, props, {
|
|
56
|
+
className: styles.container,
|
|
57
|
+
uppy: uppy,
|
|
58
|
+
onRequestClose: onClose,
|
|
59
|
+
plugins: plugins
|
|
60
|
+
})) : null);
|
|
60
61
|
};
|
|
61
62
|
UploadModal.propTypes = propTypes;
|
|
62
63
|
UploadModal.defaultProps = defaultProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/modal-upload",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.112",
|
|
4
4
|
"description": "File upload modal",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@babel/runtime": "^7.12.5",
|
|
56
56
|
"@panneau/core": "^3.0.101",
|
|
57
|
+
"@panneau/modal-dialog": "^3.0.112",
|
|
57
58
|
"@panneau/uppy": "^3.0.105",
|
|
58
59
|
"@uppy/core": "^3.9.1",
|
|
59
60
|
"@uppy/dashboard": "^3.7.3",
|
|
@@ -69,5 +70,5 @@
|
|
|
69
70
|
"publishConfig": {
|
|
70
71
|
"access": "public"
|
|
71
72
|
},
|
|
72
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "30208f166ba7d2c138e58389d835125cd20ef67f"
|
|
73
74
|
}
|