@gridsuite/commons-ui 0.191.0 → 0.192.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 (53) hide show
  1. package/dist/components/network-modifications/by-filter/deletion/ByFilterDeletionForm.d.ts +0 -6
  2. package/dist/components/network-modifications/by-filter/deletion/ByFilterDeletionForm.js +6 -10
  3. package/dist/components/network-modifications/common/connectivity/BranchConnectivityForm.js +35 -39
  4. package/dist/components/network-modifications/common/measurements/BranchActiveReactivePowerMeasurementsForm.js +1 -7
  5. package/dist/components/network-modifications/common/measurements/PowerMeasurementsForm.js +3 -4
  6. package/dist/components/network-modifications/common/measurements/PowerWithValidityForm.js +19 -22
  7. package/dist/components/network-modifications/common/properties/PropertiesForm.js +14 -15
  8. package/dist/components/network-modifications/common/properties/PropertyForm.d.ts +1 -1
  9. package/dist/components/network-modifications/common/properties/PropertyForm.js +42 -50
  10. package/dist/components/network-modifications/common/setpoints/SetPointsForm.js +21 -24
  11. package/dist/components/network-modifications/equipmentDeletion/EquipmentDeletionForm.js +35 -38
  12. package/dist/components/network-modifications/equipmentDeletion/equipmentDeletion.utils.js +1 -1
  13. package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/HvdcLccDeletionSpecificForm.js +5 -6
  14. package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.d.ts +0 -6
  15. package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.js +6 -5
  16. package/dist/components/network-modifications/load/common/LoadDialogHeader.js +6 -17
  17. package/dist/components/network-modifications/load/common/LoadDialogTabs.js +4 -4
  18. package/dist/components/network-modifications/load/common/LoadDialogTabsContent.js +21 -18
  19. package/dist/components/network-modifications/load/modification/loadModification.utils.js +1 -1
  20. package/dist/components/network-modifications/substation/creation/SubstationCreationForm.js +16 -12
  21. package/dist/components/network-modifications/substation/modification/SubstationModificationForm.js +40 -44
  22. package/dist/components/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +22 -14
  23. package/dist/components/network-modifications/voltageLevel/creation/tabs/characteristicsTab/CharacteristicsTab.js +5 -6
  24. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/StructureTab.js +3 -4
  25. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/couplingOmnibus/CouplingOmnibusCreation.js +3 -3
  26. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js +2 -3
  27. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/creation/CreateSwitchesForm.js +10 -21
  28. package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationCreationSection.js +3 -3
  29. package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.js +2 -2
  30. package/dist/components/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js +103 -110
  31. package/dist/components/node/build-status-chip.d.ts +2 -1
  32. package/dist/components/node/build-status-chip.js +13 -3
  33. package/dist/components/parameters/common/parameters-edition-dialog-props.d.ts +1 -0
  34. package/dist/components/parameters/sensi/constants.d.ts +2 -2
  35. package/dist/components/parameters/sensi/constants.js +1 -1
  36. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.d.ts +1 -1
  37. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.js +5 -1
  38. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-factor-count.d.ts +1 -1
  39. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-factor-count.js +4 -0
  40. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.d.ts +2 -1
  41. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +2 -0
  42. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.d.ts +2 -1
  43. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.js +5 -2
  44. package/dist/components/parameters/sensi/sensitivity-parameters-selector.d.ts +2 -1
  45. package/dist/components/parameters/sensi/sensitivity-parameters-selector.js +10 -2
  46. package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.d.ts +6 -1
  47. package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.js +36 -9
  48. package/dist/translations/en/parameters.d.ts +1 -0
  49. package/dist/translations/en/parameters.js +4 -3
  50. package/dist/translations/fr/parameters.d.ts +1 -0
  51. package/dist/translations/fr/parameters.js +4 -3
  52. package/dist/utils/types/sensitivity-analysis.type.d.ts +2 -2
  53. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { FormattedMessage } from "react-intl";
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
3
2
  import { Grid } from "@mui/material";
4
3
  import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
5
4
  import "../../../../utils/conversionUtils.js";
6
5
  import "../../../../utils/types/equipmentType.js";
