@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,252 @@
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { useState, useCallback, useEffect } from "react";
3
+ import { useIntl } from "react-intl";
4
+ import { Box, LinearProgress } from "@mui/material";
5
+ import { RESULTS_LOADING_DELAY } from "../constants.js";
6
+ import { FROM_COLUMN_TO_FIELD_ONE_BUS, FROM_COLUMN_TO_FIELD, convertFilterValues } from "./shortcircuit-analysis-result-content.js";
7
+ import { ShortCircuitAnalysisType } from "./shortcircuit-analysis-result.type.js";
8
+ import { ShortCircuitAnalysisResultTable } from "./shortcircuit-analysis-result-table.js";
9
+ import "../../../utils/conversionUtils.js";
10
+ import { snackWithFallback } from "../../../utils/error.js";
11
+ import { RunningStatus } from "../../../utils/running-status.js";
12
+ import "../../../utils/types/equipmentType.js";
13
+ import { ComputingType } from "../../../utils/types/computing-type.js";
14
+ import "@mui/icons-material";
15
+ import "localized-countries";
16
+ import "localized-countries/data/fr";
17
+ import "localized-countries/data/en";
18
+ import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
19
+ import { useOpenLoaderShortWait } from "../../../hooks/useOpenLoaderShortWait.js";
20
+ import "../../../components/ui/overflowableText/OverflowableText.js";
21
+ import "react-hook-form";
22
+ import "../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
23
+ import "yup";
24
+ import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
25
+ import "../../../components/ui/reactHookForm/numbers/RangeInput.js";
26
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
27
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
28
+ import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
29
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
30
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
31
+ import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
32
+ import "../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
33
+ import "../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
34
+ import "@hello-pangea/dnd";
35
+ import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
36
+ import "../../../components/ui/snackbarProvider/SnackbarProvider.js";
37
+ import "mui-nested-menu";
38
+ import "react-resizable-panels";
39
+ import "react-papaparse";
40
+ import { CustomTablePagination } from "../../../components/ui/tablepagination/custom-table-pagination.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 { RESULT_PAGE_OPTIONS } from "../common/utils.js";
69
+ function ShortCircuitAnalysisResult({
70
+ analysisType,
71
+ analysisStatus,
72
+ result,
73
+ updateResult,
74
+ customTablePaginationProps,
75
+ onGridColumnsChanged,
76
+ onRowDataUpdated,
77
+ onDisplayedColumnsChanged,
78
+ studyUuid,
79
+ currentNodeUuid,
80
+ currentRootNetworkUuid,
81
+ sortConfig,
82
+ columnFilters,
83
+ globalFilters,
84
+ pagination,
85
+ onPageChange,
86
+ onRowsPerPageChange,
87
+ fetchPagedResults,
88
+ fetchFilterEnumValues,
89
+ mapFieldsToColumnsFilter,
90
+ onVoltageLevelClick,
91
+ onGridReady
92
+ }) {
93
+ const intl = useIntl();
94
+ const { snackError } = useSnackMessage();
95
+ const [count, setCount] = useState(0);
96
+ const [isFetching, setIsFetching] = useState(false);
97
+ const [filterEnums, setFilterEnums] = useState({});
98
+ const isOneBusShortCircuitAnalysisType = analysisType === ShortCircuitAnalysisType.ONE_BUS;
99
+ const fromFrontColumnToBackKeys = isOneBusShortCircuitAnalysisType ? FROM_COLUMN_TO_FIELD_ONE_BUS : FROM_COLUMN_TO_FIELD;
100
+ const { page, rowsPerPage } = pagination;
101
+ const handleChangePage = useCallback(
102
+ (_, newPage) => {
103
+ onPageChange(newPage);
104
+ },
105
+ [onPageChange]
106
+ );
107
+ const handleChangeRowsPerPage = useCallback(
108
+ (event) => {
109
+ const newRowsPerPage = Number.parseInt(event.target.value, 10);
110
+ onRowsPerPageChange(newRowsPerPage);
111
+ },
112
+ [onRowsPerPageChange]
113
+ );
114
+ useEffect(() => {
115
+ if (analysisStatus !== RunningStatus.SUCCEED) {
116
+ return;
117
+ }
118
+ if (!currentNodeUuid || !currentRootNetworkUuid) {
119
+ return;
120
+ }
121
+ let active = true;
122
+ setIsFetching(true);
123
+ updateResult(null);
124
+ const backSortConfig = sortConfig?.map((sort) => ({
125
+ ...sort,
126
+ colId: fromFrontColumnToBackKeys[sort.colId]
127
+ }));
128
+ const updatedFilters = columnFilters ? convertFilterValues(columnFilters) : null;
129
+ const selector = {
130
+ page,
131
+ size: rowsPerPage,
132
+ filter: updatedFilters && mapFieldsToColumnsFilter ? mapFieldsToColumnsFilter(updatedFilters, fromFrontColumnToBackKeys) : updatedFilters,
133
+ sort: backSortConfig
134
+ };
135
+ fetchPagedResults({
136
+ studyUuid,
137
+ currentNodeUuid,
138
+ currentRootNetworkUuid,
139
+ type: analysisType,
140
+ selector,
141
+ globalFilters
142
+ }).then((pagedResult) => {
143
+ if (active) {
144
+ const { content = [], totalElements = 0 } = pagedResult || {};
145
+ updateResult(content);
146
+ setCount(totalElements);
147
+ }
148
+ }).catch((error) => snackWithFallback(snackError, error, { headerId: "ShortCircuitAnalysisResultsError" })).finally(() => {
149
+ if (active) {
150
+ setIsFetching(false);
151
+ }
152
+ });
153
+ return () => {
154
+ active = false;
155
+ };
156
+ }, [
157
+ page,
158
+ rowsPerPage,
159
+ snackError,
160
+ analysisType,
161
+ analysisStatus,
162
+ updateResult,
163
+ studyUuid,
164
+ currentNodeUuid,
165
+ currentRootNetworkUuid,
166
+ intl,
167
+ columnFilters,
168
+ sortConfig,
169
+ fromFrontColumnToBackKeys,
170
+ globalFilters,
171
+ fetchPagedResults,
172
+ mapFieldsToColumnsFilter
173
+ ]);
174
+ useEffect(() => {
175
+ if (analysisStatus !== RunningStatus.SUCCEED || !studyUuid || !currentNodeUuid || !currentRootNetworkUuid) {
176
+ return;
177
+ }
178
+ const allBusesFilterTypes = ["fault-types", "limit-violation-types"];
179
+ const oneBusFilterTypes = ["branch-sides"];
180
+ const currentComputingType = isOneBusShortCircuitAnalysisType ? ComputingType.SHORT_CIRCUIT_ONE_BUS : ComputingType.SHORT_CIRCUIT;
181
+ const filterTypes = isOneBusShortCircuitAnalysisType ? oneBusFilterTypes : allBusesFilterTypes;
182
+ const promises = filterTypes.map(
183
+ (filterType) => fetchFilterEnumValues({
184
+ studyUuid,
185
+ currentNodeUuid,
186
+ currentRootNetworkUuid,
187
+ computingType: currentComputingType,
188
+ filterType
189
+ })
190
+ );
191
+ Promise.all(promises).then((results) => {
192
+ if (isOneBusShortCircuitAnalysisType) {
193
+ const [branchSidesResult] = results;
194
+ setFilterEnums({
195
+ side: branchSidesResult
196
+ });
197
+ } else {
198
+ const [faultTypesResult, limitViolationTypesResult] = results;
199
+ setFilterEnums({
200
+ limitType: limitViolationTypesResult,
201
+ faultType: faultTypesResult
202
+ });
203
+ }
204
+ }).catch((error) => snackWithFallback(snackError, error, { headerId: "ShortCircuitAnalysisResultsError" }));
205
+ }, [
206
+ analysisStatus,
207
+ intl,
208
+ snackError,
209
+ isOneBusShortCircuitAnalysisType,
210
+ studyUuid,
211
+ currentNodeUuid,
212
+ currentRootNetworkUuid,
213
+ fetchFilterEnumValues
214
+ ]);
215
+ const openLoader = useOpenLoaderShortWait({
216
+ isLoading: analysisStatus === RunningStatus.RUNNING || isFetching,
217
+ delay: RESULTS_LOADING_DELAY
218
+ });
219
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
220
+ /* @__PURE__ */ jsx(Box, { sx: { height: "4px" }, children: openLoader && /* @__PURE__ */ jsx(LinearProgress, {}) }),
221
+ /* @__PURE__ */ jsx(
222
+ ShortCircuitAnalysisResultTable,
223
+ {
224
+ result,
225
+ analysisType,
226
+ isFetching,
227
+ filterEnums,
228
+ onDisplayedColumnsChanged,
229
+ onRowDataUpdated,
230
+ shortCircuitAnalysisStatus: analysisStatus,
231
+ columnFilters,
232
+ onGridReady: onGridReady ?? onGridColumnsChanged,
233
+ onVoltageLevelClick
234
+ }
235
+ ),
236
+ /* @__PURE__ */ jsx(
237
+ CustomTablePagination,
238
+ {
239
+ rowsPerPageOptions: RESULT_PAGE_OPTIONS,
240
+ count,
241
+ rowsPerPage,
242
+ page,
243
+ onPageChange: handleChangePage,
244
+ onRowsPerPageChange: handleChangeRowsPerPage,
245
+ ...customTablePaginationProps
246
+ }
247
+ )
248
+ ] });
249
+ }
250
+ export {
251
+ ShortCircuitAnalysisResult
252
+ };
@@ -0,0 +1,41 @@
1
+ import { Page } from '../../common';
2
+ export interface SCAFault {
3
+ id: string;
4
+ elementId: string;
5
+ voltageLevelId: string;
6
+ faultType: string;
7
+ }
8
+ export interface SCALimitViolation {
9
+ subjectId: string;
10
+ limitType: string;
11
+ limit: number;
12
+ limitName: string;
13
+ value: number;
14
+ }
15
+ export interface SCAFeederResult {
16
+ connectableId: string;
17
+ current: number;
18
+ positiveMagnitude: number;
19
+ side: string;
20
+ }
21
+ interface SCAShortCircuitLimits {
22
+ ipMin: number;
23
+ ipMax: number;
24
+ deltaCurrentIpMax: number | null;
25
+ deltaCurrentIpMin: number | null;
26
+ }
27
+ export interface SCAFaultResult {
28
+ fault: SCAFault;
29
+ current: number;
30
+ positiveMagnitude: number;
31
+ shortCircuitPower: number;
32
+ shortCircuitLimits: SCAShortCircuitLimits;
33
+ limitViolations?: SCALimitViolation[];
34
+ feederResults?: SCAFeederResult[];
35
+ }
36
+ export type SCAPagedResults = Page<SCAFaultResult> | Page<SCAFeederResult>;
37
+ export declare enum ShortCircuitAnalysisType {
38
+ ALL_BUSES = 0,
39
+ ONE_BUS = 1
40
+ }
41
+ export {};
@@ -0,0 +1,8 @@
1
+ var ShortCircuitAnalysisType = /* @__PURE__ */ ((ShortCircuitAnalysisType2) => {
2
+ ShortCircuitAnalysisType2[ShortCircuitAnalysisType2["ALL_BUSES"] = 0] = "ALL_BUSES";
3
+ ShortCircuitAnalysisType2[ShortCircuitAnalysisType2["ONE_BUS"] = 1] = "ONE_BUS";
4
+ return ShortCircuitAnalysisType2;
5
+ })(ShortCircuitAnalysisType || {});
6
+ export {
7
+ ShortCircuitAnalysisType
8
+ };