Skip to content

Commit 294a9bf

Browse files
committed
Merge branch 'main' into reduce-api-requests
2 parents 499673c + 84883a3 commit 294a9bf

66 files changed

Lines changed: 1154 additions & 705 deletions

Some content is hidden

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

package-lock.json

Lines changed: 754 additions & 263 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
"dependencies": {
88
"@emotion/react": "^11.14.0",
99
"@emotion/styled": "^11.14.0",
10-
"@hello-pangea/dnd": "^17.0.0",
10+
"@hello-pangea/dnd": "^18.0.1",
1111
"@mui/material": "^6.4.2",
1212
"@mui/x-date-pickers": "^7.25.0",
1313
"@reduxjs/toolkit": "^2.5.1",
1414
"array-move": "^4.0.0",
1515
"axios": "^1.7.9",
16-
"bourbon": "^7.3.0",
1716
"classnames": "^2.5.1",
1817
"date-fns": "^4.1.0",
1918
"dompurify": "^3.2.4",
@@ -26,10 +25,10 @@
2625
"lodash": "^4.17.21",
2726
"moment": "^2.30.1",
2827
"moment-timezone": "^0.5.47",
29-
"react": "^18.3.1",
28+
"react": "^19.0.0",
3029
"react-chartjs-2": "^5.3.0",
3130
"react-datepicker": "^8.0.0",
32-
"react-dom": "^18.3.1",
31+
"react-dom": "^19.0.0",
3332
"react-hotkeys-hook": "^4.6.1",
3433
"react-i18next": "^15.4.0",
3534
"react-icons": "^5.4.0",
@@ -67,7 +66,7 @@
6766
"@redux-devtools/extension": "^3.3.0",
6867
"@types/lodash": "^4.17.15",
6968
"@types/node": "^22.13.0",
70-
"@types/react-dom": "^18.3.0",
69+
"@types/react-dom": "^19.0.0",
7170
"@types/uuid": "^10.0.0",
7271
"@typescript-eslint/eslint-plugin": "^7.14.1",
7372
"@vitejs/plugin-react-swc": "^3.7.2",
@@ -78,7 +77,7 @@
7877
"sass": "^1.83.4",
7978
"typescript": "^5.7.3",
8079
"uuid": "^11.0.5",
81-
"vite": "^5.4.10",
80+
"vite": "^6.2.0",
8281
"vite-plugin-svgr": "^4.3.0",
8382
"vite-tsconfig-paths": "^5.1.4",
8483
"vitest": "^3.0.4"

src/components/Header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ const Header = () => {
169169
}
170170
target="_blank" rel="noreferrer"
171171
>
172-
<span className="fa fa-play-circle" />
172+
<i className="fa fa-play-circle" />
173173
</a>
174174
</Tooltip>
175175
</div>
@@ -180,7 +180,7 @@ const Header = () => {
180180
<div className="nav-dd">
181181
<Tooltip title={t("STUDIO")}>
182182
<a href={studioURL} target="_blank" rel="noreferrer">
183-
<span className="fa fa-video-camera" />
183+
<i className="fa fa-video-camera" />
184184
</a>
185185
</Tooltip>
186186
</div>

src/components/configuration/Themes.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import Header from "../Header";
1111
import NavBar from "../NavBar";
1212
import MainView from "../MainView";
1313
import Footer from "../Footer";
14-
import { getCurrentFilterResource } from "../../selectors/tableFilterSelectors";
1514
import { useAppDispatch, useAppSelector } from "../../store";
1615
import { fetchThemes } from "../../slices/themeSlice";
1716
import { resetTableContent } from "../../slices/tableSlice";
@@ -23,8 +22,6 @@ const Themes = () => {
2322
const { t } = useTranslation();
2423
const dispatch = useAppDispatch();
2524

26-
const currentFilterType = useAppSelector(state => getCurrentFilterResource(state));
27-
2825
const [displayNavigation, setNavigation] = useState(false);
2926

3027
const themes = useAppSelector(state => getTotalThemes(state));
@@ -36,9 +33,7 @@ const Themes = () => {
3633
// Clear table of previous data
3734
dispatch(resetTableContent());
3835

39-
if ("themes" !== currentFilterType) {
40-
dispatch(fetchFilters("themes"));
41-
}
36+
dispatch(fetchFilters("themes"));
4237

4338
// Reset text filter
4439
dispatch(editTextFilter(""));

src/components/configuration/partials/wizard/TitleSlidePage.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ const TitleSlidePage = <T extends RequiredFormProps>({
3636
{t("CONFIGURATION.THEMES.DETAILS.TITLE.DESCRIPTION")}
3737
</p>
3838
</div>
39-
{/*todo: Notification*/}
4039
<div className="obj">
4140
<header>{t("CONFIGURATION.THEMES.DETAILS.TITLE.ACTIVE")}</header>
4241
<div className="obj-container content-list padded">

src/components/events/Events.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import Footer from "../Footer";
2727
import { getUserInformation } from "../../selectors/userInfoSelectors";
2828
import { hasAccess } from "../../utils/utils";
2929
import { availableHotkeys } from "../../configs/hotkeysConfig";
30-
import { getCurrentFilterResource } from "../../selectors/tableFilterSelectors";
3130
import { fetchAssetUploadOptions } from "../../thunks/assetsThunks";
3231
import { useAppDispatch, useAppSelector } from "../../store";
3332
import {
@@ -51,7 +50,6 @@ const Events = () => {
5150
const { t } = useTranslation();
5251
const dispatch = useAppDispatch();
5352

54-
const currentFilterType = useAppSelector(state => getCurrentFilterResource(state));
5553
const displayEventDetailsModal = useAppSelector(state => showModal(state));
5654

5755
const [displayActionMenu, setActionMenu] = useState(false);
@@ -76,9 +74,7 @@ const Events = () => {
7674
// Clear redux of previous table data
7775
dispatch(resetTableContent());
7876

79-
if ("events" !== currentFilterType) {
80-
dispatch(fetchFilters("events"))
81-
}
77+
dispatch(fetchFilters("events"))
8278

8379
// Reset text filter
8480
dispatch(editTextFilter(""));

src/components/events/Series.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import MainView from "../MainView";
1818
import Footer from "../Footer";
1919
import { getUserInformation } from "../../selectors/userInfoSelectors";
2020
import { hasAccess } from "../../utils/utils";
21-
import { getCurrentFilterResource } from "../../selectors/tableFilterSelectors";
2221
import { useAppDispatch, useAppSelector } from "../../store";
2322
import {
2423
fetchSeries,
@@ -46,8 +45,7 @@ const Series = () => {
4645
const newSeriesModalRef = useRef<ModalHandle>(null);
4746
const deleteModalRef = useRef<ModalHandle>(null);
4847

49-
const user = useAppSelector(state => getUserInformation(state));
50-
const currentFilterType = useAppSelector(state => getCurrentFilterResource(state));
48+
const user = useAppSelector(state => getUserInformation(state));
5149

5250
let location = useLocation();
5351

@@ -61,9 +59,7 @@ const Series = () => {
6159
// Clear table of previous data
6260
dispatch(resetTableContent());
6361

64-
if ("series" !== currentFilterType) {
65-
dispatch(fetchFilters("series"))
66-
}
62+
dispatch(fetchFilters("series"))
6763

6864
// Reset text filer
6965
dispatch(editTextFilter(""));

src/components/events/partials/EventActionCell.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ const EventActionCell = ({
109109
)}
110110

111111
{/* Delete an event */}
112-
{/*TODO: needs to be checked if event is published */}
113112
<ActionCellDelete
114113
editAccessRole={"ROLE_UI_EVENTS_DELETE"}
115114
tooltipText={"EVENTS.EVENTS.TABLE.TOOLTIP.DELETE"}

src/components/events/partials/ModalTabsAndPages/EventDetailsStatisticsTab.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import {
44
hasStatisticsError,
55
} from "../../../../selectors/eventDetailsSelectors";
66
import TimeSeriesStatistics from "../../../shared/TimeSeriesStatistics";
7-
import { useAppDispatch, useAppSelector } from "../../../../store";
7+
import { useAppSelector } from "../../../../store";
88
import { fetchEventStatisticsValueUpdate } from "../../../../slices/eventDetailsSlice";
99
import { useTranslation } from "react-i18next";
10+
import { createChartOptions } from "../../../../utils/statisticsUtils";
1011

1112
/**
1213
* This component manages the statistics tab of the event details modal
@@ -19,16 +20,10 @@ const EventDetailsStatisticsTab = ({
1920
header: string,
2021
}) => {
2122
const { t } = useTranslation();
22-
const dispatch = useAppDispatch();
2323

2424
const statistics = useAppSelector(state => getStatistics(state));
2525
const hasError = useAppSelector(state => hasStatisticsError(state));
2626

27-
// TODO: Get rid of the wrappers when modernizing redux is done
28-
const fetchEventStatisticsValueUpdateWrapper = (eventId: any, providerId: any, from: any, to: any, dataResolution: any, timeMode: any) => {
29-
dispatch(fetchEventStatisticsValueUpdate({eventId, providerId, from, to, dataResolution, timeMode}));
30-
}
31-
3227
/* generates file name for download-link for a statistic */
3328
const statisticsCsvFileName = (statsTitle: string) => {
3429
const sanitizedStatsTitle = statsTitle
@@ -68,13 +63,13 @@ const EventDetailsStatisticsTab = ({
6863
timeMode={stat.timeMode}
6964
dataResolution={stat.dataResolution}
7065
statDescription={stat.description}
71-
onChange={fetchEventStatisticsValueUpdateWrapper}
66+
onChange={fetchEventStatisticsValueUpdate}
7267
exportUrl={stat.csvUrl}
7368
exportFileName={statisticsCsvFileName}
7469
totalValue={stat.totalValue}
7570
sourceData={stat.values}
7671
chartLabels={stat.labels}
77-
chartOptions={stat.options}
72+
chartOptions={createChartOptions(stat.timeMode, stat.dataResolution)}
7873
/>
7974
</div>
8075
) : (

src/components/events/partials/ModalTabsAndPages/NewAccessPage.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,6 @@ const NewAccessPage = <T extends RequiredFormProps>({
310310
</tr>
311311
)}
312312

313-
{/*Todo: show only if user has role ROLE_UI_SERIES_DETAILS_ACL_EDIT */}
314313
{hasAccess(editAccessRole, user) && (
315314
<tr>
316315
{/*Add additional policy row*/}

0 commit comments

Comments
 (0)