@edx/frontend-platform 6.2.0 → 7.0.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": "6.2.0",
3
+ "version": "7.0.1",
4
4
  "description": "Foundational application framework for Open edX micro-frontend applications.",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
@@ -34,13 +34,13 @@
34
34
  "devDependencies": {
35
35
  "@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
36
36
  "@edx/browserslist-config": "1.2.0",
37
- "@edx/frontend-build": "13.0.14",
38
- "@edx/paragon": "21.5.6",
39
- "@testing-library/jest-dom": "6.1.5",
37
+ "@openedx/frontend-build": "13.0.27",
38
+ "@openedx/paragon": "22.0.0",
39
+ "@testing-library/jest-dom": "6.2.0",
40
40
  "@testing-library/react": "12.1.5",
41
41
  "@testing-library/react-hooks": "^8.0.1",
42
42
  "axios-mock-adapter": "^1.21.3",
43
- "core-js": "3.34.0",
43
+ "core-js": "3.35.0",
44
44
  "husky": "8.0.3",
45
45
  "jsdoc": "^4.0.0",
46
46
  "nodemon": "3.0.2",
@@ -74,8 +74,8 @@
74
74
  "universal-cookie": "4.0.4"
75
75
  },
76
76
  "peerDependencies": {
77
- "@edx/frontend-build": ">= 8.1.0 || ^12.9.0-alpha.1",
78
- "@edx/paragon": ">= 10.0.0 < 22.0.0",
77
+ "@openedx/frontend-build": ">= 13.0.15",
78
+ "@openedx/paragon": ">= 21.5.7 < 23.0.0",
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",
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React, { useState } from 'react';
8
8
  import PropTypes from 'prop-types';
9
- import { Button, Container, Row, Col } from '@edx/paragon';
9
+ import { Button, Container, Row, Col } from '@openedx/paragon';
10
10
  import { useAppEvent } from './hooks';
11
11
  import { FormattedMessage, IntlProvider, getMessages, getLocale, LOCALE_CHANGED } from '../i18n';
12
12
 
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorPage.js","names":["React","useState","PropTypes","Button","Container","Row","Col","useAppEvent","FormattedMessage","IntlProvider","getMessages","getLocale","LOCALE_CHANGED","ErrorPage","_ref","message","_useState","_useState2","_slicedToArray","locale","setLocale","reload","global","location","createElement","messages","fluid","className","id","defaultMessage","description","role","onClick","propTypes","string","defaultProps"],"sources":["../../src/react/ErrorPage.jsx"],"sourcesContent":["import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n Button, Container, Row, Col,\n} from '@edx/paragon';\n\nimport { useAppEvent } from './hooks';\nimport {\n FormattedMessage,\n IntlProvider,\n getMessages,\n getLocale,\n LOCALE_CHANGED,\n} from '../i18n';\n\n/**\n * An error page that displays a generic message for unexpected errors. Also contains a \"Try\n * Again\" button to refresh the page.\n *\n * @memberof module:React\n * @extends {Component}\n */\nfunction ErrorPage({\n message,\n}) {\n const [locale, setLocale] = useState(getLocale());\n\n useAppEvent(LOCALE_CHANGED, () => {\n setLocale(getLocale());\n });\n\n /* istanbul ignore next */\n const reload = () => {\n global.location.reload();\n };\n\n return (\n <IntlProvider locale={locale} messages={getMessages()}>\n <Container fluid className=\"py-5 justify-content-center align-items-start text-center\" data-testid=\"error-page\">\n <Row>\n <Col>\n <p className=\"text-muted\">\n <FormattedMessage\n id=\"unexpected.error.message.text\"\n defaultMessage=\"An unexpected error occurred. Please click the button below to refresh the page.\"\n description=\"error message when an unexpected error occurs\"\n />\n </p>\n {message && (\n <div role=\"alert\" className=\"my-4\">\n <p>{message}</p>\n </div>\n )}\n <Button onClick={reload}>\n <FormattedMessage\n id=\"unexpected.error.button.text\"\n defaultMessage=\"Try again\"\n description=\"text for button that tries to reload the app by refreshing the page\"\n />\n </Button>\n </Col>\n </Row>\n </Container>\n </IntlProvider>\n );\n}\n\nErrorPage.propTypes = {\n message: PropTypes.string,\n};\n\nErrorPage.defaultProps = {\n message: null,\n};\n\nexport default ErrorPage;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,OAAOC,SAAS,MAAM,YAAY;AAClC,SACEC,MAAM,EAAEC,SAAS,EAAEC,GAAG,EAAEC,GAAG,QACtB,cAAc;AAErB,SAASC,WAAW,QAAQ,SAAS;AACrC,SACEC,gBAAgB,EAChBC,YAAY,EACZC,WAAW,EACXC,SAAS,EACTC,cAAc,QACT,SAAS;;AAEhB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,SAASA,CAAAC,IAAA,EAEf;EAAA,IADDC,OAAO,GAAAD,IAAA,CAAPC,OAAO;EAEP,IAAAC,SAAA,GAA4Bf,QAAQ,CAACU,SAAS,CAAC,CAAC,CAAC;IAAAM,UAAA,GAAAC,cAAA,CAAAF,SAAA;IAA1CG,MAAM,GAAAF,UAAA;IAAEG,SAAS,GAAAH,UAAA;EAExBV,WAAW,CAACK,cAAc,EAAE,YAAM;IAChCQ,SAAS,CAACT,SAAS,CAAC,CAAC,CAAC;EACxB,CAAC,CAAC;;EAEF;EACA,IAAMU,MAAM,GAAG,SAATA,MAAMA,CAAA,EAAS;IACnBC,MAAM,CAACC,QAAQ,CAACF,MAAM,CAAC,CAAC;EAC1B,CAAC;EAED,oBACErB,KAAA,CAAAwB,aAAA,CAACf,YAAY;IAACU,MAAM,EAAEA,MAAO;IAACM,QAAQ,EAAEf,WAAW,CAAC;EAAE,gBACpDV,KAAA,CAAAwB,aAAA,CAACpB,SAAS;IAACsB,KAAK;IAACC,SAAS,EAAC,2DAA2D;IAAC,eAAY;EAAY,gBAC7G3B,KAAA,CAAAwB,aAAA,CAACnB,GAAG,qBACFL,KAAA,CAAAwB,aAAA,CAAClB,GAAG,qBACFN,KAAA,CAAAwB,aAAA;IAAGG,SAAS,EAAC;EAAY,gBACvB3B,KAAA,CAAAwB,aAAA,CAAChB,gBAAgB;IACfoB,EAAE,EAAC,+BAA+B;IAClCC,cAAc,EAAC,kFAAkF;IACjGC,WAAW,EAAC;EAA+C,CAC5D,CACA,CAAC,EACHf,OAAO,iBACNf,KAAA,CAAAwB,aAAA;IAAKO,IAAI,EAAC,OAAO;IAACJ,SAAS,EAAC;EAAM,gBAChC3B,KAAA,CAAAwB,aAAA,YAAIT,OAAW,CACZ,CACN,eACDf,KAAA,CAAAwB,aAAA,CAACrB,MAAM;IAAC6B,OAAO,EAAEX;EAAO,gBACtBrB,KAAA,CAAAwB,aAAA,CAAChB,gBAAgB;IACfoB,EAAE,EAAC,8BAA8B;IACjCC,cAAc,EAAC,WAAW;IAC1BC,WAAW,EAAC;EAAqE,CAClF,CACK,CACL,CACF,CACI,CACC,CAAC;AAEnB;AAEAjB,SAAS,CAACoB,SAAS,GAAG;EACpBlB,OAAO,EAAEb,SAAS,CAACgC;AACrB,CAAC;AAEDrB,SAAS,CAACsB,YAAY,GAAG;EACvBpB,OAAO,EAAE;AACX,CAAC;AAED,eAAeF,SAAS"}
1
+ {"version":3,"file":"ErrorPage.js","names":["React","useState","PropTypes","Button","Container","Row","Col","useAppEvent","FormattedMessage","IntlProvider","getMessages","getLocale","LOCALE_CHANGED","ErrorPage","_ref","message","_useState","_useState2","_slicedToArray","locale","setLocale","reload","global","location","createElement","messages","fluid","className","id","defaultMessage","description","role","onClick","propTypes","string","defaultProps"],"sources":["../../src/react/ErrorPage.jsx"],"sourcesContent":["import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n Button, Container, Row, Col,\n} from '@openedx/paragon';\n\nimport { useAppEvent } from './hooks';\nimport {\n FormattedMessage,\n IntlProvider,\n getMessages,\n getLocale,\n LOCALE_CHANGED,\n} from '../i18n';\n\n/**\n * An error page that displays a generic message for unexpected errors. Also contains a \"Try\n * Again\" button to refresh the page.\n *\n * @memberof module:React\n * @extends {Component}\n */\nfunction ErrorPage({\n message,\n}) {\n const [locale, setLocale] = useState(getLocale());\n\n useAppEvent(LOCALE_CHANGED, () => {\n setLocale(getLocale());\n });\n\n /* istanbul ignore next */\n const reload = () => {\n global.location.reload();\n };\n\n return (\n <IntlProvider locale={locale} messages={getMessages()}>\n <Container fluid className=\"py-5 justify-content-center align-items-start text-center\" data-testid=\"error-page\">\n <Row>\n <Col>\n <p className=\"text-muted\">\n <FormattedMessage\n id=\"unexpected.error.message.text\"\n defaultMessage=\"An unexpected error occurred. Please click the button below to refresh the page.\"\n description=\"error message when an unexpected error occurs\"\n />\n </p>\n {message && (\n <div role=\"alert\" className=\"my-4\">\n <p>{message}</p>\n </div>\n )}\n <Button onClick={reload}>\n <FormattedMessage\n id=\"unexpected.error.button.text\"\n defaultMessage=\"Try again\"\n description=\"text for button that tries to reload the app by refreshing the page\"\n />\n </Button>\n </Col>\n </Row>\n </Container>\n </IntlProvider>\n );\n}\n\nErrorPage.propTypes = {\n message: PropTypes.string,\n};\n\nErrorPage.defaultProps = {\n message: null,\n};\n\nexport default ErrorPage;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,OAAOC,SAAS,MAAM,YAAY;AAClC,SACEC,MAAM,EAAEC,SAAS,EAAEC,GAAG,EAAEC,GAAG,QACtB,kBAAkB;AAEzB,SAASC,WAAW,QAAQ,SAAS;AACrC,SACEC,gBAAgB,EAChBC,YAAY,EACZC,WAAW,EACXC,SAAS,EACTC,cAAc,QACT,SAAS;;AAEhB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,SAASA,CAAAC,IAAA,EAEf;EAAA,IADDC,OAAO,GAAAD,IAAA,CAAPC,OAAO;EAEP,IAAAC,SAAA,GAA4Bf,QAAQ,CAACU,SAAS,CAAC,CAAC,CAAC;IAAAM,UAAA,GAAAC,cAAA,CAAAF,SAAA;IAA1CG,MAAM,GAAAF,UAAA;IAAEG,SAAS,GAA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