@gridsuite/commons-ui 0.189.0 → 0.191.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 (157) hide show
  1. package/dist/components/customAGGrid/cell-renderers.js +28 -26
  2. package/dist/components/dialogs/elementSaveDialog/ElementSaveDialog.js +1 -0
  3. package/dist/components/dnd-table/dnd-table-add-rows-dialog.js +1 -0
  4. package/dist/components/dnd-table/dnd-table.js +72 -34
  5. package/dist/components/filter/HeaderFilterForm.js +1 -0
  6. package/dist/components/filter/expert/ExpertFilterForm.js +1 -0
  7. package/dist/components/filter/explicitNaming/ExplicitNamingFilterForm.js +1 -0
  8. package/dist/components/index.js +16 -6
  9. package/dist/components/inputs/index.js +2 -0
  10. package/dist/components/inputs/reactHookForm/expandableInput/ExpandableInput.d.ts +5 -5
  11. package/dist/components/inputs/reactHookForm/expandableInput/ExpandableInput.js +66 -54
  12. package/dist/components/inputs/reactHookForm/index.js +2 -0
  13. package/dist/components/inputs/reactHookForm/selectInputs/SelectWithConfirmationInput.d.ts +9 -0
  14. package/dist/components/inputs/reactHookForm/selectInputs/SelectWithConfirmationInput.js +64 -0
  15. package/dist/components/inputs/reactHookForm/selectInputs/index.d.ts +1 -0
  16. package/dist/components/inputs/reactHookForm/selectInputs/index.js +3 -1
  17. package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-constants.d.ts +16 -0
  18. package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-constants.js +402 -0
  19. package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-form.d.ts +12 -0
  20. package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-form.js +218 -0
  21. package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-utils.d.ts +21 -0
  22. package/dist/components/network-modifications/by-filter/assignment/assignment/assignment-utils.js +89 -0
  23. package/dist/components/network-modifications/by-filter/assignment/assignment/assignment.type.d.ts +28 -0
  24. package/dist/components/network-modifications/by-filter/assignment/assignment/assignment.type.js +12 -0
  25. package/dist/components/network-modifications/by-filter/assignment/index.d.ts +10 -0
  26. package/dist/components/network-modifications/by-filter/assignment/index.js +11 -0
  27. package/dist/components/network-modifications/by-filter/assignment/modification-by-assignment-form.d.ts +7 -0
  28. package/dist/components/network-modifications/by-filter/assignment/modification-by-assignment-form.js +89 -0
  29. package/dist/components/network-modifications/by-filter/assignment/modificationByAssignment.types.d.ts +7 -0
  30. package/dist/components/network-modifications/by-filter/assignment/modificationByAssignment.types.js +1 -0
  31. package/dist/components/network-modifications/by-filter/assignment/modificationByAssignment.utils.d.ts +22 -0
  32. package/dist/components/network-modifications/by-filter/assignment/modificationByAssignment.utils.js +55 -0
  33. package/dist/components/network-modifications/by-filter/deletion/ByFilterDeletionForm.js +1 -0
  34. package/dist/components/network-modifications/by-filter/index.d.ts +1 -0
  35. package/dist/components/network-modifications/by-filter/index.js +10 -1
  36. package/dist/components/network-modifications/common/connectivity/ConnectivityForm.js +1 -0
  37. package/dist/components/network-modifications/common/measurements/PowerWithValidityForm.js +1 -0
  38. package/dist/components/network-modifications/common/properties/PropertyForm.js +1 -0
  39. package/dist/components/network-modifications/common/setpoints/SetPointsForm.js +1 -0
  40. package/dist/components/network-modifications/equipmentDeletion/EquipmentDeletionForm.js +1 -0
  41. package/dist/components/network-modifications/equipmentDeletion/equipmentDeletion.utils.js +1 -0
  42. package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.js +1 -0
  43. package/dist/components/network-modifications/hooks/index.d.ts +7 -0
  44. package/dist/components/network-modifications/hooks/index.js +4 -0
  45. package/dist/components/network-modifications/hooks/useTabsWithError.d.ts +15 -0
  46. package/dist/components/network-modifications/hooks/useTabsWithError.js +28 -0
  47. package/dist/components/network-modifications/index.d.ts +1 -0
  48. package/dist/components/network-modifications/index.js +15 -6
  49. package/dist/components/network-modifications/load/common/LoadDialogHeader.js +1 -0
  50. package/dist/components/network-modifications/load/common/LoadForm.d.ts +1 -1
  51. package/dist/components/network-modifications/load/common/LoadForm.js +7 -27
  52. package/dist/components/network-modifications/load/common/index.js +2 -1
  53. package/dist/components/network-modifications/load/common/load.utils.d.ts +7 -11
  54. package/dist/components/network-modifications/load/common/load.utils.js +30 -4
  55. package/dist/components/network-modifications/load/creation/loadCreation.utils.js +1 -0
  56. package/dist/components/network-modifications/load/index.js +2 -1
  57. package/dist/components/network-modifications/load/modification/loadModification.utils.js +1 -0
  58. package/dist/components/network-modifications/substation/creation/SubstationCreationForm.js +1 -0
  59. package/dist/components/network-modifications/substation/modification/SubstationModificationForm.js +1 -0
  60. package/dist/components/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +10 -29
  61. package/dist/components/network-modifications/voltageLevel/creation/index.js +2 -5
  62. package/dist/components/network-modifications/voltageLevel/creation/tabs/characteristicsTab/CharacteristicsTab.js +1 -0
  63. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/StructureTab.js +1 -0
  64. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js +1 -0
  65. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/creation/CreateSwitchesDialog.js +1 -0
  66. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/creation/CreateSwitchesForm.js +1 -0
  67. package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationCreationSection.js +1 -0
  68. package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.js +1 -0
  69. package/dist/components/network-modifications/voltageLevel/creation/voltageLevel.constants.d.ts +8 -12
  70. package/dist/components/network-modifications/voltageLevel/creation/voltageLevel.constants.js +53 -5
  71. package/dist/components/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.d.ts +0 -4
  72. package/dist/components/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js +1 -16
  73. package/dist/components/network-modifications/voltageLevel/index.js +2 -5
  74. package/dist/components/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js +1 -0
  75. package/dist/components/parameters/common/ProviderParam.js +1 -0
  76. package/dist/components/parameters/common/contingency-table/columns-definitions.js +1 -0
  77. package/dist/components/parameters/common/limitreductions/limit-reduction-table-cell.js +1 -0
  78. package/dist/components/parameters/common/limitreductions/limit-reductions-table-form.js +1 -0
  79. package/dist/components/parameters/common/name-element-editor/name-element-editor-utils.js +1 -0
  80. package/dist/components/parameters/common/parameter-dnd-table-field.js +1 -0
  81. package/dist/components/parameters/common/parameter-field.js +1 -0
  82. package/dist/components/parameters/common/parameter-table/table-cell.js +1 -0
  83. package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-cell.js +1 -0
  84. package/dist/components/parameters/common/widget/parameter-float.js +1 -0
  85. package/dist/components/parameters/common/widget/parameter-line-directory-items-input.js +1 -0
  86. package/dist/components/parameters/common/widget/parameter-line-slider.js +1 -0
  87. package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js +1 -0
  88. package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +1 -0
  89. package/dist/components/parameters/dynamic-margin-calculation/loads-variations-parameters.js +2 -0
  90. package/dist/components/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.js +1 -0
  91. package/dist/components/parameters/dynamic-security-analysis/contingency-parameters.js +1 -0
  92. package/dist/components/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js +1 -0
  93. package/dist/components/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.js +1 -0
  94. package/dist/components/parameters/dynamic-security-analysis/use-dynamic-security-analysis-parameters-form.js +1 -0
  95. package/dist/components/parameters/loadflow/load-flow-general-parameters.js +1 -0
  96. package/dist/components/parameters/loadflow/load-flow-parameters-content.js +1 -0
  97. package/dist/components/parameters/loadflow/load-flow-parameters-dialog.js +1 -0
  98. package/dist/components/parameters/loadflow/load-flow-parameters-form.js +1 -0
  99. package/dist/components/parameters/loadflow/load-flow-parameters-header.js +1 -0
  100. package/dist/components/parameters/loadflow/load-flow-parameters-inline.js +1 -0
  101. package/dist/components/parameters/loadflow/load-flow-parameters-utils.js +1 -0
  102. package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +1 -0
  103. package/dist/components/parameters/network-visualizations/map-parameters.js +1 -0
  104. package/dist/components/parameters/network-visualizations/network-area-diagram-parameters.js +1 -0
  105. package/dist/components/parameters/network-visualizations/network-visualizations-form.js +1 -0
  106. package/dist/components/parameters/network-visualizations/network-visualizations-parameters-dialog.js +1 -0
  107. package/dist/components/parameters/network-visualizations/network-visualizations-parameters-inline.js +1 -0
  108. package/dist/components/parameters/network-visualizations/single-line-diagram-parameters.js +1 -0
  109. package/dist/components/parameters/network-visualizations/use-network-visualizations-parameters-form.js +1 -0
  110. package/dist/components/parameters/pcc-min/pcc-min-form-utils.js +1 -0
  111. package/dist/components/parameters/pcc-min/pcc-min-parameters-dialog.js +1 -0
  112. package/dist/components/parameters/pcc-min/pcc-min-parameters-form.js +1 -0
  113. package/dist/components/parameters/pcc-min/pcc-min-parameters-inline.js +1 -0
  114. package/dist/components/parameters/pcc-min/use-pcc-min-parameters-form.js +1 -0
  115. package/dist/components/parameters/security-analysis/columns-definitions.js +1 -0
  116. package/dist/components/parameters/security-analysis/security-analysis-parameters-dialog.js +1 -0
  117. package/dist/components/parameters/security-analysis/security-analysis-parameters-form.js +1 -0
  118. package/dist/components/parameters/security-analysis/security-analysis-parameters-inline.js +1 -0
  119. package/dist/components/parameters/security-analysis/security-analysis-parameters-selector.js +1 -0
  120. package/dist/components/parameters/security-analysis/security-analysis-violations-hiding.js +1 -0
  121. package/dist/components/parameters/security-analysis/use-security-analysis-parameters-form.js +1 -0
  122. package/dist/components/parameters/sensi/columns-definitions.js +1 -0
  123. package/dist/components/parameters/sensi/sensitivity-Flow-parameters.js +1 -0
  124. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.js +1 -0
  125. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +1 -0
  126. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.js +1 -0
  127. package/dist/components/parameters/sensi/sensitivity-parameters-selector.js +1 -0
  128. package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.js +1 -0
  129. package/dist/components/parameters/sensi/utils.js +1 -0
  130. package/dist/components/parameters/short-circuit/short-circuit-general-tab-panel.js +1 -0
  131. package/dist/components/parameters/short-circuit/short-circuit-icc-cluster-table-cell.js +1 -0
  132. package/dist/components/parameters/short-circuit/short-circuit-icc-material-table-cell.js +1 -0
  133. package/dist/components/parameters/short-circuit/short-circuit-parameters-content.js +1 -0
  134. package/dist/components/parameters/short-circuit/short-circuit-parameters-dialog.js +1 -0
  135. package/dist/components/parameters/short-circuit/short-circuit-parameters-form.js +1 -0
  136. package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.js +1 -0
  137. package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.js +1 -0
  138. package/dist/components/parameters/short-circuit/short-circuit-power-electronics-tab-panel.js +1 -0
  139. package/dist/components/parameters/short-circuit/short-circuit-study-area-tab-panel.js +1 -0
  140. package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.js +1 -0
  141. package/dist/components/parameters/util/make-component-utils.js +1 -0
  142. package/dist/components/parameters/voltage-init/equipment-selection-parameters.js +1 -0
  143. package/dist/components/parameters/voltage-init/general-parameters.js +1 -0
  144. package/dist/components/parameters/voltage-init/use-voltage-init-parameters-form.js +2 -0
  145. package/dist/components/parameters/voltage-init/voltage-init-form-utils.js +2 -0
  146. package/dist/components/parameters/voltage-init/voltage-init-parameters-dialog.js +1 -0
  147. package/dist/components/parameters/voltage-init/voltage-init-parameters-form.js +1 -0
  148. package/dist/components/parameters/voltage-init/voltage-init-parameters-inline.js +1 -0
  149. package/dist/components/parameters/voltage-init/voltage-limits-parameters.js +1 -0
  150. package/dist/index.js +16 -6
  151. package/dist/translations/en/networkModificationsEn.d.ts +51 -0
  152. package/dist/translations/en/networkModificationsEn.js +51 -0
  153. package/dist/translations/fr/networkModificationsFr.d.ts +51 -0
  154. package/dist/translations/fr/networkModificationsFr.js +51 -0
  155. package/dist/utils/constants/fieldConstants.d.ts +2 -0
  156. package/dist/utils/constants/fieldConstants.js +2 -0
  157. package/package.json +1 -1
