From 1673abb20f098bc79544865221a0721f6088e5c1 Mon Sep 17 00:00:00 2001 From: Aura Alba Date: Mon, 7 Oct 2024 11:35:03 -0500 Subject: [PATCH] feat: add banner in institution portal --- package-lock.json | 106 +++++++++++++++++++++++++++++++++--- package.json | 2 +- src/features/Main/index.jsx | 6 ++ 3 files changed, 105 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3e75ada..7b4ccf6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ "react": "16.14.0", "react-dom": "16.14.0", "react-intl": "^5.25.1", - "react-paragon-topaz": "^1.8.0", + "react-paragon-topaz": "^1.15.0", "react-redux": "^7.2.9", "react-router": "5.2.1", "react-router-dom": "5.3.0", @@ -1809,16 +1809,21 @@ "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==" }, "node_modules/@babel/runtime": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz", - "integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.6.tgz", + "integrity": "sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==", "dependencies": { - "regenerator-runtime": "^0.13.11" + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/runtime/node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, "node_modules/@babel/template": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", @@ -7306,6 +7311,14 @@ "node": ">=6" } }, + "node_modules/clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "engines": { + "node": ">=6" + } + }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -7928,6 +7941,11 @@ "node": ">=10" } }, + "node_modules/date-arithmetic": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/date-arithmetic/-/date-arithmetic-4.1.0.tgz", + "integrity": "sha512-QWxYLR5P/6GStZcdem+V1xoto6DMadYWpMXU82ES3/RfR3Wdwr3D0+be7mgOJ+Ov0G9D5Dmb9T17sNLQYj9XOg==" + }, "node_modules/date-fns": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz", @@ -7937,6 +7955,11 @@ "url": "https://github.com/sponsors/kossnocorp" } }, + "node_modules/dayjs": { + "version": "1.11.13", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", + "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==" + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -10435,6 +10458,11 @@ "which": "bin/which" } }, + "node_modules/globalize": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/globalize/-/globalize-0.1.1.tgz", + "integrity": "sha512-5e01v8eLGfuQSOvx2MsDMOWS0GFtCx1wPzQSmcHw4hkxFzrQDBO3Xwg/m8Hr/7qXMrHeOIE29qWVzyv06u1TZA==" + }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -14442,6 +14470,11 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, + "node_modules/lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" + }, "node_modules/lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", @@ -14504,6 +14537,14 @@ "yallist": "^3.0.2" } }, + "node_modules/luxon": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.5.0.tgz", + "integrity": "sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==", + "engines": { + "node": ">=12" + } + }, "node_modules/lz-string": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", @@ -14782,6 +14823,25 @@ "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" }, + "node_modules/moment": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", + "engines": { + "node": "*" + } + }, + "node_modules/moment-timezone": { + "version": "0.5.46", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.46.tgz", + "integrity": "sha512-ZXm9b36esbe7OmdABqIWJuBBiLLwAjrN7CE+7sYdCCx82Nabt1wHDj8TVseS59QIlfFPbOoiBPm6ca9BioG4hw==", + "dependencies": { + "moment": "^2.29.4" + }, + "engines": { + "node": "*" + } + }, "node_modules/mrmime": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz", @@ -16693,6 +16753,33 @@ "node": ">=0.10.0" } }, + "node_modules/react-big-calendar": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/react-big-calendar/-/react-big-calendar-1.13.4.tgz", + "integrity": "sha512-eTc67wNHrEbtK7SW2dKlAWjPTcaMfg8BaL5ei4BQ/5FKzVOt3LrmBiq7hr9sOxOYtOfMRxWYMkjkZRvrlRWRBw==", + "dependencies": { + "@babel/runtime": "^7.20.7", + "clsx": "^1.2.1", + "date-arithmetic": "^4.1.0", + "dayjs": "^1.11.7", + "dom-helpers": "^5.2.1", + "globalize": "^0.1.1", + "invariant": "^2.2.4", + "lodash": "^4.17.21", + "lodash-es": "^4.17.21", + "luxon": "^3.2.1", + "memoize-one": "^6.0.0", + "moment": "^2.29.4", + "moment-timezone": "^0.5.40", + "prop-types": "^15.8.1", + "react-overlays": "^5.2.1", + "uncontrollable": "^7.2.1" + }, + "peerDependencies": { + "react": "^16.14.0 || ^17 || ^18", + "react-dom": "^16.14.0 || ^17 || ^18" + } + }, "node_modules/react-bootstrap": { "version": "1.6.6", "resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-1.6.6.tgz", @@ -17087,10 +17174,12 @@ } }, "node_modules/react-paragon-topaz": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/react-paragon-topaz/-/react-paragon-topaz-1.8.0.tgz", - "integrity": "sha512-QfbYlIu/AXpql2+friMZJYWhsUTdCFA2aIrKR5d2kk/14hX7T7Ud32T7wlqInsI1qPJyMWQutBS30oPvKLfiCQ==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/react-paragon-topaz/-/react-paragon-topaz-1.15.0.tgz", + "integrity": "sha512-uT7BNO2ZFkCFYLXNuDIRrS5ETBRb8bXZfrqYPJPQr+baJd8LT/5or4pQVUt77cetyaS3W1TpI3A+PFWYdn+lgQ==", "dependencies": { + "@babel/runtime": "7.25.6", + "@edx/frontend-platform": "4.5.1", "@edx/paragon": "^20.45.0", "@fortawesome/free-solid-svg-icons": "^6.4.2", "@fortawesome/react-fontawesome": "^0.2.0", @@ -17099,6 +17188,7 @@ "date-fns": "^3.6.0", "prop-types": "^15.8.1", "react": "16.14.0", + "react-big-calendar": "1.13.4", "react-date-range": "^2.0.0-alpha.4", "react-dom": "16.14.0", "react-intl": "^5.25.1", diff --git a/package.json b/package.json index 9d63f75..7d17f1d 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "react": "16.14.0", "react-dom": "16.14.0", "react-intl": "^5.25.1", - "react-paragon-topaz": "^1.8.0", + "react-paragon-topaz": "^1.15.0", "react-redux": "^7.2.9", "react-router": "5.2.1", "react-router-dom": "5.3.0", diff --git a/src/features/Main/index.jsx b/src/features/Main/index.jsx index 4bad677..46407f5 100644 --- a/src/features/Main/index.jsx +++ b/src/features/Main/index.jsx @@ -10,6 +10,7 @@ import { import { getConfig } from '@edx/frontend-platform'; import { Container, Spinner } from '@edx/paragon'; +import { Banner } from 'react-paragon-topaz'; import CookiePolicyBanner from '@pearsonedunext/frontend-component-cookie-policy-banner'; @@ -52,6 +53,8 @@ const Main = () => { const statusInstitutions = useSelector((state) => state.main.institution.status); const isLoadingInstitutions = statusInstitutions === RequestStatus.LOADING; + const bannerText = getConfig().MAINTENANCE_BANNER_TEXT || ''; + useEffect(() => { dispatch(fetchInstitutionData()); }, [dispatch]); @@ -83,6 +86,9 @@ const Main = () => {
+ {bannerText && ( + + )}
{isLoadingInstitutions && (