Skip to content

Commit 01cfc71

Browse files
committed
4565: Removed PropTypes. Fixed redux-toolkit cache invalidation
1 parent 9d04d50 commit 01cfc71

File tree

117 files changed

+86
-1419
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+86
-1419
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ All notable changes to this project will be documented in this file.
1010
* Cleaned up Github Actions workflows.
1111
* Updated PHP dependencies.
1212
* Added Playwright github action.
13+
* Removed propTypes in admin.
14+
* Upgraded redux-toolkit and how api slices are generated.
15+
* Fixed redux-toolkit cache handling.
1316

1417
### NB! Prior to 3.x the project was split into separate repositories
1518

assets/admin/auth-handler.jsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { React, useContext } from "react";
2-
import PropTypes from "prop-types";
32
import Login from "./components/user/login";
43
import UserContext from "./context/user-context";
54

@@ -20,8 +19,4 @@ function AuthHandler({ children }) {
2019
return children;
2120
}
2221

23-
AuthHandler.propTypes = {
24-
children: PropTypes.node.isRequired,
25-
};
26-
2722
export default AuthHandler;

assets/admin/components/activation-code/activation-code-create.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function ActivationCodeCreate() {
6464
};
6565

6666
PostV2UserActivationCode({
67-
userActivationCodeUserActivationCodeInput: JSON.stringify(saveData),
67+
userActivationCodeUserActivationCodeInputJsonld: JSON.stringify(saveData),
6868
});
6969
};
7070

assets/admin/components/activation-code/activation-code-form.jsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { React } from "react";
22
import { useNavigate } from "react-router-dom";
33
import { Button, Col, Row } from "react-bootstrap";
44
import { useTranslation } from "react-i18next";
5-
import PropTypes from "prop-types";
65
import Form from "react-bootstrap/Form";
76
import LoadingComponent from "../util/loading-component/loading-component";
87
import ContentBody from "../util/content-body/content-body";
@@ -107,16 +106,4 @@ function ActivationCodeForm({
107106
);
108107
}
109108

110-
ActivationCodeForm.propTypes = {
111-
activationCode: PropTypes.shape({
112-
displayName: PropTypes.string.isRequired,
113-
role: PropTypes.string.isRequired,
114-
}).isRequired,
115-
handleInput: PropTypes.func.isRequired,
116-
handleSubmit: PropTypes.func.isRequired,
117-
headerText: PropTypes.string.isRequired,
118-
isLoading: PropTypes.bool,
119-
loadingMessage: PropTypes.string,
120-
};
121-
122109
export default ActivationCodeForm;

assets/admin/components/feed-sources/feed-source-form.jsx

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { React } from "react";
22
import { Alert, Button, Row, Col } from "react-bootstrap";
33
import { useTranslation } from "react-i18next";
44
import { useNavigate } from "react-router-dom";
5-
import PropTypes from "prop-types";
65
import Form from "react-bootstrap/Form";
76
import LoadingComponent from "../util/loading-component/loading-component";
87
import FormInputArea from "../util/forms/form-input-area";
@@ -185,30 +184,4 @@ function FeedSourceForm({
185184
);
186185
}
187186

188-
FeedSourceForm.propTypes = {
189-
feedSource: PropTypes.shape({
190-
title: PropTypes.string,
191-
description: PropTypes.string,
192-
feedType: PropTypes.string,
193-
supportedFeedOutputType: PropTypes.string,
194-
}),
195-
handleInput: PropTypes.func.isRequired,
196-
handleSubmit: PropTypes.func.isRequired,
197-
handleSaveNoClose: PropTypes.func.isRequired,
198-
handleSecretInput: PropTypes.func.isRequired,
199-
onFeedTypeChange: PropTypes.func.isRequired,
200-
headerText: PropTypes.string.isRequired,
201-
isLoading: PropTypes.bool,
202-
loadingMessage: PropTypes.string,
203-
feedSourceTypeOptions: PropTypes.arrayOf(
204-
PropTypes.shape({
205-
value: PropTypes.string.isRequired,
206-
title: PropTypes.string,
207-
key: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
208-
template: PropTypes.element,
209-
})
210-
).isRequired,
211-
mode: PropTypes.string,
212-
};
213-
214187
export default FeedSourceForm;

