@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.0",
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, { lazy, Suspense } from 'react';
1
+ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- var DynamicProvider = /*#__PURE__*/lazy(function () {
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(_ref2) {
23
- var _ref2$store = _ref2.store,
24
- store = _ref2$store === void 0 ? null : _ref2$store,
25
- children = _ref2.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(Suspense, {
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","lazy","Suspense","PropTypes","DynamicProvider","then","module","Provider","default","_ref","children","OptionalReduxProvider","_ref2","_ref2$store","store","createElement","fallback","propTypes","shape","node","isRequired"],"sources":["../../src/react/OptionalReduxProvider.jsx"],"sourcesContent":["import React, { lazy, Suspense } from 'react';\nimport PropTypes from 'prop-types';\n\nconst DynamicProvider = lazy(() => import('react-redux')\n .then((module) => ({ default: module.Provider }))\n .catch(() => ({ default: ({ children }) => children })));\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 <Suspense fallback={null}>\n <DynamicProvider store={store}>\n <div data-testid=\"redux-provider\">\n {children}\n </div>\n </DynamicProvider>\n </Suspense>\n );\n}\n\nOptionalReduxProvider.propTypes = {\n store: PropTypes.shape(),\n children: PropTypes.node.isRequired,\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,QAAQ,QAAQ,OAAO;AAC7C,OAAOC,SAAS,MAAM,YAAY;AAElC,IAAMC,eAAe,gBAAGH,IAAI,CAAC;EAAA,OAAM,MAAM,CAAC,aAAa,CAAC,CACrDI,IAAI,CAAC,UAACC,MAAM;IAAA,OAAM;MAAE,WAASA,MAAM,CAACC;IAAS,CAAC;EAAA,CAAC,CAAC,SAC3C,CAAC;IAAA,OAAO;MAAE,WAAS,SAATC,QAAOA,CAAAC,IAAA;QAAA,IAAKC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;QAAA,OAAOA,QAAQ;MAAA;IAAC,CAAC;EAAA,CAAC,CAAC;AAAA,EAAC;;AAE1D;AACA;AACA;AACA;AACA,eAAe,SAASC,qBAAqBA,CAAAC,KAAA,EAA6B;EAAA,IAAAC,WAAA,GAAAD,KAAA,CAA1BE,KAAK;IAALA,KAAK,GAAAD,WAAA,cAAG,IAAI,GAAAA,WAAA;IAAEH,QAAQ,GAAAE,KAAA,CAARF,QAAQ;EACpE,IAAII,KAAK,KAAK,IAAI,EAAE;IAClB,OAAOJ,QAAQ;EACjB;EAEA,oBACEV,KAAA,CAAAe,aAAA,CAACb,QAAQ;IAACc,QAAQ,EAAE;EAAK,gBACvBhB,KAAA,CAAAe,aAAA,CAACX,eAAe;IAACU,KAAK,EAAEA;EAAM,gBAC5Bd,KAAA,CAAAe,aAAA;IAAK,eAAY;EAAgB,GAC9BL,QACE,CACU,CACT,CAAC;AAEf;AAEAC,qBAAqB,CAACM,SAAS,GAAG;EAChCH,KAAK,EAAEX,SAAS,CAACe,KAAK,CAAC,CAAC;EACxBR,QAAQ,EAAEP,SAAS,CAACgB,IAAI,CAACC;AAC3B,CAAC","ignoreList":[]}
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":[]}