@panneau/field-upload 3.0.24 → 3.0.26
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 +9 -3
- package/lib/index.js +9 -3
- package/package.json +2 -2
package/es/index.js
CHANGED
|
@@ -188,6 +188,12 @@ var UploadField = function UploadField(_ref) {
|
|
|
188
188
|
var closeModal = useCallback(function () {
|
|
189
189
|
setModalOpened(false);
|
|
190
190
|
}, [setModalOpened]);
|
|
191
|
+
var closeModalAndClear = useCallback(function () {
|
|
192
|
+
closeModal();
|
|
193
|
+
if (uppy !== null) {
|
|
194
|
+
uppy.cancelAll();
|
|
195
|
+
}
|
|
196
|
+
}, [uppy, closeModal]);
|
|
191
197
|
var onClickRemove = useCallback(function (idx) {
|
|
192
198
|
if (onChange !== null && isArray(value) && value.length > 1) {
|
|
193
199
|
onChange(value.filter(function (v, i) {
|
|
@@ -384,9 +390,9 @@ var UploadField = function UploadField(_ref) {
|
|
|
384
390
|
} : null, {
|
|
385
391
|
plugins: sources,
|
|
386
392
|
inline: true,
|
|
393
|
+
showProgressDetails: true,
|
|
387
394
|
areInsidesReadyToBeVisible: true,
|
|
388
|
-
proudlyDisplayPoweredByUppy: false
|
|
389
|
-
showProgressDetails: true
|
|
395
|
+
proudlyDisplayPoweredByUppy: false
|
|
390
396
|
}))) : null, !showResourceModal && !disabled && withButton && uppy !== null && modalOpened ?
|
|
391
397
|
/*#__PURE__*/
|
|
392
398
|
// <DashboardModal
|
|
@@ -420,7 +426,7 @@ var UploadField = function UploadField(_ref) {
|
|
|
420
426
|
showProgressDetails: true,
|
|
421
427
|
areInsidesReadyToBeVisible: true,
|
|
422
428
|
proudlyDisplayPoweredByUppy: false,
|
|
423
|
-
doneButtonHandler:
|
|
429
|
+
doneButtonHandler: closeModalAndClear
|
|
424
430
|
}))) : null, showResourceModal ? /*#__PURE__*/React.createElement(Dialog, {
|
|
425
431
|
title: /*#__PURE__*/React.createElement(Label, null, searchButtonLabel),
|
|
426
432
|
size: "lg",
|
package/lib/index.js
CHANGED
|
@@ -210,6 +210,12 @@ var UploadField = function UploadField(_ref) {
|
|
|
210
210
|
var closeModal = React.useCallback(function () {
|
|
211
211
|
setModalOpened(false);
|
|
212
212
|
}, [setModalOpened]);
|
|
213
|
+
var closeModalAndClear = React.useCallback(function () {
|
|
214
|
+
closeModal();
|
|
215
|
+
if (uppy$1 !== null) {
|
|
216
|
+
uppy$1.cancelAll();
|
|
217
|
+
}
|
|
218
|
+
}, [uppy$1, closeModal]);
|
|
213
219
|
var onClickRemove = React.useCallback(function (idx) {
|
|
214
220
|
if (onChange !== null && isArray__default["default"](value) && value.length > 1) {
|
|
215
221
|
onChange(value.filter(function (v, i) {
|
|
@@ -406,9 +412,9 @@ var UploadField = function UploadField(_ref) {
|
|
|
406
412
|
} : null, {
|
|
407
413
|
plugins: sources,
|
|
408
414
|
inline: true,
|
|
415
|
+
showProgressDetails: true,
|
|
409
416
|
areInsidesReadyToBeVisible: true,
|
|
410
|
-
proudlyDisplayPoweredByUppy: false
|
|
411
|
-
showProgressDetails: true
|
|
417
|
+
proudlyDisplayPoweredByUppy: false
|
|
412
418
|
}))) : null, !showResourceModal && !disabled && withButton && uppy$1 !== null && modalOpened ?
|
|
413
419
|
/*#__PURE__*/
|
|
414
420
|
// <DashboardModal
|
|
@@ -442,7 +448,7 @@ var UploadField = function UploadField(_ref) {
|
|
|
442
448
|
showProgressDetails: true,
|
|
443
449
|
areInsidesReadyToBeVisible: true,
|
|
444
450
|
proudlyDisplayPoweredByUppy: false,
|
|
445
|
-
doneButtonHandler:
|
|
451
|
+
doneButtonHandler: closeModalAndClear
|
|
446
452
|
}))) : null, showResourceModal ? /*#__PURE__*/React__default["default"].createElement(Dialog__default["default"], {
|
|
447
453
|
title: /*#__PURE__*/React__default["default"].createElement(Label__default["default"], null, searchButtonLabel),
|
|
448
454
|
size: "lg",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/field-upload",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.26",
|
|
4
4
|
"description": "An Upload field",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "3c3cc9cd7672b446d6152246197b6a13388a91ef"
|
|
86
86
|
}
|