@gridsuite/commons-ui 0.269.0 → 0.271.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 (142) hide show
  1. package/dist/components/ui/dialogs/customMuiDialog/CustomMuiDialog.d.ts +10 -3
  2. package/dist/components/ui/dialogs/customMuiDialog/CustomMuiDialog.js +33 -28
  3. package/dist/features/index.js +96 -3
  4. package/dist/features/network-modifications/common/branch/branchCreation.types.d.ts +26 -0
  5. package/dist/features/network-modifications/common/branch/branchModification.types.d.ts +36 -0
  6. package/dist/features/network-modifications/common/branch/branchModification.types.js +1 -0
  7. package/dist/features/network-modifications/{line/characteristics/lineCharacteristicsPane.types.d.ts → common/branch/index.d.ts} +2 -8
  8. package/dist/features/network-modifications/common/branch/index.js +1 -0
  9. package/dist/features/network-modifications/common/connectivity/connectivityForm.utils.d.ts +2 -0
  10. package/dist/features/network-modifications/common/currentLimits/limits.types.d.ts +1 -0
  11. package/dist/features/network-modifications/common/currentLimits/limitsPane.utils.d.ts +2 -2
  12. package/dist/features/network-modifications/common/index.d.ts +1 -0
  13. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/reactiveCapability.utils.js +1 -1
  14. package/dist/features/network-modifications/common/regulatingTerminal/regulatingTerminal.utils.d.ts +2 -2
  15. package/dist/features/network-modifications/common/regulatingTerminal/regulatingTerminal.utils.js +2 -2
  16. package/dist/features/network-modifications/index.d.ts +1 -0
  17. package/dist/features/network-modifications/index.js +96 -3
  18. package/dist/features/network-modifications/line/characteristics/index.d.ts +0 -1
  19. package/dist/features/network-modifications/line/characteristics/index.js +1 -2
  20. package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.d.ts +4 -19
  21. package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.js +0 -14
  22. package/dist/features/network-modifications/line/creation/lineCreation.types.d.ts +6 -26
  23. package/dist/features/network-modifications/line/index.js +1 -2
  24. package/dist/features/network-modifications/line/modification/lineModification.types.d.ts +3 -35
  25. package/dist/features/network-modifications/twoWindingsTransformer/characteristics/TwoWindingsTransformerCharacteristicsPane.d.ts +7 -0
  26. package/dist/features/network-modifications/twoWindingsTransformer/characteristics/TwoWindingsTransformerCharacteristicsPane.js +168 -0
  27. package/dist/features/network-modifications/twoWindingsTransformer/characteristics/index.d.ts +8 -0
  28. package/dist/features/network-modifications/twoWindingsTransformer/characteristics/index.js +8 -0
  29. package/dist/features/network-modifications/twoWindingsTransformer/characteristics/twoWindingsTransformerCharacteristicsPane.utils.d.ts +41 -0
  30. package/dist/features/network-modifications/twoWindingsTransformer/characteristics/twoWindingsTransformerCharacteristicsPane.utils.js +51 -0
  31. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogHeader.d.ts +6 -0
  32. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogHeader.js +123 -0
  33. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabs.d.ts +9 -0
  34. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabs.js +89 -0
  35. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabsContent.d.ts +14 -0
  36. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabsContent.js +118 -0
  37. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerForm.d.ts +6 -0
  38. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerForm.js +47 -0
  39. package/dist/features/network-modifications/twoWindingsTransformer/common/index.d.ts +12 -0
  40. package/dist/features/network-modifications/twoWindingsTransformer/common/index.js +13 -0
  41. package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.types.d.ts +87 -0
  42. package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.types.js +1 -0
  43. package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.utils.d.ts +10 -0
  44. package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.utils.js +50 -0
  45. package/dist/features/network-modifications/twoWindingsTransformer/creation/index.d.ts +8 -0
  46. package/dist/features/network-modifications/twoWindingsTransformer/creation/index.js +12 -0
  47. package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.types.d.ts +47 -0
  48. package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.types.js +8 -0
  49. package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.utils.d.ts +248 -0
  50. package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.utils.js +325 -0
  51. package/dist/features/network-modifications/twoWindingsTransformer/index.d.ts +11 -0
  52. package/dist/features/network-modifications/twoWindingsTransformer/index.js +88 -0
  53. package/dist/features/network-modifications/twoWindingsTransformer/modification/index.d.ts +9 -0
  54. package/dist/features/network-modifications/twoWindingsTransformer/modification/index.js +10 -0
  55. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/ToBeEstimatedForm.d.ts +6 -0
  56. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/ToBeEstimatedForm.js +104 -0
  57. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/index.d.ts +9 -0
  58. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/index.js +7 -0
  59. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.type.d.ts +10 -0
  60. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.type.js +1 -0
  61. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.utils.d.ts +12 -0
  62. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.utils.js +18 -0
  63. package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.types.d.ts +39 -0
  64. package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.types.js +1 -0
  65. package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.utils.d.ts +265 -0
  66. package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.utils.js +100 -0
  67. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/RegulatedTerminalSection.d.ts +13 -0
  68. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/RegulatedTerminalSection.js +130 -0
  69. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/TapChangerSteps.d.ts +20 -0
  70. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/TapChangerSteps.js +311 -0
  71. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/index.d.ts +12 -0
  72. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/index.js +53 -0
  73. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPane.d.ts +2 -0
  74. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPane.js +198 -0
  75. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPaneSteps.d.ts +9 -0
  76. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPaneSteps.js +201 -0
  77. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/index.d.ts +9 -0
  78. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/index.js +15 -0
  79. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/phaseTapChanger.utils.d.ts +114 -0
  80. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/phaseTapChanger.utils.js +242 -0
  81. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPane.d.ts +2 -0
  82. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPane.js +283 -0
  83. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPaneSteps.d.ts +9 -0
  84. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPaneSteps.js +181 -0
  85. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/index.d.ts +9 -0
  86. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/index.js +18 -0
  87. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/ratioTapChanger.utils.d.ts +132 -0
  88. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/ratioTapChanger.utils.js +211 -0
  89. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialog.d.ts +2 -0
  90. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialog.js +102 -0
  91. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialogSubmitButton.d.ts +7 -0
  92. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialogSubmitButton.js +22 -0
  93. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleForm.d.ts +6 -0
  94. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleForm.js +86 -0
  95. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/ImportRuleDialog.d.ts +10 -0
  96. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/ImportRuleDialog.js +140 -0
  97. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/index.d.ts +12 -0
  98. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/index.js +13 -0
  99. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.types.d.ts +12 -0
  100. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.types.js +1 -0
  101. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.utils.d.ts +9 -0
  102. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.utils.js +19 -0
  103. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/tapChanger.utils.d.ts +14 -0
  104. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/tapChanger.utils.js +79 -0
  105. package/dist/features/network-modifications/voltageLevel/index.d.ts +1 -0
  106. package/dist/features/network-modifications/voltageLevel/index.js +9 -1
  107. package/dist/features/network-modifications/voltageLevel/section/VoltageLevelSectionCreationForm.d.ts +10 -0
  108. package/dist/features/network-modifications/voltageLevel/section/VoltageLevelSectionCreationForm.js +375 -0
  109. package/dist/features/network-modifications/voltageLevel/section/index.d.ts +9 -0
  110. package/dist/features/network-modifications/voltageLevel/section/index.js +10 -0
  111. package/dist/features/network-modifications/voltageLevel/section/voltageLevelSectionCreation.types.d.ts +15 -0
  112. package/dist/features/network-modifications/voltageLevel/section/voltageLevelSectionCreation.types.js +1 -0
  113. package/dist/features/network-modifications/voltageLevel/section/voltageLevelSectionCreation.utils.d.ts +48 -0
  114. package/dist/features/network-modifications/voltageLevel/section/voltageLevelSectionCreation.utils.js +100 -0
  115. package/dist/index.js +107 -7
  116. package/dist/translations/en/filterExpertEn.d.ts +0 -3
  117. package/dist/translations/en/filterExpertEn.js +0 -3
  118. package/dist/translations/en/network-modification-validationEn.d.ts +1 -0
  119. package/dist/translations/en/network-modification-validationEn.js +2 -1
  120. package/dist/translations/en/networkModificationsEn.d.ts +87 -9
  121. package/dist/translations/en/networkModificationsEn.js +91 -12
  122. package/dist/translations/fr/filterExpertFr.d.ts +0 -3
  123. package/dist/translations/fr/filterExpertFr.js +0 -3
  124. package/dist/translations/fr/network-modification-validationFr.d.ts +1 -0
  125. package/dist/translations/fr/network-modification-validationFr.js +2 -1
  126. package/dist/translations/fr/networkModificationsFr.d.ts +87 -9
  127. package/dist/translations/fr/networkModificationsFr.js +91 -12
  128. package/dist/utils/constants/fieldConstants.d.ts +37 -0
  129. package/dist/utils/constants/fieldConstants.js +37 -0
  130. package/dist/utils/constants/index.js +2 -1
  131. package/dist/utils/constants/translationKeys.d.ts +1 -0
  132. package/dist/utils/constants/translationKeys.js +2 -0
  133. package/dist/utils/functions.d.ts +9 -0
  134. package/dist/utils/functions.js +40 -0
  135. package/dist/utils/index.js +11 -4
  136. package/dist/utils/langs.d.ts +1 -0
  137. package/dist/utils/langs.js +9 -1
  138. package/dist/utils/types/equipmentType.d.ts +34 -0
  139. package/dist/utils/types/equipmentType.js +28 -0
  140. package/dist/utils/types/index.js +4 -1
  141. package/package.json +1 -1
  142. /package/dist/features/network-modifications/{line/characteristics/lineCharacteristicsPane.types.js → common/branch/branchCreation.types.js} +0 -0
