@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
@@ -213,15 +213,18 @@ import { SubstationCreationForm } from "./network-modifications/substation/creat
213
213
  import { substationCreationDtoToForm, substationCreationEmptyFormData, substationCreationFormSchema, substationCreationFormToDto } from "./network-modifications/substation/creation/substationCreation.utils.js";
214
214
  import { SubstationModificationForm } from "./network-modifications/substation/modification/SubstationModificationForm.js";
215
215
  import { substationModificationDtoToForm, substationModificationEmptyFormData, substationModificationFormSchema, substationModificationFormToDto } from "./network-modifications/substation/modification/substationModification.utils.js";
216
- import { CreateSwitchesDialog } from "./network-modifications/voltage-level/creation/switches-between-sections/creation/CreateSwitchesDialog.js";
217
- import { SwitchesBetweenSections } from "./network-modifications/voltage-level/creation/switches-between-sections/SwitchesBetweenSections.js";
218
- import { CouplingOmnibusForm } from "./network-modifications/voltage-level/creation/coupling-omnibus/CouplingOmnibusForm.js";
219
- import { CouplingOmnibusCreation } from "./network-modifications/voltage-level/creation/coupling-omnibus/CouplingOmnibusCreation.js";
220
- import { VoltageLevelCreationForm } from "./network-modifications/voltage-level/creation/VoltageLevelCreationForm.js";
221
- import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./network-modifications/voltage-level/creation/voltageLevelCreation.utils.js";
222
- import { SwitchKind } from "./network-modifications/voltage-level/creation/voltageLevelCreation.types.js";
223
- import { VoltageLevelModificationForm } from "./network-modifications/voltage-level/modification/VoltageLevelModificationForm.js";
224
- import { voltageLevelModificationDtoToForm, voltageLevelModificationEmptyFormData, voltageLevelModificationFormSchema, voltageLevelModificationFormToDto } from "./network-modifications/voltage-level/modification/voltageLevelModification.utils.js";
216
+ import { SwitchesBetweenSections } from "./network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js";
217
+ import "react-hook-form";
218
+ import "../utils/conversionUtils.js";
219
+ import "../utils/types/equipmentType.js";
220
+ import "@mui/icons-material";
221
+ import "../utils/yupConfig.js";
222
+ import "react";
223
+ import { VoltageLevelCreationForm } from "./network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js";
224
+ import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, isAdditionalInformationTabError, isCharacteristicsTabError, isStructureTabError, isSubstationTabError, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js";
225
+ import { SwitchKind } from "./network-modifications/voltageLevel/creation/voltageLevelCreation.types.js";
226
+ import { VoltageLevelModificationForm } from "./network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js";
227
+ import { voltageLevelModificationDtoToForm, voltageLevelModificationEmptyFormData, voltageLevelModificationFormSchema, voltageLevelModificationFormToDto } from "./network-modifications/voltageLevel/modification/voltageLevelModification.utils.js";
225
228
  import { LoadDialogTab } from "./network-modifications/load/common/load.utils.js";
226
229
  import { LoadDialogTabs } from "./network-modifications/load/common/LoadDialogTabs.js";
227
230
  import { LoadDialogTabsContent } from "./network-modifications/load/common/LoadDialogTabsContent.js";
