Skip to content

Commit

Permalink
Update @reduxjs/toolkit to 2.5.0
Browse files Browse the repository at this point in the history
Supersedes #1002.

Could not figure out why the type `AsyncThunkConfig`
is not exported anymore, nor could I find an
equivalent type, so I've just removed it for now.
  • Loading branch information
Arnei committed Dec 12, 2024
1 parent 1df75da commit 28589c5
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 26 deletions.
22 changes: 11 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@hello-pangea/dnd": "^17.0.0",
"@mui/material": "^6.1.6",
"@mui/x-date-pickers": "^7.18.0",
"@reduxjs/toolkit": "^2.2.6",
"@reduxjs/toolkit": "^2.5.0",
"@types/dompurify": "^3.0.5",
"@types/react-router-dom": "^5.3.3",
"array-move": "^4.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { getMetadataCollectionFieldName } from "../../../../utils/resourceUtils"
import { useAppDispatch, useAppSelector } from "../../../../store";
import { MetadataCatalog } from "../../../../slices/eventSlice";
import { AsyncThunk } from "@reduxjs/toolkit";
import { AsyncThunkConfig } from "@reduxjs/toolkit/dist/createAsyncThunk";

/**
* This component renders metadata details of a certain event or series
Expand All @@ -34,7 +33,7 @@ const DetailsExtendedMetadataTab = ({
id: string;
values: { [key: string]: any; };
catalog: MetadataCatalog;
}, AsyncThunkConfig> //(id: string, values: { [key: string]: any }, catalog: MetadataCatalog) => void,
}, any> //(id: string, values: { [key: string]: any }, catalog: MetadataCatalog) => void,
}) => {
const { t } = useTranslation();
const dispatch = useAppDispatch();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { getMetadataCollectionFieldName } from "../../../../utils/resourceUtils"
import { useAppDispatch, useAppSelector } from "../../../../store";
import { MetadataCatalog } from "../../../../slices/eventSlice";
import { AsyncThunk } from "@reduxjs/toolkit";
import { AsyncThunkConfig } from "@reduxjs/toolkit/dist/createAsyncThunk";

/**
* This component renders metadata details of a certain event or series
Expand All @@ -27,7 +26,7 @@ const DetailsMetadataTab = ({
editAccessRole,
}: {
metadataFields: MetadataCatalog,
updateResource: AsyncThunk<void, { id: string; values: { [key: string]: any; }; }, AsyncThunkConfig>
updateResource: AsyncThunk<void, { id: string; values: { [key: string]: any; }; }, any>
resourceId: string,
header: string,
editAccessRole: string,
Expand Down
3 changes: 1 addition & 2 deletions src/components/recordings/Recordings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { getCurrentFilterResource } from "../../selectors/tableFilterSelectors";
import { useAppDispatch, useAppSelector } from "../../store";
import { fetchRecordings } from "../../slices/recordingSlice";
import { AsyncThunk } from "@reduxjs/toolkit";
import { AsyncThunkConfig } from "@reduxjs/toolkit/dist/createAsyncThunk";

/**
* This component renders the table view of recordings
Expand Down Expand Up @@ -86,7 +85,7 @@ const Recordings = () => {
<div className="controls-container">
{/* Include filters component */}
<TableFilters
loadResource={fetchRecordings as AsyncThunk<any, void, AsyncThunkConfig>}
loadResource={fetchRecordings as AsyncThunk<any, void, any>}
loadResourceIntoTable={loadRecordingsIntoTable}
resource={"recordings"}
/>
Expand Down
3 changes: 1 addition & 2 deletions src/components/shared/TableFilterProfiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { useHotkeys } from "react-hotkeys-hook";
import { availableHotkeys } from "../../configs/hotkeysConfig";
import { Tooltip } from "./Tooltip";
import { AsyncThunk } from "@reduxjs/toolkit";
import { AsyncThunkConfig } from "@reduxjs/toolkit/dist/createAsyncThunk";

/**
* This component renders the table filter profiles in the upper right corner when clicked on settings icon of the
Expand All @@ -32,7 +31,7 @@ const TableFiltersProfiles = ({
}: {
showFilterSettings: boolean,
setFilterSettings: (_: boolean) => void,
loadResource: AsyncThunk<any, void, AsyncThunkConfig>,
loadResource: AsyncThunk<any, void, any>,
loadResourceIntoTable: () => AppThunk,
resource: string,
}) => {
Expand Down
3 changes: 1 addition & 2 deletions src/components/shared/TableFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { renderValidDate } from "../../utils/dateUtils";
import { Tooltip } from "./Tooltip";
import DropDown from "./DropDown";
import { AsyncThunk } from "@reduxjs/toolkit";
import { AsyncThunkConfig } from "@reduxjs/toolkit/dist/createAsyncThunk";

/**
* This component renders the table filters in the upper right corner of the table
Expand All @@ -39,7 +38,7 @@ const TableFilters = ({
loadResourceIntoTable,
resource,
}: {
loadResource: AsyncThunk<any, void, AsyncThunkConfig>,
loadResource: AsyncThunk<any, void, any>,
loadResourceIntoTable: () => AppThunk,
resource: string,
}) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { removeNotificationWizardForm, addNotification } from "../../../slices/n
import { useTranslation } from "react-i18next";
import { TransformedAcl } from "../../../slices/aclDetailsSlice";
import { AsyncThunk, unwrapResult } from "@reduxjs/toolkit";
import { AsyncThunkConfig } from "@reduxjs/toolkit/dist/createAsyncThunk";
import { SaveEditFooter } from "../SaveEditFooter";


Expand All @@ -48,9 +47,9 @@ const ResourceDetailsAccessPolicyTab = ({
resourceId: string,
header: string,
policies: TransformedAcl[],
fetchHasActiveTransactions?: AsyncThunk<any, string, AsyncThunkConfig>
fetchAccessPolicies: AsyncThunk<TransformedAcl[], string, AsyncThunkConfig>,
saveNewAccessPolicies: AsyncThunk<boolean, { id: string, policies: { acl: Acl } }, AsyncThunkConfig>
fetchHasActiveTransactions?: AsyncThunk<any, string, any>
fetchAccessPolicies: AsyncThunk<TransformedAcl[], string, any>,
saveNewAccessPolicies: AsyncThunk<boolean, { id: string, policies: { acl: Acl } }, any>
descriptionText: string,
buttonText: string,
editAccessRole: string,
Expand Down

0 comments on commit 28589c5

Please sign in to comment.