From f92810d320e8b703d7de4279d4c6b914a385286b Mon Sep 17 00:00:00 2001 From: SD Date: Sat, 17 Aug 2024 03:51:27 +0400 Subject: [PATCH 1/2] feat: add expert profile --- .../expert-profile/add-offer/page.tsx | 4 +- .../account/(account)/expert-profile/page.tsx | 20 +- src/app/[locale]/experts/[expertId]/page.tsx | 6 +- src/components/Account/ProfileSettings.tsx | 38 +-- .../ExpertProfile/ExpertProfile.tsx | 156 ++++++++--- .../ExpertProfile/content/ExpertAbout.tsx | 81 ++++++ .../ExpertProfile/content/ExpertEducation.tsx | 157 ++++++++--- .../ExpertProfile/content/ExpertPayData.tsx | 49 +++- .../ExpertProfile/content/ExpertSchedule.tsx | 30 ++- .../ExpertProfile/content/ExpertTags.tsx | 2 +- src/components/Experts/ExpertDetails.tsx | 25 +- src/components/Experts/Filter.tsx | 9 +- .../Modals/EditExpertAboutModal.tsx | 254 ++++++++++++++++++ .../Modals/EditExpertEducationModal.tsx | 152 +++++++++++ .../Modals/EditExpertPayDataModal.tsx | 118 ++++++++ src/components/Modals/EditExpertTagsModal.tsx | 2 +- .../educationModalContent/Certificates.tsx | 205 ++++++++++++++ .../educationModalContent/Educations.tsx | 166 ++++++++++++ .../educationModalContent/Experiences.tsx | 101 +++++++ .../Modals/educationModalContent/Mbas.tsx | 166 ++++++++++++ .../educationModalContent/Trainings.tsx | 166 ++++++++++++ src/components/view/FilledButton.tsx | 6 + src/components/view/LinkButton.tsx | 2 +- src/i18nKeys/de.ts | 34 ++- src/i18nKeys/en.ts | 33 +++ src/i18nKeys/es.ts | 34 ++- src/i18nKeys/fr.ts | 34 ++- src/i18nKeys/it.ts | 34 ++- src/i18nKeys/ru.ts | 36 ++- src/styles/_edu.scss | 35 +++ src/styles/_modal.scss | 13 +- src/styles/_pages.scss | 72 ++++- src/styles/_schedule.scss | 15 ++ src/styles/style.scss | 2 + src/styles/view/_buttons.scss | 17 ++ src/styles/view/_collapse.scss | 15 ++ src/styles/view/_input.scss | 8 + src/styles/view/_practice.scss | 29 ++ src/styles/view/style.scss | 2 + src/types/education.ts | 17 +- src/types/practice.ts | 16 +- src/types/profile.ts | 3 +- src/utils/account.ts | 16 ++ src/utils/time.ts | 62 +++++ 44 files changed, 2281 insertions(+), 161 deletions(-) create mode 100644 src/components/ExpertProfile/content/ExpertAbout.tsx create mode 100644 src/components/Modals/EditExpertAboutModal.tsx create mode 100644 src/components/Modals/EditExpertEducationModal.tsx create mode 100644 src/components/Modals/EditExpertPayDataModal.tsx create mode 100644 src/components/Modals/educationModalContent/Certificates.tsx create mode 100644 src/components/Modals/educationModalContent/Educations.tsx create mode 100644 src/components/Modals/educationModalContent/Experiences.tsx create mode 100644 src/components/Modals/educationModalContent/Mbas.tsx create mode 100644 src/components/Modals/educationModalContent/Trainings.tsx create mode 100644 src/styles/_edu.scss create mode 100644 src/styles/_schedule.scss create mode 100644 src/styles/view/_collapse.scss create mode 100644 src/styles/view/_practice.scss create mode 100644 src/utils/time.ts diff --git a/src/app/[locale]/account/(account)/expert-profile/add-offer/page.tsx b/src/app/[locale]/account/(account)/expert-profile/add-offer/page.tsx index e669b63..7ed015c 100644 --- a/src/app/[locale]/account/(account)/expert-profile/add-offer/page.tsx +++ b/src/app/[locale]/account/(account)/expert-profile/add-offer/page.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Link } from '../../../../../../../navigation'; -import { CustomSelect } from '../../../../../../../components/view/CustomSelect'; +import { Link } from '../../../../../../navigation'; +import { CustomSelect } from '../../../../../../components/view/CustomSelect'; export default function AddOffer() { return ( diff --git a/src/app/[locale]/account/(account)/expert-profile/page.tsx b/src/app/[locale]/account/(account)/expert-profile/page.tsx index c9cd00d..3eaea64 100644 --- a/src/app/[locale]/account/(account)/expert-profile/page.tsx +++ b/src/app/[locale]/account/(account)/expert-profile/page.tsx @@ -6,7 +6,15 @@ import { message } from 'antd'; import { ExpertData } from '../../../../../types/profile'; import { AUTH_TOKEN_KEY } from '../../../../../constants/common'; import { useLocalStorage } from '../../../../../hooks/useLocalStorage'; -import { getEducation, getPersonalData, getTags, getPractice, getSchedule, getPayData } from '../../../../../actions/profile'; +import { + getEducation, + getPersonalData, + getTags, + getPractice, + getSchedule, + getPayData, + getUserData +} from '../../../../../actions/profile'; import { ExpertProfile } from '../../../../../components/ExpertProfile'; import { Loader } from '../../../../../components/view/Loader'; @@ -15,11 +23,13 @@ export default function ExpertProfilePage({ params: { locale } }: { params: { lo const [jwt] = useLocalStorage(AUTH_TOKEN_KEY, ''); const [loading, setLoading] = useState(false); const [data, setData] = useState(); + const [isFull, setIsFull] = useState(false); useEffect(() => { if (jwt) { setLoading(true); Promise.all([ + getUserData(locale, jwt), getPersonalData(locale, jwt), getEducation(locale, jwt), getTags(locale, jwt), @@ -27,13 +37,12 @@ export default function ExpertProfilePage({ params: { locale } }: { params: { lo getSchedule(locale, jwt), getPayData(locale, jwt) ]) - .then(([person, education, tags, practice, schedule, payData]) => { + .then(([profile, person, education, tags, practice, schedule, payData]) => { + console.log('profile', profile); console.log('person', person); console.log('education', education); - console.log('tags', tags); - console.log('practice', practice); console.log('schedule', schedule); - console.log('payData', payData); + setIsFull(profile.fillProgress === 'full'); setData({ person, education, @@ -56,6 +65,7 @@ export default function ExpertProfilePage({ params: { locale } }: { params: { lo {data && ( + {/*

All Offers by this Expert

diff --git a/src/components/Account/ProfileSettings.tsx b/src/components/Account/ProfileSettings.tsx index 674ae2c..21da0a7 100644 --- a/src/components/Account/ProfileSettings.tsx +++ b/src/components/Account/ProfileSettings.tsx @@ -12,7 +12,7 @@ import { validateImage } from '../../utils/account'; import { useProfileSettings } from '../../actions/hooks/useProfileSettings'; import { CustomInput } from '../view/CustomInput'; import { OutlinedButton } from '../view/OutlinedButton'; -import { FilledYellowButton } from '../view/FilledButton'; +import {FilledButton, FilledSquareButton, FilledYellowButton} from '../view/FilledButton'; import { DeleteAccountModal } from '../Modals/DeleteAccountModal'; import { Loader } from '../view/Loader'; @@ -55,14 +55,14 @@ export const ProfileSettings: FC = ({ locale }) => { languagesLinks: languagesLinks?.map(({ languageId }) => ({ languageId })) || [] }; - // if (photo) { - // console.log(photo); - // const formData = new FormData(); - // formData.append('file', photo as FileType); - // - // newProfile.faceImage = photo; - // newProfile.isFaceImageKeepExisting = false; - // } + if (photo) { + console.log(photo); + const formData = new FormData(); + formData.append('file', photo as FileType); + + newProfile.faceImage = `[${(photo as File).arrayBuffer()}]`; + newProfile.isFaceImageKeepExisting = false; + } console.log(newProfile); @@ -99,13 +99,6 @@ export const ProfileSettings: FC = ({ locale }) => { return (
-
-
- -
-
{i18nText('photoDesc', locale)}
-
= ({ locale }) => { multiple={false} showUploadList={false} > - {photo && } - +
+
+ } + /> +
+
{i18nText('photoDesc', locale)}
+
diff --git a/src/components/ExpertProfile/ExpertProfile.tsx b/src/components/ExpertProfile/ExpertProfile.tsx index 669bf77..fa7e13a 100644 --- a/src/components/ExpertProfile/ExpertProfile.tsx +++ b/src/components/ExpertProfile/ExpertProfile.tsx @@ -1,43 +1,96 @@ 'use client' -import { useState } from 'react'; -import { message } from 'antd'; -import { EditOutlined } from '@ant-design/icons'; +import React, { useState } from 'react'; +import {Alert, message} from 'antd'; +import Image from 'next/image'; import { i18nText } from '../../i18nKeys'; -import { ExpertData } from '../../types/profile'; +import { ExpertData, PayInfo, ProfileData } from '../../types/profile'; +import { ExpertsTags } from '../../types/tags'; +import { PracticeDTO } from '../../types/practice'; +import { EducationDTO } from '../../types/education'; +import { ScheduleDTO } from '../../types/schedule'; import { AUTH_TOKEN_KEY } from '../../constants/common'; import { useLocalStorage } from '../../hooks/useLocalStorage'; -import { getTags } from '../../actions/profile'; +import { getTags, getPayData, getEducation, getPractice, getSchedule, getPersonalData } from '../../actions/profile'; import { Loader } from '../view/Loader'; -import { LinkButton } from '../view/LinkButton'; import { ExpertTags } from './content/ExpertTags'; import { ExpertSchedule } from './content/ExpertSchedule'; import { ExpertPayData } from './content/ExpertPayData'; import { ExpertEducation } from './content/ExpertEducation'; +import { ExpertAbout } from './content/ExpertAbout'; type ExpertProfileProps = { locale: string; data: ExpertData; updateData: (data: ExpertData) => void; + isFull: boolean; }; -export const ExpertProfile = ({ locale, data, updateData }: ExpertProfileProps) => { +type NewDataPartProps = { + key: keyof ExpertData, + getNewData: (locale: string, token: string) => Promise, + errorMessage?: string; +}; + +export const ExpertProfile = ({ locale, data, updateData, isFull }: ExpertProfileProps) => { const [jwt] = useLocalStorage(AUTH_TOKEN_KEY, ''); const [loading, setLoading] = useState<(keyof ExpertData)[]>([]); + function getNewPartData ({ key, getNewData, errorMessage = 'Не удалось получить данные' }: NewDataPartProps) { + setLoading([key]); + getNewData(locale, jwt) + .then((newData) => { + updateData({ + ...data, + [key]: newData + }); + }) + .catch(() => message.error(errorMessage)) + .finally(() => setLoading([])); + } + const updateExpert = (key: keyof ExpertData) => { switch (key) { case 'tags': - setLoading([key]); - getTags(locale, jwt) - .then((tags) => { - updateData({ - ...data, - tags - }); - }) - .catch(() => message.error('Не удалось обновить направления')) - .finally(() => setLoading([])); + getNewPartData({ + key, + getNewData: getTags, + errorMessage: 'Не удалось получить направления' + }); + break; + case 'practice': + getNewPartData({ + key, + getNewData: getPractice + }); + break; + case 'education': + getNewPartData({ + key, + getNewData: getEducation, + errorMessage: 'Не удалось получить информацию об образовании' + }); + break; + case 'schedule': + getNewPartData({ + key, + getNewData: getSchedule, + errorMessage: 'Не удалось получить расписание' + }); + break; + case 'person': + getNewPartData({ + key, + getNewData: getPersonalData, + errorMessage: 'Не удалось получить информацию о пользователе' + }); + break; + case 'payData': + getNewPartData<{ person6Data?: PayInfo }>({ + key, + getNewData: getPayData, + errorMessage: 'Не удалось получить платежную информацию' + }); break; default: break; @@ -52,36 +105,39 @@ export const ExpertProfile = ({ locale, data, updateData }: ExpertProfileProps)
- +
-
+
- David + {`${data?.person?.username} ${data?.person?.surname || ''}`}
-
-
-
-
-
-

{i18nText('aboutCoach', locale)}

-

person1 + person4

- } + {!isFull && ( + +
  • о себе
  • +
  • темы сессии
  • +
  • рабочее расписание
  • +
  • информация об образовании
  • +
  • платежная информация
  • + + )} + type="warning" + showIcon /> -
    -
    - {`12 ${i18nText('practiceHours', locale)}`} -
    -
    - {`15 ${i18nText('supervisionCount', locale)}`} -
    -
    - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam aliquet, lectus nec viverra - malesuada, ligula sem tempor risus, non posuere urna diam a libero. -
    + )}
    + + + + - - + + + + + +
    - ) + ); }; diff --git a/src/components/ExpertProfile/content/ExpertAbout.tsx b/src/components/ExpertProfile/content/ExpertAbout.tsx new file mode 100644 index 0000000..0d1cdf5 --- /dev/null +++ b/src/components/ExpertProfile/content/ExpertAbout.tsx @@ -0,0 +1,81 @@ +'use client' + +import {useState} from "react"; +import {Tag} from "antd"; +import {EditOutlined} from "@ant-design/icons"; +import {LinkButton} from "../../view/LinkButton"; +import {ExpertData, ProfileData} from "../../../types/profile"; +import {i18nText} from "../../../i18nKeys/index"; +import {PracticeDTO} from "../../../types/practice"; +import {ExpertPractice} from "../../Experts/ExpertDetails"; +import {EditExpertAboutModal} from "../../Modals/EditExpertAboutModal"; + +type ExpertAboutProps = { + locale: string; + practice?: PracticeDTO; + person?: ProfileData; + updateExpert: (key: keyof ExpertData) => void; +}; + +export const ExpertAbout = ({ locale, updateExpert, practice, person }: ExpertAboutProps) => { + const [showEdit, setShowEdit] = useState(false); + + const supervisionCount = practice?.person4Data?.supervisionPerYears && practice?.person4Data?.supervisionPerYearId + ? practice.person4Data.supervisionPerYears.filter(({ id }) => id === practice.person4Data.supervisionPerYearId) + : []; + + return ( +
    +
    +
    +

    {i18nText('aboutCoach', locale)}

    + } + onClick={() => setShowEdit(true)} + /> +
    +
    +
    + {`${practice?.person4Data?.practiceHours || 0} ${i18nText('practiceHours', locale)} | ${supervisionCount.length > 0 ? supervisionCount[0].name : 0} ${i18nText('supervisionCount', locale)}`} +
    +
    + {practice?.person4Data?.sessionCost && ( +
    +
    {i18nText('price', locale)}
    +
    {`${practice?.person4Data?.sessionCost} €`}
    +
    + )} + {practice?.person4Data?.sessionDuration && ( +
    +
    {i18nText('duration', locale)}
    +
    {`${practice?.person4Data?.sessionDuration} ${locale === 'ru' ? 'мин' : 'min'}`}
    +
    + )} +
    +
    +
    {i18nText('sessionLang', locale)}
    +
    + {person?.languagesLinks && person.languagesLinks?.length > 0 && person.languagesLinks + .map(({ language: { code, nativeSpelling } }) => {nativeSpelling})} +
    +
    + +
    +
    + setShowEdit(false)} + refreshPractice={() => updateExpert('practice')} + refreshPerson={() => updateExpert('person')} + /> +
    + ); +}; diff --git a/src/components/ExpertProfile/content/ExpertEducation.tsx b/src/components/ExpertProfile/content/ExpertEducation.tsx index 8ddc1e6..210d2c8 100644 --- a/src/components/ExpertProfile/content/ExpertEducation.tsx +++ b/src/components/ExpertProfile/content/ExpertEducation.tsx @@ -1,65 +1,154 @@ +'use client' + import { EditOutlined } from '@ant-design/icons'; import { EducationDTO } from '../../../types/education'; import { i18nText } from '../../../i18nKeys'; import { LinkButton } from '../../view/LinkButton'; +import {ExpertCertificate} from "../../Experts/ExpertDetails"; +import {useState} from "react"; +import {ExpertData} from "../../../types/profile"; +import {EditExpertEducationModal} from "../../Modals/EditExpertEducationModal"; type ExpertEducationProps = { locale: string; data?: EducationDTO; + updateExpert: (key: keyof ExpertData) => void; }; -export const ExpertEducation = ({ locale, data }: ExpertEducationProps) => { +export const ExpertEducation = ({ locale, data, updateExpert }: ExpertEducationProps) => { + const [showEdit, setShowEdit] = useState(false); + + const getAssociationLevel = (accLevelId?: number) => { + if (accLevelId) { + const [cur] = (data?.associationLevels || []).filter(({ id }) => id === accLevelId) || []; + + return cur?.name || ''; + } + + return ''; + }; + + const getAssociation = (accLevelId?: number) => { + if (accLevelId) { + const [curLevel] = (data?.associationLevels || []).filter(({ id }) => id === accLevelId) || []; + if (curLevel) { + const [cur] = (data?.associations || []).filter(({ id }) => id === curLevel.associationId) || []; + return cur?.name || ''; + } + } + + return ''; + }; + return (
    -

    {i18nText('education', locale)}

    -

    person2

    +

    {i18nText('skillsInfo', locale)}

    } + onClick={() => setShowEdit(true)} />
    -
    -

    Psychologist

    -
    - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam aliquet, lectus nec viverra - malesuada, ligula sem tempor risus, non posuere urna diam a libero. + {data?.person2Data?.educations?.length > 0 && ( +
    + {data?.person2Data?.educations?.map(({ id, title, description, document }) => ( +
    +

    {title}

    + {description &&
    {description}
    } + {document && ( +
    + +
    + )} +
    + ))}
    -
    - + )} +
    + {data?.person2Data?.certificates?.length > 0 && ( +
    +

    {i18nText('profCertification', locale)}

    +
    + {data?.person2Data?.certificates?.map((cert) => ( +
    +
    + {`${getAssociationLevel(cert?.associationLevelId)} ${getAssociation(cert?.associationLevelId)}`} +
    + {cert.document && ( +
    + +
    + )} +
    + ))}
    -
    -
    -

    {i18nText('profCertification', locale)}

    -
    -
    - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam aliquet, lectus nec viverra - malesuada, ligula sem tempor risus, non posuere urna diam a libero. + )} + {data?.person2Data?.trainings?.length > 0 && ( +
    +

    + {`${i18nText('trainings', locale)} | ${i18nText('seminars', locale)} | ${i18nText('courses', locale)}`} +

    +
    + {data?.person2Data?.trainings?.map(({ id, title, description, document }) => ( +
    +

    {title}

    + {description &&
    {description}
    } + {document && ( +
    + +
    + )} +
    + ))}
    -
    -
    -

    - {`${i18nText('trainings', locale)} | ${i18nText('seminars', locale)} | ${i18nText('courses', locale)}`} -

    -
    -
    - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam aliquet, lectus nec viverra - malesuada, ligula sem tempor risus, non posuere urna diam a libero. + )} + {data?.person2Data?.mbas?.length > 0 && ( +
    +

    {i18nText('mba', locale)}

    +
    + {data?.person2Data?.mbas?.map(({ id, title, description, document }) => ( +
    +

    {title}

    + {description &&
    {description}
    } + {document && ( +
    + +
    + )} +
    + ))}
    -
    -
    -

    {i18nText('mba', locale)}

    -
    -
    - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam aliquet, lectus nec viverra - malesuada, ligula sem tempor risus, non posuere urna diam a libero. + )} + {data?.person2Data?.experiences?.length > 0 && ( +
    +

    {i18nText('mExperiences', locale)}

    +
    + {data?.person2Data?.experiences?.map(({ id, title, description, document }) => ( +
    +

    {title}

    + {description &&
    {description}
    } + {document && ( +
    + +
    + )} +
    + ))}
    -
    + )} + setShowEdit(false)} + locale={locale} + data={data} + refresh={() => updateExpert('education')} + />
    ); }; diff --git a/src/components/ExpertProfile/content/ExpertPayData.tsx b/src/components/ExpertProfile/content/ExpertPayData.tsx index 648aed2..6eeaf27 100644 --- a/src/components/ExpertProfile/content/ExpertPayData.tsx +++ b/src/components/ExpertProfile/content/ExpertPayData.tsx @@ -1,28 +1,65 @@ +'use client' + +import { useState } from 'react'; import { EditOutlined } from '@ant-design/icons'; import { i18nText } from '../../../i18nKeys'; -import { PayInfo } from '../../../types/profile'; +import { ExpertData, PayInfo } from '../../../types/profile'; import { LinkButton } from '../../view/LinkButton'; +import { EditExpertPayDataModal } from '../../Modals/EditExpertPayDataModal'; type ExpertPayDataProps = { locale: string; - data?: PayInfo + data?: PayInfo; + updateExpert: (key: keyof ExpertData) => void; }; -export const ExpertPayData = ({ locale, data }: ExpertPayDataProps) => { +export const ExpertPayData = ({ locale, data, updateExpert }: ExpertPayDataProps) => { + const [showEdit, setShowEdit] = useState(false); + + const hide = (str?: string) => { + const reg = new RegExp('(.)(?=.*....)', 'gi'); + return str ? str.replace(reg, '*') : ''; + } + return (
    -

    Card data - person6

    +

    {i18nText('payInfo', locale)}

    } + onClick={() => setShowEdit(true)} />
    -
    - Card +
    + {data?.beneficiaryName && ( +
    +
    {i18nText('beneficiaryName', locale)}
    +
    {data.beneficiaryName}
    +
    + )} + {data?.bicOrSwift && ( +
    +
    {i18nText('bicOrSwift', locale)}
    +
    {hide(data.bicOrSwift)}
    +
    + )} + {data?.iban && ( +
    +
    IBAN
    +
    {hide(data.iban)}
    +
    + )}
    + setShowEdit(false)} + refresh={() => updateExpert('payData')} + />
    ); }; diff --git a/src/components/ExpertProfile/content/ExpertSchedule.tsx b/src/components/ExpertProfile/content/ExpertSchedule.tsx index 907aa22..33d5285 100644 --- a/src/components/ExpertProfile/content/ExpertSchedule.tsx +++ b/src/components/ExpertProfile/content/ExpertSchedule.tsx @@ -1,7 +1,11 @@ import { EditOutlined } from '@ant-design/icons'; +import dayjs from 'dayjs'; import { ScheduleDTO } from '../../../types/schedule'; import { i18nText } from '../../../i18nKeys'; import { LinkButton } from '../../view/LinkButton'; +import {useState} from "react"; +import {Tag} from "antd"; +import {getCurrentTime} from "../../../utils/time"; type ExpertScheduleProps = { locale: string; @@ -9,18 +13,34 @@ type ExpertScheduleProps = { }; export const ExpertSchedule = ({ locale, data }: ExpertScheduleProps) => { + const [showEdit, setShowEdit] = useState(false); + // person51 + return (
    -

    Schedule - person51

    - {i18nText('schedule', locale)} + {/*} - /> + onClick={() => setShowEdit(true)} + />*/}
    -
    - Schedule +
    + {data && data?.workingTimes?.map((date, index) => { + const { startDay, startTime, endDay, endTime } = getCurrentTime(date); + + return ( +
    + {i18nText(startDay, locale)} +
    {startTime}
    + - + {startDay !== endDay && {i18nText(endDay, locale)}} +
    {endTime}
    +
    + ) + })}
    diff --git a/src/components/ExpertProfile/content/ExpertTags.tsx b/src/components/ExpertProfile/content/ExpertTags.tsx index 7441bed..1e9d27a 100644 --- a/src/components/ExpertProfile/content/ExpertTags.tsx +++ b/src/components/ExpertProfile/content/ExpertTags.tsx @@ -22,7 +22,7 @@ export const ExpertTags = ({ locale, data, updateExpert }: ExpertTagsProps) => {
    -

    {i18nText('direction', locale)}

    +

    {i18nText('topics', locale)}

    } diff --git a/src/components/Experts/ExpertDetails.tsx b/src/components/Experts/ExpertDetails.tsx index e2c942c..fec8476 100644 --- a/src/components/Experts/ExpertDetails.tsx +++ b/src/components/Experts/ExpertDetails.tsx @@ -4,7 +4,8 @@ import React, { FC } from 'react'; import Image from 'next/image'; import { Tag, Image as AntdImage, Space } from 'antd'; import { ZoomInOutlined, ZoomOutOutlined, StarFilled } from '@ant-design/icons'; -import { ExpertDetails, ExpertDocument } from '../../types/experts'; +import { ExpertDetails, Practice, ThemeGroup } from '../../types/experts'; +import { ExpertDocument } from '../../types/file'; import { Locale } from '../../types/locale'; import { CustomRate } from '../view/CustomRate'; import { i18nText } from '../../i18nKeys'; @@ -15,6 +16,12 @@ type ExpertDetailsProps = { locale?: string; }; +type ExpertPracticeProps = { + cases?: Practice[]; + themes?: ThemeGroup[]; + locale?: string; +}; + export const ExpertCard: FC = ({ expert, locale }) => { const { publicCoachDetails } = expert || {}; @@ -62,10 +69,10 @@ export const ExpertInformation: FC = ({ expert, locale }) =>
    {/*

    {}

    */}
    - {coachLanguages?.map((skill) => {skill})} + {coachLanguages?.map((lang) => {lang})}
    -

    + {/*

    Hello, my name is Marcelo. I am a Senior UX Designer with more than 6 years of experience working with the largest companies in the world such as Disney, Globant and currently IBM. During my career, I have helped organizations solve complex problems using aesthetically pleasing @@ -79,7 +86,7 @@ export const ExpertInformation: FC = ({ expert, locale }) => Strategic thinking

    Oh, and I also speak Spanish! -

    +

    */}
    {tags?.map((skill) => {skill?.name})}
    @@ -93,14 +100,12 @@ export const ExpertInformation: FC = ({ expert, locale }) => ); }; -export const ExpertPractice: FC = ({ expert, locale }) => { - const { publicCoachDetails: { practiceCases = [], themesGroups = [] } } = expert || {}; - - return practiceCases?.length > 0 ? ( +export const ExpertPractice: FC = ({ themes = [], cases = [], locale }) => { + return cases?.length > 0 ? (

    {i18nText('successfulCase', locale)}

    - {practiceCases?.map(({ id, description, themesGroupIds }) => { - const filtered = themesGroups?.filter(({ id }) => themesGroupIds?.includes(+id)); + {cases?.map(({ id, description, themesGroupIds }) => { + const filtered = themes ? themes.filter(({ id }) => themesGroupIds?.includes(+id)) : []; return (
    diff --git a/src/components/Experts/Filter.tsx b/src/components/Experts/Filter.tsx index 7a548ae..debb1d1 100644 --- a/src/components/Experts/Filter.tsx +++ b/src/components/Experts/Filter.tsx @@ -162,18 +162,15 @@ export const ExpertsFilter = ({ ), [filter, searchParams, searchData]); const getLangList = () => { - const reg = searchLang ? new RegExp(searchLang, 'ig') : ''; - const langList = reg ? (languages || []).filter(({ code, nativeSpelling }) => reg.test(code) || reg.test(nativeSpelling)) : languages; + const langList = searchLang ? (languages || []).filter(({ code, nativeSpelling }) => code.indexOf(searchLang) !== -1 || nativeSpelling.indexOf(searchLang) !== -1) : languages; return langList?.length ? getList('userLanguages', langList.map(({ code, nativeSpelling }) => ({ id: code, name: nativeSpelling }))) : null; }; const getTagsList = () => { - const reg = searchTags ? new RegExp(searchTags, 'ig') : ''; - - if (reg) { - const tagsList = filteredTags.filter(({ name, group }) => reg.test(name) || reg.test(group)); + if (searchTags) { + const tagsList = filteredTags.filter(({ name, group }) => name.indexOf(searchTags) !== -1 || group.indexOf(searchTags) !== -1); return getList('themesTagIds', tagsList); } diff --git a/src/components/Modals/EditExpertAboutModal.tsx b/src/components/Modals/EditExpertAboutModal.tsx new file mode 100644 index 0000000..a17c8a0 --- /dev/null +++ b/src/components/Modals/EditExpertAboutModal.tsx @@ -0,0 +1,254 @@ +'use client'; + +import React, { FC, useEffect, useState } from 'react'; +import { Modal, Button, message, Form, Input } from 'antd'; +import { CloseOutlined, DeleteOutlined, PlusOutlined } from '@ant-design/icons'; +import { i18nText } from '../../i18nKeys'; +import { ProfileData, ProfileRequest } from '../../types/profile'; +import { PracticePersonData, PracticeDTO, PracticeData, PracticeCase } from '../../types/practice'; +import { AUTH_TOKEN_KEY } from '../../constants/common'; +import { useLocalStorage } from '../../hooks/useLocalStorage'; +import { setPersonData, setPractice } from '../../actions/profile'; +import { CustomInput } from '../view/CustomInput'; +import { CustomMultiSelect } from '../view/CustomMultiSelect'; +import { CustomSelect } from '../view/CustomSelect'; +import { LinkButton } from '../view/LinkButton'; + +type EditExpertAboutModalProps = { + open: boolean; + handleCancel: () => void; + locale: string; + practice?: PracticeDTO; + person?: ProfileData; + refreshPractice: () => void; + refreshPerson: () => void; +}; + +type FormPerson = PracticePersonData & { + sessionLang: number[]; +}; + +export const EditExpertAboutModal: FC = ({ + open, + handleCancel, + locale, + practice, + person, + refreshPerson, + refreshPractice +}) => { + const [jwt] = useLocalStorage(AUTH_TOKEN_KEY, ''); + const [loading, setLoading] = useState(false); + const [form] = Form.useForm(); + const [practiceCases, setPracticeCases] = useState([]); + + useEffect(() => { + if (open) { + if (practice?.person4Data) { + form.setFieldsValue(practice.person4Data); + + setPracticeCases(practice.person4Data?.practiceCases || []); + } + if (person?.languagesLinks) { + form.setFieldValue('sessionLang', person.languagesLinks.map(({ languageId }) => languageId)) + } + } + }, [open, practice?.person4Data]); + + const addPracticeCase = () => { + setPracticeCases([ + ...practiceCases, + { + description: '', + themesGroupIds: [] + } + ]); + }; + + const deletePracticeCase = (index: number) => { + setPracticeCases([...practiceCases].filter((cases, i) => i !== index)); + }; + + const onChangePracticeDescription = (value: string, index: number) => { + setPracticeCases(practiceCases.map((cases, i) => { + if (i === index) { + return { + ...cases, + description: value + } + } + + return cases; + })); + }; + + const onChangePracticeThemes = (value: number[], index: number) => { + setPracticeCases(practiceCases.map((cases, i) => { + if (i === index) { + return { + ...cases, + themesGroupIds: value + } + } + + return cases; + })); + }; + + const onSave = () => { + form.validateFields().then((values) => { + const newPersonData: ProfileRequest = { + login: person?.login, + isPasswordKeepExisting: true, + username: person?.username, + surname: person?.surname, + isFaceImageKeepExisting: true, + phone: person?.phone, + languagesLinks: values?.sessionLang?.map((id) => ({ languageId: +id })) || [] + }; + + const newPracticeData: PracticeData = { + practiceHours: values?.practiceHours, + supervisionPerYearId: values?.supervisionPerYearId, + sessionDuration: values?.sessionDuration ? (isNaN(Number(values.sessionDuration)) ? 0 : Number(values.sessionDuration)) : 0, + sessionCost: values?.sessionCost ? (isNaN(Number(values.sessionCost)) ? 0 : Number(values.sessionCost)) : 0, + practiceCases: practiceCases ? practiceCases : practice?.person4Data?.practiceCases + } + + setLoading(true); + Promise.all([ + setPractice(locale, jwt, newPracticeData), + setPersonData(newPersonData, locale, jwt) + ]) + .then(() => { + handleCancel(); + refreshPractice(); + refreshPerson(); + }) + .catch(() => { + message.error('Не удалось сохранить данные'); + }) + .finally(() => { + setLoading(false); + }) + }) + }; + + return ( + } + > +
    +
    {i18nText('aboutCoach', locale)}
    +
    + + + ({ value: id, label: nativeSpelling })) || []} + /> + + + + + + ({ value: cost, label: cost })) || []} + /> + + + + + + ({ value: id, label: name })) || []} + /> + + +
    +
    +
    +
    {i18nText('successfulCase', locale)}
    + } + onClick={addPracticeCase} + /> +
    + {practiceCases.map(({ description, themesGroupIds }, index) => ( +
    +
    +
    + ({ value: id, label: name })) || []} + onChange={(val) => onChangePracticeThemes(val, index)} + /> +
    +
    + onChangePracticeDescription(e.target.value, index)} + /> +
    +
    + } + onClick={() => deletePracticeCase(index)} + /> +
    + ))} +
    +
    + +
    +
    +
    + ); +}; diff --git a/src/components/Modals/EditExpertEducationModal.tsx b/src/components/Modals/EditExpertEducationModal.tsx new file mode 100644 index 0000000..e2720e5 --- /dev/null +++ b/src/components/Modals/EditExpertEducationModal.tsx @@ -0,0 +1,152 @@ +'use client'; + +import React, { FC, useEffect, useState } from 'react'; +import {Modal, Button, message, Form, Collapse, GetProp, UploadProps} from 'antd'; +import type { CollapseProps } from 'antd'; +import { CloseOutlined } from '@ant-design/icons'; +import { i18nText } from '../../i18nKeys'; +import { PracticePersonData, PracticeDTO, PracticeData, PracticeCase } from '../../types/practice'; +import { AUTH_TOKEN_KEY } from '../../constants/common'; +import { useLocalStorage } from '../../hooks/useLocalStorage'; +import {setEducation} from '../../actions/profile'; +import {Certificate, Details, EducationData, EducationDTO, Experience} from "../../types/education"; +import {CertificatesContent} from "./educationModalContent/Certificates"; +import {EducationsContent} from "./educationModalContent/Educations"; +import {TrainingsContent} from "./educationModalContent/Trainings"; +import {MbasContent} from "./educationModalContent/Mbas"; +import {ExperiencesContent} from "./educationModalContent/Experiences"; + +type EditExpertEducationModalProps = { + open: boolean; + handleCancel: () => void; + locale: string; + data?: EducationDTO; + refresh: () => void; +}; + +type FormPerson = PracticePersonData & { + sessionLang: number[]; +}; + +export const EditExpertEducationModal: FC = ({ + open, + handleCancel, + locale, + data, + refresh +}) => { + const [jwt] = useLocalStorage(AUTH_TOKEN_KEY, ''); + const [loading, setLoading] = useState(false); + const [form] = Form.useForm(); + const [editedData, setEditedData] = useState(data?.person2Data as EducationData); + + const onSave = () => { + setLoading(true); + setEducation(locale, jwt, editedData) + .then(() => { + handleCancel(); + refresh(); + }) + .catch(() => { + message.error('Не удалось сохранить образование'); + }) + .finally(() => { + setLoading(false); + }) + }; + + const items: CollapseProps['items'] = [ + { + key: 'certificates', + label: i18nText('profCertification', locale), + children: ( + setEditedData({ ...editedData, certificates })} + locale={locale} + associationLevels={data?.associationLevels} + associations={data?.associations} + /> + ), + }, + { + key: 'educations', + label: i18nText('education', locale), + children: ( + setEditedData({ ...editedData, educations })} + locale={locale} + /> + ), + }, + { + key: 'trainings', + label: `${i18nText('trainings', locale)} | ${i18nText('seminars', locale)} | ${i18nText('courses', locale)}`, + children: ( + setEditedData({ ...editedData, trainings })} + locale={locale} + /> + ), + }, + { + key: 'mbas', + label: i18nText('mba', locale), + children: ( + setEditedData({ ...editedData, mbas })} + locale={locale} + /> + ), + }, + { + key: 'experiences', + label: i18nText('mExperiences', locale), + children: ( + setEditedData({ ...editedData, experiences })} + locale={locale} + /> + ), + }, + ]; + + return ( + } + > +
    +
    {i18nText('skillsInfo', locale)}
    +
    +
    + + +
    +
    + +
    +
    +
    + ); +}; diff --git a/src/components/Modals/EditExpertPayDataModal.tsx b/src/components/Modals/EditExpertPayDataModal.tsx new file mode 100644 index 0000000..be226e7 --- /dev/null +++ b/src/components/Modals/EditExpertPayDataModal.tsx @@ -0,0 +1,118 @@ +'use client'; + +import React, { FC, useEffect, useState } from 'react'; +import { Modal, Button, message, Form } from 'antd'; +import { CloseOutlined } from '@ant-design/icons'; +import { i18nText } from '../../i18nKeys'; +import { PayInfo } from '../../types/profile'; +import { AUTH_TOKEN_KEY } from '../../constants/common'; +import { useLocalStorage } from '../../hooks/useLocalStorage'; +import { setPayData } from '../../actions/profile'; +import { CustomInput } from '../view/CustomInput'; + +type EditExpertPayDataModalProps = { + open: boolean; + handleCancel: () => void; + locale: string; + data?: PayInfo; + refresh: () => void; +}; + +export const EditExpertPayDataModal: FC = ({ + open, + handleCancel, + locale, + data, + refresh +}) => { + const [jwt] = useLocalStorage(AUTH_TOKEN_KEY, ''); + const [loading, setLoading] = useState(false); + const [form] = Form.useForm(); + + useEffect(() => { + if (open) { + if (data) { + form.setFieldsValue(data); + } else { + form.resetFields(); + } + } + }, [open, data]); + + const onSavePayData = () => { + form.validateFields().then(({ beneficiaryName, bicOrSwift, iban }) => { + setLoading(true); + setPayData(locale, jwt, { beneficiaryName, bicOrSwift, iban }) + .then(() => { + handleCancel(); + refresh(); + }) + .catch(() => { + message.error('Не удалось сохранить платежную информацию'); + }) + .finally(() => { + setLoading(false); + }) + }) + }; + + return ( + } + > +
    +
    {i18nText('payInfo', locale)}
    +
    +
    + + + + + + + + + +
    +
    +
    + +
    +
    +
    + ); +}; diff --git a/src/components/Modals/EditExpertTagsModal.tsx b/src/components/Modals/EditExpertTagsModal.tsx index 9b1677a..2d56b98 100644 --- a/src/components/Modals/EditExpertTagsModal.tsx +++ b/src/components/Modals/EditExpertTagsModal.tsx @@ -69,7 +69,7 @@ export const EditExpertTagsModal: FC = ({ closeIcon={} >
    -
    {i18nText('direction', locale)}
    +
    {i18nText('selectTopic', locale)}
    {data?.themesGroups && data.themesGroups.filter(({ isActive }) => isActive).map(({ id, name }) => (
    diff --git a/src/components/Modals/educationModalContent/Certificates.tsx b/src/components/Modals/educationModalContent/Certificates.tsx new file mode 100644 index 0000000..b0acdc1 --- /dev/null +++ b/src/components/Modals/educationModalContent/Certificates.tsx @@ -0,0 +1,205 @@ +import { Upload, UploadFile } from 'antd'; +import { DeleteOutlined } from '@ant-design/icons'; +import { Association, AssociationLevel, Certificate } from '../../../types/education'; +import { CustomSelect } from '../../view/CustomSelect'; +import { LinkButton } from '../../view/LinkButton'; +import { OutlinedButton } from '../../view/OutlinedButton'; +import { i18nText } from '../../../i18nKeys'; +import { validateDoc } from '../../../utils/account'; +import { useLocalStorage } from '../../../hooks/useLocalStorage'; +import { AUTH_TOKEN_KEY } from '../../../constants/common'; + +type CertificatesContentProps = { + certificates?: Certificate[]; + update: (cert?: Certificate[]) => void; + associations?: Association[]; + associationLevels?: AssociationLevel[]; + locale: string; +}; + +export const CertificatesContent = ({ + certificates, + update, + associations, + associationLevels, + locale +}: CertificatesContentProps) => { + const [jwt] = useLocalStorage(AUTH_TOKEN_KEY, ''); + + const addCertificate = () => { + const cert = { + associationLevelId: undefined, + document: null + }; + + update(certificates?.length > 0 + ? [ + ...certificates, + cert + ] + : [cert]); + }; + + const deleteCertificate = (index: number) => { + update([...certificates].filter((cert, i) => i !== index)); + }; + + const beforeUpload = (file: UploadFile) => { + const isValid = validateDoc(file); + + if (!isValid) { + return Upload.LIST_IGNORE; + } + + return true; + } + + const onRemoveFile = (index: number) => { + update(certificates?.map((cert, i) => { + if (i === index) { + return { + ...cert, + document: null, + } + } + + return cert; + })); + }; + + const onChangeAssociation = (val: number, index: number) => { + update(certificates?.map((cert, i) => { + if (i === index) { + return { + ...cert, + associationId: val, + associationLevelId: undefined + } + } + + return cert; + })); + }; + + const onChangeLevel = (val: number, index: number) => { + update(certificates?.map((cert, i) => { + if (i === index) { + return { + ...cert, + associationLevelId: val + } + } + + return cert; + })); + }; + + const onChange = (file: any, index: number) => { + if (file?.response) { + update([...certificates].map((cert, i) => { + if (i === index) { + return { + ...cert, + document: file?.response || null, + } + } + + return cert; + })); + } + }; + + return ( +
    +
    + {certificates?.map(({ associationId, associationLevelId, document: file }, index) => { + let cAssociationId = associationId; + + if (!cAssociationId) { + const [cAssLvl] = associationLevels ? associationLevels.filter(({ id }) => id === associationLevelId) : []; + + if (cAssLvl?.associationId) { + cAssociationId = associations ? associations.filter(({ id }) => id === cAssLvl.associationId)[0]?.id : undefined; + } + } + + return ( +
    +
    + ({ value: id, label: name })) || []} + onChange={(val) => onChangeAssociation(val, index)} + style={{ maxWidth: 320, minWidth: 320 }} + /> + 0 + ? associationLevels + .filter(({ associationId }) => associationId === cAssociationId) + .map(({ id, name }) => ({ value: id, label: name })) + : []} + onChange={(val) => onChangeLevel(val, index)} + /> + {/* beforeUpload(file as UploadFile, index)} + multiple={false} + onRemove={() => onRemoveFile(index)} + > + {i18nText('addDiploma', locale)} + */} + onRemoveFile(index)} + action="https://api.bbuddy.expert/api/home/uploadfile" + method="POST" + headers={{ + authorization: `Bearer ${jwt}`, + 'X-User-Language': locale, + 'X-Referrer-Channel': 'site', + }} + onChange={(obj) => onChange(obj.file, index)} + > + {i18nText('addDiploma', locale)} + +
    + } + onClick={() => deleteCertificate(index)} + /> +
    + ) + })} +
    + + {i18nText('addNew', locale)} + +
    + ); +}; diff --git a/src/components/Modals/educationModalContent/Educations.tsx b/src/components/Modals/educationModalContent/Educations.tsx new file mode 100644 index 0000000..33bae54 --- /dev/null +++ b/src/components/Modals/educationModalContent/Educations.tsx @@ -0,0 +1,166 @@ +import { DeleteOutlined } from '@ant-design/icons'; +import { CustomInput } from '../../view/CustomInput'; +import { LinkButton } from '../../view/LinkButton'; +import { OutlinedButton } from '../../view/OutlinedButton'; +import { Details } from '../../../types/education'; +import { i18nText } from '../../../i18nKeys'; +import { Upload, UploadFile } from 'antd'; +import { validateDoc } from '../../../utils/account'; +import { useLocalStorage } from '../../../hooks/useLocalStorage'; +import { AUTH_TOKEN_KEY } from '../../../constants/common'; + +type EducationsContentProps = { + educations?: Details[]; + update: (edu?: Details[]) => void; + locale: string; +}; + +export const EducationsContent = ({ + educations, + update, + locale +}: EducationsContentProps) => { + const [jwt] = useLocalStorage(AUTH_TOKEN_KEY, ''); + + const addEdu = () => { + const edu = { + title: undefined, + description: undefined, + document: null + }; + + update(educations?.length > 0 + ? [ + ...educations, + edu + ] + : [edu]); + }; + + const deleteEdu = (index: number) => { + update([...educations].filter((ed, i) => i !== index)); + }; + + const beforeUpload = (file: UploadFile) => { + const isValid = validateDoc(file); + + if (!isValid) { + return Upload.LIST_IGNORE; + } + + return true; + } + + const onRemoveFile = (index: number) => { + update(educations?.map((edu, i) => { + if (i === index) { + return { + ...edu, + document: null, + } + } + + return edu; + })); + }; + + const onChange = (file: any, index: number) => { + if (file?.response) { + update([...educations].map((edu, i) => { + if (i === index) { + return { + ...edu, + document: file?.response || null, + } + } + + return edu; + })); + } + }; + + const onChangeUniversity = (val: string, index: number) => { + update(educations?.map((edu, i) => { + if (i === index) { + return { + ...edu, + title: val, + } + } + + return edu; + })); + }; + + const onChangeDesc = (val: string, index: number) => { + update(educations?.map((edu, i) => { + if (i === index) { + return { + ...edu, + description: val, + } + } + + return edu; + })); + }; + + return ( +
    +
    + {educations?.map(({ title, description, document: file}, index) => ( +
    +
    + onChangeUniversity(e?.target?.value, index)} + /> + onChangeDesc(e?.target?.value, index)} + /> + onRemoveFile(index)} + action="https://api.bbuddy.expert/api/home/uploadfile" + method="POST" + headers={{ + authorization: `Bearer ${jwt}`, + 'X-User-Language': locale, + 'X-Referrer-Channel': 'site', + }} + onChange={(obj) => onChange(obj.file, index)} + > + {i18nText('addDiploma', locale)} + +
    + } + onClick={() => deleteEdu(index)} + /> +
    + ))} +
    + + {i18nText('addNew', locale)} + +
    + ); +}; diff --git a/src/components/Modals/educationModalContent/Experiences.tsx b/src/components/Modals/educationModalContent/Experiences.tsx new file mode 100644 index 0000000..4a71b38 --- /dev/null +++ b/src/components/Modals/educationModalContent/Experiences.tsx @@ -0,0 +1,101 @@ +import { DeleteOutlined } from '@ant-design/icons'; +import { CustomInput } from '../../view/CustomInput'; +import { LinkButton } from '../../view/LinkButton'; +import { OutlinedButton } from '../../view/OutlinedButton'; +import { Experience } from '../../../types/education'; +import { i18nText } from '../../../i18nKeys'; +import {useLocalStorage} from "../../../hooks/useLocalStorage"; +import {AUTH_TOKEN_KEY} from "../../../constants/common"; + +type ExperiencesContentProps = { + experiences?: Experience[]; + update: (ex?: Experience[]) => void; + locale: string; +}; + +export const ExperiencesContent = ({ + experiences, + update, + locale +}: ExperiencesContentProps) => { + const [jwt] = useLocalStorage(AUTH_TOKEN_KEY, ''); + + const addExperience = () => { + const ex = { + title: undefined, + description: undefined, + }; + + update(experiences?.length > 0 + ? [ + ...experiences, + ex + ] + : [ex]); + }; + + const deleteExperience = (index: number) => { + update([...experiences].filter((ex, i) => i !== index)); + }; + + const onChangeName = (val: string, index: number) => { + update(experiences?.map((ex, i) => { + if (i === index) { + return { + ...ex, + title: val, + } + } + + return ex; + })); + }; + + const onChangeDesc = (val: string, index: number) => { + update(experiences?.map((ex, i) => { + if (i === index) { + return { + ...ex, + description: val, + } + } + + return ex; + })); + }; + + return ( +
    +
    + {experiences?.map(({ title, description}, index) => ( +
    +
    + onChangeName(e?.target?.value, index)} + /> + onChangeDesc(e?.target?.value, index)} + /> +
    + } + onClick={() => deleteExperience(index)} + /> +
    + ))} +
    + + {i18nText('addNew', locale)} + +
    + ); +}; diff --git a/src/components/Modals/educationModalContent/Mbas.tsx b/src/components/Modals/educationModalContent/Mbas.tsx new file mode 100644 index 0000000..d119781 --- /dev/null +++ b/src/components/Modals/educationModalContent/Mbas.tsx @@ -0,0 +1,166 @@ +import { DeleteOutlined } from '@ant-design/icons'; +import { CustomInput } from '../../view/CustomInput'; +import { LinkButton } from '../../view/LinkButton'; +import { OutlinedButton } from '../../view/OutlinedButton'; +import { Details } from '../../../types/education'; +import { i18nText } from '../../../i18nKeys'; +import { Upload, UploadFile } from 'antd'; +import { validateDoc } from '../../../utils/account'; +import { useLocalStorage } from '../../../hooks/useLocalStorage'; +import { AUTH_TOKEN_KEY } from '../../../constants/common'; + +type MbasContentProps = { + mbas?: Details[]; + update: (mba?: Details[]) => void; + locale: string; +}; + +export const MbasContent = ({ + mbas, + update, + locale +}: MbasContentProps) => { + const [jwt] = useLocalStorage(AUTH_TOKEN_KEY, ''); + + const addMba = () => { + const mba = { + title: undefined, + description: undefined, + document: null + }; + + update(mbas?.length > 0 + ? [ + ...mbas, + mba + ] + : [mba]); + }; + + const deleteMba = (index: number) => { + update([...mbas].filter((mba, i) => i !== index)); + }; + + const beforeUpload = (file: UploadFile) => { + const isValid = validateDoc(file); + + if (!isValid) { + return Upload.LIST_IGNORE; + } + + return true; + } + + const onRemoveFile = (index: number) => { + update(mbas?.map((mb, i) => { + if (i === index) { + return { + ...mb, + document: null, + } + } + + return mb; + })); + }; + + const onChange = (file: any, index: number) => { + if (file?.response) { + update([...mbas].map((mb, i) => { + if (i === index) { + return { + ...mb, + document: file?.response || null, + } + } + + return mb; + })); + } + }; + + const onChangeName = (val: string, index: number) => { + update(mbas?.map((mb, i) => { + if (i === index) { + return { + ...mb, + title: val, + } + } + + return mb; + })); + }; + + const onChangeDesc = (val: string, index: number) => { + update(mbas?.map((mb, i) => { + if (i === index) { + return { + ...mb, + description: val, + } + } + + return mb; + })); + }; + + return ( +
    +
    + {mbas?.map(({ title, description, document: file}, index) => ( +
    +
    + onChangeName(e?.target?.value, index)} + /> + onChangeDesc(e?.target?.value, index)} + /> + onRemoveFile(index)} + action="https://api.bbuddy.expert/api/home/uploadfile" + method="POST" + headers={{ + authorization: `Bearer ${jwt}`, + 'X-User-Language': locale, + 'X-Referrer-Channel': 'site', + }} + onChange={(obj) => onChange(obj.file, index)} + > + {i18nText('addDiploma', locale)} + +
    + } + onClick={() => deleteMba(index)} + /> +
    + ))} +
    + + {i18nText('addNew', locale)} + +
    + ); +}; diff --git a/src/components/Modals/educationModalContent/Trainings.tsx b/src/components/Modals/educationModalContent/Trainings.tsx new file mode 100644 index 0000000..9555784 --- /dev/null +++ b/src/components/Modals/educationModalContent/Trainings.tsx @@ -0,0 +1,166 @@ +import { DeleteOutlined } from '@ant-design/icons'; +import { CustomInput } from '../../view/CustomInput'; +import { LinkButton } from '../../view/LinkButton'; +import { OutlinedButton } from '../../view/OutlinedButton'; +import { Details } from '../../../types/education'; +import { i18nText } from '../../../i18nKeys'; +import { Upload, UploadFile } from 'antd'; +import { validateDoc } from '../../../utils/account'; +import { useLocalStorage } from '../../../hooks/useLocalStorage'; +import { AUTH_TOKEN_KEY } from '../../../constants/common'; + +type TrainingsContentProps = { + trainings?: Details[]; + update: (tr?: Details[]) => void; + locale: string; +}; + +export const TrainingsContent = ({ + trainings, + update, + locale +}: TrainingsContentProps) => { + const [jwt] = useLocalStorage(AUTH_TOKEN_KEY, ''); + + const addTrainings = () => { + const training = { + title: undefined, + description: undefined, + document: null + }; + + update(trainings?.length > 0 + ? [ + ...trainings, + training + ] + : [training]); + }; + + const deleteTrainings = (index: number) => { + update([...trainings].filter((tr, i) => i !== index)); + }; + + const beforeUpload = (file: UploadFile) => { + const isValid = validateDoc(file); + + if (!isValid) { + return Upload.LIST_IGNORE; + } + + return true; + } + + const onRemoveFile = (index: number) => { + update(trainings?.map((tr, i) => { + if (i === index) { + return { + ...tr, + document: null, + } + } + + return tr; + })); + }; + + const onChange = (file: any, index: number) => { + if (file?.response) { + update([...trainings].map((tr, i) => { + if (i === index) { + return { + ...tr, + document: file?.response || null, + } + } + + return tr; + })); + } + }; + + const onChangeName = (val: string, index: number) => { + update(trainings?.map((tr, i) => { + if (i === index) { + return { + ...tr, + title: val, + } + } + + return tr; + })); + }; + + const onChangeDesc = (val: string, index: number) => { + update(trainings?.map((tr, i) => { + if (i === index) { + return { + ...tr, + description: val, + } + } + + return tr; + })); + }; + + return ( +
    +
    + {trainings?.map(({ title, description, document: file}, index) => ( +
    +
    + onChangeName(e?.target?.value, index)} + /> + onChangeDesc(e?.target?.value, index)} + /> + onRemoveFile(index)} + action="https://api.bbuddy.expert/api/home/uploadfile" + method="POST" + headers={{ + authorization: `Bearer ${jwt}`, + 'X-User-Language': locale, + 'X-Referrer-Channel': 'site', + }} + onChange={(obj) => onChange(obj.file, index)} + > + {i18nText('addDiploma', locale)} + +
    + } + onClick={() => deleteTrainings(index)} + /> +
    + ))} +
    + + {i18nText('addNew', locale)} + +
    + ); +}; diff --git a/src/components/view/FilledButton.tsx b/src/components/view/FilledButton.tsx index 3b875b6..f74a21f 100644 --- a/src/components/view/FilledButton.tsx +++ b/src/components/view/FilledButton.tsx @@ -12,3 +12,9 @@ export const FilledYellowButton = (props: any) => ( {props.children} ); + +export const FilledSquareButton = (props: any) => ( + +); diff --git a/src/components/view/LinkButton.tsx b/src/components/view/LinkButton.tsx index 6e06b0a..0a63f92 100644 --- a/src/components/view/LinkButton.tsx +++ b/src/components/view/LinkButton.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Button } from 'antd'; export const LinkButton = (props: any) => ( - ); diff --git a/src/i18nKeys/de.ts b/src/i18nKeys/de.ts index f27812b..a12d82f 100644 --- a/src/i18nKeys/de.ts +++ b/src/i18nKeys/de.ts @@ -105,6 +105,7 @@ export default { signUp: 'Jetzt anmelden', noData: 'Keine Daten', notFound: 'Nicht gefunden', + skillsInfo: 'Fähigkeiten-Infos', trainings: 'Trainings', seminars: 'Seminare', courses: 'Kurse', @@ -112,7 +113,38 @@ export default { aboutCoach: 'Über Coach', education: 'Bildung', coaching: 'Coaching', - + experiences: 'Praktische Erfahrung', + payInfo: 'Zahlungsdaten', + sessionDuration: 'Sitzungsdauer', + experienceHours: 'Gesamtstunden praktischer Erfahrung', + topics: 'Themen', + selectTopic: 'Thema auswählen', + title: 'Titel', + description: 'Beschreibung', + sessionCost: 'Sitzungskosten in Euro', + yourTimezone: 'Deine Zeitzone', + workTime: 'Arbeitszeit', + startAt: 'Beginn um', + finishAt: 'Ende um', + addWorkingHours: 'Arbeitszeiten hinzufügen', + specialisation: 'Spezialisierung', + selectSpecialisation: 'Wählen Sie Ihre Spezialisierung, um fortzufahren', + fillWeeklySchedule: 'Trage Sachen in deinen Wochenplan ein', + beneficiaryName: 'Name des Empfängers', + bicOrSwift: 'BIC/Swift-Code', + association: 'Verband', + level: 'Stufe', + addDiploma: 'Zertifikat hinzufügen', + university: 'Institution', + sunday: 'So', + monday: 'Mo', + tuesday: 'Di', + wednesday: 'Mi', + thursday: 'Do', + friday: 'Fr', + saturday: 'Sa', + addNew: 'Neu hinzufügen', + mExperiences: 'Führungserfahrung', errors: { invalidEmail: 'Die E-Mail-Adresse ist ungültig', emptyEmail: 'Bitte geben Sie Ihre E-Mail ein', diff --git a/src/i18nKeys/en.ts b/src/i18nKeys/en.ts index 9857844..117a2b7 100644 --- a/src/i18nKeys/en.ts +++ b/src/i18nKeys/en.ts @@ -110,8 +110,41 @@ export default { courses: 'Courses', mba: 'MBA Information', aboutCoach: 'About Coach', + skillsInfo: 'Skills Info', education: 'Education', coaching: 'Coaching', + experiences: 'Practical experience', + payInfo: 'Payment Info', + sessionDuration: 'Session duration', + experienceHours: 'Total hours of practical experience', + topics: 'Topics', + selectTopic: 'Select Topic', + title: 'Title', + description: 'Description', + sessionCost: 'Session cost in euro', + yourTimezone: 'Your timezone', + workTime: 'Work time', + startAt: 'Start at', + finishAt: 'Finish at', + addWorkingHours: 'Add working hours', + specialisation: 'Specialisation', + selectSpecialisation: 'Select your specialisation to proceed', + fillWeeklySchedule: 'Fill up your weekly schedule', + beneficiaryName: 'Beneficiary Name', + bicOrSwift: 'BIC/Swift code', + association: 'Association', + level: 'Level', + addDiploma: 'Add Diploma', + university: 'Institution', + sunday: 'Su', + monday: 'Mo', + tuesday: 'Tu', + wednesday: 'We', + thursday: 'Th', + friday: 'Fr', + saturday: 'Sa', + addNew: 'Add New', + mExperiences: 'Managerial Experience', errors: { invalidEmail: 'The email address is not valid', emptyEmail: 'Please enter your E-mail', diff --git a/src/i18nKeys/es.ts b/src/i18nKeys/es.ts index f94d8a5..5f4a314 100644 --- a/src/i18nKeys/es.ts +++ b/src/i18nKeys/es.ts @@ -105,6 +105,7 @@ export default { signUp: 'Regístrate ahora', noData: 'Sin datos', notFound: 'No encontrado', + skillsInfo: 'Información', trainings: 'Formación', seminars: 'Seminarios', courses: 'Cursos', @@ -112,7 +113,38 @@ export default { aboutCoach: 'Sobre el coach', education: 'Educación', coaching: 'Coaching', - + experiences: 'Experiencia práctica', + payInfo: 'Información de pago', + sessionDuration: 'Duración de la sesión', + experienceHours: 'Total de horas de experiencia práctica', + topics: 'Temas', + selectTopic: 'Seleccione el tema', + title: 'Título', + description: 'Descripción', + sessionCost: 'Coste de la sesión en euros', + yourTimezone: 'Tu zona horaria', + workTime: 'Tiempo de trabajo', + startAt: 'Empieza a las', + finishAt: 'Termina a las', + addWorkingHours: 'Añadir horas de trabajo', + specialisation: 'Especialización', + selectSpecialisation: 'Selecciona tu especialización para continuar', + fillWeeklySchedule: 'Rellena tu agenda semanal', + beneficiaryName: 'Nombre del beneficiario', + bicOrSwift: 'Código BIC/Swift', + association: 'Asociación', + level: 'Nivel', + addDiploma: 'Añadir diploma', + university: 'Institución', + sunday: 'D', + monday: 'L', + tuesday: 'M', + wednesday: 'X', + thursday: 'J', + friday: 'V', + saturday: 'S', + addNew: 'Añadir nuevo', + mExperiences: 'Experiencia de dirección', errors: { invalidEmail: 'La dirección de correo electrónico no es válida', emptyEmail: 'Introduce tu correo electrónico', diff --git a/src/i18nKeys/fr.ts b/src/i18nKeys/fr.ts index 7978155..3502aef 100644 --- a/src/i18nKeys/fr.ts +++ b/src/i18nKeys/fr.ts @@ -105,6 +105,7 @@ export default { signUp: 'Inscrivez-vous maintenant', noData: 'Aucune donnée', notFound: 'Non trouvé', + skillsInfo: 'Infos sur les compétences', trainings: 'Formations', seminars: 'Séminaires', courses: 'Cours', @@ -112,7 +113,38 @@ export default { aboutCoach: 'À propos du coach', education: 'Éducation', coaching: 'Coaching', - + experiences: 'Expérience pratique', + payInfo: 'Infos sur le paiement', + sessionDuration: 'Durée de la session', + experienceHours: 'Heures totales d\'expérience pratique', + topics: 'Sujets', + selectTopic: 'Sélectionnez un sujet', + title: 'Titre', + description: 'Description', + sessionCost: 'Coût de la session en euros', + yourTimezone: 'Votre fuseau horaire', + workTime: 'Heures de travail', + startAt: 'Commencer à', + finishAt: 'Finir à', + addWorkingHours: 'Ajouter des heures de travail', + specialisation: 'Spécialisation', + selectSpecialisation: 'Sélectionnez votre spécialisation pour continuer', + fillWeeklySchedule: 'Remplissez votre emploi du temps hebdomadaire', + beneficiaryName: 'Nom du bénéficiaire', + bicOrSwift: 'Code BIC/Swift', + association: 'Association', + level: 'Niveau', + addDiploma: 'Ajouter un diplôme', + university: 'Institution', + sunday: 'Di', + monday: 'Lu', + tuesday: 'Ma', + wednesday: 'Me', + thursday: 'Je', + friday: 'Ve', + saturday: 'Sa', + addNew: 'Ajouter un nouveau', + mExperiences: 'Expérience en gestion', errors: { invalidEmail: 'L\'adresse e-mail n\'est pas valide', emptyEmail: 'Veuillez saisir votre e-mail', diff --git a/src/i18nKeys/it.ts b/src/i18nKeys/it.ts index 5520c2a..8a3743a 100644 --- a/src/i18nKeys/it.ts +++ b/src/i18nKeys/it.ts @@ -105,6 +105,7 @@ export default { signUp: 'Iscriviti ora', noData: 'Nessun dato', notFound: 'Non trovato', + skillsInfo: 'Info su competenze', trainings: 'Training', seminars: 'Seminari', courses: 'Corsi', @@ -112,7 +113,38 @@ export default { aboutCoach: 'Informazioni sul coach', education: 'Istruzione', coaching: 'Coaching', - + experiences: 'Esperienza pratica', + payInfo: 'Info pagamento', + sessionDuration: 'Durata della sessione', + experienceHours: 'Totale ore di esperienza pratica', + topics: 'Argomenti', + selectTopic: 'Seleziona l\'argomento', + title: 'Titolo', + description: 'Descrizione', + sessionCost: 'Costo della sessione in euro', + yourTimezone: 'Il tuo fuso orario', + workTime: 'Orario di lavoro', + startAt: 'Inizia alle', + finishAt: 'Termina alle', + addWorkingHours: 'Aggiungi ore lavorative', + specialisation: 'Specializzazione', + selectSpecialisation: 'Seleziona la tua specializzazione per continuare', + fillWeeklySchedule: 'Compila la tua agenda settimanale', + beneficiaryName: 'Nome del beneficiario', + bicOrSwift: 'BIC/codice Swift', + association: 'Associazione', + level: 'Livello', + addDiploma: 'Aggiungi diploma', + university: 'Istituto', + sunday: 'Do', + monday: 'Lu', + tuesday: 'Ma', + wednesday: 'Me', + thursday: 'Gi', + friday: 'Ve', + saturday: 'Sa', + addNew: 'Aggiungi nuovo', + mExperiences: 'Esperienza manageriale', errors: { invalidEmail: 'L\'indirizzo e-mail non è valido', emptyEmail: 'Inserisci l\'e-mail', diff --git a/src/i18nKeys/ru.ts b/src/i18nKeys/ru.ts index aa99952..de2a14b 100644 --- a/src/i18nKeys/ru.ts +++ b/src/i18nKeys/ru.ts @@ -98,21 +98,53 @@ export default { expertBackground: 'Профессиональный опыт эксперта', profCertification: 'Профессиональная сертификация', practiceHours: 'Часов практики', - supervisionCount: 'Часов супервизии в год', + supervisionCount: 'Супервизий в год', outOf: 'из', schedule: 'Расписание', successfulCase: 'Успешные случаи из практики', signUp: 'Записаться сейчас', noData: 'Нет данных', notFound: 'Не найдено', + skillsInfo: 'Навыки', trainings: 'Тренинги', seminars: 'Семинары', courses: 'Курсы', mba: 'Информация о MBA', + experiences: 'Практический опыт', aboutCoach: 'О коуче', education: 'Образование', coaching: 'Коучинг', - + payInfo: 'Платежная информация', + sessionDuration: 'Продолжительность сессии', + experienceHours: 'Общее количество часов практического опыта', + topics: 'Темы', + selectTopic: 'Выберите тему', + title: 'Название', + description: 'Описание', + sessionCost: 'Стоимость сессии в евро', + yourTimezone: 'Ваш часовой пояс', + workTime: 'Рабочее время', + startAt: 'Начало в', + finishAt: 'Завершение в', + addWorkingHours: 'Добавить рабочие часы', + specialisation: 'Специализация', + selectSpecialisation: 'Выберите свою специализацию для продолжения', + fillWeeklySchedule: 'Заполните свое недельное расписание', + beneficiaryName: 'Имя получателя', + bicOrSwift: 'BIC/Swift код', + association: 'Ассоциация', + level: 'Уровень', + addDiploma: 'Добавить диплом', + university: 'ВУЗ', + sunday: 'Вс', + monday: 'Пн', + tuesday: 'Вт', + wednesday: 'Ср', + thursday: 'Чт', + friday: 'Пт', + saturday: 'Сб', + addNew: 'Добавить', + mExperiences: 'Управленческий опыт', errors: { invalidEmail: 'Адрес электронной почты недействителен', emptyEmail: 'Пожалуйста, введите ваш E-mail', diff --git a/src/styles/_edu.scss b/src/styles/_edu.scss new file mode 100644 index 0000000..b3e65a0 --- /dev/null +++ b/src/styles/_edu.scss @@ -0,0 +1,35 @@ +.b-edu { + &-content { + display: flex; + flex-direction: column; + gap: 16px; + } + + &-list { + display: flex; + flex-direction: column; + gap: 12px; + width: 100%; + + &__item { + padding-top: 12px; + border-top: 1px solid #C4DFE6; + display: flex; + gap: 8px; + justify-content: space-between; + align-items: flex-start; + + &:first-child { + padding-top: 0; + border-top: none; + } + + & > div { + flex: 1; + display: flex; + flex-direction: column; + gap: 12px; + } + } + } +} diff --git a/src/styles/_modal.scss b/src/styles/_modal.scss index bf5423e..05be32d 100644 --- a/src/styles/_modal.scss +++ b/src/styles/_modal.scss @@ -51,7 +51,8 @@ } &__inner { - height: 60vh; + height: auto; + max-height: 60vh; overflow-y: auto; & > div { @@ -86,3 +87,13 @@ .ant-modal-mask { background-color: rgba(0, 59, 70, 0.4) !important; } + +.ant-upload-list-item-name { + max-width: 280px; +} + +.ant-upload-list-item { + &:hover { + background-color: transparent !important; + } +} diff --git a/src/styles/_pages.scss b/src/styles/_pages.scss index 49ceb51..394a403 100644 --- a/src/styles/_pages.scss +++ b/src/styles/_pages.scss @@ -1188,7 +1188,6 @@ height: 86px; border-radius: 16px; border: 2px solid #FFF; - background: lightgray 50%; box-shadow: 0 8px 16px 0 rgba(102, 165, 173, 0.32); overflow: hidden; @@ -1210,6 +1209,7 @@ @include rem(18); font-weight: 600; line-height: 150%; + margin-bottom: 16px; } } @@ -1233,6 +1233,61 @@ } } + &__info { + display: flex; + flex-direction: column; + gap: 8px; + + .title-h3 { + color: #003B46; + @include rem(16); + line-height: 18px; + } + + .case-list { + margin-top: 8px; + + p { + margin-top: 8px; + } + } + } + + &__practice { + color: #2C7873; + @include rem(16); + line-height: 18px; + } + + &__lang { + display: flex; + flex-direction: column; + gap: 8px; + + & > div { + color: #003B46; + @include rem(16); + line-height: 18px; + } + } + + &__list { + display: flex; + flex-direction: column; + gap: 8px; + + & > div { + display: flex; + gap: 12px; + } + } + + &__item { + color: #003B46; + @include rem(16); + line-height: 18px; + } + .title-h2 { color: #003B46; @include rem(18); @@ -1243,7 +1298,7 @@ margin-bottom: 0; } - &__desc { + &__desc, &__desc > div { border-radius: 16px; background: #EFFCFF; padding: 16px; @@ -1443,8 +1498,17 @@ top: 50%; transform: translateY(-50%); } - } } - +} + +.pay-data-list { + display: flex; + flex-direction: column; + gap: 8px; + + & > div { + display: flex; + gap: 16px; + } } diff --git a/src/styles/_schedule.scss b/src/styles/_schedule.scss new file mode 100644 index 0000000..4a3b9ec --- /dev/null +++ b/src/styles/_schedule.scss @@ -0,0 +1,15 @@ +.b-schedule-list { + display: flex; + flex-direction: column; + gap: 12px; + color: #003B46; + @include rem(16); + font-style: normal; + font-weight: 500; + line-height: 150%; + + & > div { + display: flex; + gap: 8px; + } +} diff --git a/src/styles/style.scss b/src/styles/style.scss index d00dbd2..cd8ed3f 100644 --- a/src/styles/style.scss +++ b/src/styles/style.scss @@ -15,6 +15,8 @@ @import "_message.scss"; @import "_auth-modal.scss"; @import "_modal.scss"; +@import "_edu.scss"; +@import "_schedule.scss"; @import "./view/style.scss"; @import "./sessions/style.scss"; diff --git a/src/styles/view/_buttons.scss b/src/styles/view/_buttons.scss index dfd9b8a..e5fc938 100644 --- a/src/styles/view/_buttons.scss +++ b/src/styles/view/_buttons.scss @@ -17,6 +17,19 @@ padding: 4px 24px !important; } + &_square { + width: 42px !important; + height: 42px !important; + background: #66A5AD !important; + font-size: 15px !important; + border-radius: 8px !important; + box-shadow: 0px 2px 4px 0px rgba(102, 165, 173, 0.32) !important; + position: absolute !important; + right: -8px !important; + bottom: -8px !important; + cursor: pointer; + } + &.danger { background: #D93E5C !important; box-shadow: none !important; @@ -28,6 +41,10 @@ font-size: 15px !important; height: auto !important; padding: 0 !important; + + &.danger { + color: #D93E5C !important; + } } &__outlined { diff --git a/src/styles/view/_collapse.scss b/src/styles/view/_collapse.scss new file mode 100644 index 0000000..491075c --- /dev/null +++ b/src/styles/view/_collapse.scss @@ -0,0 +1,15 @@ +.ant-collapse-header { + padding: 12px 0 !important; +} + +.ant-collapse-header-text { + color: #003B46; + @include rem(16); + font-style: normal; + font-weight: 600; + line-height: 133.333%; +} + +.ant-collapse-content-box { + padding: 12px 0 !important; +} diff --git a/src/styles/view/_input.scss b/src/styles/view/_input.scss index 3f6149d..392cbbf 100644 --- a/src/styles/view/_input.scss +++ b/src/styles/view/_input.scss @@ -8,6 +8,14 @@ input { background-color: transparent !important; + border-color: transparent !important; + box-shadow: none !important; + } + + .ant-input-group-addon { + background-color: transparent !important; + border-color: transparent !important; + box-shadow: none !important; } &:focus, &:hover, &:focus-within { diff --git a/src/styles/view/_practice.scss b/src/styles/view/_practice.scss new file mode 100644 index 0000000..921d855 --- /dev/null +++ b/src/styles/view/_practice.scss @@ -0,0 +1,29 @@ +.b-practice { + &-cases { + display: flex; + flex-direction: column; + gap: 16px; + } + + &-case { + &__header { + display: flex; + justify-content: space-between; + align-items: center; + } + + &__item { + display: flex; + justify-content: space-between; + gap: 8px; + align-items: flex-start; + } + + &__content { + display: flex; + flex-direction: column; + gap: 16px; + flex: 1; + } + } +} diff --git a/src/styles/view/style.scss b/src/styles/view/style.scss index 27a5921..42b0936 100644 --- a/src/styles/view/style.scss +++ b/src/styles/view/style.scss @@ -6,3 +6,5 @@ @import "_spin.scss"; @import "_switch.scss"; @import "_buttons.scss"; +@import "_practice.scss"; +@import "_collapse.scss"; diff --git a/src/types/education.ts b/src/types/education.ts index aa41a70..7cf99f7 100644 --- a/src/types/education.ts +++ b/src/types/education.ts @@ -1,22 +1,23 @@ import { ExpertDocument } from './file'; export type Details = { - id: number; - userId?:number; + id?: number; + userId?: number; title?: string; description?: string; - document?: ExpertDocument; + document?: ExpertDocument | null; }; export type Certificate = { - id: number; + id?: number; userId?: number; associationLevelId?: number; - document?: ExpertDocument; + associationId?: number; + document?: ExpertDocument | null; }; export type Experience = { - id: number, + id?: number, userId?: number, title?: string, description?: string @@ -24,10 +25,10 @@ export type Experience = { export type Association = { id: number; - name?: string; + name: string; }; -export type AssociationLevel = Association & { associationId?: number }; +export type AssociationLevel = Association & { associationId: number }; export type EducationData = { certificates?: Certificate[], diff --git a/src/types/practice.ts b/src/types/practice.ts index 438e125..1172a99 100644 --- a/src/types/practice.ts +++ b/src/types/practice.ts @@ -6,7 +6,7 @@ export type Supervision = { }; export type PracticeCase = { - id: number, + id?: number, userId?: number, description?: string, themesGroupIds?: number[] @@ -18,12 +18,14 @@ export type PracticeData = { sessionDuration?: number, sessionCost?: number, practiceCases?: PracticeCase[] -} +}; + +export type PracticePersonData = PracticeData & { + themesGroups?: ExpertsThemesGroups[], + supervisionPerYears?: Supervision[], + sessionCosts?: number[] +}; export interface PracticeDTO { - person4Data: PracticeData & { - themesGroups?: ExpertsThemesGroups[], - supervisionPerYears?: Supervision[], - sessionCosts?: number[] - } + person4Data: PracticePersonData } diff --git a/src/types/profile.ts b/src/types/profile.ts index 548398c..6da1047 100644 --- a/src/types/profile.ts +++ b/src/types/profile.ts @@ -15,7 +15,8 @@ export type ProfileData = { hasExternalLogin?: boolean; isTestMode?: boolean; phone?: string; - languagesLinks?: { language: { id: number, code: string, nativeSpelling: string }, languageId: number }[] + languagesLinks?: { language: { id: number, code: string, nativeSpelling: string }, languageId: number }[]; + allLanguages?: { id: number, code: string, nativeSpelling: string }[] } export type Profile = ProfileData & { id: number }; diff --git a/src/utils/account.ts b/src/utils/account.ts index e67e439..ca29021 100644 --- a/src/utils/account.ts +++ b/src/utils/account.ts @@ -28,3 +28,19 @@ export const validateImage = (file: UploadFile, showMessage?: boolean): boolean return isImage && isLt5M; }; + + +export const validateDoc = (file: UploadFile): boolean => { + const isDoc = file.type === 'image/jpg' || file.type === 'image/jpeg' + || file.type === 'image/png' || file.type === 'image/gif' || file.type === 'application/pdf'; + if (!isDoc) { + message.error('You can only upload JPG/PNG/PDF file'); + } + + const isLt5M = file.size / 1024 / 1024 <= 5; + if (!isLt5M) { + message.error('Image must smaller than 5MB'); + } + + return isDoc && isLt5M; +}; diff --git a/src/utils/time.ts b/src/utils/time.ts new file mode 100644 index 0000000..9657e3a --- /dev/null +++ b/src/utils/time.ts @@ -0,0 +1,62 @@ +import dayjs from 'dayjs'; +import { WorkingTime } from '../types/schedule'; + +const WEEK_DAY = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']; +const MAX_DAY_TIME = 24 * 60; // min + +export const getCurrentTime = (data: WorkingTime) => { + let startDay = data.startDayOfWeekUtc; + let endDay = data.endDayOfWeekUtc; + const currentTimeZone = dayjs().format('Z'); + const startUtc = data.startTimeUtc / (1000 * 1000 * 60); + const endUtc = data.endTimeUtc / (1000 * 1000 * 60); + const matches = currentTimeZone.match(/(\+|-)([0-9]{2}):([0-9]{2})/); + const sign = matches[1]; + const h = matches[2]; + const m = matches[3]; + let startMin; + let endMin; + + if (sign === '+') { + startMin = startUtc + (Number(h) * 60) + Number(m); + endMin = endUtc + (Number(h) * 60) + Number(m); + // startMin = startUtc; + // endMin = endUtc; + } + + if (sign === '-') { + startMin = startUtc - (Number(h) * 60) - Number(m); + endMin = endUtc - (Number(h) * 60) - Number(m); + } + + if (startMin > MAX_DAY_TIME) { + startMin = startMin - MAX_DAY_TIME; + const ind = startDay ? WEEK_DAY.indexOf(startDay) + 1 : 0; + startDay = WEEK_DAY[ind >= WEEK_DAY.length ? 0 : ind]; + } + + if (endMin > MAX_DAY_TIME) { + endMin = endMin - MAX_DAY_TIME; + const ind = endDay ? WEEK_DAY.indexOf(endDay) + 1 : 0; + endDay = WEEK_DAY[ind >= WEEK_DAY.length ? 0 : ind]; + } + + if (startMin <= 0) { + startMin = MAX_DAY_TIME - startMin; + const ind = startDay ? WEEK_DAY.indexOf(startDay) - 1 : 0; + startDay = WEEK_DAY[ind < 0 ? WEEK_DAY.length - 1 : ind]; + } + + if (endMin <= 0) { + endMin = MAX_DAY_TIME - endMin; + const ind = endDay ? WEEK_DAY.indexOf(endDay) - 1 : 0; + endDay = WEEK_DAY[ind < 0 ? WEEK_DAY.length - 1 : ind]; + } + + return { + startDay, + startTime: `${(startMin - startMin % 60)/60}:${startMin % 60 || '00'}`, + endDay: endDay, + endTime: `${(endMin - endMin % 60)/60}:${endMin % 60 || '00'}` + } +}; From f7fe427aae98d3a33a713851aa0f4d80cb1f8b83 Mon Sep 17 00:00:00 2001 From: dzfelix Date: Thu, 22 Aug 2024 18:15:36 +0300 Subject: [PATCH 2/2] fix lock --- package-lock.json | 731 +++++++++++++++++++++++++++------------------- 1 file changed, 432 insertions(+), 299 deletions(-) diff --git a/package-lock.json b/package-lock.json index 71926a5..79eeae5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,11 +11,13 @@ "@ant-design/cssinjs": "^1.18.1", "@ant-design/icons": "^5.2.6", "@ant-design/nextjs-registry": "^1.0.0", + "@contentful/rich-text-react-renderer": "^15.22.9", "agora-rtc-react": "^2.1.0", "agora-rtc-sdk-ng": "^4.20.2", "antd": "^5.12.1", "antd-img-crop": "^4.21.0", "axios": "^1.6.5", + "contentful": "^10.13.3", "dayjs": "^1.11.10", "lodash": "^4.17.21", "next": "14.0.3", @@ -42,48 +44,47 @@ } }, "node_modules/@agora-js/media": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@agora-js/media/-/media-4.21.0.tgz", - "integrity": "sha512-X4aV84/gB4O7GOOkwP3+NGTHtT2IVkpa4DFBTlBNl7hrkjDwUeanzCQZyva92Zyw59N0NI6dKh9CjJKoIL5Now==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@agora-js/media/-/media-4.22.0.tgz", + "integrity": "sha512-6IYuzm6lUQ0xmkg70z+zc4GHSu+VdnuQvq8x12GnYKcKAUf13s3h6EMy68DLG4AjLU0c/bN2uNDt74u9Zwc7vQ==", "dependencies": { - "@agora-js/report": "4.21.0", - "@agora-js/shared": "4.21.0", + "@agora-js/report": "4.22.0", + "@agora-js/shared": "4.22.0", "agora-rte-extension": "^1.2.4", "axios": "^1.6.8", - "pako": "^2.1.0", "webrtc-adapter": "8.2.0" } }, "node_modules/@agora-js/report": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@agora-js/report/-/report-4.21.0.tgz", - "integrity": "sha512-c8KIdomuPItwvri431z5CPT7L4m+jLJrwWWt/QS3JN+sp/t49NnoOIyKQf3y5xCbyNPCNNeGofrwkaIRu4YE8g==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@agora-js/report/-/report-4.22.0.tgz", + "integrity": "sha512-6LfrvRw9O97R1FP00vdPfS4hCjA8WMEllN7JDxTBnfPDaS+XHgu+ewcTkpSnhFVQG2pM45lwuE0G9F0RKLF5Jw==", "dependencies": { - "@agora-js/shared": "4.21.0", + "@agora-js/shared": "4.22.0", "axios": "^1.6.8" } }, "node_modules/@agora-js/shared": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@agora-js/shared/-/shared-4.21.0.tgz", - "integrity": "sha512-oqaiuIhG9ai/NXUDEmj9b3uGxxU9I0OZZszNaJexjakJuVZPM7ypzrCLUi5SzkTh++QOf68yuvD488fjq5WQsA==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@agora-js/shared/-/shared-4.22.0.tgz", + "integrity": "sha512-taKwc0AqbwCHHJL/2VafRQ7thgOYC1c6tiRweL1X3QpfBjJdXYVjc9jn2zY9NAZO4l4+5f1S9t988d1536XPtQ==", "dependencies": { "axios": "^1.6.8", "ua-parser-js": "^0.7.34" } }, "node_modules/@ant-design/colors": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@ant-design/colors/-/colors-7.0.2.tgz", - "integrity": "sha512-7KJkhTiPiLHSu+LmMJnehfJ6242OCxSlR3xHVBecYxnMW8MS/878NXct1GqYARyL59fyeFdKRxXTfvR9SnDgJg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@ant-design/colors/-/colors-7.1.0.tgz", + "integrity": "sha512-MMoDGWn1y9LdQJQSHiCC20x3uZ3CwQnv9QMz6pCmJOrqdgM9YxsoVVY0wtrdXbmfSgnV0KNk6zi09NAhMR2jvg==", "dependencies": { "@ctrl/tinycolor": "^3.6.1" } }, "node_modules/@ant-design/cssinjs": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/@ant-design/cssinjs/-/cssinjs-1.21.0.tgz", - "integrity": "sha512-gIilraPl+9EoKdYxnupxjHB/Q6IHNRjEXszKbDxZdsgv4sAZ9pjkCq8yanDWNvyfjp4leir2OVAJm0vxwKK8YA==", + "version": "1.21.1", + "resolved": "https://registry.npmjs.org/@ant-design/cssinjs/-/cssinjs-1.21.1.tgz", + "integrity": "sha512-tyWnlK+XH7Bumd0byfbCiZNK43HEubMoCcu9VxwsAwiHdHTgWa+tMN0/yvxa+e8EzuFP1WdUNNPclRpVtD33lg==", "dependencies": { "@babel/runtime": "^7.11.1", "@emotion/hash": "^0.8.0", @@ -91,21 +92,46 @@ "classnames": "^2.3.1", "csstype": "^3.1.3", "rc-util": "^5.35.0", - "stylis": "^4.0.13" + "stylis": "^4.3.3" }, "peerDependencies": { "react": ">=16.0.0", "react-dom": ">=16.0.0" } }, + "node_modules/@ant-design/cssinjs-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@ant-design/cssinjs-utils/-/cssinjs-utils-1.0.3.tgz", + "integrity": "sha512-BrztZZKuoYcJK8uEH40ylBemf/Mu/QPiDos56g2bv6eUoniQkgQHOCOvA3+pncoFO1TaS8xcUCIqGzDA0I+ZVQ==", + "dependencies": { + "@ant-design/cssinjs": "^1.21.0", + "@babel/runtime": "^7.23.2", + "rc-util": "^5.38.0" + }, + "peerDependencies": { + "react": ">=16.9.0", + "react-dom": ">=16.9.0" + } + }, + "node_modules/@ant-design/fast-color": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@ant-design/fast-color/-/fast-color-2.0.6.tgz", + "integrity": "sha512-y2217gk4NqL35giHl72o6Zzqji9O7vHh9YmhUVkPtAOpoTCH4uWxo/pr4VE8t0+ChEPs0qo4eJRC5Q1eXWo3vA==", + "dependencies": { + "@babel/runtime": "^7.24.7" + }, + "engines": { + "node": ">=8.x" + } + }, "node_modules/@ant-design/icons": { - "version": "5.3.7", - "resolved": "https://registry.npmjs.org/@ant-design/icons/-/icons-5.3.7.tgz", - "integrity": "sha512-bCPXTAg66f5bdccM4TT21SQBDO1Ek2gho9h3nO9DAKXJP4sq+5VBjrQMSxMVXSB3HyEz+cUbHQ5+6ogxCOpaew==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ant-design/icons/-/icons-5.4.0.tgz", + "integrity": "sha512-QZbWC5xQYexCI5q4/fehSEkchJr5UGtvAJweT743qKUQQGs9IH2DehNLP49DJ3Ii9m9CijD2HN6fNy3WKhIFdA==", "dependencies": { "@ant-design/colors": "^7.0.0", "@ant-design/icons-svg": "^4.4.0", - "@babel/runtime": "^7.11.2", + "@babel/runtime": "^7.24.8", "classnames": "^2.2.6", "rc-util": "^5.31.1" }, @@ -123,9 +149,9 @@ "integrity": "sha512-vHbT+zJEVzllwP+CM+ul7reTEfBR0vgxFe7+lREAsAA7YGsYpboiq2sQNeQeRvh09GfQgs/GyFEvZpJ9cLXpXA==" }, "node_modules/@ant-design/nextjs-registry": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@ant-design/nextjs-registry/-/nextjs-registry-1.0.0.tgz", - "integrity": "sha512-kU1K1UOhwrF6DPv73MhuL5a6U4e6/TiFapeLUt/c/kch9h5qFwEaJPb4RSJKNw0PRBfqCAPS011wVm4wYcrqbQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@ant-design/nextjs-registry/-/nextjs-registry-1.0.1.tgz", + "integrity": "sha512-DaMJ1nClR1a4UfG7vXkDj89z1eARhSDgqvHoxfM0Yco1MZEbaqRj4o+bQToHb3gMb6gbFlrZ51nOBGh5xSJ7EQ==", "peerDependencies": { "@ant-design/cssinjs": "^1.18.2", "antd": "^5.0.0", @@ -150,9 +176,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.7.tgz", - "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.4.tgz", + "integrity": "sha512-DSgLeL/FNcpXuzav5wfYvHCGvynXkJbn3Zvc3823AEe9nPwW9IK4UoCSS5yGymmQzN0pCPvivtgS6/8U2kkm1w==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -160,6 +186,38 @@ "node": ">=6.9.0" } }, + "node_modules/@contentful/content-source-maps": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@contentful/content-source-maps/-/content-source-maps-0.11.0.tgz", + "integrity": "sha512-eS/Bm1hzv5C3SyTpP08+sYVQ7fFcNUdANrLsotUWk+uC7WpponQIIY26R9QZhX7tE3r5Nq80Z+aR7uo5u31ksg==", + "dependencies": { + "@vercel/stega": "^0.1.2", + "json-pointer": "^0.6.2" + } + }, + "node_modules/@contentful/rich-text-react-renderer": { + "version": "15.22.9", + "resolved": "https://registry.npmjs.org/@contentful/rich-text-react-renderer/-/rich-text-react-renderer-15.22.9.tgz", + "integrity": "sha512-ubzuQKaIwB7AeUi1zHQ6EMvpLOMJ9p5LGxZznkcHG1Sn91LNZorQXfMt9K4tSoOR9Cn8KxN6ca8gMNNh5zGbig==", + "dependencies": { + "@contentful/rich-text-types": "^16.8.3" + }, + "engines": { + "node": ">=6.0.0" + }, + "peerDependencies": { + "react": "^16.8.6 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.6 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@contentful/rich-text-types": { + "version": "16.8.3", + "resolved": "https://registry.npmjs.org/@contentful/rich-text-types/-/rich-text-types-16.8.3.tgz", + "integrity": "sha512-vXwXDQMDbqITCWfTkU5R/q+uvXWCc1eYNvdZyjtrs0YDIYr4L7QJ2s1r4ZheIs3iVf3AFucKIHgDSpwCAm2wKA==", + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@ctrl/tinycolor": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.6.1.tgz", @@ -256,14 +314,6 @@ "tslib": "^2.4.0" } }, - "node_modules/@formatjs/ecma402-abstract/node_modules/@formatjs/intl-localematcher": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.5.4.tgz", - "integrity": "sha512-zTwEpWOzZ2CiKcB93BLngUX59hQkuZjT2+SAQEscSm52peDW/getsawMcWF1rGRpMCX6D7nSJA3CzJ8gn13N/g==", - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/@formatjs/fast-memoize": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@formatjs/fast-memoize/-/fast-memoize-2.2.0.tgz", @@ -292,9 +342,9 @@ } }, "node_modules/@formatjs/intl-localematcher": { - "version": "0.2.32", - "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.2.32.tgz", - "integrity": "sha512-k/MEBstff4sttohyEpXxCmC3MqbUn9VvHGlZ8fauLzkbwXmVrEeyzS+4uhrvAk9DWU9/7otYWxyDox4nT/KVLQ==", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.5.4.tgz", + "integrity": "sha512-zTwEpWOzZ2CiKcB93BLngUX59hQkuZjT2+SAQEscSm52peDW/getsawMcWF1rGRpMCX6D7nSJA3CzJ8gn13N/g==", "dependencies": { "tslib": "^2.4.0" } @@ -384,9 +434,9 @@ "integrity": "sha512-7xRqh9nMvP5xrW4/+L0jgRRX+HoNRGnfJpD+5Wq6/13j3dsdzxO3BCXn7D3hMqsDb+vjZnJq+vI7+EtgrYZTeA==" }, "node_modules/@next/eslint-plugin-next": { - "version": "14.2.4", - "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.2.4.tgz", - "integrity": "sha512-svSFxW9f3xDaZA3idQmlFw7SusOuWTpDTAeBlO3AEPDltrraV+lqs7mAc6A27YdnpQVVIA3sODqUAAHdWhVWsA==", + "version": "14.2.6", + "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.2.6.tgz", + "integrity": "sha512-d3+p4AjIYmhqzYHhhmkRYYN6ZU35TwZAKX08xKRfnHkz72KhWL2kxMFsDptpZs5e8bBGdepn7vn1+9DaF8iX+A==", "dev": true, "dependencies": { "glob": "10.3.10" @@ -584,12 +634,12 @@ } }, "node_modules/@rc-component/color-picker": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/@rc-component/color-picker/-/color-picker-1.5.3.tgz", - "integrity": "sha512-+tGGH3nLmYXTalVe0L8hSZNs73VTP5ueSHwUlDC77KKRaN7G4DS4wcpG5DTDzdcV/Yas+rzA6UGgIyzd8fS4cw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@rc-component/color-picker/-/color-picker-2.0.1.tgz", + "integrity": "sha512-WcZYwAThV/b2GISQ8F+7650r5ZZJ043E57aVBFkQ+kSY4C6wdofXgB0hBx+GPGpIU0Z81eETNoDUJMr7oy/P8Q==", "dependencies": { + "@ant-design/fast-color": "^2.0.6", "@babel/runtime": "^7.23.6", - "@ctrl/tinycolor": "^3.6.1", "classnames": "^2.2.6", "rc-util": "^5.38.1" }, @@ -693,9 +743,9 @@ } }, "node_modules/@rc-component/trigger": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@rc-component/trigger/-/trigger-2.2.0.tgz", - "integrity": "sha512-QarBCji02YE9aRFhZgRZmOpXBj0IZutRippsVBv85sxvG4FGk/vRxwAlkn3MS9zK5mwbETd86mAVg2tKqTkdJA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@rc-component/trigger/-/trigger-2.2.1.tgz", + "integrity": "sha512-fuU11J8pOt6+U/tU6/CAv8wjCwGaNeRk9f5k8HQth7JBbJ6MMH62WhGycVW75VnXfBZgL/7kO+wbiO2Xc9U9sQ==", "dependencies": { "@babel/runtime": "^7.23.2", "@rc-component/portal": "^1.1.0", @@ -713,9 +763,9 @@ } }, "node_modules/@rushstack/eslint-patch": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.10.3.tgz", - "integrity": "sha512-qC/xYId4NMebE6w/V33Fh9gWxLgURiNYgVNObbJl2LZv0GUUItCcCqC5axQSwRaAgaxl2mELq1rMzlswaQ0Zxg==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.10.4.tgz", + "integrity": "sha512-WJgX9nzTqknM393q1QJDJmoW28kUfEnybeTfVNcNAPnIx210RXm2DiXiHzfNPJNIUUb1tJnz/l4QGtJ30PgWmA==", "dev": true }, "node_modules/@swc/helpers": { @@ -733,18 +783,18 @@ "dev": true }, "node_modules/@types/lodash": { - "version": "4.17.6", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.6.tgz", - "integrity": "sha512-OpXEVoCKSS3lQqjx9GGGOapBeuW5eUboYHRlHP9urXPX25IKZ6AnP5ZRxtVf63iieUbsHxLn8NQ5Nlftc6yzAA==", + "version": "4.17.7", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.7.tgz", + "integrity": "sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==", "dev": true }, "node_modules/@types/node": { - "version": "20.14.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.9.tgz", - "integrity": "sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==", + "version": "20.16.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.1.tgz", + "integrity": "sha512-zJDo7wEadFtSyNz5QITDfRcrhqDvQI1xQNQ0VoizPjM/dVAODqqIUWbJPkvsxmTI0MYRGRikcdjMPhOssnPejQ==", "dev": true, "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.19.2" } }, "node_modules/@types/prop-types": { @@ -754,9 +804,9 @@ "dev": true }, "node_modules/@types/react": { - "version": "18.3.3", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.3.tgz", - "integrity": "sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw==", + "version": "18.3.4", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.4.tgz", + "integrity": "sha512-J7W30FTdfCxDDjmfRM+/JqLHBIyl7xUIp9kwK637FGmY7+mkSFSe6L4jpZzhj5QMfLssSDP4/i75AKkrdC7/Jw==", "dev": true, "dependencies": { "@types/prop-types": "*", @@ -919,10 +969,15 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, + "node_modules/@vercel/stega": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@vercel/stega/-/stega-0.1.2.tgz", + "integrity": "sha512-P7mafQXjkrsoyTRppnt0N21udKS9wUmLXHRyP9saLXLHw32j/FgUJ3FscSWgvSqRs4cj7wKZtwqJEvWJ2jbGmA==" + }, "node_modules/acorn": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", - "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -941,9 +996,9 @@ } }, "node_modules/agora-rtc-react": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/agora-rtc-react/-/agora-rtc-react-2.2.0.tgz", - "integrity": "sha512-AELqEjvZiWNvSHc/uS5Cm31dvcrtE3oLNcLuSRsYayokBke9fx1GhsFIvVo+elXIuLXCDm0XjhTLoF/gz780xw==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/agora-rtc-react/-/agora-rtc-react-2.3.0.tgz", + "integrity": "sha512-6D0uvXoZFlwQ/DClceJ1PUCpaHv3ebfMKFOnU0DXbiLpeMeYWM2uyuvfrcDjg4fGf033wPEzXVJHS0wx/miyJw==", "engines": { "node": ">=10" }, @@ -952,16 +1007,17 @@ } }, "node_modules/agora-rtc-sdk-ng": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/agora-rtc-sdk-ng/-/agora-rtc-sdk-ng-4.21.0.tgz", - "integrity": "sha512-EAZMdhbqIXl/PtFqEQn0O5Pmj3Tt+4oTXtd76MK1CozgbcDsc0TmFZK3qM25eaKqhzTz1wiVCwzBCWs3pF5OpQ==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/agora-rtc-sdk-ng/-/agora-rtc-sdk-ng-4.22.0.tgz", + "integrity": "sha512-mP6BDNP6oV01IQV7yXZ4wIuwDpoHaK6ARiDVKDaD+fK3LXXWqUtCweZLwzTde+OYkauPEsivqNbkAp/q6Ggqtg==", "dependencies": { - "@agora-js/media": "4.21.0", - "@agora-js/report": "4.21.0", - "@agora-js/shared": "4.21.0", + "@agora-js/media": "4.22.0", + "@agora-js/report": "4.22.0", + "@agora-js/shared": "4.22.0", "agora-rte-extension": "^1.2.4", "axios": "^1.6.8", "formdata-polyfill": "^4.0.7", + "pako": "^2.1.0", "ua-parser-js": "^0.7.34", "webrtc-adapter": "8.2.0" } @@ -1012,21 +1068,22 @@ } }, "node_modules/antd": { - "version": "5.19.0", - "resolved": "https://registry.npmjs.org/antd/-/antd-5.19.0.tgz", - "integrity": "sha512-+w+3zJUKqwU1GSXUxnKhzSGuWUqwwpHQm/voJr2X0JBdYxr9gkLhKR0HBhQjVSSJzSb86rB48fUbByHKrN05Xg==", + "version": "5.20.2", + "resolved": "https://registry.npmjs.org/antd/-/antd-5.20.2.tgz", + "integrity": "sha512-9d6Bs5ZKIV+JhB0eD7KxYnIfnhUh86kNtTGIuNiIxHFUhbuyT1DXN2SuMksDmtSfuRYZ82/C4hq+OJjWNNbmHg==", "dependencies": { - "@ant-design/colors": "^7.0.2", + "@ant-design/colors": "^7.1.0", "@ant-design/cssinjs": "^1.21.0", - "@ant-design/icons": "^5.3.7", + "@ant-design/cssinjs-utils": "^1.0.3", + "@ant-design/icons": "^5.4.0", "@ant-design/react-slick": "~1.1.2", - "@babel/runtime": "^7.24.7", + "@babel/runtime": "^7.24.8", "@ctrl/tinycolor": "^3.6.1", - "@rc-component/color-picker": "~1.5.3", + "@rc-component/color-picker": "~2.0.1", "@rc-component/mutate-observer": "^1.1.0", "@rc-component/qrcode": "~1.0.0", "@rc-component/tour": "~1.15.0", - "@rc-component/trigger": "^2.2.0", + "@rc-component/trigger": "^2.2.1", "classnames": "^2.5.1", "copy-to-clipboard": "^3.3.3", "dayjs": "^1.11.11", @@ -1036,34 +1093,34 @@ "rc-dialog": "~9.5.2", "rc-drawer": "~7.2.0", "rc-dropdown": "~4.2.0", - "rc-field-form": "~2.2.1", + "rc-field-form": "~2.4.0", "rc-image": "~7.9.0", - "rc-input": "~1.5.1", - "rc-input-number": "~9.1.0", - "rc-mentions": "~2.14.0", + "rc-input": "~1.6.3", + "rc-input-number": "~9.2.0", + "rc-mentions": "~2.15.0", "rc-menu": "~9.14.1", "rc-motion": "^2.9.2", "rc-notification": "~5.6.0", "rc-pagination": "~4.2.0", - "rc-picker": "~4.6.6", + "rc-picker": "~4.6.13", "rc-progress": "~4.0.0", "rc-rate": "~2.13.0", "rc-resize-observer": "^1.4.0", "rc-segmented": "~2.3.0", - "rc-select": "~14.15.0", - "rc-slider": "~10.6.2", + "rc-select": "~14.15.1", + "rc-slider": "~11.1.5", "rc-steps": "~6.0.1", "rc-switch": "~4.1.0", "rc-table": "~7.45.7", "rc-tabs": "~15.1.1", - "rc-textarea": "~1.7.0", + "rc-textarea": "~1.8.1", "rc-tooltip": "~6.2.0", "rc-tree": "~5.8.8", "rc-tree-select": "~5.22.1", - "rc-upload": "~4.5.2", + "rc-upload": "~4.7.0", "rc-util": "^5.43.0", "scroll-into-view-if-needed": "^3.1.0", - "throttle-debounce": "^5.0.0" + "throttle-debounce": "^5.0.2" }, "funding": { "type": "opencollective", @@ -1075,13 +1132,12 @@ } }, "node_modules/antd-img-crop": { - "version": "4.22.0", - "resolved": "https://registry.npmjs.org/antd-img-crop/-/antd-img-crop-4.22.0.tgz", - "integrity": "sha512-mfGujUUH+rf9L4ENx7yFJPkvtnEjvexWmR1/kycHzVUnMlC1UBtFMKcXgYvtNl/JTAW6jRVRc1asjzGr9idIZA==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/antd-img-crop/-/antd-img-crop-4.23.0.tgz", + "integrity": "sha512-JtQoUmR3GqXoG+hsYXRxCBC60AgUKbbvArbnd8/5UmmuyVcQzBnumfoQTdC9wczWQuxRIpkPwsdOge6CCeepqg==", "dependencies": { - "compare-versions": "6.1.0", - "react-easy-crop": "^5.0.7", - "tslib": "^2.6.2" + "react-easy-crop": "^5.0.8", + "tslib": "^2.6.3" }, "peerDependencies": { "antd": ">=4.0.0", @@ -1243,18 +1299,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array.prototype.toreversed": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/array.prototype.toreversed/-/array.prototype.toreversed-1.1.2.tgz", - "integrity": "sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - } - }, "node_modules/array.prototype.tosorted": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", @@ -1305,9 +1349,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/autoprefixer": { - "version": "10.4.19", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz", - "integrity": "sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==", + "version": "10.4.20", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz", + "integrity": "sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==", "dev": true, "funding": [ { @@ -1324,11 +1368,11 @@ } ], "dependencies": { - "browserslist": "^4.23.0", - "caniuse-lite": "^1.0.30001599", + "browserslist": "^4.23.3", + "caniuse-lite": "^1.0.30001646", "fraction.js": "^4.3.7", "normalize-range": "^0.1.2", - "picocolors": "^1.0.0", + "picocolors": "^1.0.1", "postcss-value-parser": "^4.2.0" }, "bin": { @@ -1357,18 +1401,18 @@ } }, "node_modules/axe-core": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.9.1.tgz", - "integrity": "sha512-QbUdXJVTpvUTHU7871ppZkdOLBeGUKBQWHkHrvN2V9IQWGMt61zf3B45BtzjxEJzYuj0JBjBZP/hmYS/R9pmAw==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.10.0.tgz", + "integrity": "sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g==", "dev": true, "engines": { "node": ">=4" } }, "node_modules/axios": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", - "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", + "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -1425,9 +1469,9 @@ } }, "node_modules/browserslist": { - "version": "4.23.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", - "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==", + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", + "integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==", "dev": true, "funding": [ { @@ -1444,10 +1488,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001629", - "electron-to-chromium": "^1.4.796", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.16" + "caniuse-lite": "^1.0.30001646", + "electron-to-chromium": "^1.5.4", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" }, "bin": { "browserslist": "cli.js" @@ -1471,7 +1515,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dev": true, "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -1504,9 +1547,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001639", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001639.tgz", - "integrity": "sha512-eFHflNTBIlFwP2AIKaYuBQN/apnUoKNhBdza8ZnW/h2di4LCZ4xFqYlxUxo+LQ76KFI1PGcC1QDxMbxTZpSCAg==", + "version": "1.0.30001651", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz", + "integrity": "sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==", "funding": [ { "type": "opencollective", @@ -1613,11 +1656,6 @@ "node": ">= 0.8" } }, - "node_modules/compare-versions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.0.tgz", - "integrity": "sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg==" - }, "node_modules/compute-scroll-into-view": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.0.tgz", @@ -1629,6 +1667,49 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/contentful": { + "version": "10.15.0", + "resolved": "https://registry.npmjs.org/contentful/-/contentful-10.15.0.tgz", + "integrity": "sha512-gkkMRf2FK1SQHMs2UKOuIeCdBXQKF/fMzIRCDL038lUScyE6mvnPu8aHrAQuUZwfcd58J0cibqT+iqj+pAVyGA==", + "dependencies": { + "@contentful/content-source-maps": "^0.11.0", + "@contentful/rich-text-types": "^16.0.2", + "axios": "^1.7.4", + "contentful-resolve-response": "^1.9.0", + "contentful-sdk-core": "^8.3.1", + "json-stringify-safe": "^5.0.1", + "type-fest": "^4.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/contentful-resolve-response": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/contentful-resolve-response/-/contentful-resolve-response-1.9.0.tgz", + "integrity": "sha512-LtgPx/eREpHXOX82od48zFZbFhXzYw/NfUoYK4Qf1OaKpLzmYPE4cAY4aD+rxVgnMM5JN/mQaPCsofUlJRYEUA==", + "dependencies": { + "fast-copy": "^2.1.7" + }, + "engines": { + "node": ">=4.7.2" + } + }, + "node_modules/contentful-sdk-core": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/contentful-sdk-core/-/contentful-sdk-core-8.3.1.tgz", + "integrity": "sha512-HYy4ecFA76ERxz7P0jW7hgDcL8jH+bRckv2QfAwQ4k1yPP9TvxpZwrKnlLM69JOStxVkCXP37HvbjbFnjcoWdg==", + "dependencies": { + "fast-copy": "^2.1.7", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "p-throttle": "^4.1.1", + "qs": "^6.11.2" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/copy-to-clipboard": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz", @@ -1732,14 +1813,14 @@ } }, "node_modules/dayjs": { - "version": "1.11.11", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz", - "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==" + "version": "1.11.13", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", + "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==" }, "node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -1795,7 +1876,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -1864,9 +1944,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.815", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.815.tgz", - "integrity": "sha512-OvpTT2ItpOXJL7IGcYakRjHCt8L5GrrN/wHCQsRB4PQa1X9fe+X9oen245mIId7s14xvArCGSTIq644yPUKKLg==", + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz", + "integrity": "sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q==", "dev": true }, "node_modules/emoji-regex": { @@ -1876,9 +1956,9 @@ "dev": true }, "node_modules/enhanced-resolve": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz", - "integrity": "sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -1957,7 +2037,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, "dependencies": { "get-intrinsic": "^1.2.4" }, @@ -1969,7 +2048,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, "engines": { "node": ">= 0.4" } @@ -2148,12 +2226,12 @@ } }, "node_modules/eslint-config-next": { - "version": "14.2.4", - "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.2.4.tgz", - "integrity": "sha512-Qr0wMgG9m6m4uYy2jrYJmyuNlYZzPRQq5Kvb9IDlYwn+7yq6W6sfMNFgb+9guM1KYwuIo6TIaiFhZJ6SnQ/Efw==", + "version": "14.2.6", + "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.2.6.tgz", + "integrity": "sha512-z0URA5LO6y8lS/YLN0EDW/C4LEkDODjJzA37dvLVdzCPzuewjzTe1os5g3XclZAZrQ8X8hPaSMQ2JuVWwMmrTA==", "dev": true, "dependencies": { - "@next/eslint-plugin-next": "14.2.4", + "@next/eslint-plugin-next": "14.2.6", "@rushstack/eslint-patch": "^1.3.3", "@typescript-eslint/parser": "^5.4.2 || ^6.0.0 || 7.0.0 - 7.2.0", "eslint-import-resolver-node": "^0.3.6", @@ -2336,35 +2414,35 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.34.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.3.tgz", - "integrity": "sha512-aoW4MV891jkUulwDApQbPYTVZmeuSyFrudpbTAQuj5Fv8VL+o6df2xIGpw8B0hPjAaih1/Fb0om9grCdyFYemA==", + "version": "7.35.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.35.0.tgz", + "integrity": "sha512-v501SSMOWv8gerHkk+IIQBkcGRGrO2nfybfj5pLxuJNFTPxxA3PSryhXTK+9pNbtkggheDdsC0E9Q8CuPk6JKA==", "dev": true, "dependencies": { "array-includes": "^3.1.8", "array.prototype.findlast": "^1.2.5", "array.prototype.flatmap": "^1.3.2", - "array.prototype.toreversed": "^1.1.2", "array.prototype.tosorted": "^1.1.4", "doctrine": "^2.1.0", "es-iterator-helpers": "^1.0.19", "estraverse": "^5.3.0", + "hasown": "^2.0.2", "jsx-ast-utils": "^2.4.1 || ^3.0.0", "minimatch": "^3.1.2", "object.entries": "^1.1.8", "object.fromentries": "^2.0.8", - "object.hasown": "^1.1.4", "object.values": "^1.2.0", "prop-types": "^15.8.1", "resolve": "^2.0.0-next.5", "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.11" + "string.prototype.matchall": "^4.0.11", + "string.prototype.repeat": "^1.0.0" }, "engines": { "node": ">=4" }, "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" } }, "node_modules/eslint-plugin-react-hooks": { @@ -2463,9 +2541,9 @@ } }, "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -2504,6 +2582,11 @@ "node": ">=0.10.0" } }, + "node_modules/fast-copy": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/fast-copy/-/fast-copy-2.1.7.tgz", + "integrity": "sha512-ozrGwyuCTAy7YgFCua8rmqmytECYk/JYAMXcswOcm0qvGoE3tPb7ivBeIHTOK2DiapBhDZgacIhzhQIKU5TCfA==" + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -2669,10 +2752,15 @@ "is-callable": "^1.1.3" } }, + "node_modules/foreach": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.6.tgz", + "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==" + }, "node_modules/foreground-child": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", - "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", "dev": true, "dependencies": { "cross-spawn": "^7.0.0", @@ -2746,7 +2834,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -2782,7 +2869,6 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dev": true, "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", @@ -2815,9 +2901,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.7.5", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.5.tgz", - "integrity": "sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==", + "version": "4.7.6", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.6.tgz", + "integrity": "sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA==", "dev": true, "dependencies": { "resolve-pkg-maps": "^1.0.0" @@ -2904,6 +2990,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globals/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/globalthis": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", @@ -2944,7 +3042,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -2985,7 +3082,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, "dependencies": { "es-define-property": "^1.0.0" }, @@ -2997,7 +3093,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -3009,7 +3104,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -3036,7 +3130,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, "dependencies": { "function-bind": "^1.1.2" }, @@ -3045,18 +3138,18 @@ } }, "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "engines": { "node": ">= 4" } }, "node_modules/immutable": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.6.tgz", - "integrity": "sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", + "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", "devOptional": true }, "node_modules/import-fresh": { @@ -3226,9 +3319,9 @@ } }, "node_modules/is-core-module": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz", - "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", "dev": true, "dependencies": { "hasown": "^2.0.2" @@ -3584,6 +3677,14 @@ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, + "node_modules/json-pointer": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.2.tgz", + "integrity": "sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw==", + "dependencies": { + "foreach": "^2.0.4" + } + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -3596,6 +3697,11 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, "node_modules/json2mq": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/json2mq/-/json2mq-0.2.0.tgz", @@ -3696,6 +3802,16 @@ "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -3714,13 +3830,10 @@ } }, "node_modules/lru-cache": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.3.0.tgz", - "integrity": "sha512-CQl19J/g+Hbjbv4Y3mFNNXFEL/5t/KCg8POCuUqd4rMKjGG+j1ybER83hxV58zL+dFI1PTkt3GNFSHRt+d8qEQ==", - "dev": true, - "engines": { - "node": "14 || >=16.14" - } + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true }, "node_modules/merge2": { "version": "1.4.1", @@ -3876,9 +3989,9 @@ } }, "node_modules/next-intl": { - "version": "3.15.3", - "resolved": "https://registry.npmjs.org/next-intl/-/next-intl-3.15.3.tgz", - "integrity": "sha512-jNc2xYzwv0Q4EQKvuHye9dXaDaneiP/ZCQC+AccyOQD6N9d/FZiSWT4wfVVD4B0IXC1Hhzj1QussUu+k3ynnTg==", + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/next-intl/-/next-intl-3.17.4.tgz", + "integrity": "sha512-ro3yNIaMNVhCmCdG6u9R00HllMdJXsGdKkBaBq75iM0sSnjLr7IytiGmCuZsUMDqCnGswXfXvs/FjI/lC8OAOw==", "funding": [ { "type": "individual", @@ -3886,9 +3999,9 @@ } ], "dependencies": { - "@formatjs/intl-localematcher": "^0.2.32", + "@formatjs/intl-localematcher": "^0.5.4", "negotiator": "^0.6.3", - "use-intl": "^3.15.3" + "use-intl": "^3.17.4" }, "peerDependencies": { "next": "^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0", @@ -3941,9 +4054,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", "dev": true }, "node_modules/normalize-path": { @@ -3982,7 +4095,6 @@ "version": "1.13.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", - "dev": true, "engines": { "node": ">= 0.4" }, @@ -4079,23 +4191,6 @@ "node": ">= 0.4" } }, - "node_modules/object.hasown": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.4.tgz", - "integrity": "sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg==", - "dev": true, - "dependencies": { - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/object.values": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", @@ -4169,6 +4264,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-throttle": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/p-throttle/-/p-throttle-4.1.1.tgz", + "integrity": "sha512-TuU8Ato+pRTPJoDzYD4s7ocJYcNSEZRvlxoq3hcPI2kZDZ49IQ1Wkj7/gDJc3X7XiEAAvRGtDzdXJI0tC3IL1g==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/pako": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", @@ -4271,9 +4377,9 @@ } }, "node_modules/postcss": { - "version": "8.4.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.39.tgz", - "integrity": "sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==", + "version": "8.4.41", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz", + "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==", "dev": true, "funding": [ { @@ -4337,6 +4443,20 @@ "node": ">=6" } }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -4451,9 +4571,9 @@ } }, "node_modules/rc-field-form": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/rc-field-form/-/rc-field-form-2.2.1.tgz", - "integrity": "sha512-uoNqDoR7A4tn4QTSqoWPAzrR7ZwOK5I+vuZ/qdcHtbKx+ZjEsTg7QXm2wk/jalDiSksAQmATxL0T5LJkRREdIA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/rc-field-form/-/rc-field-form-2.4.0.tgz", + "integrity": "sha512-XZ/lF9iqf9HXApIHQHqzJK5v2w4mkUMsVqAzOyWVzoiwwXEavY6Tpuw7HavgzIoD+huVff4JghSGcgEfX6eycg==", "dependencies": { "@babel/runtime": "^7.18.0", "@rc-component/async-validator": "^5.0.3", @@ -4485,9 +4605,9 @@ } }, "node_modules/rc-input": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/rc-input/-/rc-input-1.5.1.tgz", - "integrity": "sha512-+nOzQJDeIfIpNP/SgY45LXSKbuMlp4Yap2y8c+ZpU7XbLmNzUd6+d5/S75sA/52jsVE6S/AkhkkDEAOjIu7i6g==", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/rc-input/-/rc-input-1.6.3.tgz", + "integrity": "sha512-wI4NzuqBS8vvKr8cljsvnTUqItMfG1QbJoxovCgL+DX4eVUcHIjVwharwevIxyy7H/jbLryh+K7ysnJr23aWIA==", "dependencies": { "@babel/runtime": "^7.11.1", "classnames": "^2.2.1", @@ -4499,14 +4619,14 @@ } }, "node_modules/rc-input-number": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/rc-input-number/-/rc-input-number-9.1.0.tgz", - "integrity": "sha512-NqJ6i25Xn/AgYfVxynlevIhX3FuKlMwIFpucGG1h98SlK32wQwDK0zhN9VY32McOmuaqzftduNYWWooWz8pXQA==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/rc-input-number/-/rc-input-number-9.2.0.tgz", + "integrity": "sha512-5XZFhBCV5f9UQ62AZ2hFbEY8iZT/dm23Q1kAg0H8EvOgD3UDbYYJAayoVIkM3lQaCqYAW5gV0yV3vjw1XtzWHg==", "dependencies": { "@babel/runtime": "^7.10.1", "@rc-component/mini-decimal": "^1.0.1", "classnames": "^2.2.5", - "rc-input": "~1.5.0", + "rc-input": "~1.6.0", "rc-util": "^5.40.1" }, "peerDependencies": { @@ -4515,16 +4635,16 @@ } }, "node_modules/rc-mentions": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/rc-mentions/-/rc-mentions-2.14.0.tgz", - "integrity": "sha512-qKR59FMuF8PK4ZqsbWX3UuA5P1M/snzyqV6Yt3y1DCFbCEdqUGIBgQp6vEfLCO6Z0RoRFlzXtCeSlBTcDDpg1A==", + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/rc-mentions/-/rc-mentions-2.15.0.tgz", + "integrity": "sha512-f5v5i7VdqvBDXbphoqcQWmXDif2Msd2arritVoWybrVDuHE6nQ7XCYsybHbV//WylooK52BFDouFvyaRDtXZEw==", "dependencies": { "@babel/runtime": "^7.22.5", "@rc-component/trigger": "^2.0.0", "classnames": "^2.2.6", - "rc-input": "~1.5.0", + "rc-input": "~1.6.0", "rc-menu": "~9.14.0", - "rc-textarea": "~1.7.0", + "rc-textarea": "~1.8.0", "rc-util": "^5.34.1" }, "peerDependencies": { @@ -4611,9 +4731,9 @@ } }, "node_modules/rc-picker": { - "version": "4.6.6", - "resolved": "https://registry.npmjs.org/rc-picker/-/rc-picker-4.6.6.tgz", - "integrity": "sha512-sEWARCNlodubP7/IM6nXHDDIuKZ3gYd5CpS2cYcNORa2telX3nAfllqnGSGjGEFvdtyW+IqGAVatLOmFT0lKYg==", + "version": "4.6.13", + "resolved": "https://registry.npmjs.org/rc-picker/-/rc-picker-4.6.13.tgz", + "integrity": "sha512-yi4JWPGjm420Q8rHjZ6YNy2c5IfV+9EAzx2pewVRPOjJqfg7uifO/Z0uqxdl/h6AhBocuvRvtlyz6ehrAvTq7A==", "dependencies": { "@babel/runtime": "^7.24.7", "@rc-component/trigger": "^2.0.0", @@ -4710,9 +4830,9 @@ } }, "node_modules/rc-select": { - "version": "14.15.0", - "resolved": "https://registry.npmjs.org/rc-select/-/rc-select-14.15.0.tgz", - "integrity": "sha512-BDqnDLhhm/8VyyyDlX7ju06S75k6ObJvbsN86zqZ4SY1Fu2ANQxeSWPo7pnwx5nwA5JgG+HcQevtddAgsdeBVQ==", + "version": "14.15.1", + "resolved": "https://registry.npmjs.org/rc-select/-/rc-select-14.15.1.tgz", + "integrity": "sha512-mGvuwW1RMm1NCSI8ZUoRoLRK51R2Nb+QJnmiAvbDRcjh2//ulCkxeV6ZRFTECPpE1t2DPfyqZMPw90SVJzQ7wQ==", "dependencies": { "@babel/runtime": "^7.10.1", "@rc-component/trigger": "^2.1.1", @@ -4731,9 +4851,9 @@ } }, "node_modules/rc-slider": { - "version": "10.6.2", - "resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-10.6.2.tgz", - "integrity": "sha512-FjkoFjyvUQWcBo1F3RgSglky3ar0+qHLM41PlFVYB4Bj3RD8E/Mv7kqMouLFBU+3aFglMzzctAIWRwajEuueSw==", + "version": "11.1.5", + "resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-11.1.5.tgz", + "integrity": "sha512-b77H5PbjMKsvkYXAYIkn50QuFX6ICQmCTibDinI9q+BHx65/TV4TeU25+oadhSRzykxs0/vBWeKBwRyySOeWlg==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.5", @@ -4820,13 +4940,13 @@ } }, "node_modules/rc-textarea": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/rc-textarea/-/rc-textarea-1.7.0.tgz", - "integrity": "sha512-UxizYJkWkmxP3zofXgc487QiGyDmhhheDLLjIWbFtDmiru1ls30KpO8odDaPyqNUIy9ugj5djxTEuezIn6t3Jg==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/rc-textarea/-/rc-textarea-1.8.1.tgz", + "integrity": "sha512-bm36N2ZqwZAP60ZQg2OY9mPdqWC+m6UTjHc+CqEZOxb3Ia29BGHazY/s5bI8M4113CkqTzhtFUDNA078ZiOx3Q==", "dependencies": { "@babel/runtime": "^7.10.1", "classnames": "^2.2.1", - "rc-input": "~1.5.0", + "rc-input": "~1.6.0", "rc-resize-observer": "^1.0.0", "rc-util": "^5.27.0" }, @@ -4885,9 +5005,9 @@ } }, "node_modules/rc-upload": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/rc-upload/-/rc-upload-4.5.2.tgz", - "integrity": "sha512-QO3ne77DwnAPKFn0bA5qJM81QBjQi0e0NHdkvpFyY73Bea2NfITiotqJqVjHgeYPOJu5lLVR32TNGP084aSoXA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/rc-upload/-/rc-upload-4.7.0.tgz", + "integrity": "sha512-eUwxYNHlsYe5vYhKFAUGrQG95JrnPzY+BmPi1Daq39fWNl/eOc7v4UODuWrVp2LFkQBuV3cMCG/I68iub6oBrg==", "dependencies": { "@babel/runtime": "^7.18.3", "classnames": "^2.2.5", @@ -4958,9 +5078,9 @@ } }, "node_modules/react-easy-crop": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/react-easy-crop/-/react-easy-crop-5.0.7.tgz", - "integrity": "sha512-6d5IUt09M3HwdDGwrcjPVgfrOfYWAOku8sCTn/xU7b1vkEg+lExMLwW8UbR39L8ybQi0hJZTU57yprF9h5Q5Ig==", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/react-easy-crop/-/react-easy-crop-5.0.8.tgz", + "integrity": "sha512-KjulxXhR5iM7+ATN2sGCum/IyDxGw7xT0dFoGcqUP+ysaPU5Ka7gnrDa2tUHFHUoMNyPrVZ05QA+uvMgC5ym/g==", "dependencies": { "normalize-wheel": "^1.0.1", "tslib": "^2.0.1" @@ -5194,9 +5314,9 @@ } }, "node_modules/sass": { - "version": "1.77.6", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.6.tgz", - "integrity": "sha512-ByXE1oLD79GVq9Ht1PeHWCPMPB8XHpBuz1r85oByKHjZY6qV6rWnQovQzXJXuQ/XyE1Oj3iPk3lo28uzaRA2/Q==", + "version": "1.77.8", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.8.tgz", + "integrity": "sha512-4UHg6prsrycW20fqLGPShtEvo/WyHRVRHwOP4DzkUrObWoWI05QBSfzU71TVB7PFaL104TwNaHpjlWXAZbQiNQ==", "devOptional": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -5232,9 +5352,9 @@ "integrity": "sha512-d7wDPgDV3DDiqulJjKiV2865wKsJ34YI+NDREbm+FySq6WuKOikwyNQcm+doLAZ1O6ltdO0SeKle2xMpN3Brgw==" }, "node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -5247,7 +5367,6 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -5305,7 +5424,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "dev": true, "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -5482,6 +5600,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/string.prototype.repeat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz", + "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, "node_modules/string.prototype.trim": { "version": "1.2.9", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", @@ -5578,9 +5706,9 @@ } }, "node_modules/styled-components": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.11.tgz", - "integrity": "sha512-Ui0jXPzbp1phYij90h12ksljKGqF8ncGx+pjrNPsSPhbUUjWT2tD1FwGo2LF6USCnbrsIhNngDfodhxbegfEOA==", + "version": "6.1.12", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.12.tgz", + "integrity": "sha512-n/O4PzRPhbYI0k1vKKayfti3C/IGcPf+DqcrOB7O/ab9x4u/zjqraneT5N45+sIe87cxrCApXM8Bna7NYxwoTA==", "dependencies": { "@emotion/is-prop-valid": "1.2.2", "@emotion/unitless": "0.8.1", @@ -5636,6 +5764,11 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/styled-components/node_modules/stylis": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.2.tgz", + "integrity": "sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==" + }, "node_modules/styled-components/node_modules/tslib": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", @@ -5664,9 +5797,9 @@ } }, "node_modules/stylis": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.2.tgz", - "integrity": "sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==" + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.3.tgz", + "integrity": "sha512-VtF42zBHvdPi561i9mAcPlWOUonfbCtXa7qdGI+Ro4qMP8TEb+7GpbGWD1+v2TS4nohQ0m8g1FhTVmRdcIsxdQ==" }, "node_modules/supports-color": { "version": "7.2.0", @@ -5774,12 +5907,11 @@ } }, "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.25.0.tgz", + "integrity": "sha512-bRkIGlXsnGBRBQRAY56UXBm//9qH4bmJfFvq83gSz41N282df+fjy8ofcEgc1sM8geNt5cl6mC2g9Fht1cs8Aw==", "engines": { - "node": ">=10" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5859,9 +5991,9 @@ } }, "node_modules/typescript": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz", - "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -5909,15 +6041,15 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", "dev": true }, "node_modules/update-browserslist-db": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", - "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", + "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", "dev": true, "funding": [ { @@ -5954,10 +6086,11 @@ } }, "node_modules/use-intl": { - "version": "3.15.3", - "resolved": "https://registry.npmjs.org/use-intl/-/use-intl-3.15.3.tgz", - "integrity": "sha512-cHSeFy2cy4u6tT8A7KAcDbs+Hz6lytXClVSsOI1leD6OOrpakNxsmyLa8SMrttOAUQto5kV1f4LVhiX/lpkO3g==", + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/use-intl/-/use-intl-3.17.4.tgz", + "integrity": "sha512-6t3tScvli9TvIBwordjZul59ubYzStcMTCgYJEkEikVGqBJKzfpdpifZhRTU7CxgSoB63rt9+AOPGKklXvtebA==", "dependencies": { + "@formatjs/fast-memoize": "^2.2.0", "intl-messageformat": "^10.5.14" }, "peerDependencies": { @@ -6028,13 +6161,13 @@ } }, "node_modules/which-builtin-type": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", - "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.4.tgz", + "integrity": "sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w==", "dev": true, "dependencies": { - "function.prototype.name": "^1.1.5", - "has-tostringtag": "^1.0.0", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", "is-async-function": "^2.0.0", "is-date-object": "^1.0.5", "is-finalizationregistry": "^1.0.2", @@ -6043,8 +6176,8 @@ "is-weakref": "^1.0.2", "isarray": "^2.0.5", "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.9" + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.15" }, "engines": { "node": ">= 0.4"