7
6
  import "@mui/icons-material";
8
7
  import "../../../../utils/yupConfig.js";
8
+ import "react-intl";
9
9
  import "../../../overflowableText/OverflowableText.js";
10
10
  import "react";
11
11
  import "react-hook-form";
@@ -36,13 +36,14 @@ import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
36
36
  import "uuid";
37
37
  import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
38
38
  import "react-querybuilder";
39
+ import GridSection from "../../../grid/grid-section.js";
39
40
  function ShuntCompensatorSelectionForm({
40
41
  title,
41
42
  arrayFormName,
42
43
  mcsRows
43
44
  }) {
44
- return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 1, direction: "column", children: [
45
- /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx("h4", { children: /* @__PURE__ */ jsx(FormattedMessage, { id: title }) }) }),
45
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
46
+ /* @__PURE__ */ jsx(GridSection, { title, heading: 4 }),
46
47
  mcsRows.map((field, index) => /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 1, alignItems: "center", children: [
47
48
  /* @__PURE__ */ jsx(Grid, { item: true, xs: 1, children: /* @__PURE__ */ jsx(
48
49
  CheckboxInput,
@@ -50,7 +51,7 @@ function ShuntCompensatorSelectionForm({
50
51
  name: `${arrayFormName}[${index}].${FieldConstants.SHUNT_COMPENSATOR_SELECTED}`
51
52
  }
52
53
  ) }),
53
- /* @__PURE__ */ jsx(Grid, { item: true, xs: 11, children: /* @__PURE__ */ jsx(ReadOnlyInput, { name: `${arrayFormName}[${index}].${FieldConstants.ID}` }) })
54
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(ReadOnlyInput, { name: `${arrayFormName}[${index}].${FieldConstants.ID}` }) })
54
55
  ] }, field.id))
55
56
  ] });
56
57
  }
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { TextField, Box, Grid } from "@mui/material";
2
+ import { TextField, Grid } from "@mui/material";
3
3
  import { useIntl } from "react-intl";
4
4
  import { useWatch } from "react-hook-form";
5
5
  import { filledTextField } from "../../common/form.utils.js";
@@ -10,7 +10,6 @@ import "../../../../utils/conversionUtils.js";
10
10
  import { getLoadTypeLabel, LOAD_TYPES } from "../../../../utils/types/equipmentType.js";
11
11
  import "@mui/icons-material";
12
12
  import "../../../../utils/yupConfig.js";
13
- import GridItem from "../../../grid/grid-item.js";
14
13
  import "../../../overflowableText/OverflowableText.js";
15
14
  import "localized-countries";
16
15
  import "localized-countries/data/fr";
@@ -80,21 +79,11 @@ function LoadDialogHeader({ loadToModify, isModification = false }) {
80
79
  }) : void 0
81
80
  }
82
81
  );
83
- return /* @__PURE__ */ jsx(
84
- Box,
85
- {
86
- sx: {
87
- display: "flex",
88
- flexWrap: "wrap",
89
- gap: "15px"
90
- },
91
- children: /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
92
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: loadIdField }),
93
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: loadNameField }),
94
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: loadTypeField })
95
- ] })
96
- }
97
- );
82
+ return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
83
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: loadIdField }),
84
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: loadNameField }),
85
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: loadTypeField })
86
+ ] });
98
87
  }