@@ -0,0 +1,325 @@
1
+ import { object, string } from "yup";
2
+ import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
3
+ import { convertInputValue, convertOutputValue } from "../../../../utils/conversionUtils.js";
4
+ import { RATIO_REGULATION_MODES, REGULATION_SIDES, PHASE_REGULATION_MODES, UNDEFINED_CONNECTION_DIRECTION, EquipmentType } from "../../../../utils/types/equipmentType.js";
5
+ import { ModificationType } from "../../../../utils/types/modificationType.js";
6
+ import { FieldType } from "../../../../utils/types/fieldType.js";
7
+ import { addSelectedFieldToRows } from "../../../../utils/functions.js";
8
+ import "react/jsx-runtime";
9
+ import "@mui/icons-material";
10
+ import { sanitizeString } from "../../../../utils/ts-utils.js";
11
+ import { getBranchConnectivityWithPositionSchema, getBranchConnectivityWithPositionEmptyFormDataProps, getConnectivityFormDataProps } from "../../common/connectivity/connectivityForm.utils.js";
12
+ import "@mui/material";
13
+ import "react";
14
+ import "react-intl";
15
+ import "../../../../components/ui/overflowableText/OverflowableText.js";
16
+ import "react-hook-form";
17
+ import "localized-countries";
18
+ import "localized-countries/data/fr";
19
+ import "localized-countries/data/en";
20
+ import "notistack";
21
+ import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
22
+ import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
23
+ import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
24
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
25
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
26
+ import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
27
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
28
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
29
+ import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
30
+ import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
31
+ import "../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
32
+ import "@hello-pangea/dnd";
33
+ import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
34
+ import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
35
+ import "mui-nested-menu";
36
+ import "react-resizable-panels";
37
+ import "react-papaparse";
38
+ import { creationPropertiesSchema, getFilledPropertiesFromModification, toModificationProperties } from "../../common/properties/propertyUtils.js";
39
+ import { getLimitsValidationSchemaProps, getLimitsEmptyFormDataProps, getAllLimitsFormData, sanitizeLimitsGroups } from "../../common/currentLimits/limitsPane.utils.js";
40
+ import { getTwtCharacteristicsValidationSchemaProps, getTwtCharacteristicsEmptyFormData } from "../characteristics/twoWindingsTransformerCharacteristicsPane.utils.js";
41
+ import "react-dom";
42
+ import "autosuggest-highlight/match";
43
+ import "autosuggest-highlight/parse";
44
+ import "clsx";
45
+ import "../../../../components/composite/filter/FilterCreationDialog.js";
46
+ import "../../../../components/composite/filter/HeaderFilterForm.js";
47
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
48
+ import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
49
+ import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
50
+ import "../../../../components/composite/filter/expert/expertFilterConstants.js";
51
+ import "react-querybuilder";
52
+ import "uuid";
53
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
54
+ import "../../../../components/composite/filter/utils/filterFormUtils.js";
55
+ import "@react-querybuilder/material";
56
+ import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
57
+ import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
58
+ import "../../../../components/composite/agGridTable/BottomTableButtons.js";
59
+ import "../../../../components/composite/agGridTable/CustomAgGridTable.js";
60
+ import "ag-grid-community";
61
+ import "../../../../components/composite/customAGGrid/customAggrid.js";
62
+ import "../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
63
+ import "mathjs";
64
+ import "../../../../components/composite/report/report-viewer/log-table/log-table.js";
65
+ import "react-window";
66
+ import "../../../../components/composite/report/report-treeview/treeview-item.js";
67
+ import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
68
+ import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
69
+ import { REGULATION_TYPES } from "../../common/voltageRegulation/voltageRegulation.utils.js";
70
+ import "@mui/material/colors";
71
+ import "@mui/x-charts";
72
+ import { computeHighTapPosition } from "../tapChanger/tapChanger.utils.js";
73
+ import "../tapChanger/regulationRule/CreateRuleForm.js";
74
+ import "../tapChanger/regulationRule/CreateRuleDialog.js";
75
+ import { getPhaseTapChangerValidationSchemaProps, getPhaseTapChangerEmptyFormData, getPhaseTapChangerFormData } from "../tapChanger/phaseTapChanger/phaseTapChanger.utils.js";
76
+ import { getRatioTapChangerValidationSchemaProps, getRatioTapChangerEmptyFormData, getRatioTapChangerFormData } from "../tapChanger/ratioTapChanger/ratioTapChanger.utils.js";
77
+ const getRegulationTypeForEdit = (twt, tap) => {
78
+ if (tap?.terminalRefConnectableId == null) {
79
+ return null;
80
+ }
81
+ return tap.terminalRefConnectableId === twt.equipmentId ? REGULATION_TYPES.LOCAL.id : REGULATION_TYPES.DISTANT.id;
82
+ };
83
+ const computeRatioTapChangerRegulationMode = (ratioTapChangerFormValues) => {
84
+ if (ratioTapChangerFormValues?.isRegulating) {
85
+ return RATIO_REGULATION_MODES.VOLTAGE_REGULATION.id;
86
+ }
87
+ return RATIO_REGULATION_MODES.FIXED_RATIO.id;
88
+ };
89
+ const getTapSideForEdit = (twt, tap) => {
90
+ if (tap?.terminalRefConnectableId !== twt.equipmentId) {
91
+ return null;
92
+ }
93
+ return tap?.terminalRefConnectableVlId === twt?.voltageLevelId1 ? REGULATION_SIDES.SIDE1.id : REGULATION_SIDES.SIDE2.id;
94
+ };
95
+ const computeRatioTapChangerRegulating = (ratioTapChangerFormValues) => {
96
+ return ratioTapChangerFormValues?.regulationMode === RATIO_REGULATION_MODES.VOLTAGE_REGULATION.id;
97
+ };
98
+ const computeRegulatingTerminalId = (tapChangerValue, currentTwtId) => {
99
+ if (tapChangerValue?.regulationType === REGULATION_TYPES.LOCAL.id) {
100
+ return currentTwtId;
101
+ }
102
+ return tapChangerValue?.equipment?.id ?? null;
103
+ };
104
+ const computeRegulatingTerminalType = (tapChangerValue) => {
105
+ if (tapChangerValue?.equipment?.type) {
106
+ return tapChangerValue?.equipment?.type;
107
+ }
108
+ if (tapChangerValue?.regulationType === REGULATION_TYPES.LOCAL.id) {
109
+ return EquipmentType.TWO_WINDINGS_TRANSFORMER;
110
+ }
111
+ return null;
112
+ };
113
+ const computeTapTerminalVlId = (tapChangerValue, connectivity) => {
114
+ if (tapChangerValue?.regulationType === REGULATION_TYPES.LOCAL.id) {
115
+ if (tapChangerValue?.regulationSide === REGULATION_SIDES.SIDE1.id) {
116
+ return connectivity.connectivity1.voltageLevel?.id ?? null;
117
+ }
118
+ return connectivity.connectivity2.voltageLevel?.id ?? null;
119
+ }
120
+ return tapChangerValue?.voltageLevel?.id ?? null;
121
+ };
122
+ const computePhaseTapChangerRegulating = (phaseTapChangerFormValues) => {
123
+ return phaseTapChangerFormValues?.regulationMode === PHASE_REGULATION_MODES.CURRENT_LIMITER.id || phaseTapChangerFormValues?.regulationMode === PHASE_REGULATION_MODES.ACTIVE_POWER_CONTROL.id;
124
+ };
125
+ const computePhaseTapChangerRegulationValue = (phaseTapChangerFormValues) => {
126
+ switch (phaseTapChangerFormValues?.regulationMode) {
127
+ case PHASE_REGULATION_MODES.ACTIVE_POWER_CONTROL.id:
128
+ return phaseTapChangerFormValues?.flowSetPointRegulatingValue ?? void 0;
129
+ case PHASE_REGULATION_MODES.CURRENT_LIMITER.id:
130
+ return phaseTapChangerFormValues?.currentLimiterRegulatingValue ?? void 0;
131
+ default:
132
+ return void 0;
133
+ }
134
+ };
135
+ const computeRegulationModeValue = (phaseTapChangerFormValues) => {
136
+ if (phaseTapChangerFormValues?.regulationMode === PHASE_REGULATION_MODES.OFF.id) {
137
+ return null;
138
+ }
139
+ return phaseTapChangerFormValues?.regulationMode;
140
+ };
141
+ const transformOperationalLimitsGroupsForForm = (operationalLimitsGroups) => {
142
+ return operationalLimitsGroups?.filter(
143
+ (group) => group.id != null && group.applicability != null
144
+ ).map(({ id, currentLimits, applicability, limitsProperties }) => ({
145
+ id: id + applicability,
146
+ name: id,
147
+ applicability,
148
+ limitsProperties: limitsProperties ?? void 0,
149
+ currentLimits: {
150
+ permanentLimit: currentLimits?.permanentLimit ?? "",
151
+ temporaryLimits: currentLimits?.temporaryLimits?.map((tl) => ({
152
+ name: tl.name ?? "",
153
+ value: tl.value ?? "",
154
+ acceptableDuration: tl.acceptableDuration ?? ""
155
+ })) ?? []
156
+ }
157
+ }));
158
+ };
159
+ const twoWindingsTransformerCreationFormSchema = object().shape({
160
+ [FieldConstants.EQUIPMENT_ID]: string().required(),
161
+ [FieldConstants.EQUIPMENT_NAME]: string().nullable(),
162
+ [FieldConstants.CONNECTIVITY]: getBranchConnectivityWithPositionSchema(false, true),
163
+ [FieldConstants.CHARACTERISTICS]: getTwtCharacteristicsValidationSchemaProps(false),
164
+ [FieldConstants.LIMITS]: getLimitsValidationSchemaProps(false),
165
+ [FieldConstants.RATIO_TAP_CHANGER]: getRatioTapChangerValidationSchemaProps(false),
166
+ [FieldConstants.PHASE_TAP_CHANGER]: getPhaseTapChangerValidationSchemaProps(false)
167
+ }).concat(creationPropertiesSchema).required();
168
+ const twoWindingsTransformerCreationEmptyFormData = {
169
+ [FieldConstants.EQUIPMENT_ID]: "",
170
+ [FieldConstants.EQUIPMENT_NAME]: "",
171
+ [FieldConstants.CONNECTIVITY]: getBranchConnectivityWithPositionEmptyFormDataProps(),
172
+ [FieldConstants.CHARACTERISTICS]: getTwtCharacteristicsEmptyFormData(),
173
+ [FieldConstants.LIMITS]: getLimitsEmptyFormDataProps(false),
174
+ [FieldConstants.RATIO_TAP_CHANGER]: getRatioTapChangerEmptyFormData(false),
175
+ [FieldConstants.PHASE_TAP_CHANGER]: getPhaseTapChangerEmptyFormData(false),
176
+ AdditionalProperties: []
177
+ };
178
+ const twoWindingsTransformerCreationDtoToForm = (twtDto) => {
179
+ const ratioTap = twtDto.ratioTapChanger;
180
+ const phaseTap = twtDto.phaseTapChanger;
181
+ return {
182
+ equipmentID: twtDto.equipmentId,
183
+ equipmentName: twtDto.equipmentName ?? "",
184
+ connectivity: {
185
+ connectivity1: getConnectivityFormDataProps({
186
+ voltageLevelId: twtDto.voltageLevelId1,
187
+ busbarSectionId: twtDto.busOrBusbarSectionId1,
188
+ connectionDirection: twtDto.connectionDirection1,
189
+ connectionName: twtDto.connectionName1,
190
+ connectionPosition: twtDto.connectionPosition1,
191
+ terminalConnected: twtDto.connected1
192
+ }),
193
+ connectivity2: getConnectivityFormDataProps({
194
+ voltageLevelId: twtDto.voltageLevelId2,
195
+ busbarSectionId: twtDto.busOrBusbarSectionId2,
196
+ connectionDirection: twtDto.connectionDirection2,
197
+ connectionName: twtDto.connectionName2,
198
+ connectionPosition: twtDto.connectionPosition2,
199
+ terminalConnected: twtDto.connected2
200
+ })
201
+ },
202
+ characteristics: {
203
+ r: twtDto.r,
204
+ x: twtDto.x,
205
+ g: convertInputValue(FieldType.G, twtDto.g),
206
+ b: convertInputValue(FieldType.B, twtDto.b),
207
+ ratedU1: twtDto.ratedU1,
208
+ ratedU2: twtDto.ratedU2,
209
+ ratedS: twtDto.ratedS
210
+ },
211
+ AdditionalProperties: getFilledPropertiesFromModification(twtDto.properties),
212
+ ...getAllLimitsFormData(
213
+ transformOperationalLimitsGroupsForForm(twtDto?.operationalLimitsGroups),
214
+ twtDto?.selectedOperationalLimitsGroupId1 ?? null,
215
+ twtDto?.selectedOperationalLimitsGroupId2 ?? null
216
+ ),
217
+ ...getPhaseTapChangerFormData({
218
+ enabled: phaseTap?.tapPosition !== void 0,
219
+ regulationMode: phaseTap?.isRegulating ? phaseTap?.regulationMode : PHASE_REGULATION_MODES.OFF.id,
220
+ regulationType: getRegulationTypeForEdit(twtDto, phaseTap),
221
+ regulationSide: getTapSideForEdit(twtDto, phaseTap),
222
+ currentLimiterRegulatingValue: phaseTap?.regulationMode === PHASE_REGULATION_MODES.CURRENT_LIMITER.id ? phaseTap?.regulationValue : null,
223
+ flowSetpointRegulatingValue: phaseTap?.regulationMode === PHASE_REGULATION_MODES.ACTIVE_POWER_CONTROL.id ? phaseTap?.regulationValue : null,
224
+ targetDeadband: phaseTap?.targetDeadband,
225
+ lowTapPosition: phaseTap?.lowTapPosition,
226
+ highTapPosition: computeHighTapPosition(phaseTap?.steps ?? []),
227
+ tapPosition: phaseTap?.tapPosition,
228
+ steps: addSelectedFieldToRows(phaseTap?.steps ?? []),
229
+ equipmentID: phaseTap?.terminalRefConnectableId ?? void 0,
230
+ equipmentType: phaseTap?.terminalRefConnectableType ?? void 0,
231
+ voltageLevelId: phaseTap?.terminalRefConnectableVlId ?? void 0
232
+ }),
233
+ ...getRatioTapChangerFormData({
234
+ enabled: ratioTap?.tapPosition !== void 0,
235
+ hasLoadTapChangingCapabilities: ratioTap?.hasLoadTapChangingCapabilities,
236
+ regulationMode: computeRatioTapChangerRegulationMode(ratioTap),
237
+ regulationType: getRegulationTypeForEdit(twtDto, ratioTap),
238
+ regulationSide: getTapSideForEdit(twtDto, ratioTap),
239
+ targetV: ratioTap?.targetV,
240
+ targetDeadband: ratioTap?.targetDeadband,
241
+ lowTapPosition: ratioTap?.lowTapPosition,
242
+ highTapPosition: computeHighTapPosition(ratioTap?.steps ?? []),
243
+ tapPosition: ratioTap?.tapPosition,
244
+ steps: addSelectedFieldToRows(ratioTap?.steps ?? []),
245
+ equipmentId: ratioTap?.terminalRefConnectableId ?? void 0,
246
+ equipmentType: ratioTap?.terminalRefConnectableType ?? void 0,
247
+ voltageLevelId: ratioTap?.terminalRefConnectableVlId ?? void 0
248
+ })
249
+ };
250
+ };
251
+ const twoWindingsTransformerCreationFormToDto = (twtForm) => {
252
+ const enablePhaseTapChanger = twtForm?.phaseTapChanger?.enabled;
253
+ const enableRatioTapChanger = twtForm?.ratioTapChanger?.enabled;
254
+ let ratioTap;
255
+ let phaseTap;
256
+ if (enableRatioTapChanger) {
257
+ const ratioForm = twtForm.ratioTapChanger;
258
+ const hasLoadTapCapabilities = ratioForm.hasLoadTapChangingCapabilities;
259
+ ratioTap = {
260
+ ...ratioForm,
261
+ isRegulating: computeRatioTapChangerRegulating(ratioForm),
262
+ terminalRefConnectableId: hasLoadTapCapabilities ? computeRegulatingTerminalId(ratioForm, twtForm.equipmentID) : null,
263
+ terminalRefConnectableType: hasLoadTapCapabilities ? computeRegulatingTerminalType(ratioForm) : null,
264
+ terminalRefConnectableVlId: hasLoadTapCapabilities ? computeTapTerminalVlId(ratioForm, twtForm.connectivity) : null,
265
+ targetV: hasLoadTapCapabilities && ratioForm.targetV != null ? Number(ratioForm.targetV) : null,
266
+ targetDeadband: hasLoadTapCapabilities && ratioForm.targetDeadband != null ? Number(ratioForm.targetDeadband) : null
267
+ };
268
+ }
269
+ if (enablePhaseTapChanger) {
270
+ const phaseForm = twtForm.phaseTapChanger;
271
+ phaseTap = {
272
+ hasLoadTapChangingCapabilities: true,
273
+ isRegulating: computePhaseTapChangerRegulating(phaseForm),
274
+ regulationValue: computePhaseTapChangerRegulationValue(phaseForm),
275
+ terminalRefConnectableId: computeRegulatingTerminalId(phaseForm, twtForm.equipmentID),
276
+ terminalRefConnectableType: computeRegulatingTerminalType(phaseForm),
277
+ terminalRefConnectableVlId: computeTapTerminalVlId(phaseForm, twtForm.connectivity),
278
+ ...phaseForm,
279
+ regulationMode: computeRegulationModeValue(phaseForm)
280
+ };
281
+ }
282
+ return {
283
+ type: ModificationType.TWO_WINDINGS_TRANSFORMER_CREATION,
284
+ equipmentId: twtForm.equipmentID,
285
+ equipmentName: sanitizeString(twtForm.equipmentName),
286
+ // connectivity
287
+ voltageLevelId1: twtForm.connectivity.connectivity1.voltageLevel?.id ?? "",
288
+ busOrBusbarSectionId1: twtForm.connectivity.connectivity1.busOrBusbarSection?.id ?? "",
289
+ connectionDirection1: twtForm.connectivity.connectivity1.connectionDirection ?? UNDEFINED_CONNECTION_DIRECTION,
290
+ connectionName1: sanitizeString(twtForm.connectivity.connectivity1.connectionName),
291
+ connectionPosition1: twtForm.connectivity.connectivity1.connectionPosition,
292
+ connected1: twtForm.connectivity.connectivity1.terminalConnected ?? null,
293
+ voltageLevelId2: twtForm.connectivity.connectivity2.voltageLevel?.id ?? "",
294
+ busOrBusbarSectionId2: twtForm.connectivity.connectivity2.busOrBusbarSection?.id ?? "",
295
+ connectionDirection2: twtForm.connectivity.connectivity2.connectionDirection ?? UNDEFINED_CONNECTION_DIRECTION,
296
+ connectionName2: sanitizeString(twtForm.connectivity.connectivity2.connectionName),
297
+ connectionPosition2: twtForm.connectivity.connectivity2.connectionPosition,
298
+ connected2: twtForm.connectivity.connectivity2.terminalConnected ?? null,
299
+ // characteristics
300
+ r: twtForm.characteristics.r ?? null,
301
+ x: Number(twtForm.characteristics.x),
302
+ g: Number(convertOutputValue(FieldType.G, twtForm.characteristics.g)),
303
+ b: Number(convertOutputValue(FieldType.B, twtForm.characteristics.b)),
304
+ ratedS: twtForm.characteristics.ratedS ?? null,
305
+ ratedU1: Number(twtForm.characteristics.ratedU1),
306
+ ratedU2: Number(twtForm.characteristics.ratedU2),
307
+ properties: toModificationProperties(twtForm),
308
+ // limits
309
+ operationalLimitsGroups: sanitizeLimitsGroups(twtForm.limits.operationalLimitsGroups ?? []),
310
+ selectedOperationalLimitsGroupId1: twtForm.limits.selectedOperationalLimitsGroupId1 ?? null,
311
+ selectedOperationalLimitsGroupId2: twtForm.limits.selectedOperationalLimitsGroupId2 ?? null,
312
+ // tap changers
313
+ ratioTapChanger: ratioTap ?? null,
314
+ phaseTapChanger: phaseTap ?? null
315
+ };
316
+ };
317
+ export {
318
+ computeRatioTapChangerRegulationMode,
319
+ getRegulationTypeForEdit,
320
+ getTapSideForEdit,
321
+ twoWindingsTransformerCreationDtoToForm,
322
+ twoWindingsTransformerCreationEmptyFormData,
323
+ twoWindingsTransformerCreationFormSchema,
324
+ twoWindingsTransformerCreationFormToDto
325
+ };
@@ -0,0 +1,11 @@
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 './common';
8
+ export * from './characteristics';
9
+ export * from './tapChanger';
10
+ export * from './creation';
11
+ export * from './modification';
@@ -0,0 +1,88 @@
1
+ import { TWT_TAB_FIELDS, TwoWindingsTransformerDialogTab } from "./common/twoWindingsTransformer.utils.js";
2
+ import { TwoWindingsTransformerDialogHeader } from "./common/TwoWindingsTransformerDialogHeader.js";
3
+ import { TwoWindingsTransformerDialogTabs } from "./common/TwoWindingsTransformerDialogTabs.js";
4
+ import { TwoWindingsTransformerDialogTabsContent } from "./common/TwoWindingsTransformerDialogTabsContent.js";
5
+ import { TwoWindingsTransformerForm } from "./common/TwoWindingsTransformerForm.js";
6
+ import { getTwtCharacteristicsEmptyFormData, getTwtCharacteristicsFormData, getTwtCharacteristicsValidationSchemaProps } from "./characteristics/twoWindingsTransformerCharacteristicsPane.utils.js";
7
+ import { TwoWindingsTransformerCharacteristicsPane } from "./characteristics/TwoWindingsTransformerCharacteristicsPane.js";
8
+ import { compareStepsWithPreviousValues, computeHighTapPosition, getRegulationTypeLabel, getTapChangerEquipmentSectionTypeValue, getTapSideLabel, toTapChangerStepList } from "./tapChanger/tapChanger.utils.js";
9
+ import { getCreateRuleEmptyFormData, getCreateRuleValidationSchema } from "./tapChanger/regulationRule/regulationRule.utils.js";
10
+ import { CreateRuleDialogSubmitButton } from "./tapChanger/regulationRule/CreateRuleDialogSubmitButton.js";
11
+ import { CreateRuleForm } from "./tapChanger/regulationRule/CreateRuleForm.js";
12
+ import { CreateRuleDialog } from "./tapChanger/regulationRule/CreateRuleDialog.js";
13
+ import { ImportRuleDialog } from "./tapChanger/regulationRule/ImportRuleDialog.js";
14
+ import { getComputedPhaseRegulationType, getComputedPhaseRegulationTypeId, getComputedPhaseTapChangerRegulationMode, getComputedPreviousPhaseRegulationType, getPhaseTapChangerEmptyFormData, getPhaseTapChangerFormData, getPhaseTapChangerValidationSchemaProps, getPhaseTapRegulationSideId } from "./tapChanger/phaseTapChanger/phaseTapChanger.utils.js";
15
+ import { PhaseTapChangerPaneSteps } from "./tapChanger/phaseTapChanger/PhaseTapChangerPaneSteps.js";
16
+ import { PhaseTapChangerPane } from "./tapChanger/phaseTapChanger/PhaseTapChangerPane.js";
17
+ import { getComputedPreviousRatioRegulationType, getComputedRegulationMode, getComputedRegulationModeId, getComputedRegulationType, getComputedRegulationTypeId, getComputedTapSide, getComputedTapSideId, getInitialTwtRatioRegulationModeId, getRatioTapChangerEmptyFormData, getRatioTapChangerFormData, getRatioTapChangerValidationSchemaProps } from "./tapChanger/ratioTapChanger/ratioTapChanger.utils.js";
18
+ import { RatioTapChangerPaneSteps } from "./tapChanger/ratioTapChanger/RatioTapChangerPaneSteps.js";
19
+ import { RatioTapChangerPane } from "./tapChanger/ratioTapChanger/RatioTapChangerPane.js";
20
+ import { RegulatedTerminalSection } from "./tapChanger/RegulatedTerminalSection.js";
21
+ import { TapChangerSteps } from "./tapChanger/TapChangerSteps.js";
22
+ import { PhaseTapChangerRegulationMode } from "./creation/twoWindingsTransformerCreation.types.js";
23
+ import { computeRatioTapChangerRegulationMode, getRegulationTypeForEdit, getTapSideForEdit, twoWindingsTransformerCreationDtoToForm, twoWindingsTransformerCreationEmptyFormData, twoWindingsTransformerCreationFormSchema, twoWindingsTransformerCreationFormToDto } from "./creation/twoWindingsTransformerCreation.utils.js";
24
+ import { twoWindingsTransformerModificationEmptyFormData, twoWindingsTransformerModificationFormSchema } from "./modification/twoWindingsTransformerModification.utils.js";
25
+ import { getToBeEstimatedValidationSchemaObject, toBeEstimatedEmptyFormData } from "./modification/measurements/toBeEstimated.utils.js";
26
+ import { ToBeEstimatedForm } from "./modification/measurements/ToBeEstimatedForm.js";
27
+ export {
28
+ CreateRuleDialog,
29
+ CreateRuleDialogSubmitButton,
30
+ CreateRuleForm,
31
+ ImportRuleDialog,
32
+ PhaseTapChangerPane,
33
+ PhaseTapChangerPaneSteps,
34
+ PhaseTapChangerRegulationMode,
35
+ RatioTapChangerPane,
36
+ RatioTapChangerPaneSteps,
37
+ RegulatedTerminalSection,
38
+ TWT_TAB_FIELDS,
39
+ TapChangerSteps,
40
+ ToBeEstimatedForm,
41
+ TwoWindingsTransformerCharacteristicsPane,
42
+ TwoWindingsTransformerDialogHeader,
43
+ TwoWindingsTransformerDialogTab,
44
+ TwoWindingsTransformerDialogTabs,
45
+ TwoWindingsTransformerDialogTabsContent,
46
+ TwoWindingsTransformerForm,
47
+ compareStepsWithPreviousValues,
48
+ computeHighTapPosition,
49
+ computeRatioTapChangerRegulationMode,
50
+ getComputedPhaseRegulationType,
51
+ getComputedPhaseRegulationTypeId,
52
+ getComputedPhaseTapChangerRegulationMode,
53
+ getComputedPreviousPhaseRegulationType,
54
+ getComputedPreviousRatioRegulationType,
55
+ getComputedRegulationMode,
56
+ getComputedRegulationModeId,
57
+ getComputedRegulationType,
58
+ getComputedRegulationTypeId,
59
+ getComputedTapSide,
60
+ getComputedTapSideId,
61
+ getCreateRuleEmptyFormData,
62
+ getCreateRuleValidationSchema,
63
+ getInitialTwtRatioRegulationModeId,
64
+ getPhaseTapChangerEmptyFormData,
65
+ getPhaseTapChangerFormData,
66
+ getPhaseTapChangerValidationSchemaProps,
67
+ getPhaseTapRegulationSideId,
68
+ getRatioTapChangerEmptyFormData,
69
+ getRatioTapChangerFormData,
70
+ getRatioTapChangerValidationSchemaProps,
71
+ getRegulationTypeForEdit,
72
+ getRegulationTypeLabel,
73
+ getTapChangerEquipmentSectionTypeValue,
74
+ getTapSideForEdit,
75
+ getTapSideLabel,
76
+ getToBeEstimatedValidationSchemaObject,
77
+ getTwtCharacteristicsEmptyFormData,
78
+ getTwtCharacteristicsFormData,
79
+ getTwtCharacteristicsValidationSchemaProps,
80
+ toBeEstimatedEmptyFormData,
81
+ toTapChangerStepList,
82
+ twoWindingsTransformerCreationDtoToForm,
83
+ twoWindingsTransformerCreationEmptyFormData,
84
+ twoWindingsTransformerCreationFormSchema,
85
+ twoWindingsTransformerCreationFormToDto,
86
+ twoWindingsTransformerModificationEmptyFormData,
87
+ twoWindingsTransformerModificationFormSchema
88
+ };
@@ -0,0 +1,9 @@
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 './twoWindingsTransformerModification.types';
8
+ export * from './twoWindingsTransformerModification.utils';
9
+ export * from './measurements';
@@ -0,0 +1,10 @@
1
+ import { twoWindingsTransformerModificationEmptyFormData, twoWindingsTransformerModificationFormSchema } from "./twoWindingsTransformerModification.utils.js";
2
+ import { getToBeEstimatedValidationSchemaObject, toBeEstimatedEmptyFormData } from "./measurements/toBeEstimated.utils.js";
3
+ import { ToBeEstimatedForm } from "./measurements/ToBeEstimatedForm.js";
4
+ export {
5
+ ToBeEstimatedForm,
6
+ getToBeEstimatedValidationSchemaObject,
7
+ toBeEstimatedEmptyFormData,
8
+ twoWindingsTransformerModificationEmptyFormData,
9
+ twoWindingsTransformerModificationFormSchema
10
+ };
@@ -0,0 +1,6 @@
1
+ import { ToBeEstimatedInfo } from './toBeEstimated.type';
2
+ interface ToBeEstimatedProps {
3
+ toBeEstimated?: ToBeEstimatedInfo;
4
+ }
5
+ export declare function ToBeEstimatedForm({ toBeEstimated }: Readonly<ToBeEstimatedProps>): import("react").JSX.Element;
6
+ export {};
@@ -0,0 +1,104 @@
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { Stack, Box } from "@mui/material";
3
+ import { useMemo } from "react";
4
+ import { useIntl } from "react-intl";
5
+ import { FieldConstants } from "../../../../../utils/constants/fieldConstants.js";
6
+ import "../../../../../utils/conversionUtils.js";
7
+ import "../../../../../utils/types/equipmentType.js";
8
+ import "@mui/icons-material";
9
+ import "../../../../../components/ui/overflowableText/OverflowableText.js";
10
+ import "react-hook-form";
11
+ import "localized-countries";
12
+ import "localized-countries/data/fr";
13
+ import "localized-countries/data/en";
14
+ import "notistack";
15
+ import "../../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
16
+ import "yup";
17
+ import "../../../../../components/ui/treeViewFinder/TreeViewFinder.js";
18
+ import "../../../../../components/ui/reactHookForm/numbers/RangeInput.js";
19
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
20
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
21
+ import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
22
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
23
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
24
+ import "../../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
25
+ import "../../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
26
+ import { CheckboxNullableInput } from "../../../../../components/ui/reactHookForm/CheckboxNullableInput.js";
27
+ import "../../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
28
+ import "@hello-pangea/dnd";
29
+ import "../../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
30
+ import "../../../../../components/ui/snackbarProvider/SnackbarProvider.js";
31
+ import "mui-nested-menu";
32
+ import "react-resizable-panels";
33
+ import "react-papaparse";
34
+ import "react-dom";
35
+ import "autosuggest-highlight/match";
36
+ import "autosuggest-highlight/parse";
37
+ import "clsx";
38
+ import "../../../../../components/composite/filter/FilterCreationDialog.js";
39
+ import "../../../../../components/composite/filter/HeaderFilterForm.js";
40
+ import "../../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
41
+ import "../../../../../components/composite/filter/expert/ExpertFilterForm.js";
42
+ import "../../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
43
+ import "../../../../../components/composite/filter/expert/expertFilterConstants.js";
44
+ import "react-querybuilder";
45
+ import "uuid";
46
+ import "../../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
47
+ import "../../../../../components/composite/filter/utils/filterFormUtils.js";
48
+ import { GridSection } from "../../../../../components/composite/grid/grid-section.js";
49
+ import "@react-querybuilder/material";
50
+ import "../../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
51
+ import "../../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
52
+ import "../../../../../components/composite/agGridTable/BottomTableButtons.js";
53
+ import "../../../../../components/composite/agGridTable/CustomAgGridTable.js";
54
+ import "ag-grid-community";
55
+ import "../../../../../components/composite/customAGGrid/customAggrid.js";
56
+ import "../../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
57
+ import "mathjs";
58
+ import "../../../../../components/composite/report/report-viewer/log-table/log-table.js";
59
+ import "react-window";
60
+ import "../../../../../components/composite/report/report-treeview/treeview-item.js";
61
+ import "../../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
62
+ function ToBeEstimatedForm({ toBeEstimated }) {
63
+ const intl = useIntl();
64
+ const ratioTapChangerStatusId = `${FieldConstants.TO_BE_ESTIMATED}.${FieldConstants.RATIO_TAP_CHANGER_STATUS}`;
65
+ const phaseTapChangerStatusId = `${FieldConstants.TO_BE_ESTIMATED}.${FieldConstants.PHASE_TAP_CHANGER_STATUS}`;
66
+ const previousRatioStatusField = useMemo(() => {
67
+ if (toBeEstimated?.ratioTapChangerStatus == null) {
68
+ return "";
69
+ }
70
+ return toBeEstimated.ratioTapChangerStatus ? intl.formatMessage({ id: "true" }) : intl.formatMessage({ id: "false" });
71
+ }, [intl, toBeEstimated?.ratioTapChangerStatus]);
72
+ const previousPhaseStatusField = useMemo(() => {
73
+ if (toBeEstimated?.phaseTapChangerStatus == null) {
74
+ return "";
75
+ }
76
+ return toBeEstimated.phaseTapChangerStatus ? intl.formatMessage({ id: "true" }) : intl.formatMessage({ id: "false" });
77
+ }, [intl, toBeEstimated?.phaseTapChangerStatus]);
78
+ const ratioTapChangerStatusField = /* @__PURE__ */ jsx(
79
+ CheckboxNullableInput,
80
+ {
81
+ name: ratioTapChangerStatusId,
82
+ label: "RatioTapChangerEstimateTapPosition",
83
+ previousValue: previousRatioStatusField
84
+ }
85
+ );
86
+ const phaseTapChangerStatusField = /* @__PURE__ */ jsx(
87
+ CheckboxNullableInput,
88
+ {
89
+ name: phaseTapChangerStatusId,
90
+ label: "PhaseTapChangerEstimateTapPosition",
91
+ previousValue: previousPhaseStatusField
92
+ }
93
+ );
94
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
95
+ /* @__PURE__ */ jsx(GridSection, { title: "EstimateTapPositionSection" }),
96
+ /* @__PURE__ */ jsxs(Stack, { spacing: 2, children: [
97
+ /* @__PURE__ */ jsx(Box, { sx: { width: "50%" }, children: ratioTapChangerStatusField }),
98
+ /* @__PURE__ */ jsx(Box, { sx: { width: "50%" }, children: phaseTapChangerStatusField })
99
+ ] })
100
+ ] });
101
+ }
102
+ export {
103
+ ToBeEstimatedForm
104
+ };
@@ -0,0 +1,9 @@
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 './toBeEstimated.type';
8
+ export * from './toBeEstimated.utils';
9
+ export * from './ToBeEstimatedForm';
@@ -0,0 +1,7 @@
1
+ import { getToBeEstimatedValidationSchemaObject, toBeEstimatedEmptyFormData } from "./toBeEstimated.utils.js";
2
+ import { ToBeEstimatedForm } from "./ToBeEstimatedForm.js";
3
+ export {
4
+ ToBeEstimatedForm,
5
+ getToBeEstimatedValidationSchemaObject,
6
+ toBeEstimatedEmptyFormData
7
+ };
@@ -0,0 +1,10 @@
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
+ export interface ToBeEstimatedInfo {
8
+ ratioTapChangerStatus?: boolean;
9
+ phaseTapChangerStatus?: boolean;
10
+ }
@@ -0,0 +1,12 @@
1
+ import { InferType } from 'yup';
2
+ import { DeepNullable } from '../../../../../utils';
3
+ export declare const getToBeEstimatedValidationSchemaObject: () => import('yup').ObjectSchema<{
4
+ ratioTapChangerStatus: boolean | null | undefined;
5
+ phaseTapChangerStatus: boolean | null | undefined;
6
+ }, import('yup').AnyObject, {
7
+ ratioTapChangerStatus: undefined;
8
+ phaseTapChangerStatus: undefined;
9
+ }, "">;
10
+ type ToBeEstimatedFormData = InferType<ReturnType<typeof getToBeEstimatedValidationSchemaObject>>;
11
+ export declare const toBeEstimatedEmptyFormData: DeepNullable<ToBeEstimatedFormData>;
12
+ export {};
@@ -0,0 +1,18 @@
1
+ import { object, boolean } from "yup";
2
+ import { FieldConstants } from "../../../../../utils/constants/fieldConstants.js";
3
+ import "../../../../../utils/conversionUtils.js";
4
+ import "../../../../../utils/types/equipmentType.js";
5
+ import "react/jsx-runtime";
6
+ import "@mui/icons-material";
7
+ const getToBeEstimatedValidationSchemaObject = () => object().shape({
8
+ [FieldConstants.RATIO_TAP_CHANGER_STATUS]: boolean().nullable(),
9
+ [FieldConstants.PHASE_TAP_CHANGER_STATUS]: boolean().nullable()
10
+ });
11
+ const toBeEstimatedEmptyFormData = {
12
+ [FieldConstants.RATIO_TAP_CHANGER_STATUS]: null,
13
+ [FieldConstants.PHASE_TAP_CHANGER_STATUS]: null
14
+ };
15
+ export {
16
+ getToBeEstimatedValidationSchemaObject,
17
+ toBeEstimatedEmptyFormData
18
+ };