@@ -294,10 +297,7 @@ export {
294
297
  CountriesInput,
295
298
  CountrySelectionInput,
296
299
  CountryValueEditor,
297
- CouplingOmnibusCreation,
298
- CouplingOmnibusForm,
299
300
  CreateParameterDialog,
300
- CreateSwitchesDialog,
301
301
  CsvExport,
302
302
  CsvUploader,
303
303
  CustomAGGrid,
@@ -702,9 +702,13 @@ export {
702
702
  initializedProperty,
703
703
  intlInitialVoltageProfileMode,
704
704
  intlPredefinedParametersOptions,
705
+ isAdditionalInformationTabError,
706
+ isCharacteristicsTabError,
705
707
  isFieldRequired,
706
708
  isFloatNumber,
707
709
  isIntegerNumber,
710
+ isStructureTabError,
711
+ isSubstationTabError,
708
712
  isValidComputingType,
709
713
  italicFontTextField,
710
714
  loadCreationDtoToForm,
@@ -1,4 +1,4 @@
1
- import { VoltageLevelFormInfos } from '../../voltage-level/voltage-level.type';
1
+ import { VoltageLevelFormInfos } from '../../voltageLevel/voltage-level.type';
2
2
  import { FieldConstants } from '../../../../utils';
3
3
  export declare const getConnectivityPropertiesValidationSchema: (isEquipmentModification?: boolean) => {
4
4
  voltageLevel: import('yup').ObjectSchema<{
@@ -7,6 +7,6 @@
7
7
  export * from './common';
8
8
  export * from './equipmentDeletion';
9
9
  export * from './substation';
10
- export * from './voltage-level';
10
+ export * from './voltageLevel';
11
11
  export * from './load';
12
12
  export * from './by-filter';
@@ -23,15 +23,46 @@ import { SubstationCreationForm } from "./substation/creation/SubstationCreation
23
23
  import { substationCreationDtoToForm, substationCreationEmptyFormData, substationCreationFormSchema, substationCreationFormToDto } from "./substation/creation/substationCreation.utils.js";
24
24
  import { SubstationModificationForm } from "./substation/modification/SubstationModificationForm.js";
25
25
  import { substationModificationDtoToForm, substationModificationEmptyFormData, substationModificationFormSchema, substationModificationFormToDto } from "./substation/modification/substationModification.utils.js";
26
- import { CreateSwitchesDialog } from "./voltage-level/creation/switches-between-sections/creation/CreateSwitchesDialog.js";
27
- import { SwitchesBetweenSections } from "./voltage-level/creation/switches-between-sections/SwitchesBetweenSections.js";
28
- import { CouplingOmnibusForm } from "./voltage-level/creation/coupling-omnibus/CouplingOmnibusForm.js";
29
- import { CouplingOmnibusCreation } from "./voltage-level/creation/coupling-omnibus/CouplingOmnibusCreation.js";
30
- import { VoltageLevelCreationForm } from "./voltage-level/creation/VoltageLevelCreationForm.js";
31
- import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./voltage-level/creation/voltageLevelCreation.utils.js";
32
- import { SwitchKind } from "./voltage-level/creation/voltageLevelCreation.types.js";
33
- import { VoltageLevelModificationForm } from "./voltage-level/modification/VoltageLevelModificationForm.js";
34
- import { voltageLevelModificationDtoToForm, voltageLevelModificationEmptyFormData, voltageLevelModificationFormSchema, voltageLevelModificationFormToDto } from "./voltage-level/modification/voltageLevelModification.utils.js";
26
+ import { SwitchesBetweenSections } from "./voltageLevel/creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js";
27
+ import "react/jsx-runtime";
28
+ import "@mui/material";
29
+ import "react-hook-form";
30
+ import "react-intl";
31
+ import "../overflowableText/OverflowableText.js";
32
+ import "../../utils/conversionUtils.js";
33
+ import "../../utils/types/equipmentType.js";
34
+ import "@mui/icons-material";
35
+ import "../../utils/yupConfig.js";
36
+ import "react";
37
+ import "localized-countries";
38
+ import "localized-countries/data/fr";
39
+ import "localized-countries/data/en";
40
+ import "notistack";
41
+ import "../inputs/reactHookForm/provider/CustomFormProvider.js";
42
+ import "yup";
43
+ import "../treeViewFinder/TreeViewFinder.js";
44
+ import "../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
45
+ import "../customAGGrid/customAggrid.js";
46
+ import "ag-grid-community";
47
+ import "react-papaparse";
48
+ import "react-csv-downloader";
49
+ import "../inputs/reactHookForm/numbers/RangeInput.js";
50
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
51
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
52
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
53
+ import "@material-symbols/svg-400/outlined/add_notes.svg?react";
54
+ import "../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
55
+ import "@react-querybuilder/material";
56
+ import "../filter/expert/expertFilterConstants.js";
57
+ import "../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
58
+ import "uuid";
59
+ import "../inputs/reactQueryBuilder/PropertyValueEditor.js";
60
+ import "react-querybuilder";
61
+ import { VoltageLevelCreationForm } from "./voltageLevel/creation/VoltageLevelCreationForm.js";
62
+ import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, isAdditionalInformationTabError, isCharacteristicsTabError, isStructureTabError, isSubstationTabError, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./voltageLevel/creation/voltageLevelCreation.utils.js";
63
+ import { SwitchKind } from "./voltageLevel/creation/voltageLevelCreation.types.js";
64
+ import { VoltageLevelModificationForm } from "./voltageLevel/modification/VoltageLevelModificationForm.js";
65
+ import { voltageLevelModificationDtoToForm, voltageLevelModificationEmptyFormData, voltageLevelModificationFormSchema, voltageLevelModificationFormToDto } from "./voltageLevel/modification/voltageLevelModification.utils.js";
35
66
  import { LoadDialogTab } from "./load/common/load.utils.js";
36
67
  import { LoadDialogTabs } from "./load/common/LoadDialogTabs.js";
37
68
  import { LoadDialogTabsContent } from "./load/common/LoadDialogTabsContent.js";
@@ -46,9 +77,6 @@ export {
46
77
  BranchConnectivityForm,
47
78
  ByFilterDeletionForm,
48
79
  ConnectivityForm,
49
- CouplingOmnibusCreation,
50
- CouplingOmnibusForm,
51
- CreateSwitchesDialog,
52
80
  EQUIPMENT_TYPE_ORDER,
53
81
  EquipmentDeletionForm,
54
82
  HvdcLccDeletionSpecificForm,
@@ -130,6 +158,10 @@ export {
130
158
  getSetPointsEmptyFormData,
131
159
  getSetPointsSchema,
132
160
  initializedProperty,
161
+ isAdditionalInformationTabError,
162
+ isCharacteristicsTabError,
163
+ isStructureTabError,
164
+ isSubstationTabError,
133
165
  italicFontTextField,
134
166
  loadCreationDtoToForm,
135
167
  loadCreationEmptyFormData,
@@ -29,7 +29,7 @@ function LoadDialogTabs({
29
29
  /* @__PURE__ */ jsx(
30
30
  Tab,
31
31
  {
32
- label: /* @__PURE__ */ jsx(FormattedMessage, { id: "LineCharacteristicsTab" }),
32
+ label: /* @__PURE__ */ jsx(FormattedMessage, { id: "CharacteristicsTab" }),
33
33
  sx: getTabStyle(tabIndexesWithError, LoadDialogTab.CHARACTERISTICS_TAB)
34
34
  }
35
35
  ),
@@ -0,0 +1,138 @@
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { useState, useEffect } from "react";
3
+ import { useFormState, useWatch } from "react-hook-form";
4
+ import { Grid, Tabs, Tab, Box } from "@mui/material";
5
+ import { FormattedMessage } from "react-intl";
6
+ import GridItem from "../../../grid/grid-item.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
+ import "@mui/icons-material";
12
+ import "../../../../utils/yupConfig.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 { TextInput } from "../../../inputs/reactHookForm/text/TextInput.js";
26
+ import "../../../inputs/reactHookForm/numbers/RangeInput.js";
27
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
28
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
29
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
30
+ import "@material-symbols/svg-400/outlined/add_notes.svg?react";
31
+ import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
32
+ import "@react-querybuilder/material";
33
+ import "../../../filter/expert/expertFilterConstants.js";
34
+ import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
35
+ import "uuid";
36
+ import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
37
+ import "react-querybuilder";
38
+ import { VoltageLevelTab } from "./voltageLevel.constants.js";
39
+ import { isSubstationTabError, isCharacteristicsTabError, isStructureTabError, isAdditionalInformationTabError } from "./voltageLevelCreation.utils.js";
40
+ import "./tabs/structureTab/switchesBetweenSections/creation/CreateSwitchesDialog.js";
41
+ import { StructureTab } from "./tabs/structureTab/StructureTab.js";
42
+ import { SubstationTab } from "./tabs/substationTab/SubstationTab.js";
43
+ import { CharacteristicsTab } from "./tabs/characteristicsTab/CharacteristicsTab.js";
44
+ import { PropertiesForm } from "../../common/properties/PropertiesForm.js";
45
+ import "../../common/properties/propertyUtils.js";
46
+ import { getTabIndicatorStyle, getTabStyle } from "../../../parameters/parameters-style.js";
47
+ function VoltageLevelCreationForm({
48
+ substationOptions,
49
+ showDeleteSubstationButton = true
50
+ } = {}) {
51
+ const [tabIndex, setTabIndex] = useState(0);
52
+ const [tabIndexesWithError, setTabIndexesWithError] = useState([]);
53
+ const { errors } = useFormState();
54
+ const watchHideBusBarSection = useWatch({ name: FieldConstants.HIDE_BUS_BAR_SECTION });
55
+ useEffect(() => {
56
+ const tabsInError = [];
57
+ if (isSubstationTabError(errors)) {
58
+ tabsInError.push(VoltageLevelTab.SUBSTATION_TAB);
59
+ }
60
+ if (isCharacteristicsTabError(errors)) {
61
+ tabsInError.push(VoltageLevelTab.CHARACTERISTICS_TAB);
62
+ }
63
+ if (isStructureTabError(errors)) {
64
+ tabsInError.push(VoltageLevelTab.STRUCTURE_TAB);
65
+ }
66
+ if (isAdditionalInformationTabError(errors)) {
67
+ tabsInError.push(VoltageLevelTab.ADDITIONAL_INFORMATION_TAB);
68
+ }
69
+ if (tabsInError.length > 0) {
70
+ setTabIndex((currentTabIndex) => {
71
+ return tabsInError.includes(currentTabIndex) ? currentTabIndex : tabsInError[0];
72
+ });
73
+ }
74
+ setTabIndexesWithError(tabsInError);
75
+ }, [errors]);
76
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
77
+ /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
78
+ /* @__PURE__ */ jsx(GridItem, { children: /* @__PURE__ */ jsx(
79
+ TextInput,
80
+ {
81
+ name: FieldConstants.EQUIPMENT_ID,
82
+ label: "ID",
83
+ formProps: { autoFocus: true, margin: "normal" }
84
+ }
85
+ ) }),
86
+ /* @__PURE__ */ jsx(GridItem, { children: /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.EQUIPMENT_NAME, label: "Name", formProps: { margin: "normal" } }) })
87
+ ] }),
88
+ /* @__PURE__ */ jsxs(
89
+ Tabs,
90
+ {
91
+ value: tabIndex,
92
+ variant: "scrollable",
93
+ onChange: (_, newValue) => setTabIndex(newValue),
94
+ TabIndicatorProps: {
95
+ sx: getTabIndicatorStyle(tabIndexesWithError, tabIndex)
96
+ },
97
+ children: [
98
+ /* @__PURE__ */ jsx(
99
+ Tab,
100
+ {
101
+ label: /* @__PURE__ */ jsx(FormattedMessage, { id: "ConnectivityTab" }),
102
+ sx: getTabStyle(tabIndexesWithError, VoltageLevelTab.SUBSTATION_TAB)
103
+ }
104
+ ),
105
+ /* @__PURE__ */ jsx(
106
+ Tab,
107
+ {
108
+ label: /* @__PURE__ */ jsx(FormattedMessage, { id: "CharacteristicsTab" }),
109
+ sx: getTabStyle(tabIndexesWithError, VoltageLevelTab.CHARACTERISTICS_TAB)
110
+ }
111
+ ),
112
+ /* @__PURE__ */ jsx(
113
+ Tab,
114
+ {
115
+ label: /* @__PURE__ */ jsx(FormattedMessage, { id: "StructureTab" }),
116
+ sx: getTabStyle(tabIndexesWithError, VoltageLevelTab.STRUCTURE_TAB),
117
+ disabled: watchHideBusBarSection
118
+ }
119
+ ),
120
+ /* @__PURE__ */ jsx(
121
+ Tab,
122
+ {
123
+ label: /* @__PURE__ */ jsx(FormattedMessage, { id: "AdditionalInformationTab" }),
124
+ sx: getTabStyle(tabIndexesWithError, VoltageLevelTab.ADDITIONAL_INFORMATION_TAB)
125
+ }
126
+ )
127
+ ]
128
+ }
129
+ ),
130
+ /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== VoltageLevelTab.SUBSTATION_TAB, children: /* @__PURE__ */ jsx(SubstationTab, { substationOptions, showDeleteButton: showDeleteSubstationButton }) }),
131
+ /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== VoltageLevelTab.CHARACTERISTICS_TAB, children: /* @__PURE__ */ jsx(CharacteristicsTab, {}) }),
132
+ /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== VoltageLevelTab.STRUCTURE_TAB, children: /* @__PURE__ */ jsx(StructureTab, {}) }),
133
+ /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== VoltageLevelTab.ADDITIONAL_INFORMATION_TAB, children: /* @__PURE__ */ jsx(PropertiesForm, { networkElementType: "voltageLevel" }) })
134
+ ] });
135
+ }
136
+ export {
137
+ VoltageLevelCreationForm
138
+ };
@@ -4,8 +4,7 @@
4
4
  * License, v. 2.0. If a copy of the MPL was not distributed with this
