@gridsuite/commons-ui 0.186.0 → 0.187.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 (76) hide show
  1. package/dist/components/index.js +16 -12
  2. package/dist/components/network-modifications/common/connectivity/connectivityForm.utils.d.ts +1 -1
  3. package/dist/components/network-modifications/index.d.ts +1 -1
  4. package/dist/components/network-modifications/index.js +44 -12
  5. package/dist/components/network-modifications/load/common/LoadDialogTabs.js +1 -1
  6. package/dist/components/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +138 -0
  7. package/dist/components/network-modifications/{voltage-level → voltageLevel}/creation/index.d.ts +1 -2
  8. package/dist/components/network-modifications/voltageLevel/creation/index.js +57 -0
  9. package/dist/components/network-modifications/voltageLevel/creation/tabs/characteristicsTab/CharacteristicsTab.d.ts +1 -0
  10. package/dist/components/network-modifications/voltageLevel/creation/tabs/characteristicsTab/CharacteristicsTab.js +93 -0
  11. package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/characteristicsTab}/index.d.ts +1 -2
  12. package/dist/components/network-modifications/voltageLevel/creation/tabs/characteristicsTab/index.js +4 -0
  13. package/dist/components/network-modifications/voltageLevel/creation/tabs/index.d.ts +9 -0
  14. package/dist/components/network-modifications/voltageLevel/creation/tabs/index.js +10 -0
  15. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/StructureTab.d.ts +1 -0
  16. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/StructureTab.js +60 -0
  17. package/dist/components/network-modifications/{voltage-level/creation/coupling-omnibus → voltageLevel/creation/tabs/structureTab/couplingOmnibus}/CouplingOmnibusCreation.d.ts +1 -1
  18. package/dist/components/network-modifications/{voltage-level/creation/coupling-omnibus → voltageLevel/creation/tabs/structureTab/couplingOmnibus}/CouplingOmnibusCreation.js +6 -6
  19. package/dist/components/network-modifications/{voltage-level/creation/coupling-omnibus → voltageLevel/creation/tabs/structureTab/couplingOmnibus}/CouplingOmnibusForm.js +16 -16
  20. package/dist/components/network-modifications/{voltage-level/creation/coupling-omnibus → voltageLevel/creation/tabs/structureTab/couplingOmnibus}/index.d.ts +0 -1
  21. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/couplingOmnibus/index.js +4 -0
  22. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/index.d.ts +8 -0
  23. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/index.js +6 -0
  24. package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/SwitchesBetweenSections.js +19 -17
  25. package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/CreateSwitchesDialog.d.ts +1 -1
  26. package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/CreateSwitchesDialog.js +16 -16
  27. package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/CreateSwitchesDialogSubmitButton.d.ts +1 -1
  28. package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/CreateSwitchesForm.js +16 -16
  29. package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/createSwitchesDialog.utils.d.ts +1 -1
  30. package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/createSwitchesDialog.utils.js +5 -5
  31. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/index.d.ts +7 -0
  32. package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/index.js +0 -2
  33. package/dist/components/network-modifications/{voltage-level/creation/substation-creation → voltageLevel/creation/tabs/substationTab}/SubstationCreationSection.d.ts +1 -2
  34. package/dist/components/network-modifications/{voltage-level/creation/substation-creation → voltageLevel/creation/tabs/substationTab}/SubstationCreationSection.js +24 -26
  35. package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.d.ts +5 -0
  36. package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.js +81 -0
  37. package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/index.d.ts +7 -0
  38. package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/index.js +4 -0
  39. package/dist/components/network-modifications/voltageLevel/creation/voltageLevel.constants.d.ts +12 -0
  40. package/dist/components/network-modifications/voltageLevel/creation/voltageLevel.constants.js +9 -0
  41. package/dist/components/network-modifications/{voltage-level → voltageLevel}/creation/voltageLevelCreation.utils.d.ts +4 -0
  42. package/dist/components/network-modifications/{voltage-level → voltageLevel}/creation/voltageLevelCreation.utils.js +16 -0
  43. package/dist/components/network-modifications/voltageLevel/index.js +64 -0
  44. package/dist/index.js +57 -56
  45. package/dist/translations/en/networkModificationsEn.d.ts +6 -3
  46. package/dist/translations/en/networkModificationsEn.js +8 -4
  47. package/dist/translations/fr/networkModificationsFr.d.ts +6 -3
  48. package/dist/translations/fr/networkModificationsFr.js +9 -5
  49. package/dist/utils/types/metadata.d.ts +1 -0
  50. package/package.json +1 -1
  51. package/dist/components/network-modifications/voltage-level/creation/VoltageLevelCreationForm.js +0 -174
  52. package/dist/components/network-modifications/voltage-level/creation/coupling-omnibus/index.js +0 -6
  53. package/dist/components/network-modifications/voltage-level/creation/index.js +0 -24
  54. package/dist/components/network-modifications/voltage-level/creation/substation-creation/SubstationAutocompleteAddButton.d.ts +0 -5
  55. package/dist/components/network-modifications/voltage-level/creation/substation-creation/SubstationAutocompleteAddButton.js +0 -79
  56. package/dist/components/network-modifications/voltage-level/index.js +0 -31
  57. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/creation/VoltageLevelCreationForm.d.ts +0 -0
  58. /package/dist/components/network-modifications/{voltage-level/creation/coupling-omnibus → voltageLevel/creation/tabs/structureTab/couplingOmnibus}/CouplingOmnibusForm.d.ts +0 -0
  59. /package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/SwitchesBetweenSections.d.ts +0 -0
  60. /package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/CreateSwitchesDialogSubmitButton.js +0 -0
  61. /package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/CreateSwitchesForm.d.ts +0 -0
  62. /package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/index.d.ts +0 -0
  63. /package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/index.js +0 -0
  64. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/creation/voltageLevelCreation.types.d.ts +0 -0
  65. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/creation/voltageLevelCreation.types.js +0 -0
  66. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/index.d.ts +0 -0
  67. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/VoltageLevelModificationForm.d.ts +0 -0
  68. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/VoltageLevelModificationForm.js +0 -0
  69. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/index.d.ts +0 -0
  70. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/index.js +0 -0
  71. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/voltageLevelModification.types.d.ts +0 -0
  72. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/voltageLevelModification.types.js +0 -0
  73. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/voltageLevelModification.utils.d.ts +0 -0
  74. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/voltageLevelModification.utils.js +0 -0
  75. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/voltage-level.type.d.ts +0 -0
  76. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/voltage-level.type.js +0 -0
