Skip to content

Commit 65bf6cc

Browse files
Merge remote-tracking branch 'origin/main' into fix-mui-theme
2 parents 1e9771a + c0b2c63 commit 65bf6cc

File tree

34 files changed

+2537
-3016
lines changed

34 files changed

+2537
-3016
lines changed

package-lock.json

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

package.json

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -10,48 +10,48 @@
1010
},
1111
"dependencies": {
1212
"@emotion/react": "^11.14.0",
13-
"@emotion/styled": "^11.14.0",
14-
"@gridsuite/commons-ui": "file:../commons-ui/gridsuite-commons-ui-0.124.0.tgz",
13+
"@emotion/styled": "^11.14.1",
14+
"@gridsuite/commons-ui": "0.126.0",
1515
"@hello-pangea/dnd": "^18.0.1",
16-
"@hookform/resolvers": "^4.0.0",
17-
"@mui/icons-material": "^5.16.14",
16+
"@hookform/resolvers": "^4.1.3",
17+
"@mui/icons-material": "^5.18.0",
1818
"@mui/lab": "5.0.0-alpha.175",
19-
"@mui/material": "^5.16.14",
20-
"@mui/x-charts": "^7.25.0",
21-
"@mui/x-tree-view": "^7.28.1",
22-
"@powsybl/network-viewer": "1.11.0",
23-
"@reduxjs/toolkit": "^2.5.1",
19+
"@mui/material": "^5.18.0",
20+
"@mui/x-charts": "^7.29.1",
21+
"@mui/x-tree-view": "^7.29.1",
22+
"@powsybl/network-viewer": "1.10.0",
23+
"@reduxjs/toolkit": "^2.9.0",
2424
"@svgdotjs/svg.js": "^3.2.4",
25-
"@xyflow/react": "^12.4.2",
25+
"@xyflow/react": "^12.8.4",
2626
"ag-grid-community": "^33.1.0",
27-
"ag-grid-react": "^33.1.0",
27+
"ag-grid-react": "^33.3.2",
2828
"clsx": "^2.1.1",
29-
"core-js": "^3.40.0",
29+
"core-js": "^3.45.1",
3030
"eventemitter3": "^5.0.1",
3131
"localized-countries": "^2.0.0",
32-
"mathjs": "^14.2.1",
33-
"mui-nested-menu": "^4.0.0",
32+
"mathjs": "^14.7.0",
33+
"mui-nested-menu": "^4.0.1",
3434
"plotly.js-basic-dist-min": "^2.35.3",
3535
"qs": "^6.14.0",
3636
"react": "^18.3.1",
3737
"react-csv-downloader": "^3.3.0",
3838
"react-dom": "^18.3.1",
39-
"react-grid-layout": "^1.5.1",
40-
"react-hook-form": "^7.54.2",
41-
"react-intl": "^7.1.6",
39+
"react-grid-layout": "^1.5.2",
40+
"react-hook-form": "^7.62.0",
41+
"react-intl": "^7.1.11",
4242
"react-papaparse": "^4.4.0",
4343
"react-plotly.js": "^2.6.0",
4444
"react-redux": "^9.2.0",
4545
"react-resizable": "^3.0.5",
46-
"react-resizable-panels": "^2.1.7",
47-
"react-router": "^7.4.1",
48-
"react-virtualized-auto-sizer": "^1.0.25",
46+
"react-resizable-panels": "^2.1.9",
47+
"react-router": "^7.8.2",
48+
"react-virtualized-auto-sizer": "^1.0.26",
4949
"react-window": "^1.8.11",
5050
"reconnecting-websocket": "^4.4.0",
5151
"redux": "^5.0.1",
5252
"typeface-roboto": "^1.1.13",
53-
"uuid": "^11.0.5",
54-
"yup": "^1.6.1"
53+
"uuid": "^11.1.0",
54+
"yup": "^1.7.0"
5555
},
5656
"overrides": {
5757
"@powsybl/network-viewer": {
@@ -75,11 +75,11 @@
7575
"licenses-check": "license-checker --summary --excludePrivatePackages --production --onlyAllow \"$( jq -r .onlyAllow[] license-checker-config.json | tr '\n' ';')\" --excludePackages \"$( jq -r .excludePackages[] license-checker-config.json | tr '\n' ';')\""
7676
},
7777
"devDependencies": {
78-
"@babel/helper-builder-react-jsx": "^7.25.9",
78+
"@babel/helper-builder-react-jsx": "^7.27.1",
7979
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
80-
"@babel/preset-env": "^7.26.8",
81-
"@babel/preset-react": "^7.26.3",
82-
"@babel/preset-typescript": "^7.26.0",
80+
"@babel/preset-env": "^7.28.3",
81+
"@babel/preset-react": "^7.27.1",
82+
"@babel/preset-typescript": "^7.27.1",
8383
"@types/core-js": "^2.5.8",
8484
"@types/eslint": "^8.56.12",
8585
"@types/eslint-config-prettier": "^6.11.3",
@@ -89,44 +89,44 @@
8989
"@types/license-checker": "^25.0.6",
9090
"@types/localized-countries": "^2.0.3",
9191
"@types/lucene-escape-query": "^1.0.2",
92-
"@types/node": "^22.13.4",
92+
"@types/node": "^22.18.1",
9393
"@types/plotly.js-basic-dist-min": "^2.12.4",
94-
"@types/qs": "^6.9.18",
95-
"@types/react": "^18.3.18",
96-
"@types/react-dom": "^18.3.5",
94+
"@types/qs": "^6.14.0",
95+
"@types/react": "^18.3.24",
96+
"@types/react-dom": "^18.3.7",
9797
"@types/react-grid-layout": "^1.3.5",
9898
"@types/react-plotly.js": "^2.6.3",
9999
"@types/react-resizable": "^3.0.8",
100100
"@types/react-window": "^1.8.8",
101101
"@typescript-eslint/eslint-plugin": "^7.18.0",
102102
"@typescript-eslint/parser": "^7.18.0",
103-
"@vitejs/plugin-react": "^4.3.4",
103+
"@vitejs/plugin-react": "^4.7.0",
104104
"babel-eslint": "^10.1.0",
105105
"babel-preset-vite": "^1.1.3",
106106
"eslint": "^8.57.1",
107-
"eslint-config-prettier": "^10.1.1",
107+
"eslint-config-prettier": "^10.1.8",
108108
"eslint-config-react-app": "^7.0.1",
109109
"eslint-import-resolver-typescript": "3.8.3",
110110
"eslint-plugin-flowtype": "^8.0.3",
111-
"eslint-plugin-import": "^2.31.0",
111+
"eslint-plugin-import": "^2.32.0",
112112
"eslint-plugin-jsx-a11y": "^6.10.2",
113-
"eslint-plugin-prettier": "^5.2.5",
114-
"eslint-plugin-react": "^7.37.4",
113+
"eslint-plugin-prettier": "^5.5.4",
114+
"eslint-plugin-react": "^7.37.5",
115115
"eslint-plugin-react-hooks": "^4.6.2",
116-
"eslint-plugin-react-refresh": "^0.4.19",
116+
"eslint-plugin-react-refresh": "^0.4.20",
117117
"identity-obj-proxy": "^3.0.0",
118118
"jest": "^29.7.0",
119119
"jest-environment-jsdom": "^29.7.0",
120120
"license-checker": "^25.0.1",
121-
"prettier": "^3.5.3",
121+
"prettier": "^3.6.2",
122122
"prettier-plugin-properties": "^0.3.0",
123123
"svgo": "^3.3.2",
124124
"ts-node": "^10.9.2",
125-
"type-fest": "^4.34.1",
126-
"typescript": "~5.5.4",
127-
"vite": "^6.2.2",
125+
"type-fest": "^4.41.0",
126+
"typescript": "~5.6.3",
127+
"vite": "^6.3.6",
128128
"vite-plugin-eslint": "^1.8.1",
129-
"vite-plugin-svgr": "^4.3.0",
129+
"vite-plugin-svgr": "^4.5.0",
130130
"vite-tsconfig-paths": "^5.1.4"
131131
}
132132
}