@@ -0,0 +1,64 @@
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import { useController } from "react-hook-form";
4
+ import { FormControl, InputLabel, Select, MenuItem } from "@mui/material";
5
+ import { useIntl, FormattedMessage } from "react-intl";
6
+ import { PopupConfirmationDialog } from "../../../dialogs/popupConfirmationDialog/PopupConfirmationDialog.js";
7
+ function SelectWithConfirmationInput({
8
+ name,
9
+ options,
10
+ onValidate,
11
+ getOptionLabel,
12
+ label
13
+ }) {
14
+ const intl = useIntl();
15
+ const [openConfirmationDialog, setOpenConfirmationDialog] = useState(false);
16
+ const [newValue, setNewValue] = useState("");
17
+ const {
18
+ field: { value, onChange }
19
+ } = useController({
20
+ name
21
+ });
22
+ const handleChange = (event) => {
23
+ if (value) {
24
+ setOpenConfirmationDialog(true);
25
+ setNewValue(event.target.value);
26
+ } else {
27
+ onChange(event.target.value);
28
+ }
29
+ };
30
+ const handleValidate = () => {
31
+ onValidate?.();
32
+ onChange(newValue);
33
+ setOpenConfirmationDialog(false);
34
+ };
35
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
36
+ /* @__PURE__ */ jsxs(FormControl, { fullWidth: true, children: [
37
+ /* @__PURE__ */ jsx(InputLabel, { size: "small", children: /* @__PURE__ */ jsx(FormattedMessage, { id: label }) }),
38
+ /* @__PURE__ */ jsx(
39
+ Select,
40
+ {
41
+ value: value ?? "",
42
+ size: "small",
43
+ fullWidth: true,
44
+ onChange: handleChange,
45
+ label: /* @__PURE__ */ jsx(FormattedMessage, { id: label }),
46
+ children: options.map((option) => /* @__PURE__ */ jsx(MenuItem, { value: option, children: getOptionLabel ? getOptionLabel(option) : intl.formatMessage({ id: option }) }, option))
47
+ }
48
+ )
49
+ ] }),
50
+ /* @__PURE__ */ jsx(
51
+ PopupConfirmationDialog,
52
+ {
53
+ message: "changeTypeConfirmation",
54
+ openConfirmationPopup: openConfirmationDialog,
55
+ setOpenConfirmationPopup: setOpenConfirmationDialog,
56
+ handlePopupConfirmation: handleValidate,
57
+ validateButtonLabel: "button.changeType"
58
+ }
59
+ )
60
+ ] });
61
+ }
62
+ export {
63
+ SelectWithConfirmationInput
64
+ };
@@ -8,4 +8,5 @@ export * from './CountriesInput';
8
8
  export * from './InputWithPopupConfirmation';