@@ -4,37 +4,37 @@ import { useFormContext } from "react-hook-form";
4
4
  import { CouplingOmnibusCreation } from "./CouplingOmnibusCreation.js";
5
5
  import "react-intl";
6
6
  import "@mui/material";
7
- import "../../../../overflowableText/OverflowableText.js";
8
- import { FieldConstants } from "../../../../../utils/constants/fieldConstants.js";
9
- import "../../../../../utils/conversionUtils.js";
10
- import "../../../../../utils/types/equipmentType.js";
7
+ import "../../../../../../overflowableText/OverflowableText.js";
8
+ import { FieldConstants } from "../../../../../../../utils/constants/fieldConstants.js";
9
+ import "../../../../../../../utils/conversionUtils.js";
10
+ import "../../../../../../../utils/types/equipmentType.js";
11
11
  import "@mui/icons-material";
12
- import "../../../../../utils/yupConfig.js";
13
- import { fetchBusBarSectionsForNewCoupler } from "../../../../../services/networkModification.js";
12
+ import "../../../../../../../utils/yupConfig.js";
13
+ import { fetchBusBarSectionsForNewCoupler } from "../../../../../../../services/networkModification.js";
14
14
  import "localized-countries";
15
15
  import "localized-countries/data/fr";
16
16
  import "localized-countries/data/en";
17
17
  import "notistack";
18
- import "../../../../inputs/reactHookForm/provider/CustomFormProvider.js";
18
+ import "../../../../../../inputs/reactHookForm/provider/CustomFormProvider.js";
19
19
  import "yup";
20
- import "../../../../treeViewFinder/TreeViewFinder.js";
21
- import "../../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
22
- import "../../../../customAGGrid/customAggrid.js";
20
+ import "../../../../../../treeViewFinder/TreeViewFinder.js";
21
+ import "../../../../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
22
+ import "../../../../../../customAGGrid/customAggrid.js";
23
23
  import "ag-grid-community";
24
24
  import "react-papaparse";
25
25
  import "react-csv-downloader";
26
- import "../../../../inputs/reactHookForm/numbers/RangeInput.js";
26
+ import "../../../../../../inputs/reactHookForm/numbers/RangeInput.js";
27
27
  import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
28
28
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
29
29
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
30
30
  import "@material-symbols/svg-400/outlined/add_notes.svg?react";
31
- import "../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
32
- import { ExpandableInput } from "../../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
31
+ import "../../../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
32
+ import { ExpandableInput } from "../../../../../../inputs/reactHookForm/expandableInput/ExpandableInput.js";
33
33
  import "@react-querybuilder/material";
34
- import "../../../../filter/expert/expertFilterConstants.js";
35
- import "../../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
34
+ import "../../../../../../filter/expert/expertFilterConstants.js";
35
+ import "../../../../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
36
36
  import "uuid";
37
- import "../../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
37
+ import "../../../../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
38
38
  import "react-querybuilder";
