@micromag/media-gallery 0.3.521 → 0.3.523
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 +17 -15
- package/lib/index.js +17 -15
- package/package.json +4 -4
package/es/index.js
CHANGED
|
@@ -530,7 +530,7 @@ function MediaGallery(_ref) {
|
|
|
530
530
|
return null;
|
|
531
531
|
}
|
|
532
532
|
return _objectSpread(_objectSpread({}, filter), {}, {
|
|
533
|
-
|
|
533
|
+
queryValue: "document-".concat(storyId)
|
|
534
534
|
});
|
|
535
535
|
}
|
|
536
536
|
return filter;
|
|
@@ -553,19 +553,21 @@ function MediaGallery(_ref) {
|
|
|
553
553
|
var partialTypes = !isArray(types) ? [types] : types;
|
|
554
554
|
return types === 'video' ? videoTypes : partialTypes;
|
|
555
555
|
}, [types]);
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
556
|
+
|
|
557
|
+
// const finalOnChange = useCallback(
|
|
558
|
+
// (newMedias) => {
|
|
559
|
+
// if (multiple) {
|
|
560
|
+
// onChange(newMedias || []);
|
|
561
|
+
// } else if (isArray(newMedias)) {
|
|
562
|
+
// const [firstMedia = null] = newMedias || [];
|
|
563
|
+
// onChange(firstMedia || null);
|
|
564
|
+
// } else {
|
|
565
|
+
// onChange(newMedias || null);
|
|
566
|
+
// }
|
|
567
|
+
// },
|
|
568
|
+
// [onChange, multiple],
|
|
569
|
+
// );
|
|
570
|
+
|
|
569
571
|
return /*#__PURE__*/React.createElement("div", {
|
|
570
572
|
className: classNames([styles.container, _defineProperty({}, className, className)])
|
|
571
573
|
}, isPicker ? /*#__PURE__*/React.createElement(MediasPickerContainer, {
|
|
@@ -580,7 +582,7 @@ function MediaGallery(_ref) {
|
|
|
580
582
|
fields: fields,
|
|
581
583
|
columns: columns,
|
|
582
584
|
multiple: multiple,
|
|
583
|
-
onChange:
|
|
585
|
+
onChange: onChange,
|
|
584
586
|
uppyConfig: uppyConfig,
|
|
585
587
|
onMediaUploaded: onMediaUploaded,
|
|
586
588
|
onMediaFormOpen: onMediaFormOpen,
|
package/lib/index.js
CHANGED
|
@@ -570,7 +570,7 @@ function MediaGallery(_ref) {
|
|
|
570
570
|
return null;
|
|
571
571
|
}
|
|
572
572
|
return _objectSpread(_objectSpread({}, filter), {}, {
|
|
573
|
-
|
|
573
|
+
queryValue: "document-".concat(storyId)
|
|
574
574
|
});
|
|
575
575
|
}
|
|
576
576
|
return filter;
|
|
@@ -593,19 +593,21 @@ function MediaGallery(_ref) {
|
|
|
593
593
|
var partialTypes = !isArray(types) ? [types] : types;
|
|
594
594
|
return types === 'video' ? videoTypes : partialTypes;
|
|
595
595
|
}, [types]);
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
596
|
+
|
|
597
|
+
// const finalOnChange = useCallback(
|
|
598
|
+
// (newMedias) => {
|
|
599
|
+
// if (multiple) {
|
|
600
|
+
// onChange(newMedias || []);
|
|
601
|
+
// } else if (isArray(newMedias)) {
|
|
602
|
+
// const [firstMedia = null] = newMedias || [];
|
|
603
|
+
// onChange(firstMedia || null);
|
|
604
|
+
// } else {
|
|
605
|
+
// onChange(newMedias || null);
|
|
606
|
+
// }
|
|
607
|
+
// },
|
|
608
|
+
// [onChange, multiple],
|
|
609
|
+
// );
|
|
610
|
+
|
|
609
611
|
return /*#__PURE__*/React.createElement("div", {
|
|
610
612
|
className: classNames([styles.container, _defineProperty({}, className, className)])
|
|
611
613
|
}, isPicker ? /*#__PURE__*/React.createElement(medias.MediasPickerContainer, {
|
|
@@ -620,7 +622,7 @@ function MediaGallery(_ref) {
|
|
|
620
622
|
fields: fields,
|
|
621
623
|
columns: columns,
|
|
622
624
|
multiple: multiple,
|
|
623
|
-
onChange:
|
|
625
|
+
onChange: onChange,
|
|
624
626
|
uppyConfig: uppyConfig,
|
|
625
627
|
onMediaUploaded: onMediaUploaded,
|
|
626
628
|
onMediaFormOpen: onMediaFormOpen,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/media-gallery",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.523",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
|
73
73
|
"@fortawesome/free-solid-svg-icons": "^6.5.2",
|
|
74
74
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
75
|
-
"@micromag/core": "^0.3.
|
|
76
|
-
"@micromag/data": "^0.3.
|
|
75
|
+
"@micromag/core": "^0.3.523",
|
|
76
|
+
"@micromag/data": "^0.3.523",
|
|
77
77
|
"@panneau/medias": "^3.0.163",
|
|
78
78
|
"bootstrap": "^5.3.1",
|
|
79
79
|
"classnames": "^2.2.6",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"access": "public",
|
|
88
88
|
"registry": "https://registry.npmjs.org/"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "9e64c198859eed9118d9488f0c2d14a84a91a658"
|
|
91
91
|
}
|