diff --git a/package.json b/package.json index 9b6a920..4f858dd 100644 --- a/package.json +++ b/package.json @@ -16,12 +16,12 @@ "@formkit/auto-animate": "^0.8.1", "@heroicons/react": "^2.1.1", "@js-temporal/polyfill": "^0.4.4", - "@mui/base": "^5.0.0-beta.37", - "@next/third-parties": "^14.1.2", + "@mui/base": "^5.0.0-beta.38", + "@next/third-parties": "^14.1.3", "@tailwindcss/container-queries": "^0.1.1", - "@types/node": "^20.11.24", - "@types/react": "^18.2.62", - "@types/react-dom": "^18.2.19", + "@types/node": "^20.11.25", + "@types/react": "^18.2.64", + "@types/react-dom": "^18.2.21", "@uidotdev/usehooks": "^2.4.1", "algoliasearch": "^4.22.1", "autoprefixer": "^10.4.18", @@ -30,16 +30,16 @@ "decanter": "^7.2.0", "drupal-jsonapi-params": "^2.3.1", "eslint": "^8.57.0", - "eslint-config-next": "^14.1.2", + "eslint-config-next": "^14.1.3", "graphql": "^16.8.1", "graphql-request": "^6.1.0", "graphql-tag": "^2.12.6", "html-entities": "^2.5.2", "html-react-parser": "^5.1.8", - "next": "^14.1.2", + "next": "^14.1.3", "next-drupal": "^1.6.0", "postcss": "^8.4.35", - "qs": "^6.11.2", + "qs": "^6.12.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-focus-lock": "^2.11.2", @@ -49,8 +49,8 @@ "sharp": "^0.33.2", "tailwind-merge": "^2.2.1", "tailwindcss": "^3.4.1", - "typescript": "^5.3.3", - "usehooks-ts": "^2.15.1", + "typescript": "^5.4.2", + "usehooks-ts": "^2.16.0", "zustand": "^4.5.2" }, "devDependencies": { @@ -59,7 +59,7 @@ "@graphql-codegen/import-types-preset": "^3.0.0", "@graphql-codegen/typescript-graphql-request": "^6.2.0", "@graphql-codegen/typescript-operations": "^4.2.0", - "@next/bundle-analyzer": "^14.1.2", + "@next/bundle-analyzer": "^14.1.3", "@storybook/addon-essentials": "^7.6.17", "@storybook/addon-interactions": "^7.6.17", "@storybook/addon-links": "^7.6.17", diff --git a/src/components/elements/button.tsx b/src/components/elements/button.tsx index 26e328e..bf4044e 100644 --- a/src/components/elements/button.tsx +++ b/src/components/elements/button.tsx @@ -14,6 +14,7 @@ type Props = HtmlHTMLAttributes & { onClick?: MouseEventHandler prefetch?: boolean type?: HTMLButtonElement["type"] + disabled?: boolean } export const Button = ({ diff --git a/src/components/elements/paged-list.tsx b/src/components/elements/paged-list.tsx new file mode 100644 index 0000000..55ae29b --- /dev/null +++ b/src/components/elements/paged-list.tsx @@ -0,0 +1,107 @@ +"use client"; + +import {useLayoutEffect, useRef, HtmlHTMLAttributes, useEffect} from "react"; +import Button from "@components/elements/button"; +import {useAutoAnimate} from "@formkit/auto-animate/react"; +import {useBoolean, useCounter} from "usehooks-ts"; +import {useRouter, useSearchParams} from "next/navigation"; +import usePagination from "@lib/hooks/usePagination"; + +type Props = HtmlHTMLAttributes & { + ulProps?: HtmlHTMLAttributes + liProps?: HtmlHTMLAttributes, + itemsPerPage?: number +} + +const PagedList = ({children, ulProps, liProps, itemsPerPage = 10, ...props}: Props) => { + const items = Array.isArray(children) ? children : [children] + + const router = useRouter(); + const searchParams = useSearchParams() + + // Use the GET param for page, but make sure that it is between 1 and the last page. If it's a string or a number + // outside the range, fix the value, so it works as expected. + const {count: page, setCount: setPage} = useCounter(Math.max(1, Math.min(Math.ceil(items.length / itemsPerPage), parseInt(searchParams.get('page') || '') || 1))) + const {value: focusOnElement, setTrue: enableFocusElement, setFalse: disableFocusElement} = useBoolean(false) + + const ref = useRef(null); + const [animationParent] = useAutoAnimate(); + + const goToPage = (page: number) => { + enableFocusElement(); + setPage(page); + } + + useLayoutEffect(() => { + if (focusOnElement) ref.current?.focus() + }, [focusOnElement]); + + useEffect(() => { + router.replace(page > 1 ? `?page=${page}` : '?', {scroll: false}) + }, [router, page]); + + const paginationButtons = usePagination(items.length, page, itemsPerPage, 2); + + return ( +
+
    + {items.slice((page - 1) * itemsPerPage, page * itemsPerPage).map((item, i) => +
  • + {item} +
  • + )} +
+ + +
+ ) +} + +const PaginationButton = ({page, currentPage, total, onClick}: { + page: number | string + currentPage: number + total: number + onClick: () => void +}) => { + if (page === 0) { + return ( +
  • + More pages available + ... +
  • + ) + } + + return ( +
  • + +
  • + ) +} + +export default PagedList; \ No newline at end of file diff --git a/src/components/views/stanford-news/news-list-view.tsx b/src/components/views/stanford-news/news-list-view.tsx index 12d2724..7e86798 100644 --- a/src/components/views/stanford-news/news-list-view.tsx +++ b/src/components/views/stanford-news/news-list-view.tsx @@ -1,6 +1,6 @@ import StanfordNewsListItem from "@components/nodes/list-item/stanford-news/stanford-news-list-item"; -import LoadMoreList from "@components/elements/load-more-list"; import {NodeStanfordNews} from "@lib/gql/__generated__/drupal.d"; +import PagedList from "@components/elements/paged-list"; interface Props { headingLevel?: "h2" | "h3" @@ -9,15 +9,14 @@ interface Props { const NewsListView = async ({items = [], headingLevel}: Props) => { return ( - Load More news} + {items.map(item => )} - + ) } export default NewsListView; \ No newline at end of file diff --git a/src/lib/hooks/usePagination.tsx b/src/lib/hooks/usePagination.tsx new file mode 100644 index 0000000..d62b135 --- /dev/null +++ b/src/lib/hooks/usePagination.tsx @@ -0,0 +1,80 @@ +import {useMemo} from "react"; + +const usePagination = (totalCount: number, currentPage = 1, pageSize = 5, siblingCount = 1): number[] => { + return useMemo(() => { + const totalPageCount = Math.ceil(totalCount / pageSize); + + // Pages count is determined as siblingCount + firstPage + lastPage + currentPage + 2 * DOTS + const totalPageNumbers = siblingCount + 5; + + /* + Case 1: + If the number of pages is less than the page numbers we want to show in our + paginationComponent, we return the range [1..totalPageCount] + */ + if (totalPageNumbers >= totalPageCount) { + return range(1, totalPageCount); + } + + /* + Calculate left and right sibling index and make sure they are within range 1 and totalPageCount + */ + const leftSiblingIndex = Math.max(currentPage - siblingCount, 1); + const rightSiblingIndex = Math.min( + currentPage + siblingCount, + totalPageCount + ); + + /* + We do not show dots just when there is just one page number to be inserted between the extremes of sibling and the page limits i.e 1 and totalPageCount. Hence we are using leftSiblingIndex > 2 and rightSiblingIndex < totalPageCount - 2 + */ + const shouldShowLeftDots = leftSiblingIndex > 2; + const shouldShowRightDots = rightSiblingIndex < totalPageCount - 1; + + const firstPageIndex = 1; + const lastPageIndex = totalPageCount; + + /* + Case 2: No left dots to show, but rights dots to be shown + */ + if (!shouldShowLeftDots && shouldShowRightDots) { + const leftItemCount = 3 + 2 * siblingCount; + const leftRange = range(1, leftItemCount); + + return [...leftRange, 0, totalPageCount]; + } + + /* + Case 3: No right dots to show, but left dots to be shown + */ + if (shouldShowLeftDots && !shouldShowRightDots) { + const rightItemCount = 3 + 2 * siblingCount; + const rightRange = range( + totalPageCount - rightItemCount + 1, + totalPageCount + ); + return [firstPageIndex, 0, ...rightRange]; + } + + /* + Case 4: Both left and right dots to be shown + */ + if (shouldShowLeftDots && shouldShowRightDots) { + const middleRange = range(leftSiblingIndex, rightSiblingIndex); + return [firstPageIndex, 0, ...middleRange, 0, lastPageIndex]; + } + return []; + + }, [totalCount, pageSize, siblingCount, currentPage]); +}; + +const range = (start: number, end: number) => { + let length = end - start + 1; + /* + Create an array of certain length and set the elements within it from + start value to end value. + */ + return Array.from({length}, (_, idx) => idx + start); +}; + +export default usePagination; \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index fc99c9a..dce3c12 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3267,14 +3267,14 @@ __metadata: languageName: node linkType: hard -"@mui/base@npm:^5.0.0-beta.37": - version: 5.0.0-beta.37 - resolution: "@mui/base@npm:5.0.0-beta.37" +"@mui/base@npm:^5.0.0-beta.38": + version: 5.0.0-beta.38 + resolution: "@mui/base@npm:5.0.0-beta.38" dependencies: "@babel/runtime": "npm:^7.23.9" "@floating-ui/react-dom": "npm:^2.0.8" "@mui/types": "npm:^7.2.13" - "@mui/utils": "npm:^5.15.11" + "@mui/utils": "npm:^5.15.12" "@popperjs/core": "npm:^2.11.8" clsx: "npm:^2.1.0" prop-types: "npm:^15.8.1" @@ -3285,7 +3285,7 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 10c0/bcee89198381b1058aa2a7e3122597a34a03fb3b351b1e0776674a996fb633bdeeae0656f14f905df7d4fced2aa6ae0a2b4fb3b462de387668481d8427448ca3 + checksum: 10c0/0a23da4e32da0c157f4a97d5ca6cbf246b5ab4d5f894f903ff33a501e92f6ce13c784db27a03b64bb01dfd14cd726b6bbb90f578b6fcddd1d8ac6f119c42fa54 languageName: node linkType: hard @@ -3301,9 +3301,9 @@ __metadata: languageName: node linkType: hard -"@mui/utils@npm:^5.15.11": - version: 5.15.11 - resolution: "@mui/utils@npm:5.15.11" +"@mui/utils@npm:^5.15.12": + version: 5.15.12 + resolution: "@mui/utils@npm:5.15.12" dependencies: "@babel/runtime": "npm:^7.23.9" "@types/prop-types": "npm:^15.7.11" @@ -3315,7 +3315,7 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 10c0/bbdd0a8cd5bd04021b6e0b7836bd5a5852e54d95392ad786816dd0e5c1942f82f5d645721ac8c716394f74b0628a8c909139fc86103a3aa40d147ab9eb234fb9 + checksum: 10c0/ef6be5aa2b3183d6fbc1dccb0697433cb6610ee259e4d157386fe0a4ab9f40d0fd9637496195c811bf49304bb0ead4230a7c034a923b51fc42ebb9529555ad55 languageName: node linkType: hard @@ -3330,12 +3330,12 @@ __metadata: languageName: node linkType: hard -"@next/bundle-analyzer@npm:^14.1.2": - version: 14.1.2 - resolution: "@next/bundle-analyzer@npm:14.1.2" +"@next/bundle-analyzer@npm:^14.1.3": + version: 14.1.3 + resolution: "@next/bundle-analyzer@npm:14.1.3" dependencies: webpack-bundle-analyzer: "npm:4.10.1" - checksum: 10c0/2aca4d79504bd79faaa4587d8ec6752d32323134ef1fa3c21c4494a2716fc37e25c6440fd4392e01550e9a2fb782cf689843e2022f7da6371145ae928254b273 + checksum: 10c0/7cc806441cffee517b9bfd4abfe9c28ce4ee898dde37c755c2e92826b80341b3ead0d0e4ad4fcf188d6da65bd28e95e5e833dd1d4f5158b70da79988845bfdf3 languageName: node linkType: hard @@ -3346,19 +3346,19 @@ __metadata: languageName: node linkType: hard -"@next/env@npm:14.1.2": - version: 14.1.2 - resolution: "@next/env@npm:14.1.2" - checksum: 10c0/30e3d99e9c0f2bdb3303e8aa1115afb6de941d120cea1d00465d61163edb84fbec7c7091f71cd159abd28f2a6f45847eb10dbd51070b4afea72f8b53da96beb0 +"@next/env@npm:14.1.3": + version: 14.1.3 + resolution: "@next/env@npm:14.1.3" + checksum: 10c0/928dba385f1ed3346880845662f87fe386e42ee0c798ccbd7c13a31e2cb509153d42e6c8a4a73ad9c6d647ac9cb6a570316c8ddcaccc9ec201f7519ec383dc02 languageName: node linkType: hard -"@next/eslint-plugin-next@npm:14.1.2": - version: 14.1.2 - resolution: "@next/eslint-plugin-next@npm:14.1.2" +"@next/eslint-plugin-next@npm:14.1.3": + version: 14.1.3 + resolution: "@next/eslint-plugin-next@npm:14.1.3" dependencies: glob: "npm:10.3.10" - checksum: 10c0/8f99345e3b0739aaabfb2fe61dc586c1781356ca1ccb8a01c15ddd451c3d7a2ff1d31b0b727ef27baa4227d7c8536a05c5206b9e3631efd668b7dd3ef69fedfa + checksum: 10c0/08ac68dad1866c2ec8662b852fcf224fd45a15cc9e6033b3f017760c0b0a1a04e663adf3ab86b2d34b0e89189b7d2cf4226a2769e0ee39bd9405443bb185adb8 languageName: node linkType: hard @@ -3369,9 +3369,9 @@ __metadata: languageName: node linkType: hard -"@next/swc-darwin-arm64@npm:14.1.2": - version: 14.1.2 - resolution: "@next/swc-darwin-arm64@npm:14.1.2" +"@next/swc-darwin-arm64@npm:14.1.3": + version: 14.1.3 + resolution: "@next/swc-darwin-arm64@npm:14.1.3" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -3383,9 +3383,9 @@ __metadata: languageName: node linkType: hard -"@next/swc-darwin-x64@npm:14.1.2": - version: 14.1.2 - resolution: "@next/swc-darwin-x64@npm:14.1.2" +"@next/swc-darwin-x64@npm:14.1.3": + version: 14.1.3 + resolution: "@next/swc-darwin-x64@npm:14.1.3" conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -3397,9 +3397,9 @@ __metadata: languageName: node linkType: hard -"@next/swc-linux-arm64-gnu@npm:14.1.2": - version: 14.1.2 - resolution: "@next/swc-linux-arm64-gnu@npm:14.1.2" +"@next/swc-linux-arm64-gnu@npm:14.1.3": + version: 14.1.3 + resolution: "@next/swc-linux-arm64-gnu@npm:14.1.3" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard @@ -3411,9 +3411,9 @@ __metadata: languageName: node linkType: hard -"@next/swc-linux-arm64-musl@npm:14.1.2": - version: 14.1.2 - resolution: "@next/swc-linux-arm64-musl@npm:14.1.2" +"@next/swc-linux-arm64-musl@npm:14.1.3": + version: 14.1.3 + resolution: "@next/swc-linux-arm64-musl@npm:14.1.3" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard @@ -3425,9 +3425,9 @@ __metadata: languageName: node linkType: hard -"@next/swc-linux-x64-gnu@npm:14.1.2": - version: 14.1.2 - resolution: "@next/swc-linux-x64-gnu@npm:14.1.2" +"@next/swc-linux-x64-gnu@npm:14.1.3": + version: 14.1.3 + resolution: "@next/swc-linux-x64-gnu@npm:14.1.3" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard @@ -3439,9 +3439,9 @@ __metadata: languageName: node linkType: hard -"@next/swc-linux-x64-musl@npm:14.1.2": - version: 14.1.2 - resolution: "@next/swc-linux-x64-musl@npm:14.1.2" +"@next/swc-linux-x64-musl@npm:14.1.3": + version: 14.1.3 + resolution: "@next/swc-linux-x64-musl@npm:14.1.3" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard @@ -3453,9 +3453,9 @@ __metadata: languageName: node linkType: hard -"@next/swc-win32-arm64-msvc@npm:14.1.2": - version: 14.1.2 - resolution: "@next/swc-win32-arm64-msvc@npm:14.1.2" +"@next/swc-win32-arm64-msvc@npm:14.1.3": + version: 14.1.3 + resolution: "@next/swc-win32-arm64-msvc@npm:14.1.3" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -3467,9 +3467,9 @@ __metadata: languageName: node linkType: hard -"@next/swc-win32-ia32-msvc@npm:14.1.2": - version: 14.1.2 - resolution: "@next/swc-win32-ia32-msvc@npm:14.1.2" +"@next/swc-win32-ia32-msvc@npm:14.1.3": + version: 14.1.3 + resolution: "@next/swc-win32-ia32-msvc@npm:14.1.3" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -3481,22 +3481,22 @@ __metadata: languageName: node linkType: hard -"@next/swc-win32-x64-msvc@npm:14.1.2": - version: 14.1.2 - resolution: "@next/swc-win32-x64-msvc@npm:14.1.2" +"@next/swc-win32-x64-msvc@npm:14.1.3": + version: 14.1.3 + resolution: "@next/swc-win32-x64-msvc@npm:14.1.3" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@next/third-parties@npm:^14.1.2": - version: 14.1.2 - resolution: "@next/third-parties@npm:14.1.2" +"@next/third-parties@npm:^14.1.3": + version: 14.1.3 + resolution: "@next/third-parties@npm:14.1.3" dependencies: third-party-capital: "npm:1.0.20" peerDependencies: next: ^13.0.0 || ^14.0.0 react: ^18.2.0 - checksum: 10c0/fb30370c97acaeef01ec484460bb83d15e5e21e05b7ba930d7d118813e8444f770f7153dfe3d2a4008aeb7ce27ede609e9ef02baaf3059991d715fdcde3845bf + checksum: 10c0/0a8335e73df30bdd3f0605cc25f303fe363449c0ef01764604f1af2f9b8c39078d858e204879cce03612621f862fb9b497c6df10e60212c20ca8c2a031a784fb languageName: node linkType: hard @@ -5875,12 +5875,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^20.11.24": - version: 20.11.24 - resolution: "@types/node@npm:20.11.24" +"@types/node@npm:^20.11.25": + version: 20.11.25 + resolution: "@types/node@npm:20.11.25" dependencies: undici-types: "npm:~5.26.4" - checksum: 10c0/5a62225eb4797b41e6953f9c08c4611d607b5422ddd153312fc81ed6ed37115228ae27e3e3caa1a3bf52d88310306a196ba1cfbd8b2ec918a20f64d80dfa22c9 + checksum: 10c0/3a65a0469309d503e572a3198d81c9248876236b1bcc0c9943e995cfa536df7ce9a9302638258984877420d1613167a8a82dbfb3a92197319fb79ebebf9abc83 languageName: node linkType: hard @@ -5926,12 +5926,12 @@ __metadata: languageName: node linkType: hard -"@types/react-dom@npm:^18.2.19": - version: 18.2.19 - resolution: "@types/react-dom@npm:18.2.19" +"@types/react-dom@npm:^18.2.21": + version: 18.2.21 + resolution: "@types/react-dom@npm:18.2.21" dependencies: "@types/react": "npm:*" - checksum: 10c0/88d7c6daa4659f661d0c97985d9fca492f24b421a34bb614dcd94c343aed7bea121463149e97fb01ecaa693be17b7d1542cf71ddb1705f3889a81eb2639a88aa + checksum: 10c0/a887b4b647071df48173f054854713b68fdacfceeba7fa14f64ba26688d7d43574d7dc88a2a346e28f2e667eeab1b9bdbcad8a54353869835e52638607f61ff5 languageName: node linkType: hard @@ -5946,14 +5946,14 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:^18.2.62": - version: 18.2.62 - resolution: "@types/react@npm:18.2.62" +"@types/react@npm:^18.2.64": + version: 18.2.64 + resolution: "@types/react@npm:18.2.64" dependencies: "@types/prop-types": "npm:*" "@types/scheduler": "npm:*" csstype: "npm:^3.0.2" - checksum: 10c0/a45a986723b0febdcdcea754cfa426345f588fd9a522ab4136220a0b514ccba8f4986b23c73dd8e863d465ee1e733779bffffdd57c19488a318a5135f030c1e8 + checksum: 10c0/ab3ba9597990d08ffd419a5ad28fd22393c7a9a241ae455fb1d5d193d209471aa1909fa7ad016fd8d161eab6d0babba77b013b56a5170bedf78833085b9ee424 languageName: node linkType: hard @@ -7630,6 +7630,19 @@ __metadata: languageName: node linkType: hard +"call-bind@npm:^1.0.7": + version: 1.0.7 + resolution: "call-bind@npm:1.0.7" + dependencies: + es-define-property: "npm:^1.0.0" + es-errors: "npm:^1.3.0" + function-bind: "npm:^1.1.2" + get-intrinsic: "npm:^1.2.4" + set-function-length: "npm:^1.2.1" + checksum: 10c0/a3ded2e423b8e2a265983dba81c27e125b48eefb2655e7dfab6be597088da3d47c47976c24bc51b8fd9af1061f8f87b4ab78a314f3c77784b2ae2ba535ad8b8d + languageName: node + linkType: hard + "callsites@npm:^3.0.0": version: 3.1.0 resolution: "callsites@npm:3.1.0" @@ -8541,9 +8554,9 @@ __metadata: "@graphql-codegen/typescript-operations": "npm:^4.2.0" "@heroicons/react": "npm:^2.1.1" "@js-temporal/polyfill": "npm:^0.4.4" - "@mui/base": "npm:^5.0.0-beta.37" - "@next/bundle-analyzer": "npm:^14.1.2" - "@next/third-parties": "npm:^14.1.2" + "@mui/base": "npm:^5.0.0-beta.38" + "@next/bundle-analyzer": "npm:^14.1.3" + "@next/third-parties": "npm:^14.1.3" "@storybook/addon-essentials": "npm:^7.6.17" "@storybook/addon-interactions": "npm:^7.6.17" "@storybook/addon-links": "npm:^7.6.17" @@ -8553,9 +8566,9 @@ __metadata: "@storybook/react": "npm:^7.6.17" "@storybook/testing-library": "npm:^0.2.2" "@tailwindcss/container-queries": "npm:^0.1.1" - "@types/node": "npm:^20.11.24" - "@types/react": "npm:^18.2.62" - "@types/react-dom": "npm:^18.2.19" + "@types/node": "npm:^20.11.25" + "@types/react": "npm:^18.2.64" + "@types/react-dom": "npm:^18.2.21" "@uidotdev/usehooks": "npm:^2.4.1" algoliasearch: "npm:^4.22.1" autoprefixer: "npm:^10.4.18" @@ -8566,7 +8579,7 @@ __metadata: drupal-jsonapi-params: "npm:^2.3.1" encoding: "npm:^0.1.13" eslint: "npm:^8.57.0" - eslint-config-next: "npm:^14.1.2" + eslint-config-next: "npm:^14.1.3" eslint-plugin-deprecation: "npm:^2.0.0" eslint-plugin-storybook: "npm:^0.8.0" eslint-plugin-unused-imports: "npm:^3.1.0" @@ -8575,10 +8588,10 @@ __metadata: graphql-tag: "npm:^2.12.6" html-entities: "npm:^2.5.2" html-react-parser: "npm:^5.1.8" - next: "npm:^14.1.2" + next: "npm:^14.1.3" next-drupal: "npm:^1.6.0" postcss: "npm:^8.4.35" - qs: "npm:^6.11.2" + qs: "npm:^6.12.0" react: "npm:^18.2.0" react-docgen: "npm:^7.0.3" react-dom: "npm:^18.2.0" @@ -8591,8 +8604,8 @@ __metadata: tailwind-merge: "npm:^2.2.1" tailwindcss: "npm:^3.4.1" tsconfig-paths-webpack-plugin: "npm:^4.1.0" - typescript: "npm:^5.3.3" - usehooks-ts: "npm:^2.15.1" + typescript: "npm:^5.4.2" + usehooks-ts: "npm:^2.16.0" zustand: "npm:^4.5.2" languageName: unknown linkType: soft @@ -8681,6 +8694,17 @@ __metadata: languageName: node linkType: hard +"define-data-property@npm:^1.1.2": + version: 1.1.4 + resolution: "define-data-property@npm:1.1.4" + dependencies: + es-define-property: "npm:^1.0.0" + es-errors: "npm:^1.3.0" + gopd: "npm:^1.0.1" + checksum: 10c0/dea0606d1483eb9db8d930d4eac62ca0fa16738b0b3e07046cddfacf7d8c868bbe13fa0cb263eb91c7d0d527960dc3f2f2471a69ed7816210307f6744fe62e37 + languageName: node + linkType: hard + "define-lazy-prop@npm:^2.0.0": version: 2.0.0 resolution: "define-lazy-prop@npm:2.0.0" @@ -9236,6 +9260,22 @@ __metadata: languageName: node linkType: hard +"es-define-property@npm:^1.0.0": + version: 1.0.0 + resolution: "es-define-property@npm:1.0.0" + dependencies: + get-intrinsic: "npm:^1.2.4" + checksum: 10c0/6bf3191feb7ea2ebda48b577f69bdfac7a2b3c9bcf97307f55fd6ef1bbca0b49f0c219a935aca506c993d8c5d8bddd937766cb760cd5e5a1071351f2df9f9aa4 + languageName: node + linkType: hard + +"es-errors@npm:^1.3.0": + version: 1.3.0 + resolution: "es-errors@npm:1.3.0" + checksum: 10c0/0a61325670072f98d8ae3b914edab3559b6caa980f08054a3b872052640d91da01d38df55df797fcc916389d77fc92b8d5906cf028f4db46d7e3003abecbca85 + languageName: node + linkType: hard + "es-get-iterator@npm:^1.1.3": version: 1.1.3 resolution: "es-get-iterator@npm:1.1.3" @@ -9454,11 +9494,11 @@ __metadata: languageName: node linkType: hard -"eslint-config-next@npm:^14.1.2": - version: 14.1.2 - resolution: "eslint-config-next@npm:14.1.2" +"eslint-config-next@npm:^14.1.3": + version: 14.1.3 + resolution: "eslint-config-next@npm:14.1.3" dependencies: - "@next/eslint-plugin-next": "npm:14.1.2" + "@next/eslint-plugin-next": "npm:14.1.3" "@rushstack/eslint-patch": "npm:^1.3.3" "@typescript-eslint/parser": "npm:^5.4.2 || ^6.0.0" eslint-import-resolver-node: "npm:^0.3.6" @@ -9473,7 +9513,7 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/c600588b1231360981fd862ac1c878f03a05847a8a5399d3cf1590b59e2072f74b3e23a4b4aabdb45ef870709884d9a8e847ab8f602ee31ab31d3753f3103a38 + checksum: 10c0/4ab843af53cebf38b5e280597b94582b5cc4afc91dc04e6a70ed9c333cd0ebf4e8ae8ac16d77992e2c1557754cbd0f5460f5a858db62b83db4837d84638ac524 languageName: node linkType: hard @@ -10488,6 +10528,19 @@ __metadata: languageName: node linkType: hard +"get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": + version: 1.2.4 + resolution: "get-intrinsic@npm:1.2.4" + dependencies: + es-errors: "npm:^1.3.0" + function-bind: "npm:^1.1.2" + has-proto: "npm:^1.0.1" + has-symbols: "npm:^1.0.3" + hasown: "npm:^2.0.0" + checksum: 10c0/0a9b82c16696ed6da5e39b1267104475c47e3a9bdbe8b509dfe1710946e38a87be70d759f4bb3cda042d76a41ef47fe769660f3b7c0d1f68750299344ffb15b7 + languageName: node + linkType: hard + "get-nonce@npm:^1.0.0": version: 1.0.1 resolution: "get-nonce@npm:1.0.1" @@ -10834,6 +10887,15 @@ __metadata: languageName: node linkType: hard +"has-property-descriptors@npm:^1.0.1": + version: 1.0.2 + resolution: "has-property-descriptors@npm:1.0.2" + dependencies: + es-define-property: "npm:^1.0.0" + checksum: 10c0/253c1f59e80bb476cf0dde8ff5284505d90c3bdb762983c3514d36414290475fe3fd6f574929d84de2a8eec00d35cf07cb6776205ff32efd7c50719125f00236 + languageName: node + linkType: hard + "has-proto@npm:^1.0.1": version: 1.0.1 resolution: "has-proto@npm:1.0.1" @@ -13059,20 +13121,20 @@ __metadata: languageName: node linkType: hard -"next@npm:^14.1.2": - version: 14.1.2 - resolution: "next@npm:14.1.2" +"next@npm:^14.1.3": + version: 14.1.3 + resolution: "next@npm:14.1.3" dependencies: - "@next/env": "npm:14.1.2" - "@next/swc-darwin-arm64": "npm:14.1.2" - "@next/swc-darwin-x64": "npm:14.1.2" - "@next/swc-linux-arm64-gnu": "npm:14.1.2" - "@next/swc-linux-arm64-musl": "npm:14.1.2" - "@next/swc-linux-x64-gnu": "npm:14.1.2" - "@next/swc-linux-x64-musl": "npm:14.1.2" - "@next/swc-win32-arm64-msvc": "npm:14.1.2" - "@next/swc-win32-ia32-msvc": "npm:14.1.2" - "@next/swc-win32-x64-msvc": "npm:14.1.2" + "@next/env": "npm:14.1.3" + "@next/swc-darwin-arm64": "npm:14.1.3" + "@next/swc-darwin-x64": "npm:14.1.3" + "@next/swc-linux-arm64-gnu": "npm:14.1.3" + "@next/swc-linux-arm64-musl": "npm:14.1.3" + "@next/swc-linux-x64-gnu": "npm:14.1.3" + "@next/swc-linux-x64-musl": "npm:14.1.3" + "@next/swc-win32-arm64-msvc": "npm:14.1.3" + "@next/swc-win32-ia32-msvc": "npm:14.1.3" + "@next/swc-win32-x64-msvc": "npm:14.1.3" "@swc/helpers": "npm:0.5.2" busboy: "npm:1.6.0" caniuse-lite: "npm:^1.0.30001579" @@ -13110,7 +13172,7 @@ __metadata: optional: true bin: next: dist/bin/next - checksum: 10c0/3964d535c8c439bcdbe99adbf2e7859ee4af9c2bb541e9358d1b613d1debae99b1a020de57d378cac03c94167f772820eb05162b795f407b552bdbe1e2753e58 + checksum: 10c0/b723955669b40b49761220b582e46ee0fb472b01b67fb9b6ceabc9a191a252bba253a65d72b284fcac1001c85d39bd6816db71e78e97b2221137ed15776c35bd languageName: node linkType: hard @@ -14417,6 +14479,15 @@ __metadata: languageName: node linkType: hard +"qs@npm:^6.12.0": + version: 6.12.0 + resolution: "qs@npm:6.12.0" + dependencies: + side-channel: "npm:^1.0.6" + checksum: 10c0/e165a77ac5f3ca60c15c5f3d51b321ddec7aa438804436b29d160117bc6fb7bf7dab94abd0c7d7c0785890d3a75ae41e1d6346e158aaf1540c6fe53a31f11675 + languageName: node + linkType: hard + "qs@npm:^6.5.1 < 6.10": version: 6.9.7 resolution: "qs@npm:6.9.7" @@ -15493,6 +15564,20 @@ __metadata: languageName: node linkType: hard +"set-function-length@npm:^1.2.1": + version: 1.2.1 + resolution: "set-function-length@npm:1.2.1" + dependencies: + define-data-property: "npm:^1.1.2" + es-errors: "npm:^1.3.0" + function-bind: "npm:^1.1.2" + get-intrinsic: "npm:^1.2.3" + gopd: "npm:^1.0.1" + has-property-descriptors: "npm:^1.0.1" + checksum: 10c0/1927e296599f2c04d210c1911f1600430a5e49e04a6d8bb03dca5487b95a574da9968813a2ced9a774bd3e188d4a6208352c8f64b8d4674cdb021dca21e190ca + languageName: node + linkType: hard + "set-function-name@npm:^2.0.0, set-function-name@npm:^2.0.1": version: 2.0.1 resolution: "set-function-name@npm:2.0.1" @@ -15659,6 +15744,18 @@ __metadata: languageName: node linkType: hard +"side-channel@npm:^1.0.6": + version: 1.0.6 + resolution: "side-channel@npm:1.0.6" + dependencies: + call-bind: "npm:^1.0.7" + es-errors: "npm:^1.3.0" + get-intrinsic: "npm:^1.2.4" + object-inspect: "npm:^1.13.1" + checksum: 10c0/d2afd163dc733cc0a39aa6f7e39bf0c436293510dbccbff446733daeaf295857dbccf94297092ec8c53e2503acac30f0b78830876f0485991d62a90e9cad305f + languageName: node + linkType: hard + "signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" @@ -16839,23 +16936,23 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^5.3.3": - version: 5.3.3 - resolution: "typescript@npm:5.3.3" +"typescript@npm:^5.4.2": + version: 5.4.2 + resolution: "typescript@npm:5.4.2" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/e33cef99d82573624fc0f854a2980322714986bc35b9cb4d1ce736ed182aeab78e2cb32b385efa493b2a976ef52c53e20d6c6918312353a91850e2b76f1ea44f + checksum: 10c0/583ff68cafb0c076695f72d61df6feee71689568179fb0d3a4834dac343df6b6ed7cf7b6f6c801fa52d43cd1d324e2f2d8ae4497b09f9e6cfe3d80a6d6c9ca52 languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^5.3.3#optional!builtin": - version: 5.3.3 - resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7" +"typescript@patch:typescript@npm%3A^5.4.2#optional!builtin": + version: 5.4.2 + resolution: "typescript@patch:typescript@npm%3A5.4.2#optional!builtin::version=5.4.2&hash=5adc0c" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/1d0a5f4ce496c42caa9a30e659c467c5686eae15d54b027ee7866744952547f1be1262f2d40de911618c242b510029d51d43ff605dba8fb740ec85ca2d3f9500 + checksum: 10c0/fcf6658073d07283910d9a0e04b1d5d0ebc822c04dbb7abdd74c3151c7aa92fcddbac7d799404e358197222006ccdc4c0db219d223d2ee4ccd9e2b01333b49be languageName: node linkType: hard @@ -17153,14 +17250,14 @@ __metadata: languageName: node linkType: hard -"usehooks-ts@npm:^2.15.1": - version: 2.15.1 - resolution: "usehooks-ts@npm:2.15.1" +"usehooks-ts@npm:^2.16.0": + version: 2.16.0 + resolution: "usehooks-ts@npm:2.16.0" dependencies: lodash.debounce: "npm:^4.0.8" peerDependencies: react: ^16.8.0 || ^17 || ^18 - checksum: 10c0/d0fb108a27343093bdfe447a95cd3be2f07d593ef75d61643d9c80a82407867c365295d5493ed5b1eb898c4ca9708998819b35fce1714405cf418198ab6ff7fc + checksum: 10c0/0b7babf09b587cf7af71644dd603ee2efd820ec173c414af1c2afc2c61decc357738b093cabb6a881ac97d8a4e614723ee20096bddd459779f3a0786f4e6b2bf languageName: node linkType: hard