From fc77b548d8d61530b2d158ff83f088bed12d5080 Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Fri, 8 Apr 2022 10:33:06 +0200 Subject: [PATCH] fix(types/react): downgrade to <18 --- CHANGELOG.md | 2 + .../build/Center/ArtboardController.tsx | 18 +- client/components/build/Center/Header.tsx | 16 +- client/components/build/Center/Page.tsx | 4 +- .../build/LeftSidebar/LeftSidebar.tsx | 4 +- .../build/LeftSidebar/sections/Basics.tsx | 20 +- .../build/LeftSidebar/sections/Location.tsx | 21 +- .../LeftSidebar/sections/PhotoFilters.tsx | 12 +- .../LeftSidebar/sections/PhotoUpload.tsx | 6 +- .../build/LeftSidebar/sections/Profiles.tsx | 6 +- .../build/LeftSidebar/sections/Section.tsx | 2 +- .../LeftSidebar/sections/SectionSettings.tsx | 4 +- .../build/RightSidebar/sections/CustomCSS.tsx | 2 +- .../build/RightSidebar/sections/Export.tsx | 14 +- .../build/RightSidebar/sections/Layout.tsx | 16 +- .../build/RightSidebar/sections/Links.tsx | 18 +- .../build/RightSidebar/sections/Settings.tsx | 38 +- .../build/RightSidebar/sections/Sharing.tsx | 10 +- .../build/RightSidebar/sections/Templates.tsx | 2 +- .../build/RightSidebar/sections/Theme.tsx | 8 +- .../RightSidebar/sections/Typography.tsx | 16 +- client/components/dashboard/ResumePreview.tsx | 20 +- client/components/shared/Avatar.tsx | 4 +- client/components/shared/Footer.tsx | 2 +- client/components/shared/Heading.tsx | 6 +- client/components/shared/List.tsx | 2 +- client/components/shared/ListItem.tsx | 8 +- client/modals/auth/ForgotPasswordModal.tsx | 10 +- client/modals/auth/LoginModal.tsx | 14 +- client/modals/auth/RegisterModal.tsx | 18 +- client/modals/auth/ResetPasswordModal.tsx | 10 +- client/modals/builder/sections/AwardModal.tsx | 14 +- .../builder/sections/CertificateModal.tsx | 14 +- .../modals/builder/sections/CustomModal.tsx | 24 +- .../builder/sections/EducationModal.tsx | 24 +- .../modals/builder/sections/InterestModal.tsx | 8 +- .../modals/builder/sections/LanguageModal.tsx | 12 +- .../modals/builder/sections/ProfileModal.tsx | 14 +- .../modals/builder/sections/ProjectModal.tsx | 18 +- .../builder/sections/PublicationModal.tsx | 14 +- .../builder/sections/ReferenceModal.tsx | 14 +- client/modals/builder/sections/SkillModal.tsx | 14 +- .../builder/sections/VolunteerModal.tsx | 16 +- client/modals/builder/sections/WorkModal.tsx | 18 +- client/modals/dashboard/CreateResumeModal.tsx | 12 +- .../modals/dashboard/ImportExternalModal.tsx | 20 +- client/modals/dashboard/RenameResumeModal.tsx | 8 +- client/package.json | 6 +- client/pages/[username]/[slug]/build.tsx | 2 +- client/pages/dashboard.tsx | 10 +- client/pages/index.tsx | 44 +- client/public/sitemap-0.xml | 60 +- client/utils/date.ts | 2 +- docs/package.json | 6 +- package.json | 2 +- pnpm-lock.yaml | 2112 ++++------------- 56 files changed, 873 insertions(+), 1948 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6258f32..6ccd4af1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [3.3.2](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.3.1...v3.3.2) (2022-04-08) + ### [3.3.1](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.3.0...v3.3.1) (2022-04-08) ## [3.3.0](https://github.com/AmruthPillai/Reactive-Resume/compare/v3.2.11...v3.3.0) (2022-04-08) diff --git a/client/components/build/Center/ArtboardController.tsx b/client/components/build/Center/ArtboardController.tsx index 1af6af4a..fe3426c0 100644 --- a/client/components/build/Center/ArtboardController.tsx +++ b/client/components/build/Center/ArtboardController.tsx @@ -52,7 +52,7 @@ const ArtboardController: React.FC = ({ zoomIn, zoomOut, c const url = getResumeUrl(resume, { withHost: true }); await navigator.clipboard.writeText(url); - toast.success(t('common.toast.success.resume-link-copied')); + toast.success(t('common.toast.success.resume-link-copied')); }; const handleExportPDF = async () => { @@ -75,19 +75,19 @@ const ArtboardController: React.FC = ({ zoomIn, zoomOut, c })} >
- + ('builder.controller.tooltip.zoom-in')}> zoomIn(0.25)}> - + ('builder.controller.tooltip.zoom-out')}> zoomOut(0.25)}> - + ('builder.controller.tooltip.center-artboard')}> centerView(0.95)}> @@ -98,7 +98,7 @@ const ArtboardController: React.FC = ({ zoomIn, zoomOut, c {isDesktop && ( <> {pages.length > 1 && ( - + ('builder.controller.tooltip.toggle-orientation')}> {orientation === 'vertical' ? ( @@ -109,13 +109,13 @@ const ArtboardController: React.FC = ({ zoomIn, zoomOut, c )} - + ('builder.controller.tooltip.toggle-page-break-line')}> - + ('builder.controller.tooltip.toggle-sidebars')}> @@ -125,13 +125,13 @@ const ArtboardController: React.FC = ({ zoomIn, zoomOut, c )} - + ('builder.controller.tooltip.copy-link')}> - + ('builder.controller.tooltip.export-pdf')}> diff --git a/client/components/build/Center/Header.tsx b/client/components/build/Center/Header.tsx index 8299800b..1fe53c70 100644 --- a/client/components/build/Center/Header.tsx +++ b/client/components/build/Center/Header.tsx @@ -133,7 +133,7 @@ const Header = () => { const url = getResumeUrl(resume, { withHost: true }); await navigator.clipboard.writeText(url); - toast.success(t('common.toast.success.resume-link-copied')); + toast.success(t('common.toast.success.resume-link-copied')); }; return ( @@ -166,14 +166,14 @@ const Header = () => { - {t('builder.header.menu.rename')} + {t('builder.header.menu.rename')} - {t('builder.header.menu.duplicate')} + {t('builder.header.menu.duplicate')} {resume.public ? ( @@ -181,27 +181,27 @@ const Header = () => { - {t('builder.header.menu.share-link')} + {t('builder.header.menu.share-link')} ) : ( - + ('builder.header.menu.tooltips.share-link')}>
- {t('builder.header.menu.share-link')} + {t('builder.header.menu.share-link')}
)} - + ('builder.header.menu.tooltips.delete')}> - {t('builder.header.menu.delete')} + {t('builder.header.menu.delete')} diff --git a/client/components/build/Center/Page.tsx b/client/components/build/Center/Page.tsx index 35c40b26..ff65dee0 100644 --- a/client/components/build/Center/Page.tsx +++ b/client/components/build/Center/Page.tsx @@ -48,9 +48,7 @@ const Page: React.FC = ({ page, showPageNumbers = false }) => {
{showPageNumbers && ( -

- {t('builder.common.glossary.page')} {page + 1} -

+

{`${t('builder.common.glossary.page')} {page + 1}`}

)} ); diff --git a/client/components/build/LeftSidebar/LeftSidebar.tsx b/client/components/build/LeftSidebar/LeftSidebar.tsx index 8944ce56..17101122 100644 --- a/client/components/build/LeftSidebar/LeftSidebar.tsx +++ b/client/components/build/LeftSidebar/LeftSidebar.tsx @@ -114,7 +114,9 @@ const LeftSidebar = () => {
diff --git a/client/components/build/LeftSidebar/sections/Basics.tsx b/client/components/build/LeftSidebar/sections/Basics.tsx index 6f3d2c5b..845d9358 100644 --- a/client/components/build/LeftSidebar/sections/Basics.tsx +++ b/client/components/build/LeftSidebar/sections/Basics.tsx @@ -24,7 +24,7 @@ const Basics = () => { return ( <> - + ('builder.leftSidebar.sections.basics.heading')} />
@@ -33,10 +33,10 @@ const Basics = () => {
- + ('builder.leftSidebar.sections.basics.name.label')} path="basics.name" /> {
- - - + ('builder.common.form.email.label')} + path="basics.email" + className="sm:col-span-2" + /> + ('builder.common.form.phone.label')} path="basics.phone" /> + ('builder.common.form.url.label')} path="basics.website" /> ('builder.leftSidebar.sections.basics.headline.label')} path="basics.headline" className="sm:col-span-2" /> ('builder.common.form.summary.label')} path="basics.summary" className="sm:col-span-2" markdownSupported diff --git a/client/components/build/LeftSidebar/sections/Location.tsx b/client/components/build/LeftSidebar/sections/Location.tsx index cced13d8..2ddb33f8 100644 --- a/client/components/build/LeftSidebar/sections/Location.tsx +++ b/client/components/build/LeftSidebar/sections/Location.tsx @@ -8,19 +8,28 @@ const Location = () => { return ( <> - + ('builder.leftSidebar.sections.location.heading')} />
('builder.leftSidebar.sections.location.address.label')} path="basics.location.address" className="sm:col-span-2" /> - - - ('builder.leftSidebar.sections.location.city.label')} + path="basics.location.city" + /> + ('builder.leftSidebar.sections.location.region.label')} + path="basics.location.region" + /> + ('builder.leftSidebar.sections.location.country.label')} + path="basics.location.country" + /> + ('builder.leftSidebar.sections.location.postal-code.label')} path="basics.location.postalCode" />
diff --git a/client/components/build/LeftSidebar/sections/PhotoFilters.tsx b/client/components/build/LeftSidebar/sections/PhotoFilters.tsx index 99692c6b..7ed422ab 100644 --- a/client/components/build/LeftSidebar/sections/PhotoFilters.tsx +++ b/client/components/build/LeftSidebar/sections/PhotoFilters.tsx @@ -32,7 +32,7 @@ const PhotoFilters = () => { return (
-

{t('builder.leftSidebar.sections.basics.photo-filters.size.heading')}

+

{t('builder.leftSidebar.sections.basics.photo-filters.size.heading')}

{
-

{t('builder.leftSidebar.sections.basics.photo-filters.effects.heading')}

+

+ {t('builder.leftSidebar.sections.basics.photo-filters.effects.heading')} +

('builder.leftSidebar.sections.basics.photo-filters.effects.grayscale.label')} control={ handleSetGrayscale(value)} /> } /> ('builder.leftSidebar.sections.basics.photo-filters.effects.border.label')} control={ handleSetBorder(value)} />} />
@@ -74,7 +76,7 @@ const PhotoFilters = () => {
-

{t('builder.leftSidebar.sections.basics.photo-filters.shape.heading')}

+

{t('builder.leftSidebar.sections.basics.photo-filters.shape.heading')}

handleChangeShape(value)}> diff --git a/client/components/build/LeftSidebar/sections/PhotoUpload.tsx b/client/components/build/LeftSidebar/sections/PhotoUpload.tsx index 52b3e268..21b7d2cf 100644 --- a/client/components/build/LeftSidebar/sections/PhotoUpload.tsx +++ b/client/components/build/LeftSidebar/sections/PhotoUpload.tsx @@ -49,7 +49,7 @@ const PhotoUpload: React.FC = () => { const file = event.target.files[0]; if (file.size > FILE_UPLOAD_MAX_SIZE) { - toast.error(t('common.toast.error.upload-photo-size')); + toast.error(t('common.toast.error.upload-photo-size')); return; } @@ -67,8 +67,8 @@ const PhotoUpload: React.FC = () => { ('builder.leftSidebar.sections.basics.photo-upload.tooltip.upload') as string) + : (t('builder.leftSidebar.sections.basics.photo-upload.tooltip.remove') as string) } > diff --git a/client/components/build/LeftSidebar/sections/Profiles.tsx b/client/components/build/LeftSidebar/sections/Profiles.tsx index 816ed4cc..796535a7 100644 --- a/client/components/build/LeftSidebar/sections/Profiles.tsx +++ b/client/components/build/LeftSidebar/sections/Profiles.tsx @@ -28,7 +28,7 @@ const Profiles = () => { return ( <> - + ('builder.leftSidebar.sections.profiles.heading')} /> {
diff --git a/client/components/build/LeftSidebar/sections/Section.tsx b/client/components/build/LeftSidebar/sections/Section.tsx index 0a3fd62d..edab14ea 100644 --- a/client/components/build/LeftSidebar/sections/Section.tsx +++ b/client/components/build/LeftSidebar/sections/Section.tsx @@ -74,7 +74,7 @@ const Section: React.FC = ({ diff --git a/client/components/build/LeftSidebar/sections/SectionSettings.tsx b/client/components/build/LeftSidebar/sections/SectionSettings.tsx index 813b5a17..74c91eb9 100644 --- a/client/components/build/LeftSidebar/sections/SectionSettings.tsx +++ b/client/components/build/LeftSidebar/sections/SectionSettings.tsx @@ -32,7 +32,7 @@ const SectionSettings: React.FC = ({ path }) => { return (
- + ('builder.common.columns.tooltip')}> {columns} @@ -48,7 +48,7 @@ const SectionSettings: React.FC = ({ path }) => { }} >
-

{t('builder.common.columns.heading')}

+

{t('builder.common.columns.heading')}

handleSetColumns(value)}> {[1, 2, 3, 4].map((index) => ( diff --git a/client/components/build/RightSidebar/sections/CustomCSS.tsx b/client/components/build/RightSidebar/sections/CustomCSS.tsx index 8c7aafbf..f071536c 100644 --- a/client/components/build/RightSidebar/sections/CustomCSS.tsx +++ b/client/components/build/RightSidebar/sections/CustomCSS.tsx @@ -25,7 +25,7 @@ const CustomCSS = () => { return ( <> - + ('builder.rightSidebar.sections.css.heading')} isHideable /> { const pdfListItemText = { normal: { - primary: t('builder.rightSidebar.sections.export.pdf.normal.primary'), - secondary: t('builder.rightSidebar.sections.export.pdf.normal.secondary'), + primary: t('builder.rightSidebar.sections.export.pdf.normal.primary'), + secondary: t('builder.rightSidebar.sections.export.pdf.normal.secondary'), }, loading: { - primary: t('builder.rightSidebar.sections.export.pdf.loading.primary'), - secondary: t('builder.rightSidebar.sections.export.pdf.loading.secondary'), + primary: t('builder.rightSidebar.sections.export.pdf.loading.primary'), + secondary: t('builder.rightSidebar.sections.export.pdf.loading.secondary'), }, }; @@ -53,7 +53,7 @@ const Export = () => { return ( <> - + ('builder.rightSidebar.sections.export.heading')} /> @@ -61,8 +61,8 @@ const Export = () => { ('builder.rightSidebar.sections.export.json.primary')} + secondary={t('builder.rightSidebar.sections.export.json.secondary')} /> diff --git a/client/components/build/RightSidebar/sections/Layout.tsx b/client/components/build/RightSidebar/sections/Layout.tsx index dd172b79..3d69a6d0 100644 --- a/client/components/build/RightSidebar/sections/Layout.tsx +++ b/client/components/build/RightSidebar/sections/Layout.tsx @@ -60,9 +60,9 @@ const Layout = () => { <> ('builder.rightSidebar.sections.layout.heading')} action={ - + ('builder.rightSidebar.sections.layout.tooltip.reset-layout')}> @@ -76,12 +76,16 @@ const Layout = () => {

- {t('builder.common.glossary.page')} {pageIndex + 1} + {t('builder.common.glossary.page')} {pageIndex + 1}

('builder.common.actions.delete', { + token: t('builder.common.glossary.page'), + }) as string + } > handleDeletePage(pageIndex)}> @@ -113,7 +117,7 @@ const Layout = () => { [styles.disabled]: !get(resumeSections, `${sectionId}.visible`, true), })} > - {get(resumeSections, `${sectionId}.name`)} + {get(resumeSections, `${sectionId}.name`, '')}
)} @@ -132,7 +136,7 @@ const Layout = () => {
diff --git a/client/components/build/RightSidebar/sections/Links.tsx b/client/components/build/RightSidebar/sections/Links.tsx index 13339139..caabed14 100644 --- a/client/components/build/RightSidebar/sections/Links.tsx +++ b/client/components/build/RightSidebar/sections/Links.tsx @@ -12,39 +12,41 @@ const Links = () => { return ( <> - + ('builder.rightSidebar.sections.links.heading')} />

- {t('builder.rightSidebar.sections.links.donate.heading')} + {t('builder.rightSidebar.sections.links.donate.heading')}

-

{t('builder.rightSidebar.sections.links.donate.body')}

+

{t('builder.rightSidebar.sections.links.donate.body')}

- +

- {t('builder.rightSidebar.sections.links.bugs-features.heading')} + {t('builder.rightSidebar.sections.links.bugs-features.heading')}

-

{t('builder.rightSidebar.sections.links.bugs-features.body')}

+

{t('builder.rightSidebar.sections.links.bugs-features.body')}

- +
diff --git a/client/components/build/RightSidebar/sections/Settings.tsx b/client/components/build/RightSidebar/sections/Settings.tsx index ad88b259..05b02f48 100644 --- a/client/components/build/RightSidebar/sections/Settings.tsx +++ b/client/components/build/RightSidebar/sections/Settings.tsx @@ -85,13 +85,13 @@ const Settings = () => { return ( <> - + ('builder.rightSidebar.sections.settings.heading')} /> {/* Global Settings */} <> - {t('builder.rightSidebar.sections.settings.global.heading')} + {t('builder.rightSidebar.sections.settings.global.heading')} @@ -99,7 +99,7 @@ const Settings = () => { ('builder.rightSidebar.sections.settings.global.theme.primary')} secondary={themeString} /> handleSetTheme(value)} /> @@ -108,8 +108,8 @@ const Settings = () => { ('builder.rightSidebar.sections.settings.global.date.primary')} + secondary={t('builder.rightSidebar.sections.settings.global.date.secondary')} /> disableClearable @@ -124,8 +124,8 @@ const Settings = () => { ('builder.rightSidebar.sections.settings.global.language.primary')} + secondary={t('builder.rightSidebar.sections.settings.global.language.secondary')} /> disableClearable @@ -148,15 +148,17 @@ const Settings = () => { {/* Page Settings */} <> - {t('builder.rightSidebar.sections.settings.page.heading')} + + {t('builder.rightSidebar.sections.settings.page.heading')} + ('builder.rightSidebar.sections.settings.page.orientation.primary')} secondary={ pages.length === 1 - ? t('builder.rightSidebar.sections.settings.page.orientation.disabled') - : t('builder.rightSidebar.sections.settings.page.orientation.secondary') + ? t('builder.rightSidebar.sections.settings.page.orientation.disabled') + : t('builder.rightSidebar.sections.settings.page.orientation.secondary') } /> { ('builder.rightSidebar.sections.settings.page.break-line.primary')} + secondary={t('builder.rightSidebar.sections.settings.page.break-line.secondary')} /> dispatch(togglePageBreakLine())} /> @@ -179,7 +181,7 @@ const Settings = () => { {/* Resume Settings */} <> - {t('builder.rightSidebar.sections.settings.resume.heading')} + {t('builder.rightSidebar.sections.settings.resume.heading')} @@ -188,8 +190,8 @@ const Settings = () => { ('builder.rightSidebar.sections.settings.resume.sample.primary')} + secondary={t('builder.rightSidebar.sections.settings.resume.sample.secondary')} /> @@ -200,8 +202,8 @@ const Settings = () => { ('builder.rightSidebar.sections.settings.resume.reset.primary')} + secondary={t('builder.rightSidebar.sections.settings.resume.reset.secondary')} /> diff --git a/client/components/build/RightSidebar/sections/Sharing.tsx b/client/components/build/RightSidebar/sections/Sharing.tsx index e4e1d840..62e32c1c 100644 --- a/client/components/build/RightSidebar/sections/Sharing.tsx +++ b/client/components/build/RightSidebar/sections/Sharing.tsx @@ -29,19 +29,19 @@ const Sharing = () => { await navigator.clipboard.writeText(text); - toast.success(t('common.toast.success.resume-link-copied')); + toast.success(t('common.toast.success.resume-link-copied')); }; return ( <> - + ('builder.rightSidebar.sections.sharing.heading')} />
('builder.rightSidebar.sections.sharing.visibility.title')} + secondary={t('builder.rightSidebar.sections.sharing.visibility.subtitle')} /> handleSetVisibility(value)} />
@@ -63,7 +63,7 @@ const Sharing = () => {
('builder.rightSidebar.sections.sharing.short-url.label')} control={ setShowShortUrl(value)} /> } diff --git a/client/components/build/RightSidebar/sections/Templates.tsx b/client/components/build/RightSidebar/sections/Templates.tsx index 09272c35..b142d2c6 100644 --- a/client/components/build/RightSidebar/sections/Templates.tsx +++ b/client/components/build/RightSidebar/sections/Templates.tsx @@ -24,7 +24,7 @@ const Templates = () => { return ( <> - + ('builder.rightSidebar.sections.templates.heading')} />
{Object.values(templateMap).map((template) => ( diff --git a/client/components/build/RightSidebar/sections/Theme.tsx b/client/components/build/RightSidebar/sections/Theme.tsx index 80e73108..2c50ce06 100644 --- a/client/components/build/RightSidebar/sections/Theme.tsx +++ b/client/components/build/RightSidebar/sections/Theme.tsx @@ -24,7 +24,7 @@ const Theme = () => { return ( <> - + ('builder.rightSidebar.sections.theme.heading')} />
@@ -34,18 +34,18 @@ const Theme = () => {
('builder.rightSidebar.sections.theme.form.primary.label')} color={primary} className="col-span-2" onChange={(color) => handleChange('primary', color)} /> ('builder.rightSidebar.sections.theme.form.background.label')} color={background} onChange={(color) => handleChange('background', color)} /> ('builder.rightSidebar.sections.theme.form.text.label')} color={text} onChange={(color) => handleChange('text', color)} /> diff --git a/client/components/build/RightSidebar/sections/Typography.tsx b/client/components/build/RightSidebar/sections/Typography.tsx index b0eae851..08f5ac41 100644 --- a/client/components/build/RightSidebar/sections/Typography.tsx +++ b/client/components/build/RightSidebar/sections/Typography.tsx @@ -64,7 +64,7 @@ const Widgets: React.FC = ({ label, category }) => { step={1} marks={[ { value: 12, label: '12px' }, - { value: 24, label: t('builder.rightSidebar.sections.typography.form.font-size.label') }, + { value: 24, label: t('builder.rightSidebar.sections.typography.form.font-size.label') }, { value: 36, label: '36px' }, ]} valueLabelDisplay="auto" @@ -82,7 +82,10 @@ const Widgets: React.FC = ({ label, category }) => { value={fonts.find((font) => font.family === family[category])} onChange={(_, font: Font | null) => handleChange('family', font)} renderInput={(params) => ( - + ('builder.rightSidebar.sections.typography.form.font-family.label')} + /> )} />
@@ -95,10 +98,13 @@ const Typography = () => { return ( <> - + ('builder.rightSidebar.sections.typography.heading')} /> - - + ('builder.rightSidebar.sections.typography.widgets.headings.label')} + category="heading" + /> + ('builder.rightSidebar.sections.typography.widgets.body.label')} category="body" /> ); }; diff --git a/client/components/dashboard/ResumePreview.tsx b/client/components/dashboard/ResumePreview.tsx index 994a9e06..fef6abe9 100644 --- a/client/components/dashboard/ResumePreview.tsx +++ b/client/components/dashboard/ResumePreview.tsx @@ -94,7 +94,7 @@ const ResumePreview: React.FC = ({ resume }) => { const url = getResumeUrl(resume, { withHost: true }); await navigator.clipboard.writeText(url); - toast.success(t('common.toast.success.resume-link-copied')); + toast.success(t('common.toast.success.resume-link-copied')); }; const handleDelete = async () => { @@ -124,7 +124,7 @@ const ResumePreview: React.FC = ({ resume }) => {