@gridsuite/commons-ui 0.272.1 → 0.274.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/features/index.js +9 -2
  2. package/dist/features/network-modifications/index.js +7 -2
  3. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogHeader.js +1 -1
  4. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabsContent.js +7 -1
  5. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerForm.d.ts +1 -1
  6. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerForm.js +3 -1
  7. package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.utils.js +1 -4
  8. package/dist/features/network-modifications/twoWindingsTransformer/index.js +8 -3
  9. package/dist/features/network-modifications/twoWindingsTransformer/modification/index.js +6 -2
  10. package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.utils.d.ts +7 -0
  11. package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.utils.js +313 -10
  12. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/index.js +2 -1
  13. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/index.js +2 -1
  14. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/ratioTapChanger.utils.d.ts +1 -0
  15. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/ratioTapChanger.utils.js +4 -0
  16. package/dist/features/parameters/common/limitreductions/limit-reductions-table-form.js +1 -0
  17. package/dist/features/parameters/common/parameter-layout/parameter-layout.js +26 -27
  18. package/dist/features/process-configs/common/process-config.type.d.ts +2 -1
  19. package/dist/features/process-configs/common/process-config.type.js +1 -0
  20. package/dist/features/process-configs/index.d.ts +1 -0
  21. package/dist/features/process-configs/index.js +2 -0
  22. package/dist/features/process-configs/process-config.type.d.ts +2 -0
  23. package/dist/features/process-configs/sc-process-config-edition-dialog.d.ts +3 -0
  24. package/dist/features/process-configs/sc-process-config-edition-dialog.js +149 -0
  25. package/dist/features/process-configs/shortcircuit/index.d.ts +9 -0
  26. package/dist/features/process-configs/shortcircuit/index.js +9 -0
  27. package/dist/features/process-configs/shortcircuit/sc-process-config-edition.d.ts +1 -0
  28. package/dist/features/process-configs/shortcircuit/sc-process-config-edition.js +91 -0
  29. package/dist/features/process-configs/shortcircuit/sc-process-config-edition.utils.d.ts +39 -0
  30. package/dist/features/process-configs/shortcircuit/sc-process-config-edition.utils.js +109 -0
  31. package/dist/features/process-configs/shortcircuit/sc-process-config.type.d.ts +6 -0
  32. package/dist/features/process-configs/shortcircuit/sc-process-config.type.js +1 -0
  33. package/dist/index.js +9 -2
  34. package/dist/translations/en/networkModificationsEn.d.ts +6 -0
  35. package/dist/translations/en/networkModificationsEn.js +6 -0
  36. package/dist/translations/en/processConfigEn.d.ts +2 -0
  37. package/dist/translations/en/processConfigEn.js +2 -0
  38. package/dist/translations/fr/networkModificationsFr.d.ts +6 -0
  39. package/dist/translations/fr/networkModificationsFr.js +6 -0
  40. package/dist/translations/fr/processConfigFr.d.ts +2 -0
  41. package/dist/translations/fr/processConfigFr.js +2 -0
  42. package/dist/translations/fr/specificParameters.js +2 -2
  43. package/dist/utils/constants/fieldConstants.d.ts +1 -0
  44. package/dist/utils/constants/fieldConstants.js +1 -0
  45. package/package.json +1 -1
@@ -1,10 +1,14 @@
1
1
  import { object, string } from "yup";
2
2
  import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
3
- import "../../../../utils/conversionUtils.js";
4
- import "../../../../utils/types/equipmentType.js";
3
+ import { convertInputValue, toModificationOperation, convertOutputValue } from "../../../../utils/conversionUtils.js";
4
+ import { PHASE_REGULATION_MODES, RATIO_REGULATION_MODES } from "../../../../utils/types/equipmentType.js";
5
+ import { ModificationType } from "../../../../utils/types/modificationType.js";
6
+ import { FieldType } from "../../../../utils/types/fieldType.js";
7
+ import { addSelectedFieldToRows } from "../../../../utils/functions.js";
5
8
  import "react/jsx-runtime";
6
9
  import "@mui/icons-material";
7
- import { getBranchConnectivityWithPositionSchema, getBranchConnectivityWithPositionEmptyFormDataProps } from "../../common/connectivity/connectivityForm.utils.js";
10
+ import { sanitizeString } from "../../../../utils/ts-utils.js";
11
+ import { getBranchConnectivityWithPositionSchema, getBranchConnectivityWithPositionEmptyFormDataProps, getConnectivityFormDataProps } from "../../common/connectivity/connectivityForm.utils.js";
8
12
  import "@mui/material";
9
13
  import "react";
10
14
  import "react-intl";
@@ -31,8 +35,8 @@ import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
31
35
  import "mui-nested-menu";
32
36
  import "react-resizable-panels";
33
37
  import "react-papaparse";
34
- import { modificationPropertiesSchema } from "../../common/properties/propertyUtils.js";
35
- import { getLimitsValidationSchemaProps, getLimitsEmptyFormDataProps } from "../../common/currentLimits/limitsPane.utils.js";
38
+ import { modificationPropertiesSchema, getPropertiesFromModification, toModificationProperties } from "../../common/properties/propertyUtils.js";
39
+ import { getLimitsValidationSchemaProps, getLimitsEmptyFormDataProps, getAllLimitsFormData, formatOpLimitGroupsToFormInfos, addOperationTypeToSelectedOpLG, addModificationTypeToOpLimitsGroups } from "../../common/currentLimits/limitsPane.utils.js";
36
40
  import { getTwtCharacteristicsValidationSchemaProps, getTwtCharacteristicsEmptyFormData } from "../characteristics/twoWindingsTransformerCharacteristicsPane.utils.js";
