From d8ab2e56cee11842ebfb758b8f268741dd4dc634 Mon Sep 17 00:00:00 2001 From: Jason Dicker <110084728+jasondicker@users.noreply.github.com> Date: Wed, 22 Nov 2023 14:19:00 +0200 Subject: [PATCH] package upgrade (#336) * tanstack/react-query package upgrade to v5.8.4 * package.json upgrade (with styling fixes for daisyui major version breaking changes) * tanstack upgrage breaking change fix --- src/web/package.json | 52 +- .../src/components/NavBar/SignInButton.tsx | 2 +- src/web/src/components/NavBar/UserMenu.tsx | 2 +- .../Opportunity/OpportunityCompletionEdit.tsx | 4 +- .../OpportunityFilterHorizontal.tsx | 12 +- .../Opportunity/OpportunityFilterVertical.tsx | 18 +- .../Organisation/Upsert/OrgInfoEdit.tsx | 441 ++++++------- .../Organisation/Upsert/OrgRolesEdit.tsx | 2 +- .../Schema/SchemaAttributesEdit.tsx | 7 +- src/web/src/components/SearchInput.tsx | 8 +- src/web/src/components/SearchInputLarge.tsx | 30 +- .../src/components/Status/AccessDenied.tsx | 2 +- .../src/components/Status/Unauthorized.tsx | 2 +- .../components/Status/UnderConstruction.tsx | 2 +- src/web/src/context/useHomeLink.tsx | 4 +- src/web/src/pages/401.tsx | 2 +- src/web/src/pages/404.tsx | 2 +- src/web/src/pages/500.tsx | 2 +- src/web/src/pages/_app.tsx | 6 +- .../admin/schemas/[[...query]]/index.tsx | 14 +- .../src/pages/admin/schemas/[id]/index.tsx | 57 +- .../opportunities/[[...query]]/index.tsx | 2 +- .../opportunities/[opportunityId]/index.tsx | 31 +- .../organisations/[[...query]]/index.tsx | 18 +- src/web/src/pages/organisations/[id]/edit.tsx | 14 +- .../src/pages/organisations/[id]/index.tsx | 7 +- src/web/src/pages/organisations/[id]/info.tsx | 7 +- .../[id]/opportunities/[[...query]]/index.tsx | 16 +- .../opportunities/[opportunityId]/index.tsx | 222 ++++--- .../opportunities/[opportunityId]/info.tsx | 17 +- .../[id]/verifications/[[...query]]/index.tsx | 109 +-- .../src/pages/organisations/[id]/verify.tsx | 18 +- .../pages/organisations/register/index.tsx | 11 +- src/web/src/pages/user/settings.tsx | 33 +- .../src/pages/yoid/passport/[[...query]].tsx | 11 +- src/web/yarn.lock | 623 ++++++++++-------- 36 files changed, 939 insertions(+), 871 deletions(-) diff --git a/src/web/package.json b/src/web/package.json index 4837fddc7..84cd036d6 100644 --- a/src/web/package.json +++ b/src/web/package.json @@ -14,25 +14,25 @@ "@fontsource/open-sans": "^5.0.17", "@hookform/resolvers": "^3.3.2", "@react-google-maps/api": "^2.19.2", - "@sentry/nextjs": "^7.77.0", + "@sentry/nextjs": "^7.81.1", "@t3-oss/env-nextjs": "^0.7.1", - "@tanstack/react-query": "^4.33.0", - "axios": "^1.6.0", - "daisyui": "^3.9.4", - "jotai": "^2.5.0", + "@tanstack/react-query": "^5.8.4", + "axios": "^1.6.2", + "daisyui": "^4.4.2", + "jotai": "^2.5.1", "moment": "^2.29.4", - "next": "^14.0.1", - "next-auth": "^4.24.4", + "next": "^14.0.3", + "next-auth": "^4.24.5", "next-themes": "^0.2.1", "react": "^18.2.0", - "react-datepicker": "^4.16.0", + "react-datepicker": "^4.23.0", "react-dom": "^18.2.0", "react-google-map-picker": "^1.2.3", - "react-hook-form": "^7.47.0", - "react-icons": "^4.11.0", + "react-hook-form": "^7.48.2", + "react-icons": "^4.12.0", "react-modal": "^3.16.1", "react-moment": "^1.1.3", - "react-select": "^5.7.7", + "react-select": "^5.8.0", "react-toastify": "^9.1.3", "sass": "^1.69.5", "sharp": "^0.32.6", @@ -40,32 +40,32 @@ "zod": "^3.22.4" }, "devDependencies": { - "@next/bundle-analyzer": "^14.0.1", - "@types/eslint": "^8.44.6", - "@types/next-pwa": "^5.6.8", - "@types/node": "^20.8.10", + "@next/bundle-analyzer": "^14.0.3", + "@types/eslint": "^8.44.7", + "@types/next-pwa": "^5.6.9", + "@types/node": "^20.9.4", "@types/prettier": "^3.0.0", - "@types/react": "^18.2.34", - "@types/react-datepicker": "^4.19.0", - "@types/react-dom": "^18.2.14", - "@types/react-modal": "^3.16.2", - "@typescript-eslint/eslint-plugin": "6.9.1", - "@typescript-eslint/parser": "6.9.1", + "@types/react": "^18.2.38", + "@types/react-datepicker": "^4.19.3", + "@types/react-dom": "^18.2.17", + "@types/react-modal": "^3.16.3", + "@typescript-eslint/eslint-plugin": "6.12.0", + "@typescript-eslint/parser": "6.12.0", "autoprefixer": "^10.4.16", "cross-env": "^7.0.3", - "eslint": "^8.52.0", - "eslint-config-next": "^14.0.1", + "eslint": "^8.54.0", + "eslint-config-next": "^14.0.3", "filepond": "^4.30.4", "filepond-plugin-file-validate-type": "^1.2.8", "filepond-plugin-image-exif-orientation": "^1.0.11", "filepond-plugin-image-preview": "^4.6.11", "next-pwa": "^5.6.0", "postcss": "^8.4.31", - "prettier": "^3.0.3", - "prettier-plugin-tailwindcss": "^0.5.6", + "prettier": "^3.1.0", + "prettier-plugin-tailwindcss": "^0.5.7", "react-filepond": "^7.1.2", "tailwindcss": "^3.3.5", - "typescript": "^5.2.2" + "typescript": "^5.3.2" }, "ct3aMetadata": { "initVersion": "7.16.0" diff --git a/src/web/src/components/NavBar/SignInButton.tsx b/src/web/src/components/NavBar/SignInButton.tsx index 72665d673..bdb08be88 100644 --- a/src/web/src/components/NavBar/SignInButton.tsx +++ b/src/web/src/components/NavBar/SignInButton.tsx @@ -28,7 +28,7 @@ export const SignInButton: React.FC = () => { )} {!isButtonLoading && } -

Sign In

+

Sign In

); }; diff --git a/src/web/src/components/NavBar/UserMenu.tsx b/src/web/src/components/NavBar/UserMenu.tsx index 271c5debe..c07ed9fd5 100644 --- a/src/web/src/components/NavBar/UserMenu.tsx +++ b/src/web/src/components/NavBar/UserMenu.tsx @@ -14,7 +14,7 @@ import { IoMdSettings, } from "react-icons/io"; import ReactModal from "react-modal"; -import { ROLE_ADMIN, ROLE_ORG_ADMIN } from "~/lib/constants"; +import { ROLE_ADMIN } from "~/lib/constants"; import { shimmer, toBase64 } from "~/lib/image"; import { RoleView, diff --git a/src/web/src/components/Opportunity/OpportunityCompletionEdit.tsx b/src/web/src/components/Opportunity/OpportunityCompletionEdit.tsx index 34be6b871..371b1619c 100644 --- a/src/web/src/components/Opportunity/OpportunityCompletionEdit.tsx +++ b/src/web/src/components/Opportunity/OpportunityCompletionEdit.tsx @@ -323,7 +323,7 @@ export const OpportunityCompletionEdit: React.FC = ({ name="dateStart" render={({ field: { onChange, value } }) => ( onChange(toISOStringForTimezone(date)) } @@ -349,7 +349,7 @@ export const OpportunityCompletionEdit: React.FC = ({ name="dateEnd" render={({ field: { onChange, value } }) => ( onChange(toISOStringForTimezone(date)) } diff --git a/src/web/src/components/Opportunity/OpportunityFilterHorizontal.tsx b/src/web/src/components/Opportunity/OpportunityFilterHorizontal.tsx index d982e36cd..b30ac47e6 100644 --- a/src/web/src/components/Opportunity/OpportunityFilterHorizontal.tsx +++ b/src/web/src/components/Opportunity/OpportunityFilterHorizontal.tsx @@ -204,7 +204,7 @@ export const OpportunityFilterHorizontal: React.FC = ({ render={({ field: { onChange, value } }) => ( "input input-bordered input-xs", + control: () => "input input-xs", }} isMulti={true} options={lookups_countries.map((c) => ({ @@ -289,7 +289,7 @@ export const OpportunityFilterHorizontal: React.FC = ({ render={({ field: { onChange, value } }) => ( "input input-bordered input-xs", + control: () => "input input-xs", }} isMulti={true} options={lookups_organisations.map((c) => ({ @@ -376,7 +376,7 @@ export const OpportunityFilterHorizontal: React.FC = ({ render={({ field: { onChange, value } }) => ( "input input-bordered input-xs", + control: () => "input input-xs", }} isMulti={true} options={lookups_zltoRewardRanges.map((c) => ({ diff --git a/src/web/src/components/Opportunity/OpportunityFilterVertical.tsx b/src/web/src/components/Opportunity/OpportunityFilterVertical.tsx index 626c0729d..d9f9f0ff8 100644 --- a/src/web/src/components/Opportunity/OpportunityFilterVertical.tsx +++ b/src/web/src/components/Opportunity/OpportunityFilterVertical.tsx @@ -104,7 +104,7 @@ export const OpportunityFilterVertical: React.FC = ({
-
+
Topics
@@ -199,7 +199,7 @@ export const OpportunityFilterVertical: React.FC = ({ )}
-
+
Opportunity type @@ -241,7 +241,7 @@ export const OpportunityFilterVertical: React.FC = ({ )}
-
+
Location
@@ -281,7 +281,7 @@ export const OpportunityFilterVertical: React.FC = ({ )}
-
+
Language
@@ -321,7 +321,7 @@ export const OpportunityFilterVertical: React.FC = ({ )}
-
+
Organisation @@ -363,7 +363,7 @@ export const OpportunityFilterVertical: React.FC = ({ )}
-
+
Effort
@@ -403,7 +403,7 @@ export const OpportunityFilterVertical: React.FC = ({ )}
-
+
Reward
@@ -444,7 +444,7 @@ export const OpportunityFilterVertical: React.FC = ({
{session && ( -
+
Expired @@ -483,7 +483,7 @@ export const OpportunityFilterVertical: React.FC = ({
{/* BUTTONS */} -
+
{onCancel && (