99
88
  export {
100
89
  LoadDialogHeader
@@ -1,5 +1,5 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { Grid, Tabs, Tab } from "@mui/material";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { Tabs, Tab } from "@mui/material";
3
3
  import { FormattedMessage } from "react-intl";
4
4
  import { LoadDialogTab } from "./load.utils.js";
5
5
  import { getTabIndicatorStyle, getTabStyle } from "../../../parameters/parameters-style.js";
@@ -9,7 +9,7 @@ function LoadDialogTabs({
9
9
  setTabIndex,
10
10
  isModification = false
11
11
  }) {
12
- return /* @__PURE__ */ jsx(Grid, { container: true, children: /* @__PURE__ */ jsxs(
12
+ return /* @__PURE__ */ jsxs(
13
13
  Tabs,
14
14
  {
15
15
  value: tabIndex,
@@ -42,7 +42,7 @@ function LoadDialogTabs({
42
42
  )
43
43
  ]
44
44
  }
45
- ) });
45
+ );
46
46
  }
47
47
  export {
48
48
  LoadDialogTabs
@@ -15,23 +15,26 @@ function LoadDialogTabsContent({
15
15
  fetchBusesOrBusbarSections
16
16
  }) {
17
17
  return /* @__PURE__ */ jsxs(Fragment, { children: [
18
- /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== LoadDialogTab.CONNECTIVITY_TAB, p: 1, children: /* @__PURE__ */ jsx(
19
- ConnectivityForm,
20
- {
21
- withPosition: true,
22
- isEquipmentModification: isModification,
23
- previousValues: {
24
- connectablePosition: loadToModify?.connectablePosition,
25
- voltageLevelId: loadToModify?.voltageLevelId,
26
- busOrBusbarSectionId: loadToModify?.busOrBusbarSectionId,
27
- terminalConnected: loadToModify?.terminalConnected
28
- },
29
- voltageLevelOptions,
30
- PositionDiagramPane,
31
- fetchBusesOrBusbarSections
32
- }
33
- ) }),
34
- /* @__PURE__ */ jsxs(Box, { hidden: tabIndex !== LoadDialogTab.CHARACTERISTICS_TAB, p: 1, sx: { marginTop: -4 }, children: [
18
+ /* @__PURE__ */ jsxs(Box, { hidden: tabIndex !== LoadDialogTab.CONNECTIVITY_TAB, children: [
19
+ /* @__PURE__ */ jsx(GridSection, { title: "ConnectivityTab" }),
20
+ /* @__PURE__ */ jsx(
21
+ ConnectivityForm,
22
+ {
23
+ withPosition: true,
24
+ isEquipmentModification: isModification,
25
+ previousValues: {
26
+ connectablePosition: loadToModify?.connectablePosition,
27
+ voltageLevelId: loadToModify?.voltageLevelId,
28
+ busOrBusbarSectionId: loadToModify?.busOrBusbarSectionId,
29
+ terminalConnected: loadToModify?.terminalConnected
30
+ },
31
+ voltageLevelOptions,
32
+ PositionDiagramPane,
33
+ fetchBusesOrBusbarSections
34
+ }
35
+ )
36
+ ] }),
37
+ /* @__PURE__ */ jsxs(Box, { hidden: tabIndex !== LoadDialogTab.CHARACTERISTICS_TAB, children: [
35
38
  /* @__PURE__ */ jsx(
36
39
  SetPointsForm,
37
40
  {
@@ -44,7 +47,7 @@ function LoadDialogTabsContent({
44
47
  ),
45
48
  /* @__PURE__ */ jsx(PropertiesForm, { networkElementType: "load", isModification })
46
49
  ] }),
47
- isModification && /* @__PURE__ */ jsxs(Box, { hidden: tabIndex !== LoadDialogTab.STATE_ESTIMATION_TAB, p: 1, sx: { marginTop: -4 }, children: [
50
+ isModification && /* @__PURE__ */ jsxs(Box, { hidden: tabIndex !== LoadDialogTab.STATE_ESTIMATION_TAB, children: [
48
51
  /* @__PURE__ */ jsx(GridSection, { title: "MeasurementsSection" }),
49
52
  /* @__PURE__ */ jsx(
50
53
  PowerMeasurementsForm,
@@ -7,10 +7,10 @@ import "react/jsx-runtime";
7
7
  import "@mui/icons-material";
8
8
  import { sanitizeString } from "../../../../utils/ts-utils.js";
9
9
  import "../../../../utils/yupConfig.js";
10
- import "@mui/material";
11
10
  import "react";
12
11
  import "react-hook-form";
13
12
  import { modificationPropertiesSchema, getPropertiesFromModification, toModificationProperties } from "../../common/properties/propertyUtils.js";
13
+ import "@mui/material";
14
14
  import "react-intl";
15
15
  import "../../../overflowableText/OverflowableText.js";
16
16
  import "localized-countries";
@@ -1,6 +1,5 @@
1
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { Grid } from "@mui/material";
3
- import GridItem from "../../../grid/grid-item.js";
4
3
  import "react-intl";
5
4
  import "../../../overflowableText/OverflowableText.js";
6
5
  import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
@@ -41,16 +40,21 @@ import { PropertiesForm } from "../../common/properties/PropertiesForm.js";
41
40
  import { filledTextField } from "../../common/form.utils.js";
42
41
  import "../../common/properties/propertyUtils.js";
43
42
  function SubstationCreationForm() {
44
- const substationIdField = /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.EQUIPMENT_ID, label: "ID", formProps: filledTextField });
45
- const substationNameField = /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.EQUIPMENT_NAME, label: "Name", formProps: filledTextField });
46
- const substationCountryField = /* @__PURE__ */ jsx(CountrySelectionInput, { name: FieldConstants.COUNTRY, label: "Country", formProps: filledTextField, size: "small" });
47
- return /* @__PURE__ */ jsxs(Fragment, { children: [
48
- /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
49
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: substationIdField }),
50
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: substationNameField }),
51
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: substationCountryField })
52
- ] }),
53
- /* @__PURE__ */ jsx(PropertiesForm, { networkElementType: "substation" })
43
+ return /* @__PURE__ */ jsxs(Grid, { container: true, direction: "column", spacing: 2, children: [
44
+ /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
45
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.EQUIPMENT_ID, label: "ID", formProps: filledTextField }) }),
46
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.EQUIPMENT_NAME, label: "Name", formProps: filledTextField }) }),
47
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(
48
+ CountrySelectionInput,
49
+ {
50
+ name: FieldConstants.COUNTRY,
51
+ label: "Country",
52
+ formProps: filledTextField,
53
+ size: "small"
54
+ }
55
+ ) })
56
+ ] }) }),
57
+ /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(PropertiesForm, { networkElementType: "substation" }) })
54
58
  ] });