37
41
  import "react-dom";
38
42
  import "autosuggest-highlight/match";
@@ -61,16 +65,170 @@ import "../../../../components/composite/report/report-viewer/log-table/log-tabl
61
65
  import "react-window";
62
66
  import "../../../../components/composite/report/report-treeview/treeview-item.js";
63
67
  import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
64
- import { getBranchActiveReactivePowerValidationSchemaObject, getBranchActiveReactivePowerEmptyFormDataProperties } from "../../common/measurements/branchActiveReactivePowerForm.utils.js";
68
+ import { getBranchActiveReactivePowerValidationSchemaObject, getBranchActiveReactivePowerEmptyFormDataProperties, getBranchActiveReactivePowerEditDataProperties } from "../../common/measurements/branchActiveReactivePowerForm.utils.js";
65
69
  import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
70
+ import { REGULATION_TYPES } from "../../common/voltageRegulation/voltageRegulation.utils.js";
66
71
  import "@mui/material/colors";
67
72
  import "@mui/x-charts";
68
- import "../tapChanger/tapChanger.utils.js";
73
+ import { OPERATIONAL_LIMITS_GROUPS_MODIFICATION_TYPE } from "../../common/currentLimits/operationalLimitsGroups/operationalLimitsGroups.types.js";
74
+ import { computeHighTapPosition, compareStepsWithPreviousValues, toTapChangerStepList } from "../tapChanger/tapChanger.utils.js";
69
75
  import "../tapChanger/regulationRule/CreateRuleForm.js";
70
76
  import "../tapChanger/regulationRule/CreateRuleDialog.js";
71
- import { getPhaseTapChangerValidationSchemaProps, getPhaseTapChangerEmptyFormData } from "../tapChanger/phaseTapChanger/phaseTapChanger.utils.js";
72
- import { getRatioTapChangerValidationSchemaProps, getRatioTapChangerEmptyFormData } from "../tapChanger/ratioTapChanger/ratioTapChanger.utils.js";
77
+ import { getPhaseTapChangerValidationSchemaProps, getPhaseTapChangerEmptyFormData, getPhaseTapChangerFormData, getComputedPhaseTapChangerRegulationMode, getComputedPreviousPhaseRegulationType } from "../tapChanger/phaseTapChanger/phaseTapChanger.utils.js";
78
+ import { getRatioTapChangerValidationSchemaProps, getRatioTapChangerEmptyFormData, getRatioTapChangerFormData, getComputedPreviousRatioRegulationType, computeRatioTapChangerRegulating } from "../tapChanger/ratioTapChanger/ratioTapChanger.utils.js";
73
79
  import { getToBeEstimatedValidationSchemaObject, toBeEstimatedEmptyFormData } from "./measurements/toBeEstimated.utils.js";
