@gridsuite/commons-ui 0.241.1 → 0.243.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 (151) hide show
  1. package/README.md +10 -2
  2. package/dist/components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js +1 -1
  3. package/dist/components/composite/grid/grid-item.d.ts +2 -1
  4. package/dist/components/composite/grid/grid-item.js +9 -2
  5. package/dist/components/ui/csvPicker/csv-picker.d.ts +7 -2
  6. package/dist/components/ui/csvPicker/csv-picker.js +7 -6
  7. package/dist/components/ui/inputs/checkbox-autocomplete/checkbox-autocomplete.d.ts +1 -2
  8. package/dist/features/index.js +87 -3
  9. package/dist/features/network-modification-table/index.js +2 -1
  10. package/dist/features/network-modification-table/use-modifications-drag-and-drop.js +2 -1
  11. package/dist/features/network-modification-table/utils.d.ts +1 -0
  12. package/dist/features/network-modification-table/utils.js +5 -1
  13. package/dist/features/network-modifications/battery/creation/BatteryCreationForm.js +3 -0
  14. package/dist/features/network-modifications/battery/creation/batteryCreation.utils.js +3 -0
  15. package/dist/features/network-modifications/battery/modification/BatteryDialogHeader.js +3 -0
  16. package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.js +3 -0
  17. package/dist/features/network-modifications/battery/modification/batteryModification.utils.js +3 -0
  18. package/dist/features/network-modifications/common/connectivity/connectivityForm.utils.d.ts +71 -2
  19. package/dist/features/network-modifications/common/connectivity/connectivityForm.utils.js +26 -8
  20. package/dist/features/network-modifications/common/connectivity/index.js +3 -1
  21. package/dist/features/network-modifications/common/currentLimits/LimitsPane.d.ts +7 -0
  22. package/dist/features/network-modifications/common/currentLimits/LimitsPane.js +243 -0
  23. package/dist/features/network-modifications/common/currentLimits/LimitsTagChip.d.ts +9 -0
  24. package/dist/features/network-modifications/common/currentLimits/LimitsTagChip.js +29 -0
  25. package/dist/features/network-modifications/common/currentLimits/SelectedOperationalLimitGroup.d.ts +9 -0
  26. package/dist/features/network-modifications/common/currentLimits/SelectedOperationalLimitGroup.js +100 -0
  27. package/dist/features/network-modifications/common/currentLimits/index.d.ts +12 -0
  28. package/dist/features/network-modifications/common/currentLimits/index.js +47 -0
  29. package/dist/features/network-modifications/common/currentLimits/limits.types.d.ts +52 -0
  30. package/dist/features/network-modifications/common/currentLimits/limits.types.js +17 -0
  31. package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsEditor.d.ts +10 -0
  32. package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsEditor.js +285 -0
  33. package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsPropertiesSideStack.d.ts +5 -0
  34. package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsPropertiesSideStack.js +184 -0
  35. package/dist/features/network-modifications/common/currentLimits/limitsEditor/TemporaryLimitsTable.d.ts +14 -0
  36. package/dist/features/network-modifications/common/currentLimits/limitsEditor/TemporaryLimitsTable.js +166 -0
  37. package/dist/features/network-modifications/common/currentLimits/limitsEditor/index.d.ts +10 -0
  38. package/dist/features/network-modifications/common/currentLimits/limitsEditor/index.js +10 -0
  39. package/dist/features/network-modifications/common/currentLimits/limitsEditor/limitsChart.d.ts +11 -0
  40. package/dist/features/network-modifications/common/currentLimits/limitsEditor/limitsChart.js +177 -0
  41. package/dist/features/network-modifications/common/currentLimits/limitsPane.utils.d.ts +213 -0
  42. package/dist/features/network-modifications/common/currentLimits/limitsPane.utils.js +337 -0
  43. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsGroupsContextualMenu.d.ts +25 -0
  44. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsGroupsContextualMenu.js +92 -0
  45. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsPropertiesStack.d.ts +10 -0
  46. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsPropertiesStack.js +25 -0
  47. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroupTabLabel.d.ts +10 -0
  48. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroupTabLabel.js +73 -0
  49. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroups.d.ts +16 -0
  50. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroups.js +121 -0
  51. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/index.d.ts +11 -0
  52. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/index.js +12 -0
  53. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroups.types.d.ts +71 -0
  54. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroups.types.js +15 -0
  55. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroupsStyles.d.ts +46 -0
  56. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroupsStyles.js +45 -0
  57. package/dist/features/network-modifications/common/index.d.ts +1 -0
  58. package/dist/features/network-modifications/common/index.js +50 -2
  59. package/dist/features/network-modifications/common/measurements/branchActiveReactivePowerForm.utils.d.ts +11 -0
  60. package/dist/features/network-modifications/common/measurements/branchActiveReactivePowerForm.utils.js +6 -4
  61. package/dist/features/network-modifications/common/measurements/index.js +2 -1
  62. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveTableForm.js +1 -1
  63. package/dist/features/network-modifications/common/voltageRegulation/VoltageRegulationForm.js +3 -7
  64. package/dist/features/network-modifications/equipmentDeletion/EquipmentDeletionForm.js +3 -0
  65. package/dist/features/network-modifications/generator/creation/GeneratorCreationForm.js +9 -6
  66. package/dist/features/network-modifications/generator/creation/generatorCreation.utils.js +3 -0
  67. package/dist/features/network-modifications/generator/modification/GeneratorDialogHeader.js +3 -0
  68. package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.js +9 -6
  69. package/dist/features/network-modifications/generator/modification/generatorModification.utils.js +3 -0
  70. package/dist/features/network-modifications/index.d.ts +1 -0
  71. package/dist/features/network-modifications/index.js +85 -2
  72. package/dist/features/network-modifications/line/catalog/index.d.ts +8 -0
  73. package/dist/features/network-modifications/line/catalog/index.js +14 -0
  74. package/dist/features/network-modifications/line/catalog/lineCatalog.type.d.ts +66 -0
  75. package/dist/features/network-modifications/line/catalog/lineCatalog.type.js +7 -0
  76. package/dist/features/network-modifications/line/catalog/segment.utils.d.ts +90 -0
  77. package/dist/features/network-modifications/line/catalog/segment.utils.js +100 -0
  78. package/dist/features/network-modifications/line/characteristics/LineCharacteristicsPane.d.ts +8 -0
  79. package/dist/features/network-modifications/line/characteristics/LineCharacteristicsPane.js +152 -0
  80. package/dist/features/network-modifications/line/characteristics/index.d.ts +9 -0
  81. package/dist/features/network-modifications/line/characteristics/index.js +9 -0
  82. package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.types.d.ts +14 -0
  83. package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.types.js +1 -0
  84. package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.d.ts +52 -0
  85. package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.js +53 -0
  86. package/dist/features/network-modifications/line/common/LineDialogHeader.d.ts +6 -0
  87. package/dist/features/network-modifications/line/common/LineDialogHeader.js +103 -0
  88. package/dist/features/network-modifications/line/common/LineDialogTabs.d.ts +9 -0
  89. package/dist/features/network-modifications/line/common/LineDialogTabs.js +61 -0
  90. package/dist/features/network-modifications/line/common/LineDialogTabsContent.d.ts +8 -0
  91. package/dist/features/network-modifications/line/common/LineDialogTabsContent.js +96 -0
  92. package/dist/features/network-modifications/line/common/LineForm.d.ts +6 -0
  93. package/dist/features/network-modifications/line/common/LineForm.js +50 -0
  94. package/dist/features/network-modifications/line/common/index.d.ts +12 -0
  95. package/dist/features/network-modifications/line/common/index.js +13 -0
  96. package/dist/features/network-modifications/line/common/line.types.d.ts +47 -0
  97. package/dist/features/network-modifications/line/common/line.types.js +1 -0
  98. package/dist/features/network-modifications/line/common/line.utils.d.ts +13 -0
  99. package/dist/features/network-modifications/line/common/line.utils.js +34 -0
  100. package/dist/features/network-modifications/line/creation/index.d.ts +8 -0
  101. package/dist/features/network-modifications/line/creation/index.js +7 -0
  102. package/dist/features/network-modifications/line/creation/lineCreation.types.d.ts +39 -0
  103. package/dist/features/network-modifications/line/creation/lineCreation.types.js +1 -0
  104. package/dist/features/network-modifications/line/creation/lineCreation.utils.d.ts +151 -0
  105. package/dist/features/network-modifications/line/creation/lineCreation.utils.js +172 -0
  106. package/dist/features/network-modifications/line/index.d.ts +10 -0
  107. package/dist/features/network-modifications/line/index.js +37 -0
  108. package/dist/features/network-modifications/load/common/LoadDialogHeader.js +3 -0
  109. package/dist/features/network-modifications/load/modification/loadModification.utils.js +3 -0
  110. package/dist/features/network-modifications/shunt-compensator/common/CharacteristicsForm.js +7 -6
  111. package/dist/features/network-modifications/shunt-compensator/creation/ShuntCompensatorCreationForm.js +3 -0
  112. package/dist/features/network-modifications/shunt-compensator/creation/shuntCompensatorCreation.utils.js +3 -0
  113. package/dist/features/network-modifications/shunt-compensator/modification/ShuntCompensatorModificationForm.js +3 -0
  114. package/dist/features/network-modifications/shunt-compensator/modification/shuntCompensatorModification.utils.js +3 -0
  115. package/dist/features/network-modifications/substation/creation/SubstationCreationForm.js +3 -0
  116. package/dist/features/network-modifications/substation/modification/SubstationModificationForm.js +3 -0
  117. package/dist/features/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +3 -0
  118. package/dist/features/network-modifications/voltageLevel/creation/index.js +3 -0
  119. package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationCreationSection.js +3 -0
  120. package/dist/features/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js +3 -0
  121. package/dist/features/network-modifications/voltageLevel/index.js +3 -0
  122. package/dist/features/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js +4 -1
  123. package/dist/features/parameters/common/contingency-table/contingency-table.js +22 -10
  124. package/dist/features/parameters/common/contingency-table/types.d.ts +7 -8
  125. package/dist/features/parameters/common/contingency-table/utils.d.ts +13 -0
  126. package/dist/features/parameters/common/contingency-table/utils.js +31 -0
  127. package/dist/features/parameters/loadflow/load-flow-general-parameters.js +5 -1
  128. package/dist/features/parameters/security-analysis/security-analysis-parameters-form.js +19 -31
  129. package/dist/hooks/useModificationLabelComputer.js +1 -0
  130. package/dist/index.js +87 -7
  131. package/dist/translations/en/index.d.ts +0 -1
  132. package/dist/translations/en/index.js +0 -2
  133. package/dist/translations/en/networkModificationsEn.d.ts +28 -0
  134. package/dist/translations/en/networkModificationsEn.js +28 -0
  135. package/dist/translations/en/parameters.d.ts +3 -1
  136. package/dist/translations/en/parameters.js +3 -1
  137. package/dist/translations/fr/index.d.ts +0 -1
  138. package/dist/translations/fr/index.js +0 -2
  139. package/dist/translations/fr/networkModificationsFr.d.ts +28 -0
  140. package/dist/translations/fr/networkModificationsFr.js +28 -0
  141. package/dist/translations/fr/parameters.d.ts +3 -1
  142. package/dist/translations/fr/parameters.js +3 -1
  143. package/dist/utils/constants/fieldConstants.d.ts +47 -1
  144. package/dist/utils/constants/fieldConstants.js +46 -0
  145. package/dist/utils/types/modificationType.d.ts +4 -0
  146. package/dist/utils/types/modificationType.js +5 -0
  147. package/package.json +11 -4
  148. package/dist/translations/en/inputsEn.d.ts +0 -24
  149. package/dist/translations/en/inputsEn.js +0 -21
  150. package/dist/translations/fr/inputsFr.d.ts +0 -24
  151. package/dist/translations/fr/inputsFr.js +0 -21
