@edx/frontend-platform 8.2.0 → 8.2.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edx/frontend-platform",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.1",
|
|
4
4
|
"description": "Foundational application framework for Open edX micro-frontend applications.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -82,13 +82,5 @@
|
|
|
82
82
|
"react-redux": "^7.1.1 || ^8.1.1",
|
|
83
83
|
"react-router-dom": "^6.0.0",
|
|
84
84
|
"redux": "^4.0.4"
|
|
85
|
-
},
|
|
86
|
-
"peerDependenciesMeta": {
|
|
87
|
-
"redux": {
|
|
88
|
-
"optional": true
|
|
89
|
-
},
|
|
90
|
-
"react-redux": {
|
|
91
|
-
"optional": true
|
|
92
|
-
}
|
|
93
85
|
}
|
|
94
86
|
}
|
|
@@ -1,38 +1,23 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
4
|
-
return import('react-redux').then(function (module) {
|
|
5
|
-
return {
|
|
6
|
-
"default": module.Provider
|
|
7
|
-
};
|
|
8
|
-
})["catch"](function () {
|
|
9
|
-
return {
|
|
10
|
-
"default": function _default(_ref) {
|
|
11
|
-
var children = _ref.children;
|
|
12
|
-
return children;
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
});
|
|
16
|
-
});
|
|
3
|
+
import { Provider } from 'react-redux';
|
|
17
4
|
|
|
18
5
|
/**
|
|
19
6
|
* @memberof module:React
|
|
20
7
|
* @param {Object} props
|
|
21
8
|
*/
|
|
22
|
-
export default function OptionalReduxProvider(
|
|
23
|
-
var
|
|
24
|
-
store =
|
|
25
|
-
children =
|
|
9
|
+
export default function OptionalReduxProvider(_ref) {
|
|
10
|
+
var _ref$store = _ref.store,
|
|
11
|
+
store = _ref$store === void 0 ? null : _ref$store,
|
|
12
|
+
children = _ref.children;
|
|
26
13
|
if (store === null) {
|
|
27
14
|
return children;
|
|
28
15
|
}
|
|
29
|
-
return /*#__PURE__*/React.createElement(
|
|
30
|
-
fallback: null
|
|
31
|
-
}, /*#__PURE__*/React.createElement(DynamicProvider, {
|
|
16
|
+
return /*#__PURE__*/React.createElement(Provider, {
|
|
32
17
|
store: store
|
|
33
18
|
}, /*#__PURE__*/React.createElement("div", {
|
|
34
19
|
"data-testid": "redux-provider"
|
|
35
|
-
}, children))
|
|
20
|
+
}, children));
|
|
36
21
|
}
|
|
37
22
|
OptionalReduxProvider.propTypes = {
|
|
38
23
|
store: PropTypes.shape(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionalReduxProvider.js","names":["React","
|
|
1
|
+
{"version":3,"file":"OptionalReduxProvider.js","names":["React","PropTypes","Provider","OptionalReduxProvider","_ref","_ref$store","store","children","createElement","propTypes","shape","node","isRequired"],"sources":["../../src/react/OptionalReduxProvider.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Provider } from 'react-redux';\n\n/**\n * @memberof module:React\n * @param {Object} props\n */\nexport default function OptionalReduxProvider({ store = null, children }) {\n if (store === null) {\n return children;\n }\n\n return (\n <Provider store={store}>\n <div data-testid=\"redux-provider\">\n {children}\n </div>\n </Provider>\n );\n}\n\nOptionalReduxProvider.propTypes = {\n store: PropTypes.shape(),\n children: PropTypes.node.isRequired,\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,QAAQ,QAAQ,aAAa;;AAEtC;AACA;AACA;AACA;AACA,eAAe,SAASC,qBAAqBA,CAAAC,IAAA,EAA6B;EAAA,IAAAC,UAAA,GAAAD,IAAA,CAA1BE,KAAK;IAALA,KAAK,GAAAD,UAAA,cAAG,IAAI,GAAAA,UAAA;IAAEE,QAAQ,GAAAH,IAAA,CAARG,QAAQ;EACpE,IAAID,KAAK,KAAK,IAAI,EAAE;IAClB,OAAOC,QAAQ;EACjB;EAEA,oBACEP,KAAA,CAAAQ,aAAA,CAACN,QAAQ;IAACI,KAAK,EAAEA;EAAM,gBACrBN,KAAA,CAAAQ,aAAA;IAAK,eAAY;EAAgB,GAC9BD,QACE,CACG,CAAC;AAEf;AAEAJ,qBAAqB,CAACM,SAAS,GAAG;EAChCH,KAAK,EAAEL,SAAS,CAACS,KAAK,CAAC,CAAC;EACxBH,QAAQ,EAAEN,SAAS,CAACU,IAAI,CAACC;AAC3B,CAAC","ignoreList":[]}
|