5
5
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
6
  */
7
- export * from './switches-between-sections';
8
- export * from './coupling-omnibus';
7
+ export { SwitchesBetweenSections } from './tabs';
9
8
  export * from './VoltageLevelCreationForm';
10
9
  export * from './voltageLevelCreation.utils';
11
10
  export * from './voltageLevelCreation.types';
@@ -0,0 +1,57 @@
1
+ import { SwitchesBetweenSections } from "./tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js";
2
+ import "react/jsx-runtime";
3
+ import "@mui/material";
4
+ import "react-hook-form";
5
+ import "react-intl";
6
+ import "../../../overflowableText/OverflowableText.js";
7
+ import "../../../../utils/conversionUtils.js";
8
+ import "../../../../utils/types/equipmentType.js";
9
+ import "@mui/icons-material";
10
+ import "../../../../utils/yupConfig.js";
11
+ import "react";
12
+ import "localized-countries";
13
+ import "localized-countries/data/fr";
14
+ import "localized-countries/data/en";
15
+ import "notistack";
16
+ import "../../../inputs/reactHookForm/provider/CustomFormProvider.js";
17
+ import "yup";
18
+ import "../../../treeViewFinder/TreeViewFinder.js";
19
+ import "../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
20
+ import "../../../customAGGrid/customAggrid.js";
21
+ import "ag-grid-community";
22
+ import "react-papaparse";
23
+ import "react-csv-downloader";
24
+ import "../../../inputs/reactHookForm/numbers/RangeInput.js";
25
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
26
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
27
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
28
+ import "@material-symbols/svg-400/outlined/add_notes.svg?react";
29
+ import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
30
+ import "@react-querybuilder/material";
31
+ import "../../../filter/expert/expertFilterConstants.js";
32
+ import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
33
+ import "uuid";
34
+ import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
35
+ import "react-querybuilder";
36
+ import "../../common/properties/propertyUtils.js";
37
+ import { VoltageLevelCreationForm } from "./VoltageLevelCreationForm.js";
38
+ import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, isAdditionalInformationTabError, isCharacteristicsTabError, isStructureTabError, isSubstationTabError, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./voltageLevelCreation.utils.js";
39
+ import { SwitchKind } from "./voltageLevelCreation.types.js";
40
+ export {
41
+ SWITCH_TYPE,
42
+ SwitchKind,
43
+ SwitchesBetweenSections,
44
+ VoltageLevelCreationForm,
45
+ buildNewBusbarSections,
46
+ getCreateSwitchesEmptyFormData,
47
+ getCreateSwitchesValidationSchema,
48
+ isAdditionalInformationTabError,
49
+ isCharacteristicsTabError,
50
+ isStructureTabError,
51
+ isSubstationTabError,
52
+ translateSwitchKinds,
53
+ voltageLevelCreationDtoToForm,
54
+ voltageLevelCreationEmptyFormData,
55
+ voltageLevelCreationFormSchema,
56
+ voltageLevelCreationFormToDto
57
+ };
@@ -0,0 +1 @@
1
+ export declare function CharacteristicsTab(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,93 @@
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { useWatch } from "react-hook-form";
3
+ import { Grid } from "@mui/material";
4
+ import GridSection from "../../../../../grid/grid-section.js";
5
+ import GridItem from "../../../../../grid/grid-item.js";
6
+ import { VoltageAdornment, KiloAmpereAdornment } from "../../../../../../utils/constants/adornments.js";
7
+ import { FieldConstants } from "../../../../../../utils/constants/fieldConstants.js";
8
+ import "../../../../../../utils/conversionUtils.js";
9
+ import "../../../../../../utils/types/equipmentType.js";
10
+ import "@mui/icons-material";
11
+ import "../../../../../../utils/yupConfig.js";
12
+ import "react-intl";
13
+ import "../../../../../overflowableText/OverflowableText.js";
14
+ import "react";
15
+ import "localized-countries";
16
+ import "localized-countries/data/fr";
17
+ import "localized-countries/data/en";
18
+ import "notistack";
19
+ import "../../../../../inputs/reactHookForm/provider/CustomFormProvider.js";
20
+ import "yup";
21
+ import "../../../../../treeViewFinder/TreeViewFinder.js";
22
+ import "../../../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
23
+ import "../../../../../customAGGrid/customAggrid.js";
24
+ import "ag-grid-community";
25
+ import "react-papaparse";
26
+ import "react-csv-downloader";
27
+ import { FloatInput } from "../../../../../inputs/reactHookForm/numbers/FloatInput.js";
28
+ import "../../../../../inputs/reactHookForm/numbers/RangeInput.js";
29
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
30
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
31
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
32
+ import "@material-symbols/svg-400/outlined/add_notes.svg?react";
33
+ import "../../../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
34
+ import "@react-querybuilder/material";
35
+ import "../../../../../filter/expert/expertFilterConstants.js";
36
+ import "../../../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
37
+ import "uuid";
38
+ import "../../../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
39
+ import "react-querybuilder";
40
+ function CharacteristicsTab() {
41
+ const watchHideNominalVoltage = useWatch({ name: FieldConstants.HIDE_NOMINAL_VOLTAGE });
42
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
43
+ /* @__PURE__ */ jsx(GridSection, { title: "VoltageText" }),
44
+ /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
45
+ !watchHideNominalVoltage && /* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(
46
+ FloatInput,
47
+ {
48
+ name: FieldConstants.NOMINAL_V,
49
+ label: "NominalVoltage",
50
+ adornment: VoltageAdornment
51
+ }
52
+ ) }),
53
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(
54
+ FloatInput,
55
+ {
56
+ name: FieldConstants.LOW_VOLTAGE_LIMIT,
57
+ label: "LowVoltageLimit",
58
+ adornment: VoltageAdornment
59
+ }
60
+ ) }),
61
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(
62
+ FloatInput,
63
+ {
64
+ name: FieldConstants.HIGH_VOLTAGE_LIMIT,
65
+ label: "HighVoltageLimit",
66
+ adornment: VoltageAdornment
67
+ }
68
+ ) })
69
+ ] }),
70
+ /* @__PURE__ */ jsx(GridSection, { title: "ShortCircuit" }),
71
+ /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
72
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(
73
+ FloatInput,
74
+ {
75
+ name: FieldConstants.LOW_SHORT_CIRCUIT_CURRENT_LIMIT,
76
+ label: "LowShortCircuitCurrentLimit",
77
+ adornment: KiloAmpereAdornment
78
+ }
79
+ ) }),
80
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(
81
+ FloatInput,
82
+ {
83
+ name: FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT,
84
+ label: "HighShortCircuitCurrentLimit",
85
+ adornment: KiloAmpereAdornment
86
+ }
87
+ ) })
88
+ ] })
89
+ ] });
90
+ }
91
+ export {
92
+ CharacteristicsTab
93
+ };
@@ -4,5 +4,4 @@
4
4
  * License, v. 2.0. If a copy of the MPL was not distributed with this