@@ -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
+ export * from './line.types';
8
+ export * from './line.utils';
9
+ export * from './LineDialogTabs';
10
+ export * from './LineDialogTabsContent';
11
+ export * from './LineDialogHeader';
12
+ export * from './LineForm';
@@ -0,0 +1,13 @@
1
+ import { LINE_TAB_FIELDS, LineDialogTab } from "./line.utils.js";
2
+ import { LineDialogTabs } from "./LineDialogTabs.js";
3
+ import { LineDialogTabsContent } from "./LineDialogTabsContent.js";
4
+ import { LineDialogHeader } from "./LineDialogHeader.js";
5
+ import { LineForm } from "./LineForm.js";
6
+ export {
7
+ LINE_TAB_FIELDS,
8
+ LineDialogHeader,
9
+ LineDialogTab,
10
+ LineDialogTabs,
11
+ LineDialogTabsContent,
12
+ LineForm
13
+ };
@@ -0,0 +1,47 @@
1
+ import { ConnectablePositionInfos } from '../../common/connectivity/connectivity.type';
2
+ import { CurrentLimitsData } from '../../common/currentLimits/limits.types';
3
+ import { EquipmentWithProperties } from '../../common/properties/propertyUtils';
4
+ export type BranchInfos = EquipmentWithProperties & {
5
+ name: string;
6
+ voltageLevelId1: string;
7
+ voltageLevelId2: string;
8
+ busOrBusbarSectionId1: string;
9
+ busOrBusbarSectionId2: string;
10
+ currentLimits: CurrentLimitsData[];
11
+ selectedOperationalLimitsGroupId1: string;
12
+ selectedOperationalLimitsGroupId2: string;
13
+ r?: number;
14
+ x?: number;
15
+ g1?: number;
16
+ b1?: number;
17
+ g2?: number;
18
+ b2?: number;
19
+ };
20
+ export interface LineFormInfos {
21
+ id: string;
22
+ name: string | null;
23
+ voltageLevelId1: string;
24
+ voltageLevelId2: string;
25
+ terminal1Connected: boolean;
26
+ terminal2Connected: boolean;
27
+ p1: number;
28
+ q1: number;
29
+ p2: number;
30
+ q2: number;
31
+ i1: number;
32
+ i2: number;
33
+ r: number;
34
+ x: number;
35
+ g1?: number;
36
+ b1?: number;
37
+ g2?: number;
38
+ b2?: number;
39
+ busOrBusbarSectionId1: string;
40
+ busOrBusbarSectionId2: string;
41
+ selectedOperationalLimitsGroupId1: string;
42
+ selectedOperationalLimitsGroupId2: string;
43
+ connectablePosition1: ConnectablePositionInfos;
44
+ connectablePosition2: ConnectablePositionInfos;
45
+ currentLimits: CurrentLimitsData[];
46
+ properties: Record<string, string>;
47
+ }
@@ -0,0 +1,13 @@
1
+ import { FieldConstants } from '../../../../utils';
2
+ export interface LineDialogOptions {
3
+ isModification?: boolean;
4
+ withConnectivity?: boolean;
5
+ clearableFields?: boolean;
6
+ }
7
+ export declare const enum LineDialogTab {
8
+ CONNECTIVITY_TAB = 0,
9
+ CHARACTERISTICS_TAB = 1,
10
+ LIMITS_TAB = 2,
11
+ STATE_ESTIMATION_TAB = 3
12
+ }
13
+ export declare const LINE_TAB_FIELDS: Readonly<Partial<Record<LineDialogTab, FieldConstants[]>>>;
@@ -0,0 +1,34 @@
1
+ import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
2
+ import "../../../../utils/conversionUtils.js";
3
+ import "../../../../utils/types/equipmentType.js";
4
+ import "react/jsx-runtime";
5
+ import "@mui/icons-material";
6
+ var LineDialogTab = /* @__PURE__ */ ((LineDialogTab2) => {
7
+ LineDialogTab2[LineDialogTab2["CONNECTIVITY_TAB"] = 0] = "CONNECTIVITY_TAB";
8
+ LineDialogTab2[LineDialogTab2["CHARACTERISTICS_TAB"] = 1] = "CHARACTERISTICS_TAB";
9
+ LineDialogTab2[LineDialogTab2["LIMITS_TAB"] = 2] = "LIMITS_TAB";
10
+ LineDialogTab2[LineDialogTab2["STATE_ESTIMATION_TAB"] = 3] = "STATE_ESTIMATION_TAB";
11
+ return LineDialogTab2;
12
+ })(LineDialogTab || {});
13
+ const LINE_TAB_FIELDS = {
14
+ [
15
+ 0
16
+ /* CONNECTIVITY_TAB */
17
+ ]: [FieldConstants.CONNECTIVITY],
18
+ [
19
+ 1
20
+ /* CHARACTERISTICS_TAB */
21
+ ]: [FieldConstants.CHARACTERISTICS, FieldConstants.ADDITIONAL_PROPERTIES],
22
+ [
23
+ 2
24
+ /* LIMITS_TAB */
25
+ ]: [FieldConstants.LIMITS],
26
+ [
27
+ 3
28
+ /* STATE_ESTIMATION_TAB */
29
+ ]: [FieldConstants.STATE_ESTIMATION]
30
+ };
31
+ export {
32
+ LINE_TAB_FIELDS,
33
+ LineDialogTab
34
+ };
@@ -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 './lineCreation.types';
8
+ export * from './lineCreation.utils';
@@ -0,0 +1,7 @@
1
+ import { lineCreationDtoToForm, lineCreationEmptyFormData, lineCreationFormSchema, lineCreationFormToDto } from "./lineCreation.utils.js";
2
+ export {
3
+ lineCreationDtoToForm,
4
+ lineCreationEmptyFormData,
5
+ lineCreationFormSchema,
6
+ lineCreationFormToDto
7
+ };
@@ -0,0 +1,39 @@
1
+ import { ModificationType } from '../../../../utils';
2
+ import { Property } from '../../common/properties/properties.type';
3
+ import { OperationalLimitsGroupFormSchema } from '../../common/currentLimits/operationalLimitsGroups/operationalLimitsGroups.types';
4
+ export interface LineSegmentInfos {
5
+ segmentTypeId: string;
6
+ segmentDistanceValue: number;
7
+ area: string | null;
8
+ temperature: string;
9
+ shapeFactor: number | null;
10
+ }
11
+ export interface LineCreationDto {
12
+ type: ModificationType;
13
+ uuid?: string | null;
14
+ equipmentId: string;
15
+ equipmentName: string | null;
16
+ r: number | null;
17
+ x: number | null;
18
+ g1: number | null;
19
+ b1: number | null;
20
+ g2: number | null;
21
+ b2: number | null;
22
+ operationalLimitsGroups: OperationalLimitsGroupFormSchema[];
23
+ selectedOperationalLimitsGroupId1?: string | null;
24
+ selectedOperationalLimitsGroupId2?: string | null;
25
+ voltageLevelId1: string | null;
26
+ busOrBusbarSectionId1: string | null;
27
+ connectionName1: string | null;
28
+ connectionDirection1?: string | null;
29
+ connectionPosition1?: number | null;
30
+ connected1?: boolean | null;
31
+ voltageLevelId2: string | null;
32
+ busOrBusbarSectionId2: string | null;
33
+ connectionName2: string | null;
34
+ connectionDirection2?: string | null;
35
+ connectionPosition2?: number | null;
36
+ connected2?: boolean | null;
37
+ properties: Property[] | null;
38
+ lineSegments?: LineSegmentInfos[];
39
+ }
@@ -0,0 +1,151 @@
1
+ import { InferType } from 'yup';
2
+ import { DeepNullable } from '../../../../utils';
3
+ import { LineCreationDto } from './lineCreation.types';
4
+ export declare const lineCreationFormSchema: (displayConnectivity: boolean) => import('yup').ObjectSchema<NonNullable<{
5
+ equipmentID: string;
6
+ equipmentName: string | null | undefined;
7
+ connectivity: {
8
+ connectivity1: {
9
+ terminalConnected?: boolean | null | undefined;
10
+ connectionDirection?: string | null | undefined;
11
+ connectionName?: string | undefined;
12
+ connectionPosition?: number | null | undefined;
13
+ busOrBusbarSection: {
14
+ id?: string | undefined;
15
+ } | null;
16
+ voltageLevel: {
17
+ id?: string | undefined;
18
+ } | null;
19
+ };
20
+ connectivity2: {
21
+ terminalConnected?: boolean | null | undefined;
22
+ connectionDirection?: string | null | undefined;
23
+ connectionName?: string | undefined;
24
+ connectionPosition?: number | null | undefined;
25
+ busOrBusbarSection: {
26
+ id?: string | undefined;
27
+ } | null;
28
+ voltageLevel: {
29
+ id?: string | undefined;
30
+ } | null;
31
+ };
32
+ };
33
+ characteristics: {
34
+ b1?: number | null | undefined;
35
+ b2?: number | null | undefined;
36
+ g1?: number | null | undefined;
37
+ g2?: number | null | undefined;
38
+ r?: number | null | undefined;
39
+ x?: number | null | undefined;
40
+ };
41
+ limits: {
42
+ enableOLGModification?: boolean | undefined;
43
+ operationalLimitsGroups?: {
44
+ AdditionalProperties?: {
45
+ previousValue?: string | null | undefined;
46
+ added: NonNullable<boolean | undefined>;
47
+ deletionMark: NonNullable<boolean | undefined>;
48
+ name: string;
49
+ value: string;
50
+ }[] | undefined;
51
+ limitsProperties?: {
52
+ name: string;
53
+ value: string;
54
+ }[] | undefined;
55
+ operationalLimitsGroupsIsDuplicate?: boolean | null | undefined;
56
+ applicability: string;
57
+ currentLimits: {
58
+ temporaryLimits?: {
59
+ name?: string | null | undefined;
60
+ value?: number | null | undefined;
61
+ acceptableDuration?: number | null | undefined;
62
+ }[] | undefined;
63
+ permanentLimit: number;
64
+ };
65
+ id: string;
66
+ name: string;
67
+ }[] | undefined;
68
+ selectedOperationalLimitsGroupId1?: string | null | undefined;
69
+ selectedOperationalLimitsGroupId2?: string | null | undefined;
70
+ };
71
+ stateEstimation: {
72
+ [x: string]: {
73
+ validity?: boolean | null | undefined;
74
+ value?: number | null | undefined;
75
+ };
76
+ [x: number]: {
77
+ validity?: boolean | null | undefined;
78
+ value?: number | null | undefined;
79
+ };
80
+ };
81
+ lineSegments: {
82
+ segmentDistanceValue: number;
83
+ segmentTypeId: string;
84
+ area: string | null;
85
+ temperature: string | null;
86
+ shapeFactor: number | null;
87
+ }[] | undefined;
88
+ } & {
89
+ AdditionalProperties: {
90
+ previousValue?: string | null | undefined;
91
+ added: NonNullable<boolean | undefined>;
92
+ deletionMark: NonNullable<boolean | undefined>;
93
+ name: string;
94
+ value: string;
95
+ }[] | undefined;
96
+ }>, import('yup').AnyObject, {
97
+ equipmentID: undefined;
98
+ equipmentName: undefined;
99
+ connectivity: {
100
+ connectivity1: {
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
+ connectivity2: {
113
+ voltageLevel: {
114
+ id: undefined;
115
+ };
116
+ busOrBusbarSection: {
117
+ id: undefined;
118
+ };
119
+ connectionDirection: undefined;
120
+ connectionName: undefined;
121
+ connectionPosition: undefined;
122
+ terminalConnected: undefined;
123
+ };
124
+ };
125
+ characteristics: {
126
+ r: undefined;
127
+ x: undefined;
128
+ b1: undefined;
129
+ g1: undefined;
130
+ b2: undefined;
131
+ g2: undefined;
132
+ };
133
+ limits: {
134
+ operationalLimitsGroups: undefined;
135
+ selectedOperationalLimitsGroupId1: undefined;
136
+ selectedOperationalLimitsGroupId2: undefined;
137
+ enableOLGModification: undefined;
138
+ };
139
+ stateEstimation: {
140
+ [x: string]: {
141
+ value: undefined;
142
+ validity: undefined;
143
+ };
144
+ };
145
+ lineSegments: "";
146
+ AdditionalProperties: "";
147
+ }, "">;
148
+ export type LineCreationFormData = InferType<ReturnType<typeof lineCreationFormSchema>>;
149
+ export declare const lineCreationEmptyFormData: DeepNullable<LineCreationFormData>;
150
+ export declare const lineCreationDtoToForm: (lineDto: LineCreationDto) => LineCreationFormData;
151
+ export declare const lineCreationFormToDto: (lineForm: LineCreationFormData) => LineCreationDto;
@@ -0,0 +1,172 @@
1
+ import { object, string } from "yup";
2
+ import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
3
+ import { convertInputValue, convertOutputValue } from "../../../../utils/conversionUtils.js";
4
+ import { UNDEFINED_CONNECTION_DIRECTION } from "../../../../utils/types/equipmentType.js";
5
+ import { ModificationType } from "../../../../utils/types/modificationType.js";
6
+ import { FieldType } from "../../../../utils/types/fieldType.js";
7
+ import "react/jsx-runtime";
8
+ import "@mui/icons-material";
9
+ import { sanitizeString } from "../../../../utils/ts-utils.js";
10
+ import { getBranchConnectivityWithPositionEmptyFormDataProps, getConnectivityFormDataProps, getBranchConnectivityWithPositionSchema } from "../../common/connectivity/connectivityForm.utils.js";
11
+ import "@mui/material";
12
+ import "react";
13
+ import "react-intl";
14
+ import "../../../../components/ui/overflowableText/OverflowableText.js";
15
+ import "react-hook-form";
16
+ import "localized-countries";
17
+ import "localized-countries/data/fr";
18
+ import "localized-countries/data/en";
19
+ import "notistack";
20
+ import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
21
+ import "../../../../components/ui/treeViewFinder/TreeViewFinder.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.svg?react";
28
+ import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
29
+ import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
30
+ import "../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
31
+ import "@hello-pangea/dnd";
32
+ import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
33
+ import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
34
+ import "mui-nested-menu";
35
+ import "react-resizable-panels";
36
+ import "react-papaparse";
37
+ import { getFilledPropertiesFromModification, creationPropertiesSchema, toModificationProperties } from "../../common/properties/propertyUtils.js";
38
+ import { getLineCharacteristicsEmptyFormData, getLineCharacteristicsValidationSchemaProps } from "../characteristics/lineCharacteristicsPane.utils.js";
39
+ import "react-dom";
40
+ import "autosuggest-highlight/match";
41
+ import "autosuggest-highlight/parse";
42
+ import "clsx";
43
+ import "../../../../components/composite/filter/FilterCreationDialog.js";
44
+ import "../../../../components/composite/filter/HeaderFilterForm.js";
45
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
46
+ import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
47
+ import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
48
+ import "../../../../components/composite/filter/expert/expertFilterConstants.js";
49
+ import "react-querybuilder";
50
+ import "uuid";
51
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
52
+ import "../../../../components/composite/filter/utils/filterFormUtils.js";
53
+ import "@react-querybuilder/material";
54
+ import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
55
+ import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
56
+ import "../../../../components/composite/agGridTable/BottomTableButtons.js";
57
+ import "../../../../components/composite/agGridTable/CustomAgGridTable.js";
58
+ import "ag-grid-community";
59
+ import "../../../../components/composite/customAGGrid/customAggrid.js";
60
+ import "../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
61
+ import "mathjs";
62
+ import "../../../../components/composite/report/report-viewer/log-table/log-table.js";
63
+ import "react-window";
64
+ import "../../../../components/composite/report/report-treeview/treeview-item.js";
65
+ import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
66
+ import { getLimitsEmptyFormDataProps, getAllLimitsFormDataProperties, getLimitsValidationSchemaProps, sanitizeLimitsGroups } from "../../common/currentLimits/limitsPane.utils.js";
67
+ import { getBranchActiveReactivePowerEmptyFormDataProperties, getBranchActiveReactivePowerValidationSchemaObject } from "../../common/measurements/branchActiveReactivePowerForm.utils.js";
68
+ import { convertToLineSegmentsFormData, LineSegmentsInfoSchema, convertToLineSegmentInfos } from "../catalog/segment.utils.js";
69
+ const lineCreationFormSchema = (displayConnectivity) => object().shape({
70
+ [FieldConstants.EQUIPMENT_ID]: string().required(),
71
+ [FieldConstants.EQUIPMENT_NAME]: string().nullable(),
72
+ [FieldConstants.CONNECTIVITY]: getBranchConnectivityWithPositionSchema(false, displayConnectivity),
73
+ [FieldConstants.CHARACTERISTICS]: getLineCharacteristicsValidationSchemaProps(false),
74
+ [FieldConstants.LIMITS]: getLimitsValidationSchemaProps(false),
75
+ [FieldConstants.STATE_ESTIMATION]: getBranchActiveReactivePowerValidationSchemaObject(),
76
+ [FieldConstants.LINE_SEGMENTS]: LineSegmentsInfoSchema
77
+ }).concat(creationPropertiesSchema).required();
78
+ const lineCreationEmptyFormData = {
79
+ [FieldConstants.EQUIPMENT_ID]: "",
80
+ [FieldConstants.EQUIPMENT_NAME]: "",
81
+ [FieldConstants.CONNECTIVITY]: getBranchConnectivityWithPositionEmptyFormDataProps(),
82
+ [FieldConstants.CHARACTERISTICS]: getLineCharacteristicsEmptyFormData(),
83
+ [FieldConstants.LIMITS]: getLimitsEmptyFormDataProps(false),
84
+ [FieldConstants.STATE_ESTIMATION]: getBranchActiveReactivePowerEmptyFormDataProperties(),
85
+ [FieldConstants.LINE_SEGMENTS]: [],
86
+ AdditionalProperties: []
87
+ };
88
+ const lineCreationDtoToForm = (lineDto) => {
89
+ return {
90
+ equipmentID: lineDto.equipmentId,
91
+ equipmentName: lineDto.equipmentName ?? "",
92
+ connectivity: {
93
+ connectivity1: getConnectivityFormDataProps({
94
+ voltageLevelId: lineDto.voltageLevelId1,
95
+ busbarSectionId: lineDto.busOrBusbarSectionId1,
96
+ connectionDirection: lineDto.connectionDirection1,
97
+ connectionName: lineDto.connectionName1,
98
+ connectionPosition: lineDto.connectionPosition1,
99
+ terminalConnected: lineDto.connected1
100
+ }),
101
+ connectivity2: getConnectivityFormDataProps({
102
+ voltageLevelId: lineDto.voltageLevelId2,
103
+ busbarSectionId: lineDto.busOrBusbarSectionId2,
104
+ connectionDirection: lineDto.connectionDirection2,
105
+ connectionName: lineDto.connectionName2,
106
+ connectionPosition: lineDto.connectionPosition2,
107
+ terminalConnected: lineDto.connected2
108
+ })
109
+ },
110
+ characteristics: {
111
+ r: lineDto.r,
112
+ x: lineDto.x,
113
+ g1: convertInputValue(FieldType.G1, lineDto.g1),
114
+ b1: convertInputValue(FieldType.B1, lineDto.b1),
115
+ g2: convertInputValue(FieldType.G2, lineDto.g2),
116
+ b2: convertInputValue(FieldType.B2, lineDto.b2)
117
+ },
118
+ AdditionalProperties: getFilledPropertiesFromModification(lineDto.properties),
119
+ limits: getAllLimitsFormDataProperties(
120
+ lineDto?.operationalLimitsGroups?.map(({ id, ...baseData }) => ({
121
+ ...baseData,
122
+ name: id,
123
+ id: id + baseData.applicability
124
+ })),
125
+ lineDto?.selectedOperationalLimitsGroupId1 ?? null,
126
+ lineDto?.selectedOperationalLimitsGroupId2 ?? null
127
+ ),
128
+ stateEstimation: {},
129
+ // catalog
130
+ lineSegments: convertToLineSegmentsFormData(lineDto.lineSegments)
131
+ };
132
+ };
133
+ const lineCreationFormToDto = (lineForm) => {
134
+ return {
135
+ type: ModificationType.LINE_CREATION,
136
+ equipmentId: lineForm.equipmentID,
137
+ equipmentName: sanitizeString(lineForm.equipmentName),
138
+ // connectivity
139
+ voltageLevelId1: lineForm.connectivity.connectivity1.voltageLevel?.id ?? "",
140
+ busOrBusbarSectionId1: lineForm.connectivity.connectivity1.busOrBusbarSection?.id ?? "",
141
+ connectionDirection1: lineForm.connectivity.connectivity1.connectionDirection ?? UNDEFINED_CONNECTION_DIRECTION,
142
+ connectionName1: sanitizeString(lineForm.connectivity.connectivity1.connectionName),
143
+ connectionPosition1: lineForm.connectivity.connectivity1.connectionPosition,
144
+ connected1: lineForm.connectivity.connectivity1.terminalConnected ?? null,
145
+ voltageLevelId2: lineForm.connectivity.connectivity2.voltageLevel?.id ?? "",
146
+ busOrBusbarSectionId2: lineForm.connectivity.connectivity2.busOrBusbarSection?.id ?? "",
147
+ connectionDirection2: lineForm.connectivity.connectivity2.connectionDirection ?? UNDEFINED_CONNECTION_DIRECTION,
148
+ connectionName2: sanitizeString(lineForm.connectivity.connectivity2.connectionName),
149
+ connectionPosition2: lineForm.connectivity.connectivity2.connectionPosition,
150
+ connected2: lineForm.connectivity.connectivity2.terminalConnected ?? null,
151
+ // characteristics
152
+ r: lineForm.characteristics.r ?? null,
153
+ x: lineForm.characteristics.x ?? null,
154
+ g1: convertOutputValue(FieldType.G1, lineForm.characteristics.g1),
155
+ b1: convertOutputValue(FieldType.B1, lineForm.characteristics.b1),
156
+ g2: convertOutputValue(FieldType.G2, lineForm.characteristics.g2),
157
+ b2: convertOutputValue(FieldType.B2, lineForm.characteristics.b2),
158
+ properties: toModificationProperties(lineForm),
159
+ // limits
160
+ operationalLimitsGroups: sanitizeLimitsGroups(lineForm.limits.operationalLimitsGroups ?? []),
161
+ selectedOperationalLimitsGroupId1: lineForm.limits.selectedOperationalLimitsGroupId1 ?? null,
162
+ selectedOperationalLimitsGroupId2: lineForm.limits.selectedOperationalLimitsGroupId2 ?? null,
163
+ // catalog
164
+ lineSegments: convertToLineSegmentInfos(lineForm.lineSegments)
165
+ };
166
+ };
167
+ export {
168
+ lineCreationDtoToForm,
169
+ lineCreationEmptyFormData,
170
+ lineCreationFormSchema,
171
+ lineCreationFormToDto
172
+ };
@@ -0,0 +1,10 @@
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 './characteristics';
8
+ export * from './catalog';
9
+ export * from './common';
10
+ export * from './creation';
@@ -0,0 +1,37 @@
1
+ import { getCharacteristicsValidationSchema, getLineCharacteristicsEmptyFormData, getLineCharacteristicsFormData, getLineCharacteristicsValidationSchemaProps } from "./characteristics/lineCharacteristicsPane.utils.js";
2
+ import { LineCharacteristicsPane } from "./characteristics/LineCharacteristicsPane.js";
3
+ import { CATEGORIES_TABS } from "./catalog/lineCatalog.type.js";
4
+ import { LineSegmentsInfoSchema, SegmentCurrentLimitsSchema, SegmentInfoSchema, SegmentSchema, SegmentTemporaryLimitSchema, convertLimitsToOperationalLimitsGroupFormSchema, convertToLineSegmentInfos, convertToLineSegmentsFormData, emptyLineSegment } from "./catalog/segment.utils.js";
5
+ import { LINE_TAB_FIELDS, LineDialogTab } from "./common/line.utils.js";
6
+ import { LineDialogTabs } from "./common/LineDialogTabs.js";
7
+ import { LineDialogTabsContent } from "./common/LineDialogTabsContent.js";
8
+ import { LineDialogHeader } from "./common/LineDialogHeader.js";
9
+ import { LineForm } from "./common/LineForm.js";
10
+ import { lineCreationDtoToForm, lineCreationEmptyFormData, lineCreationFormSchema, lineCreationFormToDto } from "./creation/lineCreation.utils.js";
11
+ export {
12
+ CATEGORIES_TABS,
13
+ LINE_TAB_FIELDS,
14
+ LineCharacteristicsPane,
15
+ LineDialogHeader,
16
+ LineDialogTab,
17
+ LineDialogTabs,
18
+ LineDialogTabsContent,
19
+ LineForm,
20
+ LineSegmentsInfoSchema,
21
+ SegmentCurrentLimitsSchema,
22
+ SegmentInfoSchema,
23
+ SegmentSchema,
24
+ SegmentTemporaryLimitSchema,
25
+ convertLimitsToOperationalLimitsGroupFormSchema,
26
+ convertToLineSegmentInfos,
27
+ convertToLineSegmentsFormData,
28
+ emptyLineSegment,
29
+ getCharacteristicsValidationSchema,
30
+ getLineCharacteristicsEmptyFormData,
31
+ getLineCharacteristicsFormData,
32
+ getLineCharacteristicsValidationSchemaProps,
33
+ lineCreationDtoToForm,
34
+ lineCreationEmptyFormData,
35
+ lineCreationFormSchema,
36
+ lineCreationFormToDto
37
+ };
@@ -62,6 +62,9 @@ import "react-window";
62
62
  import "../../../../components/composite/report/report-treeview/treeview-item.js";
63
63
  import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
64
64
  import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
65
+ import "@mui/material/colors";
66
+ import "@mui/x-charts";
67
+ import "../../common/currentLimits/limitsPane.utils.js";
65
68
  function LoadDialogHeader({ loadToModify, isModification = false }) {
66
69
  const intl = useIntl();
67
70
  const equipmentId = useWatch({ name: FieldConstants.EQUIPMENT_ID });
@@ -64,6 +64,9 @@ import "../../../../components/composite/report/report-viewer/context/report-vie
64
64
  import { getSetPointsSchema } from "../../common/setpoints/setPoints.utils.js";
65
65
  import { getConnectivityWithPositionSchema, getConnectivityWithPositionEmptyFormDataProps, getConnectivityFormDataProps } from "../../common/connectivity/connectivityForm.utils.js";
66
66
  import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
67
+ import "@mui/material/colors";
68
+ import "@mui/x-charts";
69
+ import "../../common/currentLimits/limitsPane.utils.js";
67
70
  const loadModificationFormSchema = object().shape({
68
71
  [FieldConstants.EQUIPMENT_ID]: string().required(),
69
72
  [FieldConstants.EQUIPMENT_NAME]: string().nullable(),
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { Grid2, Box } from "@mui/material";
2
+ import { Grid2 } from "@mui/material";
3
3
  import { useFormContext, useWatch } from "react-hook-form";
4
4
  import { useMemo, useCallback, useEffect } from "react";
5
5
  import { useIntl } from "react-intl";
@@ -177,15 +177,16 @@ function CharacteristicsForm({ previousValues, isModification = false }) {
177
177
  /* @__PURE__ */ jsx(Grid2, { size: 4, children: maximumSectionCountField }),
178
178
  /* @__PURE__ */ jsx(Grid2, { size: 4, children: sectionCountField }),
179
179
  /* @__PURE__ */ jsx(Grid2, { size: 12, children: characteristicsChoiceField }),
180
- characteristicsChoice === CHARACTERISTICS_CHOICES.SUSCEPTANCE.id && /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, children: [
180
+ characteristicsChoice === CHARACTERISTICS_CHOICES.SUSCEPTANCE.id && /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, size: 12, children: [
181
181
  /* @__PURE__ */ jsx(Grid2, { size: 4, children: maxSusceptanceField }),
182
182
  /* @__PURE__ */ jsx(Grid2, { size: 4, children: switchedOnSusceptanceField })
183
183
  ] }),
184
- characteristicsChoice === CHARACTERISTICS_CHOICES.Q_AT_NOMINAL_V.id && /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, children: [
184
+ characteristicsChoice === CHARACTERISTICS_CHOICES.Q_AT_NOMINAL_V.id && /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, size: 12, children: [
185
185
  /* @__PURE__ */ jsx(Grid2, { size: 4, children: shuntCompensatorTypeField }),
186
- /* @__PURE__ */ jsx(Box, { sx: { width: "100%" } }),
187
- /* @__PURE__ */ jsx(Grid2, { size: 4, children: maxQAtNominalVField }),
188
- /* @__PURE__ */ jsx(Grid2, { size: 4, children: switchedOnMaxQAtNominalVField })
186
+ /* @__PURE__ */ jsxs(Grid2, { container: true, size: 12, children: [
187
+ /* @__PURE__ */ jsx(Grid2, { size: 4, children: maxQAtNominalVField }),
188
+ /* @__PURE__ */ jsx(Grid2, { size: 4, children: switchedOnMaxQAtNominalVField })
189
+ ] })
189
190
  ] })
190
191
  ] });
