@micromag/media-gallery 0.4.20 → 0.4.21
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 +4 -11
- package/package.json +4 -4
package/es/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
-
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
3
2
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
4
3
|
import classNames from 'classnames';
|
|
5
4
|
import isArray from 'lodash/isArray';
|
|
6
|
-
import React, { useMemo, useCallback
|
|
5
|
+
import React, { useMemo, useCallback } from 'react';
|
|
7
6
|
import { MediasPickerContainer, MediasBrowserContainer } from '@panneau/medias';
|
|
8
7
|
import { useStory } from '@micromag/core/contexts';
|
|
9
8
|
import { useApi, useMediaCreate } from '@micromag/data';
|
|
@@ -593,17 +592,11 @@ function MediaGallery(_ref) {
|
|
|
593
592
|
return f !== null;
|
|
594
593
|
});
|
|
595
594
|
}, [partialFilters, storyId]);
|
|
596
|
-
var _useState = useState(source !== null ? {
|
|
597
|
-
source: source
|
|
598
|
-
} : null),
|
|
599
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
600
|
-
query = _useState2[0],
|
|
601
|
-
setQuery = _useState2[1];
|
|
602
595
|
var finalQuery = useMemo(function () {
|
|
603
|
-
|
|
596
|
+
return source !== null ? {
|
|
604
597
|
source: source
|
|
605
|
-
} : null
|
|
606
|
-
}, [source
|
|
598
|
+
} : null;
|
|
599
|
+
}, [source]);
|
|
607
600
|
return /*#__PURE__*/React.createElement("div", {
|
|
608
601
|
className: classNames([styles.container, _defineProperty({}, className, className)])
|
|
609
602
|
}, isPicker ? /*#__PURE__*/React.createElement(MediasPickerContainer, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/media-gallery",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.21",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
"@fortawesome/fontawesome-svg-core": "^7.2.0",
|
|
70
70
|
"@fortawesome/free-solid-svg-icons": "^7.2.0",
|
|
71
71
|
"@fortawesome/react-fontawesome": "^3.2.0",
|
|
72
|
-
"@micromag/core": "^0.4.
|
|
73
|
-
"@micromag/data": "^0.4.
|
|
72
|
+
"@micromag/core": "^0.4.21",
|
|
73
|
+
"@micromag/data": "^0.4.21",
|
|
74
74
|
"@panneau/medias": "^4.0.24",
|
|
75
75
|
"bootstrap": "^5.3.8",
|
|
76
76
|
"classnames": "^2.2.6",
|
|
@@ -83,6 +83,6 @@
|
|
|
83
83
|
"access": "public",
|
|
84
84
|
"registry": "https://registry.npmjs.org/"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "34dedbdd988f27c395b838b50dfcd0e48bfa16ee",
|
|
87
87
|
"types": "es/index.d.ts"
|
|
88
88
|
}
|