From bea1beb40ca30e764486a2feb7c731382eeb9ee7 Mon Sep 17 00:00:00 2001 From: Andreas Nielsen Date: Tue, 30 Jul 2024 16:22:13 +0200 Subject: [PATCH 01/25] Added a check to see if URL parameter "check_logged_in" is set. If so, we make sure to show the blocked modal, otherwise we don't show it. This is done to prevent spamming the user with a modal telling them that they have unpaid fees. --- .../blocked-patron/blocked-modal/BlockedModal.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/blocked-patron/blocked-modal/BlockedModal.tsx b/src/components/blocked-patron/blocked-modal/BlockedModal.tsx index bc21ccaa2c..21b8ffa7f5 100644 --- a/src/components/blocked-patron/blocked-modal/BlockedModal.tsx +++ b/src/components/blocked-patron/blocked-modal/BlockedModal.tsx @@ -1,4 +1,4 @@ -import React, { FC } from "react"; +import React, { FC, useEffect, useState } from "react"; import Modal from "../../../core/utils/modal"; import { useText } from "../../../core/utils/text"; import BlockedTypes from "../../../core/utils/types/BlockedTypes"; @@ -15,9 +15,18 @@ const BlockedModal: FC = ({ blockedStatus }) => { const u = useUrls(); const blockedPatronELinkUrl = u("blockedPatronELinkUrl", true); const { blockedModal } = getModalIds(); + const [isJustLoggedIn, setJustLoggedIn] = useState(false); - // If the user isn't actually blocked, don't render the modal. - if (!blockedStatus || blockedStatus === "") { + useEffect(() => { + const urlPrams = new URLSearchParams(window.location.search); + if (urlPrams.get("check_logged_in")) { + setJustLoggedIn(true); + } + }, []); + + // If the user isn't actually blocked, don't render the modal, + // and only showe the modal if the user has just logged in. + if (!blockedStatus || blockedStatus === "" || !isJustLoggedIn) { return null; } From 5112f17f49c9c326587d5c72c95916f0c4d7535d Mon Sep 17 00:00:00 2001 From: Andreas Nielsen Date: Wed, 31 Jul 2024 15:40:17 +0200 Subject: [PATCH 02/25] Updated BlockedPatron cypress test to include the "check_logged_in" url parameter when testing. Also added a new test that tests that the blockedPatron modal don't show up when the "check_logged_in" parameter is not present. --- .../blocked-patron/BlockedPatron.test.ts | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/src/components/blocked-patron/BlockedPatron.test.ts b/src/components/blocked-patron/BlockedPatron.test.ts index 7a0ee88a1d..2717c56e9c 100644 --- a/src/components/blocked-patron/BlockedPatron.test.ts +++ b/src/components/blocked-patron/BlockedPatron.test.ts @@ -28,7 +28,9 @@ describe("Patron page", () => { ] } }); - cy.visit("/iframe.html?path=/story/apps-loan-list--loan-list-entry"); + cy.visit( + "/iframe.html?path=/story/apps-loan-list--loan-list-entry&check_logged_in=1" + ); cy.getBySel("modal").should("exist"); cy.getBySel("modal").should("exist"); cy.getBySel("modal").get("h1").should("exist"); @@ -50,7 +52,9 @@ describe("Patron page", () => { ] } }); - cy.visit("/iframe.html?path=/story/apps-loan-list--loan-list-entry"); + cy.visit( + "/iframe.html?path=/story/apps-loan-list--loan-list-entry&check_logged_in=1" + ); cy.getBySel("modal").should("exist"); cy.getBySel("modal").get("h1").should("exist"); cy.getBySel("modal").get("p").should("exist"); @@ -71,12 +75,32 @@ describe("Patron page", () => { ] } }); - cy.visit("/iframe.html?path=/story/apps-loan-list--loan-list-entry"); + cy.visit( + "/iframe.html?path=/story/apps-loan-list--loan-list-entry&check_logged_in=1" + ); cy.getBySel("modal").should("exist"); cy.getBySel("modal").get("h1").should("exist"); cy.getBySel("modal").get("p").should("exist"); cy.getBySel("modal").get("a").should("not.exist"); }); + + // Blocked types: + // https://github.com/itk-dev/dpl-react/blob/develop/src/core/utils/types/BlockedTypes.ts + it("Patron blocked E - Do not show modal unless just logged in", () => { + cy.intercept("GET", "**/external/agencyid/patrons/patronid/v2**", { + patron: { + blockStatus: [ + { + blockedReason: "E", + blockedSince: "", + message: "" + } + ] + } + }); + cy.visit("/iframe.html?path=/story/apps-loan-list--loan-list-entry"); + cy.get(".modal").should("not.exist"); + }); }); export {}; From 6fa18b56913f782d6eb30df03fe8f140d1e351ec Mon Sep 17 00:00:00 2001 From: Kasper Birch Date: Wed, 21 Aug 2024 15:43:58 +0200 Subject: [PATCH 03/25] Add `OpeningHoursClock` and `OpeningHoursClockIcon` React apps This is the initial setup of two React apps that handle the modal for opening hours. My original intention was to have a single app that would determine whether to render the small icon or the clock based on a prop. However, that approach didn't work as expected, so I believe having two separate apps is necessary. --- .../OpeningHoursClock.dev.tsx | 21 ++++++++++++++ .../OpeningHoursClock.entry.tsx | 17 +++++++++++ .../OpeningHoursClock.mount.ts | 4 +++ .../OpeningHoursClock.tsx | 28 +++++++++++++++++++ .../OpeningHoursClockIcon.dev.tsx | 21 ++++++++++++++ .../OpeningHoursClockIcon.entry.tsx | 17 +++++++++++ .../OpeningHoursClockIcon.mount.ts | 4 +++ .../OpeningHoursClockIcon.tsx | 26 +++++++++++++++++ 8 files changed, 138 insertions(+) create mode 100644 src/apps/opening-hours-sidebar/OpeningHoursClock.dev.tsx create mode 100644 src/apps/opening-hours-sidebar/OpeningHoursClock.entry.tsx create mode 100644 src/apps/opening-hours-sidebar/OpeningHoursClock.mount.ts create mode 100644 src/apps/opening-hours-sidebar/OpeningHoursClock.tsx create mode 100644 src/apps/opening-hours-sidebar/OpeningHoursClockIcon.dev.tsx create mode 100644 src/apps/opening-hours-sidebar/OpeningHoursClockIcon.entry.tsx create mode 100644 src/apps/opening-hours-sidebar/OpeningHoursClockIcon.mount.ts create mode 100644 src/apps/opening-hours-sidebar/OpeningHoursClockIcon.tsx diff --git a/src/apps/opening-hours-sidebar/OpeningHoursClock.dev.tsx b/src/apps/opening-hours-sidebar/OpeningHoursClock.dev.tsx new file mode 100644 index 0000000000..fa6269164e --- /dev/null +++ b/src/apps/opening-hours-sidebar/OpeningHoursClock.dev.tsx @@ -0,0 +1,21 @@ +import { ComponentMeta, ComponentStory } from "@storybook/react"; +import React from "react"; +import serviceUrlArgs from "../../core/storybook/serviceUrlArgs"; +import OpeningHoursClock from "./OpeningHoursClock.entry"; + +export default { + title: "Apps / Opening Hour Clock", + component: OpeningHoursClock, + argTypes: { + ...serviceUrlArgs, + openingHoursText: { + name: "Opening hours text", + defaultValue: "Opening hours", + control: { type: "text" } + } + } +} as ComponentMeta; + +export const App: ComponentStory = (args) => ( + +); diff --git a/src/apps/opening-hours-sidebar/OpeningHoursClock.entry.tsx b/src/apps/opening-hours-sidebar/OpeningHoursClock.entry.tsx new file mode 100644 index 0000000000..50de4d9ac2 --- /dev/null +++ b/src/apps/opening-hours-sidebar/OpeningHoursClock.entry.tsx @@ -0,0 +1,17 @@ +import React from "react"; +import { withText } from "../../core/utils/text"; +import { withUrls } from "../../core/utils/url"; +import OpeningHoursClock from "./OpeningHoursClock"; +import { withConfig } from "../../core/utils/config"; + +interface OpeningHoursClockEntryTextProps { + openingHoursText: string; +} + +const OpeningHoursClockEntry: React.FC< + OpeningHoursClockEntryTextProps +> = () => { + return ; +}; + +export default withConfig(withUrls(withText(OpeningHoursClockEntry))); diff --git a/src/apps/opening-hours-sidebar/OpeningHoursClock.mount.ts b/src/apps/opening-hours-sidebar/OpeningHoursClock.mount.ts new file mode 100644 index 0000000000..23ac62c438 --- /dev/null +++ b/src/apps/opening-hours-sidebar/OpeningHoursClock.mount.ts @@ -0,0 +1,4 @@ +import addMount from "../../core/addMount"; +import OpeningHoursClock from "./OpeningHoursClock.entry"; + +addMount({ appName: "opening-hours-clock", app: OpeningHoursClock }); diff --git a/src/apps/opening-hours-sidebar/OpeningHoursClock.tsx b/src/apps/opening-hours-sidebar/OpeningHoursClock.tsx new file mode 100644 index 0000000000..28515bbf3b --- /dev/null +++ b/src/apps/opening-hours-sidebar/OpeningHoursClock.tsx @@ -0,0 +1,28 @@ +import React from "react"; +import iconWatch from "@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-watch-static.svg"; +import { useText } from "../../core/utils/text"; + +const OpeningHoursClock = () => { + const t = useText(); + + return ( +
+
+
+
+ +
+ ); +}; + +export default OpeningHoursClock; diff --git a/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.dev.tsx b/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.dev.tsx new file mode 100644 index 0000000000..50cbe92d05 --- /dev/null +++ b/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.dev.tsx @@ -0,0 +1,21 @@ +import { ComponentMeta, ComponentStory } from "@storybook/react"; +import React from "react"; +import serviceUrlArgs from "../../core/storybook/serviceUrlArgs"; +import OpeningHoursClockIcon from "./OpeningHoursClockIcon.entry"; + +export default { + title: "Apps / Opening Hour Clock Icon", + component: OpeningHoursClockIcon, + argTypes: { + ...serviceUrlArgs, + openingHoursText: { + name: "Opening hours text", + defaultValue: "Opening hours", + control: { type: "text" } + } + } +} as ComponentMeta; + +export const App: ComponentStory = (args) => ( + +); diff --git a/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.entry.tsx b/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.entry.tsx new file mode 100644 index 0000000000..bed58c4695 --- /dev/null +++ b/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.entry.tsx @@ -0,0 +1,17 @@ +import React from "react"; +import { withText } from "../../core/utils/text"; +import { withUrls } from "../../core/utils/url"; +import OpeningHoursClockIcon from "./OpeningHoursClockIcon"; +import { withConfig } from "../../core/utils/config"; + +interface OpeningHoursClockIconEntryTextProps { + openingHoursText: string; +} + +const OpeningHoursClockIconEntry: React.FC< + OpeningHoursClockIconEntryTextProps +> = () => { + return ; +}; + +export default withConfig(withUrls(withText(OpeningHoursClockIconEntry))); diff --git a/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.mount.ts b/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.mount.ts new file mode 100644 index 0000000000..0b39ef0a62 --- /dev/null +++ b/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.mount.ts @@ -0,0 +1,4 @@ +import addMount from "../../core/addMount"; +import OpeningHoursClockIcon from "./OpeningHoursClockIcon.entry"; + +addMount({ appName: "opening-hours-clock-icon", app: OpeningHoursClockIcon }); diff --git a/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.tsx b/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.tsx new file mode 100644 index 0000000000..73454560dd --- /dev/null +++ b/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.tsx @@ -0,0 +1,26 @@ +import React from "react"; +import iconWatch from "@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-watch-static.svg"; +import { useText } from "../../core/utils/text"; + +const OpeningHoursClockIcon = () => { + const t = useText(); + + return ( + + ); +}; + +export default OpeningHoursClockIcon; From 9bef4dc313cddfd05aeb2f1869ccfd48d3823ba1 Mon Sep 17 00:00:00 2001 From: Kasper Birch Date: Mon, 26 Aug 2024 13:16:30 +0200 Subject: [PATCH 04/25] Combine `OpeningHoursClockIcon` and `OpeningHoursClock` into `OpeningHoursSidebar` This was the initial idea, and now it works so that there is only one React component that renders both the icon and the large clock. --- .../OpeningHoursClock.entry.tsx | 17 ------ .../OpeningHoursClock.mount.ts | 4 -- .../OpeningHoursClock.tsx | 28 ---------- .../OpeningHoursClockIcon.dev.tsx | 21 -------- .../OpeningHoursClockIcon.entry.tsx | 17 ------ .../OpeningHoursClockIcon.mount.ts | 4 -- .../OpeningHoursClockIcon.tsx | 26 ---------- ...ck.dev.tsx => OpeningHoursSidebar.dev.tsx} | 12 ++--- .../OpeningHoursSidebar.entry.tsx | 19 +++++++ .../OpeningHoursSidebar.mount.ts | 4 ++ .../OpeningHoursSidebar.tsx | 52 +++++++++++++++++++ 11 files changed, 81 insertions(+), 123 deletions(-) delete mode 100644 src/apps/opening-hours-sidebar/OpeningHoursClock.entry.tsx delete mode 100644 src/apps/opening-hours-sidebar/OpeningHoursClock.mount.ts delete mode 100644 src/apps/opening-hours-sidebar/OpeningHoursClock.tsx delete mode 100644 src/apps/opening-hours-sidebar/OpeningHoursClockIcon.dev.tsx delete mode 100644 src/apps/opening-hours-sidebar/OpeningHoursClockIcon.entry.tsx delete mode 100644 src/apps/opening-hours-sidebar/OpeningHoursClockIcon.mount.ts delete mode 100644 src/apps/opening-hours-sidebar/OpeningHoursClockIcon.tsx rename src/apps/opening-hours-sidebar/{OpeningHoursClock.dev.tsx => OpeningHoursSidebar.dev.tsx} (54%) create mode 100644 src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx create mode 100644 src/apps/opening-hours-sidebar/OpeningHoursSidebar.mount.ts create mode 100644 src/apps/opening-hours-sidebar/OpeningHoursSidebar.tsx diff --git a/src/apps/opening-hours-sidebar/OpeningHoursClock.entry.tsx b/src/apps/opening-hours-sidebar/OpeningHoursClock.entry.tsx deleted file mode 100644 index 50de4d9ac2..0000000000 --- a/src/apps/opening-hours-sidebar/OpeningHoursClock.entry.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import React from "react"; -import { withText } from "../../core/utils/text"; -import { withUrls } from "../../core/utils/url"; -import OpeningHoursClock from "./OpeningHoursClock"; -import { withConfig } from "../../core/utils/config"; - -interface OpeningHoursClockEntryTextProps { - openingHoursText: string; -} - -const OpeningHoursClockEntry: React.FC< - OpeningHoursClockEntryTextProps -> = () => { - return ; -}; - -export default withConfig(withUrls(withText(OpeningHoursClockEntry))); diff --git a/src/apps/opening-hours-sidebar/OpeningHoursClock.mount.ts b/src/apps/opening-hours-sidebar/OpeningHoursClock.mount.ts deleted file mode 100644 index 23ac62c438..0000000000 --- a/src/apps/opening-hours-sidebar/OpeningHoursClock.mount.ts +++ /dev/null @@ -1,4 +0,0 @@ -import addMount from "../../core/addMount"; -import OpeningHoursClock from "./OpeningHoursClock.entry"; - -addMount({ appName: "opening-hours-clock", app: OpeningHoursClock }); diff --git a/src/apps/opening-hours-sidebar/OpeningHoursClock.tsx b/src/apps/opening-hours-sidebar/OpeningHoursClock.tsx deleted file mode 100644 index 28515bbf3b..0000000000 --- a/src/apps/opening-hours-sidebar/OpeningHoursClock.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from "react"; -import iconWatch from "@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-watch-static.svg"; -import { useText } from "../../core/utils/text"; - -const OpeningHoursClock = () => { - const t = useText(); - - return ( -
-
-
-
- -
- ); -}; - -export default OpeningHoursClock; diff --git a/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.dev.tsx b/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.dev.tsx deleted file mode 100644 index 50cbe92d05..0000000000 --- a/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.dev.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { ComponentMeta, ComponentStory } from "@storybook/react"; -import React from "react"; -import serviceUrlArgs from "../../core/storybook/serviceUrlArgs"; -import OpeningHoursClockIcon from "./OpeningHoursClockIcon.entry"; - -export default { - title: "Apps / Opening Hour Clock Icon", - component: OpeningHoursClockIcon, - argTypes: { - ...serviceUrlArgs, - openingHoursText: { - name: "Opening hours text", - defaultValue: "Opening hours", - control: { type: "text" } - } - } -} as ComponentMeta; - -export const App: ComponentStory = (args) => ( - -); diff --git a/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.entry.tsx b/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.entry.tsx deleted file mode 100644 index bed58c4695..0000000000 --- a/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.entry.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import React from "react"; -import { withText } from "../../core/utils/text"; -import { withUrls } from "../../core/utils/url"; -import OpeningHoursClockIcon from "./OpeningHoursClockIcon"; -import { withConfig } from "../../core/utils/config"; - -interface OpeningHoursClockIconEntryTextProps { - openingHoursText: string; -} - -const OpeningHoursClockIconEntry: React.FC< - OpeningHoursClockIconEntryTextProps -> = () => { - return ; -}; - -export default withConfig(withUrls(withText(OpeningHoursClockIconEntry))); diff --git a/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.mount.ts b/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.mount.ts deleted file mode 100644 index 0b39ef0a62..0000000000 --- a/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.mount.ts +++ /dev/null @@ -1,4 +0,0 @@ -import addMount from "../../core/addMount"; -import OpeningHoursClockIcon from "./OpeningHoursClockIcon.entry"; - -addMount({ appName: "opening-hours-clock-icon", app: OpeningHoursClockIcon }); diff --git a/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.tsx b/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.tsx deleted file mode 100644 index 73454560dd..0000000000 --- a/src/apps/opening-hours-sidebar/OpeningHoursClockIcon.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from "react"; -import iconWatch from "@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-watch-static.svg"; -import { useText } from "../../core/utils/text"; - -const OpeningHoursClockIcon = () => { - const t = useText(); - - return ( - - ); -}; - -export default OpeningHoursClockIcon; diff --git a/src/apps/opening-hours-sidebar/OpeningHoursClock.dev.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.dev.tsx similarity index 54% rename from src/apps/opening-hours-sidebar/OpeningHoursClock.dev.tsx rename to src/apps/opening-hours-sidebar/OpeningHoursSidebar.dev.tsx index fa6269164e..55c93afeb5 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursClock.dev.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.dev.tsx @@ -1,11 +1,11 @@ import { ComponentMeta, ComponentStory } from "@storybook/react"; import React from "react"; import serviceUrlArgs from "../../core/storybook/serviceUrlArgs"; -import OpeningHoursClock from "./OpeningHoursClock.entry"; +import OpeningHoursSidebar from "./OpeningHoursSidebar.entry"; export default { - title: "Apps / Opening Hour Clock", - component: OpeningHoursClock, + title: "Apps / Opening Hour Sidebar", + component: OpeningHoursSidebar, argTypes: { ...serviceUrlArgs, openingHoursText: { @@ -14,8 +14,8 @@ export default { control: { type: "text" } } } -} as ComponentMeta; +} as ComponentMeta; -export const App: ComponentStory = (args) => ( - +export const App: ComponentStory = (args) => ( + ); diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx new file mode 100644 index 0000000000..aeeb7abd0e --- /dev/null +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx @@ -0,0 +1,19 @@ +import React, { FC } from "react"; +import { withText } from "../../core/utils/text"; +import { withUrls } from "../../core/utils/url"; +import OpeningHoursSidebar, { + OpeningHoursSidebarType +} from "./OpeningHoursSidebar"; +import { withConfig } from "../../core/utils/config"; + +interface OpeningHoursClockEntryTextProps { + openingHoursText: string; +} + +const OpeningHoursSidebarEntry: FC< + OpeningHoursClockEntryTextProps & OpeningHoursSidebarType +> = ({ size }) => { + return ; +}; + +export default withConfig(withUrls(withText(OpeningHoursSidebarEntry))); diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.mount.ts b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.mount.ts new file mode 100644 index 0000000000..aaebf7d826 --- /dev/null +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.mount.ts @@ -0,0 +1,4 @@ +import addMount from "../../core/addMount"; +import OpeningHoursSidebar from "./OpeningHoursSidebar.entry"; + +addMount({ appName: "opening-hours-sidebar", app: OpeningHoursSidebar }); diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.tsx new file mode 100644 index 0000000000..3da25d1b5a --- /dev/null +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.tsx @@ -0,0 +1,52 @@ +import React, { FC } from "react"; +import iconWatch from "@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-watch-static.svg"; +import { useText } from "../../core/utils/text"; + +export type OpeningHoursSidebarType = { + size: "small" | "large"; +}; + +const OpeningHoursSidebar: FC = ({ size }) => { + const t = useText(); + + if (size === "large") { + return ( +
+
+
+
+ +
+ ); + } + + return ( + + ); +}; + +export default OpeningHoursSidebar; From 407c943582e0e626f2fb3d0f00c2a8e01e2dfb05 Mon Sep 17 00:00:00 2001 From: Kasper Birch Date: Thu, 29 Aug 2024 14:04:47 +0200 Subject: [PATCH 05/25] Refactor `Dialog` to support sidebar Add a modifier class when `isSidebar` is true --- src/components/dialog/Dialog.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/dialog/Dialog.tsx b/src/components/dialog/Dialog.tsx index db1e0af6f6..50b598724d 100644 --- a/src/components/dialog/Dialog.tsx +++ b/src/components/dialog/Dialog.tsx @@ -2,20 +2,22 @@ /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */ /* eslint-disable jsx-a11y/click-events-have-key-events */ import React, { forwardRef } from "react"; +import clsx from "clsx"; import iconCross from "@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-cross.svg"; import useEscapeKey from "./useEscapeKey"; type DialogType = { children: React.ReactNode; closeDialog: () => void; + isSidebar?: boolean; }; const Dialog = forwardRef( - ({ children, closeDialog }, ref) => { + ({ children, closeDialog, isSidebar }, ref) => { useEscapeKey({ closeDialog }); return ( { From 0982c33428d8d9e5c3a12383dcd4e57a0e134738 Mon Sep 17 00:00:00 2001 From: Kasper Birch Date: Thu, 29 Aug 2024 14:14:18 +0200 Subject: [PATCH 06/25] Refactor `DisclosureControllable` to support `detailsClassName` and `summaryClassName` This is the original thought and the way we implemented it in the design system. This way, it's much more reusable. --- src/apps/material/material.tsx | 1 + src/components/Disclosures/DisclosureControllable.tsx | 9 ++++++--- src/components/facet-browser/FacetBrowserModalBody.tsx | 2 +- src/components/instant-loan/InstantLoan.tsx | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/apps/material/material.tsx b/src/apps/material/material.tsx index ef3ee90522..5281d969c4 100644 --- a/src/apps/material/material.tsx +++ b/src/apps/material/material.tsx @@ -231,6 +231,7 @@ const Material: React.FC = ({ wid }) => { {hasReview && hasReview.length > 0 && ( void; cyData?: string; - className?: string; + detailsClassName?: string; + summaryClassName?: string; summary: ReactNode; } @@ -18,7 +19,8 @@ const DisclosureControllable: FC = ({ children, showContent = false, cyData, - className, + detailsClassName, + summaryClassName, summary }) => { const [isOpen, setIsOpen] = useState(showContent); @@ -43,8 +45,9 @@ const DisclosureControllable: FC = ({ const disclosureId = `disclosure-${id}`; return ( -
+
= ({ return ( Date: Thu, 29 Aug 2024 14:36:37 +0200 Subject: [PATCH 07/25] Refactor OpeningHoursSidebar and add its subcomponents This is to view and test the markup and its included test data --- .../OpeningHoursSidebar.tsx | 57 +++++--------- .../OpeningHoursSidebarButtonLarge.tsx | 36 +++++++++ .../OpeningHoursSidebarButtonSmall.tsx | 31 ++++++++ .../OpeningHoursSidebarDetails.tsx | 37 +++++++++ .../OpeningHoursSidebarSidebar.tsx | 76 +++++++++++++++++++ .../OpeningHoursSidebarSummary.tsx | 23 ++++++ 6 files changed, 223 insertions(+), 37 deletions(-) create mode 100644 src/apps/opening-hours-sidebar/OpeningHoursSidebarButtonLarge.tsx create mode 100644 src/apps/opening-hours-sidebar/OpeningHoursSidebarButtonSmall.tsx create mode 100644 src/apps/opening-hours-sidebar/OpeningHoursSidebarDetails.tsx create mode 100644 src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx create mode 100644 src/apps/opening-hours-sidebar/OpeningHoursSidebarSummary.tsx diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.tsx index 3da25d1b5a..7f2903daeb 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.tsx @@ -1,51 +1,34 @@ import React, { FC } from "react"; -import iconWatch from "@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-watch-static.svg"; -import { useText } from "../../core/utils/text"; +import useDialog from "../../components/dialog/useDialog"; +import OpeningHoursSidebarSidebar from "./OpeningHoursSidebarSidebar"; +import OpeningHoursSidebarButtonLarge from "./OpeningHoursSidebarButtonLarge"; +import OpeningHoursSidebarButtonSmall from "./OpeningHoursSidebarButtonSmall"; +import Dialog from "../../components/dialog/Dialog"; export type OpeningHoursSidebarType = { size: "small" | "large"; }; const OpeningHoursSidebar: FC = ({ size }) => { - const t = useText(); + const { dialogContent, openDialogWithContent, closeDialog, dialogRef } = + useDialog(); - if (size === "large") { - return ( -
-
-
-
- -
- ); - } + const openDialog = () => + openDialogWithContent(); return ( - + + {dialogContent} + + ); }; diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebarButtonLarge.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebarButtonLarge.tsx new file mode 100644 index 0000000000..a26369be53 --- /dev/null +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebarButtonLarge.tsx @@ -0,0 +1,36 @@ +import React, { FC } from "react"; +import iconWatch from "@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-watch-static.svg"; +import { useText } from "../../core/utils/text"; + +type ButtonLargeProps = { + openDialog: () => void; +}; + +const ButtonLarge: FC = ({ openDialog }) => { + const t = useText(); + + return ( +
+
+
+
+ +
+ ); +}; + +export default ButtonLarge; diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebarButtonSmall.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebarButtonSmall.tsx new file mode 100644 index 0000000000..8468ea913e --- /dev/null +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebarButtonSmall.tsx @@ -0,0 +1,31 @@ +import React, { FC } from "react"; +import iconWatch from "@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-watch-static.svg"; +import { useText } from "../../core/utils/text"; + +type ButtonSmallProps = { + openDialog: () => void; +}; + +const ButtonSmall: FC = ({ openDialog }) => { + const t = useText(); + + return ( + + ); +}; + +export default ButtonSmall; diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebarDetails.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebarDetails.tsx new file mode 100644 index 0000000000..04905ad877 --- /dev/null +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebarDetails.tsx @@ -0,0 +1,37 @@ +import React, { FC } from "react"; + +export type OpeningHoursItemType = { + term: string; + description: string; +}; + +type OpeningHoursSidebarDetailsType = { + openingHoursData: OpeningHoursItemType[]; + link: string; +}; + +const OpeningHoursSidebarDetails: FC = ({ + openingHoursData, + link +}) => { + return ( +
+
+ {openingHoursData.map(({ term, description }, i) => ( + // eslint-disable-next-line react/no-array-index-key +
+
{term}
+
+ {description} +
+
+ ))} +
+ + Se alle åbningstider + +
+ ); +}; + +export default OpeningHoursSidebarDetails; diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx new file mode 100644 index 0000000000..8012a2b825 --- /dev/null +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx @@ -0,0 +1,76 @@ +import React from "react"; +import iconWatch from "@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-watch-static.svg"; +import DisclosureControllable from "../../components/Disclosures/DisclosureControllable"; +import OpeningHoursSidebarSummary from "./OpeningHoursSidebarSummary"; +import OpeningHoursSidebarDetails from "./OpeningHoursSidebarDetails"; + +const libraries = [ + { + id: "1", + name: "Hovedbiblioteket", + openingHoursData: [ + { term: "Selvbetjening & læsesale", description: "7:00 - 22:00" }, + { term: "Personlig betjening:", description: "9:00 - 16:00" }, + { term: "Telefon (+45 30 30 30 30):", description: "7:00 - 22:00" } + ] + }, + { + id: "2", + name: "BIBLIOTEKET Rentemestervej", + openingHoursData: [ + { term: "Selvbetjening & læsesale", description: "7:00 - 22:00" }, + { term: "Personlig betjening:", description: "9:00 - 16:00" }, + { term: "Telefon (+45 30 30 30 30):", description: "7:00 - 22:00" } + ] + }, + { + id: "3", + name: "Bibliotekshuset", + openingHoursData: [ + { term: "Selvbetjening & læsesale", description: "7:00 - 22:00" }, + { term: "Personlig betjening:", description: "9:00 - 16:00" }, + { term: "Telefon (+45 30 30 30 30):", description: "7:00 - 22:00" } + ] + }, + { + id: "4", + name: "Blågårdens Bibliotek", + openingHoursData: [ + { term: "Selvbetjening & læsesale", description: "7:00 - 22:00" }, + { term: "Personlig betjening:", description: "9:00 - 16:00" }, + { term: "Telefon (+45 30 30 30 30):", description: "7:00 - 22:00" } + ] + } +]; + +const OpeningHoursSidebarSidebar = () => { + return ( +
+
+ +
+

Åbningstider

+

I dag (fredag 28. maj)

+
+
+ + {libraries.map(({ id, name, openingHoursData }, i) => ( + } + > + + + ))} +
+ ); +}; + +export default OpeningHoursSidebarSidebar; diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebarSummary.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebarSummary.tsx new file mode 100644 index 0000000000..c0d522ba09 --- /dev/null +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebarSummary.tsx @@ -0,0 +1,23 @@ +import React, { FC } from "react"; +import IconExpand from "@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"; + +type OpeningHoursSidebarSummaryType = { + name: string; +}; + +const OpeningHoursSidebarSummary: FC = ({ + name +}) => { + return ( + <> +

{name}

+ + + ); +}; + +export default OpeningHoursSidebarSummary; From a7cedc22598a620684ebb516effecaa9dc28e9e7 Mon Sep 17 00:00:00 2001 From: Kasper Birch Date: Thu, 29 Aug 2024 15:55:20 +0200 Subject: [PATCH 08/25] Add `useOpeningHoursSidebar` and `helper.ts` to show real data This is temporary. We need to decide if the api should be changed so that we have access to the library name and url. --- .../OpeningHoursSidebar.tsx | 5 +- .../OpeningHoursSidebarDetails.tsx | 18 ++----- .../OpeningHoursSidebarSidebar.tsx | 50 +++---------------- .../OpeningHoursSidebarSummary.tsx | 7 +-- src/apps/opening-hours-sidebar/helper.ts | 48 ++++++++++++++++++ .../useOpeningHoursSidebar.ts | 37 ++++++++++++++ 6 files changed, 102 insertions(+), 63 deletions(-) create mode 100644 src/apps/opening-hours-sidebar/helper.ts create mode 100644 src/apps/opening-hours-sidebar/useOpeningHoursSidebar.ts diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.tsx index 7f2903daeb..19744d50fa 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.tsx @@ -4,6 +4,7 @@ import OpeningHoursSidebarSidebar from "./OpeningHoursSidebarSidebar"; import OpeningHoursSidebarButtonLarge from "./OpeningHoursSidebarButtonLarge"; import OpeningHoursSidebarButtonSmall from "./OpeningHoursSidebarButtonSmall"; import Dialog from "../../components/dialog/Dialog"; +import useOpeningHoursSidebar from "./useOpeningHoursSidebar"; export type OpeningHoursSidebarType = { size: "small" | "large"; @@ -13,8 +14,10 @@ const OpeningHoursSidebar: FC = ({ size }) => { const { dialogContent, openDialogWithContent, closeDialog, dialogRef } = useDialog(); + const { libraries } = useOpeningHoursSidebar(); + const openDialog = () => - openDialogWithContent(); + openDialogWithContent(); return ( <> diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebarDetails.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebarDetails.tsx index 04905ad877..297136d421 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursSidebarDetails.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebarDetails.tsx @@ -1,19 +1,9 @@ import React, { FC } from "react"; +import { LibraryType } from "./helper"; -export type OpeningHoursItemType = { - term: string; - description: string; -}; - -type OpeningHoursSidebarDetailsType = { - openingHoursData: OpeningHoursItemType[]; - link: string; -}; - -const OpeningHoursSidebarDetails: FC = ({ - openingHoursData, - link -}) => { +const OpeningHoursSidebarDetails: FC< + Pick +> = ({ openingHoursData, link }) => { return (
diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx index 8012a2b825..e5146325b1 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx @@ -1,49 +1,13 @@ -import React from "react"; +import React, { FC } from "react"; import iconWatch from "@danskernesdigitalebibliotek/dpl-design-system/build/icons/basic/icon-watch-static.svg"; import DisclosureControllable from "../../components/Disclosures/DisclosureControllable"; import OpeningHoursSidebarSummary from "./OpeningHoursSidebarSummary"; import OpeningHoursSidebarDetails from "./OpeningHoursSidebarDetails"; +import { LibraryType } from "./helper"; -const libraries = [ - { - id: "1", - name: "Hovedbiblioteket", - openingHoursData: [ - { term: "Selvbetjening & læsesale", description: "7:00 - 22:00" }, - { term: "Personlig betjening:", description: "9:00 - 16:00" }, - { term: "Telefon (+45 30 30 30 30):", description: "7:00 - 22:00" } - ] - }, - { - id: "2", - name: "BIBLIOTEKET Rentemestervej", - openingHoursData: [ - { term: "Selvbetjening & læsesale", description: "7:00 - 22:00" }, - { term: "Personlig betjening:", description: "9:00 - 16:00" }, - { term: "Telefon (+45 30 30 30 30):", description: "7:00 - 22:00" } - ] - }, - { - id: "3", - name: "Bibliotekshuset", - openingHoursData: [ - { term: "Selvbetjening & læsesale", description: "7:00 - 22:00" }, - { term: "Personlig betjening:", description: "9:00 - 16:00" }, - { term: "Telefon (+45 30 30 30 30):", description: "7:00 - 22:00" } - ] - }, - { - id: "4", - name: "Blågårdens Bibliotek", - openingHoursData: [ - { term: "Selvbetjening & læsesale", description: "7:00 - 22:00" }, - { term: "Personlig betjening:", description: "9:00 - 16:00" }, - { term: "Telefon (+45 30 30 30 30):", description: "7:00 - 22:00" } - ] - } -]; - -const OpeningHoursSidebarSidebar = () => { +const OpeningHoursSidebarSidebar: FC<{ libraries: LibraryType[] }> = ({ + libraries +}) => { return (
@@ -54,7 +18,7 @@ const OpeningHoursSidebarSidebar = () => {
- {libraries.map(({ id, name, openingHoursData }, i) => ( + {libraries.map(({ id, name, openingHoursData, link }, i) => ( { > ))} diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebarSummary.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebarSummary.tsx index c0d522ba09..e2af285116 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursSidebarSummary.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebarSummary.tsx @@ -1,11 +1,8 @@ import React, { FC } from "react"; import IconExpand from "@danskernesdigitalebibliotek/dpl-design-system/build/icons/collection/ExpandMore.svg"; +import { LibraryType } from "./helper"; -type OpeningHoursSidebarSummaryType = { - name: string; -}; - -const OpeningHoursSidebarSummary: FC = ({ +const OpeningHoursSidebarSummary: FC> = ({ name }) => { return ( diff --git a/src/apps/opening-hours-sidebar/helper.ts b/src/apps/opening-hours-sidebar/helper.ts new file mode 100644 index 0000000000..f8d571b6f1 --- /dev/null +++ b/src/apps/opening-hours-sidebar/helper.ts @@ -0,0 +1,48 @@ +import { groupBy } from "lodash"; +import dayjs from "dayjs"; +import { DplOpeningHoursListGET200Item } from "../../core/dpl-cms/model"; + +type OpeningHoursDataType = { + term: string; + description: string; +}; + +export type LibraryType = { + id: string; + name: string; + openingHoursData: OpeningHoursDataType[]; + link: string; +}; + +export type GroupedOpeningHourstype = Record< + string, + DplOpeningHoursListGET200Item[] +>; + +export const groupByBranchId = ( + events: DplOpeningHoursListGET200Item[] +): GroupedOpeningHourstype => { + return groupBy(events, "branch_id"); +}; + +export const convertGroupBranchesToLibrariesList = ( + input: GroupedOpeningHourstype +): LibraryType[] => { + return Object.entries(input).map(([branchId, events]) => { + const openingHoursData = events.map((event) => ({ + term: event.category.title, + description: `${event.start_time} - ${event.end_time}` + })); + + return { + id: branchId, + name: `Branch ${branchId}`, // Placeholder name + openingHoursData, + link: "#" // Placeholder URL + }; + }); +}; + +export const formatDateForAPI = (date: Date): string => { + return dayjs(date).format("YYYY-MM-DD"); +}; diff --git a/src/apps/opening-hours-sidebar/useOpeningHoursSidebar.ts b/src/apps/opening-hours-sidebar/useOpeningHoursSidebar.ts new file mode 100644 index 0000000000..fa9601c4e1 --- /dev/null +++ b/src/apps/opening-hours-sidebar/useOpeningHoursSidebar.ts @@ -0,0 +1,37 @@ +import { useDplOpeningHoursListGET } from "../../core/dpl-cms/dpl-cms"; +import { + formatDateForAPI, + groupByBranchId, + convertGroupBranchesToLibrariesList +} from "./helper"; + +const useOpeningHoursSidebar = () => { + const toDayAndDate = formatDateForAPI(new Date()); + const { + data: openingHours, + error, + isLoading + } = useDplOpeningHoursListGET({ + from_date: toDayAndDate, + to_date: toDayAndDate + }); + + if (!openingHours) { + return { + libraries: [], + error, + isLoading + }; + } + + const groupedOpeningHours = groupByBranchId(openingHours); + const libraries = convertGroupBranchesToLibrariesList(groupedOpeningHours); + + return { + libraries, + error, + isLoading + }; +}; + +export default useOpeningHoursSidebar; From 94c82eef91a80885f850f8e1eabe26028cde4bd8 Mon Sep 17 00:00:00 2001 From: Kasper Birch Date: Thu, 29 Aug 2024 16:20:41 +0200 Subject: [PATCH 09/25] Add translations to `OpeningHoursSidebar` header --- .../OpeningHoursSidebar.dev.tsx | 5 +++++ .../OpeningHoursSidebar.entry.tsx | 1 + .../OpeningHoursSidebarSidebar.tsx | 16 +++++++++++++--- src/apps/opening-hours-sidebar/helper.ts | 10 +++++++--- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.dev.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.dev.tsx index 55c93afeb5..274444d16d 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.dev.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.dev.tsx @@ -12,6 +12,11 @@ export default { name: "Opening hours text", defaultValue: "Opening hours", control: { type: "text" } + }, + openingHoursSidebarTodayText: { + name: "Opening hours today text", + defaultValue: "Today (@toDayString)", + control: { type: "text" } } } } as ComponentMeta; diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx index aeeb7abd0e..70a1a9fbdc 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx @@ -8,6 +8,7 @@ import { withConfig } from "../../core/utils/config"; interface OpeningHoursClockEntryTextProps { openingHoursText: string; + openingHoursSidebarTodayText: string; } const OpeningHoursSidebarEntry: FC< diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx index e5146325b1..fdc2b0c257 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx @@ -3,18 +3,28 @@ import iconWatch from "@danskernesdigitalebibliotek/dpl-design-system/build/icon import DisclosureControllable from "../../components/Disclosures/DisclosureControllable"; import OpeningHoursSidebarSummary from "./OpeningHoursSidebarSummary"; import OpeningHoursSidebarDetails from "./OpeningHoursSidebarDetails"; -import { LibraryType } from "./helper"; +import { LibraryType, toDayString } from "./helper"; +import { useText } from "../../core/utils/text"; const OpeningHoursSidebarSidebar: FC<{ libraries: LibraryType[] }> = ({ libraries }) => { + const t = useText(); return (
-

Åbningstider

-

I dag (fredag 28. maj)

+

+ {t("openingHoursText")} +

+

+ {t("openingHoursSidebarTodayText", { + placeholders: { + "@toDayString": toDayString() + } + })} +

diff --git a/src/apps/opening-hours-sidebar/helper.ts b/src/apps/opening-hours-sidebar/helper.ts index f8d571b6f1..6a528a84ee 100644 --- a/src/apps/opening-hours-sidebar/helper.ts +++ b/src/apps/opening-hours-sidebar/helper.ts @@ -1,7 +1,10 @@ import { groupBy } from "lodash"; import dayjs from "dayjs"; +import "dayjs/locale/da"; import { DplOpeningHoursListGET200Item } from "../../core/dpl-cms/model"; +dayjs.locale("da"); + type OpeningHoursDataType = { term: string; description: string; @@ -43,6 +46,7 @@ export const convertGroupBranchesToLibrariesList = ( }); }; -export const formatDateForAPI = (date: Date): string => { - return dayjs(date).format("YYYY-MM-DD"); -}; +export const formatDateForAPI = (date: Date): string => + dayjs(date).format("YYYY-MM-DD"); + +export const toDayString = (): string => dayjs().format("dddd D. MMMM"); From 0f0de64df17de12c77f6399258aec689cc5d4460 Mon Sep 17 00:00:00 2001 From: Kasper Birch Date: Sat, 31 Aug 2024 16:28:50 +0200 Subject: [PATCH 10/25] Implement `openingHoursSidebarBranchesConfig` + Refactor `convertBranchesToLibraries` The required branch data has now been sent from Drupal. Consequently, the helper file and the function to merge branch data with opening hours have been cleaned up.added. --- .../OpeningHoursSidebar.entry.tsx | 8 ++- .../OpeningHoursSidebarSidebar.tsx | 6 +- src/apps/opening-hours-sidebar/helper.ts | 71 +++++++++++++------ .../useOpeningHoursSidebar.ts | 16 +++-- 4 files changed, 72 insertions(+), 29 deletions(-) diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx index 70a1a9fbdc..5cda832157 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx @@ -11,8 +11,14 @@ interface OpeningHoursClockEntryTextProps { openingHoursSidebarTodayText: string; } +interface OpeningHoursClockEntryConfigProps { + openingHoursSidebarBranchesConfig: string; +} + const OpeningHoursSidebarEntry: FC< - OpeningHoursClockEntryTextProps & OpeningHoursSidebarType + OpeningHoursClockEntryTextProps & + OpeningHoursSidebarType & + OpeningHoursClockEntryConfigProps > = ({ size }) => { return ; }; diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx index fdc2b0c257..c0707cff45 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx @@ -28,11 +28,11 @@ const OpeningHoursSidebarSidebar: FC<{ libraries: LibraryType[] }> = ({
- {libraries.map(({ id, name, openingHoursData, link }, i) => ( + {libraries.map(({ branch_id, name, openingHoursData, link }, i) => ( } diff --git a/src/apps/opening-hours-sidebar/helper.ts b/src/apps/opening-hours-sidebar/helper.ts index 6a528a84ee..708edca558 100644 --- a/src/apps/opening-hours-sidebar/helper.ts +++ b/src/apps/opening-hours-sidebar/helper.ts @@ -1,4 +1,3 @@ -import { groupBy } from "lodash"; import dayjs from "dayjs"; import "dayjs/locale/da"; import { DplOpeningHoursListGET200Item } from "../../core/dpl-cms/model"; @@ -11,37 +10,67 @@ type OpeningHoursDataType = { }; export type LibraryType = { - id: string; + branch_id: string; name: string; openingHoursData: OpeningHoursDataType[]; link: string; }; -export type GroupedOpeningHourstype = Record< - string, - DplOpeningHoursListGET200Item[] ->; - -export const groupByBranchId = ( - events: DplOpeningHoursListGET200Item[] -): GroupedOpeningHourstype => { - return groupBy(events, "branch_id"); +export type BranchConfigType = { + branch_id: string; + link: string; + name: string; + promoted: boolean; }; -export const convertGroupBranchesToLibrariesList = ( - input: GroupedOpeningHourstype +// Sort branches by promoted status and name +const sortBranches = (branches: BranchConfigType[]): BranchConfigType[] => + branches.sort( + (a, b) => + Number(b.promoted) - Number(a.promoted) || a.name.localeCompare(b.name) + ); + +const filterOpeningHoursByBranchId = ( + branch_id: string, + openingHours: DplOpeningHoursListGET200Item[] +): DplOpeningHoursListGET200Item[] => + openingHours.filter((item) => item.branch_id === Number(branch_id)); + +const sortOpeningHours = ( + openingHours: DplOpeningHoursListGET200Item[] +): DplOpeningHoursListGET200Item[] => + openingHours.sort( + (a, b) => + a.start_time.localeCompare(b.start_time) || + a.end_time.localeCompare(b.end_time) + ); + +const mapOpeningHoursData = ( + openingHours: DplOpeningHoursListGET200Item[] +): OpeningHoursDataType[] => + openingHours.map((item) => ({ + term: item.category.title, + description: `${item.start_time} - ${item.end_time}` + })); + +export const convertBranchesToLibraries = ( + branches: BranchConfigType[], + openingHours: DplOpeningHoursListGET200Item[] ): LibraryType[] => { - return Object.entries(input).map(([branchId, events]) => { - const openingHoursData = events.map((event) => ({ - term: event.category.title, - description: `${event.start_time} - ${event.end_time}` - })); + const sortedBranches = sortBranches(branches); + return sortedBranches.map(({ branch_id, name, link }) => { + const branchOpeningHours = filterOpeningHoursByBranchId( + branch_id, + openingHours + ); + const sortedOpeningHours = sortOpeningHours(branchOpeningHours); + const openingHoursData = mapOpeningHoursData(sortedOpeningHours); return { - id: branchId, - name: `Branch ${branchId}`, // Placeholder name + branch_id, + name, openingHoursData, - link: "#" // Placeholder URL + link }; }); }; diff --git a/src/apps/opening-hours-sidebar/useOpeningHoursSidebar.ts b/src/apps/opening-hours-sidebar/useOpeningHoursSidebar.ts index fa9601c4e1..7136f3ccd1 100644 --- a/src/apps/opening-hours-sidebar/useOpeningHoursSidebar.ts +++ b/src/apps/opening-hours-sidebar/useOpeningHoursSidebar.ts @@ -1,11 +1,20 @@ import { useDplOpeningHoursListGET } from "../../core/dpl-cms/dpl-cms"; +import { useConfig } from "../../core/utils/config"; import { formatDateForAPI, - groupByBranchId, - convertGroupBranchesToLibrariesList + convertBranchesToLibraries, + BranchConfigType } from "./helper"; const useOpeningHoursSidebar = () => { + const config = useConfig(); + const branches = config( + "openingHoursSidebarBranchesConfig", + { + transformer: "jsonParse" + } + ); + const toDayAndDate = formatDateForAPI(new Date()); const { data: openingHours, @@ -24,8 +33,7 @@ const useOpeningHoursSidebar = () => { }; } - const groupedOpeningHours = groupByBranchId(openingHours); - const libraries = convertGroupBranchesToLibrariesList(groupedOpeningHours); + const libraries = convertBranchesToLibraries(branches, openingHours); return { libraries, From da851800580cd520f7302bb0235ea45da218aa42 Mon Sep 17 00:00:00 2001 From: Kasper Birch Date: Sat, 31 Aug 2024 20:01:44 +0200 Subject: [PATCH 11/25] Add necessary args and mock to use the app in dpl-react storybook This should probably have been added earlier, but I started developing the app in the dapple setup. - Add `size` and `openingHoursSidebarBranchesConfig` to open the sidebar and see opening hours - Add opening hours today mock that takes the `from_date` and uses that for the opening hours so it always works - Update documentation with missing dotenv URL for CMS data --- ...-d25c69b9-da31-4c2a-bc7f-41739eb13e40.json | 21 +++++++++++++++++++ docs/request_mocking_wiremock.md | 1 + .../OpeningHoursSidebar.dev.tsx | 19 +++++++++++++++++ .../OpeningHoursSidebar.entry.tsx | 1 + .../OpeningHoursSidebarDetails.tsx | 4 +++- 5 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .docker/wiremock/cms/mappings/opening-hours-today-d25c69b9-da31-4c2a-bc7f-41739eb13e40.json diff --git a/.docker/wiremock/cms/mappings/opening-hours-today-d25c69b9-da31-4c2a-bc7f-41739eb13e40.json b/.docker/wiremock/cms/mappings/opening-hours-today-d25c69b9-da31-4c2a-bc7f-41739eb13e40.json new file mode 100644 index 0000000000..e23d3253d8 --- /dev/null +++ b/.docker/wiremock/cms/mappings/opening-hours-today-d25c69b9-da31-4c2a-bc7f-41739eb13e40.json @@ -0,0 +1,21 @@ +{ + "id" : "d25c69b9-da31-4c2a-bc7f-41739eb13e40", + "name" : "Opening hours today", + "request": { + "urlPattern": "/api/v1/opening_hours\\?from_date=.*&to_date=.*", + "method": "GET" + }, + "response": { + "status": 200, + "body": "[\n {\n \"id\": 12,\n \"category\": {\n \"title\": \"Åbent\",\n \"color\": \"#4986E7\"\n },\n \"date\": \"{{request.query.from_date}}\",\n \"start_time\": \"08:00\",\n \"end_time\": \"17:00\",\n \"branch_id\": 10,\n \"repetition\": {\n \"id\": 12,\n \"type\": \"none\"\n }\n },\n {\n \"id\": 20,\n \"category\": {\n \"title\": \"Borgerservice\",\n \"color\": \"#4986E7\"\n },\n \"date\": \"{{request.query.from_date}}\",\n \"start_time\": \"09:00\",\n \"end_time\": \"12:00\",\n \"branch_id\": 10,\n \"repetition\": {\n \"id\": 20,\n \"type\": \"none\"\n }\n },\n {\n \"id\": 21,\n \"category\": {\n \"title\": \"Selvbetjening\",\n \"color\": \"#4986E7\"\n },\n \"date\": \"{{request.query.from_date}}\",\n \"start_time\": \"06:00\",\n \"end_time\": \"22:00\",\n \"branch_id\": 10,\n \"repetition\": {\n \"id\": 21,\n \"type\": \"none\"\n }\n },\n {\n \"id\": 22,\n \"category\": {\n \"title\": \"Åbent\",\n \"color\": \"#4986E7\"\n },\n \"date\": \"{{request.query.from_date}}\",\n \"start_time\": \"08:00\",\n \"end_time\": \"16:00\",\n \"branch_id\": 12,\n \"repetition\": {\n \"id\": 22,\n \"type\": \"none\"\n }\n },\n {\n \"id\": 23,\n \"category\": {\n \"title\": \"Med betjening\",\n \"color\": \"#4986E7\"\n },\n \"date\": \"{{request.query.from_date}}\",\n \"start_time\": \"12:00\",\n \"end_time\": \"14:30\",\n \"branch_id\": 12,\n \"repetition\": {\n \"id\": 23,\n \"type\": \"none\"\n }\n },\n {\n \"id\": 24,\n \"category\": {\n \"title\": \"Åbent\",\n \"color\": \"#4986E7\"\n },\n \"date\": \"{{request.query.from_date}}\",\n \"start_time\": \"10:00\",\n \"end_time\": \"17:00\",\n \"branch_id\": 18,\n \"repetition\": {\n \"id\": 24,\n \"type\": \"none\"\n }\n }\n]", + "headers": { + "Content-Type": "application/json" + }, + "transformers": ["response-template"] + }, + "uuid": "eb4b441b-def3-438b-b473-02a068e30d3f", + "persistent": true, + "priority": 5, + "insertionIndex": 2, + "postServeActions": [] +} diff --git a/docs/request_mocking_wiremock.md b/docs/request_mocking_wiremock.md index dd6a861a45..3d76a7e5db 100644 --- a/docs/request_mocking_wiremock.md +++ b/docs/request_mocking_wiremock.md @@ -39,6 +39,7 @@ We use Wiremock through Docker based on the following setup: ```dotenv PUBLIZON_BASEURL=http://publizon-mock.docker` FBS_BASEURL=http://fbs-mock.docker` +CMS_BASEURL=http://cms-mock.docker ``` diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.dev.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.dev.tsx index 274444d16d..79a7e7d61f 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.dev.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.dev.tsx @@ -17,6 +17,25 @@ export default { name: "Opening hours today text", defaultValue: "Today (@toDayString)", control: { type: "text" } + }, + openingHoursSidebarLinkText: { + name: "Opening hours link text", + defaultValue: "See all opening hours", + control: { type: "text" } + }, + openingHoursSidebarBranchesConfig: { + name: "Opening hours sidebar branches", + defaultValue: + '[{"branch_id":"10","name":"Hovedbiblioteket","link":"/hovedbiblioteket","promoted":true},{"branch_id":"12","name":"Brønshøj Bibliotek","link":"/bronshoj-bibliotek","promoted":false},{"branch_id":"18","name":"Læsefilialen","link":"/laesefilialen","promoted":false},{"branch_id":"24","name":"Det virtuelle bibliotek","link":"/det-virtuelle-bibliotek","promoted":false}]', + control: { type: "text" } + }, + size: { + name: "Size", + defaultValue: "small", + control: { + type: "select", + options: ["small", "large"] + } } } } as ComponentMeta; diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx index 5cda832157..b2b8b89d88 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx @@ -9,6 +9,7 @@ import { withConfig } from "../../core/utils/config"; interface OpeningHoursClockEntryTextProps { openingHoursText: string; openingHoursSidebarTodayText: string; + openingHoursSidebarLinkText: string; } interface OpeningHoursClockEntryConfigProps { diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebarDetails.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebarDetails.tsx index 297136d421..d6bf1a25ca 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursSidebarDetails.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebarDetails.tsx @@ -1,9 +1,11 @@ import React, { FC } from "react"; import { LibraryType } from "./helper"; +import { useText } from "../../core/utils/text"; const OpeningHoursSidebarDetails: FC< Pick > = ({ openingHoursData, link }) => { + const t = useText(); return (
@@ -18,7 +20,7 @@ const OpeningHoursSidebarDetails: FC< ))}
- Se alle åbningstider + {t("openingHoursSidebarLinkText")}
); From 1784edc9e9db33e969c58a0dbd1f59b0bbe5225a Mon Sep 17 00:00:00 2001 From: Andreas Nielsen Date: Thu, 5 Sep 2024 13:43:51 +0200 Subject: [PATCH 12/25] Added new aria-label for the remove row button. The aria label also states which row number is being removed. --- src/apps/advanced-search/AdvancedSearch.dev.tsx | 5 +++++ src/apps/advanced-search/AdvancedSearch.entry.tsx | 1 + src/apps/advanced-search/AdvancedSearchRow.tsx | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/apps/advanced-search/AdvancedSearch.dev.tsx b/src/apps/advanced-search/AdvancedSearch.dev.tsx index 6970c1f5fc..8c0ac118f8 100644 --- a/src/apps/advanced-search/AdvancedSearch.dev.tsx +++ b/src/apps/advanced-search/AdvancedSearch.dev.tsx @@ -200,6 +200,11 @@ export default { defaultValue: "Add row", control: { type: "text" } }, + advancedSearchRemoveRowText: { + name: "Remove row", + defaultValue: "Remove row @inputNumber", + control: { type: "text" } + }, advancedSearchInputPlaceholderText: { name: "Advanced search input placeholder", defaultValue: "Search term", diff --git a/src/apps/advanced-search/AdvancedSearch.entry.tsx b/src/apps/advanced-search/AdvancedSearch.entry.tsx index 68c809a38c..41d4d0159a 100644 --- a/src/apps/advanced-search/AdvancedSearch.entry.tsx +++ b/src/apps/advanced-search/AdvancedSearch.entry.tsx @@ -66,6 +66,7 @@ interface AdvancedSearchEntryTextProps { advancedSearchFilterNonFictionText: string; advancedSearchFilterHoldingStatusText: string; advancedSearchInputLabelText: string; + advancedSearchRemoveRowText: string; } interface AdvancedSearchEntryConfigProps { diff --git a/src/apps/advanced-search/AdvancedSearchRow.tsx b/src/apps/advanced-search/AdvancedSearchRow.tsx index d0b7b3b6e6..48a77f22e4 100644 --- a/src/apps/advanced-search/AdvancedSearchRow.tsx +++ b/src/apps/advanced-search/AdvancedSearchRow.tsx @@ -168,6 +168,9 @@ const AdvancedSearchRow: React.FC = ({ onClick={() => { removeRow(rowIndex, setSearchObject); }} + aria-label={t("advancedSearchRemoveRowText", { + placeholders: { "@inputNumber": rowIndex + 1 } + })} > From 772f97aa7e4ac3aeddfa007f3efbdcb718e691cd Mon Sep 17 00:00:00 2001 From: Andreas Nielsen Date: Thu, 5 Sep 2024 14:13:01 +0200 Subject: [PATCH 13/25] Removed code to blockedModal that should not have been committed in the first place. --- .../blocked-patron/BlockedPatron.test.ts | 30 ++----------------- .../blocked-modal/BlockedModal.tsx | 15 ++-------- 2 files changed, 6 insertions(+), 39 deletions(-) diff --git a/src/components/blocked-patron/BlockedPatron.test.ts b/src/components/blocked-patron/BlockedPatron.test.ts index 2717c56e9c..7a0ee88a1d 100644 --- a/src/components/blocked-patron/BlockedPatron.test.ts +++ b/src/components/blocked-patron/BlockedPatron.test.ts @@ -28,9 +28,7 @@ describe("Patron page", () => { ] } }); - cy.visit( - "/iframe.html?path=/story/apps-loan-list--loan-list-entry&check_logged_in=1" - ); + cy.visit("/iframe.html?path=/story/apps-loan-list--loan-list-entry"); cy.getBySel("modal").should("exist"); cy.getBySel("modal").should("exist"); cy.getBySel("modal").get("h1").should("exist"); @@ -52,9 +50,7 @@ describe("Patron page", () => { ] } }); - cy.visit( - "/iframe.html?path=/story/apps-loan-list--loan-list-entry&check_logged_in=1" - ); + cy.visit("/iframe.html?path=/story/apps-loan-list--loan-list-entry"); cy.getBySel("modal").should("exist"); cy.getBySel("modal").get("h1").should("exist"); cy.getBySel("modal").get("p").should("exist"); @@ -75,32 +71,12 @@ describe("Patron page", () => { ] } }); - cy.visit( - "/iframe.html?path=/story/apps-loan-list--loan-list-entry&check_logged_in=1" - ); + cy.visit("/iframe.html?path=/story/apps-loan-list--loan-list-entry"); cy.getBySel("modal").should("exist"); cy.getBySel("modal").get("h1").should("exist"); cy.getBySel("modal").get("p").should("exist"); cy.getBySel("modal").get("a").should("not.exist"); }); - - // Blocked types: - // https://github.com/itk-dev/dpl-react/blob/develop/src/core/utils/types/BlockedTypes.ts - it("Patron blocked E - Do not show modal unless just logged in", () => { - cy.intercept("GET", "**/external/agencyid/patrons/patronid/v2**", { - patron: { - blockStatus: [ - { - blockedReason: "E", - blockedSince: "", - message: "" - } - ] - } - }); - cy.visit("/iframe.html?path=/story/apps-loan-list--loan-list-entry"); - cy.get(".modal").should("not.exist"); - }); }); export {}; diff --git a/src/components/blocked-patron/blocked-modal/BlockedModal.tsx b/src/components/blocked-patron/blocked-modal/BlockedModal.tsx index 21b8ffa7f5..bc21ccaa2c 100644 --- a/src/components/blocked-patron/blocked-modal/BlockedModal.tsx +++ b/src/components/blocked-patron/blocked-modal/BlockedModal.tsx @@ -1,4 +1,4 @@ -import React, { FC, useEffect, useState } from "react"; +import React, { FC } from "react"; import Modal from "../../../core/utils/modal"; import { useText } from "../../../core/utils/text"; import BlockedTypes from "../../../core/utils/types/BlockedTypes"; @@ -15,18 +15,9 @@ const BlockedModal: FC = ({ blockedStatus }) => { const u = useUrls(); const blockedPatronELinkUrl = u("blockedPatronELinkUrl", true); const { blockedModal } = getModalIds(); - const [isJustLoggedIn, setJustLoggedIn] = useState(false); - useEffect(() => { - const urlPrams = new URLSearchParams(window.location.search); - if (urlPrams.get("check_logged_in")) { - setJustLoggedIn(true); - } - }, []); - - // If the user isn't actually blocked, don't render the modal, - // and only showe the modal if the user has just logged in. - if (!blockedStatus || blockedStatus === "" || !isJustLoggedIn) { + // If the user isn't actually blocked, don't render the modal. + if (!blockedStatus || blockedStatus === "") { return null; } From bad6657771c9af7e39fff53b822c925923151ae0 Mon Sep 17 00:00:00 2001 From: Kasper Birch Date: Fri, 6 Sep 2024 13:46:18 +0200 Subject: [PATCH 14/25] Corrected text in `OpeningHoursSidebar` Refers to: [DDFHER-42](https://reload.atlassian.net/browse/DDFHER-42) --- .../OpeningHoursSidebar.dev.tsx | 12 ++++++------ .../OpeningHoursSidebar.entry.tsx | 2 +- .../OpeningHoursSidebarDetails.tsx | 10 +++++++--- .../OpeningHoursSidebarSidebar.tsx | 11 +++-------- 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.dev.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.dev.tsx index 79a7e7d61f..9121db06ee 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.dev.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.dev.tsx @@ -8,19 +8,19 @@ export default { component: OpeningHoursSidebar, argTypes: { ...serviceUrlArgs, + openingHoursSidebarTitleText: { + name: "Today's opening hours", + defaultValue: "Today's opening hours", + control: { type: "text" } + }, openingHoursText: { name: "Opening hours text", defaultValue: "Opening hours", control: { type: "text" } }, - openingHoursSidebarTodayText: { - name: "Opening hours today text", - defaultValue: "Today (@toDayString)", - control: { type: "text" } - }, openingHoursSidebarLinkText: { name: "Opening hours link text", - defaultValue: "See all opening hours", + defaultValue: "Go to @branchName", control: { type: "text" } }, openingHoursSidebarBranchesConfig: { diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx index b2b8b89d88..0cf8a8b81b 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.entry.tsx @@ -8,7 +8,7 @@ import { withConfig } from "../../core/utils/config"; interface OpeningHoursClockEntryTextProps { openingHoursText: string; - openingHoursSidebarTodayText: string; + openingHoursSidebarTitleText: string; openingHoursSidebarLinkText: string; } diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebarDetails.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebarDetails.tsx index d6bf1a25ca..040853a3d1 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursSidebarDetails.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebarDetails.tsx @@ -3,8 +3,8 @@ import { LibraryType } from "./helper"; import { useText } from "../../core/utils/text"; const OpeningHoursSidebarDetails: FC< - Pick -> = ({ openingHoursData, link }) => { + Pick +> = ({ openingHoursData, link, name }) => { const t = useText(); return ( ); diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx index c0707cff45..fbb4bd1b2a 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx @@ -16,15 +16,9 @@ const OpeningHoursSidebarSidebar: FC<{ libraries: LibraryType[] }> = ({

- {t("openingHoursText")} + {t("openingHoursSidebarTitleText")}

-

- {t("openingHoursSidebarTodayText", { - placeholders: { - "@toDayString": toDayString() - } - })} -

+

{toDayString()}

@@ -40,6 +34,7 @@ const OpeningHoursSidebarSidebar: FC<{ libraries: LibraryType[] }> = ({
))} From 3b42a46acf6a2f25514423dc80efdf27b86b9d0c Mon Sep 17 00:00:00 2001 From: Kasper Birch Date: Mon, 9 Sep 2024 15:26:16 +0200 Subject: [PATCH 15/25] Change name from `SidebarSidebar` to `SidebarContent` --- src/apps/opening-hours-sidebar/OpeningHoursSidebar.tsx | 4 ++-- ...HoursSidebarSidebar.tsx => OpeningHoursSidebarContent.tsx} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename src/apps/opening-hours-sidebar/{OpeningHoursSidebarSidebar.tsx => OpeningHoursSidebarContent.tsx} (93%) diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.tsx index 19744d50fa..05f34bb26b 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursSidebar.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebar.tsx @@ -1,6 +1,6 @@ import React, { FC } from "react"; import useDialog from "../../components/dialog/useDialog"; -import OpeningHoursSidebarSidebar from "./OpeningHoursSidebarSidebar"; +import OpeningHoursSidebarContent from "./OpeningHoursSidebarContent"; import OpeningHoursSidebarButtonLarge from "./OpeningHoursSidebarButtonLarge"; import OpeningHoursSidebarButtonSmall from "./OpeningHoursSidebarButtonSmall"; import Dialog from "../../components/dialog/Dialog"; @@ -17,7 +17,7 @@ const OpeningHoursSidebar: FC = ({ size }) => { const { libraries } = useOpeningHoursSidebar(); const openDialog = () => - openDialogWithContent(); + openDialogWithContent(); return ( <> diff --git a/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx b/src/apps/opening-hours-sidebar/OpeningHoursSidebarContent.tsx similarity index 93% rename from src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx rename to src/apps/opening-hours-sidebar/OpeningHoursSidebarContent.tsx index fbb4bd1b2a..b6a174309d 100644 --- a/src/apps/opening-hours-sidebar/OpeningHoursSidebarSidebar.tsx +++ b/src/apps/opening-hours-sidebar/OpeningHoursSidebarContent.tsx @@ -6,7 +6,7 @@ import OpeningHoursSidebarDetails from "./OpeningHoursSidebarDetails"; import { LibraryType, toDayString } from "./helper"; import { useText } from "../../core/utils/text"; -const OpeningHoursSidebarSidebar: FC<{ libraries: LibraryType[] }> = ({ +const OpeningHoursSidebarContent: FC<{ libraries: LibraryType[] }> = ({ libraries }) => { const t = useText(); @@ -42,4 +42,4 @@ const OpeningHoursSidebarSidebar: FC<{ libraries: LibraryType[] }> = ({ ); }; -export default OpeningHoursSidebarSidebar; +export default OpeningHoursSidebarContent; From a4a6b61be53bd31af5cbf2e64b844c740963b17c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Sep 2024 23:19:25 +0000 Subject: [PATCH 16/25] Bump dset from 3.1.2 to 3.1.4 Bumps [dset](https://github.com/lukeed/dset) from 3.1.2 to 3.1.4. - [Release notes](https://github.com/lukeed/dset/releases) - [Commits](https://github.com/lukeed/dset/compare/v3.1.2...v3.1.4) --- updated-dependencies: - dependency-name: dset dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index 67b0a344ea..dfcd298cf4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8963,9 +8963,9 @@ downshift@8.5.0: tslib "^2.6.2" dset@^3.1.0: - version "3.1.2" - resolved "https://registry.npmjs.org/dset/-/dset-3.1.2.tgz" - integrity sha512-g/M9sqy3oHe477Ar4voQxWtaPIFw1jTdKZuomOjhCcBx9nHUNn0pu6NopuFFrTh/TRZIKEj+76vLWFu9BNKk+Q== + version "3.1.4" + resolved "https://registry.yarnpkg.com/dset/-/dset-3.1.4.tgz#f8eaf5f023f068a036d08cd07dc9ffb7d0065248" + integrity sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA== duplexer2@^0.1.2, duplexer2@~0.1.0, duplexer2@~0.1.2: version "0.1.4" @@ -18055,7 +18055,7 @@ string-env-interpolation@1.0.1, string-env-interpolation@^1.0.1: resolved "https://registry.npmjs.org/string-env-interpolation/-/string-env-interpolation-1.0.1.tgz" integrity sha512-78lwMoCcn0nNu8LszbP1UA7g55OeE4v7rCeWnM5B453rnNr4aq+5it3FEYtZrSEiMvHZOZ9Jlqb0OD0M2VInqg== -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -18081,6 +18081,15 @@ string-width@^1.0.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^3.0.0, string-width@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz" @@ -18244,7 +18253,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -18272,6 +18281,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2" @@ -20320,7 +20336,7 @@ worker-rpc@^0.1.0: dependencies: microevent.ts "~0.1.1" -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -20355,6 +20371,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From 2e02bdbf838a65e1db75d702721b763148cde8fd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Sep 2024 12:13:50 +0000 Subject: [PATCH 17/25] Bump express from 4.19.2 to 4.21.0 Bumps [express](https://github.com/expressjs/express) from 4.19.2 to 4.21.0. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md) - [Commits](https://github.com/expressjs/express/compare/4.19.2...4.21.0) --- updated-dependencies: - dependency-name: express dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 93 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 49 insertions(+), 44 deletions(-) diff --git a/yarn.lock b/yarn.lock index dfcd298cf4..aeb864c22e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6623,10 +6623,10 @@ bn.js@^5.0.0, bn.js@^5.2.1: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== -body-parser@1.20.2: - version "1.20.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" - integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== +body-parser@1.20.3: + version "1.20.3" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.3.tgz#1953431221c6fb5cd63c4b36d53fab0928e548c6" + integrity sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g== dependencies: bytes "3.1.2" content-type "~1.0.5" @@ -6636,7 +6636,7 @@ body-parser@1.20.2: http-errors "2.0.0" iconv-lite "0.4.24" on-finished "2.4.1" - qs "6.11.0" + qs "6.13.0" raw-body "2.5.2" type-is "~1.6.18" unpipe "1.0.0" @@ -9086,6 +9086,11 @@ encodeurl@~1.0.2: resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= +encodeurl@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" + integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg== + end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz" @@ -9994,36 +9999,36 @@ expand-brackets@^2.1.4: to-regex "^3.0.1" express@^4.17.1: - version "4.19.2" - resolved "https://registry.yarnpkg.com/express/-/express-4.19.2.tgz#e25437827a3aa7f2a827bc8171bbbb664a356465" - integrity sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q== + version "4.21.0" + resolved "https://registry.yarnpkg.com/express/-/express-4.21.0.tgz#d57cb706d49623d4ac27833f1cbc466b668eb915" + integrity sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng== dependencies: accepts "~1.3.8" array-flatten "1.1.1" - body-parser "1.20.2" + body-parser "1.20.3" content-disposition "0.5.4" content-type "~1.0.4" cookie "0.6.0" cookie-signature "1.0.6" debug "2.6.9" depd "2.0.0" - encodeurl "~1.0.2" + encodeurl "~2.0.0" escape-html "~1.0.3" etag "~1.8.1" - finalhandler "1.2.0" + finalhandler "1.3.1" fresh "0.5.2" http-errors "2.0.0" - merge-descriptors "1.0.1" + merge-descriptors "1.0.3" methods "~1.1.2" on-finished "2.4.1" parseurl "~1.3.3" - path-to-regexp "0.1.7" + path-to-regexp "0.1.10" proxy-addr "~2.0.7" - qs "6.11.0" + qs "6.13.0" range-parser "~1.2.1" safe-buffer "5.2.1" - send "0.18.0" - serve-static "1.15.0" + send "0.19.0" + serve-static "1.16.2" setprototypeof "1.2.0" statuses "2.0.1" type-is "~1.6.18" @@ -10319,13 +10324,13 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -finalhandler@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" - integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== +finalhandler@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.3.1.tgz#0c575f1d1d324ddd1da35ad7ece3df7d19088019" + integrity sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ== dependencies: debug "2.6.9" - encodeurl "~1.0.2" + encodeurl "~2.0.0" escape-html "~1.0.3" on-finished "2.4.1" parseurl "~1.3.3" @@ -13861,10 +13866,10 @@ meow@^3.1.0: redent "^1.0.0" trim-newlines "^1.0.0" -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= +merge-descriptors@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz#d80319a65f3c7935351e5cfdac8f9318504dbed5" + integrity sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ== merge-stream@^2.0.0: version "2.0.0" @@ -15338,10 +15343,10 @@ path-scurry@^1.11.1: lru-cache "^10.2.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= +path-to-regexp@0.1.10: + version "0.1.10" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.10.tgz#67e9108c5c0551b9e5326064387de4763c4d5f8b" + integrity sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w== path-type@^1.0.0: version "1.1.0" @@ -16141,12 +16146,12 @@ punycode@^2.1.1: resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -qs@6.11.0: - version "6.11.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== +qs@6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" + integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== dependencies: - side-channel "^1.0.4" + side-channel "^1.0.6" qs@^6.10.0: version "6.10.3" @@ -17349,10 +17354,10 @@ semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.5.3, semver@^7.5.4, semve dependencies: lru-cache "^6.0.0" -send@0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" - integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== +send@0.19.0: + version "0.19.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" + integrity sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw== dependencies: debug "2.6.9" depd "2.0.0" @@ -17409,15 +17414,15 @@ serve-favicon@^2.5.0: parseurl "~1.3.2" safe-buffer "5.1.1" -serve-static@1.15.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" - integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== +serve-static@1.16.2: + version "1.16.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296" + integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw== dependencies: - encodeurl "~1.0.2" + encodeurl "~2.0.0" escape-html "~1.0.3" parseurl "~1.3.3" - send "0.18.0" + send "0.19.0" set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" From ac6a0eb66b856bf03c6bbc506bd3a032e538812e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 01:32:26 +0000 Subject: [PATCH 18/25] Bump postcss from 8.4.45 to 8.4.47 Bumps [postcss](https://github.com/postcss/postcss) from 8.4.45 to 8.4.47. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.4.45...8.4.47) --- updated-dependencies: - dependency-name: postcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 4 ++-- yarn.lock | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index ad084ba718..6c39f0a87b 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "mutationobserver-shim": "^0.3.7", "nyc": "^17.0.0", "orval": "^6.26.0", - "postcss": "^8.4.45", + "postcss": "^8.4.47", "postcss-cli": "^11.0.0", "postcss-loader": "^8.1.1", "postcss-scss": "^4.0.9", @@ -176,6 +176,6 @@ "unfetch": "^4.2.0" }, "peerDependencies": { - "postcss": "^8.4.45" + "postcss": "^8.4.47" } } diff --git a/yarn.lock b/yarn.lock index dfcd298cf4..0d3cdb4017 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15405,10 +15405,10 @@ picocolors@^0.2.1: resolved "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz" integrity sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA== -picocolors@^1.0.0, picocolors@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1" - integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew== +picocolors@^1.0.0, picocolors@^1.0.1, picocolors@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" + integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw== picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.0, picomatch@^2.3.1: version "2.3.1" @@ -15892,14 +15892,14 @@ postcss@^7.0.14, postcss@^7.0.16, postcss@^7.0.26, postcss@^7.0.32, postcss@^7.0 picocolors "^0.2.1" source-map "^0.6.1" -postcss@^8.2.15, postcss@^8.4.21, postcss@^8.4.28, postcss@^8.4.33, postcss@^8.4.45: - version "8.4.45" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.45.tgz#538d13d89a16ef71edbf75d895284ae06b79e603" - integrity sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q== +postcss@^8.2.15, postcss@^8.4.21, postcss@^8.4.28, postcss@^8.4.33, postcss@^8.4.47: + version "8.4.47" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.47.tgz#5bf6c9a010f3e724c503bf03ef7947dcb0fea365" + integrity sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ== dependencies: nanoid "^3.3.7" - picocolors "^1.0.1" - source-map-js "^1.2.0" + picocolors "^1.1.0" + source-map-js "^1.2.1" preact@~10.12.1: version "10.12.1" @@ -17743,10 +17743,10 @@ source-list-map@^2.0.0: resolved "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== -"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.1, source-map-js@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" - integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== +"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.1, source-map-js@^1.2.0, source-map-js@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" + integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== source-map-resolve@^0.5.0: version "0.5.2" From 2048b494b5bb5d68a9e5fe94e41f4b1760b9352c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 01:32:35 +0000 Subject: [PATCH 19/25] Bump @cypress/code-coverage from 3.12.47 to 3.12.48 Bumps [@cypress/code-coverage](https://github.com/cypress-io/code-coverage) from 3.12.47 to 3.12.48. - [Release notes](https://github.com/cypress-io/code-coverage/releases) - [Changelog](https://github.com/cypress-io/code-coverage/blob/master/.releaserc) - [Commits](https://github.com/cypress-io/code-coverage/compare/v3.12.47...v3.12.48) --- updated-dependencies: - dependency-name: "@cypress/code-coverage" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 27 +++++++++++---------------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index ad084ba718..564fb40392 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@babel/preset-typescript": "^7.24.7", "@csstools/postcss-sass": "^5.1.1", "@cypress/browserify-preprocessor": "^3.0.2", - "@cypress/code-coverage": "^3.12.47", + "@cypress/code-coverage": "^3.12.48", "@graphql-codegen/add": "^3.1.1", "@graphql-codegen/cli": "^2.6.2", "@graphql-codegen/introspection": "^2.1.1", diff --git a/yarn.lock b/yarn.lock index dfcd298cf4..8ede08af71 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1632,15 +1632,15 @@ through2 "^2.0.0" watchify "^4.0.0" -"@cypress/code-coverage@^3.12.47": - version "3.12.47" - resolved "https://registry.yarnpkg.com/@cypress/code-coverage/-/code-coverage-3.12.47.tgz#fc071c34351de524d9dbd53858dd602e413dc6e0" - integrity sha512-ianeOSqg2NyAIxrY8sxsGDPKe6XBk2EoCXTmrSIqr9cVJn2qWBvIPnyd6O/IG9MGdWhMGeyophpUb57ZZAfpBA== +"@cypress/code-coverage@^3.12.48": + version "3.12.48" + resolved "https://registry.yarnpkg.com/@cypress/code-coverage/-/code-coverage-3.12.48.tgz#f962a14deb7a9357d5bae78c470bd637ed812e4e" + integrity sha512-Vr9CzmcI+Cx+a1x2lZW9S/pQiHkVoCWwKj2l3sPB4EcEztBDIpXCEMdAiYqrmAfpGwot3scJwW2y1HYxUec0fg== dependencies: "@cypress/webpack-preprocessor" "^6.0.0" chalk "4.1.2" dayjs "1.11.13" - debug "4.3.6" + debug "4.3.7" execa "4.1.0" globby "11.1.0" istanbul-lib-coverage "^3.0.0" @@ -8467,12 +8467,12 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0: dependencies: ms "2.0.0" -debug@4, debug@4.3.6, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5: - version "4.3.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" - integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== +debug@4, debug@4.3.7, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5: + version "4.3.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== dependencies: - ms "2.1.2" + ms "^2.1.3" debug@^3.0.0, debug@^3.1.0, debug@^3.2.7: version "3.2.7" @@ -14202,12 +14202,7 @@ ms@2.1.1: resolved "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@2.1.3, ms@^2.1.1: +ms@2.1.3, ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== From 00d1bf5527e8bc99471c4bae20b93d96d75d1bf5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 01:32:51 +0000 Subject: [PATCH 20/25] Bump eslint-plugin-react from 7.35.2 to 7.36.1 Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.35.2 to 7.36.1. - [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases) - [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md) - [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.35.2...v7.36.1) --- updated-dependencies: - dependency-name: eslint-plugin-react dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ad084ba718..14ca040043 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "eslint-plugin-jsx-a11y": "^6.5.1", "eslint-plugin-no-only-tests": "^3.3.0", "eslint-plugin-prettier": "^4.0.0", - "eslint-plugin-react": "^7.35.2", + "eslint-plugin-react": "^7.36.1", "eslint-plugin-react-hooks": "^4.6.2", "eslint-webpack-plugin": "^4.2.0", "glob": "^8.0.1", diff --git a/yarn.lock b/yarn.lock index dfcd298cf4..8e415616c2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9722,10 +9722,10 @@ eslint-plugin-react-hooks@^4.6.2: resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz#c829eb06c0e6f484b3fbb85a97e57784f328c596" integrity sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ== -eslint-plugin-react@^7.35.2: - version "7.35.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.35.2.tgz#d32500d3ec268656d5071918bfec78cfd8b070ed" - integrity sha512-Rbj2R9zwP2GYNcIak4xoAMV57hrBh3hTaR0k7hVjwCQgryE/pw5px4b13EYjduOI0hfXyZhwBxaGpOTbWSGzKQ== +eslint-plugin-react@^7.36.1: + version "7.36.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.36.1.tgz#f1dabbb11f3d4ebe8b0cf4e54aff4aee81144ee5" + integrity sha512-/qwbqNXZoq+VP30s1d4Nc1C5GTxjJQjk4Jzs4Wq2qzxFM7dSmuG2UkIjg2USMLh3A/aVcUNrK7v0J5U1XEGGwA== dependencies: array-includes "^3.1.8" array.prototype.findlast "^1.2.5" From 0c4b0f571e09358f405a2a44cb480ac69dc46126 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 01:32:59 +0000 Subject: [PATCH 21/25] Bump stylelint-scss from 6.5.1 to 6.6.0 Bumps [stylelint-scss](https://github.com/stylelint-scss/stylelint-scss) from 6.5.1 to 6.6.0. - [Release notes](https://github.com/stylelint-scss/stylelint-scss/releases) - [Changelog](https://github.com/stylelint-scss/stylelint-scss/blob/master/CHANGELOG.md) - [Commits](https://github.com/stylelint-scss/stylelint-scss/compare/v6.5.1...v6.6.0) --- updated-dependencies: - dependency-name: stylelint-scss dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index ad084ba718..ed39a1fd2f 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "stylelint-config-prettier": "^9.0.5", "stylelint-config-recommended-scss": "^6.0.0", "stylelint-prettier": "^2.0.0", - "stylelint-scss": "^6.5.1", + "stylelint-scss": "^6.6.0", "stylelint-webpack-plugin": "^5.0.1", "svg-url-loader": "^8.0.0", "ts-node": "^10.9.2", diff --git a/yarn.lock b/yarn.lock index dfcd298cf4..df46a8f61a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15841,7 +15841,7 @@ postcss-resolve-nested-selector@0.1.1: resolved "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz" integrity sha1-Kcy8fDfe36wwTp//C/FZaz9qDk4= -postcss-resolve-nested-selector@^0.1.1, postcss-resolve-nested-selector@^0.1.4: +postcss-resolve-nested-selector@^0.1.1, postcss-resolve-nested-selector@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.6.tgz#3d84dec809f34de020372c41b039956966896686" integrity sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw== @@ -15856,7 +15856,7 @@ postcss-scss@^4.0.2, postcss-scss@^4.0.9: resolved "https://registry.yarnpkg.com/postcss-scss/-/postcss-scss-4.0.9.tgz#a03c773cd4c9623cb04ce142a52afcec74806685" integrity sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A== -postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.13, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.6, postcss-selector-parser@^6.1.1, postcss-selector-parser@^6.1.2: +postcss-selector-parser@^6.0.0, postcss-selector-parser@^6.0.13, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.6, postcss-selector-parser@^6.1.2: version "6.1.2" resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz#27ecb41fb0e3b6ba7a1ec84fff347f734c7929de" integrity sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg== @@ -18443,17 +18443,17 @@ stylelint-scss@^4.0.0: postcss-selector-parser "^6.0.6" postcss-value-parser "^4.1.0" -stylelint-scss@^6.5.1: - version "6.5.1" - resolved "https://registry.yarnpkg.com/stylelint-scss/-/stylelint-scss-6.5.1.tgz#bcb6a4ada71a0adbf181e155548e5f25ee4aeece" - integrity sha512-ZLqdqihm6uDYkrsOeD6YWb+stZI8Wn92kUNDhE4M+g9g1aCnRv0JlOrttFiAJJwaNzpdQgX3YJb5vDQXVuO9Ww== +stylelint-scss@^6.6.0: + version "6.6.0" + resolved "https://registry.yarnpkg.com/stylelint-scss/-/stylelint-scss-6.6.0.tgz#065626b152466df0167d09ee45b85f7ca4076f15" + integrity sha512-aK2Rdt41Jt9Gv/ClMN5BYhP7xR3IEoRMDKpJkIDI9frZQ6KkxeLishusxs2JtEGZdJWXvPoBOhswNxj3gx8L/g== dependencies: css-tree "2.3.1" is-plain-object "5.0.0" known-css-properties "^0.34.0" postcss-media-query-parser "^0.2.3" - postcss-resolve-nested-selector "^0.1.4" - postcss-selector-parser "^6.1.1" + postcss-resolve-nested-selector "^0.1.6" + postcss-selector-parser "^6.1.2" postcss-value-parser "^4.2.0" stylelint-webpack-plugin@^5.0.1: From fb917199022851dc2e4cfad68e385b24d1484ba7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 01:33:09 +0000 Subject: [PATCH 22/25] Bump caniuse-lite from 1.0.30001658 to 1.0.30001660 Bumps [caniuse-lite](https://github.com/browserslist/caniuse-lite) from 1.0.30001658 to 1.0.30001660. - [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001658...1.0.30001660) --- updated-dependencies: - dependency-name: caniuse-lite dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ad084ba718..b276ea2ea6 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "babel-plugin-istanbul": "^7.0.0", "babel-plugin-lodash": "^3.3.4", "babel-plugin-transform-react-remove-prop-types": "^0.4.24", - "caniuse-lite": "^1.0.30001658", + "caniuse-lite": "^1.0.30001660", "change-case-all": "^2.1.0", "chokidar-cli": "^3.0.0", "concurrently": "^9.0.0", diff --git a/yarn.lock b/yarn.lock index dfcd298cf4..1d9ee1b8de 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7208,10 +7208,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001646, caniuse-lite@^1.0.30001658: - version "1.0.30001658" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001658.tgz#b5f7be8ac748a049ab06aa1cf7a1408d83f074ec" - integrity sha512-N2YVqWbJELVdrnsW5p+apoQyYt51aBMSsBZki1XZEfeBCexcM/sf4xiAHcXQBkuOwJBXtWF7aW1sYX6tKebPHw== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001646, caniuse-lite@^1.0.30001660: + version "1.0.30001660" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001660.tgz#31218de3463fabb44d0b7607b652e56edf2e2355" + integrity sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg== capital-case@^1.0.4: version "1.0.4" From 15ceae9680d6d61fadb8d0c84ff42e03ac632e37 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 01:33:17 +0000 Subject: [PATCH 23/25] Bump concurrently from 9.0.0 to 9.0.1 Bumps [concurrently](https://github.com/open-cli-tools/concurrently) from 9.0.0 to 9.0.1. - [Release notes](https://github.com/open-cli-tools/concurrently/releases) - [Commits](https://github.com/open-cli-tools/concurrently/compare/v9.0.0...v9.0.1) --- updated-dependencies: - dependency-name: concurrently dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ad084ba718..e1e847b4a2 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "caniuse-lite": "^1.0.30001658", "change-case-all": "^2.1.0", "chokidar-cli": "^3.0.0", - "concurrently": "^9.0.0", + "concurrently": "^9.0.1", "core-js": "^3.38.1", "css-loader": "^7.1.2", "cssnano": "^7.0.6", diff --git a/yarn.lock b/yarn.lock index dfcd298cf4..490f40afbf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7811,10 +7811,10 @@ concat-stream@^1.5.0, concat-stream@^1.6.0, concat-stream@^1.6.1, concat-stream@ readable-stream "^2.2.2" typedarray "^0.0.6" -concurrently@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-9.0.0.tgz#b74e85bfbed9b920c54128f8cf7f91f23cc19112" - integrity sha512-iAxbsDeUkn8E/4+QalT7T3WvlyTfmsoez+19lbbcsxZdOEMfBukd8LA30KYez2UR5xkKFzbcqXIZy5RisCbaxw== +concurrently@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-9.0.1.tgz#01e171bf6c7af0c022eb85daef95bff04d8185aa" + integrity sha512-wYKvCd/f54sTXJMSfV6Ln/B8UrfLBKOYa+lzc6CHay3Qek+LorVSBdMVfyewFhRbH0Rbabsk4D+3PL/VjQ5gzg== dependencies: chalk "^4.1.2" lodash "^4.17.21" From fdfd93297d1d710b9da238a77c9edb7ae046405c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 07:03:30 +0000 Subject: [PATCH 24/25] Bump @vitest/coverage-istanbul from 2.0.5 to 2.1.1 Bumps [@vitest/coverage-istanbul](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-istanbul) from 2.0.5 to 2.1.1. - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Commits](https://github.com/vitest-dev/vitest/commits/v2.1.1/packages/coverage-istanbul) --- updated-dependencies: - dependency-name: "@vitest/coverage-istanbul" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 2b4d8007bd..afeed4b2d3 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "@types/react-redux": "^7.1.24", "@typescript-eslint/eslint-plugin": "^5.23.0", "@typescript-eslint/parser": "^7.16.0", - "@vitest/coverage-istanbul": "^2.0.5", + "@vitest/coverage-istanbul": "^2.1.1", "autoprefixer": "^10.4.20", "babel-loader": "^9.1.3", "babel-plugin-istanbul": "^7.0.0", diff --git a/yarn.lock b/yarn.lock index 09eccb6625..2c0d923355 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5203,13 +5203,13 @@ resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== -"@vitest/coverage-istanbul@^2.0.5": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@vitest/coverage-istanbul/-/coverage-istanbul-2.0.5.tgz#18a335813e1ad96b163c908cfa7af62dcf87c5b5" - integrity sha512-BvjWKtp7fiMAeYUD0mO5cuADzn1gmjTm54jm5qUEnh/O08riczun8rI4EtQlg3bWoRo2lT3FO8DmjPDX9ZthPw== +"@vitest/coverage-istanbul@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@vitest/coverage-istanbul/-/coverage-istanbul-2.1.1.tgz#11950fea0bff2628f3c278e2dac338e4af69c521" + integrity sha512-ZQM8uLinwmhmLp49fxLxIM46nC7NisCbaiydcQoV1hLvQfFL92Gg3tInRvowZyV78G0IknjN10JzH7oqPlPjZw== dependencies: "@istanbuljs/schema" "^0.1.3" - debug "^4.3.5" + debug "^4.3.6" istanbul-lib-coverage "^3.2.2" istanbul-lib-instrument "^6.0.3" istanbul-lib-report "^3.0.1" @@ -8467,7 +8467,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0: dependencies: ms "2.0.0" -debug@4, debug@4.3.7, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5: +debug@4, debug@4.3.7, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.6: version "4.3.7" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== From 596a215ca8adf23b74abdfc949b995f28d63d458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Garn=C3=A6s?= Date: Tue, 17 Sep 2024 20:36:39 +0200 Subject: [PATCH 25/25] Use release 2024.38.0 of design system --- package.json | 2 +- yarn.lock | 39 +++++++-------------------------------- 2 files changed, 8 insertions(+), 33 deletions(-) diff --git a/package.json b/package.json index afeed4b2d3..a650fd7e49 100644 --- a/package.json +++ b/package.json @@ -145,7 +145,7 @@ "prop-types": "Since we use former ddb-react components that depend on prop-types we keep this. Should be removed when usage of prop-types is deprecated." }, "dependencies": { - "@danskernesdigitalebibliotek/dpl-design-system": "^2024.37.0-d007a043185fe27649dc16ba7d4996eab9ee1caf", + "@danskernesdigitalebibliotek/dpl-design-system": "^2024.38.0-0dbeffee4f1a1dce73311d4744a9bf02acceeeb1", "@fullcalendar/core": "^6.1.15", "@fullcalendar/daygrid": "^6.1.15", "@fullcalendar/interaction": "^6.1.15", diff --git a/yarn.lock b/yarn.lock index e80ca7d944..b05a972ff8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1688,10 +1688,10 @@ debug "^3.1.0" lodash.once "^4.1.1" -"@danskernesdigitalebibliotek/dpl-design-system@^2024.37.0-d007a043185fe27649dc16ba7d4996eab9ee1caf": - version "2024.37.0-d007a043185fe27649dc16ba7d4996eab9ee1caf" - resolved "https://npm.pkg.github.com/download/@danskernesdigitalebibliotek/dpl-design-system/2024.37.0-d007a043185fe27649dc16ba7d4996eab9ee1caf/cfccb64463628af68609995d38f1c787a4c68358#cfccb64463628af68609995d38f1c787a4c68358" - integrity sha512-jUmeqghVDeKchRXNHf9PsViwiGpiawF8eMYVJ4ugEDJRa2X8ubazChlI/MrW4O5O3nHIVIdxvbW1C6FRnATQ7w== +"@danskernesdigitalebibliotek/dpl-design-system@^2024.38.0-0dbeffee4f1a1dce73311d4744a9bf02acceeeb1": + version "2024.38.0-0dbeffee4f1a1dce73311d4744a9bf02acceeeb1" + resolved "https://npm.pkg.github.com/download/@danskernesdigitalebibliotek/dpl-design-system/2024.38.0-0dbeffee4f1a1dce73311d4744a9bf02acceeeb1/2ab697e3935b4d0a4161333359bacd45e041bb84#2ab697e3935b4d0a4161333359bacd45e041bb84" + integrity sha512-/Ub3iTyL0FgapnmfnvTClg0euC7bjxPaKJ2lNA3bPBZptWwoyhAXr6OXFQnSpzMTWP6sh2cxLW30FEZtcauodA== "@discoveryjs/json-ext@^0.5.0", "@discoveryjs/json-ext@^0.5.3": version "0.5.7" @@ -18055,7 +18055,7 @@ string-env-interpolation@1.0.1, string-env-interpolation@^1.0.1: resolved "https://registry.npmjs.org/string-env-interpolation/-/string-env-interpolation-1.0.1.tgz" integrity sha512-78lwMoCcn0nNu8LszbP1UA7g55OeE4v7rCeWnM5B453rnNr4aq+5it3FEYtZrSEiMvHZOZ9Jlqb0OD0M2VInqg== -"string-width-cjs@npm:string-width@^4.2.0": +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -18081,15 +18081,6 @@ string-width@^1.0.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - string-width@^3.0.0, string-width@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz" @@ -18253,7 +18244,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -18281,13 +18272,6 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-ansi@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2" @@ -20336,7 +20320,7 @@ worker-rpc@^0.1.0: dependencies: microevent.ts "~0.1.1" -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -20371,15 +20355,6 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"