Skip to content

Commit

Permalink
Merge branch 'develop' into react-19-update
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasGross committed Jan 7, 2025
2 parents 9fd8b2e + 5966224 commit 1083599
Show file tree
Hide file tree
Showing 19 changed files with 165 additions and 368 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.0",
"eslint-plugin-no-only-tests": "^3.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.3",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-webpack-plugin": "^4.2.0",
Expand All @@ -122,16 +122,16 @@
"postcss-cli": "^11.0.0",
"postcss-loader": "^8.1.1",
"postcss-scss": "^4.0.9",
"prettier": "^2.6.2",
"prettier": "^3.4.2",
"replace-in-file": "^6.3.2",
"sass": "^1.83.1",
"source-map-support": "^0.5.21",
"storybook": "^8.4.7",
"style-loader": "^4.0.0",
"stylelint": "^15.11.0",
"stylelint": "^16.12.0",
"stylelint-config-prettier": "^9.0.5",
"stylelint-config-recommended-scss": "^14.1.0",
"stylelint-prettier": "^2.0.0",
"stylelint-prettier": "^5.0.2",
"stylelint-scss": "^6.10.0",
"stylelint-webpack-plugin": "^5.0.1",
"svg-url-loader": "^8.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/apps/advanced-search/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const advancedSearchIndexTranslations = {
"term.isbn": "advancedSearchIdentifierText"
} as const;

export type AdvancedSearchIndex = typeof advancedSearchIndexes[number];
export type AdvancedSearchIndex = (typeof advancedSearchIndexes)[number];

export type AdvancedSearchClause = {
value: "AND" | "OR" | "NOT";
Expand Down
1 change: 0 additions & 1 deletion src/apps/loan-list/materials/manifestation.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ fragment ManifestationBasicDetails on Manifestation {
}
}


