@gridsuite/commons-ui 0.283.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 (92) hide show
  1. package/dist/components/ui/reactHookForm/utils/HelperPreviousValue.js +1 -1
  2. package/dist/features/index.js +51 -7
  3. package/dist/features/network-modification-table/index.js +3 -1
  4. package/dist/features/network-modification-table/network-modifications-table.d.ts +3 -5
  5. package/dist/features/network-modification-table/network-modifications-table.js +13 -7
  6. package/dist/features/network-modification-table/renderers/cell-renderers.js +3 -3
  7. package/dist/features/network-modification-table/renderers/name-cell.js +5 -2
  8. package/dist/features/network-modification-table/renderers/root-network-chip-cell.d.ts +3 -3
  9. package/dist/features/network-modification-table/renderers/root-network-chip-cell.js +24 -49
  10. package/dist/features/network-modification-table/row/drag-row-clone.js +5 -1
  11. package/dist/features/network-modification-table/utils.d.ts +12 -1
  12. package/dist/features/network-modification-table/utils.js +29 -0
  13. package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.d.ts +2 -2
  14. package/dist/features/network-modifications/common/index.js +2 -5
  15. package/dist/features/network-modifications/common/measurements/PowerMeasurementsForm.js +3 -9
  16. package/dist/features/network-modifications/common/measurements/branchActiveReactivePowerForm.utils.d.ts +4 -17
  17. package/dist/features/network-modifications/common/measurements/branchActiveReactivePowerForm.utils.js +0 -8
  18. package/dist/features/network-modifications/common/measurements/index.js +1 -2
  19. package/dist/features/network-modifications/common/measurements/injectionActiveReactivePowerForm.utils.d.ts +6 -9
  20. package/dist/features/network-modifications/common/measurements/measurement.type.d.ts +7 -1
  21. package/dist/features/network-modifications/common/measurements/powerWithValidity.utils.d.ts +3 -3
  22. package/dist/features/network-modifications/common/reactiveLimits/index.js +1 -3
  23. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/index.js +1 -3
  24. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/reactiveCapability.utils.d.ts +0 -4
  25. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/reactiveCapability.utils.js +0 -8
  26. package/dist/features/network-modifications/common/reactiveLimits/reactiveLimits.type.d.ts +1 -0
  27. package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.d.ts +2 -2
  28. package/dist/features/network-modifications/hvdcLine/index.d.ts +7 -0
  29. package/dist/features/network-modifications/hvdcLine/index.js +47 -0
  30. package/dist/features/network-modifications/hvdcLine/vsc/common/characteristics/VscHvdcLineCharacteristicsPane.d.ts +8 -0
  31. package/dist/features/network-modifications/hvdcLine/vsc/common/characteristics/VscHvdcLineCharacteristicsPane.js +235 -0
  32. package/dist/features/network-modifications/hvdcLine/vsc/common/characteristics/index.d.ts +8 -0
  33. package/dist/features/network-modifications/hvdcLine/vsc/common/characteristics/index.js +11 -0
  34. package/dist/features/network-modifications/hvdcLine/vsc/common/characteristics/vscHvdcLineCharacteristicsPane.utils.d.ts +67 -0
  35. package/dist/features/network-modifications/hvdcLine/vsc/common/characteristics/vscHvdcLineCharacteristicsPane.utils.js +106 -0
  36. package/dist/features/network-modifications/hvdcLine/vsc/common/converterStation/VscConverterStationPane.d.ts +12 -0
  37. package/dist/features/network-modifications/hvdcLine/vsc/common/converterStation/VscConverterStationPane.js +198 -0
  38. package/dist/features/network-modifications/hvdcLine/vsc/common/converterStation/index.d.ts +8 -0
  39. package/dist/features/network-modifications/hvdcLine/vsc/common/converterStation/index.js +13 -0
  40. package/dist/features/network-modifications/hvdcLine/vsc/common/converterStation/vscConverterStationPane.utils.d.ts +156 -0
  41. package/dist/features/network-modifications/hvdcLine/vsc/common/converterStation/vscConverterStationPane.utils.js +199 -0
  42. package/dist/features/network-modifications/hvdcLine/vsc/common/form/VscHvdcLineDialogHeader.d.ts +6 -0
  43. package/dist/features/network-modifications/hvdcLine/vsc/common/form/VscHvdcLineDialogHeader.js +106 -0
  44. package/dist/features/network-modifications/hvdcLine/vsc/common/form/VscHvdcLineDialogTabs.d.ts +9 -0
  45. package/dist/features/network-modifications/hvdcLine/vsc/common/form/VscHvdcLineDialogTabs.js +129 -0
  46. package/dist/features/network-modifications/hvdcLine/vsc/common/form/VscHvdcLineDialogTabsContent.d.ts +10 -0
  47. package/dist/features/network-modifications/hvdcLine/vsc/common/form/VscHvdcLineDialogTabsContent.js +139 -0
  48. package/dist/features/network-modifications/hvdcLine/vsc/common/form/VscHvdcLineForm.d.ts +11 -0
  49. package/dist/features/network-modifications/hvdcLine/vsc/common/form/VscHvdcLineForm.js +43 -0
  50. package/dist/features/network-modifications/hvdcLine/vsc/common/form/index.d.ts +11 -0
  51. package/dist/features/network-modifications/hvdcLine/vsc/common/form/index.js +13 -0
  52. package/dist/features/network-modifications/hvdcLine/vsc/common/form/vscHvdcLine.utils.d.ts +8 -0
  53. package/dist/features/network-modifications/hvdcLine/vsc/common/form/vscHvdcLine.utils.js +34 -0
  54. package/dist/features/network-modifications/hvdcLine/vsc/common/index.d.ts +10 -0
  55. package/dist/features/network-modifications/hvdcLine/vsc/common/index.js +36 -0
  56. package/dist/features/network-modifications/hvdcLine/vsc/common/vscHvdcLine.types.d.ts +52 -0
  57. package/dist/features/network-modifications/hvdcLine/vsc/common/vscHvdcLine.types.js +25 -0
  58. package/dist/features/network-modifications/hvdcLine/vsc/creation/index.d.ts +8 -0
  59. package/dist/features/network-modifications/hvdcLine/vsc/creation/index.js +7 -0
  60. package/dist/features/network-modifications/hvdcLine/vsc/creation/vscHvdcLineCreation.types.d.ts +45 -0
  61. package/dist/features/network-modifications/hvdcLine/vsc/creation/vscHvdcLineCreation.types.js +1 -0
  62. package/dist/features/network-modifications/hvdcLine/vsc/creation/vscHvdcLineCreation.utils.d.ts +159 -0
  63. package/dist/features/network-modifications/hvdcLine/vsc/creation/vscHvdcLineCreation.utils.js +88 -0
  64. package/dist/features/network-modifications/hvdcLine/vsc/index.d.ts +9 -0
  65. package/dist/features/network-modifications/hvdcLine/vsc/index.js +47 -0
  66. package/dist/features/network-modifications/hvdcLine/vsc/modification/index.d.ts +8 -0
  67. package/dist/features/network-modifications/hvdcLine/vsc/modification/index.js +8 -0
  68. package/dist/features/network-modifications/hvdcLine/vsc/modification/vscHvdcLineModification.types.d.ts +49 -0
  69. package/dist/features/network-modifications/hvdcLine/vsc/modification/vscHvdcLineModification.types.js +1 -0
  70. package/dist/features/network-modifications/hvdcLine/vsc/modification/vscHvdcLineModification.utils.d.ts +230 -0
  71. package/dist/features/network-modifications/hvdcLine/vsc/modification/vscHvdcLineModification.utils.js +145 -0
  72. package/dist/features/network-modifications/index.d.ts +1 -0
  73. package/dist/features/network-modifications/index.js +48 -6
  74. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-tabs.js +3 -3
  75. package/dist/features/topBar/UserInformationDialog.js +15 -15
  76. package/dist/hooks/useModificationLabelComputer.js +7 -5
  77. package/dist/index.js +51 -7
  78. package/dist/services/networkModification.d.ts +1 -1
  79. package/dist/services/networkModification.js +2 -2
  80. package/dist/translations/en/networkModificationsEn.d.ts +23 -4
  81. package/dist/translations/en/networkModificationsEn.js +23 -4
  82. package/dist/translations/en/topBarEn.d.ts +13 -13
  83. package/dist/translations/en/topBarEn.js +13 -13
  84. package/dist/translations/fr/networkModificationsFr.d.ts +23 -4
  85. package/dist/translations/fr/networkModificationsFr.js +23 -4
  86. package/dist/translations/fr/topBarFr.d.ts +13 -13
  87. package/dist/translations/fr/topBarFr.js +13 -13
  88. package/dist/utils/constants/fieldConstants.d.ts +15 -0
  89. package/dist/utils/constants/fieldConstants.js +15 -0
  90. package/dist/utils/types/network-modification-metadata.d.ts +1 -0
  91. package/dist/utils/types/network-modification-types.d.ts +5 -4
  92. package/package.json +1 -1
