@panneau/modal-medias-picker 4.0.62 → 4.0.63
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/dist/index.d.ts +3 -2
- package/dist/index.js +3 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { Media, Resource, Button } from '@panneau/core';
|
|
3
|
+
import { MediasPickerContainerProps, MediasResourcePickerProps } from '@panneau/medias';
|
|
3
4
|
|
|
4
|
-
interface MediasPickerModalProps {
|
|
5
|
+
interface MediasPickerModalProps extends Omit<MediasPickerContainerProps & MediasResourcePickerProps, 'value' | 'onChange'> {
|
|
5
6
|
id: string;
|
|
6
7
|
value?: Media | Media[] | null;
|
|
7
8
|
resource?: Resource | string | null;
|
|
@@ -12,6 +13,6 @@ interface MediasPickerModalProps {
|
|
|
12
13
|
confirmButton?: Button | null;
|
|
13
14
|
cancelButton?: Button | null;
|
|
14
15
|
}
|
|
15
|
-
declare function MediasPickerModal({ id, value: initialValue, resource, title, onChange, onClosed, confirmButton, cancelButton, multiple, ...props }: MediasPickerModalProps): react.JSX.Element;
|
|
16
|
+
declare function MediasPickerModal({ id, value: initialValue, resource: resourceId, title, onChange, onClosed, confirmButton, cancelButton, multiple, ...props }: MediasPickerModalProps): react.JSX.Element;
|
|
16
17
|
|
|
17
18
|
export { MediasPickerModal as default };
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import isArray from 'lodash-es/isArray';
|
|
|
3
3
|
import isObject from 'lodash-es/isObject';
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { FormattedMessage } from 'react-intl';
|
|
6
|
+
import { usePanneauResource } from '@panneau/core/contexts';
|
|
6
7
|
import { MediasResourcePicker, MediasPickerContainer } from '@panneau/medias';
|
|
7
8
|
import Dialog from '@panneau/modal-dialog';
|
|
8
9
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -56,13 +57,14 @@ function MediasPickerModal(t0) {
|
|
|
56
57
|
t8 = $[10];
|
|
57
58
|
}
|
|
58
59
|
const initialValue = t1 === undefined ? null : t1;
|
|
59
|
-
const
|
|
60
|
+
const resourceId = t2 === undefined ? null : t2;
|
|
60
61
|
const title = t3 === undefined ? null : t3;
|
|
61
62
|
const onChange = t4 === undefined ? null : t4;
|
|
62
63
|
const onClosed = t5 === undefined ? null : t5;
|
|
63
64
|
const confirmButton = t6 === undefined ? null : t6;
|
|
64
65
|
const cancelButton = t7 === undefined ? null : t7;
|
|
65
66
|
const multiple = t8 === undefined ? false : t8;
|
|
67
|
+
const resource = usePanneauResource(resourceId);
|
|
66
68
|
const [opened, setOpened] = useState(true);
|
|
67
69
|
let t9;
|
|
68
70
|
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
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.63",
|
|
4
4
|
"description": "Medias picker modal",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@babel/runtime": "^7.28.6",
|
|
50
50
|
"@panneau/core": "^4.0.58",
|
|
51
|
-
"@panneau/medias": "^4.0.
|
|
51
|
+
"@panneau/medias": "^4.0.63",
|
|
52
52
|
"@panneau/modal-dialog": "^4.0.62",
|
|
53
53
|
"@uppy/core": "^5.1.1",
|
|
54
54
|
"@uppy/dashboard": "^5.0.4",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "5b20f29e0c3cf377ae50b946ac93e037936f961a"
|
|
72
72
|
}
|