@panneau/field-upload 3.0.139 → 3.0.141
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 +7 -2
- package/lib/index.js +7 -2
- package/package.json +11 -11
package/es/index.js
CHANGED
|
@@ -299,13 +299,18 @@ var UploadField = function UploadField(_ref) {
|
|
|
299
299
|
setModalItems(newValue);
|
|
300
300
|
}
|
|
301
301
|
} else if (onChange !== null) {
|
|
302
|
-
|
|
302
|
+
// Single value onchange
|
|
303
|
+
var _ref5 = isArray(newValue) ? newValue : [newValue],
|
|
304
|
+
_ref6 = _slicedToArray(_ref5, 1),
|
|
305
|
+
_ref6$ = _ref6[0],
|
|
306
|
+
finalValue = _ref6$ === void 0 ? null : _ref6$;
|
|
307
|
+
onChange(finalValue);
|
|
303
308
|
setResourceModalOpen(false);
|
|
304
309
|
}
|
|
305
310
|
}, [onChange, setResourceModalOpen, allowMultipleUploads, modalItems, setModalItems]);
|
|
306
311
|
var confirmResourceModal = useCallback(function () {
|
|
307
|
-
// console.log('confirm', modalItems, onChange);
|
|
308
312
|
if (onChange !== null) {
|
|
313
|
+
// Always multiple onchange
|
|
309
314
|
onChange(modalItems);
|
|
310
315
|
setResourceModalOpen(false);
|
|
311
316
|
setModalItems(null);
|
package/lib/index.js
CHANGED
|
@@ -303,13 +303,18 @@ var UploadField = function UploadField(_ref) {
|
|
|
303
303
|
setModalItems(newValue);
|
|
304
304
|
}
|
|
305
305
|
} else if (onChange !== null) {
|
|
306
|
-
|
|
306
|
+
// Single value onchange
|
|
307
|
+
var _ref5 = isArray(newValue) ? newValue : [newValue],
|
|
308
|
+
_ref6 = _slicedToArray(_ref5, 1),
|
|
309
|
+
_ref6$ = _ref6[0],
|
|
310
|
+
finalValue = _ref6$ === void 0 ? null : _ref6$;
|
|
311
|
+
onChange(finalValue);
|
|
307
312
|
setResourceModalOpen(false);
|
|
308
313
|
}
|
|
309
314
|
}, [onChange, setResourceModalOpen, allowMultipleUploads, modalItems, setModalItems]);
|
|
310
315
|
var confirmResourceModal = React.useCallback(function () {
|
|
311
|
-
// console.log('confirm', modalItems, onChange);
|
|
312
316
|
if (onChange !== null) {
|
|
317
|
+
// Always multiple onchange
|
|
313
318
|
onChange(modalItems);
|
|
314
319
|
setResourceModalOpen(false);
|
|
315
320
|
setModalItems(null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/field-upload",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.141",
|
|
4
4
|
"description": "An Upload field",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -57,15 +57,15 @@
|
|
|
57
57
|
"@fortawesome/fontawesome-svg-core": "^6.5.1",
|
|
58
58
|
"@fortawesome/free-solid-svg-icons": "^6.5.1",
|
|
59
59
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
60
|
-
"@panneau/core": "^3.0.
|
|
61
|
-
"@panneau/element-button": "^3.0.
|
|
62
|
-
"@panneau/element-label": "^3.0.
|
|
63
|
-
"@panneau/element-media-card": "^3.0.
|
|
64
|
-
"@panneau/list-resource-items": "^3.0.
|
|
65
|
-
"@panneau/modal-dialog": "^3.0.
|
|
66
|
-
"@panneau/modal-upload": "^3.0.
|
|
67
|
-
"@panneau/themes": "^3.0.
|
|
68
|
-
"@panneau/uppy": "^3.0.
|
|
60
|
+
"@panneau/core": "^3.0.140",
|
|
61
|
+
"@panneau/element-button": "^3.0.140",
|
|
62
|
+
"@panneau/element-label": "^3.0.140",
|
|
63
|
+
"@panneau/element-media-card": "^3.0.140",
|
|
64
|
+
"@panneau/list-resource-items": "^3.0.140",
|
|
65
|
+
"@panneau/modal-dialog": "^3.0.140",
|
|
66
|
+
"@panneau/modal-upload": "^3.0.140",
|
|
67
|
+
"@panneau/themes": "^3.0.140",
|
|
68
|
+
"@panneau/uppy": "^3.0.140",
|
|
69
69
|
"@uppy/core": "^3.9.1",
|
|
70
70
|
"@uppy/dashboard": "^3.7.3",
|
|
71
71
|
"@uppy/drag-drop": "^3.0.3",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "6ddbbeb4ea62b1803053d5c9cb55b3c09984e5d7"
|
|
86
86
|
}
|