Skip to content

Commit

Permalink
Merge pull request #825 from danskernesdigitalebibliotek/release/2024…
Browse files Browse the repository at this point in the history
…-1-0_with-develop

Release/2024 1 0 with develop
  • Loading branch information
spaceo authored Jan 2, 2024
2 parents 7a4cb1e + adc9a67 commit 71c8fc7
Show file tree
Hide file tree
Showing 60 changed files with 892 additions and 813 deletions.
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@
"post-process-generated-graphql": "ts-node ./scripts/post-process-generated-graphql.ts"
},
"devDependencies": {
"@babel/core": "^7.23.6",
"@babel/core": "^7.23.7",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
"@babel/preset-env": "^7.23.6",
"@babel/preset-env": "^7.23.7",
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@csstools/postcss-sass": "^5.0.1",
"@csstools/postcss-sass": "^5.1.1",
"@cypress/browserify-preprocessor": "^3.0.2",
"@cypress/code-coverage": "^3.12.14",
"@cypress/code-coverage": "^3.12.15",
"@graphql-codegen/add": "^3.1.1",
"@graphql-codegen/cli": "^2.6.2",
"@graphql-codegen/introspection": "^2.1.1",
Expand All @@ -75,24 +75,24 @@
"@testing-library/react": "^14.1.2",
"@testing-library/react-hooks": "^8.0.1",
"@tsconfig/create-react-app": "^1.0.2",
"@types/node": "^20.10.5",
"@types/react": "^18.2.45",
"@types/react-dom": "^18.2.17",
"@types/node": "^20.10.6",
"@types/react": "^18.2.46",
"@types/react-dom": "^18.2.18",
"@types/react-redux": "^7.1.24",
"@typescript-eslint/eslint-plugin": "^5.23.0",
"@typescript-eslint/parser": "^6.14.0",
"@vitest/coverage-istanbul": "^1.0.4",
"@typescript-eslint/parser": "^6.16.0",
"@vitest/coverage-istanbul": "^1.1.1",
"autoprefixer": "^10.4.16",
"babel-loader": "^9.1.3",
"babel-plugin-istanbul": "^6.1.1",
"babel-plugin-lodash": "^3.3.4",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"caniuse-lite": "^1.0.30001570",
"caniuse-lite": "^1.0.30001572",
"chokidar-cli": "^3.0.0",
"concurrently": "^8.2.2",
"core-js": "^3.34.0",
"core-js": "^3.35.0",
"css-loader": "^6.8.1",
"cssnano": "^6.0.1",
"cssnano": "^6.0.2",
"cypress": "^9.6.1",
"dotenv": "^16.3.1",
"eslint": "^8.56.0",
Expand All @@ -101,7 +101,7 @@
"eslint-config-prettier": "^9.1.0",
"eslint-loader": "^4.0.2",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-prettier": "^4.0.0",
Expand All @@ -117,11 +117,11 @@
"orval": "^6.8.1",
"postcss": "^8.4.32",
"postcss-cli": "^11.0.0",
"postcss-loader": "^7.3.3",
"postcss-loader": "^7.3.4",
"postcss-scss": "^4.0.9",
"prettier": "^2.6.2",
"replace-in-file": "^6.3.2",
"sass": "^1.69.5",
"sass": "^1.69.6",
"source-map-support": "^0.5.21",
"style-loader": "^3.3.3",
"stylelint": "^15.11.0",
Expand All @@ -148,7 +148,7 @@
"@reach/dialog": "^0.18.0",
"@reduxjs/toolkit": "^1.9.7",
"@types/lodash": "^4.14.202",
"clsx": "^2.0.0",
"clsx": "^2.1.0",
"dayjs": "^1.11.10",
"downshift": "^6.1.7",
"focus-trap-react": "^10.2.3",
Expand Down
29 changes: 2 additions & 27 deletions src/apps/advanced-search/AdvancedSearch.dev.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ComponentMeta, ComponentStory } from "@storybook/react";
import React from "react";
import serviceUrlArgs from "../../core/storybook/serviceUrlArgs";
import globalTextArgs from "../../core/storybook/globalTextArgs";
import AdvancedSearchEntry, {
AdvancedSearchEntryProps
} from "./AdvancedSearch.entry";
Expand All @@ -10,6 +11,7 @@ export default {
component: AdvancedSearchEntry,
argTypes: {
...serviceUrlArgs,
...globalTextArgs,
pageSizeDesktop: {
name: "Number of search result items on desktop",
defaultValue: 50,
Expand Down Expand Up @@ -96,28 +98,6 @@ export default {
'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',
control: { type: "text" }
},
addToFavoritesAriaLabelText: {
control: {
type: "text"
},
defaultValue: "Add @title to favorites list"
},
removeFromFavoritesAriaLabelText: {
control: {
type: "text"
},
defaultValue: "Remove @title from favorites list"
},
alertErrorCloseText: {
name: "Alert error close text",
defaultValue: "close",
control: { type: "text" }
},
alertErrorMessageText: {
name: "Alert error message text",
defaultValue: "An error occurred",
control: { type: "text" }
},
loadingText: {
name: "Loading",
defaultValue: "Loading",
Expand Down Expand Up @@ -357,11 +337,6 @@ export default {
name: "Advanced search filter - non-fiction",
defaultValue: "Non-fiction",
control: { type: "text" }
},
multiselectAllOptionText: {
name: "Multiselect - all option",
defaultValue: "All",
control: { type: "text" }
}
}
} as ComponentMeta<typeof AdvancedSearchEntry>;
Expand Down
7 changes: 2 additions & 5 deletions src/apps/advanced-search/AdvancedSearch.entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ import { withText } from "../../core/utils/text";
import { withUrls } from "../../core/utils/url";
import GlobalUrlEntryPropsInterface from "../../core/utils/types/global-url-props";
import AdvancedSearch from "./AdvancedSearch";
import { GlobalEntryTextProps } from "../../core/storybook/globalTextArgs";

interface AdvancedSearchEntryTextProps {
addToFavoritesAriaLabelText: string;
alertErrorCloseText: string;
alertErrorMessageText: string;
byAuthorText: string;
etAlText: string;
inSeriesText: string;
loadingText: string;
numberDescriptionText: string;
removeFromFavoritesAriaLabelText: string;
resultPagerStatusText: string;
noSearchResultText: string;
showMoreText: string;
Expand Down Expand Up @@ -67,7 +64,6 @@ interface AdvancedSearchEntryTextProps {
advancedSearchFilterOnlineText: string;
advancedSearchFilterFictionText: string;
advancedSearchFilterNonFictionText: string;
multiselectAllOptionText: string;
}

interface AdvancedSearchEntryConfigProps {
Expand All @@ -79,6 +75,7 @@ interface AdvancedSearchEntryConfigProps {

export interface AdvancedSearchEntryProps
extends GlobalUrlEntryPropsInterface,
GlobalEntryTextProps,
AdvancedSearchEntryConfigProps,
AdvancedSearchEntryTextProps {
pageSizeDesktop?: number;
Expand Down
6 changes: 3 additions & 3 deletions src/apps/advanced-search/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ export const initialAdvancedSearchQuery: AdvancedSearchQuery = {
{ term: "", searchIndex: "all", clause: advancedSearchClauses[0], id: 1 }
],
filters: {
materialTypes: [{ item: "All", value: "all" }],
fiction: [{ item: "All", value: "all" }],
accessibility: [{ item: "All", value: "all" }]
materialTypes: [{ item: "multiselectAllOptionText", value: "all" }],
fiction: [{ item: "multiselectAllOptionText", value: "all" }],
accessibility: [{ item: "multiselectAllOptionText", value: "all" }]
}
};

Expand Down
10 changes: 4 additions & 6 deletions src/apps/create-patron-user-info/CreatePatron.dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import { ComponentMeta, ComponentStory } from "@storybook/react";
import CreatePatron from "./CreatePatron.entry";
import serviceUrlArgs from "../../core/storybook/serviceUrlArgs";
import pincodeArgs from "../../core/storybook/pincodeArgs";
import globalTextArgs from "../../core/storybook/globalTextArgs";

export default {
title: "Apps / Create patron",
component: CreatePatron,
argTypes: {
...serviceUrlArgs,
...pincodeArgs,
...globalTextArgs,
blacklistedPickupBranchesConfig: {
defaultValue: "FBS-751032,FBS-751031,FBS-751009,FBS-751027,FBS-751024",
control: { type: "text" }
Expand Down Expand Up @@ -85,10 +87,6 @@ export default {
defaultValue: "Phone number",
control: { type: "text" }
},
patronContactInfoBodyText: {
defaultValue: "Please enter contact information below",
control: { type: "text" }
},
patronContactInfoHeaderText: {
defaultValue: "Contact information",
control: { type: "text" }
Expand All @@ -108,11 +106,11 @@ export default {
control: { type: "text" }
},
createPatronChangePickupHeaderText: {
defaultValue: "",
defaultValue: "Create patron change pickup header text",
control: { type: "text" }
},
createPatronChangePickupBodyText: {
defaultValue: "",
defaultValue: "Create patron change pickup body text",
control: { type: "text" }
},
createPatronHeaderText: {
Expand Down
3 changes: 2 additions & 1 deletion src/apps/create-patron-user-info/CreatePatron.entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { withText } from "../../core/utils/text";
import { withUrls } from "../../core/utils/url";
import CreatePatron from "./CreatePatron";
import { getToken, hasToken } from "../../core/token";
import { GlobalEntryTextProps } from "../../core/storybook/globalTextArgs";

interface CreatePatronConfigProps {
agencyConfig: string;
Expand Down Expand Up @@ -32,7 +33,6 @@ interface CreatePatronTextProps {
createPatronInvalidSSNHeaderText: string;
patronContactEmailCheckboxText: string;
patronContactEmailLabelText: string;
patronContactInfoBodyText: string;
patronContactInfoHeaderText: string;
patronContactNameLabelText: string;
patronContactPhoneCheckboxText: string;
Expand All @@ -49,6 +49,7 @@ interface CreatePatronTextProps {

export interface CreatePatronProps
extends CreatePatronConfigProps,
GlobalEntryTextProps,
CreatePatronUrlProps,
CreatePatronTextProps {}

Expand Down
12 changes: 2 additions & 10 deletions src/apps/dashboard/dashboard.dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import reservationGroupModalArgs from "../../core/storybook/reservationGroupModa
import reservationMaterialDetailsProps from "../../core/storybook/reservationMaterialDetailsArgs";
import materialDetailsModalArgs from "../../core/storybook/materialDetailsModalArgs";
import deleteReservationModalArgs from "../../core/storybook/deleteReservationModalArgs";
import acceptModalArgs from "../../core/storybook/acceptFeesModalArgs";
import reservationListArgs from "../../core/storybook/reservationListArgs";
import globalTextArgs from "../../core/storybook/globalTextArgs";

export default {
title: "Apps / Dashboard",
Expand All @@ -21,10 +21,10 @@ export default {
...renewalArgs,
...reservationGroupModalArgs,
...reservationMaterialDetailsProps,
...acceptModalArgs,
...materialDetailsModalArgs,
...deleteReservationModalArgs,
...reservationListArgs,
...globalTextArgs,
// Urls
physicalLoansUrl: {
defaultValue: "/user/me/loans",
Expand Down Expand Up @@ -74,10 +74,6 @@ export default {
defaultValue: "To be returned soon",
control: { type: "text" }
},
loansNotOverdueText: {
defaultValue: "Longer return time",
control: { type: "text" }
},
reservationsText: {
defaultValue: "Reservations",
control: { type: "text" }
Expand All @@ -90,10 +86,6 @@ export default {
defaultValue: "Ready for you",
control: { type: "text" }
},
reservationsStillInQueueForText: {
defaultValue: "Still in queue",
control: { type: "text" }
},
noPhysicalLoansText: {
defaultValue: "At the moment, you have 0 physical loans",
control: { type: "text" }
Expand Down
9 changes: 3 additions & 6 deletions src/apps/dashboard/dashboard.entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { ReservationMaterialDetailsProps } from "../../core/storybook/reservatio
import { MaterialDetailsModalProps } from "../../core/storybook/materialDetailsModalArgs";
import { GroupModalReservationsProps } from "../../core/storybook/reservationGroupModalArgs";
import { DeleteReservationModalArgs } from "../../core/storybook/deleteReservationModalArgs";
import { AcceptFeesModalEntryTextProps } from "../../core/storybook/acceptFeesModalArgs";
import { RenewalArgs } from "../../core/storybook/renewalArgs";
import { GlobalEntryTextProps } from "../../core/storybook/globalTextArgs";

export interface DashBoardProps {
// Url
Expand All @@ -26,7 +26,6 @@ export interface DashBoardProps {
expirationWarningDaysBeforeConfig: string;
// Texts
dashboardNumberInLineText: string;
deleteReservationModalButtonText: string;
deleteReservationModalDeleteButtonText: string;
deleteReservationModalDeleteProcessingText: string;
deleteReservationModalErrorsStatusText: string;
Expand All @@ -36,7 +35,6 @@ export interface DashBoardProps {
etAlText: string;
feesText: string;
loanListMaterialDaysText: string;
loansNotOverdueText: string;
loansOverdueText: string;
loansSoonOverdueText: string;
materialAndAuthorText: string;
Expand All @@ -53,7 +51,6 @@ export interface DashBoardProps {
readyForLoanText: string;
reservationDetailsOthersInQueueText: string;
reservationsReadyText: string;
reservationsStillInQueueForText: string;
reservationsText: string;
resultPagerStatusText: string;
statusBadgeWarningText: string;
Expand All @@ -67,11 +64,11 @@ const DashboardEntry: FC<
GroupModalProps &
GroupModalLoansProps &
DeleteReservationModalArgs &
AcceptFeesModalEntryTextProps &
GroupModalReservationsProps &
RenewalArgs &
ReservationMaterialDetailsProps &
MaterialDetailsModalProps
MaterialDetailsModalProps &
GlobalEntryTextProps
> = ({ pageSizeDesktop, pageSizeMobile }) => {
const pageSize = pageSizeGlobal(
{
Expand Down
6 changes: 5 additions & 1 deletion src/apps/demo-modal/demo-modal.dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { ComponentMeta, ComponentStory } from "@storybook/react";
import React from "react";
import { withQuery } from "@storybook/addon-queryparams";
import DemoModal, { DemoModalEntryProps } from "./demo-modal.entry";
import globalTextArgs, {
GlobalEntryTextProps
} from "../../core/storybook/globalTextArgs";

export default {
title: "Apps / Demo modal",
Expand All @@ -13,6 +16,7 @@ export default {
}
},
argTypes: {
...globalTextArgs,
ariaLabelModalOneText: {
defaultValue: "Luk dialog et"
},
Expand All @@ -26,5 +30,5 @@ export default {
} as ComponentMeta<typeof DemoModal>;

export const App: ComponentStory<typeof DemoModal> = (
props: DemoModalEntryProps
props: DemoModalEntryProps & GlobalEntryTextProps
) => <DemoModal {...props} />;
3 changes: 2 additions & 1 deletion src/apps/demo-modal/demo-modal.entry.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import React from "react";
import { withText } from "../../core/utils/text";
import DemoModal from "./demo-modal";
import { GlobalEntryTextProps } from "../../core/storybook/globalTextArgs";

export interface DemoModalEntryProps {
ariaLabelModalOneText: string;
ariaLabelModalTwoText: string;
screenReaderModalDescriptionText: string;
}

const DemoModalEntry: React.FC<DemoModalEntryProps> = (
const DemoModalEntry: React.FC<DemoModalEntryProps & GlobalEntryTextProps> = (
props: DemoModalEntryProps
) => <DemoModal />;

Expand Down
Loading

0 comments on commit 71c8fc7

Please sign in to comment.