@gridsuite/commons-ui 0.284.0 → 0.285.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 (73) hide show
  1. package/dist/components/ui/reactHookForm/utils/HelperPreviousValue.js +1 -1
  2. package/dist/features/index.js +48 -6
  3. package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.d.ts +2 -2
  4. package/dist/features/network-modifications/common/index.js +2 -5
  5. package/dist/features/network-modifications/common/measurements/PowerMeasurementsForm.js +3 -9
  6. package/dist/features/network-modifications/common/measurements/branchActiveReactivePowerForm.utils.d.ts +4 -17
  7. package/dist/features/network-modifications/common/measurements/branchActiveReactivePowerForm.utils.js +0 -8
  8. package/dist/features/network-modifications/common/measurements/index.js +1 -2
  9. package/dist/features/network-modifications/common/measurements/injectionActiveReactivePowerForm.utils.d.ts +6 -9
  10. package/dist/features/network-modifications/common/measurements/measurement.type.d.ts +7 -1
  11. package/dist/features/network-modifications/common/measurements/powerWithValidity.utils.d.ts +3 -3
  12. package/dist/features/network-modifications/common/reactiveLimits/index.js +1 -3
  13. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/index.js +1 -3
  14. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/reactiveCapability.utils.d.ts +0 -4
  15. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/reactiveCapability.utils.js +0 -8
  16. package/dist/features/network-modifications/common/reactiveLimits/reactiveLimits.type.d.ts +1 -0
  17. package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.d.ts +2 -2
  18. package/dist/features/network-modifications/hvdcLine/index.d.ts +7 -0
  19. package/dist/features/network-modifications/hvdcLine/index.js +47 -0
  20. package/dist/features/network-modifications/hvdcLine/vsc/common/characteristics/VscHvdcLineCharacteristicsPane.d.ts +8 -0
  21. package/dist/features/network-modifications/hvdcLine/vsc/common/characteristics/VscHvdcLineCharacteristicsPane.js +235 -0
  22. package/dist/features/network-modifications/hvdcLine/vsc/common/characteristics/index.d.ts +8 -0
  23. package/dist/features/network-modifications/hvdcLine/vsc/common/characteristics/index.js +11 -0
  24. package/dist/features/network-modifications/hvdcLine/vsc/common/characteristics/vscHvdcLineCharacteristicsPane.utils.d.ts +67 -0
  25. package/dist/features/network-modifications/hvdcLine/vsc/common/characteristics/vscHvdcLineCharacteristicsPane.utils.js +106 -0
  26. package/dist/features/network-modifications/hvdcLine/vsc/common/converterStation/VscConverterStationPane.d.ts +12 -0
  27. package/dist/features/network-modifications/hvdcLine/vsc/common/converterStation/VscConverterStationPane.js +198 -0
  28. package/dist/features/network-modifications/hvdcLine/vsc/common/converterStation/index.d.ts +8 -0
  29. package/dist/features/network-modifications/hvdcLine/vsc/common/converterStation/index.js +13 -0
  30. package/dist/features/network-modifications/hvdcLine/vsc/common/converterStation/vscConverterStationPane.utils.d.ts +156 -0
  31. package/dist/features/network-modifications/hvdcLine/vsc/common/converterStation/vscConverterStationPane.utils.js +199 -0
  32. package/dist/features/network-modifications/hvdcLine/vsc/common/form/VscHvdcLineDialogHeader.d.ts +6 -0
  33. package/dist/features/network-modifications/hvdcLine/vsc/common/form/VscHvdcLineDialogHeader.js +106 -0
  34. package/dist/features/network-modifications/hvdcLine/vsc/common/form/VscHvdcLineDialogTabs.d.ts +9 -0
  35. package/dist/features/network-modifications/hvdcLine/vsc/common/form/VscHvdcLineDialogTabs.js +129 -0
  36. package/dist/features/network-modifications/hvdcLine/vsc/common/form/VscHvdcLineDialogTabsContent.d.ts +10 -0
  37. package/dist/features/network-modifications/hvdcLine/vsc/common/form/VscHvdcLineDialogTabsContent.js +139 -0
  38. package/dist/features/network-modifications/hvdcLine/vsc/common/form/VscHvdcLineForm.d.ts +11 -0
  39. package/dist/features/network-modifications/hvdcLine/vsc/common/form/VscHvdcLineForm.js +43 -0
  40. package/dist/features/network-modifications/hvdcLine/vsc/common/form/index.d.ts +11 -0
  41. package/dist/features/network-modifications/hvdcLine/vsc/common/form/index.js +13 -0
  42. package/dist/features/network-modifications/hvdcLine/vsc/common/form/vscHvdcLine.utils.d.ts +8 -0
  43. package/dist/features/network-modifications/hvdcLine/vsc/common/form/vscHvdcLine.utils.js +34 -0
  44. package/dist/features/network-modifications/hvdcLine/vsc/common/index.d.ts +10 -0
  45. package/dist/features/network-modifications/hvdcLine/vsc/common/index.js +36 -0
  46. package/dist/features/network-modifications/hvdcLine/vsc/common/vscHvdcLine.types.d.ts +52 -0
  47. package/dist/features/network-modifications/hvdcLine/vsc/common/vscHvdcLine.types.js +25 -0
  48. package/dist/features/network-modifications/hvdcLine/vsc/creation/index.d.ts +8 -0
  49. package/dist/features/network-modifications/hvdcLine/vsc/creation/index.js +7 -0
  50. package/dist/features/network-modifications/hvdcLine/vsc/creation/vscHvdcLineCreation.types.d.ts +45 -0
  51. package/dist/features/network-modifications/hvdcLine/vsc/creation/vscHvdcLineCreation.types.js +1 -0
  52. package/dist/features/network-modifications/hvdcLine/vsc/creation/vscHvdcLineCreation.utils.d.ts +159 -0
  53. package/dist/features/network-modifications/hvdcLine/vsc/creation/vscHvdcLineCreation.utils.js +88 -0
  54. package/dist/features/network-modifications/hvdcLine/vsc/index.d.ts +9 -0
  55. package/dist/features/network-modifications/hvdcLine/vsc/index.js +47 -0
  56. package/dist/features/network-modifications/hvdcLine/vsc/modification/index.d.ts +8 -0
  57. package/dist/features/network-modifications/hvdcLine/vsc/modification/index.js +8 -0
  58. package/dist/features/network-modifications/hvdcLine/vsc/modification/vscHvdcLineModification.types.d.ts +49 -0
  59. package/dist/features/network-modifications/hvdcLine/vsc/modification/vscHvdcLineModification.types.js +1 -0
  60. package/dist/features/network-modifications/hvdcLine/vsc/modification/vscHvdcLineModification.utils.d.ts +230 -0
  61. package/dist/features/network-modifications/hvdcLine/vsc/modification/vscHvdcLineModification.utils.js +145 -0
  62. package/dist/features/network-modifications/index.d.ts +1 -0
  63. package/dist/features/network-modifications/index.js +48 -6
  64. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-tabs.js +3 -3
  65. package/dist/hooks/useModificationLabelComputer.js +7 -5
  66. package/dist/index.js +48 -6
  67. package/dist/translations/en/networkModificationsEn.d.ts +23 -4
  68. package/dist/translations/en/networkModificationsEn.js +23 -4
  69. package/dist/translations/fr/networkModificationsFr.d.ts +23 -4
  70. package/dist/translations/fr/networkModificationsFr.js +23 -4
  71. package/dist/utils/constants/fieldConstants.d.ts +15 -0
  72. package/dist/utils/constants/fieldConstants.js +15 -0
  73. package/package.json +1 -1