@@ -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';
@@ -0,0 +1,13 @@
1
+ import { converterStationCreationDtoToForm, converterStationCreationFormToDto, converterStationCreationFromCopy, converterStationModificationDtoToForm, converterStationModificationFormToDto, getVscConverterStationCreationSchema, getVscConverterStationEmptyFormData, getVscConverterStationModificationSchema } from "./vscConverterStationPane.utils.js";
2
+ import { VscConverterStationPane } from "./VscConverterStationPane.js";
3
+ export {
4
+ VscConverterStationPane,
5
+ converterStationCreationDtoToForm,
6
+ converterStationCreationFormToDto,
7
+ converterStationCreationFromCopy,
8
+ converterStationModificationDtoToForm,
9
+ converterStationModificationFormToDto,
10
+ getVscConverterStationCreationSchema,
11
+ getVscConverterStationEmptyFormData,
12
+ getVscConverterStationModificationSchema
13
+ };
@@ -0,0 +1,156 @@
1
+ import { InferType } from 'yup';
2
+ import { FieldConstants } from '../../../../../../utils';
3
+ import { InjectionActiveReactivePowerFormData } from '../../../../common/measurements/injectionActiveReactivePowerForm.utils';
4
+ import { ConverterStationCreationDto } from '../../creation/vscHvdcLineCreation.types';
5
+ import { ConverterStationInfos } from '../vscHvdcLine.types';
6
+ import { ConverterStationModificationDto } from '../../modification/vscHvdcLineModification.types';
7
+ export type UpdateReactiveCapabilityCurveTableConverterStation = (action: string, index: number, converterStationName: FieldConstants.CONVERTER_STATION_1 | FieldConstants.CONVERTER_STATION_2) => void;
8
+ export declare const getVscConverterStationCreationSchema: () => import('yup').ObjectSchema<{
9
+ converterStationId: string;
10
+ converterStationName: string | null | undefined;
11
+ lossFactor: number;
12
+ voltageRegulationOn: boolean | undefined;
13
+ reactivePower: number | null;
14
+ voltage: number | null;
15
+ connectivity: {
16
+ terminalConnected?: boolean | null | undefined;
17
+ connectionDirection?: string | null | undefined;
18
+ connectionName?: string | undefined;
19
+ connectionPosition?: number | null | undefined;
20
+ busOrBusbarSection: {
21
+ id?: string | undefined;
22
+ } | null;
23
+ voltageLevel: {
24
+ id?: string | undefined;
25
+ } | null;
26
+ };
27
+ reactiveLimits: {
28
+ minimumReactivePower?: number | null | undefined;
29
+ maximumReactivePower?: number | null | undefined;
30
+ reactiveCapabilityCurveTable?: {
31
+ minQ: number | null;
32
+ maxQ: number | null;
33
+ p: number | null;
34
+ }[] | null | undefined;
35
+ reactiveCapabilityCurveChoice: string;
36
+ };
37
+ }, import('yup').AnyObject, {
38
+ converterStationId: undefined;
39
+ converterStationName: undefined;
40
+ lossFactor: undefined;
41
+ voltageRegulationOn: undefined;
42
+ reactivePower: null;
43
+ voltage: null;
44
+ connectivity: {
45
+ voltageLevel: {
46
+ id: undefined;
47
+ };
48
+ busOrBusbarSection: {
49
+ id: undefined;
50
+ };
51
+ connectionDirection: undefined;
52
+ connectionName: undefined;
53
+ connectionPosition: undefined;
54
+ terminalConnected: undefined;
55
+ };
56
+ reactiveLimits: {
57
+ reactiveCapabilityCurveChoice: undefined;
58
+ minimumReactivePower: undefined;
59
+ maximumReactivePower: undefined;
60
+ reactiveCapabilityCurveTable: "";
61
+ };
62
+ }, "">;
63
+ export type VscConverterStationCreationFormData = InferType<ReturnType<typeof getVscConverterStationCreationSchema>>;
64
+ export declare const getVscConverterStationModificationSchema: () => import('yup').ObjectSchema<{
65
+ converterStationId: string | undefined;
66
+ converterStationName: string | null | undefined;
67
+ lossFactor: number | null | undefined;
68
+ voltageRegulationOn: boolean | null | undefined;
69
+ reactivePower: number | null | undefined;
70
+ voltage: number | null | undefined;
71
+ connectivity: {
72
+ terminalConnected?: boolean | null | undefined;
73
+ connectionDirection?: string | null | undefined;
74
+ connectionName?: string | undefined;
75
+ connectionPosition?: number | null | undefined;
76
+ busOrBusbarSection: {
77
+ id?: string | undefined;
78
+ } | null;
79
+ voltageLevel: {
80
+ id?: string | undefined;
81
+ } | null;
82
+ };
83
+ reactiveLimits: {
84
+ minimumReactivePower?: number | null | undefined;
85
+ maximumReactivePower?: number | null | undefined;
86
+ reactiveCapabilityCurveTable?: {
87
+ minQ: number | null;
88
+ maxQ: number | null;
89
+ p: number | null;
90
+ }[] | null | undefined;
91
+ reactiveCapabilityCurveChoice: string;
92
+ };
93
+ }, import('yup').AnyObject, {
94
+ converterStationId: undefined;
95
+ converterStationName: undefined;
96
+ lossFactor: undefined;
97
+ voltageRegulationOn: undefined;
98
+ reactivePower: undefined;
99
+ voltage: undefined;
100
+ connectivity: {
101
+ voltageLevel: {
102
+ id: undefined;
103
+ };
104
+ busOrBusbarSection: {
105
+ id: undefined;
106
+ };
107
+ connectionDirection: undefined;
108
+ connectionName: undefined;
109
+ connectionPosition: undefined;
110
+ terminalConnected: undefined;
111
+ };
112
+ reactiveLimits: {
113
+ reactiveCapabilityCurveChoice: undefined;
114
+ minimumReactivePower: undefined;
115
+ maximumReactivePower: undefined;
116
+ reactiveCapabilityCurveTable: "";
117
+ };
118
+ }, "">;
119
+ export type VscConverterStationModificationFormData = InferType<ReturnType<typeof getVscConverterStationModificationSchema>>;
120
+ export declare function getVscConverterStationEmptyFormData(isModification?: boolean): {
121
+ converterStationId: string | null;
122
+ converterStationName: string | null;
123
+ lossFactor: null;
124
+ reactivePower: null;
125
+ voltageRegulationOn: boolean | null;
126
+ voltage: null;
127
+ connectivity: {
128
+ connectionDirection: null;
129
+ connectionName: string;
130
+ connectionPosition: null;
131
+ voltageLevel: null;
132
+ busOrBusbarSection: null;
133
+ terminalConnected: boolean | null;
134
+ };
135
+ reactiveLimits: {
136
+ reactiveCapabilityCurveChoice: string;
137
+ minimumReactivePower: null;
138
+ maximumReactivePower: null;
139
+ reactiveCapabilityCurveTable: {
140
+ p: null;
141
+ maxQ: null;
142
+ minQ: null;
143
+ }[];
144
+ };
145
+ stateEstimation: {
146
+ [x: string]: {
147
+ value: null;
148
+ validity: null;
149
+ };
150
+ } | null;
151
+ };
152
+ export declare function converterStationCreationFormToDto(formData: VscConverterStationCreationFormData): ConverterStationCreationDto;
153
+ export declare function converterStationCreationDtoToForm(dto: ConverterStationCreationDto): VscConverterStationCreationFormData;
154
+ export declare function converterStationCreationFromCopy(converterStation?: ConverterStationInfos): VscConverterStationCreationFormData;
155
+ export declare function converterStationModificationFormToDto(formData: VscConverterStationModificationFormData, measurementData: InjectionActiveReactivePowerFormData): ConverterStationModificationDto;
156
+ export declare function converterStationModificationDtoToForm(dto: ConverterStationModificationDto): VscConverterStationModificationFormData;