diff --git a/package-lock.json b/package-lock.json index 6c858a0e2..18ad44a93 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,8 +10,8 @@ "license": "AGPL-3.0", "dependencies": { "@edx/brand": "npm:@openedx/brand-openedx@^1.2.2", - "@edx/frontend-component-footer": "12.5.1", - "@edx/frontend-component-header": "4.8.0", + "@edx/frontend-component-footer": "12.6.0", + "@edx/frontend-component-header": "4.10.1", "@edx/frontend-platform": "5.6.1", "@edx/paragon": "^20.44.0", "@fortawesome/fontawesome-svg-core": "1.2.36", @@ -21,7 +21,7 @@ "@fortawesome/react-fontawesome": "0.2.0", "@pact-foundation/pact": "^11.0.2", "classnames": "2.3.2", - "core-js": "3.33.1", + "core-js": "3.33.3", "history": "5.3.0", "lodash.camelcase": "4.3.0", "lodash.get": "4.4.2", @@ -48,11 +48,10 @@ "@commitlint/cli": "17.8.1", "@commitlint/config-angular": "17.8.1", "@edx/browserslist-config": "^1.1.1", - "@edx/frontend-build": "13.0.4", + "@edx/frontend-build": "13.0.8", "@edx/reactifex": "2.2.0", "@testing-library/react": "12.1.5", "@wojtekmaj/enzyme-adapter-react-17": "0.8.0", - "codecov": "3.8.3", "enzyme": "3.11.0", "glob": "10.3.10", "react-test-renderer": "17.0.2", @@ -2511,9 +2510,9 @@ } }, "node_modules/@edx/frontend-build": { - "version": "13.0.4", - "resolved": "https://registry.npmjs.org/@edx/frontend-build/-/frontend-build-13.0.4.tgz", - "integrity": "sha512-c6i4h19as3vNMIgo+vLNhBk3cM4TOUtBrgYmLrzLtLcWsNZUojnrufrLOdtWmNNKylcBUI9Lvyv++/KrtfJo9w==", + "version": "13.0.8", + "resolved": "https://registry.npmjs.org/@edx/frontend-build/-/frontend-build-13.0.8.tgz", + "integrity": "sha512-TXUoF7BTIHe4h+W4Dt9+Gf8PXnfVJRwLKitEkpYUH5r4kDEJfyKKGYSbizkciGI+9QScbhm2u8Alv2agDXV1TA==", "dependencies": { "@babel/cli": "7.22.5", "@babel/core": "7.22.5", @@ -2557,17 +2556,17 @@ "postcss": "8.4.31", "postcss-custom-media": "10.0.2", "postcss-loader": "7.3.3", - "postcss-rtlcss": "4.0.8", + "postcss-rtlcss": "4.0.9", "react-dev-utils": "12.0.1", "react-refresh": "0.14.0", "resolve-url-loader": "5.0.0", - "sass": "1.65.1", + "sass": "1.69.5", "sass-loader": "13.3.2", "sharp": "0.32.6", "source-map-loader": "4.0.1", "style-loader": "3.3.3", "url-loader": "4.1.1", - "webpack": "5.88.2", + "webpack": "5.89.0", "webpack-bundle-analyzer": "4.9.1", "webpack-cli": "5.1.4", "webpack-dev-server": "4.15.1", @@ -2581,9 +2580,9 @@ } }, "node_modules/@edx/frontend-component-footer": { - "version": "12.5.1", - "resolved": "https://registry.npmjs.org/@edx/frontend-component-footer/-/frontend-component-footer-12.5.1.tgz", - "integrity": "sha512-bLXfSDyyf8z+n4VXkraQ98qhkc+ZXuvRy65kXUE3s560oDv0qdiKU054W8uPY6wtsdu4WQ50C/Mluxzd60UKUg==", + "version": "12.6.0", + "resolved": "https://registry.npmjs.org/@edx/frontend-component-footer/-/frontend-component-footer-12.6.0.tgz", + "integrity": "sha512-s+YwcThkETBcyRji2Zl7CTYebrsqevP0rmTYyycEL952HkpbQ7EY8Ym0wYH2sp/ZnZ9bTyEeWsiQS5l7eMyY1A==", "dependencies": { "@edx/paragon": "^21.3.1", "@fortawesome/fontawesome-svg-core": "6.4.2", @@ -2750,17 +2749,17 @@ } }, "node_modules/@edx/frontend-component-header": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@edx/frontend-component-header/-/frontend-component-header-4.8.0.tgz", - "integrity": "sha512-1uzT4LbDgiAYw9+WhbX6r3NGcA5DgscW7SzxXiqSqBM2ND9ym411eczVrxFzc7XGr0eZkQTrsgNDX7xagunYsg==", + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@edx/frontend-component-header/-/frontend-component-header-4.10.1.tgz", + "integrity": "sha512-bcQ+ebdy/lM2TfLVB+WhdWNsuc51cFVgt5UQuJcV5nw6ACYUkBVTLbGDT7J8797bsQe6Lywg7Cj9ykB+Dy78Kw==", "dependencies": { - "@edx/paragon": "21.5.3", + "@edx/paragon": "21.5.6", "@fortawesome/fontawesome-svg-core": "6.4.2", "@fortawesome/free-brands-svg-icons": "6.4.2", "@fortawesome/free-regular-svg-icons": "6.4.2", "@fortawesome/free-solid-svg-icons": "6.4.2", "@fortawesome/react-fontawesome": "^0.2.0", - "axios-mock-adapter": "1.21.5", + "axios-mock-adapter": "1.22.0", "babel-polyfill": "6.26.0", "react-responsive": "8.2.0", "react-transition-group": "4.4.5" @@ -2773,9 +2772,9 @@ } }, "node_modules/@edx/frontend-component-header/node_modules/@edx/paragon": { - "version": "21.5.3", - "resolved": "https://registry.npmjs.org/@edx/paragon/-/paragon-21.5.3.tgz", - "integrity": "sha512-Xyq7gWLb4n8qWMsNBIPV3tZnOK0bBdHyqj8UVOrFbpBCSPlOES06qpcpT4IrtpfCh0LmUCBiIk5j9XMz3p6zaw==", + "version": "21.5.6", + "resolved": "https://registry.npmjs.org/@edx/paragon/-/paragon-21.5.6.tgz", + "integrity": "sha512-CWR9mFBQAnZ29GeP8igPk3dBLgIQmZJ6tZQiou6855TjHIXcvgmbIvtchKw9SgzhW+D5B0hQJet94zsm+GG/Rg==", "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.1.1", "@fortawesome/react-fontawesome": "^0.1.18", @@ -6207,16 +6206,6 @@ "sprintf-js": "~1.0.2" } }, - "node_modules/argv": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/argv/-/argv-0.0.2.tgz", - "integrity": "sha512-dEamhpPEwRUBpLNHeuCm/v+g0anFByHahxodVO/BbAarHVBBg2MccCwf9K+o1Pof+2btdnkJelYVUWjW/VrATw==", - "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", - "dev": true, - "engines": { - "node": ">=0.6.10" - } - }, "node_modules/aria-hidden": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.3.tgz", @@ -6540,9 +6529,9 @@ } }, "node_modules/axios-mock-adapter": { - "version": "1.21.5", - "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-1.21.5.tgz", - "integrity": "sha512-5NI1V/VK+8+JeTF8niqOowuysA4b8mGzdlMN/QnTnoXbYh4HZSNiopsDclN2g/m85+G++IrEtUdZaQ3GnaMsSA==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-1.22.0.tgz", + "integrity": "sha512-dmI0KbkyAhntUR05YY96qg2H6gg0XMl2+qTW0xmYg6Up+BFBAJYRLROMXRdDEL06/Wqwa0TJThAYvFtSFdRCZw==", "dependencies": { "fast-deep-equal": "^3.1.3", "is-buffer": "^2.0.5" @@ -7312,9 +7301,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001558", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001558.tgz", - "integrity": "sha512-/Et7DwLqpjS47JPEcz6VnxU9PwcIdVi0ciLXRWBQdj1XFye68pSQYpV0QtPTfUKWuOaEig+/Vez2l74eDc1tPQ==", + "version": "1.0.30001563", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001563.tgz", + "integrity": "sha512-na2WUmOxnwIZtwnFI2CZ/3er0wdNzU7hN+cPYz/z2ajHThnkWjNBOpEPP4n+4r2WPM847JaMotaJE3bnfzjyKw==", "funding": [ { "type": "opencollective", @@ -7686,26 +7675,6 @@ "node": ">= 0.12.0" } }, - "node_modules/codecov": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.8.3.tgz", - "integrity": "sha512-Y8Hw+V3HgR7V71xWH2vQ9lyS358CbGCldWlJFR0JirqoGtOoas3R3/OclRTvgUYFK29mmJICDPauVKmpqbwhOA==", - "deprecated": "https://about.codecov.io/blog/codecov-uploader-deprecation-plan/", - "dev": true, - "dependencies": { - "argv": "0.0.2", - "ignore-walk": "3.0.4", - "js-yaml": "3.14.1", - "teeny-request": "7.1.1", - "urlgrey": "1.0.0" - }, - "bin": { - "codecov": "bin/codecov" - }, - "engines": { - "node": ">=4.0" - } - }, "node_modules/collect-v8-coverage": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", @@ -7954,9 +7923,9 @@ } }, "node_modules/core-js": { - "version": "3.33.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.33.1.tgz", - "integrity": "sha512-qVSq3s+d4+GsqN0teRCJtM6tdEEXyWxjzbhVrCHmBS5ZTM0FS2MOS0D13dUXAWDUN6a+lHI/N1hF9Ytz6iLl9Q==", + "version": "3.33.3", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.33.3.tgz", + "integrity": "sha512-lo0kOocUlLKmm6kv/FswQL8zbkH7mVsLJ/FULClOhv8WRVmKLVcs6XPNQAzstfeJTCHMyButEwG+z1kHxHoDZw==", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -10188,21 +10157,6 @@ "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" }, - "node_modules/fast-url-parser": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", - "integrity": "sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==", - "dev": true, - "dependencies": { - "punycode": "^1.3.2" - } - }, - "node_modules/fast-url-parser/node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", - "dev": true - }, "node_modules/fastest-levenshtein": { "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", @@ -11833,15 +11787,6 @@ "node": ">= 4" } }, - "node_modules/ignore-walk": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.4.tgz", - "integrity": "sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==", - "dev": true, - "dependencies": { - "minimatch": "^3.0.4" - } - }, "node_modules/image-minimizer-webpack-plugin": { "version": "3.8.3", "resolved": "https://registry.npmjs.org/image-minimizer-webpack-plugin/-/image-minimizer-webpack-plugin-3.8.3.tgz", @@ -15659,48 +15604,6 @@ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==" }, - "node_modules/node-fetch": { - "version": "2.6.11", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", - "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", - "dev": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/node-fetch/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/node-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "node_modules/node-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", @@ -17209,14 +17112,14 @@ } }, "node_modules/postcss-rtlcss": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/postcss-rtlcss/-/postcss-rtlcss-4.0.8.tgz", - "integrity": "sha512-CR2sY889PHnX6K8rjW9FG4Qvm9UJsIekDakMtEYGH3zgFp9XADMeaKcA0hPOmkClNh0jWbkaPBm0jZ6fHmqkJQ==", + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/postcss-rtlcss/-/postcss-rtlcss-4.0.9.tgz", + "integrity": "sha512-dCNKEf+FgTv+EA3XI8ysg2RnpS5s3/iZmU+9qpCNFxHU/BhK+4hz7jyCsCAfo0CLnDrMPtaQENhwb+EGm1wh7Q==", "dependencies": { - "rtlcss": "4.1.0" + "rtlcss": "4.1.1" }, "engines": { - "node": ">=12.0.0" + "node": ">=18.0.0" }, "peerDependencies": { "postcss": "^8.4.21" @@ -18895,9 +18798,9 @@ } }, "node_modules/rtlcss": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/rtlcss/-/rtlcss-4.1.0.tgz", - "integrity": "sha512-W+N4hh0nVqVrrn3mRkHakxpB+c9cQ4CRT67O39kgA+1DjyhrdsqyCqIuHXyvWaXn4/835n+oX3fYJCi4+G/06A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/rtlcss/-/rtlcss-4.1.1.tgz", + "integrity": "sha512-/oVHgBtnPNcggP2aVXQjSy6N1mMAfHg4GSag0QtZBlD5bdDgAHwr4pydqJGd+SUCu9260+Pjqbjwtvu7EMH1KQ==", "dependencies": { "escalade": "^3.1.1", "picocolors": "^1.0.0", @@ -19275,9 +19178,9 @@ } }, "node_modules/sass": { - "version": "1.65.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.65.1.tgz", - "integrity": "sha512-9DINwtHmA41SEd36eVPQ9BJKpn7eKDQmUHmpI0y5Zv2Rcorrh0zS+cFrt050hdNbmmCNKTW3hV5mWfuegNRsEA==", + "version": "1.69.5", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.5.tgz", + "integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==", "dependencies": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -20315,15 +20218,6 @@ "node": ">= 0.8" } }, - "node_modules/stream-events": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz", - "integrity": "sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg==", - "dev": true, - "dependencies": { - "stubs": "^3.0.0" - } - }, "node_modules/streamx": { "version": "2.15.0", "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.0.tgz", @@ -20531,12 +20425,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/stubs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz", - "integrity": "sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==", - "dev": true - }, "node_modules/style-loader": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.3.tgz", @@ -20755,31 +20643,6 @@ "node": ">=6" } }, - "node_modules/teeny-request": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-7.1.1.tgz", - "integrity": "sha512-iwY6rkW5DDGq8hE2YgNQlKbptYpY5Nn2xecjQiNjOXWbKzPGUfmeUBCSQbbr306d7Z7U2N0TPl+/SwYRfua1Dg==", - "dev": true, - "dependencies": { - "http-proxy-agent": "^4.0.0", - "https-proxy-agent": "^5.0.0", - "node-fetch": "^2.6.1", - "stream-events": "^1.0.5", - "uuid": "^8.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/teeny-request/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/terminal-link": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", @@ -21540,15 +21403,6 @@ "requires-port": "^1.0.0" } }, - "node_modules/urlgrey": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/urlgrey/-/urlgrey-1.0.0.tgz", - "integrity": "sha512-hJfIzMPJmI9IlLkby8QrsCykQ+SXDeO2W5Q9QTW3QpqZVTx4a/K7p8/5q+/isD8vsbVaFgql/gvAoQCRQ2Cb5w==", - "dev": true, - "dependencies": { - "fast-url-parser": "^1.1.3" - } - }, "node_modules/use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", @@ -21742,9 +21596,9 @@ } }, "node_modules/webpack": { - "version": "5.88.2", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.88.2.tgz", - "integrity": "sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==", + "version": "5.89.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.89.0.tgz", + "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==", "dependencies": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.0", diff --git a/package.json b/package.json index af089d510..c432e0c16 100644 --- a/package.json +++ b/package.json @@ -29,8 +29,8 @@ ], "dependencies": { "@edx/brand": "npm:@openedx/brand-openedx@^1.2.2", - "@edx/frontend-component-footer": "12.5.1", - "@edx/frontend-component-header": "4.8.0", + "@edx/frontend-component-footer": "12.6.0", + "@edx/frontend-component-header": "4.10.1", "@edx/frontend-platform": "5.6.1", "@edx/paragon": "^20.44.0", "@fortawesome/fontawesome-svg-core": "1.2.36", @@ -40,7 +40,7 @@ "@fortawesome/react-fontawesome": "0.2.0", "@pact-foundation/pact": "^11.0.2", "classnames": "2.3.2", - "core-js": "3.33.1", + "core-js": "3.33.3", "history": "5.3.0", "lodash.camelcase": "4.3.0", "lodash.get": "4.4.2", @@ -67,11 +67,10 @@ "@commitlint/cli": "17.8.1", "@commitlint/config-angular": "17.8.1", "@edx/browserslist-config": "^1.1.1", - "@edx/frontend-build": "13.0.4", + "@edx/frontend-build": "13.0.8", "@edx/reactifex": "2.2.0", "@testing-library/react": "12.1.5", "@wojtekmaj/enzyme-adapter-react-17": "0.8.0", - "codecov": "3.8.3", "enzyme": "3.11.0", "glob": "10.3.10", "react-test-renderer": "17.0.2", diff --git a/src/profile/ProfilePage.jsx b/src/profile/ProfilePage.jsx index 77e58ad30..0c07bdef1 100644 --- a/src/profile/ProfilePage.jsx +++ b/src/profile/ProfilePage.jsx @@ -126,7 +126,7 @@ class ProfilePage extends React.Component { return ( -

{this.props.params.username}

+

{this.props.params.username}

{this.isYOBDisabled() && }
@@ -178,6 +178,7 @@ class ProfilePage extends React.Component { visibilityLearningGoal, languageProficiencies, visibilityLanguageProficiencies, + courseCertificates, visibilityCourseCertificates, bio, visibilityBio, @@ -196,6 +197,17 @@ class ProfilePage extends React.Component { changeHandler: this.handleChange, }; + const isBlockVisible = (blockInfo) => this.isAuthenticatedUserProfile() + || (!this.isAuthenticatedUserProfile() && Boolean(blockInfo)); + + const isLanguageBlockVisible = isBlockVisible(languageProficiencies.length); + const isEducationBlockVisible = isBlockVisible(levelOfEducation); + const isSocialLinksBLockVisible = isBlockVisible(socialLinks.some((link) => link.socialLink !== null)); + const isBioBlockVisible = isBlockVisible(bio); + const isCertificatesBlockVisible = isBlockVisible(courseCertificates.length); + const isNameBlockVisible = isBlockVisible(name); + const isLocationBlockVisible = isBlockVisible(country); + return (
@@ -213,7 +225,7 @@ class ProfilePage extends React.Component {
PluginPOC
-
+
{this.renderHeadingLockup()}
@@ -231,46 +243,58 @@ class ProfilePage extends React.Component {
{this.renderViewMyRecordsButton()}
- - - - - + {isNameBlockVisible && ( + + )} + {isLocationBlockVisible && ( + + )} + {isLanguageBlockVisible && ( + + )} + {isEducationBlockVisible && ( + + )} + {isSocialLinksBLockVisible && ( + + )}
{!this.isYOBDisabled() && this.renderAgeMessage()} - + {isBioBlockVisible && ( + + )} {getConfig().ENABLE_SKILLS_BUILDER_PROFILE && ( )} - + {isCertificatesBlockVisible && ( + + )}
diff --git a/src/profile/ProfilePage.test.jsx b/src/profile/ProfilePage.test.jsx index 89f8da733..411ca4536 100644 --- a/src/profile/ProfilePage.test.jsx +++ b/src/profile/ProfilePage.test.jsx @@ -114,16 +114,34 @@ describe('', () => { expect(tree).toMatchSnapshot(); }); - it('viewing other profile', () => { + it('viewing other profile with all fields', () => { const contextValue = { authenticatedUser: { userId: 123, username: 'staff', administrator: true }, config: getConfig(), }; + const component = ( ); const tree = renderer.create(component).toJSON(); diff --git a/src/profile/__snapshots__/ProfilePage.test.jsx.snap b/src/profile/__snapshots__/ProfilePage.test.jsx.snap index e1ec13bb4..ee8995e65 100644 --- a/src/profile/__snapshots__/ProfilePage.test.jsx.snap +++ b/src/profile/__snapshots__/ProfilePage.test.jsx.snap @@ -107,7 +107,7 @@ exports[` Renders correctly in various states test country edit w PluginPOC
Renders correctly in various states test country edit w data-hj-suppress={true} >

staff

@@ -194,7 +194,7 @@ exports[` Renders correctly in various states test country edit w data-hj-suppress={true} >

staff

@@ -1699,7 +1699,7 @@ exports[` Renders correctly in various states test country edit w Renders correctly in various states test preferreded la PluginPOC
Renders correctly in various states test preferreded la data-hj-suppress={true} >

staff

@@ -3760,7 +3760,7 @@ exports[` Renders correctly in various states test preferreded la data-hj-suppress={true} >

staff

@@ -5024,7 +5024,7 @@ exports[` Renders correctly in various states test preferreded la Renders correctly in various states while saving an edi PluginPOC
Renders correctly in various states while saving an edi data-hj-suppress={true} >

staff

@@ -8223,7 +8476,7 @@ exports[` Renders correctly in various states while saving an edi data-hj-suppress={true} >

staff

@@ -8919,7 +9172,7 @@ exports[` Renders correctly in various states while saving an edi { -