55
59
  }
56
60
  export {
@@ -1,8 +1,7 @@
1
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import { TextField, Grid } from "@mui/material";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { Grid, TextField } from "@mui/material";
3
3
  import { useIntl } from "react-intl";
4
4
  import { useWatch } from "react-hook-form";
5
- import GridItem from "../../../grid/grid-item.js";
6
5
  import "../../../overflowableText/OverflowableText.js";
7
6
  import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
8
7
  import "../../../../utils/conversionUtils.js";
@@ -42,47 +41,44 @@ function SubstationModificationForm({ substationToModify }) {
42
41
  const { locale } = useIntl();
43
42
  const { translate } = useLocalizedCountries(locale);
44
43
  const equipmentId = useWatch({ name: FieldConstants.EQUIPMENT_ID });
45
- const substationIdField = /* @__PURE__ */ jsx(
46
- TextField,
47
- {
48
- size: "small",
49
- fullWidth: true,
50
- label: "ID",
51
- value: equipmentId ?? "",
52
- InputProps: {
53
- readOnly: true
54
- },
55
- disabled: true,
56
- ...filledTextField
57
- }
58
- );
59
- const substationNameField = /* @__PURE__ */ jsx(
60
- TextInput,
61
- {
62
- name: FieldConstants.EQUIPMENT_NAME,
63
- label: "Name",
64
- formProps: filledTextField,
65
- previousValue: substationToModify?.name,
66
- clearable: true
67
- }
68
- );
69
- const substationCountryField = /* @__PURE__ */ jsx(
70
- CountrySelectionInput,
71
- {
72
- name: FieldConstants.COUNTRY,
73
- label: "Country",
74
- formProps: filledTextField,
75
- size: "small",
76
- previousValue: substationToModify?.country ? translate(substationToModify.country) : ""
77
- }
78
- );
79
- return /* @__PURE__ */ jsxs(Fragment, { children: [
80
- /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
81
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: substationIdField }),
82
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: substationNameField }),
83
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: substationCountryField })
84
- ] }),
85
- /* @__PURE__ */ jsx(PropertiesForm, { networkElementType: "substation", isModification: true })
44
+ return /* @__PURE__ */ jsxs(Grid, { container: true, direction: "column", spacing: 2, children: [
45
+ /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
46
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(
47
+ TextField,
48
+ {
49
+ size: "small",
50
+ fullWidth: true,
51
+ label: "ID",
52
+ value: equipmentId ?? "",
53
+ InputProps: {
54
+ readOnly: true
55
+ },
56
+ disabled: true,
57
+ ...filledTextField
58
+ }
59
+ ) }),
60
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(
61
+ TextInput,
62
+ {
63
+ name: FieldConstants.EQUIPMENT_NAME,
64
+ label: "Name",
65
+ formProps: filledTextField,
66
+ previousValue: substationToModify?.name,
67
+ clearable: true
68
+ }
69
+ ) }),
70
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(
71
+ CountrySelectionInput,
72
+ {
73
+ name: FieldConstants.COUNTRY,
74
+ label: "Country",
75
+ formProps: filledTextField,
76
+ size: "small",
77
+ previousValue: substationToModify?.country ? translate(substationToModify.country) : ""
78
+ }
79
+ ) })
80
+ ] }) }),
81
+ /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(PropertiesForm, { networkElementType: "substation", isModification: true }) })
86
82
  ] });
