From 8eca70ae6d10838d0fcdd687dc524e45c68add4d Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Wed, 16 Oct 2024 15:35:28 -0400 Subject: [PATCH 01/55] connect to endpoint --- app/collections/page.tsx | 26 +++++++++++++++++++++++--- app/src/utils/api.ts | 12 ++++++++++++ 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/app/collections/page.tsx b/app/collections/page.tsx index 398e90ba..595b39d3 100644 --- a/app/collections/page.tsx +++ b/app/collections/page.tsx @@ -1,12 +1,32 @@ -import React from "react"; +import React, { Suspense } from "react"; import { Metadata } from "next"; import { CollectionsPage } from "../src/components/pages/collectionsPage/collectionsPage"; import { mockCollectionCards } from "__tests__/__mocks__/data/mockCollectionCards"; +import { getCollectionsData } from "@/src/utils/api"; +import { redirect } from "next/navigation"; + +export type CollectionsProps = { + params: { slug: string }; + searchParams: { page: number }; +}; export const metadata: Metadata = { title: "Collections - NYPL Digital Collections", }; -export default async function Collections() { - return ; +export default async function Collections({ searchParams }: CollectionsProps) { + const data = await getCollectionsData({ + pageNum: searchParams.page, + }); + + // Repo API returns 404s within the data. + if (data?.headers?.code === "404") { + redirect("/404"); + } + + return ( + + + + ); } diff --git a/app/src/utils/api.ts b/app/src/utils/api.ts index 59443fb5..d58946d9 100644 --- a/app/src/utils/api.ts +++ b/app/src/utils/api.ts @@ -248,3 +248,15 @@ export const getDivisionData = async ({ const res = await apiResponse(apiUrl); return res; }; + +export const getCollectionsData = async ({ + pageNum = 1, + perPage = CARDS_PER_PAGE, +}: { + pageNum?: number; + perPage?: number; +} = {}) => { + let apiUrl = `${process.env.API_URL}/api/v2/collections?page=${pageNum}&per_page=${perPage}`; + const res = await apiResponse(apiUrl); + return res; +}; From d370b6c49e2ab692e61cfff9e4ea61cc6020863c Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Wed, 23 Oct 2024 10:34:49 -0700 Subject: [PATCH 02/55] changes from friday --- app/collections/page.tsx | 9 +- app/divisions/[slug]/page.tsx | 3 +- .../pages/collectionsPage/collectionsPage.tsx | 125 +++++++++++++++++- .../pages/divisionPage/divisionPage.tsx | 3 - app/src/components/search/content.tsx | 3 - app/src/utils/api.ts | 15 ++- 6 files changed, 141 insertions(+), 17 deletions(-) diff --git a/app/collections/page.tsx b/app/collections/page.tsx index 595b39d3..4c791319 100644 --- a/app/collections/page.tsx +++ b/app/collections/page.tsx @@ -1,13 +1,13 @@ import React, { Suspense } from "react"; import { Metadata } from "next"; import { CollectionsPage } from "../src/components/pages/collectionsPage/collectionsPage"; -import { mockCollectionCards } from "__tests__/__mocks__/data/mockCollectionCards"; +// import { mockCollectionCards } from "__tests__/__mocks__/data/mockCollectionCards"; import { getCollectionsData } from "@/src/utils/api"; import { redirect } from "next/navigation"; export type CollectionsProps = { params: { slug: string }; - searchParams: { page: number }; + searchParams: { page: number; sort: string; keyword: string }; }; export const metadata: Metadata = { @@ -16,6 +16,8 @@ export const metadata: Metadata = { export default async function Collections({ searchParams }: CollectionsProps) { const data = await getCollectionsData({ + title: searchParams.keyword, + sortID: searchParams.sort, pageNum: searchParams.page, }); @@ -26,7 +28,8 @@ export default async function Collections({ searchParams }: CollectionsProps) { return ( - + {/* pass entire Repo API Response */} + ); } diff --git a/app/divisions/[slug]/page.tsx b/app/divisions/[slug]/page.tsx index 23e83135..b1e5abc2 100644 --- a/app/divisions/[slug]/page.tsx +++ b/app/divisions/[slug]/page.tsx @@ -32,11 +32,10 @@ export default async function Division({ if (data?.headers?.code === "404") { redirect("/404"); } - const currentPage = Number(searchParams.page) || 1; return ( - + ); } diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 1513298d..a79fabf2 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -1,16 +1,70 @@ "use client"; import PageLayout from "../../pageLayout/pageLayout"; -import React from "react"; +import React, { useState, useEffect } from "react"; import SearchResults from "../../search/results"; import { Box, Heading, HorizontalRule, SearchBar, + Menu, + Text, + Pagination, } from "@nypl/design-system-react-components"; +import { + useParams, + useSearchParams, + usePathname, + useRouter, +} from "next/navigation"; import { headerBreakpoints } from "../../../utils/breakpoints"; +import { CardsGrid } from "../../grids/cardsGrid"; +import LaneLoading from "../../lane/laneLoading"; +import { slugToString, totalNumPages } from "../../../utils/utils"; export const CollectionsPage = ({ data }) => { + const router = useRouter(); + const { replace } = useRouter(); + const queryParams = useSearchParams(); + const query = queryParams.toString(); + const pathname = usePathname(); + + const [isLoaded, setIsLoaded] = useState(false); + const [currentPage, setCurrentPage] = useState( + Number(queryParams.get("page")) || 1 + ); + const numFound = data.numFound ? data.numFound : data.numResults; + const totalPages = totalNumPages(numFound, data.perPage); + console.log("data: ", data); + + // pagination + const updatePageURL = async (pageNumber: number) => { + const params = new URLSearchParams(); + params.set("page", pageNumber.toString()); + setCurrentPage(pageNumber); + const url = `${pathname}?${params.toString()}`; + replace(url); + }; + + // sort + const createQueryString = (name, value) => { + const params = new URLSearchParams(); + params.set(name, value); + return params.toString(); + }; + + function onMenuClick(id) { + query + ? router.push( + "/collections" + "?" + query + "&" + createQueryString("sort", id) + ) + : router.push("/collections" + "?" + createQueryString("sort", id)); + } + + useEffect(() => { + setIsLoaded(true); + }, []); + return ( { textInputProps={{ isClearable: true, labelText: "Search by collection title", - name: "searchinput", + name: "keyword", placeholder: "Search by collection title", }} - onSubmit={function (event: React.FormEvent): void {}} + onSubmit={function (event: React.FormEvent): void {}} // fix labelText={""} /> - + + + {" "} + Sort by{" "} + {" "} + + + + {isLoaded ? ( + + ) : ( + <> + , + , + , + + )} + + {totalPages > 1 && ( + + )} ); }; diff --git a/app/src/components/pages/divisionPage/divisionPage.tsx b/app/src/components/pages/divisionPage/divisionPage.tsx index 57343316..be02342b 100644 --- a/app/src/components/pages/divisionPage/divisionPage.tsx +++ b/app/src/components/pages/divisionPage/divisionPage.tsx @@ -17,7 +17,6 @@ import PageLayout from "../../pageLayout/pageLayout"; import { headerBreakpoints } from "../../../utils/breakpoints"; import { CardsGrid } from "../../grids/cardsGrid"; import { slugToString, totalNumPages } from "../../../utils/utils"; -import useBreakpoints from "../../../hooks/useBreakpoints"; import { DC_URL } from "@/src/config/constants"; import { Lane as DCLane } from "../../lane/lane"; import LaneLoading from "../../lane/laneLoading"; @@ -39,8 +38,6 @@ export default function DivisionPage({ data }: any) { const { replace } = useRouter(); - const { isLargerThanLargeTablet } = useBreakpoints(); - const totalPages = totalNumPages(data.numFound, data.perPage); const updatePageURL = async (pageNumber: number) => { diff --git a/app/src/components/search/content.tsx b/app/src/components/search/content.tsx index 918c56cc..91753ba7 100644 --- a/app/src/components/search/content.tsx +++ b/app/src/components/search/content.tsx @@ -15,7 +15,6 @@ const SearchContent = ({ showFilter, isSearchPage, data }) => { const query = queryParams.toString(); const router = useRouter(); - const pathname = usePathname(); const totalPages = 3; // TODO: change to be dynamic after API hookup @@ -39,8 +38,6 @@ const SearchContent = ({ showFilter, isSearchPage, data }) => { return ( <> -

Search params: {query}

-
{showFilter ? ( <> diff --git a/app/src/utils/api.ts b/app/src/utils/api.ts index d58946d9..ec81fd23 100644 --- a/app/src/utils/api.ts +++ b/app/src/utils/api.ts @@ -29,7 +29,6 @@ export const getHomePageData = async () => { }); const newResponse = { randomNumber, lanesWithNumItems: updatedLanes }; - console.log("new response is: ", newResponse); return newResponse; }; @@ -250,13 +249,25 @@ export const getDivisionData = async ({ }; export const getCollectionsData = async ({ + title = "", + sortID = "chronological-descending", pageNum = 1, perPage = CARDS_PER_PAGE, }: { + title?: string; + sortID?: string; pageNum?: number; perPage?: number; } = {}) => { - let apiUrl = `${process.env.API_URL}/api/v2/collections?page=${pageNum}&per_page=${perPage}`; + // sort needs to be parameterized for repo api + let sortOptions = { + "chronological-descending": "date DESC", + "chronological-ascending": "date ASC", + "alphabetical-descending": "title DESC", + "alphabetical-ascending": "title ASC", + }; + + let apiUrl = `${process.env.API_URL}/api/v2/collections?page=${pageNum}&per_page=${perPage}&sort=${sortOptions[sortID]}&q=${title}`; const res = await apiResponse(apiUrl); return res; }; From 6cdaac728fb5ab391795884a4873afc4abda9fad Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Fri, 25 Oct 2024 08:52:53 -0700 Subject: [PATCH 03/55] design updates --- .../pages/collectionsPage/collectionsPage.tsx | 14 +- package-lock.json | 2019 +++-------------- 2 files changed, 276 insertions(+), 1757 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index a79fabf2..96ab94db 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -76,12 +76,22 @@ export const CollectionsPage = ({ data }) => { > hgroup": { + marginBottom: 0, + }, [`@media screen and (min-width: ${headerBreakpoints.smTablet})`]: { maxWidth: "715px", }, "> hgroup > p": { fontWeight: "400 !important", }, + "> a > span": { + fontWeight: "500", + }, + gap: "m", }} > { subtitle="Explore the New York Public Library's diverse collections, including digitized photographs, manuscripts, maps, and more. Start exploring by using the search bar below or browse through the collections." /> { Sort by{" "} {" "} =6.9.0" } }, "node_modules/@babel/core": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.8.tgz", - "integrity": "sha512-Oixnb+DzmRT30qu9d3tJSQkxuygWm32DFykT4bRoORPa9hZ/L4KhVB/XiRm6KG+roIEM7DBQlmg27kw2HZkdZg==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.0.tgz", + "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.25.7", - "@babel/generator": "^7.25.7", - "@babel/helper-compilation-targets": "^7.25.7", - "@babel/helper-module-transforms": "^7.25.7", - "@babel/helpers": "^7.25.7", - "@babel/parser": "^7.25.8", - "@babel/template": "^7.25.7", - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.8", + "@babel/code-frame": "^7.26.0", + "@babel/generator": "^7.26.0", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helpers": "^7.26.0", + "@babel/parser": "^7.26.0", + "@babel/template": "^7.25.9", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.26.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -144,12 +145,13 @@ } }, "node_modules/@babel/generator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.7.tgz", - "integrity": "sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.0.tgz", + "integrity": "sha512-/AIkAmInnWwgEAJGQr9vY0c66Mj6kjkE2ZPB1PurTRaRAh3U+J45sAQMjQDJdh4WbR3l0x5xkimXBKyBXXAu2w==", "dev": true, "dependencies": { - "@babel/types": "^7.25.7", + "@babel/parser": "^7.26.0", + "@babel/types": "^7.26.0", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" @@ -159,13 +161,13 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.7.tgz", - "integrity": "sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz", + "integrity": "sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.25.7", - "@babel/helper-validator-option": "^7.25.7", + "@babel/compat-data": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" @@ -184,28 +186,27 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.7.tgz", - "integrity": "sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", + "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", "dev": true, "dependencies": { - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.7.tgz", - "integrity": "sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", + "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", "dev": true, "dependencies": { - "@babel/helper-module-imports": "^7.25.7", - "@babel/helper-simple-access": "^7.25.7", - "@babel/helper-validator-identifier": "^7.25.7", - "@babel/traverse": "^7.25.7" + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -215,89 +216,61 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.7.tgz", - "integrity": "sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.25.7.tgz", - "integrity": "sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz", + "integrity": "sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==", "dev": true, - "dependencies": { - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" - }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz", - "integrity": "sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", - "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.7.tgz", - "integrity": "sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", + "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.7.tgz", - "integrity": "sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz", + "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", "dev": true, "dependencies": { - "@babel/template": "^7.25.7", - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.7.tgz", - "integrity": "sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.25.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "@babel/template": "^7.25.9", + "@babel/types": "^7.26.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.8.tgz", - "integrity": "sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.0.tgz", + "integrity": "sha512-aP8x5pIw3xvYr/sXT+SEUwyhrXT8rUJRZltK/qN3Db80dcKpTett8cJxHyjk+xYSVXvNnl2SfcJVjbwxpOSscA==", "dev": true, "dependencies": { - "@babel/types": "^7.25.8" + "@babel/types": "^7.26.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -358,12 +331,12 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.7.tgz", - "integrity": "sha512-AqVo+dguCgmpi/3mYBdu9lkngOBlQ2w2vnNpa6gfiCxQZLzV4ZbhsXitJ2Yblkoe1VQwtHSaNmIaGll/26YWRw==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", + "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -397,12 +370,12 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.7.tgz", - "integrity": "sha512-ruZOnKO+ajVL/MVx+PwNBPOkrnXTXoWMtte1MBpegfCArhqOe3Bj52avVj1huLLxNKYKXYaSxZ2F+woK1ekXfw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", + "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -514,12 +487,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.7.tgz", - "integrity": "sha512-rR+5FDjpCHqqZN2bzZm18bVYGaejGq5ZkpVCJLXor/+zlSrSoc4KWcHI0URVWjl/68Dyr1uwZUz/1njycEAv9g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz", + "integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -529,9 +502,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.7.tgz", - "integrity": "sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -540,30 +513,30 @@ } }, "node_modules/@babel/template": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.7.tgz", - "integrity": "sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", + "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.25.7", - "@babel/parser": "^7.25.7", - "@babel/types": "^7.25.7" + "@babel/code-frame": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.7.tgz", - "integrity": "sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.9.tgz", + "integrity": "sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.25.7", - "@babel/generator": "^7.25.7", - "@babel/parser": "^7.25.7", - "@babel/template": "^7.25.7", - "@babel/types": "^7.25.7", + "@babel/code-frame": "^7.25.9", + "@babel/generator": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/template": "^7.25.9", + "@babel/types": "^7.25.9", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -572,14 +545,13 @@ } }, "node_modules/@babel/types": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.8.tgz", - "integrity": "sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.25.7", - "@babel/helper-validator-identifier": "^7.25.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -2837,21 +2809,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/console/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/@jest/console/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -2868,45 +2825,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@jest/console/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/console/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/@jest/console/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/console/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/core": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", @@ -2954,21 +2872,6 @@ } } }, - "node_modules/@jest/core/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/@jest/core/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -2985,33 +2888,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@jest/core/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/core/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/@jest/core/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/core/node_modules/pretty-format": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", @@ -3044,18 +2920,6 @@ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, - "node_modules/@jest/core/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/environment": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", @@ -3171,21 +3035,6 @@ } } }, - "node_modules/@jest/reporters/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/@jest/reporters/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -3202,24 +3051,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@jest/reporters/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/reporters/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/@jest/reporters/node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -3241,27 +3072,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@jest/reporters/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/reporters/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/schemas": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", @@ -3344,21 +3154,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/transform/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/@jest/transform/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -3375,51 +3170,12 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@jest/transform/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@jest/transform/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/@jest/transform/node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, - "node_modules/@jest/transform/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/transform/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/types": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", @@ -3437,21 +3193,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/types/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/@jest/types/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -3468,74 +3209,35 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@jest/types/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "color-name": "~1.1.4" + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { - "node": ">=7.0.0" + "node": ">=6.0.0" } }, - "node_modules/@jest/types/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "engines": { + "node": ">=6.0.0" + } }, - "node_modules/@jest/types/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/types/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "engines": { - "node": ">=6.0.0" + "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { @@ -5017,9 +4719,9 @@ "dev": true }, "node_modules/@samvera/clover-iiif": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/@samvera/clover-iiif/-/clover-iiif-2.10.1.tgz", - "integrity": "sha512-jtLZoA1n6P1HspTjW4x0QOEMue6g2eF4+Ha+QAopJkvHNwwSppg++6uK62d+r3V19r4LmYHlK5wNcQFXMqeH9w==", + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/@samvera/clover-iiif/-/clover-iiif-2.10.2.tgz", + "integrity": "sha512-3BnPNu+Oy7R5z2ryfQTDwGHI1hxEYScPb88OOah6Z76bErPO8XS/leGIfSLMiePYXPzSMCm0kAuzYlDU8d5YhQ==", "dependencies": { "@iiif/parser": "^1.1.2", "@iiif/vault": "^0.9.22", @@ -5140,21 +4842,6 @@ "node": ">=14" } }, - "node_modules/@testing-library/dom/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/@testing-library/dom/node_modules/aria-query": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", @@ -5180,45 +4867,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@testing-library/dom/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@testing-library/dom/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/@testing-library/dom/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@testing-library/dom/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@testing-library/jest-dom": { "version": "6.1.4", "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.1.4.tgz", @@ -5260,73 +4908,6 @@ } } }, - "node_modules/@testing-library/jest-dom/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@testing-library/jest-dom/node_modules/chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@testing-library/jest-dom/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@testing-library/jest-dom/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/@testing-library/jest-dom/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@testing-library/jest-dom/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@testing-library/react": { "version": "14.0.0", "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-14.0.0.tgz", @@ -5567,9 +5148,9 @@ "dev": true }, "node_modules/@types/lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-YpS0zzoduEhuOWjAotS6A5AVCva7X4lVlYLF0FYHAY9sdraBfnatttHItlWeZdGhuEkf+OzMNg2ZYAx8t+52uQ==", + "version": "4.17.12", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.12.tgz", + "integrity": "sha512-sviUmCE8AYdaF/KIHLDJBQgeYzPBI0vf/17NaYehBJfYD1j6/L95Slh07NlyK2iNyBNaEkb3En2jRt+a8y3xZQ==", "dev": true }, "node_modules/@types/lodash.mergewith": { @@ -5595,9 +5176,9 @@ "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" }, "node_modules/@types/newrelic": { - "version": "9.14.4", - "resolved": "https://registry.npmjs.org/@types/newrelic/-/newrelic-9.14.4.tgz", - "integrity": "sha512-/Wtr8evFvbOo0P3BNL8gKJiVUDDuAJ9wjwAb7UdmN+amxP5nrR7L8dvyJ5jZmLUmKSiFzMBX7xbMydnRgRoSyQ==", + "version": "9.14.5", + "resolved": "https://registry.npmjs.org/@types/newrelic/-/newrelic-9.14.5.tgz", + "integrity": "sha512-GqpjINi1Wp3bAV7txVGRdPr9jMO1DvEW3ICN0X3bviboQXnj5apYCk+1bAVAFF2gCz6HQqJ2IBaR8pnPw+ucaQ==", "dev": true }, "node_modules/@types/node": { @@ -5861,9 +5442,9 @@ "optional": true }, "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz", + "integrity": "sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==", "bin": { "acorn": "bin/acorn" }, @@ -5971,15 +5552,17 @@ } }, "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dependencies": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/anymatch": { @@ -6287,21 +5870,6 @@ "@babel/core": "^7.8.0" } }, - "node_modules/babel-jest/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/babel-jest/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -6318,45 +5886,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/babel-jest/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/babel-jest/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/babel-jest/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-jest/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/babel-plugin-istanbul": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", @@ -6521,13 +6050,12 @@ } }, "node_modules/bare-stream": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.3.0.tgz", - "integrity": "sha512-pVRWciewGUeCyKEuRxwv06M079r+fRjAQjBEK2P6OYGrO43O+Z0LrPZZEjlc4mB6C2RpZ9AxJ1s7NLEtOHO6eA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.3.2.tgz", + "integrity": "sha512-EFZHSIBkDgSHIwj2l2QZfP4U5OcD4xFAOwhSb/vlr9PIqyGJGvB/nfClJbcnh3EY4jtPE4zsb5ztae96bVF79A==", "dev": true, "optional": true, "dependencies": { - "b4a": "^1.6.6", "streamx": "^2.20.0" } }, @@ -6600,9 +6128,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", - "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", "dev": true, "funding": [ { @@ -6619,10 +6147,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001663", - "electron-to-chromium": "^1.5.28", + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" + "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" @@ -6759,9 +6287,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001667", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz", - "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==", + "version": "1.0.30001669", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001669.tgz", + "integrity": "sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w==", "funding": [ { "type": "opencollective", @@ -6792,26 +6320,16 @@ } }, "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", "dev": true, "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=4" - } - }, - "node_modules/chalk/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" + "node": ">=8" } }, "node_modules/char-regex": { @@ -6965,36 +6483,6 @@ "node": ">=12" } }, - "node_modules/cliui/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/cliui/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/cliui/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, "node_modules/cliui/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -7063,17 +6551,20 @@ } }, "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dependencies": { - "color-name": "1.1.3" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/color-string": { "version": "1.9.1", @@ -7084,6 +6575,19 @@ "simple-swizzle": "^0.2.2" } }, + "node_modules/color/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, "node_modules/color2k": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/color2k/-/color2k-2.0.3.tgz", @@ -7273,21 +6777,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/create-jest/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/create-jest/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -7304,45 +6793,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/create-jest/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/create-jest/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/create-jest/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/create-jest/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -7821,9 +7271,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.35", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.35.tgz", - "integrity": "sha512-hOSRInrIDm0Brzp4IHW2F/VM+638qOL2CzE0DgpnGzKW27C95IqqeqgKz/hxHGnvPxvQGpHUGD5qRVC9EZY2+A==", + "version": "1.5.45", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.45.tgz", + "integrity": "sha512-vOzZS6uZwhhbkZbcRyiy99Wg+pYFV5hk+5YaECvx0+Z31NR3Tt5zS6dze2OepT6PCTzVzT0dIJItti+uAW5zmw==", "dev": true }, "node_modules/emittery": { @@ -8442,12 +7892,12 @@ } }, "node_modules/eslint-plugin-jsx-a11y": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.0.tgz", - "integrity": "sha512-ySOHvXX8eSN6zz8Bywacm7CvGNhUtdjvqfQDVe6020TUK34Cywkw7m0KsCCk1Qtm9G1FayfTN1/7mMYnYO2Bhg==", + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.1.tgz", + "integrity": "sha512-zHByM9WTUMnfsDTafGXRiqxp6lFtNoSOWBY6FonVRn3A+BUwN1L/tdBXT40BcBJi0cZjOGTXZ0eD/rTG9fEJ0g==", "dev": true, "dependencies": { - "aria-query": "~5.1.3", + "aria-query": "^5.3.2", "array-includes": "^3.1.8", "array.prototype.flatmap": "^1.3.2", "ast-types-flow": "^0.0.8", @@ -8455,14 +7905,14 @@ "axobject-query": "^4.1.0", "damerau-levenshtein": "^1.0.8", "emoji-regex": "^9.2.2", - "es-iterator-helpers": "^1.0.19", + "es-iterator-helpers": "^1.1.0", "hasown": "^2.0.2", "jsx-ast-utils": "^3.3.5", "language-tags": "^1.0.9", "minimatch": "^3.1.2", "object.fromentries": "^2.0.8", "safe-regex-test": "^1.0.3", - "string.prototype.includes": "^2.0.0" + "string.prototype.includes": "^2.0.1" }, "engines": { "node": ">=4.0" @@ -8471,28 +7921,19 @@ "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9" } }, - "node_modules/eslint-plugin-jsx-a11y/node_modules/aria-query": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", - "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", - "dev": true, - "dependencies": { - "deep-equal": "^2.0.5" - } - }, "node_modules/eslint-plugin-jsx-a11y/node_modules/axe-core": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.10.0.tgz", - "integrity": "sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g==", + "version": "4.10.2", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.10.2.tgz", + "integrity": "sha512-RE3mdQ7P3FRSe7eqCWoeQ/Z9QXrtniSjp1wUjt5nRC3WIpz5rSCve6o3fsZ2aCpJtrZjSZgjwXAoTO5k4tEI0w==", "dev": true, "engines": { "node": ">=4" } }, "node_modules/eslint-plugin-react": { - "version": "7.37.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.1.tgz", - "integrity": "sha512-xwTnwDqzbDRA8uJ7BMxPs/EXRB3i8ZfnOIp8BsxEQkT0nHPp+WWceqGgo6rKb9ctNi8GJLDT4Go5HAWELa/WMg==", + "version": "7.37.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.2.tgz", + "integrity": "sha512-EsTAnj9fLVr/GZleBLFbj/sSuXeWmp1eXIN60ceYnZveqEaUCyW4X+Vh4WTdUhCkW4xutXYqTXCUSyqD4rB75w==", "dev": true, "dependencies": { "array-includes": "^3.1.8", @@ -8500,7 +7941,7 @@ "array.prototype.flatmap": "^1.3.2", "array.prototype.tosorted": "^1.1.4", "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.0.19", + "es-iterator-helpers": "^1.1.0", "estraverse": "^5.3.0", "hasown": "^2.0.2", "jsx-ast-utils": "^2.4.1 || ^3.0.0", @@ -8522,9 +7963,9 @@ } }, "node_modules/eslint-plugin-react-hooks": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", - "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", + "version": "5.0.0-canary-7118f5dd7-20230705", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.0.0-canary-7118f5dd7-20230705.tgz", + "integrity": "sha512-AZYbMo/NW9chdL7vk6HQzQhT+PvTAEVqWk9ziruUoW2kAOcN5qNyelv70e0F1VNQAbvutOC9oc+xfWycI9FxDw==", "dev": true, "engines": { "node": ">=10" @@ -8597,20 +8038,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/eslint/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -8626,22 +8053,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, "node_modules/eslint/node_modules/globals": { "version": "13.24.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", @@ -8656,25 +8067,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/eslint/node_modules/type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", @@ -9584,9 +8976,9 @@ } }, "node_modules/google-auth-library": { - "version": "9.14.1", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.14.1.tgz", - "integrity": "sha512-Rj+PMjoNFGFTmtItH7gHfbHpGVSb3vmnGK3nwNBqxQF9NoBpttSZI/rc0WiM63ma2uGDQtYEkMHkK9U6937NiA==", + "version": "9.14.2", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.14.2.tgz", + "integrity": "sha512-R+FRIfk1GBo3RdlRYWPdwk8nmtVUOn6+BkDomAC46KoU8kzXzE1HLmOasSCbWUByMMAGkknVF0G5kQ69Vj7dlA==", "dependencies": { "base64-js": "^1.3.0", "ecdsa-sig-formatter": "^1.0.11", @@ -9670,12 +9062,11 @@ } }, "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/has-property-descriptors": { @@ -9870,9 +9261,9 @@ } }, "node_modules/hls.js": { - "version": "1.5.16", - "resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.5.16.tgz", - "integrity": "sha512-+wAWr4aeRq9ODN8/Vgz0Cee1Cw6Ysr7vyEkZJCwOJYNwlld7CNmhKE+dLwfpUO2UuotYLGF0of6UFiN6zA7mig==" + "version": "1.5.17", + "resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.5.17.tgz", + "integrity": "sha512-wA66nnYFvQa1o4DO/BFgLNRKnBTVXpNeldGRBJ2Y0SvFtdwvFKCbqa9zhHoZLoxHhZ+jYsj3aIBkWQQCPNOhMw==" }, "node_modules/hoist-non-react-statics": { "version": "3.3.2", @@ -10093,9 +9484,9 @@ } }, "node_modules/i18next": { - "version": "23.15.2", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.15.2.tgz", - "integrity": "sha512-zcPSWzCvw6uKnuYHIqs4W7hTuB9e3AFcSdZgvCWoPXIZsBjBd4djN2/2uOHIB+1DFFkQnMBXvhNg7J3WyCuywQ==", + "version": "23.16.4", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.16.4.tgz", + "integrity": "sha512-9NIYBVy9cs4wIqzurf7nLXPyf3R78xYbxExVqHLK9od3038rjpyOEzW+XB130kZ1N4PZ9inTtJ471CRJ4Ituyg==", "funding": [ { "type": "individual", @@ -10778,27 +10169,6 @@ "node": ">=10" } }, - "node_modules/istanbul-lib-report/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/istanbul-lib-source-maps": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", @@ -10910,21 +10280,6 @@ "node": ">= 14.0.0" } }, - "node_modules/jest-axe/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-axe/node_modules/axe-core": { "version": "4.7.2", "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.7.2.tgz", @@ -10950,33 +10305,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-axe/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-axe/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jest-axe/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-axe/node_modules/jest-matcher-utils": { "version": "29.2.2", "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.2.2.tgz", @@ -11024,18 +10352,6 @@ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, - "node_modules/jest-axe/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-changed-files": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", @@ -11081,21 +10397,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-circus/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-circus/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -11112,33 +10413,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-circus/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-circus/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jest-circus/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-circus/node_modules/pretty-format": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", @@ -11171,18 +10445,6 @@ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, - "node_modules/jest-circus/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-cli": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", @@ -11216,25 +10478,10 @@ } } }, - "node_modules/jest-cli/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-cli/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/jest-cli/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { "ansi-styles": "^4.1.0", @@ -11247,45 +10494,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-cli/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-cli/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jest-cli/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-cli/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-config": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", @@ -11331,21 +10539,6 @@ } } }, - "node_modules/jest-config/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-config/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -11362,24 +10555,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-config/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-config/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/jest-config/node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -11401,15 +10576,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/jest-config/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-config/node_modules/pretty-format": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", @@ -11442,18 +10608,6 @@ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, - "node_modules/jest-config/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-diff": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", @@ -11469,21 +10623,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-diff/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-diff/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -11500,33 +10639,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-diff/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-diff/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jest-diff/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-diff/node_modules/pretty-format": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", @@ -11559,18 +10671,6 @@ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, - "node_modules/jest-diff/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-docblock": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", @@ -11599,21 +10699,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-each/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-each/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -11630,33 +10715,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-each/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-each/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jest-each/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-each/node_modules/pretty-format": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", @@ -11689,18 +10747,6 @@ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, - "node_modules/jest-each/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-environment-jsdom": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.7.0.tgz", @@ -11839,21 +10885,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-matcher-utils/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-matcher-utils/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -11870,33 +10901,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-matcher-utils/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-matcher-utils/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jest-matcher-utils/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-matcher-utils/node_modules/pretty-format": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", @@ -11929,18 +10933,6 @@ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, - "node_modules/jest-matcher-utils/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-message-util": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", @@ -11961,21 +10953,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-message-util/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-message-util/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -11992,33 +10969,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-message-util/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-message-util/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jest-message-util/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-message-util/node_modules/pretty-format": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", @@ -12051,18 +11001,6 @@ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, - "node_modules/jest-message-util/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-mock": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", @@ -12136,21 +11074,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-resolve/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-resolve/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -12167,45 +11090,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-resolve/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-resolve/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jest-resolve/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-resolve/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-runner": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", @@ -12238,21 +11122,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runner/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-runner/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -12269,45 +11138,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-runner/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-runner/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jest-runner/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runner/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-runtime": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", @@ -12341,21 +11171,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runtime/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-runtime/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -12372,24 +11187,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-runtime/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-runtime/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/jest-runtime/node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -12411,27 +11208,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/jest-runtime/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-runtime/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-snapshot": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", @@ -12460,22 +11236,7 @@ "semver": "^7.5.3" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-snapshot/node_modules/chalk": { @@ -12494,33 +11255,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-snapshot/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-snapshot/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jest-snapshot/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-snapshot/node_modules/pretty-format": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", @@ -12553,18 +11287,6 @@ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, - "node_modules/jest-snapshot/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-util": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", @@ -12582,21 +11304,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-util/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-util/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -12613,45 +11320,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-util/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-util/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jest-util/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-util/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-validate": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", @@ -12669,21 +11337,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-validate/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-validate/node_modules/camelcase": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", @@ -12712,33 +11365,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-validate/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-validate/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jest-validate/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-validate/node_modules/pretty-format": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", @@ -12771,18 +11397,6 @@ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, - "node_modules/jest-validate/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-watcher": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", @@ -12802,21 +11416,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-watcher/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-watcher/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -12833,45 +11432,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-watcher/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jest-watcher/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jest-watcher/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-watcher/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-worker": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", @@ -12887,15 +11447,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-worker/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/jest-worker/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -13657,9 +12208,9 @@ } }, "node_modules/markdown-table": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.3.tgz", - "integrity": "sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-3.0.4.tgz", + "integrity": "sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -13692,9 +12243,9 @@ } }, "node_modules/mdast-util-from-markdown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.1.tgz", - "integrity": "sha512-aJEUyzZ6TzlsX2s5B4Of7lN7EQtAxvtradMMglCQDyaTFgse6CmtmdJ15ElnVRlCg1vpNyVtbem0PWzlNieZsA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.2.tgz", + "integrity": "sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==", "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", @@ -14691,9 +13242,9 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/nan": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.21.0.tgz", - "integrity": "sha512-MCpOGmdWvAOMi4RWnpxS5G24l7dVMtdSHtV87I3ltjaLdFOTO74HVJ+DfYiAXjxGKsYR/UCmm1rBwhMN7KqS1A==", + "version": "2.22.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.0.tgz", + "integrity": "sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==", "optional": true }, "node_modules/nanoid": { @@ -14719,9 +13270,9 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" }, "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz", + "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==", "optional": true, "engines": { "node": ">= 0.6" @@ -14822,9 +13373,9 @@ } }, "node_modules/node-abi": { - "version": "3.68.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.68.0.tgz", - "integrity": "sha512-7vbj10trelExNjFSBm5kTvZXXa7pZyKWx9RCKIyqe6I9Ev3IzGpQoqBP3a+cOdxY+pWj6VkP28n/2wWysBHD/A==", + "version": "3.71.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.71.0.tgz", + "integrity": "sha512-SZ40vRiy/+wRTf21hxkkEjPJZpARzUMVcJoQse2EF8qkUWbbO2z7vd5oA/H6bVH6SZQ5STGcu0KRDS7biNRfxw==", "optional": true, "dependencies": { "semver": "^7.3.5" @@ -15327,11 +13878,11 @@ "optional": true }, "node_modules/parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.0.tgz", + "integrity": "sha512-ZkDsAOcxsUMZ4Lz5fVciOehNcJ+Gb8gTzcA4yl3wnc273BAybYWrQ+Ks/OjCjSEpjvQkDSeZbybK9qj2VHHdGA==", "dependencies": { - "entities": "^4.4.0" + "entities": "^4.5.0" }, "funding": { "url": "https://github.com/inikulin/parse5?sponsor=1" @@ -15404,9 +13955,9 @@ "dev": true }, "node_modules/picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -15990,9 +14541,9 @@ } }, "node_modules/react-error-boundary": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-4.0.13.tgz", - "integrity": "sha512-b6PwbdSv8XeOSYvjt8LpgpKrZ0yGdtZokYwkwV2wlcZbxgopHX/hgPl5VgpnoVOWd868n1hktM8Qm4b+02MiLQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-4.1.2.tgz", + "integrity": "sha512-GQDxZ5Jd+Aq/qUxbCm1UtzmL/s++V7zKgE8yMktJiCQXCCFZnMZh9ng+6/Ne6PjNSXH0L9CjeOEREfRnq6Duag==", "dependencies": { "@babel/runtime": "^7.12.5" }, @@ -16030,9 +14581,9 @@ } }, "node_modules/react-i18next": { - "version": "15.0.2", - "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-15.0.2.tgz", - "integrity": "sha512-z0W3/RES9Idv3MmJUcf0mDNeeMOUXe+xoL0kPfQPbDoZHmni/XsIoq5zgT2MCFUiau283GuBUK578uD/mkAbLQ==", + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-15.1.0.tgz", + "integrity": "sha512-zj3nJynMnZsy2gPZiOTC7XctCY5eQGqT3tcKMmfJWC9FMvgd+960w/adq61j8iPzpwmsXejqID9qC3Mqu1Xu2Q==", "dependencies": { "@babel/runtime": "^7.25.0", "html-parse-stringify": "^3.0.1" @@ -17114,13 +15665,17 @@ "integrity": "sha512-n69H31OnxSGSZyZbgBlvYIXlrMhJQ0dQAX1js1QDhpaUH6zmU3QYlj07bCwCNlPOu3oRXIubGPl2gDGnHsiCqg==" }, "node_modules/string.prototype.includes": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.0.tgz", - "integrity": "sha512-E34CkBgyeqNDcrbU76cDjL5JLcVrtSdYq0MEh/B10r17pRP4ciHLwTgnuLV8Ay6cgEMLkcBkFCKyFZ43YldYzg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz", + "integrity": "sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==", "dev": true, "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/string.prototype.matchall": { @@ -17315,15 +15870,14 @@ "dev": true }, "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dependencies": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -17551,13 +16105,10 @@ } }, "node_modules/text-decoder": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.0.tgz", - "integrity": "sha512-n1yg1mOj9DNpk3NeZOx7T6jchTbyJS3i3cucbNN6FcdPriMZx7NsgrGpWWdWZZGxD7ES1XB+3uoqHMgOKaN+fg==", - "dev": true, - "dependencies": { - "b4a": "^1.6.4" - } + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.1.tgz", + "integrity": "sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ==", + "dev": true }, "node_modules/text-hex": { "version": "1.0.0", @@ -17677,15 +16228,6 @@ "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -17854,9 +16396,9 @@ } }, "node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", + "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==" }, "node_modules/type-check": { "version": "0.4.0", @@ -18712,39 +17254,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "devOptional": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "devOptional": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "devOptional": true - }, "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", From 14c7981d1a6065a9d750e3aff9b0f219d5ffd87f Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Fri, 25 Oct 2024 11:34:00 -0700 Subject: [PATCH 04/55] fix merge conflict in package lock --- package-lock.json | 167 ++++------------------------------------------ 1 file changed, 12 insertions(+), 155 deletions(-) diff --git a/package-lock.json b/package-lock.json index 442e744d..d468e2c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4652,9 +4652,6 @@ "dev": true }, "node_modules/@samvera/clover-iiif": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/@samvera/clover-iiif/-/clover-iiif-2.10.2.tgz", - "integrity": "sha512-3BnPNu+Oy7R5z2ryfQTDwGHI1hxEYScPb88OOah6Z76bErPO8XS/leGIfSLMiePYXPzSMCm0kAuzYlDU8d5YhQ==", "version": "2.10.2", "resolved": "https://registry.npmjs.org/@samvera/clover-iiif/-/clover-iiif-2.10.2.tgz", "integrity": "sha512-3BnPNu+Oy7R5z2ryfQTDwGHI1hxEYScPb88OOah6Z76bErPO8XS/leGIfSLMiePYXPzSMCm0kAuzYlDU8d5YhQ==", @@ -5084,9 +5081,6 @@ "dev": true }, "node_modules/@types/lodash": { - "version": "4.17.12", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.12.tgz", - "integrity": "sha512-sviUmCE8AYdaF/KIHLDJBQgeYzPBI0vf/17NaYehBJfYD1j6/L95Slh07NlyK2iNyBNaEkb3En2jRt+a8y3xZQ==", "version": "4.17.12", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.12.tgz", "integrity": "sha512-sviUmCE8AYdaF/KIHLDJBQgeYzPBI0vf/17NaYehBJfYD1j6/L95Slh07NlyK2iNyBNaEkb3En2jRt+a8y3xZQ==", @@ -5115,9 +5109,6 @@ "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" }, "node_modules/@types/newrelic": { - "version": "9.14.5", - "resolved": "https://registry.npmjs.org/@types/newrelic/-/newrelic-9.14.5.tgz", - "integrity": "sha512-GqpjINi1Wp3bAV7txVGRdPr9jMO1DvEW3ICN0X3bviboQXnj5apYCk+1bAVAFF2gCz6HQqJ2IBaR8pnPw+ucaQ==", "version": "9.14.5", "resolved": "https://registry.npmjs.org/@types/newrelic/-/newrelic-9.14.5.tgz", "integrity": "sha512-GqpjINi1Wp3bAV7txVGRdPr9jMO1DvEW3ICN0X3bviboQXnj5apYCk+1bAVAFF2gCz6HQqJ2IBaR8pnPw+ucaQ==", @@ -5302,18 +5293,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@typescript-eslint/visitor-keys": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz", @@ -5387,9 +5366,6 @@ "optional": true }, "node_modules/acorn": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz", - "integrity": "sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==", "version": "8.13.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz", "integrity": "sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==", @@ -5988,9 +5964,6 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.3.2.tgz", "integrity": "sha512-EFZHSIBkDgSHIwj2l2QZfP4U5OcD4xFAOwhSb/vlr9PIqyGJGvB/nfClJbcnh3EY4jtPE4zsb5ztae96bVF79A==", - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.3.1.tgz", - "integrity": "sha512-Vm8kAeOcfzHPTH8sq0tHBnUqYrkXdroaBVVylqFT4cF5wnMfKEIxxy2jIGu2zKVNl9P8MAP9XBWwXJ9N2+jfEw==", "dev": true, "optional": true, "dependencies": { @@ -6196,9 +6169,6 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001669", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001669.tgz", - "integrity": "sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w==", "version": "1.0.30001669", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001669.tgz", "integrity": "sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w==", @@ -7182,12 +7152,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.45", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.45.tgz", - "integrity": "sha512-vOzZS6uZwhhbkZbcRyiy99Wg+pYFV5hk+5YaECvx0+Z31NR3Tt5zS6dze2OepT6PCTzVzT0dIJItti+uAW5zmw==", - "version": "1.5.41", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.41.tgz", - "integrity": "sha512-dfdv/2xNjX0P8Vzme4cfzHqnPm5xsZXwsolTYr0eyW18IUmNyG08vL+fttvinTfhKfIKdRoqkDIC9e9iWQCNYQ==", + "version": "1.5.46", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.46.tgz", + "integrity": "sha512-1XDk0Z8/YRgB2t5GeEg8DPK592DLjVmd/5uwAu6c/S4Z0CUwV/RwYqe5GWxQqcoN3bJ5U7hYMiMRPZzpCzSBhQ==", "dev": true }, "node_modules/emittery": { @@ -7781,6 +7748,15 @@ "node": ">=0.10.0" } }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/eslint-plugin-jsx-a11y": { "version": "6.10.1", "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.1.tgz", @@ -7796,7 +7772,6 @@ "damerau-levenshtein": "^1.0.8", "emoji-regex": "^9.2.2", "es-iterator-helpers": "^1.1.0", - "es-iterator-helpers": "^1.1.0", "hasown": "^2.0.2", "jsx-ast-utils": "^3.3.5", "language-tags": "^1.0.9", @@ -7804,7 +7779,6 @@ "object.fromentries": "^2.0.8", "safe-regex-test": "^1.0.3", "string.prototype.includes": "^2.0.1" - "string.prototype.includes": "^2.0.1" }, "engines": { "node": ">=4.0" @@ -7855,9 +7829,6 @@ } }, "node_modules/eslint-plugin-react-hooks": { - "version": "5.0.0-canary-7118f5dd7-20230705", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.0.0-canary-7118f5dd7-20230705.tgz", - "integrity": "sha512-AZYbMo/NW9chdL7vk6HQzQhT+PvTAEVqWk9ziruUoW2kAOcN5qNyelv70e0F1VNQAbvutOC9oc+xfWycI9FxDw==", "version": "5.0.0-canary-7118f5dd7-20230705", "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.0.0-canary-7118f5dd7-20230705.tgz", "integrity": "sha512-AZYbMo/NW9chdL7vk6HQzQhT+PvTAEVqWk9ziruUoW2kAOcN5qNyelv70e0F1VNQAbvutOC9oc+xfWycI9FxDw==", @@ -8853,9 +8824,6 @@ } }, "node_modules/google-auth-library": { - "version": "9.14.2", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.14.2.tgz", - "integrity": "sha512-R+FRIfk1GBo3RdlRYWPdwk8nmtVUOn6+BkDomAC46KoU8kzXzE1HLmOasSCbWUByMMAGkknVF0G5kQ69Vj7dlA==", "version": "9.14.2", "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.14.2.tgz", "integrity": "sha512-R+FRIfk1GBo3RdlRYWPdwk8nmtVUOn6+BkDomAC46KoU8kzXzE1HLmOasSCbWUByMMAGkknVF0G5kQ69Vj7dlA==", @@ -9144,9 +9112,6 @@ "version": "1.5.17", "resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.5.17.tgz", "integrity": "sha512-wA66nnYFvQa1o4DO/BFgLNRKnBTVXpNeldGRBJ2Y0SvFtdwvFKCbqa9zhHoZLoxHhZ+jYsj3aIBkWQQCPNOhMw==" - "version": "1.5.17", - "resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.5.17.tgz", - "integrity": "sha512-wA66nnYFvQa1o4DO/BFgLNRKnBTVXpNeldGRBJ2Y0SvFtdwvFKCbqa9zhHoZLoxHhZ+jYsj3aIBkWQQCPNOhMw==" }, "node_modules/hoist-non-react-statics": { "version": "3.3.2", @@ -9364,9 +9329,6 @@ "version": "23.16.4", "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.16.4.tgz", "integrity": "sha512-9NIYBVy9cs4wIqzurf7nLXPyf3R78xYbxExVqHLK9od3038rjpyOEzW+XB130kZ1N4PZ9inTtJ471CRJ4Ituyg==", - "version": "23.16.2", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.16.2.tgz", - "integrity": "sha512-dFyxwLXxEQK32f6tITBMaRht25mZPJhQ0WbC0p3bO2mWBal9lABTMqSka5k+GLSRWLzeJBKDpH7BeIA9TZI7Jg==", "funding": [ { "type": "individual", @@ -9634,18 +9596,6 @@ "semver": "^7.6.3" } }, - "node_modules/is-bun-module/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", @@ -10041,18 +9991,6 @@ "node": ">=10" } }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/istanbul-lib-report": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", @@ -12068,18 +12006,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/make-dir/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -13048,17 +12974,6 @@ "@prisma/prisma-fmt-wasm": "^4.17.0-16.27eb2449f178cd9fe1a4b892d732cc4795f75085" } }, - "node_modules/newrelic/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/next": { "version": "14.2.3", "resolved": "https://registry.npmjs.org/next/-/next-14.2.3.tgz", @@ -13536,15 +13451,11 @@ "optional": true }, "node_modules/parse5": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.0.tgz", - "integrity": "sha512-ZkDsAOcxsUMZ4Lz5fVciOehNcJ+Gb8gTzcA4yl3wnc273BAybYWrQ+Ks/OjCjSEpjvQkDSeZbybK9qj2VHHdGA==", "version": "7.2.0", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.0.tgz", "integrity": "sha512-ZkDsAOcxsUMZ4Lz5fVciOehNcJ+Gb8gTzcA4yl3wnc273BAybYWrQ+Ks/OjCjSEpjvQkDSeZbybK9qj2VHHdGA==", "dependencies": { "entities": "^4.5.0" - "entities": "^4.5.0" }, "funding": { "url": "https://github.com/inikulin/parse5?sponsor=1" @@ -13620,9 +13531,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -14184,9 +14092,6 @@ } }, "node_modules/react-error-boundary": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-4.1.2.tgz", - "integrity": "sha512-GQDxZ5Jd+Aq/qUxbCm1UtzmL/s++V7zKgE8yMktJiCQXCCFZnMZh9ng+6/Ne6PjNSXH0L9CjeOEREfRnq6Duag==", "version": "4.1.2", "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-4.1.2.tgz", "integrity": "sha512-GQDxZ5Jd+Aq/qUxbCm1UtzmL/s++V7zKgE8yMktJiCQXCCFZnMZh9ng+6/Ne6PjNSXH0L9CjeOEREfRnq6Duag==", @@ -14227,9 +14132,6 @@ } }, "node_modules/react-i18next": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-15.1.0.tgz", - "integrity": "sha512-zj3nJynMnZsy2gPZiOTC7XctCY5eQGqT3tcKMmfJWC9FMvgd+960w/adq61j8iPzpwmsXejqID9qC3Mqu1Xu2Q==", "version": "15.1.0", "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-15.1.0.tgz", "integrity": "sha512-zj3nJynMnZsy2gPZiOTC7XctCY5eQGqT3tcKMmfJWC9FMvgd+960w/adq61j8iPzpwmsXejqID9qC3Mqu1Xu2Q==", @@ -15293,9 +15195,6 @@ "integrity": "sha512-n69H31OnxSGSZyZbgBlvYIXlrMhJQ0dQAX1js1QDhpaUH6zmU3QYlj07bCwCNlPOu3oRXIubGPl2gDGnHsiCqg==" }, "node_modules/string.prototype.includes": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz", - "integrity": "sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==", "version": "2.0.1", "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz", "integrity": "sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==", @@ -15305,12 +15204,6 @@ "define-properties": "^1.2.1", "es-abstract": "^1.23.3" }, - "engines": { - "node": ">= 0.4" - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3" - }, "engines": { "node": ">= 0.4" } @@ -15962,9 +15855,6 @@ "version": "2.8.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==" - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", - "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==" }, "node_modules/type-check": { "version": "0.4.0", @@ -16796,39 +16686,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", From 8e6374ca152d46744995d3586675a4374254cabd Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 28 Oct 2024 12:55:43 -0700 Subject: [PATCH 05/55] add todos and fix some weird edge cases --- app/src/components/grids/cardsGrid.tsx | 4 ++-- .../pages/collectionsPage/collectionsPage.tsx | 21 +++++++++++++++++-- app/src/utils/utils.ts | 7 ++++++- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/app/src/components/grids/cardsGrid.tsx b/app/src/components/grids/cardsGrid.tsx index 5365706a..f1293b68 100644 --- a/app/src/components/grids/cardsGrid.tsx +++ b/app/src/components/grids/cardsGrid.tsx @@ -20,10 +20,10 @@ export const CardsGrid = ({ records }: CardsGridProps) => { const isCollections = isCollectionType(records); const cardRef = useRef(null); const tooltipOffset = useTooltipOffset(cardRef); - + const sanitizedRecords = typeof records === "object" ? [records] : records; return ( - {records?.map((record, index) => { + {sanitizedRecords?.map((record, index) => { if (isCollections) { const collectionCardModel = new CollectionCardModel(record); return ( diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 96ab94db..a2effc2a 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -28,7 +28,7 @@ export const CollectionsPage = ({ data }) => { const queryParams = useSearchParams(); const query = queryParams.toString(); const pathname = usePathname(); - + const keyword = queryParams.get("keyword"); const [isLoaded, setIsLoaded] = useState(false); const [currentPage, setCurrentPage] = useState( Number(queryParams.get("page")) || 1 @@ -37,6 +37,18 @@ export const CollectionsPage = ({ data }) => { const totalPages = totalNumPages(numFound, data.perPage); console.log("data: ", data); + // search + function handleSearch(term: string) { + const params = new URLSearchParams(); + console.log(term); + if (term) { + params.set("query", term); + } else { + params.delete("query"); + } + replace(`${pathname}?${queryParams.toString()}`); + } + // pagination const updatePageURL = async (pageNumber: number) => { const params = new URLSearchParams(); @@ -99,6 +111,7 @@ export const CollectionsPage = ({ data }) => { text="Collections" subtitle="Explore the New York Public Library's diverse collections, including digitized photographs, manuscripts, maps, and more. Start exploring by using the search bar below or browse through the collections." /> + {/* TODO: if keyword provided in the url, maybe we should set the text in the input box to be the keyword provided */} { isClearable: true, labelText: "Search by collection title", name: "keyword", - placeholder: "Search by collection title", + placeholder: keyword ? keyword : "Search by collection title", }} onSubmit={function (event: React.FormEvent): void {}} // fix + onChange={(e) => { + handleSearch(e.target.value); + }} labelText={""} + defaultValue={query} /> diff --git a/app/src/utils/utils.ts b/app/src/utils/utils.ts index ecc40c05..b04d87ad 100644 --- a/app/src/utils/utils.ts +++ b/app/src/utils/utils.ts @@ -100,8 +100,13 @@ export const totalNumPages = (numResults: string, perPage: string): number => { return Math.ceil(parseInt(numResults) / parseInt(perPage)); }; +// alright, TODO: if the api response only returns one item, it doesn't return an array but rather returns the solo object ie. search "cat" export function isCollectionType( records: CollectionDataType[] | ItemDataType[] ): records is CollectionDataType[] { - return "numberOfDigitizedItems" in records[0]; + if (records.length >= 1) { + return "numberOfDigitizedItems" in records[0]; + } else { + return "numberOfDigitizedItems" in records; + } } From bba56bf57c7433a47c9d097d857a7bf95d46ae0e Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Tue, 29 Oct 2024 13:59:21 -0700 Subject: [PATCH 06/55] still broken but cleaned up a bit lol --- app/collections/page.tsx | 4 +- app/src/components/grids/cardsGrid.tsx | 7 ++- .../pages/collectionsPage/collectionsPage.tsx | 52 ++++++++++--------- app/src/utils/api.ts | 15 +++--- 4 files changed, 42 insertions(+), 36 deletions(-) diff --git a/app/collections/page.tsx b/app/collections/page.tsx index 4c791319..e276038a 100644 --- a/app/collections/page.tsx +++ b/app/collections/page.tsx @@ -7,7 +7,7 @@ import { redirect } from "next/navigation"; export type CollectionsProps = { params: { slug: string }; - searchParams: { page: number; sort: string; keyword: string }; + searchParams: { page: number; sort: string; collection_keyword: string }; }; export const metadata: Metadata = { @@ -16,7 +16,7 @@ export const metadata: Metadata = { export default async function Collections({ searchParams }: CollectionsProps) { const data = await getCollectionsData({ - title: searchParams.keyword, + keyword: searchParams.collection_keyword, sortID: searchParams.sort, pageNum: searchParams.page, }); diff --git a/app/src/components/grids/cardsGrid.tsx b/app/src/components/grids/cardsGrid.tsx index f1293b68..517ccd7a 100644 --- a/app/src/components/grids/cardsGrid.tsx +++ b/app/src/components/grids/cardsGrid.tsx @@ -17,13 +17,16 @@ interface CardsGridProps { export const CardsGrid = ({ records }: CardsGridProps) => { const { isLargerThanLargeTablet } = useBreakpoints(); + console.log("typeof record", typeof records); + // const sanitizedRecords = typeof records === "object" ? [records] : records; + const isCollections = isCollectionType(records); const cardRef = useRef(null); const tooltipOffset = useTooltipOffset(cardRef); - const sanitizedRecords = typeof records === "object" ? [records] : records; + // const sanitizedRecords = typeof records === "object" ? [records] : records; return ( - {sanitizedRecords?.map((record, index) => { + {records?.map((record, index) => { if (isCollections) { const collectionCardModel = new CollectionCardModel(record); return ( diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index a2effc2a..a13b0ffe 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -28,43 +28,47 @@ export const CollectionsPage = ({ data }) => { const queryParams = useSearchParams(); const query = queryParams.toString(); const pathname = usePathname(); - const keyword = queryParams.get("keyword"); + const keyword = queryParams.get("collection_keyword"); + const [isLoaded, setIsLoaded] = useState(false); const [currentPage, setCurrentPage] = useState( Number(queryParams.get("page")) || 1 ); + const numFound = data.numFound ? data.numFound : data.numResults; const totalPages = totalNumPages(numFound, data.perPage); - console.log("data: ", data); + // console.log("data: ", data); // search - function handleSearch(term: string) { - const params = new URLSearchParams(); - console.log(term); - if (term) { - params.set("query", term); - } else { - params.delete("query"); - } - replace(`${pathname}?${queryParams.toString()}`); - } + // function handleSearch(term: string) { + // const params = new URLSearchParams(); + // console.log(term); + // if (term) { + // params.set("collection_keyword", term); + // } else { + // params.delete("collection_keyword"); + // } + // replace(`${pathname}?${queryParams.toString()}`); + // } // pagination const updatePageURL = async (pageNumber: number) => { const params = new URLSearchParams(); + console.log("params are", params); + params.set("page", pageNumber.toString()); setCurrentPage(pageNumber); const url = `${pathname}?${params.toString()}`; replace(url); }; - // sort const createQueryString = (name, value) => { const params = new URLSearchParams(); params.set(name, value); return params.toString(); }; + // sort function onMenuClick(id) { query ? router.push( @@ -118,15 +122,15 @@ export const CollectionsPage = ({ data }) => { textInputProps={{ isClearable: true, labelText: "Search by collection title", - name: "keyword", - placeholder: keyword ? keyword : "Search by collection title", + name: "collection_keyword", + placeholder: "Search by collection title", }} onSubmit={function (event: React.FormEvent): void {}} // fix - onChange={(e) => { - handleSearch(e.target.value); - }} + // onChange={(e) => { + // handleSearch(e.target.value); + // }} labelText={""} - defaultValue={query} + // defaultValue={query} /> @@ -138,29 +142,29 @@ export const CollectionsPage = ({ data }) => { { - // sort needs to be parameterized for repo api let sortOptions = { - "chronological-descending": "date DESC", - "chronological-ascending": "date ASC", - "alphabetical-descending": "title DESC", - "alphabetical-ascending": "title ASC", + date_desc: "date DESC", + date_asc: "date ASC", + "title-desc": "title DESC", + "title-asc": "title ASC", }; - let apiUrl = `${process.env.API_URL}/api/v2/collections?page=${pageNum}&per_page=${perPage}&sort=${sortOptions[sortID]}&q=${title}`; + let apiUrl = `${process.env.API_URL}/api/v2/collections?page=${pageNum}&per_page=${perPage}&sort=${sortOptions[sortID]}&q=${keyword}`; const res = await apiResponse(apiUrl); return res; }; From 334f83a21a1f90528c9a7950dfa0a0d6a81afa26 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Wed, 30 Oct 2024 15:59:50 -0700 Subject: [PATCH 07/55] handleSearch and handleChange work --- app/collections/page.tsx | 6 +- .../pages/collectionsPage/collectionsPage.tsx | 76 ++++++++++++++++--- 2 files changed, 68 insertions(+), 14 deletions(-) diff --git a/app/collections/page.tsx b/app/collections/page.tsx index e276038a..fd856b3c 100644 --- a/app/collections/page.tsx +++ b/app/collections/page.tsx @@ -22,9 +22,9 @@ export default async function Collections({ searchParams }: CollectionsProps) { }); // Repo API returns 404s within the data. - if (data?.headers?.code === "404") { - redirect("/404"); - } + // if (data?.headers?.code === "404") { + // redirect("/404"); + // } return ( diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index a13b0ffe..e5c74d71 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -21,40 +21,79 @@ import { headerBreakpoints } from "../../../utils/breakpoints"; import { CardsGrid } from "../../grids/cardsGrid"; import LaneLoading from "../../lane/laneLoading"; import { slugToString, totalNumPages } from "../../../utils/utils"; +import type { SyntheticEvent } from "react"; export const CollectionsPage = ({ data }) => { const router = useRouter(); const { replace } = useRouter(); - const queryParams = useSearchParams(); - const query = queryParams.toString(); + + const searchParams = useSearchParams(); + const query = searchParams.toString(); + + console.log("searchParams is: ", searchParams); + console.log("query is: ", query); const pathname = usePathname(); - const keyword = queryParams.get("collection_keyword"); + const keyword = searchParams.get("collection_keyword"); const [isLoaded, setIsLoaded] = useState(false); + const [currentPage, setCurrentPage] = useState( - Number(queryParams.get("page")) || 1 + Number(searchParams.get("page")) || 1 + ); + + const [currentSort, setCurrentSort] = useState( + Number(searchParams.get("sort")) || "date-desc" ); + const [currentCollectionKeyword, setCurrentCollectionKeyword] = useState( + Number(searchParams.get("collection_keyword")) || "" + ); + + // pagination const numFound = data.numFound ? data.numFound : data.numResults; const totalPages = totalNumPages(numFound, data.perPage); + // console.log("data: ", data); // search - // function handleSearch(term: string) { + // function handleSubmit(term: string) { // const params = new URLSearchParams(); - // console.log(term); + // console.log("term is", term); // if (term) { // params.set("collection_keyword", term); // } else { // params.delete("collection_keyword"); // } - // replace(`${pathname}?${queryParams.toString()}`); + // console.log("params in handleSearch are: ", params) + // replace(`${pathname}?${searchParams.toString()}`); // } + const handleSubmit = async (e: SyntheticEvent) => { + e.preventDefault(); + + const searchParams = { + collection_keyword: currentCollectionKeyword, + sort: currentSort, + page: currentPage, + }; + + const queryString = createQueryStringFromObject(searchParams); + console.log("queryString is: ", queryString); + await router.push(`${pathname}?${queryString}`); + }; + + const handleChange = ( + e: SyntheticEvent, + setValue: Dispatch> + ) => { + const target = e.target as HTMLInputElement; + setValue(target.value); + }; + // pagination const updatePageURL = async (pageNumber: number) => { const params = new URLSearchParams(); - console.log("params are", params); + console.log("params in updatePageURL are", params); params.set("page", pageNumber.toString()); setCurrentPage(pageNumber); @@ -65,9 +104,23 @@ export const CollectionsPage = ({ data }) => { const createQueryString = (name, value) => { const params = new URLSearchParams(); params.set(name, value); + console.log("params in createQueryString are: ", params); + return params.toString(); }; + const createQueryStringFromObject = (paramObj) => { + const params = new URLSearchParams(); + console.log("paramObj is: ", paramObj); + Object.keys(paramObj).map((name, value) => { + console.log("name: ", name); + console.log("value: ", paramObj[name]); + params.set(name.toString(), paramObj[name].toString()); + }); + console.log("params in createQueryStringFromObject are: ", params); + // params.set(name, value); + return params.toString(); + }; // sort function onMenuClick(id) { query @@ -123,9 +176,10 @@ export const CollectionsPage = ({ data }) => { isClearable: true, labelText: "Search by collection title", name: "collection_keyword", - placeholder: "Search by collection title", + placeholder: "Search by collection title", // TODO: currntCollectionKeyword + onChange: (e) => handleChange(e, setCurrentCollectionKeyword), }} - onSubmit={function (event: React.FormEvent): void {}} // fix + onSubmit={handleSubmit} // TODO: fix // onChange={(e) => { // handleSearch(e.target.value); // }} @@ -142,7 +196,7 @@ export const CollectionsPage = ({ data }) => { Date: Thu, 31 Oct 2024 12:46:22 -0700 Subject: [PATCH 08/55] mmm kind of works --- app/collections/page.tsx | 5 +- .../pages/collectionsPage/collectionsPage.tsx | 100 ++++++++++++------ app/src/models/api/collections.ts | 11 ++ app/src/utils/api.ts | 15 +-- app/src/utils/utils.ts | 7 ++ 5 files changed, 93 insertions(+), 45 deletions(-) create mode 100644 app/src/models/api/collections.ts diff --git a/app/collections/page.tsx b/app/collections/page.tsx index fd856b3c..6a3bea44 100644 --- a/app/collections/page.tsx +++ b/app/collections/page.tsx @@ -1,9 +1,8 @@ import React, { Suspense } from "react"; import { Metadata } from "next"; import { CollectionsPage } from "../src/components/pages/collectionsPage/collectionsPage"; -// import { mockCollectionCards } from "__tests__/__mocks__/data/mockCollectionCards"; import { getCollectionsData } from "@/src/utils/api"; -import { redirect } from "next/navigation"; +// import { redirect } from "next/navigation"; export type CollectionsProps = { params: { slug: string }; @@ -19,7 +18,7 @@ export default async function Collections({ searchParams }: CollectionsProps) { keyword: searchParams.collection_keyword, sortID: searchParams.sort, pageNum: searchParams.page, - }); + }); // TODO: create model for APICollectionsData from API to clean up the data before it's sent down to the components. // Repo API returns 404s within the data. // if (data?.headers?.code === "404") { diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index e5c74d71..18bc00fa 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -68,8 +68,13 @@ export const CollectionsPage = ({ data }) => { // replace(`${pathname}?${searchParams.toString()}`); // } - const handleSubmit = async (e: SyntheticEvent) => { + // taken from research catalog + const handleSearchSubmit = async (e: SyntheticEvent) => { e.preventDefault(); + const target = e.target as HTMLInputElement; + // console.log("e is: ", e) + // console.log("currentKeyword is: ", currentCollectionKeyword) + // setCurrentCollectionKeyword(target.value) const searchParams = { collection_keyword: currentCollectionKeyword, @@ -82,53 +87,74 @@ export const CollectionsPage = ({ data }) => { await router.push(`${pathname}?${queryString}`); }; - const handleChange = ( - e: SyntheticEvent, - setValue: Dispatch> - ) => { + // taken from research catalog + const handleSearchChange = (e: SyntheticEvent, setValue) => { const target = e.target as HTMLInputElement; setValue(target.value); }; // pagination - const updatePageURL = async (pageNumber: number) => { - const params = new URLSearchParams(); - console.log("params in updatePageURL are", params); + // Question: Do we want to introduce debouncing? + const onPageChange = async (pageNumber: number) => { + // const params = new URLSearchParams(); + // console.log("params in updatePageURL are", params); - params.set("page", pageNumber.toString()); + // params.set("page", pageNumber.toString()); setCurrentPage(pageNumber); - const url = `${pathname}?${params.toString()}`; - replace(url); + + // const url = `${pathname}?${params.toString()}`; + // replace(url); + const queryString = createQueryStringFromObject({ + collection_keyword: currentCollectionKeyword, + sort: currentSort, + page: pageNumber.toString(), + }); + console.log("queryString is: ", queryString); + await router.push(`${pathname}?${queryString}`); }; const createQueryString = (name, value) => { const params = new URLSearchParams(); params.set(name, value); - console.log("params in createQueryString are: ", params); - return params.toString(); }; + // TODO: right now, whenever a user hits earch, the url is created with all params including the defaults const createQueryStringFromObject = (paramObj) => { const params = new URLSearchParams(); - console.log("paramObj is: ", paramObj); + // console.log("paramObj is: ", paramObj); Object.keys(paramObj).map((name, value) => { - console.log("name: ", name); - console.log("value: ", paramObj[name]); - params.set(name.toString(), paramObj[name].toString()); + // console.log("name: ", name); + // console.log("value: ", paramObj[name]); + params.set( + name.toString(), + name === "page" ? paramObj[name].toString() : paramObj[name] + ); // TODO: only set params in new params object if param is not the default }); console.log("params in createQueryStringFromObject are: ", params); // params.set(name, value); return params.toString(); }; + // sort - function onMenuClick(id) { - query - ? router.push( - "/collections" + "?" + query + "&" + createQueryString("sort", id) - ) - : router.push("/collections" + "?" + createQueryString("sort", id)); - } + const onMenuClick = async (id) => { + console.log("currentSort before is: ", currentSort); + // console.log("id is:", id) + setCurrentSort(id); + console.log("current sort after is : ", currentSort); + const queryString = createQueryStringFromObject({ + collection_keyword: currentCollectionKeyword, + sort: id, + page: currentPage, + }); + console.log("queryString is: ", queryString); + await router.push(`${pathname}?${queryString}`); + // query + // ? router.push( + // "/collections" + "?" + query + "&" + createQueryString("sort", id) + // ) + // : router.push("/collections" + "?" + createQueryString("sort", id)); + }; useEffect(() => { setIsLoaded(true); @@ -177,14 +203,11 @@ export const CollectionsPage = ({ data }) => { labelText: "Search by collection title", name: "collection_keyword", placeholder: "Search by collection title", // TODO: currntCollectionKeyword - onChange: (e) => handleChange(e, setCurrentCollectionKeyword), + onChange: (e) => handleSearchChange(e, setCurrentCollectionKeyword), }} - onSubmit={handleSubmit} // TODO: fix - // onChange={(e) => { - // handleSearch(e.target.value); - // }} + onSubmit={handleSearchSubmit} // TODO: fix labelText={""} - // defaultValue={query} + // defaultValue={query} //OPEN QUESTION: should the query go in the input /> @@ -243,7 +266,7 @@ export const CollectionsPage = ({ data }) => { initialPage={currentPage} currentPage={currentPage} pageCount={totalPages} - onPageChange={updatePageURL} // TODO: pagination stuff + onPageChange={onPageChange} // TODO: pagination stuff sx={{ display: "flex", justifyContent: "center", @@ -255,3 +278,18 @@ export const CollectionsPage = ({ data }) => { ); }; + +{ + /* + Logic for search/pagination/filter + + If params are present in the URL, load with the provided params. Otherwise load with defaults. + + User interaction + search submit + on menu click + on pagination + when a user clicks search + add +*/ +} diff --git a/app/src/models/api/collections.ts b/app/src/models/api/collections.ts new file mode 100644 index 00000000..f4159789 --- /dev/null +++ b/app/src/models/api/collections.ts @@ -0,0 +1,11 @@ +// import { CollectionCardData } from "app/types/Collection"; +import { imageURL } from "../../utils/utils"; +import { stringToSlug } from "../../utils/utils"; +import { parseBoolean } from "../../utils/utils"; + +// TODO: Connect to typescript interface for CollectionCardData +export class APICollectionsModel { + //data + //use collectionCard model for array of collections returned + constructor(data: any) {} +} diff --git a/app/src/utils/api.ts b/app/src/utils/api.ts index e528ed7e..eacbc02f 100644 --- a/app/src/utils/api.ts +++ b/app/src/utils/api.ts @@ -1,7 +1,7 @@ import data from "../../src/data/lanes"; import type { LaneDataType } from "../../src/types/Lane"; import { ENV_KEY } from "../../src/types/EnvironmentType"; -import { imageURL, addCommas } from "../utils/utils"; +import { imageURL, addCommas, collectionsSortOptions } from "../utils/utils"; import appConfig from "../../../appConfig"; import defaultFeaturedItems from "../data/defaultFeaturedItemData"; import { CARDS_PER_PAGE } from "../config/constants"; @@ -250,23 +250,16 @@ export const getDivisionData = async ({ export const getCollectionsData = async ({ keyword = "", - sortID = "chronological-descending", + sortID = "date-desc", // TODO: rename sortID TODO: store defaults as constants pageNum = 1, perPage = CARDS_PER_PAGE, }: { keyword?: string; sortID?: string; pageNum?: number; - perPage?: number; + perPage?: number; // OPEN QUESTION: perhaps remove the "perPage" field because the API default is 48 and that is what we want. } = {}) => { - let sortOptions = { - date_desc: "date DESC", - date_asc: "date ASC", - "title-desc": "title DESC", - "title-asc": "title ASC", - }; - - let apiUrl = `${process.env.API_URL}/api/v2/collections?page=${pageNum}&per_page=${perPage}&sort=${sortOptions[sortID]}&q=${keyword}`; + let apiUrl = `${process.env.API_URL}/api/v2/collections?page=${pageNum}&per_page=${perPage}&sort=${collectionsSortOptions[sortID]}&q=${keyword}`; const res = await apiResponse(apiUrl); return res; }; diff --git a/app/src/utils/utils.ts b/app/src/utils/utils.ts index b04d87ad..9e8f00d4 100644 --- a/app/src/utils/utils.ts +++ b/app/src/utils/utils.ts @@ -110,3 +110,10 @@ export function isCollectionType( return "numberOfDigitizedItems" in records; } } + +export const collectionsSortOptions = { + date_desc: "date DESC", + date_asc: "date ASC", + "title-desc": "title DESC", + "title-asc": "title ASC", +}; From 91713cc509d570d5594408884f1b5341ddca9454 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 25 Nov 2024 12:58:27 -0500 Subject: [PATCH 09/55] eep --- __tests__/test.json | 51 ++++++++++++++++++++++++++++++++++++++++++++ app/src/utils/api.ts | 1 + 2 files changed, 52 insertions(+) create mode 100644 __tests__/test.json diff --git a/__tests__/test.json b/__tests__/test.json new file mode 100644 index 00000000..5a5a7e3b --- /dev/null +++ b/__tests__/test.json @@ -0,0 +1,51 @@ +{ + "nyplAPI": { + "request": { + "query": "Search" + }, + "response": { + "headers": { + "status": "success", + "code": "200", + "message": "ok" + }, + "name": "Billy Rose Theatre Division", + "slug": "billy-rose-theatre-division", + "summary": "The Billy Rose Theatre Division of The New York Public Library is one of the largest and most comprehensive archives devoted to the theatrical arts. Encompassing dramatic performance in all its diversity, the division is an indispensable resource for artists, writers, researchers, scholars, students, and the general public.", + "nyplLink": "https://www.nypl.org/locations/lpa/billy-rose-theatre-division", + "numFound": "218", + "perPage": "48", + "page": "1", + "items": [ + { + "title": "Publicity photograph of Maxine Elliott", + "uuid": "da343760-632a-013d-3a3b-0242ac110002", + "url": "https://digitalcollections.nypl.org/items/da343760-632a-013d-3a3b-0242ac110002", + "imageID": "58928240", + "containsMultipleImages": "true" + }, + { + "title": "Mark Short, Mary Mannering, and Charles Richman in the stage production A Man's World", + "uuid": "22b8e920-632a-013d-4265-0242ac110003", + "url": "https://digitalcollections.nypl.org/items/22b8e920-632a-013d-4265-0242ac110003", + "imageID": "58928238", + "containsMultipleImages": "true" + }, + { + "title": "Yaphet Kotto, Jimmy Pelham, and Maria Tucci in the stage production The Great White Hope", + "uuid": "ef2645d0-4eb3-013d-b578-0242ac110003", + "url": "https://digitalcollections.nypl.org/items/ef2645d0-4eb3-013d-b578-0242ac110003", + "imageID": "58926705", + "containsMultipleImages": "true" + }, + { + "title": "Yaphet Kotto and Maria Tucci in the stage production The Great White Hope", + "uuid": "95d7c270-4eb3-013d-67ad-0242ac110003", + "url": "https://digitalcollections.nypl.org/items/95d7c270-4eb3-013d-67ad-0242ac110003", + "imageID": "58926707", + "containsMultipleImages": "true" + } + ] + } + } +} \ No newline at end of file diff --git a/app/src/utils/api.ts b/app/src/utils/api.ts index eacbc02f..95b3d21f 100644 --- a/app/src/utils/api.ts +++ b/app/src/utils/api.ts @@ -260,6 +260,7 @@ export const getCollectionsData = async ({ perPage?: number; // OPEN QUESTION: perhaps remove the "perPage" field because the API default is 48 and that is what we want. } = {}) => { let apiUrl = `${process.env.API_URL}/api/v2/collections?page=${pageNum}&per_page=${perPage}&sort=${collectionsSortOptions[sortID]}&q=${keyword}`; + console.log("apiUrl is: ", apiUrl); const res = await apiResponse(apiUrl); return res; }; From 2bc396a346d9b9923a5698133fe92547533379b6 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 2 Dec 2024 09:28:17 -0500 Subject: [PATCH 10/55] cleaned up and found more test cases that are broken --- app/collections/page.tsx | 3 +- .../pages/collectionsPage/collectionsPage.tsx | 87 ++------- app/src/utils/api.ts | 1 + package-lock.json | 168 ++++++++++-------- 4 files changed, 113 insertions(+), 146 deletions(-) diff --git a/app/collections/page.tsx b/app/collections/page.tsx index 3153242f..38e6f9cb 100644 --- a/app/collections/page.tsx +++ b/app/collections/page.tsx @@ -31,7 +31,8 @@ export default async function Collections({ searchParams }: CollectionsProps) { return ( {/* pass entire Repo API Response */} - + {/* searchParams: { page: number; sort: string; collection_keyword: string }; */} + ); } diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index c6171b9d..76833ffa 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -25,57 +25,33 @@ import type { SyntheticEvent } from "react"; import { createAdobeAnalyticsPageName } from "@/src/utils/utils"; export const CollectionsPage = ({ data }) => { + // console.log("params are: ", params) const router = useRouter(); - const { replace } = useRouter(); + // const { replace } = useRouter(); + + const { push } = useRouter(); const searchParams = useSearchParams(); const query = searchParams.toString(); - console.log("searchParams is: ", searchParams); - console.log("query is: ", query); const pathname = usePathname(); - const keyword = searchParams.get("collection_keyword"); + // var keyword = searchParams.get("collection_keyword"); const [isLoaded, setIsLoaded] = useState(false); - const [currentPage, setCurrentPage] = useState( - Number(searchParams.get("page")) || 1 - ); - - const [currentSort, setCurrentSort] = useState( - Number(searchParams.get("sort")) || "date-desc" - ); - - const [currentCollectionKeyword, setCurrentCollectionKeyword] = useState( - Number(searchParams.get("collection_keyword")) || "" - ); + // defaults + let currentPage = Number(searchParams.get("page")) || 1; + let currentSort = searchParams.get("sort") || "date-desc"; + let currentCollectionKeyword = searchParams.get("collection_keyword") || ""; // pagination const numFound = data.numFound ? data.numFound : data.numResults; const totalPages = totalNumPages(numFound, data.perPage); - // console.log("data: ", data); - - // search - // function handleSubmit(term: string) { - // const params = new URLSearchParams(); - // console.log("term is", term); - // if (term) { - // params.set("collection_keyword", term); - // } else { - // params.delete("collection_keyword"); - // } - // console.log("params in handleSearch are: ", params) - // replace(`${pathname}?${searchParams.toString()}`); - // } - // taken from research catalog const handleSearchSubmit = async (e: SyntheticEvent) => { e.preventDefault(); const target = e.target as HTMLInputElement; - // console.log("e is: ", e) - // console.log("currentKeyword is: ", currentCollectionKeyword) - // setCurrentCollectionKeyword(target.value) const searchParams = { collection_keyword: currentCollectionKeyword, @@ -89,22 +65,16 @@ export const CollectionsPage = ({ data }) => { }; // taken from research catalog - const handleSearchChange = (e: SyntheticEvent, setValue) => { + const handleSearchChange = (e: SyntheticEvent) => { const target = e.target as HTMLInputElement; - setValue(target.value); + console.log("e"); + currentCollectionKeyword = target.value; }; // pagination // Question: Do we want to introduce debouncing? const onPageChange = async (pageNumber: number) => { - // const params = new URLSearchParams(); - // console.log("params in updatePageURL are", params); - - // params.set("page", pageNumber.toString()); - setCurrentPage(pageNumber); - - // const url = `${pathname}?${params.toString()}`; - // replace(url); + currentPage = pageNumber; const queryString = createQueryStringFromObject({ collection_keyword: currentCollectionKeyword, sort: currentSort, @@ -114,34 +84,22 @@ export const CollectionsPage = ({ data }) => { await router.push(`${pathname}?${queryString}`); }; - const createQueryString = (name, value) => { - const params = new URLSearchParams(); - params.set(name, value); - return params.toString(); - }; - // TODO: right now, whenever a user hits earch, the url is created with all params including the defaults const createQueryStringFromObject = (paramObj) => { const params = new URLSearchParams(); - // console.log("paramObj is: ", paramObj); Object.keys(paramObj).map((name, value) => { - // console.log("name: ", name); - // console.log("value: ", paramObj[name]); params.set( name.toString(), name === "page" ? paramObj[name].toString() : paramObj[name] ); // TODO: only set params in new params object if param is not the default }); console.log("params in createQueryStringFromObject are: ", params); - // params.set(name, value); return params.toString(); }; // sort const onMenuClick = async (id) => { console.log("currentSort before is: ", currentSort); - // console.log("id is:", id) - setCurrentSort(id); console.log("current sort after is : ", currentSort); const queryString = createQueryStringFromObject({ collection_keyword: currentCollectionKeyword, @@ -204,7 +162,7 @@ export const CollectionsPage = ({ data }) => { labelText: "Search by collection title", name: "collection_keyword", placeholder: "Search by collection title", // TODO: currntCollectionKeyword - onChange: (e) => handleSearchChange(e, setCurrentCollectionKeyword), + onChange: (e) => handleSearchChange(e), }} onSubmit={handleSearchSubmit} // TODO: fix labelText={""} @@ -220,7 +178,7 @@ export const CollectionsPage = ({ data }) => { { ); }; - -{ - /* - Logic for search/pagination/filter - - If params are present in the URL, load with the provided params. Otherwise load with defaults. - - User interaction - search submit - on menu click - on pagination - when a user clicks search - add -*/ -} diff --git a/app/src/utils/api.ts b/app/src/utils/api.ts index 9c6c1037..05728ac7 100644 --- a/app/src/utils/api.ts +++ b/app/src/utils/api.ts @@ -223,6 +223,7 @@ export const apiResponse = async ( const queryString = "?" + new URLSearchParams(options?.params).toString(); apiUrl += queryString; } + console.log("API Url is: ", apiUrl); const timeout = 14000; diff --git a/package-lock.json b/package-lock.json index 4428201a..76611b6c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -136,15 +136,6 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@babel/generator": { "version": "7.26.2", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.2.tgz", @@ -177,15 +168,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@babel/helper-module-imports": { "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", @@ -3617,6 +3599,17 @@ "npm": ">=6.0.0" } }, + "node_modules/@newrelic/security-agent/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@next/env": { "version": "14.2.18", "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.18.tgz", @@ -3954,6 +3947,18 @@ "node": ">=18" } }, + "node_modules/@puppeteer/browsers/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@puppeteer/browsers/node_modules/tar-fs": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", @@ -4970,9 +4975,9 @@ "dev": true }, "node_modules/@samvera/clover-iiif": { - "version": "2.11.8", - "resolved": "https://registry.npmjs.org/@samvera/clover-iiif/-/clover-iiif-2.11.8.tgz", - "integrity": "sha512-wCFuZK14zT73N6CpIkrWviN+aHdzgGqPLTYHZJsQA3BupASIbFgg9QurZ65/MXZK3weYSqdB9SAgQyEFyJUyUg==", + "version": "2.11.9", + "resolved": "https://registry.npmjs.org/@samvera/clover-iiif/-/clover-iiif-2.11.9.tgz", + "integrity": "sha512-58ljjjVD70g/Ehg9Cm3QfuCCSAFRc36vzsE9ZDTAZWaBiL/gspxhueRqtluqVqaATZl9nF7YDIgsXVulSVnWXQ==", "dependencies": { "@iiif/helpers": "^1.2.19", "@iiif/parser": "^2.1.4", @@ -5616,6 +5621,18 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@typescript-eslint/visitor-keys": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.2.0.tgz", @@ -6141,15 +6158,6 @@ "node": ">=8" } }, - "node_modules/babel-plugin-istanbul/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/babel-plugin-jest-hoist": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", @@ -6760,19 +6768,6 @@ "simple-swizzle": "^0.2.2" } }, - "node_modules/color/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" - }, "node_modules/color2k": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/color2k/-/color2k-2.0.3.tgz", @@ -7747,14 +7742,14 @@ } }, "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", + "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", "dev": true, "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "is-callable": "^1.2.7", + "is-date-object": "^1.0.5", + "is-symbol": "^1.0.4" }, "engines": { "node": ">= 0.4" @@ -8104,15 +8099,6 @@ "node": ">=0.10.0" } }, - "node_modules/eslint-plugin-import/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/eslint-plugin-jsx-a11y": { "version": "6.10.2", "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz", @@ -8224,15 +8210,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/eslint-plugin-react/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/eslint-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", @@ -9856,6 +9833,18 @@ "semver": "^7.6.3" } }, + "node_modules/is-bun-module/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", @@ -10254,6 +10243,18 @@ "node": ">=10" } }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/istanbul-lib-report": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", @@ -12289,6 +12290,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -13259,6 +13272,17 @@ "@prisma/prisma-fmt-wasm": "^4.17.0-16.27eb2449f178cd9fe1a4b892d732cc4795f75085" } }, + "node_modules/newrelic/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/next": { "version": "14.2.18", "resolved": "https://registry.npmjs.org/next/-/next-14.2.18.tgz", @@ -15028,14 +15052,12 @@ } }, "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, "bin": { "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" } }, "node_modules/set-function-length": { From 69ff24e92fd635a49adfcd589690ea4d1092a428 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 2 Dec 2024 11:16:00 -0500 Subject: [PATCH 11/55] cleanup --- app/collections/page.tsx | 13 +++-- .../pages/collectionsPage/collectionsPage.tsx | 49 ++++++------------- 2 files changed, 21 insertions(+), 41 deletions(-) diff --git a/app/collections/page.tsx b/app/collections/page.tsx index 38e6f9cb..7fe2cb1d 100644 --- a/app/collections/page.tsx +++ b/app/collections/page.tsx @@ -2,7 +2,7 @@ import React, { Suspense } from "react"; import { Metadata } from "next"; import { CollectionsPage } from "../src/components/pages/collectionsPage/collectionsPage"; import { getCollectionsData } from "@/src/utils/api"; -// import { redirect } from "next/navigation"; +import { redirect } from "next/navigation"; export type CollectionsProps = { params: { slug: string }; @@ -21,18 +21,17 @@ export default async function Collections({ searchParams }: CollectionsProps) { keyword: searchParams.collection_keyword, sortID: searchParams.sort, pageNum: searchParams.page, - }); // TODO: create model for APICollectionsData from API to clean up the data before it's sent down to the components. + }); // TODO: create model for APICollectionsData from API to clean up the data before it's sent down to the components. // Repo API returns 404s within the data. - // if (data?.headers?.code === "404") { - // redirect("/404"); - // } + if (data?.headers?.code === "404") { + redirect("/404"); + } return ( {/* pass entire Repo API Response */} - {/* searchParams: { page: number; sort: string; collection_keyword: string }; */} - + ); } diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 76833ffa..9d3b65ef 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -25,49 +25,37 @@ import type { SyntheticEvent } from "react"; import { createAdobeAnalyticsPageName } from "@/src/utils/utils"; export const CollectionsPage = ({ data }) => { - // console.log("params are: ", params) const router = useRouter(); - // const { replace } = useRouter(); const { push } = useRouter(); - const searchParams = useSearchParams(); const query = searchParams.toString(); - const pathname = usePathname(); - // var keyword = searchParams.get("collection_keyword"); - const [isLoaded, setIsLoaded] = useState(false); + // pagination + const numFound = data.numFound ? data.numFound : data.numResults; + const totalPages = totalNumPages(numFound, data.perPage); + // defaults let currentPage = Number(searchParams.get("page")) || 1; let currentSort = searchParams.get("sort") || "date-desc"; let currentCollectionKeyword = searchParams.get("collection_keyword") || ""; - // pagination - const numFound = data.numFound ? data.numFound : data.numResults; - const totalPages = totalNumPages(numFound, data.perPage); - - // taken from research catalog const handleSearchSubmit = async (e: SyntheticEvent) => { e.preventDefault(); const target = e.target as HTMLInputElement; - - const searchParams = { + const queryString = createQueryStringFromObject({ collection_keyword: currentCollectionKeyword, sort: currentSort, page: currentPage, - }; - - const queryString = createQueryStringFromObject(searchParams); - console.log("queryString is: ", queryString); - await router.push(`${pathname}?${queryString}`); + }); + await push(`${pathname}?${queryString}`); }; - // taken from research catalog + // I'm not actually sure if this is necessary but it's in the research catalog const handleSearchChange = (e: SyntheticEvent) => { const target = e.target as HTMLInputElement; - console.log("e"); currentCollectionKeyword = target.value; }; @@ -81,19 +69,19 @@ export const CollectionsPage = ({ data }) => { page: pageNumber.toString(), }); console.log("queryString is: ", queryString); - await router.push(`${pathname}?${queryString}`); + await push(`${pathname}?${queryString}`); }; - // TODO: right now, whenever a user hits earch, the url is created with all params including the defaults + // TODO: right now, whenever a user hits earch, the url is created with all params including the defaults. + // Perhaps the query string should only include the values that are not defaults. const createQueryStringFromObject = (paramObj) => { const params = new URLSearchParams(); Object.keys(paramObj).map((name, value) => { params.set( name.toString(), name === "page" ? paramObj[name].toString() : paramObj[name] - ); // TODO: only set params in new params object if param is not the default + ); }); - console.log("params in createQueryStringFromObject are: ", params); return params.toString(); }; @@ -106,13 +94,7 @@ export const CollectionsPage = ({ data }) => { sort: id, page: currentPage, }); - console.log("queryString is: ", queryString); - await router.push(`${pathname}?${queryString}`); - // query - // ? router.push( - // "/collections" + "?" + query + "&" + createQueryString("sort", id) - // ) - // : router.push("/collections" + "?" + createQueryString("sort", id)); + await push(`${pathname}?${queryString}`); }; useEffect(() => { @@ -153,7 +135,6 @@ export const CollectionsPage = ({ data }) => { text="Collections" subtitle="Explore the New York Public Library's diverse collections, including digitized photographs, manuscripts, maps, and more. Start exploring by using the search bar below or browse through the collections." /> - {/* TODO: if keyword provided in the url, maybe we should set the text in the input box to be the keyword provided */} { isClearable: true, labelText: "Search by collection title", name: "collection_keyword", - placeholder: "Search by collection title", // TODO: currntCollectionKeyword + placeholder: "Search by collection title", + defaultValue: currentCollectionKeyword, onChange: (e) => handleSearchChange(e), }} onSubmit={handleSearchSubmit} // TODO: fix labelText={""} - // defaultValue={query} //OPEN QUESTION: should the query go in the input /> From 39a40148851cf73216de1dbe15a34704eaa5f075 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 2 Dec 2024 11:41:53 -0500 Subject: [PATCH 12/55] displays results if api returns one collection as an object --- .../pages/collectionsPage/collectionsPage.tsx | 26 +++++++++++-------- app/src/models/api/collections.ts | 11 -------- 2 files changed, 15 insertions(+), 22 deletions(-) delete mode 100644 app/src/models/api/collections.ts diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 9d3b65ef..16462201 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -11,12 +11,7 @@ import { Text, Pagination, } from "@nypl/design-system-react-components"; -import { - useParams, - useSearchParams, - usePathname, - useRouter, -} from "next/navigation"; +import { useSearchParams, usePathname, useRouter } from "next/navigation"; import { headerBreakpoints } from "../../../utils/breakpoints"; import { CardsGrid } from "../../grids/cardsGrid"; import LaneLoading from "../../lane/laneLoading"; @@ -25,11 +20,8 @@ import type { SyntheticEvent } from "react"; import { createAdobeAnalyticsPageName } from "@/src/utils/utils"; export const CollectionsPage = ({ data }) => { - const router = useRouter(); - const { push } = useRouter(); const searchParams = useSearchParams(); - const query = searchParams.toString(); const pathname = usePathname(); const [isLoaded, setIsLoaded] = useState(false); @@ -44,7 +36,6 @@ export const CollectionsPage = ({ data }) => { const handleSearchSubmit = async (e: SyntheticEvent) => { e.preventDefault(); - const target = e.target as HTMLInputElement; const queryString = createQueryStringFromObject({ collection_keyword: currentCollectionKeyword, sort: currentSort, @@ -191,7 +182,13 @@ export const CollectionsPage = ({ data }) => { {isLoaded ? ( - + ) : ( <> , @@ -218,3 +215,10 @@ export const CollectionsPage = ({ data }) => { ); }; + +/* + https://api.repo.nypl.org/api/v2/collections?page=1&per_page=48&sort=date%20ASC&q=billy + https://api.repo.nypl.org/api/v2/collections?page=2&per_page=48&sort=date%20ASC&q=billy // status 404 + + https://api.repo.nypl.org/api/v2/collections?page=1&per_page=48&sort=date%20ASC&q=cat // one collection returned in response as object and not array +*/ diff --git a/app/src/models/api/collections.ts b/app/src/models/api/collections.ts deleted file mode 100644 index f4159789..00000000 --- a/app/src/models/api/collections.ts +++ /dev/null @@ -1,11 +0,0 @@ -// import { CollectionCardData } from "app/types/Collection"; -import { imageURL } from "../../utils/utils"; -import { stringToSlug } from "../../utils/utils"; -import { parseBoolean } from "../../utils/utils"; - -// TODO: Connect to typescript interface for CollectionCardData -export class APICollectionsModel { - //data - //use collectionCard model for array of collections returned - constructor(data: any) {} -} From f6a7214827da9ac98ff6e0f1c55b0b560208839a Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 2 Dec 2024 11:43:11 -0500 Subject: [PATCH 13/55] remove test.json --- __tests__/test.json | 51 --------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 __tests__/test.json diff --git a/__tests__/test.json b/__tests__/test.json deleted file mode 100644 index 5a5a7e3b..00000000 --- a/__tests__/test.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "nyplAPI": { - "request": { - "query": "Search" - }, - "response": { - "headers": { - "status": "success", - "code": "200", - "message": "ok" - }, - "name": "Billy Rose Theatre Division", - "slug": "billy-rose-theatre-division", - "summary": "The Billy Rose Theatre Division of The New York Public Library is one of the largest and most comprehensive archives devoted to the theatrical arts. Encompassing dramatic performance in all its diversity, the division is an indispensable resource for artists, writers, researchers, scholars, students, and the general public.", - "nyplLink": "https://www.nypl.org/locations/lpa/billy-rose-theatre-division", - "numFound": "218", - "perPage": "48", - "page": "1", - "items": [ - { - "title": "Publicity photograph of Maxine Elliott", - "uuid": "da343760-632a-013d-3a3b-0242ac110002", - "url": "https://digitalcollections.nypl.org/items/da343760-632a-013d-3a3b-0242ac110002", - "imageID": "58928240", - "containsMultipleImages": "true" - }, - { - "title": "Mark Short, Mary Mannering, and Charles Richman in the stage production A Man's World", - "uuid": "22b8e920-632a-013d-4265-0242ac110003", - "url": "https://digitalcollections.nypl.org/items/22b8e920-632a-013d-4265-0242ac110003", - "imageID": "58928238", - "containsMultipleImages": "true" - }, - { - "title": "Yaphet Kotto, Jimmy Pelham, and Maria Tucci in the stage production The Great White Hope", - "uuid": "ef2645d0-4eb3-013d-b578-0242ac110003", - "url": "https://digitalcollections.nypl.org/items/ef2645d0-4eb3-013d-b578-0242ac110003", - "imageID": "58926705", - "containsMultipleImages": "true" - }, - { - "title": "Yaphet Kotto and Maria Tucci in the stage production The Great White Hope", - "uuid": "95d7c270-4eb3-013d-67ad-0242ac110003", - "url": "https://digitalcollections.nypl.org/items/95d7c270-4eb3-013d-67ad-0242ac110003", - "imageID": "58926707", - "containsMultipleImages": "true" - } - ] - } - } -} \ No newline at end of file From 5f59e5dc167ab1e4893e6f55b989a6ae78eb54e1 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 2 Dec 2024 11:47:51 -0500 Subject: [PATCH 14/55] remove code created in panic --- app/src/utils/utils.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/src/utils/utils.ts b/app/src/utils/utils.ts index b18e375c..9f11fbda 100644 --- a/app/src/utils/utils.ts +++ b/app/src/utils/utils.ts @@ -100,15 +100,10 @@ export const totalNumPages = (numResults: string, perPage: string): number => { return Math.ceil(parseInt(numResults) / parseInt(perPage)); }; -// alright, TODO: if the api response only returns one item, it doesn't return an array but rather returns the solo object ie. search "cat" export function isCollectionType( records: CollectionDataType[] | ItemDataType[] ): records is CollectionDataType[] { - if (records.length >= 1) { - return "numberOfDigitizedItems" in records[0]; - } else { - return "numberOfDigitizedItems" in records; - } + return "numberOfDigitizedItems" in records[0]; } export const collectionsSortOptions = { From 3fb928d7ecef91f93fc901bed67007aa4f673c0f Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 2 Dec 2024 11:50:39 -0500 Subject: [PATCH 15/55] more cleanup --- app/src/utils/api.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/utils/api.ts b/app/src/utils/api.ts index 05728ac7..17945a52 100644 --- a/app/src/utils/api.ts +++ b/app/src/utils/api.ts @@ -176,10 +176,10 @@ export const getCollectionsData = async ({ perPage?: number; // OPEN QUESTION: perhaps remove the "perPage" field because the API default is 48 and that is what we want. } = {}) => { let apiUrl = `${process.env.API_URL}/api/v2/collections?page=${pageNum}&per_page=${perPage}&sort=${collectionsSortOptions[sortID]}&q=${keyword}`; - console.log("apiUrl is: ", apiUrl); const res = await apiResponse(apiUrl); return res; }; + export const getLaneData = async ({ pageNum = 1, perPage = CARDS_PER_PAGE, @@ -223,7 +223,6 @@ export const apiResponse = async ( const queryString = "?" + new URLSearchParams(options?.params).toString(); apiUrl += queryString; } - console.log("API Url is: ", apiUrl); const timeout = 14000; From c555b906ce391f09906c3b14c4fccb63509f4e08 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 2 Dec 2024 12:05:33 -0500 Subject: [PATCH 16/55] more comments to remove --- .../components/pages/collectionsPage/collectionsPage.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 16462201..32dd111d 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -1,7 +1,6 @@ "use client"; import PageLayout from "../../pageLayout/pageLayout"; import React, { useState, useEffect } from "react"; -import SearchResults from "../../search/results"; import { Box, Heading, @@ -15,7 +14,7 @@ import { useSearchParams, usePathname, useRouter } from "next/navigation"; import { headerBreakpoints } from "../../../utils/breakpoints"; import { CardsGrid } from "../../grids/cardsGrid"; import LaneLoading from "../../lane/laneLoading"; -import { slugToString, totalNumPages } from "../../../utils/utils"; +import { totalNumPages } from "../../../utils/utils"; import type { SyntheticEvent } from "react"; import { createAdobeAnalyticsPageName } from "@/src/utils/utils"; @@ -137,7 +136,7 @@ export const CollectionsPage = ({ data }) => { defaultValue: currentCollectionKeyword, onChange: (e) => handleSearchChange(e), }} - onSubmit={handleSearchSubmit} // TODO: fix + onSubmit={handleSearchSubmit} labelText={""} /> @@ -150,7 +149,7 @@ export const CollectionsPage = ({ data }) => { { initialPage={currentPage} currentPage={currentPage} pageCount={totalPages} - onPageChange={onPageChange} // TODO: pagination stuff + onPageChange={onPageChange} sx={{ display: "flex", justifyContent: "center", From 91fd244eb9febe5a0347632f6e7fe52685bc6e26 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 2 Dec 2024 12:06:37 -0500 Subject: [PATCH 17/55] remove api url commments --- .../components/pages/collectionsPage/collectionsPage.tsx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 32dd111d..9313be2e 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -214,10 +214,3 @@ export const CollectionsPage = ({ data }) => { ); }; - -/* - https://api.repo.nypl.org/api/v2/collections?page=1&per_page=48&sort=date%20ASC&q=billy - https://api.repo.nypl.org/api/v2/collections?page=2&per_page=48&sort=date%20ASC&q=billy // status 404 - - https://api.repo.nypl.org/api/v2/collections?page=1&per_page=48&sort=date%20ASC&q=cat // one collection returned in response as object and not array -*/ From 4c1afcff6784e94f9eade2c719ef7a2d89107b05 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 2 Dec 2024 12:41:47 -0500 Subject: [PATCH 18/55] card ref, comment out code for single object response bc it breaks empty search --- .../pages/collectionsPage/collectionsPage.tsx | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 9313be2e..343e9be2 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -1,6 +1,6 @@ "use client"; import PageLayout from "../../pageLayout/pageLayout"; -import React, { useState, useEffect } from "react"; +import React, { useState, useRef, useEffect } from "react"; import { Box, Heading, @@ -14,7 +14,7 @@ import { useSearchParams, usePathname, useRouter } from "next/navigation"; import { headerBreakpoints } from "../../../utils/breakpoints"; import { CardsGrid } from "../../grids/cardsGrid"; import LaneLoading from "../../lane/laneLoading"; -import { totalNumPages } from "../../../utils/utils"; +import { displayResults, totalNumPages } from "../../../utils/utils"; import type { SyntheticEvent } from "react"; import { createAdobeAnalyticsPageName } from "@/src/utils/utils"; @@ -24,6 +24,9 @@ export const CollectionsPage = ({ data }) => { const pathname = usePathname(); const [isLoaded, setIsLoaded] = useState(false); + const collections = data.collection; // typeof data.collection === "object" ? [data.collection] : data.collection // this breaks empty search + const headingRef = useRef(null); + // pagination const numFound = data.numFound ? data.numFound : data.numResults; const totalPages = totalNumPages(numFound, data.perPage); @@ -179,21 +182,23 @@ export const CollectionsPage = ({ data }) => { ]} /> - + + {`Displaying ${displayResults(data.numResults, data.perPage, data.page)} + results`} + {isLoaded ? ( - + ) : ( - <> - , - , - , - + Array(Math.ceil(collections.length / 4)).fill( + + ) )} {totalPages > 1 && ( From 70f92a59d57973b73694603d73c5323c9e372391 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 2 Dec 2024 12:44:30 -0500 Subject: [PATCH 19/55] fix ref for number of results --- .../pages/collectionsPage/collectionsPage.tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 343e9be2..923de559 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -43,7 +43,12 @@ export const CollectionsPage = ({ data }) => { sort: currentSort, page: currentPage, }); + setIsLoaded(false); await push(`${pathname}?${queryString}`); + setTimeout(() => { + setIsLoaded(true); + headingRef.current?.focus(); + }, 2000); }; // I'm not actually sure if this is necessary but it's in the research catalog @@ -61,8 +66,12 @@ export const CollectionsPage = ({ data }) => { sort: currentSort, page: pageNumber.toString(), }); - console.log("queryString is: ", queryString); + setIsLoaded(false); await push(`${pathname}?${queryString}`); + setTimeout(() => { + setIsLoaded(true); + headingRef.current?.focus(); + }, 2000); }; // TODO: right now, whenever a user hits earch, the url is created with all params including the defaults. @@ -87,7 +96,12 @@ export const CollectionsPage = ({ data }) => { sort: id, page: currentPage, }); + setIsLoaded(false); await push(`${pathname}?${queryString}`); + setTimeout(() => { + setIsLoaded(true); + headingRef.current?.focus(); + }, 2000); }; useEffect(() => { From ba7a2a810b2ef82b596615ee22903ade10ec4e9d Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Tue, 3 Dec 2024 09:17:18 -0500 Subject: [PATCH 20/55] testing something --- app/src/components/pages/collectionsPage/collectionsPage.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 923de559..210e67d1 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -23,8 +23,10 @@ export const CollectionsPage = ({ data }) => { const searchParams = useSearchParams(); const pathname = usePathname(); const [isLoaded, setIsLoaded] = useState(false); + // console.log("typeof data.collection is: ", typeof data.collection) + // console.log(" data.collection.length? ", typeof data.collection?.length) - const collections = data.collection; // typeof data.collection === "object" ? [data.collection] : data.collection // this breaks empty search + const collections = data.collection; //typeof data.collection === "array" ? data.collection : [data.collection] //: data.collection // this breaks empty search const headingRef = useRef(null); // pagination From 18ff185896c194357941b854cffc1367ff04f444 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Thu, 5 Dec 2024 10:26:39 -0500 Subject: [PATCH 21/55] if endpoint only returns one collection as a hash, force array --- .../components/pages/collectionsPage/collectionsPage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 210e67d1..da2270e2 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -23,10 +23,10 @@ export const CollectionsPage = ({ data }) => { const searchParams = useSearchParams(); const pathname = usePathname(); const [isLoaded, setIsLoaded] = useState(false); - // console.log("typeof data.collection is: ", typeof data.collection) - // console.log(" data.collection.length? ", typeof data.collection?.length) - const collections = data.collection; //typeof data.collection === "array" ? data.collection : [data.collection] //: data.collection // this breaks empty search + const collections = Array.isArray(data.collection) + ? data.collection + : [data.collection]; const headingRef = useRef(null); // pagination From c7733b7de1ff65c74e330435bbb225b5b2098f3c Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Thu, 5 Dec 2024 13:43:16 -0500 Subject: [PATCH 22/55] merge conflicts --- app/collections/page.tsx | 2 +- public/CHANGELOG.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/collections/page.tsx b/app/collections/page.tsx index 7fe2cb1d..ef051a5d 100644 --- a/app/collections/page.tsx +++ b/app/collections/page.tsx @@ -1,7 +1,7 @@ import React, { Suspense } from "react"; import { Metadata } from "next"; import { CollectionsPage } from "../src/components/pages/collectionsPage/collectionsPage"; -import { getCollectionsData } from "@/src/utils/api"; +import { getCollectionsData } from "@/src/utils/apiHelpers"; import { redirect } from "next/navigation"; export type CollectionsProps = { diff --git a/public/CHANGELOG.md b/public/CHANGELOG.md index 4e341992..d99d83f7 100644 --- a/public/CHANGELOG.md +++ b/public/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - refactored implementation of default featured item & updated default number of digitized items (DR-3305) - Update thumbnail logic so thumbnails are never restricted (DR-3293) +- Update feedback form credentials to use official DR service account (DR-2794) ## [0.2.4] 2024-11-26 From 29a63b22c24e91a0ded39a3de7f0d1585392f0ef Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Thu, 5 Dec 2024 16:50:38 -0500 Subject: [PATCH 23/55] no results page --- app/collections/page.tsx | 5 +- .../pages/collectionsPage/collectionsPage.tsx | 124 ++++++++++-------- app/src/components/results/noResultsFound.tsx | 34 +++++ 3 files changed, 109 insertions(+), 54 deletions(-) create mode 100644 app/src/components/results/noResultsFound.tsx diff --git a/app/collections/page.tsx b/app/collections/page.tsx index ef051a5d..61d171e4 100644 --- a/app/collections/page.tsx +++ b/app/collections/page.tsx @@ -24,7 +24,10 @@ export default async function Collections({ searchParams }: CollectionsProps) { }); // TODO: create model for APICollectionsData from API to clean up the data before it's sent down to the components. // Repo API returns 404s within the data. - if (data?.headers?.code === "404") { + if ( + data?.headers?.code === "404" && + data?.headers?.message !== "No collections found" + ) { redirect("/404"); } diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index da2270e2..7f654254 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -17,16 +17,21 @@ import LaneLoading from "../../lane/laneLoading"; import { displayResults, totalNumPages } from "../../../utils/utils"; import type { SyntheticEvent } from "react"; import { createAdobeAnalyticsPageName } from "@/src/utils/utils"; +import NoResultsFound from "../../results/noResultsFound"; export const CollectionsPage = ({ data }) => { const { push } = useRouter(); const searchParams = useSearchParams(); const pathname = usePathname(); const [isLoaded, setIsLoaded] = useState(false); + let collections = []; + + if (data.headers.message === "Collections retrieved successfully") { + collections = Array.isArray(data.collection) + ? data.collection + : [data.collection]; + } - const collections = Array.isArray(data.collection) - ? data.collection - : [data.collection]; const headingRef = useRef(null); // pagination @@ -160,57 +165,70 @@ export const CollectionsPage = ({ data }) => { /> - - - {" "} - Sort by{" "} - {" "} - - - - {`Displaying ${displayResults(data.numResults, data.perPage, data.page)} - results`} - + {isLoaded ? ( - + collections.length > 0 ? ( + <> + + + {" "} + Sort by{" "} + {" "} + + + + {`Displaying ${displayResults( + data.numResults, + data.perPage, + data.page + )} + results`} + + + + ) : ( + + ) ) : ( Array(Math.ceil(collections.length / 4)).fill( diff --git a/app/src/components/results/noResultsFound.tsx b/app/src/components/results/noResultsFound.tsx new file mode 100644 index 00000000..2e8eb970 --- /dev/null +++ b/app/src/components/results/noResultsFound.tsx @@ -0,0 +1,34 @@ +import { + Flex, + Heading, + Text, + Link, + List, +} from "@nypl/design-system-react-components"; +import Image from "next/image"; +import useBreakpoints from "@/src/hooks/useBreakpoints"; +import { useFeedbackContext } from "@/src/context/FeedbackProvider"; + +export default function NoResultsFound({ searchTerm }) { + console.log("searchTerm is: ", searchTerm); + const headingText = `No Results for "${searchTerm}"`; + return ( + + {headingText} + Try the following to improve your search: + +
  • Use an exact phrase.
  • +
  • Check your spelling and expand acronyms.
  • +
  • Reduce the number of keywords, or use more general terms.
  • +
    +
    + ); +} From f9455e18a14e3bdcdde74d4a2cef92546988bf92 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 9 Dec 2024 09:24:37 -0500 Subject: [PATCH 24/55] switch title sort ids to reflect data accurately, move createQueryStringFromObject to utils --- .../pages/collectionsPage/collectionsPage.tsx | 34 +++++++++++-------- app/src/utils/utils.ts | 13 +++++++ 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 7f654254..2c569987 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -14,7 +14,11 @@ import { useSearchParams, usePathname, useRouter } from "next/navigation"; import { headerBreakpoints } from "../../../utils/breakpoints"; import { CardsGrid } from "../../grids/cardsGrid"; import LaneLoading from "../../lane/laneLoading"; -import { displayResults, totalNumPages } from "../../../utils/utils"; +import { + displayResults, + totalNumPages, + createQueryStringFromObject, +} from "../../../utils/utils"; import type { SyntheticEvent } from "react"; import { createAdobeAnalyticsPageName } from "@/src/utils/utils"; import NoResultsFound from "../../results/noResultsFound"; @@ -81,18 +85,18 @@ export const CollectionsPage = ({ data }) => { }, 2000); }; - // TODO: right now, whenever a user hits earch, the url is created with all params including the defaults. - // Perhaps the query string should only include the values that are not defaults. - const createQueryStringFromObject = (paramObj) => { - const params = new URLSearchParams(); - Object.keys(paramObj).map((name, value) => { - params.set( - name.toString(), - name === "page" ? paramObj[name].toString() : paramObj[name] - ); - }); - return params.toString(); - }; + // // TODO: right now, whenever a user hits earch, the url is created with all params including the defaults. + // // Perhaps the query string should only include the values that are not defaults. + // const createQueryStringFromObject = (paramObj) => { + // const params = new URLSearchParams(); + // Object.keys(paramObj).map((name, value) => { + // params.set( + // name.toString(), + // name === "page" ? paramObj[name].toString() : paramObj[name] + // ); + // }); + // return params.toString(); + // }; // sort const onMenuClick = async (id) => { @@ -195,13 +199,13 @@ export const CollectionsPage = ({ data }) => { type: "action", }, { - id: "title-desc", + id: "title-asc", label: "Title A to Z", onClick: onMenuClick, type: "action", }, { - id: "title-asc", + id: "title-desc", label: "Title Z to A", onClick: onMenuClick, type: "action", diff --git a/app/src/utils/utils.ts b/app/src/utils/utils.ts index 68fb806f..f34987a6 100644 --- a/app/src/utils/utils.ts +++ b/app/src/utils/utils.ts @@ -125,3 +125,16 @@ export function displayResults( const end = Math.min(page * perPage, numFound); return `${start}-${end} of ${numFound}`; } + +// TODO: right now, whenever a user hits earch, the url is created with all params including the defaults. +// Perhaps the query string should only include the values that are not defaults. +export const createQueryStringFromObject = (paramObj) => { + const params = new URLSearchParams(); + Object.keys(paramObj).map((name, value) => { + params.set( + name.toString(), + name === "page" ? paramObj[name].toString() : paramObj[name] + ); + }); + return params.toString(); +}; From f53b407dc47ca9b2d4468b62bdb65d0477cfa800 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 9 Dec 2024 09:26:24 -0500 Subject: [PATCH 25/55] remove comment --- .../pages/collectionsPage/collectionsPage.tsx | 13 ------------- app/src/utils/utils.ts | 2 ++ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 2c569987..cddbf6a4 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -85,19 +85,6 @@ export const CollectionsPage = ({ data }) => { }, 2000); }; - // // TODO: right now, whenever a user hits earch, the url is created with all params including the defaults. - // // Perhaps the query string should only include the values that are not defaults. - // const createQueryStringFromObject = (paramObj) => { - // const params = new URLSearchParams(); - // Object.keys(paramObj).map((name, value) => { - // params.set( - // name.toString(), - // name === "page" ? paramObj[name].toString() : paramObj[name] - // ); - // }); - // return params.toString(); - // }; - // sort const onMenuClick = async (id) => { console.log("currentSort before is: ", currentSort); diff --git a/app/src/utils/utils.ts b/app/src/utils/utils.ts index f34987a6..eea62407 100644 --- a/app/src/utils/utils.ts +++ b/app/src/utils/utils.ts @@ -138,3 +138,5 @@ export const createQueryStringFromObject = (paramObj) => { }); return params.toString(); }; + +// paramObj options: From 07e961a1cae9d3ed83520069519ff72e90a67946 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 9 Dec 2024 09:34:18 -0500 Subject: [PATCH 26/55] use state for keyword --- .../pages/collectionsPage/collectionsPage.tsx | 17 +++++++++++++---- app/src/config/constants.ts | 4 ++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index cddbf6a4..7448819b 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -22,6 +22,11 @@ import { import type { SyntheticEvent } from "react"; import { createAdobeAnalyticsPageName } from "@/src/utils/utils"; import NoResultsFound from "../../results/noResultsFound"; +import { + DEFAULT_PAGE_NUM, + DEFAULT_COLLECTION_SORT, + DEFAULT_SEARCH_TERM, +} from "@/src/config/constants"; export const CollectionsPage = ({ data }) => { const { push } = useRouter(); @@ -43,9 +48,13 @@ export const CollectionsPage = ({ data }) => { const totalPages = totalNumPages(numFound, data.perPage); // defaults - let currentPage = Number(searchParams.get("page")) || 1; - let currentSort = searchParams.get("sort") || "date-desc"; - let currentCollectionKeyword = searchParams.get("collection_keyword") || ""; + let currentPage = Number(searchParams.get("page")) || DEFAULT_PAGE_NUM; + let currentSort = searchParams.get("sort") || DEFAULT_COLLECTION_SORT; + + const [currentCollectionKeyword, setCurrentCollectionKeyword] = + useState( + searchParams.get("collection_keyword") || DEFAULT_SEARCH_TERM + ); const handleSearchSubmit = async (e: SyntheticEvent) => { e.preventDefault(); @@ -65,7 +74,7 @@ export const CollectionsPage = ({ data }) => { // I'm not actually sure if this is necessary but it's in the research catalog const handleSearchChange = (e: SyntheticEvent) => { const target = e.target as HTMLInputElement; - currentCollectionKeyword = target.value; + setCurrentCollectionKeyword(target.value); }; // pagination diff --git a/app/src/config/constants.ts b/app/src/config/constants.ts index cb767a58..8334c049 100644 --- a/app/src/config/constants.ts +++ b/app/src/config/constants.ts @@ -13,3 +13,7 @@ export const ADOBE_EMBED_URL = export const TRUNCATED_LENGTH = 80; export const CARDS_PER_PAGE = 48; + +export const DEFAULT_PAGE_NUM = 1; +export const DEFAULT_COLLECTION_SORT = "date-desc"; +export const DEFAULT_SEARCH_TERM = ""; From f80d3b131aceed6583f695a6cc6b182ea06e984f Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 9 Dec 2024 09:37:54 -0500 Subject: [PATCH 27/55] remove console log --- app/src/components/pages/collectionsPage/collectionsPage.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 7448819b..30016d79 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -96,8 +96,6 @@ export const CollectionsPage = ({ data }) => { // sort const onMenuClick = async (id) => { - console.log("currentSort before is: ", currentSort); - console.log("current sort after is : ", currentSort); const queryString = createQueryStringFromObject({ collection_keyword: currentCollectionKeyword, sort: id, From ba77cf134b335992d431632da4cf629e1622e541 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 9 Dec 2024 10:16:15 -0500 Subject: [PATCH 28/55] pass search params down from client --- app/collections/page.tsx | 2 +- .../pages/collectionsPage/collectionsPage.tsx | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/app/collections/page.tsx b/app/collections/page.tsx index 61d171e4..434457a0 100644 --- a/app/collections/page.tsx +++ b/app/collections/page.tsx @@ -34,7 +34,7 @@ export default async function Collections({ searchParams }: CollectionsProps) { return ( {/* pass entire Repo API Response */} - + ); } diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 30016d79..66055970 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -10,7 +10,7 @@ import { Text, Pagination, } from "@nypl/design-system-react-components"; -import { useSearchParams, usePathname, useRouter } from "next/navigation"; +import { usePathname, useRouter } from "next/navigation"; import { headerBreakpoints } from "../../../utils/breakpoints"; import { CardsGrid } from "../../grids/cardsGrid"; import LaneLoading from "../../lane/laneLoading"; @@ -28,9 +28,8 @@ import { DEFAULT_SEARCH_TERM, } from "@/src/config/constants"; -export const CollectionsPage = ({ data }) => { +export const CollectionsPage = ({ data, params }) => { const { push } = useRouter(); - const searchParams = useSearchParams(); const pathname = usePathname(); const [isLoaded, setIsLoaded] = useState(false); let collections = []; @@ -47,14 +46,11 @@ export const CollectionsPage = ({ data }) => { const numFound = data.numFound ? data.numFound : data.numResults; const totalPages = totalNumPages(numFound, data.perPage); - // defaults - let currentPage = Number(searchParams.get("page")) || DEFAULT_PAGE_NUM; - let currentSort = searchParams.get("sort") || DEFAULT_COLLECTION_SORT; - + // set defaults + let currentPage = Number(params["page"]) || DEFAULT_PAGE_NUM; + let currentSort = params["sort"] || DEFAULT_COLLECTION_SORT; const [currentCollectionKeyword, setCurrentCollectionKeyword] = - useState( - searchParams.get("collection_keyword") || DEFAULT_SEARCH_TERM - ); + useState(params["collection_keyword"] || DEFAULT_SEARCH_TERM); const handleSearchSubmit = async (e: SyntheticEvent) => { e.preventDefault(); @@ -71,7 +67,6 @@ export const CollectionsPage = ({ data }) => { }, 2000); }; - // I'm not actually sure if this is necessary but it's in the research catalog const handleSearchChange = (e: SyntheticEvent) => { const target = e.target as HTMLInputElement; setCurrentCollectionKeyword(target.value); From aa80f6c1d5349918a574148c518250f9b19f15f2 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 9 Dec 2024 12:15:55 -0500 Subject: [PATCH 29/55] create a new method createCollectionsQueryStringFromObject, write tests --- .../components/featuredItem/campaignHero.tsx | 1 - .../pages/collectionsPage/collectionsPage.tsx | 8 +- app/src/utils/utils.test.tsx | 148 ++++++++++++++++++ app/src/utils/utils.ts | 22 ++- 4 files changed, 172 insertions(+), 7 deletions(-) diff --git a/app/src/components/featuredItem/campaignHero.tsx b/app/src/components/featuredItem/campaignHero.tsx index 827e8324..a2c5515e 100644 --- a/app/src/components/featuredItem/campaignHero.tsx +++ b/app/src/components/featuredItem/campaignHero.tsx @@ -17,7 +17,6 @@ const CampaignHero = ({ featuredItemData }) => { const handleError = (e: React.SyntheticEvent) => { console.log("error loading campaign hero:", e); setData(defaultFeaturedItemResponse); - console.log("data in CampaignHero component is:", data); }; return data?.featuredItem ? ( diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 66055970..ba80be89 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -43,14 +43,14 @@ export const CollectionsPage = ({ data, params }) => { const headingRef = useRef(null); // pagination - const numFound = data.numFound ? data.numFound : data.numResults; + const numFound = data.numFound || data.numResults; const totalPages = totalNumPages(numFound, data.perPage); // set defaults - let currentPage = Number(params["page"]) || DEFAULT_PAGE_NUM; - let currentSort = params["sort"] || DEFAULT_COLLECTION_SORT; + let currentPage = Number(params.page) || DEFAULT_PAGE_NUM; + let currentSort = params.sort || DEFAULT_COLLECTION_SORT; const [currentCollectionKeyword, setCurrentCollectionKeyword] = - useState(params["collection_keyword"] || DEFAULT_SEARCH_TERM); + useState(params.collection_keyword || DEFAULT_SEARCH_TERM); const handleSearchSubmit = async (e: SyntheticEvent) => { e.preventDefault(); diff --git a/app/src/utils/utils.test.tsx b/app/src/utils/utils.test.tsx index 6fcf2634..6edf898e 100644 --- a/app/src/utils/utils.test.tsx +++ b/app/src/utils/utils.test.tsx @@ -3,7 +3,14 @@ import { stringToSlug, createAdobeAnalyticsPageName, displayResults, + createQueryStringFromObject, + createCollectionsQueryStringFromObject, } from "./utils"; +import { + DEFAULT_PAGE_NUM, + DEFAULT_COLLECTION_SORT, + DEFAULT_SEARCH_TERM, +} from "@/src/config/constants"; // TODO: /** @@ -203,3 +210,144 @@ describe("displayResults", () => { expect(displayResults(5, 10, 1)).toBe("1-5 of 5"); }); }); + +describe("createQueryStringFromObject generates the correct query string: ", () => { + test("when the values are all empty", () => { + expect(createQueryStringFromObject({})).toBe(""); + }); + test("when there are multiple values", () => { + expect( + createQueryStringFromObject({ + dog: "cat", + help: "me", + this_is: "aTest", + }) + ).toBe("dog=cat&help=me&this_is=aTest"); + }); +}); + +describe("createCollectionsQueryStringFromObject generates the correct query string: ", () => { + test("when the values are all empty or all defaults", () => { + expect( + createCollectionsQueryStringFromObject({ + collection_keyword: "", + sort: "", + page: "", + }) + ).toBe(""); + expect( + createCollectionsQueryStringFromObject({ + collection_keyword: DEFAULT_SEARCH_TERM, + sort: DEFAULT_COLLECTION_SORT, + page: DEFAULT_PAGE_NUM, + }) + ).toBe(""); + }); + + test("when the values are all set to a non-default value", () => { + expect( + createCollectionsQueryStringFromObject({ + collection_keyword: "cat", + sort: "title-desc", + page: "2", + }) + ).toBe("collection_keyword=cat&sort=title-desc&page=2"); + }); + + test("collection_keyword search values are set correctly", () => { + // empty sort and page num, not default keyword + expect( + createCollectionsQueryStringFromObject({ + collection_keyword: "cat", + sort: "", + page: "", + }) + ).toBe("collection_keyword=cat"); + + // default sort and page num, not default keyword + expect( + createCollectionsQueryStringFromObject({ + collection_keyword: "cat", + sort: DEFAULT_COLLECTION_SORT, + page: DEFAULT_PAGE_NUM, + }) + ).toBe("collection_keyword=cat"); + + // default keyword, page num and sort are not default + expect( + createCollectionsQueryStringFromObject({ + collection_keyword: DEFAULT_SEARCH_TERM, + sort: "title-desc", + page: "2", + }) + ).toBe("sort=title-desc&page=2"); + }); + + test("sort values are set correctly", () => { + // sort + // only sort, keyword is default and page is empty + expect( + createCollectionsQueryStringFromObject({ + collection_keyword: DEFAULT_SEARCH_TERM, + sort: "title-desc", + page: "", + }) + ).toBe("sort=title-desc"); + + // default keyword and page num, not default sort + expect( + createCollectionsQueryStringFromObject({ + collection_keyword: DEFAULT_SEARCH_TERM, + sort: "title-desc", + page: DEFAULT_PAGE_NUM, + }) + ).toBe("sort=title-desc"); + + // default sort, not default page or keyword + expect( + createCollectionsQueryStringFromObject({ + collection_keyword: "cat", + sort: DEFAULT_COLLECTION_SORT, + page: "2", + }) + ).toBe("collection_keyword=cat&page=2"); + }); + + test("page num values are set correctly: ", () => { + // default keyword and sort, not default page num + expect( + createCollectionsQueryStringFromObject({ + collection_keyword: DEFAULT_SEARCH_TERM, + sort: DEFAULT_COLLECTION_SORT, + page: "2", + }) + ).toBe("page=2"); + + // default keyword and sort, not default page num. page num is integer. + expect( + createCollectionsQueryStringFromObject({ + collection_keyword: DEFAULT_SEARCH_TERM, + sort: DEFAULT_COLLECTION_SORT, + page: 2, + }) + ).toBe("page=2"); + + // only page num, sort and collection_keyword are empty + expect( + createCollectionsQueryStringFromObject({ + collection_keyword: DEFAULT_SEARCH_TERM, + sort: "", + page: "2", + }) + ).toBe("page=2"); + + // default page num, key word and sort are not default + expect( + createCollectionsQueryStringFromObject({ + collection_keyword: "cat", + sort: "title-desc", + page: "1", + }) + ).toBe("collection_keyword=cat&sort=title-desc"); + }); +}); diff --git a/app/src/utils/utils.ts b/app/src/utils/utils.ts index eea62407..9a755479 100644 --- a/app/src/utils/utils.ts +++ b/app/src/utils/utils.ts @@ -1,10 +1,13 @@ import { ADOBE_ANALYTICS_SITE_SECTION, ADOBE_ANALYTICS_DC_PREFIX, + DEFAULT_SEARCH_TERM, + DEFAULT_PAGE_NUM, + DEFAULT_COLLECTION_SORT, } from "../config/constants"; import CollectionDataType from "@/src/types/CollectionDataType"; import ItemDataType from "@/src/types/ItemDataType"; - +import { URLSearchParams } from "url"; /** * Represents a IIIF Image API URL, which will be used globally throughout the application. * IIIF Image API has several params, the ones we are the most concerned about are Region, Size, and Rotation. @@ -139,4 +142,19 @@ export const createQueryStringFromObject = (paramObj) => { return params.toString(); }; -// paramObj options: +export const createCollectionsQueryStringFromObject = (paramObj) => { + const newParams = {}; + Object.keys(paramObj).map((key) => { + if ( + !( + paramObj[key] === DEFAULT_SEARCH_TERM || + paramObj[key] === DEFAULT_PAGE_NUM || + paramObj[key] === DEFAULT_PAGE_NUM.toString() || + paramObj[key] === DEFAULT_COLLECTION_SORT + ) + ) { + newParams[key] = paramObj[key]; + } + }); + return createQueryStringFromObject(newParams); +}; From b5a95191ba087af4bd4854b357fc5bca62325f3e Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 9 Dec 2024 12:30:59 -0500 Subject: [PATCH 30/55] remove inports, use createCollectionsQueryStringFromObject --- .../components/pages/collectionsPage/collectionsPage.tsx | 8 ++++---- app/src/utils/utils.ts | 4 +--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index ba80be89..2978fe06 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -17,7 +17,7 @@ import LaneLoading from "../../lane/laneLoading"; import { displayResults, totalNumPages, - createQueryStringFromObject, + createCollectionsQueryStringFromObject, } from "../../../utils/utils"; import type { SyntheticEvent } from "react"; import { createAdobeAnalyticsPageName } from "@/src/utils/utils"; @@ -54,7 +54,7 @@ export const CollectionsPage = ({ data, params }) => { const handleSearchSubmit = async (e: SyntheticEvent) => { e.preventDefault(); - const queryString = createQueryStringFromObject({ + const queryString = createCollectionsQueryStringFromObject({ collection_keyword: currentCollectionKeyword, sort: currentSort, page: currentPage, @@ -76,7 +76,7 @@ export const CollectionsPage = ({ data, params }) => { // Question: Do we want to introduce debouncing? const onPageChange = async (pageNumber: number) => { currentPage = pageNumber; - const queryString = createQueryStringFromObject({ + const queryString = createCollectionsQueryStringFromObject({ collection_keyword: currentCollectionKeyword, sort: currentSort, page: pageNumber.toString(), @@ -91,7 +91,7 @@ export const CollectionsPage = ({ data, params }) => { // sort const onMenuClick = async (id) => { - const queryString = createQueryStringFromObject({ + const queryString = createCollectionsQueryStringFromObject({ collection_keyword: currentCollectionKeyword, sort: id, page: currentPage, diff --git a/app/src/utils/utils.ts b/app/src/utils/utils.ts index 9a755479..70552558 100644 --- a/app/src/utils/utils.ts +++ b/app/src/utils/utils.ts @@ -7,7 +7,7 @@ import { } from "../config/constants"; import CollectionDataType from "@/src/types/CollectionDataType"; import ItemDataType from "@/src/types/ItemDataType"; -import { URLSearchParams } from "url"; + /** * Represents a IIIF Image API URL, which will be used globally throughout the application. * IIIF Image API has several params, the ones we are the most concerned about are Region, Size, and Rotation. @@ -129,8 +129,6 @@ export function displayResults( return `${start}-${end} of ${numFound}`; } -// TODO: right now, whenever a user hits earch, the url is created with all params including the defaults. -// Perhaps the query string should only include the values that are not defaults. export const createQueryStringFromObject = (paramObj) => { const params = new URLSearchParams(); Object.keys(paramObj).map((name, value) => { From c5c3dccdf603ec57a6052165938b03a93b7fc7ca Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 9 Dec 2024 14:41:04 -0500 Subject: [PATCH 31/55] add isClearableCallback --- app/src/components/pages/collectionsPage/collectionsPage.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 2978fe06..daa95672 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -147,6 +147,9 @@ export const CollectionsPage = ({ data, params }) => { id={"search-collections"} textInputProps={{ isClearable: true, + isClearableCallback: () => { + setCurrentCollectionKeyword(""); + }, labelText: "Search by collection title", name: "collection_keyword", placeholder: "Search by collection title", From 0975cf16f0c2af065956c51a02b4bfd496d42890 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 9 Dec 2024 14:42:19 -0500 Subject: [PATCH 32/55] set clearble callback value to default search term --- app/src/components/pages/collectionsPage/collectionsPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index daa95672..d89ccc31 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -148,7 +148,7 @@ export const CollectionsPage = ({ data, params }) => { textInputProps={{ isClearable: true, isClearableCallback: () => { - setCurrentCollectionKeyword(""); + setCurrentCollectionKeyword(DEFAULT_SEARCH_TERM); }, labelText: "Search by collection title", name: "collection_keyword", From 0ff29f22312cef32ef9f28d31ba8e805fe556205 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 9 Dec 2024 14:54:13 -0500 Subject: [PATCH 33/55] fix ref in a really weird way --- .../pages/collectionsPage/collectionsPage.tsx | 117 +++++++++--------- 1 file changed, 60 insertions(+), 57 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index d89ccc31..120eb02a 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -161,69 +161,72 @@ export const CollectionsPage = ({ data, params }) => { /> - + 0 + ? { display: "flex", gap: "xs", marginBottom: "l" } + : { display: "none", gap: "xs", marginBottom: "l" } + } + > + + {" "} + Sort by{" "} + {" "} + + + 0 + ? { marginBottom: "l" } + : { display: "none", marginBottom: "l" } + } + ref={headingRef} + tabIndex={-1} + id={"all-collections-page"} + width="max-content" + > + {`Displaying ${displayResults(data.numResults, data.perPage, data.page)} + results`} + {isLoaded ? ( collections.length > 0 ? ( <> - - - {" "} - Sort by{" "} - {" "} - - - - {`Displaying ${displayResults( - data.numResults, - data.perPage, - data.page - )} - results`} - ) : ( - + ) ) : ( Array(Math.ceil(collections.length / 4)).fill( From df1e260cca60ebe75e5db5b7348778963b299949 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 9 Dec 2024 14:54:57 -0500 Subject: [PATCH 34/55] cleanup --- app/src/components/pages/collectionsPage/collectionsPage.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 120eb02a..013053c1 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -222,9 +222,7 @@ export const CollectionsPage = ({ data, params }) => { {isLoaded ? ( collections.length > 0 ? ( - <> - - + ) : ( ) From f48fcdf3e1f0e99afd74aab4e9f45efeb438599e Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 9 Dec 2024 15:03:24 -0500 Subject: [PATCH 35/55] use state to manage pagination, sort, and search fields again --- .../pages/collectionsPage/collectionsPage.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 013053c1..f4a81662 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -47,8 +47,14 @@ export const CollectionsPage = ({ data, params }) => { const totalPages = totalNumPages(numFound, data.perPage); // set defaults - let currentPage = Number(params.page) || DEFAULT_PAGE_NUM; - let currentSort = params.sort || DEFAULT_COLLECTION_SORT; + const [currentPage, setCurrentPage] = useState( + params.page || DEFAULT_PAGE_NUM + ); + + const [currentSort, setCurrentSort] = useState( + params.sort || DEFAULT_COLLECTION_SORT + ); + const [currentCollectionKeyword, setCurrentCollectionKeyword] = useState(params.collection_keyword || DEFAULT_SEARCH_TERM); @@ -75,7 +81,8 @@ export const CollectionsPage = ({ data, params }) => { // pagination // Question: Do we want to introduce debouncing? const onPageChange = async (pageNumber: number) => { - currentPage = pageNumber; + // currentPage = pageNumber; + setCurrentPage(pageNumber); const queryString = createCollectionsQueryStringFromObject({ collection_keyword: currentCollectionKeyword, sort: currentSort, @@ -91,6 +98,7 @@ export const CollectionsPage = ({ data, params }) => { // sort const onMenuClick = async (id) => { + setCurrentSort(id); const queryString = createCollectionsQueryStringFromObject({ collection_keyword: currentCollectionKeyword, sort: id, @@ -220,6 +228,7 @@ export const CollectionsPage = ({ data, params }) => { {`Displaying ${displayResults(data.numResults, data.perPage, data.page)} results`} + {isLoaded ? ( collections.length > 0 ? ( From e437f6ce1b52ec3cfc64934d6262a6d9d2ef95c0 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 9 Dec 2024 15:24:40 -0500 Subject: [PATCH 36/55] move loading state logic to its own function --- .../pages/collectionsPage/collectionsPage.tsx | 35 ++++++++----------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index f4a81662..3ea5da6c 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -27,8 +27,10 @@ import { DEFAULT_COLLECTION_SORT, DEFAULT_SEARCH_TERM, } from "@/src/config/constants"; +import { useLoadingState } from "@/src/hooks/useLoadingState"; +import { query } from "winston"; -export const CollectionsPage = ({ data, params }) => { +export function CollectionsPage({ data, params }) { const { push } = useRouter(); const pathname = usePathname(); const [isLoaded, setIsLoaded] = useState(false); @@ -58,6 +60,14 @@ export const CollectionsPage = ({ data, params }) => { const [currentCollectionKeyword, setCurrentCollectionKeyword] = useState(params.collection_keyword || DEFAULT_SEARCH_TERM); + const handleLoadingState = async (queryString) => { + setIsLoaded(false); + await push(`${pathname}?${queryString}`); + setTimeout(() => { + setIsLoaded(true); + headingRef.current?.focus(); + }, 2000); + }; const handleSearchSubmit = async (e: SyntheticEvent) => { e.preventDefault(); const queryString = createCollectionsQueryStringFromObject({ @@ -65,12 +75,7 @@ export const CollectionsPage = ({ data, params }) => { sort: currentSort, page: currentPage, }); - setIsLoaded(false); - await push(`${pathname}?${queryString}`); - setTimeout(() => { - setIsLoaded(true); - headingRef.current?.focus(); - }, 2000); + handleLoadingState(queryString); }; const handleSearchChange = (e: SyntheticEvent) => { @@ -88,12 +93,7 @@ export const CollectionsPage = ({ data, params }) => { sort: currentSort, page: pageNumber.toString(), }); - setIsLoaded(false); - await push(`${pathname}?${queryString}`); - setTimeout(() => { - setIsLoaded(true); - headingRef.current?.focus(); - }, 2000); + handleLoadingState(queryString); }; // sort @@ -104,12 +104,7 @@ export const CollectionsPage = ({ data, params }) => { sort: id, page: currentPage, }); - setIsLoaded(false); - await push(`${pathname}?${queryString}`); - setTimeout(() => { - setIsLoaded(true); - headingRef.current?.focus(); - }, 2000); + handleLoadingState(queryString); }; useEffect(() => { @@ -258,4 +253,4 @@ export const CollectionsPage = ({ data, params }) => { )} ); -}; +} From 5053036ad1cb4994dddf28b9bc5ecbf02f9c3f8c Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 9 Dec 2024 15:28:12 -0500 Subject: [PATCH 37/55] reset page num to default on submit --- app/src/components/pages/collectionsPage/collectionsPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 3ea5da6c..4ae4d99c 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -68,12 +68,13 @@ export function CollectionsPage({ data, params }) { headingRef.current?.focus(); }, 2000); }; + const handleSearchSubmit = async (e: SyntheticEvent) => { e.preventDefault(); const queryString = createCollectionsQueryStringFromObject({ collection_keyword: currentCollectionKeyword, sort: currentSort, - page: currentPage, + page: DEFAULT_PAGE_NUM, }); handleLoadingState(queryString); }; @@ -86,7 +87,6 @@ export function CollectionsPage({ data, params }) { // pagination // Question: Do we want to introduce debouncing? const onPageChange = async (pageNumber: number) => { - // currentPage = pageNumber; setCurrentPage(pageNumber); const queryString = createCollectionsQueryStringFromObject({ collection_keyword: currentCollectionKeyword, From be1ef8ba9bc793bde50f2d448027161b6920fbf5 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 9 Dec 2024 15:55:03 -0500 Subject: [PATCH 38/55] remove imports --- .../components/pages/collectionsPage/collectionsPage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 4ae4d99c..5c98d011 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -27,8 +27,6 @@ import { DEFAULT_COLLECTION_SORT, DEFAULT_SEARCH_TERM, } from "@/src/config/constants"; -import { useLoadingState } from "@/src/hooks/useLoadingState"; -import { query } from "winston"; export function CollectionsPage({ data, params }) { const { push } = useRouter(); @@ -71,10 +69,12 @@ export function CollectionsPage({ data, params }) { const handleSearchSubmit = async (e: SyntheticEvent) => { e.preventDefault(); + setCurrentPage(DEFAULT_PAGE_NUM); + setCurrentSort(DEFAULT_COLLECTION_SORT); const queryString = createCollectionsQueryStringFromObject({ collection_keyword: currentCollectionKeyword, sort: currentSort, - page: DEFAULT_PAGE_NUM, + page: currentPage, }); handleLoadingState(queryString); }; From f7adce10a8aae7fb72e0dcd1cbb349be85fc6a44 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Wed, 11 Dec 2024 14:44:04 -0500 Subject: [PATCH 39/55] first round of updates --- app/collections/page.tsx | 2 +- .../pages/collectionsPage/collectionsPage.tsx | 37 +++++++++---------- app/src/config/constants.ts | 2 +- app/src/utils/apiHelpers.ts | 17 ++++++--- 4 files changed, 30 insertions(+), 28 deletions(-) diff --git a/app/collections/page.tsx b/app/collections/page.tsx index 434457a0..57e18b64 100644 --- a/app/collections/page.tsx +++ b/app/collections/page.tsx @@ -6,7 +6,7 @@ import { redirect } from "next/navigation"; export type CollectionsProps = { params: { slug: string }; - searchParams: { page: number; sort: string; collection_keyword: string }; + searchParams: { page: string; sort: string; collection_keyword: string }; }; export const metadata: Metadata = { diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 5c98d011..0aed1151 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -42,23 +42,21 @@ export function CollectionsPage({ data, params }) { const headingRef = useRef(null); - // pagination const numFound = data.numFound || data.numResults; const totalPages = totalNumPages(numFound, data.perPage); - // set defaults const [currentPage, setCurrentPage] = useState( - params.page || DEFAULT_PAGE_NUM + Number(params.page) || Number(DEFAULT_PAGE_NUM) ); const [currentSort, setCurrentSort] = useState( params.sort || DEFAULT_COLLECTION_SORT ); - const [currentCollectionKeyword, setCurrentCollectionKeyword] = - useState(params.collection_keyword || DEFAULT_SEARCH_TERM); + const [currentCollectionKeywords, setcurrentCollectionKeywords] = + useState(params.collection_keywords || DEFAULT_SEARCH_TERM); - const handleLoadingState = async (queryString) => { + const updateURL = async (queryString) => { setIsLoaded(false); await push(`${pathname}?${queryString}`); setTimeout(() => { @@ -69,42 +67,41 @@ export function CollectionsPage({ data, params }) { const handleSearchSubmit = async (e: SyntheticEvent) => { e.preventDefault(); - setCurrentPage(DEFAULT_PAGE_NUM); + setCurrentPage(Number(DEFAULT_PAGE_NUM)); setCurrentSort(DEFAULT_COLLECTION_SORT); const queryString = createCollectionsQueryStringFromObject({ - collection_keyword: currentCollectionKeyword, + collection_keywords: currentCollectionKeywords, sort: currentSort, page: currentPage, }); - handleLoadingState(queryString); + updateURL(queryString); }; const handleSearchChange = (e: SyntheticEvent) => { const target = e.target as HTMLInputElement; - setCurrentCollectionKeyword(target.value); + setcurrentCollectionKeywords(target.value); }; // pagination - // Question: Do we want to introduce debouncing? const onPageChange = async (pageNumber: number) => { setCurrentPage(pageNumber); const queryString = createCollectionsQueryStringFromObject({ - collection_keyword: currentCollectionKeyword, + collection_keywords: currentCollectionKeywords, sort: currentSort, page: pageNumber.toString(), }); - handleLoadingState(queryString); + updateURL(queryString); }; // sort const onMenuClick = async (id) => { setCurrentSort(id); const queryString = createCollectionsQueryStringFromObject({ - collection_keyword: currentCollectionKeyword, + collection_keywords: currentCollectionKeywords, sort: id, page: currentPage, }); - handleLoadingState(queryString); + updateURL(queryString); }; useEffect(() => { @@ -151,12 +148,12 @@ export function CollectionsPage({ data, params }) { textInputProps={{ isClearable: true, isClearableCallback: () => { - setCurrentCollectionKeyword(DEFAULT_SEARCH_TERM); + setcurrentCollectionKeywords(DEFAULT_SEARCH_TERM); }, labelText: "Search by collection title", - name: "collection_keyword", + name: "collection_keywords", placeholder: "Search by collection title", - defaultValue: currentCollectionKeyword, + defaultValue: currentCollectionKeywords, onChange: (e) => handleSearchChange(e), }} onSubmit={handleSearchSubmit} @@ -217,7 +214,7 @@ export function CollectionsPage({ data, params }) { } ref={headingRef} tabIndex={-1} - id={"all-collections-page"} + id="all-collections-page" width="max-content" > {`Displaying ${displayResults(data.numResults, data.perPage, data.page)} @@ -228,7 +225,7 @@ export function CollectionsPage({ data, params }) { collections.length > 0 ? ( ) : ( - + ) ) : ( Array(Math.ceil(collections.length / 4)).fill( diff --git a/app/src/config/constants.ts b/app/src/config/constants.ts index 8334c049..8e3cbe62 100644 --- a/app/src/config/constants.ts +++ b/app/src/config/constants.ts @@ -14,6 +14,6 @@ export const TRUNCATED_LENGTH = 80; export const CARDS_PER_PAGE = 48; -export const DEFAULT_PAGE_NUM = 1; +export const DEFAULT_PAGE_NUM = "1"; export const DEFAULT_COLLECTION_SORT = "date-desc"; export const DEFAULT_SEARCH_TERM = ""; diff --git a/app/src/utils/apiHelpers.ts b/app/src/utils/apiHelpers.ts index 0f7a4bc8..f79a802b 100644 --- a/app/src/utils/apiHelpers.ts +++ b/app/src/utils/apiHelpers.ts @@ -2,7 +2,12 @@ import data from "../../src/data/lanes"; import type { LaneDataType } from "../../src/types/Lane"; import { imageURL, addCommas, collectionsSortOptions } from "../utils/utils"; import defaultFeaturedItems from "../data/defaultFeaturedItemData"; -import { CARDS_PER_PAGE } from "../config/constants"; +import { + CARDS_PER_PAGE, + DEFAULT_COLLECTION_SORT, + DEFAULT_PAGE_NUM, + DEFAULT_SEARCH_TERM, +} from "../config/constants"; import { fetchApi } from "./fetchApi"; export const getHomePageData = async () => { @@ -157,15 +162,15 @@ export const getDivisionData = async ({ }; export const getCollectionsData = async ({ - keyword = "", - sortID = "date-desc", // TODO: rename sortID TODO: store defaults as constants - pageNum = 1, + keyword = DEFAULT_SEARCH_TERM, + sortID = DEFAULT_COLLECTION_SORT, + pageNum = DEFAULT_PAGE_NUM, perPage = CARDS_PER_PAGE, }: { keyword?: string; sortID?: string; - pageNum?: number; - perPage?: number; // OPEN QUESTION: perhaps remove the "perPage" field because the API default is 48 and that is what we want. + pageNum?: string; + perPage?: number; } = {}) => { let apiUrl = `${process.env.API_URL}/api/v2/collections?page=${pageNum}&per_page=${perPage}&sort=${collectionsSortOptions[sortID]}&q=${keyword}`; const res = await fetchApi(apiUrl); From 6981a26805d047b0a2cf0b70ef8ab6ae2e8a4236 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Wed, 11 Dec 2024 14:55:18 -0500 Subject: [PATCH 40/55] second round of feedback --- app/collections/page.tsx | 7 +++--- .../pages/collectionsPage/collectionsPage.tsx | 10 ++++---- app/src/components/results/noResultsFound.tsx | 5 ---- app/src/utils/utils.ts | 25 ++++++++----------- 4 files changed, 19 insertions(+), 28 deletions(-) diff --git a/app/collections/page.tsx b/app/collections/page.tsx index 57e18b64..e773af5f 100644 --- a/app/collections/page.tsx +++ b/app/collections/page.tsx @@ -6,7 +6,7 @@ import { redirect } from "next/navigation"; export type CollectionsProps = { params: { slug: string }; - searchParams: { page: string; sort: string; collection_keyword: string }; + searchParams: { page: string; sort: string; collection_keywords: string }; }; export const metadata: Metadata = { @@ -18,10 +18,10 @@ export const metadata: Metadata = { export default async function Collections({ searchParams }: CollectionsProps) { const data = await getCollectionsData({ - keyword: searchParams.collection_keyword, + keyword: searchParams.collection_keywords, sortID: searchParams.sort, pageNum: searchParams.page, - }); // TODO: create model for APICollectionsData from API to clean up the data before it's sent down to the components. + }); // Repo API returns 404s within the data. if ( @@ -33,7 +33,6 @@ export default async function Collections({ searchParams }: CollectionsProps) { return ( - {/* pass entire Repo API Response */} ); diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 0aed1151..664ddbc5 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -62,17 +62,19 @@ export function CollectionsPage({ data, params }) { setTimeout(() => { setIsLoaded(true); headingRef.current?.focus(); - }, 2000); + }, 1000); }; const handleSearchSubmit = async (e: SyntheticEvent) => { e.preventDefault(); + // something is so weird about state here. + // change the values in the object passed down to createCollectionsQueryStringFromObject to be currentPage and currentSort and tell me if it works for you.... setCurrentPage(Number(DEFAULT_PAGE_NUM)); setCurrentSort(DEFAULT_COLLECTION_SORT); const queryString = createCollectionsQueryStringFromObject({ collection_keywords: currentCollectionKeywords, - sort: currentSort, - page: currentPage, + sort: DEFAULT_COLLECTION_SORT, + page: DEFAULT_PAGE_NUM, }); updateURL(queryString); }; @@ -82,7 +84,6 @@ export function CollectionsPage({ data, params }) { setcurrentCollectionKeywords(target.value); }; - // pagination const onPageChange = async (pageNumber: number) => { setCurrentPage(pageNumber); const queryString = createCollectionsQueryStringFromObject({ @@ -93,7 +94,6 @@ export function CollectionsPage({ data, params }) { updateURL(queryString); }; - // sort const onMenuClick = async (id) => { setCurrentSort(id); const queryString = createCollectionsQueryStringFromObject({ diff --git a/app/src/components/results/noResultsFound.tsx b/app/src/components/results/noResultsFound.tsx index 2e8eb970..02a0300a 100644 --- a/app/src/components/results/noResultsFound.tsx +++ b/app/src/components/results/noResultsFound.tsx @@ -2,15 +2,10 @@ import { Flex, Heading, Text, - Link, List, } from "@nypl/design-system-react-components"; -import Image from "next/image"; -import useBreakpoints from "@/src/hooks/useBreakpoints"; -import { useFeedbackContext } from "@/src/context/FeedbackProvider"; export default function NoResultsFound({ searchTerm }) { - console.log("searchTerm is: ", searchTerm); const headingText = `No Results for "${searchTerm}"`; return ( { const params = new URLSearchParams(); - Object.keys(paramObj).map((name, value) => { - params.set( - name.toString(), - name === "page" ? paramObj[name].toString() : paramObj[name] - ); + Object.keys(paramObj).forEach((name) => { + params.set(name.toString(), paramObj[name]); }); return params.toString(); }; export const createCollectionsQueryStringFromObject = (paramObj) => { const newParams = {}; - Object.keys(paramObj).map((key) => { - if ( - !( - paramObj[key] === DEFAULT_SEARCH_TERM || - paramObj[key] === DEFAULT_PAGE_NUM || - paramObj[key] === DEFAULT_PAGE_NUM.toString() || - paramObj[key] === DEFAULT_COLLECTION_SORT - ) - ) { + const defaultValues = [ + DEFAULT_SEARCH_TERM, + DEFAULT_PAGE_NUM, + DEFAULT_PAGE_NUM.toString(), + DEFAULT_COLLECTION_SORT, + ]; + Object.keys(paramObj).forEach((key) => { + if (!defaultValues.includes(paramObj[key])) { newParams[key] = paramObj[key]; } }); + return createQueryStringFromObject(newParams); }; From fa55e8b74665ad9b596d2eba216f5ba71a72b8e6 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Wed, 11 Dec 2024 15:15:02 -0500 Subject: [PATCH 41/55] create type for collection search params and use in util method --- .../pages/collectionsPage/collectionsPage.tsx | 15 ++++++++----- app/src/types/CollectionSearchParams.ts | 7 ++++++ app/src/utils/utils.ts | 22 ++++++++++--------- 3 files changed, 29 insertions(+), 15 deletions(-) create mode 100644 app/src/types/CollectionSearchParams.ts diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 664ddbc5..cfd0e333 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -17,7 +17,7 @@ import LaneLoading from "../../lane/laneLoading"; import { displayResults, totalNumPages, - createCollectionsQueryStringFromObject, + createCollectionsQueryStringFromHash, } from "../../../utils/utils"; import type { SyntheticEvent } from "react"; import { createAdobeAnalyticsPageName } from "@/src/utils/utils"; @@ -28,12 +28,17 @@ import { DEFAULT_SEARCH_TERM, } from "@/src/config/constants"; -export function CollectionsPage({ data, params }) { +export function CollectionsPage({ data, params, renderCollections }) { const { push } = useRouter(); const pathname = usePathname(); const [isLoaded, setIsLoaded] = useState(false); let collections = []; + // if (data.collections !== undefined) { + // collections = Array.isArray(data.collection) + // ? data.collection + // : [data.collection]; + // } if (data.headers.message === "Collections retrieved successfully") { collections = Array.isArray(data.collection) ? data.collection @@ -71,7 +76,7 @@ export function CollectionsPage({ data, params }) { // change the values in the object passed down to createCollectionsQueryStringFromObject to be currentPage and currentSort and tell me if it works for you.... setCurrentPage(Number(DEFAULT_PAGE_NUM)); setCurrentSort(DEFAULT_COLLECTION_SORT); - const queryString = createCollectionsQueryStringFromObject({ + const queryString = createCollectionsQueryStringFromHash({ collection_keywords: currentCollectionKeywords, sort: DEFAULT_COLLECTION_SORT, page: DEFAULT_PAGE_NUM, @@ -86,7 +91,7 @@ export function CollectionsPage({ data, params }) { const onPageChange = async (pageNumber: number) => { setCurrentPage(pageNumber); - const queryString = createCollectionsQueryStringFromObject({ + const queryString = createCollectionsQueryStringFromHash({ collection_keywords: currentCollectionKeywords, sort: currentSort, page: pageNumber.toString(), @@ -96,7 +101,7 @@ export function CollectionsPage({ data, params }) { const onMenuClick = async (id) => { setCurrentSort(id); - const queryString = createCollectionsQueryStringFromObject({ + const queryString = createCollectionsQueryStringFromHash({ collection_keywords: currentCollectionKeywords, sort: id, page: currentPage, diff --git a/app/src/types/CollectionSearchParams.ts b/app/src/types/CollectionSearchParams.ts new file mode 100644 index 00000000..fd49bac8 --- /dev/null +++ b/app/src/types/CollectionSearchParams.ts @@ -0,0 +1,7 @@ +export interface CollectionSearchParams { + collection_keywords: string; + sort: string; + page: string; +} + +export default CollectionSearchParams; diff --git a/app/src/utils/utils.ts b/app/src/utils/utils.ts index e5d037a7..b6394734 100644 --- a/app/src/utils/utils.ts +++ b/app/src/utils/utils.ts @@ -7,7 +7,7 @@ import { } from "../config/constants"; import CollectionDataType from "@/src/types/CollectionDataType"; import ItemDataType from "@/src/types/ItemDataType"; - +import CollectionSearchParams from "../types/CollectionSearchParams"; /** * Represents a IIIF Image API URL, which will be used globally throughout the application. * IIIF Image API has several params, the ones we are the most concerned about are Region, Size, and Rotation. @@ -129,27 +129,29 @@ export function displayResults( return `${start}-${end} of ${numFound}`; } -export const createQueryStringFromObject = (paramObj) => { +export const createQueryStringFromHash = (hash) => { const params = new URLSearchParams(); - Object.keys(paramObj).forEach((name) => { - params.set(name.toString(), paramObj[name]); + Object.keys(hash).forEach((name) => { + params.set(name.toString(), hash[name]); }); return params.toString(); }; -export const createCollectionsQueryStringFromObject = (paramObj) => { +export const createCollectionsQueryStringFromHash = ( + paramsHash: CollectionSearchParams +) => { const newParams = {}; const defaultValues = [ DEFAULT_SEARCH_TERM, DEFAULT_PAGE_NUM, - DEFAULT_PAGE_NUM.toString(), DEFAULT_COLLECTION_SORT, ]; - Object.keys(paramObj).forEach((key) => { - if (!defaultValues.includes(paramObj[key])) { - newParams[key] = paramObj[key]; + + Object.keys(paramsHash).forEach((key) => { + if (!defaultValues.includes(paramsHash[key])) { + newParams[key] = paramsHash[key]; } }); - return createQueryStringFromObject(newParams); + return createQueryStringFromHash(newParams); }; From 67bd398c43da5c3f2732dd04c095a748ce847ba3 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Thu, 12 Dec 2024 10:04:17 -0500 Subject: [PATCH 42/55] fix tests --- app/src/config/constants.ts | 6 +++ app/src/utils/apiHelpers.test.tsx | 17 +++++++ app/src/utils/apiHelpers.ts | 5 +- app/src/utils/utils.test.tsx | 78 +++++++++++++++---------------- app/src/utils/utils.ts | 7 --- 5 files changed, 65 insertions(+), 48 deletions(-) diff --git a/app/src/config/constants.ts b/app/src/config/constants.ts index 8e3cbe62..b8d0404a 100644 --- a/app/src/config/constants.ts +++ b/app/src/config/constants.ts @@ -17,3 +17,9 @@ export const CARDS_PER_PAGE = 48; export const DEFAULT_PAGE_NUM = "1"; export const DEFAULT_COLLECTION_SORT = "date-desc"; export const DEFAULT_SEARCH_TERM = ""; +export const COLLECTION_SORT_OPTIONS = { + "date-desc": "date DESC", + "date-asc": "date ASC", + "title-desc": "title DESC", + "title-asc": "title ASC", +}; diff --git a/app/src/utils/apiHelpers.test.tsx b/app/src/utils/apiHelpers.test.tsx index c06f92e2..56c0cf6c 100644 --- a/app/src/utils/apiHelpers.test.tsx +++ b/app/src/utils/apiHelpers.test.tsx @@ -8,6 +8,7 @@ import { getLaneData, getNumDigitizedItems, getRandomFeaturedItem, + getCollectionsData, } from "./apiHelpers"; import { fetchApi } from "./fetchApi"; import defaultFeaturedItem from "../data/defaultFeaturedItemData"; @@ -369,3 +370,19 @@ describe("getItemData", () => { expect(item).toHaveProperty("mods"); }); }); + +// describe("getCollectionsData", () => { +// it("returns expected results", async () => { +// (fetchApi as jest.Mock).mockResolvedValueOnce( +// Promise.resolve(getCollectionsData) +// ); +// const collections = await getCollectionsData("uuid1"); +// expect(fetchApi as jest.Mock).toHaveBeenCalledWith( +// `${process.env.API_URL}/api/v2/collections?page=1&per_page=48&sort=&q=` +// ); + +// expect(collections).toEqual(mockPaginatedCollections); +// expect(collections).toHaveProperty("capture"); +// expect(collections).toHaveProperty("mods"); +// }); +// }); diff --git a/app/src/utils/apiHelpers.ts b/app/src/utils/apiHelpers.ts index f79a802b..bf036851 100644 --- a/app/src/utils/apiHelpers.ts +++ b/app/src/utils/apiHelpers.ts @@ -1,12 +1,13 @@ import data from "../../src/data/lanes"; import type { LaneDataType } from "../../src/types/Lane"; -import { imageURL, addCommas, collectionsSortOptions } from "../utils/utils"; +import { imageURL, addCommas } from "../utils/utils"; import defaultFeaturedItems from "../data/defaultFeaturedItemData"; import { CARDS_PER_PAGE, DEFAULT_COLLECTION_SORT, DEFAULT_PAGE_NUM, DEFAULT_SEARCH_TERM, + COLLECTION_SORT_OPTIONS, } from "../config/constants"; import { fetchApi } from "./fetchApi"; @@ -172,7 +173,7 @@ export const getCollectionsData = async ({ pageNum?: string; perPage?: number; } = {}) => { - let apiUrl = `${process.env.API_URL}/api/v2/collections?page=${pageNum}&per_page=${perPage}&sort=${collectionsSortOptions[sortID]}&q=${keyword}`; + let apiUrl = `${process.env.API_URL}/api/v2/collections?page=${pageNum}&per_page=${perPage}&sort=${COLLECTION_SORT_OPTIONS[sortID]}&q=${keyword}`; const res = await fetchApi(apiUrl); return res; }; diff --git a/app/src/utils/utils.test.tsx b/app/src/utils/utils.test.tsx index 6edf898e..09b81633 100644 --- a/app/src/utils/utils.test.tsx +++ b/app/src/utils/utils.test.tsx @@ -3,8 +3,8 @@ import { stringToSlug, createAdobeAnalyticsPageName, displayResults, - createQueryStringFromObject, - createCollectionsQueryStringFromObject, + createQueryStringFromHash, + createCollectionsQueryStringFromHash, } from "./utils"; import { DEFAULT_PAGE_NUM, @@ -211,13 +211,13 @@ describe("displayResults", () => { }); }); -describe("createQueryStringFromObject generates the correct query string: ", () => { +describe("createQueryStringFromHash generates the correct query string: ", () => { test("when the values are all empty", () => { - expect(createQueryStringFromObject({})).toBe(""); + expect(createQueryStringFromHash({})).toBe(""); }); test("when there are multiple values", () => { expect( - createQueryStringFromObject({ + createQueryStringFromHash({ dog: "cat", help: "me", this_is: "aTest", @@ -226,18 +226,18 @@ describe("createQueryStringFromObject generates the correct query string: ", () }); }); -describe("createCollectionsQueryStringFromObject generates the correct query string: ", () => { +describe("createCollectionsQueryStringFromHash generates the correct query string: ", () => { test("when the values are all empty or all defaults", () => { expect( - createCollectionsQueryStringFromObject({ - collection_keyword: "", + createCollectionsQueryStringFromHash({ + collection_keywords: "", sort: "", page: "", }) ).toBe(""); expect( - createCollectionsQueryStringFromObject({ - collection_keyword: DEFAULT_SEARCH_TERM, + createCollectionsQueryStringFromHash({ + collection_keywords: DEFAULT_SEARCH_TERM, sort: DEFAULT_COLLECTION_SORT, page: DEFAULT_PAGE_NUM, }) @@ -246,37 +246,37 @@ describe("createCollectionsQueryStringFromObject generates the correct query str test("when the values are all set to a non-default value", () => { expect( - createCollectionsQueryStringFromObject({ - collection_keyword: "cat", + createCollectionsQueryStringFromHash({ + collection_keywords: "cat", sort: "title-desc", page: "2", }) - ).toBe("collection_keyword=cat&sort=title-desc&page=2"); + ).toBe("collection_keywords=cat&sort=title-desc&page=2"); }); - test("collection_keyword search values are set correctly", () => { + test("collection_keywords search values are set correctly", () => { // empty sort and page num, not default keyword expect( - createCollectionsQueryStringFromObject({ - collection_keyword: "cat", + createCollectionsQueryStringFromHash({ + collection_keywords: "cat", sort: "", page: "", }) - ).toBe("collection_keyword=cat"); + ).toBe("collection_keywords=cat"); // default sort and page num, not default keyword expect( - createCollectionsQueryStringFromObject({ - collection_keyword: "cat", + createCollectionsQueryStringFromHash({ + collection_keywords: "cat", sort: DEFAULT_COLLECTION_SORT, page: DEFAULT_PAGE_NUM, }) - ).toBe("collection_keyword=cat"); + ).toBe("collection_keywords=cat"); // default keyword, page num and sort are not default expect( - createCollectionsQueryStringFromObject({ - collection_keyword: DEFAULT_SEARCH_TERM, + createCollectionsQueryStringFromHash({ + collection_keywords: DEFAULT_SEARCH_TERM, sort: "title-desc", page: "2", }) @@ -287,8 +287,8 @@ describe("createCollectionsQueryStringFromObject generates the correct query str // sort // only sort, keyword is default and page is empty expect( - createCollectionsQueryStringFromObject({ - collection_keyword: DEFAULT_SEARCH_TERM, + createCollectionsQueryStringFromHash({ + collection_keywords: DEFAULT_SEARCH_TERM, sort: "title-desc", page: "", }) @@ -296,8 +296,8 @@ describe("createCollectionsQueryStringFromObject generates the correct query str // default keyword and page num, not default sort expect( - createCollectionsQueryStringFromObject({ - collection_keyword: DEFAULT_SEARCH_TERM, + createCollectionsQueryStringFromHash({ + collection_keywords: DEFAULT_SEARCH_TERM, sort: "title-desc", page: DEFAULT_PAGE_NUM, }) @@ -305,19 +305,19 @@ describe("createCollectionsQueryStringFromObject generates the correct query str // default sort, not default page or keyword expect( - createCollectionsQueryStringFromObject({ - collection_keyword: "cat", + createCollectionsQueryStringFromHash({ + collection_keywords: "cat", sort: DEFAULT_COLLECTION_SORT, page: "2", }) - ).toBe("collection_keyword=cat&page=2"); + ).toBe("collection_keywords=cat&page=2"); }); test("page num values are set correctly: ", () => { // default keyword and sort, not default page num expect( - createCollectionsQueryStringFromObject({ - collection_keyword: DEFAULT_SEARCH_TERM, + createCollectionsQueryStringFromHash({ + collection_keywords: DEFAULT_SEARCH_TERM, sort: DEFAULT_COLLECTION_SORT, page: "2", }) @@ -325,17 +325,17 @@ describe("createCollectionsQueryStringFromObject generates the correct query str // default keyword and sort, not default page num. page num is integer. expect( - createCollectionsQueryStringFromObject({ - collection_keyword: DEFAULT_SEARCH_TERM, + createCollectionsQueryStringFromHash({ + collection_keywords: DEFAULT_SEARCH_TERM, sort: DEFAULT_COLLECTION_SORT, page: 2, }) ).toBe("page=2"); - // only page num, sort and collection_keyword are empty + // only page num, sort and collection_keywords are empty expect( - createCollectionsQueryStringFromObject({ - collection_keyword: DEFAULT_SEARCH_TERM, + createCollectionsQueryStringFromHash({ + collection_keywords: DEFAULT_SEARCH_TERM, sort: "", page: "2", }) @@ -343,11 +343,11 @@ describe("createCollectionsQueryStringFromObject generates the correct query str // default page num, key word and sort are not default expect( - createCollectionsQueryStringFromObject({ - collection_keyword: "cat", + createCollectionsQueryStringFromHash({ + collection_keywords: "cat", sort: "title-desc", page: "1", }) - ).toBe("collection_keyword=cat&sort=title-desc"); + ).toBe("collection_keywords=cat&sort=title-desc"); }); }); diff --git a/app/src/utils/utils.ts b/app/src/utils/utils.ts index b6394734..1df689fe 100644 --- a/app/src/utils/utils.ts +++ b/app/src/utils/utils.ts @@ -105,13 +105,6 @@ export function isCollectionType( return "numberOfDigitizedItems" in records[0]; } -export const collectionsSortOptions = { - "date-desc": "date DESC", - "date-asc": "date ASC", - "title-desc": "title DESC", - "title-asc": "title ASC", -}; - export const createAdobeAnalyticsPageName = ( base: string, recordName: string = "" From 329d951c108484475518c20cc6dadaef2e1ce40b Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Thu, 12 Dec 2024 10:08:24 -0500 Subject: [PATCH 43/55] cleanup --- .../components/pages/collectionsPage/collectionsPage.tsx | 4 ++-- app/src/utils/utils.test.tsx | 9 --------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index cfd0e333..2eee160a 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -28,7 +28,7 @@ import { DEFAULT_SEARCH_TERM, } from "@/src/config/constants"; -export function CollectionsPage({ data, params, renderCollections }) { +export function CollectionsPage({ data, params }) { const { push } = useRouter(); const pathname = usePathname(); const [isLoaded, setIsLoaded] = useState(false); @@ -104,7 +104,7 @@ export function CollectionsPage({ data, params, renderCollections }) { const queryString = createCollectionsQueryStringFromHash({ collection_keywords: currentCollectionKeywords, sort: id, - page: currentPage, + page: String(currentPage), }); updateURL(queryString); }; diff --git a/app/src/utils/utils.test.tsx b/app/src/utils/utils.test.tsx index 09b81633..f118d03c 100644 --- a/app/src/utils/utils.test.tsx +++ b/app/src/utils/utils.test.tsx @@ -323,15 +323,6 @@ describe("createCollectionsQueryStringFromHash generates the correct query strin }) ).toBe("page=2"); - // default keyword and sort, not default page num. page num is integer. - expect( - createCollectionsQueryStringFromHash({ - collection_keywords: DEFAULT_SEARCH_TERM, - sort: DEFAULT_COLLECTION_SORT, - page: 2, - }) - ).toBe("page=2"); - // only page num, sort and collection_keywords are empty expect( createCollectionsQueryStringFromHash({ From f23bcd55ea8e46dac30f6ca0904501358d5d0677 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Thu, 12 Dec 2024 10:36:28 -0500 Subject: [PATCH 44/55] tests for getCollectionData --- __tests__/__mocks__/data/mockApiResponses.tsx | 453 ++++++++++++++++++ app/src/utils/apiHelpers.test.tsx | 55 ++- 2 files changed, 493 insertions(+), 15 deletions(-) diff --git a/__tests__/__mocks__/data/mockApiResponses.tsx b/__tests__/__mocks__/data/mockApiResponses.tsx index 54589e4e..d781a2cb 100644 --- a/__tests__/__mocks__/data/mockApiResponses.tsx +++ b/__tests__/__mocks__/data/mockApiResponses.tsx @@ -293,3 +293,456 @@ export const mockItemResponse = { }, }, }; + +export const mockCollectionsResponse = { + headers: { status: "success", code: "200", message: "ok" }, + numResults: "954924", + page: "1", + perPage: "40", + collection: [ + { + uuid: "60932400-20f2-0138-8583-05c43d448773", + title: "Posada Collection", + url: "https://digitalcollections.nypl.org/collections/posada-collection#/?tab=navigation", + imageID: "58270299", + numberOfDigitizedItems: 34, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "724303e0-c6bb-012f-afbd-58d385a7bc34", + title: "MAVO", + url: "https://digitalcollections.nypl.org/collections/mavo#/?tab=navigation", + imageID: null, + numberOfDigitizedItems: 35, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "6b6532b0-5df7-013b-36f8-0242ac110002", + title: "Austin Hansen photograph collection", + url: "https://digitalcollections.nypl.org/collections/austin-hansen-photograph-collection#/?tab=navigation", + imageID: "58300996", + numberOfDigitizedItems: 65, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "5b996640-c31c-0139-0bac-0242ac110004", + title: + "Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers", + url: "https://digitalcollections.nypl.org/collections/arthur-alfonso-schomburg-papers#/?tab=navigation", + imageID: null, + numberOfDigitizedItems: 55, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "d3802d10-f49a-0139-3bff-0242ac110002", + title: "Friedman-Abeles photographs", + url: "https://digitalcollections.nypl.org/collections/friedman-abeles-photographs#/?tab=navigation", + imageID: "58498722", + numberOfDigitizedItems: 35, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "e5462600-c5d9-012f-a6a3-58d385a7bc34", + title: "Farm Security Administration Photographs", + url: "https://digitalcollections.nypl.org/collections/farm-security-administration-photographs#/?tab=navigation", + imageID: "1952272", + numberOfDigitizedItems: 36, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "812e5770-c60c-012f-7167-58d385a7bc34", + title: "Changing New York", + url: "https://digitalcollections.nypl.org/collections/changing-new-york#/?tab=navigation", + imageID: "58447105", + numberOfDigitizedItems: 37, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", + title: + "The Black Experience in Children's Books: Selections from Augusta Baker's Bibliographies", + url: "https://digitalcollections.nypl.org/collections/the-black-experience-in-childrens-books-selections-from-augusta-bakers#/?tab=about", + imageID: "56958645", + numberOfDigitizedItems: 153, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "60932400-20f2-0138-8583-05c43d448773", + title: "Posada Collection", + url: "https://digitalcollections.nypl.org/collections/posada-collection#/?tab=navigation", + imageID: "58270299", + numberOfDigitizedItems: 34, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "724303e0-c6bb-012f-afbd-58d385a7bc34", + title: "MAVO", + url: "https://digitalcollections.nypl.org/collections/mavo#/?tab=navigation", + imageID: null, + numberOfDigitizedItems: 35, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "6b6532b0-5df7-013b-36f8-0242ac110002", + title: "Austin Hansen photograph collection", + url: "https://digitalcollections.nypl.org/collections/austin-hansen-photograph-collection#/?tab=navigation", + imageID: "58300996", + numberOfDigitizedItems: 65, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "5b996640-c31c-0139-0bac-0242ac110004", + title: + "Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers", + url: "https://digitalcollections.nypl.org/collections/arthur-alfonso-schomburg-papers#/?tab=navigation", + imageID: null, + numberOfDigitizedItems: 55, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "d3802d10-f49a-0139-3bff-0242ac110002", + title: "Friedman-Abeles photographs", + url: "https://digitalcollections.nypl.org/collections/friedman-abeles-photographs#/?tab=navigation", + imageID: "58498722", + numberOfDigitizedItems: 35, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "e5462600-c5d9-012f-a6a3-58d385a7bc34", + title: "Farm Security Administration Photographs", + url: "https://digitalcollections.nypl.org/collections/farm-security-administration-photographs#/?tab=navigation", + imageID: "1952272", + numberOfDigitizedItems: 36, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "812e5770-c60c-012f-7167-58d385a7bc34", + title: "Changing New York", + url: "https://digitalcollections.nypl.org/collections/changing-new-york#/?tab=navigation", + imageID: "58447105", + numberOfDigitizedItems: 37, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", + title: + "The Black Experience in Children's Books: Selections from Augusta Baker's Bibliographies", + url: "https://digitalcollections.nypl.org/collections/the-black-experience-in-childrens-books-selections-from-augusta-bakers#/?tab=about", + imageID: "56958645", + numberOfDigitizedItems: 153, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "60932400-20f2-0138-8583-05c43d448773", + title: "Posada Collection", + url: "https://digitalcollections.nypl.org/collections/posada-collection#/?tab=navigation", + imageID: "58270299", + numberOfDigitizedItems: 34, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "724303e0-c6bb-012f-afbd-58d385a7bc34", + title: "MAVO", + url: "https://digitalcollections.nypl.org/collections/mavo#/?tab=navigation", + imageID: null, + numberOfDigitizedItems: 35, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "6b6532b0-5df7-013b-36f8-0242ac110002", + title: "Austin Hansen photograph collection", + url: "https://digitalcollections.nypl.org/collections/austin-hansen-photograph-collection#/?tab=navigation", + imageID: "58300996", + numberOfDigitizedItems: 65, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "5b996640-c31c-0139-0bac-0242ac110004", + title: + "Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers", + url: "https://digitalcollections.nypl.org/collections/arthur-alfonso-schomburg-papers#/?tab=navigation", + imageID: null, + numberOfDigitizedItems: 55, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "d3802d10-f49a-0139-3bff-0242ac110002", + title: "Friedman-Abeles photographs", + url: "https://digitalcollections.nypl.org/collections/friedman-abeles-photographs#/?tab=navigation", + imageID: "58498722", + numberOfDigitizedItems: 35, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "e5462600-c5d9-012f-a6a3-58d385a7bc34", + title: "Farm Security Administration Photographs", + url: "https://digitalcollections.nypl.org/collections/farm-security-administration-photographs#/?tab=navigation", + imageID: "1952272", + numberOfDigitizedItems: 36, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "812e5770-c60c-012f-7167-58d385a7bc34", + title: "Changing New York", + url: "https://digitalcollections.nypl.org/collections/changing-new-york#/?tab=navigation", + imageID: "58447105", + numberOfDigitizedItems: 37, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", + title: + "The Black Experience in Children's Books: Selections from Augusta Baker's Bibliographies", + url: "https://digitalcollections.nypl.org/collections/the-black-experience-in-childrens-books-selections-from-augusta-bakers#/?tab=about", + imageID: "56958645", + numberOfDigitizedItems: 153, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "60932400-20f2-0138-8583-05c43d448773", + title: "Posada Collection", + url: "https://digitalcollections.nypl.org/collections/posada-collection#/?tab=navigation", + imageID: "58270299", + numberOfDigitizedItems: 34, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "724303e0-c6bb-012f-afbd-58d385a7bc34", + title: "MAVO", + url: "https://digitalcollections.nypl.org/collections/mavo#/?tab=navigation", + imageID: null, + numberOfDigitizedItems: 35, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "6b6532b0-5df7-013b-36f8-0242ac110002", + title: "Austin Hansen photograph collection", + url: "https://digitalcollections.nypl.org/collections/austin-hansen-photograph-collection#/?tab=navigation", + imageID: "58300996", + numberOfDigitizedItems: 65, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "5b996640-c31c-0139-0bac-0242ac110004", + title: + "Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers", + url: "https://digitalcollections.nypl.org/collections/arthur-alfonso-schomburg-papers#/?tab=navigation", + imageID: null, + numberOfDigitizedItems: 55, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "d3802d10-f49a-0139-3bff-0242ac110002", + title: "Friedman-Abeles photographs", + url: "https://digitalcollections.nypl.org/collections/friedman-abeles-photographs#/?tab=navigation", + imageID: "58498722", + numberOfDigitizedItems: 35, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "e5462600-c5d9-012f-a6a3-58d385a7bc34", + title: "Farm Security Administration Photographs", + url: "https://digitalcollections.nypl.org/collections/farm-security-administration-photographs#/?tab=navigation", + imageID: "1952272", + numberOfDigitizedItems: 36, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "812e5770-c60c-012f-7167-58d385a7bc34", + title: "Changing New York", + url: "https://digitalcollections.nypl.org/collections/changing-new-york#/?tab=navigation", + imageID: "58447105", + numberOfDigitizedItems: 37, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", + title: + "The Black Experience in Children's Books: Selections from Augusta Baker's Bibliographies", + url: "https://digitalcollections.nypl.org/collections/the-black-experience-in-childrens-books-selections-from-augusta-bakers#/?tab=about", + imageID: "56958645", + numberOfDigitizedItems: 153, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "60932400-20f2-0138-8583-05c43d448773", + title: "Posada Collection", + url: "https://digitalcollections.nypl.org/collections/posada-collection#/?tab=navigation", + imageID: "58270299", + numberOfDigitizedItems: 34, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "724303e0-c6bb-012f-afbd-58d385a7bc34", + title: "MAVO", + url: "https://digitalcollections.nypl.org/collections/mavo#/?tab=navigation", + imageID: null, + numberOfDigitizedItems: 35, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "6b6532b0-5df7-013b-36f8-0242ac110002", + title: "Austin Hansen photograph collection", + url: "https://digitalcollections.nypl.org/collections/austin-hansen-photograph-collection#/?tab=navigation", + imageID: "58300996", + numberOfDigitizedItems: 65, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "5b996640-c31c-0139-0bac-0242ac110004", + title: + "Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers", + url: "https://digitalcollections.nypl.org/collections/arthur-alfonso-schomburg-papers#/?tab=navigation", + imageID: null, + numberOfDigitizedItems: 55, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "d3802d10-f49a-0139-3bff-0242ac110002", + title: "Friedman-Abeles photographs", + url: "https://digitalcollections.nypl.org/collections/friedman-abeles-photographs#/?tab=navigation", + imageID: "58498722", + numberOfDigitizedItems: 35, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "e5462600-c5d9-012f-a6a3-58d385a7bc34", + title: "Farm Security Administration Photographs", + url: "https://digitalcollections.nypl.org/collections/farm-security-administration-photographs#/?tab=navigation", + imageID: "1952272", + numberOfDigitizedItems: 36, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "812e5770-c60c-012f-7167-58d385a7bc34", + title: "Changing New York", + url: "https://digitalcollections.nypl.org/collections/changing-new-york#/?tab=navigation", + imageID: "58447105", + numberOfDigitizedItems: 37, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", + title: + "The Black Experience in Children's Books: Selections from Augusta Baker's Bibliographies", + url: "https://digitalcollections.nypl.org/collections/the-black-experience-in-childrens-books-selections-from-augusta-bakers#/?tab=about", + imageID: "56958645", + numberOfDigitizedItems: 153, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "60932400-20f2-0138-8583-05c43d448773", + title: "Posada Collection", + url: "https://digitalcollections.nypl.org/collections/posada-collection#/?tab=navigation", + imageID: "58270299", + numberOfDigitizedItems: 34, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "724303e0-c6bb-012f-afbd-58d385a7bc34", + title: "MAVO", + url: "https://digitalcollections.nypl.org/collections/mavo#/?tab=navigation", + imageID: null, + numberOfDigitizedItems: 35, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "6b6532b0-5df7-013b-36f8-0242ac110002", + title: "Austin Hansen photograph collection", + url: "https://digitalcollections.nypl.org/collections/austin-hansen-photograph-collection#/?tab=navigation", + imageID: "58300996", + numberOfDigitizedItems: 65, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "5b996640-c31c-0139-0bac-0242ac110004", + title: + "Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers", + url: "https://digitalcollections.nypl.org/collections/arthur-alfonso-schomburg-papers#/?tab=navigation", + imageID: null, + numberOfDigitizedItems: 55, + containsOnSiteMaterials: true, + containsAVMaterial: false, + }, + { + uuid: "d3802d10-f49a-0139-3bff-0242ac110002", + title: "Friedman-Abeles photographs", + url: "https://digitalcollections.nypl.org/collections/friedman-abeles-photographs#/?tab=navigation", + imageID: "58498722", + numberOfDigitizedItems: 35, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "e5462600-c5d9-012f-a6a3-58d385a7bc34", + title: "Farm Security Administration Photographs", + url: "https://digitalcollections.nypl.org/collections/farm-security-administration-photographs#/?tab=navigation", + imageID: "1952272", + numberOfDigitizedItems: 36, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "812e5770-c60c-012f-7167-58d385a7bc34", + title: "Changing New York", + url: "https://digitalcollections.nypl.org/collections/changing-new-york#/?tab=navigation", + imageID: "58447105", + numberOfDigitizedItems: 37, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + { + uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", + title: + "The Black Experience in Children's Books: Selections from Augusta Baker's Bibliographies", + url: "https://digitalcollections.nypl.org/collections/the-black-experience-in-childrens-books-selections-from-augusta-bakers#/?tab=about", + imageID: "56958645", + numberOfDigitizedItems: 153, + containsOnSiteMaterials: false, + containsAVMaterial: false, + }, + ], +}; diff --git a/app/src/utils/apiHelpers.test.tsx b/app/src/utils/apiHelpers.test.tsx index 56c0cf6c..462eda27 100644 --- a/app/src/utils/apiHelpers.test.tsx +++ b/app/src/utils/apiHelpers.test.tsx @@ -15,6 +15,7 @@ import defaultFeaturedItem from "../data/defaultFeaturedItemData"; import { mockFeaturedItemResponse, mockItemResponse, + mockCollectionsResponse, } from "__tests__/__mocks__/data/mockApiResponses"; jest.mock("./fetchApi"); @@ -371,18 +372,42 @@ describe("getItemData", () => { }); }); -// describe("getCollectionsData", () => { -// it("returns expected results", async () => { -// (fetchApi as jest.Mock).mockResolvedValueOnce( -// Promise.resolve(getCollectionsData) -// ); -// const collections = await getCollectionsData("uuid1"); -// expect(fetchApi as jest.Mock).toHaveBeenCalledWith( -// `${process.env.API_URL}/api/v2/collections?page=1&per_page=48&sort=&q=` -// ); - -// expect(collections).toEqual(mockPaginatedCollections); -// expect(collections).toHaveProperty("capture"); -// expect(collections).toHaveProperty("mods"); -// }); -// }); +describe("getCollectionsData", () => { + it("returns expected results", async () => { + (fetchApi as jest.Mock).mockResolvedValueOnce( + Promise.resolve(mockCollectionsResponse) + ); + const collections = await getCollectionsData({ + keyword: "cat", + sortID: "date-asc", + pageNum: "2", + }); + + expect(fetchApi as jest.Mock).toHaveBeenCalledWith( + `${process.env.API_URL}/api/v2/collections?page=2&per_page=48&sort=date ASC&q=cat` + ); + + expect(collections).toEqual(mockCollectionsResponse); + expect(collections).toHaveProperty("collection"); + expect(collections).toHaveProperty("perPage"); + expect(collections).toHaveProperty("page"); + expect(collections).toHaveProperty("numResults"); + }); + + it("returns default search when given no params", async () => { + (fetchApi as jest.Mock).mockResolvedValueOnce( + Promise.resolve(mockCollectionsResponse) + ); + const collections = await getCollectionsData(); + + expect(fetchApi as jest.Mock).toHaveBeenCalledWith( + `${process.env.API_URL}/api/v2/collections?page=1&per_page=48&sort=date DESC&q=` + ); + + expect(collections).toEqual(mockCollectionsResponse); + expect(collections).toHaveProperty("collection"); + expect(collections).toHaveProperty("perPage"); + expect(collections).toHaveProperty("page"); + expect(collections).toHaveProperty("numResults"); + }); +}); From b0034e451eff22f5c94da19b0bf310e8b5b173d9 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Thu, 12 Dec 2024 11:07:33 -0500 Subject: [PATCH 45/55] move check to render collections up to page.tsx --- app/collections/page.tsx | 9 ++++++++- .../components/pages/collectionsPage/collectionsPage.tsx | 9 ++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/collections/page.tsx b/app/collections/page.tsx index e773af5f..15fcac35 100644 --- a/app/collections/page.tsx +++ b/app/collections/page.tsx @@ -31,9 +31,16 @@ export default async function Collections({ searchParams }: CollectionsProps) { redirect("/404"); } + const renderCollections = + data?.collection !== undefined && data?.collection?.nil; + return ( - + ); } diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 2eee160a..3b7388ec 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -28,18 +28,13 @@ import { DEFAULT_SEARCH_TERM, } from "@/src/config/constants"; -export function CollectionsPage({ data, params }) { +export function CollectionsPage({ data, params, renderCollections }) { const { push } = useRouter(); const pathname = usePathname(); const [isLoaded, setIsLoaded] = useState(false); let collections = []; - // if (data.collections !== undefined) { - // collections = Array.isArray(data.collection) - // ? data.collection - // : [data.collection]; - // } - if (data.headers.message === "Collections retrieved successfully") { + if (renderCollections) { collections = Array.isArray(data.collection) ? data.collection : [data.collection]; From a56c713116640335de3f0d6dbaf9bce1ce56c969 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Thu, 12 Dec 2024 14:31:50 -0500 Subject: [PATCH 46/55] test and clean up bugs --- __tests__/pages/collectionspage.test.tsx | 29 ++++++++++++++++++++++++ app/collections/page.tsx | 6 ++--- 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 __tests__/pages/collectionspage.test.tsx diff --git a/__tests__/pages/collectionspage.test.tsx b/__tests__/pages/collectionspage.test.tsx new file mode 100644 index 00000000..62a9c1ff --- /dev/null +++ b/__tests__/pages/collectionspage.test.tsx @@ -0,0 +1,29 @@ +import { render } from "@testing-library/react"; +import { axe } from "jest-axe"; +import React from "react"; +import { mockCollectionsResponse } from "__tests__/__mocks__/data/mockApiResponses"; +import { CollectionsPage } from "@/src/components/pages/collectionsPage/collectionsPage"; +import CollectionSearchParams from "@/src/types/CollectionSearchParams"; + +jest.mock("next/navigation", () => ({ + useRouter: jest.fn(), + usePathname: jest.fn(), +})); + +describe.skip("Homepage Accessibility", () => { + const searchParams = { + collection_keywords: "flower", + sort: "title-asc", + page: "2", + }; + it("passes axe accessibility test", async () => { + const { container } = render( + + ); + expect(await axe(container)).toHaveNoViolations(); + }, 60000); +}); diff --git a/app/collections/page.tsx b/app/collections/page.tsx index 15fcac35..42b4b680 100644 --- a/app/collections/page.tsx +++ b/app/collections/page.tsx @@ -3,10 +3,10 @@ import { Metadata } from "next"; import { CollectionsPage } from "../src/components/pages/collectionsPage/collectionsPage"; import { getCollectionsData } from "@/src/utils/apiHelpers"; import { redirect } from "next/navigation"; - +import CollectionSearchParams from "@/src/types/CollectionSearchParams"; export type CollectionsProps = { params: { slug: string }; - searchParams: { page: string; sort: string; collection_keywords: string }; + searchParams: CollectionSearchParams; }; export const metadata: Metadata = { @@ -32,7 +32,7 @@ export default async function Collections({ searchParams }: CollectionsProps) { } const renderCollections = - data?.collection !== undefined && data?.collection?.nil; + data?.collection !== undefined && !data?.collection?.nil; return ( From 30abf788677d93dbd0ee46460070520da840cd91 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Fri, 13 Dec 2024 10:09:52 -0500 Subject: [PATCH 47/55] add anchor to url --- app/src/components/pages/collectionsPage/collectionsPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 3b7388ec..d0c14eda 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -58,7 +58,7 @@ export function CollectionsPage({ data, params, renderCollections }) { const updateURL = async (queryString) => { setIsLoaded(false); - await push(`${pathname}?${queryString}`); + await push(`${pathname}?${queryString}#collections`); setTimeout(() => { setIsLoaded(true); headingRef.current?.focus(); @@ -214,7 +214,7 @@ export function CollectionsPage({ data, params, renderCollections }) { } ref={headingRef} tabIndex={-1} - id="all-collections-page" + id="collections" width="max-content" > {`Displaying ${displayResults(data.numResults, data.perPage, data.page)} From 8b48202eae4f8af893e534c299c8097f3e00529c Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 16 Dec 2024 11:07:26 -0500 Subject: [PATCH 48/55] Debug vercel and update test name --- __tests__/pages/collectionspage.test.tsx | 2 +- app/collections/page.tsx | 2 +- .../components/pages/collectionsPage/collectionsPage.tsx | 9 ++++----- app/src/utils/apiHelpers.ts | 1 + 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/__tests__/pages/collectionspage.test.tsx b/__tests__/pages/collectionspage.test.tsx index 62a9c1ff..113aa823 100644 --- a/__tests__/pages/collectionspage.test.tsx +++ b/__tests__/pages/collectionspage.test.tsx @@ -10,7 +10,7 @@ jest.mock("next/navigation", () => ({ usePathname: jest.fn(), })); -describe.skip("Homepage Accessibility", () => { +describe.skip("Collections page Accessibility", () => { const searchParams = { collection_keywords: "flower", sort: "title-asc", diff --git a/app/collections/page.tsx b/app/collections/page.tsx index 42b4b680..23351fd0 100644 --- a/app/collections/page.tsx +++ b/app/collections/page.tsx @@ -33,7 +33,7 @@ export default async function Collections({ searchParams }: CollectionsProps) { const renderCollections = data?.collection !== undefined && !data?.collection?.nil; - + console.log("data is: ", data); return ( 0 - ? { marginBottom: "l" } - : { display: "none", marginBottom: "l" } - } + sx={{ + display: collections?.length > 0 ? "flex" : "none", + marginBottom: "l", + }} ref={headingRef} tabIndex={-1} id="collections" diff --git a/app/src/utils/apiHelpers.ts b/app/src/utils/apiHelpers.ts index bf036851..fbbdf256 100644 --- a/app/src/utils/apiHelpers.ts +++ b/app/src/utils/apiHelpers.ts @@ -174,6 +174,7 @@ export const getCollectionsData = async ({ perPage?: number; } = {}) => { let apiUrl = `${process.env.API_URL}/api/v2/collections?page=${pageNum}&per_page=${perPage}&sort=${COLLECTION_SORT_OPTIONS[sortID]}&q=${keyword}`; + console.log("apiUrl is: ", apiUrl); const res = await fetchApi(apiUrl); return res; }; From bed5da7622b954d8b0512cf6ed5960d3d1f81a3f Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Mon, 16 Dec 2024 15:11:22 -0500 Subject: [PATCH 49/55] change name back to object and clean up conditional styling --- .../pages/collectionsPage/collectionsPage.tsx | 18 +++++----- app/src/utils/utils.test.tsx | 36 +++++++++---------- app/src/utils/utils.ts | 18 +++++----- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index 5c52c8d3..5f080fff 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -17,7 +17,7 @@ import LaneLoading from "../../lane/laneLoading"; import { displayResults, totalNumPages, - createCollectionsQueryStringFromHash, + createCollectionsQueryStringFromObject, } from "../../../utils/utils"; import type { SyntheticEvent } from "react"; import { createAdobeAnalyticsPageName } from "@/src/utils/utils"; @@ -71,7 +71,7 @@ export function CollectionsPage({ data, params, renderCollections }) { // change the values in the object passed down to createCollectionsQueryStringFromObject to be currentPage and currentSort and tell me if it works for you.... setCurrentPage(Number(DEFAULT_PAGE_NUM)); setCurrentSort(DEFAULT_COLLECTION_SORT); - const queryString = createCollectionsQueryStringFromHash({ + const queryString = createCollectionsQueryStringFromObject({ collection_keywords: currentCollectionKeywords, sort: DEFAULT_COLLECTION_SORT, page: DEFAULT_PAGE_NUM, @@ -86,7 +86,7 @@ export function CollectionsPage({ data, params, renderCollections }) { const onPageChange = async (pageNumber: number) => { setCurrentPage(pageNumber); - const queryString = createCollectionsQueryStringFromHash({ + const queryString = createCollectionsQueryStringFromObject({ collection_keywords: currentCollectionKeywords, sort: currentSort, page: pageNumber.toString(), @@ -96,7 +96,7 @@ export function CollectionsPage({ data, params, renderCollections }) { const onMenuClick = async (id) => { setCurrentSort(id); - const queryString = createCollectionsQueryStringFromHash({ + const queryString = createCollectionsQueryStringFromObject({ collection_keywords: currentCollectionKeywords, sort: id, page: String(currentPage), @@ -162,11 +162,11 @@ export function CollectionsPage({ data, params, renderCollections }) { 0 - ? { display: "flex", gap: "xs", marginBottom: "l" } - : { display: "none", gap: "xs", marginBottom: "l" } - } + sx={{ + display: collections?.length > 0 ? "flex" : "none", + gap: "xs", + marginBottom: "l", + }} > {" "} diff --git a/app/src/utils/utils.test.tsx b/app/src/utils/utils.test.tsx index f118d03c..7381ae3d 100644 --- a/app/src/utils/utils.test.tsx +++ b/app/src/utils/utils.test.tsx @@ -3,8 +3,8 @@ import { stringToSlug, createAdobeAnalyticsPageName, displayResults, - createQueryStringFromHash, - createCollectionsQueryStringFromHash, + createQueryStringFromObject, + createCollectionsQueryStringFromObject, } from "./utils"; import { DEFAULT_PAGE_NUM, @@ -211,13 +211,13 @@ describe("displayResults", () => { }); }); -describe("createQueryStringFromHash generates the correct query string: ", () => { +describe("createQueryStringFromObject generates the correct query string: ", () => { test("when the values are all empty", () => { - expect(createQueryStringFromHash({})).toBe(""); + expect(createQueryStringFromObject({})).toBe(""); }); test("when there are multiple values", () => { expect( - createQueryStringFromHash({ + createQueryStringFromObject({ dog: "cat", help: "me", this_is: "aTest", @@ -226,17 +226,17 @@ describe("createQueryStringFromHash generates the correct query string: ", () => }); }); -describe("createCollectionsQueryStringFromHash generates the correct query string: ", () => { +describe("createCollectionsQueryStringFromObject generates the correct query string: ", () => { test("when the values are all empty or all defaults", () => { expect( - createCollectionsQueryStringFromHash({ + createCollectionsQueryStringFromObject({ collection_keywords: "", sort: "", page: "", }) ).toBe(""); expect( - createCollectionsQueryStringFromHash({ + createCollectionsQueryStringFromObject({ collection_keywords: DEFAULT_SEARCH_TERM, sort: DEFAULT_COLLECTION_SORT, page: DEFAULT_PAGE_NUM, @@ -246,7 +246,7 @@ describe("createCollectionsQueryStringFromHash generates the correct query strin test("when the values are all set to a non-default value", () => { expect( - createCollectionsQueryStringFromHash({ + createCollectionsQueryStringFromObject({ collection_keywords: "cat", sort: "title-desc", page: "2", @@ -257,7 +257,7 @@ describe("createCollectionsQueryStringFromHash generates the correct query strin test("collection_keywords search values are set correctly", () => { // empty sort and page num, not default keyword expect( - createCollectionsQueryStringFromHash({ + createCollectionsQueryStringFromObject({ collection_keywords: "cat", sort: "", page: "", @@ -266,7 +266,7 @@ describe("createCollectionsQueryStringFromHash generates the correct query strin // default sort and page num, not default keyword expect( - createCollectionsQueryStringFromHash({ + createCollectionsQueryStringFromObject({ collection_keywords: "cat", sort: DEFAULT_COLLECTION_SORT, page: DEFAULT_PAGE_NUM, @@ -275,7 +275,7 @@ describe("createCollectionsQueryStringFromHash generates the correct query strin // default keyword, page num and sort are not default expect( - createCollectionsQueryStringFromHash({ + createCollectionsQueryStringFromObject({ collection_keywords: DEFAULT_SEARCH_TERM, sort: "title-desc", page: "2", @@ -287,7 +287,7 @@ describe("createCollectionsQueryStringFromHash generates the correct query strin // sort // only sort, keyword is default and page is empty expect( - createCollectionsQueryStringFromHash({ + createCollectionsQueryStringFromObject({ collection_keywords: DEFAULT_SEARCH_TERM, sort: "title-desc", page: "", @@ -296,7 +296,7 @@ describe("createCollectionsQueryStringFromHash generates the correct query strin // default keyword and page num, not default sort expect( - createCollectionsQueryStringFromHash({ + createCollectionsQueryStringFromObject({ collection_keywords: DEFAULT_SEARCH_TERM, sort: "title-desc", page: DEFAULT_PAGE_NUM, @@ -305,7 +305,7 @@ describe("createCollectionsQueryStringFromHash generates the correct query strin // default sort, not default page or keyword expect( - createCollectionsQueryStringFromHash({ + createCollectionsQueryStringFromObject({ collection_keywords: "cat", sort: DEFAULT_COLLECTION_SORT, page: "2", @@ -316,7 +316,7 @@ describe("createCollectionsQueryStringFromHash generates the correct query strin test("page num values are set correctly: ", () => { // default keyword and sort, not default page num expect( - createCollectionsQueryStringFromHash({ + createCollectionsQueryStringFromObject({ collection_keywords: DEFAULT_SEARCH_TERM, sort: DEFAULT_COLLECTION_SORT, page: "2", @@ -325,7 +325,7 @@ describe("createCollectionsQueryStringFromHash generates the correct query strin // only page num, sort and collection_keywords are empty expect( - createCollectionsQueryStringFromHash({ + createCollectionsQueryStringFromObject({ collection_keywords: DEFAULT_SEARCH_TERM, sort: "", page: "2", @@ -334,7 +334,7 @@ describe("createCollectionsQueryStringFromHash generates the correct query strin // default page num, key word and sort are not default expect( - createCollectionsQueryStringFromHash({ + createCollectionsQueryStringFromObject({ collection_keywords: "cat", sort: "title-desc", page: "1", diff --git a/app/src/utils/utils.ts b/app/src/utils/utils.ts index 1df689fe..a2a57905 100644 --- a/app/src/utils/utils.ts +++ b/app/src/utils/utils.ts @@ -122,16 +122,16 @@ export function displayResults( return `${start}-${end} of ${numFound}`; } -export const createQueryStringFromHash = (hash) => { +export const createQueryStringFromObject = (object) => { const params = new URLSearchParams(); - Object.keys(hash).forEach((name) => { - params.set(name.toString(), hash[name]); + Object.keys(object).forEach((name) => { + params.set(name.toString(), object[name]); }); return params.toString(); }; -export const createCollectionsQueryStringFromHash = ( - paramsHash: CollectionSearchParams +export const createCollectionsQueryStringFromObject = ( + paramsObject: CollectionSearchParams ) => { const newParams = {}; const defaultValues = [ @@ -140,11 +140,11 @@ export const createCollectionsQueryStringFromHash = ( DEFAULT_COLLECTION_SORT, ]; - Object.keys(paramsHash).forEach((key) => { - if (!defaultValues.includes(paramsHash[key])) { - newParams[key] = paramsHash[key]; + Object.keys(paramsObject).forEach((key) => { + if (!defaultValues.includes(paramsObject[key])) { + newParams[key] = paramsObject[key]; } }); - return createQueryStringFromHash(newParams); + return createQueryStringFromObject(newParams); }; From 2662d1c6e7832a40db6114b47a22a60a27e034b9 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Tue, 17 Dec 2024 12:26:39 -0500 Subject: [PATCH 50/55] remove logs and add #collections only to pagination url --- __tests__/pages/collectionspage.test.tsx | 1 - app/collections/page.tsx | 1 - app/src/components/pages/collectionsPage/collectionsPage.tsx | 4 ++-- app/src/utils/apiHelpers.ts | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/__tests__/pages/collectionspage.test.tsx b/__tests__/pages/collectionspage.test.tsx index 113aa823..d5fd5e1d 100644 --- a/__tests__/pages/collectionspage.test.tsx +++ b/__tests__/pages/collectionspage.test.tsx @@ -3,7 +3,6 @@ import { axe } from "jest-axe"; import React from "react"; import { mockCollectionsResponse } from "__tests__/__mocks__/data/mockApiResponses"; import { CollectionsPage } from "@/src/components/pages/collectionsPage/collectionsPage"; -import CollectionSearchParams from "@/src/types/CollectionSearchParams"; jest.mock("next/navigation", () => ({ useRouter: jest.fn(), diff --git a/app/collections/page.tsx b/app/collections/page.tsx index 23351fd0..17c9ff56 100644 --- a/app/collections/page.tsx +++ b/app/collections/page.tsx @@ -33,7 +33,6 @@ export default async function Collections({ searchParams }: CollectionsProps) { const renderCollections = data?.collection !== undefined && !data?.collection?.nil; - console.log("data is: ", data); return ( { setIsLoaded(false); - await push(`${pathname}?${queryString}#collections`); + await push(`${pathname}?${queryString}`); setTimeout(() => { setIsLoaded(true); headingRef.current?.focus(); @@ -91,7 +91,7 @@ export function CollectionsPage({ data, params, renderCollections }) { sort: currentSort, page: pageNumber.toString(), }); - updateURL(queryString); + updateURL(`${queryString}#collections`); }; const onMenuClick = async (id) => { diff --git a/app/src/utils/apiHelpers.ts b/app/src/utils/apiHelpers.ts index fbbdf256..bf036851 100644 --- a/app/src/utils/apiHelpers.ts +++ b/app/src/utils/apiHelpers.ts @@ -174,7 +174,6 @@ export const getCollectionsData = async ({ perPage?: number; } = {}) => { let apiUrl = `${process.env.API_URL}/api/v2/collections?page=${pageNum}&per_page=${perPage}&sort=${COLLECTION_SORT_OPTIONS[sortID]}&q=${keyword}`; - console.log("apiUrl is: ", apiUrl); const res = await fetchApi(apiUrl); return res; }; From 86256ed12e8818d2239044a4ce84cefc62da6cf5 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Tue, 17 Dec 2024 13:06:16 -0500 Subject: [PATCH 51/55] add anchor to sort and move menu to the right --- .../pages/collectionsPage/collectionsPage.tsx | 125 ++++++++++-------- 1 file changed, 67 insertions(+), 58 deletions(-) diff --git a/app/src/components/pages/collectionsPage/collectionsPage.tsx b/app/src/components/pages/collectionsPage/collectionsPage.tsx index cbc88fad..93eaa0cb 100644 --- a/app/src/components/pages/collectionsPage/collectionsPage.tsx +++ b/app/src/components/pages/collectionsPage/collectionsPage.tsx @@ -9,6 +9,8 @@ import { Menu, Text, Pagination, + Flex, + Spacer, } from "@nypl/design-system-react-components"; import { usePathname, useRouter } from "next/navigation"; import { headerBreakpoints } from "../../../utils/breakpoints"; @@ -101,7 +103,7 @@ export function CollectionsPage({ data, params, renderCollections }) { sort: id, page: String(currentPage), }); - updateURL(queryString); + updateURL(`${queryString}#collections`); }; useEffect(() => { @@ -161,64 +163,71 @@ export function CollectionsPage({ data, params, renderCollections }) { /> - 0 ? "flex" : "none", - gap: "xs", - marginBottom: "l", - }} - > - - {" "} - Sort by{" "} - {" "} - - - 0 ? "flex" : "none", - marginBottom: "l", - }} - ref={headingRef} - tabIndex={-1} - id="collections" - width="max-content" - > - {`Displaying ${displayResults(data.numResults, data.perPage, data.page)} + + 0 ? "flex" : "none", + marginBottom: "l", + }} + ref={headingRef} + tabIndex={-1} + id="collections" + width="max-content" + > + {`Displaying ${displayResults( + data.numResults, + data.perPage, + data.page + )} results`} - + + + 0 ? "flex" : "none", + gap: "xs", + marginBottom: "l", + }} + > + + {" "} + Sort by{" "} + {" "} + + + {isLoaded ? ( collections.length > 0 ? ( From a6844bef5323ccf0b521cf49c16ac913e9fe795a Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Tue, 17 Dec 2024 16:18:40 -0500 Subject: [PATCH 52/55] update zindex of header --- app/src/components/header/header.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/components/header/header.tsx b/app/src/components/header/header.tsx index 41e93b91..98288e2c 100644 --- a/app/src/components/header/header.tsx +++ b/app/src/components/header/header.tsx @@ -26,7 +26,7 @@ const Header = () => { position="sticky" id="header" top={0} - zIndex={999} + zIndex={99999} bgColor="ui.white" sx={{ [`@media screen and (min-width: ${headerBreakpoints.smTablet}px)`]: { From cba6de049c1158a137f7b0ccf2717a8f9e8e873b Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Wed, 18 Dec 2024 09:51:42 -0500 Subject: [PATCH 53/55] fix one of the accessibility tests but deciding to still skip it until the next pr --- __tests__/__mocks__/data/mockApiResponses.tsx | 920 +++++++++-------- .../data/mockPaginatedCollections.tsx | 929 ++++++++++-------- __tests__/pages/collectionspage.test.tsx | 7 + 3 files changed, 1022 insertions(+), 834 deletions(-) diff --git a/__tests__/__mocks__/data/mockApiResponses.tsx b/__tests__/__mocks__/data/mockApiResponses.tsx index d781a2cb..0045beec 100644 --- a/__tests__/__mocks__/data/mockApiResponses.tsx +++ b/__tests__/__mocks__/data/mockApiResponses.tsx @@ -301,448 +301,536 @@ export const mockCollectionsResponse = { perPage: "40", collection: [ { - uuid: "60932400-20f2-0138-8583-05c43d448773", - title: "Posada Collection", - url: "https://digitalcollections.nypl.org/collections/posada-collection#/?tab=navigation", - imageID: "58270299", - numberOfDigitizedItems: 34, - containsOnSiteMaterials: true, - containsAVMaterial: false, + title: "New York World's Fair 1939 and 1940 Incorporated records", + uuid: "6681fc20-c52b-012f-4eb1-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/6681fc20-c52b-012f-4eb1-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/6681fc20-c52b-012f-4eb1-58d385a7bc34", + imageID: "wf39_171707", + containsOnSiteMaterials: "false", + numItems: "177198", + numberOfDigitizedItems: "177198", + }, + { + title: "Print Collection portrait file", + uuid: "16ad5350-c52e-012f-aecf-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/16ad5350-c52e-012f-aecf-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/16ad5350-c52e-012f-aecf-58d385a7bc34", + imageID: "1103512", + containsOnSiteMaterials: "false", + numItems: "71626", + numberOfDigitizedItems: "71626", + }, + { + title: "Billy Rose Theatre Collection photograph file", + uuid: "2589a880-c52c-012f-2cb4-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/2589a880-c52c-012f-2cb4-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/2589a880-c52c-012f-2cb4-58d385a7bc34", + imageID: "TH-15522", + containsOnSiteMaterials: "false", + numItems: "57361", + numberOfDigitizedItems: "57361", + }, + { + title: "Martha Swope photographs", + uuid: "0146e060-c530-012f-1e6f-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/0146e060-c530-012f-1e6f-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/0146e060-c530-012f-1e6f-58d385a7bc34", + imageID: "swope_631929", + containsOnSiteMaterials: "true", + numItems: "50859", + numberOfDigitizedItems: "50859", + }, + { + title: "Cigarette cards", + uuid: "b50ab6f0-c52b-012f-5986-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/b50ab6f0-c52b-012f-5986-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/b50ab6f0-c52b-012f-5986-58d385a7bc34", + imageID: "1116456", + containsOnSiteMaterials: "false", + numItems: "49721", + numberOfDigitizedItems: "49721", + }, + { + title: "Robert N. Dennis collection of stereoscopic views", + uuid: "5261fd50-c52e-012f-85ec-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/5261fd50-c52e-012f-85ec-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/5261fd50-c52e-012f-85ec-58d385a7bc34", + imageID: "G90F173_009F", + containsOnSiteMaterials: "false", + numItems: "42204", + numberOfDigitizedItems: "42204", }, { - uuid: "724303e0-c6bb-012f-afbd-58d385a7bc34", - title: "MAVO", - url: "https://digitalcollections.nypl.org/collections/mavo#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 35, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "6b6532b0-5df7-013b-36f8-0242ac110002", - title: "Austin Hansen photograph collection", - url: "https://digitalcollections.nypl.org/collections/austin-hansen-photograph-collection#/?tab=navigation", - imageID: "58300996", - numberOfDigitizedItems: 65, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "5b996640-c31c-0139-0bac-0242ac110004", - title: - "Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers", - url: "https://digitalcollections.nypl.org/collections/arthur-alfonso-schomburg-papers#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 55, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "d3802d10-f49a-0139-3bff-0242ac110002", title: "Friedman-Abeles photographs", - url: "https://digitalcollections.nypl.org/collections/friedman-abeles-photographs#/?tab=navigation", - imageID: "58498722", - numberOfDigitizedItems: 35, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "e5462600-c5d9-012f-a6a3-58d385a7bc34", - title: "Farm Security Administration Photographs", - url: "https://digitalcollections.nypl.org/collections/farm-security-administration-photographs#/?tab=navigation", - imageID: "1952272", - numberOfDigitizedItems: 36, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "812e5770-c60c-012f-7167-58d385a7bc34", - title: "Changing New York", - url: "https://digitalcollections.nypl.org/collections/changing-new-york#/?tab=navigation", - imageID: "58447105", - numberOfDigitizedItems: 37, - containsOnSiteMaterials: false, - containsAVMaterial: false, + uuid: "7a830280-c542-012f-b87c-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/7a830280-c542-012f-b87c-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/7a830280-c542-012f-b87c-58d385a7bc34", + imageID: "4063867", + containsOnSiteMaterials: "false", + numItems: "39827", + numberOfDigitizedItems: "39827", }, { - uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", - title: - "The Black Experience in Children's Books: Selections from Augusta Baker's Bibliographies", - url: "https://digitalcollections.nypl.org/collections/the-black-experience-in-childrens-books-selections-from-augusta-bakers#/?tab=about", - imageID: "56958645", - numberOfDigitizedItems: 153, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "60932400-20f2-0138-8583-05c43d448773", - title: "Posada Collection", - url: "https://digitalcollections.nypl.org/collections/posada-collection#/?tab=navigation", - imageID: "58270299", - numberOfDigitizedItems: 34, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "724303e0-c6bb-012f-afbd-58d385a7bc34", - title: "MAVO", - url: "https://digitalcollections.nypl.org/collections/mavo#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 35, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "6b6532b0-5df7-013b-36f8-0242ac110002", - title: "Austin Hansen photograph collection", - url: "https://digitalcollections.nypl.org/collections/austin-hansen-photograph-collection#/?tab=navigation", - imageID: "58300996", - numberOfDigitizedItems: 65, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "5b996640-c31c-0139-0bac-0242ac110004", title: - "Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers", - url: "https://digitalcollections.nypl.org/collections/arthur-alfonso-schomburg-papers#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 55, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "d3802d10-f49a-0139-3bff-0242ac110002", - title: "Friedman-Abeles photographs", - url: "https://digitalcollections.nypl.org/collections/friedman-abeles-photographs#/?tab=navigation", - imageID: "58498722", - numberOfDigitizedItems: 35, - containsOnSiteMaterials: false, - containsAVMaterial: false, + "Photographic views of New York City, 1870's-1970's, from the collections of the New York Public Library", + uuid: "a301da20-c52e-012f-cc55-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/a301da20-c52e-012f-cc55-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/a301da20-c52e-012f-cc55-58d385a7bc34", + imageID: "708126F", + containsOnSiteMaterials: "false", + numItems: "34742", + numberOfDigitizedItems: "34742", + }, + { + title: "Wallach Division Picture Collection", + uuid: "79d4a650-c52e-012f-67ad-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/79d4a650-c52e-012f-67ad-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/79d4a650-c52e-012f-67ad-58d385a7bc34", + imageID: "820781", + containsOnSiteMaterials: "false", + numItems: "34311", + numberOfDigitizedItems: "34311", + }, + { + title: "The Vinkhuijzen collection of military uniforms", + uuid: "51894d20-c52f-012f-657d-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/51894d20-c52f-012f-657d-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/51894d20-c52f-012f-657d-58d385a7bc34", + imageID: "1637462", + containsOnSiteMaterials: "false", + numItems: "31267", + numberOfDigitizedItems: "31267", }, { - uuid: "e5462600-c5d9-012f-a6a3-58d385a7bc34", title: "Farm Security Administration Photographs", - url: "https://digitalcollections.nypl.org/collections/farm-security-administration-photographs#/?tab=navigation", - imageID: "1952272", - numberOfDigitizedItems: 36, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "812e5770-c60c-012f-7167-58d385a7bc34", - title: "Changing New York", - url: "https://digitalcollections.nypl.org/collections/changing-new-york#/?tab=navigation", - imageID: "58447105", - numberOfDigitizedItems: 37, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", - title: - "The Black Experience in Children's Books: Selections from Augusta Baker's Bibliographies", - url: "https://digitalcollections.nypl.org/collections/the-black-experience-in-childrens-books-selections-from-augusta-bakers#/?tab=about", - imageID: "56958645", - numberOfDigitizedItems: 153, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "60932400-20f2-0138-8583-05c43d448773", - title: "Posada Collection", - url: "https://digitalcollections.nypl.org/collections/posada-collection#/?tab=navigation", - imageID: "58270299", - numberOfDigitizedItems: 34, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "724303e0-c6bb-012f-afbd-58d385a7bc34", - title: "MAVO", - url: "https://digitalcollections.nypl.org/collections/mavo#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 35, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "6b6532b0-5df7-013b-36f8-0242ac110002", - title: "Austin Hansen photograph collection", - url: "https://digitalcollections.nypl.org/collections/austin-hansen-photograph-collection#/?tab=navigation", - imageID: "58300996", - numberOfDigitizedItems: 65, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "5b996640-c31c-0139-0bac-0242ac110004", - title: - "Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers", - url: "https://digitalcollections.nypl.org/collections/arthur-alfonso-schomburg-papers#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 55, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "d3802d10-f49a-0139-3bff-0242ac110002", - title: "Friedman-Abeles photographs", - url: "https://digitalcollections.nypl.org/collections/friedman-abeles-photographs#/?tab=navigation", - imageID: "58498722", - numberOfDigitizedItems: 35, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { uuid: "e5462600-c5d9-012f-a6a3-58d385a7bc34", - title: "Farm Security Administration Photographs", - url: "https://digitalcollections.nypl.org/collections/farm-security-administration-photographs#/?tab=navigation", - imageID: "1952272", - numberOfDigitizedItems: 36, - containsOnSiteMaterials: false, - containsAVMaterial: false, + url: "https://digitalcollections.nypl.org/collections/e5462600-c5d9-012f-a6a3-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/e5462600-c5d9-012f-a6a3-58d385a7bc34", + imageID: "58215588", + containsOnSiteMaterials: "false", + numItems: "27827", + numberOfDigitizedItems: "27827", }, { - uuid: "812e5770-c60c-012f-7167-58d385a7bc34", - title: "Changing New York", - url: "https://digitalcollections.nypl.org/collections/changing-new-york#/?tab=navigation", - imageID: "58447105", - numberOfDigitizedItems: 37, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", title: - "The Black Experience in Children's Books: Selections from Augusta Baker's Bibliographies", - url: "https://digitalcollections.nypl.org/collections/the-black-experience-in-childrens-books-selections-from-augusta-bakers#/?tab=about", - imageID: "56958645", - numberOfDigitizedItems: 153, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "60932400-20f2-0138-8583-05c43d448773", - title: "Posada Collection", - url: "https://digitalcollections.nypl.org/collections/posada-collection#/?tab=navigation", - imageID: "58270299", - numberOfDigitizedItems: 34, - containsOnSiteMaterials: true, - containsAVMaterial: false, + "Drugstore Photographs, Or, A Trip Along the Yangtze River, 1999, by Dylan Stone", + uuid: "80fa1460-c52f-012f-be77-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/80fa1460-c52f-012f-be77-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/80fa1460-c52f-012f-be77-58d385a7bc34", + imageID: "506894", + containsOnSiteMaterials: "false", + numItems: "25428", + numberOfDigitizedItems: "25428", }, { - uuid: "724303e0-c6bb-012f-afbd-58d385a7bc34", - title: "MAVO", - url: "https://digitalcollections.nypl.org/collections/mavo#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 35, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "6b6532b0-5df7-013b-36f8-0242ac110002", - title: "Austin Hansen photograph collection", - url: "https://digitalcollections.nypl.org/collections/austin-hansen-photograph-collection#/?tab=navigation", - imageID: "58300996", - numberOfDigitizedItems: 65, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "5b996640-c31c-0139-0bac-0242ac110004", - title: - "Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers", - url: "https://digitalcollections.nypl.org/collections/arthur-alfonso-schomburg-papers#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 55, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "d3802d10-f49a-0139-3bff-0242ac110002", title: "Friedman-Abeles photographs", - url: "https://digitalcollections.nypl.org/collections/friedman-abeles-photographs#/?tab=navigation", - imageID: "58498722", - numberOfDigitizedItems: 35, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "e5462600-c5d9-012f-a6a3-58d385a7bc34", - title: "Farm Security Administration Photographs", - url: "https://digitalcollections.nypl.org/collections/farm-security-administration-photographs#/?tab=navigation", - imageID: "1952272", - numberOfDigitizedItems: 36, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "812e5770-c60c-012f-7167-58d385a7bc34", - title: "Changing New York", - url: "https://digitalcollections.nypl.org/collections/changing-new-york#/?tab=navigation", - imageID: "58447105", - numberOfDigitizedItems: 37, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", - title: - "The Black Experience in Children's Books: Selections from Augusta Baker's Bibliographies", - url: "https://digitalcollections.nypl.org/collections/the-black-experience-in-childrens-books-selections-from-augusta-bakers#/?tab=about", - imageID: "56958645", - numberOfDigitizedItems: 153, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "60932400-20f2-0138-8583-05c43d448773", - title: "Posada Collection", - url: "https://digitalcollections.nypl.org/collections/posada-collection#/?tab=navigation", - imageID: "58270299", - numberOfDigitizedItems: 34, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "724303e0-c6bb-012f-afbd-58d385a7bc34", - title: "MAVO", - url: "https://digitalcollections.nypl.org/collections/mavo#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 35, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "6b6532b0-5df7-013b-36f8-0242ac110002", - title: "Austin Hansen photograph collection", - url: "https://digitalcollections.nypl.org/collections/austin-hansen-photograph-collection#/?tab=navigation", - imageID: "58300996", - numberOfDigitizedItems: 65, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "5b996640-c31c-0139-0bac-0242ac110004", - title: - "Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers", - url: "https://digitalcollections.nypl.org/collections/arthur-alfonso-schomburg-papers#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 55, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { uuid: "d3802d10-f49a-0139-3bff-0242ac110002", - title: "Friedman-Abeles photographs", - url: "https://digitalcollections.nypl.org/collections/friedman-abeles-photographs#/?tab=navigation", - imageID: "58498722", - numberOfDigitizedItems: 35, - containsOnSiteMaterials: false, - containsAVMaterial: false, + url: "https://digitalcollections.nypl.org/collections/d3802d10-f49a-0139-3bff-0242ac110002", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/d3802d10-f49a-0139-3bff-0242ac110002", + imageID: "58424723", + containsOnSiteMaterials: "false", + numItems: "24855", + numberOfDigitizedItems: "24855", + }, + { + title: "The Buttolph collection of menus", + uuid: "e5114e30-c52f-012f-993c-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/e5114e30-c52f-012f-993c-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/e5114e30-c52f-012f-993c-58d385a7bc34", + imageID: "474253", + containsOnSiteMaterials: "false", + numItems: "19235", + numberOfDigitizedItems: "19235", + }, + { + title: "Century Company records", + uuid: "cd0fd890-b0de-0133-ad22-00505686d14e", + url: "https://digitalcollections.nypl.org/collections/cd0fd890-b0de-0133-ad22-00505686d14e", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/cd0fd890-b0de-0133-ad22-00505686d14e", + imageID: "5706845", + containsOnSiteMaterials: "false", + numItems: "15771", + numberOfDigitizedItems: "15771", + }, + { + title: "New York World's Fair 1939 and 1940 Incorporated records", + uuid: "1e6dd2f0-c530-012f-c1f8-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/1e6dd2f0-c530-012f-c1f8-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/1e6dd2f0-c530-012f-c1f8-58d385a7bc34", + imageID: "2011162", + containsOnSiteMaterials: "false", + numItems: "13637", + numberOfDigitizedItems: "13637", + }, + { + title: "Atlases of New York City", + uuid: "de1dcfb0-c5f6-012f-1dfc-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/de1dcfb0-c5f6-012f-1dfc-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/de1dcfb0-c5f6-012f-1dfc-58d385a7bc34", + imageID: "4052030", + containsOnSiteMaterials: "false", + numItems: "11722", + numberOfDigitizedItems: "11722", + }, + { + title: "Morris Huberland ", + uuid: "1a0528c0-0d47-0133-a1f0-58d385a7b928", + url: "https://digitalcollections.nypl.org/collections/1a0528c0-0d47-0133-a1f0-58d385a7b928", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/1a0528c0-0d47-0133-a1f0-58d385a7b928", + imageID: "5381653", + containsOnSiteMaterials: "false", + numItems: "9247", + numberOfDigitizedItems: "9247", }, { - uuid: "e5462600-c5d9-012f-a6a3-58d385a7bc34", - title: "Farm Security Administration Photographs", - url: "https://digitalcollections.nypl.org/collections/farm-security-administration-photographs#/?tab=navigation", - imageID: "1952272", - numberOfDigitizedItems: 36, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "812e5770-c60c-012f-7167-58d385a7bc34", - title: "Changing New York", - url: "https://digitalcollections.nypl.org/collections/changing-new-york#/?tab=navigation", - imageID: "58447105", - numberOfDigitizedItems: 37, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", title: - "The Black Experience in Children's Books: Selections from Augusta Baker's Bibliographies", - url: "https://digitalcollections.nypl.org/collections/the-black-experience-in-childrens-books-selections-from-augusta-bakers#/?tab=about", - imageID: "56958645", - numberOfDigitizedItems: 153, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "60932400-20f2-0138-8583-05c43d448773", - title: "Posada Collection", - url: "https://digitalcollections.nypl.org/collections/posada-collection#/?tab=navigation", - imageID: "58270299", - numberOfDigitizedItems: 34, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "724303e0-c6bb-012f-afbd-58d385a7bc34", - title: "MAVO", - url: "https://digitalcollections.nypl.org/collections/mavo#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 35, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "6b6532b0-5df7-013b-36f8-0242ac110002", - title: "Austin Hansen photograph collection", - url: "https://digitalcollections.nypl.org/collections/austin-hansen-photograph-collection#/?tab=navigation", - imageID: "58300996", - numberOfDigitizedItems: 65, - containsOnSiteMaterials: true, - containsAVMaterial: false, + "Emmet Collection of Manuscripts Etc. Relating to American History", + uuid: "491273d0-c605-012f-4af6-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/491273d0-c605-012f-4af6-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/491273d0-c605-012f-4af6-58d385a7bc34", + imageID: "430996", + containsOnSiteMaterials: "false", + numItems: "8980", + numberOfDigitizedItems: "8980", + }, + { + title: '"The Pageant of America" Collection', + uuid: "26818d00-c611-012f-a212-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/26818d00-c611-012f-a212-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/26818d00-c611-012f-a212-58d385a7bc34", + imageID: "92304", + containsOnSiteMaterials: "false", + numItems: "7085", + numberOfDigitizedItems: "7085", + }, + { + title: "Kenn Duncan Photograph Archive, ca. 1960-1986", + uuid: "d5e04a00-c61a-012f-127f-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/d5e04a00-c61a-012f-127f-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/d5e04a00-c61a-012f-127f-58d385a7bc34", + imageID: "2029425", + containsOnSiteMaterials: "false", + numItems: "7041", + numberOfDigitizedItems: "7041", + }, + { + title: "Joseph Muller collection of music and other portraits", + uuid: "bc9cb190-c598-012f-9f74-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/bc9cb190-c598-012f-9f74-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/bc9cb190-c598-012f-9f74-58d385a7bc34", + imageID: "1231911", + containsOnSiteMaterials: "false", + numItems: "6247", + numberOfDigitizedItems: "6247", + }, + { + title: "Detroit Publishing Company postcards", + uuid: "439afdd0-c62b-012f-66d1-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/439afdd0-c62b-012f-66d1-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/439afdd0-c62b-012f-66d1-58d385a7bc34", + imageID: "74453", + containsOnSiteMaterials: "false", + numItems: "5781", + numberOfDigitizedItems: "5781", + }, + { + title: "Benjamin K. Miller collection of United States stamps", + uuid: "8f3e9bb0-c623-012f-5ab6-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/8f3e9bb0-c623-012f-5ab6-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/8f3e9bb0-c623-012f-5ab6-58d385a7bc34", + imageID: "2005_6603_7_506_8", + containsOnSiteMaterials: "false", + numItems: "5505", + numberOfDigitizedItems: "5505", + }, + { + title: "American popular songs", + uuid: "35301010-c58d-012f-1196-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/35301010-c58d-012f-1196-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/35301010-c58d-012f-1196-58d385a7bc34", + imageID: "1256525", + containsOnSiteMaterials: "false", + numItems: "4930", + numberOfDigitizedItems: "4930", + }, + { + title: "Thomas Addis Emmet collection", + uuid: "02d1c8f0-c52d-012f-a615-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/02d1c8f0-c52d-012f-a615-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/02d1c8f0-c52d-012f-a615-58d385a7bc34", + imageID: "4026277", + containsOnSiteMaterials: "false", + numItems: "4379", + numberOfDigitizedItems: "4379", + }, + { + title: "Atlases of the United States", + uuid: "2600a3f0-c5ec-012f-424e-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/2600a3f0-c5ec-012f-424e-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/2600a3f0-c5ec-012f-424e-58d385a7bc34", + imageID: "433823", + containsOnSiteMaterials: "false", + numItems: "3868", + numberOfDigitizedItems: "3868", + }, + { + title: "Diana Davies photographs", + uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/f7ffc990-c5ae-012f-eb75-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/f7ffc990-c5ae-012f-eb75-58d385a7bc34", + imageID: "58086787", + containsOnSiteMaterials: "false", + numItems: "3845", + numberOfDigitizedItems: "3845", + }, + { + title: "Vandamm theatrical photographs", + uuid: "0e023030-c5ab-012f-a4c2-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/0e023030-c5ab-012f-a4c2-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/0e023030-c5ab-012f-a4c2-58d385a7bc34", + imageID: "485174", + containsOnSiteMaterials: "false", + numItems: "3727", + numberOfDigitizedItems: "3727", + }, + { + title: "Maps of North America", + uuid: "5cd94760-c52a-012f-bcd4-3c075448cc4b", + url: "https://digitalcollections.nypl.org/collections/5cd94760-c52a-012f-bcd4-3c075448cc4b", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/5cd94760-c52a-012f-bcd4-3c075448cc4b", + imageID: "57199999", + containsOnSiteMaterials: "false", + numItems: "3347", + numberOfDigitizedItems: "3347", + }, + { + title: "Samuel Putnam Avery Collection", + uuid: "8d08f9f0-c60b-012f-0c69-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/8d08f9f0-c60b-012f-0c69-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/8d08f9f0-c60b-012f-0c69-58d385a7bc34", + imageID: "1150535", + containsOnSiteMaterials: "false", + numItems: "3343", + numberOfDigitizedItems: "3343", }, { - uuid: "5b996640-c31c-0139-0bac-0242ac110004", title: - "Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers", - url: "https://digitalcollections.nypl.org/collections/arthur-alfonso-schomburg-papers#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 55, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "d3802d10-f49a-0139-3bff-0242ac110002", - title: "Friedman-Abeles photographs", - url: "https://digitalcollections.nypl.org/collections/friedman-abeles-photographs#/?tab=navigation", - imageID: "58498722", - numberOfDigitizedItems: 35, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "e5462600-c5d9-012f-a6a3-58d385a7bc34", - title: "Farm Security Administration Photographs", - url: "https://digitalcollections.nypl.org/collections/farm-security-administration-photographs#/?tab=navigation", - imageID: "1952272", - numberOfDigitizedItems: 36, - containsOnSiteMaterials: false, - containsAVMaterial: false, + "The Eugene L. Armbruster collection of Long Island photographic views", + uuid: "531a8850-c607-012f-0a5d-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/531a8850-c607-012f-0a5d-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/531a8850-c607-012f-0a5d-58d385a7bc34", + imageID: "58767265", + containsOnSiteMaterials: "false", + numItems: "3321", + numberOfDigitizedItems: "3321", + }, + { + title: "Scrapbooks of New York City views", + uuid: "530a11c0-c8b6-0131-2d6e-58d385a7b928", + url: "https://digitalcollections.nypl.org/collections/530a11c0-c8b6-0131-2d6e-58d385a7b928", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/530a11c0-c8b6-0131-2d6e-58d385a7b928", + imageID: "5242169", + containsOnSiteMaterials: "false", + numItems: "3129", + numberOfDigitizedItems: "3129", + }, + { + title: "Doors, NYC", + uuid: "0f38cb80-c5ae-012f-b01b-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/0f38cb80-c5ae-012f-b01b-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/0f38cb80-c5ae-012f-b01b-58d385a7bc34", + imageID: "colmer_164_2041", + containsOnSiteMaterials: "false", + numItems: "3122", + numberOfDigitizedItems: "3122", + }, + { + title: "Carl Van Vechten Slides", + uuid: "de8b3b60-c284-0135-01bc-33751ccfcc26", + url: "https://digitalcollections.nypl.org/collections/de8b3b60-c284-0135-01bc-33751ccfcc26", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/de8b3b60-c284-0135-01bc-33751ccfcc26", + imageID: "57484879", + containsOnSiteMaterials: "false", + numItems: "2844", + numberOfDigitizedItems: "2844", + }, + { + title: "Walter Silver photographs", + uuid: "f5301480-9c31-0131-7b95-58d385a7bbd0", + url: "https://digitalcollections.nypl.org/collections/f5301480-9c31-0131-7b95-58d385a7bbd0", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/f5301480-9c31-0131-7b95-58d385a7bbd0", + imageID: "5212943", + containsOnSiteMaterials: "false", + numItems: "2598", + numberOfDigitizedItems: "2598", + }, + { + title: "Prints depicting dance", + uuid: "bb5c4380-c6f4-012f-df87-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/bb5c4380-c6f4-012f-df87-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/bb5c4380-c6f4-012f-df87-58d385a7bc34", + imageID: "5239635", + containsOnSiteMaterials: "false", + numItems: "2577", + numberOfDigitizedItems: "2577", + }, + { + title: "Collection of book jackets", + uuid: "274b79c0-c5b6-012f-1730-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/274b79c0-c5b6-012f-1730-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/274b79c0-c5b6-012f-1730-58d385a7bc34", + imageID: "1103827", + containsOnSiteMaterials: "false", + numItems: "2505", + numberOfDigitizedItems: "2505", + }, + { + title: "The Reform advocate", + uuid: "924921a0-3cd0-0136-c557-0af54bc5b55e", + url: "https://digitalcollections.nypl.org/collections/924921a0-3cd0-0136-c557-0af54bc5b55e", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/924921a0-3cd0-0136-c557-0af54bc5b55e", + imageID: "57987605", + containsOnSiteMaterials: "false", + numItems: "2505", + numberOfDigitizedItems: "2505", + }, + { + title: "New York Public Library Visual Materials", + uuid: "a71baeb0-c5b2-012f-595e-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/a71baeb0-c5b2-012f-595e-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/a71baeb0-c5b2-012f-595e-58d385a7bc34", + imageID: "1252985", + containsOnSiteMaterials: "false", + numItems: "2338", + numberOfDigitizedItems: "2338", + }, + { + title: "Photographs of buildings under construction, 1901-1935", + uuid: "58226000-9cbe-013a-f681-0242ac110003", + url: "https://digitalcollections.nypl.org/collections/58226000-9cbe-013a-f681-0242ac110003", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/58226000-9cbe-013a-f681-0242ac110003", + imageID: "58515903", + containsOnSiteMaterials: "false", + numItems: "2247", + numberOfDigitizedItems: "2247", + }, + { + title: "White Studio theatrical photographs", + uuid: "7c22cac0-c5b8-012f-4613-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/7c22cac0-c5b8-012f-4613-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/7c22cac0-c5b8-012f-4613-58d385a7bc34", + imageID: "ps_the_cd87_1319", + containsOnSiteMaterials: "false", + numItems: "2241", + numberOfDigitizedItems: "2241", }, { - uuid: "812e5770-c60c-012f-7167-58d385a7bc34", title: "Changing New York", - url: "https://digitalcollections.nypl.org/collections/changing-new-york#/?tab=navigation", - imageID: "58447105", - numberOfDigitizedItems: 37, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", - title: - "The Black Experience in Children's Books: Selections from Augusta Baker's Bibliographies", - url: "https://digitalcollections.nypl.org/collections/the-black-experience-in-childrens-books-selections-from-augusta-bakers#/?tab=about", - imageID: "56958645", - numberOfDigitizedItems: 153, - containsOnSiteMaterials: false, - containsAVMaterial: false, + uuid: "812e5770-c60c-012f-7167-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/812e5770-c60c-012f-7167-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/812e5770-c60c-012f-7167-58d385a7bc34", + imageID: "58491202", + containsOnSiteMaterials: "false", + numItems: "2194", + numberOfDigitizedItems: "2194", + }, + { + title: "Maps of New York City and State", + uuid: "a1a9d830-c5a6-012f-00ec-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/a1a9d830-c5a6-012f-00ec-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/a1a9d830-c5a6-012f-00ec-58d385a7bc34", + imageID: "5059757", + containsOnSiteMaterials: "false", + numItems: "2059", + numberOfDigitizedItems: "2059", + }, + { + title: "Children's book illustrations", + uuid: "a0108230-c5b9-012f-ed50-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/a0108230-c5b9-012f-ed50-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/a0108230-c5b9-012f-ed50-58d385a7bc34", + imageID: "1702641", + containsOnSiteMaterials: "false", + numItems: "1987", + numberOfDigitizedItems: "1987", + }, + { + title: "Arthur Alfonso Schomburg papers", + uuid: "5b996640-c31c-0139-0bac-0242ac110004", + url: "https://digitalcollections.nypl.org/collections/5b996640-c31c-0139-0bac-0242ac110004", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/5b996640-c31c-0139-0bac-0242ac110004", + imageID: "58771712", + containsOnSiteMaterials: "false", + numItems: "1937", + numberOfDigitizedItems: "1937", + }, + { + title: "Frederick Melton photographs", + uuid: "431cf9c0-d188-0137-4938-41b51856d1ac", + url: "https://digitalcollections.nypl.org/collections/431cf9c0-d188-0137-4938-41b51856d1ac", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/431cf9c0-d188-0137-4938-41b51856d1ac", + imageID: "58128899", + containsOnSiteMaterials: "false", + numItems: "1881", + numberOfDigitizedItems: "1881", + }, + { + title: "Jane Porter papers", + uuid: "4e92ea50-bb61-0139-c8f3-0242ac110005", + url: "https://digitalcollections.nypl.org/collections/4e92ea50-bb61-0139-c8f3-0242ac110005", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/4e92ea50-bb61-0139-c8f3-0242ac110005", + imageID: "58299571", + containsOnSiteMaterials: "false", + numItems: "1872", + numberOfDigitizedItems: "1872", }, ], }; diff --git a/__tests__/__mocks__/data/mockPaginatedCollections.tsx b/__tests__/__mocks__/data/mockPaginatedCollections.tsx index 24f50330..88953c44 100644 --- a/__tests__/__mocks__/data/mockPaginatedCollections.tsx +++ b/__tests__/__mocks__/data/mockPaginatedCollections.tsx @@ -1,453 +1,546 @@ export const mockPaginatedCollections = { nyplAPI: { response: { - numResults: "954924", + headers: { + status: "200", + code: "200", + message: "Collections retrieved successfully", + }, + numResults: "6646", page: "1", - perPage: "40", + perPage: "48", collection: [ { - uuid: "60932400-20f2-0138-8583-05c43d448773", - title: "Posada Collection", - url: "https://digitalcollections.nypl.org/collections/posada-collection#/?tab=navigation", - imageID: "58270299", - numberOfDigitizedItems: 34, - containsOnSiteMaterials: true, - containsAVMaterial: false, + title: "New York World's Fair 1939 and 1940 Incorporated records", + uuid: "6681fc20-c52b-012f-4eb1-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/6681fc20-c52b-012f-4eb1-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/6681fc20-c52b-012f-4eb1-58d385a7bc34", + imageID: "wf39_171707", + containsOnSiteMaterials: "false", + numItems: "177198", + numberOfDigitizedItems: "177198", + }, + { + title: "Print Collection portrait file", + uuid: "16ad5350-c52e-012f-aecf-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/16ad5350-c52e-012f-aecf-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/16ad5350-c52e-012f-aecf-58d385a7bc34", + imageID: "1103512", + containsOnSiteMaterials: "false", + numItems: "71626", + numberOfDigitizedItems: "71626", + }, + { + title: "Billy Rose Theatre Collection photograph file", + uuid: "2589a880-c52c-012f-2cb4-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/2589a880-c52c-012f-2cb4-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/2589a880-c52c-012f-2cb4-58d385a7bc34", + imageID: "TH-15522", + containsOnSiteMaterials: "false", + numItems: "57361", + numberOfDigitizedItems: "57361", + }, + { + title: "Martha Swope photographs", + uuid: "0146e060-c530-012f-1e6f-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/0146e060-c530-012f-1e6f-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/0146e060-c530-012f-1e6f-58d385a7bc34", + imageID: "swope_631929", + containsOnSiteMaterials: "true", + numItems: "50859", + numberOfDigitizedItems: "50859", + }, + { + title: "Cigarette cards", + uuid: "b50ab6f0-c52b-012f-5986-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/b50ab6f0-c52b-012f-5986-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/b50ab6f0-c52b-012f-5986-58d385a7bc34", + imageID: "1116456", + containsOnSiteMaterials: "false", + numItems: "49721", + numberOfDigitizedItems: "49721", + }, + { + title: "Robert N. Dennis collection of stereoscopic views", + uuid: "5261fd50-c52e-012f-85ec-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/5261fd50-c52e-012f-85ec-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/5261fd50-c52e-012f-85ec-58d385a7bc34", + imageID: "G90F173_009F", + containsOnSiteMaterials: "false", + numItems: "42204", + numberOfDigitizedItems: "42204", }, { - uuid: "724303e0-c6bb-012f-afbd-58d385a7bc34", - title: "MAVO", - url: "https://digitalcollections.nypl.org/collections/mavo#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 35, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "6b6532b0-5df7-013b-36f8-0242ac110002", - title: "Austin Hansen photograph collection", - url: "https://digitalcollections.nypl.org/collections/austin-hansen-photograph-collection#/?tab=navigation", - imageID: "58300996", - numberOfDigitizedItems: 65, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "5b996640-c31c-0139-0bac-0242ac110004", - title: - "Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers", - url: "https://digitalcollections.nypl.org/collections/arthur-alfonso-schomburg-papers#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 55, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "d3802d10-f49a-0139-3bff-0242ac110002", title: "Friedman-Abeles photographs", - url: "https://digitalcollections.nypl.org/collections/friedman-abeles-photographs#/?tab=navigation", - imageID: "58498722", - numberOfDigitizedItems: 35, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "e5462600-c5d9-012f-a6a3-58d385a7bc34", - title: "Farm Security Administration Photographs", - url: "https://digitalcollections.nypl.org/collections/farm-security-administration-photographs#/?tab=navigation", - imageID: "1952272", - numberOfDigitizedItems: 36, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "812e5770-c60c-012f-7167-58d385a7bc34", - title: "Changing New York", - url: "https://digitalcollections.nypl.org/collections/changing-new-york#/?tab=navigation", - imageID: "58447105", - numberOfDigitizedItems: 37, - containsOnSiteMaterials: false, - containsAVMaterial: false, + uuid: "7a830280-c542-012f-b87c-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/7a830280-c542-012f-b87c-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/7a830280-c542-012f-b87c-58d385a7bc34", + imageID: "4063867", + containsOnSiteMaterials: "false", + numItems: "39827", + numberOfDigitizedItems: "39827", }, { - uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", - title: - "The Black Experience in Children's Books: Selections from Augusta Baker's Bibliographies", - url: "https://digitalcollections.nypl.org/collections/the-black-experience-in-childrens-books-selections-from-augusta-bakers#/?tab=about", - imageID: "56958645", - numberOfDigitizedItems: 153, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "60932400-20f2-0138-8583-05c43d448773", - title: "Posada Collection", - url: "https://digitalcollections.nypl.org/collections/posada-collection#/?tab=navigation", - imageID: "58270299", - numberOfDigitizedItems: 34, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "724303e0-c6bb-012f-afbd-58d385a7bc34", - title: "MAVO", - url: "https://digitalcollections.nypl.org/collections/mavo#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 35, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "6b6532b0-5df7-013b-36f8-0242ac110002", - title: "Austin Hansen photograph collection", - url: "https://digitalcollections.nypl.org/collections/austin-hansen-photograph-collection#/?tab=navigation", - imageID: "58300996", - numberOfDigitizedItems: 65, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "5b996640-c31c-0139-0bac-0242ac110004", title: - "Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers", - url: "https://digitalcollections.nypl.org/collections/arthur-alfonso-schomburg-papers#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 55, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "d3802d10-f49a-0139-3bff-0242ac110002", - title: "Friedman-Abeles photographs", - url: "https://digitalcollections.nypl.org/collections/friedman-abeles-photographs#/?tab=navigation", - imageID: "58498722", - numberOfDigitizedItems: 35, - containsOnSiteMaterials: false, - containsAVMaterial: false, + "Photographic views of New York City, 1870's-1970's, from the collections of the New York Public Library", + uuid: "a301da20-c52e-012f-cc55-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/a301da20-c52e-012f-cc55-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/a301da20-c52e-012f-cc55-58d385a7bc34", + imageID: "708126F", + containsOnSiteMaterials: "false", + numItems: "34742", + numberOfDigitizedItems: "34742", + }, + { + title: "Wallach Division Picture Collection", + uuid: "79d4a650-c52e-012f-67ad-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/79d4a650-c52e-012f-67ad-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/79d4a650-c52e-012f-67ad-58d385a7bc34", + imageID: "820781", + containsOnSiteMaterials: "false", + numItems: "34311", + numberOfDigitizedItems: "34311", + }, + { + title: "The Vinkhuijzen collection of military uniforms", + uuid: "51894d20-c52f-012f-657d-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/51894d20-c52f-012f-657d-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/51894d20-c52f-012f-657d-58d385a7bc34", + imageID: "1637462", + containsOnSiteMaterials: "false", + numItems: "31267", + numberOfDigitizedItems: "31267", }, { - uuid: "e5462600-c5d9-012f-a6a3-58d385a7bc34", title: "Farm Security Administration Photographs", - url: "https://digitalcollections.nypl.org/collections/farm-security-administration-photographs#/?tab=navigation", - imageID: "1952272", - numberOfDigitizedItems: 36, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "812e5770-c60c-012f-7167-58d385a7bc34", - title: "Changing New York", - url: "https://digitalcollections.nypl.org/collections/changing-new-york#/?tab=navigation", - imageID: "58447105", - numberOfDigitizedItems: 37, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", - title: - "The Black Experience in Children's Books: Selections from Augusta Baker's Bibliographies", - url: "https://digitalcollections.nypl.org/collections/the-black-experience-in-childrens-books-selections-from-augusta-bakers#/?tab=about", - imageID: "56958645", - numberOfDigitizedItems: 153, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "60932400-20f2-0138-8583-05c43d448773", - title: "Posada Collection", - url: "https://digitalcollections.nypl.org/collections/posada-collection#/?tab=navigation", - imageID: "58270299", - numberOfDigitizedItems: 34, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "724303e0-c6bb-012f-afbd-58d385a7bc34", - title: "MAVO", - url: "https://digitalcollections.nypl.org/collections/mavo#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 35, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "6b6532b0-5df7-013b-36f8-0242ac110002", - title: "Austin Hansen photograph collection", - url: "https://digitalcollections.nypl.org/collections/austin-hansen-photograph-collection#/?tab=navigation", - imageID: "58300996", - numberOfDigitizedItems: 65, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "5b996640-c31c-0139-0bac-0242ac110004", - title: - "Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers", - url: "https://digitalcollections.nypl.org/collections/arthur-alfonso-schomburg-papers#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 55, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "d3802d10-f49a-0139-3bff-0242ac110002", - title: "Friedman-Abeles photographs", - url: "https://digitalcollections.nypl.org/collections/friedman-abeles-photographs#/?tab=navigation", - imageID: "58498722", - numberOfDigitizedItems: 35, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { uuid: "e5462600-c5d9-012f-a6a3-58d385a7bc34", - title: "Farm Security Administration Photographs", - url: "https://digitalcollections.nypl.org/collections/farm-security-administration-photographs#/?tab=navigation", - imageID: "1952272", - numberOfDigitizedItems: 36, - containsOnSiteMaterials: false, - containsAVMaterial: false, + url: "https://digitalcollections.nypl.org/collections/e5462600-c5d9-012f-a6a3-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/e5462600-c5d9-012f-a6a3-58d385a7bc34", + imageID: "58215588", + containsOnSiteMaterials: "false", + numItems: "27827", + numberOfDigitizedItems: "27827", }, { - uuid: "812e5770-c60c-012f-7167-58d385a7bc34", - title: "Changing New York", - url: "https://digitalcollections.nypl.org/collections/changing-new-york#/?tab=navigation", - imageID: "58447105", - numberOfDigitizedItems: 37, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", title: - "The Black Experience in Children's Books: Selections from Augusta Baker's Bibliographies", - url: "https://digitalcollections.nypl.org/collections/the-black-experience-in-childrens-books-selections-from-augusta-bakers#/?tab=about", - imageID: "56958645", - numberOfDigitizedItems: 153, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "60932400-20f2-0138-8583-05c43d448773", - title: "Posada Collection", - url: "https://digitalcollections.nypl.org/collections/posada-collection#/?tab=navigation", - imageID: "58270299", - numberOfDigitizedItems: 34, - containsOnSiteMaterials: true, - containsAVMaterial: false, + "Drugstore Photographs, Or, A Trip Along the Yangtze River, 1999, by Dylan Stone", + uuid: "80fa1460-c52f-012f-be77-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/80fa1460-c52f-012f-be77-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/80fa1460-c52f-012f-be77-58d385a7bc34", + imageID: "506894", + containsOnSiteMaterials: "false", + numItems: "25428", + numberOfDigitizedItems: "25428", }, { - uuid: "724303e0-c6bb-012f-afbd-58d385a7bc34", - title: "MAVO", - url: "https://digitalcollections.nypl.org/collections/mavo#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 35, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "6b6532b0-5df7-013b-36f8-0242ac110002", - title: "Austin Hansen photograph collection", - url: "https://digitalcollections.nypl.org/collections/austin-hansen-photograph-collection#/?tab=navigation", - imageID: "58300996", - numberOfDigitizedItems: 65, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "5b996640-c31c-0139-0bac-0242ac110004", - title: - "Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers", - url: "https://digitalcollections.nypl.org/collections/arthur-alfonso-schomburg-papers#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 55, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "d3802d10-f49a-0139-3bff-0242ac110002", title: "Friedman-Abeles photographs", - url: "https://digitalcollections.nypl.org/collections/friedman-abeles-photographs#/?tab=navigation", - imageID: "58498722", - numberOfDigitizedItems: 35, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "e5462600-c5d9-012f-a6a3-58d385a7bc34", - title: "Farm Security Administration Photographs", - url: "https://digitalcollections.nypl.org/collections/farm-security-administration-photographs#/?tab=navigation", - imageID: "1952272", - numberOfDigitizedItems: 36, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "812e5770-c60c-012f-7167-58d385a7bc34", - title: "Changing New York", - url: "https://digitalcollections.nypl.org/collections/changing-new-york#/?tab=navigation", - imageID: "58447105", - numberOfDigitizedItems: 37, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", - title: - "The Black Experience in Children's Books: Selections from Augusta Baker's Bibliographies", - url: "https://digitalcollections.nypl.org/collections/the-black-experience-in-childrens-books-selections-from-augusta-bakers#/?tab=about", - imageID: "56958645", - numberOfDigitizedItems: 153, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "60932400-20f2-0138-8583-05c43d448773", - title: "Posada Collection", - url: "https://digitalcollections.nypl.org/collections/posada-collection#/?tab=navigation", - imageID: "58270299", - numberOfDigitizedItems: 34, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "724303e0-c6bb-012f-afbd-58d385a7bc34", - title: "MAVO", - url: "https://digitalcollections.nypl.org/collections/mavo#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 35, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "6b6532b0-5df7-013b-36f8-0242ac110002", - title: "Austin Hansen photograph collection", - url: "https://digitalcollections.nypl.org/collections/austin-hansen-photograph-collection#/?tab=navigation", - imageID: "58300996", - numberOfDigitizedItems: 65, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "5b996640-c31c-0139-0bac-0242ac110004", - title: - "Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers", - url: "https://digitalcollections.nypl.org/collections/arthur-alfonso-schomburg-papers#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 55, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { uuid: "d3802d10-f49a-0139-3bff-0242ac110002", - title: "Friedman-Abeles photographs", - url: "https://digitalcollections.nypl.org/collections/friedman-abeles-photographs#/?tab=navigation", - imageID: "58498722", - numberOfDigitizedItems: 35, - containsOnSiteMaterials: false, - containsAVMaterial: false, + url: "https://digitalcollections.nypl.org/collections/d3802d10-f49a-0139-3bff-0242ac110002", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/d3802d10-f49a-0139-3bff-0242ac110002", + imageID: "58424723", + containsOnSiteMaterials: "false", + numItems: "24855", + numberOfDigitizedItems: "24855", + }, + { + title: "The Buttolph collection of menus", + uuid: "e5114e30-c52f-012f-993c-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/e5114e30-c52f-012f-993c-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/e5114e30-c52f-012f-993c-58d385a7bc34", + imageID: "474253", + containsOnSiteMaterials: "false", + numItems: "19235", + numberOfDigitizedItems: "19235", + }, + { + title: "Century Company records", + uuid: "cd0fd890-b0de-0133-ad22-00505686d14e", + url: "https://digitalcollections.nypl.org/collections/cd0fd890-b0de-0133-ad22-00505686d14e", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/cd0fd890-b0de-0133-ad22-00505686d14e", + imageID: "5706845", + containsOnSiteMaterials: "false", + numItems: "15771", + numberOfDigitizedItems: "15771", + }, + { + title: "New York World's Fair 1939 and 1940 Incorporated records", + uuid: "1e6dd2f0-c530-012f-c1f8-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/1e6dd2f0-c530-012f-c1f8-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/1e6dd2f0-c530-012f-c1f8-58d385a7bc34", + imageID: "2011162", + containsOnSiteMaterials: "false", + numItems: "13637", + numberOfDigitizedItems: "13637", + }, + { + title: "Atlases of New York City", + uuid: "de1dcfb0-c5f6-012f-1dfc-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/de1dcfb0-c5f6-012f-1dfc-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/de1dcfb0-c5f6-012f-1dfc-58d385a7bc34", + imageID: "4052030", + containsOnSiteMaterials: "false", + numItems: "11722", + numberOfDigitizedItems: "11722", + }, + { + title: "Morris Huberland ", + uuid: "1a0528c0-0d47-0133-a1f0-58d385a7b928", + url: "https://digitalcollections.nypl.org/collections/1a0528c0-0d47-0133-a1f0-58d385a7b928", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/1a0528c0-0d47-0133-a1f0-58d385a7b928", + imageID: "5381653", + containsOnSiteMaterials: "false", + numItems: "9247", + numberOfDigitizedItems: "9247", }, { - uuid: "e5462600-c5d9-012f-a6a3-58d385a7bc34", - title: "Farm Security Administration Photographs", - url: "https://digitalcollections.nypl.org/collections/farm-security-administration-photographs#/?tab=navigation", - imageID: "1952272", - numberOfDigitizedItems: 36, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "812e5770-c60c-012f-7167-58d385a7bc34", - title: "Changing New York", - url: "https://digitalcollections.nypl.org/collections/changing-new-york#/?tab=navigation", - imageID: "58447105", - numberOfDigitizedItems: 37, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", title: - "The Black Experience in Children's Books: Selections from Augusta Baker's Bibliographies", - url: "https://digitalcollections.nypl.org/collections/the-black-experience-in-childrens-books-selections-from-augusta-bakers#/?tab=about", - imageID: "56958645", - numberOfDigitizedItems: 153, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "60932400-20f2-0138-8583-05c43d448773", - title: "Posada Collection", - url: "https://digitalcollections.nypl.org/collections/posada-collection#/?tab=navigation", - imageID: "58270299", - numberOfDigitizedItems: 34, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "724303e0-c6bb-012f-afbd-58d385a7bc34", - title: "MAVO", - url: "https://digitalcollections.nypl.org/collections/mavo#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 35, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "6b6532b0-5df7-013b-36f8-0242ac110002", - title: "Austin Hansen photograph collection", - url: "https://digitalcollections.nypl.org/collections/austin-hansen-photograph-collection#/?tab=navigation", - imageID: "58300996", - numberOfDigitizedItems: 65, - containsOnSiteMaterials: true, - containsAVMaterial: false, + "Emmet Collection of Manuscripts Etc. Relating to American History", + uuid: "491273d0-c605-012f-4af6-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/491273d0-c605-012f-4af6-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/491273d0-c605-012f-4af6-58d385a7bc34", + imageID: "430996", + containsOnSiteMaterials: "false", + numItems: "8980", + numberOfDigitizedItems: "8980", + }, + { + title: '"The Pageant of America" Collection', + uuid: "26818d00-c611-012f-a212-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/26818d00-c611-012f-a212-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/26818d00-c611-012f-a212-58d385a7bc34", + imageID: "92304", + containsOnSiteMaterials: "false", + numItems: "7085", + numberOfDigitizedItems: "7085", + }, + { + title: "Kenn Duncan Photograph Archive, ca. 1960-1986", + uuid: "d5e04a00-c61a-012f-127f-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/d5e04a00-c61a-012f-127f-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/d5e04a00-c61a-012f-127f-58d385a7bc34", + imageID: "2029425", + containsOnSiteMaterials: "false", + numItems: "7041", + numberOfDigitizedItems: "7041", + }, + { + title: "Joseph Muller collection of music and other portraits", + uuid: "bc9cb190-c598-012f-9f74-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/bc9cb190-c598-012f-9f74-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/bc9cb190-c598-012f-9f74-58d385a7bc34", + imageID: "1231911", + containsOnSiteMaterials: "false", + numItems: "6247", + numberOfDigitizedItems: "6247", + }, + { + title: "Detroit Publishing Company postcards", + uuid: "439afdd0-c62b-012f-66d1-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/439afdd0-c62b-012f-66d1-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/439afdd0-c62b-012f-66d1-58d385a7bc34", + imageID: "74453", + containsOnSiteMaterials: "false", + numItems: "5781", + numberOfDigitizedItems: "5781", + }, + { + title: "Benjamin K. Miller collection of United States stamps", + uuid: "8f3e9bb0-c623-012f-5ab6-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/8f3e9bb0-c623-012f-5ab6-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/8f3e9bb0-c623-012f-5ab6-58d385a7bc34", + imageID: "2005_6603_7_506_8", + containsOnSiteMaterials: "false", + numItems: "5505", + numberOfDigitizedItems: "5505", + }, + { + title: "American popular songs", + uuid: "35301010-c58d-012f-1196-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/35301010-c58d-012f-1196-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/35301010-c58d-012f-1196-58d385a7bc34", + imageID: "1256525", + containsOnSiteMaterials: "false", + numItems: "4930", + numberOfDigitizedItems: "4930", + }, + { + title: "Thomas Addis Emmet collection", + uuid: "02d1c8f0-c52d-012f-a615-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/02d1c8f0-c52d-012f-a615-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/02d1c8f0-c52d-012f-a615-58d385a7bc34", + imageID: "4026277", + containsOnSiteMaterials: "false", + numItems: "4379", + numberOfDigitizedItems: "4379", + }, + { + title: "Atlases of the United States", + uuid: "2600a3f0-c5ec-012f-424e-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/2600a3f0-c5ec-012f-424e-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/2600a3f0-c5ec-012f-424e-58d385a7bc34", + imageID: "433823", + containsOnSiteMaterials: "false", + numItems: "3868", + numberOfDigitizedItems: "3868", + }, + { + title: "Diana Davies photographs", + uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/f7ffc990-c5ae-012f-eb75-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/f7ffc990-c5ae-012f-eb75-58d385a7bc34", + imageID: "58086787", + containsOnSiteMaterials: "false", + numItems: "3845", + numberOfDigitizedItems: "3845", + }, + { + title: "Vandamm theatrical photographs", + uuid: "0e023030-c5ab-012f-a4c2-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/0e023030-c5ab-012f-a4c2-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/0e023030-c5ab-012f-a4c2-58d385a7bc34", + imageID: "485174", + containsOnSiteMaterials: "false", + numItems: "3727", + numberOfDigitizedItems: "3727", + }, + { + title: "Maps of North America", + uuid: "5cd94760-c52a-012f-bcd4-3c075448cc4b", + url: "https://digitalcollections.nypl.org/collections/5cd94760-c52a-012f-bcd4-3c075448cc4b", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/5cd94760-c52a-012f-bcd4-3c075448cc4b", + imageID: "57199999", + containsOnSiteMaterials: "false", + numItems: "3347", + numberOfDigitizedItems: "3347", + }, + { + title: "Samuel Putnam Avery Collection", + uuid: "8d08f9f0-c60b-012f-0c69-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/8d08f9f0-c60b-012f-0c69-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/8d08f9f0-c60b-012f-0c69-58d385a7bc34", + imageID: "1150535", + containsOnSiteMaterials: "false", + numItems: "3343", + numberOfDigitizedItems: "3343", }, { - uuid: "5b996640-c31c-0139-0bac-0242ac110004", title: - "Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers Arthur Alfonso Schomburg papers", - url: "https://digitalcollections.nypl.org/collections/arthur-alfonso-schomburg-papers#/?tab=navigation", - imageID: null, - numberOfDigitizedItems: 55, - containsOnSiteMaterials: true, - containsAVMaterial: false, - }, - { - uuid: "d3802d10-f49a-0139-3bff-0242ac110002", - title: "Friedman-Abeles photographs", - url: "https://digitalcollections.nypl.org/collections/friedman-abeles-photographs#/?tab=navigation", - imageID: "58498722", - numberOfDigitizedItems: 35, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "e5462600-c5d9-012f-a6a3-58d385a7bc34", - title: "Farm Security Administration Photographs", - url: "https://digitalcollections.nypl.org/collections/farm-security-administration-photographs#/?tab=navigation", - imageID: "1952272", - numberOfDigitizedItems: 36, - containsOnSiteMaterials: false, - containsAVMaterial: false, + "The Eugene L. Armbruster collection of Long Island photographic views", + uuid: "531a8850-c607-012f-0a5d-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/531a8850-c607-012f-0a5d-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/531a8850-c607-012f-0a5d-58d385a7bc34", + imageID: "58767265", + containsOnSiteMaterials: "false", + numItems: "3321", + numberOfDigitizedItems: "3321", + }, + { + title: "Scrapbooks of New York City views", + uuid: "530a11c0-c8b6-0131-2d6e-58d385a7b928", + url: "https://digitalcollections.nypl.org/collections/530a11c0-c8b6-0131-2d6e-58d385a7b928", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/530a11c0-c8b6-0131-2d6e-58d385a7b928", + imageID: "5242169", + containsOnSiteMaterials: "false", + numItems: "3129", + numberOfDigitizedItems: "3129", + }, + { + title: "Doors, NYC", + uuid: "0f38cb80-c5ae-012f-b01b-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/0f38cb80-c5ae-012f-b01b-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/0f38cb80-c5ae-012f-b01b-58d385a7bc34", + imageID: "colmer_164_2041", + containsOnSiteMaterials: "false", + numItems: "3122", + numberOfDigitizedItems: "3122", + }, + { + title: "Carl Van Vechten Slides", + uuid: "de8b3b60-c284-0135-01bc-33751ccfcc26", + url: "https://digitalcollections.nypl.org/collections/de8b3b60-c284-0135-01bc-33751ccfcc26", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/de8b3b60-c284-0135-01bc-33751ccfcc26", + imageID: "57484879", + containsOnSiteMaterials: "false", + numItems: "2844", + numberOfDigitizedItems: "2844", + }, + { + title: "Walter Silver photographs", + uuid: "f5301480-9c31-0131-7b95-58d385a7bbd0", + url: "https://digitalcollections.nypl.org/collections/f5301480-9c31-0131-7b95-58d385a7bbd0", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/f5301480-9c31-0131-7b95-58d385a7bbd0", + imageID: "5212943", + containsOnSiteMaterials: "false", + numItems: "2598", + numberOfDigitizedItems: "2598", + }, + { + title: "Prints depicting dance", + uuid: "bb5c4380-c6f4-012f-df87-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/bb5c4380-c6f4-012f-df87-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/bb5c4380-c6f4-012f-df87-58d385a7bc34", + imageID: "5239635", + containsOnSiteMaterials: "false", + numItems: "2577", + numberOfDigitizedItems: "2577", + }, + { + title: "Collection of book jackets", + uuid: "274b79c0-c5b6-012f-1730-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/274b79c0-c5b6-012f-1730-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/274b79c0-c5b6-012f-1730-58d385a7bc34", + imageID: "1103827", + containsOnSiteMaterials: "false", + numItems: "2505", + numberOfDigitizedItems: "2505", + }, + { + title: "The Reform advocate", + uuid: "924921a0-3cd0-0136-c557-0af54bc5b55e", + url: "https://digitalcollections.nypl.org/collections/924921a0-3cd0-0136-c557-0af54bc5b55e", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/924921a0-3cd0-0136-c557-0af54bc5b55e", + imageID: "57987605", + containsOnSiteMaterials: "false", + numItems: "2505", + numberOfDigitizedItems: "2505", + }, + { + title: "New York Public Library Visual Materials", + uuid: "a71baeb0-c5b2-012f-595e-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/a71baeb0-c5b2-012f-595e-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/a71baeb0-c5b2-012f-595e-58d385a7bc34", + imageID: "1252985", + containsOnSiteMaterials: "false", + numItems: "2338", + numberOfDigitizedItems: "2338", + }, + { + title: "Photographs of buildings under construction, 1901-1935", + uuid: "58226000-9cbe-013a-f681-0242ac110003", + url: "https://digitalcollections.nypl.org/collections/58226000-9cbe-013a-f681-0242ac110003", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/58226000-9cbe-013a-f681-0242ac110003", + imageID: "58515903", + containsOnSiteMaterials: "false", + numItems: "2247", + numberOfDigitizedItems: "2247", + }, + { + title: "White Studio theatrical photographs", + uuid: "7c22cac0-c5b8-012f-4613-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/7c22cac0-c5b8-012f-4613-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/7c22cac0-c5b8-012f-4613-58d385a7bc34", + imageID: "ps_the_cd87_1319", + containsOnSiteMaterials: "false", + numItems: "2241", + numberOfDigitizedItems: "2241", }, { - uuid: "812e5770-c60c-012f-7167-58d385a7bc34", title: "Changing New York", - url: "https://digitalcollections.nypl.org/collections/changing-new-york#/?tab=navigation", - imageID: "58447105", - numberOfDigitizedItems: 37, - containsOnSiteMaterials: false, - containsAVMaterial: false, - }, - { - uuid: "f7ffc990-c5ae-012f-eb75-58d385a7bc34", - title: - "The Black Experience in Children's Books: Selections from Augusta Baker's Bibliographies", - url: "https://digitalcollections.nypl.org/collections/the-black-experience-in-childrens-books-selections-from-augusta-bakers#/?tab=about", - imageID: "56958645", - numberOfDigitizedItems: 153, - containsOnSiteMaterials: false, - containsAVMaterial: false, + uuid: "812e5770-c60c-012f-7167-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/812e5770-c60c-012f-7167-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/812e5770-c60c-012f-7167-58d385a7bc34", + imageID: "58491202", + containsOnSiteMaterials: "false", + numItems: "2194", + numberOfDigitizedItems: "2194", + }, + { + title: "Maps of New York City and State", + uuid: "a1a9d830-c5a6-012f-00ec-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/a1a9d830-c5a6-012f-00ec-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/a1a9d830-c5a6-012f-00ec-58d385a7bc34", + imageID: "5059757", + containsOnSiteMaterials: "false", + numItems: "2059", + numberOfDigitizedItems: "2059", + }, + { + title: "Children's book illustrations", + uuid: "a0108230-c5b9-012f-ed50-58d385a7bc34", + url: "https://digitalcollections.nypl.org/collections/a0108230-c5b9-012f-ed50-58d385a7bc34", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/a0108230-c5b9-012f-ed50-58d385a7bc34", + imageID: "1702641", + containsOnSiteMaterials: "false", + numItems: "1987", + numberOfDigitizedItems: "1987", + }, + { + title: "Arthur Alfonso Schomburg papers", + uuid: "5b996640-c31c-0139-0bac-0242ac110004", + url: "https://digitalcollections.nypl.org/collections/5b996640-c31c-0139-0bac-0242ac110004", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/5b996640-c31c-0139-0bac-0242ac110004", + imageID: "58771712", + containsOnSiteMaterials: "false", + numItems: "1937", + numberOfDigitizedItems: "1937", + }, + { + title: "Frederick Melton photographs", + uuid: "431cf9c0-d188-0137-4938-41b51856d1ac", + url: "https://digitalcollections.nypl.org/collections/431cf9c0-d188-0137-4938-41b51856d1ac", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/431cf9c0-d188-0137-4938-41b51856d1ac", + imageID: "58128899", + containsOnSiteMaterials: "false", + numItems: "1881", + numberOfDigitizedItems: "1881", + }, + { + title: "Jane Porter papers", + uuid: "4e92ea50-bb61-0139-c8f3-0242ac110005", + url: "https://digitalcollections.nypl.org/collections/4e92ea50-bb61-0139-c8f3-0242ac110005", + apiUri: + "https://api.repo.nypl.org/api/v2/collections/4e92ea50-bb61-0139-c8f3-0242ac110005", + imageID: "58299571", + containsOnSiteMaterials: "false", + numItems: "1872", + numberOfDigitizedItems: "1872", }, ], }, diff --git a/__tests__/pages/collectionspage.test.tsx b/__tests__/pages/collectionspage.test.tsx index d5fd5e1d..1b623b0b 100644 --- a/__tests__/pages/collectionspage.test.tsx +++ b/__tests__/pages/collectionspage.test.tsx @@ -3,12 +3,19 @@ import { axe } from "jest-axe"; import React from "react"; import { mockCollectionsResponse } from "__tests__/__mocks__/data/mockApiResponses"; import { CollectionsPage } from "@/src/components/pages/collectionsPage/collectionsPage"; +import { useRouter } from "next/navigation"; jest.mock("next/navigation", () => ({ useRouter: jest.fn(), usePathname: jest.fn(), })); +beforeEach(() => { + (useRouter as jest.Mock).mockImplementation(() => ({ + pathname: "/collections", + })); +}); + describe.skip("Collections page Accessibility", () => { const searchParams = { collection_keywords: "flower", From 13bc62fd486ebde4c1075210fde90341ec66eb35 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Wed, 18 Dec 2024 10:08:02 -0500 Subject: [PATCH 54/55] changelog updates --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a27b3bc6..117a813a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added `/healthcheck` endpoint (DR-3304) ### Updated - +- Update `/collections` page to fetch data from Repo API and meet designs (DR-3100) +- Update `/collections/lane/:slug` page to fetch data from Repo API (DR-3701) - Refactored implementation of default featured item & updated default number of digitized items (DR-3305) - Update thumbnail logic so thumbnails are never restricted (DR-3293) - Update feedback form credentials to use official DR service account (DR-2794) From 18cd45633aa81030eb4352d567dc9cfc5bffa9e4 Mon Sep 17 00:00:00 2001 From: Alessandra Vertrees Date: Wed, 18 Dec 2024 10:08:57 -0500 Subject: [PATCH 55/55] public changelog --- public/CHANGELOG.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/CHANGELOG.md b/public/CHANGELOG.md index d99d83f7..117a813a 100644 --- a/public/CHANGELOG.md +++ b/public/CHANGELOG.md @@ -9,18 +9,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed -- removed unneccessary variables post reverse proxy launch +- Removed unnecessary variables post reverse proxy launch - Removed new relic files from frontend (DR-3311) ### Added - Added tests for API helpers (DR-3271) +- Added `/healthcheck` endpoint (DR-3304) ### Updated - -- refactored implementation of default featured item & updated default number of digitized items (DR-3305) +- Update `/collections` page to fetch data from Repo API and meet designs (DR-3100) +- Update `/collections/lane/:slug` page to fetch data from Repo API (DR-3701) +- Refactored implementation of default featured item & updated default number of digitized items (DR-3305) - Update thumbnail logic so thumbnails are never restricted (DR-3293) - Update feedback form credentials to use official DR service account (DR-2794) +- Update timeout on API request to 10 seconds (DR-3304) +- Update header to expand on scroll up on desktop (DR-3322) ## [0.2.4] 2024-11-26