80
+ const getTapChangerEmptyModificationDto = (enabled) => ({
81
+ enabled: toModificationOperation(enabled),
82
+ regulationType: null,
83
+ regulationSide: null,
84
+ lowTapPosition: null,
85
+ tapPosition: null,
86
+ isRegulating: null,
87
+ targetDeadband: null,
88
+ terminalRefConnectableId: null,
89
+ terminalRefConnectableType: null,
90
+ terminalRefConnectableVlId: null,
91
+ steps: null,
92
+ hasLoadTapChangingCapabilities: null
93
+ });
94
+ const getRatioTapChangerEmptyModificationDto = (enabled) => ({
95
+ ...getTapChangerEmptyModificationDto(enabled),
96
+ targetV: null
97
+ });
98
+ const getPhaseTapChangerEmptyModificationDto = (enabled) => ({
99
+ ...getTapChangerEmptyModificationDto(enabled),
100
+ regulationMode: null,
101
+ regulationValue: null
102
+ });
103
+ const computeRatioTapChangerRegulationMode = (ratioTapForm) => {
104
+ if (ratioTapForm?.isRegulating?.value == null) {
105
+ return null;
106
+ }
107
+ if (ratioTapForm?.isRegulating?.value) {
108
+ return RATIO_REGULATION_MODES.VOLTAGE_REGULATION.id;
109
+ }
110
+ return RATIO_REGULATION_MODES.FIXED_RATIO.id;
111
+ };
112
+ const getRatioTapChangerModificationDto = (ratioTapForm, twtToModify, enabled, steps) => {
113
+ const ratioTap = getRatioTapChangerEmptyModificationDto(enabled);
114
+ ratioTap.hasLoadTapChangingCapabilities = toModificationOperation(ratioTapForm?.hasLoadTapChangingCapabilities);
115
+ ratioTap.tapPosition = toModificationOperation(ratioTapForm?.tapPosition);
116
+ ratioTap.lowTapPosition = toModificationOperation(ratioTapForm?.lowTapPosition);
117
+ ratioTap.steps = steps;
118
+ const hasLoadTapChangingCapabilities = ratioTapForm?.hasLoadTapChangingCapabilities ?? twtToModify?.ratioTapChanger?.hasLoadTapChangingCapabilities;
119
+ const regulationType = ratioTapForm?.regulationType ?? (twtToModify ? getComputedPreviousRatioRegulationType(twtToModify) : void 0);
120
+ if (hasLoadTapChangingCapabilities) {
121
+ ratioTap.regulationType = toModificationOperation(ratioTapForm?.regulationType);
122
+ ratioTap.isRegulating = toModificationOperation(
123
+ ratioTapForm?.regulationMode ? computeRatioTapChangerRegulating(ratioTapForm) : null
124
+ );
125
+ if (regulationType === REGULATION_TYPES.LOCAL.id) {
126
+ ratioTap.regulationSide = toModificationOperation(ratioTapForm?.regulationSide);
127
+ } else if (regulationType === REGULATION_TYPES.DISTANT.id) {
128
+ ratioTap.terminalRefConnectableId = toModificationOperation(ratioTapForm?.[FieldConstants.EQUIPMENT]?.id);
129
+ ratioTap.terminalRefConnectableType = toModificationOperation(
130
+ ratioTapForm?.[FieldConstants.EQUIPMENT]?.type
131
+ );
132
+ ratioTap.terminalRefConnectableVlId = toModificationOperation(ratioTapForm?.voltageLevel?.id);
133
+ }
134
+ ratioTap.targetV = toModificationOperation(ratioTapForm?.targetV != null ? Number(ratioTapForm.targetV) : null);
135
+ ratioTap.targetDeadband = toModificationOperation(
136
+ ratioTapForm?.targetDeadband != null ? Number(ratioTapForm.targetDeadband) : null
137
+ );
138
+ }
139
+ return ratioTap;
140
+ };
141
+ const computeRatioTapDto = (ratioTapForm, editData, twtToModify, isNodeBuilt = false) => {
142
+ const enableRatioTapChanger = ratioTapForm?.enabled !== !!twtToModify?.ratioTapChanger ? ratioTapForm?.enabled : null;
143
+ const areRatioStepsModified = isNodeBuilt && editData?.ratioTapChanger?.steps ? true : !compareStepsWithPreviousValues(
144
+ ratioTapForm?.steps,
145
+ toTapChangerStepList(twtToModify?.ratioTapChanger?.steps)
146
+ );
147
+ if (ratioTapForm?.enabled) {
148
+ const ratioTapChangerSteps = areRatioStepsModified ? (ratioTapForm?.steps ?? []).map((step) => ({
149
+ index: step.index,
150
+ r: step.r ?? 0,
151
+ x: step.x ?? 0,
152
+ g: step.g ?? 0,
153
+ b: step.b ?? 0,
154
+ rho: step.rho ?? 0
155
+ })) : null;
156
+ return getRatioTapChangerModificationDto(
157
+ ratioTapForm,
158
+ twtToModify,
159
+ enableRatioTapChanger,
160
+ ratioTapChangerSteps
161
+ );
162
+ }
163
+ return getRatioTapChangerEmptyModificationDto(enableRatioTapChanger);
164
+ };
165
+ const computePhaseTapChangerRegulationValue = (phaseTapForm, currentRegulationMode) => {
166
+ const regulationMode = phaseTapForm?.regulationMode || currentRegulationMode;
167
+ switch (regulationMode) {
168
+ case PHASE_REGULATION_MODES.ACTIVE_POWER_CONTROL.id:
169
+ return phaseTapForm?.flowSetPointRegulatingValue ?? void 0;
170
+ case PHASE_REGULATION_MODES.CURRENT_LIMITER.id:
171
+ return phaseTapForm?.currentLimiterRegulatingValue ?? void 0;
172
+ default:
173
+ return void 0;
174
+ }
175
+ };
176
+ const getPhaseTapChangerModificationDto = (phaseTapForm, twtToModify, enabled, steps) => {
177
+ const phaseTap = getPhaseTapChangerEmptyModificationDto(enabled);
178
+ phaseTap.isRegulating = toModificationOperation(
179
+ phaseTapForm?.regulationMode ? phaseTapForm?.regulationMode !== PHASE_REGULATION_MODES.OFF.id : null
180
+ );
181
+ phaseTap.regulationMode = toModificationOperation(
182
+ phaseTapForm?.regulationMode !== PHASE_REGULATION_MODES.OFF.id ? phaseTapForm?.regulationMode : null
183
+ );
184
+ phaseTap.tapPosition = toModificationOperation(phaseTapForm?.tapPosition);
185
+ phaseTap.lowTapPosition = toModificationOperation(phaseTapForm?.lowTapPosition);
186
+ phaseTap.steps = steps;
187
+ const regulationMode = phaseTapForm?.regulationMode ?? getComputedPhaseTapChangerRegulationMode(twtToModify?.phaseTapChanger)?.id;
188
+ const regulationType = phaseTapForm?.regulationType ?? (twtToModify ? getComputedPreviousPhaseRegulationType(twtToModify) : void 0);
189
+ if (regulationMode) {
190
+ phaseTap.regulationType = toModificationOperation(phaseTapForm?.regulationType);
191
+ if (regulationType === REGULATION_TYPES.LOCAL.id) {
192
+ phaseTap.regulationSide = toModificationOperation(phaseTapForm?.regulationSide);
193
+ } else if (regulationType === REGULATION_TYPES.DISTANT.id) {
194
+ phaseTap.terminalRefConnectableId = toModificationOperation(phaseTapForm?.[FieldConstants.EQUIPMENT]?.id);
195
+ phaseTap.terminalRefConnectableType = toModificationOperation(
196
+ phaseTapForm?.[FieldConstants.EQUIPMENT]?.type
197
+ );
198
+ phaseTap.terminalRefConnectableVlId = toModificationOperation(phaseTapForm?.voltageLevel?.id);
199
+ }
200
+ phaseTap.regulationValue = toModificationOperation(
201
+ computePhaseTapChangerRegulationValue(phaseTapForm, twtToModify?.phaseTapChanger?.regulationMode)
202
+ );
203
+ phaseTap.targetDeadband = toModificationOperation(phaseTapForm?.targetDeadband);
204
+ }
205
+ return phaseTap;
206
+ };
207
+ const computePhaseTapDto = (phaseTapForm, editData, twtToModify, isNodeBuilt = false) => {
208
+ const enablePhaseTapChanger = phaseTapForm?.enabled !== !!twtToModify?.phaseTapChanger ? phaseTapForm?.enabled : null;
209
+ const arePhaseStepsModified = isNodeBuilt && editData?.phaseTapChanger?.steps ? true : !compareStepsWithPreviousValues(
210
+ phaseTapForm?.steps,
211
+ toTapChangerStepList(twtToModify?.phaseTapChanger?.steps)
212
+ );
213
+ if (phaseTapForm?.enabled) {
214
+ const phaseTapChangerSteps = arePhaseStepsModified ? (phaseTapForm?.steps ?? []).map((step) => ({
215
+ index: step.index,
216
+ r: step.r ?? 0,
217
+ x: step.x ?? 0,
218
+ g: step.g ?? 0,
219
+ b: step.b ?? 0,
220
+ rho: step.rho ?? 0,
221
+ alpha: step.alpha ?? 0
222
+ })) : null;
223
+ return getPhaseTapChangerModificationDto(
224
+ phaseTapForm,
225
+ twtToModify,
226
+ enablePhaseTapChanger,
227
+ phaseTapChangerSteps
228
+ );
229
+ }
230
+ return getPhaseTapChangerEmptyModificationDto(enablePhaseTapChanger);
231
+ };
74
232
  const twoWindingsTransformerModificationFormSchema = object().shape({
75
233
  [FieldConstants.EQUIPMENT_ID]: string().required(),
76
234
  [FieldConstants.EQUIPMENT_NAME]: string().nullable(),
@@ -94,7 +252,152 @@ const twoWindingsTransformerModificationEmptyFormData = {
94
252
  [FieldConstants.PHASE_TAP_CHANGER]: getPhaseTapChangerEmptyFormData(true),
95
253
  AdditionalProperties: []
96
254
  };
255
+ const twoWindingsTransformerModificationDtoToForm = (twtDto, includePreviousValues = true) => {
256
+ const ratioTap = twtDto?.ratioTapChanger;
257
+ const phaseTap = twtDto?.phaseTapChanger;
258
+ return {
259
+ equipmentName: twtDto.equipmentName?.value,
260
+ equipmentID: twtDto.equipmentId,
261
+ connectivity: {
262
+ connectivity1: getConnectivityFormDataProps({
263
+ voltageLevelId: twtDto?.voltageLevelId1?.value ?? null,
264
+ busbarSectionId: twtDto?.busOrBusbarSectionId1?.value ?? null,
265
+ connectionName: twtDto?.connectionName1?.value ?? "",
266
+ connectionDirection: twtDto?.connectionDirection1?.value ?? null,
267
+ connectionPosition: twtDto?.connectionPosition1?.value ?? null,
268
+ terminalConnected: twtDto?.terminal1Connected?.value ?? null,
269
+ isEquipmentModification: true
270
+ }),
271
+ connectivity2: getConnectivityFormDataProps({
272
+ voltageLevelId: twtDto?.voltageLevelId2?.value ?? null,
273
+ busbarSectionId: twtDto?.busOrBusbarSectionId2?.value ?? null,
274
+ connectionName: twtDto?.connectionName2?.value ?? "",
275
+ connectionDirection: twtDto?.connectionDirection2?.value ?? null,
276
+ connectionPosition: twtDto?.connectionPosition2?.value ?? null,
277
+ terminalConnected: twtDto?.terminal2Connected?.value ?? null,
278
+ isEquipmentModification: true
279
+ })
280
+ },
281
+ characteristics: {
282
+ r: twtDto.r?.value ?? null,
283
+ x: twtDto.x?.value ?? null,
284
+ g: convertInputValue(FieldType.G, twtDto.g?.value),
285
+ b: convertInputValue(FieldType.B, twtDto.b?.value),
286
+ ratedU1: twtDto.ratedU1?.value ?? null,
287
+ ratedU2: twtDto.ratedU2?.value ?? null,
288
+ ratedS: twtDto.ratedS?.value ?? null
289
+ },
290
+ ...getPropertiesFromModification(twtDto?.properties, includePreviousValues),
291
+ stateEstimation: getBranchActiveReactivePowerEditDataProperties(twtDto),
292
+ toBeEstimated: {
293
+ ratioTapChangerStatus: twtDto.ratioTapChangerToBeEstimated?.value ?? null,
294
+ phaseTapChangerStatus: twtDto.phaseTapChangerToBeEstimated?.value ?? null
295
+ },
296
+ ...getAllLimitsFormData(
297
+ formatOpLimitGroupsToFormInfos(twtDto.operationalLimitsGroups),
298
+ twtDto.selectedOperationalLimitsGroupId1?.value ?? null,
299
+ twtDto.selectedOperationalLimitsGroupId2?.value ?? null,
300
+ twtDto.enableOLGModification
301
+ ),
302
+ ...getRatioTapChangerFormData({
303
+ enabled: ratioTap?.enabled?.value,
304
+ hasLoadTapChangingCapabilities: ratioTap?.hasLoadTapChangingCapabilities?.value ?? null,
305
+ regulationMode: computeRatioTapChangerRegulationMode(ratioTap),
306
+ regulationType: ratioTap?.regulationType?.value,
307
+ regulationSide: ratioTap?.regulationSide?.value ?? null,
308
+ targetV: ratioTap?.targetV?.value,
309
+ targetDeadband: ratioTap?.targetDeadband?.value,
310
+ lowTapPosition: ratioTap?.lowTapPosition?.value,
311
+ highTapPosition: computeHighTapPosition(ratioTap?.steps ?? []),
312
+ tapPosition: ratioTap?.tapPosition?.value,
313
+ steps: addSelectedFieldToRows(ratioTap?.steps ?? []),
314
+ equipmentId: ratioTap?.terminalRefConnectableId?.value,
315
+ equipmentType: ratioTap?.terminalRefConnectableType?.value,
316
+ voltageLevelId: ratioTap?.terminalRefConnectableVlId?.value
317
+ }),
318
+ ...getPhaseTapChangerFormData({
319
+ enabled: phaseTap?.enabled?.value,
320
+ regulationMode: phaseTap?.isRegulating?.value ? phaseTap?.regulationMode?.value : PHASE_REGULATION_MODES.OFF.id,
321
+ regulationType: phaseTap?.regulationType?.value,
322
+ regulationSide: phaseTap?.regulationSide?.value ?? null,
323
+ currentLimiterRegulatingValue: phaseTap?.regulationMode?.value === PHASE_REGULATION_MODES.CURRENT_LIMITER.id ? phaseTap?.regulationValue?.value : void 0,
324
+ flowSetpointRegulatingValue: phaseTap?.regulationMode?.value === PHASE_REGULATION_MODES.ACTIVE_POWER_CONTROL.id ? phaseTap?.regulationValue?.value : void 0,
325
+ targetDeadband: phaseTap?.targetDeadband?.value,
326
+ lowTapPosition: phaseTap?.lowTapPosition?.value,
327
+ highTapPosition: computeHighTapPosition(phaseTap?.steps ?? []),
328
+ tapPosition: phaseTap?.tapPosition?.value,
329
+ steps: addSelectedFieldToRows(phaseTap?.steps ?? []),
330
+ equipmentID: phaseTap?.terminalRefConnectableId?.value,
331
+ equipmentType: phaseTap?.terminalRefConnectableType?.value,
332
+ voltageLevelId: phaseTap?.terminalRefConnectableVlId?.value
333
+ })
334
+ };
335
+ };
336
+ const twoWindingsTransformerModificationFormToDto = (twtForm, editData, intl, twtToModify, isNodeBuilt = false) => {
337
+ const connectivity1 = twtForm.connectivity?.connectivity1;
338
+ const connectivity2 = twtForm.connectivity?.connectivity2;
339
+ const { characteristics, limits } = twtForm;
340
+ const enableOlg = Boolean(limits.enableOLGModification);
341
+ return {
342
+ type: ModificationType.TWO_WINDINGS_TRANSFORMER_MODIFICATION,
343
+ equipmentId: twtForm.equipmentID,
344
+ equipmentName: toModificationOperation(sanitizeString(twtForm.equipmentName)),
345
+ properties: toModificationProperties(twtForm),
346
+ r: toModificationOperation(characteristics?.r),
347
+ x: toModificationOperation(characteristics?.x),
348
+ operationalLimitsGroupsModificationType: enableOlg ? OPERATIONAL_LIMITS_GROUPS_MODIFICATION_TYPE.REPLACE : null,
349
+ enableOLGModification: enableOlg,
350
+ operationalLimitsGroups: enableOlg ? addModificationTypeToOpLimitsGroups(
351
+ limits.operationalLimitsGroups ?? []
352
+ ) : [],
353
+ selectedOperationalLimitsGroupId1: addOperationTypeToSelectedOpLG(
354
+ limits?.selectedOperationalLimitsGroupId1,
355
+ intl.formatMessage({
356
+ id: "None"
357
+ })
358
+ ),
359
+ selectedOperationalLimitsGroupId2: addOperationTypeToSelectedOpLG(
360
+ limits?.selectedOperationalLimitsGroupId2,
361
+ intl.formatMessage({
362
+ id: "None"
363
+ })
364
+ ),
365
+ voltageLevelId1: toModificationOperation(connectivity1?.voltageLevel?.id),
366
+ voltageLevelId2: toModificationOperation(connectivity2?.voltageLevel?.id),
367
+ busOrBusbarSectionId1: toModificationOperation(connectivity1?.busOrBusbarSection?.id),
368
+ busOrBusbarSectionId2: toModificationOperation(connectivity2?.busOrBusbarSection?.id),
369
+ connectionName1: toModificationOperation(sanitizeString(connectivity1?.connectionName)),
370
+ connectionName2: toModificationOperation(sanitizeString(connectivity2?.connectionName)),
371
+ connectionDirection1: toModificationOperation(connectivity1?.connectionDirection),
372
+ connectionDirection2: toModificationOperation(connectivity2?.connectionDirection),
373
+ connectionPosition1: toModificationOperation(connectivity1?.connectionPosition),
374
+ connectionPosition2: toModificationOperation(connectivity2?.connectionPosition),
375
+ terminal1Connected: toModificationOperation(connectivity1?.terminalConnected),
376
+ terminal2Connected: toModificationOperation(connectivity2?.terminalConnected),
377
+ p1MeasurementValue: toModificationOperation(twtForm.stateEstimation?.measurementP1?.value),
378
+ p1MeasurementValidity: toModificationOperation(twtForm.stateEstimation?.measurementP1?.validity),
379
+ q1MeasurementValue: toModificationOperation(twtForm.stateEstimation?.measurementQ1?.value),
380
+ q1MeasurementValidity: toModificationOperation(twtForm.stateEstimation?.measurementQ1?.validity),
381
+ p2MeasurementValue: toModificationOperation(twtForm.stateEstimation?.measurementP2?.value),
382
+ p2MeasurementValidity: toModificationOperation(twtForm.stateEstimation?.measurementP2?.validity),
383
+ q2MeasurementValue: toModificationOperation(twtForm.stateEstimation?.measurementQ2?.value),
384
+ q2MeasurementValidity: toModificationOperation(twtForm.stateEstimation?.measurementQ2?.validity),
385
+ g: toModificationOperation(convertOutputValue(FieldType.G, characteristics?.g)),
386
+ b: toModificationOperation(convertOutputValue(FieldType.B, characteristics?.b)),
387
+ ratedS: toModificationOperation(characteristics?.ratedS),
388
+ ratedU1: toModificationOperation(characteristics?.ratedU1),
389
+ ratedU2: toModificationOperation(characteristics?.ratedU2),
390
+ ratioTapChanger: computeRatioTapDto(twtForm.ratioTapChanger, editData, twtToModify, isNodeBuilt),
391
+ phaseTapChanger: computePhaseTapDto(twtForm.phaseTapChanger, editData, twtToModify, isNodeBuilt),
392
+ ratioTapChangerToBeEstimated: toModificationOperation(twtForm?.toBeEstimated?.ratioTapChangerStatus),
393
+ phaseTapChangerToBeEstimated: toModificationOperation(twtForm?.toBeEstimated?.phaseTapChangerStatus)
394
+ };
395
+ };
97
396
  export {
397
+ getPhaseTapChangerEmptyModificationDto,
398
+ getRatioTapChangerEmptyModificationDto,
399
+ twoWindingsTransformerModificationDtoToForm,
98
400
  twoWindingsTransformerModificationEmptyFormData,
99
- twoWindingsTransformerModificationFormSchema
401
+ twoWindingsTransformerModificationFormSchema,
402
+ twoWindingsTransformerModificationFormToDto
100
403
  };
@@ -7,7 +7,7 @@ import { ImportRuleDialog } from "./regulationRule/ImportRuleDialog.js";
7
7
  import { getComputedPhaseRegulationType, getComputedPhaseRegulationTypeId, getComputedPhaseTapChangerRegulationMode, getComputedPreviousPhaseRegulationType, getPhaseTapChangerEmptyFormData, getPhaseTapChangerFormData, getPhaseTapChangerValidationSchemaProps, getPhaseTapRegulationSideId } from "./phaseTapChanger/phaseTapChanger.utils.js";
8
8
  import { PhaseTapChangerPaneSteps } from "./phaseTapChanger/PhaseTapChangerPaneSteps.js";
9
9
  import { PhaseTapChangerPane } from "./phaseTapChanger/PhaseTapChangerPane.js";
10
- import { getComputedPreviousRatioRegulationType, getComputedRegulationMode, getComputedRegulationModeId, getComputedRegulationType, getComputedRegulationTypeId, getComputedTapSide, getComputedTapSideId, getInitialTwtRatioRegulationModeId, getRatioTapChangerEmptyFormData, getRatioTapChangerFormData, getRatioTapChangerValidationSchemaProps } from "./ratioTapChanger/ratioTapChanger.utils.js";
10
+ import { computeRatioTapChangerRegulating, getComputedPreviousRatioRegulationType, getComputedRegulationMode, getComputedRegulationModeId, getComputedRegulationType, getComputedRegulationTypeId, getComputedTapSide, getComputedTapSideId, getInitialTwtRatioRegulationModeId, getRatioTapChangerEmptyFormData, getRatioTapChangerFormData, getRatioTapChangerValidationSchemaProps } from "./ratioTapChanger/ratioTapChanger.utils.js";
11
11
  import { RatioTapChangerPaneSteps } from "./ratioTapChanger/RatioTapChangerPaneSteps.js";
12
12
  import { RatioTapChangerPane } from "./ratioTapChanger/RatioTapChangerPane.js";
13
13
  import { RegulatedTerminalSection } from "./RegulatedTerminalSection.js";
@@ -25,6 +25,7 @@ export {
25
25
  TapChangerSteps,
26
26
  compareStepsWithPreviousValues,
27
27
  computeHighTapPosition,
28
+ computeRatioTapChangerRegulating,
28
29
  getComputedPhaseRegulationType,
29
30
  getComputedPhaseRegulationTypeId,
30
31
  getComputedPhaseTapChangerRegulationMode,
@@ -1,9 +1,10 @@
1
- import { getComputedPreviousRatioRegulationType, getComputedRegulationMode, getComputedRegulationModeId, getComputedRegulationType, getComputedRegulationTypeId, getComputedTapSide, getComputedTapSideId, getInitialTwtRatioRegulationModeId, getRatioTapChangerEmptyFormData, getRatioTapChangerFormData, getRatioTapChangerValidationSchemaProps } from "./ratioTapChanger.utils.js";
1
+ import { computeRatioTapChangerRegulating, getComputedPreviousRatioRegulationType, getComputedRegulationMode, getComputedRegulationModeId, getComputedRegulationType, getComputedRegulationTypeId, getComputedTapSide, getComputedTapSideId, getInitialTwtRatioRegulationModeId, getRatioTapChangerEmptyFormData, getRatioTapChangerFormData, getRatioTapChangerValidationSchemaProps } from "./ratioTapChanger.utils.js";
2
2
  import { RatioTapChangerPaneSteps } from "./RatioTapChangerPaneSteps.js";
3
3
  import { RatioTapChangerPane } from "./RatioTapChangerPane.js";
4
4
  export {
5
5
  RatioTapChangerPane,
6
6
  RatioTapChangerPaneSteps,
7
+ computeRatioTapChangerRegulating,
7
8
  getComputedPreviousRatioRegulationType,
8
9
  getComputedRegulationMode,
9
10
  getComputedRegulationModeId,
@@ -129,4 +129,5 @@ export declare const getComputedTapSide: (twt: TwoWindingsTransformerMapInfos) =
129
129
  readonly label: "RegulatedSide2";
130
130
  } | null;
131
131
  export declare const getComputedTapSideId: (twt: TwoWindingsTransformerMapInfos) => "SIDE1" | "SIDE2" | null;
132
+ export declare const computeRatioTapChangerRegulating: (ratioTapChangerFormValues: RatioTapChangerFormSchema) => boolean;
132
133
  export {};
@@ -196,7 +196,11 @@ const getComputedTapSide = (twt) => {
196
196
  const getComputedTapSideId = (twt) => {
197
197
  return getComputedTapSide(twt)?.id || null;
198
198
  };
199
+ const computeRatioTapChangerRegulating = (ratioTapChangerFormValues) => {
200
+ return ratioTapChangerFormValues?.regulationMode === RATIO_REGULATION_MODES.VOLTAGE_REGULATION.id;
201
+ };
199
202
  export {
203
+ computeRatioTapChangerRegulating,
200
204
  getComputedPreviousRatioRegulationType,
201
205
  getComputedRegulationMode,
202
206
  getComputedRegulationModeId,
@@ -56,6 +56,7 @@ function LimitReductionsTableForm({ limits }) {
56
56
  {
57
57
  formName: LIMIT_REDUCTIONS_FORM,
58
58
  columnsDefinition,
59
+ tableHeight: 450,
59
60
  tableMinWidth: 600,
60
61
  limits
61
62
  }
@@ -41,7 +41,8 @@ const styles = {
41
41
  height: "100%"
42
42
  },
43
43
  title: {
44
- paddingBottom: 0
44
+ padding: 2,
45
+ paddingLeft: 0
45
46
  },
46
47
  content: {
47
48
  flexGrow: 1,
@@ -78,32 +79,30 @@ function ParameterLayout({
78
79
  }, []);
79
80
  const intl = useIntl();
80
81
  return /* @__PURE__ */ jsxs(Stack, { sx: styles.stack, children: [
81
- (title || selectParameterHandler || resetHandler) && /* @__PURE__ */ jsxs(Stack, { sx: styles.title, children: [
82
- /* @__PURE__ */ jsxs(Grid, { container: true, sx: { alignItems: "center", justifyContent: "space-between" }, paddingBottom: 1, children: [
83
- /* @__PURE__ */ jsx(Grid, { size: "auto", children: title && !isXsScreen && /* @__PURE__ */ jsx(Typography, { variant: "h6", children: /* @__PURE__ */ jsx(FormattedMessage, { id: title }) }) }),
84
- /* @__PURE__ */ jsx(Grid, { size: "auto", children: /* @__PURE__ */ jsxs(ButtonGroup, { children: [
85
- selectParameterHandler && /* @__PURE__ */ jsx(
86
- LabelledButton,
87
- {
88
- callback: handlePrefillClick,
89
- label: "button.prefill",
90
- "data-testid": "PrefillButton",
91
- startIcon: /* @__PURE__ */ jsx(Upload, {})
92
- }
93
- ),
94
- resetHandler && /* @__PURE__ */ jsx(Tooltip, { title: /* @__PURE__ */ jsx(FormattedMessage, { id: "tooltip.reset" }), children: /* @__PURE__ */ jsx(
95
- LabelledButton,
96
- {
97
- callback: handleResetClick,
98
- label: "button.reset",
99
- "data-testid": "ResetButton",
100
- startIcon: /* @__PURE__ */ jsx(RestartAlt, {})
101
- }
102
- ) })
103
- ] }) })
104
- ] }),
105
- /* @__PURE__ */ jsx(LineSeparator, {})
106
- ] }),
82
+ (title || selectParameterHandler || resetHandler) && /* @__PURE__ */ jsx(Stack, { sx: styles.title, children: /* @__PURE__ */ jsxs(Grid, { container: true, sx: { alignItems: "center", justifyContent: "space-between" }, children: [
83
+ /* @__PURE__ */ jsx(Grid, { size: "auto", children: title && !isXsScreen && /* @__PURE__ */ jsx(Typography, { variant: "h6", children: /* @__PURE__ */ jsx(FormattedMessage, { id: title }) }) }),
84
+ /* @__PURE__ */ jsx(Grid, { size: "auto", children: /* @__PURE__ */ jsxs(ButtonGroup, { children: [
85
+ selectParameterHandler && /* @__PURE__ */ jsx(
86
+ LabelledButton,
87
+ {
88
+ callback: handlePrefillClick,
89
+ label: "button.prefill",
90
+ "data-testid": "PrefillButton",
91
+ startIcon: /* @__PURE__ */ jsx(Upload, {})
92
+ }
93
+ ),
94
+ resetHandler && /* @__PURE__ */ jsx(Tooltip, { title: /* @__PURE__ */ jsx(FormattedMessage, { id: "tooltip.reset" }), children: /* @__PURE__ */ jsx(
95
+ LabelledButton,
96
+ {
97
+ callback: handleResetClick,
98
+ label: "button.reset",
99
+ "data-testid": "ResetButton",
100
+ startIcon: /* @__PURE__ */ jsx(RestartAlt, {})
101
+ }
102
+ ) })
103
+ ] }) })
104
+ ] }) }),
105
+ /* @__PURE__ */ jsx(LineSeparator, {}),
107
106
  /* @__PURE__ */ jsx(Box, { sx: styles.content, children: isLoading ? /* @__PURE__ */ jsx(LinearProgress, {}) : children }),
108
107
  /* @__PURE__ */ jsxs(Stack, { spacing: 1, children: [
109
108
  /* @__PURE__ */ jsx(LineSeparator, {}),
@@ -1,7 +1,8 @@
1
1
  import { UUID } from 'node:crypto';
2
2
  export declare enum ProcessType {
3
3
  SECURITY_ANALYSIS = "SECURITY_ANALYSIS",
4
- LOADFLOW = "LOADFLOW"
4
+ LOADFLOW = "LOADFLOW",
5
+ SHORT_CIRCUIT = "SHORT_CIRCUIT"
5
6
  }
6
7
  export interface ModificationInfo {
7
8
  modificationUuid: UUID;
@@ -1,6 +1,7 @@
1
1
  var ProcessType = /* @__PURE__ */ ((ProcessType2) => {
2
2
  ProcessType2["SECURITY_ANALYSIS"] = "SECURITY_ANALYSIS";
3
3
  ProcessType2["LOADFLOW"] = "LOADFLOW";
4
+ ProcessType2["SHORT_CIRCUIT"] = "SHORT_CIRCUIT";
4
5
  return ProcessType2;
5
6
  })(ProcessType || {});
6
7
  export {
@@ -9,3 +9,4 @@ export * from './process-config.type';
9
9
  export * from './process-config.utils';
10
10
  export * from './lf-process-config-edition-dialog';
11
11
  export * from './sa-process-config-edition-dialog';
12
+ export * from './sc-process-config-edition-dialog';
@@ -4,11 +4,13 @@ import { ProcessConfigModificationsEdition } from "./common/process-config-modif
4
4
  import { isProcessType } from "./process-config.utils.js";
5
5
  import { LFProcessConfigEditionDialog } from "./lf-process-config-edition-dialog.js";
6
6
  import { SAProcessConfigEditionDialog } from "./sa-process-config-edition-dialog.js";
7
+ import { SCProcessConfigEditionDialog } from "./sc-process-config-edition-dialog.js";
7
8
  export {
8
9
  LFProcessConfigEditionDialog,
9
10
  ProcessConfigModificationsEdition,
10
11
  ProcessType,
11
12
  SAProcessConfigEditionDialog,
13
+ SCProcessConfigEditionDialog,
12
14
  emptyProcessConfigModificationsFormData,
13
15
  getProcessConfigModificationsBackendFromFormData,
14
16
  getProcessConfigModificationsFormData,
@@ -2,9 +2,11 @@ import { UUID } from 'node:crypto';
2
2
  import { SecurityAnalysisProcessConfigBackend } from './security-analysis';
3
3
  import { LoadflowProcessConfigBackend } from './loadflow';
4
4
  import { ProcessType } from './common';
5
+ import { ShortcircuitProcessConfigBackend } from './shortcircuit';
5
6
  type ProcessConfigBackendByProcessType = {
6
7
  [ProcessType.SECURITY_ANALYSIS]: SecurityAnalysisProcessConfigBackend;
7
8
  [ProcessType.LOADFLOW]: LoadflowProcessConfigBackend;
9
+ [ProcessType.SHORT_CIRCUIT]: ShortcircuitProcessConfigBackend;
8
10
  };
9
11
  export type ProcessConfigBackend<TProcessType extends ProcessType> = ProcessConfigBackendByProcessType[TProcessType];
10
12
  export type PersistedProcessConfigBackend<TProcessType extends ProcessType> = {
@@ -0,0 +1,3 @@
1
+ import { ProcessType } from './common';
2
+ import { ProcessConfigEditionDialogProps } from './process-config-edition.utils';
3
+ export declare function SCProcessConfigEditionDialog({ processConfigUuid, processConfigName, description, directory, open, onClose, fetchProcessConfig, updateProcessConfig, }: Readonly<ProcessConfigEditionDialogProps<ProcessType.SHORT_CIRCUIT>>): import("react").JSX.Element;