87
83
  }
88
84
  export {
@@ -1,4 +1,4 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { Grid, Tabs, Tab, Box } from "@mui/material";
3
3
  import { FormattedMessage } from "react-intl";
4
4
  import { useWatch } from "react-hook-form";
@@ -36,11 +36,11 @@ import "uuid";
36
36
  import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
37
37
  import "react-querybuilder";
38
38
  import { VoltageLevelTab, VOLTAGE_LEVEL_TAB_FIELDS } from "./voltageLevel.constants.js";
39
- import GridItem from "../../../grid/grid-item.js";
40
39
  import "./tabs/structureTab/switchesBetweenSections/creation/CreateSwitchesDialog.js";
41
40
  import { StructureTab } from "./tabs/structureTab/StructureTab.js";
42
41
  import { SubstationTab } from "./tabs/substationTab/SubstationTab.js";
43
42
  import { CharacteristicsTab } from "./tabs/characteristicsTab/CharacteristicsTab.js";
43
+ import { filledTextField } from "../../common/form.utils.js";
44
44
  import { PropertiesForm } from "../../common/properties/PropertiesForm.js";
45
45
  import "../../common/properties/propertyUtils.js";
46
46
  import { getTabIndicatorStyle, getTabStyle } from "../../../parameters/parameters-style.js";
@@ -54,19 +54,19 @@ function VoltageLevelCreationForm({
54
54
  VoltageLevelTab.SUBSTATION_TAB
55
55
  );
56
56
  const watchHideBusBarSection = useWatch({ name: FieldConstants.HIDE_BUS_BAR_SECTION });
57
- return /* @__PURE__ */ jsxs(Fragment, { children: [
58
- /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
59
- /* @__PURE__ */ jsx(GridItem, { children: /* @__PURE__ */ jsx(
57
+ return /* @__PURE__ */ jsxs(Grid, { container: true, direction: "column", spacing: 2, children: [
58
+ /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
59
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
60
60
  TextInput,
61
61
  {
62
62
  name: FieldConstants.EQUIPMENT_ID,
63
63
  label: "ID",
64
- formProps: { autoFocus: true, margin: "normal" }
64
+ formProps: { autoFocus: true, ...filledTextField }
65
65
  }
66
66
  ) }),
67
- /* @__PURE__ */ jsx(GridItem, { children: /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.EQUIPMENT_NAME, label: "Name", formProps: { margin: "normal" } }) })
68
- ] }),
69
- /* @__PURE__ */ jsxs(
67
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.EQUIPMENT_NAME, label: "Name", formProps: filledTextField }) })
68
+ ] }) }),
69
+ /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsxs(
70
70
  Tabs,
71
71
  {
72
72
  value: tabIndex,
@@ -107,11 +107,19 @@ function VoltageLevelCreationForm({
107
107
  )
108
108
  ]
109
109
  }
110
- ),
111
- /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== VoltageLevelTab.SUBSTATION_TAB, children: /* @__PURE__ */ jsx(SubstationTab, { substationOptions, showDeleteButton: showDeleteSubstationButton }) }),
112
- /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== VoltageLevelTab.CHARACTERISTICS_TAB, children: /* @__PURE__ */ jsx(CharacteristicsTab, {}) }),
113
- /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== VoltageLevelTab.STRUCTURE_TAB, children: /* @__PURE__ */ jsx(StructureTab, {}) }),
114
- /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== VoltageLevelTab.ADDITIONAL_INFORMATION_TAB, children: /* @__PURE__ */ jsx(PropertiesForm, { networkElementType: "voltageLevel" }) })
110
+ ) }),
111
+ /* @__PURE__ */ jsxs(Grid, { item: true, children: [
112
+ /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== VoltageLevelTab.SUBSTATION_TAB, children: /* @__PURE__ */ jsx(
113
+ SubstationTab,
114
+ {
115
+ substationOptions,
116
+ showDeleteButton: showDeleteSubstationButton
117
+ }
118
+ ) }),
119
+ /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== VoltageLevelTab.CHARACTERISTICS_TAB, children: /* @__PURE__ */ jsx(CharacteristicsTab, {}) }),
120
+ /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== VoltageLevelTab.STRUCTURE_TAB, children: /* @__PURE__ */ jsx(StructureTab, {}) }),
121
+ /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== VoltageLevelTab.ADDITIONAL_INFORMATION_TAB, children: /* @__PURE__ */ jsx(PropertiesForm, { networkElementType: "voltageLevel" }) })
122
+ ] })
115
123
  ] });
