@gridsuite/commons-ui 0.280.0 → 0.282.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 (207) hide show
  1. package/dist/components/composite/customAGGrid/custom-aggrid-filters/hooks/use-custom-aggrid-comparator-filter.js +1 -0
  2. package/dist/components/composite/customAGGrid/hooks/use-custom-aggrid-sort.js +1 -0
  3. package/dist/components/composite/reactQueryBuilder/OperatorSelector.js +1 -0
  4. package/dist/components/composite/report/QuickSearch.js +1 -0
  5. package/dist/components/composite/report/report-viewer/log-table/log-table.js +1 -1
  6. package/dist/components/ui/dialogs/elementSaveDialog/ElementSaveDialog.d.ts +6 -1
  7. package/dist/components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js +29 -5
  8. package/dist/components/ui/directoryItemSelector/DirectoryItemSelector.js +1 -0
  9. package/dist/components/ui/reactHookForm/booleans/RadioInput.d.ts +1 -0
  10. package/dist/components/ui/reactHookForm/booleans/RadioInput.js +2 -1
  11. package/dist/features/index.js +92 -12
  12. package/dist/features/network-modification-table/network-modifications-table.js +1 -0
  13. package/dist/features/network-modification-table/renderers/reference-link-cell.js +1 -1
  14. package/dist/features/network-modification-table/renderers/root-network-chip-cell.js +1 -0
  15. package/dist/features/network-modification-table/renderers/switch-cell.js +1 -0
  16. package/dist/features/network-modification-table/row/drag-row-clone.js +1 -0
  17. package/dist/features/network-modification-table/use-modifications-drag-and-drop.js +1 -0
  18. package/dist/features/network-modifications/battery/modification/BatteryDialogTabs.d.ts +3 -3
  19. package/dist/features/network-modifications/battery/modification/BatteryDialogTabs.js +2 -2
  20. package/dist/features/network-modifications/battery/modification/BatteryModificationForm.d.ts +4 -1
  21. package/dist/features/network-modifications/battery/modification/BatteryModificationForm.js +7 -11
  22. package/dist/features/network-modifications/generator/modification/GeneratorDialogTabs.d.ts +3 -3
  23. package/dist/features/network-modifications/generator/modification/GeneratorDialogTabs.js +2 -2
  24. package/dist/features/network-modifications/generator/modification/GeneratorModificationForm.d.ts +4 -1
  25. package/dist/features/network-modifications/generator/modification/GeneratorModificationForm.js +4 -8
  26. package/dist/features/network-modifications/index.d.ts +1 -1
  27. package/dist/features/network-modifications/index.js +81 -6
  28. package/dist/features/network-modifications/line/common/LineDialogTabs.d.ts +3 -3
  29. package/dist/features/network-modifications/line/common/LineDialogTabs.js +2 -2
  30. package/dist/features/network-modifications/line/common/LineForm.d.ts +4 -1
  31. package/dist/features/network-modifications/line/common/LineForm.js +7 -11
  32. package/dist/features/network-modifications/line/common/line.utils.d.ts +1 -1
  33. package/dist/features/network-modifications/load/common/LoadDialogTabs.d.ts +3 -3
  34. package/dist/features/network-modifications/load/common/LoadDialogTabs.js +2 -2
  35. package/dist/features/network-modifications/load/common/LoadForm.d.ts +4 -1
  36. package/dist/features/network-modifications/load/common/LoadForm.js +7 -11
  37. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-tabs.d.ts +3 -2
  38. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-dialog-tabs.js +2 -2
  39. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation-form.d.ts +4 -1
  40. package/dist/features/network-modifications/static-var-compensator/creation/static-var-compensator-creation-form.js +8 -11
  41. package/dist/features/network-modifications/tabular/TabularForm.d.ts +22 -0
  42. package/dist/features/network-modifications/tabular/TabularForm.js +536 -0
  43. package/dist/features/network-modifications/tabular/index.d.ts +7 -0
  44. package/dist/features/network-modifications/tabular/index.js +65 -0
  45. package/dist/features/network-modifications/tabular/properties/DefineTabularPropertiesDialog.d.ts +12 -0
  46. package/dist/features/network-modifications/tabular/properties/DefineTabularPropertiesDialog.js +123 -0
  47. package/dist/features/network-modifications/tabular/properties/TabularPropertiesForm.d.ts +1 -0
  48. package/dist/features/network-modifications/tabular/properties/TabularPropertiesForm.js +87 -0
  49. package/dist/features/network-modifications/tabular/properties/TabularPropertyForm.d.ts +5 -0
  50. package/dist/features/network-modifications/tabular/properties/TabularPropertyForm.js +91 -0
  51. package/dist/features/network-modifications/tabular/properties/index.d.ts +4 -0
  52. package/dist/features/network-modifications/tabular/properties/index.js +13 -0
  53. package/dist/features/network-modifications/tabular/properties/tabularProperty.utils.d.ts +26 -0
  54. package/dist/features/network-modifications/tabular/properties/tabularProperty.utils.js +50 -0
  55. package/dist/features/network-modifications/tabular/tabular.constants.d.ts +59 -0
  56. package/dist/features/network-modifications/tabular/tabular.constants.js +75 -0
  57. package/dist/features/network-modifications/tabular/tabular.types.d.ts +41 -0
  58. package/dist/features/network-modifications/tabular/tabular.types.js +8 -0
  59. package/dist/features/network-modifications/tabular/tabular.utils.d.ts +68 -0
  60. package/dist/features/network-modifications/tabular/tabular.utils.js +301 -0
  61. package/dist/features/network-modifications/tabular/tabularCreation.utils.d.ts +25 -0
  62. package/dist/features/network-modifications/tabular/tabularCreation.utils.js +276 -0
  63. package/dist/features/network-modifications/tabular/tabularModification.utils.d.ts +43 -0
  64. package/dist/features/network-modifications/tabular/tabularModification.utils.js +406 -0
  65. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabs.d.ts +3 -3
  66. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabs.js +2 -2
  67. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerForm.d.ts +4 -1
  68. package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerForm.js +7 -11
  69. package/dist/features/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.d.ts +4 -7
  70. package/dist/features/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +16 -19
  71. package/dist/features/network-modifications/voltageLevel/creation/index.d.ts +1 -1
  72. package/dist/features/network-modifications/voltageLevel/creation/index.js +3 -1
  73. package/dist/features/network-modifications/voltageLevel/index.d.ts +2 -1
  74. package/dist/features/network-modifications/voltageLevel/index.js +18 -4
  75. package/dist/features/network-modifications/voltageLevel/topology/{CreateVoltageLevelTopologyForm.d.ts → creation/CreateVoltageLevelTopologyForm.d.ts} +1 -1
  76. package/dist/features/network-modifications/voltageLevel/topology/{CreateVoltageLevelTopologyForm.js → creation/CreateVoltageLevelTopologyForm.js} +38 -38
  77. package/dist/features/network-modifications/voltageLevel/topology/{voltageLevelTopologyCreation.types.d.ts → creation/voltageLevelTopologyCreation.types.d.ts} +1 -1
  78. package/dist/features/network-modifications/voltageLevel/topology/{voltageLevelTopologyCreation.utils.d.ts → creation/voltageLevelTopologyCreation.utils.d.ts} +1 -1
  79. package/dist/features/network-modifications/voltageLevel/topology/{voltageLevelTopologyCreation.utils.js → creation/voltageLevelTopologyCreation.utils.js} +5 -5
  80. package/dist/features/network-modifications/voltageLevel/topology/modification/ConnectionCellRender.d.ts +6 -0
  81. package/dist/features/network-modifications/voltageLevel/topology/modification/ConnectionCellRender.js +80 -0
  82. package/dist/features/network-modifications/voltageLevel/topology/modification/VoltageLevelTopologyModificationForm.d.ts +10 -0
  83. package/dist/features/network-modifications/voltageLevel/topology/modification/VoltageLevelTopologyModificationForm.js +284 -0
  84. package/dist/features/network-modifications/voltageLevel/topology/modification/constants.d.ts +10 -0
  85. package/dist/features/network-modifications/voltageLevel/topology/modification/constants.js +10 -0
  86. package/dist/features/network-modifications/{hooks → voltageLevel/topology/modification}/index.d.ts +4 -1
  87. package/dist/features/network-modifications/voltageLevel/topology/modification/index.js +14 -0
  88. package/dist/features/network-modifications/voltageLevel/topology/modification/voltageLevelTopologyModification.types.d.ts +28 -0
  89. package/dist/features/network-modifications/voltageLevel/topology/modification/voltageLevelTopologyModification.types.js +1 -0
  90. package/dist/features/network-modifications/voltageLevel/topology/modification/voltageLevelTopologyModification.utils.d.ts +29 -0
  91. package/dist/features/network-modifications/voltageLevel/topology/modification/voltageLevelTopologyModification.utils.js +124 -0
  92. package/dist/features/parameters/common/hook/index.d.ts +0 -1
  93. package/dist/features/parameters/common/hook/index.js +1 -3
  94. package/dist/features/parameters/common/index.d.ts +1 -0
  95. package/dist/features/parameters/common/index.js +3 -3
  96. package/dist/features/parameters/common/parameter-field.d.ts +2 -2
  97. package/dist/features/parameters/common/parameter-field.js +1 -1
  98. package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.d.ts +1 -1
  99. package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js +1 -1
  100. package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +10 -10
  101. package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation.type.d.ts +1 -0
  102. package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation.type.js +2 -0
  103. package/dist/features/parameters/dynamic-margin-calculation/loads-variations-parameters.js +1 -1
  104. package/dist/features/parameters/dynamic-margin-calculation/time-delay-parameters.js +1 -1
  105. package/dist/features/parameters/dynamic-security-analysis/contingency-parameters.js +1 -1
  106. package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js +9 -9
  107. package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.d.ts +1 -1
  108. package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.js +1 -1
  109. package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis.type.d.ts +1 -0
  110. package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis.type.js +2 -0
  111. package/dist/features/parameters/dynamic-security-analysis/scenario-parameters.js +1 -1
  112. package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-preview.js +1 -0
  113. package/dist/features/parameters/dynamic-simulation/curve/dialog/equipment-filter.js +1 -0
  114. package/dist/features/parameters/dynamic-simulation/dynamic-simulation-inline.js +9 -9
  115. package/dist/features/parameters/dynamic-simulation/dynamic-simulation-parameters-form.d.ts +1 -1
  116. package/dist/features/parameters/dynamic-simulation/dynamic-simulation-parameters-form.js +1 -1
  117. package/dist/features/parameters/dynamic-simulation/dynamic-simulation.type.d.ts +1 -0
  118. package/dist/features/parameters/dynamic-simulation/dynamic-simulation.type.js +2 -0
  119. package/dist/features/parameters/dynamic-simulation/network/network-parameters.js +1 -1
  120. package/dist/features/parameters/dynamic-simulation/solver/common-solver/common-solver-parameters.js +1 -1
  121. package/dist/features/parameters/dynamic-simulation/solver/ida-solver/ida-solver-parameters.js +1 -1
  122. package/dist/features/parameters/dynamic-simulation/solver/sim-solver/simplified-solver-parameters.js +1 -1
  123. package/dist/features/parameters/dynamic-simulation/solver/solver-parameters.js +1 -1
  124. package/dist/features/parameters/dynamic-simulation/time-delay/time-delay-parameters.js +1 -1
  125. package/dist/features/parameters/index.js +12 -7
  126. package/dist/features/parameters/loadflow/load-flow-advanced-parameters.js +1 -1
  127. package/dist/features/parameters/loadflow/load-flow-general-parameters.js +1 -1
  128. package/dist/features/parameters/loadflow/load-flow-parameters-inline.js +6 -6
  129. package/dist/features/parameters/loadflow/load-flow-parameters-utils.d.ts +1 -0
  130. package/dist/features/parameters/loadflow/load-flow-parameters-utils.js +2 -0
  131. package/dist/features/parameters/loadflow/load-flow-provider-specific-parameters.js +1 -1
  132. package/dist/features/parameters/loadflow/use-load-flow-parameters-form.js +3 -3
  133. package/dist/features/parameters/network-visualizations/constants.d.ts +1 -0
  134. package/dist/features/parameters/network-visualizations/constants.js +2 -0
  135. package/dist/features/parameters/network-visualizations/index.js +2 -1
  136. package/dist/features/parameters/network-visualizations/network-visualizations-parameters-inline.js +6 -6
  137. package/dist/features/parameters/network-visualizations/use-network-visualizations-parameters-form.js +3 -7
  138. package/dist/features/parameters/pcc-min/pcc-min-parameters-inline.js +6 -6
  139. package/dist/features/parameters/security-analysis/constants.d.ts +1 -0
  140. package/dist/features/parameters/security-analysis/constants.js +2 -0
  141. package/dist/features/parameters/security-analysis/index.js +2 -1
  142. package/dist/features/parameters/security-analysis/security-analysis-parameters-content.js +1 -1
  143. package/dist/features/parameters/security-analysis/security-analysis-parameters-dialog.js +1 -1
  144. package/dist/features/parameters/security-analysis/security-analysis-parameters-inline.js +6 -6
  145. package/dist/features/parameters/security-analysis/use-security-analysis-parameters-form.js +3 -3
  146. package/dist/features/parameters/sensi/columns-definitions.d.ts +2 -0
  147. package/dist/features/parameters/sensi/columns-definitions.js +36 -1
  148. package/dist/features/parameters/sensi/index.js +3 -1
  149. package/dist/features/parameters/sensi/sensitivity-analysis-parameters-dialog.js +1 -1
  150. package/dist/features/parameters/sensi/sensitivity-analysis-parameters-form.js +2 -1
  151. package/dist/features/parameters/sensi/sensitivity-analysis-parameters-inline.js +10 -7
  152. package/dist/features/parameters/sensi/sensitivity-parameters-selector.d.ts +3 -1
  153. package/dist/features/parameters/sensi/sensitivity-parameters-selector.js +19 -35
  154. package/dist/features/parameters/sensi/use-sensitivity-analysis-parameters.d.ts +9 -1
  155. package/dist/features/parameters/sensi/use-sensitivity-analysis-parameters.js +29 -1
  156. package/dist/features/parameters/short-circuit/short-circuit-parameters-inline.js +6 -6
  157. package/dist/features/parameters/short-circuit/short-circuit-parameters-utils.d.ts +1 -0
  158. package/dist/features/parameters/short-circuit/short-circuit-parameters-utils.js +2 -0
  159. package/dist/features/parameters/short-circuit/use-short-circuit-parameters-form.js +3 -3
  160. package/dist/features/parameters/voltage-init/constants.d.ts +1 -0
  161. package/dist/features/parameters/voltage-init/constants.js +2 -0
  162. package/dist/features/parameters/voltage-init/index.js +2 -1
  163. package/dist/features/parameters/voltage-init/use-voltage-init-parameters-form.js +4 -8
  164. package/dist/features/parameters/voltage-init/voltage-init-parameters-inline.js +6 -6
  165. package/dist/features/process-configs/loadflow/lf-process-config-edition.js +7 -1
  166. package/dist/features/process-configs/security-analysis/sa-process-config-edition.js +7 -1
  167. package/dist/features/process-configs/shortcircuit/sc-process-config-edition.js +7 -1
  168. package/dist/features/results/loadflow/limit-violation-result.js +1 -1
  169. package/dist/features/results/shortcircuit/shortcircuit-analysis-result.js +1 -1
  170. package/dist/features/side-bar/AppSideBarHeader.js +20 -5
  171. package/dist/features/side-bar/EnvironmentChip.d.ts +13 -0
  172. package/dist/features/side-bar/EnvironmentChip.js +49 -0
  173. package/dist/hooks/index.d.ts +1 -0
  174. package/dist/hooks/index.js +3 -1
  175. package/dist/hooks/use-tabs.d.ts +33 -0
  176. package/dist/hooks/use-tabs.js +55 -0
  177. package/dist/index.js +97 -13
  178. package/dist/services/appsMetadata.d.ts +2 -0
  179. package/dist/services/directory.d.ts +1 -1
  180. package/dist/services/directory.js +6 -2
  181. package/dist/services/index.js +2 -1
  182. package/dist/services/userAdmin.d.ts +2 -1
  183. package/dist/services/userAdmin.js +9 -1
  184. package/dist/translations/en/businessErrorsEn.d.ts +1 -0
  185. package/dist/translations/en/businessErrorsEn.js +1 -0
  186. package/dist/translations/en/networkModificationsEn.d.ts +85 -0
  187. package/dist/translations/en/networkModificationsEn.js +91 -1
  188. package/dist/translations/fr/businessErrorsFr.d.ts +1 -0
  189. package/dist/translations/fr/businessErrorsFr.js +1 -0
  190. package/dist/translations/fr/networkModificationsFr.d.ts +85 -0
  191. package/dist/translations/fr/networkModificationsFr.js +91 -1
  192. package/dist/utils/constants/index.js +2 -1
  193. package/dist/utils/constants/notificationsProvider.d.ts +1 -0
  194. package/dist/utils/constants/notificationsProvider.js +1 -0
  195. package/dist/utils/constants/translationKeys.d.ts +1 -0
  196. package/dist/utils/constants/translationKeys.js +2 -0
  197. package/dist/utils/index.js +2 -1
  198. package/dist/utils/types/types.d.ts +4 -0
  199. package/package.json +1 -1
  200. package/dist/features/network-modifications/hooks/index.js +0 -4
  201. package/dist/features/network-modifications/hooks/useTabsWithError.d.ts +0 -15
  202. package/dist/features/network-modifications/hooks/useTabsWithError.js +0 -28
  203. package/dist/features/parameters/common/hook/use-tabs.d.ts +0 -16
  204. package/dist/features/parameters/common/hook/use-tabs.js +0 -65
  205. /package/dist/features/network-modifications/voltageLevel/topology/{index.d.ts → creation/index.d.ts} +0 -0
  206. /package/dist/features/network-modifications/voltageLevel/topology/{index.js → creation/index.js} +0 -0
  207. /package/dist/features/network-modifications/voltageLevel/topology/{voltageLevelTopologyCreation.types.js → creation/voltageLevelTopologyCreation.types.js} +0 -0
