@panneau/field-upload 2.0.42 → 2.0.46
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 +13 -7
- package/lib/index.js +13 -7
- package/package.json +7 -7
package/es/index.js
CHANGED
|
@@ -38,6 +38,8 @@ var propTypes = {
|
|
|
38
38
|
namePath: PropTypes.string,
|
|
39
39
|
thumbnailPath: PropTypes.string,
|
|
40
40
|
sizePath: PropTypes.string,
|
|
41
|
+
width: PropTypes.number,
|
|
42
|
+
height: PropTypes.number,
|
|
41
43
|
disabled: PropTypes.bool,
|
|
42
44
|
onChange: PropTypes.func,
|
|
43
45
|
className: PropTypes.string
|
|
@@ -59,6 +61,8 @@ var defaultProps = {
|
|
|
59
61
|
namePath: null,
|
|
60
62
|
thumbnailPath: null,
|
|
61
63
|
sizePath: null,
|
|
64
|
+
width: null,
|
|
65
|
+
height: 300,
|
|
62
66
|
disabled: false,
|
|
63
67
|
onChange: null,
|
|
64
68
|
className: null
|
|
@@ -74,6 +78,8 @@ var UploadField = function UploadField(_ref) {
|
|
|
74
78
|
namePath = _ref.namePath,
|
|
75
79
|
thumbnailPath = _ref.thumbnailPath,
|
|
76
80
|
sizePath = _ref.sizePath,
|
|
81
|
+
width = _ref.width,
|
|
82
|
+
height = _ref.height,
|
|
77
83
|
disabled = _ref.disabled,
|
|
78
84
|
onChange = _ref.onChange,
|
|
79
85
|
className = _ref.className;
|
|
@@ -153,9 +159,6 @@ var UploadField = function UploadField(_ref) {
|
|
|
153
159
|
return value !== null ? [value] : null;
|
|
154
160
|
}, [value]);
|
|
155
161
|
var hasMedia = values !== null && values.length > 0;
|
|
156
|
-
|
|
157
|
-
// console.log(containerWidth);
|
|
158
|
-
|
|
159
162
|
return /*#__PURE__*/React.createElement("div", {
|
|
160
163
|
className: classNames([styles.container, _defineProperty({}, className, className !== null)]),
|
|
161
164
|
ref: containerRef
|
|
@@ -253,13 +256,16 @@ var UploadField = function UploadField(_ref) {
|
|
|
253
256
|
}, /*#__PURE__*/React.createElement(Label, null, addButtonLabel)) : null, !disabled && !hasMedia && !withButton && uppy !== null ? /*#__PURE__*/React.createElement(Dashboard, Object.assign({
|
|
254
257
|
uppy: uppy
|
|
255
258
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
256
|
-
}, containerWidth !== null ? {
|
|
259
|
+
}, containerWidth !== null && height !== null ? {
|
|
257
260
|
width: containerWidth
|
|
258
|
-
} :
|
|
259
|
-
|
|
261
|
+
} : {
|
|
262
|
+
width: width
|
|
263
|
+
}, {
|
|
264
|
+
height: height,
|
|
260
265
|
plugins: sources,
|
|
261
266
|
inline: true,
|
|
262
|
-
areInsidesReadyToBeVisible: true
|
|
267
|
+
areInsidesReadyToBeVisible: true,
|
|
268
|
+
proudlyDisplayPoweredByUppy: false
|
|
263
269
|
})) : null, !disabled && withButton && uppy !== null ? /*#__PURE__*/React.createElement(DashboardModal, {
|
|
264
270
|
uppy: uppy,
|
|
265
271
|
plugins: sources,
|
package/lib/index.js
CHANGED
|
@@ -57,6 +57,8 @@ var propTypes = {
|
|
|
57
57
|
namePath: PropTypes__default["default"].string,
|
|
58
58
|
thumbnailPath: PropTypes__default["default"].string,
|
|
59
59
|
sizePath: PropTypes__default["default"].string,
|
|
60
|
+
width: PropTypes__default["default"].number,
|
|
61
|
+
height: PropTypes__default["default"].number,
|
|
60
62
|
disabled: PropTypes__default["default"].bool,
|
|
61
63
|
onChange: PropTypes__default["default"].func,
|
|
62
64
|
className: PropTypes__default["default"].string
|
|
@@ -78,6 +80,8 @@ var defaultProps = {
|
|
|
78
80
|
namePath: null,
|
|
79
81
|
thumbnailPath: null,
|
|
80
82
|
sizePath: null,
|
|
83
|
+
width: null,
|
|
84
|
+
height: 300,
|
|
81
85
|
disabled: false,
|
|
82
86
|
onChange: null,
|
|
83
87
|
className: null
|
|
@@ -93,6 +97,8 @@ var UploadField = function UploadField(_ref) {
|
|
|
93
97
|
namePath = _ref.namePath,
|
|
94
98
|
thumbnailPath = _ref.thumbnailPath,
|
|
95
99
|
sizePath = _ref.sizePath,
|
|
100
|
+
width = _ref.width,
|
|
101
|
+
height = _ref.height,
|
|
96
102
|
disabled = _ref.disabled,
|
|
97
103
|
onChange = _ref.onChange,
|
|
98
104
|
className = _ref.className;
|
|
@@ -172,9 +178,6 @@ var UploadField = function UploadField(_ref) {
|
|
|
172
178
|
return value !== null ? [value] : null;
|
|
173
179
|
}, [value]);
|
|
174
180
|
var hasMedia = values !== null && values.length > 0;
|
|
175
|
-
|
|
176
|
-
// console.log(containerWidth);
|
|
177
|
-
|
|
178
181
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
179
182
|
className: classNames__default["default"]([styles.container, _defineProperty__default["default"]({}, className, className !== null)]),
|
|
180
183
|
ref: containerRef
|
|
@@ -272,13 +275,16 @@ var UploadField = function UploadField(_ref) {
|
|
|
272
275
|
}, /*#__PURE__*/React__default["default"].createElement(Label__default["default"], null, addButtonLabel)) : null, !disabled && !hasMedia && !withButton && uppy !== null ? /*#__PURE__*/React__default["default"].createElement(react.Dashboard, Object.assign({
|
|
273
276
|
uppy: uppy
|
|
274
277
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
275
|
-
}, containerWidth !== null ? {
|
|
278
|
+
}, containerWidth !== null && height !== null ? {
|
|
276
279
|
width: containerWidth
|
|
277
|
-
} :
|
|
278
|
-
|
|
280
|
+
} : {
|
|
281
|
+
width: width
|
|
282
|
+
}, {
|
|
283
|
+
height: height,
|
|
279
284
|
plugins: sources,
|
|
280
285
|
inline: true,
|
|
281
|
-
areInsidesReadyToBeVisible: true
|
|
286
|
+
areInsidesReadyToBeVisible: true,
|
|
287
|
+
proudlyDisplayPoweredByUppy: false
|
|
282
288
|
})) : null, !disabled && withButton && uppy !== null ? /*#__PURE__*/React__default["default"].createElement(react.DashboardModal, {
|
|
283
289
|
uppy: uppy,
|
|
284
290
|
plugins: sources,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/field-upload",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.46",
|
|
4
4
|
"description": "An Upload field",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
"@fortawesome/fontawesome-svg-core": "^1.2.35",
|
|
57
57
|
"@fortawesome/free-solid-svg-icons": "^5.15.3",
|
|
58
58
|
"@fortawesome/react-fontawesome": "^0.1.14",
|
|
59
|
-
"@panneau/core": "^2.0.
|
|
60
|
-
"@panneau/element-button": "^2.0.
|
|
61
|
-
"@panneau/element-card": "^2.0.
|
|
62
|
-
"@panneau/element-label": "^2.0.
|
|
63
|
-
"@panneau/themes": "^2.0.
|
|
59
|
+
"@panneau/core": "^2.0.46",
|
|
60
|
+
"@panneau/element-button": "^2.0.46",
|
|
61
|
+
"@panneau/element-card": "^2.0.46",
|
|
62
|
+
"@panneau/element-label": "^2.0.46",
|
|
63
|
+
"@panneau/themes": "^2.0.46",
|
|
64
64
|
"@uppy/core": "^3.2.0",
|
|
65
65
|
"@uppy/dashboard": "^3.4.0",
|
|
66
66
|
"@uppy/drag-drop": "^3.0.2",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"publishConfig": {
|
|
79
79
|
"access": "public"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "566fca41a31122cbbcda4b98cb8395e56eaf9336"
|
|
82
82
|
}
|