39
39
  function CouplingOmnibusForm() {
40
40
  const { setValue, subscribe, trigger, getValues, formState } = useFormContext();
@@ -5,4 +5,3 @@
5
5
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
6
  */
7
7
  export { CouplingOmnibusForm } from './CouplingOmnibusForm';
8
- export { CouplingOmnibusCreation } from './CouplingOmnibusCreation';
@@ -0,0 +1,4 @@
1
+ import { CouplingOmnibusForm } from "./CouplingOmnibusForm.js";
2
+ export {
3
+ CouplingOmnibusForm
4
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright (c) 2026, RTE (http://www.rte-france.com)
3
+ * This Source Code Form is subject to the terms of the Mozilla Public
4
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
5
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
+ */
7
+ export { SwitchesBetweenSections } from './switchesBetweenSections';
8
+ export { StructureTab } from './StructureTab';
@@ -0,0 +1,6 @@
1
+ import { SwitchesBetweenSections } from "./switchesBetweenSections/SwitchesBetweenSections.js";
2
+ import { StructureTab } from "./StructureTab.js";
3
+ export {
4
+ StructureTab,
5
+ SwitchesBetweenSections
6
+ };
@@ -4,39 +4,40 @@ import { useState, useCallback, useRef, useEffect } from "react";
4
4
  import { useFormContext, useWatch } from "react-hook-form";
5
5
  import { useIntl } from "react-intl";
6
6
  import { ArrowDropDown } from "@mui/icons-material";
7
- import { FieldConstants } from "../../../../../utils/constants/fieldConstants.js";
8
- import "../../../../../utils/conversionUtils.js";
9
- import "../../../../../utils/types/equipmentType.js";
10
- import "../../../../../utils/yupConfig.js";
11
- import { SwitchKind } from "../voltageLevelCreation.types.js";
12
- import GridItem from "../../../../grid/grid-item.js";
13
- import "../../../../overflowableText/OverflowableText.js";
7
+ import { FieldConstants } from "../../../../../../../utils/constants/fieldConstants.js";
8
+ import "../../../../../../../utils/conversionUtils.js";
9
+ import "../../../../../../../utils/types/equipmentType.js";
10
+ import "../../../../../../../utils/yupConfig.js";
11
+ import { SwitchKind } from "../../../voltageLevelCreation.types.js";
12
+ import GridItem from "../../../../../../grid/grid-item.js";
13
+ import "../../../../../../overflowableText/OverflowableText.js";
14
14
  import "localized-countries";
15
15
  import "localized-countries/data/fr";
16
16
  import "localized-countries/data/en";
17
17
  import "notistack";
18
- import "../../../../inputs/reactHookForm/provider/CustomFormProvider.js";
18
+ import "../../../../../../inputs/reactHookForm/provider/CustomFormProvider.js";
19
19
  import "yup";
20
- import "../../../../treeViewFinder/TreeViewFinder.js";
21
- import "../../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
22
- import "../../../../customAGGrid/customAggrid.js";
20
+ import "../../../../../../treeViewFinder/TreeViewFinder.js";
21
+ import "../../../../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
22
+ import "../../../../../../customAGGrid/customAggrid.js";
23
23
  import "ag-grid-community";
24
24
  import "react-papaparse";
25
25
  import "react-csv-downloader";
26
- import { TextInput } from "../../../../inputs/reactHookForm/text/TextInput.js";
27
- import "../../../../inputs/reactHookForm/numbers/RangeInput.js";
26
+ import { TextInput } from "../../../../../../inputs/reactHookForm/text/TextInput.js";
27
+ import "../../../../../../inputs/reactHookForm/numbers/RangeInput.js";
28
28
  import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
29
29
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
30
30
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
31
31
  import "@material-symbols/svg-400/outlined/add_notes.svg?react";
32
- import "../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
32
+ import "../../../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
33
33
  import "@react-querybuilder/material";
34
- import "../../../../filter/expert/expertFilterConstants.js";
35
- import "../../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
34
+ import "../../../../../../filter/expert/expertFilterConstants.js";
35
+ import "../../../../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
36
36
  import "uuid";
37
- import "../../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
37
+ import "../../../../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
38
38
  import "react-querybuilder";
39
39
  import { CreateSwitchesDialog } from "./creation/CreateSwitchesDialog.js";
40
+ import GridSection from "../../../../../../grid/grid-section.js";
40
41
  function SwitchesBetweenSections() {
41
42
  const { getValues, setValue } = useFormContext();
42
43
  const [openCreateSwitchesDialog, setOpenCreateSwitchesDialog] = useState(false);
@@ -91,6 +92,7 @@ function SwitchesBetweenSections() {
91
92
  return null;
92
93
  }
93
94
  return /* @__PURE__ */ jsxs(Fragment, { children: [
95
+ /* @__PURE__ */ jsx(GridSection, { title: "SwitchesBetweenSections" }),
94
96
  /* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(
95
97
  TextInput,
96
98
  {
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { CreateSwitchesFormData, SwitchKindFormData } from '../../voltageLevelCreation.types';
2
+ import { CreateSwitchesFormData, SwitchKindFormData } from '../../../../voltageLevelCreation.types';
3
3
  interface CreateSwitchesDialogProps {
4
4
  sectionCount: number;
5
5
  handleCreateSwitchesDialog: (data: CreateSwitchesFormData) => void;
@@ -4,37 +4,37 @@ import { useForm } from "react-hook-form";
4
4
  import { yupResolver } from "@hookform/resolvers/yup";
5
5
  import { useEffect } from "react";
6
6
  import { object } from "yup";
7
- import { getCreateSwitchesValidationSchema, getCreateSwitchesEmptyFormData } from "../../voltageLevelCreation.utils.js";
8
- import { FieldConstants } from "../../../../../../utils/constants/fieldConstants.js";
9
- import "../../../../../../utils/conversionUtils.js";
10
- import "../../../../../../utils/types/equipmentType.js";
7
+ import { getCreateSwitchesValidationSchema, getCreateSwitchesEmptyFormData } from "../../../../voltageLevelCreation.utils.js";
8
+ import { FieldConstants } from "../../../../../../../../utils/constants/fieldConstants.js";
9
+ import "../../../../../../../../utils/conversionUtils.js";
10
+ import "../../../../../../../../utils/types/equipmentType.js";
11
11
  import "@mui/icons-material";
12
- import "../../../../../../utils/yupConfig.js";
12
+ import "../../../../../../../../utils/yupConfig.js";
13
13
  import "react-intl";
14
- import "../../../../../overflowableText/OverflowableText.js";
14
+ import "../../../../../../../overflowableText/OverflowableText.js";
15
15
  import "localized-countries";
16
16
  import "localized-countries/data/fr";
17
17
  import "localized-countries/data/en";
18
18
  import "notistack";
19
- import { CustomFormProvider } from "../../../../../inputs/reactHookForm/provider/CustomFormProvider.js";
20
- import { CancelButton } from "../../../../../inputs/reactHookForm/utils/CancelButton.js";
21
- import "../../../../../treeViewFinder/TreeViewFinder.js";
22
- import "../../../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
23
- import "../../../../../customAGGrid/customAggrid.js";
19
+ import { CustomFormProvider } from "../../../../../../../inputs/reactHookForm/provider/CustomFormProvider.js";
20
+ import { CancelButton } from "../../../../../../../inputs/reactHookForm/utils/CancelButton.js";
21
+ import "../../../../../../../treeViewFinder/TreeViewFinder.js";
22
+ import "../../../../../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
23
+ import "../../../../../../../customAGGrid/customAggrid.js";
24
24
  import "ag-grid-community";
25
25
  import "react-papaparse";
26
26
  import "react-csv-downloader";
27
- import "../../../../../inputs/reactHookForm/numbers/RangeInput.js";
27
+ import "../../../../../../../inputs/reactHookForm/numbers/RangeInput.js";
28
28
  import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
29
29
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
30
30
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
31
31
  import "@material-symbols/svg-400/outlined/add_notes.svg?react";
32
- import "../../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
32
+ import "../../../../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
33
33
  import "@react-querybuilder/material";
34
- import "../../../../../filter/expert/expertFilterConstants.js";
35
- import "../../../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
34
+ import "../../../../../../../filter/expert/expertFilterConstants.js";
35
+ import "../../../../../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
36
36
  import "uuid";
37
- import "../../../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
37
+ import "../../../../../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
38
38
  import "react-querybuilder";
39
39
  import CreateSwitchesForm from "./CreateSwitchesForm.js";
40
40
  import { CreateSwitchesDialogSubmitButton } from "./CreateSwitchesDialogSubmitButton.js";
@@ -1,4 +1,4 @@
1
- import { CreateSwitchesFormData } from '../../voltageLevelCreation.types';
1
+ import { CreateSwitchesFormData } from '../../../../voltageLevelCreation.types';
2
2
  interface CreateSwitchesDialogSubmitButtonProps {
3
3
  handleSave: (data: CreateSwitchesFormData) => void | Promise<void>;
4
4
  }
@@ -2,38 +2,38 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { DialogTitle, DialogContent, Grid } from "@mui/material";
3
3
  import { useFieldArray } from "react-hook-form";
4
4
  import { FormattedMessage } from "react-intl";
5
- import { FieldConstants } from "../../../../../../utils/constants/fieldConstants.js";
6
- import "../../../../../../utils/conversionUtils.js";
7
- import "../../../../../../utils/types/equipmentType.js";
5
+ import { FieldConstants } from "../../../../../../../../utils/constants/fieldConstants.js";
6
+ import "../../../../../../../../utils/conversionUtils.js";
7
+ import "../../../../../../../../utils/types/equipmentType.js";
8
8
  import "@mui/icons-material";
9
- import "../../../../../../utils/yupConfig.js";
10
- import { SWITCH_TYPE } from "../../voltageLevelCreation.utils.js";
11
- import "../../../../../overflowableText/OverflowableText.js";
9
+ import "../../../../../../../../utils/yupConfig.js";
10
+ import { SWITCH_TYPE } from "../../../../voltageLevelCreation.utils.js";
11
+ import "../../../../../../../overflowableText/OverflowableText.js";
12
12
  import "react";
13
13
  import "localized-countries";
14
14
  import "localized-countries/data/fr";
15
15
  import "localized-countries/data/en";
16
16
  import "notistack";
17
- import "../../../../../inputs/reactHookForm/provider/CustomFormProvider.js";
17
+ import "../../../../../../../inputs/reactHookForm/provider/CustomFormProvider.js";
18
18
  import "yup";
19
- import "../../../../../treeViewFinder/TreeViewFinder.js";
20
- import "../../../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
21
- import "../../../../../customAGGrid/customAggrid.js";
19
+ import "../../../../../../../treeViewFinder/TreeViewFinder.js";
20
+ import "../../../../../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
21
+ import "../../../../../../../customAGGrid/customAggrid.js";
22
22
  import "ag-grid-community";
23
23
  import "react-papaparse";
24
24
  import "react-csv-downloader";
25
- import "../../../../../inputs/reactHookForm/numbers/RangeInput.js";
26
- import { EnumInput } from "../../../../../inputs/reactHookForm/selectInputs/EnumInput.js";
25
+ import "../../../../../../../inputs/reactHookForm/numbers/RangeInput.js";
26
+ import { EnumInput } from "../../../../../../../inputs/reactHookForm/selectInputs/EnumInput.js";
27
27
  import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
28
28
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
29
29
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
30
30
  import "@material-symbols/svg-400/outlined/add_notes.svg?react";
31
- import "../../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
31
+ import "../../../../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
32
32
  import "@react-querybuilder/material";
33
- import "../../../../../filter/expert/expertFilterConstants.js";
34
- import "../../../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
33
+ import "../../../../../../../filter/expert/expertFilterConstants.js";
34
+ import "../../../../../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
35
35
  import "uuid";
36
- import "../../../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
36
+ import "../../../../../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
37
37
  import "react-querybuilder";
38
38
  function CreateSwitchesForm({ id }) {
39
39
  const { fields: rows } = useFieldArray({ name: `${id}` });
@@ -1,4 +1,4 @@
1
- import { FieldConstants } from '../../../../../../utils';
1
+ import { FieldConstants } from '../../../../../../../../utils';
2
2
  export declare const getSwitchTypeSchema: () => import('yup').ObjectSchema<{
3
3
  switchKind: string;
4
4
  }, import('yup').AnyObject, {
@@ -1,11 +1,11 @@
1
1
  import { object, string, array } from "yup";
2
- import { FieldConstants } from "../../../../../../utils/constants/fieldConstants.js";
3
- import { YUP_REQUIRED } from "../../../../../../utils/constants/translationKeys.js";
4
- import "../../../../../../utils/conversionUtils.js";
5
- import "../../../../../../utils/types/equipmentType.js";
2
+ import { FieldConstants } from "../../../../../../../../utils/constants/fieldConstants.js";
3
+ import { YUP_REQUIRED } from "../../../../../../../../utils/constants/translationKeys.js";
4
+ import "../../../../../../../../utils/conversionUtils.js";
5
+ import "../../../../../../../../utils/types/equipmentType.js";
6
6
  import "react/jsx-runtime";
7
7
  import "@mui/icons-material";
8
- import "../../../../../../utils/yupConfig.js";
8
+ import "../../../../../../../../utils/yupConfig.js";
9
9
  const getSwitchTypeSchema = () => object().shape({
10
10
  [FieldConstants.SWITCH_KIND]: string().nullable().required(YUP_REQUIRED)
11
11
  });
@@ -0,0 +1,7 @@
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 { SwitchesBetweenSections } from './SwitchesBetweenSections';
@@ -1,6 +1,4 @@
1
- import { CreateSwitchesDialog } from "./creation/CreateSwitchesDialog.js";
2
1
  import { SwitchesBetweenSections } from "./SwitchesBetweenSections.js";
3
2
  export {
4
- CreateSwitchesDialog,
5
3
  SwitchesBetweenSections
6
4
  };
@@ -1,6 +1,5 @@
1
- interface SubstationCreationSectionProps {
1
+ export interface SubstationCreationSectionProps {
2
2
  showDeleteButton?: boolean;
3
3
  onDelete?: () => void;
4
4
  }
5
5
  export declare function SubstationCreationSection({ showDeleteButton, onDelete, }: Readonly<SubstationCreationSectionProps>): import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,59 +1,57 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { useIntl } from "react-intl";
2
3
  import { Grid, Tooltip, IconButton } from "@mui/material";
3
4
  import { Delete } from "@mui/icons-material";
4
- import { useIntl } from "react-intl";
5
- import "../../../../overflowableText/OverflowableText.js";
6
- import { FieldConstants } from "../../../../../utils/constants/fieldConstants.js";
7
- import "../../../../../utils/conversionUtils.js";
8
- import "../../../../../utils/types/equipmentType.js";
9
- import "../../../../../utils/yupConfig.js";
5
+ import "../../../../../overflowableText/OverflowableText.js";
6
+ import { FieldConstants } from "../../../../../../utils/constants/fieldConstants.js";
7
+ import "../../../../../../utils/conversionUtils.js";
8
+ import "../../../../../../utils/types/equipmentType.js";
9
+ import "../../../../../../utils/yupConfig.js";
10
10
  import "react";
11
11
  import "react-hook-form";
12
12
  import "localized-countries";
13
13
  import "localized-countries/data/fr";
14
14
  import "localized-countries/data/en";
15
15
  import "notistack";
16
- import "../../../../inputs/reactHookForm/provider/CustomFormProvider.js";
16
+ import "../../../../../inputs/reactHookForm/provider/CustomFormProvider.js";
17
17
  import "yup";
18
- import "../../../../treeViewFinder/TreeViewFinder.js";
19
- import "../../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
20
- import "../../../../customAGGrid/customAggrid.js";
18
+ import "../../../../../treeViewFinder/TreeViewFinder.js";
19
+ import "../../../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
20
+ import "../../../../../customAGGrid/customAggrid.js";
21
21
  import "ag-grid-community";
22
22
  import "react-papaparse";
23
23
  import "react-csv-downloader";
24
- import { TextInput } from "../../../../inputs/reactHookForm/text/TextInput.js";
25
- import "../../../../inputs/reactHookForm/numbers/RangeInput.js";
24
+ import { TextInput } from "../../../../../inputs/reactHookForm/text/TextInput.js";
25
+ import "../../../../../inputs/reactHookForm/numbers/RangeInput.js";
26
26
  import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
27
27
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
28
28
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
29
29
  import "@material-symbols/svg-400/outlined/add_notes.svg?react";
30
- import "../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
31
- import { CountrySelectionInput } from "../../../../inputs/reactHookForm/CountrySelectionInput.js";
30
+ import "../../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
31
+ import { CountrySelectionInput } from "../../../../../inputs/reactHookForm/CountrySelectionInput.js";
32
32
  import "@react-querybuilder/material";
33
- import "../../../../filter/expert/expertFilterConstants.js";
34
- import "../../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
33
+ import "../../../../../filter/expert/expertFilterConstants.js";
34
+ import "../../../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
35
35
  import "uuid";
36
- import "../../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
36
+ import "../../../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
37
37
  import "react-querybuilder";
38
- import { PropertiesForm } from "../../../common/properties/PropertiesForm.js";
39
- import GridSection from "../../../../grid/grid-section.js";
40
- import { LineSeparator } from "../../../../parameters/common/line-separator.js";
38
+ import GridSection from "../../../../../grid/grid-section.js";
39
+ import { PropertiesForm } from "../../../../common/properties/PropertiesForm.js";
40
+ import "../../../../common/properties/propertyUtils.js";
41
41
  function SubstationCreationSection({
42
42
  showDeleteButton = true,
43
43
  onDelete
44
44
  }) {
45
45
  const intl = useIntl();
46
- return /* @__PURE__ */ jsxs(Grid, { children: [
47
- /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, container: true, spacing: 2 }),
48
- /* @__PURE__ */ jsx(GridSection, { title: intl.formatMessage({ id: "CreateSubstation" }) }),
46
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
47
+ /* @__PURE__ */ jsx(GridSection, { title: "CreateSubstation" }),
49
48
  /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
50
49
  /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.SUBSTATION_CREATION_ID, label: "SubstationId" }) }),
51
50
  /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.SUBSTATION_NAME, label: "substationName" }) }),
