From 7c6b074e6d2818ce29193c870777bc7f0e0c7ed4 Mon Sep 17 00:00:00 2001 From: DrMint Date: Sat, 7 May 2022 14:00:00 +0200 Subject: [PATCH 01/30] Replaced faulty lightbox with custom basic lightbox --- package-lock.json | 111 ++++++++++-------------------------- package.json | 2 +- src/components/LightBox.tsx | 59 +++++++++++++------ src/components/Popup.tsx | 2 +- 4 files changed, 72 insertions(+), 102 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2d5b4f1..8dc4cf2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "nodemailer": "^6.7.3", "react": "17.0.2", "react-dom": "17.0.2", - "react-image-lightbox": "^5.1.4", + "react-hotkeys-hook": "^3.4.4", "react-swipeable": "^6.2.1", "turndown": "^7.1.1" }, @@ -4986,11 +4986,6 @@ "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", "dev": true }, - "node_modules/exenv": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", - "integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=" - }, "node_modules/external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", @@ -5570,6 +5565,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hotkeys-js": { + "version": "3.8.7", + "resolved": "https://registry.npmjs.org/hotkeys-js/-/hotkeys-js-3.8.7.tgz", + "integrity": "sha512-ckAx3EkUr5XjDwjEHDorHxRO2Kb7z6Z2Sxul4MbBkN8Nho7XDslQsgMJT+CiJ5Z4TgRxxvKHEpuLE3imzqy4Lg==" + }, "node_modules/http-cache-semantics": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", @@ -7589,6 +7589,7 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dev": true, "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -7695,46 +7696,23 @@ "react": "17.0.2" } }, - "node_modules/react-image-lightbox": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/react-image-lightbox/-/react-image-lightbox-5.1.4.tgz", - "integrity": "sha512-kTiAODz091bgT7SlWNHab0LSMZAPJtlNWDGKv7pLlLY1krmf7FuG1zxE0wyPpeA8gPdwfr3cu6sPwZRqWsc3Eg==", + "node_modules/react-hotkeys-hook": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/react-hotkeys-hook/-/react-hotkeys-hook-3.4.4.tgz", + "integrity": "sha512-vaORq07rWgmuF3owWRhgFV/3VL8/l2q9lz0WyVEddJnWTtKW+AOgU5YgYKuwN6h6h7bCcLG3MFsJIjCrM/5DvQ==", "dependencies": { - "prop-types": "^15.7.2", - "react-modal": "^3.11.1" + "hotkeys-js": "3.8.7" }, "peerDependencies": { - "react": "16.x || 17.x", - "react-dom": "16.x || 17.x" + "react": ">=16.8.1", + "react-dom": ">=16.8.1" } }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, - "node_modules/react-lifecycles-compat": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", - "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" - }, - "node_modules/react-modal": { - "version": "3.14.4", - "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.14.4.tgz", - "integrity": "sha512-8surmulejafYCH9wfUmFyj4UfbSJwjcgbS9gf3oOItu4Hwd6ivJyVBETI0yHRhpJKCLZMUtnhzk76wXTsNL6Qg==", - "dependencies": { - "exenv": "^1.2.0", - "prop-types": "^15.7.2", - "react-lifecycles-compat": "^3.0.0", - "warning": "^4.0.3" - }, - "engines": { - "node": ">=8" - }, - "peerDependencies": { - "react": "^0.14.0 || ^15.0.0 || ^16 || ^17", - "react-dom": "^0.14.0 || ^15.0.0 || ^16 || ^17" - } + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true }, "node_modules/react-swipeable": { "version": "6.2.1", @@ -8728,14 +8706,6 @@ "node": ">=12" } }, - "node_modules/warning": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", - "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", - "dependencies": { - "loose-envify": "^1.0.0" - } - }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -12852,11 +12822,6 @@ "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", "dev": true }, - "exenv": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", - "integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=" - }, "external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", @@ -13295,6 +13260,11 @@ "has-symbols": "^1.0.2" } }, + "hotkeys-js": { + "version": "3.8.7", + "resolved": "https://registry.npmjs.org/hotkeys-js/-/hotkeys-js-3.8.7.tgz", + "integrity": "sha512-ckAx3EkUr5XjDwjEHDorHxRO2Kb7z6Z2Sxul4MbBkN8Nho7XDslQsgMJT+CiJ5Z4TgRxxvKHEpuLE3imzqy4Lg==" + }, "http-cache-semantics": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", @@ -14746,6 +14716,7 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dev": true, "requires": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -14819,35 +14790,19 @@ "scheduler": "^0.20.2" } }, - "react-image-lightbox": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/react-image-lightbox/-/react-image-lightbox-5.1.4.tgz", - "integrity": "sha512-kTiAODz091bgT7SlWNHab0LSMZAPJtlNWDGKv7pLlLY1krmf7FuG1zxE0wyPpeA8gPdwfr3cu6sPwZRqWsc3Eg==", + "react-hotkeys-hook": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/react-hotkeys-hook/-/react-hotkeys-hook-3.4.4.tgz", + "integrity": "sha512-vaORq07rWgmuF3owWRhgFV/3VL8/l2q9lz0WyVEddJnWTtKW+AOgU5YgYKuwN6h6h7bCcLG3MFsJIjCrM/5DvQ==", "requires": { - "prop-types": "^15.7.2", - "react-modal": "^3.11.1" + "hotkeys-js": "3.8.7" } }, "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, - "react-lifecycles-compat": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", - "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" - }, - "react-modal": { - "version": "3.14.4", - "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.14.4.tgz", - "integrity": "sha512-8surmulejafYCH9wfUmFyj4UfbSJwjcgbS9gf3oOItu4Hwd6ivJyVBETI0yHRhpJKCLZMUtnhzk76wXTsNL6Qg==", - "requires": { - "exenv": "^1.2.0", - "prop-types": "^15.7.2", - "react-lifecycles-compat": "^3.0.0", - "warning": "^4.0.3" - } + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true }, "react-swipeable": { "version": "6.2.1", @@ -15579,14 +15534,6 @@ "integrity": "sha512-41BrgH+dIbCFXClcSapVs5M6GkENd3gQOJpEfPDNa71LsUGMXDL0jMWpI/Rh7WhX+Aalfz2TTS3Zt5pUsbnhLg==", "dev": true }, - "warning": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", - "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", - "requires": { - "loose-envify": "^1.0.0" - } - }, "wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", diff --git a/package.json b/package.json index 749cd13..7af19cc 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "nodemailer": "^6.7.3", "react": "17.0.2", "react-dom": "17.0.2", - "react-image-lightbox": "^5.1.4", + "react-hotkeys-hook": "^3.4.4", "react-swipeable": "^6.2.1", "turndown": "^7.1.1" }, diff --git a/src/components/LightBox.tsx b/src/components/LightBox.tsx index 4864815..fa521da 100644 --- a/src/components/LightBox.tsx +++ b/src/components/LightBox.tsx @@ -1,6 +1,8 @@ -import { useMediaMobile } from "hooks/useMediaQuery"; -import { Dispatch, SetStateAction } from "react"; -import Lightbox from "react-image-lightbox"; +import { Dispatch, SetStateAction, useCallback } from "react"; +import { useHotkeys } from "react-hotkeys-hook"; +import Img from "./Img"; +import Button from "./Inputs/Button"; +import Popup from "./Popup"; interface Props { setState: @@ -14,25 +16,46 @@ interface Props { export default function LightBox(props: Props): JSX.Element { const { state, setState, images, index, setIndex } = props; - const mobile = useMediaMobile(); + const handlePrevious = useCallback(() => { + setIndex((previousIndex) => (previousIndex > 0 ? previousIndex - 1 : 0)); + }, [setIndex]); + + const handleNext = useCallback(() => { + setIndex((previousIndex) => + previousIndex < images.length - 1 ? previousIndex + 1 : images.length - 1 + ); + }, [images.length, setIndex]); + + useHotkeys("left", handlePrevious); + useHotkeys("right", handleNext); return ( <> {state && ( - document.getElementById("MyAppLayout"), - }} - mainSrc={images[index]} - prevSrc={index > 0 ? images[index - 1] : undefined} - nextSrc={index < images.length ? images[index + 1] : undefined} - onMovePrevRequest={() => setIndex(index - 1)} - onMoveNextRequest={() => setIndex(index + 1)} - imageCaption="" - imageTitle="" - onCloseRequest={() => setState(false)} - imagePadding={mobile ? 0 : 70} - /> + +
+
+ {index > 0 && ( + + )} +
+ + + +
+ {index < images.length - 1 && ( + + )} +
+
+
)} ); diff --git a/src/components/Popup.tsx b/src/components/Popup.tsx index 37be3cc..628c8bf 100644 --- a/src/components/Popup.tsx +++ b/src/components/Popup.tsx @@ -34,7 +34,7 @@ export default function Popup(props: Props): JSX.Element { props.state ? "scale-100" : "scale-0" } ${ props.fillViewport - ? "absolute inset-10 top-20" + ? "absolute inset-10" : "relative max-h-[80vh] overflow-y-auto mobile:w-[85vw]" } ${ props.hideBackground -- 2.40.1 From d6485093117bf96f90b5d4c8b7f1fc4cd145b8b3 Mon Sep 17 00:00:00 2001 From: DrMint Date: Sat, 7 May 2022 14:20:41 +0200 Subject: [PATCH 02/30] Updated many dependences included React 18 --- package-lock.json | 2119 ++++++++++++++++++++++----------------------- package.json | 40 +- 2 files changed, 1053 insertions(+), 1106 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8dc4cf2..e54a9fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,49 +9,50 @@ "@fontsource/material-icons": "^4.5.4", "@fontsource/material-icons-rounded": "^4.5.4", "@fontsource/opendyslexic": "^4.5.4", - "@fontsource/vollkorn": "^4.5.6", - "@fontsource/zen-maru-gothic": "^4.5.8", + "@fontsource/vollkorn": "^4.5.9", + "@fontsource/zen-maru-gothic": "^4.5.11", "@tippyjs/react": "^4.2.6", - "autoprefixer": "^10.4.5", + "autoprefixer": "^10.4.7", "graphql-request": "^4.2.0", "markdown-to-jsx": "^7.1.7", - "next": "^12.1.2", - "nodemailer": "^6.7.3", - "react": "17.0.2", - "react-dom": "17.0.2", + "next": "^12.1.6", + "nodemailer": "^6.7.5", + "react": "18.1.0", + "react-dom": "18.1.0", "react-hotkeys-hook": "^3.4.4", - "react-swipeable": "^6.2.1", + "react-swipeable": "^7.0.0", "turndown": "^7.1.1" }, "devDependencies": { "@graphql-codegen/cli": "^2.6.2", - "@graphql-codegen/typescript": "2.4.8", - "@graphql-codegen/typescript-graphql-request": "^4.4.5", - "@graphql-codegen/typescript-operations": "^2.3.5", - "@types/node": "17.0.25", + "@graphql-codegen/typescript": "2.4.10", + "@graphql-codegen/typescript-graphql-request": "^4.4.7", + "@graphql-codegen/typescript-operations": "^2.3.7", + "@types/node": "17.0.31", "@types/nodemailer": "^6.4.4", - "@types/react": "17.0.43", - "@types/react-dom": "^17.0.14", + "@types/react": "18.0.9", + "@types/react-dom": "^18.0.3", "@types/turndown": "^5.0.1", - "@typescript-eslint/eslint-plugin": "^5.20.0", - "@typescript-eslint/parser": "^5.20.0", - "eslint": "^8.14.0", - "eslint-config-next": "12.1.5", - "graphql": "^14.7.0", + "@typescript-eslint/eslint-plugin": "^5.22.0", + "@typescript-eslint/parser": "^5.22.0", + "eslint": "^8.15.0", + "eslint-config-next": "12.1.6", + "graphql": "^16.4.0", "next-sitemap": "^2.5.20", "prettier": "^2.6.2", "prettier-plugin-organize-imports": "^2.3.4", "tailwindcss": "^3.0.24", - "typescript": "^4.6.3" + "typescript": "^4.6.4" } }, "node_modules/@ampproject/remapping": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", - "integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.0" + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { "node": ">=6.0.0" @@ -70,34 +71,34 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz", - "integrity": "sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==", + "version": "7.17.10", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.10.tgz", + "integrity": "sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.8.tgz", - "integrity": "sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==", + "version": "7.17.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.10.tgz", + "integrity": "sha512-liKoppandF3ZcBnIYFjfSDHZLKdLHGJRkoWtG8zQyGJBQfIYobpnVGI5+pLBNtS6psFLDzyq8+h5HiVljW9PNA==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.7", - "@babel/helper-compilation-targets": "^7.17.7", + "@babel/generator": "^7.17.10", + "@babel/helper-compilation-targets": "^7.17.10", "@babel/helper-module-transforms": "^7.17.7", - "@babel/helpers": "^7.17.8", - "@babel/parser": "^7.17.8", + "@babel/helpers": "^7.17.9", + "@babel/parser": "^7.17.10", "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0", + "@babel/traverse": "^7.17.10", + "@babel/types": "^7.17.10", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", + "json5": "^2.2.1", "semver": "^6.3.0" }, "engines": { @@ -130,14 +131,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", - "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", + "version": "7.17.10", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.10.tgz", + "integrity": "sha512-46MJZZo9y3o4kmhBVc7zW7i8dtR1oIK/sdO5NcfcZRhTGYi+KKJRtHNgsU6c4VUcJmUNV/LQdebD/9Dlv4K+Tg==", "dev": true, "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" + "@babel/types": "^7.17.10", + "@jridgewell/gen-mapping": "^0.1.0", + "jsesc": "^2.5.1" }, "engines": { "node": ">=6.9.0" @@ -156,14 +157,14 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz", - "integrity": "sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==", + "version": "7.17.10", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.10.tgz", + "integrity": "sha512-gh3RxjWbauw/dFiU/7whjd0qN9K6nPJMqe6+Er7rOavFh0CQUSwhAE3IcTho2rywPJFxej6TUUHDkWcYI6gGqQ==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.17.7", + "@babel/compat-data": "^7.17.10", "@babel/helper-validator-option": "^7.16.7", - "browserslist": "^4.17.5", + "browserslist": "^4.20.2", "semver": "^6.3.0" }, "engines": { @@ -183,15 +184,15 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.17.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.6.tgz", - "integrity": "sha512-SogLLSxXm2OkBbSsHZMM4tUi8fUzjs63AT/d0YQIzr6GSd8Hxsbk2KYDX0k0DweAzGMj/YWeiCsorIdtdcW8Eg==", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.9.tgz", + "integrity": "sha512-kUjip3gruz6AJKOq5i3nC6CoCEEF/oHH3cp6tOZhB+IyyyPyW0g1Gfsxn3mkk6S08pIA2y8GQh609v9G/5sHVQ==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.16.7", "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-function-name": "^7.17.9", + "@babel/helper-member-expression-to-functions": "^7.17.7", "@babel/helper-optimise-call-expression": "^7.16.7", "@babel/helper-replace-supers": "^7.16.7", "@babel/helper-split-export-declaration": "^7.16.7" @@ -216,26 +217,13 @@ } }, "node_modules/@babel/helper-function-name": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", - "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz", + "integrity": "sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==", "dev": true, "dependencies": { - "@babel/helper-get-function-arity": "^7.16.7", "@babel/template": "^7.16.7", - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-get-function-arity": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", - "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.17.0" }, "engines": { "node": ">=6.9.0" @@ -388,13 +376,13 @@ } }, "node_modules/@babel/helpers": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.8.tgz", - "integrity": "sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.9.tgz", + "integrity": "sha512-cPCt915ShDWUEzEp3+UNRktO2n6v49l5RSnG9M5pS24hA+2FAc5si+Pn1i4VVbQQ+jh+bIZhPFQOJOzbrOYY1Q==", "dev": true, "dependencies": { "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", + "@babel/traverse": "^7.17.9", "@babel/types": "^7.17.0" }, "engines": { @@ -487,9 +475,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz", - "integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==", + "version": "7.17.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.10.tgz", + "integrity": "sha512-n2Q6i+fnJqzOaq2VkdXxy2TCPCWQZHiCo0XqmrCvDWcZQKRyZzYi4Z0yxlBuN0w+r2ZHmre+Q087DSrw3pbJDQ==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -772,9 +760,9 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.17.7.tgz", - "integrity": "sha512-ITPmR2V7MqioMJyrxUo2onHNC3e+MvfFiFIR0RP21d3PtlVb6sfzoxNKiphSZUOM9hEIdzCcZe83ieX3yoqjUA==", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.17.9.tgz", + "integrity": "sha512-2TBFd/r2I6VlYn0YRTz2JdazS+FoUuQ2rIFHoAxtyP/0G3D82SBLaRq9rnUkpqlLg03Byfl/+M32mpxjO6KaPw==", "dev": true, "dependencies": { "@babel/helper-module-transforms": "^7.17.7", @@ -955,19 +943,19 @@ } }, "node_modules/@babel/traverse": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", - "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", + "version": "7.17.10", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.10.tgz", + "integrity": "sha512-VmbrTHQteIdUUQNTb+zE12SHS/xQVIShmBPhlNP12hD5poF2pbITW1Z4172d03HegaQWhLffdkRJYtAzp0AGcw==", "dev": true, "dependencies": { "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", + "@babel/generator": "^7.17.10", "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", + "@babel/helper-function-name": "^7.17.9", "@babel/helper-hoist-variables": "^7.16.7", "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", + "@babel/parser": "^7.17.10", + "@babel/types": "^7.17.10", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -985,9 +973,9 @@ } }, "node_modules/@babel/types": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", - "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "version": "7.17.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.10.tgz", + "integrity": "sha512-9O26jG0mBYfGkUYCYZRnBwbVLd1UZOICEr2Em6InB6jVfsAv1GKgwXHmrSg+WFWDmeKTA6vyTZiN8tCSM5Oo3A==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.16.7", @@ -1028,19 +1016,19 @@ "dev": true }, "node_modules/@eslint/eslintrc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz", - "integrity": "sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.3.tgz", + "integrity": "sha512-uGo44hIwoLGNyduRpjdEpovcbMdd+Nv7amtmJxnKmI8xj6yd5LncmSwDa5NgX/41lIFJtkjD6YdVfgEzPfJ5UA==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.1", + "espree": "^9.3.2", "globals": "^13.9.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, "engines": { @@ -1063,14 +1051,14 @@ "integrity": "sha512-afgJ74VbN5SYYyv2VEAcTMHDMqLIqEtHRHyhUqMXd7IxzYOxvEpUw2Q963BHK3134RLJ1U1QeZgY0a7934+Fig==" }, "node_modules/@fontsource/vollkorn": { - "version": "4.5.6", - "resolved": "https://registry.npmjs.org/@fontsource/vollkorn/-/vollkorn-4.5.6.tgz", - "integrity": "sha512-1IBBJM4Tj2UZ7fzoJEfHBY/oOqkyVzynFbX/Hdl3smDYB7Zw8BwcGBNHIT1alyZi2aI/9ir3cI/mynBSVUJ8Cw==" + "version": "4.5.9", + "resolved": "https://registry.npmjs.org/@fontsource/vollkorn/-/vollkorn-4.5.9.tgz", + "integrity": "sha512-Lb6FpYn0dIR94I/SU624eyLoBUvfDgTGLHi6cioaMlyC3TJGaYVFQZCZV00pM0LHDVHnoOVyD34+rBNPL03jEA==" }, "node_modules/@fontsource/zen-maru-gothic": { - "version": "4.5.8", - "resolved": "https://registry.npmjs.org/@fontsource/zen-maru-gothic/-/zen-maru-gothic-4.5.8.tgz", - "integrity": "sha512-8w48IqZRW9rWaOXUX2fO994piFcsh7be+WiC18U9D7EE/3DLTwn1vlywss9CBmuFQwogAfsDoCp7aduuxE7nAQ==" + "version": "4.5.11", + "resolved": "https://registry.npmjs.org/@fontsource/zen-maru-gothic/-/zen-maru-gothic-4.5.11.tgz", + "integrity": "sha512-/msDkcA4N6OFXj7QPQXxNK3F088G4101TQYx8kLyw6TB+TQzWVzYyX8pyAx2v2k4IVjwh5wkjEEm7PD5iSn+0Q==" }, "node_modules/@graphql-codegen/cli": { "version": "2.6.2", @@ -1542,31 +1530,31 @@ "dev": true }, "node_modules/@graphql-codegen/typescript": { - "version": "2.4.8", - "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript/-/typescript-2.4.8.tgz", - "integrity": "sha512-tVsHIkuyenBany7c5IMU1yi4S1er2hgyXJGNY7PcyhpJMx0eChmbqz1VTiZxDEwi8mDBS2mn3TaSJMh6xuJM5g==", + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript/-/typescript-2.4.10.tgz", + "integrity": "sha512-Wr/GzYrpY8d8I9+ZFSkNefOpYaMtBL2s2E79IoEOLAqXHUWxM0reBwkEk4oHtLw27AmaXgngajPFPaO5QAhotQ==", "dev": true, "dependencies": { "@graphql-codegen/plugin-helpers": "^2.4.0", "@graphql-codegen/schema-ast": "^2.4.1", - "@graphql-codegen/visitor-plugin-common": "2.7.4", + "@graphql-codegen/visitor-plugin-common": "2.7.6", "auto-bind": "~4.0.0", - "tslib": "~2.3.0" + "tslib": "~2.4.0" }, "peerDependencies": { "graphql": "^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" } }, "node_modules/@graphql-codegen/typescript-graphql-request": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-graphql-request/-/typescript-graphql-request-4.4.5.tgz", - "integrity": "sha512-D8ao8j43R8pStLqCMXVzdvGX9xc/x+IWd8ZacbKUVKbpWxlO7AEVAF89fgTpPv4FFTYG62BdkElf3ePcvgEWuw==", + "version": "4.4.7", + "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-graphql-request/-/typescript-graphql-request-4.4.7.tgz", + "integrity": "sha512-YIB2UZwdidss+z2ef8idThR2fl9z19n4ROYT1GT/7Z0QWv8Zlxw1BZNlMmkV0NL7Ew8VKWKBn5/4Sl4iDDdGcg==", "dev": true, "dependencies": { "@graphql-codegen/plugin-helpers": "^2.4.0", - "@graphql-codegen/visitor-plugin-common": "2.7.4", + "@graphql-codegen/visitor-plugin-common": "2.7.6", "auto-bind": "~4.0.0", - "tslib": "~2.3.0" + "tslib": "~2.4.0" }, "peerDependencies": { "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", @@ -1575,43 +1563,43 @@ } }, "node_modules/@graphql-codegen/typescript-graphql-request/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", "dev": true }, "node_modules/@graphql-codegen/typescript-operations": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-operations/-/typescript-operations-2.3.5.tgz", - "integrity": "sha512-GCZQW+O+cIF62ioPkQMoSJGzjJhtr7ttZGJOAoN/Q/oolG8ph9jNFePKO67tSQ/POAs5HLqfat4kAlCK8OPV3Q==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-operations/-/typescript-operations-2.3.7.tgz", + "integrity": "sha512-XRArQ+Mk7NAikaRVM3+ctnskPTtucICen/KxrdBOzM+V9CXKkdXg2leu9i5ofoYg0oBMDKJQC4vN2/gKPyfHhg==", "dev": true, "dependencies": { "@graphql-codegen/plugin-helpers": "^2.4.0", - "@graphql-codegen/typescript": "^2.4.8", - "@graphql-codegen/visitor-plugin-common": "2.7.4", + "@graphql-codegen/typescript": "^2.4.10", + "@graphql-codegen/visitor-plugin-common": "2.7.6", "auto-bind": "~4.0.0", - "tslib": "~2.3.0" + "tslib": "~2.4.0" }, "peerDependencies": { "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" } }, "node_modules/@graphql-codegen/typescript-operations/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", "dev": true }, "node_modules/@graphql-codegen/typescript/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", "dev": true }, "node_modules/@graphql-codegen/visitor-plugin-common": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-2.7.4.tgz", - "integrity": "sha512-aaDoEudDD+B7DK/UwDSL2Fzej75N9hNJ3N8FQuTIeDyw6FNGWUxmkjVBLQGlzfnYfK8IYkdfYkrPn3Skq0pVxA==", + "version": "2.7.6", + "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-2.7.6.tgz", + "integrity": "sha512-XHeopd8z5UE2alv8nn2LrF+qpfRpldeqHOwrmLmlzyCWcuz5vMiZ08CgtE03micQNQJg5s8Z9m72S3FrvBUoAA==", "dev": true, "dependencies": { "@graphql-codegen/plugin-helpers": "^2.4.0", @@ -1623,16 +1611,16 @@ "dependency-graph": "^0.11.0", "graphql-tag": "^2.11.0", "parse-filepath": "^1.0.2", - "tslib": "~2.3.0" + "tslib": "~2.4.0" }, "peerDependencies": { "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" } }, "node_modules/@graphql-codegen/visitor-plugin-common/node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", "dev": true }, "node_modules/@graphql-tools/apollo-engine-loader": { @@ -1985,12 +1973,12 @@ "dev": true }, "node_modules/@graphql-tools/relay-operation-optimizer": { - "version": "6.4.5", - "resolved": "https://registry.npmjs.org/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.4.5.tgz", - "integrity": "sha512-AB/eOfpjteO4Gt0is0U1TseDuFjs/DLV1N0cqF0t6TqQLNVBeWIw7yVb8jw7HIfg3jcKLj++8582lhvCsWMT5g==", + "version": "6.4.9", + "resolved": "https://registry.npmjs.org/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.4.9.tgz", + "integrity": "sha512-fHMR1bNyx+ryBnmtXWnYmxvQLEx0O3yIG0MTVB1Mp6GlsyKTGI3O9njvjv0EI2JmCszs1uakT/6BW0LO37E6tQ==", "dev": true, "dependencies": { - "@graphql-tools/utils": "8.6.5", + "@graphql-tools/utils": "8.6.9", "relay-compiler": "12.0.0", "tslib": "~2.3.0" }, @@ -1998,6 +1986,18 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" } }, + "node_modules/@graphql-tools/relay-operation-optimizer/node_modules/@graphql-tools/utils": { + "version": "8.6.9", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.9.tgz", + "integrity": "sha512-Z1X4d4GCT81+8CSt6SgU4t1w1UAUsAIRb67mI90k/zAs+ArkB95iE3bWXuJCUmd1+r8DGGtmUNOArtd6wkt+OQ==", + "dev": true, + "dependencies": { + "tslib": "~2.3.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" + } + }, "node_modules/@graphql-tools/relay-operation-optimizer/node_modules/relay-compiler": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/relay-compiler/-/relay-compiler-12.0.0.tgz", @@ -2204,25 +2204,47 @@ "integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==", "dev": true }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", - "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", + "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", + "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", - "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", + "version": "1.4.13", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", + "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz", - "integrity": "sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ==", + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.10.tgz", + "integrity": "sha512-Q0YbBd6OTsXm8Y21+YUSDXupHnodNC2M4O18jtd3iwJ3+vMZNdKGols0a9G6JOK0dcJ3IdUUHoh908ZI6qhk8Q==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", @@ -2230,23 +2252,23 @@ } }, "node_modules/@next/env": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.1.2.tgz", - "integrity": "sha512-A/P4ysmFScBFyu1ZV0Mr1Y89snyQhqGwsCrkEpK+itMF+y+pMqBoPVIyakUf4LXqGWJGiGFuIerihvSG70Ad8Q==" + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.1.6.tgz", + "integrity": "sha512-Te/OBDXFSodPU6jlXYPAXpmZr/AkG6DCATAxttQxqOWaq6eDFX25Db3dK0120GZrSZmv4QCe9KsZmJKDbWs4OA==" }, "node_modules/@next/eslint-plugin-next": { - "version": "12.1.5", - "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-12.1.5.tgz", - "integrity": "sha512-Cnb8ERC5bNKBFrnMH6203sp/b0Y78QRx1XsFu+86oBtDBmQmOFoHu7teQjHm69ER73XKK3aGaeoLiXacHoUFsg==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-12.1.6.tgz", + "integrity": "sha512-yNUtJ90NEiYFT6TJnNyofKMPYqirKDwpahcbxBgSIuABwYOdkGwzos1ZkYD51Qf0diYwpQZBeVqElTk7Q2WNqw==", "dev": true, "dependencies": { "glob": "7.1.7" } }, "node_modules/@next/swc-android-arm-eabi": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.1.2.tgz", - "integrity": "sha512-iwalfLBhYmCIlj09czFbovj1SmTycf0AGR8CB357wgmEN8xIuznIwSsCH87AhwQ9apfNtdeDhxvuKmhS9T3FqQ==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.1.6.tgz", + "integrity": "sha512-BxBr3QAAAXWgk/K7EedvzxJr2dE014mghBSA9iOEAv0bMgF+MRq4PoASjuHi15M2zfowpcRG8XQhMFtxftCleQ==", "cpu": [ "arm" ], @@ -2259,9 +2281,9 @@ } }, "node_modules/@next/swc-android-arm64": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.1.2.tgz", - "integrity": "sha512-ZoR0Vx7czJhTgRAcFbzTKQc2n2ChC036/uc6PbgYiI/LreEnfmsV/CiREP0pUVs5ndntOX8kBA3BSbh4zCO5tQ==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.1.6.tgz", + "integrity": "sha512-EboEk3ROYY7U6WA2RrMt/cXXMokUTXXfnxe2+CU+DOahvbrO8QSWhlBl9I9ZbFzJx28AGB9Yo3oQHCvph/4Lew==", "cpu": [ "arm64" ], @@ -2274,9 +2296,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.1.2.tgz", - "integrity": "sha512-VXv7lpqFjHwkK65CZHkjvBxlSBTG+l3O0Zl2zHniHj0xHzxJZvR8VFjV2zIMZCYSfVqeQ5yt2rjwuQ9zbpGtXQ==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.1.6.tgz", + "integrity": "sha512-P0EXU12BMSdNj1F7vdkP/VrYDuCNwBExtRPDYawgSUakzi6qP0iKJpya2BuLvNzXx+XPU49GFuDC5X+SvY0mOw==", "cpu": [ "arm64" ], @@ -2289,9 +2311,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.1.2.tgz", - "integrity": "sha512-evXxJQnXEnU+heWyun7d0UV6bhBcmoiyFGR3O3v9qdhGbeXh+SXYVxRO69juuh6V7RWRdlb1KQ0rGUNa1k0XSw==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.1.6.tgz", + "integrity": "sha512-9FptMnbgHJK3dRDzfTpexs9S2hGpzOQxSQbe8omz6Pcl7rnEp9x4uSEKY51ho85JCjL4d0tDLBcXEJZKKLzxNg==", "cpu": [ "x64" ], @@ -2304,9 +2326,9 @@ } }, "node_modules/@next/swc-linux-arm-gnueabihf": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.1.2.tgz", - "integrity": "sha512-LJV/wo6R0Ot7Y/20bZs00aBG4J333RT6H/5Q2AROE4Hnx7cenSktSnfU6WCnJgzYLSIHdbLs549LcZMULuVquw==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.1.6.tgz", + "integrity": "sha512-PvfEa1RR55dsik/IDkCKSFkk6ODNGJqPY3ysVUZqmnWMDSuqFtf7BPWHFa/53znpvVB5XaJ5Z1/6aR5CTIqxPw==", "cpu": [ "arm" ], @@ -2319,9 +2341,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.1.2.tgz", - "integrity": "sha512-fjlYU1Y8kVjjRKyuyQBYLHPxjGOS2ox7U8TqAvtgKvd2PxqdsgW4sP+VDovRVPrZlGXNllKoJiqMO1OoR9fB6w==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.1.6.tgz", + "integrity": "sha512-53QOvX1jBbC2ctnmWHyRhMajGq7QZfl974WYlwclXarVV418X7ed7o/EzGY+YVAEKzIVaAB9JFFWGXn8WWo0gQ==", "cpu": [ "arm64" ], @@ -2334,9 +2356,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.1.2.tgz", - "integrity": "sha512-Y1JRDMHqSjLObjyrD1hf6ePrJcOF/mkw+LbAzoNgrHL1dSuIAqcz3jYunJt8T7Yw48xSJy6LPSL9BclAHwEwOA==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.1.6.tgz", + "integrity": "sha512-CMWAkYqfGdQCS+uuMA1A2UhOfcUYeoqnTW7msLr2RyYAys15pD960hlDfq7QAi8BCAKk0sQ2rjsl0iqMyziohQ==", "cpu": [ "arm64" ], @@ -2349,9 +2371,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.1.2.tgz", - "integrity": "sha512-5N4QSRT60ikQqCU8iHfYZzlhg6MFTLsKhMTARmhn8wLtZfN9VVyTFwZrJQWjV64dZc4JFeXDANGao8fm55y6bw==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.1.6.tgz", + "integrity": "sha512-AC7jE4Fxpn0s3ujngClIDTiEM/CQiB2N2vkcyWWn6734AmGT03Duq6RYtPMymFobDdAtZGFZd5nR95WjPzbZAQ==", "cpu": [ "x64" ], @@ -2364,9 +2386,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.1.2.tgz", - "integrity": "sha512-b32F/xAgdYG4Pt0foFzhF+2uhvNxnEj7aJNp1R4EhZotdej2PzvFWcP/dGkc7MJl205pBz5oC3gHyILIIlW6XA==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.1.6.tgz", + "integrity": "sha512-c9Vjmi0EVk0Kou2qbrynskVarnFwfYIi+wKufR9Ad7/IKKuP6aEhOdZiIIdKsYWRtK2IWRF3h3YmdnEa2WLUag==", "cpu": [ "x64" ], @@ -2379,9 +2401,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.1.2.tgz", - "integrity": "sha512-hVOcGmWDeVwO00Aclopsj6MoYhfJl5zA4vjAai9KjgclQTFZa/DC0vQjgKAHHKGT5oMHgjiq/G7L6P1/UfwYnw==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.1.6.tgz", + "integrity": "sha512-3UTOL/5XZSKFelM7qN0it35o3Cegm6LsyuERR3/OoqEExyj3aCk7F025b54/707HTMAnjlvQK3DzLhPu/xxO4g==", "cpu": [ "arm64" ], @@ -2394,9 +2416,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.1.2.tgz", - "integrity": "sha512-wnVDGIVz2pR3vIkyN6IE+1NvMSBrBj1jba11iR16m8TAPzZH/PrNsxr0a9N5VavEXXLcQpoUVvT+N7nflbRAHg==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.1.6.tgz", + "integrity": "sha512-8ZWoj6nCq6fI1yCzKq6oK0jE6Mxlz4MrEsRyu0TwDztWQWe7rh4XXGLAa2YVPatYcHhMcUL+fQQbqd1MsgaSDA==", "cpu": [ "ia32" ], @@ -2409,9 +2431,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.1.2.tgz", - "integrity": "sha512-MLNcurEpQp0+7OU9261f7PkN52xTGkfrt4IYTIXau7DO/aHj927oK6piIJdl9EOHdX/KN5W6qlyErj170PSHtw==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.1.6.tgz", + "integrity": "sha512-4ZEwiRuZEicXhXqmhw3+de8Z4EpOLQj/gp+D9fFWo6ii6W1kBkNNvvEx4A90ugppu+74pT1lIJnOuz3A9oQeJA==", "cpu": [ "x64" ], @@ -2469,9 +2491,9 @@ } }, "node_modules/@rushstack/eslint-patch": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.0.8.tgz", - "integrity": "sha512-ZK5v4bJwgXldAUA8r3q9YKfCwOqoHTK/ZqRjSeRXQrBXWouoPnS4MQtgC4AXGiiBuUu5wxrRgTlv0ktmM4P1Aw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.1.3.tgz", + "integrity": "sha512-WiBSI6JBIhC6LRIsB2Kwh8DsGTlbBU+mLRxJmAe3LjHTdkDpwIbEOZgoXBbZilk/vlfjK8i6nKRAvIRn1XaIMw==", "dev": true }, "node_modules/@samverschueren/stream-to-observable": { @@ -2570,9 +2592,9 @@ } }, "node_modules/@types/node": { - "version": "17.0.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.25.tgz", - "integrity": "sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w==", + "version": "17.0.31", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.31.tgz", + "integrity": "sha512-AR0x5HbXGqkEx9CadRH3EBYx/VkiUgZIhP4wvPn/+5KIsgpNoyFaRlVe0Zlx9gRtg8fA06a9tskE2MSN7TcG4Q==", "dev": true }, "node_modules/@types/nodemailer": { @@ -2597,9 +2619,9 @@ "dev": true }, "node_modules/@types/react": { - "version": "17.0.43", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.43.tgz", - "integrity": "sha512-8Q+LNpdxf057brvPu1lMtC5Vn7J119xrP1aq4qiaefNioQUYANF/CYeK4NsKorSZyUGJ66g0IM+4bbjwx45o2A==", + "version": "18.0.9", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.9.tgz", + "integrity": "sha512-9bjbg1hJHUm4De19L1cHiW0Jvx3geel6Qczhjd0qY5VKVE2X5+x77YxAepuCwVh4vrgZJdgEJw48zrhRIeF4Nw==", "dev": true, "dependencies": { "@types/prop-types": "*", @@ -2608,9 +2630,9 @@ } }, "node_modules/@types/react-dom": { - "version": "17.0.14", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.14.tgz", - "integrity": "sha512-H03xwEP1oXmSfl3iobtmQ/2dHF5aBHr8aUMwyGZya6OW45G+xtdzmq6HkncefiBt5JU8DVyaWl/nWZbjZCnzAQ==", + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.3.tgz", + "integrity": "sha512-1RRW9kst+67gveJRYPxGmVy8eVJ05O43hg77G2j5m76/RFJtMbcfAs2viQ2UNsvvDg8F7OfQZx8qQcl6ymygaQ==", "dev": true, "dependencies": { "@types/react": "*" @@ -2647,14 +2669,14 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.20.0.tgz", - "integrity": "sha512-fapGzoxilCn3sBtC6NtXZX6+P/Hef7VDbyfGqTTpzYydwhlkevB+0vE0EnmHPVTVSy68GUncyJ/2PcrFBeCo5Q==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.22.0.tgz", + "integrity": "sha512-YCiy5PUzpAeOPGQ7VSGDEY2NeYUV1B0swde2e0HzokRsHBYjSdF6DZ51OuRZxVPHx0032lXGLvOMls91D8FXlg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.20.0", - "@typescript-eslint/type-utils": "5.20.0", - "@typescript-eslint/utils": "5.20.0", + "@typescript-eslint/scope-manager": "5.22.0", + "@typescript-eslint/type-utils": "5.22.0", + "@typescript-eslint/utils": "5.22.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -2680,14 +2702,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.20.0.tgz", - "integrity": "sha512-UWKibrCZQCYvobmu3/N8TWbEeo/EPQbS41Ux1F9XqPzGuV7pfg6n50ZrFo6hryynD8qOTTfLHtHjjdQtxJ0h/w==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.22.0.tgz", + "integrity": "sha512-piwC4krUpRDqPaPbFaycN70KCP87+PC5WZmrWs+DlVOxxmF+zI6b6hETv7Quy4s9wbkV16ikMeZgXsvzwI3icQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.20.0", - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/typescript-estree": "5.20.0", + "@typescript-eslint/scope-manager": "5.22.0", + "@typescript-eslint/types": "5.22.0", + "@typescript-eslint/typescript-estree": "5.22.0", "debug": "^4.3.2" }, "engines": { @@ -2707,13 +2729,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.20.0.tgz", - "integrity": "sha512-h9KtuPZ4D/JuX7rpp1iKg3zOH0WNEa+ZIXwpW/KWmEFDxlA/HSfCMhiyF1HS/drTICjIbpA6OqkAhrP/zkCStg==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.22.0.tgz", + "integrity": "sha512-yA9G5NJgV5esANJCO0oF15MkBO20mIskbZ8ijfmlKIvQKg0ynVKfHZ15/nhAJN5m8Jn3X5qkwriQCiUntC9AbA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/visitor-keys": "5.20.0" + "@typescript-eslint/types": "5.22.0", + "@typescript-eslint/visitor-keys": "5.22.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2724,12 +2746,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.20.0.tgz", - "integrity": "sha512-WxNrCwYB3N/m8ceyoGCgbLmuZwupvzN0rE8NBuwnl7APgjv24ZJIjkNzoFBXPRCGzLNkoU/WfanW0exvp/+3Iw==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.22.0.tgz", + "integrity": "sha512-iqfLZIsZhK2OEJ4cQ01xOq3NaCuG5FQRKyHicA3xhZxMgaxQazLUHbH/B2k9y5i7l3+o+B5ND9Mf1AWETeMISA==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.20.0", + "@typescript-eslint/utils": "5.22.0", "debug": "^4.3.2", "tsutils": "^3.21.0" }, @@ -2750,9 +2772,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.20.0.tgz", - "integrity": "sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.22.0.tgz", + "integrity": "sha512-T7owcXW4l0v7NTijmjGWwWf/1JqdlWiBzPqzAWhobxft0SiEvMJB56QXmeCQjrPuM8zEfGUKyPQr/L8+cFUBLw==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2763,13 +2785,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.20.0.tgz", - "integrity": "sha512-36xLjP/+bXusLMrT9fMMYy1KJAGgHhlER2TqpUVDYUQg4w0q/NW/sg4UGAgVwAqb8V4zYg43KMUpM8vV2lve6w==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.22.0.tgz", + "integrity": "sha512-EyBEQxvNjg80yinGE2xdhpDYm41so/1kOItl0qrjIiJ1kX/L/L8WWGmJg8ni6eG3DwqmOzDqOhe6763bF92nOw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/visitor-keys": "5.20.0", + "@typescript-eslint/types": "5.22.0", + "@typescript-eslint/visitor-keys": "5.22.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -2790,15 +2812,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.20.0.tgz", - "integrity": "sha512-lHONGJL1LIO12Ujyx8L8xKbwWSkoUKFSO+0wDAqGXiudWB2EO7WEUT+YZLtVbmOmSllAjLb9tpoIPwpRe5Tn6w==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.22.0.tgz", + "integrity": "sha512-HodsGb037iobrWSUMS7QH6Hl1kppikjA1ELiJlNSTYf/UdMEwzgj0WIp+lBNb6WZ3zTwb0tEz51j0Wee3iJ3wQ==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.20.0", - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/typescript-estree": "5.20.0", + "@typescript-eslint/scope-manager": "5.22.0", + "@typescript-eslint/types": "5.22.0", + "@typescript-eslint/typescript-estree": "5.22.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -2836,12 +2858,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.20.0.tgz", - "integrity": "sha512-1flRpNF+0CAQkMNlTJ6L/Z5jiODG/e5+7mk6XwtPOUS3UrTz3UOiAg9jG2VtKsWI6rZQfy4C6a232QNRZTRGlg==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.22.0.tgz", + "integrity": "sha512-DbgTqn2Dv5RFWluG88tn0pP6Ex0ROF+dpDO1TNNZdRtLjUr6bdznjA6f/qNqJLjd2PgguAES2Zgxh/JzwzETDg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/types": "5.22.0", "eslint-visitor-keys": "^3.0.0" }, "engines": { @@ -2865,9 +2887,9 @@ } }, "node_modules/acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", + "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -3054,14 +3076,15 @@ } }, "node_modules/array.prototype.flat": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz", - "integrity": "sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz", + "integrity": "sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" + "es-abstract": "^1.19.2", + "es-shim-unscopables": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -3071,14 +3094,15 @@ } }, "node_modules/array.prototype.flatmap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.2.5.tgz", - "integrity": "sha512-08u6rVyi1Lj7oqWbS9nUxliETrtIROT4XGTA4D/LWGten6E3ocm7cy9SIrmNHOL5XVbVuckUp3X6Xyg8/zpvHA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.0.tgz", + "integrity": "sha512-PZC9/8TKAIxcWKdyeb77EzULHPrIX/tIZebLJUQOMR1OwYosT8yggdfWScfTBCDj5utONvOuPQQumYsU2ULbkg==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", + "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" + "es-abstract": "^1.19.2", + "es-shim-unscopables": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -3117,9 +3141,9 @@ } }, "node_modules/autoprefixer": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.5.tgz", - "integrity": "sha512-Fvd8yCoA7lNX/OUllvS+aS1I7WRBclGXsepbvT8ZaPgrH24rgXpZzF0/6Hh3ZEkwg+0AES/Osd196VZmYoEFtw==", + "version": "10.4.7", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.7.tgz", + "integrity": "sha512-ypHju4Y2Oav95SipEcCcI5J7CGPuvz8oat7sUtYj3ClK44bldfvtvcxK6IEK++7rqB7YchDGzweZIBG+SD0ZAA==", "funding": [ { "type": "opencollective", @@ -3131,8 +3155,8 @@ } ], "dependencies": { - "browserslist": "^4.20.2", - "caniuse-lite": "^1.0.30001332", + "browserslist": "^4.20.3", + "caniuse-lite": "^1.0.30001335", "fraction.js": "^4.2.0", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", @@ -3291,9 +3315,9 @@ } }, "node_modules/browserslist": { - "version": "4.20.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz", - "integrity": "sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==", + "version": "4.20.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.3.tgz", + "integrity": "sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg==", "funding": [ { "type": "opencollective", @@ -3305,10 +3329,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001317", - "electron-to-chromium": "^1.4.84", + "caniuse-lite": "^1.0.30001332", + "electron-to-chromium": "^1.4.118", "escalade": "^3.1.1", - "node-releases": "^2.0.2", + "node-releases": "^2.0.3", "picocolors": "^1.0.0" }, "bin": { @@ -3446,9 +3470,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001332", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001332.tgz", - "integrity": "sha512-10T30NYOEQtN6C11YGg411yebhvpnC6Z102+B95eAsN0oB6KUs01ivE8u+G6FMIRtIrVlYXhL+LUwQ3/hXwDWw==", + "version": "1.0.30001338", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001338.tgz", + "integrity": "sha512-1gLHWyfVoRDsHieO+CaeYe7jSo/MT7D7lhaXUiwwbuR5BwQxORs0f1tAwUSQr3YbxRXJvxHM/PA5FfPQRnsPeQ==", "funding": [ { "type": "opencollective", @@ -4197,15 +4221,19 @@ "dev": true }, "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", "dev": true, "dependencies": { - "object-keys": "^1.0.12" + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/defined": { @@ -4332,9 +4360,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.118", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.118.tgz", - "integrity": "sha512-maZIKjnYDvF7Fs35nvVcyr44UcKNwybr93Oba2n3HkKDFAtk0svERkLN/HyczJDS3Fo4wU9th9fUQd09ZLtj1w==" + "version": "1.4.137", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.137.tgz", + "integrity": "sha512-0Rcpald12O11BUogJagX3HsCN3FE83DSqWjgXoHo5a72KUKMSfI39XBgJpgNNxS9fuGzytaFjE06kZkiVFy2qA==" }, "node_modules/elegant-spinner": { "version": "1.0.1", @@ -4370,31 +4398,34 @@ } }, "node_modules/es-abstract": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", - "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.0.tgz", + "integrity": "sha512-URbD8tgRthKD3YcC39vbvSDrX23upXnPcnGAjQfgxXF5ID75YcENawc9ZX/9iTP9ptUyfCLIxTTuMYoRfiOVKA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", "get-intrinsic": "^1.1.1", "get-symbol-description": "^1.0.0", "has": "^1.0.3", - "has-symbols": "^1.0.2", + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", "internal-slot": "^1.0.3", "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.1", + "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", + "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", - "is-weakref": "^1.0.1", - "object-inspect": "^1.11.0", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.0", "object-keys": "^1.1.1", "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" + "regexp.prototype.flags": "^1.4.1", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -4403,6 +4434,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + } + }, "node_modules/es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", @@ -4441,12 +4481,12 @@ } }, "node_modules/eslint": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.14.0.tgz", - "integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.15.0.tgz", + "integrity": "sha512-GG5USZ1jhCu8HJkzGgeK8/+RGnHaNYZGrGDzUtigK3BsGESW/rs2az23XqE0WVwDxy1VRvvjSSGu5nB0Bu+6SA==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.2.2", + "@eslint/eslintrc": "^1.2.3", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -4457,7 +4497,7 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.1", + "espree": "^9.3.2", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -4473,7 +4513,7 @@ "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", "regexpp": "^3.2.0", @@ -4493,20 +4533,20 @@ } }, "node_modules/eslint-config-next": { - "version": "12.1.5", - "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-12.1.5.tgz", - "integrity": "sha512-P+DCt5ti63KhC0qNLzrAmPcwRGq8pYqgcf/NNr1E+WjCrMkWdCAXkIANTquo+kcO1adR2k1lTo5GCrNUtKy4hQ==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-12.1.6.tgz", + "integrity": "sha512-qoiS3g/EPzfCTkGkaPBSX9W0NGE/B1wNO3oWrd76QszVGrdpLggNqcO8+LR6MB0CNqtp9Q8NoeVrxNVbzM9hqA==", "dev": true, "dependencies": { - "@next/eslint-plugin-next": "12.1.5", - "@rushstack/eslint-patch": "1.0.8", - "@typescript-eslint/parser": "5.10.1", - "eslint-import-resolver-node": "0.3.4", - "eslint-import-resolver-typescript": "2.4.0", - "eslint-plugin-import": "2.25.2", - "eslint-plugin-jsx-a11y": "6.5.1", - "eslint-plugin-react": "7.29.1", - "eslint-plugin-react-hooks": "4.3.0" + "@next/eslint-plugin-next": "12.1.6", + "@rushstack/eslint-patch": "^1.1.3", + "@typescript-eslint/parser": "^5.21.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-import-resolver-typescript": "^2.7.1", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-jsx-a11y": "^6.5.1", + "eslint-plugin-react": "^7.29.4", + "eslint-plugin-react-hooks": "^4.5.0" }, "peerDependencies": { "eslint": "^7.23.0 || ^8.0.0", @@ -4519,143 +4559,36 @@ } } }, - "node_modules/eslint-config-next/node_modules/@typescript-eslint/parser": { - "version": "5.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.10.1.tgz", - "integrity": "sha512-GReo3tjNBwR5RnRO0K2wDIDN31cM3MmDtgyQ85oAxAmC5K3j/g85IjP+cDfcqDsDDBf1HNKQAD0WqOYL8jXqUA==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "5.10.1", - "@typescript-eslint/types": "5.10.1", - "@typescript-eslint/typescript-estree": "5.10.1", - "debug": "^4.3.2" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/eslint-config-next/node_modules/@typescript-eslint/scope-manager": { - "version": "5.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.10.1.tgz", - "integrity": "sha512-Lyvi559Gvpn94k7+ElXNMEnXu/iundV5uFmCUNnftbFrUbAJ1WBoaGgkbOBm07jVZa682oaBU37ao/NGGX4ZDg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.10.1", - "@typescript-eslint/visitor-keys": "5.10.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/eslint-config-next/node_modules/@typescript-eslint/types": { - "version": "5.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.10.1.tgz", - "integrity": "sha512-ZvxQ2QMy49bIIBpTqFiOenucqUyjTQ0WNLhBM6X1fh1NNlYAC6Kxsx8bRTY3jdYsYg44a0Z/uEgQkohbR0H87Q==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/eslint-config-next/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.1.tgz", - "integrity": "sha512-PwIGnH7jIueXv4opcwEbVGDATjGPO1dx9RkUl5LlHDSe+FXxPwFL5W/qYd5/NHr7f6lo/vvTrAzd0KlQtRusJQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.10.1", - "@typescript-eslint/visitor-keys": "5.10.1", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/eslint-config-next/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.1.tgz", - "integrity": "sha512-NjQ0Xinhy9IL979tpoTRuLKxMc0zJC7QVSdeerXs2/QvOy2yRkzX5dRb10X5woNUdJgU8G3nYRDlI33sq1K4YQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.10.1", - "eslint-visitor-keys": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "node_modules/eslint-import-resolver-node": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", - "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", "dev": true, "dependencies": { - "debug": "^2.6.9", - "resolve": "^1.13.1" + "debug": "^3.2.7", + "resolve": "^1.20.0" } }, "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "dependencies": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, - "node_modules/eslint-import-resolver-node/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, "node_modules/eslint-import-resolver-typescript": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.4.0.tgz", - "integrity": "sha512-useJKURidCcldRLCNKWemr1fFQL1SzB3G4a0li6lFGvlc5xGe1hY343bvG07cbpCzPuM/lK19FIJB3XGFSkplA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.7.1.tgz", + "integrity": "sha512-00UbgGwV8bSgUv34igBDbTOtKhqoRMy9bFjNehT40bXg6585PNIct8HhXZ0SybqB9rWtXj9crcku8ndDn/gIqQ==", "dev": true, "dependencies": { - "debug": "^4.1.1", - "glob": "^7.1.6", - "is-glob": "^4.0.1", - "resolve": "^1.17.0", - "tsconfig-paths": "^3.9.0" + "debug": "^4.3.4", + "glob": "^7.2.0", + "is-glob": "^4.0.3", + "resolve": "^1.22.0", + "tsconfig-paths": "^3.14.1" }, "engines": { "node": ">=4" @@ -4665,6 +4598,43 @@ "eslint-plugin-import": "*" } }, + "node_modules/eslint-import-resolver-typescript/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/eslint-import-resolver-typescript/node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/eslint-module-utils": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz", @@ -4688,9 +4658,9 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.25.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.2.tgz", - "integrity": "sha512-qCwQr9TYfoBHOFcVGKY9C9unq05uOxxdklmBXLVvcwo68y5Hta6/GzCZEMx2zQiu0woKNEER0LE7ZgaOfBU14g==", + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz", + "integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==", "dev": true, "dependencies": { "array-includes": "^3.1.4", @@ -4698,14 +4668,14 @@ "debug": "^2.6.9", "doctrine": "^2.1.0", "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.7.0", + "eslint-module-utils": "^2.7.3", "has": "^1.0.3", - "is-core-module": "^2.7.0", + "is-core-module": "^2.8.1", "is-glob": "^4.0.3", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "object.values": "^1.1.5", - "resolve": "^1.20.0", - "tsconfig-paths": "^3.11.0" + "resolve": "^1.22.0", + "tsconfig-paths": "^3.14.1" }, "engines": { "node": ">=4" @@ -4735,31 +4705,6 @@ "node": ">=0.10.0" } }, - "node_modules/eslint-plugin-import/node_modules/eslint-import-resolver-node": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", - "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", - "dev": true, - "dependencies": { - "debug": "^3.2.7", - "resolve": "^1.20.0" - } - }, - "node_modules/eslint-plugin-import/node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/eslint-import-resolver-node/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, "node_modules/eslint-plugin-import/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -4793,9 +4738,9 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.29.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.29.1.tgz", - "integrity": "sha512-WtzRpHMhsOX05ZrkyaaqmLl2uXGqmYooCfBxftJKlkYdsltiufGgfU7uuoHwR2lBam2Kh/EIVID4aU9e3kbCMA==", + "version": "7.29.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.29.4.tgz", + "integrity": "sha512-CVCXajliVh509PcZYRFyu/BoUEz452+jtQJq2b3Bae4v3xBUWPLCmtmBM+ZinG4MzwmxJgJ2M5rMqhqLVn7MtQ==", "dev": true, "dependencies": { "array-includes": "^3.1.4", @@ -4821,9 +4766,9 @@ } }, "node_modules/eslint-plugin-react-hooks": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz", - "integrity": "sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.5.0.tgz", + "integrity": "sha512-8k1gRt7D7h03kd+SAAlzXkQwWK22BnK6GKZG+FJA6BAGy22CFvl8kCIXKpVux0cCxMWDQUPqSok0LKaZ0aOcCw==", "dev": true, "engines": { "node": ">=10" @@ -4916,13 +4861,13 @@ } }, "node_modules/espree": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", - "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", + "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", "dev": true, "dependencies": { - "acorn": "^8.7.0", - "acorn-jsx": "^5.3.1", + "acorn": "^8.7.1", + "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -5252,12 +5197,39 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -5408,14 +5380,11 @@ } }, "node_modules/graphql": { - "version": "14.7.0", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.7.0.tgz", - "integrity": "sha512-l0xWZpoPKpppFzMfvVyFmp9vLN7w/ZZJPefUicMCepfJeQ8sMcztloGYY9DfjVPo6tIUDzU5Hw3MUbIjj9AVVA==", - "dependencies": { - "iterall": "^1.2.2" - }, + "version": "16.4.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.4.0.tgz", + "integrity": "sha512-tYDNcRvKCcfHREZYje3v33NSrSD/ZpbWWdPtBtUUuXx9NCo/2QDxYzNqCnMvfsrnbwRpEHMovVrPu/ERoLrIRg==", "engines": { - "node": ">= 6.x" + "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } }, "node_modules/graphql-request": { @@ -5521,9 +5490,9 @@ } }, "node_modules/has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5538,6 +5507,18 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -5891,9 +5872,9 @@ } }, "node_modules/is-number-object": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", - "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, "dependencies": { "has-tostringtag": "^1.0.0" @@ -5952,10 +5933,13 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", - "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -6078,7 +6062,8 @@ "node_modules/iterall": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz", - "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==" + "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==", + "dev": true }, "node_modules/js-tokens": { "version": "4.0.0", @@ -6794,15 +6779,14 @@ "dev": true }, "node_modules/next": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/next/-/next-12.1.2.tgz", - "integrity": "sha512-JHPCsnFTBO0Z4SQxSYc611UA1WA+r/3y3Neg66AH5/gSO/oksfRnFw/zGX/FZ9+oOUHS9y3wJFawNpVYR2gJSQ==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/next/-/next-12.1.6.tgz", + "integrity": "sha512-cebwKxL3/DhNKfg9tPZDQmbRKjueqykHHbgaoG4VBRH3AHQJ2HO0dbKFiS1hPhe1/qgc2d/hFeadsbPicmLD+A==", "dependencies": { - "@next/env": "12.1.2", - "caniuse-lite": "^1.0.30001283", + "@next/env": "12.1.6", + "caniuse-lite": "^1.0.30001332", "postcss": "8.4.5", - "styled-jsx": "5.0.1", - "use-subscription": "1.5.1" + "styled-jsx": "5.0.2" }, "bin": { "next": "dist/bin/next" @@ -6811,18 +6795,18 @@ "node": ">=12.22.0" }, "optionalDependencies": { - "@next/swc-android-arm-eabi": "12.1.2", - "@next/swc-android-arm64": "12.1.2", - "@next/swc-darwin-arm64": "12.1.2", - "@next/swc-darwin-x64": "12.1.2", - "@next/swc-linux-arm-gnueabihf": "12.1.2", - "@next/swc-linux-arm64-gnu": "12.1.2", - "@next/swc-linux-arm64-musl": "12.1.2", - "@next/swc-linux-x64-gnu": "12.1.2", - "@next/swc-linux-x64-musl": "12.1.2", - "@next/swc-win32-arm64-msvc": "12.1.2", - "@next/swc-win32-ia32-msvc": "12.1.2", - "@next/swc-win32-x64-msvc": "12.1.2" + "@next/swc-android-arm-eabi": "12.1.6", + "@next/swc-android-arm64": "12.1.6", + "@next/swc-darwin-arm64": "12.1.6", + "@next/swc-darwin-x64": "12.1.6", + "@next/swc-linux-arm-gnueabihf": "12.1.6", + "@next/swc-linux-arm64-gnu": "12.1.6", + "@next/swc-linux-arm64-musl": "12.1.6", + "@next/swc-linux-x64-gnu": "12.1.6", + "@next/swc-linux-x64-musl": "12.1.6", + "@next/swc-win32-arm64-msvc": "12.1.6", + "@next/swc-win32-ia32-msvc": "12.1.6", + "@next/swc-win32-x64-msvc": "12.1.6" }, "peerDependencies": { "fibers": ">= 3.1.0", @@ -6924,14 +6908,14 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz", - "integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.4.tgz", + "integrity": "sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ==" }, "node_modules/nodemailer": { - "version": "6.7.3", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.7.3.tgz", - "integrity": "sha512-KUdDsspqx89sD4UUyUKzdlUOper3hRkDVkrKh/89G+d9WKsU5ox51NWS4tB1XR5dPUdR4SP0E3molyEfOvSa3g==", + "version": "6.7.5", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.7.5.tgz", + "integrity": "sha512-6VtMpwhsrixq1HDYSBBHvW0GwiWawE75dS3oal48VqRhUvKJNnKnJo2RI/bCVQubj1vgrgscMNW4DHaD6xtMCg==", "engines": { "node": ">=6.0.0" } @@ -6981,6 +6965,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -7062,13 +7047,13 @@ } }, "node_modules/object.hasown": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.0.tgz", - "integrity": "sha512-MhjYRfj3GBlhSkDHo6QmvgjRLXQ2zndabdf3nX0yTyZK9rPfxb6uRpAac8HXNLy1GpqWtZ81Qh4v3uOls2sRAg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.1.tgz", + "integrity": "sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A==", "dev": true, "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7672,28 +7657,26 @@ } }, "node_modules/react": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", - "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.1.0.tgz", + "integrity": "sha512-4oL8ivCz5ZEPyclFQXaNksK3adutVS8l2xzZU0cqEFrE9Sb7fC0EFK5uEk74wIreL1DERyjvsU915j1pcT2uEQ==", "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" + "loose-envify": "^1.1.0" }, "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", - "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.1.0.tgz", + "integrity": "sha512-fU1Txz7Budmvamp7bshe4Zi32d0ll7ect+ccxNu9FlObT605GOEB8BfO4tmRJ39R5Zj831VCpvQ05QPBW5yb+w==", "dependencies": { "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "scheduler": "^0.20.2" + "scheduler": "^0.22.0" }, "peerDependencies": { - "react": "17.0.2" + "react": "^18.1.0" } }, "node_modules/react-hotkeys-hook": { @@ -7715,11 +7698,11 @@ "dev": true }, "node_modules/react-swipeable": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/react-swipeable/-/react-swipeable-6.2.1.tgz", - "integrity": "sha512-JpTj+tjJTDcIWtoMkab6zfwWD1T1tBzUyEfXsXnohnNkwA2dTuNS0gtN7HoxU1Qa+e3GDnfNYk2z7vwzfO4SoQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/react-swipeable/-/react-swipeable-7.0.0.tgz", + "integrity": "sha512-NI7KGfQ6gwNFN0Hor3vytYW3iRfMMaivGEuxcADOOfBCx/kqwXE8IfHFxEcxSUkxCYf38COLKYd9EMYZghqaUA==", "peerDependencies": { - "react": "^16.8.3 || ^17" + "react": "^16.8.3 || ^17 || ^18" } }, "node_modules/readable-stream": { @@ -7755,13 +7738,14 @@ "dev": true }, "node_modules/regexp.prototype.flags": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz", - "integrity": "sha512-pMR7hBVUUGI7PMA37m2ofIdQCsomVnas+Jn5UPGAHQ+/LlwKm/aTLJHdasmHRzlfeZwHiAOaRSo2rbBDm3nNUQ==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" }, "engines": { "node": ">= 0.4" @@ -8006,12 +7990,11 @@ "dev": true }, "node_modules/scheduler": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", - "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.22.0.tgz", + "integrity": "sha512-6QAm1BgQI88NPYymgGQLCZgvep4FyePDWFpXVK+zNSUgHwlqpJy8VEh8Et0KxTACS4VWwMousBElAZOH9nkkoQ==", "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" + "loose-envify": "^1.1.0" } }, "node_modules/scuid": { @@ -8112,15 +8095,6 @@ "node": ">=0.10.0" } }, - "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/source-map-js": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", @@ -8232,26 +8206,28 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", + "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", + "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -8291,9 +8267,9 @@ } }, "node_modules/styled-jsx": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.1.tgz", - "integrity": "sha512-+PIZ/6Uk40mphiQJJI1202b+/dYeTVd9ZnMPR80pgiWbjIwvN2zIp4r9et0BgqBuShh48I0gttPlAXA7WVvBxw==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.2.tgz", + "integrity": "sha512-LqPQrbBh3egD57NBcHET4qcgshPks+yblyhPlH2GY8oaDgKs8SK4C3dBh3oSJjgzJ3G5t1SYEZGHkP+QEpX9EQ==", "engines": { "node": ">= 12.0.0" }, @@ -8559,9 +8535,9 @@ } }, "node_modules/typescript": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", - "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", + "version": "4.6.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz", + "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -8591,14 +8567,14 @@ } }, "node_modules/unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", "which-boxed-primitive": "^1.0.2" }, "funding": { @@ -8668,17 +8644,6 @@ "node": ">=4" } }, - "node_modules/use-subscription": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/use-subscription/-/use-subscription-1.5.1.tgz", - "integrity": "sha512-Xv2a1P/yReAjAbhylMfFplFKj9GssgTwN7RlcTxBujFQcloStWNDQdc4g4NRWH9xS4i/FDk04vQBptAXoF3VcA==", - "dependencies": { - "object-assign": "^4.1.1" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -9039,12 +9004,13 @@ }, "dependencies": { "@ampproject/remapping": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", - "integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", "dev": true, "requires": { - "@jridgewell/trace-mapping": "^0.3.0" + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" } }, "@babel/code-frame": { @@ -9057,31 +9023,31 @@ } }, "@babel/compat-data": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz", - "integrity": "sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==", + "version": "7.17.10", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.10.tgz", + "integrity": "sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw==", "dev": true }, "@babel/core": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.8.tgz", - "integrity": "sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==", + "version": "7.17.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.10.tgz", + "integrity": "sha512-liKoppandF3ZcBnIYFjfSDHZLKdLHGJRkoWtG8zQyGJBQfIYobpnVGI5+pLBNtS6psFLDzyq8+h5HiVljW9PNA==", "dev": true, "requires": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.7", - "@babel/helper-compilation-targets": "^7.17.7", + "@babel/generator": "^7.17.10", + "@babel/helper-compilation-targets": "^7.17.10", "@babel/helper-module-transforms": "^7.17.7", - "@babel/helpers": "^7.17.8", - "@babel/parser": "^7.17.8", + "@babel/helpers": "^7.17.9", + "@babel/parser": "^7.17.10", "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0", + "@babel/traverse": "^7.17.10", + "@babel/types": "^7.17.10", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", + "json5": "^2.2.1", "semver": "^6.3.0" }, "dependencies": { @@ -9100,14 +9066,14 @@ } }, "@babel/generator": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz", - "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==", + "version": "7.17.10", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.10.tgz", + "integrity": "sha512-46MJZZo9y3o4kmhBVc7zW7i8dtR1oIK/sdO5NcfcZRhTGYi+KKJRtHNgsU6c4VUcJmUNV/LQdebD/9Dlv4K+Tg==", "dev": true, "requires": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" + "@babel/types": "^7.17.10", + "@jridgewell/gen-mapping": "^0.1.0", + "jsesc": "^2.5.1" } }, "@babel/helper-annotate-as-pure": { @@ -9120,14 +9086,14 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz", - "integrity": "sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==", + "version": "7.17.10", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.10.tgz", + "integrity": "sha512-gh3RxjWbauw/dFiU/7whjd0qN9K6nPJMqe6+Er7rOavFh0CQUSwhAE3IcTho2rywPJFxej6TUUHDkWcYI6gGqQ==", "dev": true, "requires": { - "@babel/compat-data": "^7.17.7", + "@babel/compat-data": "^7.17.10", "@babel/helper-validator-option": "^7.16.7", - "browserslist": "^4.17.5", + "browserslist": "^4.20.2", "semver": "^6.3.0" }, "dependencies": { @@ -9140,15 +9106,15 @@ } }, "@babel/helper-create-class-features-plugin": { - "version": "7.17.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.6.tgz", - "integrity": "sha512-SogLLSxXm2OkBbSsHZMM4tUi8fUzjs63AT/d0YQIzr6GSd8Hxsbk2KYDX0k0DweAzGMj/YWeiCsorIdtdcW8Eg==", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.9.tgz", + "integrity": "sha512-kUjip3gruz6AJKOq5i3nC6CoCEEF/oHH3cp6tOZhB+IyyyPyW0g1Gfsxn3mkk6S08pIA2y8GQh609v9G/5sHVQ==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.16.7", "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-function-name": "^7.17.9", + "@babel/helper-member-expression-to-functions": "^7.17.7", "@babel/helper-optimise-call-expression": "^7.16.7", "@babel/helper-replace-supers": "^7.16.7", "@babel/helper-split-export-declaration": "^7.16.7" @@ -9164,23 +9130,13 @@ } }, "@babel/helper-function-name": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", - "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz", + "integrity": "sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.16.7", "@babel/template": "^7.16.7", - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", - "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.17.0" } }, "@babel/helper-hoist-variables": { @@ -9294,13 +9250,13 @@ "dev": true }, "@babel/helpers": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.8.tgz", - "integrity": "sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.9.tgz", + "integrity": "sha512-cPCt915ShDWUEzEp3+UNRktO2n6v49l5RSnG9M5pS24hA+2FAc5si+Pn1i4VVbQQ+jh+bIZhPFQOJOzbrOYY1Q==", "dev": true, "requires": { "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", + "@babel/traverse": "^7.17.9", "@babel/types": "^7.17.0" } }, @@ -9374,9 +9330,9 @@ } }, "@babel/parser": { - "version": "7.17.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz", - "integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==", + "version": "7.17.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.10.tgz", + "integrity": "sha512-n2Q6i+fnJqzOaq2VkdXxy2TCPCWQZHiCo0XqmrCvDWcZQKRyZzYi4Z0yxlBuN0w+r2ZHmre+Q087DSrw3pbJDQ==", "dev": true }, "@babel/plugin-proposal-class-properties": { @@ -9556,9 +9512,9 @@ } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.17.7.tgz", - "integrity": "sha512-ITPmR2V7MqioMJyrxUo2onHNC3e+MvfFiFIR0RP21d3PtlVb6sfzoxNKiphSZUOM9hEIdzCcZe83ieX3yoqjUA==", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.17.9.tgz", + "integrity": "sha512-2TBFd/r2I6VlYn0YRTz2JdazS+FoUuQ2rIFHoAxtyP/0G3D82SBLaRq9rnUkpqlLg03Byfl/+M32mpxjO6KaPw==", "dev": true, "requires": { "@babel/helper-module-transforms": "^7.17.7", @@ -9676,19 +9632,19 @@ } }, "@babel/traverse": { - "version": "7.17.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz", - "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==", + "version": "7.17.10", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.10.tgz", + "integrity": "sha512-VmbrTHQteIdUUQNTb+zE12SHS/xQVIShmBPhlNP12hD5poF2pbITW1Z4172d03HegaQWhLffdkRJYtAzp0AGcw==", "dev": true, "requires": { "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", + "@babel/generator": "^7.17.10", "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", + "@babel/helper-function-name": "^7.17.9", "@babel/helper-hoist-variables": "^7.16.7", "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", + "@babel/parser": "^7.17.10", + "@babel/types": "^7.17.10", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -9702,9 +9658,9 @@ } }, "@babel/types": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", - "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "version": "7.17.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.10.tgz", + "integrity": "sha512-9O26jG0mBYfGkUYCYZRnBwbVLd1UZOICEr2Em6InB6jVfsAv1GKgwXHmrSg+WFWDmeKTA6vyTZiN8tCSM5Oo3A==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.16.7", @@ -9738,19 +9694,19 @@ } }, "@eslint/eslintrc": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz", - "integrity": "sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.3.tgz", + "integrity": "sha512-uGo44hIwoLGNyduRpjdEpovcbMdd+Nv7amtmJxnKmI8xj6yd5LncmSwDa5NgX/41lIFJtkjD6YdVfgEzPfJ5UA==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.1", + "espree": "^9.3.2", "globals": "^13.9.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" } }, @@ -9770,14 +9726,14 @@ "integrity": "sha512-afgJ74VbN5SYYyv2VEAcTMHDMqLIqEtHRHyhUqMXd7IxzYOxvEpUw2Q963BHK3134RLJ1U1QeZgY0a7934+Fig==" }, "@fontsource/vollkorn": { - "version": "4.5.6", - "resolved": "https://registry.npmjs.org/@fontsource/vollkorn/-/vollkorn-4.5.6.tgz", - "integrity": "sha512-1IBBJM4Tj2UZ7fzoJEfHBY/oOqkyVzynFbX/Hdl3smDYB7Zw8BwcGBNHIT1alyZi2aI/9ir3cI/mynBSVUJ8Cw==" + "version": "4.5.9", + "resolved": "https://registry.npmjs.org/@fontsource/vollkorn/-/vollkorn-4.5.9.tgz", + "integrity": "sha512-Lb6FpYn0dIR94I/SU624eyLoBUvfDgTGLHi6cioaMlyC3TJGaYVFQZCZV00pM0LHDVHnoOVyD34+rBNPL03jEA==" }, "@fontsource/zen-maru-gothic": { - "version": "4.5.8", - "resolved": "https://registry.npmjs.org/@fontsource/zen-maru-gothic/-/zen-maru-gothic-4.5.8.tgz", - "integrity": "sha512-8w48IqZRW9rWaOXUX2fO994piFcsh7be+WiC18U9D7EE/3DLTwn1vlywss9CBmuFQwogAfsDoCp7aduuxE7nAQ==" + "version": "4.5.11", + "resolved": "https://registry.npmjs.org/@fontsource/zen-maru-gothic/-/zen-maru-gothic-4.5.11.tgz", + "integrity": "sha512-/msDkcA4N6OFXj7QPQXxNK3F088G4101TQYx8kLyw6TB+TQzWVzYyX8pyAx2v2k4IVjwh5wkjEEm7PD5iSn+0Q==" }, "@graphql-codegen/cli": { "version": "2.6.2", @@ -10144,71 +10100,71 @@ } }, "@graphql-codegen/typescript": { - "version": "2.4.8", - "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript/-/typescript-2.4.8.tgz", - "integrity": "sha512-tVsHIkuyenBany7c5IMU1yi4S1er2hgyXJGNY7PcyhpJMx0eChmbqz1VTiZxDEwi8mDBS2mn3TaSJMh6xuJM5g==", + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript/-/typescript-2.4.10.tgz", + "integrity": "sha512-Wr/GzYrpY8d8I9+ZFSkNefOpYaMtBL2s2E79IoEOLAqXHUWxM0reBwkEk4oHtLw27AmaXgngajPFPaO5QAhotQ==", "dev": true, "requires": { "@graphql-codegen/plugin-helpers": "^2.4.0", "@graphql-codegen/schema-ast": "^2.4.1", - "@graphql-codegen/visitor-plugin-common": "2.7.4", + "@graphql-codegen/visitor-plugin-common": "2.7.6", "auto-bind": "~4.0.0", - "tslib": "~2.3.0" + "tslib": "~2.4.0" }, "dependencies": { "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", "dev": true } } }, "@graphql-codegen/typescript-graphql-request": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-graphql-request/-/typescript-graphql-request-4.4.5.tgz", - "integrity": "sha512-D8ao8j43R8pStLqCMXVzdvGX9xc/x+IWd8ZacbKUVKbpWxlO7AEVAF89fgTpPv4FFTYG62BdkElf3ePcvgEWuw==", + "version": "4.4.7", + "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-graphql-request/-/typescript-graphql-request-4.4.7.tgz", + "integrity": "sha512-YIB2UZwdidss+z2ef8idThR2fl9z19n4ROYT1GT/7Z0QWv8Zlxw1BZNlMmkV0NL7Ew8VKWKBn5/4Sl4iDDdGcg==", "dev": true, "requires": { "@graphql-codegen/plugin-helpers": "^2.4.0", - "@graphql-codegen/visitor-plugin-common": "2.7.4", + "@graphql-codegen/visitor-plugin-common": "2.7.6", "auto-bind": "~4.0.0", - "tslib": "~2.3.0" + "tslib": "~2.4.0" }, "dependencies": { "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", "dev": true } } }, "@graphql-codegen/typescript-operations": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-operations/-/typescript-operations-2.3.5.tgz", - "integrity": "sha512-GCZQW+O+cIF62ioPkQMoSJGzjJhtr7ttZGJOAoN/Q/oolG8ph9jNFePKO67tSQ/POAs5HLqfat4kAlCK8OPV3Q==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-operations/-/typescript-operations-2.3.7.tgz", + "integrity": "sha512-XRArQ+Mk7NAikaRVM3+ctnskPTtucICen/KxrdBOzM+V9CXKkdXg2leu9i5ofoYg0oBMDKJQC4vN2/gKPyfHhg==", "dev": true, "requires": { "@graphql-codegen/plugin-helpers": "^2.4.0", - "@graphql-codegen/typescript": "^2.4.8", - "@graphql-codegen/visitor-plugin-common": "2.7.4", + "@graphql-codegen/typescript": "^2.4.10", + "@graphql-codegen/visitor-plugin-common": "2.7.6", "auto-bind": "~4.0.0", - "tslib": "~2.3.0" + "tslib": "~2.4.0" }, "dependencies": { "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", "dev": true } } }, "@graphql-codegen/visitor-plugin-common": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-2.7.4.tgz", - "integrity": "sha512-aaDoEudDD+B7DK/UwDSL2Fzej75N9hNJ3N8FQuTIeDyw6FNGWUxmkjVBLQGlzfnYfK8IYkdfYkrPn3Skq0pVxA==", + "version": "2.7.6", + "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-2.7.6.tgz", + "integrity": "sha512-XHeopd8z5UE2alv8nn2LrF+qpfRpldeqHOwrmLmlzyCWcuz5vMiZ08CgtE03micQNQJg5s8Z9m72S3FrvBUoAA==", "dev": true, "requires": { "@graphql-codegen/plugin-helpers": "^2.4.0", @@ -10220,13 +10176,13 @@ "dependency-graph": "^0.11.0", "graphql-tag": "^2.11.0", "parse-filepath": "^1.0.2", - "tslib": "~2.3.0" + "tslib": "~2.4.0" }, "dependencies": { "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", "dev": true } } @@ -10553,16 +10509,25 @@ } }, "@graphql-tools/relay-operation-optimizer": { - "version": "6.4.5", - "resolved": "https://registry.npmjs.org/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.4.5.tgz", - "integrity": "sha512-AB/eOfpjteO4Gt0is0U1TseDuFjs/DLV1N0cqF0t6TqQLNVBeWIw7yVb8jw7HIfg3jcKLj++8582lhvCsWMT5g==", + "version": "6.4.9", + "resolved": "https://registry.npmjs.org/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.4.9.tgz", + "integrity": "sha512-fHMR1bNyx+ryBnmtXWnYmxvQLEx0O3yIG0MTVB1Mp6GlsyKTGI3O9njvjv0EI2JmCszs1uakT/6BW0LO37E6tQ==", "dev": true, "requires": { - "@graphql-tools/utils": "8.6.5", + "@graphql-tools/utils": "8.6.9", "relay-compiler": "12.0.0", "tslib": "~2.3.0" }, "dependencies": { + "@graphql-tools/utils": { + "version": "8.6.9", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.9.tgz", + "integrity": "sha512-Z1X4d4GCT81+8CSt6SgU4t1w1UAUsAIRb67mI90k/zAs+ArkB95iE3bWXuJCUmd1+r8DGGtmUNOArtd6wkt+OQ==", + "dev": true, + "requires": { + "tslib": "~2.3.0" + } + }, "relay-compiler": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/relay-compiler/-/relay-compiler-12.0.0.tgz", @@ -10740,22 +10705,38 @@ "integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==", "dev": true }, + "@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "@jridgewell/resolve-uri": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz", - "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", + "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", + "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==", "dev": true }, "@jridgewell/sourcemap-codec": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz", - "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==", + "version": "1.4.13", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", + "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==", "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz", - "integrity": "sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ==", + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.10.tgz", + "integrity": "sha512-Q0YbBd6OTsXm8Y21+YUSDXupHnodNC2M4O18jtd3iwJ3+vMZNdKGols0a9G6JOK0dcJ3IdUUHoh908ZI6qhk8Q==", "dev": true, "requires": { "@jridgewell/resolve-uri": "^3.0.3", @@ -10763,89 +10744,89 @@ } }, "@next/env": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/env/-/env-12.1.2.tgz", - "integrity": "sha512-A/P4ysmFScBFyu1ZV0Mr1Y89snyQhqGwsCrkEpK+itMF+y+pMqBoPVIyakUf4LXqGWJGiGFuIerihvSG70Ad8Q==" + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/env/-/env-12.1.6.tgz", + "integrity": "sha512-Te/OBDXFSodPU6jlXYPAXpmZr/AkG6DCATAxttQxqOWaq6eDFX25Db3dK0120GZrSZmv4QCe9KsZmJKDbWs4OA==" }, "@next/eslint-plugin-next": { - "version": "12.1.5", - "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-12.1.5.tgz", - "integrity": "sha512-Cnb8ERC5bNKBFrnMH6203sp/b0Y78QRx1XsFu+86oBtDBmQmOFoHu7teQjHm69ER73XKK3aGaeoLiXacHoUFsg==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-12.1.6.tgz", + "integrity": "sha512-yNUtJ90NEiYFT6TJnNyofKMPYqirKDwpahcbxBgSIuABwYOdkGwzos1ZkYD51Qf0diYwpQZBeVqElTk7Q2WNqw==", "dev": true, "requires": { "glob": "7.1.7" } }, "@next/swc-android-arm-eabi": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.1.2.tgz", - "integrity": "sha512-iwalfLBhYmCIlj09czFbovj1SmTycf0AGR8CB357wgmEN8xIuznIwSsCH87AhwQ9apfNtdeDhxvuKmhS9T3FqQ==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.1.6.tgz", + "integrity": "sha512-BxBr3QAAAXWgk/K7EedvzxJr2dE014mghBSA9iOEAv0bMgF+MRq4PoASjuHi15M2zfowpcRG8XQhMFtxftCleQ==", "optional": true }, "@next/swc-android-arm64": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.1.2.tgz", - "integrity": "sha512-ZoR0Vx7czJhTgRAcFbzTKQc2n2ChC036/uc6PbgYiI/LreEnfmsV/CiREP0pUVs5ndntOX8kBA3BSbh4zCO5tQ==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.1.6.tgz", + "integrity": "sha512-EboEk3ROYY7U6WA2RrMt/cXXMokUTXXfnxe2+CU+DOahvbrO8QSWhlBl9I9ZbFzJx28AGB9Yo3oQHCvph/4Lew==", "optional": true }, "@next/swc-darwin-arm64": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.1.2.tgz", - "integrity": "sha512-VXv7lpqFjHwkK65CZHkjvBxlSBTG+l3O0Zl2zHniHj0xHzxJZvR8VFjV2zIMZCYSfVqeQ5yt2rjwuQ9zbpGtXQ==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.1.6.tgz", + "integrity": "sha512-P0EXU12BMSdNj1F7vdkP/VrYDuCNwBExtRPDYawgSUakzi6qP0iKJpya2BuLvNzXx+XPU49GFuDC5X+SvY0mOw==", "optional": true }, "@next/swc-darwin-x64": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.1.2.tgz", - "integrity": "sha512-evXxJQnXEnU+heWyun7d0UV6bhBcmoiyFGR3O3v9qdhGbeXh+SXYVxRO69juuh6V7RWRdlb1KQ0rGUNa1k0XSw==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.1.6.tgz", + "integrity": "sha512-9FptMnbgHJK3dRDzfTpexs9S2hGpzOQxSQbe8omz6Pcl7rnEp9x4uSEKY51ho85JCjL4d0tDLBcXEJZKKLzxNg==", "optional": true }, "@next/swc-linux-arm-gnueabihf": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.1.2.tgz", - "integrity": "sha512-LJV/wo6R0Ot7Y/20bZs00aBG4J333RT6H/5Q2AROE4Hnx7cenSktSnfU6WCnJgzYLSIHdbLs549LcZMULuVquw==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.1.6.tgz", + "integrity": "sha512-PvfEa1RR55dsik/IDkCKSFkk6ODNGJqPY3ysVUZqmnWMDSuqFtf7BPWHFa/53znpvVB5XaJ5Z1/6aR5CTIqxPw==", "optional": true }, "@next/swc-linux-arm64-gnu": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.1.2.tgz", - "integrity": "sha512-fjlYU1Y8kVjjRKyuyQBYLHPxjGOS2ox7U8TqAvtgKvd2PxqdsgW4sP+VDovRVPrZlGXNllKoJiqMO1OoR9fB6w==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.1.6.tgz", + "integrity": "sha512-53QOvX1jBbC2ctnmWHyRhMajGq7QZfl974WYlwclXarVV418X7ed7o/EzGY+YVAEKzIVaAB9JFFWGXn8WWo0gQ==", "optional": true }, "@next/swc-linux-arm64-musl": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.1.2.tgz", - "integrity": "sha512-Y1JRDMHqSjLObjyrD1hf6ePrJcOF/mkw+LbAzoNgrHL1dSuIAqcz3jYunJt8T7Yw48xSJy6LPSL9BclAHwEwOA==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.1.6.tgz", + "integrity": "sha512-CMWAkYqfGdQCS+uuMA1A2UhOfcUYeoqnTW7msLr2RyYAys15pD960hlDfq7QAi8BCAKk0sQ2rjsl0iqMyziohQ==", "optional": true }, "@next/swc-linux-x64-gnu": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.1.2.tgz", - "integrity": "sha512-5N4QSRT60ikQqCU8iHfYZzlhg6MFTLsKhMTARmhn8wLtZfN9VVyTFwZrJQWjV64dZc4JFeXDANGao8fm55y6bw==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.1.6.tgz", + "integrity": "sha512-AC7jE4Fxpn0s3ujngClIDTiEM/CQiB2N2vkcyWWn6734AmGT03Duq6RYtPMymFobDdAtZGFZd5nR95WjPzbZAQ==", "optional": true }, "@next/swc-linux-x64-musl": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.1.2.tgz", - "integrity": "sha512-b32F/xAgdYG4Pt0foFzhF+2uhvNxnEj7aJNp1R4EhZotdej2PzvFWcP/dGkc7MJl205pBz5oC3gHyILIIlW6XA==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.1.6.tgz", + "integrity": "sha512-c9Vjmi0EVk0Kou2qbrynskVarnFwfYIi+wKufR9Ad7/IKKuP6aEhOdZiIIdKsYWRtK2IWRF3h3YmdnEa2WLUag==", "optional": true }, "@next/swc-win32-arm64-msvc": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.1.2.tgz", - "integrity": "sha512-hVOcGmWDeVwO00Aclopsj6MoYhfJl5zA4vjAai9KjgclQTFZa/DC0vQjgKAHHKGT5oMHgjiq/G7L6P1/UfwYnw==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.1.6.tgz", + "integrity": "sha512-3UTOL/5XZSKFelM7qN0it35o3Cegm6LsyuERR3/OoqEExyj3aCk7F025b54/707HTMAnjlvQK3DzLhPu/xxO4g==", "optional": true }, "@next/swc-win32-ia32-msvc": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.1.2.tgz", - "integrity": "sha512-wnVDGIVz2pR3vIkyN6IE+1NvMSBrBj1jba11iR16m8TAPzZH/PrNsxr0a9N5VavEXXLcQpoUVvT+N7nflbRAHg==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.1.6.tgz", + "integrity": "sha512-8ZWoj6nCq6fI1yCzKq6oK0jE6Mxlz4MrEsRyu0TwDztWQWe7rh4XXGLAa2YVPatYcHhMcUL+fQQbqd1MsgaSDA==", "optional": true }, "@next/swc-win32-x64-msvc": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.1.2.tgz", - "integrity": "sha512-MLNcurEpQp0+7OU9261f7PkN52xTGkfrt4IYTIXau7DO/aHj927oK6piIJdl9EOHdX/KN5W6qlyErj170PSHtw==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.1.6.tgz", + "integrity": "sha512-4ZEwiRuZEicXhXqmhw3+de8Z4EpOLQj/gp+D9fFWo6ii6W1kBkNNvvEx4A90ugppu+74pT1lIJnOuz3A9oQeJA==", "optional": true }, "@nodelib/fs.scandir": { @@ -10880,9 +10861,9 @@ "integrity": "sha512-8U7hIl7+30XbIrJ0deQMXpXESM1L4yrt6BHok5hzcR0LivivuNkk+tHU1iRVScOwCmQcrOr6kvtIr29MNbQHqQ==" }, "@rushstack/eslint-patch": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.0.8.tgz", - "integrity": "sha512-ZK5v4bJwgXldAUA8r3q9YKfCwOqoHTK/ZqRjSeRXQrBXWouoPnS4MQtgC4AXGiiBuUu5wxrRgTlv0ktmM4P1Aw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.1.3.tgz", + "integrity": "sha512-WiBSI6JBIhC6LRIsB2Kwh8DsGTlbBU+mLRxJmAe3LjHTdkDpwIbEOZgoXBbZilk/vlfjK8i6nKRAvIRn1XaIMw==", "dev": true }, "@samverschueren/stream-to-observable": { @@ -10957,9 +10938,9 @@ } }, "@types/node": { - "version": "17.0.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.25.tgz", - "integrity": "sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w==", + "version": "17.0.31", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.31.tgz", + "integrity": "sha512-AR0x5HbXGqkEx9CadRH3EBYx/VkiUgZIhP4wvPn/+5KIsgpNoyFaRlVe0Zlx9gRtg8fA06a9tskE2MSN7TcG4Q==", "dev": true }, "@types/nodemailer": { @@ -10984,9 +10965,9 @@ "dev": true }, "@types/react": { - "version": "17.0.43", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.43.tgz", - "integrity": "sha512-8Q+LNpdxf057brvPu1lMtC5Vn7J119xrP1aq4qiaefNioQUYANF/CYeK4NsKorSZyUGJ66g0IM+4bbjwx45o2A==", + "version": "18.0.9", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.9.tgz", + "integrity": "sha512-9bjbg1hJHUm4De19L1cHiW0Jvx3geel6Qczhjd0qY5VKVE2X5+x77YxAepuCwVh4vrgZJdgEJw48zrhRIeF4Nw==", "dev": true, "requires": { "@types/prop-types": "*", @@ -10995,9 +10976,9 @@ } }, "@types/react-dom": { - "version": "17.0.14", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.14.tgz", - "integrity": "sha512-H03xwEP1oXmSfl3iobtmQ/2dHF5aBHr8aUMwyGZya6OW45G+xtdzmq6HkncefiBt5JU8DVyaWl/nWZbjZCnzAQ==", + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.3.tgz", + "integrity": "sha512-1RRW9kst+67gveJRYPxGmVy8eVJ05O43hg77G2j5m76/RFJtMbcfAs2viQ2UNsvvDg8F7OfQZx8qQcl6ymygaQ==", "dev": true, "requires": { "@types/react": "*" @@ -11034,14 +11015,14 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.20.0.tgz", - "integrity": "sha512-fapGzoxilCn3sBtC6NtXZX6+P/Hef7VDbyfGqTTpzYydwhlkevB+0vE0EnmHPVTVSy68GUncyJ/2PcrFBeCo5Q==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.22.0.tgz", + "integrity": "sha512-YCiy5PUzpAeOPGQ7VSGDEY2NeYUV1B0swde2e0HzokRsHBYjSdF6DZ51OuRZxVPHx0032lXGLvOMls91D8FXlg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.20.0", - "@typescript-eslint/type-utils": "5.20.0", - "@typescript-eslint/utils": "5.20.0", + "@typescript-eslint/scope-manager": "5.22.0", + "@typescript-eslint/type-utils": "5.22.0", + "@typescript-eslint/utils": "5.22.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -11051,52 +11032,52 @@ } }, "@typescript-eslint/parser": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.20.0.tgz", - "integrity": "sha512-UWKibrCZQCYvobmu3/N8TWbEeo/EPQbS41Ux1F9XqPzGuV7pfg6n50ZrFo6hryynD8qOTTfLHtHjjdQtxJ0h/w==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.22.0.tgz", + "integrity": "sha512-piwC4krUpRDqPaPbFaycN70KCP87+PC5WZmrWs+DlVOxxmF+zI6b6hETv7Quy4s9wbkV16ikMeZgXsvzwI3icQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.20.0", - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/typescript-estree": "5.20.0", + "@typescript-eslint/scope-manager": "5.22.0", + "@typescript-eslint/types": "5.22.0", + "@typescript-eslint/typescript-estree": "5.22.0", "debug": "^4.3.2" } }, "@typescript-eslint/scope-manager": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.20.0.tgz", - "integrity": "sha512-h9KtuPZ4D/JuX7rpp1iKg3zOH0WNEa+ZIXwpW/KWmEFDxlA/HSfCMhiyF1HS/drTICjIbpA6OqkAhrP/zkCStg==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.22.0.tgz", + "integrity": "sha512-yA9G5NJgV5esANJCO0oF15MkBO20mIskbZ8ijfmlKIvQKg0ynVKfHZ15/nhAJN5m8Jn3X5qkwriQCiUntC9AbA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/visitor-keys": "5.20.0" + "@typescript-eslint/types": "5.22.0", + "@typescript-eslint/visitor-keys": "5.22.0" } }, "@typescript-eslint/type-utils": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.20.0.tgz", - "integrity": "sha512-WxNrCwYB3N/m8ceyoGCgbLmuZwupvzN0rE8NBuwnl7APgjv24ZJIjkNzoFBXPRCGzLNkoU/WfanW0exvp/+3Iw==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.22.0.tgz", + "integrity": "sha512-iqfLZIsZhK2OEJ4cQ01xOq3NaCuG5FQRKyHicA3xhZxMgaxQazLUHbH/B2k9y5i7l3+o+B5ND9Mf1AWETeMISA==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.20.0", + "@typescript-eslint/utils": "5.22.0", "debug": "^4.3.2", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.20.0.tgz", - "integrity": "sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.22.0.tgz", + "integrity": "sha512-T7owcXW4l0v7NTijmjGWwWf/1JqdlWiBzPqzAWhobxft0SiEvMJB56QXmeCQjrPuM8zEfGUKyPQr/L8+cFUBLw==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.20.0.tgz", - "integrity": "sha512-36xLjP/+bXusLMrT9fMMYy1KJAGgHhlER2TqpUVDYUQg4w0q/NW/sg4UGAgVwAqb8V4zYg43KMUpM8vV2lve6w==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.22.0.tgz", + "integrity": "sha512-EyBEQxvNjg80yinGE2xdhpDYm41so/1kOItl0qrjIiJ1kX/L/L8WWGmJg8ni6eG3DwqmOzDqOhe6763bF92nOw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/visitor-keys": "5.20.0", + "@typescript-eslint/types": "5.22.0", + "@typescript-eslint/visitor-keys": "5.22.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -11105,15 +11086,15 @@ } }, "@typescript-eslint/utils": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.20.0.tgz", - "integrity": "sha512-lHONGJL1LIO12Ujyx8L8xKbwWSkoUKFSO+0wDAqGXiudWB2EO7WEUT+YZLtVbmOmSllAjLb9tpoIPwpRe5Tn6w==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.22.0.tgz", + "integrity": "sha512-HodsGb037iobrWSUMS7QH6Hl1kppikjA1ELiJlNSTYf/UdMEwzgj0WIp+lBNb6WZ3zTwb0tEz51j0Wee3iJ3wQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.20.0", - "@typescript-eslint/types": "5.20.0", - "@typescript-eslint/typescript-estree": "5.20.0", + "@typescript-eslint/scope-manager": "5.22.0", + "@typescript-eslint/types": "5.22.0", + "@typescript-eslint/typescript-estree": "5.22.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -11137,12 +11118,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.20.0.tgz", - "integrity": "sha512-1flRpNF+0CAQkMNlTJ6L/Z5jiODG/e5+7mk6XwtPOUS3UrTz3UOiAg9jG2VtKsWI6rZQfy4C6a232QNRZTRGlg==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.22.0.tgz", + "integrity": "sha512-DbgTqn2Dv5RFWluG88tn0pP6Ex0ROF+dpDO1TNNZdRtLjUr6bdznjA6f/qNqJLjd2PgguAES2Zgxh/JzwzETDg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.20.0", + "@typescript-eslint/types": "5.22.0", "eslint-visitor-keys": "^3.0.0" } }, @@ -11156,9 +11137,9 @@ } }, "acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", + "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", "dev": true }, "acorn-jsx": { @@ -11293,25 +11274,27 @@ "dev": true }, "array.prototype.flat": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz", - "integrity": "sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz", + "integrity": "sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==", "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" + "es-abstract": "^1.19.2", + "es-shim-unscopables": "^1.0.0" } }, "array.prototype.flatmap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.2.5.tgz", - "integrity": "sha512-08u6rVyi1Lj7oqWbS9nUxliETrtIROT4XGTA4D/LWGten6E3ocm7cy9SIrmNHOL5XVbVuckUp3X6Xyg8/zpvHA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.0.tgz", + "integrity": "sha512-PZC9/8TKAIxcWKdyeb77EzULHPrIX/tIZebLJUQOMR1OwYosT8yggdfWScfTBCDj5utONvOuPQQumYsU2ULbkg==", "dev": true, "requires": { - "call-bind": "^1.0.0", + "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" + "es-abstract": "^1.19.2", + "es-shim-unscopables": "^1.0.0" } }, "asap": { @@ -11338,12 +11321,12 @@ "dev": true }, "autoprefixer": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.5.tgz", - "integrity": "sha512-Fvd8yCoA7lNX/OUllvS+aS1I7WRBclGXsepbvT8ZaPgrH24rgXpZzF0/6Hh3ZEkwg+0AES/Osd196VZmYoEFtw==", + "version": "10.4.7", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.7.tgz", + "integrity": "sha512-ypHju4Y2Oav95SipEcCcI5J7CGPuvz8oat7sUtYj3ClK44bldfvtvcxK6IEK++7rqB7YchDGzweZIBG+SD0ZAA==", "requires": { - "browserslist": "^4.20.2", - "caniuse-lite": "^1.0.30001332", + "browserslist": "^4.20.3", + "caniuse-lite": "^1.0.30001335", "fraction.js": "^4.2.0", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", @@ -11467,14 +11450,14 @@ } }, "browserslist": { - "version": "4.20.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz", - "integrity": "sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==", + "version": "4.20.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.3.tgz", + "integrity": "sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg==", "requires": { - "caniuse-lite": "^1.0.30001317", - "electron-to-chromium": "^1.4.84", + "caniuse-lite": "^1.0.30001332", + "electron-to-chromium": "^1.4.118", "escalade": "^3.1.1", - "node-releases": "^2.0.2", + "node-releases": "^2.0.3", "picocolors": "^1.0.0" } }, @@ -11570,9 +11553,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001332", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001332.tgz", - "integrity": "sha512-10T30NYOEQtN6C11YGg411yebhvpnC6Z102+B95eAsN0oB6KUs01ivE8u+G6FMIRtIrVlYXhL+LUwQ3/hXwDWw==" + "version": "1.0.30001338", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001338.tgz", + "integrity": "sha512-1gLHWyfVoRDsHieO+CaeYe7jSo/MT7D7lhaXUiwwbuR5BwQxORs0f1tAwUSQr3YbxRXJvxHM/PA5FfPQRnsPeQ==" }, "capital-case": { "version": "1.0.4", @@ -12221,12 +12204,13 @@ "dev": true }, "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", "dev": true, "requires": { - "object-keys": "^1.0.12" + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" } }, "defined": { @@ -12326,9 +12310,9 @@ } }, "electron-to-chromium": { - "version": "1.4.118", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.118.tgz", - "integrity": "sha512-maZIKjnYDvF7Fs35nvVcyr44UcKNwybr93Oba2n3HkKDFAtk0svERkLN/HyczJDS3Fo4wU9th9fUQd09ZLtj1w==" + "version": "1.4.137", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.137.tgz", + "integrity": "sha512-0Rcpald12O11BUogJagX3HsCN3FE83DSqWjgXoHo5a72KUKMSfI39XBgJpgNNxS9fuGzytaFjE06kZkiVFy2qA==" }, "elegant-spinner": { "version": "1.0.1", @@ -12361,31 +12345,43 @@ } }, "es-abstract": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", - "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.0.tgz", + "integrity": "sha512-URbD8tgRthKD3YcC39vbvSDrX23upXnPcnGAjQfgxXF5ID75YcENawc9ZX/9iTP9ptUyfCLIxTTuMYoRfiOVKA==", "dev": true, "requires": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", "get-intrinsic": "^1.1.1", "get-symbol-description": "^1.0.0", "has": "^1.0.3", - "has-symbols": "^1.0.2", + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", "internal-slot": "^1.0.3", "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.1", + "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", + "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", - "is-weakref": "^1.0.1", - "object-inspect": "^1.11.0", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.0", "object-keys": "^1.1.1", "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" + "regexp.prototype.flags": "^1.4.1", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" + } + }, + "es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "requires": { + "has": "^1.0.3" } }, "es-to-primitive": { @@ -12411,12 +12407,12 @@ "dev": true }, "eslint": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.14.0.tgz", - "integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.15.0.tgz", + "integrity": "sha512-GG5USZ1jhCu8HJkzGgeK8/+RGnHaNYZGrGDzUtigK3BsGESW/rs2az23XqE0WVwDxy1VRvvjSSGu5nB0Bu+6SA==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.2.2", + "@eslint/eslintrc": "^1.2.3", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -12427,7 +12423,7 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.1", + "espree": "^9.3.2", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -12443,7 +12439,7 @@ "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", "regexpp": "^3.2.0", @@ -12454,115 +12450,79 @@ } }, "eslint-config-next": { - "version": "12.1.5", - "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-12.1.5.tgz", - "integrity": "sha512-P+DCt5ti63KhC0qNLzrAmPcwRGq8pYqgcf/NNr1E+WjCrMkWdCAXkIANTquo+kcO1adR2k1lTo5GCrNUtKy4hQ==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-12.1.6.tgz", + "integrity": "sha512-qoiS3g/EPzfCTkGkaPBSX9W0NGE/B1wNO3oWrd76QszVGrdpLggNqcO8+LR6MB0CNqtp9Q8NoeVrxNVbzM9hqA==", "dev": true, "requires": { - "@next/eslint-plugin-next": "12.1.5", - "@rushstack/eslint-patch": "1.0.8", - "@typescript-eslint/parser": "5.10.1", - "eslint-import-resolver-node": "0.3.4", - "eslint-import-resolver-typescript": "2.4.0", - "eslint-plugin-import": "2.25.2", - "eslint-plugin-jsx-a11y": "6.5.1", - "eslint-plugin-react": "7.29.1", - "eslint-plugin-react-hooks": "4.3.0" - }, - "dependencies": { - "@typescript-eslint/parser": { - "version": "5.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.10.1.tgz", - "integrity": "sha512-GReo3tjNBwR5RnRO0K2wDIDN31cM3MmDtgyQ85oAxAmC5K3j/g85IjP+cDfcqDsDDBf1HNKQAD0WqOYL8jXqUA==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "5.10.1", - "@typescript-eslint/types": "5.10.1", - "@typescript-eslint/typescript-estree": "5.10.1", - "debug": "^4.3.2" - } - }, - "@typescript-eslint/scope-manager": { - "version": "5.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.10.1.tgz", - "integrity": "sha512-Lyvi559Gvpn94k7+ElXNMEnXu/iundV5uFmCUNnftbFrUbAJ1WBoaGgkbOBm07jVZa682oaBU37ao/NGGX4ZDg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.10.1", - "@typescript-eslint/visitor-keys": "5.10.1" - } - }, - "@typescript-eslint/types": { - "version": "5.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.10.1.tgz", - "integrity": "sha512-ZvxQ2QMy49bIIBpTqFiOenucqUyjTQ0WNLhBM6X1fh1NNlYAC6Kxsx8bRTY3jdYsYg44a0Z/uEgQkohbR0H87Q==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.1.tgz", - "integrity": "sha512-PwIGnH7jIueXv4opcwEbVGDATjGPO1dx9RkUl5LlHDSe+FXxPwFL5W/qYd5/NHr7f6lo/vvTrAzd0KlQtRusJQ==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.10.1", - "@typescript-eslint/visitor-keys": "5.10.1", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.1.tgz", - "integrity": "sha512-NjQ0Xinhy9IL979tpoTRuLKxMc0zJC7QVSdeerXs2/QvOy2yRkzX5dRb10X5woNUdJgU8G3nYRDlI33sq1K4YQ==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.10.1", - "eslint-visitor-keys": "^3.0.0" - } - } + "@next/eslint-plugin-next": "12.1.6", + "@rushstack/eslint-patch": "^1.1.3", + "@typescript-eslint/parser": "^5.21.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-import-resolver-typescript": "^2.7.1", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-jsx-a11y": "^6.5.1", + "eslint-plugin-react": "^7.29.4", + "eslint-plugin-react-hooks": "^4.5.0" } }, "eslint-import-resolver-node": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", - "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", "dev": true, "requires": { - "debug": "^2.6.9", - "resolve": "^1.13.1" + "debug": "^3.2.7", + "resolve": "^1.20.0" }, "dependencies": { "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true } } }, "eslint-import-resolver-typescript": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.4.0.tgz", - "integrity": "sha512-useJKURidCcldRLCNKWemr1fFQL1SzB3G4a0li6lFGvlc5xGe1hY343bvG07cbpCzPuM/lK19FIJB3XGFSkplA==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.7.1.tgz", + "integrity": "sha512-00UbgGwV8bSgUv34igBDbTOtKhqoRMy9bFjNehT40bXg6585PNIct8HhXZ0SybqB9rWtXj9crcku8ndDn/gIqQ==", "dev": true, "requires": { - "debug": "^4.1.1", - "glob": "^7.1.6", - "is-glob": "^4.0.1", - "resolve": "^1.17.0", - "tsconfig-paths": "^3.9.0" + "debug": "^4.3.4", + "glob": "^7.2.0", + "is-glob": "^4.0.3", + "resolve": "^1.22.0", + "tsconfig-paths": "^3.14.1" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } } }, "eslint-module-utils": { @@ -12587,9 +12547,9 @@ } }, "eslint-plugin-import": { - "version": "2.25.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.2.tgz", - "integrity": "sha512-qCwQr9TYfoBHOFcVGKY9C9unq05uOxxdklmBXLVvcwo68y5Hta6/GzCZEMx2zQiu0woKNEER0LE7ZgaOfBU14g==", + "version": "2.26.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz", + "integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==", "dev": true, "requires": { "array-includes": "^3.1.4", @@ -12597,14 +12557,14 @@ "debug": "^2.6.9", "doctrine": "^2.1.0", "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.7.0", + "eslint-module-utils": "^2.7.3", "has": "^1.0.3", - "is-core-module": "^2.7.0", + "is-core-module": "^2.8.1", "is-glob": "^4.0.3", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "object.values": "^1.1.5", - "resolve": "^1.20.0", - "tsconfig-paths": "^3.11.0" + "resolve": "^1.22.0", + "tsconfig-paths": "^3.14.1" }, "dependencies": { "debug": { @@ -12625,33 +12585,6 @@ "esutils": "^2.0.2" } }, - "eslint-import-resolver-node": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", - "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", - "dev": true, - "requires": { - "debug": "^3.2.7", - "resolve": "^1.20.0" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - } - } - }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -12681,9 +12614,9 @@ } }, "eslint-plugin-react": { - "version": "7.29.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.29.1.tgz", - "integrity": "sha512-WtzRpHMhsOX05ZrkyaaqmLl2uXGqmYooCfBxftJKlkYdsltiufGgfU7uuoHwR2lBam2Kh/EIVID4aU9e3kbCMA==", + "version": "7.29.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.29.4.tgz", + "integrity": "sha512-CVCXajliVh509PcZYRFyu/BoUEz452+jtQJq2b3Bae4v3xBUWPLCmtmBM+ZinG4MzwmxJgJ2M5rMqhqLVn7MtQ==", "dev": true, "requires": { "array-includes": "^3.1.4", @@ -12730,9 +12663,9 @@ } }, "eslint-plugin-react-hooks": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz", - "integrity": "sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.5.0.tgz", + "integrity": "sha512-8k1gRt7D7h03kd+SAAlzXkQwWK22BnK6GKZG+FJA6BAGy22CFvl8kCIXKpVux0cCxMWDQUPqSok0LKaZ0aOcCw==", "dev": true, "requires": {} }, @@ -12770,13 +12703,13 @@ "dev": true }, "espree": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", - "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", + "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", "dev": true, "requires": { - "acorn": "^8.7.0", - "acorn-jsx": "^5.3.1", + "acorn": "^8.7.1", + "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.3.0" } }, @@ -13038,12 +12971,30 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + } + }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true + }, "gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -13152,12 +13103,9 @@ } }, "graphql": { - "version": "14.7.0", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.7.0.tgz", - "integrity": "sha512-l0xWZpoPKpppFzMfvVyFmp9vLN7w/ZZJPefUicMCepfJeQ8sMcztloGYY9DfjVPo6tIUDzU5Hw3MUbIjj9AVVA==", - "requires": { - "iterall": "^1.2.2" - } + "version": "16.4.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.4.0.tgz", + "integrity": "sha512-tYDNcRvKCcfHREZYje3v33NSrSD/ZpbWWdPtBtUUuXx9NCo/2QDxYzNqCnMvfsrnbwRpEHMovVrPu/ERoLrIRg==" }, "graphql-request": { "version": "4.2.0", @@ -13234,9 +13182,9 @@ } }, "has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true }, "has-flag": { @@ -13245,6 +13193,15 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.1" + } + }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -13491,9 +13448,9 @@ "dev": true }, "is-number-object": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", - "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, "requires": { "has-tostringtag": "^1.0.0" @@ -13534,10 +13491,13 @@ } }, "is-shared-array-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", - "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", - "dev": true + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } }, "is-stream": { "version": "1.1.0", @@ -13627,7 +13587,8 @@ "iterall": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz", - "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==" + "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==", + "dev": true }, "js-tokens": { "version": "4.0.0", @@ -14198,27 +14159,26 @@ "dev": true }, "next": { - "version": "12.1.2", - "resolved": "https://registry.npmjs.org/next/-/next-12.1.2.tgz", - "integrity": "sha512-JHPCsnFTBO0Z4SQxSYc611UA1WA+r/3y3Neg66AH5/gSO/oksfRnFw/zGX/FZ9+oOUHS9y3wJFawNpVYR2gJSQ==", + "version": "12.1.6", + "resolved": "https://registry.npmjs.org/next/-/next-12.1.6.tgz", + "integrity": "sha512-cebwKxL3/DhNKfg9tPZDQmbRKjueqykHHbgaoG4VBRH3AHQJ2HO0dbKFiS1hPhe1/qgc2d/hFeadsbPicmLD+A==", "requires": { - "@next/env": "12.1.2", - "@next/swc-android-arm-eabi": "12.1.2", - "@next/swc-android-arm64": "12.1.2", - "@next/swc-darwin-arm64": "12.1.2", - "@next/swc-darwin-x64": "12.1.2", - "@next/swc-linux-arm-gnueabihf": "12.1.2", - "@next/swc-linux-arm64-gnu": "12.1.2", - "@next/swc-linux-arm64-musl": "12.1.2", - "@next/swc-linux-x64-gnu": "12.1.2", - "@next/swc-linux-x64-musl": "12.1.2", - "@next/swc-win32-arm64-msvc": "12.1.2", - "@next/swc-win32-ia32-msvc": "12.1.2", - "@next/swc-win32-x64-msvc": "12.1.2", - "caniuse-lite": "^1.0.30001283", + "@next/env": "12.1.6", + "@next/swc-android-arm-eabi": "12.1.6", + "@next/swc-android-arm64": "12.1.6", + "@next/swc-darwin-arm64": "12.1.6", + "@next/swc-darwin-x64": "12.1.6", + "@next/swc-linux-arm-gnueabihf": "12.1.6", + "@next/swc-linux-arm64-gnu": "12.1.6", + "@next/swc-linux-arm64-musl": "12.1.6", + "@next/swc-linux-x64-gnu": "12.1.6", + "@next/swc-linux-x64-musl": "12.1.6", + "@next/swc-win32-arm64-msvc": "12.1.6", + "@next/swc-win32-ia32-msvc": "12.1.6", + "@next/swc-win32-x64-msvc": "12.1.6", + "caniuse-lite": "^1.0.30001332", "postcss": "8.4.5", - "styled-jsx": "5.0.1", - "use-subscription": "1.5.1" + "styled-jsx": "5.0.2" }, "dependencies": { "postcss": { @@ -14264,14 +14224,14 @@ "dev": true }, "node-releases": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz", - "integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.4.tgz", + "integrity": "sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ==" }, "nodemailer": { - "version": "6.7.3", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.7.3.tgz", - "integrity": "sha512-KUdDsspqx89sD4UUyUKzdlUOper3hRkDVkrKh/89G+d9WKsU5ox51NWS4tB1XR5dPUdR4SP0E3molyEfOvSa3g==" + "version": "6.7.5", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.7.5.tgz", + "integrity": "sha512-6VtMpwhsrixq1HDYSBBHvW0GwiWawE75dS3oal48VqRhUvKJNnKnJo2RI/bCVQubj1vgrgscMNW4DHaD6xtMCg==" }, "normalize-path": { "version": "3.0.0", @@ -14305,7 +14265,8 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true }, "object-hash": { "version": "3.0.0", @@ -14360,13 +14321,13 @@ } }, "object.hasown": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.0.tgz", - "integrity": "sha512-MhjYRfj3GBlhSkDHo6QmvgjRLXQ2zndabdf3nX0yTyZK9rPfxb6uRpAac8HXNLy1GpqWtZ81Qh4v3uOls2sRAg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.1.tgz", + "integrity": "sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A==", "dev": true, "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" } }, "object.values": { @@ -14772,22 +14733,20 @@ } }, "react": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", - "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.1.0.tgz", + "integrity": "sha512-4oL8ivCz5ZEPyclFQXaNksK3adutVS8l2xzZU0cqEFrE9Sb7fC0EFK5uEk74wIreL1DERyjvsU915j1pcT2uEQ==", "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" + "loose-envify": "^1.1.0" } }, "react-dom": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", - "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", + "version": "18.1.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.1.0.tgz", + "integrity": "sha512-fU1Txz7Budmvamp7bshe4Zi32d0ll7ect+ccxNu9FlObT605GOEB8BfO4tmRJ39R5Zj831VCpvQ05QPBW5yb+w==", "requires": { "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "scheduler": "^0.20.2" + "scheduler": "^0.22.0" } }, "react-hotkeys-hook": { @@ -14805,9 +14764,9 @@ "dev": true }, "react-swipeable": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/react-swipeable/-/react-swipeable-6.2.1.tgz", - "integrity": "sha512-JpTj+tjJTDcIWtoMkab6zfwWD1T1tBzUyEfXsXnohnNkwA2dTuNS0gtN7HoxU1Qa+e3GDnfNYk2z7vwzfO4SoQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/react-swipeable/-/react-swipeable-7.0.0.tgz", + "integrity": "sha512-NI7KGfQ6gwNFN0Hor3vytYW3iRfMMaivGEuxcADOOfBCx/kqwXE8IfHFxEcxSUkxCYf38COLKYd9EMYZghqaUA==", "requires": {} }, "readable-stream": { @@ -14837,13 +14796,14 @@ "dev": true }, "regexp.prototype.flags": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz", - "integrity": "sha512-pMR7hBVUUGI7PMA37m2ofIdQCsomVnas+Jn5UPGAHQ+/LlwKm/aTLJHdasmHRzlfeZwHiAOaRSo2rbBDm3nNUQ==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" } }, "regexpp": { @@ -15005,12 +14965,11 @@ "dev": true }, "scheduler": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", - "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.22.0.tgz", + "integrity": "sha512-6QAm1BgQI88NPYymgGQLCZgvep4FyePDWFpXVK+zNSUgHwlqpJy8VEh8Et0KxTACS4VWwMousBElAZOH9nkkoQ==", "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" + "loose-envify": "^1.1.0" } }, "scuid": { @@ -15090,12 +15049,6 @@ "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", "dev": true }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, "source-map-js": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", @@ -15195,23 +15148,25 @@ } }, "string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", + "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" } }, "string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", + "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" } }, "strip-ansi": { @@ -15236,9 +15191,9 @@ "dev": true }, "styled-jsx": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.1.tgz", - "integrity": "sha512-+PIZ/6Uk40mphiQJJI1202b+/dYeTVd9ZnMPR80pgiWbjIwvN2zIp4r9et0BgqBuShh48I0gttPlAXA7WVvBxw==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.2.tgz", + "integrity": "sha512-LqPQrbBh3egD57NBcHET4qcgshPks+yblyhPlH2GY8oaDgKs8SK4C3dBh3oSJjgzJ3G5t1SYEZGHkP+QEpX9EQ==", "requires": {} }, "supports-color": { @@ -15429,9 +15384,9 @@ "dev": true }, "typescript": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz", - "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==", + "version": "4.6.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz", + "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==", "dev": true }, "ua-parser-js": { @@ -15441,14 +15396,14 @@ "dev": true }, "unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, "requires": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", "which-boxed-primitive": "^1.0.2" } }, @@ -15502,14 +15457,6 @@ "prepend-http": "^2.0.0" } }, - "use-subscription": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/use-subscription/-/use-subscription-1.5.1.tgz", - "integrity": "sha512-Xv2a1P/yReAjAbhylMfFplFKj9GssgTwN7RlcTxBujFQcloStWNDQdc4g4NRWH9xS4i/FDk04vQBptAXoF3VcA==", - "requires": { - "object-assign": "^4.1.1" - } - }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", diff --git a/package.json b/package.json index 7af19cc..722fb05 100644 --- a/package.json +++ b/package.json @@ -16,39 +16,39 @@ "@fontsource/material-icons": "^4.5.4", "@fontsource/material-icons-rounded": "^4.5.4", "@fontsource/opendyslexic": "^4.5.4", - "@fontsource/vollkorn": "^4.5.6", - "@fontsource/zen-maru-gothic": "^4.5.8", + "@fontsource/vollkorn": "^4.5.9", + "@fontsource/zen-maru-gothic": "^4.5.11", "@tippyjs/react": "^4.2.6", - "autoprefixer": "^10.4.5", + "autoprefixer": "^10.4.7", "graphql-request": "^4.2.0", "markdown-to-jsx": "^7.1.7", - "next": "^12.1.2", - "nodemailer": "^6.7.3", - "react": "17.0.2", - "react-dom": "17.0.2", + "next": "^12.1.6", + "nodemailer": "^6.7.5", + "react": "18.1.0", + "react-dom": "18.1.0", "react-hotkeys-hook": "^3.4.4", - "react-swipeable": "^6.2.1", + "react-swipeable": "^7.0.0", "turndown": "^7.1.1" }, "devDependencies": { "@graphql-codegen/cli": "^2.6.2", - "@graphql-codegen/typescript": "2.4.8", - "@graphql-codegen/typescript-graphql-request": "^4.4.5", - "@graphql-codegen/typescript-operations": "^2.3.5", - "@types/node": "17.0.25", + "@graphql-codegen/typescript": "2.4.10", + "@graphql-codegen/typescript-graphql-request": "^4.4.7", + "@graphql-codegen/typescript-operations": "^2.3.7", + "@types/node": "17.0.31", "@types/nodemailer": "^6.4.4", - "@types/react": "17.0.43", - "@types/react-dom": "^17.0.14", + "@types/react": "18.0.9", + "@types/react-dom": "^18.0.3", "@types/turndown": "^5.0.1", - "@typescript-eslint/eslint-plugin": "^5.20.0", - "@typescript-eslint/parser": "^5.20.0", - "eslint": "^8.14.0", - "eslint-config-next": "12.1.5", - "graphql": "^14.7.0", + "@typescript-eslint/eslint-plugin": "^5.22.0", + "@typescript-eslint/parser": "^5.22.0", + "eslint": "^8.15.0", + "eslint-config-next": "12.1.6", + "graphql": "^16.4.0", "next-sitemap": "^2.5.20", "prettier": "^2.6.2", "prettier-plugin-organize-imports": "^2.3.4", "tailwindcss": "^3.0.24", - "typescript": "^4.6.3" + "typescript": "^4.6.4" } } -- 2.40.1 From 6d2240fb55d84b4f50e9f5c1db13c168c0ab92c0 Mon Sep 17 00:00:00 2001 From: DrMint Date: Sat, 7 May 2022 19:55:08 +0200 Subject: [PATCH 03/30] Lightbox gestures and keyboard navigation --- package-lock.json | 63 ++++++++++++--------- package.json | 3 +- src/components/AppLayout.tsx | 24 ++++---- src/components/LightBox.tsx | 94 ++++++++++++++++++++----------- src/components/Popup.tsx | 85 ++++++++++++++++++---------- src/contexts/AppLayoutContext.tsx | 10 +++- 6 files changed, 176 insertions(+), 103 deletions(-) diff --git a/package-lock.json b/package-lock.json index e54a9fe..711cb84 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,12 +14,13 @@ "@tippyjs/react": "^4.2.6", "autoprefixer": "^10.4.7", "graphql-request": "^4.2.0", + "lightgallery": "^2.4.0", "markdown-to-jsx": "^7.1.7", "next": "^12.1.6", "nodemailer": "^6.7.5", "react": "18.1.0", "react-dom": "18.1.0", - "react-hotkeys-hook": "^3.4.4", + "react-hot-keys": "^2.7.2", "react-swipeable": "^7.0.0", "turndown": "^7.1.1" }, @@ -907,7 +908,6 @@ "version": "7.17.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz", "integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==", - "dev": true, "dependencies": { "regenerator-runtime": "^0.13.4" }, @@ -6275,6 +6275,14 @@ "node": ">= 0.8.0" } }, + "node_modules/lightgallery": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/lightgallery/-/lightgallery-2.4.0.tgz", + "integrity": "sha512-9i/E/w3yaqs56y3k6SWIUS3JTLpeDCZIVnIuNppzAmj5KjLGy5wrFisoDUD0HdxVUdX0wHG5mjvB4h0TXtyf/w==", + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/lilconfig": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", @@ -6965,7 +6973,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -7574,7 +7581,6 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -7679,23 +7685,24 @@ "react": "^18.1.0" } }, - "node_modules/react-hotkeys-hook": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/react-hotkeys-hook/-/react-hotkeys-hook-3.4.4.tgz", - "integrity": "sha512-vaORq07rWgmuF3owWRhgFV/3VL8/l2q9lz0WyVEddJnWTtKW+AOgU5YgYKuwN6h6h7bCcLG3MFsJIjCrM/5DvQ==", + "node_modules/react-hot-keys": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/react-hot-keys/-/react-hot-keys-2.7.2.tgz", + "integrity": "sha512-Z7eSh7SU6s52+zP+vkfFoNk0x4kgEmnwqDiyACKv53crK2AZ7FUaBLnf+vxLor3dvtId9murLmKOsrJeYgeHWw==", "dependencies": { - "hotkeys-js": "3.8.7" + "hotkeys-js": "^3.8.1", + "prop-types": "^15.7.2" }, "peerDependencies": { - "react": ">=16.8.1", - "react-dom": ">=16.8.1" + "@babel/runtime": ">=7.10.0", + "react": ">=16.9.0", + "react-dom": ">=16.9.0" } }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/react-swipeable": { "version": "7.0.0", @@ -7734,8 +7741,7 @@ "node_modules/regenerator-runtime": { "version": "0.13.9", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" }, "node_modules/regexp.prototype.flags": { "version": "1.4.3", @@ -9605,7 +9611,6 @@ "version": "7.17.2", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz", "integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==", - "dev": true, "requires": { "regenerator-runtime": "^0.13.4" } @@ -13768,6 +13773,11 @@ "type-check": "~0.4.0" } }, + "lightgallery": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/lightgallery/-/lightgallery-2.4.0.tgz", + "integrity": "sha512-9i/E/w3yaqs56y3k6SWIUS3JTLpeDCZIVnIuNppzAmj5KjLGy5wrFisoDUD0HdxVUdX0wHG5mjvB4h0TXtyf/w==" + }, "lilconfig": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", @@ -14265,8 +14275,7 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "object-hash": { "version": "3.0.0", @@ -14677,7 +14686,6 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, "requires": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -14749,19 +14757,19 @@ "scheduler": "^0.22.0" } }, - "react-hotkeys-hook": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/react-hotkeys-hook/-/react-hotkeys-hook-3.4.4.tgz", - "integrity": "sha512-vaORq07rWgmuF3owWRhgFV/3VL8/l2q9lz0WyVEddJnWTtKW+AOgU5YgYKuwN6h6h7bCcLG3MFsJIjCrM/5DvQ==", + "react-hot-keys": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/react-hot-keys/-/react-hot-keys-2.7.2.tgz", + "integrity": "sha512-Z7eSh7SU6s52+zP+vkfFoNk0x4kgEmnwqDiyACKv53crK2AZ7FUaBLnf+vxLor3dvtId9murLmKOsrJeYgeHWw==", "requires": { - "hotkeys-js": "3.8.7" + "hotkeys-js": "^3.8.1", + "prop-types": "^15.7.2" } }, "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "react-swipeable": { "version": "7.0.0", @@ -14792,8 +14800,7 @@ "regenerator-runtime": { "version": "0.13.9", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" }, "regexp.prototype.flags": { "version": "1.4.3", diff --git a/package.json b/package.json index 722fb05..58c7a70 100644 --- a/package.json +++ b/package.json @@ -21,12 +21,13 @@ "@tippyjs/react": "^4.2.6", "autoprefixer": "^10.4.7", "graphql-request": "^4.2.0", + "lightgallery": "^2.4.0", "markdown-to-jsx": "^7.1.7", "next": "^12.1.6", "nodemailer": "^6.7.5", "react": "18.1.0", "react-dom": "18.1.0", - "react-hotkeys-hook": "^3.4.4", + "react-hot-keys": "^2.7.2", "react-swipeable": "^7.0.0", "turndown": "^7.1.1" }, diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index 044ab83..34256a7 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -39,19 +39,23 @@ export default function AppLayout(props: Props): JSX.Element { const handlers = useSwipeable({ onSwipedLeft: (SwipeEventData) => { - if (SwipeEventData.velocity < sensibilitySwipe) return; - if (appLayout.mainPanelOpen) { - appLayout.setMainPanelOpen(false); - } else if (subPanel && contentPanel) { - appLayout.setSubPanelOpen(true); + if (appLayout.menuGestures) { + if (SwipeEventData.velocity < sensibilitySwipe) return; + if (appLayout.mainPanelOpen) { + appLayout.setMainPanelOpen(false); + } else if (subPanel && contentPanel) { + appLayout.setSubPanelOpen(true); + } } }, onSwipedRight: (SwipeEventData) => { - if (SwipeEventData.velocity < sensibilitySwipe) return; - if (appLayout.subPanelOpen) { - appLayout.setSubPanelOpen(false); - } else { - appLayout.setMainPanelOpen(true); + if (appLayout.menuGestures) { + if (SwipeEventData.velocity < sensibilitySwipe) return; + if (appLayout.subPanelOpen) { + appLayout.setSubPanelOpen(false); + } else { + appLayout.setMainPanelOpen(true); + } } }, }); diff --git a/src/components/LightBox.tsx b/src/components/LightBox.tsx index fa521da..eeb42c2 100644 --- a/src/components/LightBox.tsx +++ b/src/components/LightBox.tsx @@ -1,5 +1,6 @@ -import { Dispatch, SetStateAction, useCallback } from "react"; -import { useHotkeys } from "react-hotkeys-hook"; +import { Dispatch, SetStateAction } from "react"; +import Hotkeys from "react-hot-keys"; +import { useSwipeable } from "react-swipeable"; import Img from "./Img"; import Button from "./Inputs/Button"; import Popup from "./Popup"; @@ -16,46 +17,73 @@ interface Props { export default function LightBox(props: Props): JSX.Element { const { state, setState, images, index, setIndex } = props; - const handlePrevious = useCallback(() => { - setIndex((previousIndex) => (previousIndex > 0 ? previousIndex - 1 : 0)); - }, [setIndex]); - const handleNext = useCallback(() => { - setIndex((previousIndex) => - previousIndex < images.length - 1 ? previousIndex + 1 : images.length - 1 - ); - }, [images.length, setIndex]); + function handlePrevious() { + if (index > 0) setIndex(index - 1); + } - useHotkeys("left", handlePrevious); - useHotkeys("right", handleNext); + function handleNext() { + if (index < images.length - 1) setIndex(index + 1); + } + + const sensibilitySwipe = 0.5; + + const handlers = useSwipeable({ + onSwipedLeft: (SwipeEventData) => { + if (SwipeEventData.velocity < sensibilitySwipe) return; + handleNext(); + }, + onSwipedRight: (SwipeEventData) => { + if (SwipeEventData.velocity < sensibilitySwipe) return; + handlePrevious(); + }, + }); return ( <> {state && ( - -
-
- {index > 0 && ( - - )} -
+ { + if (keyName === "left") { + handlePrevious(); + } else { + handleNext(); + } + }} + > + +
+
+ {index > 0 && ( + + )} +
- + -
- {index < images.length - 1 && ( - - )} +
+ {index < images.length - 1 && ( + + )} +
-
-
+ +
)} ); diff --git a/src/components/Popup.tsx b/src/components/Popup.tsx index 628c8bf..5d0b96b 100644 --- a/src/components/Popup.tsx +++ b/src/components/Popup.tsx @@ -1,4 +1,6 @@ -import { Dispatch, SetStateAction } from "react"; +import { useAppLayout } from "contexts/AppLayoutContext"; +import { Dispatch, SetStateAction, useEffect } from "react"; +import Hotkeys from "react-hot-keys"; interface Props { setState: @@ -8,42 +10,65 @@ interface Props { children: React.ReactNode; fillViewport?: boolean; hideBackground?: boolean; + padding?: boolean; } export default function Popup(props: Props): JSX.Element { + const { + setState, + state, + children, + fillViewport, + hideBackground, + padding = true, + } = props; + + const appLayout = useAppLayout(); + + useEffect(() => { + appLayout.setMenuGestures(!state); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [state]); + return ( -
{ + setState(false); + }} >
{ - props.setState(false); - }} - /> - -
- {props.children} +
{ + setState(false); + }} + /> + +
+ {children} +
-
+ ); } diff --git a/src/contexts/AppLayoutContext.tsx b/src/contexts/AppLayoutContext.tsx index 79a750b..67b0fd2 100644 --- a/src/contexts/AppLayoutContext.tsx +++ b/src/contexts/AppLayoutContext.tsx @@ -1,6 +1,6 @@ import useDarkMode from "hooks/useDarkMode"; import useStateWithLocalStorage from "hooks/useStateWithLocalStorage"; -import React, { ReactNode, useContext } from "react"; +import React, { ReactNode, useContext, useState } from "react"; interface AppLayoutState { subPanelOpen: boolean | undefined; @@ -14,6 +14,7 @@ interface AppLayoutState { currency: string | undefined; playerName: string | undefined; preferredLanguages: string[] | undefined; + menuGestures: boolean; setSubPanelOpen: React.Dispatch>; setConfigPanelOpen: React.Dispatch>; setMainPanelReduced: React.Dispatch< @@ -31,6 +32,7 @@ interface AppLayoutState { setPreferredLanguages: React.Dispatch< React.SetStateAction >; + setMenuGestures: React.Dispatch>; } /* eslint-disable @typescript-eslint/no-empty-function */ @@ -46,6 +48,7 @@ const initialState: AppLayoutState = { currency: "USD", playerName: "", preferredLanguages: [], + menuGestures: true, setSubPanelOpen: () => {}, setMainPanelReduced: () => {}, setMainPanelOpen: () => {}, @@ -57,6 +60,7 @@ const initialState: AppLayoutState = { setCurrency: () => {}, setPlayerName: () => {}, setPreferredLanguages: () => {}, + setMenuGestures: () => {}, }; /* eslint-enable @typescript-eslint/no-empty-function */ @@ -115,6 +119,8 @@ export function AppContextProvider(props: Props): JSX.Element { string[] | undefined >("preferredLanguages", initialState.preferredLanguages); + const [menuGestures, setMenuGestures] = useState(false); + return ( {props.children} -- 2.40.1 From d4574af2cd06651921c0f2fb5958aa9169c11edf Mon Sep 17 00:00:00 2001 From: DrMint Date: Sat, 7 May 2022 19:57:27 +0200 Subject: [PATCH 04/30] Removed dep --- package-lock.json | 14 -------------- package.json | 1 - 2 files changed, 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 711cb84..19e31f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,6 @@ "@tippyjs/react": "^4.2.6", "autoprefixer": "^10.4.7", "graphql-request": "^4.2.0", - "lightgallery": "^2.4.0", "markdown-to-jsx": "^7.1.7", "next": "^12.1.6", "nodemailer": "^6.7.5", @@ -6275,14 +6274,6 @@ "node": ">= 0.8.0" } }, - "node_modules/lightgallery": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/lightgallery/-/lightgallery-2.4.0.tgz", - "integrity": "sha512-9i/E/w3yaqs56y3k6SWIUS3JTLpeDCZIVnIuNppzAmj5KjLGy5wrFisoDUD0HdxVUdX0wHG5mjvB4h0TXtyf/w==", - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/lilconfig": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", @@ -13773,11 +13764,6 @@ "type-check": "~0.4.0" } }, - "lightgallery": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/lightgallery/-/lightgallery-2.4.0.tgz", - "integrity": "sha512-9i/E/w3yaqs56y3k6SWIUS3JTLpeDCZIVnIuNppzAmj5KjLGy5wrFisoDUD0HdxVUdX0wHG5mjvB4h0TXtyf/w==" - }, "lilconfig": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz", diff --git a/package.json b/package.json index 58c7a70..351cd16 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,6 @@ "@tippyjs/react": "^4.2.6", "autoprefixer": "^10.4.7", "graphql-request": "^4.2.0", - "lightgallery": "^2.4.0", "markdown-to-jsx": "^7.1.7", "next": "^12.1.6", "nodemailer": "^6.7.5", -- 2.40.1 From a41b4a5ea14f3509862e35ccde55533ab1404b73 Mon Sep 17 00:00:00 2001 From: DrMint Date: Sun, 8 May 2022 00:28:34 +0200 Subject: [PATCH 05/30] Updated README --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c9088be..8293073 100644 --- a/README.md +++ b/README.md @@ -33,13 +33,15 @@ - Support for Arbitrary React Components and Component Props! - Autogenerated multi-level table of content and anchor links for the different headers - Styling: [Tailwind CSS](https://tailwindcss.com/) - - Good typographic defaults using [Tailwind/Typography](https://tailwindcss.com/docs/typography-plugin) - - Beside the theme declaration no CSS outside of Tailwind CSS - Manually added support for scrollbar styling - Support for [Material Icons](https://fonts.google.com/icons) - - Support for light and dark mode with a manual switch and system's selected theme by default - Support for creating any arbitrary theming mode by swapping CSS variables - Support for many screen sizes and resolutions +- Accessibility + - Gestures using [react-swipeable](https://www.npmjs.com/package/react-swipeable) + - Keyboard hotkeys using [react-hot-keys](https://www.npmjs.com/package/react-hot-keys) + - Support for light and dark mode with a manual switch and system's selected theme by default + - All fonts can be swaped to [OpenDyslexic](https://www.npmjs.com/package/@fontsource/opendyslexic) - Framework: [Next.js](https://nextjs.org/) (React) - Multilanguage support - State Management: [React Context](https://reactjs.org/docs/context.html) -- 2.40.1 From badbd4b956442a73a6ef66f67242aa1678933ed4 Mon Sep 17 00:00:00 2001 From: DrMint Date: Sun, 8 May 2022 00:30:18 +0200 Subject: [PATCH 06/30] Updated REAME --- README.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8293073..1d182aa 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ #### [Front](https://github.com/Accords-Library/accords-library.com) (this repository) - Language: [TypeScript](https://www.typescriptlang.org/) +- Framework: [Next.js](https://nextjs.org/) (React) - Queries: [GraphQL Code Generator](https://www.graphql-code-generator.com/) - Fetch the GraphQL schema from the GraphQL back-end endpoint - Read the operations and fragments stored as graphql files in the `src/graphql` folder @@ -37,26 +38,30 @@ - Support for [Material Icons](https://fonts.google.com/icons) - Support for creating any arbitrary theming mode by swapping CSS variables - Support for many screen sizes and resolutions +- State Management: [React Context](https://reactjs.org/docs/context.html) + - Persistent app state using LocalStorage - Accessibility - Gestures using [react-swipeable](https://www.npmjs.com/package/react-swipeable) - Keyboard hotkeys using [react-hot-keys](https://www.npmjs.com/package/react-hot-keys) - Support for light and dark mode with a manual switch and system's selected theme by default - - All fonts can be swaped to [OpenDyslexic](https://www.npmjs.com/package/@fontsource/opendyslexic) -- Framework: [Next.js](https://nextjs.org/) (React) - - Multilanguage support -- State Management: [React Context](https://reactjs.org/docs/context.html) - - Persistent app state using LocalStorage + - Fonts can be swaped to [OpenDyslexic](https://www.npmjs.com/package/@fontsource/opendyslexic) +- Multilingual + - By default, use the browser's language as the main language + - Fallback languages are used for content which are not available in the main language + - Main and fallback languages can be ordered manually by the user + - At the content level, the user can know which language is available + - Furthermore, the user can temporary select another language then the one that was automatically selected - SSG + ISR (Static Site Generation + Incremental Static Regeneration): - The website is built before running in production - Performances are great, and possibility to deploy the app using a CDN - - On-Demand ISR to continuously update the website when new content is added or existing content is modified/deleted. + - On-Demand ISR to continuously update the website when new content is added or existing content is modified/deleted - SEO - Good defaults for the metadate and OpenGraph properties - Each page can provide the thumbnail, title, description to be used - Automatic generation of the sitemap using [next-sitemap](https://www.npmjs.com/package/next-sitemap) - Data quality testing - Data from the CMS is subject to a battery of tests (about 20 warning types and 40 error types) at build time - - Each warning/error comes with a front-end link to the incriminating element, as well as a link to the CMS to fix it. + - Each warning/error comes with a front-end link to the incriminating element, as well as a link to the CMS to fix it - Check for completeness, conformity, and integrity ## Installation -- 2.40.1 From 08170887b9d2cad8075e303aafbc49288966b12d Mon Sep 17 00:00:00 2001 From: DrMint Date: Sun, 8 May 2022 11:26:22 +0200 Subject: [PATCH 07/30] Fixed missing playername in settings --- src/components/AppLayout.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index 34256a7..6df61e8 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -441,6 +441,7 @@ export default function AppLayout(props: Props): JSX.Element { (event.target as HTMLInputElement).value ) } + value={appLayout.playerName} />
-- 2.40.1 From b043e453c796f27535d09286d069f9f44cd598a4 Mon Sep 17 00:00:00 2001 From: DrMint Date: Sun, 8 May 2022 11:34:14 +0200 Subject: [PATCH 08/30] Renammed the queries folder to helpers --- src/components/AppLayout.tsx | 4 ++-- src/components/Inputs/LanguageSwitcher.tsx | 4 ++-- src/components/Inputs/OrderableList.tsx | 2 +- src/components/Library/ContentLine.tsx | 4 ++-- src/components/Library/ScanSet.tsx | 4 ++-- src/components/Library/ScanSetCover.tsx | 4 ++-- src/components/Markdown/Markdawn.tsx | 2 +- src/components/Markdown/TOC.tsx | 2 +- src/components/PanelComponents/ReturnButton.tsx | 2 +- src/components/Panels/MainPanel.tsx | 2 +- src/components/PostPage.tsx | 4 ++-- src/components/PreviewCard.tsx | 4 ++-- src/components/RecorderChip.tsx | 2 +- src/components/ThumbnailHeader.tsx | 4 ++-- src/components/Wiki/Chronology/ChronologyItemComponent.tsx | 4 ++-- src/components/Wiki/Chronology/ChronologyYearComponent.tsx | 2 +- src/{queries => helpers}/getAppStaticProps.ts | 0 src/{queries => helpers}/helpers.ts | 0 src/hooks/useSmartLanguage.tsx | 4 ++-- src/pages/404.tsx | 2 +- src/pages/500.tsx | 2 +- src/pages/about-us/accords-handbook.tsx | 2 +- src/pages/about-us/contact.tsx | 4 ++-- src/pages/about-us/index.tsx | 2 +- src/pages/about-us/legality.tsx | 2 +- src/pages/about-us/sharing-policy.tsx | 2 +- src/pages/archives/index.tsx | 2 +- src/pages/archives/videos/c/[uid].tsx | 4 ++-- src/pages/archives/videos/index.tsx | 4 ++-- src/pages/archives/videos/v/[uid].tsx | 4 ++-- src/pages/chronicles/index.tsx | 2 +- src/pages/contents/[slug]/index.tsx | 4 ++-- src/pages/contents/index.tsx | 4 ++-- src/pages/dev/checkup/contents.tsx | 2 +- src/pages/dev/checkup/libraryitems.tsx | 2 +- src/pages/dev/editor.tsx | 2 +- src/pages/gallery/index.tsx | 2 +- src/pages/index.tsx | 2 +- src/pages/library/[slug]/index.tsx | 4 ++-- src/pages/library/[slug]/scans.tsx | 4 ++-- src/pages/library/index.tsx | 4 ++-- src/pages/merch/index.tsx | 2 +- src/pages/news/[slug].tsx | 2 +- src/pages/news/index.tsx | 4 ++-- src/pages/wiki/chronology.tsx | 4 ++-- src/pages/wiki/index.tsx | 2 +- 46 files changed, 65 insertions(+), 65 deletions(-) rename src/{queries => helpers}/getAppStaticProps.ts (100%) rename src/{queries => helpers}/helpers.ts (100%) diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index 6df61e8..fbccb94 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -4,13 +4,13 @@ import { UploadImageFragment } from "graphql/generated"; import { useMediaMobile } from "hooks/useMediaQuery"; import Head from "next/head"; import { useRouter } from "next/router"; -import { AppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps } from "helpers/getAppStaticProps"; import { getOgImage, OgImage, prettyLanguage, prettySlug, -} from "queries/helpers"; +} from "helpers/helpers"; import { useEffect, useState } from "react"; import { useSwipeable } from "react-swipeable"; import { ImageQuality } from "./Img"; diff --git a/src/components/Inputs/LanguageSwitcher.tsx b/src/components/Inputs/LanguageSwitcher.tsx index d98b958..f5fc1c9 100644 --- a/src/components/Inputs/LanguageSwitcher.tsx +++ b/src/components/Inputs/LanguageSwitcher.tsx @@ -1,5 +1,5 @@ -import { AppStaticProps } from "queries/getAppStaticProps"; -import { prettyLanguage } from "queries/helpers"; +import { AppStaticProps } from "helpers/getAppStaticProps"; +import { prettyLanguage } from "helpers/helpers"; import { Dispatch, SetStateAction } from "react"; import ToolTip from "../ToolTip"; import Button from "./Button"; diff --git a/src/components/Inputs/OrderableList.tsx b/src/components/Inputs/OrderableList.tsx index c079bd2..da9eae4 100644 --- a/src/components/Inputs/OrderableList.tsx +++ b/src/components/Inputs/OrderableList.tsx @@ -1,4 +1,4 @@ -import { arrayMove } from "queries/helpers"; +import { arrayMove } from "helpers/helpers"; import { useEffect, useState } from "react"; interface Props { diff --git a/src/components/Library/ContentLine.tsx b/src/components/Library/ContentLine.tsx index e1dc01f..7b821a3 100644 --- a/src/components/Library/ContentLine.tsx +++ b/src/components/Library/ContentLine.tsx @@ -1,8 +1,8 @@ import Chip from "components/Chip"; import Button from "components/Inputs/Button"; import { GetLibraryItemQuery } from "graphql/generated"; -import { AppStaticProps } from "queries/getAppStaticProps"; -import { prettyinlineTitle, prettySlug } from "queries/helpers"; +import { AppStaticProps } from "helpers/getAppStaticProps"; +import { prettyinlineTitle, prettySlug } from "helpers/helpers"; import { useState } from "react"; interface Props { diff --git a/src/components/Library/ScanSet.tsx b/src/components/Library/ScanSet.tsx index 1dd924d..6fbf92e 100644 --- a/src/components/Library/ScanSet.tsx +++ b/src/components/Library/ScanSet.tsx @@ -9,8 +9,8 @@ import RecorderChip from "components/RecorderChip"; import ToolTip from "components/ToolTip"; import { GetLibraryItemScansQuery } from "graphql/generated"; import useSmartLanguage from "hooks/useSmartLanguage"; -import { AppStaticProps } from "queries/getAppStaticProps"; -import { getStatusDescription, isInteger } from "queries/helpers"; +import { AppStaticProps } from "helpers/getAppStaticProps"; +import { getStatusDescription, isInteger } from "helpers/helpers"; import { Dispatch, SetStateAction } from "react"; interface Props { diff --git a/src/components/Library/ScanSetCover.tsx b/src/components/Library/ScanSetCover.tsx index 6cea335..0b01216 100644 --- a/src/components/Library/ScanSetCover.tsx +++ b/src/components/Library/ScanSetCover.tsx @@ -7,8 +7,8 @@ import { UploadImageFragment, } from "graphql/generated"; import useSmartLanguage from "hooks/useSmartLanguage"; -import { AppStaticProps } from "queries/getAppStaticProps"; -import { getStatusDescription } from "queries/helpers"; +import { AppStaticProps } from "helpers/getAppStaticProps"; +import { getStatusDescription } from "helpers/helpers"; import { Dispatch, SetStateAction } from "react"; interface Props { diff --git a/src/components/Markdown/Markdawn.tsx b/src/components/Markdown/Markdawn.tsx index a8b2b2a..f6e8eb1 100644 --- a/src/components/Markdown/Markdawn.tsx +++ b/src/components/Markdown/Markdawn.tsx @@ -6,7 +6,7 @@ import ToolTip from "components/ToolTip"; import { useAppLayout } from "contexts/AppLayoutContext"; import Markdown from "markdown-to-jsx"; import { useRouter } from "next/router"; -import { slugify } from "queries/helpers"; +import { slugify } from "helpers/helpers"; import React, { useState } from "react"; import ReactDOMServer from "react-dom/server"; diff --git a/src/components/Markdown/TOC.tsx b/src/components/Markdown/TOC.tsx index 54822de..83ceeba 100644 --- a/src/components/Markdown/TOC.tsx +++ b/src/components/Markdown/TOC.tsx @@ -1,5 +1,5 @@ import { useRouter } from "next/router"; -import { slugify } from "queries/helpers"; +import { slugify } from "helpers/helpers"; import { preprocessMarkDawn } from "./Markdawn"; interface Props { diff --git a/src/components/PanelComponents/ReturnButton.tsx b/src/components/PanelComponents/ReturnButton.tsx index b7347a2..42649d3 100644 --- a/src/components/PanelComponents/ReturnButton.tsx +++ b/src/components/PanelComponents/ReturnButton.tsx @@ -1,7 +1,7 @@ import HorizontalLine from "components/HorizontalLine"; import Button from "components/Inputs/Button"; import { useAppLayout } from "contexts/AppLayoutContext"; -import { AppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps } from "helpers/getAppStaticProps"; interface Props { href: string; diff --git a/src/components/Panels/MainPanel.tsx b/src/components/Panels/MainPanel.tsx index 500b862..5c95204 100644 --- a/src/components/Panels/MainPanel.tsx +++ b/src/components/Panels/MainPanel.tsx @@ -6,7 +6,7 @@ import { useAppLayout } from "contexts/AppLayoutContext"; import { useMediaDesktop } from "hooks/useMediaQuery"; import Markdown from "markdown-to-jsx"; import Link from "next/link"; -import { AppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps } from "helpers/getAppStaticProps"; interface Props { langui: AppStaticProps["langui"]; diff --git a/src/components/PostPage.tsx b/src/components/PostPage.tsx index da7b5f2..cb46d4a 100644 --- a/src/components/PostPage.tsx +++ b/src/components/PostPage.tsx @@ -1,7 +1,7 @@ import { GetPostQuery } from "graphql/generated"; import useSmartLanguage from "hooks/useSmartLanguage"; -import { AppStaticProps } from "queries/getAppStaticProps"; -import { getStatusDescription, prettySlug } from "queries/helpers"; +import { AppStaticProps } from "helpers/getAppStaticProps"; +import { getStatusDescription, prettySlug } from "helpers/helpers"; import AppLayout from "./AppLayout"; import Chip from "./Chip"; import HorizontalLine from "./HorizontalLine"; diff --git a/src/components/PreviewCard.tsx b/src/components/PreviewCard.tsx index 0255a6f..5ba32d2 100644 --- a/src/components/PreviewCard.tsx +++ b/src/components/PreviewCard.tsx @@ -5,13 +5,13 @@ import { UploadImageFragment, } from "graphql/generated"; import Link from "next/link"; -import { AppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps } from "helpers/getAppStaticProps"; import { prettyDate, prettyDuration, prettyPrice, prettyShortenNumber, -} from "queries/helpers"; +} from "helpers/helpers"; import Chip from "./Chip"; import Img, { ImageQuality } from "./Img"; diff --git a/src/components/RecorderChip.tsx b/src/components/RecorderChip.tsx index 4a5a324..0cdfb2d 100644 --- a/src/components/RecorderChip.tsx +++ b/src/components/RecorderChip.tsx @@ -1,6 +1,6 @@ import Chip from "components/Chip"; import { RecorderChipFragment } from "graphql/generated"; -import { AppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps } from "helpers/getAppStaticProps"; import Img, { ImageQuality } from "./Img"; import Markdawn from "./Markdown/Markdawn"; import ToolTip from "./ToolTip"; diff --git a/src/components/ThumbnailHeader.tsx b/src/components/ThumbnailHeader.tsx index 7512e09..7d4fe85 100644 --- a/src/components/ThumbnailHeader.tsx +++ b/src/components/ThumbnailHeader.tsx @@ -3,8 +3,8 @@ import Img, { ImageQuality } from "components/Img"; import InsetBox from "components/InsetBox"; import Markdawn from "components/Markdown/Markdawn"; import { GetContentQuery, UploadImageFragment } from "graphql/generated"; -import { AppStaticProps } from "queries/getAppStaticProps"; -import { prettyinlineTitle, prettySlug, slugify } from "queries/helpers"; +import { AppStaticProps } from "helpers/getAppStaticProps"; +import { prettyinlineTitle, prettySlug, slugify } from "helpers/helpers"; interface Props { pre_title?: string | null | undefined; diff --git a/src/components/Wiki/Chronology/ChronologyItemComponent.tsx b/src/components/Wiki/Chronology/ChronologyItemComponent.tsx index ef1cb47..bc275d3 100644 --- a/src/components/Wiki/Chronology/ChronologyItemComponent.tsx +++ b/src/components/Wiki/Chronology/ChronologyItemComponent.tsx @@ -4,8 +4,8 @@ import { Enum_Componenttranslationschronologyitem_Status, GetChronologyItemsQuery, } from "graphql/generated"; -import { AppStaticProps } from "queries/getAppStaticProps"; -import { getStatusDescription } from "queries/helpers"; +import { AppStaticProps } from "helpers/getAppStaticProps"; +import { getStatusDescription } from "helpers/helpers"; interface Props { item: Exclude< diff --git a/src/components/Wiki/Chronology/ChronologyYearComponent.tsx b/src/components/Wiki/Chronology/ChronologyYearComponent.tsx index 69ba5b6..534eacd 100644 --- a/src/components/Wiki/Chronology/ChronologyYearComponent.tsx +++ b/src/components/Wiki/Chronology/ChronologyYearComponent.tsx @@ -1,6 +1,6 @@ import ChronologyItemComponent from "components/Wiki/Chronology/ChronologyItemComponent"; import { GetChronologyItemsQuery } from "graphql/generated"; -import { AppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps } from "helpers/getAppStaticProps"; interface Props { year: number; diff --git a/src/queries/getAppStaticProps.ts b/src/helpers/getAppStaticProps.ts similarity index 100% rename from src/queries/getAppStaticProps.ts rename to src/helpers/getAppStaticProps.ts diff --git a/src/queries/helpers.ts b/src/helpers/helpers.ts similarity index 100% rename from src/queries/helpers.ts rename to src/helpers/helpers.ts diff --git a/src/hooks/useSmartLanguage.tsx b/src/hooks/useSmartLanguage.tsx index ec6bf53..7228c80 100644 --- a/src/hooks/useSmartLanguage.tsx +++ b/src/hooks/useSmartLanguage.tsx @@ -1,8 +1,8 @@ import LanguageSwitcher from "components/Inputs/LanguageSwitcher"; import { useAppLayout } from "contexts/AppLayoutContext"; import { useRouter } from "next/router"; -import { AppStaticProps } from "queries/getAppStaticProps"; -import { getPreferredLanguage } from "queries/helpers"; +import { AppStaticProps } from "helpers/getAppStaticProps"; +import { getPreferredLanguage } from "helpers/helpers"; import { useEffect, useMemo, useState } from "react"; interface Props { diff --git a/src/pages/404.tsx b/src/pages/404.tsx index 6c69fdf..0ba10c1 100644 --- a/src/pages/404.tsx +++ b/src/pages/404.tsx @@ -4,7 +4,7 @@ import ReturnButton, { } from "components/PanelComponents/ReturnButton"; import ContentPanel from "components/Panels/ContentPanel"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; interface Props extends AppStaticProps {} diff --git a/src/pages/500.tsx b/src/pages/500.tsx index c647c95..f04f458 100644 --- a/src/pages/500.tsx +++ b/src/pages/500.tsx @@ -4,7 +4,7 @@ import ReturnButton, { } from "components/PanelComponents/ReturnButton"; import ContentPanel from "components/Panels/ContentPanel"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; interface Props extends AppStaticProps {} diff --git a/src/pages/about-us/accords-handbook.tsx b/src/pages/about-us/accords-handbook.tsx index f902502..2edc1d2 100644 --- a/src/pages/about-us/accords-handbook.tsx +++ b/src/pages/about-us/accords-handbook.tsx @@ -1,7 +1,7 @@ import PostPage, { Post } from "components/PostPage"; import { getReadySdk } from "graphql/sdk"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; interface Props extends AppStaticProps { post: Post; diff --git a/src/pages/about-us/contact.tsx b/src/pages/about-us/contact.tsx index 91f9b92..77fe8bf 100644 --- a/src/pages/about-us/contact.tsx +++ b/src/pages/about-us/contact.tsx @@ -4,8 +4,8 @@ import { getReadySdk } from "graphql/sdk"; import { GetStaticPropsContext } from "next"; import { useRouter } from "next/router"; import { RequestMailProps, ResponseMailProps } from "pages/api/mail"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; -import { randomInt } from "queries/helpers"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { randomInt } from "helpers/helpers"; import { useState } from "react"; interface Props extends AppStaticProps { diff --git a/src/pages/about-us/index.tsx b/src/pages/about-us/index.tsx index 750e308..bac403e 100644 --- a/src/pages/about-us/index.tsx +++ b/src/pages/about-us/index.tsx @@ -3,7 +3,7 @@ import NavOption from "components/PanelComponents/NavOption"; import PanelHeader from "components/PanelComponents/PanelHeader"; import SubPanel from "components/Panels/SubPanel"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; interface Props extends AppStaticProps {} diff --git a/src/pages/about-us/legality.tsx b/src/pages/about-us/legality.tsx index a6274a1..fd53d08 100644 --- a/src/pages/about-us/legality.tsx +++ b/src/pages/about-us/legality.tsx @@ -1,7 +1,7 @@ import PostPage, { Post } from "components/PostPage"; import { getReadySdk } from "graphql/sdk"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; interface Props extends AppStaticProps { post: Post; diff --git a/src/pages/about-us/sharing-policy.tsx b/src/pages/about-us/sharing-policy.tsx index ed6ce6e..707314c 100644 --- a/src/pages/about-us/sharing-policy.tsx +++ b/src/pages/about-us/sharing-policy.tsx @@ -1,7 +1,7 @@ import PostPage, { Post } from "components/PostPage"; import { getReadySdk } from "graphql/sdk"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; interface Props extends AppStaticProps { post: Post; diff --git a/src/pages/archives/index.tsx b/src/pages/archives/index.tsx index 5694feb..906587e 100644 --- a/src/pages/archives/index.tsx +++ b/src/pages/archives/index.tsx @@ -3,7 +3,7 @@ import NavOption from "components/PanelComponents/NavOption"; import PanelHeader from "components/PanelComponents/PanelHeader"; import SubPanel from "components/Panels/SubPanel"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; interface Props extends AppStaticProps {} diff --git a/src/pages/archives/videos/c/[uid].tsx b/src/pages/archives/videos/c/[uid].tsx index 1e66aca..226e55a 100644 --- a/src/pages/archives/videos/c/[uid].tsx +++ b/src/pages/archives/videos/c/[uid].tsx @@ -16,8 +16,8 @@ import { GetStaticPathsResult, GetStaticPropsContext, } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; -import { getVideoThumbnailURL } from "queries/helpers"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { getVideoThumbnailURL } from "helpers/helpers"; import { useState } from "react"; interface Props extends AppStaticProps { diff --git a/src/pages/archives/videos/index.tsx b/src/pages/archives/videos/index.tsx index 66c5732..3eec090 100644 --- a/src/pages/archives/videos/index.tsx +++ b/src/pages/archives/videos/index.tsx @@ -13,8 +13,8 @@ import ThumbnailPreview from "components/PreviewCard"; import { GetVideosPreviewQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; -import { getVideoThumbnailURL, prettyDate } from "queries/helpers"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { getVideoThumbnailURL, prettyDate } from "helpers/helpers"; import { useState } from "react"; interface Props extends AppStaticProps { diff --git a/src/pages/archives/videos/v/[uid].tsx b/src/pages/archives/videos/v/[uid].tsx index b768ac6..07b1001 100644 --- a/src/pages/archives/videos/v/[uid].tsx +++ b/src/pages/archives/videos/v/[uid].tsx @@ -19,8 +19,8 @@ import { GetStaticPathsResult, GetStaticPropsContext, } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; -import { getVideoFile, prettyDate, prettyShortenNumber } from "queries/helpers"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { getVideoFile, prettyDate, prettyShortenNumber } from "helpers/helpers"; interface Props extends AppStaticProps { video: Exclude< diff --git a/src/pages/chronicles/index.tsx b/src/pages/chronicles/index.tsx index f78e0dd..eb23755 100644 --- a/src/pages/chronicles/index.tsx +++ b/src/pages/chronicles/index.tsx @@ -2,7 +2,7 @@ import AppLayout from "components/AppLayout"; import PanelHeader from "components/PanelComponents/PanelHeader"; import SubPanel from "components/Panels/SubPanel"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; interface Props extends AppStaticProps {} diff --git a/src/pages/contents/[slug]/index.tsx b/src/pages/contents/[slug]/index.tsx index 37625a5..3c0057e 100644 --- a/src/pages/contents/[slug]/index.tsx +++ b/src/pages/contents/[slug]/index.tsx @@ -21,13 +21,13 @@ import { GetStaticPathsResult, GetStaticPropsContext, } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; import { getStatusDescription, prettyinlineTitle, prettyLanguage, prettySlug, -} from "queries/helpers"; +} from "helpers/helpers"; interface Props extends AppStaticProps { content: Exclude< diff --git a/src/pages/contents/index.tsx b/src/pages/contents/index.tsx index 0bda034..54bbd04 100644 --- a/src/pages/contents/index.tsx +++ b/src/pages/contents/index.tsx @@ -11,8 +11,8 @@ import ThumbnailPreview from "components/PreviewCard"; import { GetContentsQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; -import { prettyinlineTitle, prettySlug } from "queries/helpers"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { prettyinlineTitle, prettySlug } from "helpers/helpers"; import { useEffect, useState } from "react"; interface Props extends AppStaticProps { diff --git a/src/pages/dev/checkup/contents.tsx b/src/pages/dev/checkup/contents.tsx index 15eab1b..e744b0b 100644 --- a/src/pages/dev/checkup/contents.tsx +++ b/src/pages/dev/checkup/contents.tsx @@ -11,7 +11,7 @@ import { } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; interface Props extends AppStaticProps { contents: DevGetContentsQuery; diff --git a/src/pages/dev/checkup/libraryitems.tsx b/src/pages/dev/checkup/libraryitems.tsx index 0555e0f..ffc1950 100644 --- a/src/pages/dev/checkup/libraryitems.tsx +++ b/src/pages/dev/checkup/libraryitems.tsx @@ -11,7 +11,7 @@ import { } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; interface Props extends AppStaticProps { libraryItems: DevGetLibraryItemsQuery; diff --git a/src/pages/dev/editor.tsx b/src/pages/dev/editor.tsx index 4311a6e..d873018 100644 --- a/src/pages/dev/editor.tsx +++ b/src/pages/dev/editor.tsx @@ -7,7 +7,7 @@ import ContentPanel, { import Popup from "components/Popup"; import ToolTip from "components/ToolTip"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; import { useCallback, useState } from "react"; import TurndownService from "turndown"; diff --git a/src/pages/gallery/index.tsx b/src/pages/gallery/index.tsx index 03340c9..305dbc5 100644 --- a/src/pages/gallery/index.tsx +++ b/src/pages/gallery/index.tsx @@ -1,6 +1,6 @@ import AppLayout from "components/AppLayout"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; interface Props extends AppStaticProps {} diff --git a/src/pages/index.tsx b/src/pages/index.tsx index c318fa2..06565a6 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,7 +1,7 @@ import PostPage, { Post } from "components/PostPage"; import { getReadySdk } from "graphql/sdk"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; interface Props extends AppStaticProps { post: Post; diff --git a/src/pages/library/[slug]/index.tsx b/src/pages/library/[slug]/index.tsx index d0ee755..fe3da48 100644 --- a/src/pages/library/[slug]/index.tsx +++ b/src/pages/library/[slug]/index.tsx @@ -27,7 +27,7 @@ import { GetStaticPathsResult, GetStaticPropsContext, } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; import { convertMmToInch, prettyDate, @@ -37,7 +37,7 @@ import { prettyPrice, prettyURL, sortContent, -} from "queries/helpers"; +} from "helpers/helpers"; import { useState } from "react"; interface Props extends AppStaticProps { diff --git a/src/pages/library/[slug]/scans.tsx b/src/pages/library/[slug]/scans.tsx index cab0072..6f6e6a6 100644 --- a/src/pages/library/[slug]/scans.tsx +++ b/src/pages/library/[slug]/scans.tsx @@ -18,8 +18,8 @@ import { GetStaticPathsResult, GetStaticPropsContext, } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; -import { prettyinlineTitle, prettySlug, sortContent } from "queries/helpers"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { prettyinlineTitle, prettySlug, sortContent } from "helpers/helpers"; import { useState } from "react"; interface Props extends AppStaticProps { diff --git a/src/pages/library/index.tsx b/src/pages/library/index.tsx index 89eb620..ae782f4 100644 --- a/src/pages/library/index.tsx +++ b/src/pages/library/index.tsx @@ -11,13 +11,13 @@ import ThumbnailPreview from "components/PreviewCard"; import { GetLibraryItemsPreviewQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; import { convertPrice, prettyDate, prettyinlineTitle, prettyItemSubType, -} from "queries/helpers"; +} from "helpers/helpers"; import { useEffect, useState } from "react"; interface Props extends AppStaticProps { diff --git a/src/pages/merch/index.tsx b/src/pages/merch/index.tsx index 9d0708d..e1d950c 100644 --- a/src/pages/merch/index.tsx +++ b/src/pages/merch/index.tsx @@ -2,7 +2,7 @@ import AppLayout from "components/AppLayout"; import PanelHeader from "components/PanelComponents/PanelHeader"; import SubPanel from "components/Panels/SubPanel"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; interface Props extends AppStaticProps {} export default function Merch(props: Props): JSX.Element { diff --git a/src/pages/news/[slug].tsx b/src/pages/news/[slug].tsx index 58e2d78..451d3c1 100644 --- a/src/pages/news/[slug].tsx +++ b/src/pages/news/[slug].tsx @@ -6,7 +6,7 @@ import { GetStaticPathsResult, GetStaticPropsContext, } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; interface Props extends AppStaticProps { post: Post; diff --git a/src/pages/news/index.tsx b/src/pages/news/index.tsx index e4bad83..d99e29e 100644 --- a/src/pages/news/index.tsx +++ b/src/pages/news/index.tsx @@ -9,8 +9,8 @@ import ThumbnailPreview from "components/PreviewCard"; import { GetPostsPreviewQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; -import { prettyDate, prettySlug } from "queries/helpers"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { prettyDate, prettySlug } from "helpers/helpers"; import { useState } from "react"; interface Props extends AppStaticProps { diff --git a/src/pages/wiki/chronology.tsx b/src/pages/wiki/chronology.tsx index 6fcbe6b..0d37cf9 100644 --- a/src/pages/wiki/chronology.tsx +++ b/src/pages/wiki/chronology.tsx @@ -11,8 +11,8 @@ import { useAppLayout } from "contexts/AppLayoutContext"; import { GetChronologyItemsQuery, GetErasQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; -import { prettySlug } from "queries/helpers"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { prettySlug } from "helpers/helpers"; interface Props extends AppStaticProps { chronologyItems: Exclude< diff --git a/src/pages/wiki/index.tsx b/src/pages/wiki/index.tsx index cd61d94..f00ea29 100644 --- a/src/pages/wiki/index.tsx +++ b/src/pages/wiki/index.tsx @@ -3,7 +3,7 @@ import NavOption from "components/PanelComponents/NavOption"; import PanelHeader from "components/PanelComponents/PanelHeader"; import SubPanel from "components/Panels/SubPanel"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; interface Props extends AppStaticProps {} -- 2.40.1 From aafa278384079ca50775b0b3e3b7ab83c759f63c Mon Sep 17 00:00:00 2001 From: DrMint Date: Sun, 8 May 2022 12:21:29 +0200 Subject: [PATCH 09/30] Splitted the helpers into multiple files --- src/components/AppLayout.tsx | 11 +- src/components/Img.tsx | 60 +------ src/components/Inputs/LanguageSwitcher.tsx | 2 +- src/components/Inputs/OrderableList.tsx | 2 +- src/components/Library/ContentLine.tsx | 2 +- src/components/Library/ScanSet.tsx | 12 +- src/components/Library/ScanSetCover.tsx | 7 +- src/components/Markdown/Markdawn.tsx | 5 +- src/components/Markdown/TOC.tsx | 2 +- src/components/PostPage.tsx | 15 +- src/components/PreviewCard.tsx | 9 +- src/components/PreviewLine.tsx | 3 +- src/components/RecorderChip.tsx | 3 +- src/components/ThumbnailHeader.tsx | 5 +- .../Chronology/ChronologyItemComponent.tsx | 2 +- src/helpers/{helpers.ts => formatters.ts} | 164 +----------------- src/helpers/img.ts | 84 +++++++++ src/helpers/numbers.ts | 33 ++++ src/helpers/others.ts | 64 +++++++ src/helpers/types.ts | 9 + src/helpers/videos.ts | 7 + src/hooks/useSmartLanguage.tsx | 15 +- src/pages/about-us/accords-handbook.tsx | 5 +- src/pages/about-us/contact.tsx | 7 +- src/pages/about-us/legality.tsx | 5 +- src/pages/about-us/sharing-policy.tsx | 5 +- src/pages/archives/videos/c/[uid].tsx | 4 +- src/pages/archives/videos/index.tsx | 5 +- src/pages/archives/videos/v/[uid].tsx | 3 +- src/pages/contents/[slug]/index.tsx | 14 +- src/pages/contents/index.tsx | 2 +- src/pages/index.tsx | 3 +- src/pages/library/[slug]/index.tsx | 21 +-- src/pages/library/[slug]/scans.tsx | 5 +- src/pages/library/index.tsx | 8 +- src/pages/news/[slug].tsx | 5 +- src/pages/news/index.tsx | 4 +- src/pages/wiki/chronology.tsx | 4 +- 38 files changed, 304 insertions(+), 312 deletions(-) rename src/helpers/{helpers.ts => formatters.ts} (65%) create mode 100644 src/helpers/img.ts create mode 100644 src/helpers/numbers.ts create mode 100644 src/helpers/others.ts create mode 100644 src/helpers/types.ts create mode 100644 src/helpers/videos.ts diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index fbccb94..1104e10 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -1,19 +1,14 @@ import Button from "components/Inputs/Button"; import { useAppLayout } from "contexts/AppLayoutContext"; import { UploadImageFragment } from "graphql/generated"; +import { prettyLanguage, prettySlug } from "helpers/formatters"; +import { AppStaticProps } from "helpers/getAppStaticProps"; +import { getOgImage, ImageQuality, OgImage } from "helpers/img"; import { useMediaMobile } from "hooks/useMediaQuery"; import Head from "next/head"; import { useRouter } from "next/router"; -import { AppStaticProps } from "helpers/getAppStaticProps"; -import { - getOgImage, - OgImage, - prettyLanguage, - prettySlug, -} from "helpers/helpers"; import { useEffect, useState } from "react"; import { useSwipeable } from "react-swipeable"; -import { ImageQuality } from "./Img"; import OrderableList from "./Inputs/OrderableList"; import Select from "./Inputs/Select"; import MainPanel from "./Panels/MainPanel"; diff --git a/src/components/Img.tsx b/src/components/Img.tsx index d62dee3..39beb61 100644 --- a/src/components/Img.tsx +++ b/src/components/Img.tsx @@ -1,4 +1,5 @@ import { UploadImageFragment } from "graphql/generated"; +import { ImageQuality, getImgSizesByQuality, getAssetURL } from "helpers/img"; import Image, { ImageProps } from "next/image"; interface Props { @@ -45,62 +46,3 @@ export default function Img(props: Props): JSX.Element { } return <>; } - -export enum ImageQuality { - Small = "small", - Medium = "medium", - Large = "large", - Og = "og", -} - -export function getAssetFilename(path: string): string { - let result = path.split("/"); - result = result[result.length - 1].split("."); - result = result - .splice(0, result.length - 1) - .join(".") - .split("_"); - return result[0]; -} - -export function getAssetURL(url: string, quality: ImageQuality): string { - let newUrl = url; - newUrl = newUrl.replace(/^\/uploads/u, `/${quality}`); - newUrl = newUrl.replace(/.jpg$/u, ".webp"); - newUrl = newUrl.replace(/.jpeg$/u, ".webp"); - newUrl = newUrl.replace(/.png$/u, ".webp"); - if (quality === ImageQuality.Og) newUrl = newUrl.replace(/.webp$/u, ".jpg"); - return process.env.NEXT_PUBLIC_URL_IMG + newUrl; -} - -export function getImgSizesByMaxSize( - width: number, - height: number, - maxSize: number -): { width: number; height: number } { - if (width > height) { - if (width < maxSize) return { width: width, height: height }; - return { width: maxSize, height: (height / width) * maxSize }; - } - if (height < maxSize) return { width: width, height: height }; - return { width: (width / height) * maxSize, height: maxSize }; -} - -export function getImgSizesByQuality( - width: number, - height: number, - quality: ImageQuality -): { width: number; height: number } { - switch (quality) { - case ImageQuality.Og: - return getImgSizesByMaxSize(width, height, 512); - case ImageQuality.Small: - return getImgSizesByMaxSize(width, height, 512); - case ImageQuality.Medium: - return getImgSizesByMaxSize(width, height, 1024); - case ImageQuality.Large: - return getImgSizesByMaxSize(width, height, 2048); - default: - return { width: 0, height: 0 }; - } -} diff --git a/src/components/Inputs/LanguageSwitcher.tsx b/src/components/Inputs/LanguageSwitcher.tsx index f5fc1c9..85eb032 100644 --- a/src/components/Inputs/LanguageSwitcher.tsx +++ b/src/components/Inputs/LanguageSwitcher.tsx @@ -1,5 +1,5 @@ +import { prettyLanguage } from "helpers/formatters"; import { AppStaticProps } from "helpers/getAppStaticProps"; -import { prettyLanguage } from "helpers/helpers"; import { Dispatch, SetStateAction } from "react"; import ToolTip from "../ToolTip"; import Button from "./Button"; diff --git a/src/components/Inputs/OrderableList.tsx b/src/components/Inputs/OrderableList.tsx index da9eae4..6f54c9d 100644 --- a/src/components/Inputs/OrderableList.tsx +++ b/src/components/Inputs/OrderableList.tsx @@ -1,4 +1,4 @@ -import { arrayMove } from "helpers/helpers"; +import { arrayMove } from "helpers/others"; import { useEffect, useState } from "react"; interface Props { diff --git a/src/components/Library/ContentLine.tsx b/src/components/Library/ContentLine.tsx index 7b821a3..414d892 100644 --- a/src/components/Library/ContentLine.tsx +++ b/src/components/Library/ContentLine.tsx @@ -1,8 +1,8 @@ import Chip from "components/Chip"; import Button from "components/Inputs/Button"; import { GetLibraryItemQuery } from "graphql/generated"; +import { prettyinlineTitle, prettySlug } from "helpers/formatters"; import { AppStaticProps } from "helpers/getAppStaticProps"; -import { prettyinlineTitle, prettySlug } from "helpers/helpers"; import { useState } from "react"; interface Props { diff --git a/src/components/Library/ScanSet.tsx b/src/components/Library/ScanSet.tsx index 6fbf92e..38f1cbb 100644 --- a/src/components/Library/ScanSet.tsx +++ b/src/components/Library/ScanSet.tsx @@ -1,16 +1,14 @@ import Chip from "components/Chip"; -import Img, { - getAssetFilename, - getAssetURL, - ImageQuality, -} from "components/Img"; +import Img from "components/Img"; import Button from "components/Inputs/Button"; import RecorderChip from "components/RecorderChip"; import ToolTip from "components/ToolTip"; import { GetLibraryItemScansQuery } from "graphql/generated"; -import useSmartLanguage from "hooks/useSmartLanguage"; import { AppStaticProps } from "helpers/getAppStaticProps"; -import { getStatusDescription, isInteger } from "helpers/helpers"; +import { getStatusDescription } from "helpers/others"; +import { getAssetFilename, getAssetURL, ImageQuality } from "helpers/img"; +import { isInteger } from "helpers/numbers"; +import useSmartLanguage from "hooks/useSmartLanguage"; import { Dispatch, SetStateAction } from "react"; interface Props { diff --git a/src/components/Library/ScanSetCover.tsx b/src/components/Library/ScanSetCover.tsx index 0b01216..40a2f3d 100644 --- a/src/components/Library/ScanSetCover.tsx +++ b/src/components/Library/ScanSetCover.tsx @@ -1,14 +1,15 @@ import Chip from "components/Chip"; -import Img, { getAssetURL, ImageQuality } from "components/Img"; +import Img from "components/Img"; import RecorderChip from "components/RecorderChip"; import ToolTip from "components/ToolTip"; import { GetLibraryItemScansQuery, UploadImageFragment, } from "graphql/generated"; -import useSmartLanguage from "hooks/useSmartLanguage"; import { AppStaticProps } from "helpers/getAppStaticProps"; -import { getStatusDescription } from "helpers/helpers"; +import { getStatusDescription } from "helpers/others"; +import { getAssetURL, ImageQuality } from "helpers/img"; +import useSmartLanguage from "hooks/useSmartLanguage"; import { Dispatch, SetStateAction } from "react"; interface Props { diff --git a/src/components/Markdown/Markdawn.tsx b/src/components/Markdown/Markdawn.tsx index f6e8eb1..464dc47 100644 --- a/src/components/Markdown/Markdawn.tsx +++ b/src/components/Markdown/Markdawn.tsx @@ -1,12 +1,13 @@ import HorizontalLine from "components/HorizontalLine"; -import Img, { getAssetURL, ImageQuality } from "components/Img"; +import Img from "components/Img"; import InsetBox from "components/InsetBox"; import LightBox from "components/LightBox"; import ToolTip from "components/ToolTip"; import { useAppLayout } from "contexts/AppLayoutContext"; +import { slugify } from "helpers/formatters"; +import { getAssetURL, ImageQuality } from "helpers/img"; import Markdown from "markdown-to-jsx"; import { useRouter } from "next/router"; -import { slugify } from "helpers/helpers"; import React, { useState } from "react"; import ReactDOMServer from "react-dom/server"; diff --git a/src/components/Markdown/TOC.tsx b/src/components/Markdown/TOC.tsx index 83ceeba..261c9c8 100644 --- a/src/components/Markdown/TOC.tsx +++ b/src/components/Markdown/TOC.tsx @@ -1,5 +1,5 @@ +import { slugify } from "helpers/formatters"; import { useRouter } from "next/router"; -import { slugify } from "helpers/helpers"; import { preprocessMarkDawn } from "./Markdawn"; interface Props { diff --git a/src/components/PostPage.tsx b/src/components/PostPage.tsx index cb46d4a..841ebe8 100644 --- a/src/components/PostPage.tsx +++ b/src/components/PostPage.tsx @@ -1,7 +1,8 @@ -import { GetPostQuery } from "graphql/generated"; -import useSmartLanguage from "hooks/useSmartLanguage"; +import { prettySlug } from "helpers/formatters"; import { AppStaticProps } from "helpers/getAppStaticProps"; -import { getStatusDescription, prettySlug } from "helpers/helpers"; +import { getStatusDescription } from "helpers/others"; +import { Post } from "helpers/types"; +import useSmartLanguage from "hooks/useSmartLanguage"; import AppLayout from "./AppLayout"; import Chip from "./Chip"; import HorizontalLine from "./HorizontalLine"; @@ -14,14 +15,6 @@ import RecorderChip from "./RecorderChip"; import ThumbnailHeader from "./ThumbnailHeader"; import ToolTip from "./ToolTip"; -export type Post = Exclude< - Exclude< - GetPostQuery["posts"], - null | undefined - >["data"][number]["attributes"], - null | undefined ->; - interface Props { post: Post; langui: AppStaticProps["langui"]; diff --git a/src/components/PreviewCard.tsx b/src/components/PreviewCard.tsx index 5ba32d2..cea63d0 100644 --- a/src/components/PreviewCard.tsx +++ b/src/components/PreviewCard.tsx @@ -4,16 +4,17 @@ import { PricePickerFragment, UploadImageFragment, } from "graphql/generated"; -import Link from "next/link"; -import { AppStaticProps } from "helpers/getAppStaticProps"; import { prettyDate, prettyDuration, prettyPrice, prettyShortenNumber, -} from "helpers/helpers"; +} from "helpers/formatters"; +import { AppStaticProps } from "helpers/getAppStaticProps"; +import { ImageQuality } from "helpers/img"; +import Link from "next/link"; import Chip from "./Chip"; -import Img, { ImageQuality } from "./Img"; +import Img from "./Img"; interface Props { thumbnail?: UploadImageFragment | string | null | undefined; diff --git a/src/components/PreviewLine.tsx b/src/components/PreviewLine.tsx index e039450..bc31188 100644 --- a/src/components/PreviewLine.tsx +++ b/src/components/PreviewLine.tsx @@ -1,7 +1,8 @@ import { UploadImageFragment } from "graphql/generated"; +import { ImageQuality } from "helpers/img"; import Link from "next/link"; import Chip from "./Chip"; -import Img, { ImageQuality } from "./Img"; +import Img from "./Img"; interface Props { thumbnail?: UploadImageFragment | string | null | undefined; diff --git a/src/components/RecorderChip.tsx b/src/components/RecorderChip.tsx index 0cdfb2d..ed1b734 100644 --- a/src/components/RecorderChip.tsx +++ b/src/components/RecorderChip.tsx @@ -1,7 +1,8 @@ import Chip from "components/Chip"; import { RecorderChipFragment } from "graphql/generated"; import { AppStaticProps } from "helpers/getAppStaticProps"; -import Img, { ImageQuality } from "./Img"; +import { ImageQuality } from "helpers/img"; +import Img from "./Img"; import Markdawn from "./Markdown/Markdawn"; import ToolTip from "./ToolTip"; diff --git a/src/components/ThumbnailHeader.tsx b/src/components/ThumbnailHeader.tsx index 7d4fe85..c36a8cd 100644 --- a/src/components/ThumbnailHeader.tsx +++ b/src/components/ThumbnailHeader.tsx @@ -1,10 +1,11 @@ import Chip from "components/Chip"; -import Img, { ImageQuality } from "components/Img"; +import Img from "components/Img"; import InsetBox from "components/InsetBox"; import Markdawn from "components/Markdown/Markdawn"; import { GetContentQuery, UploadImageFragment } from "graphql/generated"; +import { prettyinlineTitle, prettySlug, slugify } from "helpers/formatters"; import { AppStaticProps } from "helpers/getAppStaticProps"; -import { prettyinlineTitle, prettySlug, slugify } from "helpers/helpers"; +import { ImageQuality } from "helpers/img"; interface Props { pre_title?: string | null | undefined; diff --git a/src/components/Wiki/Chronology/ChronologyItemComponent.tsx b/src/components/Wiki/Chronology/ChronologyItemComponent.tsx index bc275d3..4d2723f 100644 --- a/src/components/Wiki/Chronology/ChronologyItemComponent.tsx +++ b/src/components/Wiki/Chronology/ChronologyItemComponent.tsx @@ -5,7 +5,7 @@ import { GetChronologyItemsQuery, } from "graphql/generated"; import { AppStaticProps } from "helpers/getAppStaticProps"; -import { getStatusDescription } from "helpers/helpers"; +import { getStatusDescription } from "helpers/others"; interface Props { item: Exclude< diff --git a/src/helpers/helpers.ts b/src/helpers/formatters.ts similarity index 65% rename from src/helpers/helpers.ts rename to src/helpers/formatters.ts index b20ad97..b561415 100644 --- a/src/helpers/helpers.ts +++ b/src/helpers/formatters.ts @@ -1,18 +1,6 @@ -import { - getAssetURL, - getImgSizesByQuality, - ImageQuality, -} from "components/Img"; -import { - DatePickerFragment, - Enum_Componentsetstextset_Status, - GetCurrenciesQuery, - GetLibraryItemQuery, - GetLibraryItemScansQuery, - PricePickerFragment, - UploadImageFragment, -} from "graphql/generated"; +import { DatePickerFragment, PricePickerFragment } from "graphql/generated"; import { AppStaticProps } from "./getAppStaticProps"; +import { convertPrice } from "./numbers"; export function prettyDate(datePicker: DatePickerFragment): string { let result = ""; @@ -45,25 +33,6 @@ export function prettyPrice( return result; } -export function convertPrice( - pricePicker: PricePickerFragment, - targetCurrency: Exclude< - GetCurrenciesQuery["currencies"], - null | undefined - >["data"][number] -): number { - if ( - pricePicker.amount && - pricePicker.currency?.data?.attributes && - targetCurrency.attributes - ) - return ( - (pricePicker.amount * pricePicker.currency.data.attributes.rate_to_usd) / - targetCurrency.attributes.rate_to_usd - ); - return 0; -} - export function prettySlug(slug?: string, parentSlug?: string): string { if (slug) { if (parentSlug && slug.startsWith(parentSlug)) @@ -300,87 +269,6 @@ export function capitalizeString(string: string): string { return words.join(" "); } -export function convertMmToInch(mm: number | null | undefined): string { - return mm ? (mm * 0.03937008).toPrecision(3) : ""; -} - -export interface OgImage { - image: string; - width: number; - height: number; - alt: string; -} - -export function getOgImage( - quality: ImageQuality, - image: UploadImageFragment -): OgImage { - const imgSize = getImgSizesByQuality( - image.width ?? 0, - image.height ?? 0, - quality ? quality : ImageQuality.Small - ); - return { - image: getAssetURL(image.url, quality), - width: imgSize.width, - height: imgSize.height, - alt: image.alternativeText || "", - }; -} - -export function sortContent( - contents: - | Exclude< - Exclude< - GetLibraryItemQuery["libraryItems"], - null | undefined - >["data"][number]["attributes"], - null | undefined - >["contents"] - | Exclude< - Exclude< - GetLibraryItemScansQuery["libraryItems"], - null | undefined - >["data"][number]["attributes"], - null | undefined - >["contents"] -) { - contents?.data.sort((a, b) => { - if ( - a.attributes?.range[0]?.__typename === "ComponentRangePageRange" && - b.attributes?.range[0]?.__typename === "ComponentRangePageRange" - ) { - return ( - a.attributes.range[0].starting_page - - b.attributes.range[0].starting_page - ); - } - return 0; - }); -} - -export function getStatusDescription( - status: string, - langui: AppStaticProps["langui"] -): string | null | undefined { - switch (status) { - case Enum_Componentsetstextset_Status.Incomplete: - return langui.status_incomplete; - - case Enum_Componentsetstextset_Status.Draft: - return langui.status_draft; - - case Enum_Componentsetstextset_Status.Review: - return langui.status_review; - - case Enum_Componentsetstextset_Status.Done: - return langui.status_done; - - default: - return ""; - } -} - export function slugify(string: string | undefined): string { if (!string) { return ""; @@ -400,51 +288,3 @@ export function slugify(string: string | undefined): string { .trim() .replace(/ /gu, "-"); } - -export function randomInt(min: number, max: number) { - return Math.floor(Math.random() * (max - min)) + min; -} - -export function getLocalesFromLanguages( - languages?: Array<{ - language?: { - data?: { - attributes?: { code: string } | null; - } | null; - } | null; - } | null> | null -) { - return languages - ? languages.map((language) => language?.language?.data?.attributes?.code) - : []; -} - -export function getVideoThumbnailURL(uid: string): string { - return `${process.env.NEXT_PUBLIC_URL_WATCH}/videos/${uid}.webp`; -} - -export function getVideoFile(uid: string): string { - return `${process.env.NEXT_PUBLIC_URL_WATCH}/videos/${uid}.mp4`; -} - -export function arrayMove(arr: T[], old_index: number, new_index: number) { - arr.splice(new_index, 0, arr.splice(old_index, 1)[0]); - return arr; -} - -export function getPreferredLanguage( - preferredLanguages: (string | undefined)[], - availableLanguages: Map -): number | undefined { - for (const locale of preferredLanguages) { - if (locale && availableLanguages.has(locale)) { - return availableLanguages.get(locale); - } - } - return undefined; -} - -export function isInteger(value: string): boolean { - // eslint-disable-next-line require-unicode-regexp - return /^[+-]?[0-9]+$/.test(value); -} diff --git a/src/helpers/img.ts b/src/helpers/img.ts new file mode 100644 index 0000000..b2687cb --- /dev/null +++ b/src/helpers/img.ts @@ -0,0 +1,84 @@ +import { UploadImageFragment } from "graphql/generated"; + +export enum ImageQuality { + Small = "small", + Medium = "medium", + Large = "large", + Og = "og", +} + +export interface OgImage { + image: string; + width: number; + height: number; + alt: string; +} + +export function getAssetFilename(path: string): string { + let result = path.split("/"); + result = result[result.length - 1].split("."); + result = result + .splice(0, result.length - 1) + .join(".") + .split("_"); + return result[0]; +} + +export function getAssetURL(url: string, quality: ImageQuality): string { + let newUrl = url; + newUrl = newUrl.replace(/^\/uploads/u, `/${quality}`); + newUrl = newUrl.replace(/.jpg$/u, ".webp"); + newUrl = newUrl.replace(/.jpeg$/u, ".webp"); + newUrl = newUrl.replace(/.png$/u, ".webp"); + if (quality === ImageQuality.Og) newUrl = newUrl.replace(/.webp$/u, ".jpg"); + return process.env.NEXT_PUBLIC_URL_IMG + newUrl; +} + +export function getImgSizesByMaxSize( + width: number, + height: number, + maxSize: number +): { width: number; height: number } { + if (width > height) { + if (width < maxSize) return { width: width, height: height }; + return { width: maxSize, height: (height / width) * maxSize }; + } + if (height < maxSize) return { width: width, height: height }; + return { width: (width / height) * maxSize, height: maxSize }; +} + +export function getImgSizesByQuality( + width: number, + height: number, + quality: ImageQuality +): { width: number; height: number } { + switch (quality) { + case ImageQuality.Og: + return getImgSizesByMaxSize(width, height, 512); + case ImageQuality.Small: + return getImgSizesByMaxSize(width, height, 512); + case ImageQuality.Medium: + return getImgSizesByMaxSize(width, height, 1024); + case ImageQuality.Large: + return getImgSizesByMaxSize(width, height, 2048); + default: + return { width: 0, height: 0 }; + } +} + +export function getOgImage( + quality: ImageQuality, + image: UploadImageFragment +): OgImage { + const imgSize = getImgSizesByQuality( + image.width ?? 0, + image.height ?? 0, + quality ? quality : ImageQuality.Small + ); + return { + image: getAssetURL(image.url, quality), + width: imgSize.width, + height: imgSize.height, + alt: image.alternativeText || "", + }; +} diff --git a/src/helpers/numbers.ts b/src/helpers/numbers.ts new file mode 100644 index 0000000..bb95ef3 --- /dev/null +++ b/src/helpers/numbers.ts @@ -0,0 +1,33 @@ +import { GetCurrenciesQuery, PricePickerFragment } from "graphql/generated"; + +export function convertPrice( + pricePicker: PricePickerFragment, + targetCurrency: Exclude< + GetCurrenciesQuery["currencies"], + null | undefined + >["data"][number] +): number { + if ( + pricePicker.amount && + pricePicker.currency?.data?.attributes && + targetCurrency.attributes + ) + return ( + (pricePicker.amount * pricePicker.currency.data.attributes.rate_to_usd) / + targetCurrency.attributes.rate_to_usd + ); + return 0; +} + +export function convertMmToInch(mm: number | null | undefined): string { + return mm ? (mm * 0.03937008).toPrecision(3) : ""; +} + +export function randomInt(min: number, max: number) { + return Math.floor(Math.random() * (max - min)) + min; +} + +export function isInteger(value: string): boolean { + // eslint-disable-next-line require-unicode-regexp + return /^[+-]?[0-9]+$/.test(value); +} diff --git a/src/helpers/others.ts b/src/helpers/others.ts new file mode 100644 index 0000000..c8313c8 --- /dev/null +++ b/src/helpers/others.ts @@ -0,0 +1,64 @@ +import { + Enum_Componentsetstextset_Status, + GetLibraryItemQuery, + GetLibraryItemScansQuery, +} from "graphql/generated"; +import { AppStaticProps } from "./getAppStaticProps"; + +export function sortContent( + contents: + | Exclude< + Exclude< + GetLibraryItemQuery["libraryItems"], + null | undefined + >["data"][number]["attributes"], + null | undefined + >["contents"] + | Exclude< + Exclude< + GetLibraryItemScansQuery["libraryItems"], + null | undefined + >["data"][number]["attributes"], + null | undefined + >["contents"] +) { + contents?.data.sort((a, b) => { + if ( + a.attributes?.range[0]?.__typename === "ComponentRangePageRange" && + b.attributes?.range[0]?.__typename === "ComponentRangePageRange" + ) { + return ( + a.attributes.range[0].starting_page - + b.attributes.range[0].starting_page + ); + } + return 0; + }); +} + +export function getStatusDescription( + status: string, + langui: AppStaticProps["langui"] +): string | null | undefined { + switch (status) { + case Enum_Componentsetstextset_Status.Incomplete: + return langui.status_incomplete; + + case Enum_Componentsetstextset_Status.Draft: + return langui.status_draft; + + case Enum_Componentsetstextset_Status.Review: + return langui.status_review; + + case Enum_Componentsetstextset_Status.Done: + return langui.status_done; + + default: + return ""; + } +} + +export function arrayMove(arr: T[], old_index: number, new_index: number) { + arr.splice(new_index, 0, arr.splice(old_index, 1)[0]); + return arr; +} diff --git a/src/helpers/types.ts b/src/helpers/types.ts new file mode 100644 index 0000000..fb48368 --- /dev/null +++ b/src/helpers/types.ts @@ -0,0 +1,9 @@ +import { GetPostQuery } from "graphql/generated"; + +export type Post = Exclude< + Exclude< + GetPostQuery["posts"], + null | undefined + >["data"][number]["attributes"], + null | undefined +>; diff --git a/src/helpers/videos.ts b/src/helpers/videos.ts new file mode 100644 index 0000000..fb80203 --- /dev/null +++ b/src/helpers/videos.ts @@ -0,0 +1,7 @@ +export function getVideoThumbnailURL(uid: string): string { + return `${process.env.NEXT_PUBLIC_URL_WATCH}/videos/${uid}.webp`; +} + +export function getVideoFile(uid: string): string { + return `${process.env.NEXT_PUBLIC_URL_WATCH}/videos/${uid}.mp4`; +} diff --git a/src/hooks/useSmartLanguage.tsx b/src/hooks/useSmartLanguage.tsx index 7228c80..59ab827 100644 --- a/src/hooks/useSmartLanguage.tsx +++ b/src/hooks/useSmartLanguage.tsx @@ -1,8 +1,7 @@ import LanguageSwitcher from "components/Inputs/LanguageSwitcher"; import { useAppLayout } from "contexts/AppLayoutContext"; -import { useRouter } from "next/router"; import { AppStaticProps } from "helpers/getAppStaticProps"; -import { getPreferredLanguage } from "helpers/helpers"; +import { useRouter } from "next/router"; import { useEffect, useMemo, useState } from "react"; interface Props { @@ -12,6 +11,18 @@ interface Props { transform?: (item: T) => T; } +function getPreferredLanguage( + preferredLanguages: (string | undefined)[], + availableLanguages: Map +): number | undefined { + for (const locale of preferredLanguages) { + if (locale && availableLanguages.has(locale)) { + return availableLanguages.get(locale); + } + } + return undefined; +} + export default function useSmartLanguage( props: Props ): [T | undefined, () => JSX.Element] { diff --git a/src/pages/about-us/accords-handbook.tsx b/src/pages/about-us/accords-handbook.tsx index 2edc1d2..1fb8c7c 100644 --- a/src/pages/about-us/accords-handbook.tsx +++ b/src/pages/about-us/accords-handbook.tsx @@ -1,7 +1,8 @@ -import PostPage, { Post } from "components/PostPage"; +import PostPage from "components/PostPage"; import { getReadySdk } from "graphql/sdk"; -import { GetStaticPropsContext } from "next"; import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { Post } from "helpers/types"; +import { GetStaticPropsContext } from "next"; interface Props extends AppStaticProps { post: Post; diff --git a/src/pages/about-us/contact.tsx b/src/pages/about-us/contact.tsx index 77fe8bf..7e8b956 100644 --- a/src/pages/about-us/contact.tsx +++ b/src/pages/about-us/contact.tsx @@ -1,11 +1,12 @@ import InsetBox from "components/InsetBox"; -import PostPage, { Post } from "components/PostPage"; +import PostPage from "components/PostPage"; +import { randomInt } from "crypto"; import { getReadySdk } from "graphql/sdk"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { Post } from "helpers/types"; import { GetStaticPropsContext } from "next"; import { useRouter } from "next/router"; import { RequestMailProps, ResponseMailProps } from "pages/api/mail"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; -import { randomInt } from "helpers/helpers"; import { useState } from "react"; interface Props extends AppStaticProps { diff --git a/src/pages/about-us/legality.tsx b/src/pages/about-us/legality.tsx index fd53d08..53db47b 100644 --- a/src/pages/about-us/legality.tsx +++ b/src/pages/about-us/legality.tsx @@ -1,7 +1,8 @@ -import PostPage, { Post } from "components/PostPage"; +import PostPage from "components/PostPage"; import { getReadySdk } from "graphql/sdk"; -import { GetStaticPropsContext } from "next"; import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { Post } from "helpers/types"; +import { GetStaticPropsContext } from "next"; interface Props extends AppStaticProps { post: Post; diff --git a/src/pages/about-us/sharing-policy.tsx b/src/pages/about-us/sharing-policy.tsx index 707314c..16a2436 100644 --- a/src/pages/about-us/sharing-policy.tsx +++ b/src/pages/about-us/sharing-policy.tsx @@ -1,7 +1,8 @@ -import PostPage, { Post } from "components/PostPage"; +import PostPage from "components/PostPage"; import { getReadySdk } from "graphql/sdk"; -import { GetStaticPropsContext } from "next"; import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { Post } from "helpers/types"; +import { GetStaticPropsContext } from "next"; interface Props extends AppStaticProps { post: Post; diff --git a/src/pages/archives/videos/c/[uid].tsx b/src/pages/archives/videos/c/[uid].tsx index 226e55a..e85f43d 100644 --- a/src/pages/archives/videos/c/[uid].tsx +++ b/src/pages/archives/videos/c/[uid].tsx @@ -11,13 +11,13 @@ import SubPanel from "components/Panels/SubPanel"; import ThumbnailPreview from "components/PreviewCard"; import { GetVideoChannelQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { getVideoThumbnailURL } from "helpers/videos"; import { GetStaticPathsContext, GetStaticPathsResult, GetStaticPropsContext, } from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; -import { getVideoThumbnailURL } from "helpers/helpers"; import { useState } from "react"; interface Props extends AppStaticProps { diff --git a/src/pages/archives/videos/index.tsx b/src/pages/archives/videos/index.tsx index 3eec090..53bb545 100644 --- a/src/pages/archives/videos/index.tsx +++ b/src/pages/archives/videos/index.tsx @@ -12,9 +12,10 @@ import SubPanel from "components/Panels/SubPanel"; import ThumbnailPreview from "components/PreviewCard"; import { GetVideosPreviewQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; -import { GetStaticPropsContext } from "next"; +import { prettyDate } from "helpers/formatters"; import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; -import { getVideoThumbnailURL, prettyDate } from "helpers/helpers"; +import { getVideoThumbnailURL } from "helpers/videos"; +import { GetStaticPropsContext } from "next"; import { useState } from "react"; interface Props extends AppStaticProps { diff --git a/src/pages/archives/videos/v/[uid].tsx b/src/pages/archives/videos/v/[uid].tsx index 07b1001..a631a58 100644 --- a/src/pages/archives/videos/v/[uid].tsx +++ b/src/pages/archives/videos/v/[uid].tsx @@ -20,7 +20,8 @@ import { GetStaticPropsContext, } from "next"; import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; -import { getVideoFile, prettyDate, prettyShortenNumber } from "helpers/helpers"; +import { prettyDate, prettyShortenNumber } from "helpers/formatters"; +import { getVideoFile } from "helpers/videos"; interface Props extends AppStaticProps { video: Exclude< diff --git a/src/pages/contents/[slug]/index.tsx b/src/pages/contents/[slug]/index.tsx index 3c0057e..3506fd8 100644 --- a/src/pages/contents/[slug]/index.tsx +++ b/src/pages/contents/[slug]/index.tsx @@ -14,6 +14,13 @@ import ThumbnailHeader from "components/ThumbnailHeader"; import ToolTip from "components/ToolTip"; import { GetContentTextQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; +import { + prettyinlineTitle, + prettyLanguage, + prettySlug, +} from "helpers/formatters"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { getStatusDescription } from "helpers/others"; import { useMediaMobile } from "hooks/useMediaQuery"; import useSmartLanguage from "hooks/useSmartLanguage"; import { @@ -21,13 +28,6 @@ import { GetStaticPathsResult, GetStaticPropsContext, } from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; -import { - getStatusDescription, - prettyinlineTitle, - prettyLanguage, - prettySlug, -} from "helpers/helpers"; interface Props extends AppStaticProps { content: Exclude< diff --git a/src/pages/contents/index.tsx b/src/pages/contents/index.tsx index 54bbd04..9ba6ac4 100644 --- a/src/pages/contents/index.tsx +++ b/src/pages/contents/index.tsx @@ -12,8 +12,8 @@ import { GetContentsQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; import { GetStaticPropsContext } from "next"; import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; -import { prettyinlineTitle, prettySlug } from "helpers/helpers"; import { useEffect, useState } from "react"; +import { prettySlug, prettyinlineTitle } from "helpers/formatters"; interface Props extends AppStaticProps { contents: Exclude["data"]; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 06565a6..c724c1d 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,7 +1,8 @@ -import PostPage, { Post } from "components/PostPage"; +import PostPage from "components/PostPage"; import { getReadySdk } from "graphql/sdk"; import { GetStaticPropsContext } from "next"; import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { Post } from "helpers/types"; interface Props extends AppStaticProps { post: Post; diff --git a/src/pages/library/[slug]/index.tsx b/src/pages/library/[slug]/index.tsx index fe3da48..5a9f0bc 100644 --- a/src/pages/library/[slug]/index.tsx +++ b/src/pages/library/[slug]/index.tsx @@ -1,6 +1,6 @@ import AppLayout from "components/AppLayout"; import Chip from "components/Chip"; -import Img, { getAssetURL, ImageQuality } from "components/Img"; +import Img from "components/Img"; import Button from "components/Inputs/Button"; import Switch from "components/Inputs/Switch"; import InsetBox from "components/InsetBox"; @@ -23,21 +23,22 @@ import { } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; import { - GetStaticPathsContext, - GetStaticPathsResult, - GetStaticPropsContext, -} from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; -import { - convertMmToInch, prettyDate, prettyinlineTitle, prettyItemSubType, prettyItemType, prettyPrice, prettyURL, - sortContent, -} from "helpers/helpers"; +} from "helpers/formatters"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { sortContent } from "helpers/others"; +import { getAssetURL, ImageQuality } from "helpers/img"; +import { convertMmToInch } from "helpers/numbers"; +import { + GetStaticPathsContext, + GetStaticPathsResult, + GetStaticPropsContext, +} from "next"; import { useState } from "react"; interface Props extends AppStaticProps { diff --git a/src/pages/library/[slug]/scans.tsx b/src/pages/library/[slug]/scans.tsx index 6f6e6a6..97f459e 100644 --- a/src/pages/library/[slug]/scans.tsx +++ b/src/pages/library/[slug]/scans.tsx @@ -13,13 +13,14 @@ import SubPanel from "components/Panels/SubPanel"; import { useAppLayout } from "contexts/AppLayoutContext"; import { GetLibraryItemScansQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; +import { prettyinlineTitle, prettySlug } from "helpers/formatters"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { sortContent } from "helpers/others"; import { GetStaticPathsContext, GetStaticPathsResult, GetStaticPropsContext, } from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; -import { prettyinlineTitle, prettySlug, sortContent } from "helpers/helpers"; import { useState } from "react"; interface Props extends AppStaticProps { diff --git a/src/pages/library/index.tsx b/src/pages/library/index.tsx index ae782f4..3b9042a 100644 --- a/src/pages/library/index.tsx +++ b/src/pages/library/index.tsx @@ -10,14 +10,14 @@ import SubPanel from "components/Panels/SubPanel"; import ThumbnailPreview from "components/PreviewCard"; import { GetLibraryItemsPreviewQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; -import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; import { - convertPrice, prettyDate, prettyinlineTitle, prettyItemSubType, -} from "helpers/helpers"; +} from "helpers/formatters"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { convertPrice } from "helpers/numbers"; +import { GetStaticPropsContext } from "next"; import { useEffect, useState } from "react"; interface Props extends AppStaticProps { diff --git a/src/pages/news/[slug].tsx b/src/pages/news/[slug].tsx index 451d3c1..50906e5 100644 --- a/src/pages/news/[slug].tsx +++ b/src/pages/news/[slug].tsx @@ -1,12 +1,13 @@ -import PostPage, { Post } from "components/PostPage"; +import PostPage from "components/PostPage"; import { GetPostQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; +import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { Post } from "helpers/types"; import { GetStaticPathsContext, GetStaticPathsResult, GetStaticPropsContext, } from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; interface Props extends AppStaticProps { post: Post; diff --git a/src/pages/news/index.tsx b/src/pages/news/index.tsx index d99e29e..d72a6af 100644 --- a/src/pages/news/index.tsx +++ b/src/pages/news/index.tsx @@ -8,9 +8,9 @@ import SubPanel from "components/Panels/SubPanel"; import ThumbnailPreview from "components/PreviewCard"; import { GetPostsPreviewQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; -import { GetStaticPropsContext } from "next"; +import { prettyDate, prettySlug } from "helpers/formatters"; import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; -import { prettyDate, prettySlug } from "helpers/helpers"; +import { GetStaticPropsContext } from "next"; import { useState } from "react"; interface Props extends AppStaticProps { diff --git a/src/pages/wiki/chronology.tsx b/src/pages/wiki/chronology.tsx index 0d37cf9..7e608df 100644 --- a/src/pages/wiki/chronology.tsx +++ b/src/pages/wiki/chronology.tsx @@ -10,9 +10,9 @@ import ChronologyYearComponent from "components/Wiki/Chronology/ChronologyYearCo import { useAppLayout } from "contexts/AppLayoutContext"; import { GetChronologyItemsQuery, GetErasQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; -import { GetStaticPropsContext } from "next"; +import { prettySlug } from "helpers/formatters"; import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; -import { prettySlug } from "helpers/helpers"; +import { GetStaticPropsContext } from "next"; interface Props extends AppStaticProps { chronologyItems: Exclude< -- 2.40.1 From 02e03071a0e04ee6e27737a582b0a63896db04b2 Mon Sep 17 00:00:00 2001 From: DrMint Date: Sun, 8 May 2022 12:26:36 +0200 Subject: [PATCH 10/30] Moved getAppStaticProps to Graphql --- src/components/AppLayout.tsx | 2 +- src/components/Inputs/LanguageSwitcher.tsx | 2 +- src/components/Library/ContentLine.tsx | 2 +- src/components/Library/ScanSet.tsx | 2 +- src/components/Library/ScanSetCover.tsx | 2 +- src/components/PanelComponents/ReturnButton.tsx | 2 +- src/components/Panels/MainPanel.tsx | 2 +- src/components/PostPage.tsx | 2 +- src/components/PreviewCard.tsx | 2 +- src/components/RecorderChip.tsx | 2 +- src/components/ThumbnailHeader.tsx | 2 +- src/components/Wiki/Chronology/ChronologyItemComponent.tsx | 2 +- src/components/Wiki/Chronology/ChronologyYearComponent.tsx | 2 +- src/{helpers => graphql}/getAppStaticProps.ts | 0 src/helpers/formatters.ts | 2 +- src/helpers/others.ts | 2 +- src/hooks/useSmartLanguage.tsx | 2 +- src/pages/404.tsx | 2 +- src/pages/500.tsx | 2 +- src/pages/about-us/accords-handbook.tsx | 2 +- src/pages/about-us/contact.tsx | 2 +- src/pages/about-us/index.tsx | 2 +- src/pages/about-us/legality.tsx | 2 +- src/pages/about-us/sharing-policy.tsx | 2 +- src/pages/archives/index.tsx | 2 +- src/pages/archives/videos/c/[uid].tsx | 2 +- src/pages/archives/videos/index.tsx | 2 +- src/pages/archives/videos/v/[uid].tsx | 2 +- src/pages/chronicles/index.tsx | 2 +- src/pages/contents/[slug]/index.tsx | 2 +- src/pages/contents/index.tsx | 2 +- src/pages/dev/checkup/contents.tsx | 2 +- src/pages/dev/checkup/libraryitems.tsx | 2 +- src/pages/dev/editor.tsx | 2 +- src/pages/gallery/index.tsx | 2 +- src/pages/index.tsx | 2 +- src/pages/library/[slug]/index.tsx | 2 +- src/pages/library/[slug]/scans.tsx | 2 +- src/pages/library/index.tsx | 2 +- src/pages/merch/index.tsx | 2 +- src/pages/news/[slug].tsx | 2 +- src/pages/news/index.tsx | 2 +- src/pages/wiki/chronology.tsx | 2 +- src/pages/wiki/index.tsx | 2 +- 44 files changed, 43 insertions(+), 43 deletions(-) rename src/{helpers => graphql}/getAppStaticProps.ts (100%) diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index 1104e10..d9a185f 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -2,7 +2,7 @@ import Button from "components/Inputs/Button"; import { useAppLayout } from "contexts/AppLayoutContext"; import { UploadImageFragment } from "graphql/generated"; import { prettyLanguage, prettySlug } from "helpers/formatters"; -import { AppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps } from "graphql/getAppStaticProps"; import { getOgImage, ImageQuality, OgImage } from "helpers/img"; import { useMediaMobile } from "hooks/useMediaQuery"; import Head from "next/head"; diff --git a/src/components/Inputs/LanguageSwitcher.tsx b/src/components/Inputs/LanguageSwitcher.tsx index 85eb032..25c9fb4 100644 --- a/src/components/Inputs/LanguageSwitcher.tsx +++ b/src/components/Inputs/LanguageSwitcher.tsx @@ -1,5 +1,5 @@ import { prettyLanguage } from "helpers/formatters"; -import { AppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps } from "graphql/getAppStaticProps"; import { Dispatch, SetStateAction } from "react"; import ToolTip from "../ToolTip"; import Button from "./Button"; diff --git a/src/components/Library/ContentLine.tsx b/src/components/Library/ContentLine.tsx index 414d892..cf04a60 100644 --- a/src/components/Library/ContentLine.tsx +++ b/src/components/Library/ContentLine.tsx @@ -2,7 +2,7 @@ import Chip from "components/Chip"; import Button from "components/Inputs/Button"; import { GetLibraryItemQuery } from "graphql/generated"; import { prettyinlineTitle, prettySlug } from "helpers/formatters"; -import { AppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps } from "graphql/getAppStaticProps"; import { useState } from "react"; interface Props { diff --git a/src/components/Library/ScanSet.tsx b/src/components/Library/ScanSet.tsx index 38f1cbb..f1727c1 100644 --- a/src/components/Library/ScanSet.tsx +++ b/src/components/Library/ScanSet.tsx @@ -4,7 +4,7 @@ import Button from "components/Inputs/Button"; import RecorderChip from "components/RecorderChip"; import ToolTip from "components/ToolTip"; import { GetLibraryItemScansQuery } from "graphql/generated"; -import { AppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps } from "graphql/getAppStaticProps"; import { getStatusDescription } from "helpers/others"; import { getAssetFilename, getAssetURL, ImageQuality } from "helpers/img"; import { isInteger } from "helpers/numbers"; diff --git a/src/components/Library/ScanSetCover.tsx b/src/components/Library/ScanSetCover.tsx index 40a2f3d..6fad839 100644 --- a/src/components/Library/ScanSetCover.tsx +++ b/src/components/Library/ScanSetCover.tsx @@ -6,7 +6,7 @@ import { GetLibraryItemScansQuery, UploadImageFragment, } from "graphql/generated"; -import { AppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps } from "graphql/getAppStaticProps"; import { getStatusDescription } from "helpers/others"; import { getAssetURL, ImageQuality } from "helpers/img"; import useSmartLanguage from "hooks/useSmartLanguage"; diff --git a/src/components/PanelComponents/ReturnButton.tsx b/src/components/PanelComponents/ReturnButton.tsx index 42649d3..498279c 100644 --- a/src/components/PanelComponents/ReturnButton.tsx +++ b/src/components/PanelComponents/ReturnButton.tsx @@ -1,7 +1,7 @@ import HorizontalLine from "components/HorizontalLine"; import Button from "components/Inputs/Button"; import { useAppLayout } from "contexts/AppLayoutContext"; -import { AppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps } from "graphql/getAppStaticProps"; interface Props { href: string; diff --git a/src/components/Panels/MainPanel.tsx b/src/components/Panels/MainPanel.tsx index 5c95204..4194c96 100644 --- a/src/components/Panels/MainPanel.tsx +++ b/src/components/Panels/MainPanel.tsx @@ -6,7 +6,7 @@ import { useAppLayout } from "contexts/AppLayoutContext"; import { useMediaDesktop } from "hooks/useMediaQuery"; import Markdown from "markdown-to-jsx"; import Link from "next/link"; -import { AppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps } from "graphql/getAppStaticProps"; interface Props { langui: AppStaticProps["langui"]; diff --git a/src/components/PostPage.tsx b/src/components/PostPage.tsx index 841ebe8..e301928 100644 --- a/src/components/PostPage.tsx +++ b/src/components/PostPage.tsx @@ -1,5 +1,5 @@ import { prettySlug } from "helpers/formatters"; -import { AppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps } from "graphql/getAppStaticProps"; import { getStatusDescription } from "helpers/others"; import { Post } from "helpers/types"; import useSmartLanguage from "hooks/useSmartLanguage"; diff --git a/src/components/PreviewCard.tsx b/src/components/PreviewCard.tsx index cea63d0..6b8681c 100644 --- a/src/components/PreviewCard.tsx +++ b/src/components/PreviewCard.tsx @@ -10,7 +10,7 @@ import { prettyPrice, prettyShortenNumber, } from "helpers/formatters"; -import { AppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps } from "graphql/getAppStaticProps"; import { ImageQuality } from "helpers/img"; import Link from "next/link"; import Chip from "./Chip"; diff --git a/src/components/RecorderChip.tsx b/src/components/RecorderChip.tsx index ed1b734..8af3b6d 100644 --- a/src/components/RecorderChip.tsx +++ b/src/components/RecorderChip.tsx @@ -1,6 +1,6 @@ import Chip from "components/Chip"; import { RecorderChipFragment } from "graphql/generated"; -import { AppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps } from "graphql/getAppStaticProps"; import { ImageQuality } from "helpers/img"; import Img from "./Img"; import Markdawn from "./Markdown/Markdawn"; diff --git a/src/components/ThumbnailHeader.tsx b/src/components/ThumbnailHeader.tsx index c36a8cd..0503973 100644 --- a/src/components/ThumbnailHeader.tsx +++ b/src/components/ThumbnailHeader.tsx @@ -4,7 +4,7 @@ import InsetBox from "components/InsetBox"; import Markdawn from "components/Markdown/Markdawn"; import { GetContentQuery, UploadImageFragment } from "graphql/generated"; import { prettyinlineTitle, prettySlug, slugify } from "helpers/formatters"; -import { AppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps } from "graphql/getAppStaticProps"; import { ImageQuality } from "helpers/img"; interface Props { diff --git a/src/components/Wiki/Chronology/ChronologyItemComponent.tsx b/src/components/Wiki/Chronology/ChronologyItemComponent.tsx index 4d2723f..2b96935 100644 --- a/src/components/Wiki/Chronology/ChronologyItemComponent.tsx +++ b/src/components/Wiki/Chronology/ChronologyItemComponent.tsx @@ -4,7 +4,7 @@ import { Enum_Componenttranslationschronologyitem_Status, GetChronologyItemsQuery, } from "graphql/generated"; -import { AppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps } from "graphql/getAppStaticProps"; import { getStatusDescription } from "helpers/others"; interface Props { diff --git a/src/components/Wiki/Chronology/ChronologyYearComponent.tsx b/src/components/Wiki/Chronology/ChronologyYearComponent.tsx index 534eacd..b69715e 100644 --- a/src/components/Wiki/Chronology/ChronologyYearComponent.tsx +++ b/src/components/Wiki/Chronology/ChronologyYearComponent.tsx @@ -1,6 +1,6 @@ import ChronologyItemComponent from "components/Wiki/Chronology/ChronologyItemComponent"; import { GetChronologyItemsQuery } from "graphql/generated"; -import { AppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps } from "graphql/getAppStaticProps"; interface Props { year: number; diff --git a/src/helpers/getAppStaticProps.ts b/src/graphql/getAppStaticProps.ts similarity index 100% rename from src/helpers/getAppStaticProps.ts rename to src/graphql/getAppStaticProps.ts diff --git a/src/helpers/formatters.ts b/src/helpers/formatters.ts index b561415..dd04b2f 100644 --- a/src/helpers/formatters.ts +++ b/src/helpers/formatters.ts @@ -1,5 +1,5 @@ import { DatePickerFragment, PricePickerFragment } from "graphql/generated"; -import { AppStaticProps } from "./getAppStaticProps"; +import { AppStaticProps } from "../graphql/getAppStaticProps"; import { convertPrice } from "./numbers"; export function prettyDate(datePicker: DatePickerFragment): string { diff --git a/src/helpers/others.ts b/src/helpers/others.ts index c8313c8..ed50242 100644 --- a/src/helpers/others.ts +++ b/src/helpers/others.ts @@ -3,7 +3,7 @@ import { GetLibraryItemQuery, GetLibraryItemScansQuery, } from "graphql/generated"; -import { AppStaticProps } from "./getAppStaticProps"; +import { AppStaticProps } from "../graphql/getAppStaticProps"; export function sortContent( contents: diff --git a/src/hooks/useSmartLanguage.tsx b/src/hooks/useSmartLanguage.tsx index 59ab827..13af8dd 100644 --- a/src/hooks/useSmartLanguage.tsx +++ b/src/hooks/useSmartLanguage.tsx @@ -1,6 +1,6 @@ import LanguageSwitcher from "components/Inputs/LanguageSwitcher"; import { useAppLayout } from "contexts/AppLayoutContext"; -import { AppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps } from "graphql/getAppStaticProps"; import { useRouter } from "next/router"; import { useEffect, useMemo, useState } from "react"; diff --git a/src/pages/404.tsx b/src/pages/404.tsx index 0ba10c1..9549334 100644 --- a/src/pages/404.tsx +++ b/src/pages/404.tsx @@ -4,7 +4,7 @@ import ReturnButton, { } from "components/PanelComponents/ReturnButton"; import ContentPanel from "components/Panels/ContentPanel"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; interface Props extends AppStaticProps {} diff --git a/src/pages/500.tsx b/src/pages/500.tsx index f04f458..2093c65 100644 --- a/src/pages/500.tsx +++ b/src/pages/500.tsx @@ -4,7 +4,7 @@ import ReturnButton, { } from "components/PanelComponents/ReturnButton"; import ContentPanel from "components/Panels/ContentPanel"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; interface Props extends AppStaticProps {} diff --git a/src/pages/about-us/accords-handbook.tsx b/src/pages/about-us/accords-handbook.tsx index 1fb8c7c..06b1a8c 100644 --- a/src/pages/about-us/accords-handbook.tsx +++ b/src/pages/about-us/accords-handbook.tsx @@ -1,6 +1,6 @@ import PostPage from "components/PostPage"; import { getReadySdk } from "graphql/sdk"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { Post } from "helpers/types"; import { GetStaticPropsContext } from "next"; diff --git a/src/pages/about-us/contact.tsx b/src/pages/about-us/contact.tsx index 7e8b956..1d1f278 100644 --- a/src/pages/about-us/contact.tsx +++ b/src/pages/about-us/contact.tsx @@ -2,7 +2,7 @@ import InsetBox from "components/InsetBox"; import PostPage from "components/PostPage"; import { randomInt } from "crypto"; import { getReadySdk } from "graphql/sdk"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { Post } from "helpers/types"; import { GetStaticPropsContext } from "next"; import { useRouter } from "next/router"; diff --git a/src/pages/about-us/index.tsx b/src/pages/about-us/index.tsx index bac403e..2a1538b 100644 --- a/src/pages/about-us/index.tsx +++ b/src/pages/about-us/index.tsx @@ -3,7 +3,7 @@ import NavOption from "components/PanelComponents/NavOption"; import PanelHeader from "components/PanelComponents/PanelHeader"; import SubPanel from "components/Panels/SubPanel"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; interface Props extends AppStaticProps {} diff --git a/src/pages/about-us/legality.tsx b/src/pages/about-us/legality.tsx index 53db47b..8149037 100644 --- a/src/pages/about-us/legality.tsx +++ b/src/pages/about-us/legality.tsx @@ -1,6 +1,6 @@ import PostPage from "components/PostPage"; import { getReadySdk } from "graphql/sdk"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { Post } from "helpers/types"; import { GetStaticPropsContext } from "next"; diff --git a/src/pages/about-us/sharing-policy.tsx b/src/pages/about-us/sharing-policy.tsx index 16a2436..f7b3c5c 100644 --- a/src/pages/about-us/sharing-policy.tsx +++ b/src/pages/about-us/sharing-policy.tsx @@ -1,6 +1,6 @@ import PostPage from "components/PostPage"; import { getReadySdk } from "graphql/sdk"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { Post } from "helpers/types"; import { GetStaticPropsContext } from "next"; diff --git a/src/pages/archives/index.tsx b/src/pages/archives/index.tsx index 906587e..dde0f10 100644 --- a/src/pages/archives/index.tsx +++ b/src/pages/archives/index.tsx @@ -3,7 +3,7 @@ import NavOption from "components/PanelComponents/NavOption"; import PanelHeader from "components/PanelComponents/PanelHeader"; import SubPanel from "components/Panels/SubPanel"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; interface Props extends AppStaticProps {} diff --git a/src/pages/archives/videos/c/[uid].tsx b/src/pages/archives/videos/c/[uid].tsx index e85f43d..969febc 100644 --- a/src/pages/archives/videos/c/[uid].tsx +++ b/src/pages/archives/videos/c/[uid].tsx @@ -11,7 +11,7 @@ import SubPanel from "components/Panels/SubPanel"; import ThumbnailPreview from "components/PreviewCard"; import { GetVideoChannelQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { getVideoThumbnailURL } from "helpers/videos"; import { GetStaticPathsContext, diff --git a/src/pages/archives/videos/index.tsx b/src/pages/archives/videos/index.tsx index 53bb545..5d26e5d 100644 --- a/src/pages/archives/videos/index.tsx +++ b/src/pages/archives/videos/index.tsx @@ -13,7 +13,7 @@ import ThumbnailPreview from "components/PreviewCard"; import { GetVideosPreviewQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; import { prettyDate } from "helpers/formatters"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { getVideoThumbnailURL } from "helpers/videos"; import { GetStaticPropsContext } from "next"; import { useState } from "react"; diff --git a/src/pages/archives/videos/v/[uid].tsx b/src/pages/archives/videos/v/[uid].tsx index a631a58..5561786 100644 --- a/src/pages/archives/videos/v/[uid].tsx +++ b/src/pages/archives/videos/v/[uid].tsx @@ -19,7 +19,7 @@ import { GetStaticPathsResult, GetStaticPropsContext, } from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { prettyDate, prettyShortenNumber } from "helpers/formatters"; import { getVideoFile } from "helpers/videos"; diff --git a/src/pages/chronicles/index.tsx b/src/pages/chronicles/index.tsx index eb23755..ea6b0c0 100644 --- a/src/pages/chronicles/index.tsx +++ b/src/pages/chronicles/index.tsx @@ -2,7 +2,7 @@ import AppLayout from "components/AppLayout"; import PanelHeader from "components/PanelComponents/PanelHeader"; import SubPanel from "components/Panels/SubPanel"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; interface Props extends AppStaticProps {} diff --git a/src/pages/contents/[slug]/index.tsx b/src/pages/contents/[slug]/index.tsx index 3506fd8..9cb42ca 100644 --- a/src/pages/contents/[slug]/index.tsx +++ b/src/pages/contents/[slug]/index.tsx @@ -19,7 +19,7 @@ import { prettyLanguage, prettySlug, } from "helpers/formatters"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { getStatusDescription } from "helpers/others"; import { useMediaMobile } from "hooks/useMediaQuery"; import useSmartLanguage from "hooks/useSmartLanguage"; diff --git a/src/pages/contents/index.tsx b/src/pages/contents/index.tsx index 9ba6ac4..54df12a 100644 --- a/src/pages/contents/index.tsx +++ b/src/pages/contents/index.tsx @@ -11,7 +11,7 @@ import ThumbnailPreview from "components/PreviewCard"; import { GetContentsQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { useEffect, useState } from "react"; import { prettySlug, prettyinlineTitle } from "helpers/formatters"; diff --git a/src/pages/dev/checkup/contents.tsx b/src/pages/dev/checkup/contents.tsx index e744b0b..392d063 100644 --- a/src/pages/dev/checkup/contents.tsx +++ b/src/pages/dev/checkup/contents.tsx @@ -11,7 +11,7 @@ import { } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; interface Props extends AppStaticProps { contents: DevGetContentsQuery; diff --git a/src/pages/dev/checkup/libraryitems.tsx b/src/pages/dev/checkup/libraryitems.tsx index ffc1950..eb4ca2b 100644 --- a/src/pages/dev/checkup/libraryitems.tsx +++ b/src/pages/dev/checkup/libraryitems.tsx @@ -11,7 +11,7 @@ import { } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; interface Props extends AppStaticProps { libraryItems: DevGetLibraryItemsQuery; diff --git a/src/pages/dev/editor.tsx b/src/pages/dev/editor.tsx index d873018..9faee01 100644 --- a/src/pages/dev/editor.tsx +++ b/src/pages/dev/editor.tsx @@ -7,7 +7,7 @@ import ContentPanel, { import Popup from "components/Popup"; import ToolTip from "components/ToolTip"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { useCallback, useState } from "react"; import TurndownService from "turndown"; diff --git a/src/pages/gallery/index.tsx b/src/pages/gallery/index.tsx index 305dbc5..925448f 100644 --- a/src/pages/gallery/index.tsx +++ b/src/pages/gallery/index.tsx @@ -1,6 +1,6 @@ import AppLayout from "components/AppLayout"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; interface Props extends AppStaticProps {} diff --git a/src/pages/index.tsx b/src/pages/index.tsx index c724c1d..c7a9b5b 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,7 +1,7 @@ import PostPage from "components/PostPage"; import { getReadySdk } from "graphql/sdk"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { Post } from "helpers/types"; interface Props extends AppStaticProps { diff --git a/src/pages/library/[slug]/index.tsx b/src/pages/library/[slug]/index.tsx index 5a9f0bc..ac711e8 100644 --- a/src/pages/library/[slug]/index.tsx +++ b/src/pages/library/[slug]/index.tsx @@ -30,7 +30,7 @@ import { prettyPrice, prettyURL, } from "helpers/formatters"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { sortContent } from "helpers/others"; import { getAssetURL, ImageQuality } from "helpers/img"; import { convertMmToInch } from "helpers/numbers"; diff --git a/src/pages/library/[slug]/scans.tsx b/src/pages/library/[slug]/scans.tsx index 97f459e..3a92972 100644 --- a/src/pages/library/[slug]/scans.tsx +++ b/src/pages/library/[slug]/scans.tsx @@ -14,7 +14,7 @@ import { useAppLayout } from "contexts/AppLayoutContext"; import { GetLibraryItemScansQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; import { prettyinlineTitle, prettySlug } from "helpers/formatters"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { sortContent } from "helpers/others"; import { GetStaticPathsContext, diff --git a/src/pages/library/index.tsx b/src/pages/library/index.tsx index 3b9042a..cd7f7bf 100644 --- a/src/pages/library/index.tsx +++ b/src/pages/library/index.tsx @@ -15,7 +15,7 @@ import { prettyinlineTitle, prettyItemSubType, } from "helpers/formatters"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { convertPrice } from "helpers/numbers"; import { GetStaticPropsContext } from "next"; import { useEffect, useState } from "react"; diff --git a/src/pages/merch/index.tsx b/src/pages/merch/index.tsx index e1d950c..c791951 100644 --- a/src/pages/merch/index.tsx +++ b/src/pages/merch/index.tsx @@ -2,7 +2,7 @@ import AppLayout from "components/AppLayout"; import PanelHeader from "components/PanelComponents/PanelHeader"; import SubPanel from "components/Panels/SubPanel"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; interface Props extends AppStaticProps {} export default function Merch(props: Props): JSX.Element { diff --git a/src/pages/news/[slug].tsx b/src/pages/news/[slug].tsx index 50906e5..2745e8d 100644 --- a/src/pages/news/[slug].tsx +++ b/src/pages/news/[slug].tsx @@ -1,7 +1,7 @@ import PostPage from "components/PostPage"; import { GetPostQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { Post } from "helpers/types"; import { GetStaticPathsContext, diff --git a/src/pages/news/index.tsx b/src/pages/news/index.tsx index d72a6af..a4b595b 100644 --- a/src/pages/news/index.tsx +++ b/src/pages/news/index.tsx @@ -9,7 +9,7 @@ import ThumbnailPreview from "components/PreviewCard"; import { GetPostsPreviewQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; import { prettyDate, prettySlug } from "helpers/formatters"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { GetStaticPropsContext } from "next"; import { useState } from "react"; diff --git a/src/pages/wiki/chronology.tsx b/src/pages/wiki/chronology.tsx index 7e608df..9806b2c 100644 --- a/src/pages/wiki/chronology.tsx +++ b/src/pages/wiki/chronology.tsx @@ -11,7 +11,7 @@ import { useAppLayout } from "contexts/AppLayoutContext"; import { GetChronologyItemsQuery, GetErasQuery } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; import { prettySlug } from "helpers/formatters"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { GetStaticPropsContext } from "next"; interface Props extends AppStaticProps { diff --git a/src/pages/wiki/index.tsx b/src/pages/wiki/index.tsx index f00ea29..a44d72b 100644 --- a/src/pages/wiki/index.tsx +++ b/src/pages/wiki/index.tsx @@ -3,7 +3,7 @@ import NavOption from "components/PanelComponents/NavOption"; import PanelHeader from "components/PanelComponents/PanelHeader"; import SubPanel from "components/Panels/SubPanel"; import { GetStaticPropsContext } from "next"; -import { AppStaticProps, getAppStaticProps } from "helpers/getAppStaticProps"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; interface Props extends AppStaticProps {} -- 2.40.1 From 0591fa22d4124c360a174c65c85c92cb746b2773 Mon Sep 17 00:00:00 2001 From: DrMint Date: Sun, 8 May 2022 21:37:41 +0200 Subject: [PATCH 11/30] Mass use of Immutable --- src/components/AppLayout.tsx | 32 ++++++---- src/components/Chip.tsx | 4 +- src/components/HorizontalLine.tsx | 4 +- src/components/Img.tsx | 5 +- src/components/Inputs/Button.tsx | 11 +++- src/components/Inputs/LanguageSwitcher.tsx | 5 +- src/components/Inputs/OrderableList.tsx | 3 +- src/components/Inputs/PageSelector.tsx | 3 +- src/components/Inputs/Select.tsx | 3 +- src/components/Inputs/Switch.tsx | 3 +- src/components/InsetBox.tsx | 4 +- src/components/Library/ContentLine.tsx | 5 +- src/components/Library/ScanSet.tsx | 10 ++-- src/components/Library/ScanSetCover.tsx | 5 +- src/components/LightBox.tsx | 3 +- src/components/Markdown/Markdawn.tsx | 3 +- src/components/Markdown/TOC.tsx | 3 +- src/components/PanelComponents/NavOption.tsx | 3 +- .../PanelComponents/PanelHeader.tsx | 3 +- .../PanelComponents/ReturnButton.tsx | 3 +- src/components/Panels/ContentPanel.tsx | 4 +- src/components/Panels/MainPanel.tsx | 3 +- src/components/Panels/SubPanel.tsx | 4 +- src/components/Popup.tsx | 3 +- src/components/PostPage.tsx | 8 +-- src/components/PreviewCard.tsx | 5 +- src/components/PreviewLine.tsx | 3 +- src/components/RecorderChip.tsx | 3 +- src/components/SVG.tsx | 3 +- src/components/ThumbnailHeader.tsx | 5 +- src/components/ToolTip.tsx | 12 ++-- .../Chronology/ChronologyItemComponent.tsx | 5 +- .../Chronology/ChronologyYearComponent.tsx | 5 +- src/contexts/AppLayoutContext.tsx | 3 +- src/graphql/getAppStaticProps.ts | 15 +++-- src/graphql/getPostStaticProps.ts | 32 ++++++++++ src/helpers/formatters.ts | 10 ++-- src/helpers/img.ts | 10 +++- src/helpers/numbers.ts | 10 ++-- src/helpers/others.ts | 60 ++++++++++--------- src/helpers/types.ts | 15 ++++- src/hooks/useSmartLanguage.tsx | 15 +++-- src/pages/404.tsx | 5 +- src/pages/500.tsx | 5 +- src/pages/about-us/accords-handbook.tsx | 36 +++-------- src/pages/about-us/contact.tsx | 38 ++++-------- src/pages/about-us/index.tsx | 5 +- src/pages/about-us/legality.tsx | 33 ++-------- src/pages/about-us/sharing-policy.tsx | 32 ++-------- src/pages/archives/index.tsx | 5 +- src/pages/chronicles/index.tsx | 3 +- src/pages/contents/[slug]/index.tsx | 5 +- src/pages/contents/index.tsx | 15 ++--- src/pages/dev/checkup/contents.tsx | 9 +-- src/pages/dev/checkup/libraryitems.tsx | 13 ++-- src/pages/dev/editor.tsx | 5 +- src/pages/gallery/index.tsx | 5 +- src/pages/index.tsx | 34 +++-------- src/pages/library/[slug]/index.tsx | 7 ++- src/pages/library/[slug]/scans.tsx | 3 +- src/pages/library/index.tsx | 33 +++++----- src/pages/merch/index.tsx | 5 +- src/pages/news/[slug].tsx | 34 +++-------- src/pages/news/index.tsx | 30 ++++++---- src/pages/wiki/index.tsx | 5 +- 65 files changed, 375 insertions(+), 338 deletions(-) create mode 100644 src/graphql/getPostStaticProps.ts diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index d9a185f..44ac035 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -1,9 +1,10 @@ import Button from "components/Inputs/Button"; import { useAppLayout } from "contexts/AppLayoutContext"; import { UploadImageFragment } from "graphql/generated"; -import { prettyLanguage, prettySlug } from "helpers/formatters"; import { AppStaticProps } from "graphql/getAppStaticProps"; +import { prettyLanguage, prettySlug } from "helpers/formatters"; import { getOgImage, ImageQuality, OgImage } from "helpers/img"; +import { Immutable } from "helpers/types"; import { useMediaMobile } from "hooks/useMediaQuery"; import Head from "next/head"; import { useRouter } from "next/router"; @@ -24,8 +25,19 @@ interface Props extends AppStaticProps { description?: string; } -export default function AppLayout(props: Props): JSX.Element { - const { langui, currencies, languages, subPanel, contentPanel } = props; +export default function AppLayout(props: Immutable): JSX.Element { + const { + langui, + currencies, + languages, + subPanel, + contentPanel, + thumbnail, + title, + navTitle, + description, + subPanelIcon, + } = props; const router = useRouter(); const isMobile = useMediaMobile(); const appLayout = useAppLayout(); @@ -58,8 +70,8 @@ export default function AppLayout(props: Props): JSX.Element { const turnSubIntoContent = subPanel && !contentPanel; const titlePrefix = "Accord’s Library"; - const metaImage: OgImage = props.thumbnail - ? getOgImage(ImageQuality.Og, props.thumbnail) + const metaImage: OgImage = thumbnail + ? getOgImage(ImageQuality.Og, thumbnail) : { image: "/default_og.jpg", width: 1200, @@ -67,9 +79,9 @@ export default function AppLayout(props: Props): JSX.Element { alt: "Accord's Library Logo", }; const ogTitle = - props.title ?? props.navTitle ?? prettySlug(router.asPath.split("/").pop()); + title ?? navTitle ?? prettySlug(router.asPath.split("/").pop()); - const metaDescription = props.description ?? langui.default_description ?? ""; + const metaDescription = description ?? langui.default_description ?? ""; useEffect(() => { document.getElementsByTagName("html")[0].style.fontSize = `${ @@ -114,7 +126,7 @@ export default function AppLayout(props: Props): JSX.Element { }, [currencySelect]); let gridCol = ""; - if (props.subPanel) { + if (subPanel) { if (appLayout.mainPanelReduced) { gridCol = "grid-cols-[6rem_20rem_1fr]"; } else { @@ -260,8 +272,8 @@ export default function AppLayout(props: Props): JSX.Element { {subPanel && !turnSubIntoContent ? appLayout.subPanelOpen ? "close" - : props.subPanelIcon - ? props.subPanelIcon + : subPanelIcon + ? subPanelIcon : "tune" : ""} diff --git a/src/components/Chip.tsx b/src/components/Chip.tsx index b410c5e..ebba2e8 100644 --- a/src/components/Chip.tsx +++ b/src/components/Chip.tsx @@ -1,9 +1,11 @@ +import { Immutable } from "helpers/types"; + interface Props { className?: string; children: React.ReactNode; } -export default function Chip(props: Props): JSX.Element { +export default function Chip(props: Immutable): JSX.Element { return (
): JSX.Element { return (
): JSX.Element { if (typeof props.image === "string") { return ( ): JSX.Element { const { draggable, id, @@ -39,11 +40,15 @@ export default function Button(props: Props): JSX.Element { transition-all select-none hover:[--opacityBadge:0] --opacityBadge:100 ${className} ${ active ? "text-light bg-black drop-shadow-black-lg !border-black cursor-not-allowed" - : "cursor-pointer hover:text-light hover:bg-dark hover:drop-shadow-shade-lg active:bg-black active:text-light active:drop-shadow-black-lg active:border-black" + : `cursor-pointer hover:text-light hover:bg-dark hover:drop-shadow-shade-lg + active:bg-black active:text-light active:drop-shadow-black-lg active:border-black` }`} > {badgeNumber && ( -
+
{badgeNumber}
)} diff --git a/src/components/Inputs/LanguageSwitcher.tsx b/src/components/Inputs/LanguageSwitcher.tsx index 25c9fb4..4127b09 100644 --- a/src/components/Inputs/LanguageSwitcher.tsx +++ b/src/components/Inputs/LanguageSwitcher.tsx @@ -1,5 +1,6 @@ -import { prettyLanguage } from "helpers/formatters"; import { AppStaticProps } from "graphql/getAppStaticProps"; +import { prettyLanguage } from "helpers/formatters"; +import { Immutable } from "helpers/types"; import { Dispatch, SetStateAction } from "react"; import ToolTip from "../ToolTip"; import Button from "./Button"; @@ -12,7 +13,7 @@ interface Props { setLocalesIndex: Dispatch>; } -export default function LanguageSwitcher(props: Props): JSX.Element { +export default function LanguageSwitcher(props: Immutable): JSX.Element { const { locales, className, localesIndex, setLocalesIndex } = props; return ( diff --git a/src/components/Inputs/OrderableList.tsx b/src/components/Inputs/OrderableList.tsx index 6f54c9d..b02dbe9 100644 --- a/src/components/Inputs/OrderableList.tsx +++ b/src/components/Inputs/OrderableList.tsx @@ -1,4 +1,5 @@ import { arrayMove } from "helpers/others"; +import { Immutable } from "helpers/types"; import { useEffect, useState } from "react"; interface Props { @@ -7,7 +8,7 @@ interface Props { onChange?: (items: Map) => void; } -export default function OrderableList(props: Props): JSX.Element { +export default function OrderableList(props: Immutable): JSX.Element { const [items, setItems] = useState>(props.items); useEffect(() => { diff --git a/src/components/Inputs/PageSelector.tsx b/src/components/Inputs/PageSelector.tsx index da75714..4b3c914 100644 --- a/src/components/Inputs/PageSelector.tsx +++ b/src/components/Inputs/PageSelector.tsx @@ -1,3 +1,4 @@ +import { Immutable } from "helpers/types"; import { Dispatch, SetStateAction } from "react"; import Button from "./Button"; @@ -8,7 +9,7 @@ interface Props { setPage: Dispatch>; } -export default function PageSelector(props: Props): JSX.Element { +export default function PageSelector(props: Immutable): JSX.Element { const { page, setPage, maxPage } = props; return ( diff --git a/src/components/Inputs/Select.tsx b/src/components/Inputs/Select.tsx index 63728c4..a4f5290 100644 --- a/src/components/Inputs/Select.tsx +++ b/src/components/Inputs/Select.tsx @@ -1,3 +1,4 @@ +import { Immutable } from "helpers/types"; import { Dispatch, SetStateAction, useState } from "react"; interface Props { @@ -9,7 +10,7 @@ interface Props { className?: string; } -export default function Select(props: Props): JSX.Element { +export default function Select(props: Immutable): JSX.Element { const [opened, setOpened] = useState(false); return ( diff --git a/src/components/Inputs/Switch.tsx b/src/components/Inputs/Switch.tsx index 9640fa3..a6a19a1 100644 --- a/src/components/Inputs/Switch.tsx +++ b/src/components/Inputs/Switch.tsx @@ -1,3 +1,4 @@ +import { Immutable } from "helpers/types"; import { Dispatch, SetStateAction } from "react"; interface Props { @@ -6,7 +7,7 @@ interface Props { className?: string; } -export default function Switch(props: Props): JSX.Element { +export default function Switch(props: Immutable): JSX.Element { return (
): JSX.Element { return (
): JSX.Element { const { content, langui, parentSlug } = props; const [opened, setOpened] = useState(false); diff --git a/src/components/Library/ScanSet.tsx b/src/components/Library/ScanSet.tsx index f1727c1..36194a6 100644 --- a/src/components/Library/ScanSet.tsx +++ b/src/components/Library/ScanSet.tsx @@ -5,9 +5,10 @@ import RecorderChip from "components/RecorderChip"; import ToolTip from "components/ToolTip"; import { GetLibraryItemScansQuery } from "graphql/generated"; import { AppStaticProps } from "graphql/getAppStaticProps"; -import { getStatusDescription } from "helpers/others"; import { getAssetFilename, getAssetURL, ImageQuality } from "helpers/img"; import { isInteger } from "helpers/numbers"; +import { getStatusDescription } from "helpers/others"; +import { Immutable } from "helpers/types"; import useSmartLanguage from "hooks/useSmartLanguage"; import { Dispatch, SetStateAction } from "react"; @@ -50,7 +51,7 @@ interface Props { >["content"]; } -export default function ScanSet(props: Props): JSX.Element { +export default function ScanSet(props: Immutable): JSX.Element { const { setLightboxOpen, setLightboxImages, @@ -68,7 +69,8 @@ export default function ScanSet(props: Props): JSX.Element { languages: languages, languageExtractor: (item) => item?.language?.data?.attributes?.code, transform: (item) => { - item?.pages?.data.sort((a, b) => { + const newItem = { ...item } as Props["scanSet"][number]; + newItem?.pages?.data.sort((a, b) => { if (a.attributes?.url && b.attributes?.url) { let aName = getAssetFilename(a.attributes.url); let bName = getAssetFilename(b.attributes.url); @@ -91,7 +93,7 @@ export default function ScanSet(props: Props): JSX.Element { } return 0; }); - return item; + return newItem; }, }); diff --git a/src/components/Library/ScanSetCover.tsx b/src/components/Library/ScanSetCover.tsx index 6fad839..45559c6 100644 --- a/src/components/Library/ScanSetCover.tsx +++ b/src/components/Library/ScanSetCover.tsx @@ -7,8 +7,9 @@ import { UploadImageFragment, } from "graphql/generated"; import { AppStaticProps } from "graphql/getAppStaticProps"; -import { getStatusDescription } from "helpers/others"; import { getAssetURL, ImageQuality } from "helpers/img"; +import { getStatusDescription } from "helpers/others"; +import { Immutable } from "helpers/types"; import useSmartLanguage from "hooks/useSmartLanguage"; import { Dispatch, SetStateAction } from "react"; @@ -30,7 +31,7 @@ interface Props { langui: AppStaticProps["langui"]; } -export default function ScanSetCover(props: Props): JSX.Element { +export default function ScanSetCover(props: Immutable): JSX.Element { const { setLightboxOpen, setLightboxImages, diff --git a/src/components/LightBox.tsx b/src/components/LightBox.tsx index eeb42c2..ccaad88 100644 --- a/src/components/LightBox.tsx +++ b/src/components/LightBox.tsx @@ -1,3 +1,4 @@ +import { Immutable } from "helpers/types"; import { Dispatch, SetStateAction } from "react"; import Hotkeys from "react-hot-keys"; import { useSwipeable } from "react-swipeable"; @@ -15,7 +16,7 @@ interface Props { setIndex: Dispatch>; } -export default function LightBox(props: Props): JSX.Element { +export default function LightBox(props: Immutable): JSX.Element { const { state, setState, images, index, setIndex } = props; function handlePrevious() { diff --git a/src/components/Markdown/Markdawn.tsx b/src/components/Markdown/Markdawn.tsx index 464dc47..cf87363 100644 --- a/src/components/Markdown/Markdawn.tsx +++ b/src/components/Markdown/Markdawn.tsx @@ -6,6 +6,7 @@ import ToolTip from "components/ToolTip"; import { useAppLayout } from "contexts/AppLayoutContext"; import { slugify } from "helpers/formatters"; import { getAssetURL, ImageQuality } from "helpers/img"; +import { Immutable } from "helpers/types"; import Markdown from "markdown-to-jsx"; import { useRouter } from "next/router"; import React, { useState } from "react"; @@ -16,7 +17,7 @@ interface Props { text: string; } -export default function Markdawn(props: Props): JSX.Element { +export default function Markdawn(props: Immutable): JSX.Element { const appLayout = useAppLayout(); const text = preprocessMarkDawn(props.text); diff --git a/src/components/Markdown/TOC.tsx b/src/components/Markdown/TOC.tsx index 261c9c8..4967668 100644 --- a/src/components/Markdown/TOC.tsx +++ b/src/components/Markdown/TOC.tsx @@ -1,4 +1,5 @@ import { slugify } from "helpers/formatters"; +import { Immutable } from "helpers/types"; import { useRouter } from "next/router"; import { preprocessMarkDawn } from "./Markdawn"; @@ -7,7 +8,7 @@ interface Props { title?: string; } -export default function TOCComponent(props: Props): JSX.Element { +export default function TOCComponent(props: Immutable): JSX.Element { const { text, title } = props; const toc = getTocFromMarkdawn(preprocessMarkDawn(text), title); const router = useRouter(); diff --git a/src/components/PanelComponents/NavOption.tsx b/src/components/PanelComponents/NavOption.tsx index 9de955a..934814e 100644 --- a/src/components/PanelComponents/NavOption.tsx +++ b/src/components/PanelComponents/NavOption.tsx @@ -1,4 +1,5 @@ import ToolTip from "components/ToolTip"; +import { Immutable } from "helpers/types"; import { useRouter } from "next/router"; import { MouseEventHandler } from "react"; @@ -12,7 +13,7 @@ interface Props { onClick?: MouseEventHandler; } -export default function NavOption(props: Props): JSX.Element { +export default function NavOption(props: Immutable): JSX.Element { const router = useRouter(); const isActive = router.asPath.startsWith(props.url); const divActive = "bg-mid shadow-inner-sm shadow-shade"; diff --git a/src/components/PanelComponents/PanelHeader.tsx b/src/components/PanelComponents/PanelHeader.tsx index 7eef723..eba7a1f 100644 --- a/src/components/PanelComponents/PanelHeader.tsx +++ b/src/components/PanelComponents/PanelHeader.tsx @@ -1,4 +1,5 @@ import HorizontalLine from "components/HorizontalLine"; +import { Immutable } from "helpers/types"; interface Props { icon?: string; @@ -6,7 +7,7 @@ interface Props { description?: string | null | undefined; } -export default function PanelHeader(props: Props): JSX.Element { +export default function PanelHeader(props: Immutable): JSX.Element { return ( <>
diff --git a/src/components/PanelComponents/ReturnButton.tsx b/src/components/PanelComponents/ReturnButton.tsx index 498279c..d173940 100644 --- a/src/components/PanelComponents/ReturnButton.tsx +++ b/src/components/PanelComponents/ReturnButton.tsx @@ -2,6 +2,7 @@ import HorizontalLine from "components/HorizontalLine"; import Button from "components/Inputs/Button"; import { useAppLayout } from "contexts/AppLayoutContext"; import { AppStaticProps } from "graphql/getAppStaticProps"; +import { Immutable } from "helpers/types"; interface Props { href: string; @@ -18,7 +19,7 @@ export enum ReturnButtonType { both = "both", } -export default function ReturnButton(props: Props): JSX.Element { +export default function ReturnButton(props: Immutable): JSX.Element { const appLayout = useAppLayout(); return ( diff --git a/src/components/Panels/ContentPanel.tsx b/src/components/Panels/ContentPanel.tsx index b583e99..da23a00 100644 --- a/src/components/Panels/ContentPanel.tsx +++ b/src/components/Panels/ContentPanel.tsx @@ -1,3 +1,5 @@ +import { Immutable } from "helpers/types"; + interface Props { children: React.ReactNode; autoformat?: boolean; @@ -9,7 +11,7 @@ export enum ContentPanelWidthSizes { large = "large", } -export default function ContentPanel(props: Props): JSX.Element { +export default function ContentPanel(props: Immutable): JSX.Element { const width = props.width ? props.width : ContentPanelWidthSizes.default; const widthCSS = width === ContentPanelWidthSizes.default ? "max-w-2xl" : "w-full"; diff --git a/src/components/Panels/MainPanel.tsx b/src/components/Panels/MainPanel.tsx index 4194c96..17bc118 100644 --- a/src/components/Panels/MainPanel.tsx +++ b/src/components/Panels/MainPanel.tsx @@ -7,12 +7,13 @@ import { useMediaDesktop } from "hooks/useMediaQuery"; import Markdown from "markdown-to-jsx"; import Link from "next/link"; import { AppStaticProps } from "graphql/getAppStaticProps"; +import { Immutable } from "helpers/types"; interface Props { langui: AppStaticProps["langui"]; } -export default function MainPanel(props: Props): JSX.Element { +export default function MainPanel(props: Immutable): JSX.Element { const { langui } = props; const isDesktop = useMediaDesktop(); const appLayout = useAppLayout(); diff --git a/src/components/Panels/SubPanel.tsx b/src/components/Panels/SubPanel.tsx index 4494645..776e305 100644 --- a/src/components/Panels/SubPanel.tsx +++ b/src/components/Panels/SubPanel.tsx @@ -1,8 +1,10 @@ +import { Immutable } from "helpers/types"; + interface Props { children: React.ReactNode; } -export default function SubPanel(props: Props): JSX.Element { +export default function SubPanel(props: Immutable): JSX.Element { return (
{props.children} diff --git a/src/components/Popup.tsx b/src/components/Popup.tsx index 5d0b96b..0f56786 100644 --- a/src/components/Popup.tsx +++ b/src/components/Popup.tsx @@ -1,4 +1,5 @@ import { useAppLayout } from "contexts/AppLayoutContext"; +import { Immutable } from "helpers/types"; import { Dispatch, SetStateAction, useEffect } from "react"; import Hotkeys from "react-hot-keys"; @@ -13,7 +14,7 @@ interface Props { padding?: boolean; } -export default function Popup(props: Props): JSX.Element { +export default function Popup(props: Immutable): JSX.Element { const { setState, state, diff --git a/src/components/PostPage.tsx b/src/components/PostPage.tsx index e301928..82324ce 100644 --- a/src/components/PostPage.tsx +++ b/src/components/PostPage.tsx @@ -1,7 +1,7 @@ -import { prettySlug } from "helpers/formatters"; import { AppStaticProps } from "graphql/getAppStaticProps"; +import { prettySlug } from "helpers/formatters"; import { getStatusDescription } from "helpers/others"; -import { Post } from "helpers/types"; +import { Immutable, PostWithTranslations } from "helpers/types"; import useSmartLanguage from "hooks/useSmartLanguage"; import AppLayout from "./AppLayout"; import Chip from "./Chip"; @@ -16,7 +16,7 @@ import ThumbnailHeader from "./ThumbnailHeader"; import ToolTip from "./ToolTip"; interface Props { - post: Post; + post: PostWithTranslations; langui: AppStaticProps["langui"]; languages: AppStaticProps["languages"]; currencies: AppStaticProps["currencies"]; @@ -31,7 +31,7 @@ interface Props { appendBody?: JSX.Element; } -export default function PostPage(props: Props): JSX.Element { +export default function PostPage(props: Immutable): JSX.Element { const { post, langui, diff --git a/src/components/PreviewCard.tsx b/src/components/PreviewCard.tsx index 6b8681c..ae723e0 100644 --- a/src/components/PreviewCard.tsx +++ b/src/components/PreviewCard.tsx @@ -4,14 +4,15 @@ import { PricePickerFragment, UploadImageFragment, } from "graphql/generated"; +import { AppStaticProps } from "graphql/getAppStaticProps"; import { prettyDate, prettyDuration, prettyPrice, prettyShortenNumber, } from "helpers/formatters"; -import { AppStaticProps } from "graphql/getAppStaticProps"; import { ImageQuality } from "helpers/img"; +import { Immutable } from "helpers/types"; import Link from "next/link"; import Chip from "./Chip"; import Img from "./Img"; @@ -43,7 +44,7 @@ interface Props { | { __typename: "anotherHoverlayName" }; } -export default function ThumbnailPreview(props: Props): JSX.Element { +export default function ThumbnailPreview(props: Immutable): JSX.Element { const { href, thumbnail, diff --git a/src/components/PreviewLine.tsx b/src/components/PreviewLine.tsx index bc31188..75f99ad 100644 --- a/src/components/PreviewLine.tsx +++ b/src/components/PreviewLine.tsx @@ -1,5 +1,6 @@ import { UploadImageFragment } from "graphql/generated"; import { ImageQuality } from "helpers/img"; +import { Immutable } from "helpers/types"; import Link from "next/link"; import Chip from "./Chip"; import Img from "./Img"; @@ -15,7 +16,7 @@ interface Props { bottomChips?: string[]; } -export default function PreviewLine(props: Props): JSX.Element { +export default function PreviewLine(props: Immutable): JSX.Element { const { href, thumbnail, diff --git a/src/components/RecorderChip.tsx b/src/components/RecorderChip.tsx index 8af3b6d..f992476 100644 --- a/src/components/RecorderChip.tsx +++ b/src/components/RecorderChip.tsx @@ -2,6 +2,7 @@ import Chip from "components/Chip"; import { RecorderChipFragment } from "graphql/generated"; import { AppStaticProps } from "graphql/getAppStaticProps"; import { ImageQuality } from "helpers/img"; +import { Immutable } from "helpers/types"; import Img from "./Img"; import Markdawn from "./Markdown/Markdawn"; import ToolTip from "./ToolTip"; @@ -12,7 +13,7 @@ interface Props { langui: AppStaticProps["langui"]; } -export default function RecorderChip(props: Props): JSX.Element { +export default function RecorderChip(props: Immutable): JSX.Element { const { recorder, langui } = props; return ( ): JSX.Element { return (
): JSX.Element { const { langui, pre_title, diff --git a/src/components/ToolTip.tsx b/src/components/ToolTip.tsx index fb5a82f..f563f46 100644 --- a/src/components/ToolTip.tsx +++ b/src/components/ToolTip.tsx @@ -4,12 +4,12 @@ import "tippy.js/animations/scale-subtle.css"; interface Props extends TippyProps {} export default function ToolTip(props: Props): JSX.Element { - const newProps = { ...props }; - - // Set defaults - if (newProps.delay === undefined) newProps.delay = [150, 0]; - if (newProps.interactive === undefined) newProps.interactive = true; - if (newProps.animation === undefined) newProps.animation = "scale-subtle"; + const newProps: Props = { + delay: [150, 0], + interactive: true, + animation: "scale-subtle", + ...props, + }; return ( diff --git a/src/components/Wiki/Chronology/ChronologyItemComponent.tsx b/src/components/Wiki/Chronology/ChronologyItemComponent.tsx index 2b96935..cc30e39 100644 --- a/src/components/Wiki/Chronology/ChronologyItemComponent.tsx +++ b/src/components/Wiki/Chronology/ChronologyItemComponent.tsx @@ -6,6 +6,7 @@ import { } from "graphql/generated"; import { AppStaticProps } from "graphql/getAppStaticProps"; import { getStatusDescription } from "helpers/others"; +import { Immutable } from "helpers/types"; interface Props { item: Exclude< @@ -16,7 +17,9 @@ interface Props { langui: AppStaticProps["langui"]; } -export default function ChronologyItemComponent(props: Props): JSX.Element { +export default function ChronologyItemComponent( + props: Immutable +): JSX.Element { const { langui } = props; function generateAnchor( diff --git a/src/components/Wiki/Chronology/ChronologyYearComponent.tsx b/src/components/Wiki/Chronology/ChronologyYearComponent.tsx index b69715e..389e18c 100644 --- a/src/components/Wiki/Chronology/ChronologyYearComponent.tsx +++ b/src/components/Wiki/Chronology/ChronologyYearComponent.tsx @@ -1,6 +1,7 @@ import ChronologyItemComponent from "components/Wiki/Chronology/ChronologyItemComponent"; import { GetChronologyItemsQuery } from "graphql/generated"; import { AppStaticProps } from "graphql/getAppStaticProps"; +import { Immutable } from "helpers/types"; interface Props { year: number; @@ -11,7 +12,9 @@ interface Props { langui: AppStaticProps["langui"]; } -export default function ChronologyYearComponent(props: Props): JSX.Element { +export default function ChronologyYearComponent( + props: Immutable +): JSX.Element { const { langui } = props; return ( diff --git a/src/contexts/AppLayoutContext.tsx b/src/contexts/AppLayoutContext.tsx index 67b0fd2..eb1a821 100644 --- a/src/contexts/AppLayoutContext.tsx +++ b/src/contexts/AppLayoutContext.tsx @@ -1,3 +1,4 @@ +import { Immutable } from "helpers/types"; import useDarkMode from "hooks/useDarkMode"; import useStateWithLocalStorage from "hooks/useStateWithLocalStorage"; import React, { ReactNode, useContext, useState } from "react"; @@ -76,7 +77,7 @@ interface Props { children: ReactNode; } -export function AppContextProvider(props: Props): JSX.Element { +export function AppContextProvider(props: Immutable): JSX.Element { const [subPanelOpen, setSubPanelOpen] = useStateWithLocalStorage< boolean | undefined >("subPanelOpen", initialState.subPanelOpen); diff --git a/src/graphql/getAppStaticProps.ts b/src/graphql/getAppStaticProps.ts index ed9179a..5b276d5 100644 --- a/src/graphql/getAppStaticProps.ts +++ b/src/graphql/getAppStaticProps.ts @@ -4,9 +4,10 @@ import { GetWebsiteInterfaceQuery, } from "graphql/generated"; import { getReadySdk } from "graphql/sdk"; +import { Immutable } from "helpers/types"; import { GetStaticPropsContext } from "next"; -export interface AppStaticProps { +export type AppStaticProps = Immutable<{ langui: Exclude< Exclude< GetWebsiteInterfaceQuery["websiteInterfaces"], @@ -19,7 +20,7 @@ export interface AppStaticProps { null | undefined >["data"]; languages: Exclude["data"]; -} +}>; export async function getAppStaticProps( context: GetStaticPropsContext @@ -50,9 +51,11 @@ export async function getAppStaticProps( }) ).websiteInterfaces?.data[0].attributes; - return { - langui: langui ?? ({} as AppStaticProps["langui"]), - currencies: currencies?.data ?? ({} as AppStaticProps["currencies"]), - languages: languages?.data ?? ({} as AppStaticProps["languages"]), + const appStaticProps: AppStaticProps = { + langui: langui ?? {}, + currencies: currencies?.data ?? [], + languages: languages?.data ?? [], }; + + return appStaticProps; } diff --git a/src/graphql/getPostStaticProps.ts b/src/graphql/getPostStaticProps.ts new file mode 100644 index 0000000..4913b9c --- /dev/null +++ b/src/graphql/getPostStaticProps.ts @@ -0,0 +1,32 @@ +import { PostWithTranslations } from "helpers/types"; +import { GetStaticPropsContext } from "next"; +import { AppStaticProps, getAppStaticProps } from "./getAppStaticProps"; +import { getReadySdk } from "./sdk"; + +export interface PostStaticProps extends AppStaticProps { + post: PostWithTranslations; +} + +export function getPostStaticProps( + slug: string +): ( + context: GetStaticPropsContext +) => Promise<{ notFound: boolean } | { props: PostStaticProps }> { + return async (context: GetStaticPropsContext) => { + const sdk = getReadySdk(); + const post = await sdk.getPost({ + slug: slug, + language_code: context.locale ?? "en", + }); + if (post.posts?.data[0].attributes?.translations) { + const props: PostStaticProps = { + ...(await getAppStaticProps(context)), + post: post.posts.data[0].attributes as PostWithTranslations, + }; + return { + props: props, + }; + } + return { notFound: true }; + }; +} diff --git a/src/helpers/formatters.ts b/src/helpers/formatters.ts index dd04b2f..7b00940 100644 --- a/src/helpers/formatters.ts +++ b/src/helpers/formatters.ts @@ -1,8 +1,9 @@ import { DatePickerFragment, PricePickerFragment } from "graphql/generated"; import { AppStaticProps } from "../graphql/getAppStaticProps"; import { convertPrice } from "./numbers"; +import { Immutable } from "./types"; -export function prettyDate(datePicker: DatePickerFragment): string { +export function prettyDate(datePicker: Immutable): string { let result = ""; if (datePicker.year) result += datePicker.year.toString(); if (datePicker.month) @@ -13,7 +14,7 @@ export function prettyDate(datePicker: DatePickerFragment): string { } export function prettyPrice( - pricePicker: PricePickerFragment, + pricePicker: Immutable, currencies: AppStaticProps["currencies"], targetCurrencyCode?: string ): string { @@ -57,7 +58,7 @@ export function prettyinlineTitle( } export function prettyItemType( - metadata: any, + metadata: Immutable, langui: AppStaticProps["langui"] ): string | undefined | null { switch (metadata.__typename) { @@ -79,7 +80,7 @@ export function prettyItemType( } export function prettyItemSubType( - metadata: + metadata: Immutable< | { __typename: "ComponentMetadataAudio"; subtype?: { @@ -156,6 +157,7 @@ export function prettyItemSubType( } | { __typename: "Error" } | null + > ): string { if (metadata) { switch (metadata.__typename) { diff --git a/src/helpers/img.ts b/src/helpers/img.ts index b2687cb..686edbd 100644 --- a/src/helpers/img.ts +++ b/src/helpers/img.ts @@ -1,4 +1,5 @@ import { UploadImageFragment } from "graphql/generated"; +import { Immutable } from "./types"; export enum ImageQuality { Small = "small", @@ -24,7 +25,10 @@ export function getAssetFilename(path: string): string { return result[0]; } -export function getAssetURL(url: string, quality: ImageQuality): string { +export function getAssetURL( + url: string, + quality: Immutable +): string { let newUrl = url; newUrl = newUrl.replace(/^\/uploads/u, `/${quality}`); newUrl = newUrl.replace(/.jpg$/u, ".webp"); @@ -67,8 +71,8 @@ export function getImgSizesByQuality( } export function getOgImage( - quality: ImageQuality, - image: UploadImageFragment + quality: Immutable, + image: Immutable ): OgImage { const imgSize = getImgSizesByQuality( image.width ?? 0, diff --git a/src/helpers/numbers.ts b/src/helpers/numbers.ts index bb95ef3..252d8e5 100644 --- a/src/helpers/numbers.ts +++ b/src/helpers/numbers.ts @@ -1,11 +1,11 @@ import { GetCurrenciesQuery, PricePickerFragment } from "graphql/generated"; +import { Immutable } from "./types"; export function convertPrice( - pricePicker: PricePickerFragment, - targetCurrency: Exclude< - GetCurrenciesQuery["currencies"], - null | undefined - >["data"][number] + pricePicker: Immutable, + targetCurrency: Immutable< + Exclude["data"][number] + > ): number { if ( pricePicker.amount && diff --git a/src/helpers/others.ts b/src/helpers/others.ts index ed50242..1745fce 100644 --- a/src/helpers/others.ts +++ b/src/helpers/others.ts @@ -4,36 +4,42 @@ import { GetLibraryItemScansQuery, } from "graphql/generated"; import { AppStaticProps } from "../graphql/getAppStaticProps"; +import { Immutable } from "./types"; -export function sortContent( - contents: - | Exclude< - Exclude< - GetLibraryItemQuery["libraryItems"], - null | undefined - >["data"][number]["attributes"], +type SortContentProps = + | Exclude< + Exclude< + GetLibraryItemQuery["libraryItems"], null | undefined - >["contents"] - | Exclude< - Exclude< - GetLibraryItemScansQuery["libraryItems"], - null | undefined - >["data"][number]["attributes"], + >["data"][number]["attributes"], + null | undefined + >["contents"] + | Exclude< + Exclude< + GetLibraryItemScansQuery["libraryItems"], null | undefined - >["contents"] -) { - contents?.data.sort((a, b) => { - if ( - a.attributes?.range[0]?.__typename === "ComponentRangePageRange" && - b.attributes?.range[0]?.__typename === "ComponentRangePageRange" - ) { - return ( - a.attributes.range[0].starting_page - - b.attributes.range[0].starting_page - ); - } - return 0; - }); + >["data"][number]["attributes"], + null | undefined + >["contents"]; + +export function sortContent(contents: Immutable) { + if (contents) { + const newContent = { ...contents } as SortContentProps; + newContent?.data.sort((a, b) => { + if ( + a.attributes?.range[0]?.__typename === "ComponentRangePageRange" && + b.attributes?.range[0]?.__typename === "ComponentRangePageRange" + ) { + return ( + a.attributes.range[0].starting_page - + b.attributes.range[0].starting_page + ); + } + return 0; + }); + return newContent as Immutable; + } + return contents; } export function getStatusDescription( diff --git a/src/helpers/types.ts b/src/helpers/types.ts index fb48368..9966ecb 100644 --- a/src/helpers/types.ts +++ b/src/helpers/types.ts @@ -1,9 +1,22 @@ import { GetPostQuery } from "graphql/generated"; +import React from "react"; -export type Post = Exclude< +type Post = Exclude< Exclude< GetPostQuery["posts"], null | undefined >["data"][number]["attributes"], null | undefined >; + +export interface PostWithTranslations extends Omit { + translations: Exclude; +} + +type ImmutableBlackList = JSX.Element | React.ReactNode | Function; + +export type Immutable = { + readonly [K in keyof T]: T[K] extends ImmutableBlackList + ? T[K] + : Immutable; +}; \ No newline at end of file diff --git a/src/hooks/useSmartLanguage.tsx b/src/hooks/useSmartLanguage.tsx index 13af8dd..d1bd3e4 100644 --- a/src/hooks/useSmartLanguage.tsx +++ b/src/hooks/useSmartLanguage.tsx @@ -1,14 +1,15 @@ import LanguageSwitcher from "components/Inputs/LanguageSwitcher"; import { useAppLayout } from "contexts/AppLayoutContext"; import { AppStaticProps } from "graphql/getAppStaticProps"; +import { Immutable } from "helpers/types"; import { useRouter } from "next/router"; import { useEffect, useMemo, useState } from "react"; interface Props { - items: T[]; + items: Immutable; languages: AppStaticProps["languages"]; - languageExtractor: (item: T) => string | undefined; - transform?: (item: T) => T; + languageExtractor: (item: Immutable) => string | undefined; + transform?: (item: Immutable) => Immutable; } function getPreferredLanguage( @@ -25,7 +26,7 @@ function getPreferredLanguage( export default function useSmartLanguage( props: Props -): [T | undefined, () => JSX.Element] { +): [Immutable, () => JSX.Element] { const { items, languageExtractor, @@ -39,7 +40,8 @@ export default function useSmartLanguage( const [selectedTranslationIndex, setSelectedTranslationIndex] = useState< number | undefined >(); - const [selectedTranslation, setSelectedTranslation] = useState(); + const [selectedTranslation, setSelectedTranslation] = + useState>(); useEffect(() => { items.map((elem, index) => { @@ -58,8 +60,9 @@ export default function useSmartLanguage( }, [appLayout.preferredLanguages, availableLocales, router.locale]); useEffect(() => { - if (selectedTranslationIndex !== undefined) + if (selectedTranslationIndex !== undefined) { setSelectedTranslation(transform(items[selectedTranslationIndex])); + } }, [items, selectedTranslationIndex, transform]); return [ diff --git a/src/pages/404.tsx b/src/pages/404.tsx index 9549334..d265505 100644 --- a/src/pages/404.tsx +++ b/src/pages/404.tsx @@ -3,12 +3,13 @@ import ReturnButton, { ReturnButtonType, } from "components/PanelComponents/ReturnButton"; import ContentPanel from "components/Panels/ContentPanel"; -import { GetStaticPropsContext } from "next"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; +import { Immutable } from "helpers/types"; +import { GetStaticPropsContext } from "next"; interface Props extends AppStaticProps {} -export default function FourOhFour(props: Props): JSX.Element { +export default function FourOhFour(props: Immutable): JSX.Element { const { langui } = props; const contentPanel = ( diff --git a/src/pages/500.tsx b/src/pages/500.tsx index 2093c65..eab7707 100644 --- a/src/pages/500.tsx +++ b/src/pages/500.tsx @@ -3,12 +3,13 @@ import ReturnButton, { ReturnButtonType, } from "components/PanelComponents/ReturnButton"; import ContentPanel from "components/Panels/ContentPanel"; -import { GetStaticPropsContext } from "next"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; +import { Immutable } from "helpers/types"; +import { GetStaticPropsContext } from "next"; interface Props extends AppStaticProps {} -export default function FiveHundred(props: Props): JSX.Element { +export default function FiveHundred(props: Immutable): JSX.Element { const { langui } = props; const contentPanel = ( diff --git a/src/pages/about-us/accords-handbook.tsx b/src/pages/about-us/accords-handbook.tsx index 06b1a8c..749359e 100644 --- a/src/pages/about-us/accords-handbook.tsx +++ b/src/pages/about-us/accords-handbook.tsx @@ -1,14 +1,13 @@ import PostPage from "components/PostPage"; -import { getReadySdk } from "graphql/sdk"; -import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; -import { Post } from "helpers/types"; -import { GetStaticPropsContext } from "next"; +import { + getPostStaticProps, + PostStaticProps, +} from "graphql/getPostStaticProps"; +import { Immutable } from "helpers/types"; -interface Props extends AppStaticProps { - post: Post; -} - -export default function AccordsHandbook(props: Props): JSX.Element { +export default function AccordsHandbook( + props: Immutable +): JSX.Element { const { post, langui, languages, currencies } = props; return ( { - const sdk = getReadySdk(); - const slug = "accords-handbook"; - const post = await sdk.getPost({ - slug: slug, - language_code: context.locale ?? "en", - }); - if (!post.posts?.data[0].attributes) return { notFound: true }; - const props: Props = { - ...(await getAppStaticProps(context)), - post: post.posts.data[0].attributes, - }; - return { - props: props, - }; -} +export const getStaticProps = getPostStaticProps("accords-handbook"); diff --git a/src/pages/about-us/contact.tsx b/src/pages/about-us/contact.tsx index 1d1f278..21015ab 100644 --- a/src/pages/about-us/contact.tsx +++ b/src/pages/about-us/contact.tsx @@ -1,19 +1,18 @@ import InsetBox from "components/InsetBox"; import PostPage from "components/PostPage"; -import { randomInt } from "crypto"; -import { getReadySdk } from "graphql/sdk"; -import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; -import { Post } from "helpers/types"; -import { GetStaticPropsContext } from "next"; +import { + getPostStaticProps, + PostStaticProps, +} from "graphql/getPostStaticProps"; +import { randomInt } from "helpers/numbers"; +import { Immutable } from "helpers/types"; import { useRouter } from "next/router"; import { RequestMailProps, ResponseMailProps } from "pages/api/mail"; import { useState } from "react"; -interface Props extends AppStaticProps { - post: Post; -} - -export default function AboutUs(props: Props): JSX.Element { +export default function AboutUs( + props: Immutable +): JSX.Element { const { post, langui, languages, currencies } = props; const router = useRouter(); @@ -182,21 +181,4 @@ export default function AboutUs(props: Props): JSX.Element { ); } -export async function getStaticProps( - context: GetStaticPropsContext -): Promise<{ notFound: boolean } | { props: Props }> { - const sdk = getReadySdk(); - const slug = "contact"; - const post = await sdk.getPost({ - slug: slug, - language_code: context.locale ?? "en", - }); - if (!post.posts?.data[0].attributes) return { notFound: true }; - const props: Props = { - ...(await getAppStaticProps(context)), - post: post.posts.data[0].attributes, - }; - return { - props: props, - }; -} +export const getStaticProps = getPostStaticProps("contact"); diff --git a/src/pages/about-us/index.tsx b/src/pages/about-us/index.tsx index 2a1538b..85c4dec 100644 --- a/src/pages/about-us/index.tsx +++ b/src/pages/about-us/index.tsx @@ -2,12 +2,13 @@ import AppLayout from "components/AppLayout"; import NavOption from "components/PanelComponents/NavOption"; import PanelHeader from "components/PanelComponents/PanelHeader"; import SubPanel from "components/Panels/SubPanel"; -import { GetStaticPropsContext } from "next"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; +import { Immutable } from "helpers/types"; +import { GetStaticPropsContext } from "next"; interface Props extends AppStaticProps {} -export default function AboutUs(props: Props): JSX.Element { +export default function AboutUs(props: Immutable): JSX.Element { const { langui } = props; const subPanel = ( diff --git a/src/pages/about-us/legality.tsx b/src/pages/about-us/legality.tsx index 8149037..828a342 100644 --- a/src/pages/about-us/legality.tsx +++ b/src/pages/about-us/legality.tsx @@ -1,14 +1,10 @@ import PostPage from "components/PostPage"; -import { getReadySdk } from "graphql/sdk"; -import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; -import { Post } from "helpers/types"; -import { GetStaticPropsContext } from "next"; +import { + getPostStaticProps, + PostStaticProps, +} from "graphql/getPostStaticProps"; -interface Props extends AppStaticProps { - post: Post; -} - -export default function SiteInformation(props: Props): JSX.Element { +export default function Legality(props: PostStaticProps): JSX.Element { const { post, langui, languages, currencies } = props; return ( { - const sdk = getReadySdk(); - const slug = "legality"; - const post = await sdk.getPost({ - slug: slug, - language_code: context.locale ?? "en", - }); - if (!post.posts?.data[0].attributes) return { notFound: true }; - const props: Props = { - ...(await getAppStaticProps(context)), - post: post.posts.data[0].attributes, - }; - return { - props: props, - }; -} +export const getStaticProps = getPostStaticProps("legality"); diff --git a/src/pages/about-us/sharing-policy.tsx b/src/pages/about-us/sharing-policy.tsx index f7b3c5c..81c93b7 100644 --- a/src/pages/about-us/sharing-policy.tsx +++ b/src/pages/about-us/sharing-policy.tsx @@ -1,13 +1,10 @@ import PostPage from "components/PostPage"; -import { getReadySdk } from "graphql/sdk"; -import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; -import { Post } from "helpers/types"; -import { GetStaticPropsContext } from "next"; +import { + getPostStaticProps, + PostStaticProps, +} from "graphql/getPostStaticProps"; -interface Props extends AppStaticProps { - post: Post; -} -export default function SharingPolicy(props: Props): JSX.Element { +export default function SharingPolicy(props: PostStaticProps): JSX.Element { const { post, langui, languages, currencies } = props; return ( { - const sdk = getReadySdk(); - const slug = "sharing-policy"; - const post = await sdk.getPost({ - slug: slug, - language_code: context.locale ?? "en", - }); - if (!post.posts?.data[0].attributes) return { notFound: true }; - const props: Props = { - ...(await getAppStaticProps(context)), - post: post.posts.data[0].attributes, - }; - return { - props: props, - }; -} +export const getStaticProps = getPostStaticProps("sharing-policy"); diff --git a/src/pages/archives/index.tsx b/src/pages/archives/index.tsx index dde0f10..bc38935 100644 --- a/src/pages/archives/index.tsx +++ b/src/pages/archives/index.tsx @@ -2,12 +2,13 @@ import AppLayout from "components/AppLayout"; import NavOption from "components/PanelComponents/NavOption"; import PanelHeader from "components/PanelComponents/PanelHeader"; import SubPanel from "components/Panels/SubPanel"; -import { GetStaticPropsContext } from "next"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; +import { Immutable } from "helpers/types"; +import { GetStaticPropsContext } from "next"; interface Props extends AppStaticProps {} -export default function Archives(props: Props): JSX.Element { +export default function Archives(props: Immutable): JSX.Element { const { langui } = props; const subPanel = ( diff --git a/src/pages/chronicles/index.tsx b/src/pages/chronicles/index.tsx index ea6b0c0..0abfd62 100644 --- a/src/pages/chronicles/index.tsx +++ b/src/pages/chronicles/index.tsx @@ -3,10 +3,11 @@ import PanelHeader from "components/PanelComponents/PanelHeader"; import SubPanel from "components/Panels/SubPanel"; import { GetStaticPropsContext } from "next"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; +import { Immutable } from "helpers/types"; interface Props extends AppStaticProps {} -export default function Chronicles(props: Props): JSX.Element { +export default function Chronicles(props: Immutable): JSX.Element { const { langui } = props; const subPanel = ( diff --git a/src/pages/contents/[slug]/index.tsx b/src/pages/contents/[slug]/index.tsx index 9cb42ca..edf8c0f 100644 --- a/src/pages/contents/[slug]/index.tsx +++ b/src/pages/contents/[slug]/index.tsx @@ -13,14 +13,15 @@ import RecorderChip from "components/RecorderChip"; import ThumbnailHeader from "components/ThumbnailHeader"; import ToolTip from "components/ToolTip"; import { GetContentTextQuery } from "graphql/generated"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { getReadySdk } from "graphql/sdk"; import { prettyinlineTitle, prettyLanguage, prettySlug, } from "helpers/formatters"; -import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { getStatusDescription } from "helpers/others"; +import { Immutable } from "helpers/types"; import { useMediaMobile } from "hooks/useMediaQuery"; import useSmartLanguage from "hooks/useSmartLanguage"; import { @@ -40,7 +41,7 @@ interface Props extends AppStaticProps { >["data"][number]["id"]; } -export default function Content(props: Props): JSX.Element { +export default function Content(props: Immutable): JSX.Element { const { langui, content, languages } = props; const isMobile = useMediaMobile(); diff --git a/src/pages/contents/index.tsx b/src/pages/contents/index.tsx index 54df12a..af0043e 100644 --- a/src/pages/contents/index.tsx +++ b/src/pages/contents/index.tsx @@ -9,19 +9,20 @@ import ContentPanel, { import SubPanel from "components/Panels/SubPanel"; import ThumbnailPreview from "components/PreviewCard"; import { GetContentsQuery } from "graphql/generated"; -import { getReadySdk } from "graphql/sdk"; -import { GetStaticPropsContext } from "next"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; +import { getReadySdk } from "graphql/sdk"; +import { prettyinlineTitle, prettySlug } from "helpers/formatters"; +import { Immutable } from "helpers/types"; +import { GetStaticPropsContext } from "next"; import { useEffect, useState } from "react"; -import { prettySlug, prettyinlineTitle } from "helpers/formatters"; interface Props extends AppStaticProps { contents: Exclude["data"]; } -type GroupContentItems = Map; +type GroupContentItems = Map>; -export default function Contents(props: Props): JSX.Element { +export default function Contents(props: Immutable): JSX.Element { const { langui, contents } = props; const [groupingMethod, setGroupingMethod] = useState(-1); @@ -172,7 +173,7 @@ export async function getStaticProps( function getGroups( langui: AppStaticProps["langui"], groupByType: number, - items: Props["contents"] + items: Immutable ): GroupContentItems { switch (groupByType) { case 0: { @@ -209,7 +210,7 @@ function getGroups( } case 1: { - const group: GroupContentItems = new Map(); + const group = new Map(); items.map((item) => { const type = item.attributes?.type?.data?.attributes?.titles?.[0]?.title ?? diff --git a/src/pages/dev/checkup/contents.tsx b/src/pages/dev/checkup/contents.tsx index 392d063..2f577d0 100644 --- a/src/pages/dev/checkup/contents.tsx +++ b/src/pages/dev/checkup/contents.tsx @@ -9,15 +9,16 @@ import { DevGetContentsQuery, Enum_Componentsetstextset_Status, } from "graphql/generated"; -import { getReadySdk } from "graphql/sdk"; -import { GetStaticPropsContext } from "next"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; +import { getReadySdk } from "graphql/sdk"; +import { Immutable } from "helpers/types"; +import { GetStaticPropsContext } from "next"; interface Props extends AppStaticProps { contents: DevGetContentsQuery; } -export default function CheckupContents(props: Props): JSX.Element { +export default function CheckupContents(props: Immutable): JSX.Element { const { contents } = props; const testReport = testingContent(contents); @@ -112,7 +113,7 @@ type ReportLine = { frontendUrl: string; }; -function testingContent(contents: Props["contents"]): Report { +function testingContent(contents: Immutable): Report { const report: Report = { title: "Contents", lines: [], diff --git a/src/pages/dev/checkup/libraryitems.tsx b/src/pages/dev/checkup/libraryitems.tsx index eb4ca2b..f881767 100644 --- a/src/pages/dev/checkup/libraryitems.tsx +++ b/src/pages/dev/checkup/libraryitems.tsx @@ -9,15 +9,18 @@ import { DevGetLibraryItemsQuery, Enum_Componentcollectionscomponentlibraryimages_Status, } from "graphql/generated"; -import { getReadySdk } from "graphql/sdk"; -import { GetStaticPropsContext } from "next"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; +import { getReadySdk } from "graphql/sdk"; +import { Immutable } from "helpers/types"; +import { GetStaticPropsContext } from "next"; interface Props extends AppStaticProps { libraryItems: DevGetLibraryItemsQuery; } -export default function CheckupLibraryItems(props: Props): JSX.Element { +export default function CheckupLibraryItems( + props: Immutable +): JSX.Element { const { libraryItems } = props; const testReport = testingLibraryItem(libraryItems); @@ -113,7 +116,9 @@ type ReportLine = { }; // eslint-disable-next-line @typescript-eslint/no-unused-vars -function testingLibraryItem(libraryItems: Props["libraryItems"]): Report { +function testingLibraryItem( + libraryItems: Immutable +): Report { const report: Report = { title: "Contents", lines: [], diff --git a/src/pages/dev/editor.tsx b/src/pages/dev/editor.tsx index 9faee01..697a575 100644 --- a/src/pages/dev/editor.tsx +++ b/src/pages/dev/editor.tsx @@ -6,14 +6,15 @@ import ContentPanel, { } from "components/Panels/ContentPanel"; import Popup from "components/Popup"; import ToolTip from "components/ToolTip"; -import { GetStaticPropsContext } from "next"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; +import { Immutable } from "helpers/types"; +import { GetStaticPropsContext } from "next"; import { useCallback, useState } from "react"; import TurndownService from "turndown"; interface Props extends AppStaticProps {} -export default function Editor(props: Props): JSX.Element { +export default function Editor(props: Immutable): JSX.Element { const handleInput = useCallback((text: string) => { setMarkdown(text); }, []); diff --git a/src/pages/gallery/index.tsx b/src/pages/gallery/index.tsx index 925448f..ce1ae66 100644 --- a/src/pages/gallery/index.tsx +++ b/src/pages/gallery/index.tsx @@ -1,10 +1,11 @@ import AppLayout from "components/AppLayout"; -import { GetStaticPropsContext } from "next"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; +import { Immutable } from "helpers/types"; +import { GetStaticPropsContext } from "next"; interface Props extends AppStaticProps {} -export default function Gallery(props: Props): JSX.Element { +export default function Gallery(props: Immutable): JSX.Element { const { langui } = props; const contentPanel = ( )} diff --git a/src/pages/chronicles/index.tsx b/src/pages/chronicles/index.tsx index 0abfd62..3f85be0 100644 --- a/src/pages/chronicles/index.tsx +++ b/src/pages/chronicles/index.tsx @@ -1,9 +1,9 @@ import AppLayout from "components/AppLayout"; import PanelHeader from "components/PanelComponents/PanelHeader"; import SubPanel from "components/Panels/SubPanel"; -import { GetStaticPropsContext } from "next"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { Immutable } from "helpers/types"; +import { GetStaticPropsContext } from "next"; interface Props extends AppStaticProps {} diff --git a/src/pages/wiki/chronology.tsx b/src/pages/wiki/chronology.tsx index 9806b2c..fe7fb90 100644 --- a/src/pages/wiki/chronology.tsx +++ b/src/pages/wiki/chronology.tsx @@ -9,9 +9,9 @@ import SubPanel from "components/Panels/SubPanel"; import ChronologyYearComponent from "components/Wiki/Chronology/ChronologyYearComponent"; import { useAppLayout } from "contexts/AppLayoutContext"; import { GetChronologyItemsQuery, GetErasQuery } from "graphql/generated"; +import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { getReadySdk } from "graphql/sdk"; import { prettySlug } from "helpers/formatters"; -import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { GetStaticPropsContext } from "next"; interface Props extends AppStaticProps { -- 2.40.1 From 16891dfad1244fe5bc1f261193245a69b80d5ce4 Mon Sep 17 00:00:00 2001 From: DrMint Date: Fri, 13 May 2022 19:23:34 +0200 Subject: [PATCH 14/30] Fixed a bug, subitems were always showing --- src/pages/library/index.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pages/library/index.tsx b/src/pages/library/index.tsx index 004760a..2e9696b 100644 --- a/src/pages/library/index.tsx +++ b/src/pages/library/index.tsx @@ -369,8 +369,7 @@ function filterItems( showSecondaryItems: boolean, items: Immutable ): Immutable { - const fileredItems = [...items] as Props["items"]; - fileredItems.filter((item) => { + return [...items].filter((item) => { if (!showSubitems && !item.attributes?.root_item) return false; if ( showSubitems && @@ -385,7 +384,6 @@ function filterItems( if (!item.attributes?.primary && !showSecondaryItems) return false; return true; }); - return fileredItems as Immutable; } function sortBy( -- 2.40.1 From a82bc74baad8ecfc10380097e4910288ac0d8c48 Mon Sep 17 00:00:00 2001 From: DrMint Date: Fri, 13 May 2022 19:24:25 +0200 Subject: [PATCH 15/30] Renamed ThumbnailPreview to PreviewCard + removed Next/Image --- src/components/Img.tsx | 17 ++++++----------- src/components/Markdown/Markdawn.tsx | 2 -- src/components/PreviewCard.tsx | 7 +++---- src/components/ThumbnailHeader.tsx | 1 - src/pages/archives/videos/c/[uid].tsx | 4 ++-- src/pages/archives/videos/index.tsx | 4 ++-- src/pages/contents/index.tsx | 4 ++-- src/pages/library/[slug]/index.tsx | 17 +++++------------ src/pages/news/index.tsx | 4 ++-- 9 files changed, 22 insertions(+), 38 deletions(-) diff --git a/src/components/Img.tsx b/src/components/Img.tsx index 5005aa1..3ee57a4 100644 --- a/src/components/Img.tsx +++ b/src/components/Img.tsx @@ -1,16 +1,13 @@ import { UploadImageFragment } from "graphql/generated"; import { getAssetURL, getImgSizesByQuality, ImageQuality } from "helpers/img"; import { Immutable } from "helpers/types"; -import Image, { ImageProps } from "next/image"; +import { ImageProps } from "next/image"; interface Props { className?: string; image?: UploadImageFragment | string; quality?: ImageQuality; alt?: ImageProps["alt"]; - layout?: ImageProps["layout"]; - objectFit?: ImageProps["objectFit"]; - priority?: ImageProps["priority"]; } export default function Img(props: Immutable): JSX.Element { @@ -20,6 +17,7 @@ export default function Img(props: Immutable): JSX.Element { className={props.className} src={props.image} alt={props.alt ?? ""} + loading="lazy" /> ); } else if (props.image?.width && props.image.height) { @@ -29,19 +27,16 @@ export default function Img(props: Immutable): JSX.Element { props.quality ?? ImageQuality.Small ); return ( - {props.alt ); } diff --git a/src/components/Markdown/Markdawn.tsx b/src/components/Markdown/Markdawn.tsx index cf87363..e042c5e 100644 --- a/src/components/Markdown/Markdawn.tsx +++ b/src/components/Markdown/Markdawn.tsx @@ -270,8 +270,6 @@ export default function Markdawn(props: Immutable): JSX.Element { ? getAssetURL(compProps.src, ImageQuality.Small) : compProps.src } - layout="fill" - objectFit="contain" quality={ImageQuality.Medium} >
diff --git a/src/components/PreviewCard.tsx b/src/components/PreviewCard.tsx index ae723e0..45a02e3 100644 --- a/src/components/PreviewCard.tsx +++ b/src/components/PreviewCard.tsx @@ -44,7 +44,7 @@ interface Props { | { __typename: "anotherHoverlayName" }; } -export default function ThumbnailPreview(props: Immutable): JSX.Element { +export default function PreviewCard(props: Immutable): JSX.Element { const { href, thumbnail, @@ -160,9 +160,8 @@ export default function ThumbnailPreview(props: Immutable): JSX.Element { )}
diff --git a/src/components/ThumbnailHeader.tsx b/src/components/ThumbnailHeader.tsx index 61db87a..e6593e6 100644 --- a/src/components/ThumbnailHeader.tsx +++ b/src/components/ThumbnailHeader.tsx @@ -54,7 +54,6 @@ export default function ThumbnailHeader(props: Immutable): JSX.Element { className=" rounded-xl" image={thumbnail} quality={ImageQuality.Medium} - priority /> ) : (
diff --git a/src/pages/archives/videos/c/[uid].tsx b/src/pages/archives/videos/c/[uid].tsx index a37afea..02ed0e8 100644 --- a/src/pages/archives/videos/c/[uid].tsx +++ b/src/pages/archives/videos/c/[uid].tsx @@ -8,7 +8,7 @@ import ContentPanel, { ContentPanelWidthSizes, } from "components/Panels/ContentPanel"; import SubPanel from "components/Panels/SubPanel"; -import ThumbnailPreview from "components/PreviewCard"; +import PreviewCard from "components/PreviewCard"; import { GetVideoChannelQuery } from "graphql/generated"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { getReadySdk } from "graphql/sdk"; @@ -68,7 +68,7 @@ export default function Channel(props: Props): JSX.Element { {channel?.videos?.data.map((video) => ( <> {video.attributes && ( - ( <> {video.attributes && ( - ): JSX.Element { {items.map((item) => ( <> {item.attributes && ( - ): JSX.Element { ) : (
@@ -270,15 +268,10 @@ export default function LibrarySlug(props: Immutable): JSX.Element { } }} > -
)} @@ -445,7 +438,7 @@ export default function LibrarySlug(props: Immutable): JSX.Element { {item.subitems.data.map((subitem) => ( <> {subitem.attributes && ( - ): JSX.Element { {posts.map((post) => ( <> {post.attributes && ( - Date: Fri, 13 May 2022 21:06:46 +0200 Subject: [PATCH 16/30] Improved layout on mobile and avoid overflow --- src/components/Panels/ContentPanel.tsx | 2 +- src/components/PreviewCard.tsx | 6 +++--- src/pages/contents/index.tsx | 2 +- src/pages/library/index.tsx | 2 +- tailwind.config.js | 8 ++++++++ 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/components/Panels/ContentPanel.tsx b/src/components/Panels/ContentPanel.tsx index da23a00..2f6beb5 100644 --- a/src/components/Panels/ContentPanel.tsx +++ b/src/components/Panels/ContentPanel.tsx @@ -17,7 +17,7 @@ export default function ContentPanel(props: Immutable): JSX.Element { width === ContentPanelWidthSizes.default ? "max-w-2xl" : "w-full"; return ( -
+
): JSX.Element {
)}
- {pre_title &&

{pre_title}

} + {pre_title &&

{pre_title}

} {title && ( -

{title}

+

{title}

)} - {subtitle &&

{subtitle}

} + {subtitle &&

{subtitle}

}
{description &&

{description}

} {bottomChips && bottomChips.length > 0 && ( diff --git a/src/pages/contents/index.tsx b/src/pages/contents/index.tsx index 301421a..7693689 100644 --- a/src/pages/contents/index.tsx +++ b/src/pages/contents/index.tsx @@ -83,7 +83,7 @@ export default function Contents(props: Immutable): JSX.Element { )}
{items.map((item) => ( diff --git a/src/pages/library/index.tsx b/src/pages/library/index.tsx index 2e9696b..ec9f9f4 100644 --- a/src/pages/library/index.tsx +++ b/src/pages/library/index.tsx @@ -156,7 +156,7 @@ export default function Library(props: Immutable): JSX.Element { )}
diff --git a/tailwind.config.js b/tailwind.config.js index 5beab85..03baaca 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -159,5 +159,13 @@ module.exports = { }, }); }), + + plugin(function ({ addUtilities }) { + addUtilities({ + ".break-words": { + "word-break": "break-word", + }, + }); + }), ], }; -- 2.40.1 From f51f7322fe05d2f3c4b9fa79e9365ca8a697f8cc Mon Sep 17 00:00:00 2001 From: DrMint Date: Fri, 13 May 2022 21:15:34 +0200 Subject: [PATCH 17/30] Increased size of config button --- src/components/Panels/MainPanel.tsx | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/components/Panels/MainPanel.tsx b/src/components/Panels/MainPanel.tsx index f3ccc1d..cdfd2ac 100644 --- a/src/components/Panels/MainPanel.tsx +++ b/src/components/Panels/MainPanel.tsx @@ -72,22 +72,11 @@ export default function MainPanel(props: Immutable): JSX.Element { disabled={!appLayout.mainPanelReduced} > -- 2.40.1 From 067f66b1461124ca4a098db10c8149aaf8c4482e Mon Sep 17 00:00:00 2001 From: DrMint Date: Sat, 14 May 2022 14:18:06 +0200 Subject: [PATCH 18/30] Added onClick to Img component --- src/components/Img.tsx | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/components/Img.tsx b/src/components/Img.tsx index 3ee57a4..ac73aff 100644 --- a/src/components/Img.tsx +++ b/src/components/Img.tsx @@ -2,41 +2,40 @@ import { UploadImageFragment } from "graphql/generated"; import { getAssetURL, getImgSizesByQuality, ImageQuality } from "helpers/img"; import { Immutable } from "helpers/types"; import { ImageProps } from "next/image"; +import { MouseEventHandler } from "react"; interface Props { className?: string; image?: UploadImageFragment | string; quality?: ImageQuality; alt?: ImageProps["alt"]; + onClick?: MouseEventHandler; } export default function Img(props: Immutable): JSX.Element { - if (typeof props.image === "string") { + const { + className, + image, + quality = ImageQuality.Small, + alt, + onClick, + } = props; + + if (typeof image === "string") { + return ( + {alt + ); + } else if (image?.width && image.height) { + const imgSize = getImgSizesByQuality(image.width, image.height, quality); return ( {props.alt - ); - } else if (props.image?.width && props.image.height) { - const imgSize = getImgSizesByQuality( - props.image.width, - props.image.height, - props.quality ?? ImageQuality.Small - ); - return ( - {props.alt ); } -- 2.40.1 From fc0512fc918116b86cab0730a2cb42151b6ca00f Mon Sep 17 00:00:00 2001 From: DrMint Date: Sat, 14 May 2022 14:21:00 +0200 Subject: [PATCH 19/30] Made useSmartLanguage not default export and created useLightBox --- src/components/Library/ScanSet.tsx | 24 +++++---------------- src/components/Library/ScanSetCover.tsx | 20 ++++-------------- src/components/Markdown/Markdawn.tsx | 20 +++++------------- src/components/PostPage.tsx | 2 +- src/components/ThumbnailHeader.tsx | 11 ++++++++-- src/hooks/useLightBox.tsx | 28 +++++++++++++++++++++++++ src/hooks/useSmartLanguage.tsx | 2 +- src/pages/contents/[slug]/index.tsx | 2 +- src/pages/library/[slug]/index.tsx | 23 +++++--------------- src/pages/library/[slug]/scans.tsx | 23 +++++--------------- 10 files changed, 64 insertions(+), 91 deletions(-) create mode 100644 src/hooks/useLightBox.tsx diff --git a/src/components/Library/ScanSet.tsx b/src/components/Library/ScanSet.tsx index e2e14d5..7f0c555 100644 --- a/src/components/Library/ScanSet.tsx +++ b/src/components/Library/ScanSet.tsx @@ -9,13 +9,10 @@ import { getAssetFilename, getAssetURL, ImageQuality } from "helpers/img"; import { isInteger } from "helpers/numbers"; import { getStatusDescription } from "helpers/others"; import { Immutable } from "helpers/types"; -import useSmartLanguage from "hooks/useSmartLanguage"; -import { Dispatch, SetStateAction } from "react"; +import { useSmartLanguage } from "hooks/useSmartLanguage"; interface Props { - setLightboxOpen: Dispatch>; - setLightboxImages: Dispatch>; - setLightboxIndex: Dispatch>; + openLightBox: (images: string[], index?: number) => void; scanSet: Exclude< Exclude< Exclude< @@ -52,17 +49,8 @@ interface Props { } export default function ScanSet(props: Immutable): JSX.Element { - const { - setLightboxOpen, - setLightboxImages, - setLightboxIndex, - scanSet, - slug, - title, - languages, - langui, - content, - } = props; + const { openLightBox, scanSet, slug, title, languages, langui, content } = + props; const [selectedScan, LanguageSwitcher] = useSmartLanguage({ items: scanSet, @@ -219,9 +207,7 @@ export default function ScanSet(props: Immutable): JSX.Element { getAssetURL(image.attributes.url, ImageQuality.Large) ); }); - setLightboxOpen(true); - setLightboxImages(images); - setLightboxIndex(index); + openLightBox(images, index); }} > {page.attributes && ( diff --git a/src/components/Library/ScanSetCover.tsx b/src/components/Library/ScanSetCover.tsx index c75f0fa..e66e3a4 100644 --- a/src/components/Library/ScanSetCover.tsx +++ b/src/components/Library/ScanSetCover.tsx @@ -10,13 +10,10 @@ import { AppStaticProps } from "graphql/getAppStaticProps"; import { getAssetURL, ImageQuality } from "helpers/img"; import { getStatusDescription } from "helpers/others"; import { Immutable } from "helpers/types"; -import useSmartLanguage from "hooks/useSmartLanguage"; -import { Dispatch, SetStateAction } from "react"; +import { useSmartLanguage } from "hooks/useSmartLanguage"; interface Props { - setLightboxOpen: Dispatch>; - setLightboxImages: Dispatch>; - setLightboxIndex: Dispatch>; + openLightBox: (images: string[], index?: number) => void; images: Exclude< Exclude< Exclude< @@ -32,14 +29,7 @@ interface Props { } export default function ScanSetCover(props: Immutable): JSX.Element { - const { - setLightboxOpen, - setLightboxImages, - setLightboxIndex, - images, - languages, - langui, - } = props; + const { openLightBox, images, languages, langui } = props; const [selectedScan, LanguageSwitcher] = useSmartLanguage({ items: images, @@ -170,9 +160,7 @@ export default function ScanSetCover(props: Immutable): JSX.Element { if (img.url) imgs.push(getAssetURL(img.url, ImageQuality.Large)); }); - setLightboxOpen(true); - setLightboxImages(imgs); - setLightboxIndex(index); + openLightBox(imgs, index); }} > diff --git a/src/components/Markdown/Markdawn.tsx b/src/components/Markdown/Markdawn.tsx index e042c5e..dd0f8d1 100644 --- a/src/components/Markdown/Markdawn.tsx +++ b/src/components/Markdown/Markdawn.tsx @@ -1,15 +1,15 @@ import HorizontalLine from "components/HorizontalLine"; import Img from "components/Img"; import InsetBox from "components/InsetBox"; -import LightBox from "components/LightBox"; import ToolTip from "components/ToolTip"; import { useAppLayout } from "contexts/AppLayoutContext"; import { slugify } from "helpers/formatters"; import { getAssetURL, ImageQuality } from "helpers/img"; import { Immutable } from "helpers/types"; +import { useLightBox } from "hooks/useLightBox"; import Markdown from "markdown-to-jsx"; import { useRouter } from "next/router"; -import React, { useState } from "react"; +import React from "react"; import ReactDOMServer from "react-dom/server"; interface Props { @@ -23,20 +23,12 @@ export default function Markdawn(props: Immutable): JSX.Element { const router = useRouter(); - const [lightboxOpen, setLightboxOpen] = useState(false); - const [lightboxImages, setLightboxImages] = useState([""]); - const [lightboxIndex, setLightboxIndex] = useState(0); + const [openLightBox, LightBox] = useLightBox(); if (text) { return ( <> - + ): JSX.Element {
{ - setLightboxOpen(true); - setLightboxImages([ + openLightBox([ compProps.src.startsWith("/uploads/") ? getAssetURL(compProps.src, ImageQuality.Large) : compProps.src, ]); - setLightboxIndex(0); }} > ): JSX.Element { languageSwitcher, } = props; + const [openLightBox, LightBox] = useLightBox(); + return ( <> +
{thumbnail ? ( { + openLightBox([getAssetURL(thumbnail.url, ImageQuality.Large)]); + }} /> ) : (
diff --git a/src/hooks/useLightBox.tsx b/src/hooks/useLightBox.tsx new file mode 100644 index 0000000..4bf9303 --- /dev/null +++ b/src/hooks/useLightBox.tsx @@ -0,0 +1,28 @@ +import LightBox from "components/LightBox"; +import { useState } from "react"; + +export function useLightBox(): [ + (images: string[], index?: number) => void, + () => JSX.Element +] { + const [lightboxOpen, setLightboxOpen] = useState(false); + const [lightboxImages, setLightboxImages] = useState([""]); + const [lightboxIndex, setLightboxIndex] = useState(0); + + return [ + (images: string[], index = 0) => { + setLightboxOpen(true); + setLightboxImages(images); + setLightboxIndex(index); + }, + () => ( + + ), + ]; +} diff --git a/src/hooks/useSmartLanguage.tsx b/src/hooks/useSmartLanguage.tsx index d1bd3e4..735a435 100644 --- a/src/hooks/useSmartLanguage.tsx +++ b/src/hooks/useSmartLanguage.tsx @@ -24,7 +24,7 @@ function getPreferredLanguage( return undefined; } -export default function useSmartLanguage( +export function useSmartLanguage( props: Props ): [Immutable, () => JSX.Element] { const { diff --git a/src/pages/contents/[slug]/index.tsx b/src/pages/contents/[slug]/index.tsx index edf8c0f..564fc23 100644 --- a/src/pages/contents/[slug]/index.tsx +++ b/src/pages/contents/[slug]/index.tsx @@ -23,7 +23,7 @@ import { import { getStatusDescription } from "helpers/others"; import { Immutable } from "helpers/types"; import { useMediaMobile } from "hooks/useMediaQuery"; -import useSmartLanguage from "hooks/useSmartLanguage"; +import { useSmartLanguage } from "hooks/useSmartLanguage"; import { GetStaticPathsContext, GetStaticPathsResult, diff --git a/src/pages/library/[slug]/index.tsx b/src/pages/library/[slug]/index.tsx index 9e17ecc..eb50c12 100644 --- a/src/pages/library/[slug]/index.tsx +++ b/src/pages/library/[slug]/index.tsx @@ -5,7 +5,6 @@ import Button from "components/Inputs/Button"; import Switch from "components/Inputs/Switch"; import InsetBox from "components/InsetBox"; import ContentLine from "components/Library/ContentLine"; -import LightBox from "components/LightBox"; import NavOption from "components/PanelComponents/NavOption"; import ReturnButton, { ReturnButtonType, @@ -35,6 +34,7 @@ import { getAssetURL, ImageQuality } from "helpers/img"; import { convertMmToInch } from "helpers/numbers"; import { sortContent } from "helpers/others"; import { Immutable } from "helpers/types"; +import { useLightBox } from "hooks/useLightBox"; import { GetStaticPathsContext, GetStaticPathsResult, @@ -63,10 +63,7 @@ export default function LibrarySlug(props: Immutable): JSX.Element { sortContent(item?.contents); - const [lightboxOpen, setLightboxOpen] = useState(false); - const [lightboxImages, setLightboxImages] = useState([""]); - const [lightboxIndex, setLightboxIndex] = useState(0); - + const [openLightBox, LightBox] = useLightBox(); const [keepInfoVisible, setKeepInfoVisible] = useState(false); let displayOpenScans = false; @@ -136,13 +133,7 @@ export default function LibrarySlug(props: Immutable): JSX.Element { const contentPanel = ( - + ): JSX.Element { mobile:h-[60vh] desktop:mb-16 relative cursor-pointer" onClick={() => { if (item?.thumbnail?.data?.attributes) { - setLightboxOpen(true); - setLightboxImages([ + openLightBox([ getAssetURL( item.thumbnail.data.attributes.url, ImageQuality.Large ), ]); - setLightboxIndex(0); } }} > @@ -262,9 +251,7 @@ export default function LibrarySlug(props: Immutable): JSX.Element { ) ); }); - setLightboxOpen(true); - setLightboxImages(images); - setLightboxIndex(index); + openLightBox(images, index); } }} > diff --git a/src/pages/library/[slug]/scans.tsx b/src/pages/library/[slug]/scans.tsx index 6ae8277..91e9704 100644 --- a/src/pages/library/[slug]/scans.tsx +++ b/src/pages/library/[slug]/scans.tsx @@ -1,7 +1,6 @@ import AppLayout from "components/AppLayout"; import ScanSet from "components/Library/ScanSet"; import ScanSetCover from "components/Library/ScanSetCover"; -import LightBox from "components/LightBox"; import NavOption from "components/PanelComponents/NavOption"; import ReturnButton, { ReturnButtonType, @@ -17,12 +16,12 @@ import { getReadySdk } from "graphql/sdk"; import { prettyinlineTitle, prettySlug } from "helpers/formatters"; import { sortContent } from "helpers/others"; import { Immutable } from "helpers/types"; +import { useLightBox } from "hooks/useLightBox"; import { GetStaticPathsContext, GetStaticPathsResult, GetStaticPropsContext, } from "next"; -import { useState } from "react"; interface Props extends AppStaticProps { item: Exclude< @@ -41,9 +40,7 @@ export default function LibrarySlug(props: Immutable): JSX.Element { sortContent(item?.contents); - const [lightboxOpen, setLightboxOpen] = useState(false); - const [lightboxImages, setLightboxImages] = useState([""]); - const [lightboxIndex, setLightboxIndex] = useState(0); + const [openLightBox, LightBox] = useLightBox(); const subPanel = ( @@ -77,13 +74,7 @@ export default function LibrarySlug(props: Immutable): JSX.Element { const contentPanel = ( - + ): JSX.Element { {item?.images && ( @@ -110,9 +99,7 @@ export default function LibrarySlug(props: Immutable): JSX.Element { Date: Sat, 14 May 2022 14:21:13 +0200 Subject: [PATCH 20/30] Allowed to combine contents --- src/components/PreviewCard.tsx | 30 ++++++++++++++-- src/graphql/operations/getContents.graphql | 12 ++++++- src/pages/contents/index.tsx | 41 ++++++++++++++++++++-- 3 files changed, 76 insertions(+), 7 deletions(-) diff --git a/src/components/PreviewCard.tsx b/src/components/PreviewCard.tsx index b0603e3..b890785 100644 --- a/src/components/PreviewCard.tsx +++ b/src/components/PreviewCard.tsx @@ -28,6 +28,7 @@ interface Props { topChips?: string[]; bottomChips?: string[]; keepInfoVisible?: boolean; + stackEffect?: boolean; metadata?: { currencies?: AppStaticProps["currencies"]; release_date?: DatePickerFragment | null; @@ -52,6 +53,7 @@ export default function PreviewCard(props: Immutable): JSX.Element { title, subtitle, description, + stackEffect = false, topChips, bottomChips, keepInfoVisible, @@ -112,8 +114,26 @@ export default function PreviewCard(props: Immutable): JSX.Element { className="drop-shadow-shade-xl cursor-pointer grid items-end fine:[--cover-opacity:0] hover:[--cover-opacity:1] hover:scale-[1.02] [--bg-opacity:0] hover:[--bg-opacity:0.5] [--play-opacity:0] - hover:[--play-opacity:100] transition-transform" + hover:[--play-opacity:100] transition-transform + [--stacked-top:0] hover:[--stacked-top:1]" > + {thumbnail && stackEffect && ( + <> + + + + )} + {thumbnail ? (
): JSX.Element {
)}
- {pre_title &&

{pre_title}

} + {pre_title && ( +

{pre_title}

+ )} {title && ( -

{title}

+

+ {title} +

)} {subtitle &&

{subtitle}

}
diff --git a/src/graphql/operations/getContents.graphql b/src/graphql/operations/getContents.graphql index 3801b8c..4815202 100644 --- a/src/graphql/operations/getContents.graphql +++ b/src/graphql/operations/getContents.graphql @@ -4,7 +4,7 @@ query getContents($language_code: String) { id attributes { slug - titles(filters: { language: { code: { eq: $language_code } } }) { + titles { pre_title title subtitle @@ -55,6 +55,16 @@ query getContents($language_code: String) { } } } + next_recommended { + data { + id + } + } + previous_recommended { + data { + id + } + } text_set { id } diff --git a/src/pages/contents/index.tsx b/src/pages/contents/index.tsx index 7693689..ce1cb13 100644 --- a/src/pages/contents/index.tsx +++ b/src/pages/contents/index.tsx @@ -28,13 +28,23 @@ export default function Contents(props: Immutable): JSX.Element { const [groupingMethod, setGroupingMethod] = useState(-1); const [keepInfoVisible, setKeepInfoVisible] = useState(false); + const [combineRelatedContent, setCombineRelatedContent] = useState(true); + + const [filteredItems, setFilteredItems] = useState( + filterContents(combineRelatedContent, contents) + ); + const [groups, setGroups] = useState( - getGroups(langui, groupingMethod, contents) + getGroups(langui, groupingMethod, filteredItems) ); useEffect(() => { - setGroups(getGroups(langui, groupingMethod, contents)); - }, [langui, groupingMethod, contents]); + setFilteredItems(filterContents(combineRelatedContent, contents)); + }, [combineRelatedContent, contents]); + + useEffect(() => { + setGroups(getGroups(langui, groupingMethod, filteredItems)); + }, [langui, groupingMethod, filteredItems]); const subPanel = ( @@ -55,6 +65,14 @@ export default function Contents(props: Immutable): JSX.Element { />
+
+

{"Combine related contents"}:

+ +
+

{"Always show info"}:

@@ -100,6 +118,11 @@ export default function Contents(props: Immutable): JSX.Element { subtitle={item.attributes.titles?.[0]?.subtitle} thumbnail={item.attributes.thumbnail?.data?.attributes} thumbnailAspectRatio="3/2" + stackEffect={ + item.attributes.next_recommended?.data?.id !== null && + item.attributes.next_recommended?.data?.id !== undefined && + combineRelatedContent + } topChips={ item.attributes.type?.data?.attributes ? [ @@ -231,3 +254,15 @@ function getGroups( } } } + +function filterContents( + combineRelatedContent: boolean, + contents: Immutable +): Immutable { + if (combineRelatedContent) { + return [...contents].filter( + (content) => !content.attributes?.previous_recommended?.data?.id + ); + } + return contents; +} -- 2.40.1 From 5c7689c3f0d95fe2a34290b6d765996333b98f38 Mon Sep 17 00:00:00 2001 From: DrMint Date: Sat, 14 May 2022 14:45:29 +0200 Subject: [PATCH 21/30] Removed the default in the exports whenever possible --- src/components/AppLayout.tsx | 12 ++++----- src/components/Chip.tsx | 2 +- src/components/HorizontalLine.tsx | 2 +- src/components/Img.tsx | 2 +- src/components/Inputs/Button.tsx | 2 +- src/components/Inputs/LanguageSwitcher.tsx | 6 ++--- src/components/Inputs/OrderableList.tsx | 2 +- src/components/Inputs/PageSelector.tsx | 4 +-- src/components/Inputs/Select.tsx | 2 +- src/components/Inputs/Switch.tsx | 2 +- src/components/InsetBox.tsx | 2 +- src/components/Library/ContentLine.tsx | 6 ++--- src/components/Library/ScanSet.tsx | 12 ++++----- src/components/Library/ScanSetCover.tsx | 10 +++---- src/components/LightBox.tsx | 8 +++--- src/components/Markdown/Markdawn.tsx | 10 +++---- src/components/Markdown/TOC.tsx | 12 ++++----- src/components/PanelComponents/NavOption.tsx | 4 +-- .../PanelComponents/PanelHeader.tsx | 4 +-- .../PanelComponents/ReturnButton.tsx | 6 ++--- src/components/Panels/ContentPanel.tsx | 2 +- src/components/Panels/MainPanel.tsx | 10 +++---- src/components/Panels/SubPanel.tsx | 2 +- src/components/Popup.tsx | 2 +- src/components/PostPage.tsx | 24 ++++++++--------- src/components/PreviewCard.tsx | 6 ++--- src/components/PreviewLine.tsx | 6 ++--- src/components/RecorderChip.tsx | 10 +++---- src/components/SVG.tsx | 2 +- src/components/ThumbnailHeader.tsx | 10 +++---- src/components/ToolTip.tsx | 2 +- .../Chronology/ChronologyItemComponent.tsx | 8 +++--- .../Chronology/ChronologyYearComponent.tsx | 6 ++--- src/contexts/AppLayoutContext.tsx | 4 +-- src/hooks/useDarkMode.ts | 4 +-- src/hooks/useLightBox.tsx | 2 +- src/hooks/useMediaQuery.ts | 2 +- src/hooks/useSmartLanguage.tsx | 2 +- src/hooks/useStateWithLocalStorage.ts | 2 +- src/pages/404.tsx | 7 ++--- src/pages/500.tsx | 7 ++--- src/pages/_document.tsx | 4 +-- src/pages/about-us/accords-handbook.tsx | 2 +- src/pages/about-us/contact.tsx | 8 +++--- src/pages/about-us/index.tsx | 8 +++--- src/pages/about-us/legality.tsx | 2 +- src/pages/about-us/sharing-policy.tsx | 2 +- src/pages/api/mail.ts | 2 +- src/pages/api/revalidate.ts | 2 +- src/pages/archives/index.tsx | 8 +++--- src/pages/archives/videos/c/[uid].tsx | 16 +++++++----- src/pages/archives/videos/index.tsx | 18 +++++++------ src/pages/archives/videos/v/[uid].tsx | 18 +++++++------ src/pages/chronicles/index.tsx | 6 ++--- src/pages/contents/[slug]/index.tsx | 25 +++++++++--------- src/pages/contents/index.tsx | 20 +++++++------- src/pages/dev/checkup/contents.tsx | 14 +++++----- src/pages/dev/checkup/libraryitems.tsx | 15 +++++------ src/pages/dev/editor.tsx | 13 +++++----- src/pages/gallery/index.tsx | 2 +- src/pages/index.tsx | 2 +- src/pages/library/[slug]/index.tsx | 26 ++++++++++--------- src/pages/library/[slug]/scans.tsx | 16 +++++++----- src/pages/library/index.tsx | 19 +++++++------- src/pages/merch/index.tsx | 6 ++--- src/pages/news/[slug].tsx | 2 +- src/pages/news/index.tsx | 13 +++++----- src/pages/wiki/chronology.tsx | 15 ++++++----- src/pages/wiki/index.tsx | 8 +++--- 69 files changed, 267 insertions(+), 255 deletions(-) diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index 4bd7ffd..0bf9264 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -1,4 +1,4 @@ -import Button from "components/Inputs/Button"; +import { Button } from "components/Inputs/Button"; import { useAppLayout } from "contexts/AppLayoutContext"; import { UploadImageFragment } from "graphql/generated"; import { AppStaticProps } from "graphql/getAppStaticProps"; @@ -10,10 +10,10 @@ import Head from "next/head"; import { useRouter } from "next/router"; import { useEffect, useState } from "react"; import { useSwipeable } from "react-swipeable"; -import OrderableList from "./Inputs/OrderableList"; -import Select from "./Inputs/Select"; -import MainPanel from "./Panels/MainPanel"; -import Popup from "./Popup"; +import { OrderableList } from "./Inputs/OrderableList"; +import { Select } from "./Inputs/Select"; +import { MainPanel } from "./Panels/MainPanel"; +import { Popup } from "./Popup"; interface Props extends AppStaticProps { subPanel?: React.ReactNode; @@ -25,7 +25,7 @@ interface Props extends AppStaticProps { description?: string; } -export default function AppLayout(props: Immutable): JSX.Element { +export function AppLayout(props: Immutable): JSX.Element { const { langui, currencies, diff --git a/src/components/Chip.tsx b/src/components/Chip.tsx index b00f5c6..33dbe51 100644 --- a/src/components/Chip.tsx +++ b/src/components/Chip.tsx @@ -5,7 +5,7 @@ interface Props { children: React.ReactNode; } -export default function Chip(props: Immutable): JSX.Element { +export function Chip(props: Immutable): JSX.Element { return (
): JSX.Element { +export function HorizontalLine(props: Immutable): JSX.Element { return (
; } -export default function Img(props: Immutable): JSX.Element { +export function Img(props: Immutable): JSX.Element { const { className, image, diff --git a/src/components/Inputs/Button.tsx b/src/components/Inputs/Button.tsx index 5e8b11f..9a18772 100644 --- a/src/components/Inputs/Button.tsx +++ b/src/components/Inputs/Button.tsx @@ -15,7 +15,7 @@ interface Props { badgeNumber?: number; } -export default function Button(props: Immutable): JSX.Element { +export function Button(props: Immutable): JSX.Element { const { draggable, id, diff --git a/src/components/Inputs/LanguageSwitcher.tsx b/src/components/Inputs/LanguageSwitcher.tsx index 4127b09..307215c 100644 --- a/src/components/Inputs/LanguageSwitcher.tsx +++ b/src/components/Inputs/LanguageSwitcher.tsx @@ -2,8 +2,8 @@ import { AppStaticProps } from "graphql/getAppStaticProps"; import { prettyLanguage } from "helpers/formatters"; import { Immutable } from "helpers/types"; import { Dispatch, SetStateAction } from "react"; -import ToolTip from "../ToolTip"; -import Button from "./Button"; +import { ToolTip } from "../ToolTip"; +import { Button } from "./Button"; interface Props { className?: string; @@ -13,7 +13,7 @@ interface Props { setLocalesIndex: Dispatch>; } -export default function LanguageSwitcher(props: Immutable): JSX.Element { +export function LanguageSwitcher(props: Immutable): JSX.Element { const { locales, className, localesIndex, setLocalesIndex } = props; return ( diff --git a/src/components/Inputs/OrderableList.tsx b/src/components/Inputs/OrderableList.tsx index b02dbe9..9292f77 100644 --- a/src/components/Inputs/OrderableList.tsx +++ b/src/components/Inputs/OrderableList.tsx @@ -8,7 +8,7 @@ interface Props { onChange?: (items: Map) => void; } -export default function OrderableList(props: Immutable): JSX.Element { +export function OrderableList(props: Immutable): JSX.Element { const [items, setItems] = useState>(props.items); useEffect(() => { diff --git a/src/components/Inputs/PageSelector.tsx b/src/components/Inputs/PageSelector.tsx index 4b3c914..fe376bd 100644 --- a/src/components/Inputs/PageSelector.tsx +++ b/src/components/Inputs/PageSelector.tsx @@ -1,6 +1,6 @@ import { Immutable } from "helpers/types"; import { Dispatch, SetStateAction } from "react"; -import Button from "./Button"; +import { Button } from "./Button"; interface Props { className?: string; @@ -9,7 +9,7 @@ interface Props { setPage: Dispatch>; } -export default function PageSelector(props: Immutable): JSX.Element { +export function PageSelector(props: Immutable): JSX.Element { const { page, setPage, maxPage } = props; return ( diff --git a/src/components/Inputs/Select.tsx b/src/components/Inputs/Select.tsx index c8b936a..fd379cc 100644 --- a/src/components/Inputs/Select.tsx +++ b/src/components/Inputs/Select.tsx @@ -10,7 +10,7 @@ interface Props { className?: string; } -export default function Select(props: Immutable): JSX.Element { +export function Select(props: Immutable): JSX.Element { const [opened, setOpened] = useState(false); return ( diff --git a/src/components/Inputs/Switch.tsx b/src/components/Inputs/Switch.tsx index 49ef258..be1d2c7 100644 --- a/src/components/Inputs/Switch.tsx +++ b/src/components/Inputs/Switch.tsx @@ -7,7 +7,7 @@ interface Props { className?: string; } -export default function Switch(props: Immutable): JSX.Element { +export function Switch(props: Immutable): JSX.Element { return (
): JSX.Element { +export function InsetBox(props: Immutable): JSX.Element { return (
): JSX.Element { +export function ContentLine(props: Immutable): JSX.Element { const { content, langui, parentSlug } = props; const [opened, setOpened] = useState(false); diff --git a/src/components/Library/ScanSet.tsx b/src/components/Library/ScanSet.tsx index 7f0c555..772a805 100644 --- a/src/components/Library/ScanSet.tsx +++ b/src/components/Library/ScanSet.tsx @@ -1,8 +1,8 @@ -import Chip from "components/Chip"; -import Img from "components/Img"; -import Button from "components/Inputs/Button"; -import RecorderChip from "components/RecorderChip"; -import ToolTip from "components/ToolTip"; +import { Chip } from "components/Chip"; +import { Img } from "components/Img"; +import { Button } from "components/Inputs/Button"; +import { RecorderChip } from "components/RecorderChip"; +import { ToolTip } from "components/ToolTip"; import { GetLibraryItemScansQuery } from "graphql/generated"; import { AppStaticProps } from "graphql/getAppStaticProps"; import { getAssetFilename, getAssetURL, ImageQuality } from "helpers/img"; @@ -48,7 +48,7 @@ interface Props { >["content"]; } -export default function ScanSet(props: Immutable): JSX.Element { +export function ScanSet(props: Immutable): JSX.Element { const { openLightBox, scanSet, slug, title, languages, langui, content } = props; diff --git a/src/components/Library/ScanSetCover.tsx b/src/components/Library/ScanSetCover.tsx index e66e3a4..907b73a 100644 --- a/src/components/Library/ScanSetCover.tsx +++ b/src/components/Library/ScanSetCover.tsx @@ -1,7 +1,7 @@ -import Chip from "components/Chip"; -import Img from "components/Img"; -import RecorderChip from "components/RecorderChip"; -import ToolTip from "components/ToolTip"; +import { Chip } from "components/Chip"; +import { Img } from "components/Img"; +import { RecorderChip } from "components/RecorderChip"; +import { ToolTip } from "components/ToolTip"; import { GetLibraryItemScansQuery, UploadImageFragment, @@ -28,7 +28,7 @@ interface Props { langui: AppStaticProps["langui"]; } -export default function ScanSetCover(props: Immutable): JSX.Element { +export function ScanSetCover(props: Immutable): JSX.Element { const { openLightBox, images, languages, langui } = props; const [selectedScan, LanguageSwitcher] = useSmartLanguage({ diff --git a/src/components/LightBox.tsx b/src/components/LightBox.tsx index ccaad88..cb47c6f 100644 --- a/src/components/LightBox.tsx +++ b/src/components/LightBox.tsx @@ -2,9 +2,9 @@ import { Immutable } from "helpers/types"; import { Dispatch, SetStateAction } from "react"; import Hotkeys from "react-hot-keys"; import { useSwipeable } from "react-swipeable"; -import Img from "./Img"; -import Button from "./Inputs/Button"; -import Popup from "./Popup"; +import { Img } from "./Img"; +import { Button } from "./Inputs/Button"; +import { Popup } from "./Popup"; interface Props { setState: @@ -16,7 +16,7 @@ interface Props { setIndex: Dispatch>; } -export default function LightBox(props: Immutable): JSX.Element { +export function LightBox(props: Immutable): JSX.Element { const { state, setState, images, index, setIndex } = props; function handlePrevious() { diff --git a/src/components/Markdown/Markdawn.tsx b/src/components/Markdown/Markdawn.tsx index dd0f8d1..6b86231 100644 --- a/src/components/Markdown/Markdawn.tsx +++ b/src/components/Markdown/Markdawn.tsx @@ -1,7 +1,7 @@ -import HorizontalLine from "components/HorizontalLine"; -import Img from "components/Img"; -import InsetBox from "components/InsetBox"; -import ToolTip from "components/ToolTip"; +import { HorizontalLine } from "components/HorizontalLine"; +import { Img } from "components/Img"; +import { InsetBox } from "components/InsetBox"; +import { ToolTip } from "components/ToolTip"; import { useAppLayout } from "contexts/AppLayoutContext"; import { slugify } from "helpers/formatters"; import { getAssetURL, ImageQuality } from "helpers/img"; @@ -17,7 +17,7 @@ interface Props { text: string; } -export default function Markdawn(props: Immutable): JSX.Element { +export function Markdawn(props: Immutable): JSX.Element { const appLayout = useAppLayout(); const text = preprocessMarkDawn(props.text); diff --git a/src/components/Markdown/TOC.tsx b/src/components/Markdown/TOC.tsx index 4967668..4d14b64 100644 --- a/src/components/Markdown/TOC.tsx +++ b/src/components/Markdown/TOC.tsx @@ -8,7 +8,7 @@ interface Props { title?: string; } -export default function TOCComponent(props: Immutable): JSX.Element { +export function TOC(props: Immutable): JSX.Element { const { text, title } = props; const toc = getTocFromMarkdawn(preprocessMarkDawn(text), title); const router = useRouter(); @@ -29,7 +29,7 @@ export default function TOCComponent(props: Immutable): JSX.Element { } interface LevelProps { - tocchildren: TOC[]; + tocchildren: TOCInterface[]; parentNumbering: string; } @@ -61,14 +61,14 @@ function TOCLevel(props: LevelProps): JSX.Element { ); } -interface TOC { +interface TOCInterface { title: string; slug: string; - children: TOC[]; + children: TOCInterface[]; } -export function getTocFromMarkdawn(text: string, title?: string): TOC { - const toc: TOC = { +export function getTocFromMarkdawn(text: string, title?: string): TOCInterface { + const toc: TOCInterface = { title: title ?? "Return to top", slug: slugify(title), children: [], diff --git a/src/components/PanelComponents/NavOption.tsx b/src/components/PanelComponents/NavOption.tsx index 10d10e3..a36eecc 100644 --- a/src/components/PanelComponents/NavOption.tsx +++ b/src/components/PanelComponents/NavOption.tsx @@ -1,4 +1,4 @@ -import ToolTip from "components/ToolTip"; +import { ToolTip } from "components/ToolTip"; import { Immutable } from "helpers/types"; import { useRouter } from "next/router"; import { MouseEventHandler } from "react"; @@ -13,7 +13,7 @@ interface Props { onClick?: MouseEventHandler; } -export default function NavOption(props: Immutable): JSX.Element { +export function NavOption(props: Immutable): JSX.Element { const router = useRouter(); const isActive = router.asPath.startsWith(props.url); const divActive = "bg-mid shadow-inner-sm shadow-shade"; diff --git a/src/components/PanelComponents/PanelHeader.tsx b/src/components/PanelComponents/PanelHeader.tsx index eba7a1f..652e69a 100644 --- a/src/components/PanelComponents/PanelHeader.tsx +++ b/src/components/PanelComponents/PanelHeader.tsx @@ -1,4 +1,4 @@ -import HorizontalLine from "components/HorizontalLine"; +import { HorizontalLine } from "components/HorizontalLine"; import { Immutable } from "helpers/types"; interface Props { @@ -7,7 +7,7 @@ interface Props { description?: string | null | undefined; } -export default function PanelHeader(props: Immutable): JSX.Element { +export function PanelHeader(props: Immutable): JSX.Element { return ( <>
diff --git a/src/components/PanelComponents/ReturnButton.tsx b/src/components/PanelComponents/ReturnButton.tsx index d173940..edc40fc 100644 --- a/src/components/PanelComponents/ReturnButton.tsx +++ b/src/components/PanelComponents/ReturnButton.tsx @@ -1,5 +1,5 @@ -import HorizontalLine from "components/HorizontalLine"; -import Button from "components/Inputs/Button"; +import { HorizontalLine } from "components/HorizontalLine"; +import { Button } from "components/Inputs/Button"; import { useAppLayout } from "contexts/AppLayoutContext"; import { AppStaticProps } from "graphql/getAppStaticProps"; import { Immutable } from "helpers/types"; @@ -19,7 +19,7 @@ export enum ReturnButtonType { both = "both", } -export default function ReturnButton(props: Immutable): JSX.Element { +export function ReturnButton(props: Immutable): JSX.Element { const appLayout = useAppLayout(); return ( diff --git a/src/components/Panels/ContentPanel.tsx b/src/components/Panels/ContentPanel.tsx index 2f6beb5..5019cdd 100644 --- a/src/components/Panels/ContentPanel.tsx +++ b/src/components/Panels/ContentPanel.tsx @@ -11,7 +11,7 @@ export enum ContentPanelWidthSizes { large = "large", } -export default function ContentPanel(props: Immutable): JSX.Element { +export function ContentPanel(props: Immutable): JSX.Element { const width = props.width ? props.width : ContentPanelWidthSizes.default; const widthCSS = width === ContentPanelWidthSizes.default ? "max-w-2xl" : "w-full"; diff --git a/src/components/Panels/MainPanel.tsx b/src/components/Panels/MainPanel.tsx index cdfd2ac..4d83cfc 100644 --- a/src/components/Panels/MainPanel.tsx +++ b/src/components/Panels/MainPanel.tsx @@ -1,7 +1,7 @@ -import HorizontalLine from "components/HorizontalLine"; -import Button from "components/Inputs/Button"; -import NavOption from "components/PanelComponents/NavOption"; -import ToolTip from "components/ToolTip"; +import { HorizontalLine } from "components/HorizontalLine"; +import { Button } from "components/Inputs/Button"; +import { NavOption } from "components/PanelComponents/NavOption"; +import { ToolTip } from "components/ToolTip"; import { useAppLayout } from "contexts/AppLayoutContext"; import { AppStaticProps } from "graphql/getAppStaticProps"; import { Immutable } from "helpers/types"; @@ -13,7 +13,7 @@ interface Props { langui: AppStaticProps["langui"]; } -export default function MainPanel(props: Immutable): JSX.Element { +export function MainPanel(props: Immutable): JSX.Element { const { langui } = props; const isDesktop = useMediaDesktop(); const appLayout = useAppLayout(); diff --git a/src/components/Panels/SubPanel.tsx b/src/components/Panels/SubPanel.tsx index 776e305..da69642 100644 --- a/src/components/Panels/SubPanel.tsx +++ b/src/components/Panels/SubPanel.tsx @@ -4,7 +4,7 @@ interface Props { children: React.ReactNode; } -export default function SubPanel(props: Immutable): JSX.Element { +export function SubPanel(props: Immutable): JSX.Element { return (
{props.children} diff --git a/src/components/Popup.tsx b/src/components/Popup.tsx index 0f56786..78739aa 100644 --- a/src/components/Popup.tsx +++ b/src/components/Popup.tsx @@ -14,7 +14,7 @@ interface Props { padding?: boolean; } -export default function Popup(props: Immutable): JSX.Element { +export function Popup(props: Immutable): JSX.Element { const { setState, state, diff --git a/src/components/PostPage.tsx b/src/components/PostPage.tsx index e32f1a8..e324f0a 100644 --- a/src/components/PostPage.tsx +++ b/src/components/PostPage.tsx @@ -3,17 +3,17 @@ import { prettySlug } from "helpers/formatters"; import { getStatusDescription } from "helpers/others"; import { Immutable, PostWithTranslations } from "helpers/types"; import { useSmartLanguage } from "hooks/useSmartLanguage"; -import AppLayout from "./AppLayout"; -import Chip from "./Chip"; -import HorizontalLine from "./HorizontalLine"; -import Markdawn from "./Markdown/Markdawn"; -import TOC from "./Markdown/TOC"; -import ReturnButton, { ReturnButtonType } from "./PanelComponents/ReturnButton"; -import ContentPanel from "./Panels/ContentPanel"; -import SubPanel from "./Panels/SubPanel"; -import RecorderChip from "./RecorderChip"; -import ThumbnailHeader from "./ThumbnailHeader"; -import ToolTip from "./ToolTip"; +import { AppLayout } from "./AppLayout"; +import { Chip } from "./Chip"; +import { HorizontalLine } from "./HorizontalLine"; +import { Markdawn } from "./Markdown/Markdawn"; +import { TOC } from "./Markdown/TOC"; +import { ReturnButton, ReturnButtonType } from "./PanelComponents/ReturnButton"; +import { ContentPanel } from "./Panels/ContentPanel"; +import { SubPanel } from "./Panels/SubPanel"; +import { RecorderChip } from "./RecorderChip"; +import { ThumbnailHeader } from "./ThumbnailHeader"; +import { ToolTip } from "./ToolTip"; interface Props { post: PostWithTranslations; @@ -31,7 +31,7 @@ interface Props { appendBody?: JSX.Element; } -export default function PostPage(props: Immutable): JSX.Element { +export function PostPage(props: Immutable): JSX.Element { const { post, langui, diff --git a/src/components/PreviewCard.tsx b/src/components/PreviewCard.tsx index b890785..010690d 100644 --- a/src/components/PreviewCard.tsx +++ b/src/components/PreviewCard.tsx @@ -14,8 +14,8 @@ import { import { ImageQuality } from "helpers/img"; import { Immutable } from "helpers/types"; import Link from "next/link"; -import Chip from "./Chip"; -import Img from "./Img"; +import { Chip } from "./Chip"; +import { Img } from "./Img"; interface Props { thumbnail?: UploadImageFragment | string | null | undefined; @@ -45,7 +45,7 @@ interface Props { | { __typename: "anotherHoverlayName" }; } -export default function PreviewCard(props: Immutable): JSX.Element { +export function PreviewCard(props: Immutable): JSX.Element { const { href, thumbnail, diff --git a/src/components/PreviewLine.tsx b/src/components/PreviewLine.tsx index ca2aa02..742be36 100644 --- a/src/components/PreviewLine.tsx +++ b/src/components/PreviewLine.tsx @@ -2,8 +2,8 @@ import { UploadImageFragment } from "graphql/generated"; import { ImageQuality } from "helpers/img"; import { Immutable } from "helpers/types"; import Link from "next/link"; -import Chip from "./Chip"; -import Img from "./Img"; +import { Chip } from "./Chip"; +import { Img } from "./Img"; interface Props { thumbnail?: UploadImageFragment | string | null | undefined; @@ -16,7 +16,7 @@ interface Props { bottomChips?: string[]; } -export default function PreviewLine(props: Immutable): JSX.Element { +export function PreviewLine(props: Immutable): JSX.Element { const { href, thumbnail, diff --git a/src/components/RecorderChip.tsx b/src/components/RecorderChip.tsx index 16851fe..de7c824 100644 --- a/src/components/RecorderChip.tsx +++ b/src/components/RecorderChip.tsx @@ -1,11 +1,11 @@ -import Chip from "components/Chip"; +import { Chip } from "components/Chip"; import { RecorderChipFragment } from "graphql/generated"; import { AppStaticProps } from "graphql/getAppStaticProps"; import { ImageQuality } from "helpers/img"; import { Immutable } from "helpers/types"; -import Img from "./Img"; -import Markdawn from "./Markdown/Markdawn"; -import ToolTip from "./ToolTip"; +import { Img } from "./Img"; +import { Markdawn } from "./Markdown/Markdawn"; +import { ToolTip } from "./ToolTip"; interface Props { className?: string; @@ -13,7 +13,7 @@ interface Props { langui: AppStaticProps["langui"]; } -export default function RecorderChip(props: Immutable): JSX.Element { +export function RecorderChip(props: Immutable): JSX.Element { const { recorder, langui } = props; return ( ): JSX.Element { +export function SVG(props: Immutable): JSX.Element { return (
): JSX.Element { +export function ThumbnailHeader(props: Immutable): JSX.Element { const { langui, pre_title, diff --git a/src/components/ToolTip.tsx b/src/components/ToolTip.tsx index f563f46..63dd291 100644 --- a/src/components/ToolTip.tsx +++ b/src/components/ToolTip.tsx @@ -3,7 +3,7 @@ import "tippy.js/animations/scale-subtle.css"; interface Props extends TippyProps {} -export default function ToolTip(props: Props): JSX.Element { +export function ToolTip(props: Props): JSX.Element { const newProps: Props = { delay: [150, 0], interactive: true, diff --git a/src/components/Wiki/Chronology/ChronologyItemComponent.tsx b/src/components/Wiki/Chronology/ChronologyItemComponent.tsx index 8d9fb77..4b3fc5b 100644 --- a/src/components/Wiki/Chronology/ChronologyItemComponent.tsx +++ b/src/components/Wiki/Chronology/ChronologyItemComponent.tsx @@ -1,5 +1,5 @@ -import Chip from "components/Chip"; -import ToolTip from "components/ToolTip"; +import { Chip } from "components/Chip"; +import { ToolTip } from "components/ToolTip"; import { Enum_Componenttranslationschronologyitem_Status, GetChronologyItemsQuery, @@ -17,9 +17,7 @@ interface Props { langui: AppStaticProps["langui"]; } -export default function ChronologyItemComponent( - props: Immutable -): JSX.Element { +export function ChronologyItemComponent(props: Immutable): JSX.Element { const { langui } = props; function generateAnchor( diff --git a/src/components/Wiki/Chronology/ChronologyYearComponent.tsx b/src/components/Wiki/Chronology/ChronologyYearComponent.tsx index 389e18c..5758e65 100644 --- a/src/components/Wiki/Chronology/ChronologyYearComponent.tsx +++ b/src/components/Wiki/Chronology/ChronologyYearComponent.tsx @@ -1,4 +1,4 @@ -import ChronologyItemComponent from "components/Wiki/Chronology/ChronologyItemComponent"; +import { ChronologyItemComponent } from "components/Wiki/Chronology/ChronologyItemComponent"; import { GetChronologyItemsQuery } from "graphql/generated"; import { AppStaticProps } from "graphql/getAppStaticProps"; import { Immutable } from "helpers/types"; @@ -12,9 +12,7 @@ interface Props { langui: AppStaticProps["langui"]; } -export default function ChronologyYearComponent( - props: Immutable -): JSX.Element { +export function ChronologyYearComponent(props: Immutable): JSX.Element { const { langui } = props; return ( diff --git a/src/contexts/AppLayoutContext.tsx b/src/contexts/AppLayoutContext.tsx index eb1a821..f9bc26e 100644 --- a/src/contexts/AppLayoutContext.tsx +++ b/src/contexts/AppLayoutContext.tsx @@ -1,6 +1,6 @@ import { Immutable } from "helpers/types"; -import useDarkMode from "hooks/useDarkMode"; -import useStateWithLocalStorage from "hooks/useStateWithLocalStorage"; +import { useDarkMode } from "hooks/useDarkMode"; +import { useStateWithLocalStorage } from "hooks/useStateWithLocalStorage"; import React, { ReactNode, useContext, useState } from "react"; interface AppLayoutState { diff --git a/src/hooks/useDarkMode.ts b/src/hooks/useDarkMode.ts index 4705942..72b26ea 100644 --- a/src/hooks/useDarkMode.ts +++ b/src/hooks/useDarkMode.ts @@ -1,8 +1,8 @@ import { useEffect } from "react"; import { usePrefersDarkMode } from "./useMediaQuery"; -import useStateWithLocalStorage from "./useStateWithLocalStorage"; +import { useStateWithLocalStorage } from "./useStateWithLocalStorage"; -export default function useDarkMode( +export function useDarkMode( key: string, initialValue: boolean | undefined ): [ diff --git a/src/hooks/useLightBox.tsx b/src/hooks/useLightBox.tsx index 4bf9303..f4b7f4a 100644 --- a/src/hooks/useLightBox.tsx +++ b/src/hooks/useLightBox.tsx @@ -1,4 +1,4 @@ -import LightBox from "components/LightBox"; +import { LightBox } from "components/LightBox"; import { useState } from "react"; export function useLightBox(): [ diff --git a/src/hooks/useMediaQuery.ts b/src/hooks/useMediaQuery.ts index 00c90c6..3d999b9 100644 --- a/src/hooks/useMediaQuery.ts +++ b/src/hooks/useMediaQuery.ts @@ -1,6 +1,6 @@ import { useEffect, useState } from "react"; -export default function useMediaQuery(query: string): boolean { +export function useMediaQuery(query: string): boolean { function getMatches(query: string): boolean { // Prevents SSR issues if (typeof window !== "undefined") { diff --git a/src/hooks/useSmartLanguage.tsx b/src/hooks/useSmartLanguage.tsx index 735a435..baae258 100644 --- a/src/hooks/useSmartLanguage.tsx +++ b/src/hooks/useSmartLanguage.tsx @@ -1,4 +1,4 @@ -import LanguageSwitcher from "components/Inputs/LanguageSwitcher"; +import { LanguageSwitcher } from "components/Inputs/LanguageSwitcher"; import { useAppLayout } from "contexts/AppLayoutContext"; import { AppStaticProps } from "graphql/getAppStaticProps"; import { Immutable } from "helpers/types"; diff --git a/src/hooks/useStateWithLocalStorage.ts b/src/hooks/useStateWithLocalStorage.ts index 5981b2e..d32249b 100644 --- a/src/hooks/useStateWithLocalStorage.ts +++ b/src/hooks/useStateWithLocalStorage.ts @@ -1,6 +1,6 @@ import { useEffect, useState } from "react"; -export default function useStateWithLocalStorage( +export function useStateWithLocalStorage( key: string, initialValue: T ): [T | undefined, React.Dispatch>] { diff --git a/src/pages/404.tsx b/src/pages/404.tsx index d265505..e2ba153 100644 --- a/src/pages/404.tsx +++ b/src/pages/404.tsx @@ -1,8 +1,9 @@ -import AppLayout from "components/AppLayout"; -import ReturnButton, { +import { AppLayout } from "components/AppLayout"; +import { + ReturnButton, ReturnButtonType, } from "components/PanelComponents/ReturnButton"; -import ContentPanel from "components/Panels/ContentPanel"; +import { ContentPanel } from "components/Panels/ContentPanel"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { Immutable } from "helpers/types"; import { GetStaticPropsContext } from "next"; diff --git a/src/pages/500.tsx b/src/pages/500.tsx index eab7707..a09e9e3 100644 --- a/src/pages/500.tsx +++ b/src/pages/500.tsx @@ -1,8 +1,9 @@ -import AppLayout from "components/AppLayout"; -import ReturnButton, { +import { AppLayout } from "components/AppLayout"; +import { + ReturnButton, ReturnButtonType, } from "components/PanelComponents/ReturnButton"; -import ContentPanel from "components/Panels/ContentPanel"; +import { ContentPanel } from "components/Panels/ContentPanel"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { Immutable } from "helpers/types"; import { GetStaticPropsContext } from "next"; diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index 4c21e31..6c05daa 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -6,7 +6,7 @@ import Document, { NextScript, } from "next/document"; -class MyDocument extends Document { +export default class MyDocument extends Document { // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types static async getInitialProps(ctx: DocumentContext) { const initialProps = await Document.getInitialProps(ctx); @@ -65,5 +65,3 @@ class MyDocument extends Document { ); } } - -export default MyDocument; diff --git a/src/pages/about-us/accords-handbook.tsx b/src/pages/about-us/accords-handbook.tsx index 749359e..e35fab1 100644 --- a/src/pages/about-us/accords-handbook.tsx +++ b/src/pages/about-us/accords-handbook.tsx @@ -1,4 +1,4 @@ -import PostPage from "components/PostPage"; +import { PostPage } from "components/PostPage"; import { getPostStaticProps, PostStaticProps, diff --git a/src/pages/about-us/contact.tsx b/src/pages/about-us/contact.tsx index 21015ab..c0b4e99 100644 --- a/src/pages/about-us/contact.tsx +++ b/src/pages/about-us/contact.tsx @@ -1,5 +1,5 @@ -import InsetBox from "components/InsetBox"; -import PostPage from "components/PostPage"; +import { InsetBox } from "components/InsetBox"; +import { PostPage } from "components/PostPage"; import { getPostStaticProps, PostStaticProps, @@ -10,9 +10,7 @@ import { useRouter } from "next/router"; import { RequestMailProps, ResponseMailProps } from "pages/api/mail"; import { useState } from "react"; -export default function AboutUs( - props: Immutable -): JSX.Element { +export default function AboutUs(props: Immutable): JSX.Element { const { post, langui, languages, currencies } = props; const router = useRouter(); diff --git a/src/pages/about-us/index.tsx b/src/pages/about-us/index.tsx index 85c4dec..b36e212 100644 --- a/src/pages/about-us/index.tsx +++ b/src/pages/about-us/index.tsx @@ -1,7 +1,7 @@ -import AppLayout from "components/AppLayout"; -import NavOption from "components/PanelComponents/NavOption"; -import PanelHeader from "components/PanelComponents/PanelHeader"; -import SubPanel from "components/Panels/SubPanel"; +import { AppLayout } from "components/AppLayout"; +import { NavOption } from "components/PanelComponents/NavOption"; +import { PanelHeader } from "components/PanelComponents/PanelHeader"; +import { SubPanel } from "components/Panels/SubPanel"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { Immutable } from "helpers/types"; import { GetStaticPropsContext } from "next"; diff --git a/src/pages/about-us/legality.tsx b/src/pages/about-us/legality.tsx index 828a342..36cd458 100644 --- a/src/pages/about-us/legality.tsx +++ b/src/pages/about-us/legality.tsx @@ -1,4 +1,4 @@ -import PostPage from "components/PostPage"; +import { PostPage } from "components/PostPage"; import { getPostStaticProps, PostStaticProps, diff --git a/src/pages/about-us/sharing-policy.tsx b/src/pages/about-us/sharing-policy.tsx index 81c93b7..3174092 100644 --- a/src/pages/about-us/sharing-policy.tsx +++ b/src/pages/about-us/sharing-policy.tsx @@ -1,4 +1,4 @@ -import PostPage from "components/PostPage"; +import { PostPage } from "components/PostPage"; import { getPostStaticProps, PostStaticProps, diff --git a/src/pages/api/mail.ts b/src/pages/api/mail.ts index e874acb..7fb6b00 100644 --- a/src/pages/api/mail.ts +++ b/src/pages/api/mail.ts @@ -14,7 +14,7 @@ export interface RequestMailProps { formName: string; } -export default async function Mail( +export async function Mail( req: NextApiRequest, res: NextApiResponse ) { diff --git a/src/pages/api/revalidate.ts b/src/pages/api/revalidate.ts index 2b9baea..99673cb 100644 --- a/src/pages/api/revalidate.ts +++ b/src/pages/api/revalidate.ts @@ -70,7 +70,7 @@ type ResponseMailProps = { revalidated: boolean; }; -export default async function Mail( +export async function Mail( req: NextApiRequest, res: NextApiResponse ) { diff --git a/src/pages/archives/index.tsx b/src/pages/archives/index.tsx index bc38935..8ce723d 100644 --- a/src/pages/archives/index.tsx +++ b/src/pages/archives/index.tsx @@ -1,7 +1,7 @@ -import AppLayout from "components/AppLayout"; -import NavOption from "components/PanelComponents/NavOption"; -import PanelHeader from "components/PanelComponents/PanelHeader"; -import SubPanel from "components/Panels/SubPanel"; +import { AppLayout } from "components/AppLayout"; +import { NavOption } from "components/PanelComponents/NavOption"; +import { PanelHeader } from "components/PanelComponents/PanelHeader"; +import { SubPanel } from "components/Panels/SubPanel"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { Immutable } from "helpers/types"; import { GetStaticPropsContext } from "next"; diff --git a/src/pages/archives/videos/c/[uid].tsx b/src/pages/archives/videos/c/[uid].tsx index 02ed0e8..e822908 100644 --- a/src/pages/archives/videos/c/[uid].tsx +++ b/src/pages/archives/videos/c/[uid].tsx @@ -1,14 +1,16 @@ -import AppLayout from "components/AppLayout"; -import Switch from "components/Inputs/Switch"; -import PanelHeader from "components/PanelComponents/PanelHeader"; -import ReturnButton, { +import { AppLayout } from "components/AppLayout"; +import { Switch } from "components/Inputs/Switch"; +import { PanelHeader } from "components/PanelComponents/PanelHeader"; +import { + ReturnButton, ReturnButtonType, } from "components/PanelComponents/ReturnButton"; -import ContentPanel, { +import { + ContentPanel, ContentPanelWidthSizes, } from "components/Panels/ContentPanel"; -import SubPanel from "components/Panels/SubPanel"; -import PreviewCard from "components/PreviewCard"; +import { SubPanel } from "components/Panels/SubPanel"; +import { PreviewCard } from "components/PreviewCard"; import { GetVideoChannelQuery } from "graphql/generated"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { getReadySdk } from "graphql/sdk"; diff --git a/src/pages/archives/videos/index.tsx b/src/pages/archives/videos/index.tsx index b5e70d3..c7759b0 100644 --- a/src/pages/archives/videos/index.tsx +++ b/src/pages/archives/videos/index.tsx @@ -1,15 +1,17 @@ -import AppLayout from "components/AppLayout"; -import PageSelector from "components/Inputs/PageSelector"; -import Switch from "components/Inputs/Switch"; -import PanelHeader from "components/PanelComponents/PanelHeader"; -import ReturnButton, { +import { AppLayout } from "components/AppLayout"; +import { PageSelector } from "components/Inputs/PageSelector"; +import { Switch } from "components/Inputs/Switch"; +import { PanelHeader } from "components/PanelComponents/PanelHeader"; +import { + ReturnButton, ReturnButtonType, } from "components/PanelComponents/ReturnButton"; -import ContentPanel, { +import { + ContentPanel, ContentPanelWidthSizes, } from "components/Panels/ContentPanel"; -import SubPanel from "components/Panels/SubPanel"; -import PreviewCard from "components/PreviewCard"; +import { SubPanel } from "components/Panels/SubPanel"; +import { PreviewCard } from "components/PreviewCard"; import { GetVideosPreviewQuery } from "graphql/generated"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { getReadySdk } from "graphql/sdk"; diff --git a/src/pages/archives/videos/v/[uid].tsx b/src/pages/archives/videos/v/[uid].tsx index 7ff8e98..de984ac 100644 --- a/src/pages/archives/videos/v/[uid].tsx +++ b/src/pages/archives/videos/v/[uid].tsx @@ -1,15 +1,17 @@ -import AppLayout from "components/AppLayout"; -import HorizontalLine from "components/HorizontalLine"; -import Button from "components/Inputs/Button"; -import InsetBox from "components/InsetBox"; -import NavOption from "components/PanelComponents/NavOption"; -import ReturnButton, { +import { AppLayout } from "components/AppLayout"; +import { HorizontalLine } from "components/HorizontalLine"; +import { Button } from "components/Inputs/Button"; +import { InsetBox } from "components/InsetBox"; +import { NavOption } from "components/PanelComponents/NavOption"; +import { + ReturnButton, ReturnButtonType, } from "components/PanelComponents/ReturnButton"; -import ContentPanel, { +import { + ContentPanel, ContentPanelWidthSizes, } from "components/Panels/ContentPanel"; -import SubPanel from "components/Panels/SubPanel"; +import { SubPanel } from "components/Panels/SubPanel"; import { useAppLayout } from "contexts/AppLayoutContext"; import { GetVideoQuery } from "graphql/generated"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; diff --git a/src/pages/chronicles/index.tsx b/src/pages/chronicles/index.tsx index 3f85be0..cb376ca 100644 --- a/src/pages/chronicles/index.tsx +++ b/src/pages/chronicles/index.tsx @@ -1,6 +1,6 @@ -import AppLayout from "components/AppLayout"; -import PanelHeader from "components/PanelComponents/PanelHeader"; -import SubPanel from "components/Panels/SubPanel"; +import { AppLayout } from "components/AppLayout"; +import { PanelHeader } from "components/PanelComponents/PanelHeader"; +import { SubPanel } from "components/Panels/SubPanel"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { Immutable } from "helpers/types"; import { GetStaticPropsContext } from "next"; diff --git a/src/pages/contents/[slug]/index.tsx b/src/pages/contents/[slug]/index.tsx index 564fc23..f351343 100644 --- a/src/pages/contents/[slug]/index.tsx +++ b/src/pages/contents/[slug]/index.tsx @@ -1,17 +1,18 @@ -import AppLayout from "components/AppLayout"; -import Chip from "components/Chip"; -import HorizontalLine from "components/HorizontalLine"; -import Markdawn from "components/Markdown/Markdawn"; -import TOC from "components/Markdown/TOC"; -import ReturnButton, { +import { AppLayout } from "components/AppLayout"; +import { Chip } from "components/Chip"; +import { HorizontalLine } from "components/HorizontalLine"; +import { Markdawn } from "components/Markdown/Markdawn"; +import { TOC } from "components/Markdown/TOC"; +import { + ReturnButton, ReturnButtonType, } from "components/PanelComponents/ReturnButton"; -import ContentPanel from "components/Panels/ContentPanel"; -import SubPanel from "components/Panels/SubPanel"; -import PreviewLine from "components/PreviewLine"; -import RecorderChip from "components/RecorderChip"; -import ThumbnailHeader from "components/ThumbnailHeader"; -import ToolTip from "components/ToolTip"; +import { ContentPanel } from "components/Panels/ContentPanel"; +import { SubPanel } from "components/Panels/SubPanel"; +import { PreviewLine } from "components/PreviewLine"; +import { RecorderChip } from "components/RecorderChip"; +import { ThumbnailHeader } from "components/ThumbnailHeader"; +import { ToolTip } from "components/ToolTip"; import { GetContentTextQuery } from "graphql/generated"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { getReadySdk } from "graphql/sdk"; diff --git a/src/pages/contents/index.tsx b/src/pages/contents/index.tsx index ce1cb13..07003d0 100644 --- a/src/pages/contents/index.tsx +++ b/src/pages/contents/index.tsx @@ -1,13 +1,14 @@ -import AppLayout from "components/AppLayout"; -import Chip from "components/Chip"; -import Select from "components/Inputs/Select"; -import Switch from "components/Inputs/Switch"; -import PanelHeader from "components/PanelComponents/PanelHeader"; -import ContentPanel, { +import { AppLayout } from "components/AppLayout"; +import { Chip } from "components/Chip"; +import { Select } from "components/Inputs/Select"; +import { Switch } from "components/Inputs/Switch"; +import { PanelHeader } from "components/PanelComponents/PanelHeader"; +import { + ContentPanel, ContentPanelWidthSizes, } from "components/Panels/ContentPanel"; -import SubPanel from "components/Panels/SubPanel"; -import PreviewCard from "components/PreviewCard"; +import { SubPanel } from "components/Panels/SubPanel"; +import { PreviewCard } from "components/PreviewCard"; import { GetContentsQuery } from "graphql/generated"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { getReadySdk } from "graphql/sdk"; @@ -120,7 +121,8 @@ export default function Contents(props: Immutable): JSX.Element { thumbnailAspectRatio="3/2" stackEffect={ item.attributes.next_recommended?.data?.id !== null && - item.attributes.next_recommended?.data?.id !== undefined && + item.attributes.next_recommended?.data?.id !== + undefined && combineRelatedContent } topChips={ diff --git a/src/pages/dev/checkup/contents.tsx b/src/pages/dev/checkup/contents.tsx index 2f577d0..cff8eb0 100644 --- a/src/pages/dev/checkup/contents.tsx +++ b/src/pages/dev/checkup/contents.tsx @@ -1,10 +1,11 @@ -import AppLayout from "components/AppLayout"; -import Chip from "components/Chip"; -import Button from "components/Inputs/Button"; -import ContentPanel, { +import { AppLayout } from "components/AppLayout"; +import { Chip } from "components/Chip"; +import { Button } from "components/Inputs/Button"; +import { + ContentPanel, ContentPanelWidthSizes, } from "components/Panels/ContentPanel"; -import ToolTip from "components/ToolTip"; +import { ToolTip } from "components/ToolTip"; import { DevGetContentsQuery, Enum_Componentsetstextset_Status, @@ -39,7 +40,8 @@ export default function CheckupContents(props: Immutable): JSX.Element { {testReport.lines.map((line, index) => (
+
@@ -144,7 +144,7 @@ export default function Video(props: Props): JSX.Element { {video.channel?.data?.attributes && (
-

{"Channel"}

+

{langui.channel}

@@ -163,7 +162,7 @@ export default function Video(props: Props): JSX.Element {
-

{"Description"}

+

{langui.description}

{video.description}

diff --git a/src/pages/contents/[slug]/index.tsx b/src/pages/contents/[slug]/index.tsx index 60504b8..7d7479d 100644 --- a/src/pages/contents/[slug]/index.tsx +++ b/src/pages/contents/[slug]/index.tsx @@ -208,110 +208,107 @@ export default function Content(props: Immutable): JSX.Element { className="mb-10" /> - {content && ( -
- } - /> +
+ } + /> - {previousContent?.attributes && ( -
-

Previous content

- category.attributes?.short ?? "" - ) - } - /> -
- )} + {previousContent?.attributes && ( +
+

+ {langui.previous_content} +

+ category.attributes?.short ?? "" + ) + } + /> +
+ )} - + - + - {nextContent?.attributes && ( - <> - -

Follow-up content

- category.attributes?.short ?? "" - ) - } - /> - - )} -
- )} + {nextContent?.attributes && ( + <> + +

+ {langui.followup_content} +

+ category.attributes?.short ?? "" + ) + } + /> + + )} +
); diff --git a/src/pages/contents/index.tsx b/src/pages/contents/index.tsx index daaf74c..b727caf 100644 --- a/src/pages/contents/index.tsx +++ b/src/pages/contents/index.tsx @@ -67,7 +67,7 @@ export default function Contents(props: Immutable): JSX.Element {
-

{"Combine related contents"}:

+

{langui.combine_related_contents}:

): JSX.Element {
-

{"Always show info"}:

+

{langui.always_show_info}:

@@ -122,7 +122,7 @@ export default function Contents(props: Immutable): JSX.Element { stackNumber={ combineRelatedContent && item.attributes.group?.data?.attributes?.combine - ? item.attributes.group?.data?.attributes.contents + ? item.attributes.group.data.attributes.contents ?.data.length : 0 } @@ -268,7 +268,7 @@ function filterContents( (content) => !content.attributes?.group?.data?.attributes || !content.attributes.group.data.attributes.combine || - content.attributes.group.data.attributes.contents?.data?.[0].id === + content.attributes.group.data.attributes.contents?.data[0].id === content.id ); } diff --git a/src/pages/dev/checkup/contents.tsx b/src/pages/dev/checkup/contents.tsx index 9ed7222..431569e 100644 --- a/src/pages/dev/checkup/contents.tsx +++ b/src/pages/dev/checkup/contents.tsx @@ -163,23 +163,6 @@ function testingContent(contents: Immutable): Report { }); } - if ( - content.attributes.next_recommended?.data?.id === content.id || - content.attributes.previous_recommended?.data?.id === content.id - ) { - report.lines.push({ - subitems: [content.attributes.slug], - name: "Self Recommendation", - type: "Error", - severity: "Very High", - description: - "The Content is referring to itself as a Next or Previous Recommended.", - recommandation: "", - backendUrl: backendUrl, - frontendUrl: frontendUrl, - }); - } - if (!content.attributes.thumbnail?.data?.id) { report.lines.push({ subitems: [content.attributes.slug], @@ -270,172 +253,171 @@ function testingContent(contents: Immutable): Report { frontendUrl: frontendUrl, }); } else { - const textSetLanguages: string[] = []; - /* - if (content.attributes && textSet) { - if (textSet.language?.data?.id) { - if (textSet.language.data.id in textSetLanguages) { - report.lines.push({ - subitems: [ - content.attributes.slug, - `TextSet ${textSetIndex.toString()}`, - ], - name: "Duplicate Language", - type: "Error", - severity: "High", - description: "", - recommandation: "", - backendUrl: backendUrl, - frontendUrl: frontendUrl, - }); - } else { - textSetLanguages.push(textSet.language.data.id); - } - } else { - report.lines.push({ - subitems: [ - content.attributes.slug, - `TextSet ${textSetIndex.toString()}`, - ], - name: "No Language", - type: "Error", - severity: "Very High", - description: "", - recommandation: "", - backendUrl: backendUrl, - frontendUrl: frontendUrl, - }); - } - - if (!textSet.source_language?.data?.id) { - report.lines.push({ - subitems: [ - content.attributes.slug, - `TextSet ${textSetIndex.toString()}`, - ], - name: "No Source Language", - type: "Error", - severity: "High", - description: "", - recommandation: "", - backendUrl: backendUrl, - frontendUrl: frontendUrl, - }); - } - - if (textSet.status !== Enum_Componentsetstextset_Status.Done) { - report.lines.push({ - subitems: [ - content.attributes.slug, - `TextSet ${textSetIndex.toString()}`, - ], - name: "Not Done Status", - type: "Improvement", - severity: "Low", - description: "", - recommandation: "", - backendUrl: backendUrl, - frontendUrl: frontendUrl, - }); - } - - if (!textSet.text || textSet.text.length < 10) { - report.lines.push({ - subitems: [ - content.attributes.slug, - `TextSet ${textSetIndex.toString()}`, - ], - name: "No Text", - type: "Missing", - severity: "Medium", - description: "", - recommandation: "", - backendUrl: backendUrl, - frontendUrl: frontendUrl, - }); - } - - if ( - textSet.source_language?.data?.id === - textSet.language?.data?.id - ) { - if (textSet.transcribers?.data.length === 0) { - report.lines.push({ - subitems: [ - content.attributes.slug, - `TextSet ${textSetIndex.toString()}`, - ], - name: "No Transcribers", - type: "Missing", - severity: "High", - description: - "The Content is a Transcription but doesn't credit any Transcribers.", - recommandation: "Add the appropriate Transcribers.", - backendUrl: backendUrl, - frontendUrl: frontendUrl, - }); - } - if ( - textSet.translators?.data && - textSet.translators.data.length > 0 - ) { - report.lines.push({ - subitems: [ - content.attributes.slug, - `TextSet ${textSetIndex.toString()}`, - ], - name: "Credited Translators", - type: "Error", - severity: "High", - description: - "The Content is a Transcription but credits one or more Translators.", - recommandation: - "If appropriate, create a Translation Text Set with the Translator credited there.", - backendUrl: backendUrl, - frontendUrl: frontendUrl, - }); - } - } else { - if (textSet.translators?.data.length === 0) { - report.lines.push({ - subitems: [ - content.attributes.slug, - `TextSet ${textSetIndex.toString()}`, - ], - name: "No Translators", - type: "Missing", - severity: "High", - description: - "The Content is a Transcription but doesn't credit any Translators.", - recommandation: "Add the appropriate Translators.", - backendUrl: backendUrl, - frontendUrl: frontendUrl, - }); - } - if ( - textSet.transcribers?.data && - textSet.transcribers.data.length > 0 - ) { - report.lines.push({ - subitems: [ - content.attributes.slug, - `TextSet ${textSetIndex.toString()}`, - ], - name: "Credited Transcribers", - type: "Error", - severity: "High", - description: - "The Content is a Translation but credits one or more Transcribers.", - recommandation: - "If appropriate, create a Transcription Text Set with the Transcribers credited there.", - backendUrl: backendUrl, - frontendUrl: frontendUrl, - }); - } - } - } - */ + *const textSetLanguages: string[] = []; + *if (content.attributes && textSet) { + * if (textSet.language?.data?.id) { + * if (textSet.language.data.id in textSetLanguages) { + * report.lines.push({ + * subitems: [ + * content.attributes.slug, + * `TextSet ${textSetIndex.toString()}`, + * ], + * name: "Duplicate Language", + * type: "Error", + * severity: "High", + * description: "", + * recommandation: "", + * backendUrl: backendUrl, + * frontendUrl: frontendUrl, + * }); + * } else { + * textSetLanguages.push(textSet.language.data.id); + * } + * } else { + * report.lines.push({ + * subitems: [ + * content.attributes.slug, + * `TextSet ${textSetIndex.toString()}`, + * ], + * name: "No Language", + * type: "Error", + * severity: "Very High", + * description: "", + * recommandation: "", + * backendUrl: backendUrl, + * frontendUrl: frontendUrl, + * }); + * } + * + * if (!textSet.source_language?.data?.id) { + * report.lines.push({ + * subitems: [ + * content.attributes.slug, + * `TextSet ${textSetIndex.toString()}`, + * ], + * name: "No Source Language", + * type: "Error", + * severity: "High", + * description: "", + * recommandation: "", + * backendUrl: backendUrl, + * frontendUrl: frontendUrl, + * }); + * } + * + * if (textSet.status !== Enum_Componentsetstextset_Status.Done) { + * report.lines.push({ + * subitems: [ + * content.attributes.slug, + * `TextSet ${textSetIndex.toString()}`, + * ], + * name: "Not Done Status", + * type: "Improvement", + * severity: "Low", + * description: "", + * recommandation: "", + * backendUrl: backendUrl, + * frontendUrl: frontendUrl, + * }); + * } + * + * if (!textSet.text || textSet.text.length < 10) { + * report.lines.push({ + * subitems: [ + * content.attributes.slug, + * `TextSet ${textSetIndex.toString()}`, + * ], + * name: "No Text", + * type: "Missing", + * severity: "Medium", + * description: "", + * recommandation: "", + * backendUrl: backendUrl, + * frontendUrl: frontendUrl, + * }); + * } + * + * if ( + * textSet.source_language?.data?.id === + * textSet.language?.data?.id + * ) { + * if (textSet.transcribers?.data.length === 0) { + * report.lines.push({ + * subitems: [ + * content.attributes.slug, + * `TextSet ${textSetIndex.toString()}`, + * ], + * name: "No Transcribers", + * type: "Missing", + * severity: "High", + * description: + * "The Content is a Transcription but doesn't credit any Transcribers.", + * recommandation: "Add the appropriate Transcribers.", + * backendUrl: backendUrl, + * frontendUrl: frontendUrl, + * }); + * } + * if ( + * textSet.translators?.data && + * textSet.translators.data.length > 0 + * ) { + * report.lines.push({ + * subitems: [ + * content.attributes.slug, + * `TextSet ${textSetIndex.toString()}`, + * ], + * name: "Credited Translators", + * type: "Error", + * severity: "High", + * description: + * "The Content is a Transcription but credits one or more Translators.", + * recommandation: + * "If appropriate, create a Translation Text Set with the Translator credited there.", + * backendUrl: backendUrl, + * frontendUrl: frontendUrl, + * }); + * } + * } else { + * if (textSet.translators?.data.length === 0) { + * report.lines.push({ + * subitems: [ + * content.attributes.slug, + * `TextSet ${textSetIndex.toString()}`, + * ], + * name: "No Translators", + * type: "Missing", + * severity: "High", + * description: + * "The Content is a Transcription but doesn't credit any Translators.", + * recommandation: "Add the appropriate Translators.", + * backendUrl: backendUrl, + * frontendUrl: frontendUrl, + * }); + * } + * if ( + * textSet.transcribers?.data && + * textSet.transcribers.data.length > 0 + * ) { + * report.lines.push({ + * subitems: [ + * content.attributes.slug, + * `TextSet ${textSetIndex.toString()}`, + * ], + * name: "Credited Transcribers", + * type: "Error", + * severity: "High", + * description: + * "The Content is a Translation but credits one or more Transcribers.", + * recommandation: + * "If appropriate, create a Transcription Text Set with the Transcribers credited there.", + * backendUrl: backendUrl, + * frontendUrl: frontendUrl, + * }); + * } + * } + *} + */ } report.lines.push({ diff --git a/src/pages/library/[slug]/index.tsx b/src/pages/library/[slug]/index.tsx index 7886f0f..9b20761 100644 --- a/src/pages/library/[slug]/index.tsx +++ b/src/pages/library/[slug]/index.tsx @@ -202,7 +202,7 @@ export default function LibrarySlug(props: Immutable): JSX.Element { <> {item?.urls && item.urls.length ? (
-

Available at

+

{langui.available_at}

{item.urls.map((url) => ( <> {url?.url && ( @@ -218,7 +218,7 @@ export default function LibrarySlug(props: Immutable): JSX.Element { ))}
) : ( -

This item is not for sale or is no longer available

+

{langui.item_not_available}

)} )} @@ -415,7 +415,7 @@ export default function LibrarySlug(props: Immutable): JSX.Element {
-

{"Always show info"}:

+

{langui.always_show_info}:

): JSX.Element {
-

{"Always show info"}:

+

{langui.always_show_info}:

diff --git a/src/pages/news/index.tsx b/src/pages/news/index.tsx index e1b51ad..6890ebc 100644 --- a/src/pages/news/index.tsx +++ b/src/pages/news/index.tsx @@ -34,7 +34,7 @@ export default function News(props: Immutable): JSX.Element { />
-

{"Always show info"}:

+

{langui.always_show_info}:

-- 2.40.1 From 237f496b6b06d6127a3838da5be05040d45e66e8 Mon Sep 17 00:00:00 2001 From: DrMint Date: Sun, 15 May 2022 10:15:55 +0200 Subject: [PATCH 30/30] Prettier --- src/graphql/operations/getContentText.graphql | 316 +++++++++--------- src/pages/about-us/contact.tsx | 4 +- src/pages/dev/checkup/libraryitems.tsx | 4 +- 3 files changed, 164 insertions(+), 160 deletions(-) diff --git a/src/graphql/operations/getContentText.graphql b/src/graphql/operations/getContentText.graphql index 3e8fe14..c7881ce 100644 --- a/src/graphql/operations/getContentText.graphql +++ b/src/graphql/operations/getContentText.graphql @@ -1,161 +1,161 @@ query getContentText($slug: String, $language_code: String) { - contents(filters: { slug: { eq: $slug } }) { - data { - id - attributes { - slug + contents(filters: { slug: { eq: $slug } }) { + data { + id + attributes { + slug - categories { - data { - id - attributes { - name - short - } - } - } - type { - data { - attributes { - slug - titles(filters: { language: { code: { eq: $language_code } } }) { - title - } - } - } - } - ranged_contents { - data { - id - attributes { - slug - scan_set { - id - } - library_item { - data { - attributes { - slug - title - subtitle - thumbnail { - data { - attributes { - ...uploadImage - } - } - } - } - } - } - } - } - } - translations { - language { - data { - attributes { - code - } - } - } - pre_title - title - subtitle - description - text_set { - status - text - source_language { - data { - attributes { - code - } - } - } - transcribers { - data { - id - attributes { - ...recorderChip - } - } - } - translators { - data { - id - attributes { - ...recorderChip - } - } - } - proofreaders { - data { - id - attributes { - ...recorderChip - } - } - } - notes - } - } + categories { + data { + id + attributes { + name + short + } + } + } + type { + data { + attributes { + slug + titles(filters: { language: { code: { eq: $language_code } } }) { + title + } + } + } + } + ranged_contents { + data { + id + attributes { + slug + scan_set { + id + } + library_item { + data { + attributes { + slug + title + subtitle + thumbnail { + data { + attributes { + ...uploadImage + } + } + } + } + } + } + } + } + } + translations { + language { + data { + attributes { + code + } + } + } + pre_title + title + subtitle + description + text_set { + status + text + source_language { + data { + attributes { + code + } + } + } + transcribers { + data { + id + attributes { + ...recorderChip + } + } + } + translators { + data { + id + attributes { + ...recorderChip + } + } + } + proofreaders { + data { + id + attributes { + ...recorderChip + } + } + } + notes + } + } - thumbnail { - data { - attributes { - ...uploadImage - } - } - } - group { - data { - attributes { - contents { - data { - attributes { - slug - translations { - pre_title - title - subtitle - } - categories { - data { - id - attributes { - short - } - } - } - type { - data { - attributes { - slug - titles( - filters: { - language: { code: { eq: $language_code } } - } - ) { - title - } - } - } - } - thumbnail { - data { - attributes { - ...uploadImage - } - } - } - } - } - } - } - } - } - } - } - } -} \ No newline at end of file + thumbnail { + data { + attributes { + ...uploadImage + } + } + } + group { + data { + attributes { + contents { + data { + attributes { + slug + translations { + pre_title + title + subtitle + } + categories { + data { + id + attributes { + short + } + } + } + type { + data { + attributes { + slug + titles( + filters: { + language: { code: { eq: $language_code } } + } + ) { + title + } + } + } + } + thumbnail { + data { + attributes { + ...uploadImage + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/src/pages/about-us/contact.tsx b/src/pages/about-us/contact.tsx index c0b4e99..d79b21d 100644 --- a/src/pages/about-us/contact.tsx +++ b/src/pages/about-us/contact.tsx @@ -10,7 +10,9 @@ import { useRouter } from "next/router"; import { RequestMailProps, ResponseMailProps } from "pages/api/mail"; import { useState } from "react"; -export default function AboutUs(props: Immutable): JSX.Element { +export default function AboutUs( + props: Immutable +): JSX.Element { const { post, langui, languages, currencies } = props; const router = useRouter(); diff --git a/src/pages/dev/checkup/libraryitems.tsx b/src/pages/dev/checkup/libraryitems.tsx index 74cd0a6..ddf1dcc 100644 --- a/src/pages/dev/checkup/libraryitems.tsx +++ b/src/pages/dev/checkup/libraryitems.tsx @@ -19,7 +19,9 @@ interface Props extends AppStaticProps { libraryItems: DevGetLibraryItemsQuery; } -export default function CheckupLibraryItems(props: Immutable): JSX.Element { +export default function CheckupLibraryItems( + props: Immutable +): JSX.Element { const { libraryItems } = props; const testReport = testingLibraryItem(libraryItems); -- 2.40.1