@gridsuite/commons-ui 0.241.0 → 0.242.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 (147) hide show
  1. package/README.md +4 -0
  2. package/dist/components/composite/grid/grid-item.d.ts +2 -1
  3. package/dist/components/composite/grid/grid-item.js +9 -2
  4. package/dist/components/ui/inputs/checkbox-autocomplete/checkbox-autocomplete.d.ts +1 -2
  5. package/dist/features/index.js +87 -3
  6. package/dist/features/network-modification-table/index.js +2 -1
  7. package/dist/features/network-modification-table/use-modifications-drag-and-drop.js +2 -1
  8. package/dist/features/network-modification-table/utils.d.ts +1 -0
  9. package/dist/features/network-modification-table/utils.js +5 -1
  10. package/dist/features/network-modifications/battery/creation/BatteryCreationForm.js +3 -0
  11. package/dist/features/network-modifications/battery/creation/batteryCreation.utils.js +3 -0
  12. package/dist/features/network-modifications/battery/modification/BatteryDialogHeader.js +3 -0
  13. package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.js +3 -0
  14. package/dist/features/network-modifications/battery/modification/batteryModification.utils.js +3 -0
  15. package/dist/features/network-modifications/common/connectivity/connectivityForm.utils.d.ts +71 -2
  16. package/dist/features/network-modifications/common/connectivity/connectivityForm.utils.js +26 -8
  17. package/dist/features/network-modifications/common/connectivity/index.js +3 -1
  18. package/dist/features/network-modifications/common/currentLimits/LimitsPane.d.ts +7 -0
  19. package/dist/features/network-modifications/common/currentLimits/LimitsPane.js +243 -0
  20. package/dist/features/network-modifications/common/currentLimits/LimitsTagChip.d.ts +9 -0
  21. package/dist/features/network-modifications/common/currentLimits/LimitsTagChip.js +29 -0
  22. package/dist/features/network-modifications/common/currentLimits/SelectedOperationalLimitGroup.d.ts +9 -0
  23. package/dist/features/network-modifications/common/currentLimits/SelectedOperationalLimitGroup.js +100 -0
  24. package/dist/features/network-modifications/common/currentLimits/index.d.ts +12 -0
  25. package/dist/features/network-modifications/common/currentLimits/index.js +47 -0
  26. package/dist/features/network-modifications/common/currentLimits/limits.types.d.ts +52 -0
  27. package/dist/features/network-modifications/common/currentLimits/limits.types.js +17 -0
  28. package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsEditor.d.ts +10 -0
  29. package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsEditor.js +285 -0
  30. package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsPropertiesSideStack.d.ts +5 -0
  31. package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsPropertiesSideStack.js +184 -0
  32. package/dist/features/network-modifications/common/currentLimits/limitsEditor/TemporaryLimitsTable.d.ts +14 -0
  33. package/dist/features/network-modifications/common/currentLimits/limitsEditor/TemporaryLimitsTable.js +166 -0
  34. package/dist/features/network-modifications/common/currentLimits/limitsEditor/index.d.ts +10 -0
  35. package/dist/features/network-modifications/common/currentLimits/limitsEditor/index.js +10 -0
  36. package/dist/features/network-modifications/common/currentLimits/limitsEditor/limitsChart.d.ts +11 -0
  37. package/dist/features/network-modifications/common/currentLimits/limitsEditor/limitsChart.js +177 -0
  38. package/dist/features/network-modifications/common/currentLimits/limitsPane.utils.d.ts +213 -0
  39. package/dist/features/network-modifications/common/currentLimits/limitsPane.utils.js +337 -0
  40. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsGroupsContextualMenu.d.ts +25 -0
  41. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsGroupsContextualMenu.js +92 -0
  42. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsPropertiesStack.d.ts +10 -0
  43. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsPropertiesStack.js +25 -0
  44. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroupTabLabel.d.ts +10 -0
  45. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroupTabLabel.js +73 -0
  46. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroups.d.ts +16 -0
  47. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroups.js +121 -0
  48. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/index.d.ts +11 -0
  49. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/index.js +12 -0
  50. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroups.types.d.ts +71 -0
  51. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroups.types.js +15 -0
  52. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroupsStyles.d.ts +46 -0
  53. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroupsStyles.js +45 -0
  54. package/dist/features/network-modifications/common/index.d.ts +1 -0
  55. package/dist/features/network-modifications/common/index.js +50 -2
  56. package/dist/features/network-modifications/common/measurements/branchActiveReactivePowerForm.utils.d.ts +11 -0
  57. package/dist/features/network-modifications/common/measurements/branchActiveReactivePowerForm.utils.js +6 -4
  58. package/dist/features/network-modifications/common/measurements/index.js +2 -1
  59. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveTableForm.js +1 -1
  60. package/dist/features/network-modifications/common/voltageRegulation/VoltageRegulationForm.js +3 -7
  61. package/dist/features/network-modifications/equipmentDeletion/EquipmentDeletionForm.js +3 -0
  62. package/dist/features/network-modifications/generator/creation/GeneratorCreationForm.js +9 -6
  63. package/dist/features/network-modifications/generator/creation/generatorCreation.utils.js +3 -0
  64. package/dist/features/network-modifications/generator/modification/GeneratorDialogHeader.js +3 -0
  65. package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.js +9 -6
  66. package/dist/features/network-modifications/generator/modification/generatorModification.utils.js +3 -0
  67. package/dist/features/network-modifications/index.d.ts +1 -0
  68. package/dist/features/network-modifications/index.js +85 -2
  69. package/dist/features/{parameters/dynamic-simulation/curve/curve-parameters.type.d.ts → network-modifications/line/catalog/index.d.ts} +3 -1
  70. package/dist/features/network-modifications/line/catalog/index.js +14 -0
  71. package/dist/features/network-modifications/line/catalog/lineCatalog.type.d.ts +66 -0
  72. package/dist/features/network-modifications/line/catalog/lineCatalog.type.js +7 -0
  73. package/dist/features/network-modifications/line/catalog/segment.utils.d.ts +90 -0
  74. package/dist/features/network-modifications/line/catalog/segment.utils.js +100 -0
  75. package/dist/features/network-modifications/line/characteristics/LineCharacteristicsPane.d.ts +8 -0
  76. package/dist/features/network-modifications/line/characteristics/LineCharacteristicsPane.js +152 -0
  77. package/dist/features/network-modifications/line/characteristics/index.d.ts +9 -0
  78. package/dist/features/network-modifications/line/characteristics/index.js +9 -0
  79. package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.types.d.ts +14 -0
  80. package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.d.ts +52 -0
  81. package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.js +53 -0
  82. package/dist/features/network-modifications/line/common/LineDialogHeader.d.ts +6 -0
  83. package/dist/features/network-modifications/line/common/LineDialogHeader.js +103 -0
  84. package/dist/features/network-modifications/line/common/LineDialogTabs.d.ts +9 -0
  85. package/dist/features/network-modifications/line/common/LineDialogTabs.js +61 -0
  86. package/dist/features/network-modifications/line/common/LineDialogTabsContent.d.ts +8 -0
  87. package/dist/features/network-modifications/line/common/LineDialogTabsContent.js +96 -0
  88. package/dist/features/network-modifications/line/common/LineForm.d.ts +6 -0
  89. package/dist/features/network-modifications/line/common/LineForm.js +50 -0
  90. package/dist/features/network-modifications/line/common/index.d.ts +12 -0
  91. package/dist/features/network-modifications/line/common/index.js +13 -0
  92. package/dist/features/network-modifications/line/common/line.types.d.ts +47 -0
  93. package/dist/features/network-modifications/line/common/line.types.js +1 -0
  94. package/dist/features/network-modifications/line/common/line.utils.d.ts +13 -0
  95. package/dist/features/network-modifications/line/common/line.utils.js +34 -0
  96. package/dist/features/network-modifications/line/creation/index.d.ts +8 -0
  97. package/dist/features/network-modifications/line/creation/index.js +7 -0
  98. package/dist/features/network-modifications/line/creation/lineCreation.types.d.ts +39 -0
  99. package/dist/features/network-modifications/line/creation/lineCreation.types.js +1 -0
  100. package/dist/features/network-modifications/line/creation/lineCreation.utils.d.ts +151 -0
  101. package/dist/features/network-modifications/line/creation/lineCreation.utils.js +172 -0
  102. package/dist/features/network-modifications/line/index.d.ts +10 -0
  103. package/dist/features/network-modifications/line/index.js +37 -0
  104. package/dist/features/network-modifications/load/common/LoadDialogHeader.js +3 -0
  105. package/dist/features/network-modifications/load/modification/loadModification.utils.js +3 -0
  106. package/dist/features/network-modifications/shunt-compensator/common/CharacteristicsForm.js +7 -6
  107. package/dist/features/network-modifications/shunt-compensator/creation/ShuntCompensatorCreationForm.js +3 -0
  108. package/dist/features/network-modifications/shunt-compensator/creation/shuntCompensatorCreation.utils.js +3 -0
  109. package/dist/features/network-modifications/shunt-compensator/modification/ShuntCompensatorModificationForm.js +3 -0
  110. package/dist/features/network-modifications/shunt-compensator/modification/shuntCompensatorModification.utils.js +3 -0
  111. package/dist/features/network-modifications/substation/creation/SubstationCreationForm.js +3 -0
  112. package/dist/features/network-modifications/substation/modification/SubstationModificationForm.js +3 -0
  113. package/dist/features/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +3 -0
  114. package/dist/features/network-modifications/voltageLevel/creation/index.js +3 -0
  115. package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationCreationSection.js +3 -0
  116. package/dist/features/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js +3 -0
  117. package/dist/features/network-modifications/voltageLevel/index.js +3 -0
  118. package/dist/features/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js +4 -1
  119. package/dist/features/parameters/common/contingency-table/contingency-table.js +22 -10
  120. package/dist/features/parameters/common/contingency-table/types.d.ts +7 -8
  121. package/dist/features/parameters/common/contingency-table/utils.d.ts +13 -0
  122. package/dist/features/parameters/common/contingency-table/utils.js +31 -0
  123. package/dist/features/parameters/loadflow/load-flow-general-parameters.js +5 -1
  124. package/dist/features/parameters/loadflow/load-flow-parameters-dialog.js +2 -2
  125. package/dist/features/parameters/network-visualizations/network-visualizations-parameters-dialog.js +2 -2
  126. package/dist/features/parameters/pcc-min/pcc-min-parameters-dialog.js +2 -2
  127. package/dist/features/parameters/security-analysis/security-analysis-parameters-dialog.js +3 -3
  128. package/dist/features/parameters/security-analysis/security-analysis-parameters-form.js +19 -31
  129. package/dist/features/parameters/sensi/sensitivity-analysis-parameters-dialog.js +3 -3
  130. package/dist/features/parameters/short-circuit/short-circuit-parameters-dialog.js +2 -2
  131. package/dist/features/parameters/voltage-init/voltage-init-parameters-dialog.js +2 -2
  132. package/dist/hooks/useModificationLabelComputer.js +1 -0
  133. package/dist/index.js +87 -3
  134. package/dist/translations/en/networkModificationsEn.d.ts +28 -0
  135. package/dist/translations/en/networkModificationsEn.js +28 -0
  136. package/dist/translations/en/parameters.d.ts +3 -1
  137. package/dist/translations/en/parameters.js +3 -1
  138. package/dist/translations/fr/networkModificationsFr.d.ts +28 -0
  139. package/dist/translations/fr/networkModificationsFr.js +28 -0
  140. package/dist/translations/fr/parameters.d.ts +3 -1
  141. package/dist/translations/fr/parameters.js +3 -1
  142. package/dist/utils/constants/fieldConstants.d.ts +47 -1
  143. package/dist/utils/constants/fieldConstants.js +46 -0
  144. package/dist/utils/types/modificationType.d.ts +4 -0
  145. package/dist/utils/types/modificationType.js +5 -0
  146. package/package.json +11 -4
  147. /package/dist/features/{parameters/dynamic-simulation/curve/curve-parameters.type.js → network-modifications/line/characteristics/lineCharacteristicsPane.types.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import { Box, Grid2 } from "@mui/material";
2
+ import { Box, Grid2, Stack } from "@mui/material";
3
3
  import { useIntl, FormattedMessage } from "react-intl";
4
4
  import { useWatch } from "react-hook-form";
5
5
  import { GeneratorDialogTab } from "./generatorTabs.utils.js";
@@ -73,6 +73,9 @@ import { ShortCircuitForm } from "../../common/shortCircuit/ShortCircuitForm.js"
73
73
  import { ReactiveLimitsForm } from "../../common/reactiveLimits/ReactiveLimitsForm.js";
74
74
  import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
75
75
  import { VoltageRegulationForm } from "../../common/voltageRegulation/VoltageRegulationForm.js";
76
+ import "@mui/material/colors";
77
+ import "@mui/x-charts";
78
+ import "../../common/currentLimits/limitsPane.utils.js";
76
79
  function GeneratorDialogTabsContent({
77
80
  generatorToModify,
78
81
  updatePreviousReactiveCapabilityCurveTable,
@@ -216,7 +219,6 @@ function GeneratorDialogTabsContent({
216
219
  }
217
220
  ),
218
221
  /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, paddingTop: 2, children: [
219
- /* @__PURE__ */ jsx(Box, { sx: { width: "100%" } }),
220
222
  /* @__PURE__ */ jsx(
221
223
  GridItem,
222
224
  {
@@ -226,7 +228,6 @@ function GeneratorDialogTabsContent({
226
228
  }
227
229
  ),
228
230
  voltageRegulationFields,
229
- /* @__PURE__ */ jsx(Box, { sx: { width: "100%" } }),
230
231
  /* @__PURE__ */ jsx(
231
232
  ActivePowerControlForm,
232
233
  {
@@ -258,9 +259,11 @@ function GeneratorDialogTabsContent({
258
259
  /* @__PURE__ */ jsx(GridSection, { title: "ShortCircuit" }),
259
260
  /* @__PURE__ */ jsx(ShortCircuitForm, { previousValues: generatorToModify?.generatorShortCircuit }),
260
261
  /* @__PURE__ */ jsx(GridSection, { title: "GenerationDispatch" }),
261
- /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, children: [
262
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: plannedActivePowerSetPointField }),
263
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: marginalCostField }),
262
+ /* @__PURE__ */ jsxs(Stack, { spacing: 2, children: [
263
+ /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, children: [
264
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: plannedActivePowerSetPointField }),
265
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: marginalCostField })
266
+ ] }),
264
267
  /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, children: [
265
268
  /* @__PURE__ */ jsx(GridItem, { size: 4, children: plannedOutageRateField }),
266
269
  /* @__PURE__ */ jsx(GridItem, { size: 4, children: forcedOutageRateField })
@@ -70,6 +70,9 @@ import { getReactiveLimitsValidationSchema, getReactiveLimitsEmptyFormDataProps,
70
70
  import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
71
71
  import { getRegulatingTerminalEquipmentData, getRegulatingTerminalVoltageLevelData } from "../../common/regulatingTerminal/regulatingTerminal.utils.js";
72
72
  import { getVoltageRegulationSchema, getVoltageRegulationEmptyFormData } from "../../common/voltageRegulation/voltageRegulation.utils.js";
73
+ import "@mui/material/colors";
74
+ import "@mui/x-charts";
75
+ import "../../common/currentLimits/limitsPane.utils.js";
73
76
  const generatorModificationFormSchema = object().shape({
74
77
  [FieldConstants.EQUIPMENT_ID]: string().required(),
75
78
  [FieldConstants.EQUIPMENT_NAME]: string().nullable(),
@@ -14,3 +14,4 @@ export * from './by-filter';
14
14
  export * from './generator';
15
15
  export * from './battery';
16
16
  export * from './shunt-compensator';
17
+ export * from './line';
@@ -4,14 +4,14 @@ import { PropertyForm } from "./common/properties/PropertyForm.js";
4
4
  import { copyEquipmentPropertiesForCreation, createPropertyModification, creationPropertiesSchema, emptyProperties, fetchPredefinedProperties, getConcatenatedProperties, getFilledPropertiesFromModification, getPropertiesFromModification, getPropertyValue, initializedProperty, mergeModificationAndEquipmentProperties, modificationPropertiesSchema, toModificationProperties } from "./common/properties/propertyUtils.js";
5
5
  import { getPowerWithValidityEditData, getPowerWithValidityEmptyFormData, getPowerWithValidityValidationSchema } from "./common/measurements/powerWithValidity.utils.js";
6
6
  import { getInjectionActiveReactivePowerEditData, getInjectionActiveReactivePowerEditDataProperties, getInjectionActiveReactivePowerEmptyFormData, getInjectionActiveReactivePowerEmptyFormDataProperties, getInjectionActiveReactivePowerValidationSchema, getInjectionActiveReactivePowerValidationSchemaProperties } from "./common/measurements/injectionActiveReactivePowerForm.utils.js";
7
- import { getBranchActiveReactivePowerEditData, getBranchActiveReactivePowerEditDataProperties, getBranchActiveReactivePowerEmptyFormData, getBranchActiveReactivePowerEmptyFormDataProperties, getBranchActiveReactivePowerValidationSchema, getBranchActiveReactivePowerValidationSchemaProperties } from "./common/measurements/branchActiveReactivePowerForm.utils.js";
7
+ import { getBranchActiveReactivePowerEditData, getBranchActiveReactivePowerEditDataProperties, getBranchActiveReactivePowerEmptyFormData, getBranchActiveReactivePowerEmptyFormDataProperties, getBranchActiveReactivePowerValidationSchema, getBranchActiveReactivePowerValidationSchemaObject, getBranchActiveReactivePowerValidationSchemaProperties } from "./common/measurements/branchActiveReactivePowerForm.utils.js";
8
8
  import { PowerWithValidityForm } from "./common/measurements/PowerWithValidityForm.js";
9
9
  import { PowerMeasurementsForm } from "./common/measurements/PowerMeasurementsForm.js";
10
10
  import { BranchActiveReactivePowerMeasurementsForm } from "./common/measurements/BranchActiveReactivePowerMeasurementsForm.js";
11
11
  import { BusbarSectionVoltageMeasurementsForm } from "./common/measurements/BusbarSectionVoltageMeasurementsForm.js";
12
12
  import { getActivePowerSetPointSchema, getReactivePowerSetPointSchema, getSetPointsEmptyFormData, getSetPointsSchema, testValueWithinPowerInterval } from "./common/setpoints/setPoints.utils.js";
13
13
  import { SetPointsForm } from "./common/setpoints/SetPointsForm.js";
14
- import { createConnectivityData, getCon1andCon2WithPositionValidationSchema, getConnectivityBusBarSectionData, getConnectivityData, getConnectivityFormData, getConnectivityFormDataProps, getConnectivityPropertiesData, getConnectivityPropertiesEmptyFormData, getConnectivityPropertiesValidationSchema, getConnectivityVoltageLevelData, getConnectivityWithPositionEmptyFormData, getConnectivityWithPositionEmptyFormDataProps, getConnectivityWithPositionSchema, getConnectivityWithPositionValidationSchema, getConnectivityWithoutPositionEmptyFormData, getConnectivityWithoutPositionValidationSchema, getCont1Cont2WithPositionEmptyFormData, getNewVoltageLevelData } from "./common/connectivity/connectivityForm.utils.js";
14
+ import { createConnectivityData, getBranchConnectivityWithPositionEmptyFormDataProps, getBranchConnectivityWithPositionSchema, getCon1andCon2WithPositionValidationSchema, getConnectivityBusBarSectionData, getConnectivityData, getConnectivityFormData, getConnectivityFormDataProps, getConnectivityPropertiesData, getConnectivityPropertiesEmptyFormData, getConnectivityPropertiesValidationSchema, getConnectivityVoltageLevelData, getConnectivityWithPositionEmptyFormData, getConnectivityWithPositionEmptyFormDataProps, getConnectivityWithPositionSchema, getConnectivityWithPositionValidationSchema, getConnectivityWithoutPositionEmptyFormData, getConnectivityWithoutPositionValidationSchema, getCont1Cont2WithPositionEmptyFormData, getNewVoltageLevelData } from "./common/connectivity/connectivityForm.utils.js";
15
15
  import { ConnectivityForm } from "./common/connectivity/ConnectivityForm.js";
16
16
  import { BranchConnectivityForm } from "./common/connectivity/BranchConnectivityForm.js";
17
17
  import { VoltageLevelConnectivityForm } from "./common/connectivity/VoltageLevelConnectivityForm.js";
@@ -28,6 +28,19 @@ import { RegulatingTerminalForm } from "./common/regulatingTerminal/RegulatingTe
28
28
  import { getRegulatingTerminalEmptyFormData, getRegulatingTerminalEquipmentData, getRegulatingTerminalFormData, getRegulatingTerminalVoltageLevelData } from "./common/regulatingTerminal/regulatingTerminal.utils.js";
29
29
  import { VoltageRegulationForm } from "./common/voltageRegulation/VoltageRegulationForm.js";
30
30
  import { REGULATION_TYPES, getVoltageRegulationEmptyFormData, getVoltageRegulationSchema } from "./common/voltageRegulation/voltageRegulation.utils.js";
31
+ import { APPLICABILITY, TEMPORARY_LIMIT_MODIFICATION_TYPE } from "./common/currentLimits/limits.types.js";
32
+ import { LimitsTagChip, getPropertyAvatar } from "./common/currentLimits/LimitsTagChip.js";
33
+ import { LimitsPane } from "./common/currentLimits/LimitsPane.js";
34
+ import { addModificationTypeToOpLimitsGroups, addModificationTypeToTemporaryLimits, addOperationTypeToSelectedOpLG, convertToOperationalLimitsGroupFormSchema, formatMapInfosToTemporaryLimitsFormSchema, formatOpLimitGroupsToFormInfos, formatTemporaryLimitsModificationToFormSchema, generateEmptyOperationalLimitsGroup, generateUniqueId, getAllLimitsFormData, getAllLimitsFormDataProperties, getLimitsEmptyFormData, getLimitsEmptyFormDataProps, getLimitsValidationSchema, getLimitsValidationSchemaProps, mapServerLimitsGroupsToFormInfos, sanitizeLimitNames, sanitizeLimitsGroups } from "./common/currentLimits/limitsPane.utils.js";
35
+ import { LimitsChart } from "./common/currentLimits/limitsEditor/limitsChart.js";
36
+ import { LimitsPropertiesSideStack } from "./common/currentLimits/limitsEditor/LimitsPropertiesSideStack.js";
37
+ import { LimitsEditor } from "./common/currentLimits/limitsEditor/LimitsEditor.js";
38
+ import { TemporaryLimitsTable } from "./common/currentLimits/limitsEditor/TemporaryLimitsTable.js";
39
+ import { OPERATIONAL_LIMITS_GROUPS_MODIFICATION_TYPE } from "./common/currentLimits/operationalLimitsGroups/operationalLimitsGroups.types.js";
40
+ import { LimitsGroupsContextualMenu } from "./common/currentLimits/operationalLimitsGroups/LimitsGroupsContextualMenu.js";
41
+ import { LimitsPropertiesStack } from "./common/currentLimits/operationalLimitsGroups/LimitsPropertiesStack.js";
42
+ import { OperationalLimitsGroups } from "./common/currentLimits/operationalLimitsGroups/OperationalLimitsGroups.js";
43
+ import { OperationalLimitsGroupTabLabel } from "./common/currentLimits/operationalLimitsGroups/OperationalLimitsGroupTabLabel.js";
31
44
  import { getHvdcLccDeletionSchema } from "./equipmentDeletion/hvdcLccDeletion/hvdcLccDeletion.utils.js";
32
45
  import { ShuntCompensatorSelectionForm } from "./equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.js";
33
46
  import { useHvdcLccDeletion } from "./equipmentDeletion/hvdcLccDeletion/useHvdcLccDeletion.js";
@@ -112,7 +125,18 @@ import { ShuntCompensatorCreationForm } from "./shunt-compensator/creation/Shunt
112
125
  import { shuntCompensatorCreationDtoToForm, shuntCompensatorCreationEmptyFormData, shuntCompensatorCreationFormSchema, shuntCompensatorCreationFormToDto } from "./shunt-compensator/creation/shuntCompensatorCreation.utils.js";
113
126
  import { ShuntCompensatorModificationForm } from "./shunt-compensator/modification/ShuntCompensatorModificationForm.js";
114
127
  import { shuntCompensatorModificationDtoToForm, shuntCompensatorModificationEmptyFormData, shuntCompensatorModificationFormSchema, shuntCompensatorModificationFormToDto } from "./shunt-compensator/modification/shuntCompensatorModification.utils.js";
128
+ import { getCharacteristicsValidationSchema, getLineCharacteristicsEmptyFormData, getLineCharacteristicsFormData, getLineCharacteristicsValidationSchemaProps } from "./line/characteristics/lineCharacteristicsPane.utils.js";
129
+ import { LineCharacteristicsPane } from "./line/characteristics/LineCharacteristicsPane.js";
130
+ import { CATEGORIES_TABS } from "./line/catalog/lineCatalog.type.js";
131
+ import { LineSegmentsInfoSchema, SegmentCurrentLimitsSchema, SegmentInfoSchema, SegmentSchema, SegmentTemporaryLimitSchema, convertLimitsToOperationalLimitsGroupFormSchema, convertToLineSegmentInfos, convertToLineSegmentsFormData, emptyLineSegment } from "./line/catalog/segment.utils.js";
132
+ import { LINE_TAB_FIELDS, LineDialogTab } from "./line/common/line.utils.js";
133
+ import { LineDialogTabs } from "./line/common/LineDialogTabs.js";
134
+ import { LineDialogTabsContent } from "./line/common/LineDialogTabsContent.js";
135
+ import { LineDialogHeader } from "./line/common/LineDialogHeader.js";
136
+ import { LineForm } from "./line/common/LineForm.js";
137
+ import { lineCreationDtoToForm, lineCreationEmptyFormData, lineCreationFormSchema, lineCreationFormToDto } from "./line/creation/lineCreation.utils.js";
115
138
  export {
139
+ APPLICABILITY,
116
140
  ActivePowerControlForm,
117
141
  DataType as AssignmentDataType,
118
142
  BATTERY_TAB_FIELDS,
@@ -126,6 +150,7 @@ export {
126
150
  BranchConnectivityForm,
127
151
  BusbarSectionVoltageMeasurementsForm,
128
152
  ByFilterDeletionForm,
153
+ CATEGORIES_TABS,
129
154
  CHARACTERISTICS_CHOICES,
130
155
  CharacteristicsForm,
131
156
  ConnectivityForm,
@@ -140,7 +165,22 @@ export {
140
165
  GeneratorModificationForm,
141
166
  HvdcLccDeletionSpecificForm,
142
167
  INSERT,
168
+ LINE_TAB_FIELDS,
143
169
  LOAD_TAB_FIELDS,
170
+ LimitsChart,
171
+ LimitsEditor,
172
+ LimitsGroupsContextualMenu,
173
+ LimitsPane,
174
+ LimitsPropertiesSideStack,
175
+ LimitsPropertiesStack,
176
+ LimitsTagChip,
177
+ LineCharacteristicsPane,
178
+ LineDialogHeader,
179
+ LineDialogTab,
180
+ LineDialogTabs,
181
+ LineDialogTabsContent,
182
+ LineForm,
183
+ LineSegmentsInfoSchema,
144
184
  LoadDialogHeader,
145
185
  LoadDialogTab,
146
186
  LoadDialogTabs,
@@ -148,6 +188,9 @@ export {
148
188
  LoadForm,
149
189
  MAX_SECTIONS_COUNT,
150
190
  ModificationByAssignmentForm,
191
+ OPERATIONAL_LIMITS_GROUPS_MODIFICATION_TYPE,
192
+ OperationalLimitsGroupTabLabel,
193
+ OperationalLimitsGroups,
151
194
  PowerMeasurementsForm,
152
195
  PowerWithValidityForm,
153
196
  PropertiesForm,
@@ -161,6 +204,10 @@ export {
161
204
  RegulatingTerminalForm,
162
205
  SHUNT_COMPENSATOR_TYPES,
163
206
  SWITCH_TYPE,
207
+ SegmentCurrentLimitsSchema,
208
+ SegmentInfoSchema,
209
+ SegmentSchema,
210
+ SegmentTemporaryLimitSchema,
164
211
  SetPointsForm,
165
212
  ShortCircuitForm,
166
213
  ShuntCompensatorCreationForm,
@@ -170,10 +217,15 @@ export {
170
217
  SubstationModificationForm,
171
218
  SwitchKind,
172
219
  SwitchesBetweenSections,
220
+ TEMPORARY_LIMIT_MODIFICATION_TYPE,
221
+ TemporaryLimitsTable,
173
222
  VoltageLevelConnectivityForm,
174
223
  VoltageLevelCreationForm,
175
224
  VoltageLevelModificationForm,
176
225
  VoltageRegulationForm,
226
+ addModificationTypeToOpLimitsGroups,
227
+ addModificationTypeToTemporaryLimits,
228
+ addOperationTypeToSelectedOpLG,
177
229
  batteryCreationDtoToForm,
178
230
  batteryCreationEmptyFormData,
179
231
  batteryCreationFormSchema,
@@ -187,11 +239,16 @@ export {
187
239
  byFilterDeletionFormSchema,
188
240
  byFilterDeletionFormToDto,
189
241
  computeSwitchedOnValue,
242
+ convertLimitsToOperationalLimitsGroupFormSchema,
243
+ convertToLineSegmentInfos,
244
+ convertToLineSegmentsFormData,
245
+ convertToOperationalLimitsGroupFormSchema,
190
246
  copyEquipmentPropertiesForCreation,
191
247
  createConnectivityData,
192
248
  createPropertyModification,
193
249
  creationPropertiesSchema,
194
250
  emptyFormData,
251
+ emptyLineSegment,
195
252
  emptyModificationByAssignmentFormData,
196
253
  emptyProperties,
197
254
  equipmentDeletionDtoToForm,
@@ -200,6 +257,11 @@ export {
200
257
  equipmentDeletionFormToDto,
201
258
  fetchPredefinedProperties,
202
259
  filledTextField,
260
+ formatMapInfosToTemporaryLimitsFormSchema,
261
+ formatOpLimitGroupsToFormInfos,
262
+ formatTemporaryLimitsModificationToFormSchema,
263
+ generateEmptyOperationalLimitsGroup,
264
+ generateUniqueId,
203
265
  generatorCreationDtoToForm,
204
266
  generatorCreationEmptyFormData,
205
267
  generatorCreationFormSchema,
@@ -211,16 +273,22 @@ export {
211
273
  getActivePowerControlEmptyFormData,
212
274
  getActivePowerControlSchema,
213
275
  getActivePowerSetPointSchema,
276
+ getAllLimitsFormData,
277
+ getAllLimitsFormDataProperties,
214
278
  getBranchActiveReactivePowerEditData,
215
279
  getBranchActiveReactivePowerEditDataProperties,
216
280
  getBranchActiveReactivePowerEmptyFormData,
217
281
  getBranchActiveReactivePowerEmptyFormDataProperties,
218
282
  getBranchActiveReactivePowerValidationSchema,
283
+ getBranchActiveReactivePowerValidationSchemaObject,
219
284
  getBranchActiveReactivePowerValidationSchemaProperties,
285
+ getBranchConnectivityWithPositionEmptyFormDataProps,
286
+ getBranchConnectivityWithPositionSchema,
220
287
  getCharacteristicsCreateFormDataFromSearchCopy,
221
288
  getCharacteristicsEmptyFormData,
222
289
  getCharacteristicsFormData,
223
290
  getCharacteristicsFormValidationSchema,
291
+ getCharacteristicsValidationSchema,
224
292
  getCon1andCon2WithPositionValidationSchema,
225
293
  getConcatenatedProperties,
226
294
  getConnectivityBusBarSectionData,
@@ -248,11 +316,19 @@ export {
248
316
  getInjectionActiveReactivePowerEmptyFormDataProperties,
249
317
  getInjectionActiveReactivePowerValidationSchema,
250
318
  getInjectionActiveReactivePowerValidationSchemaProperties,
319
+ getLimitsEmptyFormData,
320
+ getLimitsEmptyFormDataProps,
321
+ getLimitsValidationSchema,
322
+ getLimitsValidationSchemaProps,
323
+ getLineCharacteristicsEmptyFormData,
324
+ getLineCharacteristicsFormData,
325
+ getLineCharacteristicsValidationSchemaProps,
251
326
  getNewVoltageLevelData,
252
327
  getPowerWithValidityEditData,
253
328
  getPowerWithValidityEmptyFormData,
254
329
  getPowerWithValidityValidationSchema,
255
330
  getPropertiesFromModification,
331
+ getPropertyAvatar,
256
332
  getPropertyValue,
257
333
  getReactiveCapabilityCurveValidationSchema,
258
334
  getReactiveCapabilityCurveValidationSchemaArray,
@@ -277,6 +353,10 @@ export {
277
353
  getVoltageRegulationSchema,
278
354
  initializedProperty,
279
355
  italicFontTextField,
356
+ lineCreationDtoToForm,
357
+ lineCreationEmptyFormData,
358
+ lineCreationFormSchema,
359
+ lineCreationFormToDto,
280
360
  loadCreationDtoToForm,
281
361
  loadCreationEmptyFormData,
282
362
  loadCreationFormSchema,
@@ -285,12 +365,15 @@ export {
285
365
  loadModificationEmptyFormData,
286
366
  loadModificationFormSchema,
287
367
  loadModificationFormToDto,
368
+ mapServerLimitsGroupsToFormInfos,
288
369
  mergeModificationAndEquipmentProperties,
289
370
  modificationByAssignmentDtoToForm,
290
371
  modificationByAssignmentFormSchema,
291
372
  modificationByAssignmentFormToDto,
292
373
  modificationPropertiesSchema,
293
374
  newEquipmentDeletionDto,
375
+ sanitizeLimitNames,
376
+ sanitizeLimitsGroups,
294
377
  setCurrentReactiveCapabilityCurveTable,
295
378
  setSelectedReactiveLimits,
296
379
  shuntCompensatorCreationDtoToForm,
@@ -1,6 +1,8 @@
1
1
  /**
2
- * Copyright (c) 2023, RTE (http://www.rte-france.com)
2
+ * Copyright (c) 2026, RTE (http://www.rte-france.com)
3
3
  * This Source Code Form is subject to the terms of the Mozilla Public
4
4
  * License, v. 2.0. If a copy of the MPL was not distributed with this
5
5
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
6
  */
7
+ export * from './lineCatalog.type';
8
+ export * from './segment.utils';
@@ -0,0 +1,14 @@
1
+ import { CATEGORIES_TABS } from "./lineCatalog.type.js";
2
+ import { LineSegmentsInfoSchema, SegmentCurrentLimitsSchema, SegmentInfoSchema, SegmentSchema, SegmentTemporaryLimitSchema, convertLimitsToOperationalLimitsGroupFormSchema, convertToLineSegmentInfos, convertToLineSegmentsFormData, emptyLineSegment } from "./segment.utils.js";
3
+ export {
4
+ CATEGORIES_TABS,
5
+ LineSegmentsInfoSchema,
6
+ SegmentCurrentLimitsSchema,
7
+ SegmentInfoSchema,
8
+ SegmentSchema,
9
+ SegmentTemporaryLimitSchema,
10
+ convertLimitsToOperationalLimitsGroupFormSchema,
11
+ convertToLineSegmentInfos,
12
+ convertToLineSegmentsFormData,
13
+ emptyLineSegment
14
+ };
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Copyright (c) 2025, 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
+ type AerialLineTypeInfo = {
8
+ conductorsNumber: number;
9
+ circuitsNumber: number;
10
+ groundWiresNumber: number;
11
+ };
12
+ type UndergroundLineTypeInfo = {
13
+ insulator: string;
14
+ screen: string;
15
+ };
16
+ export type LineTypeInfo = {
17
+ id: string;
18
+ type: string;
19
+ category: 'AERIAL' | 'UNDERGROUND';
20
+ voltage: number;
21
+ conductorType: string;
22
+ section: number;
23
+ linearResistance: number;
24
+ linearReactance: number;
25
+ linearCapacity: number;
26
+ limitsForLineType: CurrentLimitsInfo[];
27
+ shapeFactors: number[];
28
+ } & (AerialLineTypeInfo | UndergroundLineTypeInfo);
29
+ export type ComputedLineCharacteristics = {
30
+ totalResistance: number;
31
+ totalReactance: number;
32
+ totalSusceptance: number;
33
+ finalCurrentLimits: CurrentLimitsInfo[];
34
+ };
35
+ export type CurrentLimitHeader = {
36
+ limitSetName: string;
37
+ permanentLimit: number;
38
+ };
39
+ export type CurrentLimitsInfo = CurrentLimitHeader & {
40
+ temporaryLimits: TemporaryLimitsInfo[];
41
+ area: string;
42
+ temperature: string;
43
+ };
44
+ export type LimitSelectedRowData = CurrentLimitHeader & TemporaryLimitSelectedRowData;
45
+ export type TemporaryLimitSelectedRowData = Record<string, number | string>;
46
+ export type AreaTemperatureShapeFactorInfo = {
47
+ area: string | null;
48
+ temperature: string | null;
49
+ shapeFactor: number | null;
50
+ };
51
+ export type TemporaryLimitsInfo = {
52
+ limitValue: number;
53
+ acceptableDuration: number;
54
+ name: string;
55
+ };
56
+ export declare const CATEGORIES_TABS: {
57
+ readonly AERIAL: {
58
+ readonly id: 0;
59
+ readonly name: "AERIAL";
60
+ };
61
+ readonly UNDERGROUND: {
62
+ readonly id: 1;
63
+ readonly name: "UNDERGROUND";
64
+ };
65
+ };
66
+ export {};
@@ -0,0 +1,7 @@
1
+ const CATEGORIES_TABS = {
2
+ AERIAL: { id: 0, name: "AERIAL" },
3
+ UNDERGROUND: { id: 1, name: "UNDERGROUND" }
4
+ };
5
+ export {
6
+ CATEGORIES_TABS
7
+ };
@@ -0,0 +1,90 @@
1
+ import { InferType } from 'yup';
2
+ import { CurrentLimitsInfo } from './lineCatalog.type';
3
+ import { OperationalLimitsGroupFormSchema } from '../../common/currentLimits/operationalLimitsGroups/operationalLimitsGroups.types';
4
+ import { LineSegmentInfos } from '../creation/lineCreation.types';
5
+ import { FieldConstants } from '../../../../utils';
6
+ export declare const SegmentTemporaryLimitSchema: import('yup').ObjectSchema<{
7
+ limitValue: number;
8
+ acceptableDuration: number;
9
+ name: string;
10
+ }, import('yup').AnyObject, {
11
+ limitValue: undefined;
12
+ acceptableDuration: undefined;
13
+ name: undefined;
14
+ }, "">;
15
+ export declare const SegmentCurrentLimitsSchema: import('yup').ObjectSchema<{
16
+ limitSetName: string;
17
+ permanentLimit: number;
18
+ temporaryLimits: {
19
+ name: string;
20
+ limitValue: number;
21
+ acceptableDuration: number;
22
+ }[] | null | undefined;
23
+ }, import('yup').AnyObject, {
24
+ limitSetName: undefined;
25
+ permanentLimit: undefined;
26
+ temporaryLimits: "";
27
+ }, "">;
28
+ export declare const SegmentInfoSchema: import('yup').ObjectSchema<{
29
+ segmentTypeId: string;
30
+ segmentDistanceValue: number;
31
+ area: string | null;
32
+ temperature: string | null;
33
+ shapeFactor: number | null;
34
+ }, import('yup').AnyObject, {
35
+ segmentTypeId: undefined;
36
+ segmentDistanceValue: undefined;
37
+ area: null;
38
+ temperature: null;
39
+ shapeFactor: null;
40
+ }, "">;
41
+ export type SegmentInfoFormData = InferType<typeof SegmentInfoSchema>;
42
+ export declare const LineSegmentsInfoSchema: import('yup').ArraySchema<{
43
+ segmentDistanceValue: number;
44
+ segmentTypeId: string;
45
+ area: string | null;
46
+ temperature: string | null;
47
+ shapeFactor: number | null;
48
+ }[] | undefined, import('yup').AnyObject, "", "">;
49
+ export type LineSegmentsFormData = InferType<typeof LineSegmentsInfoSchema>;
50
+ export declare const SegmentSchema: import('yup').ObjectSchema<{
51
+ segmentTypeValue: string;
52
+ segmentResistance: number;
53
+ segmentReactance: number;
54
+ segmentSusceptance: number;
55
+ segmentCurrentLimits: {
56
+ temporaryLimits?: {
57
+ name: string;
58
+ limitValue: number;
59
+ acceptableDuration: number;
60
+ }[] | null | undefined;
61
+ permanentLimit: number;
62
+ limitSetName: string;
63
+ }[] | undefined;
64
+ } & {
65
+ segmentTypeId: string;
66
+ segmentDistanceValue: number;
67
+ area: string | null;
68
+ temperature: string | null;
69
+ shapeFactor: number | null;
70
+ }, import('yup').AnyObject, {
71
+ segmentTypeValue: undefined;
72
+ segmentResistance: undefined;
73
+ segmentReactance: undefined;
74
+ segmentSusceptance: undefined;
75
+ segmentCurrentLimits: "";
76
+ segmentTypeId: undefined;
77
+ segmentDistanceValue: undefined;
78
+ area: null;
79
+ temperature: null;
80
+ shapeFactor: null;
81
+ }, "">;
82
+ export type SegmentFormData = InferType<typeof SegmentSchema>;
83
+ export interface SegmentsFormData {
84
+ [FieldConstants.LINE_SEGMENTS]: LineSegmentsFormData;
85
+ [FieldConstants.APPLY_SEGMENTS_LIMITS]?: boolean;
86
+ }
87
+ export declare const emptyLineSegment: SegmentFormData;
88
+ export declare function convertToLineSegmentInfos(lineSegments: LineSegmentsFormData): LineSegmentInfos[];
89
+ export declare function convertToLineSegmentsFormData(lineSegmentInfos: LineSegmentInfos[] | undefined): LineSegmentsFormData;
90
+ export declare function convertLimitsToOperationalLimitsGroupFormSchema(limitSets: CurrentLimitsInfo[]): OperationalLimitsGroupFormSchema[];
@@ -0,0 +1,100 @@
1
+ import { object, string, number, array } from "yup";
2
+ import { APPLICABILITY } from "../../common/currentLimits/limits.types.js";
3
+ import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
4
+ import "../../../../utils/conversionUtils.js";
5
+ import "../../../../utils/types/equipmentType.js";
6
+ import "react/jsx-runtime";
7
+ import "@mui/icons-material";
8
+ const SegmentTemporaryLimitSchema = object().shape({
9
+ [FieldConstants.LIMIT_VALUE]: number().required(),
10
+ [FieldConstants.TEMPORARY_LIMIT_DURATION]: number().required(),
11
+ [FieldConstants.TEMPORARY_LIMIT_NAME]: string().required()
12
+ });
13
+ const SegmentCurrentLimitsSchema = object().shape({
14
+ [FieldConstants.LIMIT_SET_NAME]: string().required(),
15
+ [FieldConstants.PERMANENT_LIMIT]: number().required(),
16
+ [FieldConstants.TEMPORARY_LIMITS]: array().of(SegmentTemporaryLimitSchema).nullable()
17
+ });
18
+ const SegmentInfoSchema = object().shape({
19
+ [FieldConstants.SEGMENT_TYPE_ID]: string().required(),
20
+ [FieldConstants.SEGMENT_DISTANCE_VALUE]: number().required("SegmentDistanceMustBeGreaterThanZero").moreThan(0, "SegmentDistanceMustBeGreaterThanZero"),
21
+ [FieldConstants.AREA]: string().nullable().default(null),
22
+ [FieldConstants.TEMPERATURE]: string().nullable().default(null),
23
+ [FieldConstants.SHAPE_FACTOR]: number().nullable().default(null)
24
+ });
25
+ const LineSegmentsInfoSchema = array().of(SegmentInfoSchema);
26
+ const SegmentSchema = object().shape({
27
+ [FieldConstants.SEGMENT_TYPE_VALUE]: string().required().test("empty-check", "SegmentTypeMissing", (value) => value ? value.length > 0 : false),
28
+ [FieldConstants.SEGMENT_RESISTANCE]: number().required(),
29
+ [FieldConstants.SEGMENT_REACTANCE]: number().required(),
30
+ [FieldConstants.SEGMENT_SUSCEPTANCE]: number().required(),
31
+ [FieldConstants.SEGMENT_CURRENT_LIMITS]: array().of(SegmentCurrentLimitsSchema)
32
+ }).concat(SegmentInfoSchema);
33
+ const emptyLineSegment = {
34
+ [FieldConstants.SEGMENT_DISTANCE_VALUE]: 0,
35
+ [FieldConstants.SEGMENT_TYPE_VALUE]: "",
36
+ [FieldConstants.SEGMENT_TYPE_ID]: "",
37
+ [FieldConstants.AREA]: null,
38
+ [FieldConstants.TEMPERATURE]: null,
39
+ [FieldConstants.SHAPE_FACTOR]: null,
40
+ [FieldConstants.SEGMENT_RESISTANCE]: 0,
41
+ [FieldConstants.SEGMENT_REACTANCE]: 0,
42
+ [FieldConstants.SEGMENT_SUSCEPTANCE]: 0,
43
+ [FieldConstants.SEGMENT_CURRENT_LIMITS]: []
44
+ };
45
+ function convertToLineSegmentInfos(lineSegments) {
46
+ return lineSegments?.filter(
47
+ (segment) => segment != null && segment[FieldConstants.SEGMENT_TYPE_ID] !== null
48
+ ).map((segment) => ({
49
+ [FieldConstants.SEGMENT_TYPE_ID]: segment[FieldConstants.SEGMENT_TYPE_ID],
50
+ [FieldConstants.SEGMENT_DISTANCE_VALUE]: segment[FieldConstants.SEGMENT_DISTANCE_VALUE],
51
+ [FieldConstants.AREA]: segment[FieldConstants.AREA],
52
+ [FieldConstants.TEMPERATURE]: segment[FieldConstants.TEMPERATURE] ?? "",
53
+ [FieldConstants.SHAPE_FACTOR]: segment[FieldConstants.SHAPE_FACTOR]
54
+ })) ?? [];
55
+ }
56
+ function convertToLineSegmentsFormData(lineSegmentInfos) {
57
+ return lineSegmentInfos?.map((info) => ({
58
+ ...emptyLineSegment,
59
+ [FieldConstants.SEGMENT_TYPE_ID]: info[FieldConstants.SEGMENT_TYPE_ID],
60
+ [FieldConstants.SEGMENT_DISTANCE_VALUE]: info[FieldConstants.SEGMENT_DISTANCE_VALUE],
61
+ [FieldConstants.AREA]: info[FieldConstants.AREA] ?? null,
62
+ [FieldConstants.TEMPERATURE]: info[FieldConstants.TEMPERATURE] === "" ? null : info[FieldConstants.TEMPERATURE],
63
+ [FieldConstants.SHAPE_FACTOR]: info[FieldConstants.SHAPE_FACTOR] ?? null
64
+ })) ?? [];
65
+ }
66
+ function convertLimitsToOperationalLimitsGroupFormSchema(limitSets) {
67
+ const finalLimitSets = [];
68
+ limitSets.forEach((limitSet) => {
69
+ const temporaryLimitsList = [];
70
+ limitSet.temporaryLimits?.forEach((temporaryLimit) => {
71
+ temporaryLimitsList.push({
72
+ name: temporaryLimit.name,
73
+ acceptableDuration: temporaryLimit.acceptableDuration,
74
+ value: temporaryLimit.limitValue
75
+ });
76
+ });
77
+ finalLimitSets.push({
78
+ id: limitSet.limitSetName + APPLICABILITY.EQUIPMENT.id,
79
+ name: limitSet.limitSetName,
80
+ applicability: APPLICABILITY.EQUIPMENT.id,
81
+ currentLimits: {
82
+ id: limitSet.limitSetName,
83
+ permanentLimit: limitSet.permanentLimit,
84
+ temporaryLimits: temporaryLimitsList
85
+ }
86
+ });
87
+ });
88
+ return finalLimitSets;
89
+ }
90
+ export {
91
+ LineSegmentsInfoSchema,
92
+ SegmentCurrentLimitsSchema,
93
+ SegmentInfoSchema,
94
+ SegmentSchema,
95
+ SegmentTemporaryLimitSchema,
96
+ convertLimitsToOperationalLimitsGroupFormSchema,
97
+ convertToLineSegmentInfos,
98
+ convertToLineSegmentsFormData,
99
+ emptyLineSegment
100
+ };
@@ -0,0 +1,8 @@
1
+ import { BranchInfos } from '../common/line.types';
2
+ interface LineCharacteristicsPaneProps {
3
+ id?: string;
4
+ lineToModify?: BranchInfos | null;
5
+ isModification?: boolean;
6
+ }
7
+ export declare function LineCharacteristicsPane({ id, lineToModify, isModification, }: Readonly<LineCharacteristicsPaneProps>): import("react").JSX.Element;
8
+ export {};