52
51
  /* @__PURE__ */ jsx(Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsx(CountrySelectionInput, { name: FieldConstants.COUNTRY, label: "Country", size: "small" }) }),
53
52
  showDeleteButton && onDelete && /* @__PURE__ */ jsx(Grid, { item: true, xs: 1, children: /* @__PURE__ */ jsx(Tooltip, { title: intl.formatMessage({ id: "DeleteRows" }), children: /* @__PURE__ */ jsx(IconButton, { onClick: onDelete, children: /* @__PURE__ */ jsx(Delete, {}) }) }) })
54
53
  ] }),
55
- /* @__PURE__ */ jsx(PropertiesForm, { id: FieldConstants.SUBSTATION_CREATION, networkElementType: "substation" }),
56
- /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, paddingTop: 2, children: /* @__PURE__ */ jsx(LineSeparator, {}) })
54
+ /* @__PURE__ */ jsx(PropertiesForm, { id: FieldConstants.SUBSTATION_CREATION, networkElementType: "substation" })
57
55
  ] });
58
56
  }
59
57
  export {
@@ -0,0 +1,5 @@
1
+ import { SubstationCreationSectionProps } from './SubstationCreationSection';
2
+ export interface SubstationTabContentProps extends Pick<SubstationCreationSectionProps, 'showDeleteButton'> {
3
+ substationOptions?: string[];
4
+ }
5
+ export declare function SubstationTab({ substationOptions, showDeleteButton }: Readonly<SubstationTabContentProps>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,81 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useWatch, useFormContext } from "react-hook-form";
3
+ import { FormattedMessage } from "react-intl";
4
+ import { Grid, Button } from "@mui/material";
5
+ import { useCallback, useEffect } from "react";
6
+ import { ControlPoint } from "@mui/icons-material";
7
+ import { FieldConstants } from "../../../../../../utils/constants/fieldConstants.js";
8
+ import "../../../../../../utils/conversionUtils.js";
9
+ import "../../../../../../utils/types/equipmentType.js";
10
+ import "../../../../../../utils/yupConfig.js";
11
+ import { fetchDefaultCountry } from "../../../../../../services/appsMetadata.js";
12
+ import "../../../../../overflowableText/OverflowableText.js";
13
+ import "localized-countries";
14
+ import "localized-countries/data/fr";
15
+ import "localized-countries/data/en";
16
+ import "notistack";
17
+ import "../../../../../inputs/reactHookForm/provider/CustomFormProvider.js";
18
+ import "yup";
19
+ import "../../../../../treeViewFinder/TreeViewFinder.js";
20
+ import "../../../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
21
+ import "../../../../../customAGGrid/customAggrid.js";
22
+ import "ag-grid-community";
23
+ import "react-papaparse";
24
+ import "react-csv-downloader";
25
+ import { AutocompleteInput } from "../../../../../inputs/reactHookForm/autocompleteInputs/AutocompleteInput.js";
26
+ import { TextInput } from "../../../../../inputs/reactHookForm/text/TextInput.js";
27
+ import "../../../../../inputs/reactHookForm/numbers/RangeInput.js";
28
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
29
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
30
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
31
+ import "@material-symbols/svg-400/outlined/add_notes.svg?react";
32
+ import "../../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
33
+ import "@react-querybuilder/material";
34
+ import "../../../../../filter/expert/expertFilterConstants.js";
35
+ import "../../../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
36
+ import "uuid";
37
+ import "../../../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
38
+ import "react-querybuilder";
39
+ import { SubstationCreationSection } from "./SubstationCreationSection.js";
40
+ function SubstationTab({ substationOptions, showDeleteButton }) {
41
+ const watchAddSubstationCreation = useWatch({ name: FieldConstants.ADD_SUBSTATION_CREATION });
42
+ const { setValue, getValues } = useFormContext();
43
+ const handleDeleteSubstationCreation = useCallback(() => {
44
+ setValue(FieldConstants.ADD_SUBSTATION_CREATION, false);
45
+ setValue(FieldConstants.SUBSTATION_CREATION_ID, null);
46
+ setValue(FieldConstants.SUBSTATION_NAME, null);
47
+ setValue(FieldConstants.COUNTRY, null);
48
+ }, [setValue]);
49
+ const handleCreateSubstation = useCallback(() => {
50
+ setValue(FieldConstants.ADD_SUBSTATION_CREATION, true);
51
+ }, [setValue]);
52
+ useEffect(() => {
53
+ if (watchAddSubstationCreation && !getValues(FieldConstants.COUNTRY)) {
54
+ fetchDefaultCountry().then((country) => {
55
+ if (country) {
56
+ setValue(FieldConstants.COUNTRY, country);
57
+ }
58
+ });
59
+ }
60
+ }, [setValue, getValues, watchAddSubstationCreation]);
61
+ return watchAddSubstationCreation ? /* @__PURE__ */ jsx(SubstationCreationSection, { showDeleteButton, onDelete: handleDeleteSubstationCreation }) : /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, my: 2, children: [
62
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 6, children: substationOptions ? /* @__PURE__ */ jsx(
63
+ AutocompleteInput,
64
+ {
65
+ name: FieldConstants.SUBSTATION_ID,
66
+ label: "SUBSTATION",
67
+ openOnFocus: true,
68
+ forcePopupIcon: true,
69
+ options: substationOptions,
70
+ size: "small",
71
+ allowNewValue: false,
72
+ noOptionsText: ""
73
+ }
74
+ ) : /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.SUBSTATION_ID, label: "SUBSTATION" }) }),
75
+ /* @__PURE__ */ jsx(Grid, { item: true, mt: 0.75, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "Or" }) }),
76
+ /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(Button, { variant: "text", color: "primary", startIcon: /* @__PURE__ */ jsx(ControlPoint, {}), onClick: handleCreateSubstation, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "CreateSubstation" }) }) })
77
+ ] });
78
+ }
79
+ export {
80
+ SubstationTab
81
+ };
@@ -0,0 +1,7 @@
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 { SubstationTab, type SubstationTabContentProps } from './SubstationTab';
@@ -0,0 +1,4 @@
1
+ import { SubstationTab } from "./SubstationTab.js";
2
+ export {
3
+ SubstationTab
4
+ };
@@ -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 declare const VoltageLevelTab: {
8
+ SUBSTATION_TAB: number;
9
+ CHARACTERISTICS_TAB: number;
10
+ STRUCTURE_TAB: number;
11
+ ADDITIONAL_INFORMATION_TAB: number;
12
+ };
@@ -0,0 +1,9 @@
1
+ const VoltageLevelTab = {
2
+ SUBSTATION_TAB: 0,
3
+ CHARACTERISTICS_TAB: 1,
4
+ STRUCTURE_TAB: 2,
5
+ ADDITIONAL_INFORMATION_TAB: 3
6
+ };
7
+ export {
8
+ VoltageLevelTab
9
+ };
@@ -153,3 +153,7 @@ export declare const voltageLevelCreationDtoToForm: (voltageLevelDto: VoltageLev
153
153
  hideNominalVoltage: boolean;
154
154
  hideBusBarSection: boolean;
155
155
  };