191
192
  }
@@ -64,6 +64,9 @@ import "react-window";
64
64
  import "../../../../components/composite/report/report-treeview/treeview-item.js";
65
65
  import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
66
66
  import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
67
+ import "@mui/material/colors";
68
+ import "@mui/x-charts";
69
+ import "../../common/currentLimits/limitsPane.utils.js";
67
70
  import { CharacteristicsForm } from "../common/CharacteristicsForm.js";
68
71
  function ShuntCompensatorCreationForm({
69
72
  voltageLevelOptions = [],
@@ -62,6 +62,9 @@ import "../../../../components/composite/report/report-treeview/treeview-item.js
62
62
  import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
63
63
  import { getConnectivityWithPositionSchema, getConnectivityWithPositionEmptyFormDataProps, getConnectivityFormDataProps } from "../../common/connectivity/connectivityForm.utils.js";
64
64
  import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
65
+ import "@mui/material/colors";
66
+ import "@mui/x-charts";
67
+ import "../../common/currentLimits/limitsPane.utils.js";
65
68
  import { CHARACTERISTICS_CHOICES } from "../common/shuntCompensator.utils.js";
66
69
  import { getCharacteristicsFormValidationSchema, getCharacteristicsEmptyFormData, getCharacteristicsFormData } from "../common/characteristicsForm.utils.js";
67
70
  const shuntCompensatorCreationFormSchema = object().shape({
@@ -65,6 +65,9 @@ import "react-window";
65
65
  import "../../../../components/composite/report/report-treeview/treeview-item.js";
66
66
  import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
67
67
  import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
68
+ import "@mui/material/colors";
69
+ import "@mui/x-charts";
70
+ import "../../common/currentLimits/limitsPane.utils.js";
68
71
  import { CharacteristicsForm } from "../common/CharacteristicsForm.js";
69
72
  function ShuntCompensatorModificationForm({
70
73
  shuntCompensatorToModify,