@gridsuite/commons-ui 0.270.0 → 0.272.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 (186) hide show
  1. package/dist/components/composite/customAGGrid/custom-aggrid-types.d.ts +7 -0
  2. package/dist/components/composite/dnd-table/deletable-table-row.d.ts +2 -1
  3. package/dist/components/composite/dnd-table/deletable-table-row.js +3 -1
  4. package/dist/components/composite/dnd-table/dnd-table-row.d.ts +2 -1
  5. package/dist/components/composite/dnd-table/dnd-table-row.js +29 -4
  6. package/dist/components/composite/dnd-table/dnd-table.d.ts +1 -0
  7. package/dist/components/composite/dnd-table/dnd-table.js +13 -3
  8. package/dist/components/composite/dnd-table/dnd-table.type.d.ts +1 -0
  9. package/dist/components/composite/report/report-viewer/context/report-viewer-context.d.ts +4 -4
  10. package/dist/components/composite/report/report-viewer/log-table/log-table.js +8 -7
  11. package/dist/components/composite/report/report.type.d.ts +0 -4
  12. package/dist/components/ui/addButton/AddButton.js +9 -1
  13. package/dist/components/ui/dialogs/customMuiDialog/CustomMuiDialog.d.ts +10 -3
  14. package/dist/components/ui/dialogs/customMuiDialog/CustomMuiDialog.js +33 -28
  15. package/dist/components/ui/reactHookForm/DirectoryItemsInput.d.ts +2 -1
  16. package/dist/components/ui/reactHookForm/DirectoryItemsInput.js +3 -1
  17. package/dist/components/ui/reactHookForm/autocompleteInputs/AutocompleteInput.d.ts +2 -1
  18. package/dist/components/ui/reactHookForm/autocompleteInputs/AutocompleteInput.js +2 -0
  19. package/dist/components/ui/reactHookForm/booleans/BooleanInput.d.ts +2 -1
  20. package/dist/components/ui/reactHookForm/booleans/BooleanInput.js +3 -1
  21. package/dist/components/ui/reactHookForm/booleans/SwitchInput.d.ts +2 -1
  22. package/dist/components/ui/reactHookForm/booleans/SwitchInput.js +12 -2
  23. package/dist/components/ui/reactHookForm/chip-items-input.d.ts +2 -1
  24. package/dist/components/ui/reactHookForm/chip-items-input.js +2 -1
  25. package/dist/components/ui/reactHookForm/expandableInput/DeletableRow.d.ts +2 -1
  26. package/dist/components/ui/reactHookForm/expandableInput/DeletableRow.js +3 -1
  27. package/dist/components/ui/reactHookForm/expandableInput/ExpandableInput.d.ts +2 -0
  28. package/dist/components/ui/reactHookForm/expandableInput/ExpandableInput.js +13 -2
  29. package/dist/components/ui/reactHookForm/tableInputs/table-text-input.d.ts +2 -1
  30. package/dist/components/ui/reactHookForm/tableInputs/table-text-input.js +2 -1
  31. package/dist/features/common/index.d.ts +1 -0
  32. package/dist/features/common/types.d.ts +32 -0
  33. package/dist/features/index.d.ts +2 -0
  34. package/dist/features/index.js +110 -4
  35. package/dist/features/network-modifications/common/branch/branchCreation.types.d.ts +26 -0
  36. package/dist/features/network-modifications/common/branch/branchCreation.types.js +1 -0
  37. package/dist/features/network-modifications/common/branch/branchModification.types.d.ts +36 -0
  38. package/dist/features/network-modifications/common/branch/branchModification.types.js +1 -0
  39. package/dist/features/network-modifications/{line/characteristics/lineCharacteristicsPane.types.d.ts → common/branch/index.d.ts} +2 -8
  40. package/dist/features/network-modifications/common/branch/index.js +1 -0
  41. package/dist/features/network-modifications/common/connectivity/VoltageLevelConnectivityForm.js +4 -2
  42. package/dist/features/network-modifications/common/connectivity/connectivityForm.utils.d.ts +2 -0
  43. package/dist/features/network-modifications/common/currentLimits/limits.types.d.ts +1 -0
  44. package/dist/features/network-modifications/common/currentLimits/limitsPane.utils.d.ts +2 -2
  45. package/dist/features/network-modifications/common/index.d.ts +1 -0
  46. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/reactiveCapability.utils.js +1 -1
  47. package/dist/features/network-modifications/common/regulatingTerminal/regulatingTerminal.utils.d.ts +2 -2
  48. package/dist/features/network-modifications/common/regulatingTerminal/regulatingTerminal.utils.js +2 -2
  49. package/dist/features/network-modifications/index.d.ts +1 -0
  50. package/dist/features/network-modifications/index.js +87 -2
  51. package/dist/features/network-modifications/line/characteristics/index.d.ts +0 -1
  52. package/dist/features/network-modifications/line/characteristics/index.js +1 -2
  53. package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.d.ts +4 -19
  54. package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.js +0 -14
  55. package/dist/features/network-modifications/line/creation/lineCreation.types.d.ts +6 -26
  56. package/dist/features/network-modifications/line/index.js +1 -2
  57. package/dist/features/network-modifications/line/modification/lineModification.types.d.ts +3 -35
  58. package/dist/features/network-modifications/twoWindingsTransformer/characteristics/TwoWindingsTransformerCharacteristicsPane.d.ts +7 -0
  59. package/dist/features/network-modifications/twoWindingsTransformer/characteristics/TwoWindingsTransformerCharacteristicsPane.js +168 -0
  60. package/dist/features/network-modifications/twoWindingsTransformer/characteristics/index.d.ts +8 -0
  61. package/dist/features/network-modifications/twoWindingsTransformer/characteristics/index.js +8 -0
  62. package/dist/features/network-modifications/twoWindingsTransformer/characteristics/twoWindingsTransformerCharacteristicsPane.utils.d.ts +41 -0
  63. package/dist/features/network-modifications/twoWindingsTransformer/characteristics/twoWindingsTransformerCharacteristicsPane.utils.js +51 -0
  64. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogHeader.d.ts +6 -0
  65. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogHeader.js +123 -0
  66. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabs.d.ts +9 -0
  67. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabs.js +89 -0
  68. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabsContent.d.ts +14 -0
  69. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabsContent.js +118 -0
  70. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerForm.d.ts +6 -0
  71. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerForm.js +47 -0
  72. package/dist/features/network-modifications/twoWindingsTransformer/common/index.d.ts +12 -0
  73. package/dist/features/network-modifications/twoWindingsTransformer/common/index.js +13 -0
  74. package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.types.d.ts +87 -0
  75. package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.types.js +1 -0
  76. package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.utils.d.ts +10 -0
  77. package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.utils.js +50 -0
  78. package/dist/features/network-modifications/twoWindingsTransformer/creation/index.d.ts +8 -0
  79. package/dist/features/network-modifications/twoWindingsTransformer/creation/index.js +12 -0
  80. package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.types.d.ts +47 -0
  81. package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.types.js +8 -0
  82. package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.utils.d.ts +248 -0
  83. package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.utils.js +325 -0
  84. package/dist/features/network-modifications/twoWindingsTransformer/index.d.ts +11 -0
  85. package/dist/features/network-modifications/twoWindingsTransformer/index.js +88 -0
  86. package/dist/features/network-modifications/twoWindingsTransformer/modification/index.d.ts +9 -0
  87. package/dist/features/network-modifications/twoWindingsTransformer/modification/index.js +10 -0
  88. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/ToBeEstimatedForm.d.ts +6 -0
  89. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/ToBeEstimatedForm.js +104 -0
  90. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/index.d.ts +9 -0
  91. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/index.js +7 -0
  92. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.type.d.ts +10 -0
  93. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.type.js +1 -0
  94. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.utils.d.ts +12 -0
  95. package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.utils.js +18 -0
  96. package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.types.d.ts +39 -0
  97. package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.types.js +1 -0
  98. package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.utils.d.ts +265 -0
  99. package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.utils.js +100 -0
  100. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/RegulatedTerminalSection.d.ts +13 -0
  101. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/RegulatedTerminalSection.js +130 -0
  102. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/TapChangerSteps.d.ts +20 -0
  103. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/TapChangerSteps.js +311 -0
  104. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/index.d.ts +12 -0
  105. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/index.js +53 -0
  106. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPane.d.ts +2 -0
  107. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPane.js +198 -0
  108. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPaneSteps.d.ts +9 -0
  109. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPaneSteps.js +201 -0
  110. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/index.d.ts +9 -0
  111. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/index.js +15 -0
  112. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/phaseTapChanger.utils.d.ts +114 -0
  113. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/phaseTapChanger.utils.js +242 -0
  114. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPane.d.ts +2 -0
  115. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPane.js +283 -0
  116. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPaneSteps.d.ts +9 -0
  117. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPaneSteps.js +181 -0
  118. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/index.d.ts +9 -0
  119. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/index.js +18 -0
  120. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/ratioTapChanger.utils.d.ts +132 -0
  121. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/ratioTapChanger.utils.js +211 -0
  122. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialog.d.ts +2 -0
  123. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialog.js +102 -0
  124. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialogSubmitButton.d.ts +7 -0
  125. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialogSubmitButton.js +22 -0
  126. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleForm.d.ts +6 -0
  127. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleForm.js +86 -0
  128. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/ImportRuleDialog.d.ts +10 -0
  129. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/ImportRuleDialog.js +140 -0
  130. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/index.d.ts +12 -0
  131. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/index.js +13 -0
  132. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.types.d.ts +12 -0
  133. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.types.js +1 -0
  134. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.utils.d.ts +9 -0
  135. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.utils.js +19 -0
  136. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/tapChanger.utils.d.ts +14 -0
  137. package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/tapChanger.utils.js +79 -0
  138. package/dist/features/results/common/index.d.ts +7 -0
  139. package/dist/features/results/common/index.js +5 -0
  140. package/dist/features/results/common/utils.d.ts +5 -0
  141. package/dist/features/results/common/utils.js +18 -0
  142. package/dist/features/results/securityanalysis/index.js +1 -2
  143. package/dist/features/results/securityanalysis/security-analysis-result-nmk.js +3 -2
  144. package/dist/features/results/securityanalysis/utils.d.ts +0 -1
  145. package/dist/features/results/securityanalysis/utils.js +0 -2
  146. package/dist/features/results/shortcircuit/index.d.ts +11 -0
  147. package/dist/features/results/shortcircuit/index.js +21 -0
  148. package/dist/features/results/shortcircuit/shortcircuit-analysis-all-buses-result.d.ts +4 -0
  149. package/dist/features/results/shortcircuit/shortcircuit-analysis-all-buses-result.js +25 -0
  150. package/dist/features/results/shortcircuit/shortcircuit-analysis-result-content.d.ts +13 -0
  151. package/dist/features/results/shortcircuit/shortcircuit-analysis-result-content.js +62 -0
  152. package/dist/features/results/shortcircuit/shortcircuit-analysis-result-table.d.ts +41 -0
  153. package/dist/features/results/shortcircuit/shortcircuit-analysis-result-table.js +451 -0
  154. package/dist/features/results/shortcircuit/shortcircuit-analysis-result.d.ts +53 -0
  155. package/dist/features/results/shortcircuit/shortcircuit-analysis-result.js +252 -0
  156. package/dist/features/results/shortcircuit/shortcircuit-analysis-result.type.d.ts +41 -0
  157. package/dist/features/results/shortcircuit/shortcircuit-analysis-result.type.js +8 -0
  158. package/dist/index.js +121 -8
  159. package/dist/translations/en/filterExpertEn.d.ts +0 -3
  160. package/dist/translations/en/filterExpertEn.js +0 -3
  161. package/dist/translations/en/network-modification-validationEn.d.ts +1 -0
  162. package/dist/translations/en/network-modification-validationEn.js +2 -1
  163. package/dist/translations/en/networkModificationsEn.d.ts +70 -9
  164. package/dist/translations/en/networkModificationsEn.js +71 -10
  165. package/dist/translations/fr/filterExpertFr.d.ts +0 -3
  166. package/dist/translations/fr/filterExpertFr.js +0 -3
  167. package/dist/translations/fr/network-modification-validationFr.d.ts +1 -0
  168. package/dist/translations/fr/network-modification-validationFr.js +2 -1
  169. package/dist/translations/fr/networkModificationsFr.d.ts +70 -9
  170. package/dist/translations/fr/networkModificationsFr.js +71 -10
  171. package/dist/utils/constants/fieldConstants.d.ts +37 -0
  172. package/dist/utils/constants/fieldConstants.js +37 -0
  173. package/dist/utils/constants/index.js +2 -1
  174. package/dist/utils/constants/translationKeys.d.ts +1 -0
  175. package/dist/utils/constants/translationKeys.js +2 -0
  176. package/dist/utils/functions.d.ts +9 -0
  177. package/dist/utils/functions.js +40 -0
  178. package/dist/utils/index.js +11 -4
  179. package/dist/utils/langs.d.ts +1 -0
  180. package/dist/utils/langs.js +9 -1
  181. package/dist/utils/types/equipmentType.d.ts +34 -0
  182. package/dist/utils/types/equipmentType.js +28 -0
  183. package/dist/utils/types/index.d.ts +1 -1
  184. package/dist/utils/types/index.js +4 -1
  185. package/package.json +1 -1
  186. /package/dist/features/{network-modifications/line/characteristics/lineCharacteristicsPane.types.js → common/types.js} +0 -0
