@micromag/media-gallery 0.3.553 → 0.3.555
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 +13 -7
- package/package.json +2 -2
package/es/index.js
CHANGED
|
@@ -384,10 +384,13 @@ function filters() {
|
|
|
384
384
|
component: 'radios',
|
|
385
385
|
name: 'source',
|
|
386
386
|
options: [{
|
|
387
|
-
label:
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
387
|
+
label: /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
388
|
+
id: "bCtuS/",
|
|
389
|
+
defaultMessage: [{
|
|
390
|
+
"type": 0,
|
|
391
|
+
"value": "In this Micromag"
|
|
392
|
+
}]
|
|
393
|
+
}),
|
|
391
394
|
value: 'document-'
|
|
392
395
|
}]
|
|
393
396
|
}];
|
|
@@ -519,6 +522,9 @@ function MediaGallery(_ref) {
|
|
|
519
522
|
allowedFileTypes: fileTypes !== null && fileTypes.length > 0 ? fileTypes : null
|
|
520
523
|
};
|
|
521
524
|
}, [fileTypes]);
|
|
525
|
+
var finalTypes = useMemo(function () {
|
|
526
|
+
return !isArray(types) && types !== null ? [types] : types;
|
|
527
|
+
}, [types]);
|
|
522
528
|
|
|
523
529
|
// Filters
|
|
524
530
|
var partialFilters = filters$1 || filters() || [];
|
|
@@ -529,6 +535,9 @@ function MediaGallery(_ref) {
|
|
|
529
535
|
id = _ref3$id === void 0 ? null : _ref3$id,
|
|
530
536
|
_ref3$options = _ref3.options,
|
|
531
537
|
options = _ref3$options === void 0 ? [] : _ref3$options;
|
|
538
|
+
if (id === 'types' && finalTypes !== null) {
|
|
539
|
+
return false;
|
|
540
|
+
}
|
|
532
541
|
if (id === 'source') {
|
|
533
542
|
if (storyId === null) {
|
|
534
543
|
return null;
|
|
@@ -566,9 +575,6 @@ function MediaGallery(_ref) {
|
|
|
566
575
|
source: source
|
|
567
576
|
} : null));
|
|
568
577
|
}, [source, setQuery]);
|
|
569
|
-
var finalTypes = useMemo(function () {
|
|
570
|
-
return !isArray(types) && types !== null ? [types] : types;
|
|
571
|
-
}, [types]);
|
|
572
578
|
return /*#__PURE__*/React.createElement("div", {
|
|
573
579
|
className: classNames([styles.container, _defineProperty({}, className, className)])
|
|
574
580
|
}, isPicker ? /*#__PURE__*/React.createElement(MediasPickerContainer, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/media-gallery",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.555",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"access": "public",
|
|
87
87
|
"registry": "https://registry.npmjs.org/"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "c1faaf566622c92b26cc784443ebb9d67bf36fa7"
|
|
90
90
|
}
|