@micromag/media-gallery 0.3.521 → 0.3.522
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 +16 -14
- package/lib/index.js +16 -14
- package/package.json +2 -2
package/es/index.js
CHANGED
|
@@ -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
|
@@ -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.522",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"access": "public",
|
|
88
88
|
"registry": "https://registry.npmjs.org/"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "ebe3c6039f81b3a0104dd7fbbcb76e07a614b627"
|
|
91
91
|
}
|