@@ -0,0 +1,100 @@
1
+ import { object, string } 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
+ import { getBranchConnectivityWithPositionSchema, getBranchConnectivityWithPositionEmptyFormDataProps } from "../../common/connectivity/connectivityForm.utils.js";
8
+ import "@mui/material";
9
+ import "react";
10
+ import "react-intl";
11
+ import "../../../../components/ui/overflowableText/OverflowableText.js";
12
+ import "react-hook-form";
13
+ import "localized-countries";
14
+ import "localized-countries/data/fr";
15
+ import "localized-countries/data/en";
16
+ import "notistack";
17
+ import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
18
+ import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
19
+ import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
20
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
21
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
22
+ import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
23
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
24
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
25
+ import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
26
+ import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.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 { modificationPropertiesSchema } from "../../common/properties/propertyUtils.js";
35
+ import { getLimitsValidationSchemaProps, getLimitsEmptyFormDataProps } from "../../common/currentLimits/limitsPane.utils.js";
36
+ import { getTwtCharacteristicsValidationSchemaProps, getTwtCharacteristicsEmptyFormData } from "../characteristics/twoWindingsTransformerCharacteristicsPane.utils.js";
37
+ import "react-dom";
38
+ import "autosuggest-highlight/match";
39
+ import "autosuggest-highlight/parse";
40
+ import "clsx";
41
+ import "../../../../components/composite/filter/FilterCreationDialog.js";
42
+ import "../../../../components/composite/filter/HeaderFilterForm.js";
43
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
44
+ import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
45
+ import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
46
+ import "../../../../components/composite/filter/expert/expertFilterConstants.js";
47
+ import "react-querybuilder";
48
+ import "uuid";
49
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
50
+ import "../../../../components/composite/filter/utils/filterFormUtils.js";
51
+ import "@react-querybuilder/material";
52
+ import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
53
+ import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
54
+ import "../../../../components/composite/agGridTable/BottomTableButtons.js";
55
+ import "../../../../components/composite/agGridTable/CustomAgGridTable.js";
56
+ import "ag-grid-community";
57
+ import "../../../../components/composite/customAGGrid/customAggrid.js";
58
+ import "../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
59
+ import "mathjs";
60
+ import "../../../../components/composite/report/report-viewer/log-table/log-table.js";
61
+ import "react-window";
62
+ import "../../../../components/composite/report/report-treeview/treeview-item.js";
63
+ import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
64
+ import { getBranchActiveReactivePowerValidationSchemaObject, getBranchActiveReactivePowerEmptyFormDataProperties } from "../../common/measurements/branchActiveReactivePowerForm.utils.js";
65
+ import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
66
+ import "@mui/material/colors";
67
+ import "@mui/x-charts";
68
+ import "../tapChanger/tapChanger.utils.js";
69
+ import "../tapChanger/regulationRule/CreateRuleForm.js";
70
+ import "../tapChanger/regulationRule/CreateRuleDialog.js";
71
+ import { getPhaseTapChangerValidationSchemaProps, getPhaseTapChangerEmptyFormData } from "../tapChanger/phaseTapChanger/phaseTapChanger.utils.js";
72
+ import { getRatioTapChangerValidationSchemaProps, getRatioTapChangerEmptyFormData } from "../tapChanger/ratioTapChanger/ratioTapChanger.utils.js";
73
+ import { getToBeEstimatedValidationSchemaObject, toBeEstimatedEmptyFormData } from "./measurements/toBeEstimated.utils.js";
74
+ const twoWindingsTransformerModificationFormSchema = object().shape({
75
+ [FieldConstants.EQUIPMENT_ID]: string().required(),
76
+ [FieldConstants.EQUIPMENT_NAME]: string().nullable(),
77
+ [FieldConstants.CONNECTIVITY]: getBranchConnectivityWithPositionSchema(true, true),
78
+ [FieldConstants.CHARACTERISTICS]: getTwtCharacteristicsValidationSchemaProps(true),
79
+ [FieldConstants.STATE_ESTIMATION]: getBranchActiveReactivePowerValidationSchemaObject(),
80
+ [FieldConstants.TO_BE_ESTIMATED]: getToBeEstimatedValidationSchemaObject(),
81
+ [FieldConstants.LIMITS]: getLimitsValidationSchemaProps(true),
82
+ [FieldConstants.RATIO_TAP_CHANGER]: getRatioTapChangerValidationSchemaProps(true),
83
+ [FieldConstants.PHASE_TAP_CHANGER]: getPhaseTapChangerValidationSchemaProps(true)
84
+ }).concat(modificationPropertiesSchema).required();
85
+ const twoWindingsTransformerModificationEmptyFormData = {
86
+ [FieldConstants.EQUIPMENT_ID]: "",
87
+ [FieldConstants.EQUIPMENT_NAME]: "",
88
+ [FieldConstants.CONNECTIVITY]: getBranchConnectivityWithPositionEmptyFormDataProps(true),
89
+ [FieldConstants.CHARACTERISTICS]: getTwtCharacteristicsEmptyFormData(),
90
+ [FieldConstants.STATE_ESTIMATION]: getBranchActiveReactivePowerEmptyFormDataProperties(),
91
+ [FieldConstants.TO_BE_ESTIMATED]: toBeEstimatedEmptyFormData,
92
+ [FieldConstants.LIMITS]: getLimitsEmptyFormDataProps(true),
93
+ [FieldConstants.RATIO_TAP_CHANGER]: getRatioTapChangerEmptyFormData(true),
94
+ [FieldConstants.PHASE_TAP_CHANGER]: getPhaseTapChangerEmptyFormData(true),
95
+ AdditionalProperties: []
96
+ };
97
+ export {
98
+ twoWindingsTransformerModificationEmptyFormData,
99
+ twoWindingsTransformerModificationFormSchema
100
+ };
@@ -0,0 +1,13 @@
1
+ import { REGULATION_TYPES } from '../../common';
2
+ import { EquipmentType, Identifiable } from '../../../../utils';
3
+ export interface RegulatedTerminalSectionProps {
4
+ id: string;
5
+ voltageLevelOptions: Identifiable[];
6
+ previousValues: any;
7
+ tapChangerDisabled: boolean;
8
+ regulationType?: (typeof REGULATION_TYPES)[keyof typeof REGULATION_TYPES]['id'];
9
+ fetchVoltageLevelEquipments: (voltageLevelId: string) => Promise<(Identifiable & {
10
+ type: EquipmentType;
11
+ })[]>;
12
+ }
13
+ export declare function RegulatedTerminalSection({ id, voltageLevelOptions, previousValues, tapChangerDisabled, regulationType, fetchVoltageLevelEquipments, }: Readonly<RegulatedTerminalSectionProps>): import("react").JSX.Element;
@@ -0,0 +1,130 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { useIntl } from "react-intl";
3
+ import { Grid } from "@mui/material";
4
+ import { getRegulationTypeLabel, getTapSideLabel, getTapChangerEquipmentSectionTypeValue } from "./tapChanger.utils.js";
5
+ import "react";
6
+ import "react-hook-form";
7
+ import "../../common/properties/propertyUtils.js";
8
+ import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
9
+ import "../../../../utils/conversionUtils.js";
10
+ import { REGULATION_SIDES, EquipmentType } from "../../../../utils/types/equipmentType.js";
11
+ import "@mui/icons-material";
12
+ import "../../../../components/ui/overflowableText/OverflowableText.js";
13
+ import "localized-countries";
14
+ import "localized-countries/data/fr";
15
+ import "localized-countries/data/en";
16
+ import "notistack";
17
+ import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
18
+ import "yup";
19
+ import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
20
+ import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
21
+ import { SelectInput } from "../../../../components/ui/reactHookForm/selectInputs/SelectInput.js";
22
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
23
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
24
+ import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
25
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
26
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
27
+ import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
28
+ import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
29
+ import "../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
30
+ import "@hello-pangea/dnd";
31
+ import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
32
+ import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
33
+ import "mui-nested-menu";
34
+ import "react-resizable-panels";
35
+ import "react-papaparse";
36
+ import { GridSection } from "../../../../components/composite/grid/grid-section.js";
37
+ import "react-dom";
38
+ import "autosuggest-highlight/match";
39
+ import "autosuggest-highlight/parse";
40
+ import "clsx";
41
+ import "../../../../components/composite/filter/FilterCreationDialog.js";
42
+ import "../../../../components/composite/filter/HeaderFilterForm.js";
43
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
44
+ import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
45
+ import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
46
+ import "../../../../components/composite/filter/expert/expertFilterConstants.js";
47
+ import "react-querybuilder";
48
+ import "uuid";
49
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
50
+ import "../../../../components/composite/filter/utils/filterFormUtils.js";
51
+ import { GridItem } from "../../../../components/composite/grid/grid-item.js";
52
+ import "@react-querybuilder/material";
53
+ import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
54
+ import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
55
+ import "../../../../components/composite/agGridTable/BottomTableButtons.js";
56
+ import "../../../../components/composite/agGridTable/CustomAgGridTable.js";
57
+ import "ag-grid-community";
58
+ import "../../../../components/composite/customAGGrid/customAggrid.js";
59
+ import "../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
60
+ import "mathjs";
61
+ import "../../../../components/composite/report/report-viewer/log-table/log-table.js";
62
+ import "react-window";
63
+ import "../../../../components/composite/report/report-treeview/treeview-item.js";
64
+ import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
65
+ import { RegulatingTerminalForm } from "../../common/regulatingTerminal/RegulatingTerminalForm.js";
66
+ import { REGULATION_TYPES } from "../../common/voltageRegulation/voltageRegulation.utils.js";
67
+ import "@mui/material/colors";
68
+ import "@mui/x-charts";
69
+ import "../../common/currentLimits/limitsPane.utils.js";
70
+ function RegulatedTerminalSection({
71
+ id,
72
+ voltageLevelOptions,
73
+ previousValues,
74
+ tapChangerDisabled,
75
+ regulationType,
76
+ fetchVoltageLevelEquipments
77
+ }) {
78
+ const intl = useIntl();
79
+ let tapChangerPreviousValues;
80
+ if (id === FieldConstants.RATIO_TAP_CHANGER) {
81
+ tapChangerPreviousValues = previousValues?.ratioTapChanger;
82
+ } else if (id === FieldConstants.PHASE_TAP_CHANGER) {
83
+ tapChangerPreviousValues = previousValues?.phaseTapChanger;
84
+ }
85
+ const regulationTypeField = /* @__PURE__ */ jsx(
86
+ SelectInput,
87
+ {
88
+ name: `${id}.${FieldConstants.REGULATION_TYPE}`,
89
+ label: "RegulationTypeText",
90
+ options: Object.values(REGULATION_TYPES),
91
+ disabled: tapChangerDisabled,
92
+ size: "small",
93
+ previousValue: getRegulationTypeLabel(previousValues, tapChangerPreviousValues, intl) ?? void 0
94
+ }
95
+ );
96
+ const sideField = /* @__PURE__ */ jsx(
97
+ SelectInput,
98
+ {
99
+ name: `${id}.${FieldConstants.REGULATION_SIDE}`,
100
+ label: "RegulatedSide",
101
+ options: Object.values(REGULATION_SIDES),
102
+ disabled: tapChangerDisabled,
103
+ size: "small",
104
+ previousValue: getTapSideLabel(previousValues, tapChangerPreviousValues, intl) ?? void 0
105
+ }
106
+ );
107
+ const regulatingTerminalField = /* @__PURE__ */ jsx(
108
+ RegulatingTerminalForm,
109
+ {
110
+ id,
111
+ disabled: tapChangerDisabled,
112
+ equipmentSectionTypeDefaultValue: EquipmentType.TWO_WINDINGS_TRANSFORMER,
113
+ fetchVoltageLevelEquipments,
114
+ voltageLevelOptions,
115
+ regulatingTerminalVlId: tapChangerPreviousValues?.regulatingTerminalVlId,
116
+ equipmentSectionType: getTapChangerEquipmentSectionTypeValue(tapChangerPreviousValues) ?? void 0
117
+ }
118
+ );
119
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
120
+ /* @__PURE__ */ jsx(GridSection, { title: "RegulatedTerminal", heading: 4 }),
121
+ /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 1, children: [
122
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: regulationTypeField }),
123
+ regulationType === REGULATION_TYPES.LOCAL.id && /* @__PURE__ */ jsx(GridItem, { size: 4, children: sideField }),
124
+ regulationType === REGULATION_TYPES.DISTANT.id && /* @__PURE__ */ jsx(GridItem, { size: 8, children: regulatingTerminalField })
125
+ ] })
126
+ ] });
127
+ }
128
+ export {
129
+ RegulatedTerminalSection
130
+ };
@@ -0,0 +1,20 @@
1
+ import { TapChangerMapInfos } from '../common/twoWindingsTransformer.types';
2
+ import { DndColumn } from '../../../../components';
3
+ import { FieldConstants } from '../../../../utils';
4
+ import { TapChangerStepCreationDto } from '../creation/twoWindingsTransformerCreation.types';
5
+ export interface TapChangerStepsProps {
6
+ tapChanger: FieldConstants.PHASE_TAP_CHANGER | FieldConstants.RATIO_TAP_CHANGER;
7
+ createTapRuleColumn: string;
8
+ columnsDefinition: DndColumn[];
9
+ csvColumns: string[];
10
+ createRuleMessageId: string;
11
+ createRuleAllowNegativeValues: boolean;
12
+ importRuleMessageId: string;
13
+ resetButtonMessageId: string;
14
+ handleImportRow: (val: Record<string, string>) => Record<string, string | number>;
15
+ disabled?: boolean;
16
+ previousValues?: TapChangerMapInfos;
17
+ editData?: TapChangerStepCreationDto[] | null;
18
+ isModification?: boolean;
19
+ }
20
+ export declare function TapChangerSteps({ tapChanger, createTapRuleColumn, columnsDefinition, csvColumns, createRuleMessageId, createRuleAllowNegativeValues, importRuleMessageId, resetButtonMessageId, handleImportRow, disabled, previousValues, editData, isModification, }: Readonly<TapChangerStepsProps>): import("react").JSX.Element;
@@ -0,0 +1,311 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useState, useMemo, useCallback, useEffect } from "react";
3
+ import { useFormContext, useFieldArray, useWatch } from "react-hook-form";
4
+ import { Tooltip, IconButton, Grid } from "@mui/material";
5
+ import { Addchart } from "@mui/icons-material";
6
+ import { useIntl } from "react-intl";
7
+ import { CreateRuleDialog } from "./regulationRule/CreateRuleDialog.js";
8
+ import { ImportRuleDialog } from "./regulationRule/ImportRuleDialog.js";
9
+ import "../../../../components/ui/overflowableText/OverflowableText.js";
10
+ import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
11
+ import "../../../../utils/conversionUtils.js";
12
+ import "../../../../utils/types/equipmentType.js";
13
+ import "localized-countries";
14
+ import "localized-countries/data/fr";
15
+ import "localized-countries/data/en";
16
+ import "notistack";
17
+ import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
18
+ import { useCustomFormContext } from "../../../../components/ui/reactHookForm/provider/useCustomFormContext.js";
19
+ import "yup";
20
+ import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
21
+ import { IntegerInput } from "../../../../components/ui/reactHookForm/numbers/IntegerInput.js";
22
+ import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
23
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
24
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
25
+ import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
26
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
27
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
28
+ import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
29
+ import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
30
+ import "../../../../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 { DndTable } from "../../../../components/composite/dnd-table/dnd-table.js";
38
+ import "autosuggest-highlight/match";
39
+ import "autosuggest-highlight/parse";
40
+ import "clsx";
41
+ import "../../../../components/composite/filter/FilterCreationDialog.js";
42
+ import "../../../../components/composite/filter/HeaderFilterForm.js";
43
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
44
+ import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
45
+ import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
46
+ import "../../../../components/composite/filter/expert/expertFilterConstants.js";
47
+ import "react-querybuilder";
48
+ import "uuid";
49
+ import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
50
+ import "../../../../components/composite/filter/utils/filterFormUtils.js";
51
+ import "@react-querybuilder/material";
52
+ import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
53
+ import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
54
+ import "../../../../components/composite/agGridTable/BottomTableButtons.js";
55
+ import "../../../../components/composite/agGridTable/CustomAgGridTable.js";
56
+ import "ag-grid-community";
57
+ import "../../../../components/composite/customAGGrid/customAggrid.js";
58
+ import "../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
59
+ import "mathjs";
60
+ import { roundToDefaultPrecision } from "../../../../utils/rounding.js";
61
+ import "../../../../components/composite/report/report-viewer/log-table/log-table.js";
62
+ import "react-window";
63
+ import "../../../../components/composite/report/report-treeview/treeview-item.js";
64
+ import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
65
+ import { compareStepsWithPreviousValues, toTapChangerStepList, computeHighTapPosition } from "./tapChanger.utils.js";
66
+ function TapChangerSteps({
67
+ tapChanger,
68
+ createTapRuleColumn,
69
+ columnsDefinition,
70
+ csvColumns,
71
+ createRuleMessageId,
72
+ createRuleAllowNegativeValues,
73
+ importRuleMessageId,
74
+ resetButtonMessageId,
75
+ handleImportRow,
76
+ disabled,
77
+ previousValues,
78
+ editData,
79
+ isModification = false
80
+ }) {
81
+ const intl = useIntl();
82
+ const { trigger, getValues, setValue, clearErrors } = useFormContext();
83
+ const { isNodeBuilt } = useCustomFormContext();
84
+ const useFieldArrayOutput = useFieldArray({
85
+ name: `${tapChanger}.${FieldConstants.STEPS}`
86
+ });
87
+ const {
88
+ fields: tapSteps,
89
+ // don't use it to access form data ! check doc
90
+ replace
91
+ } = useFieldArrayOutput;
92
+ const lowTapPosition = useWatch({
93
+ name: `${tapChanger}.${FieldConstants.LOW_TAP_POSITION}`
94
+ });
95
+ const [openCreateRuleDialog, setOpenCreateRuleDialog] = useState(false);
96
+ const [openImportRuleDialog, setOpenImportRuleDialog] = useState(false);
97
+ const disableAddingRows = useMemo(() => {
98
+ return isModification && lowTapPosition === null && previousValues?.[FieldConstants.LOW_TAP_POSITION] === void 0;
99
+ }, [isModification, lowTapPosition, previousValues]);
100
+ const allowedToAddTapRows = useCallback(() => {
101
+ return trigger(`${tapChanger}.${FieldConstants.LOW_TAP_POSITION}`);
102
+ }, [trigger, tapChanger]);
103
+ const createTapRows = useCallback(
104
+ (numberOfRows) => {
105
+ const currentLowTapPosition = getValues(`${tapChanger}.${FieldConstants.LOW_TAP_POSITION}`);
106
+ const currentTapRows = getValues(`${tapChanger}.${FieldConstants.STEPS}`);
107
+ let nextHighestTap;
108
+ if (currentTapRows.length === 0) {
109
+ nextHighestTap = currentLowTapPosition;
110
+ } else {
111
+ nextHighestTap = currentTapRows[currentTapRows.length - 1][FieldConstants.STEPS_TAP] + 1;
112
+ }
113
+ const tapRowsToAdd = [];
114
+ for (let i = 0; i < numberOfRows; i++) {
115
+ const newRow = columnsDefinition.slice(1).reduce(
116
+ (accumulator, currentValue) => ({
117
+ ...accumulator,
118
+ [currentValue.dataKey]: currentValue.initialValue
119
+ }),
120
+ { [FieldConstants.STEPS_TAP]: nextHighestTap }
121
+ );
122
+ tapRowsToAdd.push(newRow);
123
+ if (i !== numberOfRows - 1) {
124
+ nextHighestTap += 1;
125
+ }
126
+ }
127
+ setValue(`${tapChanger}.${FieldConstants.HIGH_TAP_POSITION}`, nextHighestTap);
128
+ return tapRowsToAdd;
129
+ },
130
+ [columnsDefinition, getValues, setValue, tapChanger]
131
+ );
132
+ const tapStepsWatcher = useWatch({
133
+ name: `${tapChanger}.${FieldConstants.STEPS}`
134
+ });
135
+ const areStepsModified = useMemo(() => {
136
+ if (editData && isNodeBuilt) {
137
+ return true;
138
+ }
139
+ return !compareStepsWithPreviousValues(
140
+ tapStepsWatcher,
141
+ toTapChangerStepList(previousValues?.[FieldConstants.STEPS])
142
+ );
143
+ }, [editData, isNodeBuilt, previousValues, tapStepsWatcher]);
144
+ const resetTapNumbers = useCallback(
145
+ (stepsOverride) => {
146
+ const currentTapRows = stepsOverride ?? getValues(`${tapChanger}.${FieldConstants.STEPS}`);
147
+ const currentLowTapPosition = isModification && lowTapPosition === null ? previousValues?.[FieldConstants.LOW_TAP_POSITION] : lowTapPosition;
148
+ if (currentLowTapPosition == null) {
149
+ return;
150
+ }
151
+ for (let tapPosition = currentLowTapPosition, index = 0; index < currentTapRows.length; tapPosition++, index++) {
152
+ setValue(`${tapChanger}.${FieldConstants.STEPS}[${index}].${FieldConstants.STEPS_TAP}`, tapPosition);
153
+ }
154
+ const newHighTapPosition = currentTapRows.length !== 0 ? (currentLowTapPosition ?? 0) + currentTapRows.length - 1 : null;
155
+ setValue(`${tapChanger}.${FieldConstants.HIGH_TAP_POSITION}`, newHighTapPosition);
156
+ },
157
+ [getValues, tapChanger, lowTapPosition, previousValues, setValue, isModification]
158
+ );
159
+ useEffect(() => {
160
+ trigger(`${tapChanger}.${FieldConstants.LOW_TAP_POSITION}`).then((result) => {
161
+ if (result) {
162
+ resetTapNumbers(null);
163
+ }
164
+ });
165
+ }, [trigger, tapChanger, lowTapPosition, resetTapNumbers]);
166
+ useEffect(() => {
167
+ resetTapNumbers(tapSteps);
168
+ }, [tapSteps, resetTapNumbers]);
169
+ const handleResetButton = useCallback(() => {
170
+ replace(previousValues?.[FieldConstants.STEPS] ?? []);
171
+ setValue(`${tapChanger}.${FieldConstants.LOW_TAP_POSITION}`, null);
172
+ clearErrors(`${tapChanger}.${FieldConstants.STEPS}`);
173
+ }, [clearErrors, previousValues, replace, setValue, tapChanger]);
174
+ const handleCreateTapRule = (lowTap, highTap) => {
175
+ const currentTapRows = getValues(`${tapChanger}.${FieldConstants.STEPS}`);
176
+ if (currentTapRows.length > 1) {
177
+ const interval = (highTap - lowTap) / (currentTapRows.length - 1);
178
+ let current = lowTap;
179
+ currentTapRows.forEach((_row, index) => {
180
+ currentTapRows[index][createTapRuleColumn] = roundToDefaultPrecision(current);
181
+ current += interval;
182
+ });
183
+ replace(currentTapRows);
184
+ }
185
+ };
186
+ const handleImportTapRuleButton = useCallback(() => {
187
+ trigger(`${tapChanger}.${FieldConstants.LOW_TAP_POSITION}`).then((result) => {
188
+ if (result) {
189
+ setOpenImportRuleDialog(true);
190
+ }
191
+ });
192
+ }, [trigger, tapChanger]);
193
+ const handleImportTapRule = (results) => {
194
+ const rows = results.data.map((val) => ({
195
+ ...handleImportRow(val),
196
+ [FieldConstants.SELECTED]: false
197
+ }));
198
+ if (rows.length > 0) {
199
+ replace(rows);
200
+ }
201
+ };
202
+ const lowTapPositionField = /* @__PURE__ */ jsx(
203
+ IntegerInput,
204
+ {
205
+ name: `${tapChanger}.${FieldConstants.LOW_TAP_POSITION}`,
206
+ label: "LowTapPosition",
207
+ formProps: {
208
+ disabled
209
+ },
210
+ previousValue: previousValues?.[FieldConstants.LOW_TAP_POSITION]
211
+ }
212
+ );
213
+ const highTapPositionField = /* @__PURE__ */ jsx(
214
+ IntegerInput,
215
+ {
216
+ name: `${tapChanger}.${FieldConstants.HIGH_TAP_POSITION}`,
217
+ label: "HighTapPosition",
218
+ formProps: {
219
+ disabled: true
220
+ },
221
+ previousValue: computeHighTapPosition(previousValues?.[FieldConstants.STEPS] ?? []) ?? void 0
222
+ }
223
+ );
224
+ const tapPositionField = /* @__PURE__ */ jsx(
225
+ IntegerInput,
226
+ {
227
+ name: `${tapChanger}.${FieldConstants.TAP_POSITION}`,
228
+ label: "TapPosition",
229
+ formProps: {
230
+ disabled
231
+ },
232
+ previousValue: previousValues?.[FieldConstants.TAP_POSITION]
233
+ }
234
+ );
235
+ const createRuleButton = /* @__PURE__ */ jsx(
236
+ Tooltip,
237
+ {
238
+ title: intl.formatMessage({
239
+ id: createRuleMessageId
240
+ }),
241
+ placement: "left",
242
+ children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(IconButton, { onClick: () => setOpenCreateRuleDialog(true), disabled: disabled || tapSteps.length === 0, children: /* @__PURE__ */ jsx(Addchart, {}) }) })
243
+ }
244
+ );
245
+ const completedColumnsDefinition = columnsDefinition.map(
246
+ (column, index) => index === columnsDefinition.length - 1 ? { ...column, extra: createRuleButton } : column
247
+ );
248
+ const getTapPreviousValue = useCallback(
249
+ (rowIndex, column, arrayFormName, previousTapSteps) => {
250
+ const step = previousTapSteps?.find(
251
+ (e) => e.index === getValues(arrayFormName)[rowIndex]?.index
252
+ );
253
+ if (step === void 0) {
254
+ return void 0;
255
+ }
256
+ return step?.[column.dataKey];
257
+ },
258
+ [getValues]
259
+ );
260
+ const isTapModified = useCallback(() => areStepsModified, [areStepsModified]);
261
+ return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 1, children: [
262
+ /* @__PURE__ */ jsx(Grid, { size: 4, children: lowTapPositionField }),
263
+ /* @__PURE__ */ jsx(Grid, { size: 4, children: highTapPositionField }),
264
+ /* @__PURE__ */ jsx(Grid, { size: 4, children: tapPositionField }),
265
+ /* @__PURE__ */ jsx(
266
+ DndTable,
267
+ {
268
+ name: `${tapChanger}.${FieldConstants.STEPS}`,
269
+ useFieldArrayOutput,
270
+ columnsDefinition: completedColumnsDefinition,
271
+ tableHeight: 400,
272
+ allowedToAddRows: allowedToAddTapRows,
273
+ createRows: createTapRows,
274
+ handleUploadButton: handleImportTapRuleButton,
275
+ uploadButtonMessageId: importRuleMessageId,
276
+ handleResetButton,
277
+ resetButtonMessageId,
278
+ previousValues: toTapChangerStepList(previousValues?.[FieldConstants.STEPS]),
279
+ getPreviousValue: getTapPreviousValue,
280
+ isValueModified: isTapModified,
281
+ withResetButton: isModification && areStepsModified,
282
+ disableAddingRows,
283
+ disabled,
284
+ disableDragAndDrop: true
285
+ }
286
+ ),
287
+ /* @__PURE__ */ jsx(
288
+ CreateRuleDialog,
289
+ {
290
+ tapChanger,
291
+ openCreateRuleDialog,
292
+ setOpenCreateRuleDialog,
293
+ handleCreateTapRule,
294
+ allowNegativeValues: createRuleAllowNegativeValues
295
+ }
296
+ ),
297
+ /* @__PURE__ */ jsx(
298
+ ImportRuleDialog,
299
+ {
300
+ tapChanger,
301
+ openImportRuleDialog,
302
+ setOpenImportRuleDialog,
303
+ csvColumns,
304
+ handleImportTapRule
305
+ }
306
+ )
307
+ ] });
308
+ }
309
+ export {
310
+ TapChangerSteps
311
+ };
@@ -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 './tapChanger.utils';
8
+ export * from './regulationRule';
9
+ export * from './phaseTapChanger';
10
+ export * from './ratioTapChanger';
11
+ export * from './RegulatedTerminalSection';
12
+ export * from './TapChangerSteps';
@@ -0,0 +1,53 @@
1
+ import { compareStepsWithPreviousValues, computeHighTapPosition, getRegulationTypeLabel, getTapChangerEquipmentSectionTypeValue, getTapSideLabel, toTapChangerStepList } from "./tapChanger.utils.js";
2
+ import { getCreateRuleEmptyFormData, getCreateRuleValidationSchema } from "./regulationRule/regulationRule.utils.js";
3
+ import { CreateRuleDialogSubmitButton } from "./regulationRule/CreateRuleDialogSubmitButton.js";
4
+ import { CreateRuleForm } from "./regulationRule/CreateRuleForm.js";
5
+ import { CreateRuleDialog } from "./regulationRule/CreateRuleDialog.js";
6
+ import { ImportRuleDialog } from "./regulationRule/ImportRuleDialog.js";
7
+ import { getComputedPhaseRegulationType, getComputedPhaseRegulationTypeId, getComputedPhaseTapChangerRegulationMode, getComputedPreviousPhaseRegulationType, getPhaseTapChangerEmptyFormData, getPhaseTapChangerFormData, getPhaseTapChangerValidationSchemaProps, getPhaseTapRegulationSideId } from "./phaseTapChanger/phaseTapChanger.utils.js";
8
+ import { PhaseTapChangerPaneSteps } from "./phaseTapChanger/PhaseTapChangerPaneSteps.js";
9
+ import { PhaseTapChangerPane } from "./phaseTapChanger/PhaseTapChangerPane.js";
10
+ import { getComputedPreviousRatioRegulationType, getComputedRegulationMode, getComputedRegulationModeId, getComputedRegulationType, getComputedRegulationTypeId, getComputedTapSide, getComputedTapSideId, getInitialTwtRatioRegulationModeId, getRatioTapChangerEmptyFormData, getRatioTapChangerFormData, getRatioTapChangerValidationSchemaProps } from "./ratioTapChanger/ratioTapChanger.utils.js";
11
+ import { RatioTapChangerPaneSteps } from "./ratioTapChanger/RatioTapChangerPaneSteps.js";
12
+ import { RatioTapChangerPane } from "./ratioTapChanger/RatioTapChangerPane.js";
13
+ import { RegulatedTerminalSection } from "./RegulatedTerminalSection.js";
14
+ import { TapChangerSteps } from "./TapChangerSteps.js";
15
+ export {
16
+ CreateRuleDialog,
17
+ CreateRuleDialogSubmitButton,
18
+ CreateRuleForm,
19
+ ImportRuleDialog,
20
+ PhaseTapChangerPane,
21
+ PhaseTapChangerPaneSteps,
22
+ RatioTapChangerPane,
23
+ RatioTapChangerPaneSteps,
24
+ RegulatedTerminalSection,
25
+ TapChangerSteps,
26
+ compareStepsWithPreviousValues,
27
+ computeHighTapPosition,
28
+ getComputedPhaseRegulationType,
29
+ getComputedPhaseRegulationTypeId,
30
+ getComputedPhaseTapChangerRegulationMode,
31
+ getComputedPreviousPhaseRegulationType,
32
+ getComputedPreviousRatioRegulationType,
33
+ getComputedRegulationMode,
34
+ getComputedRegulationModeId,
35
+ getComputedRegulationType,
36
+ getComputedRegulationTypeId,
37
+ getComputedTapSide,
38
+ getComputedTapSideId,
39
+ getCreateRuleEmptyFormData,
40
+ getCreateRuleValidationSchema,
41
+ getInitialTwtRatioRegulationModeId,
42
+ getPhaseTapChangerEmptyFormData,
43
+ getPhaseTapChangerFormData,
44
+ getPhaseTapChangerValidationSchemaProps,
45
+ getPhaseTapRegulationSideId,
46
+ getRatioTapChangerEmptyFormData,
47
+ getRatioTapChangerFormData,
48
+ getRatioTapChangerValidationSchemaProps,
49
+ getRegulationTypeLabel,
50
+ getTapChangerEquipmentSectionTypeValue,
51
+ getTapSideLabel,
52
+ toTapChangerStepList
53
+ };
@@ -0,0 +1,2 @@
1
+ import { TapChangerPaneProps } from '../../common/twoWindingsTransformer.types';
2
+ export declare function PhaseTapChangerPane({ id, voltageLevelOptions, previousValues, editData, fetchVoltageLevelEquipments, isModification, }: Readonly<TapChangerPaneProps>): import("react").JSX.Element;