156
+ export declare function isSubstationTabError(errors: Record<string, unknown> | undefined): {};
157
+ export declare function isCharacteristicsTabError(errors: Record<string, unknown> | undefined): {};
158
+ export declare function isStructureTabError(errors: Record<string, unknown> | undefined): {};
159
+ export declare function isAdditionalInformationTabError(errors: Record<string, unknown> | undefined): boolean;
@@ -235,11 +235,27 @@ const voltageLevelCreationDtoToForm = (voltageLevelDto, intl, includePreviousVal
235
235
  ...getPropertiesFromModification(voltageLevelDto.properties, includePreviousValue)
236
236
  };
237
237
  };
238
+ function isSubstationTabError(errors) {
239
+ return errors?.[FieldConstants.ADD_SUBSTATION_CREATION] !== void 0 || errors?.[FieldConstants.SUBSTATION_ID] !== void 0 || errors?.[FieldConstants.SUBSTATION_NAME] !== void 0 || errors?.[FieldConstants.SUBSTATION_CREATION_ID] !== void 0 || errors?.[FieldConstants.SUBSTATION_CREATION] || errors?.[FieldConstants.COUNTRY] !== void 0;
240
+ }
241
+ function isCharacteristicsTabError(errors) {
242
+ return errors?.[FieldConstants.HIDE_NOMINAL_VOLTAGE] !== void 0 || errors?.[FieldConstants.NOMINAL_V] !== void 0 || errors?.[FieldConstants.LOW_VOLTAGE_LIMIT] !== void 0 || errors?.[FieldConstants.HIGH_VOLTAGE_LIMIT] !== void 0 || errors?.[FieldConstants.LOW_SHORT_CIRCUIT_CURRENT_LIMIT] || errors?.[FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT] !== void 0;
243
+ }
244
+ function isStructureTabError(errors) {
245
+ return errors?.[FieldConstants.HIDE_BUS_BAR_SECTION] !== void 0 || errors?.[FieldConstants.BUS_BAR_COUNT] !== void 0 || errors?.[FieldConstants.SECTION_COUNT] !== void 0 || errors?.[FieldConstants.SWITCHES_BETWEEN_SECTIONS] !== void 0 || errors?.[FieldConstants.SWITCH_KINDS] || errors?.[FieldConstants.TOPOLOGY_KIND] !== void 0 || errors?.[FieldConstants.COUPLING_OMNIBUS] !== void 0;
246
+ }
247
+ function isAdditionalInformationTabError(errors) {
248
+ return errors?.[FieldConstants.ADDITIONAL_PROPERTIES] !== void 0;
249
+ }
238
250
  export {
239
251
  SWITCH_TYPE,
240
252
  buildNewBusbarSections,
241
253
  getCreateSwitchesEmptyFormData,
242
254
  getCreateSwitchesValidationSchema,
255
+ isAdditionalInformationTabError,
256
+ isCharacteristicsTabError,
257
+ isStructureTabError,
258
+ isSubstationTabError,
243
259
  translateSwitchKinds,
244
260
  voltageLevelCreationDtoToForm,
245
261
  voltageLevelCreationEmptyFormData,