@@ -3,13 +3,13 @@ import { Tabs, Tab } from "@mui/material";
3
3
  import { FormattedMessage } from "react-intl";
4
4
  import { BatteryDialogTab } from "./batteryTabs.utils.js";
5
5
  import { getTabStyle, getTabIndicatorStyle } from "../../../parameters/parameters-style.js";
6
- function BatteryDialogTabs({ tabIndex, tabIndexesWithError, setTabIndex }) {
6
+ function BatteryDialogTabs({ tabIndex, tabIndexesWithError, onTabChange }) {
7
7
  return /* @__PURE__ */ jsxs(
8
8
  Tabs,
9
9
  {
10
10
  value: tabIndex,
11
11
  variant: "scrollable",
12
- onChange: (_event, newValue) => setTabIndex(newValue),
12
+ onChange: onTabChange,
13
13
  slotProps: {
14
14
  indicator: {
15
15
  sx: getTabIndicatorStyle(tabIndexesWithError, tabIndex)
@@ -1,10 +1,13 @@
1
1
  import { BatteryDialogHeaderProps } from './BatteryDialogHeader';
2
2
  import { BatteryDialogTabsContentProps } from './BatteryDialogTabsContent';
3
+ import { BatteryDialogTab } from './batteryTabs.utils';
3
4
  import { EquipmentType, Identifiable } from '../../../../utils';
5
+ import { UseTabsReturn } from '../../../../hooks';
4
6
  interface BatteryModificationFormProps extends BatteryDialogHeaderProps, Omit<BatteryDialogTabsContentProps, 'tabIndex'> {
5
7
  fetchVoltageLevelEquipments: (voltageLevelId: string) => Promise<(Identifiable & {
6
8
  type: EquipmentType;
7
9
  })[]>;
10
+ useTabsReturn: UseTabsReturn<BatteryDialogTab>;
8
11
  }
9
- export declare function BatteryModificationForm({ batteryToModify, updatePreviousReactiveCapabilityCurveTable, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, fetchVoltageLevelEquipments, }: Readonly<BatteryModificationFormProps>): import("react").JSX.Element;
12
+ export declare function BatteryModificationForm({ batteryToModify, updatePreviousReactiveCapabilityCurveTable, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, fetchVoltageLevelEquipments, useTabsReturn, }: Readonly<BatteryModificationFormProps>): import("react").JSX.Element;
10
13
  export {};
@@ -4,39 +4,35 @@ import { useWatch } from "react-hook-form";
4
4
  import { BatteryDialogHeader } from "./BatteryDialogHeader.js";
5
5
  import { BatteryDialogTabs } from "./BatteryDialogTabs.js";
6
6
  import { BatteryDialogTabsContent } from "./BatteryDialogTabsContent.js";
7
- import { BatteryDialogTab, BATTERY_TAB_FIELDS } from "./batteryTabs.utils.js";
8
7
  import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
9
8
  import "../../../../utils/conversionUtils.js";
10
9
  import "../../../../utils/types/equipmentType.js";
11
10
  import "@mui/icons-material";
12
- import { useTabsWithError } from "../../hooks/useTabsWithError.js";
13
11
  function BatteryModificationForm({
14
12
  batteryToModify,
15
13
  updatePreviousReactiveCapabilityCurveTable,
16
14
  voltageLevelOptions,
17
15
  fetchBusesOrBusbarSections,
18
16
  PositionDiagramPane,
19
- fetchVoltageLevelEquipments
17
+ fetchVoltageLevelEquipments,
18
+ useTabsReturn
20
19
  }) {
21
- const { tabIndex, setTabIndex, tabIndexesWithError } = useTabsWithError(
22
- BATTERY_TAB_FIELDS,
23
- BatteryDialogTab.CONNECTIVITY_TAB
24
- );
20
+ const { selectedTab, tabsWithError, onTabChange } = useTabsReturn;
25
21
  const equipmentId = useWatch({ name: FieldConstants.EQUIPMENT_ID });
26
22
  return /* @__PURE__ */ jsxs(Stack, { spacing: 2, children: [
27
23
  /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(BatteryDialogHeader, { batteryToModify, equipmentId }) }),
28
24
  /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
29
25
  BatteryDialogTabs,
30
26
  {
31
- tabIndex,
32
- tabIndexesWithError,
33
- setTabIndex
27
+ tabIndex: selectedTab,
28
+ tabIndexesWithError: tabsWithError,
29
+ onTabChange
34
30
  }
35
31
  ) }),
36
32
  /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
37
33
  BatteryDialogTabsContent,
38
34
  {
39
- tabIndex,
35
+ tabIndex: selectedTab,
40
36
  batteryToModify,
41
37
  voltageLevelOptions,
42
38
  fetchBusesOrBusbarSections,
@@ -1,8 +1,8 @@
1
- import { default as React } from 'react';
1
+ import { SyntheticEvent } from 'react';
2
2
  interface GeneratorDialogTabsProps {
3
3
  tabIndex: number;
4
4
  tabIndexesWithError: number[];
5
- setTabIndex: (newTabIndex: number) => void;
5
+ onTabChange: (event: SyntheticEvent<Element, Event>, newValue: number) => void;
6
6
  }
7
- export declare function GeneratorDialogTabs({ tabIndex, tabIndexesWithError, setTabIndex, }: Readonly<GeneratorDialogTabsProps>): React.JSX.Element;
7
+ export declare function GeneratorDialogTabs({ tabIndex, tabIndexesWithError, onTabChange, }: Readonly<GeneratorDialogTabsProps>): import("react").JSX.Element;
8
8
  export {};
@@ -6,14 +6,14 @@ import { getTabStyle, getTabIndicatorStyle } from "../../../parameters/parameter
6
6
  function GeneratorDialogTabs({
7
7
  tabIndex,
8
8
  tabIndexesWithError,
9
- setTabIndex
9
+ onTabChange
10
10
  }) {
11
11
  return /* @__PURE__ */ jsxs(
12
12
  Tabs,
13
13
  {
14
14
  value: tabIndex,
15
15
  variant: "scrollable",
16
- onChange: (event, newValue) => setTabIndex(newValue),
16
+ onChange: onTabChange,
17
17
  slotProps: {
18
18
  indicator: {
19
19
  sx: getTabIndicatorStyle(tabIndexesWithError, tabIndex)
@@ -1,10 +1,13 @@
1
+ import { GeneratorDialogTab } from './generatorTabs.utils';
1
2
  import { GeneratorDialogHeaderProps } from './GeneratorDialogHeader';
2
3
  import { GeneratorDialogTabsContentProps } from './GeneratorDialogTabsContent';
3
4
  import { EquipmentType, Identifiable } from '../../../../utils';
5
+ import { UseTabsReturn } from '../../../../hooks';
4
6
  interface GeneratorModificationFormProps extends GeneratorDialogHeaderProps, Omit<GeneratorDialogTabsContentProps, 'tabIndex'> {
5
7
  fetchVoltageLevelEquipments: (voltageLevelId: string) => Promise<(Identifiable & {
6
8
  type: EquipmentType;
7
9
  })[]>;
10
+ useTabsReturn: UseTabsReturn<GeneratorDialogTab>;
8
11
  }
9
- export declare function GeneratorModificationForm({ generatorToModify, updatePreviousReactiveCapabilityCurveTable, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, fetchVoltageLevelEquipments, }: Readonly<GeneratorModificationFormProps>): import("react").JSX.Element;
12
+ export declare function GeneratorModificationForm({ generatorToModify, updatePreviousReactiveCapabilityCurveTable, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, fetchVoltageLevelEquipments, useTabsReturn, }: Readonly<GeneratorModificationFormProps>): import("react").JSX.Element;
10
13
  export {};
@@ -1,7 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { Stack, Grid } from "@mui/material";
3
3
  import { useWatch } from "react-hook-form";
4
- import { GeneratorDialogTab, GENERATOR_TAB_FIELDS } from "./generatorTabs.utils.js";
5
4
  import { GeneratorDialogHeader } from "./GeneratorDialogHeader.js";
6
5
  import { GeneratorDialogTabs } from "./GeneratorDialogTabs.js";
7
6
  import { GeneratorDialogTabsContent } from "./GeneratorDialogTabsContent.js";
@@ -9,19 +8,16 @@ import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
9
8
  import "../../../../utils/conversionUtils.js";
10
9
  import "../../../../utils/types/equipmentType.js";
11
10
  import "@mui/icons-material";
12
- import { useTabsWithError } from "../../hooks/useTabsWithError.js";
13
11
  function GeneratorModificationForm({
14
12
  generatorToModify,
15
13
  updatePreviousReactiveCapabilityCurveTable,
16
14
  voltageLevelOptions,
17
15
  fetchBusesOrBusbarSections,
18
16
  PositionDiagramPane,
19
- fetchVoltageLevelEquipments
17
+ fetchVoltageLevelEquipments,
18
+ useTabsReturn
20
19
  }) {
21
- const { tabIndex, setTabIndex, tabIndexesWithError } = useTabsWithError(
22
- GENERATOR_TAB_FIELDS,
23
- GeneratorDialogTab.CONNECTIVITY_TAB
24
- );
20
+ const { selectedTab: tabIndex, tabsWithError: tabIndexesWithError, onTabChange } = useTabsReturn;
25
21
  const equipmentId = useWatch({ name: FieldConstants.EQUIPMENT_ID });
26
22
  return /* @__PURE__ */ jsxs(Stack, { spacing: 2, children: [
27
23
  /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(GeneratorDialogHeader, { generatorToModify, equipmentId }) }),
@@ -30,7 +26,7 @@ function GeneratorModificationForm({
30
26
  {
31
27
  tabIndex,
32
28
  tabIndexesWithError,
33
- setTabIndex
29
+ onTabChange
34
30
  }
35
31
  ) }),
36
32
  /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
@@ -6,7 +6,6 @@
6
6
  */
7
7
  export * from './common';
8
8
  export * from './equipmentDeletion';
9
- export * from './hooks';
10
9
  export * from './substation';
11
10
  export * from './voltageLevel';
12
11
  export * from './load';
@@ -17,3 +16,4 @@ export * from './shunt-compensator';
17
16
  export * from './line';
18
17
  export * from './twoWindingsTransformer';
19
18
  export * from './static-var-compensator';
19
+ export * from './tabular';
@@ -47,7 +47,6 @@ import { useHvdcLccDeletion } from "./equipmentDeletion/hvdcLccDeletion/useHvdcL
47
47
  import { HvdcLccDeletionSpecificForm } from "./equipmentDeletion/hvdcLccDeletion/HvdcLccDeletionSpecificForm.js";
48
48
  import { equipmentDeletionDtoToForm, equipmentDeletionEmptyFormData, equipmentDeletionFormSchema, equipmentDeletionFormToDto, newEquipmentDeletionDto } from "./equipmentDeletion/equipmentDeletion.utils.js";
49
49
  import { EquipmentDeletionForm } from "./equipmentDeletion/EquipmentDeletionForm.js";
50
- import { useTabsWithError } from "./hooks/useTabsWithError.js";
51
50
  import { SubstationCreationForm } from "./substation/creation/SubstationCreationForm.js";
52
51
  import { substationCreationDtoToForm, substationCreationEmptyFormData, substationCreationFormSchema, substationCreationFormToDto } from "./substation/creation/substationCreation.utils.js";
53
52
  import { SubstationModificationForm } from "./substation/modification/SubstationModificationForm.js";
@@ -86,14 +85,17 @@ import "../../components/ui/snackbarProvider/SnackbarProvider.js";
86
85
  import "mui-nested-menu";
87
86
  import "react-resizable-panels";
88
87
  import "react-papaparse";
89
- import { MAX_SECTIONS_COUNT } from "./voltageLevel/creation/voltageLevel.constants.js";
88
+ import { MAX_SECTIONS_COUNT, VOLTAGE_LEVEL_TAB_FIELDS, VoltageLevelTab } from "./voltageLevel/creation/voltageLevel.constants.js";
90
89
  import { VoltageLevelCreationForm } from "./voltageLevel/creation/VoltageLevelCreationForm.js";
91
90
  import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./voltageLevel/creation/voltageLevelCreation.utils.js";
92
91
  import { SwitchKind } from "./voltageLevel/creation/voltageLevelCreation.types.js";
93
92
  import { VoltageLevelModificationForm } from "./voltageLevel/modification/VoltageLevelModificationForm.js";
94
93
  import { voltageLevelModificationDtoToForm, voltageLevelModificationEmptyFormData, voltageLevelModificationFormSchema, voltageLevelModificationFormToDto, voltageLevelModificationWithMeasurementsDtoToForm, voltageLevelModificationWithMeasurementsFormSchema, voltageLevelModificationWithMeasurementsFormToDto } from "./voltageLevel/modification/voltageLevelModification.utils.js";
95
- import { createVoltageLevelTopologyDtoToForm, createVoltageLevelTopologyEmptyFormData, createVoltageLevelTopologyFormSchema, createVoltageLevelTopologyFormToDto } from "./voltageLevel/topology/voltageLevelTopologyCreation.utils.js";
96
- import { CreateVoltageLevelTopologyForm } from "./voltageLevel/topology/CreateVoltageLevelTopologyForm.js";
94
+ import { createVoltageLevelTopologyDtoToForm, createVoltageLevelTopologyEmptyFormData, createVoltageLevelTopologyFormSchema, createVoltageLevelTopologyFormToDto } from "./voltageLevel/topology/creation/voltageLevelTopologyCreation.utils.js";
95
+ import { CreateVoltageLevelTopologyForm } from "./voltageLevel/topology/creation/CreateVoltageLevelTopologyForm.js";
96
+ import { voltageLevelTopologyModificationDtoToForm, voltageLevelTopologyModificationEmptyFormData, voltageLevelTopologyModificationFormSchema, voltageLevelTopologyModificationFormToDto } from "./voltageLevel/topology/modification/voltageLevelTopologyModification.utils.js";
97
+ import { VoltageLevelTopologyModificationForm } from "./voltageLevel/topology/modification/VoltageLevelTopologyModificationForm.js";
98
+ import { CURRENT_CONNECTION_STATUS, PREV_CONNECTION_STATUS, SWITCH_ID, TOPOLOGY_MODIFICATION_TABLE } from "./voltageLevel/topology/modification/constants.js";
97
99
  import { VoltageLevelSectionCreationForm } from "./voltageLevel/section/VoltageLevelSectionCreationForm.js";
98
100
  import { POSITION_NEW_SECTION_SIDE, voltageLevelSectionCreationDtoToForm, voltageLevelSectionCreationEmptyFormData, voltageLevelSectionCreationFormSchema, voltageLevelSectionCreationFormToDto } from "./voltageLevel/section/voltageLevelSectionCreation.utils.js";
99
101
  import { FeederBayPositionCellRenderer } from "./voltageLevel/moveFeederBays/feederBay/FeederBayPositionCellRender.js";
@@ -185,6 +187,16 @@ import { getReactiveFormData, getReactiveFormEmptyFormData, getReactiveFormValid
185
187
  import { computeQ0, getStandbyAutomatonEmptyFormData, getStandbyAutomatonFormData, getStandbyAutomatonFormValidationSchema } from "./static-var-compensator/common/standby-automaton-form-utils.js";
186
188
  import { StaticVarCompensatorCreationForm } from "./static-var-compensator/creation/static-var-compensator-creation-form.js";
187
189
  import { staticVarCompensatorCreationEmptyFormData, staticVarCompensatorCreationFormSchema, staticVarCompensatorCreationFormToDto, staticVarCompensatorDtoToForm } from "./static-var-compensator/creation/static-var-compensator-creation-utils.js";
190
+ import { DefineTabularPropertiesDialog } from "./tabular/properties/DefineTabularPropertiesDialog.js";
191
+ import { TabularPropertiesForm } from "./tabular/properties/TabularPropertiesForm.js";
192
+ import { TabularPropertyForm } from "./tabular/properties/TabularPropertyForm.js";
193
+ import { buildPredefinedTabularProperties, emptyTabularProperties, initializedTabularProperty, tabularPropertiesSchema } from "./tabular/properties/tabularProperty.utils.js";
194
+ import { LOAD_TYPES_FOR_LOAD_TABULAR_CREATION_MODIFICATION, PROPERTY_CSV_COLUMN_PREFIX, REGULATING_TERMINAL_TYPES, TABULAR_BOOLEAN, TABULAR_ENUM, TABULAR_NUMBER, TabularFieldConstants } from "./tabular/tabular.constants.js";
195
+ import { TabularModificationType } from "./tabular/tabular.types.js";
196
+ import { addPropertiesFromBack, convertReactiveCapabilityCurvePointsFromBackToFront, convertReactiveCapabilityCurvePointsFromFrontToBack, formatModification, generateCommentLines, getEmptyTabularFormData, getSelectedTabularPropertyNames, isFieldTypeOk, sanitizeRowValue, setFieldTypeError, tabularFormSchema, transformProperties } from "./tabular/tabular.utils.js";
197
+ import { TABULAR_CREATION_FIELDS, TABULAR_CREATION_TYPES, convertCreationFieldFromBackToFront, convertCreationFieldFromFrontToBack, convertCreations, getEquipmentTypeFromCreationType, tabularCreationDtoToForm, tabularCreationFormToDto, transformCreationsTable, transformRowToBackEndCreation } from "./tabular/tabularCreation.utils.js";
198
+ import { MODIFICATION_TRANSFORMATION_STRATEGIES, TABULAR_MODIFICATION_FIELDS, TABULAR_MODIFICATION_TYPES, TWT_TAP_CHANGER_FIELDS, convertGeneratorOrBatteryModificationFromBackToFront, convertGeneratorOrBatteryModificationFromFrontToBack, convertInputValues, convertOutputValues, convertTWTTapChangerModificationFromFrontToBack, getEquipmentTypeFromModificationType, getTabularFieldType, tabularModificationDtoToForm, tabularModificationFormToDto, transformModificationsTable, transformRowToBackEndModification } from "./tabular/tabularModification.utils.js";
199
+ import { TabularForm } from "./tabular/TabularForm.js";
188
200
  export {
189
201
  APPLICABILITY,
190
202
  ActivePowerControlForm,
@@ -202,6 +214,7 @@ export {
202
214
  ByFilterDeletionForm,
203
215
  CATEGORIES_TABS,
204
216
  CHARACTERISTICS_CHOICES,
217
+ CURRENT_CONNECTION_STATUS,
205
218
  CharacteristicsForm,
206
219
  ConnectivityForm,
207
220
  CouplingDeviceCreationForm,
@@ -209,6 +222,7 @@ export {
209
222
  CreateRuleDialogSubmitButton,
210
223
  CreateRuleForm,
211
224
  CreateVoltageLevelTopologyForm,
225
+ DefineTabularPropertiesDialog,
212
226
  EQUIPMENTS_FIELDS,
213
227
  EQUIPMENT_TYPE_ORDER,
214
228
  EquipmentDeletionForm,
@@ -228,6 +242,7 @@ export {
228
242
  ImportRuleDialog,
229
243
  LINE_TAB_FIELDS,
230
244
  LOAD_TAB_FIELDS,
245
+ LOAD_TYPES_FOR_LOAD_TABULAR_CREATION_MODIFICATION,
231
246
  LimitsChart,
232
247
  LimitsEditor,
233
248
  LimitsGroupsContextualMenu,
@@ -248,6 +263,7 @@ export {
248
263
  LoadDialogTabsContent,
249
264
  LoadForm,
250
265
  MAX_SECTIONS_COUNT,
266
+ MODIFICATION_TRANSFORMATION_STRATEGIES,
251
267
  ModificationByAssignmentForm,
252
268
  ModificationByFormulaForm,
253
269
  MoveVoltageLevelFeederBaysForm,
@@ -256,6 +272,8 @@ export {
256
272
  OperationalLimitsGroupTabLabel,
257
273
  OperationalLimitsGroups,
258
274
  POSITION_NEW_SECTION_SIDE,
275
+ PREV_CONNECTION_STATUS,
276
+ PROPERTY_CSV_COLUMN_PREFIX,
259
277
  PhaseTapChangerPane,
260
278
  PhaseTapChangerPaneSteps,
261
279
  PhaseTapChangerRegulationMode,
@@ -266,6 +284,7 @@ export {
266
284
  REACTIVE_LIMIT_TYPES,
267
285
  REFERENCE_FIELD_OR_VALUE_1,
268
286
  REFERENCE_FIELD_OR_VALUE_2,
287
+ REGULATING_TERMINAL_TYPES,
269
288
  REGULATION_TYPES,
270
289
  REMOVE,
271
290
  RatioTapChangerPane,
@@ -277,6 +296,7 @@ export {
277
296
  RegulatingTerminalForm,
278
297
  SHUNT_COMPENSATOR_TYPES,
279
298
  STATIC_VAR_COMPENSATOR_TAB_FIELDS,
299
+ SWITCH_ID,
280
300
  SWITCH_TYPE,
281
301
  SegmentCurrentLimitsSchema,
282
302
  SegmentInfoSchema,
@@ -295,8 +315,22 @@ export {
295
315
  SubstationModificationForm,
296
316
  SwitchKind,
297
317
  SwitchesBetweenSections,
318
+ TABULAR_BOOLEAN,
319
+ TABULAR_CREATION_FIELDS,
320
+ TABULAR_CREATION_TYPES,
321
+ TABULAR_ENUM,
322
+ TABULAR_MODIFICATION_FIELDS,
323
+ TABULAR_MODIFICATION_TYPES,
324
+ TABULAR_NUMBER,
298
325
  TEMPORARY_LIMIT_MODIFICATION_TYPE,
326
+ TOPOLOGY_MODIFICATION_TABLE,
299
327
  TWT_TAB_FIELDS,
328
+ TWT_TAP_CHANGER_FIELDS,
329
+ TabularFieldConstants,
330
+ TabularForm,
331
+ TabularModificationType,
332
+ TabularPropertiesForm,
333
+ TabularPropertyForm,
300
334
  TapChangerSteps,
301
335
  TemporaryLimitsTable,
302
336
  ToBeEstimatedForm,
@@ -306,15 +340,19 @@ export {
306
340
  TwoWindingsTransformerDialogTabs,
307
341
  TwoWindingsTransformerDialogTabsContent,
308
342
  TwoWindingsTransformerForm,
343
+ VOLTAGE_LEVEL_TAB_FIELDS,
309
344
  VOLTAGE_REGULATION_MODES,
310
345
  VoltageLevelConnectivityForm,
311
346
  VoltageLevelCreationForm,
312
347
  VoltageLevelModificationForm,
313
348
  VoltageLevelSectionCreationForm,
349
+ VoltageLevelTab,
350
+ VoltageLevelTopologyModificationForm,
314
351
  VoltageRegulationForm,
315
352
  addModificationTypeToOpLimitsGroups,
316
353
  addModificationTypeToTemporaryLimits,
317
354
  addOperationTypeToSelectedOpLG,
355
+ addPropertiesFromBack,
318
356
  batteryCreationDtoToForm,
319
357
  batteryCreationEmptyFormData,
320
358
  batteryCreationFormSchema,
@@ -324,6 +362,7 @@ export {
324
362
  batteryModificationFormSchema,
325
363
  batteryModificationFormToDto,
326
364
  buildNewBusbarSections,
365
+ buildPredefinedTabularProperties,
327
366
  byFilterDeletionDtoToForm,
328
367
  byFilterDeletionFormSchema,
329
368
  byFilterDeletionFormToDto,
@@ -333,7 +372,17 @@ export {
333
372
  computeRatioTapChangerRegulating,
334
373
  computeRatioTapChangerRegulationMode,
335
374
  computeSwitchedOnValue,
375
+ convertCreationFieldFromBackToFront,
376
+ convertCreationFieldFromFrontToBack,
377
+ convertCreations,
378
+ convertGeneratorOrBatteryModificationFromBackToFront,
379
+ convertGeneratorOrBatteryModificationFromFrontToBack,
380
+ convertInputValues,
336
381
  convertLimitsToOperationalLimitsGroupFormSchema,
382
+ convertOutputValues,
383
+ convertReactiveCapabilityCurvePointsFromBackToFront,
384
+ convertReactiveCapabilityCurvePointsFromFrontToBack,
385
+ convertTWTTapChangerModificationFromFrontToBack,
337
386
  convertToLineSegmentInfos,
338
387
  convertToLineSegmentsFormData,
339
388
  convertToOperationalLimitsGroupFormSchema,
@@ -355,6 +404,7 @@ export {
355
404
  emptyModificationFormData,
356
405
  emptyMoveVoltageLevelFeederBaysFormData,
357
406
  emptyProperties,
407
+ emptyTabularProperties,
358
408
  equipmentDeletionDtoToForm,
359
409
  equipmentDeletionEmptyFormData,
360
410
  equipmentDeletionFormSchema,
@@ -362,8 +412,10 @@ export {
362
412
  fetchPredefinedProperties,
363
413
  filledTextField,
364
414
  formatMapInfosToTemporaryLimitsFormSchema,
415
+ formatModification,
365
416
  formatOpLimitGroupsToFormInfos,
366
417
  formatTemporaryLimitsModificationToFormSchema,
418
+ generateCommentLines,
367
419
  generateEmptyOperationalLimitsGroup,
368
420
  generateUniqueId,
369
421
  generatorCreationDtoToForm,
@@ -424,6 +476,9 @@ export {
424
476
  getCreateRuleValidationSchema,
425
477
  getCreateSwitchesEmptyFormData,
426
478
  getCreateSwitchesValidationSchema,
479
+ getEmptyTabularFormData,
480
+ getEquipmentTypeFromCreationType,
481
+ getEquipmentTypeFromModificationType,
427
482
  getFilledPropertiesFromModification,
428
483
  getFormulaInitialValue,
429
484
  getFormulaSchema,
@@ -476,6 +531,7 @@ export {
476
531
  getRegulationTypeForEdit,
477
532
  getRegulationTypeLabel,
478
533
  getRowEmptyFormData,
534
+ getSelectedTabularPropertyNames,
479
535
  getSetPointsEmptyFormData,
480
536
  getSetPointsSchema,
481
537
  getShortCircuitEmptyFormData,
@@ -484,6 +540,7 @@ export {
484
540
  getStandbyAutomatonEmptyFormData,
485
541
  getStandbyAutomatonFormData,
486
542
  getStandbyAutomatonFormValidationSchema,
543
+ getTabularFieldType,
487
544
  getTapChangerEquipmentSectionTypeValue,
488
545
  getTapSideForEdit,
489
546
  getTapSideLabel,
@@ -494,6 +551,8 @@ export {
494
551
  getVoltageRegulationEmptyFormData,
495
552
  getVoltageRegulationSchema,
496
553
  initializedProperty,
554
+ initializedTabularProperty,
555
+ isFieldTypeOk,
497
556
  italicFontTextField,
498
557
  lineCreationDtoToForm,
499
558
  lineCreationEmptyFormData,
@@ -526,7 +585,9 @@ export {
526
585
  newEquipmentDeletionDto,
527
586
  sanitizeLimitNames,
528
587
  sanitizeLimitsGroups,
588
+ sanitizeRowValue,
529
589
  setCurrentReactiveCapabilityCurveTable,
590
+ setFieldTypeError,
530
591
  setSelectedReactiveLimits,
531
592
  shuntCompensatorCreationDtoToForm,
532
593
  shuntCompensatorCreationEmptyFormData,
@@ -549,12 +610,23 @@ export {
549
610
  substationModificationEmptyFormData,
550
611
  substationModificationFormSchema,
551
612
  substationModificationFormToDto,
613
+ tabularCreationDtoToForm,
614
+ tabularCreationFormToDto,
615
+ tabularFormSchema,
616
+ tabularModificationDtoToForm,
617
+ tabularModificationFormToDto,
618
+ tabularPropertiesSchema,
552
619
  testValueWithinPowerInterval,
553
620
  toBeEstimatedEmptyFormData,
554
621
  toModificationProperties,
555
622
  toReactiveCapabilityCurveChoiceForGeneratorCreation,
556
623
  toReactiveCapabilityCurveChoiceForGeneratorModification,
557
624
  toTapChangerStepList,
625
+ transformCreationsTable,
626
+ transformModificationsTable,
627
+ transformProperties,
628
+ transformRowToBackEndCreation,
629
+ transformRowToBackEndModification,
558
630
  translateSwitchKinds,
559
631
  twoWindingsTransformerCreationDtoToForm,
560
632
  twoWindingsTransformerCreationEmptyFormData,
@@ -565,7 +637,6 @@ export {
565
637
  twoWindingsTransformerModificationFormSchema,
566
638
  twoWindingsTransformerModificationFormToDto,
567
639
  useHvdcLccDeletion,
568
- useTabsWithError,
569
640
  voltageLevelCreationDtoToForm,
570
641
  voltageLevelCreationEmptyFormData,
571
642
  voltageLevelCreationFormSchema,
@@ -580,5 +651,9 @@ export {
580
651
  voltageLevelSectionCreationDtoToForm,
581
652
  voltageLevelSectionCreationEmptyFormData,
582
653
  voltageLevelSectionCreationFormSchema,
583
- voltageLevelSectionCreationFormToDto
654
+ voltageLevelSectionCreationFormToDto,
655
+ voltageLevelTopologyModificationDtoToForm,
656
+ voltageLevelTopologyModificationEmptyFormData,
657
+ voltageLevelTopologyModificationFormSchema,
658
+ voltageLevelTopologyModificationFormToDto
584
659
  };
@@ -1,9 +1,9 @@
1
- import { default as React } from 'react';
1
+ import { SyntheticEvent } from 'react';
2
2
  import { LineDialogOptions } from './line.utils';
3
3
  interface LineDialogTabsProps extends LineDialogOptions {
4
4
  tabIndex: number;
5
5
  tabIndexesWithError: number[];
6
- setTabIndex: (newTabIndex: number) => void;
6
+ onTabChange: (event: SyntheticEvent<Element, Event>, newValue: number) => void;
7
7
  }
8
- export declare function LineDialogTabs({ tabIndex, tabIndexesWithError, setTabIndex, isModification, withConnectivity, }: Readonly<LineDialogTabsProps>): React.JSX.Element;
8
+ export declare function LineDialogTabs({ tabIndex, tabIndexesWithError, onTabChange, isModification, withConnectivity, }: Readonly<LineDialogTabsProps>): import("react").JSX.Element;
9
9
  export {};
@@ -6,7 +6,7 @@ import { getTabStyle, getTabIndicatorStyle } from "../../../parameters/parameter
6
6
  function LineDialogTabs({
7
7
  tabIndex,
8
8
  tabIndexesWithError,
9
- setTabIndex,
9
+ onTabChange,
10
10
  isModification = false,
11
11
  withConnectivity = true
12
12
  }) {
@@ -15,7 +15,7 @@ function LineDialogTabs({
15
15
  {
16
16
  value: tabIndex,
17
17
  variant: "scrollable",
18
- onChange: (event, newValue) => setTabIndex(newValue),
18
+ onChange: onTabChange,
19
19
  slotProps: {
20
20
  indicator: { sx: getTabIndicatorStyle(tabIndexesWithError, tabIndex) }
21
21
  },
@@ -1,6 +1,9 @@
1
+ import { LineDialogTab } from './line.utils';
1
2
  import { LineDialogHeaderProps } from './LineDialogHeader';
2
3
  import { LineDialogTabsContentProps } from './LineDialogTabsContent';
4
+ import { UseTabsReturn } from '../../../../hooks';
3
5
  interface LineFormProps extends LineDialogHeaderProps, Omit<LineDialogTabsContentProps, 'tabIndex' | 'isModification' | 'lineToModify'> {
6
+ useTabsReturn: UseTabsReturn<LineDialogTab>;
4
7
  }
5
- export declare function LineForm({ lineToModify, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, isModification, withConnectivity, }: Readonly<LineFormProps>): import("react").JSX.Element;
8
+ export declare function LineForm({ lineToModify, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, isModification, withConnectivity, useTabsReturn, }: Readonly<LineFormProps>): import("react").JSX.Element;
6
9
  export {};
@@ -1,30 +1,26 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { Stack, Box } from "@mui/material";
3
- import { LineDialogTab, LINE_TAB_FIELDS } from "./line.utils.js";
4
3
  import { LineDialogHeader } from "./LineDialogHeader.js";
5
4
  import { LineDialogTabs } from "./LineDialogTabs.js";
6
5
  import { LineDialogTabsContent } from "./LineDialogTabsContent.js";
7
- import { useTabsWithError } from "../../hooks/useTabsWithError.js";
8
6
  function LineForm({
9
7
  lineToModify,
10
8
  voltageLevelOptions,
11
9
  fetchBusesOrBusbarSections,
12
10
  PositionDiagramPane,
13
11
  isModification = false,
14
- withConnectivity = true
12
+ withConnectivity = true,
13
+ useTabsReturn
15
14
  }) {
16
- const { tabIndex, setTabIndex, tabIndexesWithError } = useTabsWithError(
17
- LINE_TAB_FIELDS,
18
- withConnectivity ? LineDialogTab.CONNECTIVITY_TAB : LineDialogTab.CHARACTERISTICS_TAB
19
- );
15
+ const { selectedTab, tabsWithError, onTabChange } = useTabsReturn;
20
16
  return /* @__PURE__ */ jsxs(Stack, { spacing: 2, height: "100%", children: [
21
17
  /* @__PURE__ */ jsx(LineDialogHeader, { lineToModify, isModification }),
22
18
  /* @__PURE__ */ jsx(
23
19
  LineDialogTabs,
24
20
  {
25
- tabIndex,
26
- tabIndexesWithError,
27
- setTabIndex,
21
+ tabIndex: selectedTab,
22
+ tabIndexesWithError: tabsWithError,
23
+ onTabChange,
28
24
  isModification,
29
25
  withConnectivity
30
26
  }
@@ -32,7 +28,7 @@ function LineForm({
32
28
  /* @__PURE__ */ jsx(Box, { sx: { flexGrow: 1, overflowY: "auto", overflowX: "hidden", paddingRight: 3 }, children: /* @__PURE__ */ jsx(
33
29
  LineDialogTabsContent,
34
30
  {
35
- tabIndex,
31
+ tabIndex: selectedTab,
36
32
  lineToModify,
37
33
  voltageLevelOptions,
38
34
  fetchBusesOrBusbarSections,
@@ -3,7 +3,7 @@ export interface LineDialogOptions {
3
3
  isModification?: boolean;
4
4
  withConnectivity?: boolean;
5
5
  }
6
- export declare const enum LineDialogTab {
6
+ export declare enum LineDialogTab {
7
7
  CONNECTIVITY_TAB = 0,
8
8
  CHARACTERISTICS_TAB = 1,
9
9
  LIMITS_TAB = 2,
@@ -1,9 +1,9 @@
1
- import { default as React } from 'react';
1
+ import { SyntheticEvent } from 'react';
2
2
  interface LoadDialogTabsProps {
3
3
  tabIndex: number;
4
4
  tabIndexesWithError: number[];
5
- setTabIndex: (newTabIndex: number) => void;
5
+ onTabChange: (event: SyntheticEvent<Element, Event>, newValue: number) => void;
6
6
  isModification?: boolean;
7
7
  }
8
- export declare function LoadDialogTabs({ tabIndex, tabIndexesWithError, setTabIndex, isModification, }: Readonly<LoadDialogTabsProps>): React.JSX.Element;
8
+ export declare function LoadDialogTabs({ tabIndex, tabIndexesWithError, onTabChange, isModification, }: Readonly<LoadDialogTabsProps>): import("react").JSX.Element;
9
9
  export {};
@@ -6,7 +6,7 @@ import { getTabStyle, getTabIndicatorStyle } from "../../../parameters/parameter
6
6
  function LoadDialogTabs({
7
7
  tabIndex,
8
8
  tabIndexesWithError,
9
- setTabIndex,
9
+ onTabChange,
10
10
  isModification = false
11
11
  }) {
12
12
  return /* @__PURE__ */ jsxs(
@@ -14,7 +14,7 @@ function LoadDialogTabs({
14
14
  {
15
15
  value: tabIndex,
16
16
  variant: "scrollable",
17
- onChange: (event, newValue) => setTabIndex(newValue),
17
+ onChange: onTabChange,
18
18
  slotProps: {
19
19
  indicator: {
20
20
  sx: getTabIndicatorStyle(tabIndexesWithError, tabIndex)
@@ -1,6 +1,9 @@
1
+ import { LoadDialogTab } from './load.utils';
1
2
  import { LoadDialogHeaderProps } from './LoadDialogHeader';
2
3
  import { LoadDialogTabsContentProps } from './LoadDialogTabsContent';
4
+ import { UseTabsReturn } from '../../../../hooks';
3
5
  interface LoadFormProps extends LoadDialogHeaderProps, Omit<LoadDialogTabsContentProps, 'tabIndex' | 'isModification' | 'loadToModify'> {
6
+ useTabsReturn: UseTabsReturn<LoadDialogTab>;
4
7
  }
5
- export declare function LoadForm({ loadToModify, isModification, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, }: Readonly<LoadFormProps>): import("react").JSX.Element;
8
+ export declare function LoadForm({ loadToModify, isModification, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, useTabsReturn, }: Readonly<LoadFormProps>): import("react").JSX.Element;
6
9
  export {};
@@ -1,36 +1,32 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { Stack, Grid } from "@mui/material";
3
- import { LoadDialogTab, LOAD_TAB_FIELDS } from "./load.utils.js";
4
3
  import { LoadDialogHeader } from "./LoadDialogHeader.js";
5
4
  import { LoadDialogTabs } from "./LoadDialogTabs.js";
6
5
  import { LoadDialogTabsContent } from "./LoadDialogTabsContent.js";
7
- import { useTabsWithError } from "../../hooks/useTabsWithError.js";
8
6
  function LoadForm({
9
7
  loadToModify,
10
8
  isModification,
11
9
  voltageLevelOptions,
12
10
  fetchBusesOrBusbarSections,
13
- PositionDiagramPane
11
+ PositionDiagramPane,
12
+ useTabsReturn
14
13
  }) {
15
- const { tabIndex, setTabIndex, tabIndexesWithError } = useTabsWithError(
16
- LOAD_TAB_FIELDS,
17
- LoadDialogTab.CONNECTIVITY_TAB
18
- );
14
+ const { selectedTab, tabsWithError, onTabChange } = useTabsReturn;
19
15
  return /* @__PURE__ */ jsxs(Stack, { spacing: 2, children: [
20
16
  /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(LoadDialogHeader, { loadToModify, isModification }) }),
21
17
  /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
22
18
  LoadDialogTabs,
23
19
  {
24
- tabIndex,
25
- tabIndexesWithError,
26
- setTabIndex,
20
+ tabIndex: selectedTab,
21
+ tabIndexesWithError: tabsWithError,
22
+ onTabChange,
27
23
  isModification
28
24
  }
29
25
  ) }),
30
26
  /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
31
27
  LoadDialogTabsContent,
32
28
  {
33
- tabIndex,
29
+ tabIndex: selectedTab,
34
30
  loadToModify,
35
31
  isModification,
36
32
  voltageLevelOptions,