assets/admin/components/feed-sources/feed-source-manager.jsx

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { React, useEffect, useState } from "react";
22
import { useTranslation } from "react-i18next";
3-
import PropTypes from "prop-types";
43
import { useNavigate } from "react-router-dom";
54
import FeedSourceForm from "./feed-source-form";
65
import {
@@ -157,11 +156,11 @@ function FeedSourceManager({
157156

158157
if (saveMethod === "POST") {
159158
postV2FeedSources({
160-
feedSourceFeedSourceInput: JSON.stringify(formStateObject),
159+
feedSourceFeedSourceInputJsonld: JSON.stringify(formStateObject),
161160
});
162161
} else if (saveMethod === "PUT") {
163162
PutV2FeedSourcesById({
164-
feedSourceFeedSourceInput: JSON.stringify(formStateObject),
163+
feedSourceFeedSourceInputJsonld: JSON.stringify(formStateObject),
165164
id,
166165
});
167166
}
@@ -236,27 +235,4 @@ function FeedSourceManager({
236235
);
237236
}
238237

239-
FeedSourceManager.propTypes = {
240-
initialState: PropTypes.shape({
241-
title: PropTypes.string,
242-
description: PropTypes.string,
243-
feedType: PropTypes.string,
244-
feedSourceType: PropTypes.string,
245-
host: PropTypes.string,
246-
token: PropTypes.string,
247-
baseUrl: PropTypes.string,
248-
clientId: PropTypes.string,
249-
clientSecret: PropTypes.string,
250-
feedSources: PropTypes.string,
251-
}),
252-
saveMethod: PropTypes.string.isRequired,
253-
id: PropTypes.string,
254-
isLoading: PropTypes.bool,
255-
loadingError: PropTypes.shape({
256-
data: PropTypes.shape({
257-
status: PropTypes.number,
258-
}),
259-
}),
260-
};
261-
262238
export default FeedSourceManager;

assets/admin/components/feed-sources/templates/calendar-api-feed-type.jsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { React, useEffect, useState } from "react";
2-
import PropTypes from "prop-types";
32
import { useTranslation } from "react-i18next";
43
import { Alert } from "react-bootstrap";
54
import MultiselectFromEndpoint from "../../slide/content/multiselect-from-endpoint";
@@ -43,12 +42,4 @@ const CalendarApiFeedType = ({
4342
);
4443
};
4544

46-
CalendarApiFeedType.propTypes = {
47-
handleInput: PropTypes.func,
48-
formStateObject: PropTypes.shape({
49-
locations: PropTypes.arrayOf(PropTypes.string),
50-
}),
51-
feedSourceId: PropTypes.string,
52-
};
53-
5445
export default CalendarApiFeedType;

assets/admin/components/feed-sources/templates/colibo-feed-type.jsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { React, useEffect, useState } from "react";
2-
import PropTypes from "prop-types";
32
import { useTranslation } from "react-i18next";
43
import { Alert } from "react-bootstrap";
54
import MultiselectFromEndpoint from "../../slide/content/multiselect-from-endpoint";
@@ -86,16 +85,4 @@ const ColiboFeedType = ({
8685
);
8786
};
8887

89-
ColiboFeedType.propTypes = {
90-
handleInput: PropTypes.func,
91-
formStateObject: PropTypes.shape({
92-
api_base_uri: PropTypes.string,
93-
client_id: PropTypes.string,
94-
client_secret: PropTypes.string,
95-
allowed_recipients: PropTypes.arrayOf(PropTypes.string),
96-
}),
97-
feedSourceId: PropTypes.string,
98-
mode: PropTypes.string,
99-
};
100-
10188
export default ColiboFeedType;

assets/admin/components/feed-sources/templates/event-database-feed-type.jsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { React } from "react";
2-
import PropTypes from "prop-types";
32
import { useTranslation } from "react-i18next";
43
import FormInput from "../../util/forms/form-input";
54

@@ -24,12 +23,4 @@ const EventDatabaseApiTemplate = ({ handleInput, formStateObject, mode }) => {
2423
);
2524
};
2625

27-
EventDatabaseApiTemplate.propTypes = {
28-
handleInput: PropTypes.func,
29-
formStateObject: PropTypes.shape({
30-
host: PropTypes.string,
31-
}),
32-
mode: PropTypes.string,
33-
};
34-
3526
export default EventDatabaseApiTemplate;

assets/admin/components/feed-sources/templates/event-database-v2-feed-type.jsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { React } from "react";
2-
import PropTypes from "prop-types";
32
import { useTranslation } from "react-i18next";
43
import FormInput from "../../util/forms/form-input";
54

@@ -31,13 +30,4 @@ const EventDatabaseApiV2FeedType = ({ handleInput, formStateObject, mode }) => {
3130
);
3231
};
3332

34-
EventDatabaseApiV2FeedType.propTypes = {
35-
handleInput: PropTypes.func,
36-
formStateObject: PropTypes.shape({
37-
host: PropTypes.string.isRequired,
38-
apikey: PropTypes.string,
39-
}),
40-
mode: PropTypes.string,
41-
};
42-
4333
export default EventDatabaseApiV2FeedType;

0 commit comments

Comments
 (0)