@@ -0,0 +1,235 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { useEffect } from "react";
3
+ import { Grid } from "@mui/material";
4
+ import { useFormContext, useWatch } from "react-hook-form";
5
+ import { useIntl } from "react-intl";
6
+ import { VSC_CONVERTER_MODE } from "../vscHvdcLine.types.js";
7
+ import { VoltageAdornment, OhmAdornment, ActivePowerAdornment } from "../../../../../../utils/constants/adornments.js";
8
+ import { FieldConstants } from "../../../../../../utils/constants/fieldConstants.js";
9
+ import "../../../../../../utils/conversionUtils.js";
10
+ import "../../../../../../utils/types/equipmentType.js";
11
+ import "@mui/icons-material";
12
+ import "../../../../../../components/ui/overflowableText/OverflowableText.js";
13
+ import "localized-countries";
14
+ import "localized-countries/data/fr";
15
+ import "localized-countries/data/en";
16
+ import "notistack";
17
+ import "../../../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
18
+ import "yup";
19
+ import "../../../../../../components/ui/treeViewFinder/TreeViewFinder.js";
20
+ import { SwitchInput } from "../../../../../../components/ui/reactHookForm/booleans/SwitchInput.js";
21
+ import { FloatInput } from "../../../../../../components/ui/reactHookForm/numbers/FloatInput.js";
22
+ import "../../../../../../components/ui/reactHookForm/numbers/RangeInput.js";
23
+ import { SelectInput } from "../../../../../../components/ui/reactHookForm/selectInputs/SelectInput.js";
24
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
25
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
26
+ import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
27
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
28
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
29
+ import "../../../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
30
+ import "../../../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
31
+ import { CheckboxNullableInput } from "../../../../../../components/ui/reactHookForm/CheckboxNullableInput.js";
32
+ import "../../../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
33
+ import "@hello-pangea/dnd";
34
+ import "../../../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
35
+ import "../../../../../../components/ui/snackbarProvider/SnackbarProvider.js";
36
+ import "mui-nested-menu";
37
+ import "react-resizable-panels";
38
+ import "react-papaparse";
39
+ import "react-dom";
40
+ import "autosuggest-highlight/match";
41
+ import "autosuggest-highlight/parse";
42
+ import "clsx";
43
+ import "../../../../../../components/composite/filter/FilterCreationDialog.js";
44
+ import "../../../../../../components/composite/filter/HeaderFilterForm.js";
45
+ import "../../../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
46
+ import "../../../../../../components/composite/filter/expert/ExpertFilterForm.js";
47
+ import "../../../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
48
+ import "../../../../../../components/composite/filter/expert/expertFilterConstants.js";
49
+ import "react-querybuilder";
50
+ import "uuid";
51
+ import "../../../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
52
+ import "../../../../../../components/composite/filter/utils/filterFormUtils.js";
53
+ import { GridItem } from "../../../../../../components/composite/grid/grid-item.js";
54
+ import { GridSection } from "../../../../../../components/composite/grid/grid-section.js";
55
+ import "@react-querybuilder/material";
56
+ import "../../../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
57
+ import "../../../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
58
+ import "../../../../../../components/composite/agGridTable/BottomTableButtons.js";
59
+ import "../../../../../../components/composite/agGridTable/CustomAgGridTable.js";
60
+ import "ag-grid-community";
61
+ import "../../../../../../components/composite/customAGGrid/customAggrid.js";
62
+ import "../../../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
63
+ import "mathjs";
64
+ import "../../../../../../components/composite/report/report-viewer/log-table/log-table.js";
65
+ import "react-window";
66
+ import "../../../../../../components/composite/report/report-treeview/treeview-item.js";
67
+ import "../../../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
68
+ import { PropertiesForm } from "../../../../common/properties/PropertiesForm.js";
69
+ import "../../../../common/properties/propertyUtils.js";
70
+ function VscHvdcLineCharacteristicsPane({
71
+ id = FieldConstants.HVDC_LINE,
72
+ isModification = false,
73
+ hvdcLineToModify
74
+ }) {
75
+ const intl = useIntl();
76
+ const { trigger } = useFormContext();
77
+ const angleDroopWatch = useWatch({
78
+ name: `${id}.${FieldConstants.ANGLE_DROOP_ACTIVE_POWER_CONTROL}`
79
+ });
80
+ useEffect(() => {
81
+ if (!angleDroopWatch) {
82
+ trigger(`${id}.${FieldConstants.P0}`);
83
+ trigger(`${id}.${FieldConstants.DROOP}`);
84
+ }
85
+ }, [angleDroopWatch, trigger, id]);
86
+ const dcNominalVoltageField = /* @__PURE__ */ jsx(
87
+ FloatInput,
88
+ {
89
+ name: `${id}.${FieldConstants.NOMINAL_V}`,
90
+ adornment: VoltageAdornment,
91
+ label: "dcNominalVoltageLabel",
92
+ previousValue: hvdcLineToModify?.nominalV
93
+ }
94
+ );
95
+ const dcResistanceField = /* @__PURE__ */ jsx(
96
+ FloatInput,
97
+ {
98
+ name: `${id}.${FieldConstants.R}`,
99
+ adornment: OhmAdornment,
100
+ label: "dcResistanceLabel",
101
+ previousValue: hvdcLineToModify?.r
102
+ }
103
+ );
104
+ const maximumActivePowerField = /* @__PURE__ */ jsx(
105
+ FloatInput,
106
+ {
107
+ name: `${id}.${FieldConstants.MAX_P}`,
108
+ adornment: ActivePowerAdornment,
109
+ label: "MaximumActivePowerText",
110
+ previousValue: hvdcLineToModify?.maxP
111
+ }
112
+ );
113
+ const operatorActivePowerLimitSide1Field = /* @__PURE__ */ jsx(
114
+ FloatInput,
115
+ {
116
+ name: `${id}.${FieldConstants.OPERATOR_ACTIVE_POWER_LIMIT_SIDE1}`,
117
+ adornment: ActivePowerAdornment,
118
+ label: "operatorActivePowerLimitSide1Label",
119
+ previousValue: hvdcLineToModify?.hvdcOperatorActivePowerRange?.oprFromCS1toCS2
120
+ }
121
+ );
122
+ const operatorActivePowerLimitSide2Field = /* @__PURE__ */ jsx(
123
+ FloatInput,
124
+ {
125
+ name: `${id}.${FieldConstants.OPERATOR_ACTIVE_POWER_LIMIT_SIDE2}`,
126
+ adornment: ActivePowerAdornment,
127
+ label: "operatorActivePowerLimitSide2Label",
128
+ previousValue: hvdcLineToModify?.hvdcOperatorActivePowerRange?.oprFromCS2toCS1
129
+ }
130
+ );
131
+ const previousConverterMode = () => {
132
+ if (hvdcLineToModify?.convertersMode === VSC_CONVERTER_MODE.SIDE_1_INVERTER_SIDE_2_RECTIFIER.id) {
133
+ return intl.formatMessage({
134
+ id: VSC_CONVERTER_MODE.SIDE_1_INVERTER_SIDE_2_RECTIFIER.label
135
+ });
136
+ }
137
+ if (hvdcLineToModify?.convertersMode === VSC_CONVERTER_MODE.SIDE_1_RECTIFIER_SIDE_2_INVERTER.id) {
138
+ return intl.formatMessage({
139
+ id: VSC_CONVERTER_MODE.SIDE_1_RECTIFIER_SIDE_2_INVERTER.label
140
+ });
141
+ }
142
+ return void 0;
143
+ };
144
+ const converterModeField = /* @__PURE__ */ jsx(
145
+ SelectInput,
146
+ {
147
+ name: `${id}.${FieldConstants.CONVERTERS_MODE}`,
148
+ label: "converterModeLabel",
149
+ options: Object.values(VSC_CONVERTER_MODE),
150
+ size: "small",
151
+ disableClearable: true,
152
+ previousValue: previousConverterMode()
153
+ }
154
+ );
155
+ const activePowerField = /* @__PURE__ */ jsx(
156
+ FloatInput,
157
+ {
158
+ name: `${id}.${FieldConstants.ACTIVE_POWER_SET_POINT}`,
159
+ label: "ActivePowerText",
160
+ adornment: ActivePowerAdornment,
161
+ previousValue: hvdcLineToModify?.activePowerSetpoint
162
+ }
163
+ );
164
+ const previousAngleDropPowerControl = () => {
165
+ if (!hvdcLineToModify) {
166
+ return void 0;
167
+ }
168
+ if (hvdcLineToModify.hvdcAngleDroopActivePowerControl?.isEnabled) {
169
+ return intl.formatMessage({ id: "On" });
170
+ }
171
+ return intl.formatMessage({ id: "Off" });
172
+ };
173
+ function getAngleDroopActivePowerControlField() {
174
+ if (isModification) {
175
+ return /* @__PURE__ */ jsx(
176
+ CheckboxNullableInput,
177
+ {
178
+ name: `${id}.${FieldConstants.ANGLE_DROOP_ACTIVE_POWER_CONTROL}`,
179
+ label: "angleDroopActivePowerControlLabel",
180
+ previousValue: previousAngleDropPowerControl()
181
+ }
182
+ );
183
+ }
184
+ return /* @__PURE__ */ jsx(
185
+ SwitchInput,
186
+ {
187
+ name: `${id}.${FieldConstants.ANGLE_DROOP_ACTIVE_POWER_CONTROL}`,
188
+ label: "angleDroopActivePowerControlLabel"
189
+ }
190
+ );
191
+ }
192
+ const AngleDroopActivePowerControl = getAngleDroopActivePowerControlField();
193
+ const p0Field = /* @__PURE__ */ jsx(
194
+ FloatInput,
195
+ {
196
+ name: `${id}.${FieldConstants.P0}`,
197
+ label: "p0Label",
198
+ adornment: ActivePowerAdornment,
199
+ previousValue: hvdcLineToModify?.hvdcAngleDroopActivePowerControl?.p0
200
+ }
201
+ );
202
+ const droopField = /* @__PURE__ */ jsx(
203
+ FloatInput,
204
+ {
205
+ name: `${id}.${FieldConstants.DROOP}`,
206
+ label: "droopLabel",
207
+ previousValue: hvdcLineToModify?.hvdcAngleDroopActivePowerControl?.droop
208
+ }
209
+ );
210
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
211
+ /* @__PURE__ */ jsx(GridSection, { title: "Characteristics" }),
212
+ /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, sx: { width: "100%" }, children: [
213
+ /* @__PURE__ */ jsx(GridItem, { children: dcNominalVoltageField }),
214
+ /* @__PURE__ */ jsx(GridItem, { children: dcResistanceField }),
215
+ /* @__PURE__ */ jsx(GridItem, { children: maximumActivePowerField })
216
+ ] }),
217
+ /* @__PURE__ */ jsx(GridSection, { title: "Limits" }),
218
+ /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, sx: { width: "100%" }, children: [
219
+ /* @__PURE__ */ jsx(GridItem, { children: operatorActivePowerLimitSide1Field }),
220
+ /* @__PURE__ */ jsx(GridItem, { children: operatorActivePowerLimitSide2Field })
221
+ ] }),
222
+ /* @__PURE__ */ jsx(GridSection, { title: "Setpoints" }),
223
+ /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, sx: { width: "100%" }, children: [
224
+ /* @__PURE__ */ jsx(GridItem, { children: converterModeField }),
225
+ /* @__PURE__ */ jsx(GridItem, { children: activePowerField }),
226
+ /* @__PURE__ */ jsx(GridItem, { size: 12, children: AngleDroopActivePowerControl }),
227
+ /* @__PURE__ */ jsx(GridItem, { children: droopField }),
228
+ /* @__PURE__ */ jsx(GridItem, { children: p0Field })
229
+ ] }),
230
+ /* @__PURE__ */ jsx(PropertiesForm, { isModification })
231
+ ] });
232
+ }
233
+ export {
234
+ VscHvdcLineCharacteristicsPane
235
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright (c) 2026, RTE (http://www.rte-france.com)
3
+ * This Source Code Form is subject to the terms of the Mozilla Public
4
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
5
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
+ */
7
+ export * from './vscHvdcLineCharacteristicsPane.utils';
8
+ export * from './VscHvdcLineCharacteristicsPane';
@@ -0,0 +1,11 @@
1
+ import { getVscHvdcLineCharacteristicsCreationDtoToForm, getVscHvdcLineCharacteristicsCreationSchema, getVscHvdcLineCharacteristicsEmptyFormData, getVscHvdcLineCharacteristicsFromCopy, getVscHvdcLineCharacteristicsModificationDtoToForm, getVscHvdcLineCharacteristicsModificationSchema } from "./vscHvdcLineCharacteristicsPane.utils.js";
2
+ import { VscHvdcLineCharacteristicsPane } from "./VscHvdcLineCharacteristicsPane.js";
3
+ export {
4
+ VscHvdcLineCharacteristicsPane,
5
+ getVscHvdcLineCharacteristicsCreationDtoToForm,
6
+ getVscHvdcLineCharacteristicsCreationSchema,
7
+ getVscHvdcLineCharacteristicsEmptyFormData,
8
+ getVscHvdcLineCharacteristicsFromCopy,
9
+ getVscHvdcLineCharacteristicsModificationDtoToForm,
10
+ getVscHvdcLineCharacteristicsModificationSchema
11
+ };
@@ -0,0 +1,67 @@
1
+ import { InferType } from 'yup';
2
+ import { VscHvdcLineInfo } from '../vscHvdcLine.types';
3
+ import { VscHdvLineCreationDto } from '../../creation/vscHvdcLineCreation.types';
4
+ import { VscHdvLineModificationDto } from '../../modification/vscHvdcLineModification.types';
5
+ export declare const getVscHvdcLineCharacteristicsCreationSchema: () => import('yup').ObjectSchema<{
6
+ nominalV: number;
7
+ r: number;
8
+ maxP: number;
9
+ operatorActivePowerLimitSide1: number | null | undefined;
10
+ operatorActivePowerLimitSide2: number | null | undefined;
11
+ convertersMode: string;
12
+ angleDroopActivePowerControl: boolean | undefined;
13
+ activePowerSetpoint: number;
14
+ p0: number | null;
15
+ droop: number | null;
16
+ }, import('yup').AnyObject, {
17
+ nominalV: undefined;
18
+ r: undefined;
19
+ maxP: undefined;
20
+ operatorActivePowerLimitSide1: undefined;
21
+ operatorActivePowerLimitSide2: undefined;
22
+ convertersMode: undefined;
23
+ angleDroopActivePowerControl: undefined;
24
+ activePowerSetpoint: undefined;
25
+ p0: null;
26
+ droop: null;
27
+ }, "">;
28
+ export type VscHvdcLineCharacteristicsCreationFormData = InferType<ReturnType<typeof getVscHvdcLineCharacteristicsCreationSchema>>;
29
+ export declare const getVscHvdcLineCharacteristicsModificationSchema: () => import('yup').ObjectSchema<{
30
+ nominalV: number | null | undefined;
31
+ r: number | null | undefined;
32
+ maxP: number | null | undefined;
33
+ operatorActivePowerLimitSide1: number | null | undefined;
34
+ operatorActivePowerLimitSide2: number | null | undefined;
35
+ convertersMode: string | null | undefined;
36
+ angleDroopActivePowerControl: boolean | null | undefined;
37
+ activePowerSetpoint: number | null | undefined;
38
+ p0: number | null | undefined;
39
+ droop: number | null | undefined;
40
+ }, import('yup').AnyObject, {
41
+ nominalV: undefined;
42
+ r: undefined;
43
+ maxP: undefined;
44
+ operatorActivePowerLimitSide1: undefined;
45
+ operatorActivePowerLimitSide2: undefined;
46
+ convertersMode: undefined;
47
+ angleDroopActivePowerControl: undefined;
48
+ activePowerSetpoint: undefined;
49
+ p0: undefined;
50
+ droop: undefined;
51
+ }, "">;
52
+ export type VscHvdcLineCharacteristicsModificationFormData = InferType<ReturnType<typeof getVscHvdcLineCharacteristicsModificationSchema>>;
53
+ export declare function getVscHvdcLineCharacteristicsEmptyFormData(isModification: boolean): {
54
+ nominalV: null;
55
+ r: null;
56
+ maxP: null;
57
+ operatorActivePowerLimitSide1: null;
58
+ operatorActivePowerLimitSide2: null;
59
+ convertersMode: null;
60
+ activePowerSetpoint: null;
61
+ angleDroopActivePowerControl: boolean | null;
62
+ p0: null;
63
+ droop: null;
64
+ };
65
+ export declare function getVscHvdcLineCharacteristicsFromCopy(hvdcLine: VscHvdcLineInfo): VscHvdcLineCharacteristicsCreationFormData;
66
+ export declare function getVscHvdcLineCharacteristicsCreationDtoToForm(dto: VscHdvLineCreationDto): VscHvdcLineCharacteristicsCreationFormData;
67
+ export declare function getVscHvdcLineCharacteristicsModificationDtoToForm(dto: VscHdvLineModificationDto): VscHvdcLineCharacteristicsModificationFormData;
@@ -0,0 +1,106 @@
1
+ import { object, number, boolean, string } from "yup";
2
+ import { FieldConstants } from "../../../../../../utils/constants/fieldConstants.js";
3
+ import { MUST_BE_GREATER_OR_EQUAL_TO_ZERO } from "../../../../../../utils/constants/translationKeys.js";
4
+ import "../../../../../../utils/conversionUtils.js";
5
+ import "../../../../../../utils/types/equipmentType.js";
6
+ import "react/jsx-runtime";
7
+ import "@mui/icons-material";
8
+ const getVscHvdcLineCharacteristicsCreationSchema = () => object().shape(
9
+ {
10
+ [FieldConstants.NOMINAL_V]: number().nullable().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO).required(),
11
+ [FieldConstants.R]: number().nullable().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO).required(),
12
+ [FieldConstants.MAX_P]: number().nullable().required(),
13
+ [FieldConstants.OPERATOR_ACTIVE_POWER_LIMIT_SIDE1]: number().nullable(),
14
+ [FieldConstants.OPERATOR_ACTIVE_POWER_LIMIT_SIDE2]: number().nullable(),
15
+ [FieldConstants.CONVERTERS_MODE]: string().required(),
16
+ [FieldConstants.ANGLE_DROOP_ACTIVE_POWER_CONTROL]: boolean(),
17
+ [FieldConstants.ACTIVE_POWER_SET_POINT]: number().nullable().required(),
18
+ [FieldConstants.P0]: number().nullable().default(null).when([FieldConstants.ANGLE_DROOP_ACTIVE_POWER_CONTROL, FieldConstants.DROOP], {
19
+ is: (angleDroopActivePowerControl, droop) => angleDroopActivePowerControl || droop !== null && droop !== void 0,
20
+ then: (schema) => schema.required()
21
+ }),
22
+ [FieldConstants.DROOP]: number().nullable().default(null).when([FieldConstants.ANGLE_DROOP_ACTIVE_POWER_CONTROL, FieldConstants.P0], {
23
+ is: (angleDroopActivePowerControl, p0) => angleDroopActivePowerControl || p0 !== null && p0 !== void 0,
24
+ then: (schema) => schema.required()
25
+ })
26
+ },
27
+ // p0 and droop are mutually dependent via when(), causing a cyclic dependency at runtime.
28
+ [[FieldConstants.P0, FieldConstants.DROOP]]
29
+ // excludedEdges => skip during cycle detection
30
+ );
31
+ const getVscHvdcLineCharacteristicsModificationSchema = () => object().shape({
32
+ [FieldConstants.NOMINAL_V]: number().nullable().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO),
33
+ [FieldConstants.R]: number().nullable().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO),
34
+ [FieldConstants.MAX_P]: number().nullable(),
35
+ [FieldConstants.OPERATOR_ACTIVE_POWER_LIMIT_SIDE1]: number().nullable(),
36
+ [FieldConstants.OPERATOR_ACTIVE_POWER_LIMIT_SIDE2]: number().nullable(),
37
+ [FieldConstants.CONVERTERS_MODE]: string().nullable(),
38
+ [FieldConstants.ANGLE_DROOP_ACTIVE_POWER_CONTROL]: boolean().nullable(),
39
+ [FieldConstants.ACTIVE_POWER_SET_POINT]: number().nullable().nullable(),
40
+ [FieldConstants.P0]: number().nullable(),
41
+ [FieldConstants.DROOP]: number().nullable()
42
+ });
43
+ function getVscHvdcLineCharacteristicsEmptyFormData(isModification) {
44
+ return {
45
+ [FieldConstants.NOMINAL_V]: null,
46
+ [FieldConstants.R]: null,
47
+ [FieldConstants.MAX_P]: null,
48
+ [FieldConstants.OPERATOR_ACTIVE_POWER_LIMIT_SIDE1]: null,
49
+ [FieldConstants.OPERATOR_ACTIVE_POWER_LIMIT_SIDE2]: null,
50
+ [FieldConstants.CONVERTERS_MODE]: null,
51
+ [FieldConstants.ACTIVE_POWER_SET_POINT]: null,
52
+ [FieldConstants.ANGLE_DROOP_ACTIVE_POWER_CONTROL]: isModification ? null : false,
53
+ [FieldConstants.P0]: null,
54
+ [FieldConstants.DROOP]: null
55
+ };
56
+ }
57
+ function getVscHvdcLineCharacteristicsFromCopy(hvdcLine) {
58
+ return {
59
+ [FieldConstants.NOMINAL_V]: hvdcLine?.nominalV,
60
+ [FieldConstants.R]: hvdcLine?.r,
61
+ [FieldConstants.MAX_P]: hvdcLine?.maxP,
62
+ [FieldConstants.OPERATOR_ACTIVE_POWER_LIMIT_SIDE1]: hvdcLine?.hvdcOperatorActivePowerRange?.oprFromCS1toCS2,
63
+ [FieldConstants.OPERATOR_ACTIVE_POWER_LIMIT_SIDE2]: hvdcLine?.hvdcOperatorActivePowerRange?.oprFromCS2toCS1,
64
+ [FieldConstants.CONVERTERS_MODE]: hvdcLine?.convertersMode,
65
+ [FieldConstants.ACTIVE_POWER_SET_POINT]: hvdcLine?.activePowerSetpoint,
66
+ [FieldConstants.ANGLE_DROOP_ACTIVE_POWER_CONTROL]: hvdcLine?.hvdcAngleDroopActivePowerControl?.isEnabled,
67
+ [FieldConstants.P0]: hvdcLine?.hvdcAngleDroopActivePowerControl?.p0,
68
+ [FieldConstants.DROOP]: hvdcLine?.hvdcAngleDroopActivePowerControl?.droop
69
+ };
70
+ }
71
+ function getVscHvdcLineCharacteristicsCreationDtoToForm(dto) {
72
+ return {
73
+ [FieldConstants.NOMINAL_V]: dto.nominalV ?? 0,
74
+ [FieldConstants.R]: dto.r ?? 0,
75
+ [FieldConstants.MAX_P]: dto.maxP ?? 0,
76
+ [FieldConstants.OPERATOR_ACTIVE_POWER_LIMIT_SIDE1]: dto?.operatorActivePowerLimitFromSide1ToSide2,
77
+ [FieldConstants.OPERATOR_ACTIVE_POWER_LIMIT_SIDE2]: dto?.operatorActivePowerLimitFromSide2ToSide1,
78
+ [FieldConstants.CONVERTERS_MODE]: dto.convertersMode,
79
+ [FieldConstants.ACTIVE_POWER_SET_POINT]: dto.activePowerSetpoint ?? 0,
80
+ [FieldConstants.ANGLE_DROOP_ACTIVE_POWER_CONTROL]: dto?.angleDroopActivePowerControl ?? void 0,
81
+ [FieldConstants.P0]: dto?.p0,
82
+ [FieldConstants.DROOP]: dto?.droop
83
+ };
84
+ }
85
+ function getVscHvdcLineCharacteristicsModificationDtoToForm(dto) {
86
+ return {
87
+ [FieldConstants.NOMINAL_V]: dto.nominalV?.value ?? null,
88
+ [FieldConstants.R]: dto.r?.value ?? null,
89
+ [FieldConstants.MAX_P]: dto.maxP?.value ?? null,
90
+ [FieldConstants.OPERATOR_ACTIVE_POWER_LIMIT_SIDE1]: dto?.operatorActivePowerLimitFromSide1ToSide2?.value ?? null,
91
+ [FieldConstants.OPERATOR_ACTIVE_POWER_LIMIT_SIDE2]: dto?.operatorActivePowerLimitFromSide2ToSide1?.value ?? null,
92
+ [FieldConstants.CONVERTERS_MODE]: dto.convertersMode?.value ?? null,
93
+ [FieldConstants.ACTIVE_POWER_SET_POINT]: dto.activePowerSetpoint?.value ?? null,
94
+ [FieldConstants.ANGLE_DROOP_ACTIVE_POWER_CONTROL]: dto?.angleDroopActivePowerControl?.value ?? null,
95
+ [FieldConstants.P0]: dto?.p0?.value ?? null,
96
+ [FieldConstants.DROOP]: dto?.droop?.value ?? null
97
+ };
98
+ }
99
+ export {
100
+ getVscHvdcLineCharacteristicsCreationDtoToForm,
101
+ getVscHvdcLineCharacteristicsCreationSchema,
102
+ getVscHvdcLineCharacteristicsEmptyFormData,
103
+ getVscHvdcLineCharacteristicsFromCopy,
104
+ getVscHvdcLineCharacteristicsModificationDtoToForm,
105
+ getVscHvdcLineCharacteristicsModificationSchema
106
+ };
@@ -0,0 +1,12 @@
1
+ import { ConnectivityNetworkProps } from '../../../../common/connectivity';
2
+ import { UpdateReactiveCapabilityCurveTable } from '../../../../common/reactiveLimits/reactiveLimits.type';
3
+ import { ConverterStationInfos } from '../vscHvdcLine.types';
4
+ interface VscConverterStationPaneProps extends ConnectivityNetworkProps {
5
+ id: string;
6
+ stationLabel: string;
7
+ isModification?: boolean;
8
+ stationToModify?: ConverterStationInfos | null;
9
+ updatePreviousReactiveCapabilityCurveTableConverterStation?: UpdateReactiveCapabilityCurveTable;
10
+ }
11
+ export declare function VscConverterStationPane({ id, stationLabel, isModification, stationToModify, updatePreviousReactiveCapabilityCurveTableConverterStation, voltageLevelOptions, PositionDiagramPane, fetchBusesOrBusbarSections, }: Readonly<VscConverterStationPaneProps>): import("react").JSX.Element;
12
+ export {};
@@ -0,0 +1,198 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { useEffect } from "react";
3
+ import { Grid } from "@mui/material";
4
+ import { useFormContext, useWatch } from "react-hook-form";
5
+ import { useIntl } from "react-intl";
6
+ import "@mui/icons-material";
7
+ import "../../../../../../components/ui/overflowableText/OverflowableText.js";
8
+ import { PercentageAdornment, ReactivePowerAdornment, VoltageAdornment } from "../../../../../../utils/constants/adornments.js";
9
+ import { FieldConstants } from "../../../../../../utils/constants/fieldConstants.js";
10
+ import "../../../../../../utils/conversionUtils.js";
11
+ import "../../../../../../utils/types/equipmentType.js";
12
+ import "localized-countries";
13
+ import "localized-countries/data/fr";
14
+ import "localized-countries/data/en";
15
+ import "notistack";
16
+ import "../../../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
17
+ import "yup";
18
+ import "../../../../../../components/ui/treeViewFinder/TreeViewFinder.js";
19
+ import { SwitchInput } from "../../../../../../components/ui/reactHookForm/booleans/SwitchInput.js";
20
+ import { FloatInput } from "../../../../../../components/ui/reactHookForm/numbers/FloatInput.js";
21
+ import { TextInput } from "../../../../../../components/ui/reactHookForm/text/TextInput.js";
22
+ import "../../../../../../components/ui/reactHookForm/numbers/RangeInput.js";
23
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
24
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
25
+ import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
26
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
27
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
28
+ import "../../../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
29
+ import "../../../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
30
+ import { CheckboxNullableInput } from "../../../../../../components/ui/reactHookForm/CheckboxNullableInput.js";
31
+ import "../../../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
32
+ import "@hello-pangea/dnd";
33
+ import "../../../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
34
+ import "../../../../../../components/ui/snackbarProvider/SnackbarProvider.js";
35
+ import "mui-nested-menu";
36
+ import "react-resizable-panels";
37
+ import "react-papaparse";
38
+ import "react-dom";
39
+ import "autosuggest-highlight/match";
40
+ import "autosuggest-highlight/parse";
41
+ import "clsx";
42
+ import "../../../../../../components/composite/filter/FilterCreationDialog.js";
43
+ import "../../../../../../components/composite/filter/HeaderFilterForm.js";
44
+ import "../../../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
45
+ import "../../../../../../components/composite/filter/expert/ExpertFilterForm.js";
46
+ import "../../../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
47
+ import "../../../../../../components/composite/filter/expert/expertFilterConstants.js";
48
+ import "react-querybuilder";
49
+ import "uuid";
50
+ import "../../../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
51
+ import "../../../../../../components/composite/filter/utils/filterFormUtils.js";
52
+ import { GridItem } from "../../../../../../components/composite/grid/grid-item.js";
53
+ import { GridSection } from "../../../../../../components/composite/grid/grid-section.js";
54
+ import "@react-querybuilder/material";
55
+ import "../../../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
56
+ import "../../../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
57
+ import "../../../../../../components/composite/agGridTable/BottomTableButtons.js";
58
+ import "../../../../../../components/composite/agGridTable/CustomAgGridTable.js";
59
+ import "ag-grid-community";
60
+ import "../../../../../../components/composite/customAGGrid/customAggrid.js";
61
+ import "../../../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
62
+ import "mathjs";
63
+ import "../../../../../../components/composite/report/report-viewer/log-table/log-table.js";
64
+ import "react-window";
65
+ import "../../../../../../components/composite/report/report-treeview/treeview-item.js";
66
+ import "../../../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
67
+ import { ReactiveLimitsForm } from "../../../../common/reactiveLimits/ReactiveLimitsForm.js";
68
+ import { ConnectivityForm } from "../../../../common/connectivity/ConnectivityForm.js";
69
+ function VscConverterStationPane({
70
+ id,
71
+ stationLabel,
72
+ isModification = false,
73
+ stationToModify,
74
+ updatePreviousReactiveCapabilityCurveTableConverterStation,
75
+ voltageLevelOptions = [],
76
+ PositionDiagramPane,
77
+ fetchBusesOrBusbarSections
78
+ }) {
79
+ const intl = useIntl();
80
+ const { trigger } = useFormContext();
81
+ const voltageRegulationOnWatch = useWatch({
82
+ name: `${id}.${FieldConstants.VOLTAGE_REGULATION_ON}`
83
+ });
84
+ useEffect(() => {
85
+ if (!voltageRegulationOnWatch) {
86
+ trigger(`${id}.${FieldConstants.VOLTAGE_REGULATION_ON}`);
87
+ }
88
+ }, [voltageRegulationOnWatch, trigger, id]);
89
+ const converterStationIdField = /* @__PURE__ */ jsx(
90
+ TextInput,
91
+ {
92
+ name: `${id}.${FieldConstants.CONVERTER_STATION_ID}`,
93
+ label: "converterStationId",
94
+ disabled: isModification
95
+ }
96
+ );
97
+ const converterStationNameField = /* @__PURE__ */ jsx(
98
+ TextInput,
99
+ {
100
+ name: `${id}.${FieldConstants.CONVERTER_STATION_NAME}`,
101
+ label: "converterStationName",
102
+ previousValue: stationToModify?.name ?? ""
103
+ }
104
+ );
105
+ const connectivityForm = /* @__PURE__ */ jsx(
106
+ ConnectivityForm,
107
+ {
108
+ id: `${id}.${FieldConstants.CONNECTIVITY}`,
109
+ isEquipmentModification: isModification,
110
+ previousValues: {
111
+ connectablePosition: stationToModify?.connectablePosition,
112
+ voltageLevelId: stationToModify?.voltageLevelId,
113
+ busOrBusbarSectionId: stationToModify?.busOrBusbarSectionId,
114
+ terminalConnected: stationToModify?.terminalConnected
115
+ },
116
+ voltageLevelOptions,
117
+ PositionDiagramPane,
118
+ fetchBusesOrBusbarSections
119
+ }
120
+ );
121
+ const lossFactorField = /* @__PURE__ */ jsx(
122
+ FloatInput,
123
+ {
124
+ name: `${id}.${FieldConstants.LOSS_FACTOR}`,
125
+ label: "lossFactorLabel",
126
+ adornment: PercentageAdornment,
127
+ previousValue: stationToModify?.lossFactor
128
+ }
129
+ );
130
+ const reactivePowerField = /* @__PURE__ */ jsx(
131
+ FloatInput,
132
+ {
133
+ name: `${id}.${FieldConstants.REACTIVE_POWER}`,
134
+ adornment: ReactivePowerAdornment,
135
+ label: "ReactivePowerText",
136
+ previousValue: stationToModify?.reactivePowerSetpoint ?? void 0
137
+ }
138
+ );
139
+ const previousVoltageRegulatorOn = () => {
140
+ if (!stationToModify) {
141
+ return void 0;
142
+ }
143
+ return intl.formatMessage({
144
+ id: stationToModify?.voltageRegulatorOn ? "On" : "Off"
145
+ });
146
+ };
147
+ const voltageRegulation = isModification ? /* @__PURE__ */ jsx(
148
+ CheckboxNullableInput,
149
+ {
150
+ name: `${id}.${FieldConstants.VOLTAGE_REGULATION_ON}`,
151
+ label: "VoltageRegulationText",
152
+ previousValue: previousVoltageRegulatorOn(),
153
+ id: void 0,
154
+ formProps: void 0
155
+ }
156
+ ) : /* @__PURE__ */ jsx(SwitchInput, { name: `${id}.${FieldConstants.VOLTAGE_REGULATION_ON}`, label: "VoltageRegulationText" });
157
+ const voltageField = /* @__PURE__ */ jsx(
158
+ FloatInput,
159
+ {
160
+ name: `${id}.${FieldConstants.VOLTAGE}`,
161
+ adornment: VoltageAdornment,
162
+ label: "VoltageText",
163
+ previousValue: stationToModify?.voltageSetpoint ?? void 0
164
+ }
165
+ );
166
+ return /* @__PURE__ */ jsxs(Grid, { container: true, children: [
167
+ /* @__PURE__ */ jsx(GridSection, { title: stationLabel }),
168
+ /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, sx: { width: "100%" }, children: [
169
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: converterStationIdField }),
170
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: converterStationNameField })
171
+ ] }),
172
+ !isModification && /* @__PURE__ */ jsxs(Fragment, { children: [
173
+ /* @__PURE__ */ jsx(GridSection, { title: "Connectivity" }),
174
+ /* @__PURE__ */ jsx(Grid, { container: true, spacing: 2, children: /* @__PURE__ */ jsx(GridItem, { size: 12, children: connectivityForm }) })
175
+ ] }),
176
+ /* @__PURE__ */ jsx(GridSection, { title: "Characteristics" }),
177
+ /* @__PURE__ */ jsx(Grid, { container: true, sx: { width: "100%" }, children: /* @__PURE__ */ jsx(GridItem, { size: 4, children: lossFactorField }) }),
178
+ /* @__PURE__ */ jsx(GridSection, { title: "ReactiveLimits" }),
179
+ /* @__PURE__ */ jsx(
180
+ ReactiveLimitsForm,
181
+ {
182
+ id: `${id}.${FieldConstants.REACTIVE_LIMITS}`,
183
+ previousReactiveCapabilityCurvePoints: stationToModify?.reactiveCapabilityCurvePoints,
184
+ previousMinMaxReactiveLimits: stationToModify?.minMaxReactiveLimits,
185
+ updatePreviousReactiveCapabilityCurveTable: updatePreviousReactiveCapabilityCurveTableConverterStation
186
+ }
187
+ ),
188
+ /* @__PURE__ */ jsx(GridSection, { title: "Setpoints" }),
189
+ /* @__PURE__ */ jsx(Grid, { container: true, spacing: 2, sx: { width: "100%" }, children: /* @__PURE__ */ jsx(GridItem, { size: 4, children: reactivePowerField }) }),
190
+ /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, paddingTop: 2, sx: { width: "100%" }, children: [
191
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: voltageRegulation }),
192
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: voltageField })
193
+ ] })
194
+ ] });
195
+ }
196
+ export {
197
+ VscConverterStationPane
198
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright (c) 2026, RTE (http://www.rte-france.com)
3
+ * This Source Code Form is subject to the terms of the Mozilla Public
4
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
5
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
+ */
7
+ export * from './vscConverterStationPane.utils';
8
+ export * from './VscConverterStationPane';