9
9
  export * from './MuiSelectInput';
10
10
  export * from './SelectInput';
11
+ export * from './SelectWithConfirmationInput';
11
12
  export * from './EnumInput';
@@ -2,11 +2,13 @@ import { CountriesInput } from "./CountriesInput.js";
2
2
  import { InputWithPopupConfirmation } from "./InputWithPopupConfirmation.js";
3
3
  import { MuiSelectInput } from "./MuiSelectInput.js";
4
4
  import { SelectInput } from "./SelectInput.js";
5
+ import { SelectWithConfirmationInput } from "./SelectWithConfirmationInput.js";
5
6
  import { EnumInput } from "./EnumInput.js";
6
7
  export {
7
8
  CountriesInput,
8
9
  EnumInput,
9
10
  InputWithPopupConfirmation,
10
11
  MuiSelectInput,
11
- SelectInput
12
+ SelectInput,
13
+ SelectWithConfirmationInput
12
14
  };
@@ -0,0 +1,16 @@
1
+ import { FieldOptionType } from './assignment.type';
2
+ export declare const FIELD_OPTIONS: Record<string, FieldOptionType>;
3
+ export declare const EQUIPMENTS_FIELDS: {
4
+ readonly SUBSTATION: readonly [FieldOptionType];
5
+ readonly VOLTAGE_LEVEL: readonly [FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType];
6
+ readonly LINE: readonly [FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType];
7
+ readonly TWO_WINDINGS_TRANSFORMER: readonly [FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType];
8
+ readonly THREE_WINDINGS_TRANSFORMER: readonly [FieldOptionType];
9
+ readonly GENERATOR: readonly [FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType];
10
+ readonly BATTERY: readonly [FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType];
11
+ readonly LOAD: readonly [FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType];
12
+ readonly SHUNT_COMPENSATOR: readonly [FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType];
13
+ readonly STATIC_VAR_COMPENSATOR: readonly [FieldOptionType];
14
+ readonly HVDC_LINE: readonly [FieldOptionType];
15
+ };
16
+ export type EquipmentTypeOptionType = keyof typeof EQUIPMENTS_FIELDS;
@@ -0,0 +1,402 @@
1
+ import { DataType } from "./assignment.type.js";
2
+ import { SIEMENS, MEGA_VAR, MEGA_WATT, PERCENTAGE, OHM, MEGA_VOLT_AMPERE, KILO_VOLT, MICRO_SIEMENS, KILO_AMPERE } from "../../../../../utils/constants/unitsConstants.js";
3
+ import "../../../../../utils/conversionUtils.js";
4
+ import { EquipmentType, LOAD_TYPES } from "../../../../../utils/types/equipmentType.js";
5
+ import { FieldType } from "../../../../../utils/types/fieldType.js";
6
+ import "react/jsx-runtime";
7
+ import "@mui/icons-material";
8
+ import "../../../../../utils/yupConfig.js";
9
+ const FIELD_OPTIONS = {
10
+ PROPERTY: {
11
+ id: FieldType.FREE_PROPERTIES,
12
+ label: "Property",
13
+ dataType: DataType.PROPERTY
14
+ },
15
+ RATED_NOMINAL_POWER: {
16
+ id: FieldType.RATED_NOMINAL_POWER,
17
+ label: "RatedNominalPowerText",
18
+ unit: MEGA_VOLT_AMPERE,
19
+ dataType: DataType.DOUBLE,
20
+ settableToNone: true
21
+ },
22
+ MINIMUM_ACTIVE_POWER: {
23
+ id: FieldType.MINIMUM_ACTIVE_POWER,
24
+ label: "MinimumActivePowerText",
25
+ unit: MEGA_WATT,
26
+ dataType: DataType.DOUBLE
27
+ },
28
+ MAXIMUM_ACTIVE_POWER: {
29
+ id: FieldType.MAXIMUM_ACTIVE_POWER,
30
+ label: "MaximumActivePowerText",
31
+ unit: MEGA_WATT,
32
+ dataType: DataType.DOUBLE
33
+ },
34
+ ACTIVE_POWER_SET_POINT: {
35
+ id: FieldType.ACTIVE_POWER_SET_POINT,
36
+ label: "ActivePowerSetPointText",
37
+ unit: MEGA_WATT,
38
+ dataType: DataType.DOUBLE
39
+ },
40
+ REACTIVE_POWER_SET_POINT: {
41
+ id: FieldType.REACTIVE_POWER_SET_POINT,
42
+ label: "ReactivePowerSetPointText",
43
+ unit: MEGA_VAR,
44
+ dataType: DataType.DOUBLE
45
+ },
46
+ VOLTAGE_SET_POINT: {
47
+ id: FieldType.VOLTAGE_SET_POINT,
48
+ label: "GeneratorTargetV",
49
+ unit: KILO_VOLT,
50
+ dataType: DataType.DOUBLE
51
+ },
52
+ PLANNED_ACTIVE_POWER_SET_POINT: {
53
+ id: FieldType.PLANNED_ACTIVE_POWER_SET_POINT,
54
+ label: "PlannedActivePowerSetPointForm",
55
+ unit: MEGA_WATT,
56
+ dataType: DataType.DOUBLE
57
+ },
58
+ MARGINAL_COST: {
59
+ id: FieldType.MARGINAL_COST,
60
+ label: "MarginalCost",
61
+ dataType: DataType.DOUBLE
62
+ },
63
+ PLANNED_OUTAGE_RATE: {
64
+ id: FieldType.PLANNED_OUTAGE_RATE,
65
+ label: "plannedOutageRate",
66
+ dataType: DataType.DOUBLE
67
+ },
68
+ FORCED_OUTAGE_RATE: {
69
+ id: FieldType.FORCED_OUTAGE_RATE,
70
+ label: "forcedOutageRate",
71
+ dataType: DataType.DOUBLE
72
+ },
73
+ DROOP: {
74
+ id: FieldType.DROOP,
75
+ label: "ActivePowerRegulationDroop",
76
+ unit: PERCENTAGE,
77
+ dataType: DataType.DOUBLE
78
+ },
79
+ TRANSIENT_REACTANCE: {
80
+ id: FieldType.TRANSIENT_REACTANCE,
81
+ label: "TransientReactanceForm",
82
+ unit: OHM,
83
+ dataType: DataType.DOUBLE
84
+ },
85
+ STEP_UP_TRANSFORMER_REACTANCE: {
86
+ id: FieldType.STEP_UP_TRANSFORMER_REACTANCE,
87
+ label: "TransformerReactanceForm",
88
+ unit: OHM,
89
+ dataType: DataType.DOUBLE,
90
+ settableToNone: true
91
+ },
92
+ Q_PERCENT: {
93
+ id: FieldType.Q_PERCENT,
94
+ label: "ReactivePercentageVoltageRegulation",
95
+ unit: PERCENTAGE,
96
+ dataType: DataType.DOUBLE
97
+ },
98
+ VOLTAGE_REGULATOR_ON: {
99
+ id: FieldType.VOLTAGE_REGULATOR_ON,
100
+ label: "voltageRegulationOn",
101
+ dataType: DataType.BOOLEAN
102
+ },
103
+ MAXIMUM_SECTION_COUNT: {
104
+ id: FieldType.MAXIMUM_SECTION_COUNT,
105
+ label: "maximumSectionCount",
106
+ dataType: DataType.INTEGER
107
+ },
108
+ SECTION_COUNT: {
109
+ id: FieldType.SECTION_COUNT,
110
+ label: "sectionCount",
111
+ dataType: DataType.INTEGER
112
+ },
113
+ MAX_SUSCEPTANCE: {
114
+ id: FieldType.MAX_SUSCEPTANCE,
115
+ label: "maxSusceptance",
116
+ unit: SIEMENS,
117
+ dataType: DataType.DOUBLE
118
+ },
119
+ MAX_Q_AT_NOMINAL_V: {
120
+ id: FieldType.MAX_Q_AT_NOMINAL_V,
121
+ label: "maxQAtNominalV",
122
+ unit: MEGA_VAR,
123
+ dataType: DataType.DOUBLE
124
+ },
125
+ NOMINAL_VOLTAGE: {
126
+ id: FieldType.NOMINAL_VOLTAGE,
127
+ label: "NominalVoltage",
128
+ unit: KILO_VOLT,
129
+ dataType: DataType.DOUBLE
130
+ },
131
+ LOW_VOLTAGE_LIMIT: {
132
+ id: FieldType.LOW_VOLTAGE_LIMIT,
133
+ label: "LowVoltageLimit",
134
+ unit: KILO_VOLT,
135
+ settableToNone: true,
136
+ dataType: DataType.DOUBLE
137
+ },
138
+ HIGH_VOLTAGE_LIMIT: {
139
+ id: FieldType.HIGH_VOLTAGE_LIMIT,
140
+ label: "HighVoltageLimit",
141
+ unit: KILO_VOLT,
142
+ settableToNone: true,
143
+ dataType: DataType.DOUBLE
144
+ },
145
+ LOW_SHORT_CIRCUIT_CURRENT_LIMIT: {
146
+ id: FieldType.LOW_SHORT_CIRCUIT_CURRENT_LIMIT,
147
+ label: "LowShortCircuitCurrentLimit",
148
+ unit: KILO_AMPERE,
149
+ settableToNone: true,
150
+ dataType: DataType.DOUBLE
151
+ },
152
+ HIGH_SHORT_CIRCUIT_CURRENT_LIMIT: {
153
+ id: FieldType.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT,
154
+ label: "HighShortCircuitCurrentLimit",
155
+ unit: KILO_AMPERE,
156
+ settableToNone: true,
157
+ dataType: DataType.DOUBLE
158
+ },
159
+ ACTIVE_POWER: {
160
+ id: FieldType.ACTIVE_POWER,
161
+ label: "ActivePowerText",
162
+ unit: MEGA_WATT,
163
+ dataType: DataType.DOUBLE
164
+ },
165
+ REACTIVE_POWER: {
166
+ id: FieldType.REACTIVE_POWER,
167
+ label: "ReactivePowerText",
168
+ unit: MEGA_VAR,
169
+ dataType: DataType.DOUBLE
170
+ },
171
+ R: {
172
+ id: FieldType.R,
173
+ label: "SeriesResistanceText",
174
+ unit: OHM,
175
+ dataType: DataType.DOUBLE
176
+ },
177
+ X: {
178
+ id: FieldType.X,
179
+ label: "SeriesReactanceText",
180
+ unit: OHM,
181
+ dataType: DataType.DOUBLE
182
+ },
183
+ G: {
184
+ id: FieldType.G,
185
+ label: "ShuntConductanceText",
186
+ unit: MICRO_SIEMENS,
187
+ dataType: DataType.DOUBLE
188
+ },
189
+ G1: {
190
+ id: FieldType.G1,
191
+ label: "ShuntConductanceText1",
192
+ unit: MICRO_SIEMENS,
193
+ dataType: DataType.DOUBLE
194
+ },
195
+ G2: {
196
+ id: FieldType.G2,
197
+ label: "ShuntConductanceText2",
198
+ unit: MICRO_SIEMENS,
199
+ dataType: DataType.DOUBLE
200
+ },
201
+ B: {
202
+ id: FieldType.B,
203
+ label: "ShuntSusceptanceText",
204
+ unit: MICRO_SIEMENS,
205
+ dataType: DataType.DOUBLE
206
+ },
207
+ B1: {
208
+ id: FieldType.B1,
209
+ label: "ShuntSusceptanceText1",
210
+ unit: MICRO_SIEMENS,
211
+ dataType: DataType.DOUBLE
212
+ },
213
+ B2: {
214
+ id: FieldType.B2,
215
+ label: "ShuntSusceptanceText2",
216
+ unit: MICRO_SIEMENS,
217
+ dataType: DataType.DOUBLE
218
+ },
219
+ RATED_U1: {
220
+ id: FieldType.RATED_U1,
221
+ label: "RatedU1",
222
+ unit: KILO_VOLT,
223
+ dataType: DataType.DOUBLE
224
+ },
225
+ RATED_U2: {
226
+ id: FieldType.RATED_U2,
227
+ label: "RatedU2",
228
+ unit: KILO_VOLT,
229
+ dataType: DataType.DOUBLE
230
+ },
231
+ RATED_S: {
232
+ id: FieldType.RATED_S,
233
+ label: "RatedNominalPowerText",
234
+ unit: MEGA_VOLT_AMPERE,
235
+ dataType: DataType.DOUBLE,
236
+ settableToNone: true
237
+ },
238
+ TARGET_V: {
239
+ id: FieldType.TARGET_V,
240
+ label: "RatioTargetV",
241
+ unit: KILO_VOLT,
242
+ dataType: DataType.DOUBLE
243
+ },
244
+ RATIO_LOW_TAP_POSITION: {
245
+ id: FieldType.RATIO_LOW_TAP_POSITION,
246
+ label: "RatioLowTapPosition",
247
+ dataType: DataType.INTEGER
248
+ },
249
+ RATIO_TAP_POSITION: {
250
+ id: FieldType.RATIO_TAP_POSITION,
251
+ label: "RatioTapPosition",
252
+ dataType: DataType.INTEGER
253
+ },
254
+ RATIO_TARGET_DEADBAND: {
255
+ id: FieldType.RATIO_TARGET_DEADBAND,
256
+ unit: KILO_VOLT,
257
+ label: "RatioDeadBand",
258
+ dataType: DataType.DOUBLE
259
+ },
260
+ REGULATION_VALUE: {
261
+ id: FieldType.REGULATION_VALUE,
262
+ label: "PhaseRegulatingValue",
263
+ dataType: DataType.DOUBLE
264
+ },
265
+ PHASE_LOW_TAP_POSITION: {
266
+ id: FieldType.PHASE_LOW_TAP_POSITION,
267
+ label: "PhaseLowTapPosition",
268
+ dataType: DataType.INTEGER
269
+ },
270
+ PHASE_TAP_POSITION: {
271
+ id: FieldType.PHASE_TAP_POSITION,
272
+ label: "PhaseTapPosition",
273
+ dataType: DataType.INTEGER
274
+ },
275
+ PHASE_TARGET_DEADBAND: {
276
+ id: FieldType.PHASE_TARGET_DEADBAND,
277
+ label: "PhaseDeadBand",
278
+ dataType: DataType.DOUBLE
279
+ },
280
+ LOAD_TYPE: {
281
+ id: FieldType.LOAD_TYPE,
282
+ label: "loadType",
283
+ dataType: DataType.ENUM,
284
+ values: LOAD_TYPES
285
+ },
286
+ SELECTED_OPERATIONAL_LIMITS_GROUP_ID1: {
287
+ id: FieldType.SELECTED_OPERATIONAL_LIMITS_GROUP_ID1,
288
+ label: "selectedOperationalLimitsGroup1",
289
+ dataType: DataType.STRING,
290
+ settableToNone: true
291
+ },
292
+ SELECTED_OPERATIONAL_LIMITS_GROUP_ID2: {
293
+ id: FieldType.SELECTED_OPERATIONAL_LIMITS_GROUP_ID2,
294
+ label: "selectedOperationalLimitsGroup2",
295
+ dataType: DataType.STRING,
296
+ settableToNone: true
297
+ },
298
+ OPERATIONAL_LIMITS_GROUP_1_WITH_PROPERTIES: {
299
+ id: FieldType.OPERATIONAL_LIMITS_GROUP_1_WITH_PROPERTIES,
300
+ label: "operationalLimitsGroup1WithProperties",
301
+ dataType: DataType.PROPERTY
302
+ },
303
+ OPERATIONAL_LIMITS_GROUP_2_WITH_PROPERTIES: {
304
+ id: FieldType.OPERATIONAL_LIMITS_GROUP_2_WITH_PROPERTIES,
305
+ label: "operationalLimitsGroup2WithProperties",
306
+ dataType: DataType.PROPERTY
307
+ }
308
+ };
309
+ const EQUIPMENTS_FIELDS = {
310
+ [EquipmentType.SUBSTATION]: [FIELD_OPTIONS.PROPERTY],
311
+ [EquipmentType.VOLTAGE_LEVEL]: [
312
+ FIELD_OPTIONS.PROPERTY,
313
+ FIELD_OPTIONS.NOMINAL_VOLTAGE,
314
+ FIELD_OPTIONS.LOW_VOLTAGE_LIMIT,
315
+ FIELD_OPTIONS.HIGH_VOLTAGE_LIMIT,
316
+ FIELD_OPTIONS.LOW_SHORT_CIRCUIT_CURRENT_LIMIT,
317
+ FIELD_OPTIONS.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT
318
+ ],
319
+ [EquipmentType.LINE]: [
320
+ FIELD_OPTIONS.PROPERTY,
321
+ FIELD_OPTIONS.R,
322
+ FIELD_OPTIONS.X,
323
+ FIELD_OPTIONS.G1,
324
+ FIELD_OPTIONS.G2,
325
+ FIELD_OPTIONS.B1,
326
+ FIELD_OPTIONS.B2,
327
+ FIELD_OPTIONS.SELECTED_OPERATIONAL_LIMITS_GROUP_ID1,
328
+ FIELD_OPTIONS.SELECTED_OPERATIONAL_LIMITS_GROUP_ID2,
329
+ FIELD_OPTIONS.OPERATIONAL_LIMITS_GROUP_1_WITH_PROPERTIES,
330
+ FIELD_OPTIONS.OPERATIONAL_LIMITS_GROUP_2_WITH_PROPERTIES
331
+ ],
332
+ [EquipmentType.TWO_WINDINGS_TRANSFORMER]: [
333
+ FIELD_OPTIONS.PROPERTY,
334
+ FIELD_OPTIONS.R,
335
+ FIELD_OPTIONS.X,
336
+ FIELD_OPTIONS.G,
337
+ FIELD_OPTIONS.B,
338
+ FIELD_OPTIONS.RATED_U1,
339
+ FIELD_OPTIONS.RATED_U2,
340
+ FIELD_OPTIONS.RATED_S,
341
+ FIELD_OPTIONS.TARGET_V,
342
+ FIELD_OPTIONS.RATIO_LOW_TAP_POSITION,
343
+ FIELD_OPTIONS.RATIO_TAP_POSITION,
344
+ FIELD_OPTIONS.RATIO_TARGET_DEADBAND,
345
+ FIELD_OPTIONS.REGULATION_VALUE,
346
+ FIELD_OPTIONS.PHASE_LOW_TAP_POSITION,
347
+ FIELD_OPTIONS.PHASE_TAP_POSITION,
348
+ FIELD_OPTIONS.PHASE_TARGET_DEADBAND,
349
+ FIELD_OPTIONS.SELECTED_OPERATIONAL_LIMITS_GROUP_ID1,
350
+ FIELD_OPTIONS.SELECTED_OPERATIONAL_LIMITS_GROUP_ID2,
351
+ FIELD_OPTIONS.OPERATIONAL_LIMITS_GROUP_1_WITH_PROPERTIES,
352
+ FIELD_OPTIONS.OPERATIONAL_LIMITS_GROUP_2_WITH_PROPERTIES
353
+ ],
354
+ [EquipmentType.THREE_WINDINGS_TRANSFORMER]: [FIELD_OPTIONS.PROPERTY],
355
+ [EquipmentType.GENERATOR]: [
356
+ FIELD_OPTIONS.PROPERTY,
357
+ FIELD_OPTIONS.VOLTAGE_REGULATOR_ON,
358
+ FIELD_OPTIONS.RATED_NOMINAL_POWER,
359
+ FIELD_OPTIONS.MINIMUM_ACTIVE_POWER,
360
+ FIELD_OPTIONS.MAXIMUM_ACTIVE_POWER,
361
+ FIELD_OPTIONS.ACTIVE_POWER_SET_POINT,
362
+ FIELD_OPTIONS.REACTIVE_POWER_SET_POINT,
363
+ FIELD_OPTIONS.VOLTAGE_SET_POINT,
364
+ FIELD_OPTIONS.PLANNED_ACTIVE_POWER_SET_POINT,
365
+ FIELD_OPTIONS.MARGINAL_COST,
366
+ FIELD_OPTIONS.PLANNED_OUTAGE_RATE,
367
+ FIELD_OPTIONS.FORCED_OUTAGE_RATE,
368
+ FIELD_OPTIONS.DROOP,
369
+ FIELD_OPTIONS.TRANSIENT_REACTANCE,
370
+ FIELD_OPTIONS.STEP_UP_TRANSFORMER_REACTANCE,
371
+ FIELD_OPTIONS.Q_PERCENT
372
+ ],
373
+ [EquipmentType.BATTERY]: [
374
+ FIELD_OPTIONS.PROPERTY,
375
+ FIELD_OPTIONS.MINIMUM_ACTIVE_POWER,
376
+ FIELD_OPTIONS.MAXIMUM_ACTIVE_POWER,
377
+ FIELD_OPTIONS.ACTIVE_POWER_SET_POINT,
378
+ FIELD_OPTIONS.REACTIVE_POWER_SET_POINT,
379
+ FIELD_OPTIONS.DROOP,
380
+ FIELD_OPTIONS.TRANSIENT_REACTANCE,
381
+ FIELD_OPTIONS.STEP_UP_TRANSFORMER_REACTANCE
382
+ ],
383
+ [EquipmentType.LOAD]: [
384
+ FIELD_OPTIONS.PROPERTY,
385
+ FIELD_OPTIONS.LOAD_TYPE,
386
+ FIELD_OPTIONS.ACTIVE_POWER_SET_POINT,
387
+ FIELD_OPTIONS.REACTIVE_POWER_SET_POINT
388
+ ],
389
+ [EquipmentType.SHUNT_COMPENSATOR]: [
390
+ FIELD_OPTIONS.PROPERTY,
391
+ FIELD_OPTIONS.MAXIMUM_SECTION_COUNT,
392
+ FIELD_OPTIONS.SECTION_COUNT,
393
+ FIELD_OPTIONS.MAX_SUSCEPTANCE,
394
+ FIELD_OPTIONS.MAX_Q_AT_NOMINAL_V
395
+ ],
396
+ [EquipmentType.STATIC_VAR_COMPENSATOR]: [FIELD_OPTIONS.PROPERTY],
397
+ [EquipmentType.HVDC_LINE]: [FIELD_OPTIONS.PROPERTY]
398
+ };
399
+ export {
400
+ EQUIPMENTS_FIELDS,
401
+ FIELD_OPTIONS
402
+ };
@@ -0,0 +1,12 @@
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
+ interface AssignmentFormProps {
8
+ name: string;
9
+ index: number;
10
+ }
11
+ declare function AssignmentForm(props: Readonly<AssignmentFormProps>): import("react/jsx-runtime").JSX.Element;
12
+ export default AssignmentForm;