116
124
  }
117
125
  export {
@@ -2,7 +2,6 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useWatch } from "react-hook-form";
3
3
  import { Grid } from "@mui/material";
4
4
  import GridSection from "../../../../../grid/grid-section.js";
5
- import GridItem from "../../../../../grid/grid-item.js";
6
5
  import { VoltageAdornment, KiloAmpereAdornment } from "../../../../../../utils/constants/adornments.js";
7
6
  import { FieldConstants } from "../../../../../../utils/constants/fieldConstants.js";
8
7
  import "../../../../../../utils/conversionUtils.js";
@@ -43,7 +42,7 @@ function CharacteristicsTab() {
43
42
  return /* @__PURE__ */ jsxs(Fragment, { children: [
44
43
  /* @__PURE__ */ jsx(GridSection, { title: "VoltageText" }),
45
44
  /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
46
- !watchHideNominalVoltage && /* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(
45
+ !watchHideNominalVoltage && /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
47
46
  FloatInput,
48
47
  {
49
48
  name: FieldConstants.NOMINAL_V,
@@ -51,7 +50,7 @@ function CharacteristicsTab() {
51
50
  adornment: VoltageAdornment
52
51
  }
53
52
  ) }),
54
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(
53
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
55
54
  FloatInput,
56
55
  {
57
56
  name: FieldConstants.LOW_VOLTAGE_LIMIT,
@@ -59,7 +58,7 @@ function CharacteristicsTab() {
59
58
  adornment: VoltageAdornment
60
59
  }
61
60
  ) }),
62
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(
61
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
63
62
  FloatInput,
64
63
  {
65
64
  name: FieldConstants.HIGH_VOLTAGE_LIMIT,
@@ -70,7 +69,7 @@ function CharacteristicsTab() {
70
69
  ] }),
71
70
  /* @__PURE__ */ jsx(GridSection, { title: "ShortCircuit" }),
72
71
  /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
73
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(
72
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
74
73
  FloatInput,
75
74
  {
76
75
  name: FieldConstants.LOW_SHORT_CIRCUIT_CURRENT_LIMIT,
@@ -78,7 +77,7 @@ function CharacteristicsTab() {
78
77
  adornment: KiloAmpereAdornment
79
78
  }
80
79
  ) }),
81
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(
80
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
82
81
  FloatInput,
83
82
  {
84
83
  name: FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT,
@@ -2,7 +2,6 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { Grid } from "@mui/material";
3
3
  import { useWatch } from "react-hook-form";
4
4
  import GridSection from "../../../../../grid/grid-section.js";
5
- import GridItem from "../../../../../grid/grid-item.js";
6
5
  import "react-intl";
7
6
  import "../../../../../overflowableText/OverflowableText.js";
8
7
  import { FieldConstants } from "../../../../../../utils/constants/fieldConstants.js";
@@ -46,13 +45,13 @@ function StructureTab() {
46
45
  return /* @__PURE__ */ jsxs(Fragment, { children: [
47
46
  /* @__PURE__ */ jsx(GridSection, { title: "BusBarSections" }),
48
47
  /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
49
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(IntegerInput, { name: FieldConstants.BUS_BAR_COUNT, label: "BusBarCount" }) }),
50
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(IntegerInput, { name: FieldConstants.SECTION_COUNT, label: "numberOfSections" }) })
48
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(IntegerInput, { name: FieldConstants.BUS_BAR_COUNT, label: "BusBarCount" }) }),
49
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(IntegerInput, { name: FieldConstants.SECTION_COUNT, label: "numberOfSections" }) })
51
50
  ] }),
