From c0786d4558f7320e8377be04a259eb2291e3a10c Mon Sep 17 00:00:00 2001 From: SKairinos Date: Tue, 17 Sep 2024 16:02:38 +0000 Subject: [PATCH 01/25] initial --- src/app/schemas.ts | 28 ++-- .../teacherDashboard/classes/Classes.tsx | 8 +- .../classes/class/ResetStudentsPassword.tsx | 9 +- .../classes/class/UpdateStudentUser.tsx | 148 ++++++++++++++++++ src/routes/paths.ts | 2 +- src/routes/teacher.tsx | 4 + 6 files changed, 183 insertions(+), 16 deletions(-) create mode 100644 src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx diff --git a/src/app/schemas.ts b/src/app/schemas.ts index 6a28ee7..55c1213 100644 --- a/src/app/schemas.ts +++ b/src/app/schemas.ts @@ -1,16 +1,18 @@ -import { type Schema, type StringSchema, string as YupString } from "yup" +import * as yup from "yup" import CryptoJS from "crypto-js" -type Options = Partial<{ schema: S } & Extras> +type Options = Partial< + { schema: S } & Extras +> -export function classIdSchema(options?: Options) { - const { schema = YupString() } = options || {} +export function classIdSchema(options?: Options) { + const { schema = yup.string() } = options || {} return schema.matches(/^[A-Z0-9]{5}$/, "invalid class code") } -export function teacherPasswordSchema(options?: Options) { - const { schema = YupString() } = options || {} +export function teacherPasswordSchema(options?: Options) { + const { schema = yup.string() } = options || {} return schema .min(10, "password must be at least 10 characters long") @@ -23,14 +25,14 @@ export function teacherPasswordSchema(options?: Options) { ) } -export function studentPasswordSchema(options?: Options) { - const { schema = YupString() } = options || {} +export function studentPasswordSchema(options?: Options) { + const { schema = yup.string() } = options || {} return schema.min(6, "password must be at least 6 characters long") } -export function indyPasswordSchema(options?: Options) { - const { schema = YupString() } = options || {} +export function indyPasswordSchema(options?: Options) { + const { schema = yup.string() } = options || {} return schema .min(8, "password must be at least 8 characters long") @@ -40,9 +42,9 @@ export function indyPasswordSchema(options?: Options) { } export function pwnedPasswordSchema( - options?: Options void }>, + options?: Options void }>, ) { - const { schema = YupString().required(), onError } = options || {} + const { schema = yup.string().required(), onError } = options || {} return schema.test({ message: "password is too common", @@ -78,3 +80,5 @@ export function pwnedPasswordSchema( }, }) } + +export const userIdSchema = yup.number() diff --git a/src/pages/teacherDashboard/classes/Classes.tsx b/src/pages/teacherDashboard/classes/Classes.tsx index d98e9c8..73fae1f 100644 --- a/src/pages/teacherDashboard/classes/Classes.tsx +++ b/src/pages/teacherDashboard/classes/Classes.tsx @@ -9,10 +9,15 @@ import JoinClassRequest from "./JoinClassRequest" import JoinClassRequestTable from "./JoinClassRequestTable" import ResetStudentsPassword from "./class/ResetStudentsPassword" import { type RetrieveUserResult } from "../../../api/user" +import UpdateStudentUser from "./class/UpdateStudentUser" export interface ClassesProps { authUser: SchoolTeacherUser - view?: "class" | "join-class-request" | "reset-students-password" + view?: + | "class" + | "join-class-request" + | "reset-students-password" + | "update-student-user" } const Classes: FC = ({ authUser, view }) => { @@ -21,6 +26,7 @@ const Classes: FC = ({ authUser, view }) => { class: , "join-class-request": , "reset-students-password": , + "update-student-user": , }[view] } diff --git a/src/pages/teacherDashboard/classes/class/ResetStudentsPassword.tsx b/src/pages/teacherDashboard/classes/class/ResetStudentsPassword.tsx index c051b35..87ce715 100644 --- a/src/pages/teacherDashboard/classes/class/ResetStudentsPassword.tsx +++ b/src/pages/teacherDashboard/classes/class/ResetStudentsPassword.tsx @@ -4,14 +4,19 @@ import { useLocation, useNavigate } from "codeforlife/hooks" import { type StudentUser } from "codeforlife/api" import { generatePath } from "react-router" -import { type ListUsersResult } from "../../../../api/user" +import { + type ListUsersResult, + type RetrieveUserResult, +} from "../../../../api/user" import { type ResetStudentsPasswordResult } from "../../../../api/student" // import { StudentCredentialsTable } from "../../../components" import { paths } from "../../../../routes" import { useClassIdParam } from "../../../../app/hooks" export interface ResetStudentsPasswordState { - studentUsers: Array> + studentUsers: Array< + StudentUser + > resetStudentsPasswordResult: ResetStudentsPasswordResult } diff --git a/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx b/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx new file mode 100644 index 0000000..270677d --- /dev/null +++ b/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx @@ -0,0 +1,148 @@ +import * as forms from "codeforlife/components/form" +import * as pages from "codeforlife/components/page" +import { type Class, type User } from "codeforlife/api" +import { Navigate, generatePath } from "react-router-dom" +import { useNavigate, useParams } from "codeforlife/hooks" +import { type FC } from "react" +import { Link } from "codeforlife/components/router" +import { type StudentUser } from "codeforlife/api" +import { Typography } from "@mui/material" +import { handleResultState } from "codeforlife/utils/api" +import { submitForm } from "codeforlife/utils/form" + +import { + type RetrieveUserResult, + useRetrieveUserQuery, + useUpdateUserMutation, +} from "../../../../api/user" +import { classIdSchema, userIdSchema } from "../../../../app/schemas" +import { NewPasswordField } from "../../../../components/form" +import { type ResetStudentsPasswordState } from "./ResetStudentsPassword" +import { paths } from "../../../../routes" +import { useResetStudentsPasswordMutation } from "../../../../api/student" +import { useRetrieveClassQuery } from "../../../../api/klass" + +const UpdateStudentUserFormsSection: FC<{ + classId: Class["id"] + studentUserId: User["id"] +}> = ({ classId, studentUserId }) => { + const retrieveClassResult = useRetrieveClassQuery(classId) + const retrieveUserResult = useRetrieveUserQuery(studentUserId) + const [resetStudentsPassword] = useResetStudentsPasswordMutation() + const [updateUser] = useUpdateUserMutation() + const navigate = useNavigate() + + const classPath = generatePath(paths.teacher.dashboard.tab.classes.class._, { + classId, + }) + + return handleResultState(retrieveClassResult, klass => + handleResultState(retrieveUserResult, user => ( + <> + + + Edit student details for {user.first_name} + from class {klass.name} ({klass.id}) + + + Class + + + Edit this student's name and manage their password and direct + access link. + + + + + Update name + + + Remember this is the name they use to log in with, so you should + tell them what you've changed it to. + + { + navigate(classPath, { + state: { + notifications: [ + { + index: 1, + props: { + children: "Student's details successfully updated.", + }, + }, + ], + }, + }) + }, + })} + > + + Update + + + + {/* TODO: create global fix for margin bottom */} + + Update password + + + You can set this student's password. Setting the password will + also regenerate their direct access link. Enter and confirm the + password in the boxes below. Try to prevent others from being able + to guess the new password when making this decision. + + { + navigate( + generatePath( + paths.teacher.dashboard.tab.classes.class.students + .resetPassword._, + { classId }, + ), + { + state: { + studentUsers: [user as StudentUser], + resetStudentsPasswordResult, + }, + }, + ) + }, + })} + > + + Update + + + + )), + ) +} + +export interface UpdateStudentUserProps {} + +const UpdateStudentUser: FC = () => { + const params = useParams({ + classId: classIdSchema().required(), + studentUserId: userIdSchema.required(), + }) + + return params ? ( + + ) : ( + + ) +} + +export default UpdateStudentUser diff --git a/src/routes/paths.ts b/src/routes/paths.ts index 2cfe167..88b2955 100644 --- a/src/routes/paths.ts +++ b/src/routes/paths.ts @@ -33,8 +33,8 @@ const paths = _("", { joinRequest: _("/join-request/:userId"), additional: _("/additional"), students: _("/students", { + studentUser: _("/:studentUserId"), resetPassword: _("/reset-password"), - edit: _("/edit"), move: _("/move"), release: _("/release"), }), diff --git a/src/routes/teacher.tsx b/src/routes/teacher.tsx index b5884a6..afcc860 100644 --- a/src/routes/teacher.tsx +++ b/src/routes/teacher.tsx @@ -29,6 +29,10 @@ const teacher = ( } /> + } + /> } From 272e200cdb471256534f4b478e1049aaa0f6cb1d Mon Sep 17 00:00:00 2001 From: SKairinos Date: Wed, 18 Sep 2024 11:02:01 +0000 Subject: [PATCH 02/25] fixes after testing --- package.json | 2 +- .../classes/class/UpdateStudentUser.tsx | 29 +- yarn.lock | 478 +++++++++--------- 3 files changed, 257 insertions(+), 252 deletions(-) diff --git a/package.json b/package.json index edadb36..5b94fcf 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "✅ Do add `devDependencies` below that are `peerDependencies` in the CFL package." ], "dependencies": { - "codeforlife": "github:ocadotechnology/codeforlife-package-javascript#v2.3.2", + "codeforlife": "github:ocadotechnology/codeforlife-package-javascript#portal-frontend-51", "crypto-js": "^4.2.0" }, "devDependencies": { diff --git a/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx b/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx index 270677d..4548d20 100644 --- a/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx +++ b/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx @@ -41,8 +41,8 @@ const UpdateStudentUserFormsSection: FC<{ <> - Edit student details for {user.first_name} - from class {klass.name} ({klass.id}) + Edit student details for {user.first_name} from class {klass.name} ( + {klass.id}) Class @@ -53,9 +53,7 @@ const UpdateStudentUserFormsSection: FC<{ - - Update name - + Update name Remember this is the name they use to log in with, so you should tell them what you've changed it to. @@ -79,15 +77,17 @@ const UpdateStudentUserFormsSection: FC<{ }, })} > - + Update - {/* TODO: create global fix for margin bottom */} - - Update password - + Update password You can set this student's password. Setting the password will also regenerate their direct access link. Enter and confirm the @@ -101,6 +101,7 @@ const UpdateStudentUserFormsSection: FC<{ }, }} onSubmit={submitForm(resetStudentsPassword, { + exclude: [`${user.student!.id}.user.password_repeat`], then: resetStudentsPasswordResult => { navigate( generatePath( @@ -121,6 +122,12 @@ const UpdateStudentUserFormsSection: FC<{ Update @@ -141,7 +148,7 @@ const UpdateStudentUser: FC = () => { return params ? ( ) : ( - + ) } diff --git a/yarn.lock b/yarn.lock index 26616f6..6724cec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1371,9 +1371,9 @@ eslint-visitor-keys "^3.3.0" "@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" - integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== + version "4.11.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.1.tgz#a547badfc719eb3e5f4b556325e542fbe9d7a18f" + integrity sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q== "@eslint/eslintrc@^2.1.4": version "2.1.4" @@ -1390,22 +1390,22 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.57.0": - version "8.57.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" - integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== +"@eslint/js@8.57.1": + version "8.57.1" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2" + integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== "@eslint/js@^9.9.0": version "9.10.0" resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.10.0.tgz#eaa3cb0baec497970bb29e43a153d0d5650143c6" integrity sha512-fuXtbiP5GWIn8Fz+LWoOMVf/Jxm+aajZYkhi6CuEm4SxymFM+eUWzbO9qXT+L0iCkL5+KGYMCSGxo686H19S1g== -"@humanwhocodes/config-array@^0.11.14": - version "0.11.14" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" - integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== +"@humanwhocodes/config-array@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" + integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== dependencies: - "@humanwhocodes/object-schema" "^2.0.2" + "@humanwhocodes/object-schema" "^2.0.3" debug "^4.3.1" minimatch "^3.0.5" @@ -1414,7 +1414,7 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^2.0.2": +"@humanwhocodes/object-schema@^2.0.3": version "2.0.3" resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== @@ -1563,22 +1563,22 @@ react-is "^18.3.1" "@mui/x-date-pickers@^7.7.1": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@mui/x-date-pickers/-/x-date-pickers-7.16.0.tgz#feabb56bc31d187ab6a906bf5162d23ba013e816" - integrity sha512-NjFAoI6NiJ/65LJf5A38Y+aA/zSIow+7i52QBcgryrdBlIu46nssqzohPRWNUFwnxNXhWstfcV3YAb2avCIY5A== + version "7.17.0" + resolved "https://registry.yarnpkg.com/@mui/x-date-pickers/-/x-date-pickers-7.17.0.tgz#a0ccdd0ca0bfede65d05900e149cfc141551c1fe" + integrity sha512-3mIw1uOZU/yKweZsVAo9QnwVFzLHqXgXG1TbGbDJ4AU6FhN2TCUlR9tzKHSlYdAHZ0bEWDS1/bgeGsQC7skXMA== dependencies: "@babel/runtime" "^7.25.6" "@mui/utils" "^5.16.6" - "@mui/x-internals" "7.16.0" + "@mui/x-internals" "7.17.0" "@types/react-transition-group" "^4.4.11" clsx "^2.1.1" prop-types "^15.8.1" react-transition-group "^4.4.5" -"@mui/x-internals@7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@mui/x-internals/-/x-internals-7.16.0.tgz#a019df121d2ab08516346dd7db74bb1d797b258c" - integrity sha512-ijer5XYmWlJqWaTmF6TGH1odG7EAupv8iDWYmDm2yVR9IQ+L2nQSuhiFClI+wmGx40KS2VKOlzDMPpF0t7/HCg== +"@mui/x-internals@7.17.0": + version "7.17.0" + resolved "https://registry.yarnpkg.com/@mui/x-internals/-/x-internals-7.17.0.tgz#c5731b8deb07107fbc406e62277aaa5c3f0db0a7" + integrity sha512-FLlAGSJl/vsuaA/8hPGazXFppyzIzxApJJDZMoTS0geUmHd0hyooISV2ltllLmrZ/DGtHhI08m8GGnHL6/vVeg== dependencies: "@babel/runtime" "^7.25.6" "@mui/utils" "^5.16.6" @@ -1617,9 +1617,9 @@ integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== "@polka/url@^1.0.0-next.24": - version "1.0.0-next.25" - resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.25.tgz#f077fdc0b5d0078d30893396ff4827a13f99e817" - integrity sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ== + version "1.0.0-next.27" + resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.27.tgz#527e8df13dea13ab68d347d20ba9432cadb867a8" + integrity sha512-MU0SYgcrBdSVLu7Tfow3VY4z1odzlaTYRjt3WQ0z8XbjDWReuy+EALt2HdjhrwD2HPiW2GY+KTSw4HLv4C/EOA== "@popperjs/core@^2.11.8": version "2.11.8" @@ -1641,85 +1641,85 @@ resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.19.2.tgz#0c896535473291cb41f152c180bedd5680a3b273" integrity sha512-baiMx18+IMuD1yyvOGaHM9QrVUPGGG0jC+z+IPHnRJWUAUvaKuWKyE8gjDj2rzv3sz9zOGoRSPgeBVHRhZnBlA== -"@rollup/rollup-android-arm-eabi@4.21.2": - version "4.21.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.2.tgz#0412834dc423d1ff7be4cb1fc13a86a0cd262c11" - integrity sha512-fSuPrt0ZO8uXeS+xP3b+yYTCBUd05MoSp2N/MFOgjhhUhMmchXlpTQrTpI8T+YAwAQuK7MafsCOxW7VrPMrJcg== - -"@rollup/rollup-android-arm64@4.21.2": - version "4.21.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.2.tgz#baf1a014b13654f3b9e835388df9caf8c35389cb" - integrity sha512-xGU5ZQmPlsjQS6tzTTGwMsnKUtu0WVbl0hYpTPauvbRAnmIvpInhJtgjj3mcuJpEiuUw4v1s4BimkdfDWlh7gA== - -"@rollup/rollup-darwin-arm64@4.21.2": - version "4.21.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.2.tgz#0a2c364e775acdf1172fe3327662eec7c46e55b1" - integrity sha512-99AhQ3/ZMxU7jw34Sq8brzXqWH/bMnf7ZVhvLk9QU2cOepbQSVTns6qoErJmSiAvU3InRqC2RRZ5ovh1KN0d0Q== - -"@rollup/rollup-darwin-x64@4.21.2": - version "4.21.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.2.tgz#a972db75890dfab8df0da228c28993220a468c42" - integrity sha512-ZbRaUvw2iN/y37x6dY50D8m2BnDbBjlnMPotDi/qITMJ4sIxNY33HArjikDyakhSv0+ybdUxhWxE6kTI4oX26w== - -"@rollup/rollup-linux-arm-gnueabihf@4.21.2": - version "4.21.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.2.tgz#1609d0630ef61109dd19a278353e5176d92e30a1" - integrity sha512-ztRJJMiE8nnU1YFcdbd9BcH6bGWG1z+jP+IPW2oDUAPxPjo9dverIOyXz76m6IPA6udEL12reYeLojzW2cYL7w== - -"@rollup/rollup-linux-arm-musleabihf@4.21.2": - version "4.21.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.2.tgz#3c1dca5f160aa2e79e4b20ff6395eab21804f266" - integrity sha512-flOcGHDZajGKYpLV0JNc0VFH361M7rnV1ee+NTeC/BQQ1/0pllYcFmxpagltANYt8FYf9+kL6RSk80Ziwyhr7w== - -"@rollup/rollup-linux-arm64-gnu@4.21.2": - version "4.21.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.2.tgz#c2fe376e8b04eafb52a286668a8df7c761470ac7" - integrity sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw== - -"@rollup/rollup-linux-arm64-musl@4.21.2": - version "4.21.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.2.tgz#e62a4235f01e0f66dbba587c087ca6db8008ec80" - integrity sha512-48pD/fJkTiHAZTnZwR0VzHrao70/4MlzJrq0ZsILjLW/Ab/1XlVUStYyGt7tdyIiVSlGZbnliqmult/QGA2O2w== - -"@rollup/rollup-linux-powerpc64le-gnu@4.21.2": - version "4.21.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.2.tgz#24b3457e75ee9ae5b1c198bd39eea53222a74e54" - integrity sha512-cZdyuInj0ofc7mAQpKcPR2a2iu4YM4FQfuUzCVA2u4HI95lCwzjoPtdWjdpDKyHxI0UO82bLDoOaLfpZ/wviyQ== - -"@rollup/rollup-linux-riscv64-gnu@4.21.2": - version "4.21.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.2.tgz#38edfba9620fe2ca8116c97e02bd9f2d606bde09" - integrity sha512-RL56JMT6NwQ0lXIQmMIWr1SW28z4E4pOhRRNqwWZeXpRlykRIlEpSWdsgNWJbYBEWD84eocjSGDu/XxbYeCmwg== - -"@rollup/rollup-linux-s390x-gnu@4.21.2": - version "4.21.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.2.tgz#a3bfb8bc5f1e802f8c76cff4a4be2e9f9ac36a18" - integrity sha512-PMxkrWS9z38bCr3rWvDFVGD6sFeZJw4iQlhrup7ReGmfn7Oukrr/zweLhYX6v2/8J6Cep9IEA/SmjXjCmSbrMQ== - -"@rollup/rollup-linux-x64-gnu@4.21.2": - version "4.21.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.2.tgz#0dadf34be9199fcdda44b5985a086326344f30ad" - integrity sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw== - -"@rollup/rollup-linux-x64-musl@4.21.2": - version "4.21.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.2.tgz#7b7deddce240400eb87f2406a445061b4fed99a8" - integrity sha512-7twFizNXudESmC9oneLGIUmoHiiLppz/Xs5uJQ4ShvE6234K0VB1/aJYU3f/4g7PhssLGKBVCC37uRkkOi8wjg== - -"@rollup/rollup-win32-arm64-msvc@4.21.2": - version "4.21.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.2.tgz#a0ca0c5149c2cfb26fab32e6ba3f16996fbdb504" - integrity sha512-9rRero0E7qTeYf6+rFh3AErTNU1VCQg2mn7CQcI44vNUWM9Ze7MSRS/9RFuSsox+vstRt97+x3sOhEey024FRQ== - -"@rollup/rollup-win32-ia32-msvc@4.21.2": - version "4.21.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.2.tgz#aae2886beec3024203dbb5569db3a137bc385f8e" - integrity sha512-5rA4vjlqgrpbFVVHX3qkrCo/fZTj1q0Xxpg+Z7yIo3J2AilW7t2+n6Q8Jrx+4MrYpAnjttTYF8rr7bP46BPzRw== - -"@rollup/rollup-win32-x64-msvc@4.21.2": - version "4.21.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.2.tgz#e4291e3c1bc637083f87936c333cdbcad22af63b" - integrity sha512-6UUxd0+SKomjdzuAcp+HAmxw1FlGBnl1v2yEPSabtx4lBfdXHDVsW7+lQkgz9cNFJGY3AWR7+V8P5BqkD9L9nA== +"@rollup/rollup-android-arm-eabi@4.21.3": + version "4.21.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.3.tgz#155c7d82c1b36c3ad84d9adf9b3cd520cba81a0f" + integrity sha512-MmKSfaB9GX+zXl6E8z4koOr/xU63AMVleLEa64v7R0QF/ZloMs5vcD1sHgM64GXXS1csaJutG+ddtzcueI/BLg== + +"@rollup/rollup-android-arm64@4.21.3": + version "4.21.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.3.tgz#b94b6fa002bd94a9cbd8f9e47e23b25e5bd113ba" + integrity sha512-zrt8ecH07PE3sB4jPOggweBjJMzI1JG5xI2DIsUbkA+7K+Gkjys6eV7i9pOenNSDJH3eOr/jLb/PzqtmdwDq5g== + +"@rollup/rollup-darwin-arm64@4.21.3": + version "4.21.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.3.tgz#0934126cf9cbeadfe0eb7471ab5d1517e8cd8dcc" + integrity sha512-P0UxIOrKNBFTQaXTxOH4RxuEBVCgEA5UTNV6Yz7z9QHnUJ7eLX9reOd/NYMO3+XZO2cco19mXTxDMXxit4R/eQ== + +"@rollup/rollup-darwin-x64@4.21.3": + version "4.21.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.3.tgz#0ce8e1e0f349778938c7c90e4bdc730640e0a13e" + integrity sha512-L1M0vKGO5ASKntqtsFEjTq/fD91vAqnzeaF6sfNAy55aD+Hi2pBI5DKwCO+UNDQHWsDViJLqshxOahXyLSh3EA== + +"@rollup/rollup-linux-arm-gnueabihf@4.21.3": + version "4.21.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.3.tgz#5669d34775ad5d71e4f29ade99d0ff4df523afb6" + integrity sha512-btVgIsCjuYFKUjopPoWiDqmoUXQDiW2A4C3Mtmp5vACm7/GnyuprqIDPNczeyR5W8rTXEbkmrJux7cJmD99D2g== + +"@rollup/rollup-linux-arm-musleabihf@4.21.3": + version "4.21.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.3.tgz#f6d1a0e1da4061370cb2f4244fbdd727c806dd88" + integrity sha512-zmjbSphplZlau6ZTkxd3+NMtE4UKVy7U4aVFMmHcgO5CUbw17ZP6QCgyxhzGaU/wFFdTfiojjbLG3/0p9HhAqA== + +"@rollup/rollup-linux-arm64-gnu@4.21.3": + version "4.21.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.3.tgz#ed96a05e99743dee4d23cc4913fc6e01a0089c88" + integrity sha512-nSZfcZtAnQPRZmUkUQwZq2OjQciR6tEoJaZVFvLHsj0MF6QhNMg0fQ6mUOsiCUpTqxTx0/O6gX0V/nYc7LrgPw== + +"@rollup/rollup-linux-arm64-musl@4.21.3": + version "4.21.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.3.tgz#057ea26eaa7e537a06ded617d23d57eab3cecb58" + integrity sha512-MnvSPGO8KJXIMGlQDYfvYS3IosFN2rKsvxRpPO2l2cum+Z3exiExLwVU+GExL96pn8IP+GdH8Tz70EpBhO0sIQ== + +"@rollup/rollup-linux-powerpc64le-gnu@4.21.3": + version "4.21.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.3.tgz#6e6e1f9404c9bf3fbd7d51cd11cd288a9a2843aa" + integrity sha512-+W+p/9QNDr2vE2AXU0qIy0qQE75E8RTwTwgqS2G5CRQ11vzq0tbnfBd6brWhS9bCRjAjepJe2fvvkvS3dno+iw== + +"@rollup/rollup-linux-riscv64-gnu@4.21.3": + version "4.21.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.3.tgz#eef1536a53f6e6658a2a778130e6b1a4a41cb439" + integrity sha512-yXH6K6KfqGXaxHrtr+Uoy+JpNlUlI46BKVyonGiaD74ravdnF9BUNC+vV+SIuB96hUMGShhKV693rF9QDfO6nQ== + +"@rollup/rollup-linux-s390x-gnu@4.21.3": + version "4.21.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.3.tgz#2b28fb89ca084efaf8086f435025d96b4a966957" + integrity sha512-R8cwY9wcnApN/KDYWTH4gV/ypvy9yZUHlbJvfaiXSB48JO3KpwSpjOGqO4jnGkLDSk1hgjYkTbTt6Q7uvPf8eg== + +"@rollup/rollup-linux-x64-gnu@4.21.3": + version "4.21.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.3.tgz#5226cde6c6b495b04a3392c1d2c572844e42f06b" + integrity sha512-kZPbX/NOPh0vhS5sI+dR8L1bU2cSO9FgxwM8r7wHzGydzfSjLRCFAT87GR5U9scj2rhzN3JPYVC7NoBbl4FZ0g== + +"@rollup/rollup-linux-x64-musl@4.21.3": + version "4.21.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.3.tgz#2c2412982e6c2a00a2ecac6d548ebb02f0aa6ca4" + integrity sha512-S0Yq+xA1VEH66uiMNhijsWAafffydd2X5b77eLHfRmfLsRSpbiAWiRHV6DEpz6aOToPsgid7TI9rGd6zB1rhbg== + +"@rollup/rollup-win32-arm64-msvc@4.21.3": + version "4.21.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.3.tgz#fbb6ef5379199e2ec0103ef32877b0985c773a55" + integrity sha512-9isNzeL34yquCPyerog+IMCNxKR8XYmGd0tHSV+OVx0TmE0aJOo9uw4fZfUuk2qxobP5sug6vNdZR6u7Mw7Q+Q== + +"@rollup/rollup-win32-ia32-msvc@4.21.3": + version "4.21.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.3.tgz#d50e2082e147e24d87fe34abbf6246525ec3845a" + integrity sha512-nMIdKnfZfzn1Vsk+RuOvl43ONTZXoAPUUxgcU0tXooqg4YrAqzfKzVenqqk2g5efWh46/D28cKFrOzDSW28gTA== + +"@rollup/rollup-win32-x64-msvc@4.21.3": + version "4.21.3" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.3.tgz#4115233aa1bd5a2060214f96d8511f6247093212" + integrity sha512-fOvu7PCQjAj4eWDEuD8Xz5gpzFqXzGlxHZozHP4b9Jxv9APtdxL6STqztDzMLuRXEc4UpXGGhx029Xgm91QBeA== "@rtsao/scc@^1.1.0": version "1.1.0" @@ -1820,11 +1820,16 @@ resolved "https://registry.yarnpkg.com/@types/crypto-js/-/crypto-js-4.2.2.tgz#771c4a768d94eb5922cc202a3009558204df0cea" integrity sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ== -"@types/estree@1.0.5", "@types/estree@^1.0.0": +"@types/estree@1.0.5": version "1.0.5" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== +"@types/estree@^1.0.0": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" + integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== + "@types/hoist-non-react-statics@^3.3.1": version "3.3.5" resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz#dab7867ef789d87e2b4b0003c9d65c49cc44a494" @@ -1853,9 +1858,9 @@ "@types/istanbul-lib-report" "*" "@types/jest@^29.5.12": - version "29.5.12" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.12.tgz#7f7dc6eb4cf246d2474ed78744b05d06ce025544" - integrity sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw== + version "29.5.13" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.13.tgz#8bc571659f401e6a719a7bf0dbcb8b78c71a8adc" + integrity sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg== dependencies: expect "^29.0.0" pretty-format "^29.0.0" @@ -1876,9 +1881,9 @@ integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== "@types/node@*": - version "22.5.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.4.tgz#83f7d1f65bc2ed223bdbf57c7884f1d5a4fa84e8" - integrity sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg== + version "22.5.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.5.tgz#52f939dd0f65fc552a4ad0b392f3c466cc5d7a44" + integrity sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA== dependencies: undici-types "~6.19.2" @@ -1895,14 +1900,14 @@ integrity sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw== "@types/prop-types@*", "@types/prop-types@^15.7.12": - version "15.7.12" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.12.tgz#12bb1e2be27293c1406acb6af1c3f3a1481d98c6" - integrity sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q== + version "15.7.13" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.13.tgz#2af91918ee12d9d32914feb13f5326658461b451" + integrity sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA== "@types/qs@^6.9.7": - version "6.9.15" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.15.tgz#adde8a060ec9c305a82de1babc1056e73bd64dce" - integrity sha512-uXHQKES6DQKKCLh441Xv/dwxOq1TVS3JPUMlEqoEglvlhR6Mxnlew/Xq/LRVHpLyk7iK3zODe1qYHIMltO7XGg== + version "6.9.16" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.16.tgz#52bba125a07c0482d26747d5d4947a64daf8f794" + integrity sha512-7i+zxXdPD0T4cKDuxCUXJ4wHcsJLwENa6Z3dCu8cfCK743OGy5Nu1RmAGqDPsoTDINVEcdXKRvR/zre+P2Ku1A== "@types/react-dom@^18.0.0", "@types/react-dom@^18.2.18": version "18.3.0" @@ -1919,9 +1924,9 @@ "@types/react" "*" "@types/react@*", "@types/react@^18.2.47": - version "18.3.5" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.5.tgz#5f524c2ad2089c0ff372bbdabc77ca2c4dbadf8f" - integrity sha512-WeqMfGJLGuLCqHGYRGHxnKrXcTitc6L/nBUWfWPcTarG3t9PsquqUMuVeXZeca+mglY4Vo5GZjCi0A3Or2lnxA== + version "18.3.7" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.7.tgz#6decbfbb01f8d82d56ff5403394121940faa6569" + integrity sha512-KUnDCJF5+AiZd8owLIeVHqmW9yM4sqmDVf2JRJiBMFkGvkoZ4/WyV2lL4zVsoinmRS/W3FeEdZLEWFRofnT2FQ== dependencies: "@types/prop-types" "*" csstype "^3.0.2" @@ -1953,16 +1958,16 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@8.5.0": - version "8.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.5.0.tgz#7c1863693a98371703686e1c0fac64ffc576cdb1" - integrity sha512-lHS5hvz33iUFQKuPFGheAB84LwcJ60G8vKnEhnfcK1l8kGVLro2SFYW6K0/tj8FUhRJ0VHyg1oAfg50QGbPPHw== +"@typescript-eslint/eslint-plugin@8.6.0": + version "8.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.6.0.tgz#20049754ff9f6d3a09bf240297f029ce04290999" + integrity sha512-UOaz/wFowmoh2G6Mr9gw60B1mm0MzUtm6Ic8G2yM1Le6gyj5Loi/N+O5mocugRGY+8OeeKmkMmbxNqUCq3B4Sg== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "8.5.0" - "@typescript-eslint/type-utils" "8.5.0" - "@typescript-eslint/utils" "8.5.0" - "@typescript-eslint/visitor-keys" "8.5.0" + "@typescript-eslint/scope-manager" "8.6.0" + "@typescript-eslint/type-utils" "8.6.0" + "@typescript-eslint/utils" "8.6.0" + "@typescript-eslint/visitor-keys" "8.6.0" graphemer "^1.4.0" ignore "^5.3.1" natural-compare "^1.4.0" @@ -1991,15 +1996,15 @@ dependencies: "@typescript-eslint/utils" "5.62.0" -"@typescript-eslint/parser@8.5.0": - version "8.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.5.0.tgz#d590e1ef9f31f26d423999ad3f687723247e6bcc" - integrity sha512-gF77eNv0Xz2UJg/NbpWJ0kqAm35UMsvZf1GHj8D9MRFTj/V3tAciIWXfmPLsAAF/vUlpWPvUDyH1jjsr0cMVWw== +"@typescript-eslint/parser@8.6.0": + version "8.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.6.0.tgz#02e092b9dc8b4e319172af620d0d39b337d948f6" + integrity sha512-eQcbCuA2Vmw45iGfcyG4y6rS7BhWfz9MQuk409WD47qMM+bKCGQWXxvoOs1DUp+T7UBMTtRTVT+kXr7Sh4O9Ow== dependencies: - "@typescript-eslint/scope-manager" "8.5.0" - "@typescript-eslint/types" "8.5.0" - "@typescript-eslint/typescript-estree" "8.5.0" - "@typescript-eslint/visitor-keys" "8.5.0" + "@typescript-eslint/scope-manager" "8.6.0" + "@typescript-eslint/types" "8.6.0" + "@typescript-eslint/typescript-estree" "8.6.0" + "@typescript-eslint/visitor-keys" "8.6.0" debug "^4.3.4" "@typescript-eslint/parser@^5.5.0": @@ -2020,13 +2025,13 @@ "@typescript-eslint/types" "5.62.0" "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/scope-manager@8.5.0": - version "8.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.5.0.tgz#385341de65b976f02b295b8aca54bb4ffd6b5f07" - integrity sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg== +"@typescript-eslint/scope-manager@8.6.0": + version "8.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.6.0.tgz#28cc2fc26a84b75addf45091a2c6283e29e2c982" + integrity sha512-ZuoutoS5y9UOxKvpc/GkvF4cuEmpokda4wRg64JEia27wX+PysIE9q+lzDtlHHgblwUWwo5/Qn+/WyTUvDwBHw== dependencies: - "@typescript-eslint/types" "8.5.0" - "@typescript-eslint/visitor-keys" "8.5.0" + "@typescript-eslint/types" "8.6.0" + "@typescript-eslint/visitor-keys" "8.6.0" "@typescript-eslint/type-utils@5.62.0": version "5.62.0" @@ -2038,13 +2043,13 @@ debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/type-utils@8.5.0": - version "8.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.5.0.tgz#6215b23aa39dbbd8dde0a4ef9ee0f745410c29b1" - integrity sha512-N1K8Ix+lUM+cIDhL2uekVn/ZD7TZW+9/rwz8DclQpcQ9rk4sIL5CAlBC0CugWKREmDjBzI/kQqU4wkg46jWLYA== +"@typescript-eslint/type-utils@8.6.0": + version "8.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.6.0.tgz#d4347e637478bef88cee1db691fcfa20ade9b8a0" + integrity sha512-dtePl4gsuenXVwC7dVNlb4mGDcKjDT/Ropsk4za/ouMBPplCLyznIaR+W65mvCvsyS97dymoBRrioEXI7k0XIg== dependencies: - "@typescript-eslint/typescript-estree" "8.5.0" - "@typescript-eslint/utils" "8.5.0" + "@typescript-eslint/typescript-estree" "8.6.0" + "@typescript-eslint/utils" "8.6.0" debug "^4.3.4" ts-api-utils "^1.3.0" @@ -2053,10 +2058,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/types@8.5.0": - version "8.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.5.0.tgz#4465d99331d1276f8fb2030e4f9c73fe01a05bf9" - integrity sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw== +"@typescript-eslint/types@8.6.0": + version "8.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.6.0.tgz#cdc3a16f83f2f0663d6723e9fd032331cdd9f51c" + integrity sha512-rojqFZGd4MQxw33SrOy09qIDS8WEldM8JWtKQLAjf/X5mGSeEFh5ixQlxssMNyPslVIk9yzWqXCsV2eFhYrYUw== "@typescript-eslint/typescript-estree@5.62.0": version "5.62.0" @@ -2071,13 +2076,13 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@8.5.0": - version "8.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.5.0.tgz#6e5758cf2f63aa86e9ddfa4e284e2e0b81b87557" - integrity sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q== +"@typescript-eslint/typescript-estree@8.6.0": + version "8.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.6.0.tgz#f945506de42871f04868371cb5bf21e8f7266e01" + integrity sha512-MOVAzsKJIPIlLK239l5s06YXjNqpKTVhBVDnqUumQJja5+Y94V3+4VUFRA0G60y2jNnTVwRCkhyGQpavfsbq/g== dependencies: - "@typescript-eslint/types" "8.5.0" - "@typescript-eslint/visitor-keys" "8.5.0" + "@typescript-eslint/types" "8.6.0" + "@typescript-eslint/visitor-keys" "8.6.0" debug "^4.3.4" fast-glob "^3.3.2" is-glob "^4.0.3" @@ -2099,15 +2104,15 @@ eslint-scope "^5.1.1" semver "^7.3.7" -"@typescript-eslint/utils@8.5.0": - version "8.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.5.0.tgz#4d4ffed96d0654546a37faa5b84bdce16d951634" - integrity sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw== +"@typescript-eslint/utils@8.6.0": + version "8.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.6.0.tgz#175fe893f32804bed1e72b3364ea6bbe1044181c" + integrity sha512-eNp9cWnYf36NaOVjkEUznf6fEgVy1TWpE0o52e4wtojjBx7D1UV2WAWGzR+8Y5lVFtpMLPwNbC67T83DWSph4A== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@typescript-eslint/scope-manager" "8.5.0" - "@typescript-eslint/types" "8.5.0" - "@typescript-eslint/typescript-estree" "8.5.0" + "@typescript-eslint/scope-manager" "8.6.0" + "@typescript-eslint/types" "8.6.0" + "@typescript-eslint/typescript-estree" "8.6.0" "@typescript-eslint/visitor-keys@5.62.0": version "5.62.0" @@ -2117,12 +2122,12 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@8.5.0": - version "8.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.5.0.tgz#13028df3b866d2e3e2e2cc4193cf2c1e0e04c4bf" - integrity sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw== +"@typescript-eslint/visitor-keys@8.6.0": + version "8.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.6.0.tgz#5432af4a1753f376f35ab5b891fc9db237aaf76f" + integrity sha512-wapVFfZg9H0qOYh4grNVQiMklJGluQrOUiOhYRrQWhx7BY/+I1IYb8BczWNbbUpO+pqy0rDciv3lQH5E1bCLrg== dependencies: - "@typescript-eslint/types" "8.5.0" + "@typescript-eslint/types" "8.6.0" eslint-visitor-keys "^3.4.3" "@ungap/structured-clone@^1.2.0": @@ -2334,11 +2339,9 @@ aria-query@5.1.3, aria-query@~5.1.3: deep-equal "^2.0.5" aria-query@^5.0.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.0.tgz#650c569e41ad90b51b3d7df5e5eed1c7549c103e" - integrity sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A== - dependencies: - dequal "^2.0.3" + version "5.3.1" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.1.tgz#ebcb2c0d7fc43e68e4cb22f774d1209cb627ab42" + integrity sha512-Z/ZeOgVl7bcSYZ/u/rh0fOpvEpq//LZmdbkXyc7syVzjPAhfOa9ebsdTSjEBDU4vs5nC98Kfduj1uFo0qyET3g== array-buffer-byte-length@^1.0.0, array-buffer-byte-length@^1.0.1: version "1.0.1" @@ -2706,9 +2709,9 @@ clsx@^2.1.0, clsx@^2.1.1: resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.1.1.tgz#eed397c9fd8bd882bfb18deab7102049a2f32999" integrity sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA== -"codeforlife@github:ocadotechnology/codeforlife-package-javascript#v2.3.2": - version "2.3.2" - resolved "https://codeload.github.com/ocadotechnology/codeforlife-package-javascript/tar.gz/eb6ee3271103e4fe80c9cb08a6ce5b496e34803e" +"codeforlife@github:ocadotechnology/codeforlife-package-javascript#portal-frontend-51": + version "2.3.3" + resolved "https://codeload.github.com/ocadotechnology/codeforlife-package-javascript/tar.gz/d74c8e97010e15032dce4ca63ec65b8e012e7e53" dependencies: "@emotion/react" "^11.10.6" "@emotion/styled" "^11.10.6" @@ -3005,11 +3008,6 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== -dequal@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be" - integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== - diff-sequences@^29.6.3: version "29.6.3" resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" @@ -3060,9 +3058,9 @@ eastasianwidth@^0.2.0: integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== electron-to-chromium@^1.5.4: - version "1.5.18" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.18.tgz#5fe62b9d21efbcfa26571066502d94f3ed97e495" - integrity sha512-1OfuVACu+zKlmjsNdcJuVQuVE61sZOLbNM4JAQ1Rvh6EOj0/EUKhMJjRH73InPlXSh8HIJk1cVZ8pyOV/FMdUQ== + version "1.5.25" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.25.tgz#492ade1cde401332b9b75aa0c55fd5e1550ca66c" + integrity sha512-kMb204zvK3PsSlgvvwzI3wBIcAw15tRkYk+NQdsjdDtcQWTp2RABbMQ9rUBy8KNEOM+/E6ep+XC3AykiWZld4g== emoji-regex@^8.0.0: version "8.0.0" @@ -3382,14 +3380,14 @@ eslint-plugin-react-hooks@^4.3.0, eslint-plugin-react-hooks@^4.6.2: integrity sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ== eslint-plugin-react-refresh@^0.4.9: - version "0.4.11" - resolved "https://registry.yarnpkg.com/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.11.tgz#e450761a2bdb260aa10cfb73f846209a737827cb" - integrity sha512-wrAKxMbVr8qhXTtIKfXqAn5SAtRZt0aXxe5P23Fh4pUAdC6XEsybGLB8P0PI4j1yYqOgUEUlzKAGDfo7rJOjcw== + version "0.4.12" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.12.tgz#73d61c7fcbe3f7280edb6579380b4350d2f547ed" + integrity sha512-9neVjoGv20FwYtCP6CB1dzR1vr57ZDNOXst21wd2xJ/cTlM2xLq0GWVlSNTdMn/4BtP6cHYBMCSp1wFBJ9jBsg== eslint-plugin-react@^7.27.1, eslint-plugin-react@^7.35.0: - version "7.35.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.35.2.tgz#d32500d3ec268656d5071918bfec78cfd8b070ed" - integrity sha512-Rbj2R9zwP2GYNcIak4xoAMV57hrBh3hTaR0k7hVjwCQgryE/pw5px4b13EYjduOI0hfXyZhwBxaGpOTbWSGzKQ== + version "7.36.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.36.1.tgz#f1dabbb11f3d4ebe8b0cf4e54aff4aee81144ee5" + integrity sha512-/qwbqNXZoq+VP30s1d4Nc1C5GTxjJQjk4Jzs4Wq2qzxFM7dSmuG2UkIjg2USMLh3A/aVcUNrK7v0J5U1XEGGwA== dependencies: array-includes "^3.1.8" array.prototype.findlast "^1.2.5" @@ -3444,15 +3442,15 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== eslint@^8.56.0: - version "8.57.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" - integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== + version "8.57.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.1.tgz#7df109654aba7e3bbe5c8eae533c5e461d3c6ca9" + integrity sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.0" - "@humanwhocodes/config-array" "^0.11.14" + "@eslint/js" "8.57.1" + "@humanwhocodes/config-array" "^0.13.0" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" "@ungap/structured-clone" "^1.2.0" @@ -4907,7 +4905,7 @@ pathval@^1.1.1: resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== -picocolors@^1.0.0, picocolors@^1.0.1: +picocolors@^1.0.0, picocolors@^1.0.1, picocolors@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw== @@ -4932,13 +4930,13 @@ possible-typed-array-names@^1.0.0: integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== postcss@^8.4.43: - version "8.4.45" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.45.tgz#538d13d89a16ef71edbf75d895284ae06b79e603" - integrity sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q== + version "8.4.47" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.47.tgz#5bf6c9a010f3e724c503bf03ef7947dcb0fea365" + integrity sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ== dependencies: nanoid "^3.3.7" - picocolors "^1.0.1" - source-map-js "^1.2.0" + picocolors "^1.1.0" + source-map-js "^1.2.1" prelude-ls@^1.2.1: version "1.2.1" @@ -5141,9 +5139,9 @@ reflect.getprototypeof@^1.0.4: which-builtin-type "^1.1.3" regenerate-unicode-properties@^10.1.0: - version "10.1.1" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz#6b0e05489d9076b04c436f318d9b067bba459480" - integrity sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q== + version "10.2.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz#626e39df8c372338ea9b8028d1f99dc3fd9c3db0" + integrity sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA== dependencies: regenerate "^1.4.2" @@ -5259,28 +5257,28 @@ rimraf@^3.0.2: glob "^7.1.3" rollup@^4.20.0: - version "4.21.2" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.21.2.tgz#f41f277a448d6264e923dd1ea179f0a926aaf9b7" - integrity sha512-e3TapAgYf9xjdLvKQCkQTnbTKd4a6jwlpQSJJFokHGaX2IVjoEqkIIhiQfqsi0cdwlOD+tQGuOd5AJkc5RngBw== + version "4.21.3" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.21.3.tgz#c64ba119e6aeb913798a6f7eef2780a0df5a0821" + integrity sha512-7sqRtBNnEbcBtMeRVc6VRsJMmpI+JU1z9VTvW8D4gXIYQFz0aLcsE6rRkyghZkLfEgUZgVvOG7A5CVz/VW5GIA== dependencies: "@types/estree" "1.0.5" optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.21.2" - "@rollup/rollup-android-arm64" "4.21.2" - "@rollup/rollup-darwin-arm64" "4.21.2" - "@rollup/rollup-darwin-x64" "4.21.2" - "@rollup/rollup-linux-arm-gnueabihf" "4.21.2" - "@rollup/rollup-linux-arm-musleabihf" "4.21.2" - "@rollup/rollup-linux-arm64-gnu" "4.21.2" - "@rollup/rollup-linux-arm64-musl" "4.21.2" - "@rollup/rollup-linux-powerpc64le-gnu" "4.21.2" - "@rollup/rollup-linux-riscv64-gnu" "4.21.2" - "@rollup/rollup-linux-s390x-gnu" "4.21.2" - "@rollup/rollup-linux-x64-gnu" "4.21.2" - "@rollup/rollup-linux-x64-musl" "4.21.2" - "@rollup/rollup-win32-arm64-msvc" "4.21.2" - "@rollup/rollup-win32-ia32-msvc" "4.21.2" - "@rollup/rollup-win32-x64-msvc" "4.21.2" + "@rollup/rollup-android-arm-eabi" "4.21.3" + "@rollup/rollup-android-arm64" "4.21.3" + "@rollup/rollup-darwin-arm64" "4.21.3" + "@rollup/rollup-darwin-x64" "4.21.3" + "@rollup/rollup-linux-arm-gnueabihf" "4.21.3" + "@rollup/rollup-linux-arm-musleabihf" "4.21.3" + "@rollup/rollup-linux-arm64-gnu" "4.21.3" + "@rollup/rollup-linux-arm64-musl" "4.21.3" + "@rollup/rollup-linux-powerpc64le-gnu" "4.21.3" + "@rollup/rollup-linux-riscv64-gnu" "4.21.3" + "@rollup/rollup-linux-s390x-gnu" "4.21.3" + "@rollup/rollup-linux-x64-gnu" "4.21.3" + "@rollup/rollup-linux-x64-musl" "4.21.3" + "@rollup/rollup-win32-arm64-msvc" "4.21.3" + "@rollup/rollup-win32-ia32-msvc" "4.21.3" + "@rollup/rollup-win32-x64-msvc" "4.21.3" fsevents "~2.3.2" rrweb-cssom@^0.6.0: @@ -5462,7 +5460,7 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -source-map-js@^1.0.1, source-map-js@^1.2.0: +source-map-js@^1.0.1, source-map-js@^1.2.0, source-map-js@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== @@ -5848,13 +5846,13 @@ typed-array-length@^1.0.6: possible-typed-array-names "^1.0.0" typescript-eslint@^8.1.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.5.0.tgz#041f6c302d0e9a8e116a33d60b0bb19f34036dd7" - integrity sha512-uD+XxEoSIvqtm4KE97etm32Tn5MfaZWgWfMMREStLxR6JzvHkc2Tkj7zhTEK5XmtpTmKHNnG8Sot6qDfhHtR1Q== + version "8.6.0" + resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.6.0.tgz#5f0b5e23b34385ef146e447616c1a0d6bd14bedb" + integrity sha512-eEhhlxCEpCd4helh3AO1hk0UP2MvbRi9CtIAJTVPQjuSXOOO2jsEacNi4UdcJzZJbeuVg1gMhtZ8UYb+NFYPrA== dependencies: - "@typescript-eslint/eslint-plugin" "8.5.0" - "@typescript-eslint/parser" "8.5.0" - "@typescript-eslint/utils" "8.5.0" + "@typescript-eslint/eslint-plugin" "8.6.0" + "@typescript-eslint/parser" "8.6.0" + "@typescript-eslint/utils" "8.6.0" typescript@^5.3.3: version "5.6.2" @@ -5882,9 +5880,9 @@ undici-types@~6.19.2: integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== unicode-canonical-property-names-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" - integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== + version "2.0.1" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz#cb3173fe47ca743e228216e4a3ddc4c84d628cc2" + integrity sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg== unicode-match-property-ecmascript@^2.0.0: version "2.0.0" @@ -5895,9 +5893,9 @@ unicode-match-property-ecmascript@^2.0.0: unicode-property-aliases-ecmascript "^2.0.0" unicode-match-property-value-ecmascript@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz#cb5fffdcd16a05124f5a4b0bf7c3770208acbbe0" - integrity sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA== + version "2.2.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.0.tgz#a0401aee72714598f739b68b104e4fe3a0cb3c71" + integrity sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg== unicode-property-aliases-ecmascript@^2.0.0: version "2.1.0" @@ -5962,9 +5960,9 @@ vite-node@1.6.0: vite "^5.0.0" vite@^5.0.0, vite@^5.0.11: - version "5.4.3" - resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.3.tgz#771c470e808cb6732f204e1ee96c2ed65b97a0eb" - integrity sha512-IH+nl64eq9lJjFqU+/yrRnrHPVTlgy42/+IzbOdaFDVlyLgI/wDlf+FCobXLX1cT0X5+7LMyH1mIy2xJdLfo8Q== + version "5.4.6" + resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.6.tgz#85a93a1228a7fb5a723ca1743e337a2588ed008f" + integrity sha512-IeL5f8OO5nylsgzd9tq4qD2QqI0k2CQLGrWD0rCN0EQJZpBK5vJAx0I+GDkMOXxQX/OfFHMuLIx6ddAxGX/k+Q== dependencies: esbuild "^0.21.3" postcss "^8.4.43" From fb8f486e0f16905e31ac552c4446d3cd9c5a59d3 Mon Sep 17 00:00:00 2001 From: SKairinos Date: Wed, 18 Sep 2024 15:14:23 +0000 Subject: [PATCH 03/25] refactor --- src/app/hooks.ts | 45 +++++++- src/app/schemas.ts | 107 +++++------------- src/components/form/NewPasswordField.tsx | 24 ++-- src/pages/login/studentForms/Class.tsx | 2 +- src/pages/login/studentForms/FirstName.tsx | 2 +- src/pages/register/TeacherForm.tsx | 9 +- .../studentAccount/UpdateAccountForm.tsx | 4 +- .../classes/JoinClassRequest.tsx | 2 +- .../teacherDashboard/classes/class/Class.tsx | 11 ++ .../classes/class/ResetStudentsPassword.tsx | 33 +++--- .../class/ResetStudentsPasswordDialog.tsx | 8 +- .../classes/class/UpdateStudentUser.tsx | 2 +- 12 files changed, 122 insertions(+), 127 deletions(-) diff --git a/src/app/hooks.ts b/src/app/hooks.ts index 240c773..bc2a9bb 100644 --- a/src/app/hooks.ts +++ b/src/app/hooks.ts @@ -4,16 +4,53 @@ // We disable the ESLint rule here because this is the designated place // for importing and re-exporting the typed versions of hooks. /* eslint-disable @typescript-eslint/no-restricted-imports */ +import * as yup from "yup" import { useDispatch, useSelector } from "react-redux" -import { useParams } from "codeforlife/hooks" +import CryptoJS from "crypto-js" +import { useState } from "react" import type { AppDispatch, RootState } from "./store" -import { classIdSchema } from "./schemas" // Use throughout your app instead of plain `useDispatch` and `useSelector` export const useAppDispatch = useDispatch.withTypes() export const useAppSelector = useSelector.withTypes() -export function useClassIdParam() { - return useParams({ classId: classIdSchema().required() }) +export function usePwnedPasswordsApi(): [yup.StringSchema, boolean] { + const [online, setOnline] = useState(true) + + const schema = yup.string().test({ + message: "password is too common", + test: async password => { + try { + // Do not raise validation error if not online or no password. + if (!online || !password) return true + + // Hash the password. + const hashedPassword = CryptoJS.SHA1(password).toString().toUpperCase() + const hashPrefix = hashedPassword.substring(0, 5) + const hashSuffix = hashedPassword.substring(5) + + // Call Pwned Passwords API. + // https://haveibeenpwned.com/API/v3#SearchingPwnedPasswordsByRange + const response = await fetch( + `https://api.pwnedpasswords.com/range/${hashPrefix}`, + ) + // TODO: Standardize how to log non-okay responses. + if (!response.ok) throw Error() + + // Parse response. + const data = await response.text() + return !data.includes(hashSuffix) + } catch (error) { + console.error(error) + + setOnline(false) + + // Do not raise validation error if a different error occurred. + return true + } + }, + }) + + return [schema, online] } diff --git a/src/app/schemas.ts b/src/app/schemas.ts index 55c1213..f9ed0ab 100644 --- a/src/app/schemas.ts +++ b/src/app/schemas.ts @@ -1,84 +1,29 @@ import * as yup from "yup" -import CryptoJS from "crypto-js" - -type Options = Partial< - { schema: S } & Extras -> - -export function classIdSchema(options?: Options) { - const { schema = yup.string() } = options || {} - - return schema.matches(/^[A-Z0-9]{5}$/, "invalid class code") -} - -export function teacherPasswordSchema(options?: Options) { - const { schema = yup.string() } = options || {} - - return schema - .min(10, "password must be at least 10 characters long") - .matches(/[A-Z]/, "password must contain at least one uppercase letter") - .matches(/[a-z]/, "password must contain at least one lowercase letter") - .matches(/[0-9]/, "password must contain at least one digit") - .matches( - /[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/, - "password must contain at least one special character", - ) -} - -export function studentPasswordSchema(options?: Options) { - const { schema = yup.string() } = options || {} - - return schema.min(6, "password must be at least 6 characters long") -} - -export function indyPasswordSchema(options?: Options) { - const { schema = yup.string() } = options || {} - - return schema - .min(8, "password must be at least 8 characters long") - .matches(/[A-Z]/, "password must contain at least one uppercase letter") - .matches(/[a-z]/, "password must contain at least one lowercase letter") - .matches(/[0-9]/, "password must contain at least one digit") -} - -export function pwnedPasswordSchema( - options?: Options void }>, -) { - const { schema = yup.string().required(), onError } = options || {} - - return schema.test({ - message: "password is too common", - test: async password => { - try { - // Do not raise validation error if no password. - if (!password) return true - - // Hash the password. - const hashedPassword = CryptoJS.SHA1(password).toString().toUpperCase() - const hashPrefix = hashedPassword.substring(0, 5) - const hashSuffix = hashedPassword.substring(5) - - // Call Pwned Passwords API. - // https://haveibeenpwned.com/API/v3#SearchingPwnedPasswordsByRange - const response = await fetch( - `https://api.pwnedpasswords.com/range/${hashPrefix}`, - ) - // TODO: Standardize how to log non-okay responses. - if (!response.ok) throw Error() - - // Parse response. - const data = await response.text() - return !data.includes(hashSuffix) - } catch (error) { - console.error(error) - - if (onError) onError(error) - - // Do not raise validation error if a different error occurred. - return true - } - }, - }) -} export const userIdSchema = yup.number() + +export const classIdSchema = yup + .string() + .matches(/^[A-Z0-9]{5}$/, "invalid class code") + +export const teacherPasswordSchema = yup + .string() + .min(10, "password must be at least 10 characters long") + .matches(/[A-Z]/, "password must contain at least one uppercase letter") + .matches(/[a-z]/, "password must contain at least one lowercase letter") + .matches(/[0-9]/, "password must contain at least one digit") + .matches( + /[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/, + "password must contain at least one special character", + ) + +export const studentPasswordSchema = yup + .string() + .min(6, "password must be at least 6 characters long") + +export const indyPasswordSchema = yup + .string() + .min(8, "password must be at least 8 characters long") + .matches(/[A-Z]/, "password must contain at least one uppercase letter") + .matches(/[a-z]/, "password must contain at least one lowercase letter") + .matches(/[0-9]/, "password must contain at least one digit") diff --git a/src/components/form/NewPasswordField.tsx b/src/components/form/NewPasswordField.tsx index 8ae46ce..1d0d06a 100644 --- a/src/components/form/NewPasswordField.tsx +++ b/src/components/form/NewPasswordField.tsx @@ -8,10 +8,10 @@ import { import { indyPasswordSchema, - pwnedPasswordSchema, studentPasswordSchema, teacherPasswordSchema, } from "../../app/schemas" +import { usePwnedPasswordsApi } from "../../app/hooks" export interface NewPasswordFieldProps extends Omit< @@ -25,28 +25,20 @@ const NewPasswordField: FC = ({ userType, ...passwordFieldProps }) => { - const [pwnedPasswords, setPwnedPasswords] = useState<{ - online: boolean - dialogOpen: boolean - }>({ online: true, dialogOpen: false }) + const [pwnedPasswordsSchema, pwnedPasswordsOnline] = usePwnedPasswordsApi() + const [dialogOpen, setDialogOpen] = useState(!pwnedPasswordsOnline) let schema = { teacher: teacherPasswordSchema, independent: indyPasswordSchema, student: studentPasswordSchema, - }[userType]() + }[userType] if ( - pwnedPasswords.online && + pwnedPasswordsOnline && (userType === "teacher" || userType === "independent") ) { - schema = pwnedPasswordSchema({ - schema, - onError: () => { - // Alert user test couldn't be carried out. - setPwnedPasswords({ online: false, dialogOpen: true }) - }, - }) + schema = schema.concat(pwnedPasswordsSchema) } return ( @@ -58,7 +50,7 @@ const NewPasswordField: FC = ({ validateOptions={{ abortEarly: false }} {...passwordFieldProps} /> - + Password Vulnerability Check Unavailable @@ -70,7 +62,7 @@ const NewPasswordField: FC = ({ = () => { - const { classId } = useClassIdParam()! + const params = useParams({ classId: classIdSchema.required() }) const { state } = useLocation() - const navigate = useNavigate() const { studentUsers, resetStudentsPasswordResult } = state || {} const validState = studentUsers && studentUsers.length && resetStudentsPasswordResult - useEffect(() => { - if (!validState) { - navigate( - generatePath(paths.teacher.dashboard.tab.classes.class._, { classId }), - { replace: true }, - ) - } - }, [classId, navigate, validState]) + if (!params) + return - if (!validState) return <> + const { classId } = params + + if (!validState) + return ( + + ) const students = resetStudentsPasswordResult.reduce( (students, student) => ({ ...students, [student.id]: student }), diff --git a/src/pages/teacherDashboard/classes/class/ResetStudentsPasswordDialog.tsx b/src/pages/teacherDashboard/classes/class/ResetStudentsPasswordDialog.tsx index b7d3009..37f19ba 100644 --- a/src/pages/teacherDashboard/classes/class/ResetStudentsPasswordDialog.tsx +++ b/src/pages/teacherDashboard/classes/class/ResetStudentsPasswordDialog.tsx @@ -1,6 +1,6 @@ +import { type Class, type StudentUser } from "codeforlife/api" import { type FC } from "react" -import { type StudentUser } from "codeforlife/api" -import { generatePath } from "react-router" +import { generatePath } from "react-router-dom" import { useNavigate } from "codeforlife/hooks" import BaseDialog, { type BaseDialogProps } from "./BaseDialog" @@ -11,18 +11,18 @@ import { import { type ListUsersResult } from "../../../../api/user" import { type ResetStudentsPasswordState } from "./ResetStudentsPassword" import { paths } from "../../../../routes" -import { useClassIdParam } from "../../../../app/hooks" export interface ResetStudentsPasswordDialogProps extends Omit { + classId: Class["id"] studentUsers: Array> } const ResetStudentsPasswordDialog: FC = ({ + classId, studentUsers, ...baseDialogProps }) => { - const { classId } = useClassIdParam()! const [resetStudentsPassword] = useResetStudentsPasswordMutation() const navigate = useNavigate() diff --git a/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx b/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx index 4548d20..bcea8c1 100644 --- a/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx +++ b/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx @@ -141,7 +141,7 @@ export interface UpdateStudentUserProps {} const UpdateStudentUser: FC = () => { const params = useParams({ - classId: classIdSchema().required(), + classId: classIdSchema.required(), studentUserId: userIdSchema.required(), }) From 53fe361e579ac214836244efbd09cbb3cd6662bb Mon Sep 17 00:00:00 2001 From: SKairinos Date: Thu, 19 Sep 2024 08:21:02 +0000 Subject: [PATCH 04/25] use cfl navigate --- .../teacherDashboard/classes/class/Class.tsx | 2 +- .../classes/class/ResetStudentsPassword.tsx | 3 +- .../classes/class/UpdateStudentUser.tsx | 4 +- yarn.lock | 210 +++++++++--------- 4 files changed, 110 insertions(+), 109 deletions(-) diff --git a/src/pages/teacherDashboard/classes/class/Class.tsx b/src/pages/teacherDashboard/classes/class/Class.tsx index dee0293..7440ded 100644 --- a/src/pages/teacherDashboard/classes/class/Class.tsx +++ b/src/pages/teacherDashboard/classes/class/Class.tsx @@ -1,7 +1,7 @@ import * as pages from "codeforlife/components/page" import { type FC, useState } from "react" import { Button } from "@mui/material" -import { Navigate } from "react-router-dom" +import { Navigate } from "codeforlife/components/router" import { SecurityOutlined as SecurityOutlinedIcon } from "@mui/icons-material" import { type StudentUser } from "codeforlife/api" import { useParams } from "codeforlife/hooks" diff --git a/src/pages/teacherDashboard/classes/class/ResetStudentsPassword.tsx b/src/pages/teacherDashboard/classes/class/ResetStudentsPassword.tsx index 98da2d8..1bb3302 100644 --- a/src/pages/teacherDashboard/classes/class/ResetStudentsPassword.tsx +++ b/src/pages/teacherDashboard/classes/class/ResetStudentsPassword.tsx @@ -1,8 +1,9 @@ import * as pages from "codeforlife/components/page" -import { Navigate, generatePath } from "react-router-dom" import { useLocation, useParams } from "codeforlife/hooks" import { type FC } from "react" +import { Navigate } from "codeforlife/components/router" import { type StudentUser } from "codeforlife/api" +import { generatePath } from "react-router-dom" import { type ListUsersResult, diff --git a/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx b/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx index bcea8c1..6863957 100644 --- a/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx +++ b/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx @@ -1,12 +1,12 @@ import * as forms from "codeforlife/components/form" import * as pages from "codeforlife/components/page" import { type Class, type User } from "codeforlife/api" -import { Navigate, generatePath } from "react-router-dom" +import { Link, Navigate } from "codeforlife/components/router" import { useNavigate, useParams } from "codeforlife/hooks" import { type FC } from "react" -import { Link } from "codeforlife/components/router" import { type StudentUser } from "codeforlife/api" import { Typography } from "@mui/material" +import { generatePath } from "react-router-dom" import { handleResultState } from "codeforlife/utils/api" import { submitForm } from "codeforlife/utils/form" diff --git a/yarn.lock b/yarn.lock index 6724cec..16785fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1546,9 +1546,9 @@ prop-types "^15.8.1" "@mui/types@^7.2.15": - version "7.2.16" - resolved "https://registry.yarnpkg.com/@mui/types/-/types-7.2.16.tgz#66710c691b51cd4fca95322100cd74ec230cfe30" - integrity sha512-qI8TV3M7ShITEEc8Ih15A2vLzZGLhD+/UPNwck/hcls2gwg7dyRjNGXcQYHKLB5Q7PuTRfrTkAoPa2VV1s67Ag== + version "7.2.17" + resolved "https://registry.yarnpkg.com/@mui/types/-/types-7.2.17.tgz#329826062d4079de5ea2b97007575cebbba1fdbc" + integrity sha512-oyumoJgB6jDV8JFzRqjBo2daUuHpzDjoO/e3IrRhhHo/FxJlaVhET6mcNrKHUq2E+R+q3ql0qAtvQ4rfWHhAeQ== "@mui/utils@^5.16.6": version "5.16.6" @@ -1641,85 +1641,85 @@ resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.19.2.tgz#0c896535473291cb41f152c180bedd5680a3b273" integrity sha512-baiMx18+IMuD1yyvOGaHM9QrVUPGGG0jC+z+IPHnRJWUAUvaKuWKyE8gjDj2rzv3sz9zOGoRSPgeBVHRhZnBlA== -"@rollup/rollup-android-arm-eabi@4.21.3": - version "4.21.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.3.tgz#155c7d82c1b36c3ad84d9adf9b3cd520cba81a0f" - integrity sha512-MmKSfaB9GX+zXl6E8z4koOr/xU63AMVleLEa64v7R0QF/ZloMs5vcD1sHgM64GXXS1csaJutG+ddtzcueI/BLg== - -"@rollup/rollup-android-arm64@4.21.3": - version "4.21.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.3.tgz#b94b6fa002bd94a9cbd8f9e47e23b25e5bd113ba" - integrity sha512-zrt8ecH07PE3sB4jPOggweBjJMzI1JG5xI2DIsUbkA+7K+Gkjys6eV7i9pOenNSDJH3eOr/jLb/PzqtmdwDq5g== - -"@rollup/rollup-darwin-arm64@4.21.3": - version "4.21.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.3.tgz#0934126cf9cbeadfe0eb7471ab5d1517e8cd8dcc" - integrity sha512-P0UxIOrKNBFTQaXTxOH4RxuEBVCgEA5UTNV6Yz7z9QHnUJ7eLX9reOd/NYMO3+XZO2cco19mXTxDMXxit4R/eQ== - -"@rollup/rollup-darwin-x64@4.21.3": - version "4.21.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.3.tgz#0ce8e1e0f349778938c7c90e4bdc730640e0a13e" - integrity sha512-L1M0vKGO5ASKntqtsFEjTq/fD91vAqnzeaF6sfNAy55aD+Hi2pBI5DKwCO+UNDQHWsDViJLqshxOahXyLSh3EA== - -"@rollup/rollup-linux-arm-gnueabihf@4.21.3": - version "4.21.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.3.tgz#5669d34775ad5d71e4f29ade99d0ff4df523afb6" - integrity sha512-btVgIsCjuYFKUjopPoWiDqmoUXQDiW2A4C3Mtmp5vACm7/GnyuprqIDPNczeyR5W8rTXEbkmrJux7cJmD99D2g== - -"@rollup/rollup-linux-arm-musleabihf@4.21.3": - version "4.21.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.3.tgz#f6d1a0e1da4061370cb2f4244fbdd727c806dd88" - integrity sha512-zmjbSphplZlau6ZTkxd3+NMtE4UKVy7U4aVFMmHcgO5CUbw17ZP6QCgyxhzGaU/wFFdTfiojjbLG3/0p9HhAqA== - -"@rollup/rollup-linux-arm64-gnu@4.21.3": - version "4.21.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.3.tgz#ed96a05e99743dee4d23cc4913fc6e01a0089c88" - integrity sha512-nSZfcZtAnQPRZmUkUQwZq2OjQciR6tEoJaZVFvLHsj0MF6QhNMg0fQ6mUOsiCUpTqxTx0/O6gX0V/nYc7LrgPw== - -"@rollup/rollup-linux-arm64-musl@4.21.3": - version "4.21.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.3.tgz#057ea26eaa7e537a06ded617d23d57eab3cecb58" - integrity sha512-MnvSPGO8KJXIMGlQDYfvYS3IosFN2rKsvxRpPO2l2cum+Z3exiExLwVU+GExL96pn8IP+GdH8Tz70EpBhO0sIQ== - -"@rollup/rollup-linux-powerpc64le-gnu@4.21.3": - version "4.21.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.3.tgz#6e6e1f9404c9bf3fbd7d51cd11cd288a9a2843aa" - integrity sha512-+W+p/9QNDr2vE2AXU0qIy0qQE75E8RTwTwgqS2G5CRQ11vzq0tbnfBd6brWhS9bCRjAjepJe2fvvkvS3dno+iw== - -"@rollup/rollup-linux-riscv64-gnu@4.21.3": - version "4.21.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.3.tgz#eef1536a53f6e6658a2a778130e6b1a4a41cb439" - integrity sha512-yXH6K6KfqGXaxHrtr+Uoy+JpNlUlI46BKVyonGiaD74ravdnF9BUNC+vV+SIuB96hUMGShhKV693rF9QDfO6nQ== - -"@rollup/rollup-linux-s390x-gnu@4.21.3": - version "4.21.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.3.tgz#2b28fb89ca084efaf8086f435025d96b4a966957" - integrity sha512-R8cwY9wcnApN/KDYWTH4gV/ypvy9yZUHlbJvfaiXSB48JO3KpwSpjOGqO4jnGkLDSk1hgjYkTbTt6Q7uvPf8eg== - -"@rollup/rollup-linux-x64-gnu@4.21.3": - version "4.21.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.3.tgz#5226cde6c6b495b04a3392c1d2c572844e42f06b" - integrity sha512-kZPbX/NOPh0vhS5sI+dR8L1bU2cSO9FgxwM8r7wHzGydzfSjLRCFAT87GR5U9scj2rhzN3JPYVC7NoBbl4FZ0g== - -"@rollup/rollup-linux-x64-musl@4.21.3": - version "4.21.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.3.tgz#2c2412982e6c2a00a2ecac6d548ebb02f0aa6ca4" - integrity sha512-S0Yq+xA1VEH66uiMNhijsWAafffydd2X5b77eLHfRmfLsRSpbiAWiRHV6DEpz6aOToPsgid7TI9rGd6zB1rhbg== - -"@rollup/rollup-win32-arm64-msvc@4.21.3": - version "4.21.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.3.tgz#fbb6ef5379199e2ec0103ef32877b0985c773a55" - integrity sha512-9isNzeL34yquCPyerog+IMCNxKR8XYmGd0tHSV+OVx0TmE0aJOo9uw4fZfUuk2qxobP5sug6vNdZR6u7Mw7Q+Q== - -"@rollup/rollup-win32-ia32-msvc@4.21.3": - version "4.21.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.3.tgz#d50e2082e147e24d87fe34abbf6246525ec3845a" - integrity sha512-nMIdKnfZfzn1Vsk+RuOvl43ONTZXoAPUUxgcU0tXooqg4YrAqzfKzVenqqk2g5efWh46/D28cKFrOzDSW28gTA== - -"@rollup/rollup-win32-x64-msvc@4.21.3": - version "4.21.3" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.3.tgz#4115233aa1bd5a2060214f96d8511f6247093212" - integrity sha512-fOvu7PCQjAj4eWDEuD8Xz5gpzFqXzGlxHZozHP4b9Jxv9APtdxL6STqztDzMLuRXEc4UpXGGhx029Xgm91QBeA== +"@rollup/rollup-android-arm-eabi@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.0.tgz#e8c16c336f060b4cb592f62eb4f0e543d79d51fe" + integrity sha512-/IZQvg6ZR0tAkEi4tdXOraQoWeJy9gbQ/cx4I7k9dJaCk9qrXEcdouxRVz5kZXt5C2bQ9pILoAA+KB4C/d3pfw== + +"@rollup/rollup-android-arm64@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.0.tgz#7a44160a14017fa744912d7037c7d81d6f8a46e7" + integrity sha512-ETHi4bxrYnvOtXeM7d4V4kZWixib2jddFacJjsOjwbgYSRsyXYtZHC4ht134OsslPIcnkqT+TKV4eU8rNBKyyQ== + +"@rollup/rollup-darwin-arm64@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.0.tgz#6122dc37d4a09521d8abe18925956d3b46cfbac9" + integrity sha512-ZWgARzhSKE+gVUX7QWaECoRQsPwaD8ZR0Oxb3aUpzdErTvlEadfQpORPXkKSdKbFci9v8MJfkTtoEHnnW9Ulng== + +"@rollup/rollup-darwin-x64@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.0.tgz#453f345899cbf544aa0d6f5808d24d2e42f605b7" + integrity sha512-h0ZAtOfHyio8Az6cwIGS+nHUfRMWBDO5jXB8PQCARVF6Na/G6XS2SFxDl8Oem+S5ZsHQgtsI7RT4JQnI1qrlaw== + +"@rollup/rollup-linux-arm-gnueabihf@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.0.tgz#3a32fa4e80a62a6d733014838b1123fe76b060fe" + integrity sha512-9pxQJSPwFsVi0ttOmqLY4JJ9pg9t1gKhK0JDbV1yUEETSx55fdyCjt39eBQ54OQCzAF0nVGO6LfEH1KnCPvelA== + +"@rollup/rollup-linux-arm-musleabihf@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.0.tgz#55d3953c54419e93efe124882a3103c8a2f65641" + integrity sha512-YJ5Ku5BmNJZb58A4qSEo3JlIG4d3G2lWyBi13ABlXzO41SsdnUKi3HQHe83VpwBVG4jHFTW65jOQb8qyoR+qzg== + +"@rollup/rollup-linux-arm64-gnu@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.0.tgz#cd626963b9962baf8e09d792e67b87269a5bcfff" + integrity sha512-U4G4u7f+QCqHlVg1Nlx+qapZy+QoG+NV6ux+upo/T7arNGwKvKP2kmGM4W5QTbdewWFgudQxi3kDNST9GT1/mg== + +"@rollup/rollup-linux-arm64-musl@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.0.tgz#ad209270c9937a27346fce5b0670cbdfb1e6a0a6" + integrity sha512-aQpNlKmx3amwkA3a5J6nlXSahE1ijl0L9KuIjVOUhfOh7uw2S4piR3mtpxpRtbnK809SBtyPsM9q15CPTsY7HQ== + +"@rollup/rollup-linux-powerpc64le-gnu@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.0.tgz#fdd173929a5bba8b7e8b37314380213d9604088f" + integrity sha512-9fx6Zj/7vve/Fp4iexUFRKb5+RjLCff6YTRQl4CoDhdMfDoobWmhAxQWV3NfShMzQk1Q/iCnageFyGfqnsmeqQ== + +"@rollup/rollup-linux-riscv64-gnu@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.0.tgz#90b11314fbf45d04083f658e08dc3b32fd713061" + integrity sha512-VWQiCcN7zBgZYLjndIEh5tamtnKg5TGxyZPWcN9zBtXBwfcGSZ5cHSdQZfQH/GB4uRxk0D3VYbOEe/chJhPGLQ== + +"@rollup/rollup-linux-s390x-gnu@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.0.tgz#46bb2f1135aeec646b720d6032d7c86915f8b2ec" + integrity sha512-EHmPnPWvyYqncObwqrosb/CpH3GOjE76vWVs0g4hWsDRUVhg61hBmlVg5TPXqF+g+PvIbqkC7i3h8wbn4Gp2Fg== + +"@rollup/rollup-linux-x64-gnu@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.0.tgz#d731a19af5f05eabcba871bda2eeb2fa8c8adb67" + integrity sha512-tsSWy3YQzmpjDKnQ1Vcpy3p9Z+kMFbSIesCdMNgLizDWFhrLZIoN21JSq01g+MZMDFF+Y1+4zxgrlqPjid5ohg== + +"@rollup/rollup-linux-x64-musl@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.0.tgz#5438b2dc38fe467444cf769146098be083022d0f" + integrity sha512-anr1Y11uPOQrpuU8XOikY5lH4Qu94oS6j0xrulHk3NkLDq19MlX8Ng/pVipjxBJ9a2l3+F39REZYyWQFkZ4/fw== + +"@rollup/rollup-win32-arm64-msvc@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.0.tgz#6bd66c198f80c8e7050cfd901701cfb9555d768a" + integrity sha512-7LB+Bh+Ut7cfmO0m244/asvtIGQr5pG5Rvjz/l1Rnz1kDzM02pSX9jPaS0p+90H5I1x4d1FkCew+B7MOnoatNw== + +"@rollup/rollup-win32-ia32-msvc@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.0.tgz#58daea1f1e65143c44c8f3311f30ff8eefa62bae" + integrity sha512-+3qZ4rer7t/QsC5JwMpcvCVPRcJt1cJrYS/TMJZzXIJbxWFQEVhrIc26IhB+5Z9fT9umfVc+Es2mOZgl+7jdJQ== + +"@rollup/rollup-win32-x64-msvc@4.22.0": + version "4.22.0" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.0.tgz#956948629f6b87de0bdf526b28d940221540bbb6" + integrity sha512-YdicNOSJONVx/vuPkgPTyRoAPx3GbknBZRCOUkK84FJ/YTfs/F0vl/YsMscrB6Y177d+yDRcj+JWMPMCgshwrA== "@rtsao/scc@^1.1.0": version "1.1.0" @@ -2619,9 +2619,9 @@ camelcase@^7.0.0: integrity sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw== caniuse-lite@^1.0.30001646: - version "1.0.30001660" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001660.tgz#31218de3463fabb44d0b7607b652e56edf2e2355" - integrity sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg== + version "1.0.30001662" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001662.tgz#3574b22dfec54a3f3b6787331da1040fe8e763ec" + integrity sha512-sgMUVwLmGseH8ZIrm1d51UbrhqMCH3jvS7gF/M6byuHOnKyLOBL7W8yz5V02OHwgLGA36o/AFhWzzh4uc5aqTA== chai@^4.3.10: version "4.5.0" @@ -2711,7 +2711,7 @@ clsx@^2.1.0, clsx@^2.1.1: "codeforlife@github:ocadotechnology/codeforlife-package-javascript#portal-frontend-51": version "2.3.3" - resolved "https://codeload.github.com/ocadotechnology/codeforlife-package-javascript/tar.gz/d74c8e97010e15032dce4ca63ec65b8e012e7e53" + resolved "https://codeload.github.com/ocadotechnology/codeforlife-package-javascript/tar.gz/362c5bf4eab2be0c90f0828a3422806d677e7e50" dependencies: "@emotion/react" "^11.10.6" "@emotion/styled" "^11.10.6" @@ -5257,28 +5257,28 @@ rimraf@^3.0.2: glob "^7.1.3" rollup@^4.20.0: - version "4.21.3" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.21.3.tgz#c64ba119e6aeb913798a6f7eef2780a0df5a0821" - integrity sha512-7sqRtBNnEbcBtMeRVc6VRsJMmpI+JU1z9VTvW8D4gXIYQFz0aLcsE6rRkyghZkLfEgUZgVvOG7A5CVz/VW5GIA== + version "4.22.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.22.0.tgz#23cd9e4565a458587683accc34a054660c01f351" + integrity sha512-W21MUIFPZ4+O2Je/EU+GP3iz7PH4pVPUXSbEZdatQnxo29+3rsUjgrJmzuAZU24z7yRAnFN6ukxeAhZh/c7hzg== dependencies: "@types/estree" "1.0.5" optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.21.3" - "@rollup/rollup-android-arm64" "4.21.3" - "@rollup/rollup-darwin-arm64" "4.21.3" - "@rollup/rollup-darwin-x64" "4.21.3" - "@rollup/rollup-linux-arm-gnueabihf" "4.21.3" - "@rollup/rollup-linux-arm-musleabihf" "4.21.3" - "@rollup/rollup-linux-arm64-gnu" "4.21.3" - "@rollup/rollup-linux-arm64-musl" "4.21.3" - "@rollup/rollup-linux-powerpc64le-gnu" "4.21.3" - "@rollup/rollup-linux-riscv64-gnu" "4.21.3" - "@rollup/rollup-linux-s390x-gnu" "4.21.3" - "@rollup/rollup-linux-x64-gnu" "4.21.3" - "@rollup/rollup-linux-x64-musl" "4.21.3" - "@rollup/rollup-win32-arm64-msvc" "4.21.3" - "@rollup/rollup-win32-ia32-msvc" "4.21.3" - "@rollup/rollup-win32-x64-msvc" "4.21.3" + "@rollup/rollup-android-arm-eabi" "4.22.0" + "@rollup/rollup-android-arm64" "4.22.0" + "@rollup/rollup-darwin-arm64" "4.22.0" + "@rollup/rollup-darwin-x64" "4.22.0" + "@rollup/rollup-linux-arm-gnueabihf" "4.22.0" + "@rollup/rollup-linux-arm-musleabihf" "4.22.0" + "@rollup/rollup-linux-arm64-gnu" "4.22.0" + "@rollup/rollup-linux-arm64-musl" "4.22.0" + "@rollup/rollup-linux-powerpc64le-gnu" "4.22.0" + "@rollup/rollup-linux-riscv64-gnu" "4.22.0" + "@rollup/rollup-linux-s390x-gnu" "4.22.0" + "@rollup/rollup-linux-x64-gnu" "4.22.0" + "@rollup/rollup-linux-x64-musl" "4.22.0" + "@rollup/rollup-win32-arm64-msvc" "4.22.0" + "@rollup/rollup-win32-ia32-msvc" "4.22.0" + "@rollup/rollup-win32-x64-msvc" "4.22.0" fsevents "~2.3.2" rrweb-cssom@^0.6.0: From 3899b244d1589f9bb1db841bf7f0c48e0364fd71 Mon Sep 17 00:00:00 2001 From: SKairinos Date: Thu, 19 Sep 2024 10:16:40 +0000 Subject: [PATCH 05/25] initial --- src/components/TableOfContents.tsx | 79 +++++++ src/components/index.tsx | 2 + src/pages/privacyNotice/PrivacyNotice.tsx | 32 +++ src/pages/privacyNotice/adults/Adults.tsx | 100 +++++++++ .../privacyNotice/adults/ChangeOfPurpose.tsx | 20 ++ src/pages/privacyNotice/adults/Changes.tsx | 19 ++ src/pages/privacyNotice/adults/ContactUs.tsx | 19 ++ src/pages/privacyNotice/adults/Cookies.tsx | 178 ++++++++++++++++ src/pages/privacyNotice/adults/ExtraHelp.tsx | 15 ++ .../privacyNotice/adults/HowToComplain.tsx | 28 +++ .../privacyNotice/adults/HowWeUseInfo.tsx | 199 ++++++++++++++++++ .../privacyNotice/adults/InfoSecurity.tsx | 39 ++++ src/pages/privacyNotice/adults/KeepInfo.tsx | 24 +++ .../privacyNotice/adults/OurCommitment.tsx | 34 +++ .../privacyNotice/adults/SharingInfo.tsx | 95 +++++++++ .../privacyNotice/adults/TypesOfInfo.tsx | 157 ++++++++++++++ src/pages/privacyNotice/adults/WhoWeAre.tsx | 21 ++ src/pages/privacyNotice/adults/YourRights.tsx | 86 ++++++++ src/pages/privacyNotice/children/Children.tsx | 0 src/routes/general.tsx | 12 +- 20 files changed, 1153 insertions(+), 6 deletions(-) create mode 100644 src/components/TableOfContents.tsx create mode 100644 src/pages/privacyNotice/PrivacyNotice.tsx create mode 100644 src/pages/privacyNotice/adults/Adults.tsx create mode 100644 src/pages/privacyNotice/adults/ChangeOfPurpose.tsx create mode 100644 src/pages/privacyNotice/adults/Changes.tsx create mode 100644 src/pages/privacyNotice/adults/ContactUs.tsx create mode 100644 src/pages/privacyNotice/adults/Cookies.tsx create mode 100644 src/pages/privacyNotice/adults/ExtraHelp.tsx create mode 100644 src/pages/privacyNotice/adults/HowToComplain.tsx create mode 100644 src/pages/privacyNotice/adults/HowWeUseInfo.tsx create mode 100644 src/pages/privacyNotice/adults/InfoSecurity.tsx create mode 100644 src/pages/privacyNotice/adults/KeepInfo.tsx create mode 100644 src/pages/privacyNotice/adults/OurCommitment.tsx create mode 100644 src/pages/privacyNotice/adults/SharingInfo.tsx create mode 100644 src/pages/privacyNotice/adults/TypesOfInfo.tsx create mode 100644 src/pages/privacyNotice/adults/WhoWeAre.tsx create mode 100644 src/pages/privacyNotice/adults/YourRights.tsx create mode 100644 src/pages/privacyNotice/children/Children.tsx diff --git a/src/components/TableOfContents.tsx b/src/components/TableOfContents.tsx new file mode 100644 index 0000000..8e9d1a6 --- /dev/null +++ b/src/components/TableOfContents.tsx @@ -0,0 +1,79 @@ +import { + Divider, + Unstable_Grid2 as Grid, + Link, + Stack, + Typography, +} from "@mui/material" +import { type FC, type ReactNode, useRef } from "react" + +export const ids = { + leftLinkStack: "left-link-stack", + rightLinkStack: "right-link-stack", +} + +export interface TableOfContentsProps { + contents: Array<{ header: string; children: ReactNode }> +} + +const TableOfContents: FC = ({ contents }) => { + // eslint-disable-next-line react-hooks/rules-of-hooks + const headerRefs = contents.map(() => useRef(null)) + const halfLength = Math.ceil(contents.length / 2) + + function generateLinkStack( + stackId: string, + sliceStart: number, + sliceEnd: number, + ): ReactNode { + return ( + + {contents.slice(sliceStart, sliceEnd).map((content, index) => { + index += sliceStart + return ( + + {index + 1}.{" "} + { + const header = headerRefs[index].current + if (header !== null) { + header.scrollIntoView({ + behavior: "smooth", + block: "center", + }) + } + }} + > + {content.header} + + + ) + })} + + ) + } + + return ( + + + + {generateLinkStack(ids.leftLinkStack, 0, halfLength)} + + + {generateLinkStack(ids.rightLinkStack, halfLength, contents.length)} + + + {contents.map((content, index) => ( + + + + {index + 1}. {content.header} + + {content.children} + + ))} + + ) +} + +export default TableOfContents diff --git a/src/components/index.tsx b/src/components/index.tsx index 551be5d..ac3d5a7 100644 --- a/src/components/index.tsx +++ b/src/components/index.tsx @@ -4,3 +4,5 @@ export { default as OpenInEmailButtons } from "./OpenInEmailButtons" export * from "./OpenInEmailButtons" export { default as StudentCredentialsTable } from "./StudentCredentialsTable" export * from "./StudentCredentialsTable" +export { default as TableOfContents } from "./TableOfContents" +export * from "./TableOfContents" diff --git a/src/pages/privacyNotice/PrivacyNotice.tsx b/src/pages/privacyNotice/PrivacyNotice.tsx new file mode 100644 index 0000000..4d80bd7 --- /dev/null +++ b/src/pages/privacyNotice/PrivacyNotice.tsx @@ -0,0 +1,32 @@ +import * as pages from "codeforlife/components/page" +import { type FC } from "react" +import { getParam } from "codeforlife/utils/router" + +import Adults from "./adults/Adults" +// import Children from "./children/Children" +import { paths } from "../../routes" + +export interface PrivacyNoticeProps {} + +const PrivacyNotice: FC = () => ( + + , + path: getParam(paths.privacyNotice.tab.privacyNotice, "tab"), + }, + // { + // label: "Child-friendly", + // children: , + // path: getParam(paths.privacyNotice.tab.childFriendly, "tab"), + // }, + ]} + /> + +) + +export default PrivacyNotice diff --git a/src/pages/privacyNotice/adults/Adults.tsx b/src/pages/privacyNotice/adults/Adults.tsx new file mode 100644 index 0000000..ea9f67c --- /dev/null +++ b/src/pages/privacyNotice/adults/Adults.tsx @@ -0,0 +1,100 @@ +import * as pages from "codeforlife/components/page" +import { type FC } from "react" +import { Typography } from "@mui/material" + +import ChangeOfPurpose from "./ChangeOfPurpose" +import Changes from "./Changes" +import ContactUs from "./ContactUs" +import Cookies from "./Cookies" +import ExtraHelp from "./ExtraHelp" +import HowToComplain from "./HowToComplain" +import HowWeUseInfo from "./HowWeUseInfo" +import InfoSecurity from "./InfoSecurity" +import KeepInfo from "./KeepInfo" +import OurCommitment from "./OurCommitment" +import SharingInfo from "./SharingInfo" +import { TableOfContents } from "../../../components" +import TypesOfInfo from "./TypesOfInfo" +import WhoWeAre from "./WhoWeAre" +import YourRights from "./YourRights" + +export interface AdultsProps {} + +const Adults: FC = () => ( + + Last Updated: 25th January 2023 + + Please read this notice carefully. This notice contains important + information on who manages the Code for Life portal, how and why we + collect information about you (for example, your name and email address), + how we use your information, and with which persons we share your + information. We also explain what rights you have in relation to your + personal information, for example, the right to say no to the use of your + information in certain cases, and how to contact us if you want to find + out more about your rights or if you have other questions about this + notice. + + , + }, + { + header: "Who we are", + children: , + }, + { + header: "Types of information we hold about you", + children: , + }, + { + header: "How we will use information about you", + children: , + }, + { + header: "Change of purpose", + children: , + }, + { + header: "Cookies", + children: , + }, + { + header: "Sharing your personal information with other persons", + children: , + }, + { + header: "How long will we keep your personal information?", + children: , + }, + { + header: "Your rights", + children: , + }, + { + header: "Keeping your personal information secure", + children: , + }, + { + header: "How to complain", + children: , + }, + { + header: "Changes to this Privacy Notice", + children: , + }, + { + header: "How to contact us", + children: , + }, + { + header: "Do you need extra help?", + children: , + }, + ]} + /> + +) + +export default Adults diff --git a/src/pages/privacyNotice/adults/ChangeOfPurpose.tsx b/src/pages/privacyNotice/adults/ChangeOfPurpose.tsx new file mode 100644 index 0000000..2075680 --- /dev/null +++ b/src/pages/privacyNotice/adults/ChangeOfPurpose.tsx @@ -0,0 +1,20 @@ +import { type FC } from "react" +import { Typography } from "@mui/material" + +export interface ChangeOfPurposeProps {} + +const ChangeOfPurpose: FC = () => ( + <> + + We will only use your personal information for the purposes for which we + collected it or for other compatible purposes. If we need to use your + personal information for an unrelated purpose, we will notify you and we + will explain the basis on which we do so. Please note that we do not + always need to rely on your consent to collect and process your personal + information, and we will not seek your consent unless this is required by + law. + + +) + +export default ChangeOfPurpose diff --git a/src/pages/privacyNotice/adults/Changes.tsx b/src/pages/privacyNotice/adults/Changes.tsx new file mode 100644 index 0000000..06947eb --- /dev/null +++ b/src/pages/privacyNotice/adults/Changes.tsx @@ -0,0 +1,19 @@ +import { type FC } from "react" +import { Typography } from "@mui/material" + +export interface ChangesProps {} + +const Changes: FC = () => ( + <> + + This Privacy Notice was last updated on 25th January 2023. + + + We may change this Privacy Notice from time to time and you should check + it regularly. If we make any material changes to this notice we will + inform via appropriate means (e.g. email). + + +) + +export default Changes diff --git a/src/pages/privacyNotice/adults/ContactUs.tsx b/src/pages/privacyNotice/adults/ContactUs.tsx new file mode 100644 index 0000000..d488d4a --- /dev/null +++ b/src/pages/privacyNotice/adults/ContactUs.tsx @@ -0,0 +1,19 @@ +import { Link, Typography } from "@mui/material" +import { type FC } from "react" + +export interface ContactUsProps {} + +const ContactUs: FC = () => ( + <> + + Please contact our Data Protection Officer or us at  + + individualrights@ocado.com + +  if you have any questions about this Privacy Notice or the + information we hold about you. + + +) + +export default ContactUs diff --git a/src/pages/privacyNotice/adults/Cookies.tsx b/src/pages/privacyNotice/adults/Cookies.tsx new file mode 100644 index 0000000..b05dcf0 --- /dev/null +++ b/src/pages/privacyNotice/adults/Cookies.tsx @@ -0,0 +1,178 @@ +import { + Button, + Link, + Table, + TableBody, + TableCell, + TableHead, + TableRow, + Typography, +} from "@mui/material" +import { type FC } from "react" +import { toggleOneTrustInfoDisplay } from "codeforlife/utils/window" + +const CustomTableRow: FC<{ + withoutUnderline?: boolean + typesOfCookies: string + purpose: React.ReactNode + months: string +}> = ({ withoutUnderline = false, typesOfCookies, purpose, months }) => ( + + + + {typesOfCookies} + + + + {typeof purpose === "string" ? ( + {purpose} + ) : ( + purpose + )} + + + {months} + + +) + +export interface CookiesProps {} + +const Cookies: FC = () => ( + <> + 6.1 What are Cookies? + + Cookies are tiny files that have information (data) in them. When you + visit our portal, a cookie is placed on the device you use. Cookies allow + us to remember when you visit our portal, or when you open an email. They + help us understand how you are using the Code for Life portal, as well as + which parts of our portal are popular and which ones we need to make + better. + + + We also use other forms of technology (such as web beacons or pixels) + which are similar to cookies and which allow us to monitor and improve our + website. When we talk about cookies in this notice, we also refer to these + technologies. + + 6.2 Types of cookies used + + We use the following types of cookies on our portal for the following + purposes: + + + + + + + + + + + These cookies help us understand how you use our portal and + improve or optimise the experience we provide. This can be + anything like which pages you go to most often, and if you get + error messages from web pages. They allow us to measure how + visitors interact with the portal (for example which parts of + the website are clicked on and the length of time between + clicks). + + + We use third-party web analytics software on our portal ( + + Google Analytics + +  and  + + Mouseflow + + ). We provide further information about these partners below. + + + } + months="24" + /> + +
+ 6.3 Third party cookies + + We do not allow third party advertising, or affiliation on our portal. + + + As we explain above, we work with other companies to use analytics cookies + on our portal: these are Google, who provide Google Analytics cookies, and + Mouseflow. We explain in more detail below what information they collect + and how it is used. + + + Google Analytics. Our portal uses Google Analytics, which + is provided by Google, Inc. ("Google"). Google Analytics uses + cookies to help us analyse how users use our portal. The information + generated by the cookie about your use of the website (including your IP + address) will be transmitted to and stored by Google on servers in the + United States. Google will use this information for the purpose of + evaluating your use of the website, compiling reports on website activity + for website operators and providing other services relating to website + activity and internet usage. Google may also transfer this information to + third parties where required to do so by law, or where such third parties + process the information on Google's behalf. Google will not associate + your IP address with any other data held by Google. By accepting analytics + / performance cookies on our portal, you consent to the processing of data + about you by Google in the manner and for the purposes set out above. + + + Mouseflow. We also use Mouseflow on our portal; this + provider offers a website analytics tool that helps us understand how our + portal is used, and which areas are mostly used (e.g. by using heatmaps or + by replaying your journey on our portal). Mouseflow uses cookies to record + information such as when you click on or move your mouse, when you scroll, + or press a key, what pages you visit on our website, how much time you + spend on each page, and also information about the device you use + (operating system, device type (desktop/tablet/phone), screen resolution, + location (city/country), language, and similar metadata). Mouseflow does + not collect any information on pages where it is not installed, nor does + it track or collect information outside your web browser. + + 6.4 Managing and disabling cookies + + We make available a cookie management platform on our portal (provided + by  + + OneTrust + + ), through which you can turn off non-essential cookies at any time. + Please note, strictly necessary cookies will always be set as they are + essential for our website to operate. + + + You can change your cookie preferences or withdraw consent by clicking on + the following button: + + + +) + +export default Cookies diff --git a/src/pages/privacyNotice/adults/ExtraHelp.tsx b/src/pages/privacyNotice/adults/ExtraHelp.tsx new file mode 100644 index 0000000..9f3b29e --- /dev/null +++ b/src/pages/privacyNotice/adults/ExtraHelp.tsx @@ -0,0 +1,15 @@ +import { type FC } from "react" +import { Typography } from "@mui/material" + +export interface ExtraHelpProps {} + +const ExtraHelp: FC = () => ( + <> + + If you would like this Notice in another format (for example: audio, large + print, braille) please contact us (see “How to contact us” above). + + +) + +export default ExtraHelp diff --git a/src/pages/privacyNotice/adults/HowToComplain.tsx b/src/pages/privacyNotice/adults/HowToComplain.tsx new file mode 100644 index 0000000..eee42e4 --- /dev/null +++ b/src/pages/privacyNotice/adults/HowToComplain.tsx @@ -0,0 +1,28 @@ +import { Link, Typography } from "@mui/material" +import { type FC } from "react" + +export interface HowToComplainProps {} + +const HowToComplain: FC = () => ( + <> + + We hope that we or our Data Protection Officer can resolve any query or + concern you raise about this Privacy Notice or how we use your + information. + + + Alternatively, you also have the right to lodge a complaint with a data + protection authority, in particular in the UK and/or the and/or the + European Union (or European Economic Area) country where you work, + normally live or where any alleged infringement of data protection laws + occurred. The data protection authority in the UK is the Information + Commissioner who may be contacted at  + + https://ico.org.uk/concerns/ + +  or telephone: +44 303 123 1113. + + +) + +export default HowToComplain diff --git a/src/pages/privacyNotice/adults/HowWeUseInfo.tsx b/src/pages/privacyNotice/adults/HowWeUseInfo.tsx new file mode 100644 index 0000000..64a96c2 --- /dev/null +++ b/src/pages/privacyNotice/adults/HowWeUseInfo.tsx @@ -0,0 +1,199 @@ +import { type FC, type ReactElement } from "react" +import { + ListItemText, + Table, + TableBody, + TableCell, + TableHead, + TableRow, + Typography, +} from "@mui/material" +import { ItemizedList } from "codeforlife/components" + +const CustomTableRow: FC<{ + left: string + right: string | ReactElement +}> = ({ left, right }) => ( + + + {left} + + + {typeof right === "string" ? ( + {right} + ) : ( + + {right} + + )} + + +) + +export interface HowWeUseInfoProps {} + +const HowWeUseInfo: FC = () => ( + <> + + We need all the categories of information that we describe above, so that + we can: + + + + perform our agreement with you and provide you with our services. For + example, to enable you to create an account and to access the portal and + our learning materials. Having an account gives teachers access to + course material, class and individual student management features, and + also it gives students access to the portal in order to learn how to + code within a supported environment (classroom), or independently (at + home). + + + fulfil our legitimate interests, such as our interests to: + + improve our services. + + ensure that our portal is secure and is used in accordance with our + Terms. For example, we may use account information to limit a user + temporarily or permanently from the Code for Life portal if that + user engages in inappropriate use of the site (e.g. giving other + people access to their user account, malicious misuse of the portal, + including spam). + + + send you important information: for example, we use your email + address to send you account verification emails, emails to notify + you about changes to our Terms, or about any maintenance impacting + your access to the portal. Sometimes, we may be required by law to + send you this information. + + + provide customer support and respond to your queries, for example, + when you use the Contact Us form. We strongly advise you not to + disclose personal information (other than name and email address) + when contacting us – messages you exchange on the portal and any + forms you submit to us will be recorded. The Contact Us form is + strictly for the purpose of user support. User-initiated + communication concerning topics other than those relating directly + to the Code for Life portal, including resources or user experience, + may not be answered. Please be aware that we will never ask for + personal information other than what is required to identify your + account and respond to your queries, and we will never ask for your + password. + + + protect our legal rights, for example, if we need to defend + ourselves in court. + + + + + with your permission (or if you are under 13, the permission of the + person who looks after you) to send you marketing communications (for + example, our newsletter or communications about our portal features or + upcoming events). You have the right to change your mind at any time + (see the “Your Rights” section below for more information). + + + with your permission (or if you are under 13, the permission of the + person who looks after you), use cookies to collect information about + how you use our portal, in order to analyse and improve user experience. + This information is usually anonymised and used at an aggregate level. + Please see section “Cookies” below for more information on what + information we collect and how we use cookies. + + + + We summarise below the purposes for which we use your personal data and + the lawful basis on which we rely. + + + + + + + + + + Contractual necessity: to the extent the information is + necessary to fulfil our contract with you (e.g. to ensure that + we provide to you the services that you have requested). + + + Legitimate interests: to the extent the information is necessary + to process queries and effectively manage our relationship with + you as user of our services. + + + Compliance with a legal obligation: to the extent we are + required by law to contact you in order to provide certain + information (for example, to notify you of changes to our Terms) + + + } + /> + + + Your consent, where this is required by law. + + + Otherwise, when consent is not required, we will rely on our + legitimate interest to keep you informed of our services, to the + extent this is permitted by law. + + + } + /> + + + Your consent: where we obtain this information by using cookies. + + + Our legitimate interest to ensure the smooth and effective + functioning of our portal and services, to make sound business + decisions about our services and to design, inform and deploy + our business strategies. + + + } + /> + + + + +
+ + When we rely on legitimate interests to process personal + data, we consider and balance those interests against any potential impact + on you (both positive and negative) and your rights and interests. If we + consider that our interests are overridden by the impact on you, we will + not use your personal data in this way (unless the law gives us another + valid ground to do so). You can obtain further information about how we + assess our legitimate interests against any potential impact on you in + respect of specific activities by contacting us. + + +) + +export default HowWeUseInfo diff --git a/src/pages/privacyNotice/adults/InfoSecurity.tsx b/src/pages/privacyNotice/adults/InfoSecurity.tsx new file mode 100644 index 0000000..42c253b --- /dev/null +++ b/src/pages/privacyNotice/adults/InfoSecurity.tsx @@ -0,0 +1,39 @@ +import { Link, Typography } from "@mui/material" +import { type FC } from "react" + +export interface InfoSecurityProps {} + +const InfoSecurity: FC = () => ( + <> + + We have security measures in place to prevent personal information from + being accidentally lost, or used or accessed in an unauthorised way. We + limit access to your personal information to those persons who have a + genuine business need to know it and we require them to keep it + confidential. + + + We enable Teachers to use two-factor authentication to further reinforce + the security of their accounts and we encourage them to do that. You can + find more details  + + here + + . + + + If you want detailed information from Get Safe Online on how to protect + your information and your computers and devices against fraud, identity + theft, viruses and many other online problems, please visit  + + www.getsafeonline.org + + . Get Safe Online is supported by HM Government and leading businesses. + + +) + +export default InfoSecurity diff --git a/src/pages/privacyNotice/adults/KeepInfo.tsx b/src/pages/privacyNotice/adults/KeepInfo.tsx new file mode 100644 index 0000000..470b1ec --- /dev/null +++ b/src/pages/privacyNotice/adults/KeepInfo.tsx @@ -0,0 +1,24 @@ +import { type FC } from "react" +import { Typography } from "@mui/material" + +export interface KeepInfoProps {} + +const KeepInfo: FC = () => ( + <> + + We will only retain your personal information for as long as you have an + active account, unless we need to retain this information for longer, + after your account is deactivated, in order to protect our legal interests + and establish, exercise or defend a legal claim. If you deactivate your + account, we may anonymise your information and use it for a period of time + in an anonymous format for research and other business purposes, such as + business analytics. + + + For users that have registered but whose accounts are inactive, we will + delete your personal information after 3 years of inactivity. + + +) + +export default KeepInfo diff --git a/src/pages/privacyNotice/adults/OurCommitment.tsx b/src/pages/privacyNotice/adults/OurCommitment.tsx new file mode 100644 index 0000000..7f99127 --- /dev/null +++ b/src/pages/privacyNotice/adults/OurCommitment.tsx @@ -0,0 +1,34 @@ +import { ListItemText, Typography } from "@mui/material" +import { type FC } from "react" +import { ItemizedList } from "codeforlife/components" + +export interface OurCommitmentProps {} + +const OurCommitment: FC = () => ( + <> + + We are deeply committed to creating a safe and secure online learning + environment for all students, teachers, parents and guardians who use the + Code for Life portal. + + + + We strive to give you control over the personal information that you + give us, and we take the protection of your information very seriously. + + + We take extra precautions for the safety and privacy of our younger + learners. Where personal information could be entered, for example when + a student names a level, the teacher is notified via email and the + teacher has the ability to delete the level if its name is rude or + compromising. + + + Our portal only relates to Code for Life and we do not show + advertisements on our website or within our lessons. + + + +) + +export default OurCommitment diff --git a/src/pages/privacyNotice/adults/SharingInfo.tsx b/src/pages/privacyNotice/adults/SharingInfo.tsx new file mode 100644 index 0000000..68f25ad --- /dev/null +++ b/src/pages/privacyNotice/adults/SharingInfo.tsx @@ -0,0 +1,95 @@ +import { Link, ListItemText, Typography } from "@mui/material" +import { type FC } from "react" +import { ItemizedList } from "codeforlife/components" + +export interface SharingInfoProps {} + +const SharingInfo: FC = () => ( + <> + + + We share your personal information with our employees, + to the extent this is necessary for them to perform their tasks, and + with members of our group of companies, for the purposes set out in this + Notice. + + + We also share some limited information with third party{" "} + service providers (as explained below) – these are + companies that help us provide the portal to you, and they also help us + to do all the actions that we describe in this Notice. When we trust our + service providers with your information, we require them to respect the + security of your personal data and to treat it in accordance with the + law. We do not allow our third-party service providers to use your + personal data for their own purposes and only permit them to process + your personal information for specified purposes and in accordance with + our instructions. We use the following types of service providers: + + + IT, email and web service providers + + We share your personal information with our IT, email and web service + providers, in order to enable them to provide us with their services. For + example, we share your name and email address details with DotDigital, a + service provider used for the purposes of sending emails to our users + (such as newsletters, collecting feedback, or any important service + related emails). This data sharing enables us to send you emails, view + when they are opened and view which links are clicked. + + + Surveys, support and feedback providers + + + Freshdesk is our third party customer support tool that enables customers + to contact us through a ticketing system on the website. + + + For more information on Freshdesk’s Privacy Notice, visit  + + https://www.freshworks.com/privacy/ + + . + + + For more information on Freshdesk and GDPR, visit  + + https://freshdesk.com/gdpr + + . + + + We will occasionally ask for feedback on our portal. We will usually do + this via an email which will direct you to our survey provider,{" "} + UsabilityHub. It will only record; time spent, country, + device type, device platform, unless specifically asked within the + questions themselves for example, the survey may ask your age. You can + find out more about UsabilityHub  + + here + + . + + + + If our business or part of our business is sold to another company, + typically customer information would be transferred to that company. + However, that company would still need to comply with this Privacy + Notice and treat personal information as described in this Privacy + Notice. + + + Where necessary, we share personal information with our{" "} + business advisors, such as legal advisors, consultants, + accountants or auditors, for the purposes outlined in this Notice. + + + In the event of a legal dispute, a court order or a legitimate request + from a law enforcement agency or other public authority + , we will share your personal information with our legal advisors, + courts or such public authority, as necessary. + + + +) + +export default SharingInfo diff --git a/src/pages/privacyNotice/adults/TypesOfInfo.tsx b/src/pages/privacyNotice/adults/TypesOfInfo.tsx new file mode 100644 index 0000000..6a72e0e --- /dev/null +++ b/src/pages/privacyNotice/adults/TypesOfInfo.tsx @@ -0,0 +1,157 @@ +import { ListItemText, Typography } from "@mui/material" +import { type FC } from "react" +import { ItemizedList } from "codeforlife/components" + +export interface TypesOfInfoProps {} + +const TypesOfInfo: FC = () => ( + <> + + Your personal data, or personal information, is any information relating + to you. It does not include anonymous information, which cannot be traced + back to you or another person (anonymous data). + + + When you use the Code for Life portal and our services we collect the + following personal information: + + + If you are a Student, we collect: + + + + Your name, password and class code: we collect this information when + your teacher creates an account. + + + Your school / club / teaching or education institution and your class + code and class name, if you are a school Student: your Teacher provides + this information to us. + + + Performance information about your performance and progress (for + example, what levels you have completed and what levels you create), and + + + The coding you create (including any avatars you may create): we collect + this information when you use the Code for Life portal. + + + Your messages and queries you may send us: when you use the “Contact Us” + form or email. + + + When your account was created and when you last logged into your + account: this information is generated at the time your account is + created or you log in. + + + Technical information, such as the IP address and other information + about the device you use to access the Code for Life portal, and + technical information about how you use these (for example, which pages + on our portal you visit, for how long you stay on each page, etc.): when + you navigate the portal and allow the use of non-essential cookies. + + + Data from Code for Life surveys you may take part in. + + + + If you are a Independent Student, we collect: + + + + Your name, email address and password: we collect this information when + you create an account. + + + Performance information about your performance and progress (for + example, what levels you have completed and what levels you create), and + + + The coding you create (including any avatars you may create): we collect + this information when you use the Code for Life portal. + + + Your messages and queries you may send us: when you use the “Contact Us” + form or email. + + + When you created an account and when you last logged in to your account: + this information is generated at the time you create your account or log + in. + + + Technical information, such as the IP address and other information + about the device you use to access the Code for Life portal, and + technical information about how you use these (for example, which pages + on our portal you visit, for how long you stay on each page, etc.): when + you navigate the portal and allow the use of non-essential cookies. + + + Data from Code for Life surveys you may take part in. + + + Your marketing preferences, if you select to sign up to our newsletter. + + + If you are under 13 years old, we will collect the data of your parent + or guardian as you will need to ask them to register on your behalf. + + + + If you are a Teacher, we collect: + + + + Your first and last names, email address and password: we collect this + information when you create an account. + + + Your school / club / teaching or educational institution, the classes + you create, the students you register in each class, and the teachers + you invite; also, any material you create: when you use the portal. + + + Your messages and queries you may send us: when you use the “Contact Us” + form or email. + + + When you created an account and when you last logged in to your account: + this information is generated at the time you create your account or log + in. + + + Technical information, such as the IP address and other information + about the device you use to access the Code for Life portal, and + technical information about how you use these (for example, which pages + on our portal you visit, for how long you stay on each page, etc.): when + you navigate the portal and allow the use of non-essential cookies. + + + Data from Code for Life surveys you may take part in. + + + Your marketing preferences, if you select to sign up to our newsletter. + + + + If you are a Website visitor, we collect: + + + + Technical information, such as the IP address and other information + about the device you use to access the Code for Life portal, and + technical information about how you use these (for example, which pages + on our portal you visit, for how long you stay on each page, etc.): when + you navigate the portal and allow the use of non-essential cookies. + + + Your email address and marketing preferences, if you select to sign up + to our newsletter. + + + +) + +export default TypesOfInfo diff --git a/src/pages/privacyNotice/adults/WhoWeAre.tsx b/src/pages/privacyNotice/adults/WhoWeAre.tsx new file mode 100644 index 0000000..5680000 --- /dev/null +++ b/src/pages/privacyNotice/adults/WhoWeAre.tsx @@ -0,0 +1,21 @@ +import { type FC } from "react" +import { Typography } from "@mui/material" + +export interface WhoWeAreProps {} + +const WhoWeAre: FC = () => ( + <> + + We are a company called “Ocado Innovation Limited” or “Ocado Technology”, + and we own the Code for Life learning portal. In this notice, we also use + the name “Ocado” when we refer to us. Our office is at Buildings 1 & 2 + Trident Place, Hatfield Business Park, Mosquito Way, Hatfield, AL10 9UL. + + + We are responsible for the personal information we collect about you on + the Code for Life portal. + + +) + +export default WhoWeAre diff --git a/src/pages/privacyNotice/adults/YourRights.tsx b/src/pages/privacyNotice/adults/YourRights.tsx new file mode 100644 index 0000000..9da5466 --- /dev/null +++ b/src/pages/privacyNotice/adults/YourRights.tsx @@ -0,0 +1,86 @@ +import { Link, ListItemText, Typography } from "@mui/material" +import { type FC } from "react" +import { ItemizedList } from "codeforlife/components" + +export interface YourRightsProps {} + +const YourRights: FC = () => ( + <> + + Under data protection laws, you have certain rights in relation to your + personal information, which you can exercise free of charge. In summary, + those include the right to: + + + + request a copy of your personal information and to certain other extra + information that this Privacy Notice is already designed to address; + + + require us to correct any mistakes in your information which we hold; + + + require the erasure of personal information concerning you in certain + situations; + + + receive the personal information concerning you which you have provided + to us, in a structured, commonly used and machine-readable format (e.g. + in pdf or .csv format) and have the right to transmit those data to a + third party in certain situations; + + + object (say no) at any time to processing of personal information + concerning you for direct marketing; + + + object (say no) in certain other situations to our continued processing + of your personal information; + + + otherwise require us to only store but not use your personal information + in certain circumstances; + + + where you have given your permission for us to use your information, to + change your mind at any time. + + + + Please note these rights may be limited, for example if + fulfilling your request would reveal personal data about another person or + if you ask us to delete information which we are required by law to keep + or have compelling legitimate interests in keeping. We will inform you of + the relevant exemptions upon which we rely when responding to any request + you make. + + + If you would like to exercise any of those rights, please: + + + + email our Data Protection Officer at  + + individualrights@ocado.com + + ; + + + let us have enough information to identify you (e.g. username, full name + and email address); and + + + let us know (if possible) the information to which your request relates. + + + + If you would like to unsubscribe from any email newsletter or other + promotional emails, you can click on the unsubscribe link which you can + find at the bottom of our emails, in order to be removed from our mailing + list. It could take up to 72 hours to process the update through our + systems. + + +) + +export default YourRights diff --git a/src/pages/privacyNotice/children/Children.tsx b/src/pages/privacyNotice/children/Children.tsx new file mode 100644 index 0000000..e69de29 diff --git a/src/routes/general.tsx b/src/routes/general.tsx index 28d30d9..f179a68 100644 --- a/src/routes/general.tsx +++ b/src/routes/general.tsx @@ -1,21 +1,21 @@ import { Route } from "react-router-dom" +// import Contribute from '../pages/contribute/Contribute'; +// import HomeLearning from '../pages/homeLearning/HomeLearning'; +// import TermsOfUse from '../pages/termsOfUse/TermsOfUse'; import AboutUs from "../pages/aboutUs/AboutUs" import CodingClubs from "../pages/codingClubs/CodingClubs" import GetInvolved from "../pages/getInvolved/GetInvolved" import Home from "../pages/home/Home" -// import Contribute from '../../pages/contribute/Contribute'; -// import HomeLearning from '../../pages/homeLearning/HomeLearning'; -// import PrivacyNotice from '../../pages/privacyNotice/PrivacyNotice'; -// import TermsOfUse from '../../pages/termsOfUse/TermsOfUse'; +import PrivacyNotice from "../pages/privacyNotice/PrivacyNotice" import paths from "./paths" const general = ( <> } /> } /> - {/* } /> */} - {/* } /> */} + } /> + {/* } /> */} {/* } /> */} } /> } /> From 9c461e5e8b184498eb17e51c9089bbae5fa3ffce Mon Sep 17 00:00:00 2001 From: SKairinos Date: Thu, 19 Sep 2024 14:37:24 +0000 Subject: [PATCH 06/25] children --- src/pages/privacyNotice/PrivacyNotice.tsx | 12 +- .../children/ChangeOfPurpose.tsx | 18 ++ .../children/ChangesToPrivacyNotice.tsx | 17 ++ src/pages/privacyNotice/children/Children.tsx | 101 ++++++++++ src/pages/privacyNotice/children/Cookies.tsx | 175 ++++++++++++++++++ .../privacyNotice/children/ExtraHelp.tsx | 16 ++ .../children/HowLongWeKeepData.tsx | 25 +++ .../privacyNotice/children/HowToComplain.tsx | 32 ++++ .../privacyNotice/children/HowToContactUs.tsx | 19 ++ .../privacyNotice/children/HowWeUseInfo.tsx | 73 ++++++++ .../children/KeepingInfoSecure.tsx | 21 +++ .../privacyNotice/children/PersonalInfo.tsx | 67 +++++++ src/pages/privacyNotice/children/WhoWeAre.tsx | 18 ++ .../children/WhoWeShareInfoWith.tsx | 55 ++++++ .../privacyNotice/children/YourRights.tsx | 50 +++++ 15 files changed, 693 insertions(+), 6 deletions(-) create mode 100644 src/pages/privacyNotice/children/ChangeOfPurpose.tsx create mode 100644 src/pages/privacyNotice/children/ChangesToPrivacyNotice.tsx create mode 100644 src/pages/privacyNotice/children/Cookies.tsx create mode 100644 src/pages/privacyNotice/children/ExtraHelp.tsx create mode 100644 src/pages/privacyNotice/children/HowLongWeKeepData.tsx create mode 100644 src/pages/privacyNotice/children/HowToComplain.tsx create mode 100644 src/pages/privacyNotice/children/HowToContactUs.tsx create mode 100644 src/pages/privacyNotice/children/HowWeUseInfo.tsx create mode 100644 src/pages/privacyNotice/children/KeepingInfoSecure.tsx create mode 100644 src/pages/privacyNotice/children/PersonalInfo.tsx create mode 100644 src/pages/privacyNotice/children/WhoWeAre.tsx create mode 100644 src/pages/privacyNotice/children/WhoWeShareInfoWith.tsx create mode 100644 src/pages/privacyNotice/children/YourRights.tsx diff --git a/src/pages/privacyNotice/PrivacyNotice.tsx b/src/pages/privacyNotice/PrivacyNotice.tsx index 4d80bd7..3532f31 100644 --- a/src/pages/privacyNotice/PrivacyNotice.tsx +++ b/src/pages/privacyNotice/PrivacyNotice.tsx @@ -3,7 +3,7 @@ import { type FC } from "react" import { getParam } from "codeforlife/utils/router" import Adults from "./adults/Adults" -// import Children from "./children/Children" +import Children from "./children/Children" import { paths } from "../../routes" export interface PrivacyNoticeProps {} @@ -19,11 +19,11 @@ const PrivacyNotice: FC = () => ( children: , path: getParam(paths.privacyNotice.tab.privacyNotice, "tab"), }, - // { - // label: "Child-friendly", - // children: , - // path: getParam(paths.privacyNotice.tab.childFriendly, "tab"), - // }, + { + label: "Child-friendly", + children: , + path: getParam(paths.privacyNotice.tab.childFriendly, "tab"), + }, ]} /> diff --git a/src/pages/privacyNotice/children/ChangeOfPurpose.tsx b/src/pages/privacyNotice/children/ChangeOfPurpose.tsx new file mode 100644 index 0000000..769c0a4 --- /dev/null +++ b/src/pages/privacyNotice/children/ChangeOfPurpose.tsx @@ -0,0 +1,18 @@ +import { type FC } from "react" +import { Typography } from "@mui/material" + +export interface ChangeOfPurposeProps {} + +const ChangeOfPurpose: FC = () => ( + <> + + We will only use your personal information for the reasons we collected it + or for other similar reasons. If we need to use your personal information + for a different reason, we will tell you. We do not always need your + consent to use your personal information, and we will not ask for your + consent unless the law says we need it. + + +) + +export default ChangeOfPurpose diff --git a/src/pages/privacyNotice/children/ChangesToPrivacyNotice.tsx b/src/pages/privacyNotice/children/ChangesToPrivacyNotice.tsx new file mode 100644 index 0000000..b3a22d8 --- /dev/null +++ b/src/pages/privacyNotice/children/ChangesToPrivacyNotice.tsx @@ -0,0 +1,17 @@ +import { type FC } from "react" +import { Typography } from "@mui/material" + +export interface ChangesToPrivacyNoticeProps {} + +const ChangesToPrivacyNotice: FC = () => ( + <> + + We may need to make changes to this Privacy Notice from time to time, so + it’s a good idea to check it regularly. If we do ever change anything then + we'll be sure to let you know (e.g. by sending you an email or + posting an update on the Code for Life website). + + +) + +export default ChangesToPrivacyNotice diff --git a/src/pages/privacyNotice/children/Children.tsx b/src/pages/privacyNotice/children/Children.tsx index e69de29..ce7300f 100644 --- a/src/pages/privacyNotice/children/Children.tsx +++ b/src/pages/privacyNotice/children/Children.tsx @@ -0,0 +1,101 @@ +import * as pages from "codeforlife/components/page" +import { type FC } from "react" +import { Link } from "codeforlife/components/router" +import { Typography } from "@mui/material" + +import ChangeOfPurpose from "./ChangeOfPurpose" +import ChangesToPrivacyNotice from "./ChangesToPrivacyNotice" +import Cookies from "./Cookies" +import ExtraHelp from "./ExtraHelp" +import HowLongWeKeepData from "./HowLongWeKeepData" +import HowToComplain from "./HowToComplain" +import HowToContactUs from "./HowToContactUs" +import HowWeUseInfo from "./HowWeUseInfo" +import KeepingInfoSecure from "./KeepingInfoSecure" +import PersonalInfo from "./PersonalInfo" +import { TableOfContents } from "../../../components" +import WhoWeAre from "./WhoWeAre" +import WhoWeShareInfoWith from "./WhoWeShareInfoWith" +import YourRights from "./YourRights" +import { paths } from "../../../routes" + +export interface ChildrenProps {} + +const Children: FC = () => ( + + Last Updated: 25th January 2023 + + This Privacy Notice will tell you what information we collect about you, + how we use it, who we share it with, how long we keep it and how you can + ask us about it. + + + This is the version of the Privacy Notice without all the legal jargon (we + understand how overly complicated some privacy policies can be!) A full + version of the Privacy Notice can be found by clicking  + here. + + + What we mean by ‘personal information’ is any information that can be used + to identify you, such as your name and email address. + + , + }, + { + header: "Personal information we collect about you", + children: , + }, + { + header: "How we will use the information", + children: , + }, + { + header: "Change of purpose", + children: , + }, + { + header: "Cookies & Similar technologies", + children: , + }, + { + header: "Who might we share your personal information with?", + children: , + }, + { + header: "How long will we keep your personal data?", + children: , + }, + { + header: "Your rights", + children: , + }, + { + header: "Keeping your information secure", + children: , + }, + { + header: "How to complain", + children: , + }, + { + header: "Changes to the Privacy Notice", + children: , + }, + { + header: "How to contact us", + children: , + }, + { + header: "Do you need extra help?", + children: , + }, + ]} + /> + +) + +export default Children diff --git a/src/pages/privacyNotice/children/Cookies.tsx b/src/pages/privacyNotice/children/Cookies.tsx new file mode 100644 index 0000000..ed6dff9 --- /dev/null +++ b/src/pages/privacyNotice/children/Cookies.tsx @@ -0,0 +1,175 @@ +import { + Button, + Link, + Table, + TableBody, + TableCell, + TableHead, + TableRow, + Typography, +} from "@mui/material" +import { type FC } from "react" +import { toggleOneTrustInfoDisplay } from "codeforlife/utils/window" + +const CustomTableRow: FC<{ + withoutUnderline?: boolean + typesOfCookies: string + purpose: React.ReactNode + howLong: string +}> = ({ withoutUnderline = false, typesOfCookies, purpose, howLong }) => ( + + + + {typesOfCookies} + + + + {typeof purpose === "string" ? ( + {purpose} + ) : ( + purpose + )} + + + {howLong} + + +) + +export interface CookiesProps {} + +const Cookies: FC = () => ( + <> + + We will only use your personal information for the reasons we collected it + or for other similar reasons. If we need to use your personal information + for a different reason, we will tell you. We do not always need your + consent to use your personal information, and we will not ask for your + consent unless the law says we need it. + + + Please see the “What are cookies” (not the edible kind!) section below for + more information on what information we collect and how we use cookies. + + What are cookies? + + Cookies are tiny files that have information (data) in them. When you + visit our site, we may put some cookies on the device you use. Cookies + allow us to remember things like when you visit our site. They help us + understand how you are using the Code for Life portal, as well as which + parts of our portal are popular and which ones we need to make better. + + + We also make use of things called “web beacons” or “pixels.” These are + similar to cookies and allow us to keep an eye on how well our website is + working and look for ways to improve it. To keep things simple, when we + talk about cookies in this Privacy Notice, we also mean web beacons and + pixels. + + Types of cookies used + + You can see all the different cookies we use and what we use them for + below. + + + + + + + + + + + These cookies help us understand how you use our site, so we can + improve the service we provide. This can be anything like which + pages you go to most often and if you get error messages from + web pages. They allow us to measure how visitors use the portal + (for example which parts of the website are clicked on and the + length of time between clicks). + + + We use other companies called ( + + Google Analytics + +  and  + + Mouseflow + + ) to help us collect information from these cookies (see the + “Third-party cookies” section below). + + + } + howLong="24 months" + /> + +
+ Third party cookies + + We work with other companies to run the analytics cookies on our portal, + including Google, who provides our Google Analytics cookie, and Mouseflow. + They might also collect information from websites that are not ours. We + explain in more detail below what information they collect and how it is + used. We do not let other companies show ads on our portal. + + + Google Analytics. We use Google Analytics (which is run + by Google) to help us understand how you use our site. The information it + collects about your use of the website (including your IP address) will be + stored by Google in the United States. Google may pass this information to + other organisations who help them to interpret this information. They may + also pass the information to other organisations if the law says they have + to do so. If you choose to allow analytics / performance cookies on our + site, you are consenting to Google using your data for the reasons above. + + + Mouseflow. We also use Mouseflow to help us understand + how our site is used and which areas are mostly used. It uses cookies to + record information such as when you click on or move your mouse, when you + scroll or press a key, what pages you visit on our website, how much time + you spend on each page, and also information about the device you use + (like the device type (desktop/tablet/phone), location (city/country) and + language). Mouseflow does not collect any information on pages where it is + not installed and does not track or collect information outside your web + browser. + + Managing and disabling cookies + + You can switch the functional and analytics cookies on and off at any time + by clicking this button below. + + + + You cannot switch strictly necessary cookies off as our website won’t work + properly without them. + + +) + +export default Cookies diff --git a/src/pages/privacyNotice/children/ExtraHelp.tsx b/src/pages/privacyNotice/children/ExtraHelp.tsx new file mode 100644 index 0000000..1efc7d2 --- /dev/null +++ b/src/pages/privacyNotice/children/ExtraHelp.tsx @@ -0,0 +1,16 @@ +import { type FC } from "react" +import { Typography } from "@mui/material" + +export interface ExtraHelpProps {} + +const ExtraHelp: FC = () => ( + <> + + If you would like this Privacy Notice in another format (for example, + audio, large print, braille), please contact us (see the “How to contact + us” section above). + + +) + +export default ExtraHelp diff --git a/src/pages/privacyNotice/children/HowLongWeKeepData.tsx b/src/pages/privacyNotice/children/HowLongWeKeepData.tsx new file mode 100644 index 0000000..53f74fd --- /dev/null +++ b/src/pages/privacyNotice/children/HowLongWeKeepData.tsx @@ -0,0 +1,25 @@ +import { type FC } from "react" +import { Typography } from "@mui/material" + +export interface HowLongWeKeepDataProps {} + +const HowLongWeKeepData: FC = () => ( + <> + + We’ll only retain your personal information for as long as you have an + active account on Code for Life, unless we need to keep it for longer than + this to help us defend a legal claim. + + + Once you deactivate your account, we might keep an anonymous version of + your information to help us with research and other business reasons like + assessing how the business is performing and planning for the future. + + + For users that have registered but whose accounts are inactive, we’ll + delete your personal information after 3 years of inactivity. + + +) + +export default HowLongWeKeepData diff --git a/src/pages/privacyNotice/children/HowToComplain.tsx b/src/pages/privacyNotice/children/HowToComplain.tsx new file mode 100644 index 0000000..f81b264 --- /dev/null +++ b/src/pages/privacyNotice/children/HowToComplain.tsx @@ -0,0 +1,32 @@ +import { Link, Typography } from "@mui/material" +import { type FC } from "react" + +export interface HowToComplainProps {} + +const HowToComplain: FC = () => ( + <> + + If you have a complaint about how we’ve used your personal information, + you can write to our Data Protection Officer at  + + individualrights@ocado.com + + . + + + You also have the right to complain to the Information Commissioner’s + Office (the ICO). The ICO’s role is to make sure organisations like Ocado + use your personal information fairly and keep it safe. You may contact the + ICO by telephoning them on the number below or by visiting their website. + + Telephone: 0303 123 1113 + + Website:  + + https://ico.org.uk/concerns + + + +) + +export default HowToComplain diff --git a/src/pages/privacyNotice/children/HowToContactUs.tsx b/src/pages/privacyNotice/children/HowToContactUs.tsx new file mode 100644 index 0000000..851ba99 --- /dev/null +++ b/src/pages/privacyNotice/children/HowToContactUs.tsx @@ -0,0 +1,19 @@ +import { Link, Typography } from "@mui/material" +import { type FC } from "react" + +export interface HowToContactUsProps {} + +const HowToContactUs: FC = () => ( + <> + + Please contact our Data Protection Officer at  + + individualrights@ocado.com + +  if you have any questions about this Privacy Notice or the + information we hold about you. + + +) + +export default HowToContactUs diff --git a/src/pages/privacyNotice/children/HowWeUseInfo.tsx b/src/pages/privacyNotice/children/HowWeUseInfo.tsx new file mode 100644 index 0000000..be91fdd --- /dev/null +++ b/src/pages/privacyNotice/children/HowWeUseInfo.tsx @@ -0,0 +1,73 @@ +import { ListItemText, Typography } from "@mui/material" +import { type FC } from "react" +import { ItemizedList } from "codeforlife/components" +import { Link } from "codeforlife/components/router" + +import { paths } from "../../../routes" + +export interface HowWeUseInfoProps {} + +const HowWeUseInfo: FC = () => ( + <> + + The UK’s Data Protection rules say that we have to have a lawful reason to + process your personal information (“lawful” meaning that the law allows us + to use your information in that way). + + + Below we’ve listed the lawful reasons which allow us to process your + information for the Code of Life Website: + + + Contract: We have to collect some personal information + about you so we can provide you with the services we offer on the Code for + Life website. For example, we need your name and a password so you can + create an account and access our website and learning materials. This + means you can access the portal and learn how to code with the support of + your teacher and classmates, or work on your own/with a guardian if you + are an independent student. + + + Legitimate Interests: We collect personal information to: + + + + Help us improve the website and the services we can offer to you, + + + Help make sure that our portal is safe and secure and that users are + following our  + Terms of Use. For + example, we might need to use account information to block a user from + Code for Life temporarily or permanently if they misuse the site (e.g. + by giving other people access to their account), + + + If you are over 13, we need your email address to inform you about + updates or changes to our service: for example, to let you know about + any changes to our Terms of Use, or about any work we are carrying out + that might affect when you can log on to the site. Sometimes, we may be + required by law to send you this information, + + + We will need to use your personal information to answer any questions + you’ve asked using the ‘Contact Us’ form. Messages you send and receive + through the site and any forms you send to us will be recorded. The + Contact Us form is strictly for the purpose of user support. + User-initiated communication concerning topics other than those relating + directly to the Code for Life portal, including resources or user + experience, may not be answered. Please be aware that we will never ask + for personal information other than what is required to identify your + account and respond to your queries, and we will never ask for your + password, + + + If you or your parent and guardian should make a legal claim against us, + we may need to process your personal information to help defend + ourselves against that claim. + + + +) + +export default HowWeUseInfo diff --git a/src/pages/privacyNotice/children/KeepingInfoSecure.tsx b/src/pages/privacyNotice/children/KeepingInfoSecure.tsx new file mode 100644 index 0000000..6bcc824 --- /dev/null +++ b/src/pages/privacyNotice/children/KeepingInfoSecure.tsx @@ -0,0 +1,21 @@ +import { type FC } from "react" +import { Typography } from "@mui/material" + +export interface KeepingInfoSecureProps {} + +const KeepingInfoSecure: FC = () => ( + <> + + Everyone at Ocado understands the need to keep your personal information + safe so we’ve put steps in place to help prevent it from being + accidentally lost or used in ways you wouldn’t expect. + + + Only those people in Ocado who have a business need to know your personal + information are allowed to have access to it, and they have to keep it + confidential. + + +) + +export default KeepingInfoSecure diff --git a/src/pages/privacyNotice/children/PersonalInfo.tsx b/src/pages/privacyNotice/children/PersonalInfo.tsx new file mode 100644 index 0000000..fa6165d --- /dev/null +++ b/src/pages/privacyNotice/children/PersonalInfo.tsx @@ -0,0 +1,67 @@ +import { ListItemText, Typography } from "@mui/material" +import { type FC } from "react" +import { ItemizedList } from "codeforlife/components" + +export interface PersonalInfoProps {} + +const PersonalInfo: FC = () => ( + <> + + When you are signed up to a class by a teacher on our + Code for Life website, we will collect the following personal information + about you: + + + Your name, + + Your password (this is encrypted which means we won’t be able to see the + password you’ve chosen), + + + Information about your performance and progress (for example, what + levels you have completed and what levels you create), + + The code you’ve created on our website, + + Any messages you send us when you use the “Contact Us” form or email, + + + The date your Code for Life account was created and the date you last + logged in, + + + The IP address (this is a unique number which identifies the device + you’ve used to log on to the Code for Life site) and other information + about that device, + + + Information about how you use the site, such as which pages you’ve + visited and how long you stayed on each page. (We will only do this + where you have allowed cookies – see the “Cookies and similar + technologies” section for more details), + + + + If you sign up as an independent student for our Code for + Life website, then we will also collect the following information about + you: + + + Your email address, + + The answers you give any Code for Life surveys you might fill in, + although these are mostly anonymous, + + + The marketing choices you have selected, if you are over 18 years of age + and have signed up for our newsletter. + + + + If you are under 13 years old, you will need to ask a parent or guardian + to register for you and we will collect personal information about them. + + +) + +export default PersonalInfo diff --git a/src/pages/privacyNotice/children/WhoWeAre.tsx b/src/pages/privacyNotice/children/WhoWeAre.tsx new file mode 100644 index 0000000..0f4246a --- /dev/null +++ b/src/pages/privacyNotice/children/WhoWeAre.tsx @@ -0,0 +1,18 @@ +import { type FC } from "react" +import { Typography } from "@mui/material" + +export interface WhoWeAreProps {} + +const WhoWeAre: FC = () => ( + <> + + We are a company called “Ocado Innovation Limited” or “Ocado Technology”, + and we run the Code for Life learning website. From now on in the Privacy + Notice, we’ll just use the name “Ocado” to mean us. Our office is at + Buildings 1 & 2 Trident Place, Hatfield Business Park, Mosquito Way, + Hatfield, AL10 9UL, United Kingdom. + + +) + +export default WhoWeAre diff --git a/src/pages/privacyNotice/children/WhoWeShareInfoWith.tsx b/src/pages/privacyNotice/children/WhoWeShareInfoWith.tsx new file mode 100644 index 0000000..b5e292b --- /dev/null +++ b/src/pages/privacyNotice/children/WhoWeShareInfoWith.tsx @@ -0,0 +1,55 @@ +import { Link, Typography } from "@mui/material" +import { type FC } from "react" + +export interface WhoWeShareInfoWithProps {} + +const WhoWeShareInfoWith: FC = () => ( + <> + + Your personal information will be shared with the Code for Life Team in + Ocado, so they can set up and run your account. + + + We may also share a small amount of information with organisations that + provide email services to help us run the Code for Life website. + + + For example, we share your name and email address details with DotDigital, + a company that sends emails to users on our behalf (such as when we want + to collect your feedback or need to give you important email updates about + our service). This data sharing also allows us to view when your emails + have been opened. + + + Another company we share personal data with is Freshdesk. They help us + keep track of the questions users send using the Contact Us form, so we + can reply to them more quickly. + + + We also use a survey company called UsabilityHub to help us carry out + surveys. UsabilityHub records time spent on the site, country, device + type, device platform alongside any questions that we may ask you in our + surveys (for example, the survey may ask your age). You can find out more + about UsabilityHub  + + here + + . + + + We’ll only share your personal information with organisations mentioned in + this Privacy Notice. They all sign an agreement to say that they will keep + your personal information as safe and secure as we do, and that they will + strictly follow our instructions on how your data can be used. + + + Finally, we may need to share your information for legal reasons, such as + if we sold our business to another company, if our business advisors + needed the information to help us achieve the purposes in this Privacy + Notice, or to respond to law enforcement or court requests if there is a + legal problem. + + +) + +export default WhoWeShareInfoWith diff --git a/src/pages/privacyNotice/children/YourRights.tsx b/src/pages/privacyNotice/children/YourRights.tsx new file mode 100644 index 0000000..04708b7 --- /dev/null +++ b/src/pages/privacyNotice/children/YourRights.tsx @@ -0,0 +1,50 @@ +import { Link, ListItemText, Typography } from "@mui/material" +import { type FC } from "react" +import { ItemizedList } from "codeforlife/components" + +export interface YourRightsProps {} + +const YourRights: FC = () => ( + <> + + Depending on where you live, you may have the rights to: + + + + ask us for a copy of the personal information we hold about you, + + + have any mistakes in your personal information corrected, + + + ask us to limit how we use your personal information, + + + ask for your personal information to be deleted, + + + ask us give copies of your personal data to another organisation, + + + object (say no) to how we are using your personal information, + + + ask us to store but not use your personal information, + + + change your mind about giving us consent to use your personal data. + + + + If you would like to use any of these rights listed above, please email + our Data Protection Officer at  + + individualrights@ocado.com + + . Depending on where you live, you may need help from a parent or guardian + to use your rights. + + +) + +export default YourRights From 14da5b2bf7806663af16366ebb84d23bcad29a9e Mon Sep 17 00:00:00 2001 From: SKairinos Date: Thu, 19 Sep 2024 14:40:41 +0000 Subject: [PATCH 07/25] relock --- yarn.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index e1a778f..416e85c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1617,9 +1617,9 @@ integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== "@polka/url@^1.0.0-next.24": - version "1.0.0-next.27" - resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.27.tgz#527e8df13dea13ab68d347d20ba9432cadb867a8" - integrity sha512-MU0SYgcrBdSVLu7Tfow3VY4z1odzlaTYRjt3WQ0z8XbjDWReuy+EALt2HdjhrwD2HPiW2GY+KTSw4HLv4C/EOA== + version "1.0.0-next.28" + resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.28.tgz#d45e01c4a56f143ee69c54dd6b12eade9e270a73" + integrity sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw== "@popperjs/core@^2.11.8": version "2.11.8" @@ -2709,9 +2709,9 @@ clsx@^2.1.0, clsx@^2.1.1: resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.1.1.tgz#eed397c9fd8bd882bfb18deab7102049a2f32999" integrity sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA== -"codeforlife@github:ocadotechnology/codeforlife-package-javascript#v2.3.4": +"codeforlife@github:ocadotechnology/codeforlife-package-javascript#portal-frontend-5": version "2.3.4" - resolved "https://codeload.github.com/ocadotechnology/codeforlife-package-javascript/tar.gz/65d24599eb0c91d775782ca1ce38eebe444d76dc" + resolved "https://codeload.github.com/ocadotechnology/codeforlife-package-javascript/tar.gz/d60626abc75d323e8b02c10c3027509318fe6966" dependencies: "@emotion/react" "^11.10.6" "@emotion/styled" "^11.10.6" From d9144b9f3dd26923a219c66a1ac9d573322d966d Mon Sep 17 00:00:00 2001 From: SKairinos Date: Thu, 19 Sep 2024 14:54:38 +0000 Subject: [PATCH 08/25] New version --- src/pages/privacyNotice/adults/Adults.tsx | 2 +- src/pages/privacyNotice/adults/Cookies.tsx | 9 +++++++++ src/pages/privacyNotice/children/Children.tsx | 2 +- src/pages/privacyNotice/children/Cookies.tsx | 9 +++++++++ src/routes/general.tsx | 4 ++-- 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/pages/privacyNotice/adults/Adults.tsx b/src/pages/privacyNotice/adults/Adults.tsx index ea9f67c..e3b829f 100644 --- a/src/pages/privacyNotice/adults/Adults.tsx +++ b/src/pages/privacyNotice/adults/Adults.tsx @@ -22,7 +22,7 @@ export interface AdultsProps {} const Adults: FC = () => ( - Last Updated: 25th January 2023 + Last Updated: 11th April 2024 Please read this notice carefully. This notice contains important information on who manages the Code for Life portal, how and why we diff --git a/src/pages/privacyNotice/adults/Cookies.tsx b/src/pages/privacyNotice/adults/Cookies.tsx index b05dcf0..5adcde7 100644 --- a/src/pages/privacyNotice/adults/Cookies.tsx +++ b/src/pages/privacyNotice/adults/Cookies.tsx @@ -156,6 +156,15 @@ const Cookies: FC = () => ( not collect any information on pages where it is not installed, nor does it track or collect information outside your web browser. + + YouTube. While embedded YouTube videos on our website do + not use cookies, your browser's Local Storage may be used by the + video platform provider to enhance your viewing experience and collect + analytics data. This data enables the platform to track your interaction + with the video content and may gather information about your device and + browsing behavior. The use of Local Storage by embedded video providers is + subject to their respective policies. + 6.4 Managing and disabling cookies We make available a cookie management platform on our portal (provided diff --git a/src/pages/privacyNotice/children/Children.tsx b/src/pages/privacyNotice/children/Children.tsx index ce7300f..3cda0be 100644 --- a/src/pages/privacyNotice/children/Children.tsx +++ b/src/pages/privacyNotice/children/Children.tsx @@ -23,7 +23,7 @@ export interface ChildrenProps {} const Children: FC = () => ( - Last Updated: 25th January 2023 + Last Updated: 11th April 2024 This Privacy Notice will tell you what information we collect about you, how we use it, who we share it with, how long we keep it and how you can diff --git a/src/pages/privacyNotice/children/Cookies.tsx b/src/pages/privacyNotice/children/Cookies.tsx index ed6dff9..82c26a6 100644 --- a/src/pages/privacyNotice/children/Cookies.tsx +++ b/src/pages/privacyNotice/children/Cookies.tsx @@ -157,6 +157,15 @@ const Cookies: FC = () => ( not installed and does not track or collect information outside your web browser. + + YouTube. While embedded YouTube videos on our website do + not use cookies, your browser's Local Storage may be used by the + video platform provider to enhance your viewing experience and collect + analytics data. This data enables the platform to track your interaction + with the video content and may gather information about your device and + browsing behavior. The use of Local Storage by embedded video providers is + subject to their respective policies. + Managing and disabling cookies You can switch the functional and analytics cookies on and off at any time diff --git a/src/routes/general.tsx b/src/routes/general.tsx index f179a68..4d811ad 100644 --- a/src/routes/general.tsx +++ b/src/routes/general.tsx @@ -14,8 +14,8 @@ const general = ( <> } /> } /> - } /> - {/* } /> */} + } /> + {/* } /> */} {/* } /> */} } /> } /> From ea9efe3f378b0d3315f1b99d831fbd327ade4b37 Mon Sep 17 00:00:00 2001 From: SKairinos Date: Thu, 19 Sep 2024 15:02:59 +0000 Subject: [PATCH 09/25] fix links --- src/pages/privacyNotice/adults/ContactUs.tsx | 5 +++-- src/pages/privacyNotice/adults/Cookies.tsx | 8 ++++---- src/pages/privacyNotice/adults/HowToComplain.tsx | 5 +++-- src/pages/privacyNotice/adults/InfoSecurity.tsx | 7 ++++--- src/pages/privacyNotice/adults/SharingInfo.tsx | 9 +++++---- src/pages/privacyNotice/adults/YourRights.tsx | 5 +++-- src/pages/privacyNotice/children/Cookies.tsx | 6 +++--- src/pages/privacyNotice/children/HowToComplain.tsx | 7 ++++--- src/pages/privacyNotice/children/HowToContactUs.tsx | 5 +++-- src/pages/privacyNotice/children/WhoWeShareInfoWith.tsx | 5 +++-- src/pages/privacyNotice/children/YourRights.tsx | 5 +++-- 11 files changed, 38 insertions(+), 29 deletions(-) diff --git a/src/pages/privacyNotice/adults/ContactUs.tsx b/src/pages/privacyNotice/adults/ContactUs.tsx index d488d4a..91e0afa 100644 --- a/src/pages/privacyNotice/adults/ContactUs.tsx +++ b/src/pages/privacyNotice/adults/ContactUs.tsx @@ -1,5 +1,6 @@ -import { Link, Typography } from "@mui/material" import { type FC } from "react" +import { Link } from "codeforlife/components/router" +import { Typography } from "@mui/material" export interface ContactUsProps {} @@ -7,7 +8,7 @@ const ContactUs: FC = () => ( <> Please contact our Data Protection Officer or us at  - + individualrights@ocado.com  if you have any questions about this Privacy Notice or the diff --git a/src/pages/privacyNotice/adults/Cookies.tsx b/src/pages/privacyNotice/adults/Cookies.tsx index 5adcde7..9c8572c 100644 --- a/src/pages/privacyNotice/adults/Cookies.tsx +++ b/src/pages/privacyNotice/adults/Cookies.tsx @@ -1,6 +1,5 @@ import { Button, - Link, Table, TableBody, TableCell, @@ -9,6 +8,7 @@ import { Typography, } from "@mui/material" import { type FC } from "react" +import { Link } from "codeforlife/components/router" import { toggleOneTrustInfoDisplay } from "codeforlife/utils/window" const CustomTableRow: FC<{ @@ -100,13 +100,13 @@ const Cookies: FC = () => ( We use third-party web analytics software on our portal ( Google Analytics  and  - + Mouseflow ). We provide further information about these partners below. @@ -169,7 +169,7 @@ const Cookies: FC = () => ( We make available a cookie management platform on our portal (provided by  - + OneTrust ), through which you can turn off non-essential cookies at any time. diff --git a/src/pages/privacyNotice/adults/HowToComplain.tsx b/src/pages/privacyNotice/adults/HowToComplain.tsx index eee42e4..b0899fc 100644 --- a/src/pages/privacyNotice/adults/HowToComplain.tsx +++ b/src/pages/privacyNotice/adults/HowToComplain.tsx @@ -1,5 +1,6 @@ -import { Link, Typography } from "@mui/material" import { type FC } from "react" +import { Link } from "codeforlife/components/router" +import { Typography } from "@mui/material" export interface HowToComplainProps {} @@ -17,7 +18,7 @@ const HowToComplain: FC = () => ( normally live or where any alleged infringement of data protection laws occurred. The data protection authority in the UK is the Information Commissioner who may be contacted at  - + https://ico.org.uk/concerns/  or telephone: +44 303 123 1113. diff --git a/src/pages/privacyNotice/adults/InfoSecurity.tsx b/src/pages/privacyNotice/adults/InfoSecurity.tsx index 42c253b..ecd90b6 100644 --- a/src/pages/privacyNotice/adults/InfoSecurity.tsx +++ b/src/pages/privacyNotice/adults/InfoSecurity.tsx @@ -1,5 +1,6 @@ -import { Link, Typography } from "@mui/material" import { type FC } from "react" +import { Link } from "codeforlife/components/router" +import { Typography } from "@mui/material" export interface InfoSecurityProps {} @@ -17,7 +18,7 @@ const InfoSecurity: FC = () => ( the security of their accounts and we encourage them to do that. You can find more details  here @@ -28,7 +29,7 @@ const InfoSecurity: FC = () => ( If you want detailed information from Get Safe Online on how to protect your information and your computers and devices against fraud, identity theft, viruses and many other online problems, please visit  - + www.getsafeonline.org . Get Safe Online is supported by HM Government and leading businesses. diff --git a/src/pages/privacyNotice/adults/SharingInfo.tsx b/src/pages/privacyNotice/adults/SharingInfo.tsx index 68f25ad..dc7adae 100644 --- a/src/pages/privacyNotice/adults/SharingInfo.tsx +++ b/src/pages/privacyNotice/adults/SharingInfo.tsx @@ -1,6 +1,7 @@ -import { Link, ListItemText, Typography } from "@mui/material" +import { ListItemText, Typography } from "@mui/material" import { type FC } from "react" import { ItemizedList } from "codeforlife/components" +import { Link } from "codeforlife/components/router" export interface SharingInfoProps {} @@ -45,14 +46,14 @@ const SharingInfo: FC = () => ( For more information on Freshdesk’s Privacy Notice, visit  - + https://www.freshworks.com/privacy/ . For more information on Freshdesk and GDPR, visit  - + https://freshdesk.com/gdpr . @@ -64,7 +65,7 @@ const SharingInfo: FC = () => ( device type, device platform, unless specifically asked within the questions themselves for example, the survey may ask your age. You can find out more about UsabilityHub  - + here . diff --git a/src/pages/privacyNotice/adults/YourRights.tsx b/src/pages/privacyNotice/adults/YourRights.tsx index 9da5466..52af86d 100644 --- a/src/pages/privacyNotice/adults/YourRights.tsx +++ b/src/pages/privacyNotice/adults/YourRights.tsx @@ -1,6 +1,7 @@ -import { Link, ListItemText, Typography } from "@mui/material" +import { ListItemText, Typography } from "@mui/material" import { type FC } from "react" import { ItemizedList } from "codeforlife/components" +import { Link } from "codeforlife/components/router" export interface YourRightsProps {} @@ -60,7 +61,7 @@ const YourRights: FC = () => ( email our Data Protection Officer at  - + individualrights@ocado.com ; diff --git a/src/pages/privacyNotice/children/Cookies.tsx b/src/pages/privacyNotice/children/Cookies.tsx index 82c26a6..b4f4512 100644 --- a/src/pages/privacyNotice/children/Cookies.tsx +++ b/src/pages/privacyNotice/children/Cookies.tsx @@ -1,6 +1,5 @@ import { Button, - Link, Table, TableBody, TableCell, @@ -9,6 +8,7 @@ import { Typography, } from "@mui/material" import { type FC } from "react" +import { Link } from "codeforlife/components/router" import { toggleOneTrustInfoDisplay } from "codeforlife/utils/window" const CustomTableRow: FC<{ @@ -110,13 +110,13 @@ const Cookies: FC = () => ( We use other companies called ( Google Analytics  and  - + Mouseflow ) to help us collect information from these cookies (see the diff --git a/src/pages/privacyNotice/children/HowToComplain.tsx b/src/pages/privacyNotice/children/HowToComplain.tsx index f81b264..8cf3ea6 100644 --- a/src/pages/privacyNotice/children/HowToComplain.tsx +++ b/src/pages/privacyNotice/children/HowToComplain.tsx @@ -1,5 +1,6 @@ -import { Link, Typography } from "@mui/material" import { type FC } from "react" +import { Link } from "codeforlife/components/router" +import { Typography } from "@mui/material" export interface HowToComplainProps {} @@ -8,7 +9,7 @@ const HowToComplain: FC = () => ( If you have a complaint about how we’ve used your personal information, you can write to our Data Protection Officer at  - + individualrights@ocado.com . @@ -22,7 +23,7 @@ const HowToComplain: FC = () => ( Telephone: 0303 123 1113 Website:  - + https://ico.org.uk/concerns diff --git a/src/pages/privacyNotice/children/HowToContactUs.tsx b/src/pages/privacyNotice/children/HowToContactUs.tsx index 851ba99..a6890bf 100644 --- a/src/pages/privacyNotice/children/HowToContactUs.tsx +++ b/src/pages/privacyNotice/children/HowToContactUs.tsx @@ -1,5 +1,6 @@ -import { Link, Typography } from "@mui/material" import { type FC } from "react" +import { Link } from "codeforlife/components/router" +import { Typography } from "@mui/material" export interface HowToContactUsProps {} @@ -7,7 +8,7 @@ const HowToContactUs: FC = () => ( <> Please contact our Data Protection Officer at  - + individualrights@ocado.com  if you have any questions about this Privacy Notice or the diff --git a/src/pages/privacyNotice/children/WhoWeShareInfoWith.tsx b/src/pages/privacyNotice/children/WhoWeShareInfoWith.tsx index b5e292b..e453ad8 100644 --- a/src/pages/privacyNotice/children/WhoWeShareInfoWith.tsx +++ b/src/pages/privacyNotice/children/WhoWeShareInfoWith.tsx @@ -1,5 +1,6 @@ -import { Link, Typography } from "@mui/material" import { type FC } from "react" +import { Link } from "codeforlife/components/router" +import { Typography } from "@mui/material" export interface WhoWeShareInfoWithProps {} @@ -31,7 +32,7 @@ const WhoWeShareInfoWith: FC = () => ( type, device platform alongside any questions that we may ask you in our surveys (for example, the survey may ask your age). You can find out more about UsabilityHub  - + here . diff --git a/src/pages/privacyNotice/children/YourRights.tsx b/src/pages/privacyNotice/children/YourRights.tsx index 04708b7..c533eab 100644 --- a/src/pages/privacyNotice/children/YourRights.tsx +++ b/src/pages/privacyNotice/children/YourRights.tsx @@ -1,6 +1,7 @@ -import { Link, ListItemText, Typography } from "@mui/material" +import { ListItemText, Typography } from "@mui/material" import { type FC } from "react" import { ItemizedList } from "codeforlife/components" +import { Link } from "codeforlife/components/router" export interface YourRightsProps {} @@ -38,7 +39,7 @@ const YourRights: FC = () => ( If you would like to use any of these rights listed above, please email our Data Protection Officer at  - + individualrights@ocado.com . Depending on where you live, you may need help from a parent or guardian From e3d4aaf8ea60041742573640c4571a78a15df97b Mon Sep 17 00:00:00 2001 From: SKairinos Date: Fri, 20 Sep 2024 09:01:29 +0000 Subject: [PATCH 10/25] fix paths --- src/features/footer/Links.tsx | 8 +- yarn.lock | 226 +++++++++++++++++----------------- 2 files changed, 119 insertions(+), 115 deletions(-) diff --git a/src/features/footer/Links.tsx b/src/features/footer/Links.tsx index 1845d1e..2f15ed2 100644 --- a/src/features/footer/Links.tsx +++ b/src/features/footer/Links.tsx @@ -57,8 +57,12 @@ const Links: FC = () => { - Privacy notice - Terms of use + + Privacy notice + + + Terms of use + {/*TODO: Use OneTrust banner hook*/} Cookie settings diff --git a/yarn.lock b/yarn.lock index 416e85c..06fa413 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1563,22 +1563,22 @@ react-is "^18.3.1" "@mui/x-date-pickers@^7.7.1": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@mui/x-date-pickers/-/x-date-pickers-7.17.0.tgz#a0ccdd0ca0bfede65d05900e149cfc141551c1fe" - integrity sha512-3mIw1uOZU/yKweZsVAo9QnwVFzLHqXgXG1TbGbDJ4AU6FhN2TCUlR9tzKHSlYdAHZ0bEWDS1/bgeGsQC7skXMA== + version "7.18.0" + resolved "https://registry.yarnpkg.com/@mui/x-date-pickers/-/x-date-pickers-7.18.0.tgz#264158195aeeaf32a00519718f6c67c165b06711" + integrity sha512-12tXIoMj9vpS8fS/bS3kWPCoVrH38vNGCxgplI0vOnUrN9rJuYJz3agLPJe1S0xciTw+9W8ZSe3soaW+owoz1Q== dependencies: "@babel/runtime" "^7.25.6" "@mui/utils" "^5.16.6" - "@mui/x-internals" "7.17.0" + "@mui/x-internals" "7.18.0" "@types/react-transition-group" "^4.4.11" clsx "^2.1.1" prop-types "^15.8.1" react-transition-group "^4.4.5" -"@mui/x-internals@7.17.0": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@mui/x-internals/-/x-internals-7.17.0.tgz#c5731b8deb07107fbc406e62277aaa5c3f0db0a7" - integrity sha512-FLlAGSJl/vsuaA/8hPGazXFppyzIzxApJJDZMoTS0geUmHd0hyooISV2ltllLmrZ/DGtHhI08m8GGnHL6/vVeg== +"@mui/x-internals@7.18.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@mui/x-internals/-/x-internals-7.18.0.tgz#f079968d4f7ea93e63be9faf6ba8558d6f12923b" + integrity sha512-lzCHOWIR0cAIY1bGrWSprYerahbnH5C31ql/2OWCEjcngL2NAV1M6oKI2Vp4HheqzJ822c60UyWyapvyjSzY/A== dependencies: "@babel/runtime" "^7.25.6" "@mui/utils" "^5.16.6" @@ -1641,85 +1641,85 @@ resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.19.2.tgz#0c896535473291cb41f152c180bedd5680a3b273" integrity sha512-baiMx18+IMuD1yyvOGaHM9QrVUPGGG0jC+z+IPHnRJWUAUvaKuWKyE8gjDj2rzv3sz9zOGoRSPgeBVHRhZnBlA== -"@rollup/rollup-android-arm-eabi@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.0.tgz#e8c16c336f060b4cb592f62eb4f0e543d79d51fe" - integrity sha512-/IZQvg6ZR0tAkEi4tdXOraQoWeJy9gbQ/cx4I7k9dJaCk9qrXEcdouxRVz5kZXt5C2bQ9pILoAA+KB4C/d3pfw== - -"@rollup/rollup-android-arm64@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.0.tgz#7a44160a14017fa744912d7037c7d81d6f8a46e7" - integrity sha512-ETHi4bxrYnvOtXeM7d4V4kZWixib2jddFacJjsOjwbgYSRsyXYtZHC4ht134OsslPIcnkqT+TKV4eU8rNBKyyQ== - -"@rollup/rollup-darwin-arm64@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.0.tgz#6122dc37d4a09521d8abe18925956d3b46cfbac9" - integrity sha512-ZWgARzhSKE+gVUX7QWaECoRQsPwaD8ZR0Oxb3aUpzdErTvlEadfQpORPXkKSdKbFci9v8MJfkTtoEHnnW9Ulng== - -"@rollup/rollup-darwin-x64@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.0.tgz#453f345899cbf544aa0d6f5808d24d2e42f605b7" - integrity sha512-h0ZAtOfHyio8Az6cwIGS+nHUfRMWBDO5jXB8PQCARVF6Na/G6XS2SFxDl8Oem+S5ZsHQgtsI7RT4JQnI1qrlaw== - -"@rollup/rollup-linux-arm-gnueabihf@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.0.tgz#3a32fa4e80a62a6d733014838b1123fe76b060fe" - integrity sha512-9pxQJSPwFsVi0ttOmqLY4JJ9pg9t1gKhK0JDbV1yUEETSx55fdyCjt39eBQ54OQCzAF0nVGO6LfEH1KnCPvelA== - -"@rollup/rollup-linux-arm-musleabihf@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.0.tgz#55d3953c54419e93efe124882a3103c8a2f65641" - integrity sha512-YJ5Ku5BmNJZb58A4qSEo3JlIG4d3G2lWyBi13ABlXzO41SsdnUKi3HQHe83VpwBVG4jHFTW65jOQb8qyoR+qzg== - -"@rollup/rollup-linux-arm64-gnu@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.0.tgz#cd626963b9962baf8e09d792e67b87269a5bcfff" - integrity sha512-U4G4u7f+QCqHlVg1Nlx+qapZy+QoG+NV6ux+upo/T7arNGwKvKP2kmGM4W5QTbdewWFgudQxi3kDNST9GT1/mg== - -"@rollup/rollup-linux-arm64-musl@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.0.tgz#ad209270c9937a27346fce5b0670cbdfb1e6a0a6" - integrity sha512-aQpNlKmx3amwkA3a5J6nlXSahE1ijl0L9KuIjVOUhfOh7uw2S4piR3mtpxpRtbnK809SBtyPsM9q15CPTsY7HQ== - -"@rollup/rollup-linux-powerpc64le-gnu@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.0.tgz#fdd173929a5bba8b7e8b37314380213d9604088f" - integrity sha512-9fx6Zj/7vve/Fp4iexUFRKb5+RjLCff6YTRQl4CoDhdMfDoobWmhAxQWV3NfShMzQk1Q/iCnageFyGfqnsmeqQ== - -"@rollup/rollup-linux-riscv64-gnu@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.0.tgz#90b11314fbf45d04083f658e08dc3b32fd713061" - integrity sha512-VWQiCcN7zBgZYLjndIEh5tamtnKg5TGxyZPWcN9zBtXBwfcGSZ5cHSdQZfQH/GB4uRxk0D3VYbOEe/chJhPGLQ== - -"@rollup/rollup-linux-s390x-gnu@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.0.tgz#46bb2f1135aeec646b720d6032d7c86915f8b2ec" - integrity sha512-EHmPnPWvyYqncObwqrosb/CpH3GOjE76vWVs0g4hWsDRUVhg61hBmlVg5TPXqF+g+PvIbqkC7i3h8wbn4Gp2Fg== - -"@rollup/rollup-linux-x64-gnu@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.0.tgz#d731a19af5f05eabcba871bda2eeb2fa8c8adb67" - integrity sha512-tsSWy3YQzmpjDKnQ1Vcpy3p9Z+kMFbSIesCdMNgLizDWFhrLZIoN21JSq01g+MZMDFF+Y1+4zxgrlqPjid5ohg== - -"@rollup/rollup-linux-x64-musl@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.0.tgz#5438b2dc38fe467444cf769146098be083022d0f" - integrity sha512-anr1Y11uPOQrpuU8XOikY5lH4Qu94oS6j0xrulHk3NkLDq19MlX8Ng/pVipjxBJ9a2l3+F39REZYyWQFkZ4/fw== - -"@rollup/rollup-win32-arm64-msvc@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.0.tgz#6bd66c198f80c8e7050cfd901701cfb9555d768a" - integrity sha512-7LB+Bh+Ut7cfmO0m244/asvtIGQr5pG5Rvjz/l1Rnz1kDzM02pSX9jPaS0p+90H5I1x4d1FkCew+B7MOnoatNw== - -"@rollup/rollup-win32-ia32-msvc@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.0.tgz#58daea1f1e65143c44c8f3311f30ff8eefa62bae" - integrity sha512-+3qZ4rer7t/QsC5JwMpcvCVPRcJt1cJrYS/TMJZzXIJbxWFQEVhrIc26IhB+5Z9fT9umfVc+Es2mOZgl+7jdJQ== - -"@rollup/rollup-win32-x64-msvc@4.22.0": - version "4.22.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.0.tgz#956948629f6b87de0bdf526b28d940221540bbb6" - integrity sha512-YdicNOSJONVx/vuPkgPTyRoAPx3GbknBZRCOUkK84FJ/YTfs/F0vl/YsMscrB6Y177d+yDRcj+JWMPMCgshwrA== +"@rollup/rollup-android-arm-eabi@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.1.tgz#8ee3eeb39485be9ca36e4b398051c5969d0eda46" + integrity sha512-GrXxNVBes13Q3wSBjdZlmu4VulFhfNs1eP2/pX5dmx6cE1XgfV2/BfqdGt4d2Z7Zqp+qnYSf7zvIB4buc+2DwA== + +"@rollup/rollup-android-arm64@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.1.tgz#80bcf4a0d65c7c837a6c8196eee3c10052617e1b" + integrity sha512-Cr/dpKRc4tjK13SCZJrSDXSaKjL/fekn04BWMCJ+Pj4vPCp8rixvtArrnWUYycOdRNi7kx3MSClcvEP7C2nvCw== + +"@rollup/rollup-darwin-arm64@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.1.tgz#2552cfad088ed76a5042f626001030929da23e13" + integrity sha512-IwEyoeCZoO1lpY5Er5t3UK/Aq5q2W/ubLmu3pYW4as0htn4NbJagBaVNr1aVhRTXUxrYvcPhxQCqodShnocLdA== + +"@rollup/rollup-darwin-x64@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.1.tgz#1fb4690fd64460c5687b291011bf2d8871e69e5a" + integrity sha512-LSbJhEOTz557VBcJOWspdGyiFbMTNgLxbWnup7bDj1elpNTK04E3M1qLlvGzPKPmk+uG6XlbT8xAUSKkyn0g8w== + +"@rollup/rollup-linux-arm-gnueabihf@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.1.tgz#fca0a3d65e14f78ec84af024efa8f65d65206acc" + integrity sha512-F4DgRk//u604Np1eFoGUzE9TgGE6LMvjnX2tM24ePB34JlED9utc4T3iK5x8CWC/agH+zuN7q/hJF5AtWR+JOA== + +"@rollup/rollup-linux-arm-musleabihf@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.1.tgz#5819a22e4ea38686e77fee67db84939b54e22851" + integrity sha512-Gl5pbijcb6QOJRvHkmU/O1G65ZnKxwSHhPQRuGdmcxmX/mBM+wNHoai7wvpCoPVsdhkc+KUqgu/MydP8wovGAA== + +"@rollup/rollup-linux-arm64-gnu@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.1.tgz#8320489fc9f93524691ef19f2103f303e3cf895c" + integrity sha512-GsvZqPloVOrh3G2nmZmwNSNGqWLf3L3a0nFDO1zecwucAYxEFgZkrvqQrVMT+zUjChaHPBp0eoTOQMWSKFcV8w== + +"@rollup/rollup-linux-arm64-musl@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.1.tgz#4a6fb26503c1cba81388619ea20d87c4cd6473b0" + integrity sha512-+vZ1jrJeEEYLbMqeKDfgcl8v7zjymdAGTr7xUdQL6c4nC+S+BZHo3Mrp/9ij2qpAveC0Iaz9DIiFplcO0joapQ== + +"@rollup/rollup-linux-powerpc64le-gnu@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.1.tgz#2f8f4eca06d54ad4f96a0bbbd1dc67913a31b0ae" + integrity sha512-6psD9nKw+wLj9bMhArTkzKt5etA6kb+cBJQws4MovI9gQSRkdX4nyYZofBfgTtaZtymQl7uRfe1I75guePal5A== + +"@rollup/rollup-linux-riscv64-gnu@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.1.tgz#d3bea69308889c3f1af417dcc6f3c06f8d4ad5aa" + integrity sha512-xzbqImk1h5abj0bPU5XQVrqBhLHl2zTygG6+vES2TrgmNSiaPzn39aqI8QtdqmGYz507ZVI2qocTTfVwW23SmQ== + +"@rollup/rollup-linux-s390x-gnu@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.1.tgz#e121262f56986a299db69f32f59177a60b92d595" + integrity sha512-Hz5iwqYv08PpEC75z0GAgLlOY+cLAb0PVx578mLW0naugNfG0WQqoDzQoJWiivmtTdgmwoH5YXDnjZJb7MDlhA== + +"@rollup/rollup-linux-x64-gnu@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.1.tgz#a46f8e3bc77cd87b1aacb83cf52cd62a59135be8" + integrity sha512-ot1DPlQZGGiZYNyE/PF3jbT6juuG0W5oiguHQEvjoZZ3+FSxMfdJnBz1P71QeqICSOlSFG9Z31oA/uXyuxDEVw== + +"@rollup/rollup-linux-x64-musl@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.1.tgz#2cee572374b9351f4ed17c543c009e295b158825" + integrity sha512-euksHNkKlXS9RKKHSBBPtloSEUGPg1eRVGfOkXSSIj5W9LdkMfOefsTlVf2g8kuayZW/98nIJ83Fnou9OaZNXA== + +"@rollup/rollup-win32-arm64-msvc@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.1.tgz#df2283dabb7ebc54ef6bd2e0e5415d8dc04c5a8f" + integrity sha512-jDS/ShZxlA3HKtgm25CcbApOVsr/0Zkdu/E+3xK4UO0PT912yqyh7jNpTmZZJAiPDQoSDI9FOqrjSbnlpW6IFg== + +"@rollup/rollup-win32-ia32-msvc@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.1.tgz#207b65d960ea06c86ef8f2bc554e4ed7c5c2d869" + integrity sha512-yNEeuvH2b+susSgUCfpRelIRjB1CmErHyqA7KsQ/NCjY401rpChVqw5df/H5AUPCKNDqgBMbtrtl9F6z7N9LTg== + +"@rollup/rollup-win32-x64-msvc@4.22.1": + version "4.22.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.1.tgz#63ae061c8d645de7f3ba0cef856c242281e44d0d" + integrity sha512-UgdylcqjcgJSNMhrjMJpJ4T3zriTmiUd2COh1mJHwDShrhhMkpZ/j4M5e4GsvBFviaxtrJtufr0FnKfm2UfOSw== "@rtsao/scc@^1.1.0": version "1.1.0" @@ -1924,9 +1924,9 @@ "@types/react" "*" "@types/react@*", "@types/react@^18.2.47": - version "18.3.7" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.7.tgz#6decbfbb01f8d82d56ff5403394121940faa6569" - integrity sha512-KUnDCJF5+AiZd8owLIeVHqmW9yM4sqmDVf2JRJiBMFkGvkoZ4/WyV2lL4zVsoinmRS/W3FeEdZLEWFRofnT2FQ== + version "18.3.8" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.8.tgz#1672ab19993f8aca7c7dc844c07d5d9e467d5a79" + integrity sha512-syBUrW3/XpnW4WJ41Pft+I+aPoDVbrBVQGEnbD7NijDGlVC+8gV/XKRY+7vMDlfPpbwYt0l1vd/Sj8bJGMbs9Q== dependencies: "@types/prop-types" "*" csstype "^3.0.2" @@ -2711,7 +2711,7 @@ clsx@^2.1.0, clsx@^2.1.1: "codeforlife@github:ocadotechnology/codeforlife-package-javascript#portal-frontend-5": version "2.3.4" - resolved "https://codeload.github.com/ocadotechnology/codeforlife-package-javascript/tar.gz/d60626abc75d323e8b02c10c3027509318fe6966" + resolved "https://codeload.github.com/ocadotechnology/codeforlife-package-javascript/tar.gz/8c9db00ddaf2b289398b567e409d8b734ef11361" dependencies: "@emotion/react" "^11.10.6" "@emotion/styled" "^11.10.6" @@ -3058,9 +3058,9 @@ eastasianwidth@^0.2.0: integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== electron-to-chromium@^1.5.4: - version "1.5.25" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.25.tgz#492ade1cde401332b9b75aa0c55fd5e1550ca66c" - integrity sha512-kMb204zvK3PsSlgvvwzI3wBIcAw15tRkYk+NQdsjdDtcQWTp2RABbMQ9rUBy8KNEOM+/E6ep+XC3AykiWZld4g== + version "1.5.26" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.26.tgz#449b4fa90e83ab98abbe3b6a96c8ee395de94452" + integrity sha512-Z+OMe9M/V6Ep9n/52+b7lkvYEps26z4Yz3vjWL1V61W0q+VLF1pOHhMY17sa4roz4AWmULSI8E6SAojZA5L0YQ== emoji-regex@^8.0.0: version "8.0.0" @@ -5257,28 +5257,28 @@ rimraf@^3.0.2: glob "^7.1.3" rollup@^4.20.0: - version "4.22.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.22.0.tgz#23cd9e4565a458587683accc34a054660c01f351" - integrity sha512-W21MUIFPZ4+O2Je/EU+GP3iz7PH4pVPUXSbEZdatQnxo29+3rsUjgrJmzuAZU24z7yRAnFN6ukxeAhZh/c7hzg== + version "4.22.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.22.1.tgz#ba2f0b969d4bdd69eeb709c72dae9270355c206e" + integrity sha512-rit4zY5uPX0jrzTidez3rFr0MD30Rpu3S8VxwXFDfBVAzkk9U28s5MF3/R6u5bIHN6CQnf7zbiwVQbqBkyrU/A== dependencies: "@types/estree" "1.0.5" optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.22.0" - "@rollup/rollup-android-arm64" "4.22.0" - "@rollup/rollup-darwin-arm64" "4.22.0" - "@rollup/rollup-darwin-x64" "4.22.0" - "@rollup/rollup-linux-arm-gnueabihf" "4.22.0" - "@rollup/rollup-linux-arm-musleabihf" "4.22.0" - "@rollup/rollup-linux-arm64-gnu" "4.22.0" - "@rollup/rollup-linux-arm64-musl" "4.22.0" - "@rollup/rollup-linux-powerpc64le-gnu" "4.22.0" - "@rollup/rollup-linux-riscv64-gnu" "4.22.0" - "@rollup/rollup-linux-s390x-gnu" "4.22.0" - "@rollup/rollup-linux-x64-gnu" "4.22.0" - "@rollup/rollup-linux-x64-musl" "4.22.0" - "@rollup/rollup-win32-arm64-msvc" "4.22.0" - "@rollup/rollup-win32-ia32-msvc" "4.22.0" - "@rollup/rollup-win32-x64-msvc" "4.22.0" + "@rollup/rollup-android-arm-eabi" "4.22.1" + "@rollup/rollup-android-arm64" "4.22.1" + "@rollup/rollup-darwin-arm64" "4.22.1" + "@rollup/rollup-darwin-x64" "4.22.1" + "@rollup/rollup-linux-arm-gnueabihf" "4.22.1" + "@rollup/rollup-linux-arm-musleabihf" "4.22.1" + "@rollup/rollup-linux-arm64-gnu" "4.22.1" + "@rollup/rollup-linux-arm64-musl" "4.22.1" + "@rollup/rollup-linux-powerpc64le-gnu" "4.22.1" + "@rollup/rollup-linux-riscv64-gnu" "4.22.1" + "@rollup/rollup-linux-s390x-gnu" "4.22.1" + "@rollup/rollup-linux-x64-gnu" "4.22.1" + "@rollup/rollup-linux-x64-musl" "4.22.1" + "@rollup/rollup-win32-arm64-msvc" "4.22.1" + "@rollup/rollup-win32-ia32-msvc" "4.22.1" + "@rollup/rollup-win32-x64-msvc" "4.22.1" fsevents "~2.3.2" rrweb-cssom@^0.6.0: From 9e3ff916b0c02e52143a827cb201d4d3e7dd9c0d Mon Sep 17 00:00:00 2001 From: SKairinos Date: Fri, 20 Sep 2024 10:29:42 +0000 Subject: [PATCH 11/25] new js package --- package.json | 2 +- yarn.lock | 202 +++++++++++++++++++++++++-------------------------- 2 files changed, 102 insertions(+), 102 deletions(-) diff --git a/package.json b/package.json index a2c1815..dccfb12 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "✅ Do add `devDependencies` below that are `peerDependencies` in the CFL package." ], "dependencies": { - "codeforlife": "github:ocadotechnology/codeforlife-package-javascript#portal-frontend-5", + "codeforlife": "github:ocadotechnology/codeforlife-package-javascript#v2.3.5", "crypto-js": "^4.2.0" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 06fa413..172ee0a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1641,85 +1641,85 @@ resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.19.2.tgz#0c896535473291cb41f152c180bedd5680a3b273" integrity sha512-baiMx18+IMuD1yyvOGaHM9QrVUPGGG0jC+z+IPHnRJWUAUvaKuWKyE8gjDj2rzv3sz9zOGoRSPgeBVHRhZnBlA== -"@rollup/rollup-android-arm-eabi@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.1.tgz#8ee3eeb39485be9ca36e4b398051c5969d0eda46" - integrity sha512-GrXxNVBes13Q3wSBjdZlmu4VulFhfNs1eP2/pX5dmx6cE1XgfV2/BfqdGt4d2Z7Zqp+qnYSf7zvIB4buc+2DwA== - -"@rollup/rollup-android-arm64@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.1.tgz#80bcf4a0d65c7c837a6c8196eee3c10052617e1b" - integrity sha512-Cr/dpKRc4tjK13SCZJrSDXSaKjL/fekn04BWMCJ+Pj4vPCp8rixvtArrnWUYycOdRNi7kx3MSClcvEP7C2nvCw== - -"@rollup/rollup-darwin-arm64@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.1.tgz#2552cfad088ed76a5042f626001030929da23e13" - integrity sha512-IwEyoeCZoO1lpY5Er5t3UK/Aq5q2W/ubLmu3pYW4as0htn4NbJagBaVNr1aVhRTXUxrYvcPhxQCqodShnocLdA== - -"@rollup/rollup-darwin-x64@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.1.tgz#1fb4690fd64460c5687b291011bf2d8871e69e5a" - integrity sha512-LSbJhEOTz557VBcJOWspdGyiFbMTNgLxbWnup7bDj1elpNTK04E3M1qLlvGzPKPmk+uG6XlbT8xAUSKkyn0g8w== - -"@rollup/rollup-linux-arm-gnueabihf@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.1.tgz#fca0a3d65e14f78ec84af024efa8f65d65206acc" - integrity sha512-F4DgRk//u604Np1eFoGUzE9TgGE6LMvjnX2tM24ePB34JlED9utc4T3iK5x8CWC/agH+zuN7q/hJF5AtWR+JOA== - -"@rollup/rollup-linux-arm-musleabihf@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.1.tgz#5819a22e4ea38686e77fee67db84939b54e22851" - integrity sha512-Gl5pbijcb6QOJRvHkmU/O1G65ZnKxwSHhPQRuGdmcxmX/mBM+wNHoai7wvpCoPVsdhkc+KUqgu/MydP8wovGAA== - -"@rollup/rollup-linux-arm64-gnu@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.1.tgz#8320489fc9f93524691ef19f2103f303e3cf895c" - integrity sha512-GsvZqPloVOrh3G2nmZmwNSNGqWLf3L3a0nFDO1zecwucAYxEFgZkrvqQrVMT+zUjChaHPBp0eoTOQMWSKFcV8w== - -"@rollup/rollup-linux-arm64-musl@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.1.tgz#4a6fb26503c1cba81388619ea20d87c4cd6473b0" - integrity sha512-+vZ1jrJeEEYLbMqeKDfgcl8v7zjymdAGTr7xUdQL6c4nC+S+BZHo3Mrp/9ij2qpAveC0Iaz9DIiFplcO0joapQ== - -"@rollup/rollup-linux-powerpc64le-gnu@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.1.tgz#2f8f4eca06d54ad4f96a0bbbd1dc67913a31b0ae" - integrity sha512-6psD9nKw+wLj9bMhArTkzKt5etA6kb+cBJQws4MovI9gQSRkdX4nyYZofBfgTtaZtymQl7uRfe1I75guePal5A== - -"@rollup/rollup-linux-riscv64-gnu@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.1.tgz#d3bea69308889c3f1af417dcc6f3c06f8d4ad5aa" - integrity sha512-xzbqImk1h5abj0bPU5XQVrqBhLHl2zTygG6+vES2TrgmNSiaPzn39aqI8QtdqmGYz507ZVI2qocTTfVwW23SmQ== - -"@rollup/rollup-linux-s390x-gnu@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.1.tgz#e121262f56986a299db69f32f59177a60b92d595" - integrity sha512-Hz5iwqYv08PpEC75z0GAgLlOY+cLAb0PVx578mLW0naugNfG0WQqoDzQoJWiivmtTdgmwoH5YXDnjZJb7MDlhA== - -"@rollup/rollup-linux-x64-gnu@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.1.tgz#a46f8e3bc77cd87b1aacb83cf52cd62a59135be8" - integrity sha512-ot1DPlQZGGiZYNyE/PF3jbT6juuG0W5oiguHQEvjoZZ3+FSxMfdJnBz1P71QeqICSOlSFG9Z31oA/uXyuxDEVw== - -"@rollup/rollup-linux-x64-musl@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.1.tgz#2cee572374b9351f4ed17c543c009e295b158825" - integrity sha512-euksHNkKlXS9RKKHSBBPtloSEUGPg1eRVGfOkXSSIj5W9LdkMfOefsTlVf2g8kuayZW/98nIJ83Fnou9OaZNXA== - -"@rollup/rollup-win32-arm64-msvc@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.1.tgz#df2283dabb7ebc54ef6bd2e0e5415d8dc04c5a8f" - integrity sha512-jDS/ShZxlA3HKtgm25CcbApOVsr/0Zkdu/E+3xK4UO0PT912yqyh7jNpTmZZJAiPDQoSDI9FOqrjSbnlpW6IFg== - -"@rollup/rollup-win32-ia32-msvc@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.1.tgz#207b65d960ea06c86ef8f2bc554e4ed7c5c2d869" - integrity sha512-yNEeuvH2b+susSgUCfpRelIRjB1CmErHyqA7KsQ/NCjY401rpChVqw5df/H5AUPCKNDqgBMbtrtl9F6z7N9LTg== - -"@rollup/rollup-win32-x64-msvc@4.22.1": - version "4.22.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.1.tgz#63ae061c8d645de7f3ba0cef856c242281e44d0d" - integrity sha512-UgdylcqjcgJSNMhrjMJpJ4T3zriTmiUd2COh1mJHwDShrhhMkpZ/j4M5e4GsvBFviaxtrJtufr0FnKfm2UfOSw== +"@rollup/rollup-android-arm-eabi@4.22.2": + version "4.22.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.2.tgz#4e0c4c462692ecb7ae2b008f25af4cced05ac4f9" + integrity sha512-8Ao+EDmTPjZ1ZBABc1ohN7Ylx7UIYcjReZinigedTOnGFhIctyGPxY2II+hJ6gD2/vkDKZTyQ0e7++kwv6wDrw== + +"@rollup/rollup-android-arm64@4.22.2": + version "4.22.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.2.tgz#d97ed02a950061adc2056d6d2d6df8f05d877ae9" + integrity sha512-I+B1v0a4iqdS9DvYt1RJZ3W+Oh9EVWjbY6gp79aAYipIbxSLEoQtFQlZEnUuwhDXCqMxJ3hluxKAdPD+GiluFQ== + +"@rollup/rollup-darwin-arm64@4.22.2": + version "4.22.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.2.tgz#06dec35316de9fe433d66c849ecc056e221ba422" + integrity sha512-BTHO7rR+LC67OP7I8N8GvdvnQqzFujJYWo7qCQ8fGdQcb8Gn6EQY+K1P+daQLnDCuWKbZ+gHAQZuKiQkXkqIYg== + +"@rollup/rollup-darwin-x64@4.22.2": + version "4.22.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.2.tgz#22ee27a0ccfdc045c2a37f6980351329516ce119" + integrity sha512-1esGwDNFe2lov4I6GsEeYaAMHwkqk0IbuGH7gXGdBmd/EP9QddJJvTtTF/jv+7R8ZTYPqwcdLpMTxK8ytP6k6Q== + +"@rollup/rollup-linux-arm-gnueabihf@4.22.2": + version "4.22.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.2.tgz#d86df2d8c600ebdd7251110a3357c53e0a583ace" + integrity sha512-GBHuY07x96OTEM3OQLNaUSUwrOhdMea/LDmlFHi/HMonrgF6jcFrrFFwJhhe84XtA1oK/Qh4yFS+VMREf6dobg== + +"@rollup/rollup-linux-arm-musleabihf@4.22.2": + version "4.22.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.2.tgz#a8b7b6a805356c8bd0409e4c5f56664d80a50aaa" + integrity sha512-Dbfa9Sc1G1lWxop0gNguXOfGhaXQWAGhZUcqA0Vs6CnJq8JW/YOw/KvyGtQFmz4yDr0H4v9X248SM7bizYj4yQ== + +"@rollup/rollup-linux-arm64-gnu@4.22.2": + version "4.22.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.2.tgz#766064021d2bfc42f13f4653f8870a9b8bbdc31d" + integrity sha512-Z1YpgBvFYhZIyBW5BoopwSg+t7yqEhs5HCei4JbsaXnhz/eZehT18DaXl957aaE9QK7TRGFryCAtStZywcQe1A== + +"@rollup/rollup-linux-arm64-musl@4.22.2": + version "4.22.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.2.tgz#490f49236102b97738d9406eaf5cd8d9dad35c15" + integrity sha512-66Zszr7i/JaQ0u/lefcfaAw16wh3oT72vSqubIMQqWzOg85bGCPhoeykG/cC5uvMzH80DQa2L539IqKht6twVA== + +"@rollup/rollup-linux-powerpc64le-gnu@4.22.2": + version "4.22.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.2.tgz#03a67f1476dd80f115ce35bc9b0d03c50c16679d" + integrity sha512-HpJCMnlMTfEhwo19bajvdraQMcAq3FX08QDx3OfQgb+414xZhKNf3jNvLFYKbbDSGBBrQh5yNwWZrdK0g0pokg== + +"@rollup/rollup-linux-riscv64-gnu@4.22.2": + version "4.22.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.2.tgz#d86e9b7b5b242652cd691c46d1939130c35cb68d" + integrity sha512-/egzQzbOSRef2vYCINKITGrlwkzP7uXRnL+xU2j75kDVp3iPdcF0TIlfwTRF8woBZllhk3QaxNOEj2Ogh3t9hg== + +"@rollup/rollup-linux-s390x-gnu@4.22.2": + version "4.22.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.2.tgz#c8fca373bec6df8550b31b3dbb56e2b241bc8718" + integrity sha512-qgYbOEbrPfEkH/OnUJd1/q4s89FvNJQIUldx8X2F/UM5sEbtkqZpf2s0yly2jSCKr1zUUOY1hnTP2J1WOzMAdA== + +"@rollup/rollup-linux-x64-gnu@4.22.2": + version "4.22.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.2.tgz#be182ef761c9b0147496e647ace44fd1b912344f" + integrity sha512-a0lkvNhFLhf+w7A95XeBqGQaG0KfS3hPFJnz1uraSdUe/XImkp/Psq0Ca0/UdD5IEAGoENVmnYrzSC9Y2a2uKQ== + +"@rollup/rollup-linux-x64-musl@4.22.2": + version "4.22.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.2.tgz#c280202d5b54d04f1e2b810359fe73c4973e8b72" + integrity sha512-sSWBVZgzwtsuG9Dxi9kjYOUu/wKW+jrbzj4Cclabqnfkot8Z3VEHcIgyenA3lLn/Fu11uDviWjhctulkhEO60g== + +"@rollup/rollup-win32-arm64-msvc@4.22.2": + version "4.22.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.2.tgz#8ae561401b92acb8ca7a842ffadececb22a2247e" + integrity sha512-t/YgCbZ638R/r7IKb9yCM6nAek1RUvyNdfU0SHMDLOf6GFe/VG1wdiUAsxTWHKqjyzkRGg897ZfCpdo1bsCSsA== + +"@rollup/rollup-win32-ia32-msvc@4.22.2": + version "4.22.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.2.tgz#c3a8b081595026eab9fccfe581624cb31af0d6f8" + integrity sha512-kTmX5uGs3WYOA+gYDgI6ITkZng9SP71FEMoHNkn+cnmb9Zuyyay8pf0oO5twtTwSjNGy1jlaWooTIr+Dw4tIbw== + +"@rollup/rollup-win32-x64-msvc@4.22.2": + version "4.22.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.2.tgz#c770006ccc780b2de7b2151fc7f37b49121a21c1" + integrity sha512-Yy8So+SoRz8I3NS4Bjh91BICPOSVgdompTIPYTByUqU66AXSIOgmW3Lv1ke3NORPqxdF+RdrZET+8vYai6f4aA== "@rtsao/scc@^1.1.0": version "1.1.0" @@ -2709,9 +2709,9 @@ clsx@^2.1.0, clsx@^2.1.1: resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.1.1.tgz#eed397c9fd8bd882bfb18deab7102049a2f32999" integrity sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA== -"codeforlife@github:ocadotechnology/codeforlife-package-javascript#portal-frontend-5": - version "2.3.4" - resolved "https://codeload.github.com/ocadotechnology/codeforlife-package-javascript/tar.gz/8c9db00ddaf2b289398b567e409d8b734ef11361" +"codeforlife@github:ocadotechnology/codeforlife-package-javascript#v2.3.5": + version "2.3.5" + resolved "https://codeload.github.com/ocadotechnology/codeforlife-package-javascript/tar.gz/a270c11b25cc43ffe8ffc5c01ca04d6ef3b3bfed" dependencies: "@emotion/react" "^11.10.6" "@emotion/styled" "^11.10.6" @@ -5257,28 +5257,28 @@ rimraf@^3.0.2: glob "^7.1.3" rollup@^4.20.0: - version "4.22.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.22.1.tgz#ba2f0b969d4bdd69eeb709c72dae9270355c206e" - integrity sha512-rit4zY5uPX0jrzTidez3rFr0MD30Rpu3S8VxwXFDfBVAzkk9U28s5MF3/R6u5bIHN6CQnf7zbiwVQbqBkyrU/A== + version "4.22.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.22.2.tgz#d762fa52c6ddb1307c1d6e8b463ba79432ffbb6b" + integrity sha512-JWWpTrZmqQGQWt16xvNn6KVIUz16VtZwl984TKw0dfqqRpFwtLJYYk1/4BTgplndMQKWUk/yB4uOShYmMzA2Vg== dependencies: "@types/estree" "1.0.5" optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.22.1" - "@rollup/rollup-android-arm64" "4.22.1" - "@rollup/rollup-darwin-arm64" "4.22.1" - "@rollup/rollup-darwin-x64" "4.22.1" - "@rollup/rollup-linux-arm-gnueabihf" "4.22.1" - "@rollup/rollup-linux-arm-musleabihf" "4.22.1" - "@rollup/rollup-linux-arm64-gnu" "4.22.1" - "@rollup/rollup-linux-arm64-musl" "4.22.1" - "@rollup/rollup-linux-powerpc64le-gnu" "4.22.1" - "@rollup/rollup-linux-riscv64-gnu" "4.22.1" - "@rollup/rollup-linux-s390x-gnu" "4.22.1" - "@rollup/rollup-linux-x64-gnu" "4.22.1" - "@rollup/rollup-linux-x64-musl" "4.22.1" - "@rollup/rollup-win32-arm64-msvc" "4.22.1" - "@rollup/rollup-win32-ia32-msvc" "4.22.1" - "@rollup/rollup-win32-x64-msvc" "4.22.1" + "@rollup/rollup-android-arm-eabi" "4.22.2" + "@rollup/rollup-android-arm64" "4.22.2" + "@rollup/rollup-darwin-arm64" "4.22.2" + "@rollup/rollup-darwin-x64" "4.22.2" + "@rollup/rollup-linux-arm-gnueabihf" "4.22.2" + "@rollup/rollup-linux-arm-musleabihf" "4.22.2" + "@rollup/rollup-linux-arm64-gnu" "4.22.2" + "@rollup/rollup-linux-arm64-musl" "4.22.2" + "@rollup/rollup-linux-powerpc64le-gnu" "4.22.2" + "@rollup/rollup-linux-riscv64-gnu" "4.22.2" + "@rollup/rollup-linux-s390x-gnu" "4.22.2" + "@rollup/rollup-linux-x64-gnu" "4.22.2" + "@rollup/rollup-linux-x64-musl" "4.22.2" + "@rollup/rollup-win32-arm64-msvc" "4.22.2" + "@rollup/rollup-win32-ia32-msvc" "4.22.2" + "@rollup/rollup-win32-x64-msvc" "4.22.2" fsevents "~2.3.2" rrweb-cssom@^0.6.0: From 57252e22e4c6be87abca738462a029ea743f754f Mon Sep 17 00:00:00 2001 From: SKairinos Date: Fri, 20 Sep 2024 17:00:14 +0000 Subject: [PATCH 12/25] initial --- package.json | 2 +- src/api/student.ts | 2 +- src/components/table/Table.tsx | 11 +- .../teacherDashboard/classes/Classes.tsx | 3 + .../teacherDashboard/classes/class/Class.tsx | 45 +------ .../classes/class/StudentTable.tsx | 71 +++++++++++ .../transferStudents/SelectClassForm.tsx | 42 +++++++ .../classes/transferStudents/StudentTable.tsx | 55 ++++++++ .../transferStudents/TransferStudents.tsx | 118 ++++++++++++++++++ .../transferStudents/TransferStudentsForm.tsx | 110 ++++++++++++++++ src/routes/paths.ts | 2 +- src/routes/teacher.tsx | 16 +-- yarn.lock | 16 +-- 13 files changed, 426 insertions(+), 67 deletions(-) create mode 100644 src/pages/teacherDashboard/classes/class/StudentTable.tsx create mode 100644 src/pages/teacherDashboard/classes/transferStudents/SelectClassForm.tsx create mode 100644 src/pages/teacherDashboard/classes/transferStudents/StudentTable.tsx create mode 100644 src/pages/teacherDashboard/classes/transferStudents/TransferStudents.tsx create mode 100644 src/pages/teacherDashboard/classes/transferStudents/TransferStudentsForm.tsx diff --git a/package.json b/package.json index dccfb12..6313818 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "✅ Do add `devDependencies` below that are `peerDependencies` in the CFL package." ], "dependencies": { - "codeforlife": "github:ocadotechnology/codeforlife-package-javascript#v2.3.5", + "codeforlife": "github:ocadotechnology/codeforlife-package-javascript#portal-frontend-52", "crypto-js": "^4.2.0" }, "devDependencies": { diff --git a/src/api/student.ts b/src/api/student.ts index 9412ee0..c88bb66 100644 --- a/src/api/student.ts +++ b/src/api/student.ts @@ -45,7 +45,7 @@ export type TransferStudentsArg = BulkUpdateArg< "klass", never, { - user: Arg + user?: Arg } > diff --git a/src/components/table/Table.tsx b/src/components/table/Table.tsx index 30b582b..5882ca3 100644 --- a/src/components/table/Table.tsx +++ b/src/components/table/Table.tsx @@ -2,6 +2,7 @@ import { Table as MuiTable, TableBody, TableContainer, + type TableContainerProps, TableHead, } from "@mui/material" import { type FC } from "react" @@ -13,11 +14,17 @@ export interface TableProps { titles: string[] children: React.ReactNode className?: string + containerProps?: TableContainerProps } -const Table: FC = ({ titles, children, className }) => { +const Table: FC = ({ + titles, + children, + className, + containerProps, +}) => { return ( - + diff --git a/src/pages/teacherDashboard/classes/Classes.tsx b/src/pages/teacherDashboard/classes/Classes.tsx index 73fae1f..6f0db83 100644 --- a/src/pages/teacherDashboard/classes/Classes.tsx +++ b/src/pages/teacherDashboard/classes/Classes.tsx @@ -9,6 +9,7 @@ import JoinClassRequest from "./JoinClassRequest" import JoinClassRequestTable from "./JoinClassRequestTable" import ResetStudentsPassword from "./class/ResetStudentsPassword" import { type RetrieveUserResult } from "../../../api/user" +import TransferStudents from "./transferStudents/TransferStudents" import UpdateStudentUser from "./class/UpdateStudentUser" export interface ClassesProps { @@ -18,6 +19,7 @@ export interface ClassesProps { | "join-class-request" | "reset-students-password" | "update-student-user" + | "transfer-students" } const Classes: FC = ({ authUser, view }) => { @@ -27,6 +29,7 @@ const Classes: FC = ({ authUser, view }) => { "join-class-request": , "reset-students-password": , "update-student-user": , + "transfer-students": , }[view] } diff --git a/src/pages/teacherDashboard/classes/class/Class.tsx b/src/pages/teacherDashboard/classes/class/Class.tsx index 7440ded..0d07ad8 100644 --- a/src/pages/teacherDashboard/classes/class/Class.tsx +++ b/src/pages/teacherDashboard/classes/class/Class.tsx @@ -1,13 +1,9 @@ import * as pages from "codeforlife/components/page" -import { type FC, useState } from "react" -import { Button } from "@mui/material" +import { type FC } from "react" import { Navigate } from "codeforlife/components/router" -import { SecurityOutlined as SecurityOutlinedIcon } from "@mui/icons-material" -import { type StudentUser } from "codeforlife/api" import { useParams } from "codeforlife/hooks" -import { type ListUsersResult } from "../../../../api/user" -import ResetStudentsPasswordDialog from "./ResetStudentsPasswordDialog" +import StudentTable from "./StudentTable" import { classIdSchema } from "../../../../app/schemas" import { paths } from "../../../../routes" @@ -15,52 +11,17 @@ export interface ClassProps {} const Class: FC = () => { const params = useParams({ classId: classIdSchema.required() }) - const [dialog, setDialog] = useState<"reset-students-password">() - // @ts-expect-error temp fix until setStudentUsers is used - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const [studentUsers, setStudentUsers] = useState< - Record< - ListUsersResult["data"][number]["id"], - StudentUser - > - >({ - // For testing purposes until this component is implemented - 27: { - id: 27, - first_name: "Student1", - is_active: true, - date_joined: new Date(), - student: { id: 17, klass: "ZZ111", school: 2 }, - }, - }) if (!params) return const { classId } = params - function closeDialog() { - setDialog(undefined) - } - return ( <> - + - ) } diff --git a/src/pages/teacherDashboard/classes/class/StudentTable.tsx b/src/pages/teacherDashboard/classes/class/StudentTable.tsx new file mode 100644 index 0000000..87619d9 --- /dev/null +++ b/src/pages/teacherDashboard/classes/class/StudentTable.tsx @@ -0,0 +1,71 @@ +import { Button, Stack } from "@mui/material" +import { type Class, type StudentUser } from "codeforlife/api" +import { type FC, useState } from "react" +import { LinkButton } from "codeforlife/components/router" +import { SecurityOutlined as SecurityOutlinedIcon } from "@mui/icons-material" +import { generatePath } from "react-router-dom" + +import { type ListUsersResult } from "../../../../api/user" +import ResetStudentsPasswordDialog from "./ResetStudentsPasswordDialog" +import { type TransferStudentsState } from "../transferStudents/TransferStudents" +import { paths } from "../../../../routes" + +export interface StudentTableProps { + classId: Class["id"] +} + +const StudentTable: FC = ({ classId }) => { + const [dialog, setDialog] = useState<"reset-students-password">() + // @ts-expect-error temp fix until setStudentUsers is used + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const [studentUsers, setStudentUsers] = useState< + Record< + ListUsersResult["data"][number]["id"], + StudentUser + > + >({ + // For testing purposes until this component is implemented + 27: { + id: 27, + first_name: "Student1", + is_active: true, + date_joined: new Date(), + student: { id: 17, klass: "ZZ111", school: 2 }, + }, + }) + + function closeDialog() { + setDialog(undefined) + } + + return ( + <> + + + {LinkButton({ + children: "Move", + to: generatePath( + paths.teacher.dashboard.tab.classes.class.students.transfer._, + { classId }, + ), + state: { studentUsers: Object.values(studentUsers) }, + })} + + + + ) +} + +export default StudentTable diff --git a/src/pages/teacherDashboard/classes/transferStudents/SelectClassForm.tsx b/src/pages/teacherDashboard/classes/transferStudents/SelectClassForm.tsx new file mode 100644 index 0000000..818ee50 --- /dev/null +++ b/src/pages/teacherDashboard/classes/transferStudents/SelectClassForm.tsx @@ -0,0 +1,42 @@ +import * as forms from "codeforlife/components/form" +import { type Dispatch, type FC, type SetStateAction } from "react" +import { Stack, Typography } from "@mui/material" +import { type Class } from "codeforlife/api" +import { LinkButton } from "codeforlife/components/router" + +import { ClassAutocompleteField } from "../../../../components/form" + +export interface SelectClassFormProps { + classId: Class["id"] + classPath: string + setNewClassId: Dispatch> +} + +const SelectClassForm: FC = ({ + classId, + classPath, + setNewClassId, +}) => ( + <> + Select destination class + + Choose a new class from the drop down menu for the student(s). + + { + setNewClassId(klass) + }} + > + + + + Cancel + + Continue + + + +) + +export default SelectClassForm diff --git a/src/pages/teacherDashboard/classes/transferStudents/StudentTable.tsx b/src/pages/teacherDashboard/classes/transferStudents/StudentTable.tsx new file mode 100644 index 0000000..c33f326 --- /dev/null +++ b/src/pages/teacherDashboard/classes/transferStudents/StudentTable.tsx @@ -0,0 +1,55 @@ +import { type FC } from "react" +import { TablePagination } from "codeforlife/components" +import { Typography } from "@mui/material" + +import * as tables from "../../../../components/table" +import { type RetrieveClassResult } from "../../../../api/klass" +import { useLazyListUsersQuery } from "../../../../api/user" + +export interface StudentTableProps { + klass: RetrieveClassResult + newClass: RetrieveClassResult +} + +const StudentTable: FC = ({ klass, newClass }) => ( + <> + + Students currently in destination class + + + The following students are in class {newClass.name} ({newClass.id}) into + which you are about to move students from class {klass.name} ({klass.id}). + + + {users => ( + + {users.length ? ( + users.map(user => ( + + {user.first_name} + + )) + ) : ( + + (no students) + + )} + + )} + + +) + +export default StudentTable diff --git a/src/pages/teacherDashboard/classes/transferStudents/TransferStudents.tsx b/src/pages/teacherDashboard/classes/transferStudents/TransferStudents.tsx new file mode 100644 index 0000000..e816151 --- /dev/null +++ b/src/pages/teacherDashboard/classes/transferStudents/TransferStudents.tsx @@ -0,0 +1,118 @@ +import * as pages from "codeforlife/components/page" +import { type Class, type StudentUser } from "codeforlife/api" +import { type FC, useState } from "react" +import { Link, Navigate } from "codeforlife/components/router" +import { useLocation, useParams } from "codeforlife/hooks" +import { Typography } from "@mui/material" +import { generatePath } from "react-router-dom" +import { handleResultState } from "codeforlife/utils/api" + +import { + type RetrieveClassResult, + useRetrieveClassQuery, +} from "../../../../api/klass" +import { type ListUsersResult } from "../../../../api/user" +import SelectClassForm from "./SelectClassForm" +import StudentTable from "./StudentTable" +import TransferStudentsForm from "./TransferStudentsForm" +import { classIdSchema } from "../../../../app/schemas" +import { paths } from "../../../../routes" + +const NewClassSections: FC< + TransferStudentsState & { + classPath: string + klass: RetrieveClassResult + newClassId: Class["id"] + } +> = ({ studentUsers, classPath, klass, newClassId }) => + handleResultState(useRetrieveClassQuery(newClassId), newClass => ( + <> + + + + + + + + )) + +const _TransferStudentsClass: FC< + TransferStudentsState & { + classId: Class["id"] + classPath: string + } +> = ({ classId, classPath, ...state }) => { + const [newClassId, setNewClassId] = useState() + + return handleResultState(useRetrieveClassQuery(classId), klass => ( + <> + + + Move students from class {klass.name} ({klass.id}) + + + Class + + + {newClassId ? ( + + ) : ( + + + + )} + + )) +} + +export interface TransferStudentsState { + studentUsers: Array> +} + +export interface TransferStudentsProps {} + +const TransferStudents: FC = () => { + const params = useParams({ classId: classIdSchema.required() }) + const { state } = useLocation() + + if (!params) + return + + const { classId } = params + + const classPath = generatePath(paths.teacher.dashboard.tab.classes.class._, { + classId, + }) + + return !state || !state.studentUsers || !state.studentUsers.length ? ( + + ) : ( + <_TransferStudentsClass + classId={classId} + classPath={classPath} + studentUsers={state.studentUsers} + /> + ) +} + +export default TransferStudents diff --git a/src/pages/teacherDashboard/classes/transferStudents/TransferStudentsForm.tsx b/src/pages/teacherDashboard/classes/transferStudents/TransferStudentsForm.tsx new file mode 100644 index 0000000..d6fa3e5 --- /dev/null +++ b/src/pages/teacherDashboard/classes/transferStudents/TransferStudentsForm.tsx @@ -0,0 +1,110 @@ +import * as forms from "codeforlife/components/form" +import { Stack, Typography } from "@mui/material" +import { type FC } from "react" +import { LinkButton } from "codeforlife/components/router" +import { type StudentUser } from "codeforlife/api" +import { submitForm } from "codeforlife/utils/form" +import { useNavigate } from "codeforlife/hooks" + +import * as tables from "../../../../components/table" +import { + type TransferStudentsArg, + useTransferStudentsMutation, +} from "../../../../api/student" +import { type ListUsersResult } from "../../../../api/user" +import { type RetrieveClassResult } from "../../../../api/klass" + +export interface TransferStudentsFormProps { + studentUsers: Array> + klass: RetrieveClassResult + classPath: string + newClass: RetrieveClassResult +} + +const TransferStudentsForm: FC = ({ + studentUsers, + klass, + classPath, + newClass, +}) => { + const [transferStudents] = useTransferStudentsMutation() + const navigate = useNavigate() + + return ( + <> + Students to transfer + + Please confirm the names of the following students being moved to class{" "} + {newClass.name} ({newClass.id}) from class {klass.name} ({klass.id}). + Their names will be used in their new login details, so please ensure it + is different from any other existing students in the class. + + ({ + ...arg, + [studentUser.student.id]: { + klass: newClass.id, + user: { first_name: studentUser.first_name }, + }, + }), + {} as TransferStudentsArg, + )} + onSubmit={submitForm(transferStudents, { + then: () => { + navigate(classPath, { + state: { + notifications: [ + { + props: { + children: + "The students have been transferred successfully", + }, + }, + ], + }, + }) + }, + catch: () => { + navigate(classPath, { + state: { + notifications: [ + { + props: { + error: true, + children: "Failed to transfer students", + }, + }, + ], + }, + }) + }, + })} + > + + {studentUsers.map(studentUser => ( + + {studentUser.first_name} + + + + + ))} + + + + Cancel + + Save + + + + ) +} + +export default TransferStudentsForm diff --git a/src/routes/paths.ts b/src/routes/paths.ts index 88b2955..5bafe37 100644 --- a/src/routes/paths.ts +++ b/src/routes/paths.ts @@ -35,7 +35,7 @@ const paths = _("", { students: _("/students", { studentUser: _("/:studentUserId"), resetPassword: _("/reset-password"), - move: _("/move"), + transfer: _("/transfer"), release: _("/release"), }), }), diff --git a/src/routes/teacher.tsx b/src/routes/teacher.tsx index afcc860..729337d 100644 --- a/src/routes/teacher.tsx +++ b/src/routes/teacher.tsx @@ -33,6 +33,10 @@ const teacher = ( path={paths.teacher.dashboard.tab.classes.class.students.studentUser._} element={} /> + } + /> } @@ -41,22 +45,10 @@ const teacher = ( path={paths.teacher.dashboard.tab.classes._} element={} /> - {/* } - /> */} - {/* } - /> */} } /> - {/* } - /> */} ) diff --git a/yarn.lock b/yarn.lock index 172ee0a..13cdb34 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1396,9 +1396,9 @@ integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== "@eslint/js@^9.9.0": - version "9.10.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.10.0.tgz#eaa3cb0baec497970bb29e43a153d0d5650143c6" - integrity sha512-fuXtbiP5GWIn8Fz+LWoOMVf/Jxm+aajZYkhi6CuEm4SxymFM+eUWzbO9qXT+L0iCkL5+KGYMCSGxo686H19S1g== + version "9.11.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.11.0.tgz#fca7533ef33aa608770734786e02f1041847f9bb" + integrity sha512-LPkkenkDqyzTFauZLLAPhIb48fj6drrfMvRGSL9tS3AcZBSVTllemLSNyCvHNNL2t797S/6DJNSIwRwXgMO/eQ== "@humanwhocodes/config-array@^0.13.0": version "0.13.0" @@ -2709,9 +2709,9 @@ clsx@^2.1.0, clsx@^2.1.1: resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.1.1.tgz#eed397c9fd8bd882bfb18deab7102049a2f32999" integrity sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA== -"codeforlife@github:ocadotechnology/codeforlife-package-javascript#v2.3.5": +"codeforlife@github:ocadotechnology/codeforlife-package-javascript#portal-frontend-52": version "2.3.5" - resolved "https://codeload.github.com/ocadotechnology/codeforlife-package-javascript/tar.gz/a270c11b25cc43ffe8ffc5c01ca04d6ef3b3bfed" + resolved "https://codeload.github.com/ocadotechnology/codeforlife-package-javascript/tar.gz/3972609c49f95cf88766902e2443accaeb2fe19d" dependencies: "@emotion/react" "^11.10.6" "@emotion/styled" "^11.10.6" @@ -5960,9 +5960,9 @@ vite-node@1.6.0: vite "^5.0.0" vite@^5.0.0, vite@^5.0.11: - version "5.4.6" - resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.6.tgz#85a93a1228a7fb5a723ca1743e337a2588ed008f" - integrity sha512-IeL5f8OO5nylsgzd9tq4qD2QqI0k2CQLGrWD0rCN0EQJZpBK5vJAx0I+GDkMOXxQX/OfFHMuLIx6ddAxGX/k+Q== + version "5.4.7" + resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.7.tgz#d226f57c08b61379e955f3836253ed3efb2dcf00" + integrity sha512-5l2zxqMEPVENgvzTuBpHer2awaetimj2BGkhBPdnwKbPNOlHsODU+oiazEZzLK7KhAnOrO+XGYJYn4ZlUhDtDQ== dependencies: esbuild "^0.21.3" postcss "^8.4.43" From 90a5ff1d8e292dc130cbe5bd47a3c5d6ca2d94d0 Mon Sep 17 00:00:00 2001 From: SKairinos Date: Mon, 23 Sep 2024 09:17:45 +0000 Subject: [PATCH 13/25] auto complete field --- .../form/ClassAutocompleteField.tsx | 28 +++++++++++++++++++ src/components/form/index.tsx | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 src/components/form/ClassAutocompleteField.tsx diff --git a/src/components/form/ClassAutocompleteField.tsx b/src/components/form/ClassAutocompleteField.tsx new file mode 100644 index 0000000..8e171fd --- /dev/null +++ b/src/components/form/ClassAutocompleteField.tsx @@ -0,0 +1,28 @@ +import { ApiAutocompleteField } from "codeforlife/components/form" +import { type FC } from "react" + +import { type ListClassesArg, useLazyListClassesQuery } from "../../api/klass" + +export interface ClassAutocompleteFieldProps { + required?: boolean + name?: string + _id?: ListClassesArg["_id"] +} + +const ClassAutocompleteField: FC = ({ + required = false, + name = "klass", + _id, +}) => ( + + `${name} (${id}), ${teacher.user.first_name} ${teacher.user.last_name}` + } + textFieldProps={{ required, name }} + /> +) + +export default ClassAutocompleteField diff --git a/src/components/form/index.tsx b/src/components/form/index.tsx index c688ebf..7434dae 100644 --- a/src/components/form/index.tsx +++ b/src/components/form/index.tsx @@ -1,3 +1,5 @@ +export * from "./ClassAutocompleteField" +export { default as ClassAutocompleteField } from "./ClassAutocompleteField" export * from "./ClassNameField" export { default as ClassNameField } from "./ClassNameField" export * from "./LastNameField" From 39a0abb0eec1b05d2a479b460e5d391ee782dba8 Mon Sep 17 00:00:00 2001 From: SKairinos Date: Tue, 24 Sep 2024 11:12:41 +0000 Subject: [PATCH 14/25] tested --- .../form/ClassAutocompleteField.tsx | 2 +- .../transferStudents/TransferStudents.tsx | 12 +- vite.config.ts | 1 + yarn.lock | 374 +++++++++--------- 4 files changed, 192 insertions(+), 197 deletions(-) diff --git a/src/components/form/ClassAutocompleteField.tsx b/src/components/form/ClassAutocompleteField.tsx index 8e171fd..62b697f 100644 --- a/src/components/form/ClassAutocompleteField.tsx +++ b/src/components/form/ClassAutocompleteField.tsx @@ -16,7 +16,7 @@ const ClassAutocompleteField: FC = ({ }) => ( `${name} (${id}), ${teacher.user.first_name} ${teacher.user.last_name}` diff --git a/src/pages/teacherDashboard/classes/transferStudents/TransferStudents.tsx b/src/pages/teacherDashboard/classes/transferStudents/TransferStudents.tsx index e816151..83e0f79 100644 --- a/src/pages/teacherDashboard/classes/transferStudents/TransferStudents.tsx +++ b/src/pages/teacherDashboard/classes/transferStudents/TransferStudents.tsx @@ -41,7 +41,7 @@ const NewClassSections: FC< )) -const _TransferStudentsClass: FC< +const _TransferStudents: FC< TransferStudentsState & { classId: Class["id"] classPath: string @@ -55,13 +55,7 @@ const _TransferStudentsClass: FC< Move students from class {klass.name} ({klass.id}) - + Class @@ -107,7 +101,7 @@ const TransferStudents: FC = () => { return !state || !state.studentUsers || !state.studentUsers.length ? ( ) : ( - <_TransferStudentsClass + <_TransferStudents classId={classId} classPath={classPath} studentUsers={state.studentUsers} diff --git a/vite.config.ts b/vite.config.ts index 9d13bc6..1766481 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -13,6 +13,7 @@ export default defineConfig({ }, server: { open: true, + host: true, }, test: { globals: true, diff --git a/yarn.lock b/yarn.lock index 13cdb34..a8f0767 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1175,9 +1175,9 @@ integrity sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g== "@emotion/is-prop-valid@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-1.3.0.tgz#bd84ba972195e8a2d42462387581560ef780e4e2" - integrity sha512-SHetuSLvJDzuNbOdtPVbq6yMMMlLoW5Q94uDqJZqy50gcmAjxFkVqmzqSGEFq9gT2iMuIeKV1PXVWmvUhuZLlQ== + version "1.3.1" + resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-1.3.1.tgz#8d5cf1132f836d7adbe42cf0b49df7816fc88240" + integrity sha512-/ACwoqx7XQi9knQs/G0qKvv5teDMhD7bXYns9N/wM8ah8iNb8jZ2uNO0YOgiq2o2poIvVtJS2YALasQuMSQ7Kw== dependencies: "@emotion/memoize" "^0.9.0" @@ -1201,14 +1201,14 @@ hoist-non-react-statics "^3.3.1" "@emotion/serialize@^1.2.0", "@emotion/serialize@^1.3.0", "@emotion/serialize@^1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.3.1.tgz#490b660178f43d2de8e92b278b51079d726c05c3" - integrity sha512-dEPNKzBPU+vFPGa+z3axPRn8XVDetYORmDC0wAiej+TNcOZE70ZMJa0X7JdeoM6q/nWTMZeLpN/fTnD9o8MQBA== + version "1.3.2" + resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.3.2.tgz#e1c1a2e90708d5d85d81ccaee2dfeb3cc0cccf7a" + integrity sha512-grVnMvVPK9yUVE6rkKfAJlYZgo0cu3l9iMC77V7DW6E1DUIrU68pSEXRmFZFOFB1QFo57TncmOcvcbMDWsL4yA== dependencies: "@emotion/hash" "^0.9.2" "@emotion/memoize" "^0.9.0" "@emotion/unitless" "^0.10.0" - "@emotion/utils" "^1.4.0" + "@emotion/utils" "^1.4.1" csstype "^3.0.2" "@emotion/sheet@^1.4.0": @@ -1238,10 +1238,10 @@ resolved "https://registry.yarnpkg.com/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.1.0.tgz#1a818a0b2c481efba0cf34e5ab1e0cb2dcb9dfaf" integrity sha512-+wBOcIV5snwGgI2ya3u99D7/FJquOIniQT1IKyDsBmEgwvpxMNeS65Oib7OnE2d2aY+3BU4OiH+0Wchf8yk3Hw== -"@emotion/utils@^1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.4.0.tgz#262f1d02aaedb2ec91c83a0955dd47822ad5fbdd" - integrity sha512-spEnrA1b6hDR/C68lC2M7m6ALPUHZC0lIY7jAS/B/9DuuO1ZP04eov8SMv/6fwRd8pzmsn2AuJEznRREWlQrlQ== +"@emotion/utils@^1.4.0", "@emotion/utils@^1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.4.1.tgz#b3adbb43de12ee2149541c4f1337d2eb7774f0ad" + integrity sha512-BymCXzCG3r72VKJxaYVwOXATqXIZ85cuvg0YOUDxMGNrKc1DJRZk8MgV5wyXRyEayIMd4FuXJIUgTBXvDNW5cA== "@emotion/weak-memoize@^0.4.0": version "0.4.0" @@ -1396,9 +1396,9 @@ integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== "@eslint/js@^9.9.0": - version "9.11.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.11.0.tgz#fca7533ef33aa608770734786e02f1041847f9bb" - integrity sha512-LPkkenkDqyzTFauZLLAPhIb48fj6drrfMvRGSL9tS3AcZBSVTllemLSNyCvHNNL2t797S/6DJNSIwRwXgMO/eQ== + version "9.11.1" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.11.1.tgz#8bcb37436f9854b3d9a561440daf916acd940986" + integrity sha512-/qu+TWz8WwPWc7/HcIJKi+c+MOm46GdVaSlTTQcaqaL53+GsoA6MxWp5PtTx48qbSP7ylM1Kn7nhvkugfJvRSA== "@humanwhocodes/config-array@^0.13.0": version "0.13.0" @@ -1641,85 +1641,85 @@ resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.19.2.tgz#0c896535473291cb41f152c180bedd5680a3b273" integrity sha512-baiMx18+IMuD1yyvOGaHM9QrVUPGGG0jC+z+IPHnRJWUAUvaKuWKyE8gjDj2rzv3sz9zOGoRSPgeBVHRhZnBlA== -"@rollup/rollup-android-arm-eabi@4.22.2": - version "4.22.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.2.tgz#4e0c4c462692ecb7ae2b008f25af4cced05ac4f9" - integrity sha512-8Ao+EDmTPjZ1ZBABc1ohN7Ylx7UIYcjReZinigedTOnGFhIctyGPxY2II+hJ6gD2/vkDKZTyQ0e7++kwv6wDrw== - -"@rollup/rollup-android-arm64@4.22.2": - version "4.22.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.2.tgz#d97ed02a950061adc2056d6d2d6df8f05d877ae9" - integrity sha512-I+B1v0a4iqdS9DvYt1RJZ3W+Oh9EVWjbY6gp79aAYipIbxSLEoQtFQlZEnUuwhDXCqMxJ3hluxKAdPD+GiluFQ== - -"@rollup/rollup-darwin-arm64@4.22.2": - version "4.22.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.2.tgz#06dec35316de9fe433d66c849ecc056e221ba422" - integrity sha512-BTHO7rR+LC67OP7I8N8GvdvnQqzFujJYWo7qCQ8fGdQcb8Gn6EQY+K1P+daQLnDCuWKbZ+gHAQZuKiQkXkqIYg== - -"@rollup/rollup-darwin-x64@4.22.2": - version "4.22.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.2.tgz#22ee27a0ccfdc045c2a37f6980351329516ce119" - integrity sha512-1esGwDNFe2lov4I6GsEeYaAMHwkqk0IbuGH7gXGdBmd/EP9QddJJvTtTF/jv+7R8ZTYPqwcdLpMTxK8ytP6k6Q== - -"@rollup/rollup-linux-arm-gnueabihf@4.22.2": - version "4.22.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.2.tgz#d86df2d8c600ebdd7251110a3357c53e0a583ace" - integrity sha512-GBHuY07x96OTEM3OQLNaUSUwrOhdMea/LDmlFHi/HMonrgF6jcFrrFFwJhhe84XtA1oK/Qh4yFS+VMREf6dobg== - -"@rollup/rollup-linux-arm-musleabihf@4.22.2": - version "4.22.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.2.tgz#a8b7b6a805356c8bd0409e4c5f56664d80a50aaa" - integrity sha512-Dbfa9Sc1G1lWxop0gNguXOfGhaXQWAGhZUcqA0Vs6CnJq8JW/YOw/KvyGtQFmz4yDr0H4v9X248SM7bizYj4yQ== - -"@rollup/rollup-linux-arm64-gnu@4.22.2": - version "4.22.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.2.tgz#766064021d2bfc42f13f4653f8870a9b8bbdc31d" - integrity sha512-Z1YpgBvFYhZIyBW5BoopwSg+t7yqEhs5HCei4JbsaXnhz/eZehT18DaXl957aaE9QK7TRGFryCAtStZywcQe1A== - -"@rollup/rollup-linux-arm64-musl@4.22.2": - version "4.22.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.2.tgz#490f49236102b97738d9406eaf5cd8d9dad35c15" - integrity sha512-66Zszr7i/JaQ0u/lefcfaAw16wh3oT72vSqubIMQqWzOg85bGCPhoeykG/cC5uvMzH80DQa2L539IqKht6twVA== - -"@rollup/rollup-linux-powerpc64le-gnu@4.22.2": - version "4.22.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.2.tgz#03a67f1476dd80f115ce35bc9b0d03c50c16679d" - integrity sha512-HpJCMnlMTfEhwo19bajvdraQMcAq3FX08QDx3OfQgb+414xZhKNf3jNvLFYKbbDSGBBrQh5yNwWZrdK0g0pokg== - -"@rollup/rollup-linux-riscv64-gnu@4.22.2": - version "4.22.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.2.tgz#d86e9b7b5b242652cd691c46d1939130c35cb68d" - integrity sha512-/egzQzbOSRef2vYCINKITGrlwkzP7uXRnL+xU2j75kDVp3iPdcF0TIlfwTRF8woBZllhk3QaxNOEj2Ogh3t9hg== - -"@rollup/rollup-linux-s390x-gnu@4.22.2": - version "4.22.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.2.tgz#c8fca373bec6df8550b31b3dbb56e2b241bc8718" - integrity sha512-qgYbOEbrPfEkH/OnUJd1/q4s89FvNJQIUldx8X2F/UM5sEbtkqZpf2s0yly2jSCKr1zUUOY1hnTP2J1WOzMAdA== - -"@rollup/rollup-linux-x64-gnu@4.22.2": - version "4.22.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.2.tgz#be182ef761c9b0147496e647ace44fd1b912344f" - integrity sha512-a0lkvNhFLhf+w7A95XeBqGQaG0KfS3hPFJnz1uraSdUe/XImkp/Psq0Ca0/UdD5IEAGoENVmnYrzSC9Y2a2uKQ== - -"@rollup/rollup-linux-x64-musl@4.22.2": - version "4.22.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.2.tgz#c280202d5b54d04f1e2b810359fe73c4973e8b72" - integrity sha512-sSWBVZgzwtsuG9Dxi9kjYOUu/wKW+jrbzj4Cclabqnfkot8Z3VEHcIgyenA3lLn/Fu11uDviWjhctulkhEO60g== - -"@rollup/rollup-win32-arm64-msvc@4.22.2": - version "4.22.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.2.tgz#8ae561401b92acb8ca7a842ffadececb22a2247e" - integrity sha512-t/YgCbZ638R/r7IKb9yCM6nAek1RUvyNdfU0SHMDLOf6GFe/VG1wdiUAsxTWHKqjyzkRGg897ZfCpdo1bsCSsA== - -"@rollup/rollup-win32-ia32-msvc@4.22.2": - version "4.22.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.2.tgz#c3a8b081595026eab9fccfe581624cb31af0d6f8" - integrity sha512-kTmX5uGs3WYOA+gYDgI6ITkZng9SP71FEMoHNkn+cnmb9Zuyyay8pf0oO5twtTwSjNGy1jlaWooTIr+Dw4tIbw== - -"@rollup/rollup-win32-x64-msvc@4.22.2": - version "4.22.2" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.2.tgz#c770006ccc780b2de7b2151fc7f37b49121a21c1" - integrity sha512-Yy8So+SoRz8I3NS4Bjh91BICPOSVgdompTIPYTByUqU66AXSIOgmW3Lv1ke3NORPqxdF+RdrZET+8vYai6f4aA== +"@rollup/rollup-android-arm-eabi@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz#8b613b9725e8f9479d142970b106b6ae878610d5" + integrity sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w== + +"@rollup/rollup-android-arm64@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz#654ca1049189132ff602bfcf8df14c18da1f15fb" + integrity sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA== + +"@rollup/rollup-darwin-arm64@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz#6d241d099d1518ef0c2205d96b3fa52e0fe1954b" + integrity sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q== + +"@rollup/rollup-darwin-x64@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz#42bd19d292a57ee11734c980c4650de26b457791" + integrity sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw== + +"@rollup/rollup-linux-arm-gnueabihf@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz#f23555ee3d8fe941c5c5fd458cd22b65eb1c2232" + integrity sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ== + +"@rollup/rollup-linux-arm-musleabihf@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz#f3bbd1ae2420f5539d40ac1fde2b38da67779baa" + integrity sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg== + +"@rollup/rollup-linux-arm64-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz#7abe900120113e08a1f90afb84c7c28774054d15" + integrity sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw== + +"@rollup/rollup-linux-arm64-musl@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz#9e655285c8175cd44f57d6a1e8e5dedfbba1d820" + integrity sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA== + +"@rollup/rollup-linux-powerpc64le-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz#9a79ae6c9e9d8fe83d49e2712ecf4302db5bef5e" + integrity sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg== + +"@rollup/rollup-linux-riscv64-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz#67ac70eca4ace8e2942fabca95164e8874ab8128" + integrity sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA== + +"@rollup/rollup-linux-s390x-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz#9f883a7440f51a22ed7f99e1d070bd84ea5005fc" + integrity sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q== + +"@rollup/rollup-linux-x64-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz#70116ae6c577fe367f58559e2cffb5641a1dd9d0" + integrity sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg== + +"@rollup/rollup-linux-x64-musl@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz#f473f88219feb07b0b98b53a7923be716d1d182f" + integrity sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g== + +"@rollup/rollup-win32-arm64-msvc@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz#4349482d17f5d1c58604d1c8900540d676f420e0" + integrity sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw== + +"@rollup/rollup-win32-ia32-msvc@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz#a6fc39a15db618040ec3c2a24c1e26cb5f4d7422" + integrity sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g== + +"@rollup/rollup-win32-x64-msvc@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz#3dd5d53e900df2a40841882c02e56f866c04d202" + integrity sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q== "@rtsao/scc@^1.1.0": version "1.1.0" @@ -1881,16 +1881,16 @@ integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== "@types/node@*": - version "22.5.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.5.tgz#52f939dd0f65fc552a4ad0b392f3c466cc5d7a44" - integrity sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA== + version "22.6.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.6.1.tgz#e531a45f4d78f14a8468cb9cdc29dc9602afc7ac" + integrity sha512-V48tCfcKb/e6cVUigLAaJDAILdMP0fUW6BidkPK4GpGjXcfbnoHasCZDwz3N3yVt5we2RHm4XTQCpv0KJz9zqw== dependencies: undici-types "~6.19.2" "@types/node@^20.14.2": - version "20.16.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.16.5.tgz#d43c7f973b32ffdf9aa7bd4f80e1072310fd7a53" - integrity sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA== + version "20.16.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.16.6.tgz#0bf99fcebcee68ecdc2c45b160a10a0fe5c652b8" + integrity sha512-T7PpxM/6yeDE+AdlVysT62BX6/bECZOmQAgiFg5NoBd5MQheZ3tzal7f1wvzfiEcmrcJNRi2zRr2nY2zF+0uqw== dependencies: undici-types "~6.19.2" @@ -1958,16 +1958,16 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@8.6.0": - version "8.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.6.0.tgz#20049754ff9f6d3a09bf240297f029ce04290999" - integrity sha512-UOaz/wFowmoh2G6Mr9gw60B1mm0MzUtm6Ic8G2yM1Le6gyj5Loi/N+O5mocugRGY+8OeeKmkMmbxNqUCq3B4Sg== +"@typescript-eslint/eslint-plugin@8.7.0": + version "8.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.7.0.tgz#d0070f206daad26253bf00ca5b80f9b54f9e2dd0" + integrity sha512-RIHOoznhA3CCfSTFiB6kBGLQtB/sox+pJ6jeFu6FxJvqL8qRxq/FfGO/UhsGgQM9oGdXkV4xUgli+dt26biB6A== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "8.6.0" - "@typescript-eslint/type-utils" "8.6.0" - "@typescript-eslint/utils" "8.6.0" - "@typescript-eslint/visitor-keys" "8.6.0" + "@typescript-eslint/scope-manager" "8.7.0" + "@typescript-eslint/type-utils" "8.7.0" + "@typescript-eslint/utils" "8.7.0" + "@typescript-eslint/visitor-keys" "8.7.0" graphemer "^1.4.0" ignore "^5.3.1" natural-compare "^1.4.0" @@ -1996,15 +1996,15 @@ dependencies: "@typescript-eslint/utils" "5.62.0" -"@typescript-eslint/parser@8.6.0": - version "8.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.6.0.tgz#02e092b9dc8b4e319172af620d0d39b337d948f6" - integrity sha512-eQcbCuA2Vmw45iGfcyG4y6rS7BhWfz9MQuk409WD47qMM+bKCGQWXxvoOs1DUp+T7UBMTtRTVT+kXr7Sh4O9Ow== +"@typescript-eslint/parser@8.7.0": + version "8.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.7.0.tgz#a567b0890d13db72c7348e1d88442ea8ab4e9173" + integrity sha512-lN0btVpj2unxHlNYLI//BQ7nzbMJYBVQX5+pbNXvGYazdlgYonMn4AhhHifQ+J4fGRYA/m1DjaQjx+fDetqBOQ== dependencies: - "@typescript-eslint/scope-manager" "8.6.0" - "@typescript-eslint/types" "8.6.0" - "@typescript-eslint/typescript-estree" "8.6.0" - "@typescript-eslint/visitor-keys" "8.6.0" + "@typescript-eslint/scope-manager" "8.7.0" + "@typescript-eslint/types" "8.7.0" + "@typescript-eslint/typescript-estree" "8.7.0" + "@typescript-eslint/visitor-keys" "8.7.0" debug "^4.3.4" "@typescript-eslint/parser@^5.5.0": @@ -2025,13 +2025,13 @@ "@typescript-eslint/types" "5.62.0" "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/scope-manager@8.6.0": - version "8.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.6.0.tgz#28cc2fc26a84b75addf45091a2c6283e29e2c982" - integrity sha512-ZuoutoS5y9UOxKvpc/GkvF4cuEmpokda4wRg64JEia27wX+PysIE9q+lzDtlHHgblwUWwo5/Qn+/WyTUvDwBHw== +"@typescript-eslint/scope-manager@8.7.0": + version "8.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.7.0.tgz#90ee7bf9bc982b9260b93347c01a8bc2b595e0b8" + integrity sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg== dependencies: - "@typescript-eslint/types" "8.6.0" - "@typescript-eslint/visitor-keys" "8.6.0" + "@typescript-eslint/types" "8.7.0" + "@typescript-eslint/visitor-keys" "8.7.0" "@typescript-eslint/type-utils@5.62.0": version "5.62.0" @@ -2043,13 +2043,13 @@ debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/type-utils@8.6.0": - version "8.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.6.0.tgz#d4347e637478bef88cee1db691fcfa20ade9b8a0" - integrity sha512-dtePl4gsuenXVwC7dVNlb4mGDcKjDT/Ropsk4za/ouMBPplCLyznIaR+W65mvCvsyS97dymoBRrioEXI7k0XIg== +"@typescript-eslint/type-utils@8.7.0": + version "8.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.7.0.tgz#d56b104183bdcffcc434a23d1ce26cde5e42df93" + integrity sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ== dependencies: - "@typescript-eslint/typescript-estree" "8.6.0" - "@typescript-eslint/utils" "8.6.0" + "@typescript-eslint/typescript-estree" "8.7.0" + "@typescript-eslint/utils" "8.7.0" debug "^4.3.4" ts-api-utils "^1.3.0" @@ -2058,10 +2058,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/types@8.6.0": - version "8.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.6.0.tgz#cdc3a16f83f2f0663d6723e9fd032331cdd9f51c" - integrity sha512-rojqFZGd4MQxw33SrOy09qIDS8WEldM8JWtKQLAjf/X5mGSeEFh5ixQlxssMNyPslVIk9yzWqXCsV2eFhYrYUw== +"@typescript-eslint/types@8.7.0": + version "8.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.7.0.tgz#21d987201c07b69ce7ddc03451d7196e5445ad19" + integrity sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w== "@typescript-eslint/typescript-estree@5.62.0": version "5.62.0" @@ -2076,13 +2076,13 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@8.6.0": - version "8.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.6.0.tgz#f945506de42871f04868371cb5bf21e8f7266e01" - integrity sha512-MOVAzsKJIPIlLK239l5s06YXjNqpKTVhBVDnqUumQJja5+Y94V3+4VUFRA0G60y2jNnTVwRCkhyGQpavfsbq/g== +"@typescript-eslint/typescript-estree@8.7.0": + version "8.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.7.0.tgz#6c7db6baa4380b937fa81466c546d052f362d0e8" + integrity sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg== dependencies: - "@typescript-eslint/types" "8.6.0" - "@typescript-eslint/visitor-keys" "8.6.0" + "@typescript-eslint/types" "8.7.0" + "@typescript-eslint/visitor-keys" "8.7.0" debug "^4.3.4" fast-glob "^3.3.2" is-glob "^4.0.3" @@ -2104,15 +2104,15 @@ eslint-scope "^5.1.1" semver "^7.3.7" -"@typescript-eslint/utils@8.6.0": - version "8.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.6.0.tgz#175fe893f32804bed1e72b3364ea6bbe1044181c" - integrity sha512-eNp9cWnYf36NaOVjkEUznf6fEgVy1TWpE0o52e4wtojjBx7D1UV2WAWGzR+8Y5lVFtpMLPwNbC67T83DWSph4A== +"@typescript-eslint/utils@8.7.0": + version "8.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.7.0.tgz#cef3f70708b5b5fd7ed8672fc14714472bd8a011" + integrity sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@typescript-eslint/scope-manager" "8.6.0" - "@typescript-eslint/types" "8.6.0" - "@typescript-eslint/typescript-estree" "8.6.0" + "@typescript-eslint/scope-manager" "8.7.0" + "@typescript-eslint/types" "8.7.0" + "@typescript-eslint/typescript-estree" "8.7.0" "@typescript-eslint/visitor-keys@5.62.0": version "5.62.0" @@ -2122,12 +2122,12 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@8.6.0": - version "8.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.6.0.tgz#5432af4a1753f376f35ab5b891fc9db237aaf76f" - integrity sha512-wapVFfZg9H0qOYh4grNVQiMklJGluQrOUiOhYRrQWhx7BY/+I1IYb8BczWNbbUpO+pqy0rDciv3lQH5E1bCLrg== +"@typescript-eslint/visitor-keys@8.7.0": + version "8.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.7.0.tgz#5e46f1777f9d69360a883c1a56ac3c511c9659a8" + integrity sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ== dependencies: - "@typescript-eslint/types" "8.6.0" + "@typescript-eslint/types" "8.7.0" eslint-visitor-keys "^3.4.3" "@ungap/structured-clone@^1.2.0": @@ -2339,9 +2339,9 @@ aria-query@5.1.3, aria-query@~5.1.3: deep-equal "^2.0.5" aria-query@^5.0.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.1.tgz#ebcb2c0d7fc43e68e4cb22f774d1209cb627ab42" - integrity sha512-Z/ZeOgVl7bcSYZ/u/rh0fOpvEpq//LZmdbkXyc7syVzjPAhfOa9ebsdTSjEBDU4vs5nC98Kfduj1uFo0qyET3g== + version "5.3.2" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.2.tgz#93f81a43480e33a338f19163a3d10a50c01dcd59" + integrity sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw== array-buffer-byte-length@^1.0.0, array-buffer-byte-length@^1.0.1: version "1.0.1" @@ -2619,9 +2619,9 @@ camelcase@^7.0.0: integrity sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw== caniuse-lite@^1.0.30001646: - version "1.0.30001662" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001662.tgz#3574b22dfec54a3f3b6787331da1040fe8e763ec" - integrity sha512-sgMUVwLmGseH8ZIrm1d51UbrhqMCH3jvS7gF/M6byuHOnKyLOBL7W8yz5V02OHwgLGA36o/AFhWzzh4uc5aqTA== + version "1.0.30001663" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001663.tgz#1529a723505e429fdfd49532e9fc42273ba7fed7" + integrity sha512-o9C3X27GLKbLeTYZ6HBOLU1tsAcBZsLis28wrVzddShCS16RujjHp9GDHKZqrB3meE0YjhawvMFsGb/igqiPzA== chai@^4.3.10: version "4.5.0" @@ -2711,7 +2711,7 @@ clsx@^2.1.0, clsx@^2.1.1: "codeforlife@github:ocadotechnology/codeforlife-package-javascript#portal-frontend-52": version "2.3.5" - resolved "https://codeload.github.com/ocadotechnology/codeforlife-package-javascript/tar.gz/3972609c49f95cf88766902e2443accaeb2fe19d" + resolved "https://codeload.github.com/ocadotechnology/codeforlife-package-javascript/tar.gz/1879a14448c1e38a5c47f616c075e24785e1a241" dependencies: "@emotion/react" "^11.10.6" "@emotion/styled" "^11.10.6" @@ -3058,9 +3058,9 @@ eastasianwidth@^0.2.0: integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== electron-to-chromium@^1.5.4: - version "1.5.26" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.26.tgz#449b4fa90e83ab98abbe3b6a96c8ee395de94452" - integrity sha512-Z+OMe9M/V6Ep9n/52+b7lkvYEps26z4Yz3vjWL1V61W0q+VLF1pOHhMY17sa4roz4AWmULSI8E6SAojZA5L0YQ== + version "1.5.28" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.28.tgz#aee074e202c6ee8a0030a9c2ef0b3fe9f967d576" + integrity sha512-VufdJl+rzaKZoYVUijN13QcXVF5dWPZANeFTLNy+OSpHdDL5ynXTF35+60RSBbaQYB1ae723lQXHCrf4pyLsMw== emoji-regex@^8.0.0: version "8.0.0" @@ -3299,9 +3299,9 @@ eslint-import-resolver-node@^0.3.9: resolve "^1.22.4" eslint-module-utils@^2.9.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.11.0.tgz#b99b211ca4318243f09661fae088f373ad5243c4" - integrity sha512-gbBE5Hitek/oG6MUVj6sFuzEjA/ClzNflVrLovHi/JgLdC7fiN5gLAY1WIPW1a0V5I999MnsrvVrCOGmmVqDBQ== + version "2.11.1" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.11.1.tgz#6d5a05f09af98f4d238a819ae4c23626a75fa65b" + integrity sha512-EwcbfLOhwVMAfatfqLecR2yv3dE5+kQ8kx+Rrt0DvDXEVwW86KQ/xbMDQhtp5l42VXukD5SOF8mQQHbaNtO0CQ== dependencies: debug "^3.2.7" @@ -5257,28 +5257,28 @@ rimraf@^3.0.2: glob "^7.1.3" rollup@^4.20.0: - version "4.22.2" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.22.2.tgz#d762fa52c6ddb1307c1d6e8b463ba79432ffbb6b" - integrity sha512-JWWpTrZmqQGQWt16xvNn6KVIUz16VtZwl984TKw0dfqqRpFwtLJYYk1/4BTgplndMQKWUk/yB4uOShYmMzA2Vg== + version "4.22.4" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.22.4.tgz#4135a6446671cd2a2453e1ad42a45d5973ec3a0f" + integrity sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A== dependencies: "@types/estree" "1.0.5" optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.22.2" - "@rollup/rollup-android-arm64" "4.22.2" - "@rollup/rollup-darwin-arm64" "4.22.2" - "@rollup/rollup-darwin-x64" "4.22.2" - "@rollup/rollup-linux-arm-gnueabihf" "4.22.2" - "@rollup/rollup-linux-arm-musleabihf" "4.22.2" - "@rollup/rollup-linux-arm64-gnu" "4.22.2" - "@rollup/rollup-linux-arm64-musl" "4.22.2" - "@rollup/rollup-linux-powerpc64le-gnu" "4.22.2" - "@rollup/rollup-linux-riscv64-gnu" "4.22.2" - "@rollup/rollup-linux-s390x-gnu" "4.22.2" - "@rollup/rollup-linux-x64-gnu" "4.22.2" - "@rollup/rollup-linux-x64-musl" "4.22.2" - "@rollup/rollup-win32-arm64-msvc" "4.22.2" - "@rollup/rollup-win32-ia32-msvc" "4.22.2" - "@rollup/rollup-win32-x64-msvc" "4.22.2" + "@rollup/rollup-android-arm-eabi" "4.22.4" + "@rollup/rollup-android-arm64" "4.22.4" + "@rollup/rollup-darwin-arm64" "4.22.4" + "@rollup/rollup-darwin-x64" "4.22.4" + "@rollup/rollup-linux-arm-gnueabihf" "4.22.4" + "@rollup/rollup-linux-arm-musleabihf" "4.22.4" + "@rollup/rollup-linux-arm64-gnu" "4.22.4" + "@rollup/rollup-linux-arm64-musl" "4.22.4" + "@rollup/rollup-linux-powerpc64le-gnu" "4.22.4" + "@rollup/rollup-linux-riscv64-gnu" "4.22.4" + "@rollup/rollup-linux-s390x-gnu" "4.22.4" + "@rollup/rollup-linux-x64-gnu" "4.22.4" + "@rollup/rollup-linux-x64-musl" "4.22.4" + "@rollup/rollup-win32-arm64-msvc" "4.22.4" + "@rollup/rollup-win32-ia32-msvc" "4.22.4" + "@rollup/rollup-win32-x64-msvc" "4.22.4" fsevents "~2.3.2" rrweb-cssom@^0.6.0: @@ -5846,13 +5846,13 @@ typed-array-length@^1.0.6: possible-typed-array-names "^1.0.0" typescript-eslint@^8.1.0: - version "8.6.0" - resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.6.0.tgz#5f0b5e23b34385ef146e447616c1a0d6bd14bedb" - integrity sha512-eEhhlxCEpCd4helh3AO1hk0UP2MvbRi9CtIAJTVPQjuSXOOO2jsEacNi4UdcJzZJbeuVg1gMhtZ8UYb+NFYPrA== + version "8.7.0" + resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.7.0.tgz#6c84f94013a0cc0074da7d639c2644eae20c3171" + integrity sha512-nEHbEYJyHwsuf7c3V3RS7Saq+1+la3i0ieR3qP0yjqWSzVmh8Drp47uOl9LjbPANac4S7EFSqvcYIKXUUwIfIQ== dependencies: - "@typescript-eslint/eslint-plugin" "8.6.0" - "@typescript-eslint/parser" "8.6.0" - "@typescript-eslint/utils" "8.6.0" + "@typescript-eslint/eslint-plugin" "8.7.0" + "@typescript-eslint/parser" "8.7.0" + "@typescript-eslint/utils" "8.7.0" typescript@^5.3.3: version "5.6.2" From e2e2f1852f2ca7e4d13e7c7281a7a041863af869 Mon Sep 17 00:00:00 2001 From: SKairinos Date: Tue, 24 Sep 2024 12:56:09 +0000 Subject: [PATCH 15/25] fix tables --- src/components/table/Body.tsx | 17 ------- src/components/table/Cell.tsx | 48 ------------------- src/components/table/Row.tsx | 20 -------- src/components/table/Table.tsx | 42 ---------------- src/components/table/index.tsx | 15 ------ .../teacherDashboard/classes/ClassTable.tsx | 20 ++++---- .../classes/JoinClassRequestTable.tsx | 12 ++--- .../classes/transferStudents/StudentTable.tsx | 12 ++--- .../transferStudents/TransferStudentsForm.tsx | 8 ++-- src/pages/teacherDashboard/school/Leave.tsx | 20 ++++---- .../school/TeacherInvitationTable.tsx | 25 +++++----- .../teacherDashboard/school/TeacherTable.tsx | 25 +++++----- .../school/TransferClasses.tsx | 20 ++++---- yarn.lock | 2 +- 14 files changed, 73 insertions(+), 213 deletions(-) delete mode 100644 src/components/table/Body.tsx delete mode 100644 src/components/table/Cell.tsx delete mode 100644 src/components/table/Row.tsx delete mode 100644 src/components/table/Table.tsx delete mode 100644 src/components/table/index.tsx diff --git a/src/components/table/Body.tsx b/src/components/table/Body.tsx deleted file mode 100644 index 569e94f..0000000 --- a/src/components/table/Body.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { Children, type FC, type ReactNode } from "react" - -import Row from "./Row" - -export interface BodyProps { - children: ReactNode -} - -const Body: FC = ({ children }) => ( - - {Children.map(children, child => ( - <>{child} - ))} - -) - -export default Body diff --git a/src/components/table/Cell.tsx b/src/components/table/Cell.tsx deleted file mode 100644 index b84c572..0000000 --- a/src/components/table/Cell.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import { - Stack, - type StackProps, - TableCell, - type TableCellProps, - tableCellClasses, -} from "@mui/material" -import { type FC } from "react" - -export interface CellProps extends TableCellProps { - alignItems?: StackProps["alignItems"] - justifyContent?: StackProps["justifyContent"] - direction?: StackProps["direction"] -} - -const Cell: FC = ({ - children, - sx, - alignItems = "center", - justifyContent = "flex-start", - direction = "row", - ...otherTableCellProps -}) => { - return ( - ({ - outline: `1px solid ${theme.palette.common.white}`, - [`&.${tableCellClasses.head}`]: { - color: theme.palette.common.white, - }, - ...(typeof sx === "function" ? sx(theme) : sx), - })} - {...otherTableCellProps} - > - - {children} - - - ) -} - -export default Cell diff --git a/src/components/table/Row.tsx b/src/components/table/Row.tsx deleted file mode 100644 index 4e6a46e..0000000 --- a/src/components/table/Row.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { TableRow, type TableRowProps } from "@mui/material" -import { type FC } from "react" - -export interface RowProps extends TableRowProps {} - -const Row: FC = ({ sx, ...otherTableRowProps }) => ( - ({ - // hide last border - "&:last-child td, &:last-child th": { - border: 0, - }, - ...(typeof sx === "function" ? sx(theme) : sx), - })} - {...otherTableRowProps} - /> -) - -export default Row diff --git a/src/components/table/Table.tsx b/src/components/table/Table.tsx deleted file mode 100644 index 5882ca3..0000000 --- a/src/components/table/Table.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import { - Table as MuiTable, - TableBody, - TableContainer, - type TableContainerProps, - TableHead, -} from "@mui/material" -import { type FC } from "react" - -import Cell from "./Cell" -import Row from "./Row" - -export interface TableProps { - titles: string[] - children: React.ReactNode - className?: string - containerProps?: TableContainerProps -} - -const Table: FC = ({ - titles, - children, - className, - containerProps, -}) => { - return ( - - - - - {titles.map((title, index) => ( - {title} - ))} - - - {children} - - - ) -} - -export default Table diff --git a/src/components/table/index.tsx b/src/components/table/index.tsx deleted file mode 100644 index d0c08cd..0000000 --- a/src/components/table/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import Body, { type BodyProps } from "./Body" -import Cell, { type CellProps } from "./Cell" -import Row, { type RowProps } from "./Row" -import Table, { type TableProps } from "./Table" - -export { - Table, - Body, - Cell, - Row, - type RowProps, - type TableProps, - type CellProps, - type BodyProps, -} diff --git a/src/pages/teacherDashboard/classes/ClassTable.tsx b/src/pages/teacherDashboard/classes/ClassTable.tsx index 3e1c659..b5dda35 100644 --- a/src/pages/teacherDashboard/classes/ClassTable.tsx +++ b/src/pages/teacherDashboard/classes/ClassTable.tsx @@ -1,3 +1,4 @@ +import * as tables from "codeforlife/components/table" import { CopyIconButton, TablePagination } from "codeforlife/components" import { Create as CreateIcon } from "@mui/icons-material" import { type FC } from "react" @@ -6,7 +7,6 @@ import { type SchoolTeacherUser } from "codeforlife/api" import { Typography } from "@mui/material" import { generatePath } from "react-router" -import * as tables from "../../../components/table" import { type RetrieveUserResult } from "../../../api/user" import { paths } from "../../../routes" import { useLazyListClassesQuery } from "../../../api/klass" @@ -31,19 +31,23 @@ const ClassTable: FC = ({ authUser }) => ( > {classes => ( {classes.map(klass => ( - + {klass.name} - + {klass.id} - + {authUser.teacher.is_admin && ( {klass.teacher.id === authUser.teacher.id @@ -51,7 +55,7 @@ const ClassTable: FC = ({ authUser }) => ( : `${klass.teacher.user.first_name} ${klass.teacher.user.last_name}`} )} - + = ({ authUser }) => ( > Edit details - - + + ))} )} diff --git a/src/pages/teacherDashboard/classes/JoinClassRequestTable.tsx b/src/pages/teacherDashboard/classes/JoinClassRequestTable.tsx index f6b3c3d..68d4607 100644 --- a/src/pages/teacherDashboard/classes/JoinClassRequestTable.tsx +++ b/src/pages/teacherDashboard/classes/JoinClassRequestTable.tsx @@ -1,3 +1,4 @@ +import * as tables from "codeforlife/components/table" import { Add as AddIcon, DoNotDisturb as DoNotDisturbIcon, @@ -10,7 +11,6 @@ import { TablePagination } from "codeforlife/components" import { generatePath } from "react-router" import { useNavigate } from "codeforlife/hooks" -import * as tables from "../../../components/table" import { useHandleJoinClassRequestMutation, useLazyListUsersQuery, @@ -47,10 +47,10 @@ const JoinClassRequestTable: FC = ({ users.length ? ( {users.map(user => ( - + {user.first_name} {user.last_name} @@ -66,7 +66,7 @@ const JoinClassRequestTable: FC = ({ ? "" : ` (${user.requesting_to_join_class!.teacher.user.first_name} ${user.requesting_to_join_class!.teacher.user.last_name})`} - + = ({ > Reject - - + + ))} ) : ( diff --git a/src/pages/teacherDashboard/classes/transferStudents/StudentTable.tsx b/src/pages/teacherDashboard/classes/transferStudents/StudentTable.tsx index c33f326..511ceca 100644 --- a/src/pages/teacherDashboard/classes/transferStudents/StudentTable.tsx +++ b/src/pages/teacherDashboard/classes/transferStudents/StudentTable.tsx @@ -1,8 +1,8 @@ +import * as tables from "codeforlife/components/table" import { type FC } from "react" import { TablePagination } from "codeforlife/components" import { Typography } from "@mui/material" -import * as tables from "../../../../components/table" import { type RetrieveClassResult } from "../../../../api/klass" import { useLazyListUsersQuery } from "../../../../api/user" @@ -27,7 +27,7 @@ const StudentTable: FC = ({ klass, newClass }) => ( > {users => ( = ({ klass, newClass }) => ( > {users.length ? ( users.map(user => ( - + {user.first_name} - + )) ) : ( - + (no students) - + )} )} diff --git a/src/pages/teacherDashboard/classes/transferStudents/TransferStudentsForm.tsx b/src/pages/teacherDashboard/classes/transferStudents/TransferStudentsForm.tsx index d6fa3e5..4d8df80 100644 --- a/src/pages/teacherDashboard/classes/transferStudents/TransferStudentsForm.tsx +++ b/src/pages/teacherDashboard/classes/transferStudents/TransferStudentsForm.tsx @@ -1,4 +1,5 @@ import * as forms from "codeforlife/components/form" +import * as tables from "codeforlife/components/table" import { Stack, Typography } from "@mui/material" import { type FC } from "react" import { LinkButton } from "codeforlife/components/router" @@ -6,7 +7,6 @@ import { type StudentUser } from "codeforlife/api" import { submitForm } from "codeforlife/utils/form" import { useNavigate } from "codeforlife/hooks" -import * as tables from "../../../../components/table" import { type TransferStudentsArg, useTransferStudentsMutation, @@ -81,9 +81,9 @@ const TransferStudentsForm: FC = ({ }, })} > - + {studentUsers.map(studentUser => ( - + {studentUser.first_name} = ({ placeholder={`Enter a name for ${studentUser.first_name}`} /> - + ))} diff --git a/src/pages/teacherDashboard/school/Leave.tsx b/src/pages/teacherDashboard/school/Leave.tsx index e7d57e9..1fa9960 100644 --- a/src/pages/teacherDashboard/school/Leave.tsx +++ b/src/pages/teacherDashboard/school/Leave.tsx @@ -1,5 +1,6 @@ import * as form from "codeforlife/components/form" import * as page from "codeforlife/components/page" +import * as tables from "codeforlife/components/table" import * as yup from "yup" import { CircularProgress, Stack, Typography } from "@mui/material" import { type FC, useEffect } from "react" @@ -9,7 +10,6 @@ import { TablePagination } from "codeforlife/components" import { type User } from "codeforlife/api" import { submitForm } from "codeforlife/utils/form" -import * as table from "../../../components/table" import { useLazyListClassesQuery, useUpdateClassesMutation, @@ -125,27 +125,27 @@ const Leave: FC = ({ authUserId }) => { )} onSubmit={submitForm(updateClasses)} > - {classes.map(klass => ( - - + + {klass.name} - - + + - - + + ))} - + = ({ preferCacheValue > {schoolTeacherInvitations => ( - = ({ invited_teacher_email, expires_at, }) => ( - - + + {invited_teacher_first_name} {invited_teacher_last_name}{" "} ({expires_at < new Date() ? "expired" : "pending"}) - - + @@ -106,9 +105,9 @@ const TeacherInvitationTable: FC = ({ ({invited_teacher_email}) - + {authUser.teacher.is_admin && ( - + {invited_teacher_is_admin ? ( - + )} - + ), )} - + )} ) diff --git a/src/pages/teacherDashboard/school/TeacherTable.tsx b/src/pages/teacherDashboard/school/TeacherTable.tsx index 6b2891c..9a8c34e 100644 --- a/src/pages/teacherDashboard/school/TeacherTable.tsx +++ b/src/pages/teacherDashboard/school/TeacherTable.tsx @@ -1,3 +1,4 @@ +import * as tables from "codeforlife/components/table" import { Add as AddIcon, Create as CreateIcon, @@ -12,7 +13,6 @@ import { TablePagination } from "codeforlife/components" import { generatePath } from "react-router" import { useNavigate } from "codeforlife/hooks" -import * as table from "../../../components/table" import { type RetrieveUserResult, useLazyListUsersQuery, @@ -61,24 +61,23 @@ const TeacherTable: FC = ({ authUser }) => { preferCacheValue > {users => ( - {users.map(user => ( - - + + {user.first_name} {user.last_name} {user.id === authUser.id ? (you) : ""} - - + @@ -88,9 +87,9 @@ const TeacherTable: FC = ({ authUser }) => { : "Standard Teacher"} ({user.email}) - + {authUser.teacher.is_admin && ( - + {authUser.id === user.id && ( )} - + )} - + ))} - + )} ) diff --git a/src/pages/teacherDashboard/school/TransferClasses.tsx b/src/pages/teacherDashboard/school/TransferClasses.tsx index 488ec00..2cc7f54 100644 --- a/src/pages/teacherDashboard/school/TransferClasses.tsx +++ b/src/pages/teacherDashboard/school/TransferClasses.tsx @@ -1,5 +1,6 @@ import * as form from "codeforlife/components/form" import * as page from "codeforlife/components/page" +import * as tables from "codeforlife/components/table" import { Link, LinkButton } from "codeforlife/components/router" import { type SchoolTeacher, type User } from "codeforlife/api" import { Stack, Typography } from "@mui/material" @@ -8,7 +9,6 @@ import { TablePagination } from "codeforlife/components" import { submitForm } from "codeforlife/utils/form" import { useNavigate } from "codeforlife/hooks" -import * as table from "../../../components/table" import { useLazyListClassesQuery, useUpdateClassesMutation, @@ -98,27 +98,27 @@ const TransferClasses: FC = ({ authUserId, user }) => { )} onSubmit={submitForm(updateClasses)} > - {classes.map(klass => ( - - + + {klass.name} - - + + - - + + ))} - + Date: Tue, 24 Sep 2024 12:58:20 +0000 Subject: [PATCH 16/25] fix type error --- src/pages/home/TargetAudience.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/TargetAudience.tsx b/src/pages/home/TargetAudience.tsx index 8338de9..3378e90 100644 --- a/src/pages/home/TargetAudience.tsx +++ b/src/pages/home/TargetAudience.tsx @@ -38,7 +38,7 @@ const TargetAudience: FC = () => { "Helping teachers and families to inspire the next generation of computer scientists.", "Anyone can learn how to code. We will help you learn how. It's fun, free and easy.", ] - const linkButtons: LinkButtonProps[] = [ + const linkButtons: LinkButtonProps<"to">[] = [ { children: "Learn more", to: paths.teacher._, From 49bc9ca8a7e5f9b2b751ce4f7a2186202db308a4 Mon Sep 17 00:00:00 2001 From: SKairinos Date: Tue, 24 Sep 2024 14:03:25 +0000 Subject: [PATCH 17/25] restructure join class request view --- .../teacherDashboard/classes/Classes.tsx | 2 +- .../classes/joinClassRequest/AddedStudent.tsx | 61 ++++++++ .../HandleRequest.tsx} | 132 ++---------------- .../joinClassRequest/JoinClassRequest.tsx | 66 +++++++++ 4 files changed, 143 insertions(+), 118 deletions(-) create mode 100644 src/pages/teacherDashboard/classes/joinClassRequest/AddedStudent.tsx rename src/pages/teacherDashboard/classes/{JoinClassRequest.tsx => joinClassRequest/HandleRequest.tsx} (55%) create mode 100644 src/pages/teacherDashboard/classes/joinClassRequest/JoinClassRequest.tsx diff --git a/src/pages/teacherDashboard/classes/Classes.tsx b/src/pages/teacherDashboard/classes/Classes.tsx index 6f0db83..67f6165 100644 --- a/src/pages/teacherDashboard/classes/Classes.tsx +++ b/src/pages/teacherDashboard/classes/Classes.tsx @@ -5,7 +5,7 @@ import { type SchoolTeacherUser } from "codeforlife/api" import Class from "./class/Class" import ClassTable from "./ClassTable" import CreateClassForm from "./CreateClassForm" -import JoinClassRequest from "./JoinClassRequest" +import JoinClassRequest from "./joinClassRequest/JoinClassRequest" import JoinClassRequestTable from "./JoinClassRequestTable" import ResetStudentsPassword from "./class/ResetStudentsPassword" import { type RetrieveUserResult } from "../../../api/user" diff --git a/src/pages/teacherDashboard/classes/joinClassRequest/AddedStudent.tsx b/src/pages/teacherDashboard/classes/joinClassRequest/AddedStudent.tsx new file mode 100644 index 0000000..1c81fd3 --- /dev/null +++ b/src/pages/teacherDashboard/classes/joinClassRequest/AddedStudent.tsx @@ -0,0 +1,61 @@ +import * as page from "codeforlife/components/page" +import { type FC } from "react" +import { Link } from "codeforlife/components/router" +import { type StudentUser } from "codeforlife/api" +import { Typography } from "@mui/material" +import { generatePath } from "react-router" + +import { type RetrieveClassResult } from "../../../../api/klass" +import { type RetrieveUserResult } from "../../../../api/user" +import { paths } from "../../../../routes" + +export interface AddedStudentProps { + klass: RetrieveClassResult + user: StudentUser +} + +const AddedStudent: FC = ({ klass, user }) => ( + <> + + + External student added to class {klass.name} ({klass.id}) + + + + + The student has been successfully added to the class {klass.name}. + + + Please provide the student with their new login details: + + + + + Class Access Code: {klass.id} + + + Name: {user.first_name} + + + + + {user.first_name} should now login as a student with these details. + + + {user.first_name}'s password is unchanged. You may manage this + student, including changing their name and password, as with other + students. + + + Class + + + +) + +export default AddedStudent diff --git a/src/pages/teacherDashboard/classes/JoinClassRequest.tsx b/src/pages/teacherDashboard/classes/joinClassRequest/HandleRequest.tsx similarity index 55% rename from src/pages/teacherDashboard/classes/JoinClassRequest.tsx rename to src/pages/teacherDashboard/classes/joinClassRequest/HandleRequest.tsx index d1a71fd..d6a4cf0 100644 --- a/src/pages/teacherDashboard/classes/JoinClassRequest.tsx +++ b/src/pages/teacherDashboard/classes/joinClassRequest/HandleRequest.tsx @@ -1,85 +1,32 @@ import * as form from "codeforlife/components/form" import * as page from "codeforlife/components/page" -import * as yup from "yup" -import { - CircularProgress, - Unstable_Grid2 as Grid, - Stack, - Typography, -} from "@mui/material" -import { type FC, useEffect, useState } from "react" -import { type IndependentUser, type StudentUser } from "codeforlife/api" +import { Unstable_Grid2 as Grid, Stack, Typography } from "@mui/material" import { Link, LinkButton } from "codeforlife/components/router" -import { useNavigate, useParams } from "codeforlife/hooks" +import { type FC } from "react" +import { type IndependentUser } from "codeforlife/api" import { TablePagination } from "codeforlife/components" import { generatePath } from "react-router" import { submitForm } from "codeforlife/utils/form" -import { - type RetrieveClassResult, - useLazyRetrieveClassQuery, -} from "../../../api/klass" import { type RetrieveUserResult, useHandleJoinClassRequestMutation, useLazyListUsersQuery, - useLazyRetrieveUserQuery, -} from "../../../api/user" -import { classIdSchema } from "../../../app/schemas" -import { paths } from "../../../routes" - -const AddedStudent: FC<{ - klass: RetrieveClassResult - user: StudentUser -}> = ({ klass, user }) => ( - <> - - - External student added to class {klass.name} ({klass.id}) - - - - - The student has been successfully added to the class {klass.name}. - - - Please provide the student with their new login details: - - - - - Class Access Code: {klass.id} - - - Name: {user.first_name} - - - - - {user.first_name} should now login as a student with these details. - - - {user.first_name}'s password is unchanged. You may manage this - student, including changing their name and password, as with other - students. - - - Class - - - -) +} from "../../../../api/user" +import { type RetrieveClassResult } from "../../../../api/klass" +import { paths } from "../../../../routes" -const HandleRequest: FC<{ +export interface HandleRequestProps { klass: RetrieveClassResult user: IndependentUser onAcceptRequest: () => void -}> = ({ klass, user, onAcceptRequest }) => { +} + +const HandleRequest: FC = ({ + klass, + user, + onAcceptRequest, +}) => { const [handleJoinClassRequest] = useHandleJoinClassRequestMutation() return ( @@ -179,53 +126,4 @@ const HandleRequest: FC<{ ) } -export interface JoinClassRequestProps {} - -const JoinClassRequest: FC = () => { - const navigate = useNavigate() - const [wasAccepted, setWasAccepted] = useState(false) - const params = useParams({ - classId: classIdSchema.required(), - userId: yup.number().required(), - }) - - const [ - retrieveUser, - { data: user, isLoading: userIsLoading, isError: userIsError }, - ] = useLazyRetrieveUserQuery() - const [ - retrieveClass, - { data: klass, isLoading: classIsLoading, isError: classIsError }, - ] = useLazyRetrieveClassQuery() - - useEffect(() => { - if (params) { - void retrieveUser(params.userId) - void retrieveClass(params.classId) - } else navigate(paths.error.type.pageNotFound._) - }, [params, navigate, retrieveUser, retrieveClass]) - - if (!params) return <> - - if (!user || userIsLoading || !klass || classIsLoading) - return - - if (userIsError || classIsError) alert("TODO: handle error") - - return wasAccepted ? ( - } - /> - ) : ( - } - onAcceptRequest={() => { - setWasAccepted(true) - }} - /> - ) -} - -export default JoinClassRequest +export default HandleRequest diff --git a/src/pages/teacherDashboard/classes/joinClassRequest/JoinClassRequest.tsx b/src/pages/teacherDashboard/classes/joinClassRequest/JoinClassRequest.tsx new file mode 100644 index 0000000..3499c5d --- /dev/null +++ b/src/pages/teacherDashboard/classes/joinClassRequest/JoinClassRequest.tsx @@ -0,0 +1,66 @@ +import * as yup from "yup" +import { type FC, useEffect, useState } from "react" +import { type IndependentUser, type StudentUser } from "codeforlife/api" +import { useNavigate, useParams } from "codeforlife/hooks" +import { CircularProgress } from "@mui/material" + +import { + type RetrieveUserResult, + useLazyRetrieveUserQuery, +} from "../../../../api/user" +import AddedStudent from "./AddedStudent" +import HandleRequest from "./HandleRequest" +import { classIdSchema } from "../../../../app/schemas" +import { paths } from "../../../../routes" +import { useLazyRetrieveClassQuery } from "../../../../api/klass" + +export interface JoinClassRequestProps {} + +const JoinClassRequest: FC = () => { + const navigate = useNavigate() + const [wasAccepted, setWasAccepted] = useState(false) + const params = useParams({ + classId: classIdSchema.required(), + userId: yup.number().required(), + }) + + const [ + retrieveUser, + { data: user, isLoading: userIsLoading, isError: userIsError }, + ] = useLazyRetrieveUserQuery() + const [ + retrieveClass, + { data: klass, isLoading: classIsLoading, isError: classIsError }, + ] = useLazyRetrieveClassQuery() + + useEffect(() => { + if (params) { + void retrieveUser(params.userId) + void retrieveClass(params.classId) + } else navigate(paths.error.type.pageNotFound._) + }, [params, navigate, retrieveUser, retrieveClass]) + + if (!params) return <> + + if (!user || userIsLoading || !klass || classIsLoading) + return + + if (userIsError || classIsError) alert("TODO: handle error") + + return wasAccepted ? ( + } + /> + ) : ( + } + onAcceptRequest={() => { + setWasAccepted(true) + }} + /> + ) +} + +export default JoinClassRequest From c71c37b46e11c74d0411bcea0ff16c27723446fd Mon Sep 17 00:00:00 2001 From: SKairinos Date: Tue, 24 Sep 2024 14:13:19 +0000 Subject: [PATCH 18/25] restructure reset students password --- src/pages/teacherDashboard/classes/Classes.tsx | 2 +- .../classes/class/ResetStudentsPasswordDialog.tsx | 2 +- src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx | 2 +- .../{class => resetStudentsPassword}/ResetStudentsPassword.tsx | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename src/pages/teacherDashboard/classes/{class => resetStudentsPassword}/ResetStudentsPassword.tsx (100%) diff --git a/src/pages/teacherDashboard/classes/Classes.tsx b/src/pages/teacherDashboard/classes/Classes.tsx index 67f6165..2a76d2d 100644 --- a/src/pages/teacherDashboard/classes/Classes.tsx +++ b/src/pages/teacherDashboard/classes/Classes.tsx @@ -7,7 +7,7 @@ import ClassTable from "./ClassTable" import CreateClassForm from "./CreateClassForm" import JoinClassRequest from "./joinClassRequest/JoinClassRequest" import JoinClassRequestTable from "./JoinClassRequestTable" -import ResetStudentsPassword from "./class/ResetStudentsPassword" +import ResetStudentsPassword from "./resetStudentsPassword/ResetStudentsPassword" import { type RetrieveUserResult } from "../../../api/user" import TransferStudents from "./transferStudents/TransferStudents" import UpdateStudentUser from "./class/UpdateStudentUser" diff --git a/src/pages/teacherDashboard/classes/class/ResetStudentsPasswordDialog.tsx b/src/pages/teacherDashboard/classes/class/ResetStudentsPasswordDialog.tsx index 37f19ba..3589911 100644 --- a/src/pages/teacherDashboard/classes/class/ResetStudentsPasswordDialog.tsx +++ b/src/pages/teacherDashboard/classes/class/ResetStudentsPasswordDialog.tsx @@ -9,7 +9,7 @@ import { useResetStudentsPasswordMutation, } from "../../../../api/student" import { type ListUsersResult } from "../../../../api/user" -import { type ResetStudentsPasswordState } from "./ResetStudentsPassword" +import { type ResetStudentsPasswordState } from "../resetStudentsPassword/ResetStudentsPassword" import { paths } from "../../../../routes" export interface ResetStudentsPasswordDialogProps diff --git a/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx b/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx index 6863957..56adf41 100644 --- a/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx +++ b/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx @@ -17,7 +17,7 @@ import { } from "../../../../api/user" import { classIdSchema, userIdSchema } from "../../../../app/schemas" import { NewPasswordField } from "../../../../components/form" -import { type ResetStudentsPasswordState } from "./ResetStudentsPassword" +import { type ResetStudentsPasswordState } from "../resetStudentsPassword/ResetStudentsPassword" import { paths } from "../../../../routes" import { useResetStudentsPasswordMutation } from "../../../../api/student" import { useRetrieveClassQuery } from "../../../../api/klass" diff --git a/src/pages/teacherDashboard/classes/class/ResetStudentsPassword.tsx b/src/pages/teacherDashboard/classes/resetStudentsPassword/ResetStudentsPassword.tsx similarity index 100% rename from src/pages/teacherDashboard/classes/class/ResetStudentsPassword.tsx rename to src/pages/teacherDashboard/classes/resetStudentsPassword/ResetStudentsPassword.tsx From 5dfaa3ddb6c1d69baf7513c629e42be5c782fd61 Mon Sep 17 00:00:00 2001 From: SKairinos Date: Tue, 24 Sep 2024 15:21:56 +0000 Subject: [PATCH 19/25] restructure update student user view --- .../classes/class/UpdateStudentUser.tsx | 155 ------------------ .../updateStudentUser/UpdateNameForm.tsx | 60 +++++++ .../updateStudentUser/UpdatePasswordForm.tsx | 74 +++++++++ .../updateStudentUser/UpdateStudentUser.tsx | 79 +++++++++ 4 files changed, 213 insertions(+), 155 deletions(-) delete mode 100644 src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx create mode 100644 src/pages/teacherDashboard/classes/updateStudentUser/UpdateNameForm.tsx create mode 100644 src/pages/teacherDashboard/classes/updateStudentUser/UpdatePasswordForm.tsx create mode 100644 src/pages/teacherDashboard/classes/updateStudentUser/UpdateStudentUser.tsx diff --git a/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx b/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx deleted file mode 100644 index 56adf41..0000000 --- a/src/pages/teacherDashboard/classes/class/UpdateStudentUser.tsx +++ /dev/null @@ -1,155 +0,0 @@ -import * as forms from "codeforlife/components/form" -import * as pages from "codeforlife/components/page" -import { type Class, type User } from "codeforlife/api" -import { Link, Navigate } from "codeforlife/components/router" -import { useNavigate, useParams } from "codeforlife/hooks" -import { type FC } from "react" -import { type StudentUser } from "codeforlife/api" -import { Typography } from "@mui/material" -import { generatePath } from "react-router-dom" -import { handleResultState } from "codeforlife/utils/api" -import { submitForm } from "codeforlife/utils/form" - -import { - type RetrieveUserResult, - useRetrieveUserQuery, - useUpdateUserMutation, -} from "../../../../api/user" -import { classIdSchema, userIdSchema } from "../../../../app/schemas" -import { NewPasswordField } from "../../../../components/form" -import { type ResetStudentsPasswordState } from "../resetStudentsPassword/ResetStudentsPassword" -import { paths } from "../../../../routes" -import { useResetStudentsPasswordMutation } from "../../../../api/student" -import { useRetrieveClassQuery } from "../../../../api/klass" - -const UpdateStudentUserFormsSection: FC<{ - classId: Class["id"] - studentUserId: User["id"] -}> = ({ classId, studentUserId }) => { - const retrieveClassResult = useRetrieveClassQuery(classId) - const retrieveUserResult = useRetrieveUserQuery(studentUserId) - const [resetStudentsPassword] = useResetStudentsPasswordMutation() - const [updateUser] = useUpdateUserMutation() - const navigate = useNavigate() - - const classPath = generatePath(paths.teacher.dashboard.tab.classes.class._, { - classId, - }) - - return handleResultState(retrieveClassResult, klass => - handleResultState(retrieveUserResult, user => ( - <> - - - Edit student details for {user.first_name} from class {klass.name} ( - {klass.id}) - - - Class - - - Edit this student's name and manage their password and direct - access link. - - - - Update name - - Remember this is the name they use to log in with, so you should - tell them what you've changed it to. - - { - navigate(classPath, { - state: { - notifications: [ - { - index: 1, - props: { - children: "Student's details successfully updated.", - }, - }, - ], - }, - }) - }, - })} - > - - Update - - - - Update password - - You can set this student's password. Setting the password will - also regenerate their direct access link. Enter and confirm the - password in the boxes below. Try to prevent others from being able - to guess the new password when making this decision. - - { - navigate( - generatePath( - paths.teacher.dashboard.tab.classes.class.students - .resetPassword._, - { classId }, - ), - { - state: { - studentUsers: [user as StudentUser], - resetStudentsPasswordResult, - }, - }, - ) - }, - })} - > - - Update - - - - )), - ) -} - -export interface UpdateStudentUserProps {} - -const UpdateStudentUser: FC = () => { - const params = useParams({ - classId: classIdSchema.required(), - studentUserId: userIdSchema.required(), - }) - - return params ? ( - - ) : ( - - ) -} - -export default UpdateStudentUser diff --git a/src/pages/teacherDashboard/classes/updateStudentUser/UpdateNameForm.tsx b/src/pages/teacherDashboard/classes/updateStudentUser/UpdateNameForm.tsx new file mode 100644 index 0000000..0192e32 --- /dev/null +++ b/src/pages/teacherDashboard/classes/updateStudentUser/UpdateNameForm.tsx @@ -0,0 +1,60 @@ +import * as forms from "codeforlife/components/form" +import { type FC } from "react" +import { Typography } from "@mui/material" +import { type User } from "codeforlife/api" +import { submitForm } from "codeforlife/utils/form" +import { useNavigate } from "codeforlife/hooks" + +import { useUpdateUserMutation } from "../../../../api/user" + +export interface UpdateNameFormProps { + classPath: string + studentUser: Pick +} + +const UpdateNameForm: FC = ({ + classPath, + studentUser, +}) => { + const [updateUser] = useUpdateUserMutation() + const navigate = useNavigate() + + return ( + <> + Update name + + Remember this is the name they use to log in with, so you should tell + them what you've changed it to. + + { + navigate(classPath, { + state: { + notifications: [ + { + index: 1, + props: { + children: "Student's details successfully updated.", + }, + }, + ], + }, + }) + }, + })} + > + + Update + + + ) +} + +export default UpdateNameForm diff --git a/src/pages/teacherDashboard/classes/updateStudentUser/UpdatePasswordForm.tsx b/src/pages/teacherDashboard/classes/updateStudentUser/UpdatePasswordForm.tsx new file mode 100644 index 0000000..e1d0fa1 --- /dev/null +++ b/src/pages/teacherDashboard/classes/updateStudentUser/UpdatePasswordForm.tsx @@ -0,0 +1,74 @@ +import * as forms from "codeforlife/components/form" +import { type Class, type StudentUser } from "codeforlife/api" +import { type FC } from "react" +import { Typography } from "@mui/material" +import { generatePath } from "react-router-dom" +import { submitForm } from "codeforlife/utils/form" +import { useNavigate } from "codeforlife/hooks" + +import { NewPasswordField } from "../../../../components/form" +import { type ResetStudentsPasswordState } from "../resetStudentsPassword/ResetStudentsPassword" +import { type RetrieveUserResult } from "../../../../api/user" +import { paths } from "../../../../routes" +import { useResetStudentsPasswordMutation } from "../../../../api/student" + +export interface UpdatePasswordFormProps { + classId: Class["id"] + user: StudentUser +} + +const UpdatePasswordForm: FC = ({ classId, user }) => { + const [resetStudentsPassword] = useResetStudentsPasswordMutation() + const navigate = useNavigate() + + return ( + <> + Update password + + You can set this student's password. Setting the password will also + regenerate their direct access link. Enter and confirm the password in + the boxes below. Try to prevent others from being able to guess the new + password when making this decision. + + { + navigate( + generatePath( + paths.teacher.dashboard.tab.classes.class.students.resetPassword + ._, + { classId }, + ), + { + state: { + studentUsers: [user], + resetStudentsPasswordResult, + }, + }, + ) + }, + })} + > + + Update + + + ) +} + +export default UpdatePasswordForm diff --git a/src/pages/teacherDashboard/classes/updateStudentUser/UpdateStudentUser.tsx b/src/pages/teacherDashboard/classes/updateStudentUser/UpdateStudentUser.tsx new file mode 100644 index 0000000..de30824 --- /dev/null +++ b/src/pages/teacherDashboard/classes/updateStudentUser/UpdateStudentUser.tsx @@ -0,0 +1,79 @@ +import * as pages from "codeforlife/components/page" +import { type Class, type StudentUser, type User } from "codeforlife/api" +import { Link, Navigate } from "codeforlife/components/router" +import { type FC } from "react" +import { Typography } from "@mui/material" +import { generatePath } from "react-router-dom" +import { handleResultState } from "codeforlife/utils/api" +import { useParams } from "codeforlife/hooks" + +import { + type RetrieveUserResult, + useRetrieveUserQuery, +} from "../../../../api/user" +import { classIdSchema, userIdSchema } from "../../../../app/schemas" +import UpdateNameForm from "./UpdateNameForm" +import UpdatePasswordForm from "./UpdatePasswordForm" +import { paths } from "../../../../routes" +import { useRetrieveClassQuery } from "../../../../api/klass" + +const _UpdateStudentUser: FC<{ + classId: Class["id"] + studentUserId: User["id"] +}> = ({ classId, studentUserId }) => { + const retrieveClassResult = useRetrieveClassQuery(classId) + const retrieveUserResult = useRetrieveUserQuery(studentUserId) + + const classPath = generatePath(paths.teacher.dashboard.tab.classes.class._, { + classId, + }) + + return handleResultState(retrieveClassResult, klass => + handleResultState(retrieveUserResult, user => ( + <> + + + Edit student details for {user.first_name} from class {klass.name} ( + {klass.id}) + + + Class + + + Edit this student's name and manage their password and direct + access link. + + + + + + + } + /> + + + )), + ) +} + +export interface UpdateStudentUserProps {} + +const UpdateStudentUser: FC = () => { + const params = useParams({ + classId: classIdSchema.required(), + studentUserId: userIdSchema.required(), + }) + + return params ? ( + <_UpdateStudentUser {...params} /> + ) : ( + + ) +} + +export default UpdateStudentUser From f6abc86af4b2d1265a7760c21590fde7e1ff1cfc Mon Sep 17 00:00:00 2001 From: SKairinos Date: Tue, 24 Sep 2024 15:22:40 +0000 Subject: [PATCH 20/25] fix path --- src/pages/teacherDashboard/classes/Classes.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/teacherDashboard/classes/Classes.tsx b/src/pages/teacherDashboard/classes/Classes.tsx index 2a76d2d..605dbf1 100644 --- a/src/pages/teacherDashboard/classes/Classes.tsx +++ b/src/pages/teacherDashboard/classes/Classes.tsx @@ -10,7 +10,7 @@ import JoinClassRequestTable from "./JoinClassRequestTable" import ResetStudentsPassword from "./resetStudentsPassword/ResetStudentsPassword" import { type RetrieveUserResult } from "../../../api/user" import TransferStudents from "./transferStudents/TransferStudents" -import UpdateStudentUser from "./class/UpdateStudentUser" +import UpdateStudentUser from "./updateStudentUser/UpdateStudentUser" export interface ClassesProps { authUser: SchoolTeacherUser From 9ca4673d643391c77295de3924817dc32b520bd1 Mon Sep 17 00:00:00 2001 From: SKairinos Date: Tue, 24 Sep 2024 15:25:43 +0000 Subject: [PATCH 21/25] restructure leave view --- src/pages/teacherDashboard/school/School.tsx | 2 +- .../teacherDashboard/school/{ => leave}/Leave.tsx | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) rename src/pages/teacherDashboard/school/{ => leave}/Leave.tsx (95%) diff --git a/src/pages/teacherDashboard/school/School.tsx b/src/pages/teacherDashboard/school/School.tsx index be4426d..c7b5f36 100644 --- a/src/pages/teacherDashboard/school/School.tsx +++ b/src/pages/teacherDashboard/school/School.tsx @@ -12,7 +12,7 @@ import { generatePath } from "react-router" import { useNavigate } from "codeforlife/hooks" import InviteTeacherForm from "./InviteTeacherForm" -import Leave from "./Leave" +import Leave from "./leave/Leave" import { type RetrieveUserResult } from "../../../api/user" import TeacherInvitationTable from "./TeacherInvitationTable" import TeacherTable from "./TeacherTable" diff --git a/src/pages/teacherDashboard/school/Leave.tsx b/src/pages/teacherDashboard/school/leave/Leave.tsx similarity index 95% rename from src/pages/teacherDashboard/school/Leave.tsx rename to src/pages/teacherDashboard/school/leave/Leave.tsx index 1fa9960..08fb895 100644 --- a/src/pages/teacherDashboard/school/Leave.tsx +++ b/src/pages/teacherDashboard/school/leave/Leave.tsx @@ -13,11 +13,11 @@ import { submitForm } from "codeforlife/utils/form" import { useLazyListClassesQuery, useUpdateClassesMutation, -} from "../../../api/klass" -import { TeacherAutocompleteField } from "../../../components/form" -import { paths } from "../../../routes" -import { useLazyRetrieveUserQuery } from "../../../api/user" -import { useRemoveTeacherFromSchoolMutation } from "../../../api/teacher" +} from "../../../../api/klass" +import { TeacherAutocompleteField } from "../../../../components/form" +import { paths } from "../../../../routes" +import { useLazyRetrieveUserQuery } from "../../../../api/user" +import { useRemoveTeacherFromSchoolMutation } from "../../../../api/teacher" export interface LeaveProps { authUserId: User["id"] From f1f8318f977a9a2e0e3583ffc2e3d95d0cfbba2f Mon Sep 17 00:00:00 2001 From: SKairinos Date: Tue, 24 Sep 2024 15:47:31 +0000 Subject: [PATCH 22/25] no class names --- src/pages/teacherDashboard/classes/class/StudentTable.tsx | 2 +- .../classes/transferStudents/SelectClassForm.tsx | 2 +- .../classes/transferStudents/TransferStudentsForm.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/teacherDashboard/classes/class/StudentTable.tsx b/src/pages/teacherDashboard/classes/class/StudentTable.tsx index 87619d9..57130c8 100644 --- a/src/pages/teacherDashboard/classes/class/StudentTable.tsx +++ b/src/pages/teacherDashboard/classes/class/StudentTable.tsx @@ -40,7 +40,7 @@ const StudentTable: FC = ({ classId }) => { return ( <> - +