From 187dd650f7f6df19d28553cfcc746143e454c144 Mon Sep 17 00:00:00 2001 From: hugosandsjo Date: Mon, 9 Sep 2024 16:41:59 +0200 Subject: [PATCH 1/7] updating the document title works --- backend/.env.development | 4 +- backend/docker/docker-compose-full.yml | 4 +- .../dto/update-document-title.dto.ts | 13 +++++ .../workspace-documents.controller.ts | 38 ++++++++++++ .../workspace-documents.service.ts | 24 ++++++++ frontend/src/components/editor/Editor.tsx | 39 +++++++------ .../src/components/headers/DocumentHeader.tsx | 58 ++++++++++++++++++- frontend/src/hooks/api/types/document.d.ts | 4 ++ frontend/src/hooks/api/workspaceDocument.ts | 24 +++++++- 9 files changed, 184 insertions(+), 24 deletions(-) create mode 100644 backend/src/workspace-documents/dto/update-document-title.dto.ts diff --git a/backend/.env.development b/backend/.env.development index 8c8d82a1..a16585bf 100644 --- a/backend/.env.development +++ b/backend/.env.development @@ -5,10 +5,10 @@ DATABASE_URL=mongodb://localhost:27017/codepair # GITHUB_CLIENT_ID: Client ID for authenticating with GitHub. # To obtain a client ID, create an OAuth app at: https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app -GITHUB_CLIENT_ID=your_github_client_id_here +GITHUB_CLIENT_ID=Iv23li1CysRsALb97SET # GITHUB_CLIENT_SECRET: Client secret for authenticating with GitHub. # To obtain a client ID, create an OAuth app at: https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app -GITHUB_CLIENT_SECRET=your_github_client_secret_here +GITHUB_CLIENT_SECRET=74014d1b2b845c852793128153b50623837b31d3 # GITHUB_CALLBACK_URL: Callback URL for handling GitHub authentication response. # Format: https:///auth/login/github # Example: http://localhost:3000/auth/login/github (For development mode) diff --git a/backend/docker/docker-compose-full.yml b/backend/docker/docker-compose-full.yml index a42dc14e..69f46b31 100644 --- a/backend/docker/docker-compose-full.yml +++ b/backend/docker/docker-compose-full.yml @@ -7,8 +7,8 @@ services: environment: DATABASE_URL: "mongodb://mongo:27017/codepair" # Environment variables need to be passed to the container - GITHUB_CLIENT_ID: "your_github_client_id_here" - GITHUB_CLIENT_SECRET: "your_github_client_secret_here" + GITHUB_CLIENT_ID: "Iv23li1CysRsALb97SET" + GITHUB_CLIENT_SECRET: "74014d1b2b845c852793128153b50623837b31d3" GITHUB_CALLBACK_URL: "http://localhost:3000/auth/login/github" JWT_AUTH_SECRET: "you_should_change_this_secret_key_in_production" FRONTEND_BASE_URL: "http://localhost:5173" diff --git a/backend/src/workspace-documents/dto/update-document-title.dto.ts b/backend/src/workspace-documents/dto/update-document-title.dto.ts new file mode 100644 index 00000000..5f5b6173 --- /dev/null +++ b/backend/src/workspace-documents/dto/update-document-title.dto.ts @@ -0,0 +1,13 @@ +import { ApiProperty } from "@nestjs/swagger"; +import { IsString, IsNotEmpty } from "class-validator"; + +export class UpdateDocumentTitleDto { + @ApiProperty({ + description: "The new title of the document", + example: "Updated Document Title", + type: String, + }) + @IsString() + @IsNotEmpty() + title: string; +} diff --git a/backend/src/workspace-documents/workspace-documents.controller.ts b/backend/src/workspace-documents/workspace-documents.controller.ts index 9ab4fd1f..e0cb189c 100644 --- a/backend/src/workspace-documents/workspace-documents.controller.ts +++ b/backend/src/workspace-documents/workspace-documents.controller.ts @@ -6,6 +6,7 @@ import { Param, ParseIntPipe, Post, + Put, Query, Req, } from "@nestjs/common"; @@ -24,6 +25,7 @@ import { import { AuthroizedRequest } from "src/utils/types/req.type"; import { CreateWorkspaceDocumentDto } from "./dto/create-workspace-document.dto"; import { CreateWorkspaceDocumentResponse } from "./types/create-workspace-document-response.type"; +import { UpdateDocumentTitleDto } from "./dto/update-document-title.dto"; import { HttpExceptionResponse } from "src/utils/types/http-exception-response.type"; import { FindWorkspaceDocumentsResponse } from "./types/find-workspace-documents-response.type"; import { CreateWorkspaceDocumentShareTokenResponse } from "./types/create-workspace-document-share-token-response.type"; @@ -36,6 +38,39 @@ import { FindWorkspaceDocumentResponse } from "./types/find-workspace-document-r export class WorkspaceDocumentsController { constructor(private workspaceDocumentsService: WorkspaceDocumentsService) {} + // PUT endpoint for updating document title + @Put(":document_id/title") + @ApiOperation({ + summary: "Update the title of a document in the workspace", + description: "If the user has the access permissions, update the document's title.", + }) + @ApiOkResponse({ + description: "Document title updated successfully", + }) + @ApiNotFoundResponse({ + type: HttpExceptionResponse, + description: + "The workspace or document does not exist, or the user lacks the appropriate permissions.", + }) + @ApiBody({ + description: "The new title of the document", + type: UpdateDocumentTitleDto, + }) + async updateTitle( + @Param("workspace_id") workspaceId: string, + @Param("document_id") documentId: string, + @Body() updateDocumentTitleDto: UpdateDocumentTitleDto, + @Req() req: AuthroizedRequest + ): Promise { + await this.workspaceDocumentsService.updateTitle( + req.user.id, + workspaceId, + documentId, + updateDocumentTitleDto.title + ); + } + + // Get the list of documents in the workspace @Get("") @ApiOperation({ summary: "Retrieve the Documents in Workspace", @@ -68,6 +103,7 @@ export class WorkspaceDocumentsController { return this.workspaceDocumentsService.findMany(req.user.id, workspaceId, pageSize, cursor); } + // Get a specific document by ID @Get(":document_id") @ApiOperation({ summary: "Retrieve a Document in the Workspace", @@ -87,6 +123,7 @@ export class WorkspaceDocumentsController { return this.workspaceDocumentsService.findOne(req.user.id, workspaceId, documentId); } + // Create a new document in the workspace @Post() @ApiOperation({ summary: "Create a Document in a Workspace", @@ -110,6 +147,7 @@ export class WorkspaceDocumentsController { ); } + // Generate a share token for a document @Post(":document_id/share-token") @ApiOperation({ summary: "Retrieve a Share Token for the Document", diff --git a/backend/src/workspace-documents/workspace-documents.service.ts b/backend/src/workspace-documents/workspace-documents.service.ts index 444b3333..d6152a4a 100644 --- a/backend/src/workspace-documents/workspace-documents.service.ts +++ b/backend/src/workspace-documents/workspace-documents.service.ts @@ -17,6 +17,30 @@ export class WorkspaceDocumentsService { private configService: ConfigService ) {} + async updateTitle( + userId: string, + workspaceId: string, + documentId: string, + title: string + ): Promise { + const document = await this.prismaService.document.findFirst({ + where: { + id: documentId, + workspaceId: workspaceId, + }, + }); + + if (!document) { + throw new NotFoundException("Document not found"); + } + + // Update the document's title + await this.prismaService.document.update({ + where: { id: documentId }, + data: { title: title }, + }); + } + async create(userId: string, workspaceId: string, title: string) { try { await this.prismaService.userWorkspace.findFirstOrThrow({ diff --git a/frontend/src/components/editor/Editor.tsx b/frontend/src/components/editor/Editor.tsx index 2682c81e..1ad0a643 100644 --- a/frontend/src/components/editor/Editor.tsx +++ b/frontend/src/components/editor/Editor.tsx @@ -170,26 +170,31 @@ function Editor() { ]); return ( - -
+ <> +
- {Boolean(toolBarState.show) && ( - - )} -
-
+ > +
+ {Boolean(toolBarState.show) && ( + + )} +
+ + ); } diff --git a/frontend/src/components/headers/DocumentHeader.tsx b/frontend/src/components/headers/DocumentHeader.tsx index 75f014b4..41b4f454 100644 --- a/frontend/src/components/headers/DocumentHeader.tsx +++ b/frontend/src/components/headers/DocumentHeader.tsx @@ -11,10 +11,12 @@ import { ToggleButtonGroup, Toolbar, Tooltip, + Button, + FormControl, } from "@mui/material"; -import { useEffect } from "react"; +import { useEffect, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; -import { useNavigate } from "react-router-dom"; +import { useNavigate, useParams } from "react-router-dom"; import { useUserPresence } from "../../hooks/useUserPresence"; import { EditorModeType, selectEditor, setMode } from "../../store/editorSlice"; import { selectWorkspace } from "../../store/workspaceSlice"; @@ -22,6 +24,11 @@ import DownloadMenu from "../common/DownloadMenu"; import ShareButton from "../common/ShareButton"; import ThemeButton from "../common/ThemeButton"; import UserPresenceList from "./UserPresenceList"; +import { FormContainer, TextFieldElement } from "react-hook-form-mui"; +import { useGetWorkspaceQuery } from "../../hooks/api/workspace"; + +// Added this query to update the documentname +import { useUpdateDocumentTitleMutation } from "../../hooks/api/workspaceDocument"; function DocumentHeader() { const dispatch = useDispatch(); @@ -29,6 +36,17 @@ function DocumentHeader() { const editorState = useSelector(selectEditor); const workspaceState = useSelector(selectWorkspace); const { presenceList } = useUserPresence(editorState.doc); + const [documentTitle, setDocumentTitle] = useState(""); + const params = useParams(); + const { data: workspace } = useGetWorkspaceQuery(params.workspaceSlug); + console.log("Workspace ID:", workspace?.id); + console.log("Document ID:", params.documentId); + console.log("Title:", documentTitle); + + const { mutateAsync: updateDocumentTitle } = useUpdateDocumentTitleMutation( + workspace?.id || "", + params.documentId || "" + ); useEffect(() => { if (editorState.shareRole === "READ") { @@ -45,6 +63,16 @@ function DocumentHeader() { navigate(`/${workspaceState.data?.slug}`); }; + const handleDocumentTitleChange = ( + e: React.ChangeEvent + ) => { + setDocumentTitle(e.target.value); + }; + + const handleUpdateDocumentTitle = async (data: { title: string }) => { + await updateDocumentTitle(data); + }; + return ( @@ -84,6 +112,32 @@ function DocumentHeader() { )} + {/* added field to update document title */} + + + + + + + + + + diff --git a/frontend/src/hooks/api/types/document.d.ts b/frontend/src/hooks/api/types/document.d.ts index 3e35f683..56183903 100644 --- a/frontend/src/hooks/api/types/document.d.ts +++ b/frontend/src/hooks/api/types/document.d.ts @@ -13,3 +13,7 @@ export class Document { export class GetDocumentBySharingTokenResponse extends Document { role: ShareRole; } + +export class UpdateDocumentRequest { + title: string; +} diff --git a/frontend/src/hooks/api/workspaceDocument.ts b/frontend/src/hooks/api/workspaceDocument.ts index cbb85ed9..a1bd130b 100644 --- a/frontend/src/hooks/api/workspaceDocument.ts +++ b/frontend/src/hooks/api/workspaceDocument.ts @@ -8,9 +8,11 @@ import { GetWorkspaceDocumentResponse, GetWorkspaceDocumentListResponse, } from "./types/workspaceDocument"; -import { useDispatch } from "react-redux"; + import { useEffect } from "react"; import { setDocumentData } from "../../store/documentSlice"; +import { UpdateDocumentRequest } from "./types/document"; +import { useDispatch } from "react-redux"; export const generateGetWorkspaceDocumentListQueryKey = (workspaceId: string) => { return ["workspaces", workspaceId, "documents"]; @@ -105,3 +107,23 @@ export const useCreateWorkspaceSharingTokenMutation = (workspaceId: string, docu }, }); }; + +export const useUpdateDocumentTitleMutation = (workspaceId: string, documentId: string) => { + const queryClient = useQueryClient(); + + return useMutation({ + mutationFn: async (data: UpdateDocumentRequest) => { + const res = await axios.put( + `/workspaces/${workspaceId}/documents/${documentId}/title`, + data + ); + + return res.data; + }, + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: generateGetDocumentQueryKey(workspaceId, documentId), + }); + }, + }); +}; From 267926fba0e7e725863343e98dc591cc0d1eeb6f Mon Sep 17 00:00:00 2001 From: hugosandsjo Date: Mon, 9 Sep 2024 17:00:13 +0200 Subject: [PATCH 2/7] now fetches current document and displays its name as well --- .../src/components/headers/DocumentHeader.tsx | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/headers/DocumentHeader.tsx b/frontend/src/components/headers/DocumentHeader.tsx index 41b4f454..117a768f 100644 --- a/frontend/src/components/headers/DocumentHeader.tsx +++ b/frontend/src/components/headers/DocumentHeader.tsx @@ -27,8 +27,10 @@ import UserPresenceList from "./UserPresenceList"; import { FormContainer, TextFieldElement } from "react-hook-form-mui"; import { useGetWorkspaceQuery } from "../../hooks/api/workspace"; -// Added this query to update the documentname -import { useUpdateDocumentTitleMutation } from "../../hooks/api/workspaceDocument"; +import { + useUpdateDocumentTitleMutation, + useGetDocumentQuery, +} from "../../hooks/api/workspaceDocument"; function DocumentHeader() { const dispatch = useDispatch(); @@ -43,6 +45,11 @@ function DocumentHeader() { console.log("Document ID:", params.documentId); console.log("Title:", documentTitle); + const { data: documentData } = useGetDocumentQuery( + workspace?.id || "", + params.documentId || "" + ); + const { mutateAsync: updateDocumentTitle } = useUpdateDocumentTitleMutation( workspace?.id || "", params.documentId || "" @@ -73,6 +80,12 @@ function DocumentHeader() { await updateDocumentTitle(data); }; + useEffect(() => { + if (documentData && documentData.title) { + setDocumentTitle(documentData.title); + } + }, [documentData]); + return ( @@ -116,14 +129,14 @@ function DocumentHeader() { Date: Tue, 10 Sep 2024 17:53:52 +0200 Subject: [PATCH 3/7] feedback on submit updated --- .../src/components/headers/DocumentHeader.tsx | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/headers/DocumentHeader.tsx b/frontend/src/components/headers/DocumentHeader.tsx index 117a768f..6e975bee 100644 --- a/frontend/src/components/headers/DocumentHeader.tsx +++ b/frontend/src/components/headers/DocumentHeader.tsx @@ -38,12 +38,10 @@ function DocumentHeader() { const editorState = useSelector(selectEditor); const workspaceState = useSelector(selectWorkspace); const { presenceList } = useUserPresence(editorState.doc); + const [focused, setFocused] = useState(false); const [documentTitle, setDocumentTitle] = useState(""); const params = useParams(); const { data: workspace } = useGetWorkspaceQuery(params.workspaceSlug); - console.log("Workspace ID:", workspace?.id); - console.log("Document ID:", params.documentId); - console.log("Title:", documentTitle); const { data: documentData } = useGetDocumentQuery( workspace?.id || "", @@ -55,6 +53,10 @@ function DocumentHeader() { params.documentId || "" ); + const handleFocus = () => { + setFocused(true); + }; + useEffect(() => { if (editorState.shareRole === "READ") { dispatch(setMode("read")); @@ -78,6 +80,7 @@ function DocumentHeader() { const handleUpdateDocumentTitle = async (data: { title: string }) => { await updateDocumentTitle(data); + setFocused(false); }; useEffect(() => { @@ -125,14 +128,14 @@ function DocumentHeader() { )} - {/* added field to update document title */} - + + - + - + {focused && ( + + )} + {!editorState.shareRole && } From 12ec8b7af7b511e61121f3cf3ca51ab20ec832bf Mon Sep 17 00:00:00 2001 From: hugosandsjo Date: Tue, 10 Sep 2024 21:25:22 +0200 Subject: [PATCH 4/7] removed codes --- backend/.env.development | 4 ++-- backend/docker/docker-compose-full.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/.env.development b/backend/.env.development index a16585bf..8c8d82a1 100644 --- a/backend/.env.development +++ b/backend/.env.development @@ -5,10 +5,10 @@ DATABASE_URL=mongodb://localhost:27017/codepair # GITHUB_CLIENT_ID: Client ID for authenticating with GitHub. # To obtain a client ID, create an OAuth app at: https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app -GITHUB_CLIENT_ID=Iv23li1CysRsALb97SET +GITHUB_CLIENT_ID=your_github_client_id_here # GITHUB_CLIENT_SECRET: Client secret for authenticating with GitHub. # To obtain a client ID, create an OAuth app at: https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app -GITHUB_CLIENT_SECRET=74014d1b2b845c852793128153b50623837b31d3 +GITHUB_CLIENT_SECRET=your_github_client_secret_here # GITHUB_CALLBACK_URL: Callback URL for handling GitHub authentication response. # Format: https:///auth/login/github # Example: http://localhost:3000/auth/login/github (For development mode) diff --git a/backend/docker/docker-compose-full.yml b/backend/docker/docker-compose-full.yml index 69f46b31..a42dc14e 100644 --- a/backend/docker/docker-compose-full.yml +++ b/backend/docker/docker-compose-full.yml @@ -7,8 +7,8 @@ services: environment: DATABASE_URL: "mongodb://mongo:27017/codepair" # Environment variables need to be passed to the container - GITHUB_CLIENT_ID: "Iv23li1CysRsALb97SET" - GITHUB_CLIENT_SECRET: "74014d1b2b845c852793128153b50623837b31d3" + GITHUB_CLIENT_ID: "your_github_client_id_here" + GITHUB_CLIENT_SECRET: "your_github_client_secret_here" GITHUB_CALLBACK_URL: "http://localhost:3000/auth/login/github" JWT_AUTH_SECRET: "you_should_change_this_secret_key_in_production" FRONTEND_BASE_URL: "http://localhost:5173" From ca8efc22abf2f6732dc58ee89f404e3cf3ff1ee9 Mon Sep 17 00:00:00 2001 From: hugosandsjo Date: Tue, 17 Sep 2024 11:48:03 +0200 Subject: [PATCH 5/7] fixed feedback --- backend/.env.development | 4 +- backend/docker/docker-compose-full.yml | 4 +- .../workspace-documents.controller.ts | 11 +- .../workspace-documents.service.ts | 14 +- .../src/components/headers/DocumentHeader.tsx | 120 ++++++++++-------- frontend/src/hooks/api/workspaceDocument.ts | 2 +- 6 files changed, 87 insertions(+), 68 deletions(-) diff --git a/backend/.env.development b/backend/.env.development index 8c8d82a1..3ad57c10 100644 --- a/backend/.env.development +++ b/backend/.env.development @@ -5,10 +5,10 @@ DATABASE_URL=mongodb://localhost:27017/codepair # GITHUB_CLIENT_ID: Client ID for authenticating with GitHub. # To obtain a client ID, create an OAuth app at: https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app -GITHUB_CLIENT_ID=your_github_client_id_here +GITHUB_CLIENT_ID=Iv23li1CysRsALb97SET # GITHUB_CLIENT_SECRET: Client secret for authenticating with GitHub. # To obtain a client ID, create an OAuth app at: https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app -GITHUB_CLIENT_SECRET=your_github_client_secret_here +GITHUB_CLIENT_SECRET=55d8a3062aebb7fc25af27930d8556506930b67f # GITHUB_CALLBACK_URL: Callback URL for handling GitHub authentication response. # Format: https:///auth/login/github # Example: http://localhost:3000/auth/login/github (For development mode) diff --git a/backend/docker/docker-compose-full.yml b/backend/docker/docker-compose-full.yml index a42dc14e..1af40757 100644 --- a/backend/docker/docker-compose-full.yml +++ b/backend/docker/docker-compose-full.yml @@ -7,8 +7,8 @@ services: environment: DATABASE_URL: "mongodb://mongo:27017/codepair" # Environment variables need to be passed to the container - GITHUB_CLIENT_ID: "your_github_client_id_here" - GITHUB_CLIENT_SECRET: "your_github_client_secret_here" + GITHUB_CLIENT_ID: "Iv23li1CysRsALb97SET" + GITHUB_CLIENT_SECRET: "55d8a3062aebb7fc25af27930d8556506930b67f" GITHUB_CALLBACK_URL: "http://localhost:3000/auth/login/github" JWT_AUTH_SECRET: "you_should_change_this_secret_key_in_production" FRONTEND_BASE_URL: "http://localhost:5173" diff --git a/backend/src/workspace-documents/workspace-documents.controller.ts b/backend/src/workspace-documents/workspace-documents.controller.ts index e0cb189c..694e199b 100644 --- a/backend/src/workspace-documents/workspace-documents.controller.ts +++ b/backend/src/workspace-documents/workspace-documents.controller.ts @@ -38,8 +38,7 @@ import { FindWorkspaceDocumentResponse } from "./types/find-workspace-document-r export class WorkspaceDocumentsController { constructor(private workspaceDocumentsService: WorkspaceDocumentsService) {} - // PUT endpoint for updating document title - @Put(":document_id/title") + @Put(":document_id") @ApiOperation({ summary: "Update the title of a document in the workspace", description: "If the user has the access permissions, update the document's title.", @@ -69,8 +68,6 @@ export class WorkspaceDocumentsController { updateDocumentTitleDto.title ); } - - // Get the list of documents in the workspace @Get("") @ApiOperation({ summary: "Retrieve the Documents in Workspace", @@ -102,8 +99,6 @@ export class WorkspaceDocumentsController { ): Promise { return this.workspaceDocumentsService.findMany(req.user.id, workspaceId, pageSize, cursor); } - - // Get a specific document by ID @Get(":document_id") @ApiOperation({ summary: "Retrieve a Document in the Workspace", @@ -122,8 +117,6 @@ export class WorkspaceDocumentsController { ): Promise { return this.workspaceDocumentsService.findOne(req.user.id, workspaceId, documentId); } - - // Create a new document in the workspace @Post() @ApiOperation({ summary: "Create a Document in a Workspace", @@ -146,8 +139,6 @@ export class WorkspaceDocumentsController { createWorkspaceDocumentDto.title ); } - - // Generate a share token for a document @Post(":document_id/share-token") @ApiOperation({ summary: "Retrieve a Share Token for the Document", diff --git a/backend/src/workspace-documents/workspace-documents.service.ts b/backend/src/workspace-documents/workspace-documents.service.ts index d6152a4a..6a071736 100644 --- a/backend/src/workspace-documents/workspace-documents.service.ts +++ b/backend/src/workspace-documents/workspace-documents.service.ts @@ -23,6 +23,19 @@ export class WorkspaceDocumentsService { documentId: string, title: string ): Promise { + try { + await this.prismaService.userWorkspace.findFirstOrThrow({ + where: { + userId, + workspaceId, + }, + }); + } catch (e) { + throw new NotFoundException( + "The workspace does not exist, or the user lacks the appropriate permissions." + ); + } + const document = await this.prismaService.document.findFirst({ where: { id: documentId, @@ -34,7 +47,6 @@ export class WorkspaceDocumentsService { throw new NotFoundException("Document not found"); } - // Update the document's title await this.prismaService.document.update({ where: { id: documentId }, data: { title: title }, diff --git a/frontend/src/components/headers/DocumentHeader.tsx b/frontend/src/components/headers/DocumentHeader.tsx index 6e975bee..acbc8194 100644 --- a/frontend/src/components/headers/DocumentHeader.tsx +++ b/frontend/src/components/headers/DocumentHeader.tsx @@ -13,10 +13,11 @@ import { Tooltip, Button, FormControl, + Typography, } from "@mui/material"; import { useEffect, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; -import { useNavigate, useParams } from "react-router-dom"; +import { useNavigate } from "react-router-dom"; import { useUserPresence } from "../../hooks/useUserPresence"; import { EditorModeType, selectEditor, setMode } from "../../store/editorSlice"; import { selectWorkspace } from "../../store/workspaceSlice"; @@ -25,34 +26,25 @@ import ShareButton from "../common/ShareButton"; import ThemeButton from "../common/ThemeButton"; import UserPresenceList from "./UserPresenceList"; import { FormContainer, TextFieldElement } from "react-hook-form-mui"; -import { useGetWorkspaceQuery } from "../../hooks/api/workspace"; - -import { - useUpdateDocumentTitleMutation, - useGetDocumentQuery, -} from "../../hooks/api/workspaceDocument"; +import { selectDocument, setDocumentData } from "../../store/documentSlice"; +import { useUpdateDocumentTitleMutation } from "../../hooks/api/workspaceDocument"; +import { UpdateDocumentRequest } from "../../hooks/api/types/document"; function DocumentHeader() { const dispatch = useDispatch(); const navigate = useNavigate(); const editorState = useSelector(selectEditor); const workspaceState = useSelector(selectWorkspace); + const documentStore = useSelector(selectDocument); const { presenceList } = useUserPresence(editorState.doc); const [focused, setFocused] = useState(false); - const [documentTitle, setDocumentTitle] = useState(""); - const params = useParams(); - const { data: workspace } = useGetWorkspaceQuery(params.workspaceSlug); - - const { data: documentData } = useGetDocumentQuery( - workspace?.id || "", - params.documentId || "" - ); - const { mutateAsync: updateDocumentTitle } = useUpdateDocumentTitleMutation( - workspace?.id || "", - params.documentId || "" + workspaceState.data?.id || "", + documentStore.data?.id || "" ); + const isEditingDisabled = editorState.shareRole === "READ"; + const handleFocus = () => { setFocused(true); }; @@ -75,19 +67,32 @@ function DocumentHeader() { const handleDocumentTitleChange = ( e: React.ChangeEvent ) => { - setDocumentTitle(e.target.value); + if (documentStore.data) { + dispatch( + setDocumentData({ + ...documentStore.data, + title: e.target.value, + }) + ); + } }; - const handleUpdateDocumentTitle = async (data: { title: string }) => { + const handleUpdateDocumentTitle = async (data: UpdateDocumentRequest) => { + console.log(data); await updateDocumentTitle(data); setFocused(false); }; - useEffect(() => { - if (documentData && documentData.title) { - setDocumentTitle(documentData.title); - } - }, [documentData]); + const validationRules = { + required: "Title is required", + maxLength: { + value: 255, + message: "Title must be less than 255 characters", + }, + validate: { + notEmpty: (value: string) => value.trim() !== "" || "Title cannot be just whitespace", + }, + }; return ( @@ -128,34 +133,45 @@ function DocumentHeader() { )} - - - - - - {focused && ( - - )} - - - + {isEditingDisabled ? ( + {documentStore.data?.title} + ) : ( + + + + + {focused && ( + + )} + + + + )} diff --git a/frontend/src/hooks/api/workspaceDocument.ts b/frontend/src/hooks/api/workspaceDocument.ts index a1bd130b..e05e332c 100644 --- a/frontend/src/hooks/api/workspaceDocument.ts +++ b/frontend/src/hooks/api/workspaceDocument.ts @@ -114,7 +114,7 @@ export const useUpdateDocumentTitleMutation = (workspaceId: string, documentId: return useMutation({ mutationFn: async (data: UpdateDocumentRequest) => { const res = await axios.put( - `/workspaces/${workspaceId}/documents/${documentId}/title`, + `/workspaces/${workspaceId}/documents/${documentId}/`, data ); From 7121acb68a863ba457a02bcd1fa8ae6de0ccf815 Mon Sep 17 00:00:00 2001 From: hugosandsjo Date: Tue, 17 Sep 2024 12:54:56 +0200 Subject: [PATCH 6/7] fixed credentials --- backend/.env.development | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/.env.development b/backend/.env.development index f4a07b2f..0ecfa7ba 100644 --- a/backend/.env.development +++ b/backend/.env.development @@ -5,10 +5,10 @@ DATABASE_URL=mongodb://localhost:27017/codepair # GITHUB_CLIENT_ID: Client ID for authenticating with GitHub. # To obtain a client ID, create an OAuth app at: https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app -GITHUB_CLIENT_ID=Iv23li1CysRsALb97SET +GITHUB_CLIENT_ID=your_github_client_id_here # GITHUB_CLIENT_SECRET: Client secret for authenticating with GitHub. # To obtain a client ID, create an OAuth app at: https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app -GITHUB_CLIENT_SECRET=55d8a3062aebb7fc25af27930d8556506930b67f +GITHUB_CLIENT_SECRET=your_github_client_secret_here # GITHUB_CALLBACK_URL: Callback URL for handling GitHub authentication response. # Format: https:///auth/login/github # Example: http://localhost:3000/auth/login/github (For development mode) From 9b616814d117faac0b7f837b057b21ff13a13579 Mon Sep 17 00:00:00 2001 From: hugosandsjo Date: Thu, 19 Sep 2024 19:58:35 +0200 Subject: [PATCH 7/7] update on feedback --- backend/docker/docker-compose-full.yml | 1 + .../workspace-documents.controller.ts | 9 + .../workspace-documents.service.ts | 11 - frontend/package-lock.json | 594 +++++++++--------- .../src/components/headers/DocumentHeader.tsx | 19 +- 5 files changed, 325 insertions(+), 309 deletions(-) diff --git a/backend/docker/docker-compose-full.yml b/backend/docker/docker-compose-full.yml index feb4e951..fa0a23df 100644 --- a/backend/docker/docker-compose-full.yml +++ b/backend/docker/docker-compose-full.yml @@ -7,6 +7,7 @@ services: environment: DATABASE_URL: "mongodb://mongo:27017/codepair" # Environment variables need to be passed to the container + # You can find the description of each environment variable in the backend/.env.development file GITHUB_CLIENT_ID: "your_github_client_id_here" GITHUB_CLIENT_SECRET: "your_github_client_secret_here" GITHUB_CALLBACK_URL: "http://localhost:3000/auth/login/github" diff --git a/backend/src/workspace-documents/workspace-documents.controller.ts b/backend/src/workspace-documents/workspace-documents.controller.ts index 694e199b..7e271d1f 100644 --- a/backend/src/workspace-documents/workspace-documents.controller.ts +++ b/backend/src/workspace-documents/workspace-documents.controller.ts @@ -19,6 +19,7 @@ import { ApiNotFoundResponse, ApiOkResponse, ApiOperation, + ApiParam, ApiQuery, ApiTags, } from "@nestjs/swagger"; @@ -43,6 +44,14 @@ export class WorkspaceDocumentsController { summary: "Update the title of a document in the workspace", description: "If the user has the access permissions, update the document's title.", }) + @ApiParam({ + name: "workspace_id", + description: "ID of workspace", + }) + @ApiParam({ + name: "document_id", + description: "ID of document to change title", + }) @ApiOkResponse({ description: "Document title updated successfully", }) diff --git a/backend/src/workspace-documents/workspace-documents.service.ts b/backend/src/workspace-documents/workspace-documents.service.ts index 6a071736..1b100674 100644 --- a/backend/src/workspace-documents/workspace-documents.service.ts +++ b/backend/src/workspace-documents/workspace-documents.service.ts @@ -36,17 +36,6 @@ export class WorkspaceDocumentsService { ); } - const document = await this.prismaService.document.findFirst({ - where: { - id: documentId, - workspaceId: workspaceId, - }, - }); - - if (!document) { - throw new NotFoundException("Document not found"); - } - await this.prismaService.document.update({ where: { id: documentId }, data: { title: title }, diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 031d1053..c4c92d21 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -427,9 +427,9 @@ "license": "(Apache-2.0 AND BSD-3-Clause)" }, "node_modules/@codemirror/autocomplete": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.18.0.tgz", - "integrity": "sha512-5DbOvBbY4qW5l57cjDsmmpDh3/TeK1vXfTHa+BUMrRzdWdcxKZ4U4V7vQaTtOpApNU4kLS4FQ6cINtLg245LXA==", + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.18.1.tgz", + "integrity": "sha512-iWHdj/B1ethnHRTwZj+C1obmmuCzquH29EbcKr0qIjA9NfDeBDJ7vs+WOHsFeLeflE4o+dHfYndJloMKHUkWUA==", "license": "MIT", "dependencies": { "@codemirror/language": "^6.0.0", @@ -457,16 +457,16 @@ } }, "node_modules/@codemirror/lang-css": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@codemirror/lang-css/-/lang-css-6.2.1.tgz", - "integrity": "sha512-/UNWDNV5Viwi/1lpr/dIXJNWiwDxpw13I4pTUAsNxZdg6E0mI2kTQb0P2iHczg1Tu+H4EBgJR+hYhKiHKko7qg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@codemirror/lang-css/-/lang-css-6.3.0.tgz", + "integrity": "sha512-CyR4rUNG9OYcXDZwMPvJdtb6PHbBDKUc/6Na2BIwZ6dKab1JQqKa4di+RNRY9Myn7JB81vayKwJeQ7jEdmNVDA==", "license": "MIT", "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.0.0", "@lezer/common": "^1.0.2", - "@lezer/css": "^1.0.0" + "@lezer/css": "^1.1.7" } }, "node_modules/@codemirror/lang-html": { @@ -570,22 +570,22 @@ } }, "node_modules/@connectrpc/connect": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@connectrpc/connect/-/connect-1.4.0.tgz", - "integrity": "sha512-vZeOkKaAjyV4+RH3+rJZIfDFJAfr+7fyYr6sLDKbYX3uuTVszhFe9/YKf5DNqrDb5cKdKVlYkGn6DTDqMitAnA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@connectrpc/connect/-/connect-1.5.0.tgz", + "integrity": "sha512-1gGg0M6c2Y3lnr5itis9dNj9r8hbOIuBMqoGSbUy7L7Vjw4MAttjJzJfj9HCDgytGCJkGanYEYI6MQVDijdVQw==", "license": "Apache-2.0", "peerDependencies": { - "@bufbuild/protobuf": "^1.4.2" + "@bufbuild/protobuf": "^1.10.0" } }, "node_modules/@connectrpc/connect-web": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@connectrpc/connect-web/-/connect-web-1.4.0.tgz", - "integrity": "sha512-13aO4psFbbm7rdOFGV0De2Za64DY/acMspgloDlcOKzLPPs0yZkhp1OOzAQeiAIr7BM/VOHIA3p8mF0inxCYTA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@connectrpc/connect-web/-/connect-web-1.5.0.tgz", + "integrity": "sha512-xjiiQ932Kibddaka18fGZ6yQL7xjXuLcYFYh/cU+q1WWEIrFPkZfViG/Ee6yrZbrlZkjcBuDibng+q7baTndfg==", "license": "Apache-2.0", "peerDependencies": { - "@bufbuild/protobuf": "^1.4.2", - "@connectrpc/connect": "1.4.0" + "@bufbuild/protobuf": "^1.10.0", + "@connectrpc/connect": "1.5.0" } }, "node_modules/@emotion/babel-plugin": { @@ -1119,9 +1119,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", - "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", "dev": true, "license": "MIT", "engines": { @@ -1193,9 +1193,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "dev": true, "license": "MIT", "engines": { @@ -1203,20 +1203,20 @@ } }, "node_modules/@fontsource/roboto": { - "version": "5.0.14", - "resolved": "https://registry.npmjs.org/@fontsource/roboto/-/roboto-5.0.14.tgz", - "integrity": "sha512-zHAxlTTm9RuRn9/StwclFJChf3z9+fBrOxC3fw71htjHP1BgXNISwRjdJtAKAmMe5S2BzgpnjkQR93P9EZYI/Q==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@fontsource/roboto/-/roboto-5.1.0.tgz", + "integrity": "sha512-cFRRC1s6RqPygeZ8Uw/acwVHqih8Czjt6Q0MwoUoDe9U3m4dH1HmNDRBZyqlMSFwgNAUKgFImncKdmDHyKpwdg==", "license": "Apache-2.0" }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", "deprecated": "Use @eslint/config-array instead", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", + "@humanwhocodes/object-schema": "^2.0.3", "debug": "^4.3.1", "minimatch": "^3.0.5" }, @@ -1325,9 +1325,9 @@ "license": "MIT" }, "node_modules/@lezer/css": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.1.8.tgz", - "integrity": "sha512-7JhxupKuMBaWQKjQoLtzhGj83DdnZY9MckEOG5+/iLKNK2ZJqKc6hf6uc0HjwCX7Qlok44jBNqZhHKDhEhZYLA==", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.1.9.tgz", + "integrity": "sha512-TYwgljcDv+YrV0MZFFvYFQHCfGgbPMR6nuqLabBdmZoFH3EP1gvw8t0vae326Ne3PszQkbXfVBjCnf3ZVCr0bA==", "license": "MIT", "dependencies": { "@lezer/common": "^1.2.0", @@ -1356,9 +1356,9 @@ } }, "node_modules/@lezer/javascript": { - "version": "1.4.17", - "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.4.17.tgz", - "integrity": "sha512-bYW4ctpyGK+JMumDApeUzuIezX01H76R1foD6LcRX224FWfyYit/HYxiPGDjXXe/wQWASjCvVGoukTH68+0HIA==", + "version": "1.4.18", + "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.4.18.tgz", + "integrity": "sha512-Y8BeHOt4LtcxJgXwadtfSeWPrh0XzklcCHnCVT+vOsxqH4gWmunP2ykX+VVOlM/dusyVyiNfG3lv0f10UK+mgA==", "license": "MIT", "dependencies": { "@lezer/common": "^1.2.0", @@ -1376,9 +1376,9 @@ } }, "node_modules/@lezer/markdown": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@lezer/markdown/-/markdown-1.3.0.tgz", - "integrity": "sha512-ErbEQ15eowmJUyT095e9NJc3BI9yZ894fjSDtHftD0InkfUBGgnKSU6dvan9jqsZuNHg2+ag/1oyDRxNsENupQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@lezer/markdown/-/markdown-1.3.1.tgz", + "integrity": "sha512-DGlzU/i8DC8k0uz1F+jeePrkATl0jWakauTzftMQOcbaMkHbNSRki/4E2tOzJWsVpoKYhe7iTJ03aepdwVUXUA==", "license": "MIT", "dependencies": { "@lezer/common": "^1.0.0", @@ -1566,14 +1566,14 @@ } }, "node_modules/@mui/private-theming": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-6.0.1.tgz", - "integrity": "sha512-jQCJml1OwIrhqN5tTk5Lpqx2RZKQnShE8lMlvAkuO7Ft+xaHkP8J3iHpEk3/Pzue34DfBQtK00jcaplgM47mBA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-6.1.0.tgz", + "integrity": "sha512-+L5qccs4gwsR0r1dgjqhN24QEQRkqIbfOdxILyMbMkuI50x6wNyt9XrV+J3WtjtZTMGJCrUa5VmZBE6OEPGPWA==", "license": "MIT", "peer": true, "dependencies": { - "@babel/runtime": "^7.25.0", - "@mui/utils": "^6.0.1", + "@babel/runtime": "^7.25.6", + "@mui/utils": "^6.1.0", "prop-types": "^15.8.1" }, "engines": { @@ -1594,13 +1594,13 @@ } }, "node_modules/@mui/private-theming/node_modules/@mui/utils": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-6.0.1.tgz", - "integrity": "sha512-YmQYb2tY5nJactHltTrKA15TZfbd1R003a2xYHxUuycTv9n83rsIwHkypOxM4x7+c+Pc8xfCuE9EfLT3B3n40Q==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-6.1.0.tgz", + "integrity": "sha512-oT8ZzMISRUhTVpdbYzY0CgrCBb3t/YEdcaM13tUnuTjZ15pdA6g5lx15ZJUdgYXV6PbJdw7tDQgMEr4uXK5TXQ==", "license": "MIT", "peer": true, "dependencies": { - "@babel/runtime": "^7.25.0", + "@babel/runtime": "^7.25.6", "@mui/types": "^7.2.16", "@types/prop-types": "^15.7.12", "clsx": "^2.1.1", @@ -1625,14 +1625,15 @@ } }, "node_modules/@mui/styled-engine": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-6.0.1.tgz", - "integrity": "sha512-7ZOnUhIak2vosDgMlBE/oLrsvvF3O8QKmTFpP6bhZkHjPu4dv0DbF1vC7gzgkOqiMaT0/NgRQCFW9zh38pIvsg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-6.1.0.tgz", + "integrity": "sha512-MZ+vtaCkjamrT41+b0Er9OMenjAtP/32+L6fARL9/+BZKuV2QbR3q3TmavT2x0NhDu35IM03s4yKqj32Ziqnyg==", "license": "MIT", "peer": true, "dependencies": { - "@babel/runtime": "^7.25.0", + "@babel/runtime": "^7.25.6", "@emotion/cache": "^11.13.1", + "@emotion/sheet": "^1.4.0", "csstype": "^3.1.3", "prop-types": "^15.8.1" }, @@ -1658,17 +1659,17 @@ } }, "node_modules/@mui/system": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-6.0.1.tgz", - "integrity": "sha512-RdWyCMi+GkAekOnpMKhy51lyzid4F6Vj96vekp3AExkFY21JWg2+KVBqcAgJOROJ3RiaeDJf98n0yrixlCvuEw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-6.1.0.tgz", + "integrity": "sha512-NumkGDqT6EdXfcoFLYQ+M4XlTW5hH3+aK48xAbRqKPXJfxl36CBt4DLduw/Voa5dcayGus9T6jm1AwU2hoJ5hQ==", "license": "MIT", "peer": true, "dependencies": { - "@babel/runtime": "^7.25.0", - "@mui/private-theming": "^6.0.1", - "@mui/styled-engine": "^6.0.1", + "@babel/runtime": "^7.25.6", + "@mui/private-theming": "^6.1.0", + "@mui/styled-engine": "^6.1.0", "@mui/types": "^7.2.16", - "@mui/utils": "^6.0.1", + "@mui/utils": "^6.1.0", "clsx": "^2.1.1", "csstype": "^3.1.3", "prop-types": "^15.8.1" @@ -1699,13 +1700,13 @@ } }, "node_modules/@mui/system/node_modules/@mui/utils": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-6.0.1.tgz", - "integrity": "sha512-YmQYb2tY5nJactHltTrKA15TZfbd1R003a2xYHxUuycTv9n83rsIwHkypOxM4x7+c+Pc8xfCuE9EfLT3B3n40Q==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-6.1.0.tgz", + "integrity": "sha512-oT8ZzMISRUhTVpdbYzY0CgrCBb3t/YEdcaM13tUnuTjZ15pdA6g5lx15ZJUdgYXV6PbJdw7tDQgMEr4uXK5TXQ==", "license": "MIT", "peer": true, "dependencies": { - "@babel/runtime": "^7.25.0", + "@babel/runtime": "^7.25.6", "@mui/types": "^7.2.16", "@types/prop-types": "^15.7.12", "clsx": "^2.1.1", @@ -1774,13 +1775,14 @@ } }, "node_modules/@mui/x-date-pickers": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@mui/x-date-pickers/-/x-date-pickers-7.15.0.tgz", - "integrity": "sha512-YQEQICNxUEFYp/I/yP58cqihA8yhXaXSNZ1/N0JANu2IlCwoJ4Jzi+S0s4RN7RghpiDyoSMFijROBC5HfpTjiw==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@mui/x-date-pickers/-/x-date-pickers-7.17.0.tgz", + "integrity": "sha512-3mIw1uOZU/yKweZsVAo9QnwVFzLHqXgXG1TbGbDJ4AU6FhN2TCUlR9tzKHSlYdAHZ0bEWDS1/bgeGsQC7skXMA==", "license": "MIT", "dependencies": { - "@babel/runtime": "^7.25.4", + "@babel/runtime": "^7.25.6", "@mui/utils": "^5.16.6", + "@mui/x-internals": "7.17.0", "@types/react-transition-group": "^4.4.11", "clsx": "^2.1.1", "prop-types": "^15.8.1", @@ -1838,6 +1840,26 @@ } } }, + "node_modules/@mui/x-internals": { + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@mui/x-internals/-/x-internals-7.17.0.tgz", + "integrity": "sha512-FLlAGSJl/vsuaA/8hPGazXFppyzIzxApJJDZMoTS0geUmHd0hyooISV2ltllLmrZ/DGtHhI08m8GGnHL6/vVeg==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.25.6", + "@mui/utils": "^5.16.6" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "react": "^17.0.0 || ^18.0.0" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1967,9 +1989,9 @@ } }, "node_modules/@remix-run/router": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.19.1.tgz", - "integrity": "sha512-S45oynt/WH19bHbIXjtli6QmwNYvaz+vtnubvNpNDvUOoA/OWh6j1OikIP3G+v5GHdxyC6EXoChG3HgYGEUfcg==", + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.19.2.tgz", + "integrity": "sha512-baiMx18+IMuD1yyvOGaHM9QrVUPGGG0jC+z+IPHnRJWUAUvaKuWKyE8gjDj2rzv3sz9zOGoRSPgeBVHRhZnBlA==", "license": "MIT", "engines": { "node": ">=14.0.0" @@ -1979,6 +2001,7 @@ "version": "6.2.1", "resolved": "https://registry.npmjs.org/@replit/codemirror-vim/-/codemirror-vim-6.2.1.tgz", "integrity": "sha512-qDAcGSHBYU5RrdO//qCmD8K9t6vbP327iCj/iqrkVnjbrpFhrjOt92weGXGHmTNRh16cUtkUZ7Xq7rZf+8HVow==", + "license": "MIT", "peerDependencies": { "@codemirror/commands": "^6.0.0", "@codemirror/language": "^6.1.0", @@ -1988,9 +2011,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.2.tgz", - "integrity": "sha512-fSuPrt0ZO8uXeS+xP3b+yYTCBUd05MoSp2N/MFOgjhhUhMmchXlpTQrTpI8T+YAwAQuK7MafsCOxW7VrPMrJcg==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.0.tgz", + "integrity": "sha512-/IZQvg6ZR0tAkEi4tdXOraQoWeJy9gbQ/cx4I7k9dJaCk9qrXEcdouxRVz5kZXt5C2bQ9pILoAA+KB4C/d3pfw==", "cpu": [ "arm" ], @@ -2001,9 +2024,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.2.tgz", - "integrity": "sha512-xGU5ZQmPlsjQS6tzTTGwMsnKUtu0WVbl0hYpTPauvbRAnmIvpInhJtgjj3mcuJpEiuUw4v1s4BimkdfDWlh7gA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.0.tgz", + "integrity": "sha512-ETHi4bxrYnvOtXeM7d4V4kZWixib2jddFacJjsOjwbgYSRsyXYtZHC4ht134OsslPIcnkqT+TKV4eU8rNBKyyQ==", "cpu": [ "arm64" ], @@ -2014,9 +2037,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.2.tgz", - "integrity": "sha512-99AhQ3/ZMxU7jw34Sq8brzXqWH/bMnf7ZVhvLk9QU2cOepbQSVTns6qoErJmSiAvU3InRqC2RRZ5ovh1KN0d0Q==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.0.tgz", + "integrity": "sha512-ZWgARzhSKE+gVUX7QWaECoRQsPwaD8ZR0Oxb3aUpzdErTvlEadfQpORPXkKSdKbFci9v8MJfkTtoEHnnW9Ulng==", "cpu": [ "arm64" ], @@ -2027,9 +2050,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.2.tgz", - "integrity": "sha512-ZbRaUvw2iN/y37x6dY50D8m2BnDbBjlnMPotDi/qITMJ4sIxNY33HArjikDyakhSv0+ybdUxhWxE6kTI4oX26w==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.0.tgz", + "integrity": "sha512-h0ZAtOfHyio8Az6cwIGS+nHUfRMWBDO5jXB8PQCARVF6Na/G6XS2SFxDl8Oem+S5ZsHQgtsI7RT4JQnI1qrlaw==", "cpu": [ "x64" ], @@ -2040,9 +2063,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.2.tgz", - "integrity": "sha512-ztRJJMiE8nnU1YFcdbd9BcH6bGWG1z+jP+IPW2oDUAPxPjo9dverIOyXz76m6IPA6udEL12reYeLojzW2cYL7w==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.0.tgz", + "integrity": "sha512-9pxQJSPwFsVi0ttOmqLY4JJ9pg9t1gKhK0JDbV1yUEETSx55fdyCjt39eBQ54OQCzAF0nVGO6LfEH1KnCPvelA==", "cpu": [ "arm" ], @@ -2053,9 +2076,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.2.tgz", - "integrity": "sha512-flOcGHDZajGKYpLV0JNc0VFH361M7rnV1ee+NTeC/BQQ1/0pllYcFmxpagltANYt8FYf9+kL6RSk80Ziwyhr7w==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.0.tgz", + "integrity": "sha512-YJ5Ku5BmNJZb58A4qSEo3JlIG4d3G2lWyBi13ABlXzO41SsdnUKi3HQHe83VpwBVG4jHFTW65jOQb8qyoR+qzg==", "cpu": [ "arm" ], @@ -2066,9 +2089,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.2.tgz", - "integrity": "sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.0.tgz", + "integrity": "sha512-U4G4u7f+QCqHlVg1Nlx+qapZy+QoG+NV6ux+upo/T7arNGwKvKP2kmGM4W5QTbdewWFgudQxi3kDNST9GT1/mg==", "cpu": [ "arm64" ], @@ -2079,9 +2102,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.2.tgz", - "integrity": "sha512-48pD/fJkTiHAZTnZwR0VzHrao70/4MlzJrq0ZsILjLW/Ab/1XlVUStYyGt7tdyIiVSlGZbnliqmult/QGA2O2w==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.0.tgz", + "integrity": "sha512-aQpNlKmx3amwkA3a5J6nlXSahE1ijl0L9KuIjVOUhfOh7uw2S4piR3mtpxpRtbnK809SBtyPsM9q15CPTsY7HQ==", "cpu": [ "arm64" ], @@ -2092,9 +2115,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.2.tgz", - "integrity": "sha512-cZdyuInj0ofc7mAQpKcPR2a2iu4YM4FQfuUzCVA2u4HI95lCwzjoPtdWjdpDKyHxI0UO82bLDoOaLfpZ/wviyQ==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.0.tgz", + "integrity": "sha512-9fx6Zj/7vve/Fp4iexUFRKb5+RjLCff6YTRQl4CoDhdMfDoobWmhAxQWV3NfShMzQk1Q/iCnageFyGfqnsmeqQ==", "cpu": [ "ppc64" ], @@ -2105,9 +2128,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.2.tgz", - "integrity": "sha512-RL56JMT6NwQ0lXIQmMIWr1SW28z4E4pOhRRNqwWZeXpRlykRIlEpSWdsgNWJbYBEWD84eocjSGDu/XxbYeCmwg==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.0.tgz", + "integrity": "sha512-VWQiCcN7zBgZYLjndIEh5tamtnKg5TGxyZPWcN9zBtXBwfcGSZ5cHSdQZfQH/GB4uRxk0D3VYbOEe/chJhPGLQ==", "cpu": [ "riscv64" ], @@ -2118,9 +2141,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.2.tgz", - "integrity": "sha512-PMxkrWS9z38bCr3rWvDFVGD6sFeZJw4iQlhrup7ReGmfn7Oukrr/zweLhYX6v2/8J6Cep9IEA/SmjXjCmSbrMQ==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.0.tgz", + "integrity": "sha512-EHmPnPWvyYqncObwqrosb/CpH3GOjE76vWVs0g4hWsDRUVhg61hBmlVg5TPXqF+g+PvIbqkC7i3h8wbn4Gp2Fg==", "cpu": [ "s390x" ], @@ -2131,9 +2154,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.2.tgz", - "integrity": "sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.0.tgz", + "integrity": "sha512-tsSWy3YQzmpjDKnQ1Vcpy3p9Z+kMFbSIesCdMNgLizDWFhrLZIoN21JSq01g+MZMDFF+Y1+4zxgrlqPjid5ohg==", "cpu": [ "x64" ], @@ -2144,9 +2167,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.2.tgz", - "integrity": "sha512-7twFizNXudESmC9oneLGIUmoHiiLppz/Xs5uJQ4ShvE6234K0VB1/aJYU3f/4g7PhssLGKBVCC37uRkkOi8wjg==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.0.tgz", + "integrity": "sha512-anr1Y11uPOQrpuU8XOikY5lH4Qu94oS6j0xrulHk3NkLDq19MlX8Ng/pVipjxBJ9a2l3+F39REZYyWQFkZ4/fw==", "cpu": [ "x64" ], @@ -2157,9 +2180,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.2.tgz", - "integrity": "sha512-9rRero0E7qTeYf6+rFh3AErTNU1VCQg2mn7CQcI44vNUWM9Ze7MSRS/9RFuSsox+vstRt97+x3sOhEey024FRQ==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.0.tgz", + "integrity": "sha512-7LB+Bh+Ut7cfmO0m244/asvtIGQr5pG5Rvjz/l1Rnz1kDzM02pSX9jPaS0p+90H5I1x4d1FkCew+B7MOnoatNw==", "cpu": [ "arm64" ], @@ -2170,9 +2193,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.2.tgz", - "integrity": "sha512-5rA4vjlqgrpbFVVHX3qkrCo/fZTj1q0Xxpg+Z7yIo3J2AilW7t2+n6Q8Jrx+4MrYpAnjttTYF8rr7bP46BPzRw==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.0.tgz", + "integrity": "sha512-+3qZ4rer7t/QsC5JwMpcvCVPRcJt1cJrYS/TMJZzXIJbxWFQEVhrIc26IhB+5Z9fT9umfVc+Es2mOZgl+7jdJQ==", "cpu": [ "ia32" ], @@ -2183,9 +2206,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.2.tgz", - "integrity": "sha512-6UUxd0+SKomjdzuAcp+HAmxw1FlGBnl1v2yEPSabtx4lBfdXHDVsW7+lQkgz9cNFJGY3AWR7+V8P5BqkD9L9nA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.0.tgz", + "integrity": "sha512-YdicNOSJONVx/vuPkgPTyRoAPx3GbknBZRCOUkK84FJ/YTfs/F0vl/YsMscrB6Y177d+yDRcj+JWMPMCgshwrA==", "cpu": [ "x64" ], @@ -2239,9 +2262,9 @@ } }, "node_modules/@sentry/babel-plugin-component-annotate": { - "version": "2.22.3", - "resolved": "https://registry.npmjs.org/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-2.22.3.tgz", - "integrity": "sha512-OlHA+i+vnQHRIdry4glpiS/xTOtgjmpXOt6IBOUqynx5Jd/iK1+fj+t8CckqOx9wRacO/hru2wfW/jFq0iViLg==", + "version": "2.22.4", + "resolved": "https://registry.npmjs.org/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-2.22.4.tgz", + "integrity": "sha512-hbSq067KwmeKIEkmyzkTNJbmbtx2KRqvpiy9Q/DynI5Z46Nko/ppvgIfyFXK9DelwvEPOqZic4WXTIhO4iv3DA==", "dev": true, "license": "MIT", "engines": { @@ -2268,14 +2291,14 @@ } }, "node_modules/@sentry/bundler-plugin-core": { - "version": "2.22.3", - "resolved": "https://registry.npmjs.org/@sentry/bundler-plugin-core/-/bundler-plugin-core-2.22.3.tgz", - "integrity": "sha512-DeoUl0WffcqZZRl5Wy9aHvX4WfZbbWt0QbJ7NJrcEViq+dRAI2FQTYECFLwdZi5Gtb3oyqZICO+P7k8wDnzsjQ==", + "version": "2.22.4", + "resolved": "https://registry.npmjs.org/@sentry/bundler-plugin-core/-/bundler-plugin-core-2.22.4.tgz", + "integrity": "sha512-25NiyV3v6mdqOXlpzbbJnq0FHdAu1uTEDr+DU8CzNLjIXlq2Sr2CFZ/mhRcR6daM8OAretJdQ34lu0yHUVeE4Q==", "dev": true, "license": "MIT", "dependencies": { "@babel/core": "^7.18.5", - "@sentry/babel-plugin-component-annotate": "2.22.3", + "@sentry/babel-plugin-component-annotate": "2.22.4", "@sentry/cli": "^2.33.1", "dotenv": "^16.3.1", "find-up": "^5.0.0", @@ -2288,9 +2311,9 @@ } }, "node_modules/@sentry/cli": { - "version": "2.34.1", - "resolved": "https://registry.npmjs.org/@sentry/cli/-/cli-2.34.1.tgz", - "integrity": "sha512-hAHvu+XH1kn1ee2NUWvuqAZenK/MrxqQzeIrIYATqF2XGjtSOr7irjAKWjd97/vXdLHA6TBnMW1wHwLcuJK2tg==", + "version": "2.36.1", + "resolved": "https://registry.npmjs.org/@sentry/cli/-/cli-2.36.1.tgz", + "integrity": "sha512-gzK5uQKDWKhyH5udoB5+oaUNrS//urWyaXgKvHKz4gFfl744HuKY9dpLPP2nMnf0zLGmGM6xJnMXLqILq0mtxw==", "dev": true, "hasInstallScript": true, "license": "BSD-3-Clause", @@ -2308,19 +2331,19 @@ "node": ">= 10" }, "optionalDependencies": { - "@sentry/cli-darwin": "2.34.1", - "@sentry/cli-linux-arm": "2.34.1", - "@sentry/cli-linux-arm64": "2.34.1", - "@sentry/cli-linux-i686": "2.34.1", - "@sentry/cli-linux-x64": "2.34.1", - "@sentry/cli-win32-i686": "2.34.1", - "@sentry/cli-win32-x64": "2.34.1" + "@sentry/cli-darwin": "2.36.1", + "@sentry/cli-linux-arm": "2.36.1", + "@sentry/cli-linux-arm64": "2.36.1", + "@sentry/cli-linux-i686": "2.36.1", + "@sentry/cli-linux-x64": "2.36.1", + "@sentry/cli-win32-i686": "2.36.1", + "@sentry/cli-win32-x64": "2.36.1" } }, "node_modules/@sentry/cli-darwin": { - "version": "2.34.1", - "resolved": "https://registry.npmjs.org/@sentry/cli-darwin/-/cli-darwin-2.34.1.tgz", - "integrity": "sha512-SqlCunwhweMDJNKVf3kabiN6FwpvCIffn2cjfaZD0zqZQ3M1tWMJ/kSA0TGfe7lWu9JloNmVm+ArcudGitvX3w==", + "version": "2.36.1", + "resolved": "https://registry.npmjs.org/@sentry/cli-darwin/-/cli-darwin-2.36.1.tgz", + "integrity": "sha512-JOHQjVD8Kqxm1jUKioAP5ohLOITf+Dh6+DBz4gQjCNdotsvNW5m63TKROwq2oB811p+Jzv5304ujmN4cAqW1Ww==", "dev": true, "license": "BSD-3-Clause", "optional": true, @@ -2332,9 +2355,9 @@ } }, "node_modules/@sentry/cli-linux-arm": { - "version": "2.34.1", - "resolved": "https://registry.npmjs.org/@sentry/cli-linux-arm/-/cli-linux-arm-2.34.1.tgz", - "integrity": "sha512-CDhtFbUs16CoU10wEbxnn/pEuenFIMosTcxI7v0gWp3Wo0B2h0bOsLEk9dlT0YsqRTAldKUzef9AVX82m5Svwg==", + "version": "2.36.1", + "resolved": "https://registry.npmjs.org/@sentry/cli-linux-arm/-/cli-linux-arm-2.36.1.tgz", + "integrity": "sha512-gvEOKN0fWL2AVqUBKHNXPRZfJNvKTs8kQhS8cQqahZGgZHiPCI4BqW45cKMq+ZTt1UUbLmt6khx5Dz7wi+0i5A==", "cpu": [ "arm" ], @@ -2350,9 +2373,9 @@ } }, "node_modules/@sentry/cli-linux-arm64": { - "version": "2.34.1", - "resolved": "https://registry.npmjs.org/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.34.1.tgz", - "integrity": "sha512-iSl/uNWjKbVPb6ll12SmHG9iGcC3oN8jjzdycm/mD3H/d8DLMloEiaz8lHQnsYCaPiNKwap1ThKlPvnKOU4SNg==", + "version": "2.36.1", + "resolved": "https://registry.npmjs.org/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.36.1.tgz", + "integrity": "sha512-R//3ZEkbzvoStr3IA7nxBZNiBYyxOljOqAhgiTnejXHmnuwDzM3TBA2n5vKPE/kBFxboEBEw0UTzTIRb1T0bgw==", "cpu": [ "arm64" ], @@ -2368,9 +2391,9 @@ } }, "node_modules/@sentry/cli-linux-i686": { - "version": "2.34.1", - "resolved": "https://registry.npmjs.org/@sentry/cli-linux-i686/-/cli-linux-i686-2.34.1.tgz", - "integrity": "sha512-jq5o49pgzJFv/CQtvx4FLVO1xra22gzP76FtmvPwEhZQhJT6QduW9fpnvVDnOaY8YLzC7GAeszUV6sqZ0MZUqg==", + "version": "2.36.1", + "resolved": "https://registry.npmjs.org/@sentry/cli-linux-i686/-/cli-linux-i686-2.36.1.tgz", + "integrity": "sha512-R7sW5Vk/HacVy2YgQoQB+PwccvFYf2CZVPSFSFm2z7MEfNe77UYHWUq+sjJ4vxWG6HDWGVmaX0fjxyDkE01JRA==", "cpu": [ "x86", "ia32" @@ -2387,9 +2410,9 @@ } }, "node_modules/@sentry/cli-linux-x64": { - "version": "2.34.1", - "resolved": "https://registry.npmjs.org/@sentry/cli-linux-x64/-/cli-linux-x64-2.34.1.tgz", - "integrity": "sha512-O99RAkrcMErWLPRdza6HaG7kmHCx9MYFNDX6FLrAgSP3oz+X3ral1oDTIrMs4hVbPDK287ZGAqCJtk+1iOjEBg==", + "version": "2.36.1", + "resolved": "https://registry.npmjs.org/@sentry/cli-linux-x64/-/cli-linux-x64-2.36.1.tgz", + "integrity": "sha512-UMr3ik8ksA7zQfbzsfwCb+ztenLnaeAbX94Gp+bzANZwPfi/vVHf2bLyqsBs4OyVt9SPlN1bbM/RTGfMjZ3JOw==", "cpu": [ "x64" ], @@ -2405,9 +2428,9 @@ } }, "node_modules/@sentry/cli-win32-i686": { - "version": "2.34.1", - "resolved": "https://registry.npmjs.org/@sentry/cli-win32-i686/-/cli-win32-i686-2.34.1.tgz", - "integrity": "sha512-yEeuneEVmExCbWlnSauhIg8wZDfKxRaou8XRfM6oPlSBu0XO5HUI3uRK5t2xT0zX8Syzh2kCZpdVE1KLavVeKA==", + "version": "2.36.1", + "resolved": "https://registry.npmjs.org/@sentry/cli-win32-i686/-/cli-win32-i686-2.36.1.tgz", + "integrity": "sha512-CflvhnvxPEs5GWQuuDtYSLqPrBaPbcSJFlBuUIb+8WNzRxvVfjgw1qzfZmkQqABqiy/YEsEekllOoMFZAvCcVA==", "cpu": [ "x86", "ia32" @@ -2423,9 +2446,9 @@ } }, "node_modules/@sentry/cli-win32-x64": { - "version": "2.34.1", - "resolved": "https://registry.npmjs.org/@sentry/cli-win32-x64/-/cli-win32-x64-2.34.1.tgz", - "integrity": "sha512-mU48VpDTwRgt7/Pf3vk/P87m4kM3XEXHHHfq9EvHCTspFF6GtMfL9njZ7+5Z+7ko852JS4kpunjZtsxmoP4/zA==", + "version": "2.36.1", + "resolved": "https://registry.npmjs.org/@sentry/cli-win32-x64/-/cli-win32-x64-2.36.1.tgz", + "integrity": "sha512-wWqht2xghcK3TGnooHZSzA3WSjdtno/xFjZLvWmw38rblGwgKMxLZnlxV6uDyS+OJ6CbfDTlCRay/0TIqA0N8g==", "cpu": [ "x64" ], @@ -2523,13 +2546,13 @@ } }, "node_modules/@sentry/vite-plugin": { - "version": "2.22.3", - "resolved": "https://registry.npmjs.org/@sentry/vite-plugin/-/vite-plugin-2.22.3.tgz", - "integrity": "sha512-+5bsLFRKOZzBp68XigoNE1pJ3tJ4gt2jXluApu54ui0N/yjfqGQ7LQTD7nL4tmJvB5Agwi0e7M7+fcxe9gSgBA==", + "version": "2.22.4", + "resolved": "https://registry.npmjs.org/@sentry/vite-plugin/-/vite-plugin-2.22.4.tgz", + "integrity": "sha512-C51PUlTv0BXN3+e9SjPHptNX3b9E0clrsaR5c//l/sFkQjuteDHKChA1gNzZSvfoa3gm9NzZAgpk3hVF2O3nBA==", "dev": true, "license": "MIT", "dependencies": { - "@sentry/bundler-plugin-core": "2.22.3", + "@sentry/bundler-plugin-core": "2.22.4", "unplugin": "1.0.1" }, "engines": { @@ -2537,18 +2560,18 @@ } }, "node_modules/@swc/helpers": { - "version": "0.5.12", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.12.tgz", - "integrity": "sha512-KMZNXiGibsW9kvZAO1Pam2JPTDBm+KSHMMHWdsyI/1DbIZjT2A6Gy3hblVXUMEDvUAKq+e0vL0X0o54owWji7g==", + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.13.tgz", + "integrity": "sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.4.0" } }, "node_modules/@tanstack/query-core": { - "version": "5.53.2", - "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.53.2.tgz", - "integrity": "sha512-gCsABpRrYfLsmwcQ0JCE5I3LOQ9KYrDDSnseUDP3T7ukV8E7+lhlHDJS4Gegt1TSZCsxKhc1J5A7TkF5ePjDUQ==", + "version": "5.56.2", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.56.2.tgz", + "integrity": "sha512-gor0RI3/R5rVV3gXfddh1MM+hgl0Z4G7tj6Xxpq6p2I03NGPaJ8dITY9Gz05zYYb/EJq9vPas/T4wn9EaDPd4Q==", "license": "MIT", "funding": { "type": "github", @@ -2556,12 +2579,12 @@ } }, "node_modules/@tanstack/react-query": { - "version": "5.53.2", - "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.53.2.tgz", - "integrity": "sha512-ZxG/rspElkfqg2LElnNtsNgPtiCZ4Wl2XY43bATQqPvNgyrhzbCFzCjDwSQy9fJhSiDVALSlxYS8YOIiToqQmg==", + "version": "5.56.2", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.56.2.tgz", + "integrity": "sha512-SR0GzHVo6yzhN72pnRhkEFRAHMsUo5ZPzAxfTMvUxFIDVS6W9LYUp6nXW3fcHVdg0ZJl8opSH85jqahvm6DSVg==", "license": "MIT", "dependencies": { - "@tanstack/query-core": "5.53.2" + "@tanstack/query-core": "5.56.2" }, "funding": { "type": "github", @@ -2653,9 +2676,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "license": "MIT" }, "node_modules/@types/estree-jsx": { @@ -2718,9 +2741,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.16.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.3.tgz", - "integrity": "sha512-/wdGiWRkMOm53gAsSyFMXFZHbVg7C6CbkrzHNpaHoYfsUWPg7m6ZRKtvQjgvQ9i8WT540a3ydRlRQbxjY30XxQ==", + "version": "20.16.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.5.tgz", + "integrity": "sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==", "devOptional": true, "license": "MIT", "dependencies": { @@ -2740,9 +2763,9 @@ "license": "MIT" }, "node_modules/@types/prop-types": { - "version": "15.7.12", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz", - "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==", + "version": "15.7.13", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.13.tgz", + "integrity": "sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==", "license": "MIT" }, "node_modules/@types/randomcolor": { @@ -2753,9 +2776,9 @@ "license": "MIT" }, "node_modules/@types/react": { - "version": "18.3.5", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.5.tgz", - "integrity": "sha512-WeqMfGJLGuLCqHGYRGHxnKrXcTitc6L/nBUWfWPcTarG3t9PsquqUMuVeXZeca+mglY4Vo5GZjCi0A3Or2lnxA==", + "version": "18.3.7", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.7.tgz", + "integrity": "sha512-KUnDCJF5+AiZd8owLIeVHqmW9yM4sqmDVf2JRJiBMFkGvkoZ4/WyV2lL4zVsoinmRS/W3FeEdZLEWFRofnT2FQ==", "license": "MIT", "dependencies": { "@types/prop-types": "*", @@ -2821,10 +2844,11 @@ "license": "MIT" }, "node_modules/@types/validator": { - "version": "13.12.1", - "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.12.1.tgz", - "integrity": "sha512-w0URwf7BQb0rD/EuiG12KP0bailHKHP5YVviJG9zw3ykAokL0TuxU2TUqMB7EwZ59bDHYdeTIvjI5m0S7qHfOA==", - "dev": true + "version": "13.12.2", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.12.2.tgz", + "integrity": "sha512-6SlHBzUW8Jhf3liqrGGXyTJSIFe4nqlJ5A5KaMZ2l/vbM3Wh3KSybots/wfWVzNLK4D1NZluDlSQIbIEPx6oyA==", + "dev": true, + "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "6.21.0", @@ -3067,6 +3091,7 @@ "version": "4.23.2", "resolved": "https://registry.npmjs.org/@uiw/codemirror-extensions-basic-setup/-/codemirror-extensions-basic-setup-4.23.2.tgz", "integrity": "sha512-eacivkj7wzskl2HBYs4rfN0CbYlsSQh5ADtOYWTpc8Txm4ONw8RTi4/rxF6Ks2vdaovizewU5QaHximbxoNTrw==", + "license": "MIT", "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/commands": "^6.0.0", @@ -3090,21 +3115,21 @@ } }, "node_modules/@uiw/codemirror-theme-xcode": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-xcode/-/codemirror-theme-xcode-4.23.0.tgz", - "integrity": "sha512-eU9CqC5nduTuzd0e7Jv65DBlcZDEhSP5uqIkJbEz2IQWgdzKLkuhbNYrFUjAQr9oYbSyeqg9hK8+3Qw0SUN3sw==", + "version": "4.23.2", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-xcode/-/codemirror-theme-xcode-4.23.2.tgz", + "integrity": "sha512-97EPFlSCzWR0kH9qMb1VBCJHC4PhzTIjJHHY2ZjZkkn5YXKjns13xGpemH+pK21dFfjgFATw6rvCzHyweOZOww==", "license": "MIT", "dependencies": { - "@uiw/codemirror-themes": "4.23.0" + "@uiw/codemirror-themes": "4.23.2" }, "funding": { "url": "https://jaywcjlove.github.io/#/sponsor" } }, "node_modules/@uiw/codemirror-themes": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/@uiw/codemirror-themes/-/codemirror-themes-4.23.0.tgz", - "integrity": "sha512-9fiji9xooZyBQozR1i6iTr56YP7j/Dr/VgsNWbqf5Szv+g+4WM1iZuiDGwNXmFMWX8gbkDzp6ASE21VCPSofWw==", + "version": "4.23.2", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-themes/-/codemirror-themes-4.23.2.tgz", + "integrity": "sha512-g8x+oPqgbzxXSkHhRf7e1AM1mI9/Nl3URReS89pHitRKv8MZNrE+ey+HE8ycfNXRUatrb6zTSRV3M75uoZwNYw==", "license": "MIT", "dependencies": { "@codemirror/language": "^6.0.0", @@ -3130,9 +3155,9 @@ } }, "node_modules/@uiw/react-markdown-preview": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@uiw/react-markdown-preview/-/react-markdown-preview-5.1.2.tgz", - "integrity": "sha512-IheBzajVKZ3NUhYAfrnnereJmKVNQ6vRZDjQhKEQy7IMarJXrUKC1eG8OzTgy1J/3m67MBTs6d52kkSB699efA==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@uiw/react-markdown-preview/-/react-markdown-preview-5.1.3.tgz", + "integrity": "sha512-jV02wO4XHWFk54kz7sLqOkdPgJLttSfKLyen47XgjcyGgQXU2I4WJBygmdpV2AT9m/MiQ8qrN1Y+E5Syv9ZDpw==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.17.2", @@ -3445,9 +3470,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001655", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001655.tgz", - "integrity": "sha512-jRGVy3iSGO5Uutn2owlb5gR6qsGngTw9ZTb4ali9f3glshcNmJ2noam4Mo9zia5P9Dk3jNNydy7vQjuE5dQmfg==", + "version": "1.0.30001662", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001662.tgz", + "integrity": "sha512-sgMUVwLmGseH8ZIrm1d51UbrhqMCH3jvS7gF/M6byuHOnKyLOBL7W8yz5V02OHwgLGA36o/AFhWzzh4uc5aqTA==", "dev": true, "funding": [ { @@ -3847,12 +3872,12 @@ "license": "MIT" }, "node_modules/debug": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", - "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -3977,9 +4002,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz", - "integrity": "sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q==", + "version": "1.5.25", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.25.tgz", + "integrity": "sha512-kMb204zvK3PsSlgvvwzI3wBIcAw15tRkYk+NQdsjdDtcQWTp2RABbMQ9rUBy8KNEOM+/E6ep+XC3AykiWZld4g==", "dev": true, "license": "ISC" }, @@ -4074,17 +4099,17 @@ } }, "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", "dev": true, "license": "MIT", "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", @@ -4156,9 +4181,9 @@ } }, "node_modules/eslint-plugin-react-refresh": { - "version": "0.4.11", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.11.tgz", - "integrity": "sha512-wrAKxMbVr8qhXTtIKfXqAn5SAtRZt0aXxe5P23Fh4pUAdC6XEsybGLB8P0PI4j1yYqOgUEUlzKAGDfo7rJOjcw==", + "version": "0.4.12", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.12.tgz", + "integrity": "sha512-9neVjoGv20FwYtCP6CB1dzR1vr57ZDNOXst21wd2xJ/cTlM2xLq0GWVlSNTdMn/4BtP6cHYBMCSp1wFBJ9jBsg==", "dev": true, "license": "MIT", "peerDependencies": { @@ -4557,9 +4582,9 @@ "license": "ISC" }, "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "funding": [ { "type": "individual", @@ -4770,9 +4795,9 @@ } }, "node_modules/hast-util-from-html": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hast-util-from-html/-/hast-util-from-html-2.0.2.tgz", - "integrity": "sha512-HwOHwxdt2zC5KQ/CNoybBntRook2zJvfZE/u5/Ap7aLPe22bDqen7KwGkOqOyzL5zIqKwiYX/OTtE0FWgr6XXA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hast-util-from-html/-/hast-util-from-html-2.0.3.tgz", + "integrity": "sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw==", "license": "MIT", "dependencies": { "@types/hast": "^3.0.0", @@ -5107,9 +5132,9 @@ } }, "node_modules/husky": { - "version": "9.1.5", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.5.tgz", - "integrity": "sha512-rowAVRUBfI0b4+niA4SJMhfQwc107VLkBUgEYYAOQAbqDCnra1nYh83hF/MDmhYs9t9n1E3DuKOrs2LYNC+0Ag==", + "version": "9.1.6", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.6.tgz", + "integrity": "sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A==", "dev": true, "license": "MIT", "bin": { @@ -5200,9 +5225,9 @@ "license": "ISC" }, "node_modules/inline-style-parser": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.3.tgz", - "integrity": "sha512-qlD8YNDqyTKTyuITrDOffsl6Tdhv+UC4hcdAVuQsK4IMQ99nSgd1MIA/Q+jQYoh9r3hVUXhYh7urSRmXPkW04g==", + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.4.tgz", + "integrity": "sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q==", "license": "MIT" }, "node_modules/inline-style-prefixer": { @@ -5885,9 +5910,9 @@ } }, "node_modules/mdast-util-mdx-expression": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.0.tgz", - "integrity": "sha512-fGCu8eWdKUKNu5mohVGkhBXCXGnOTLuFqOvGMvdikr+J1w7lDJgxThOKpwRWzzbyXAU2hhSwsmssOY4yTokluw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.1.tgz", + "integrity": "sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==", "license": "MIT", "dependencies": { "@types/estree-jsx": "^1.0.0", @@ -6699,9 +6724,9 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "license": "MIT" }, "node_modules/nano-css": { @@ -7112,9 +7137,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", "license": "ISC" }, "node_modules/picomatch": { @@ -7131,9 +7156,9 @@ } }, "node_modules/postcss": { - "version": "8.4.43", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.43.tgz", - "integrity": "sha512-gJAQVYbh5R3gYm33FijzCZj7CHyQ3hWMgJMprLUlIYqCwTeZhBQ19wp0e9mA25BUbEvY5+EXuuaAjqQsrBxQBQ==", + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "funding": [ { "type": "opencollective", @@ -7151,8 +7176,8 @@ "license": "MIT", "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" }, "engines": { "node": "^10 || ^12 || >=14" @@ -7427,12 +7452,12 @@ } }, "node_modules/react-router": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.26.1.tgz", - "integrity": "sha512-kIwJveZNwp7teQRI5QmwWo39A5bXRyqpH0COKKmPnyD2vBvDwgFXSqDUYtt1h+FEyfnE8eXr7oe0MxRzVwCcvQ==", + "version": "6.26.2", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.26.2.tgz", + "integrity": "sha512-tvN1iuT03kHgOFnLPfLJ8V95eijteveqdOSk+srqfePtQvqCExB8eHOYnlilbOcyJyKnYkr1vJvf7YqotAJu1A==", "license": "MIT", "dependencies": { - "@remix-run/router": "1.19.1" + "@remix-run/router": "1.19.2" }, "engines": { "node": ">=14.0.0" @@ -7442,13 +7467,13 @@ } }, "node_modules/react-router-dom": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.26.1.tgz", - "integrity": "sha512-veut7m41S1fLql4pLhxeSW3jlqs+4MtjRLj0xvuCEXsxusJCbs6I8yn9BxzzDX2XDgafrccY6hwjmd/bL54tFw==", + "version": "6.26.2", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.26.2.tgz", + "integrity": "sha512-z7YkaEW0Dy35T3/QKPYB1LjMK2R1fxnHO8kWpUMTBdfVzZrWOiY9a7CtN8HqdWtDUWd5FY6Dl8HFsqVwH4uOtQ==", "license": "MIT", "dependencies": { - "@remix-run/router": "1.19.1", - "react-router": "6.26.1" + "@remix-run/router": "1.19.2", + "react-router": "6.26.2" }, "engines": { "node": ">=14.0.0" @@ -8031,9 +8056,9 @@ } }, "node_modules/rollup": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.21.2.tgz", - "integrity": "sha512-e3TapAgYf9xjdLvKQCkQTnbTKd4a6jwlpQSJJFokHGaX2IVjoEqkIIhiQfqsi0cdwlOD+tQGuOd5AJkc5RngBw==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.22.0.tgz", + "integrity": "sha512-W21MUIFPZ4+O2Je/EU+GP3iz7PH4pVPUXSbEZdatQnxo29+3rsUjgrJmzuAZU24z7yRAnFN6ukxeAhZh/c7hzg==", "license": "MIT", "dependencies": { "@types/estree": "1.0.5" @@ -8046,25 +8071,31 @@ "npm": ">=8.0.0" }, "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.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" } }, + "node_modules/rollup/node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "license": "MIT" + }, "node_modules/rtl-css-js": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/rtl-css-js/-/rtl-css-js-1.16.1.tgz", @@ -8206,9 +8237,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -8328,12 +8359,12 @@ "license": "MIT" }, "node_modules/style-to-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.7.tgz", - "integrity": "sha512-uSjr59G5u6fbxUfKbb8GcqMGT3Xs9v5IbPkjb0S16GyOeBLAzSRK0CixBv5YrYvzO6TDLzIS6QCn78tkqWngPw==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.8.tgz", + "integrity": "sha512-xT47I/Eo0rwJmaXC4oilDGDWLohVhR6o/xAQcPQN8q6QBuZVL8qMYL85kLmST5cPjAorwvqIA4qXTRQoYHaL6g==", "license": "MIT", "dependencies": { - "inline-style-parser": "0.2.3" + "inline-style-parser": "0.2.4" } }, "node_modules/stylis": { @@ -8501,9 +8532,9 @@ } }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -8714,6 +8745,7 @@ "version": "13.12.0", "resolved": "https://registry.npmjs.org/validator/-/validator-13.12.0.tgz", "integrity": "sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==", + "license": "MIT", "engines": { "node": ">= 0.10" } @@ -8761,13 +8793,13 @@ } }, "node_modules/vite": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.2.tgz", - "integrity": "sha512-dDrQTRHp5C1fTFzcSaMxjk6vdpKvT+2/mIdE07Gw2ykehT49O0z/VHS3zZ8iV/Gh8BJJKHWOe5RjaNrW5xf/GA==", + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.6.tgz", + "integrity": "sha512-IeL5f8OO5nylsgzd9tq4qD2QqI0k2CQLGrWD0rCN0EQJZpBK5vJAx0I+GDkMOXxQX/OfFHMuLIx6ddAxGX/k+Q==", "license": "MIT", "dependencies": { "esbuild": "^0.21.3", - "postcss": "^8.4.41", + "postcss": "^8.4.43", "rollup": "^4.20.0" }, "bin": { diff --git a/frontend/src/components/headers/DocumentHeader.tsx b/frontend/src/components/headers/DocumentHeader.tsx index e37fea80..16797836 100644 --- a/frontend/src/components/headers/DocumentHeader.tsx +++ b/frontend/src/components/headers/DocumentHeader.tsx @@ -27,7 +27,7 @@ import ShareButton from "../common/ShareButton"; import ThemeButton from "../common/ThemeButton"; import UserPresenceList from "./UserPresenceList"; import { FormContainer, TextFieldElement } from "react-hook-form-mui"; -import { selectDocument, setDocumentData } from "../../store/documentSlice"; +import { selectDocument } from "../../store/documentSlice"; import { useUpdateDocumentTitleMutation } from "../../hooks/api/workspaceDocument"; import { UpdateDocumentRequest } from "../../hooks/api/types/document"; @@ -44,7 +44,7 @@ function DocumentHeader() { documentStore.data?.id || "" ); - const isEditingDisabled = editorState.shareRole === "READ"; + const isEditingDisabled = Boolean(editorState.shareRole); const handleFocus = () => { setFocused(true); @@ -65,21 +65,7 @@ function DocumentHeader() { navigate(`/${workspaceState.data?.slug}`); }; - const handleDocumentTitleChange = ( - e: React.ChangeEvent - ) => { - if (documentStore.data) { - dispatch( - setDocumentData({ - ...documentStore.data, - title: e.target.value, - }) - ); - } - }; - const handleUpdateDocumentTitle = async (data: UpdateDocumentRequest) => { - console.log(data); await updateDocumentTitle(data); setFocused(false); }; @@ -153,7 +139,6 @@ function DocumentHeader() { inputProps={{ maxLength: 255, }} - onChange={handleDocumentTitleChange} onFocus={handleFocus} rules={validationRules} helperText={