52
51
  /* @__PURE__ */ jsx(SwitchesBetweenSections, {}),
53
52
  displayOmnibus && /* @__PURE__ */ jsxs(Fragment, { children: [
54
53
  /* @__PURE__ */ jsx(GridSection, { title: "Coupling_Omnibus" }),
55
- /* @__PURE__ */ jsx(Grid, { container: true, children: /* @__PURE__ */ jsx(GridItem, { size: 12, children: /* @__PURE__ */ jsx(CouplingOmnibusForm, {}) }) })
54
+ /* @__PURE__ */ jsx(CouplingOmnibusForm, {})
56
55
  ] })
57
56
  ] });
58
57
  }
@@ -1,8 +1,8 @@
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 { Grid } from "@mui/material";
4
5
  import { AutocompleteInput } from "../../../../../../inputs/reactHookForm/autocompleteInputs/AutocompleteInput.js";
5
- import GridItem from "../../../../../../grid/grid-item.js";
6
6
  import { FieldConstants } from "../../../../../../../utils/constants/fieldConstants.js";
7
7
  import "../../../../../../../utils/conversionUtils.js";
8
8
  import "../../../../../../../utils/types/equipmentType.js";
@@ -25,7 +25,7 @@ function CouplingOmnibusCreation({ index, sectionOptions }) {
25
25
  return () => unsubscribe();
26
26
  }, [subscribe, trigger, getValues, index]);
