@panneau/modal-medias-picker 4.0.2 → 4.0.3
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 +22 -20
- package/package.json +3 -3
package/es/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { useState, useCallback } from 'react';
|
|
|
5
5
|
import { FormattedMessage } from 'react-intl';
|
|
6
6
|
import { MediasResourcePicker, MediasPickerContainer } from '@panneau/medias';
|
|
7
7
|
import Dialog from '@panneau/modal-dialog';
|
|
8
|
+
import { jsx } from 'react/jsx-runtime';
|
|
8
9
|
|
|
9
10
|
var _excluded = ["id", "value", "resource", "title", "onChange", "onClose", "confirmButton", "cancelButton", "multiple"];
|
|
10
11
|
function MediasPickerModal(_ref) {
|
|
@@ -51,7 +52,7 @@ function MediasPickerModal(_ref) {
|
|
|
51
52
|
var onMediaFormClose = useCallback(function () {
|
|
52
53
|
setMediaFormOpen(false);
|
|
53
54
|
}, [setMediaFormOpen]);
|
|
54
|
-
return /*#__PURE__*/
|
|
55
|
+
return /*#__PURE__*/jsx(Dialog, {
|
|
55
56
|
id: id || 'picker',
|
|
56
57
|
size: "xl",
|
|
57
58
|
onClose: onClose,
|
|
@@ -59,7 +60,7 @@ function MediasPickerModal(_ref) {
|
|
|
59
60
|
buttons: !mediaFormOpen ? [_objectSpread({
|
|
60
61
|
id: 'cancel',
|
|
61
62
|
name: 'cancel',
|
|
62
|
-
label: /*#__PURE__*/
|
|
63
|
+
label: /*#__PURE__*/jsx(FormattedMessage, {
|
|
63
64
|
id: "PyxZY2",
|
|
64
65
|
defaultMessage: [{
|
|
65
66
|
"type": 0,
|
|
@@ -71,7 +72,7 @@ function MediasPickerModal(_ref) {
|
|
|
71
72
|
}, cancelButton), _objectSpread({
|
|
72
73
|
id: 'confirm',
|
|
73
74
|
name: 'confirm',
|
|
74
|
-
label: /*#__PURE__*/
|
|
75
|
+
label: /*#__PURE__*/jsx(FormattedMessage, {
|
|
75
76
|
id: "rvOVCV",
|
|
76
77
|
defaultMessage: [{
|
|
77
78
|
"type": 0,
|
|
@@ -80,23 +81,24 @@ function MediasPickerModal(_ref) {
|
|
|
80
81
|
}),
|
|
81
82
|
theme: 'primary',
|
|
82
83
|
onClick: onConfirm
|
|
83
|
-
}, confirmButton)] : null
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
84
|
+
}, confirmButton)] : null,
|
|
85
|
+
children: resource !== null ? /*#__PURE__*/jsx(MediasResourcePicker, _objectSpread(_objectSpread({}, props), {}, {
|
|
86
|
+
value: selectedItems,
|
|
87
|
+
resource: resource,
|
|
88
|
+
onChange: onSelectionChange,
|
|
89
|
+
onClose: onClose,
|
|
90
|
+
multiple: multiple,
|
|
91
|
+
onMediaFormOpen: onMediaFormOpen,
|
|
92
|
+
onMediaFormClose: onMediaFormClose
|
|
93
|
+
})) : /*#__PURE__*/jsx(MediasPickerContainer, _objectSpread(_objectSpread({}, props), {}, {
|
|
94
|
+
value: selectedItems,
|
|
95
|
+
onChange: onSelectionChange,
|
|
96
|
+
onClose: onClose,
|
|
97
|
+
multiple: multiple,
|
|
98
|
+
onMediaFormOpen: onMediaFormOpen,
|
|
99
|
+
onMediaFormClose: onMediaFormClose
|
|
100
|
+
}))
|
|
101
|
+
});
|
|
100
102
|
}
|
|
101
103
|
|
|
102
104
|
export { MediasPickerModal as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/modal-medias-picker",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "Medias picker modal",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.12.5",
|
|
52
52
|
"@panneau/core": "^4.0.2",
|
|
53
|
-
"@panneau/medias": "^4.0.
|
|
53
|
+
"@panneau/medias": "^4.0.3",
|
|
54
54
|
"@panneau/modal-dialog": "^4.0.2",
|
|
55
55
|
"@uppy/core": "^5.1.1",
|
|
56
56
|
"@uppy/dashboard": "^5.0.4",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "26b5ab7536b0e8c3197d40d302fc2681e7c7122e"
|
|
67
67
|
}
|