diff --git a/components/Event/Event.tsx b/components/Event/Event.tsx index 29ef0ed..e06238a 100644 --- a/components/Event/Event.tsx +++ b/components/Event/Event.tsx @@ -1,5 +1,5 @@ import { QueriedVolunteerEventDTO } from 'bookem-shared/src/types/database'; -import React, { useEffect, useState } from 'react'; +import React, { useCallback, useEffect, useState } from 'react'; import Image from 'next/image'; import Header from './Header'; import BookIcon from './BookIcon'; @@ -21,6 +21,14 @@ import { } from '@/styles/components/Event/event.styles'; import EventPopupWindowForm from '../Forms/EventPopupWindowForm'; import { useRouter } from 'next/router'; +import { Button, ConfigProvider, Flex, Modal, Tag, message } from 'antd'; +import { BOOKEM_THEME } from '@/utils/constants'; +import { + CheckCircleOutlined, + ExclamationCircleFilled, +} from '@ant-design/icons'; + +const { confirm } = Modal; /** * Event Detail @@ -33,31 +41,70 @@ const Event = ({ pid }: { pid: string }) => { const [event, setEvent] = useState(); const [error, setError] = useState(); const router = useRouter(); + const [messageApi, contextHolder] = message.useMessage(); + + const fetchEvent = useCallback(() => { + fetch('/api/event/' + pid) + .then(res => { + if (!res.ok) { + throw new Error( + 'An error has occurred while fetching: ' + res.statusText + ); + } + return res.json(); + }) + .then(data => setEvent(data)) + .catch(err => setError(err)); + }, [pid]); useEffect(() => { - const fetchEvent = () => { - fetch('/api/event/' + pid) - .then(res => { - if (!res.ok) { - throw new Error( - 'An error has occurred while fetching: ' + res.statusText - ); - } - return res.json(); - }) - .then(data => setEvent(data)) - .catch(err => setError(err)); - }; if (!showPopup) { fetchEvent(); } - }, [pid, showPopup]); + }, [showPopup, fetchEvent]); + + const showDeleteConfirm = () => { + confirm({ + title: 'Are you sure about publishing this event?', + icon: , + content: + "After the event is published, you will no longer be able to modify the application questions, but you can still edit the event details using 'Edit Event' button", + okText: 'Yes', + cancelText: 'No', + onOk() { + publishEvent(); + }, + }); + }; + + const publishEvent = () => { + fetch('/api/event/' + pid + '/publish', { + method: 'PUT', + }) + .then(res => res.json()) + .then(data => { + if (data.status === 'success') { + messageApi.open({ + content: data.message, + type: 'success', + }); + fetchEvent(); + } else { + messageApi.open({ + content: data.message, + type: 'error', + }); + } + }) + .catch(err => console.error(err)); + }; if (error) return
Event not found!
; if (!event) return
Loading...
; return ( + {contextHolder} { navigator.clipboard.writeText( @@ -95,25 +142,72 @@ const Event = ({ pid }: { pid: string }) => { {event.name} - {' '} {event.volunteers.length} / {event.maxSpot} spots filled + + {event.published && ( + } color="success"> + published + + )} + - setShowPopup(prev => !prev)}> - Edit - - router.push('/volunteers/event/' + pid)}> - See sign-Ups - - + + + + {event.published ? ( + + ) : ( + + )} + + + + {/* */} {/* edit button */} {showPopup && ( - + )} {/* Time and Place of the event */} diff --git a/components/Event/Header.tsx b/components/Event/Header.tsx index c32bfdd..8fc32c9 100644 --- a/components/Event/Header.tsx +++ b/components/Event/Header.tsx @@ -13,7 +13,7 @@ const Header = () => { return ( window.history.back()}> - + Event Details diff --git a/components/Forms/EventPopupWindowForm.tsx b/components/Forms/EventPopupWindowForm.tsx index 990d2c9..9687d63 100644 --- a/components/Forms/EventPopupWindowForm.tsx +++ b/components/Forms/EventPopupWindowForm.tsx @@ -30,10 +30,14 @@ interface ModifiedVolunteerEventData const EventPopupWindowForm = ({ setShowPopup, + mutate, event, + messageApi, }: { setShowPopup: React.Dispatch>; + mutate: () => void; event?: QueriedVolunteerEventDTO; + messageApi: any; }) => { const router = useRouter(); const { pid } = router.query; @@ -95,10 +99,23 @@ const EventPopupWindowForm = ({ 'Content-Type': 'application/json', }, body: JSON.stringify(data), - }).then(() => { - setLoading(false); - setShowPopup(false); - }); + }) + .then(() => { + setLoading(false); + setShowPopup(false); + mutate(); + messageApi.open({ + type: 'success', + content: 'Event has been updated', + }); + }) + .catch(err => { + console.error(err); + messageApi.open({ + type: 'error', + content: 'Failed to update event', + }); + }); }; const handleCreateEvent = (data: ModifiedVolunteerEventData) => { @@ -108,10 +125,23 @@ const EventPopupWindowForm = ({ 'Content-Type': 'application/json', }, body: JSON.stringify(data), - }).then(() => { - setLoading(false); - setShowPopup(false); - }); + }) + .then(() => { + setLoading(false); + setShowPopup(false); + mutate(); + messageApi.open({ + type: 'success', + content: 'Event has been created', + }); + }) + .catch(err => { + console.error(err); + messageApi.open({ + type: 'error', + content: 'Failed to create event', + }); + }); }; const onSubmit = (data: any) => { @@ -143,6 +173,7 @@ const EventPopupWindowForm = ({ email: data.email, startDate: data.dateRange[0].format(), endDate: data.dateRange[1].format(), + published: false, }; console.log(modifiedData); diff --git a/components/Table/EventTable/EventTableImpl.tsx b/components/Table/EventTable/EventTableImpl.tsx index 051d899..802d6e8 100644 --- a/components/Table/EventTable/EventTableImpl.tsx +++ b/components/Table/EventTable/EventTableImpl.tsx @@ -238,7 +238,13 @@ const EventTableImpl = () => { return ( <> - {showPopup && } + {showPopup && ( + + )} {showPopupTag && } {showPopupAdd && } @@ -247,8 +253,6 @@ const EventTableImpl = () => { showPopup={showPopup} setShowPopupTag={setShowPopupTag} showPopupTag={showPopup} - setShowAddPopup={setShowPopupAdd} - showAddPopup={showPopupAdd} mutate={mutate} /> diff --git a/components/Table/EventTable/TableHeader.tsx b/components/Table/EventTable/TableHeader.tsx index f449f6a..4f8a06d 100644 --- a/components/Table/EventTable/TableHeader.tsx +++ b/components/Table/EventTable/TableHeader.tsx @@ -22,8 +22,6 @@ const TableHeader = ({ showPopup, setShowPopupTag, showPopupTag, - setShowAddPopup, - showAddPopup, mutate, }: { setShowPopup: (a: boolean) => void; diff --git a/components/Table/VolunteerTable/VolunteerTableImpl.tsx b/components/Table/VolunteerTable/VolunteerTableImpl.tsx index a2b2fdb..7d068a2 100644 --- a/components/Table/VolunteerTable/VolunteerTableImpl.tsx +++ b/components/Table/VolunteerTable/VolunteerTableImpl.tsx @@ -77,7 +77,10 @@ const VolunteerTableImpl = () => { }, [mutate, data]); // check for errors and loading - if (error) return
Failed to load event table
; + if (error) { + console.error(error); + return
Failed to load volunteer table
; + } if (isLoading) return
Loading...
; return ( diff --git a/package-lock.json b/package-lock.json index 3a6355d..5114a2d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,6 +27,7 @@ "react-highlight-words": "^0.20.0", "react-hook-form": "^7.39.3", "styled-components": "^6.1.8", + "survey-creator-react": "^1.9.139", "swr": "^2.0.4", "xlsx": "^0.18.5" }, @@ -52,15 +53,6 @@ "typescript": "4.8.4" } }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@adobe/css-tools": { "version": "4.3.3", "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.3.tgz", @@ -89,9 +81,9 @@ } }, "node_modules/@ant-design/cssinjs": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/@ant-design/cssinjs/-/cssinjs-1.19.1.tgz", - "integrity": "sha512-hgQ3wiys3X0sqDKWkqCJ6EYdF79i9JCvtavmIGwuuPUKmoJXV8Ff0sY+yQQSxk2dRmMyam/bYKo/Bwor45hnZw==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/@ant-design/cssinjs/-/cssinjs-1.20.0.tgz", + "integrity": "sha512-uG3iWzJxgNkADdZmc6W0Ci3iQAUOvLMcM8SnnmWq3r6JeocACft4ChnY/YWvI2Y+rG/68QBla/O+udke1yH3vg==", "dependencies": { "@babel/runtime": "^7.11.1", "@emotion/hash": "^0.8.0", @@ -232,16 +224,15 @@ "optional": true }, "node_modules/@aws-sdk/client-cognito-identity": { - "version": "3.554.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.554.0.tgz", - "integrity": "sha512-/rFufn75nrCj5gTpTLIlDxjGoPeAj+gC3JLVqS2Tlpqx3YhqHiz+jYaHYJbkvrcLMEdDFqaoO3DI7y/GcD59Mg==", + "version": "3.565.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.565.0.tgz", + "integrity": "sha512-g3CycpQTqw4YW9BbX/0Z7cXO3v5x4s0SUDmYu5qEE3ziUmeTxqQc0aJN5wPjuKbF0UuQ4oEnTiMV/yZQrcMEIQ==", "optional": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.554.0", - "@aws-sdk/core": "3.554.0", - "@aws-sdk/credential-provider-node": "3.554.0", + "@aws-sdk/core": "3.556.0", + "@aws-sdk/credential-provider-node": "3.565.0", "@aws-sdk/middleware-host-header": "3.535.0", "@aws-sdk/middleware-logger": "3.535.0", "@aws-sdk/middleware-recursion-detection": "3.535.0", @@ -283,14 +274,14 @@ } }, "node_modules/@aws-sdk/client-sso": { - "version": "3.554.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.554.0.tgz", - "integrity": "sha512-yj6CgIxCT3UwMumEO481KH4QvwArkAPzD7Xvwe1QKgJATc9bKNEo/FxV8LfnWIJ7nOtMDxbNxYLMXH/Fs1qGaQ==", + "version": "3.556.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.556.0.tgz", + "integrity": "sha512-unXdWS7uvHqCcOyC1de+Fr8m3F2vMg2m24GPea0bg7rVGTYmiyn9mhUX11VCt+ozydrw+F50FQwL6OqoqPocmw==", "optional": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/core": "3.554.0", + "@aws-sdk/core": "3.556.0", "@aws-sdk/middleware-host-header": "3.535.0", "@aws-sdk/middleware-logger": "3.535.0", "@aws-sdk/middleware-recursion-detection": "3.535.0", @@ -332,15 +323,16 @@ } }, "node_modules/@aws-sdk/client-sso-oidc": { - "version": "3.554.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.554.0.tgz", - "integrity": "sha512-M86rkiRqbZBF5VyfTQ/vttry9VSoQkZ1oCqYF+SAGlXmD0Of8587yRSj2M4rYe0Uj7nRQIfSnhDYp1UzsZeRfQ==", + "version": "3.565.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.565.0.tgz", + "integrity": "sha512-uMdjTRa8cPGo+7JPjEkesh6jNEZG8uJS44cWeskTHTVhHWcdwXvjSwQWmeXlkYVhHQSwG9Ps3pq12Vpw9oFrxg==", "optional": true, + "peer": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.554.0", - "@aws-sdk/core": "3.554.0", + "@aws-sdk/core": "3.556.0", + "@aws-sdk/credential-provider-node": "3.565.0", "@aws-sdk/middleware-host-header": "3.535.0", "@aws-sdk/middleware-logger": "3.535.0", "@aws-sdk/middleware-recursion-detection": "3.535.0", @@ -379,20 +371,18 @@ }, "engines": { "node": ">=14.0.0" - }, - "peerDependencies": { - "@aws-sdk/credential-provider-node": "^3.554.0" } }, "node_modules/@aws-sdk/client-sts": { - "version": "3.554.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.554.0.tgz", - "integrity": "sha512-EhaA6T0M0DNg5M8TCF1a7XJI5D/ZxAF3dgVIchyF98iNzjYgl/7U8K6hJay2A11aFvVu70g46xYMpz3Meky4wQ==", + "version": "3.565.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.565.0.tgz", + "integrity": "sha512-c2T20tz+Akn9uBgmZPPK3VLpgzYGVuHxKNisLwGtGL5NdQSoZZ6HNT08PY3KB12Ou8VcZLv8cvUz2Nivqhg4RA==", "optional": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/core": "3.554.0", + "@aws-sdk/core": "3.556.0", + "@aws-sdk/credential-provider-node": "3.565.0", "@aws-sdk/middleware-host-header": "3.535.0", "@aws-sdk/middleware-logger": "3.535.0", "@aws-sdk/middleware-recursion-detection": "3.535.0", @@ -431,20 +421,17 @@ }, "engines": { "node": ">=14.0.0" - }, - "peerDependencies": { - "@aws-sdk/credential-provider-node": "^3.554.0" } }, "node_modules/@aws-sdk/core": { - "version": "3.554.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.554.0.tgz", - "integrity": "sha512-JrG7ToTLeNf+/S3IiCUPVw9jEDB0DXl5ho8n/HwOa946mv+QyCepCuV2U/8f/1KAX0mD8Ufm/E4/cbCbFHgbSg==", + "version": "3.556.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.556.0.tgz", + "integrity": "sha512-vJaSaHw2kPQlo11j/Rzuz0gk1tEaKdz+2ser0f0qZ5vwFlANjt08m/frU17ctnVKC1s58bxpctO/1P894fHLrA==", "optional": true, "dependencies": { "@smithy/core": "^1.4.2", "@smithy/protocol-http": "^3.3.0", - "@smithy/signature-v4": "^2.2.1", + "@smithy/signature-v4": "^2.3.0", "@smithy/smithy-client": "^2.5.1", "@smithy/types": "^2.12.0", "fast-xml-parser": "4.2.5", @@ -455,12 +442,12 @@ } }, "node_modules/@aws-sdk/credential-provider-cognito-identity": { - "version": "3.554.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.554.0.tgz", - "integrity": "sha512-soF84soy9rTAfzsH1ODP0AnJt5JlsJI8k1aWtC08/Al0CZjLkxDRHzaB1wxubFyT2Ql6bpxbDfU6KDFXsQIpdA==", + "version": "3.565.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.565.0.tgz", + "integrity": "sha512-nOI0RYE0aHByaDI8w5Eu855fGOwGuAPEeCUgu8AIhExvDUZ5bmiwMN4TxHJW/+CEgQB8uZcPYCDEUMzqr0yh5w==", "optional": true, "dependencies": { - "@aws-sdk/client-cognito-identity": "3.554.0", + "@aws-sdk/client-cognito-identity": "3.565.0", "@aws-sdk/types": "3.535.0", "@smithy/property-provider": "^2.2.0", "@smithy/types": "^2.12.0", @@ -506,16 +493,15 @@ } }, "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.554.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.554.0.tgz", - "integrity": "sha512-BQenhg43S6TMJHxrdjDVdVF+HH5tA1op9ZYLyJrvV5nn7CCO4kyAkkOuSAv1NkL+RZsIkW0/vHTXwQOQw3cUsg==", + "version": "3.565.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.565.0.tgz", + "integrity": "sha512-H9+etKKjeQot3vKzuE/osTb1xMzYW0UNQZSLSt1T4fZYSMdEgnOFXRwT0kw8yGMtSQuWMYZcXYHv0jMYetho4A==", "optional": true, "dependencies": { - "@aws-sdk/client-sts": "3.554.0", "@aws-sdk/credential-provider-env": "3.535.0", "@aws-sdk/credential-provider-process": "3.535.0", - "@aws-sdk/credential-provider-sso": "3.554.0", - "@aws-sdk/credential-provider-web-identity": "3.554.0", + "@aws-sdk/credential-provider-sso": "3.565.0", + "@aws-sdk/credential-provider-web-identity": "3.565.0", "@aws-sdk/types": "3.535.0", "@smithy/credential-provider-imds": "^2.3.0", "@smithy/property-provider": "^2.2.0", @@ -525,20 +511,23 @@ }, "engines": { "node": ">=14.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.565.0" } }, "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.554.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.554.0.tgz", - "integrity": "sha512-poX/+2OE3oxqp4f5MiaJh251p8l+bzcFwgcDBwz0e2rcpvMSYl9jw4AvGnCiG2bmf9yhNJdftBiS1A+KjxV0qA==", + "version": "3.565.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.565.0.tgz", + "integrity": "sha512-d9xlnyd6Ba7DMJNTy0hoAHexFTOx8LWn1XPWbHZqgyRb+0YDIOhPN2ADYxE4Zq+Dc03MLTqq15zWOUhIqAPLuQ==", "optional": true, "dependencies": { "@aws-sdk/credential-provider-env": "3.535.0", "@aws-sdk/credential-provider-http": "3.552.0", - "@aws-sdk/credential-provider-ini": "3.554.0", + "@aws-sdk/credential-provider-ini": "3.565.0", "@aws-sdk/credential-provider-process": "3.535.0", - "@aws-sdk/credential-provider-sso": "3.554.0", - "@aws-sdk/credential-provider-web-identity": "3.554.0", + "@aws-sdk/credential-provider-sso": "3.565.0", + "@aws-sdk/credential-provider-web-identity": "3.565.0", "@aws-sdk/types": "3.535.0", "@smithy/credential-provider-imds": "^2.3.0", "@smithy/property-provider": "^2.2.0", @@ -567,13 +556,13 @@ } }, "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.554.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.554.0.tgz", - "integrity": "sha512-8QPpwBA31i/fZ7lDZJC4FA9EdxLg5SJ8sPB2qLSjp5UTGTYL2HRl0Eznkb7DXyp/wImsR/HFR1NxuFCCVotLCg==", + "version": "3.565.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.565.0.tgz", + "integrity": "sha512-MWefgFWt5BvVMlbjS0mxolxJPA8BKSnzfbdgGCoyEImuHa3GzVArYDQru4oWk6lD+naZFVHzPjHzEDYMag2KGw==", "optional": true, "dependencies": { - "@aws-sdk/client-sso": "3.554.0", - "@aws-sdk/token-providers": "3.554.0", + "@aws-sdk/client-sso": "3.556.0", + "@aws-sdk/token-providers": "3.565.0", "@aws-sdk/types": "3.535.0", "@smithy/property-provider": "^2.2.0", "@smithy/shared-ini-file-loader": "^2.4.0", @@ -585,12 +574,11 @@ } }, "node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.554.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.554.0.tgz", - "integrity": "sha512-HN54DzLjepw5ZWSF9ycGevhFTyg6pjLuLKy5Y8t/f1jFDComzYdGEDe0cdV9YO653W3+PQwZZGz09YVygGYBLg==", + "version": "3.565.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.565.0.tgz", + "integrity": "sha512-+MWMp3jxn93Ol2E2gjjXjqoZDNMao03OErGmGoDKMIlu322jNHTvYZo5W0WBy+615mnDKahbX55MmVBge/FwDg==", "optional": true, "dependencies": { - "@aws-sdk/client-sts": "3.554.0", "@aws-sdk/types": "3.535.0", "@smithy/property-provider": "^2.2.0", "@smithy/types": "^2.12.0", @@ -598,25 +586,28 @@ }, "engines": { "node": ">=14.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.565.0" } }, "node_modules/@aws-sdk/credential-providers": { - "version": "3.554.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.554.0.tgz", - "integrity": "sha512-UMmJ4M7RknSz1p0981t57QUw6DibPEo/GG8+env6Q8dHrEc3pnRL206f1zxLcqzT5RI50XstH/bDtnyC7uRYiw==", + "version": "3.565.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.565.0.tgz", + "integrity": "sha512-heCRN2Qrje8Nu8TKo+EMM5ToIRECIuCLfHKf2hvkl9iWUs/a7ailNTWUqhE4gqZKGDvFO9dbvqxwKRKi5YXfiA==", "optional": true, "dependencies": { - "@aws-sdk/client-cognito-identity": "3.554.0", - "@aws-sdk/client-sso": "3.554.0", - "@aws-sdk/client-sts": "3.554.0", - "@aws-sdk/credential-provider-cognito-identity": "3.554.0", + "@aws-sdk/client-cognito-identity": "3.565.0", + "@aws-sdk/client-sso": "3.556.0", + "@aws-sdk/client-sts": "3.565.0", + "@aws-sdk/credential-provider-cognito-identity": "3.565.0", "@aws-sdk/credential-provider-env": "3.535.0", "@aws-sdk/credential-provider-http": "3.552.0", - "@aws-sdk/credential-provider-ini": "3.554.0", - "@aws-sdk/credential-provider-node": "3.554.0", + "@aws-sdk/credential-provider-ini": "3.565.0", + "@aws-sdk/credential-provider-node": "3.565.0", "@aws-sdk/credential-provider-process": "3.535.0", - "@aws-sdk/credential-provider-sso": "3.554.0", - "@aws-sdk/credential-provider-web-identity": "3.554.0", + "@aws-sdk/credential-provider-sso": "3.565.0", + "@aws-sdk/credential-provider-web-identity": "3.565.0", "@aws-sdk/types": "3.535.0", "@smithy/credential-provider-imds": "^2.3.0", "@smithy/property-provider": "^2.2.0", @@ -705,12 +696,11 @@ } }, "node_modules/@aws-sdk/token-providers": { - "version": "3.554.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.554.0.tgz", - "integrity": "sha512-KMMQ5Cw0FUPL9H8g69Lp08xtzRo7r/MK+lBV6LznWBbCP/NwtZ8awVHaPy2P31z00cWtu9MYkUTviWPqJTaBvg==", + "version": "3.565.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.565.0.tgz", + "integrity": "sha512-QPoQUTWijvFZD+7yqu9oJORG6FxqUseD4uhV3iZKVZsj7/Rlpvlh8oEZVCrcnsZ17vKzy+RMUVlnj3vf7Pwp8Q==", "optional": true, "dependencies": { - "@aws-sdk/client-sso-oidc": "3.554.0", "@aws-sdk/types": "3.535.0", "@smithy/property-provider": "^2.2.0", "@smithy/shared-ini-file-loader": "^2.4.0", @@ -719,6 +709,9 @@ }, "engines": { "node": ">=14.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sso-oidc": "^3.565.0" } }, "node_modules/@aws-sdk/types": { @@ -828,21 +821,21 @@ } }, "node_modules/@babel/core": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.4.tgz", - "integrity": "sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.5.tgz", + "integrity": "sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.2", - "@babel/generator": "^7.24.4", + "@babel/generator": "^7.24.5", "@babel/helper-compilation-targets": "^7.23.6", - "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.24.4", - "@babel/parser": "^7.24.4", + "@babel/helper-module-transforms": "^7.24.5", + "@babel/helpers": "^7.24.5", + "@babel/parser": "^7.24.5", "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0", + "@babel/traverse": "^7.24.5", + "@babel/types": "^7.24.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -858,12 +851,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.4.tgz", - "integrity": "sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.5.tgz", + "integrity": "sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==", "dev": true, "dependencies": { - "@babel/types": "^7.24.0", + "@babel/types": "^7.24.5", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -947,16 +940,16 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", - "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.5.tgz", + "integrity": "sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A==", "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.20" + "@babel/helper-module-imports": "^7.24.3", + "@babel/helper-simple-access": "^7.24.5", + "@babel/helper-split-export-declaration": "^7.24.5", + "@babel/helper-validator-identifier": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -966,33 +959,33 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", - "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.5.tgz", + "integrity": "sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.5.tgz", + "integrity": "sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz", + "integrity": "sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -1008,9 +1001,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", + "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==", "dev": true, "engines": { "node": ">=6.9.0" @@ -1026,26 +1019,26 @@ } }, "node_modules/@babel/helpers": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.4.tgz", - "integrity": "sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.5.tgz", + "integrity": "sha512-CiQmBMMpMQHwM5m01YnrM6imUG1ebgYJ+fAIW4FZe6m4qHTPaRHti+R8cggAwkdz4oXhtO4/K9JWlh+8hIfR2Q==", "dev": true, "dependencies": { "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.1", - "@babel/types": "^7.24.0" + "@babel/traverse": "^7.24.5", + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", - "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz", + "integrity": "sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-validator-identifier": "^7.24.5", "chalk": "^2.4.2", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" @@ -1126,9 +1119,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", - "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz", + "integrity": "sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -1315,9 +1308,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.4.tgz", - "integrity": "sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.5.tgz", + "integrity": "sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -1340,19 +1333,19 @@ } }, "node_modules/@babel/traverse": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", - "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.5.tgz", + "integrity": "sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.24.1", - "@babel/generator": "^7.24.1", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.5", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.24.1", - "@babel/types": "^7.24.0", + "@babel/helper-split-export-declaration": "^7.24.5", + "@babel/parser": "^7.24.5", + "@babel/types": "^7.24.5", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -1361,13 +1354,13 @@ } }, "node_modules/@babel/types": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", - "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.5.tgz", + "integrity": "sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-string-parser": "^7.24.1", + "@babel/helper-validator-identifier": "^7.24.5", "to-fast-properties": "^2.0.0" }, "engines": { @@ -1462,9 +1455,9 @@ } }, "node_modules/@fontsource/inter": { - "version": "5.0.17", - "resolved": "https://registry.npmjs.org/@fontsource/inter/-/inter-5.0.17.tgz", - "integrity": "sha512-2meBGx1kt7u5LwzGc5Sz5rka6ZDrydg6nT3x6Wkt310vHXUchIywrO8pooWMzZdHYcyFY/cv4lEpJZgMD94bCg==" + "version": "5.0.18", + "resolved": "https://registry.npmjs.org/@fontsource/inter/-/inter-5.0.18.tgz", + "integrity": "sha512-YCsoYPTcs713sI7tLtxaPrIhXAXvEetGg5Ry02ivA8qUOb3fQHojbK/X9HLD5OOKvFUNR2Ynkwb1kR1hVKQHpw==" }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", @@ -1736,9 +1729,9 @@ } }, "node_modules/@jest/core/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, "node_modules/@jest/environment": { @@ -3245,9 +3238,9 @@ } }, "node_modules/@types/jest/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, "node_modules/@types/jsdom": { @@ -3288,9 +3281,9 @@ "dev": true }, "node_modules/@types/react": { - "version": "18.2.79", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.79.tgz", - "integrity": "sha512-RwGAGXPl9kSXwdNTafkOEuFrTBD5SA2B3iEB96xi8+xu5ddUa/cpvyVCSNn+asgLCTHkb5ZxN8gbuibYJi4s1w==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.1.tgz", + "integrity": "sha512-V0kuGBX3+prX+DQ/7r2qsv1NsdfnCLnTgnRJ1pYnxykBhGMz+qj+box5lq7XsO5mtZsBqpjwwTu/7wszPfMBcw==", "dev": true, "dependencies": { "@types/prop-types": "*", @@ -3667,9 +3660,9 @@ } }, "node_modules/antd": { - "version": "5.16.2", - "resolved": "https://registry.npmjs.org/antd/-/antd-5.16.2.tgz", - "integrity": "sha512-46BC1IaCRzkdcTAs1TuIZ1D56JrIRP5yWGrlfV+kGjro1c2dVaQP7yGXA2/m29uF41TqptxOYl36opY5ydN++A==", + "version": "5.16.5", + "resolved": "https://registry.npmjs.org/antd/-/antd-5.16.5.tgz", + "integrity": "sha512-8MGjf2ejlii2iVH4F960jwpdGiU+ISWPdiMA2O1AJSFJFA3eCxVLHkKRGiagsRmdo3AUU8tuPfQsqbLuEIlswA==", "dependencies": { "@ant-design/colors": "^7.0.2", "@ant-design/cssinjs": "^1.18.5", @@ -3700,13 +3693,13 @@ "rc-motion": "^2.9.0", "rc-notification": "~5.4.0", "rc-pagination": "~4.0.4", - "rc-picker": "~4.3.2", + "rc-picker": "~4.4.2", "rc-progress": "~4.0.0", "rc-rate": "~2.12.0", "rc-resize-observer": "^1.4.0", "rc-segmented": "~2.3.0", "rc-select": "~14.13.1", - "rc-slider": "~10.5.0", + "rc-slider": "~10.6.2", "rc-steps": "~6.0.1", "rc-switch": "~4.1.0", "rc-table": "~7.45.4", @@ -4175,7 +4168,7 @@ }, "node_modules/bookem-shared": { "version": "1.0.0", - "resolved": "git+ssh://git@github.com/ChangePlusPlusVandy/bookem-shared.git#23ae314acc07b37be04e9f49f6055b31650d1dd5", + "resolved": "git+ssh://git@github.com/ChangePlusPlusVandy/bookem-shared.git#d103192ef2a6db1e00e669470d4f3c573695aa61", "license": "ISC", "dependencies": { "mongoose": "^6.8.3" @@ -4346,9 +4339,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001610", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001610.tgz", - "integrity": "sha512-QFutAY4NgaelojVMjY63o6XlZyORPaLfyMnsl3HgnWdJUcX6K0oaJymHjH8PT5Gk7sTm8rvC/c5COUQKXqmOMA==", + "version": "1.0.30001614", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001614.tgz", + "integrity": "sha512-jmZQ1VpmlRwHgdP1/uiKzgiAuGOfLEJsYFP4+GBou/QQ4U6IOJCB4NP1c+1p9RGLpwObcT94jA5/uO+F1vBbog==", "funding": [ { "type": "opencollective", @@ -4422,9 +4415,9 @@ } }, "node_modules/cjs-module-lexer": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", - "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", + "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==", "dev": true }, "node_modules/classnames": { @@ -4829,9 +4822,9 @@ } }, "node_modules/dayjs": { - "version": "1.11.10", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", - "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" + "version": "1.11.11", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz", + "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==" }, "node_modules/debug": { "version": "4.3.4", @@ -5049,9 +5042,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.737", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.737.tgz", - "integrity": "sha512-QvLTxaLHKdy5YxvixAw/FfHq2eWLUL9KvsPjp0aHK1gI5d3EDuDgITkvj0nFO2c6zUY3ZqVAJQiBYyQP9tQpfw==", + "version": "1.4.752", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.752.tgz", + "integrity": "sha512-P3QJreYI/AUTcfBVrC4zy9KvnZWekViThgQMX/VpJ+IsOBbcX5JFpORM4qWapwWQ+agb2nYAOyn/4PMXOk0m2Q==", "dev": true }, "node_modules/emittery": { @@ -5208,14 +5201,14 @@ } }, "node_modules/es-iterator-helpers": { - "version": "1.0.18", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.18.tgz", - "integrity": "sha512-scxAJaewsahbqTYrGKJihhViaM6DDZDDoucfvzNbK0pOren1g/daDQ3IAhzn+1G14rBG7w+i5N+qul60++zlKA==", + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz", + "integrity": "sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==", "dev": true, "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", + "es-abstract": "^1.23.3", "es-errors": "^1.3.0", "es-set-tostringtag": "^2.0.3", "function-bind": "^1.1.2", @@ -5606,9 +5599,9 @@ } }, "node_modules/eslint-plugin-react-hooks": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz", - "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", + "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", "dev": true, "engines": { "node": ">=10" @@ -6312,12 +6305,13 @@ } }, "node_modules/globalthis": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", - "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", "dev": true, "dependencies": { - "define-properties": "^1.1.3" + "define-properties": "^1.2.1", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -7363,9 +7357,9 @@ } }, "node_modules/jest-circus/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, "node_modules/jest-cli": { @@ -7505,9 +7499,9 @@ } }, "node_modules/jest-config/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, "node_modules/jest-diff": { @@ -7568,9 +7562,9 @@ } }, "node_modules/jest-diff/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, "node_modules/jest-docblock": { @@ -7644,9 +7638,9 @@ } }, "node_modules/jest-each/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, "node_modules/jest-environment-jsdom": { @@ -7767,9 +7761,9 @@ } }, "node_modules/jest-leak-detector/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, "node_modules/jest-matcher-utils": { @@ -7830,9 +7824,9 @@ } }, "node_modules/jest-matcher-utils/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, "node_modules/jest-message-util": { @@ -7898,9 +7892,9 @@ } }, "node_modules/jest-message-util/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, "node_modules/jest-mock": { @@ -8175,9 +8169,9 @@ } }, "node_modules/jest-snapshot/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, "node_modules/jest-snapshot/node_modules/semver": { @@ -8306,9 +8300,9 @@ } }, "node_modules/jest-validate/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, "node_modules/jest-watcher": { @@ -9373,9 +9367,9 @@ } }, "node_modules/nwsapi": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz", - "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", + "version": "2.2.9", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.9.tgz", + "integrity": "sha512-2f3F0SEEer8bBu0dsNCFF50N0cTThV1nWFYcEYFZttdW0lDAoybv9cQoK7X7/68Z89S7FoRrVjP1LPX4XRf9vg==", "dev": true }, "node_modules/oauth": { @@ -9593,17 +9587,17 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" @@ -9875,9 +9869,9 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" }, "node_modules/preact": { - "version": "10.20.2", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.20.2.tgz", - "integrity": "sha512-S1d1ernz3KQ+Y2awUxKakpfOg2CEmJmwOP+6igPx6dgr6pgDvenqYviyokWso2rhHvGtTlWWnJDa7RaPbQerTg==", + "version": "10.21.0", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.21.0.tgz", + "integrity": "sha512-aQAIxtzWEwH8ou+OovWVSVNlFImL7xUCwJX3YMqA3U8iKCNC34999fFOnWjYNsylgfPgMexpbk7WYOLtKr/mxg==", "funding": { "type": "opencollective", "url": "https://opencollective.com/preact" @@ -10296,9 +10290,9 @@ } }, "node_modules/rc-picker": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/rc-picker/-/rc-picker-4.3.2.tgz", - "integrity": "sha512-2NtobLxG2YqllXn4YczbupgIH6PSqzjCfFCnGlgPIY9k0HZti8WmBPjS1OD9JKQl+Tdg0pMVUeTEc07y4X9ZRQ==", + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/rc-picker/-/rc-picker-4.4.2.tgz", + "integrity": "sha512-MdbAXvwiGyhb+bHe66qPps8xPQivzEgcyCp3/MPK4T+oER0gOmVRCEDxaD4FhYG/7GLH3rDrHpu79BvEn2JFTQ==", "dependencies": { "@babel/runtime": "^7.10.1", "@rc-component/trigger": "^2.0.0", @@ -10416,13 +10410,13 @@ } }, "node_modules/rc-slider": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-10.5.0.tgz", - "integrity": "sha512-xiYght50cvoODZYI43v3Ylsqiw14+D7ELsgzR40boDZaya1HFa1Etnv9MDkQE8X/UrXAffwv2AcNAhslgYuDTw==", + "version": "10.6.2", + "resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-10.6.2.tgz", + "integrity": "sha512-FjkoFjyvUQWcBo1F3RgSglky3ar0+qHLM41PlFVYB4Bj3RD8E/Mv7kqMouLFBU+3aFglMzzctAIWRwajEuueSw==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.5", - "rc-util": "^5.27.0" + "rc-util": "^5.36.0" }, "engines": { "node": ">=8.x" @@ -10464,9 +10458,9 @@ } }, "node_modules/rc-table": { - "version": "7.45.4", - "resolved": "https://registry.npmjs.org/rc-table/-/rc-table-7.45.4.tgz", - "integrity": "sha512-6aSbGrnkN2GLSt3s1x+wa4f3j/VEgg1uKPpaLY5qHH1/nFyreS2V7DFJ0TfUb18allf2FQl7oVYEjTixlBXEyQ==", + "version": "7.45.5", + "resolved": "https://registry.npmjs.org/rc-table/-/rc-table-7.45.5.tgz", + "integrity": "sha512-R5sOfToOk7CalSkebZpqM8lkKWOJR7uXPGEhjjTSoj5egyHBwMxaACoPj2oI+6qLSll9yZrG5K+8HTN57b2Ahg==", "dependencies": { "@babel/runtime": "^7.10.1", "@rc-component/context": "^1.4.0", @@ -10597,14 +10591,14 @@ } }, "node_modules/rc-util/node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==" + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" }, "node_modules/rc-virtual-list": { - "version": "3.11.4", - "resolved": "https://registry.npmjs.org/rc-virtual-list/-/rc-virtual-list-3.11.4.tgz", - "integrity": "sha512-NbBi0fvyIu26gP69nQBiWgUMTPX3mr4FcuBQiVqagU0BnuX8WQkiivnMs105JROeuUIFczLrlgUhLQwTWV1XDA==", + "version": "3.11.5", + "resolved": "https://registry.npmjs.org/rc-virtual-list/-/rc-virtual-list-3.11.5.tgz", + "integrity": "sha512-iZRW99m5jAxtwKNPLwUrPryurcnKpXBdTyhuBp6ythf7kg/otKO5cCiIvL55GQwU0QGSlouQS0tnkciRMJUwRQ==", "dependencies": { "@babel/runtime": "^7.20.0", "classnames": "^2.2.6", @@ -10620,9 +10614,9 @@ } }, "node_modules/react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "dependencies": { "loose-envify": "^1.1.0" }, @@ -10631,15 +10625,15 @@ } }, "node_modules/react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "dependencies": { "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" + "scheduler": "^0.23.2" }, "peerDependencies": { - "react": "^18.2.0" + "react": "^18.3.1" } }, "node_modules/react-highlight-words": { @@ -10984,9 +10978,9 @@ } }, "node_modules/scheduler": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", "dependencies": { "loose-envify": "^1.1.0" } @@ -11506,6 +11500,11 @@ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" }, + "node_modules/styled-components/node_modules/stylis": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.1.tgz", + "integrity": "sha512-EQepAV+wMsIaGVGX1RECzgrcqRRU/0sYOHkeLsZ3fzHaHXZy4DaOOX0vOlGQdlsjkh3mFHAIlVimpwAs4dslyQ==" + }, "node_modules/styled-components/node_modules/tslib": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", @@ -11534,9 +11533,9 @@ } }, "node_modules/stylis": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.1.tgz", - "integrity": "sha512-EQepAV+wMsIaGVGX1RECzgrcqRRU/0sYOHkeLsZ3fzHaHXZy4DaOOX0vOlGQdlsjkh3mFHAIlVimpwAs4dslyQ==" + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.2.tgz", + "integrity": "sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==" }, "node_modules/supports-color": { "version": "7.2.0", @@ -11562,6 +11561,63 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/survey-core": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/survey-core/-/survey-core-1.10.2.tgz", + "integrity": "sha512-EszikpODkThTHQwvUABJfreiI+I8koE1gHAV5hDsXuLGQ+Iw7lewIUI16+sjoqxjKhq2M5TnaGe3DfOI/kDSSg==" + }, + "node_modules/survey-creator-core": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/survey-creator-core/-/survey-creator-core-1.10.2.tgz", + "integrity": "sha512-a/h6qe5B9bvg76SEIlNNFfx0rgiIH5izkjNzFHNpdqX4ITwYyBjVKTl5JDD4FXEC6a88tYpoLUPB5XVNSjRrvg==", + "dependencies": { + "survey-core": "1.10.2" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "ace-builds": "^1.4.12" + }, + "peerDependenciesMeta": { + "ace-builds": { + "optional": true + } + } + }, + "node_modules/survey-creator-react": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/survey-creator-react/-/survey-creator-react-1.10.2.tgz", + "integrity": "sha512-G05WMT4OqujE2VvPCTvyUa8H0Uj8tG2Mh8OjqI/0YhA9CnBfN8EdT07IruUEk5sMH6nXCkdMZP2cTQqyizHAUg==", + "dependencies": { + "survey-core": "1.10.2", + "survey-creator-core": "1.10.2", + "survey-react-ui": "1.10.2" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "ace-builds": "^1.4.12", + "react": "^16.5.0 || ^17.0.1 || ^18.1.0", + "react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0" + }, + "peerDependenciesMeta": { + "ace-builds": { + "optional": true + } + } + }, + "node_modules/survey-react-ui": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/survey-react-ui/-/survey-react-ui-1.10.2.tgz", + "integrity": "sha512-0q/m5fV70qFheU1etjnZYxXLehKVi2sgBers0q+9zTf9tls1hwmOj87coptpsU4Hw9TGiVpP/E9pHvyqcjlOrg==", + "peerDependencies": { + "react": "^16.5.0 || ^17.0.1 || ^18.2.0", + "react-dom": "^16.5.0 || ^17.0.1 || ^18.2.0", + "survey-core": "*" + } + }, "node_modules/swr": { "version": "2.2.5", "resolved": "https://registry.npmjs.org/swr/-/swr-2.2.5.tgz", @@ -11671,9 +11727,9 @@ "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==" }, "node_modules/tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", "dev": true, "dependencies": { "psl": "^1.1.33", @@ -11939,9 +11995,9 @@ } }, "node_modules/use-sync-external-store": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", - "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz", + "integrity": "sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==", "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } @@ -12196,6 +12252,15 @@ "node": ">=0.8" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wrap-ansi": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", @@ -12271,9 +12336,9 @@ } }, "node_modules/ws": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", - "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz", + "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==", "dev": true, "engines": { "node": ">=10.0.0" diff --git a/package.json b/package.json index 2781c45..1085d93 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "react-highlight-words": "^0.20.0", "react-hook-form": "^7.39.3", "styled-components": "^6.1.8", + "survey-creator-react": "^1.9.139", "swr": "^2.0.4", "xlsx": "^0.18.5" }, diff --git a/pages/api/event/[id].ts b/pages/api/event/[id].ts index 8a96083..da667a1 100644 --- a/pages/api/event/[id].ts +++ b/pages/api/event/[id].ts @@ -6,6 +6,7 @@ import { ObjectId } from 'mongodb'; import type { NextApiRequest, NextApiResponse } from 'next'; import { getServerSession } from 'next-auth'; import { authOptions } from '../auth/[...nextauth]'; +import VolunteerPrograms from 'bookem-shared/src/models/VolunteerPrograms'; export default async function handler( req: NextApiRequest, @@ -30,6 +31,8 @@ export default async function handler( case 'GET': try { await dbConnect(); + await VolunteerPrograms.findOne(); + await Tags.findOne(); if (!id) return res.status(400).json({ message: 'Missing id' }); diff --git a/pages/api/event/[id]/application-questions.ts b/pages/api/event/[id]/application-questions.ts new file mode 100644 index 0000000..543b6f2 --- /dev/null +++ b/pages/api/event/[id]/application-questions.ts @@ -0,0 +1,45 @@ +import dbConnect from '@/lib/dbConnect'; +import type { NextApiRequest, NextApiResponse } from 'next'; +import VolunteerApplications from 'bookem-shared/src/models/VolunteerApplications'; +import { QueriedVolunteerApplicationData } from 'bookem-shared/src/types/database'; + +export default async function handler( + req: NextApiRequest, + res: NextApiResponse +) { + // Get request parameter + const { + query: { id }, + method, + } = req; + + switch (method) { + /** + * @route GET /api/event/application-questions + * @desc Return a list of questions + * @req event id + * @res a list of questions + */ + case 'GET': + try { + await dbConnect(); + + const application = (await VolunteerApplications.findOne({ + event: id, + })) as QueriedVolunteerApplicationData; + + if (!application) + return res.status(500).json({ message: 'Application not found' }); + + return res.status(200).json(application.questions); + } catch (error: any) { + console.error(error); + res.status(500).json({ message: error.message }); + } + break; + + default: + res.status(405).end('Method Not Allowed'); + break; + } +} diff --git a/pages/api/event/[id]/applications.ts b/pages/api/event/[id]/applications.ts index bcdf911..6a4406f 100644 --- a/pages/api/event/[id]/applications.ts +++ b/pages/api/event/[id]/applications.ts @@ -52,5 +52,88 @@ export default async function handler( res.status(500).json({ message: error.message }); } break; + + /** + * @route POST /api/event/applications + * @desc Create a new application or update an existing application + * @req event id, questions + * @res success or error message + */ + case 'POST': + try { + await dbConnect(); + + const newApplication = new VolunteerApplications(req.body); + + // console.log(newApplication); + + // check if event exists + const event = await VolunteerEvents.findById(newApplication.event); + if (!event) { + return res + .status(200) + .json({ message: 'Event not found', status: 'error' }); + } + + // check if application exists + const existingApplication = await VolunteerApplications.findOne({ + event: newApplication.event, + }); + + if (existingApplication) { + // update existing application + existingApplication.questions = newApplication.questions; + const savedApplication = await existingApplication.save(); + if (!savedApplication) { + return res + .status(200) + .json({ message: 'Failed to save application', status: 'error' }); + } + } else { + // create new application + const session = await VolunteerApplications.startSession(); + session.startTransaction(); + try { + const savedApplication = await newApplication.save(); + if (!savedApplication) { + await session.abortTransaction(); + session.endSession(); + return res.status(200).json({ + message: 'Failed to save application', + status: 'error', + }); + } + + event.applicationId = savedApplication._id; + await event.save(); + + await session.commitTransaction(); + session.endSession(); + + return res + .status(200) + .json({ message: 'Application saved', status: 'success' }); + } catch (error: any) { + await session.abortTransaction(); + session.endSession(); + console.error(error); + res + .status(500) + .json({ message: 'Sorry an internal error occurred' }); + } + } + + return res + .status(200) + .json({ message: 'Application saved', status: 'success' }); + } catch (error: any) { + console.error(error); + res.status(500).json({ message: 'Sorry an internal error occurred' }); + } + break; + + default: + res.status(405).end('Method Not Allowed'); + break; } } diff --git a/pages/api/event/[id]/publish.ts b/pages/api/event/[id]/publish.ts new file mode 100644 index 0000000..ea70a1b --- /dev/null +++ b/pages/api/event/[id]/publish.ts @@ -0,0 +1,52 @@ +import dbConnect from '@/lib/dbConnect'; +import type { NextApiRequest, NextApiResponse } from 'next'; +import VolunteerApplications from 'bookem-shared/src/models/VolunteerApplications'; +import VolunteerEvents from 'bookem-shared/src/models/VolunteerEvents'; +import { QueriedVolunteerEventData } from 'bookem-shared/src/types/database'; +import Users from 'bookem-shared/src/models/Users'; +import ApplicationResponse from 'bookem-shared/src/models/ApplicationResponse'; + +export default async function handler( + req: NextApiRequest, + res: NextApiResponse +) { + // Get request parameter + const { + query: { id }, + method, + } = req; + + switch (method) { + case 'PUT': + try { + await dbConnect(); + + console.log('Publishing event with id:', id); + + // Update event to published + const event = await VolunteerEvents.findOneAndUpdate( + { _id: id }, + { published: true }, + { new: true } + ); + + if (!event) { + return res + .status(200) + .json({ message: 'Event not found', status: 'error' }); + } + + return res + .status(200) + .json({ message: 'Event published', status: 'success' }); + } catch (error: any) { + console.error(error); + res.status(500).json({ message: 'Sorry an internal error occurred' }); + } + break; + + default: + res.status(405).end('Method Not Allowed'); + break; + } +} diff --git a/pages/event/[pid]/application.tsx b/pages/event/[pid]/application.tsx new file mode 100644 index 0000000..0de8e3f --- /dev/null +++ b/pages/event/[pid]/application.tsx @@ -0,0 +1,172 @@ +import { SurveyCreatorComponent, SurveyCreator } from 'survey-creator-react'; +import 'survey-core/defaultV2.min.css'; +import 'survey-creator-core/survey-creator-core.min.css'; +import { useEffect, useState } from 'react'; +import { Serializer } from 'survey-core'; +import Link from 'next/link'; +import Image from 'next/image'; +import { + ApplicationQuestionData, + ApplicationResponseData, + QueriedVolunteerEventDTO, + VolunteerApplicationData, +} from 'bookem-shared/src/types/database'; +import { useRouter } from 'next/router'; +import mongoose from 'mongoose'; +import { message } from 'antd'; +import { + convertApplicationToSurveyQuestions, + convertSurveyToApplicationQuestions, +} from '@/utils/application-utils'; + +//remove a property to the page object. You can't set it in JSON as well +Serializer.removeProperty('panelbase', 'visibleIf'); +//remove a property from the base question class and as result from all questions +Serializer.removeProperty('question', 'visibleIf'); + +const creatorOptions = { + showLogicTab: true, + isAutoSave: false, + questionTypes: ['text', 'checkbox', 'radiogroup'], +}; + +export default function SurveyCreatorWidget() { + const router = useRouter(); + const { pid } = router.query; + const [event, setEvent] = useState(); + const [surveyQuestions, setSurveyQuestions] = useState(); + + const [messageApi, contextHolder] = message.useMessage(); + + useEffect(() => { + const creator = new SurveyCreator(creatorOptions); + + // Load the event data + fetch('/api/event/' + pid) + .then(res => { + if (!res.ok) { + throw new Error( + 'An error has occurred while fetching: ' + res.statusText + ); + } + return res.json(); + }) + .then(data => { + setEvent(data); + }) + .then(() => { + creator.survey.title = 'Volunteer Application for ' + event?.name; + }) + .catch(err => { + console.error(err); + messageApi.open({ + content: "Failed to load the event's data", + type: 'error', + }); + }); + + // Load the application questions + fetch('/api/event/' + pid + '/application-questions') + .then(res => { + if (!res.ok) { + throw new Error( + 'An error has occurred while fetching: ' + res.statusText + ); + } + return res.json(); + }) + .then(data => { + // console.log(data); + // console.log(convertApplicationToSurveyQuestions(data)); + + // Set the survey questions after converting the application questions + setSurveyQuestions(convertApplicationToSurveyQuestions(data)); + }) + .then(() => { + // Display survey qeustions after state is set + creator.text = JSON.stringify(surveyQuestions); + }) + .catch(err => { + console.log(err); + messageApi.open({ + content: "You haven't created an application yet", + type: 'info', + }); + }); + + creator.toolbox.forceCompact = true; + creator.showSaveButton = true; + creator.saveSurveyFunc = (saveNo, callback) => { + const surveyQuestions = JSON.parse(creator.text); + + const newApplication: VolunteerApplicationData = { + questions: convertSurveyToApplicationQuestions(surveyQuestions), + responses: [] as ApplicationResponseData[], + event: new mongoose.Types.ObjectId(pid as string), + }; + // console.log(surveyQuestions); + // console.log(newApplication); + + fetch(`/api/event/${pid}/applications`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify(newApplication), + }) + .then(res => res.json()) + .then(data => { + if (data.status === 'error') { + messageApi.open({ + content: data.message, + type: 'error', + }); + } else { + messageApi.open({ + content: data.message, + type: 'success', + }); + } + }) + .catch(err => { + console.error(err); + messageApi.open({ + content: 'Sorry an internal error occurred', + type: 'error', + }); + }); + + callback(saveNo, true); + }; + + creator.onShowingProperty.add(function (sender, options) { + if (options.obj.getType() == 'survey') { + options.canShow = options.property.name == 'title'; + } + }); + + setCreator(creator); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [event?.name, pid, messageApi]); + + const [creator, setCreator] = useState(null); + + if (!creator) return <>Loading...; + + return ( + <> + {contextHolder} + window.history.back()} + style={{ + margin: '0 0 0 20px', + }}> + + + + + ); +} + +export { getServerSideProps } from '@/lib/getServerSideProps'; diff --git a/pages/volunteers/event/[pid].tsx b/pages/volunteers/event/[pid].tsx index 1d6dc5c..e064717 100644 --- a/pages/volunteers/event/[pid].tsx +++ b/pages/volunteers/event/[pid].tsx @@ -6,6 +6,8 @@ import React, { useEffect, useState } from 'react'; import { QueriedVolunteerEventDTO } from 'bookem-shared/src/types/database'; import useSWR from 'swr'; import { fetcher } from '@/utils/utils'; +import Link from 'next/link'; +import Image from 'next/image'; const UsersInEvent = () => { const router = useRouter(); @@ -32,10 +34,28 @@ const UsersInEvent = () => { if (error) return
Failed to load event table
; if (isLoading) return
Loading...
; return ( - - Volunteers in {eventName} - - + <> + {/* Arrow */} + window.history.back()} + style={{ + margin: '0 0 0 50px', + }}> + + + + + Volunteers in {eventName} + + + ); }; diff --git a/public/event/arrow-left.svg b/public/event/arrow-left.svg new file mode 100644 index 0000000..8fd0be5 --- /dev/null +++ b/public/event/arrow-left.svg @@ -0,0 +1,4 @@ + + + + diff --git a/styles/components/Event/event.styles.tsx b/styles/components/Event/event.styles.tsx index 58f7ef4..fe72464 100644 --- a/styles/components/Event/event.styles.tsx +++ b/styles/components/Event/event.styles.tsx @@ -54,7 +54,7 @@ export const BottomBox = styled.div` export const ButtonContainer = styled.div` display: flex; flex-direction: row; - margin-left: 10px; + margin-left: 50px; `; /** diff --git a/utils/application-utils.ts b/utils/application-utils.ts new file mode 100644 index 0000000..09b51e6 --- /dev/null +++ b/utils/application-utils.ts @@ -0,0 +1,70 @@ +import { ApplicationQuestionData } from 'bookem-shared/src/types/database'; + +/** + * Convert survey questions to application questions + * @param surveyQuestions - survey questions that fit surveyJS model + * @returns application questions that fit our database model + */ +export const convertSurveyToApplicationQuestions = ( + surveyQuestions: any +): ApplicationQuestionData[] => { + let applicationQuestions: ApplicationQuestionData[] = []; + surveyQuestions.pages.forEach(page => { + page.elements.forEach(element => { + const question = { + type: element.type, + title: element.title ?? element.name, + choices: [] as string[], + isRequired: element.isRequired ?? false, + }; + + if (element.choices) { + question.choices = element.choices.map(choice => choice.text ?? choice); + + if (element.showNoneItem) question.choices.push('None'); + if (element.showOtherItem) question.choices.push('Other'); + if (element.showSelectAllItem) question.choices.push('Select All'); + } + + applicationQuestions.push(question); + }); + }); + return applicationQuestions; +}; + +/** + * Convert application questions to survey questions + * @param applicationQuestion - application questions that fit our database model + * @returns survey questions that fit surveyJS model + */ +export const convertApplicationToSurveyQuestions = ( + applicationQuestion: ApplicationQuestionData[] +) => { + return { + pages: [ + { + name: 'Page 1', + elements: applicationQuestion.map(question => { + return { + name: question.title, + title: question.title, + type: question.type, + choices: question.choices + ?.filter(choice => { + return !['None', 'Other', 'Select All'].includes( + choice as string + ); + }) + .map(choice => { + return { text: choice }; + }), + isRequired: question.isRequired, + showNoneItem: question.choices?.includes('None'), + showOtherItem: question.choices?.includes('Other'), + showSelectAllItem: question.choices?.includes('Select All'), + }; + }), + }, + ], + }; +};