src/components/dialogs/limits/limits-pane-utils.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@ import { isNodeBuilt } from '../../graph/util/model-functions';
2929
import {
3030
AttributeModification,
3131
CurrentLimits,
32+
LineModificationInfos,
3233
OperationalLimitsGroup,
3334
OperationType,
3435
TemporaryLimit,
3536
} from '../../../services/network-modification-types';
3637
import { CurrentTreeNode } from '../../graph/tree-node.type';
3738
import { BranchInfos } from '../../../services/study/network-map.type';
3839
import { areOperationalLimitsGroupUnique, OperationalLimitsId } from './limits-utils';
39-
import { LineModificationEditData } from '../network-modifications/line/modification/line-modification-type';
40+
import { LineModificationFormInfos } from '../network-modifications/line/modification/line-modification-type';
4041

4142
const limitsGroupValidationSchema = (isModification: boolean) => ({
4243
[ID]: yup.string().nonNullable().required(),
@@ -225,10 +226,10 @@ export const updateTemporaryLimits = (
225226
};
226227

227228
/**
228-
* extract data loaded from the map server and merge it with local data in order to fill the operaitonal liits groups modification interface
229+
* extract data loaded from the map server and merge it with local data in order to fill the operational limits groups modification interface
229230
*/
230231
export const updateOpLimitsGroups = (
231-
formBranchModification: LineModificationEditData,
232+
formBranchModification: LineModificationFormInfos,
232233
mapServerBranch: BranchInfos
233234
): OperationalLimitsGroup[] => {
234235
let updatedOpLG: OperationalLimitsGroup[] = formBranchModification.limits.operationalLimitsGroups ?? [];
@@ -248,7 +249,7 @@ export const updateOpLimitsGroups = (
248249
});
249250

250251
// adds all the operational limits groups from mapServerBranch THAT ARE NOT DELETED by the netmod
251-
mapServerBranch.currentLimits.forEach((currentLimit: CurrentLimits) => {
252+
mapServerBranch.currentLimits?.forEach((currentLimit: CurrentLimits) => {
252253
const equivalentFromNetMod = updatedOpLG.find(
253254
(opLG: OperationalLimitsGroup) =>
254255
currentLimit.id === opLG.name && currentLimit.applicability === opLG.applicability
@@ -367,7 +368,7 @@ export function addOperationTypeToSelectedOpLG(
367368
export const addModificationTypeToOpLimitsGroups = (
368369
limitsGroups: OperationalLimitsGroup[],
369370
networkLine: BranchInfos | null,
370-
editData: LineModificationEditData | null | undefined,
371+
editData: LineModificationInfos | null | undefined,
371372
currentNode: CurrentTreeNode
372373
) => {
373374
let modificationLimitsGroups: OperationalLimitsGroup[] = sanitizeLimitsGroups(limitsGroups);

src/components/dialogs/network-modifications/battery/modification/battery-modification-dialog.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,13 @@ export default function BatteryModificationDialog({
234234
...value,
235235
reactiveCapabilityCurvePoints: previousReactiveCapabilityCurveTable,
236236
});
237-
reset((formValues) => ({
238-
...formValues,
239-
[ADDITIONAL_PROPERTIES]: getConcatenatedProperties(value, getValues),
240-
}));
237+
reset(
238+
(formValues) => ({
239+
...formValues,
240+
[ADDITIONAL_PROPERTIES]: getConcatenatedProperties(value, getValues),
241+
}),
242+
{ keepDirty: true }
243+
);
241244
}
242245
setDataFetchStatus(FetchStatus.SUCCEED);
243246
})

src/components/dialogs/network-modifications/generator/modification/generator-modification-dialog.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,13 @@ export default function GeneratorModificationDialog({
293293
...value,
294294
reactiveCapabilityCurvePoints: previousReactiveCapabilityCurveTable,
295295
});
296-
reset((formValues) => ({
297-
...formValues,
298-
[ADDITIONAL_PROPERTIES]: getConcatenatedProperties(value, getValues),
299-
}));
296+
reset(
297+
(formValues) => ({
298+
...formValues,
299+
[ADDITIONAL_PROPERTIES]: getConcatenatedProperties(value, getValues),
300+
}),
301+
{ keepDirty: true }
302+
);
300303
}
301304
setDataFetchStatus(FetchStatus.SUCCEED);
302305
})

src/components/dialogs/network-modifications/hvdc-line/lcc/modification/lcc-modification-dialog.tsx

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -202,27 +202,34 @@ export const LccModificationDialog = ({
202202
.then((value: LccFormInfos | null) => {
203203
if (value) {
204204
setLccToModify({ ...value });
205-
reset((formValues) => ({
206-
...formValues,
207-
[HVDC_LINE_TAB]: {
205+
reset(
206+
(formValues) => ({
208207
...formValues,
209-
[ADDITIONAL_PROPERTIES]: getConcatenatedProperties(value, getValues, HVDC_LINE_TAB),
210-
},
211-
[CONVERTER_STATION_1]: {
212-
...formValues,
213-
[FILTERS_SHUNT_COMPENSATOR_TABLE]: getConcatenatedShuntCompensatorOnSideInfos(
214-
editData?.converterStation1.shuntCompensatorsOnSide,
215-
value.lccConverterStation1.shuntCompensatorsOnSide
216-
),
217-
},
218-
[CONVERTER_STATION_2]: {
219-
...formValues,
220-
[FILTERS_SHUNT_COMPENSATOR_TABLE]: getConcatenatedShuntCompensatorOnSideInfos(
221-
editData?.converterStation2.shuntCompensatorsOnSide,
222-
value.lccConverterStation2.shuntCompensatorsOnSide
223-
),
224-
},
225-
}));
208+
[HVDC_LINE_TAB]: {
209+
...formValues,
210+
[ADDITIONAL_PROPERTIES]: getConcatenatedProperties(
211+
value,
212+
getValues,
213+
HVDC_LINE_TAB
214+
),
215+
},
216+
[CONVERTER_STATION_1]: {
217+
...formValues,
218+
[FILTERS_SHUNT_COMPENSATOR_TABLE]: getConcatenatedShuntCompensatorOnSideInfos(
219+
editData?.converterStation1.shuntCompensatorsOnSide,
220+
value.lccConverterStation1.shuntCompensatorsOnSide
221+
),
222+
},
223+
[CONVERTER_STATION_2]: {
224+
...formValues,
225+
[FILTERS_SHUNT_COMPENSATOR_TABLE]: getConcatenatedShuntCompensatorOnSideInfos(
226+
editData?.converterStation2.shuntCompensatorsOnSide,
227+
value.lccConverterStation2.shuntCompensatorsOnSide
228+
),
229+
},
230+
}),
231+
{ keepDirty: true }
232+
);
226233
}
227234
setDataFetchStatus(FetchStatus.SUCCEED);
228235
})

src/components/dialogs/network-modifications/hvdc-line/vsc/modification/vsc-modification-dialog.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,15 @@ const VscModificationDialog: React.FC<any> = ({
216216
reactiveCapabilityCurveTable: previousReactiveCapabilityCurveTable2,
217217
},
218218
});
219-
reset((formValues) => ({
220-
...formValues,
221-
[ADDITIONAL_PROPERTIES]: getConcatenatedProperties(value, getValues),
222-
}));
219+
reset(
220+
(formValues) => ({
221+
...formValues,
222+
[ADDITIONAL_PROPERTIES]: getConcatenatedProperties(value, getValues),
223+
}),
224+
{
225+
keepDirty: true,
226+
}
227+
);
223228
}
224229
setDataFetchStatus(FetchStatus.SUCCEED);
225230
})

src/components/dialogs/network-modifications/limit-sets/limit-sets-tabular-modification-utils.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,11 @@ export type LimitSetModificationMetadata = {
7777
csvFilename: string;
7878
};
7979

80+
const DEFAULT_TEMPORARY_LIMITS = 1;
81+
8082
const getAmountTemporaryLimits = (editData: LimitSetModificationMetadata) => {
81-
let maxLength = 0;
83+
// We check all modifications to determine the max limits number.
84+
let maxLength = DEFAULT_TEMPORARY_LIMITS;
8285
for (const mod of editData.modifications) {
8386
for (const limit of mod?.operationalLimitsGroups ?? []) {
8487
const temporaryLimitsLength = limit.currentLimits?.temporaryLimits?.length ?? 0;
@@ -218,7 +221,7 @@ export type ModificationRow = SchemaType[typeof MODIFICATIONS_TABLE][number];
218221

219222
export const emptyFormData: SchemaType = {
220223
[TYPE]: EQUIPMENT_TYPES.LINE,
221-
[AMOUNT_TEMPORARY_LIMITS]: 1,
224+
[AMOUNT_TEMPORARY_LIMITS]: DEFAULT_TEMPORARY_LIMITS,
222225
[MODIFICATIONS_TABLE]: [],
223226
[CSV_FILENAME]: '',
224227
};

0 commit comments

Comments
 (0)