query getManifestationViaMaterialByFaust($faust: String!) {
manifestation(faust: $faust) {
...ManifestationBasicDetails
Expand Down
5 changes: 2 additions & 3 deletions src/apps/material/material.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ query getMaterialGlobally($wid: String!) {
}
}


query getInfomedia ($id: String!) {
query getInfomedia($id: String!) {
infomedia(id: $id) {
error
article {
Expand All @@ -21,7 +20,7 @@ query getInfomedia ($id: String!) {
}
}

query getReviewManifestations ($pid: [String!]!) {
query getReviewManifestations($pid: [String!]!) {
manifestations(pid: $pid) {
...ManifestationReviewFields
}
Expand Down
4 changes: 2 additions & 2 deletions src/apps/recommender/recommender.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ query recommendFromFaust($faust: String!, $limit: Int!) {
recommend(faust: $faust, limit: $limit) {
result {
work {
...WorkSmall
...WorkSmall
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const getReservationsForSaving = ({
selectedBranch: string;
}) => {
const getSelectedExpiryDate = (value: FormSelectValue) =>
typeof value === "number" ? getFutureDateString(value) : expiryDate ?? "";
typeof value === "number" ? getFutureDateString(value) : (expiryDate ?? "");
const getSelectedPickupBranch = (value: FormSelectValue) =>
typeof value === "string" ? value : selectedBranch;

Expand Down
12 changes: 6 additions & 6 deletions src/apps/search-result/search.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ query searchWithPagination(
}

query complexSearchWithPaginationWorkAccess(
$cql: String!,
$offset: Int!,
$limit: PaginationLimitScalar!,
$cql: String!
$offset: Int!
$limit: PaginationLimitScalar!
$filters: ComplexSearchFiltersInput!
) {
complexSearch(cql: $cql, filters: $filters) {
Expand All @@ -27,9 +27,9 @@ query complexSearchWithPaginationWorkAccess(
}

query complexSearchWithPagination(
$cql: String!,
$offset: Int!,
$limit: PaginationLimitScalar!,
$cql: String!
$offset: Int!
$limit: PaginationLimitScalar!
$filters: ComplexSearchFiltersInput!
) {
complexSearch(cql: $cql, filters: $filters) {
Expand Down
7 changes: 6 additions & 1 deletion src/components/facet-line/intelligent-facets-search.graphql
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
query intelligentFacets ($q: SearchQueryInput!, $facetsLimit: Int!, $valuesLimit: Int!, $filters: SearchFiltersInput!) {
query intelligentFacets(
$q: SearchQueryInput!
$facetsLimit: Int!
$valuesLimit: Int!
$filters: SearchFiltersInput!
) {
search(q: $q, filters: $filters) {
intelligentFacets(limit: $facetsLimit) {
name
Expand Down
3 changes: 1 addition & 2 deletions src/components/material/digital-modal/place-copy.graphql
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
mutation placeCopy ($input: CopyRequestInput!) {
mutation placeCopy($input: CopyRequestInput!) {
elba {
placeCopyRequest(input: $input) {
status
}
}
}

1 change: 1 addition & 0 deletions src/components/material/reserve-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ CannotbeReserved[The button says 'Cannot be reserved' + Is disabled]
--yes--> DigitalArticle[The button says: 'Order digital copy']
6{Does the manifestation have an issn digital article id?}
--No--> InfomediaArticle[The button says 'See online']
```
2 changes: 1 addition & 1 deletion src/core/dbc-gateway/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { beforeAll, vi } from "vitest";
import { getServiceBaseUrl } from "../utils/reduxMiddleware/extractServiceBaseUrls";
import queryMap from "./queryMap";

type Baseurl = typeof queryMap[keyof typeof queryMap];
type Baseurl = (typeof queryMap)[keyof typeof queryMap];

export const resolveBaseUrl = (query?: string) => {
if (!query) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ul>
*/
export type AuthenticatedPatronV6AuthenticateStatus =
typeof AuthenticatedPatronV6AuthenticateStatus[keyof typeof AuthenticatedPatronV6AuthenticateStatus];
(typeof AuthenticatedPatronV6AuthenticateStatus)[keyof typeof AuthenticatedPatronV6AuthenticateStatus];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const AuthenticatedPatronV6AuthenticateStatus = {
Expand Down
2 changes: 1 addition & 1 deletion src/core/publizon/model/apiResponseCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Orders/loans created in test environment will not be invoiced. Please request a
* 101 = Success, 105 = InvalidContentIdentifier, 118 = InvalidRequestIdentity, 120 = MaxConcurrentLoansPerBorrowerExceeded, 125 = MaxAmountPerMonthExceeded, 128 = ContentNotFound, 131 = NotLoanable, 134 = CardTemporarilyBlocked, 135 = MaxLoansOnTitleReached, 136 = InsufficientCopiesException, 137 = ReservationLimitReached, 138 = GenericFault, 139 = InvalidAgreement, 140 = AlreadyReserved, 141 = InvalidEmail, 142 = InvalidPhone, 143 = CostFreeLimitReached, 147 = CountryNotFound, 148 = InvalidInstitutionId, 149 = InvalidCardFormat, 150 = InvalidCardByCulr, 151 = CardNotFound, 152 = InvalidClientId, 153 = LoanNotFound
*/
export type ApiResponseCode =
typeof ApiResponseCode[keyof typeof ApiResponseCode];
(typeof ApiResponseCode)[keyof typeof ApiResponseCode];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ApiResponseCode = {
Expand Down
2 changes: 1 addition & 1 deletion src/core/publizon/model/bookTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Orders/loans created in test environment will not be invoiced. Please request a
/**
* 0 = Ebook, 1 = Audio
*/
export type BookTypes = typeof BookTypes[keyof typeof BookTypes];
export type BookTypes = (typeof BookTypes)[keyof typeof BookTypes];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const BookTypes = {
Expand Down
2 changes: 1 addition & 1 deletion src/core/publizon/model/contentLoanStatusEnum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Orders/loans created in test environment will not be invoiced. Please request a
*/

export type ContentLoanStatusEnum =
typeof ContentLoanStatusEnum[keyof typeof ContentLoanStatusEnum];
(typeof ContentLoanStatusEnum)[keyof typeof ContentLoanStatusEnum];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ContentLoanStatusEnum = {
Expand Down
2 changes: 1 addition & 1 deletion src/core/publizon/model/fileExtensionType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Orders/loans created in test environment will not be invoiced. Please request a
*/

export type FileExtensionType =
typeof FileExtensionType[keyof typeof FileExtensionType];
(typeof FileExtensionType)[keyof typeof FileExtensionType];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const FileExtensionType = {
Expand Down
2 changes: 1 addition & 1 deletion src/core/publizon/model/identifierTypeEnum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Orders/loans created in test environment will not be invoiced. Please request a
*/

export type IdentifierTypeEnum =
typeof IdentifierTypeEnum[keyof typeof IdentifierTypeEnum];
(typeof IdentifierTypeEnum)[keyof typeof IdentifierTypeEnum];

// eslint-disable-next-line @typescript-eslint/no-redeclare
export const IdentifierTypeEnum = {
Expand Down
19 changes: 9 additions & 10 deletions src/core/utils/withFocusTrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ import React, { FC } from "react";
export default <P extends object>(
Component: React.ComponentType<P>
): FC<P & { withFocusTrap?: boolean }> =>
({ withFocusTrap, ...props }) =>
(
<FocusTrap
focusTrapOptions={{
allowOutsideClick: true
}}
>
<Component {...(props as P)} />
</FocusTrap>
);
({ withFocusTrap, ...props }) => (
<FocusTrap
focusTrapOptions={{
allowOutsideClick: true
}}
>
<Component {...(props as P)} />
</FocusTrap>
);
Loading

0 comments on commit 1083599

Please sign in to comment.