27
27
  return /* @__PURE__ */ jsxs(Fragment, { children: [
28
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(
28
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
29
29
  AutocompleteInput,
30
30
  {
31
31
  allowNewValue: true,
@@ -36,7 +36,7 @@ function CouplingOmnibusCreation({ index, sectionOptions }) {
36
36
  size: "small"
37
37
  }
38
38
  ) }),
39
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(
39
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
40
40
  AutocompleteInput,
41
41
  {
42
42
  allowNewValue: true,
@@ -9,7 +9,6 @@ import "../../../../../../../utils/conversionUtils.js";
9
9
  import "../../../../../../../utils/types/equipmentType.js";
10
10
  import "../../../../../../../utils/yupConfig.js";
11
11
  import { SwitchKind } from "../../../voltageLevelCreation.types.js";
12
- import GridItem from "../../../../../../grid/grid-item.js";
13
12
  import "../../../../../../overflowableText/OverflowableText.js";
14
13
  import "localized-countries";
15
14
  import "localized-countries/data/fr";
@@ -94,7 +93,7 @@ function SwitchesBetweenSections() {
94
93
  }
95
94
  return /* @__PURE__ */ jsxs(Fragment, { children: [
96
95
  /* @__PURE__ */ jsx(GridSection, { title: "SwitchesBetweenSections" }),
97
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(
96
+ /* @__PURE__ */ jsx(
98
97
  TextInput,
99
98
  {
100
99
  name: FieldConstants.SWITCHES_BETWEEN_SECTIONS,
@@ -104,7 +103,7 @@ function SwitchesBetweenSections() {
104
103
  },
105
104
  customAdornment: addIconAdornment(handleClickOpenSwitchesPane)
106
105
  }
107
- ) }),
106
+ ),
108
107
  openCreateSwitchesDialog && /* @__PURE__ */ jsx(
109
108
  CreateSwitchesDialog,
110
109
  {
@@ -40,30 +40,19 @@ function CreateSwitchesForm({ id }) {
40
40
  const { fields: rows } = useFieldArray({ name: `${id}` });
41
41
  return /* @__PURE__ */ jsxs(Fragment, { children: [
42
42
  /* @__PURE__ */ jsx(DialogTitle, { children: /* @__PURE__ */ jsx(FormattedMessage, { id: "SwitchesBetweenSections" }) }),
43
- /* @__PURE__ */ jsx(DialogContent, { children: /* @__PURE__ */ jsx(
44
- Grid,
43
+ /* @__PURE__ */ jsx(DialogContent, { children: /* @__PURE__ */ jsx(Grid, { container: true, spacing: 2, direction: "column", pt: 1, children: rows.map((value, index) => /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
44
+ EnumInput,
45
45
  {
46
- container: true,
47
- spacing: 2,
48
- direction: "column",
49
- style: {
50
- paddingTop: "5px"
46
+ options: Object.values(SWITCH_TYPE),
47
+ name: `${id}.${index}.${FieldConstants.SWITCH_KIND}`,
48
+ label: "SwitchBetweenSectionsLabel",
49
+ labelValues: {
50
+ index1: String(index + 1),
51
+ index2: String(index + 2)
51
52
  },
52
- children: rows.map((value, index) => /* @__PURE__ */ jsx(Grid, { container: true, item: true, children: /* @__PURE__ */ jsx(
53
- EnumInput,
54
- {
55
- options: Object.values(SWITCH_TYPE),
56
- name: `${id}.${index}.${FieldConstants.SWITCH_KIND}`,
57
- label: "SwitchBetweenSectionsLabel",
58
- labelValues: {
59
- index1: String(index + 1),
60
- index2: String(index + 2)
61
- },
62
- size: "small"
63
- }
64
- ) }, value.id))
53
+ size: "small"
65
54
  }
66
- ) })
55
+ ) }, value.id)) }) })
67
56
  ] });
68
57
  }
69
58
  export {
@@ -47,9 +47,9 @@ function SubstationCreationSection({
47
47
  return /* @__PURE__ */ jsxs(Fragment, { children: [
48
48
  /* @__PURE__ */ jsx(GridSection, { title: "CreateSubstation" }),
49
49
  /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
50
- /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.SUBSTATION_CREATION_ID, label: "SubstationId" }) }),
51
- /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.SUBSTATION_NAME, label: "substationName" }) }),
52
- /* @__PURE__ */ jsx(Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsx(CountrySelectionInput, { name: FieldConstants.COUNTRY, label: "Country", size: "small" }) }),
50
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.SUBSTATION_CREATION_ID, label: "SubstationId" }) }),
51
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.SUBSTATION_NAME, label: "substationName" }) }),
52
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(CountrySelectionInput, { name: FieldConstants.COUNTRY, label: "Country", size: "small" }) }),
53
53
  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
54
  ] }),
55
55
  /* @__PURE__ */ jsx(PropertiesForm, { id: FieldConstants.SUBSTATION_CREATION, networkElementType: "substation" })
@@ -59,8 +59,8 @@ function SubstationTab({ substationOptions, showDeleteButton }) {
59
59
  });
60
60
  }
61
61
  }, [setValue, getValues, watchAddSubstationCreation]);
62
- return watchAddSubstationCreation ? /* @__PURE__ */ jsx(SubstationCreationSection, { showDeleteButton, onDelete: handleDeleteSubstationCreation }) : /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, my: 2, children: [
63
- /* @__PURE__ */ jsx(Grid, { item: true, xs: 6, children: substationOptions ? /* @__PURE__ */ jsx(
62
+ return watchAddSubstationCreation ? /* @__PURE__ */ jsx(SubstationCreationSection, { showDeleteButton, onDelete: handleDeleteSubstationCreation }) : /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, pt: 2, children: [
63
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: substationOptions ? /* @__PURE__ */ jsx(
64
64
  AutocompleteInput,
65
65
  {
66
66
  name: FieldConstants.SUBSTATION_ID,