5
5
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
6
  */
7
- export * from './creation';
8
- export * from './SwitchesBetweenSections';
7
+ export { CharacteristicsTab } from './CharacteristicsTab';
@@ -0,0 +1,4 @@
1
+ import { CharacteristicsTab } from "./CharacteristicsTab.js";
2
+ export {
3
+ CharacteristicsTab
4
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) 2026, RTE (http://www.rte-france.com)
3
+ * This Source Code Form is subject to the terms of the Mozilla Public
4
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
5
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
+ */
7
+ export { StructureTab, SwitchesBetweenSections } from './structureTab';
8
+ export { SubstationTab, type SubstationTabContentProps } from './substationTab';
9
+ export { CharacteristicsTab } from './characteristicsTab';
@@ -0,0 +1,10 @@
1
+ import { SwitchesBetweenSections } from "./structureTab/switchesBetweenSections/SwitchesBetweenSections.js";
2
+ import { StructureTab } from "./structureTab/StructureTab.js";
3
+ import { SubstationTab } from "./substationTab/SubstationTab.js";
4
+ import { CharacteristicsTab } from "./characteristicsTab/CharacteristicsTab.js";
5
+ export {
6
+ CharacteristicsTab,
7
+ StructureTab,
8
+ SubstationTab,
9
+ SwitchesBetweenSections
10
+ };
@@ -0,0 +1 @@
1
+ export declare function StructureTab(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,60 @@
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { Grid } from "@mui/material";
3
+ import { useWatch } from "react-hook-form";
4
+ import GridSection from "../../../../../grid/grid-section.js";
5
+ import GridItem from "../../../../../grid/grid-item.js";
6
+ import "react-intl";
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
+ import "@mui/icons-material";
12
+ import "../../../../../../utils/yupConfig.js";
13
+ import "react";
14
+ import "localized-countries";
15
+ import "localized-countries/data/fr";
16
+ import "localized-countries/data/en";
17
+ import "notistack";
18
+ import "../../../../../inputs/reactHookForm/provider/CustomFormProvider.js";
19
+ import "yup";
20
+ import "../../../../../treeViewFinder/TreeViewFinder.js";
21
+ import "../../../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
22
+ import "../../../../../customAGGrid/customAggrid.js";
23
+ import "ag-grid-community";
24
+ import "react-papaparse";
25
+ import "react-csv-downloader";
26
+ import { IntegerInput } from "../../../../../inputs/reactHookForm/numbers/IntegerInput.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 { SwitchesBetweenSections } from "./switchesBetweenSections/SwitchesBetweenSections.js";
40
+ import { CouplingOmnibusForm } from "./couplingOmnibus/CouplingOmnibusForm.js";
41
+ function StructureTab() {
42
+ const watchBusBarCount = useWatch({ name: FieldConstants.BUS_BAR_COUNT });
43
+ const watchSectionCount = useWatch({ name: FieldConstants.SECTION_COUNT });
44
+ const displayOmnibus = watchBusBarCount > 1 || watchSectionCount > 1;
45
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
46
+ /* @__PURE__ */ jsx(GridSection, { title: "BusBarSections" }),
47
+ /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
48
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(IntegerInput, { name: FieldConstants.BUS_BAR_COUNT, label: "BusBarCount" }) }),
49
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(IntegerInput, { name: FieldConstants.SECTION_COUNT, label: "numberOfSections" }) })
50
+ ] }),
51
+ /* @__PURE__ */ jsx(SwitchesBetweenSections, {}),
52
+ displayOmnibus && /* @__PURE__ */ jsxs(Fragment, { children: [
53
+ /* @__PURE__ */ jsx(GridSection, { title: "Coupling_Omnibus" }),
54
+ /* @__PURE__ */ jsx(Grid, { container: true, children: /* @__PURE__ */ jsx(GridItem, { size: 12, children: /* @__PURE__ */ jsx(CouplingOmnibusForm, {}) }) })
55
+ ] })
56
+ ] });
57
+ }
58
+ export {
59
+ StructureTab
60
+ };
@@ -1,4 +1,4 @@
1
- import { Option } from '../../../../../utils/types/types';
1
+ import { Option } from '../../../../../../../utils/types/types';
2
2
  interface CouplingOmnibusCreationProps {
3
3
  index: number;
4
4
  sectionOptions: Option[];
@@ -1,13 +1,13 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useEffect } from "react";
3
3
  import { useFormContext } from "react-hook-form";
4
- import { AutocompleteInput } from "../../../../inputs/reactHookForm/autocompleteInputs/AutocompleteInput.js";
5
- import GridItem from "../../../../grid/grid-item.js";
6
- import { FieldConstants } from "../../../../../utils/constants/fieldConstants.js";
7
- import "../../../../../utils/conversionUtils.js";
8
- import "../../../../../utils/types/equipmentType.js";
4
+ import { AutocompleteInput } from "../../../../../../inputs/reactHookForm/autocompleteInputs/AutocompleteInput.js";
5
+ import GridItem from "../../../../../../grid/grid-item.js";
6
+ import { FieldConstants } from "../../../../../../../utils/constants/fieldConstants.js";
7
+ import "../../../../../../../utils/conversionUtils.js";
8
+ import "../../../../../../../utils/types/equipmentType.js";
9
9
  import "@mui/icons-material";
10
- import "../../../../../utils/yupConfig.js";
10
+ import "../../../../../../../utils/yupConfig.js";
11
11
  function CouplingOmnibusCreation({ index, sectionOptions }) {
12
12
  const { getValues, trigger, subscribe } = useFormContext();
13
13
  useEffect(() => {