@edx/frontend-platform 5.3.1 → 5.4.0

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": "5.3.1",
3
+ "version": "5.4.0",
4
4
  "description": "Foundational application framework for Open edX micro-frontend applications.",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
@@ -35,11 +35,11 @@
35
35
  "@edx/brand": "npm:@edx/brand-openedx@1.2.0",
36
36
  "@edx/browserslist-config": "1.2.0",
37
37
  "@edx/frontend-build": "12.9.10",
38
- "@edx/paragon": "^21.1.2",
38
+ "@edx/paragon": "^20.44.0",
39
39
  "@testing-library/react-hooks": "^8.0.1",
40
40
  "@wojtekmaj/enzyme-adapter-react-17": "0.8.0",
41
41
  "axios-mock-adapter": "^1.21.3",
42
- "core-js": "3.32.1",
42
+ "core-js": "3.32.2",
43
43
  "enzyme": "3.11.0",
44
44
  "husky": "8.0.3",
45
45
  "jsdoc": "^4.0.0",
@@ -47,7 +47,7 @@
47
47
  "prop-types": "15.8.1",
48
48
  "react": "17.0.2",
49
49
  "react-dom": "17.0.2",
50
- "react-redux": "^8.1.1",
50
+ "react-redux": "^7.2.9",
51
51
  "react-router-dom": "^6.6.1",
52
52
  "redux": "4.2.1",
53
53
  "regenerator-runtime": "0.14.0"
@@ -70,7 +70,7 @@
70
70
  "lodash.merge": "4.6.2",
71
71
  "lodash.snakecase": "4.1.1",
72
72
  "pubsub-js": "1.9.4",
73
- "react-intl": "^6.4.0",
73
+ "react-intl": "^5.25.0",
74
74
  "universal-cookie": "4.0.4"
75
75
  },
76
76
  "peerDependencies": {
@@ -79,7 +79,7 @@
79
79
  "prop-types": "^15.7.2",
80
80
  "react": "^16.9.0 || ^17.0.0",
81
81
  "react-dom": "^16.9.0 || ^17.0.0",
82
- "react-redux": "^7.1.1 || ^8.1.1",
82
+ "react-redux": "^7.1.1",
83
83
  "react-router-dom": "^6.0.0",
84
84
  "redux": "^4.0.4"
85
85
  }
@@ -45,7 +45,7 @@ var ErrorBoundary = /*#__PURE__*/function (_Component) {
45
45
  key: "render",
46
46
  value: function render() {
47
47
  if (this.state.hasError) {
48
- return /*#__PURE__*/React.createElement(ErrorPage, null);
48
+ return this.props.fallbackComponent || /*#__PURE__*/React.createElement(ErrorPage, null);
49
49
  }
50
50
  return this.props.children;
51
51
  }
@@ -60,11 +60,13 @@ var ErrorBoundary = /*#__PURE__*/function (_Component) {
60
60
  }]);
61
61
  return ErrorBoundary;
62
62
  }(Component);
63
- export { ErrorBoundary as default };
64
63
  ErrorBoundary.propTypes = {
65
- children: PropTypes.node
64
+ children: PropTypes.node,
65
+ fallbackComponent: PropTypes.node
66
66
  };
67
67
  ErrorBoundary.defaultProps = {
68
- children: null
68
+ children: null,
69
+ fallbackComponent: undefined
69
70
  };
71
+ export default ErrorBoundary;
70
72
  //# sourceMappingURL=ErrorBoundary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary.js","names":["React","Component","PropTypes","logError","ErrorPage","ErrorBoundary","_Component","_inherits","_super","_createSuper","props","_this","_classCallCheck","call","state","hasError","_createClass","key","value","componentDidCatch","error","info","stack","componentStack","render","createElement","children","getDerivedStateFromError","default","propTypes","node","defaultProps"],"sources":["../../src/react/ErrorBoundary.jsx"],"sourcesContent":["import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { logError } from '../logging';\n\nimport ErrorPage from './ErrorPage';\n\n/**\n * Error boundary component used to log caught errors and display the error page.\n *\n * @memberof module:React\n * @extends {Component}\n */\nexport default class ErrorBoundary extends Component {\n constructor(props) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError() {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n componentDidCatch(error, info) {\n logError(error, { stack: info.componentStack });\n }\n\n render() {\n if (this.state.hasError) {\n return <ErrorPage />;\n }\n\n return this.props.children;\n }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AwBlCvB,aAAa,CAACwB,SAAS,GAAG;EACxBH,QAAQ,EAAExB,SAAS,CAAC4B;AACtB,CAAC;AAEDzB,aAAa,CAAC0B,YAAY,GAAG;EAC3BL,QAAQ,EAAE;AACZ,CAAC"}
1
+ {"version":3,"file":"ErrorBoundary.js","names":["React","Component","PropTypes","logError","ErrorPage","ErrorBoundary","_Component","_inherits","_super","_createSuper","props","_this","_classCallCheck","call","state","hasError","_createClass","key","value","componentDidCatch","error","info","stack","componentStack","render","fallbackComponent","createElement","children","getDerivedStateFromError","propTypes","node","defaultProps","undefined"],"sources":["../../src/react/ErrorBoundary.jsx"],"sourcesContent":["import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { logError } from '../logging';\n\nimport ErrorPage from './ErrorPage';\n\n/**\n * Error boundary component used to log caught errors and display the error page.\n *\n * @memberof module:React\n * @extends {Component}\n */\nclass ErrorBoundary extends Component {\n constructor(props) {\n super(props);\n this.state = { hasError: false };\n }\n\n static getDerivedStateFromError() {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n componentDidCatch(error, info) {\n logError(error, { stack: info.componentStack });\n }\n\n render() {\n if (this.state.hasError) {\n return this.props.fallbackComponent || <ErrorPage />;\n }\n return this.props.children;\n }\n}\n\nErrorBoundary.propTypes = {\n children: PropTypes.node,\n fallbackComponent: PropTypes.node,\n};\n\nErrorBoundary.defaultProps = {\n children: null,\n fallbackComponent: undefined,\n};\n\nexport default ErrorBoundary;\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,OAAOC,SAAS,MAAM,YAAY;AAElC,SAASC,QAAQ,QAAQ,YAAY;AAErC,OAAOC,SAAS,MAAM,aAAa;;AAEnC;AACA;AACA;AACA;AACA;AACA;AALA,IAMMC,aAAa,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,aAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,aAAA;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