@gridsuite/commons-ui 0.185.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 (115) hide show
  1. package/dist/components/index.d.ts +1 -0
  2. package/dist/components/index.js +28 -12
  3. package/dist/components/network-modifications/by-filter/commons/by-filter.type.d.ts +5 -0
  4. package/dist/components/network-modifications/by-filter/deletion/ByFilterDeletionForm.d.ts +7 -0
  5. package/dist/components/network-modifications/by-filter/deletion/ByFilterDeletionForm.js +83 -0
  6. package/dist/components/network-modifications/by-filter/deletion/byFilterDeletion.types.d.ts +7 -0
  7. package/dist/components/network-modifications/by-filter/deletion/byFilterDeletion.utils.d.ts +18 -0
  8. package/dist/components/network-modifications/by-filter/deletion/byFilterDeletion.utils.js +52 -0
  9. package/dist/components/network-modifications/by-filter/deletion/index.d.ts +9 -0
  10. package/dist/components/network-modifications/by-filter/deletion/index.js +10 -0
  11. package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → by-filter}/index.d.ts +1 -2
  12. package/dist/components/network-modifications/by-filter/index.js +10 -0
  13. package/dist/components/network-modifications/common/connectivity/connectivityForm.utils.d.ts +1 -1
  14. package/dist/components/network-modifications/index.d.ts +2 -1
  15. package/dist/components/network-modifications/index.js +52 -12
  16. package/dist/components/network-modifications/load/common/LoadDialogTabs.js +1 -1
  17. package/dist/components/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +138 -0
  18. package/dist/components/network-modifications/{voltage-level → voltageLevel}/creation/index.d.ts +1 -2
  19. package/dist/components/network-modifications/voltageLevel/creation/index.js +57 -0
  20. package/dist/components/network-modifications/voltageLevel/creation/tabs/characteristicsTab/CharacteristicsTab.d.ts +1 -0
  21. package/dist/components/network-modifications/voltageLevel/creation/tabs/characteristicsTab/CharacteristicsTab.js +93 -0
  22. package/dist/components/network-modifications/voltageLevel/creation/tabs/characteristicsTab/index.d.ts +7 -0
  23. package/dist/components/network-modifications/voltageLevel/creation/tabs/characteristicsTab/index.js +4 -0
  24. package/dist/components/network-modifications/voltageLevel/creation/tabs/index.d.ts +9 -0
  25. package/dist/components/network-modifications/voltageLevel/creation/tabs/index.js +10 -0
  26. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/StructureTab.d.ts +1 -0
  27. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/StructureTab.js +60 -0
  28. package/dist/components/network-modifications/{voltage-level/creation/coupling-omnibus → voltageLevel/creation/tabs/structureTab/couplingOmnibus}/CouplingOmnibusCreation.d.ts +1 -1
  29. package/dist/components/network-modifications/{voltage-level/creation/coupling-omnibus → voltageLevel/creation/tabs/structureTab/couplingOmnibus}/CouplingOmnibusCreation.js +6 -6
  30. package/dist/components/network-modifications/{voltage-level/creation/coupling-omnibus → voltageLevel/creation/tabs/structureTab/couplingOmnibus}/CouplingOmnibusForm.js +16 -16
  31. package/dist/components/network-modifications/{voltage-level/creation/coupling-omnibus → voltageLevel/creation/tabs/structureTab/couplingOmnibus}/index.d.ts +0 -1
  32. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/couplingOmnibus/index.js +4 -0
  33. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/index.d.ts +8 -0
  34. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/index.js +6 -0
  35. package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/SwitchesBetweenSections.js +19 -17
  36. package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/CreateSwitchesDialog.d.ts +1 -1
  37. package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/CreateSwitchesDialog.js +16 -16
  38. package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/CreateSwitchesDialogSubmitButton.d.ts +1 -1
  39. package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/CreateSwitchesForm.js +16 -16
  40. package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/createSwitchesDialog.utils.d.ts +1 -1
  41. package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/createSwitchesDialog.utils.js +5 -5
  42. package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/index.d.ts +7 -0
  43. package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/index.js +0 -2
  44. package/dist/components/network-modifications/{voltage-level/creation/substation-creation → voltageLevel/creation/tabs/substationTab}/SubstationCreationSection.d.ts +1 -2
  45. package/dist/components/network-modifications/{voltage-level/creation/substation-creation → voltageLevel/creation/tabs/substationTab}/SubstationCreationSection.js +24 -26
  46. package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.d.ts +5 -0
  47. package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.js +81 -0
  48. package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/index.d.ts +7 -0
  49. package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/index.js +4 -0
  50. package/dist/components/network-modifications/voltageLevel/creation/voltageLevel.constants.d.ts +12 -0
  51. package/dist/components/network-modifications/voltageLevel/creation/voltageLevel.constants.js +9 -0
  52. package/dist/components/network-modifications/{voltage-level → voltageLevel}/creation/voltageLevelCreation.utils.d.ts +4 -0
  53. package/dist/components/network-modifications/{voltage-level → voltageLevel}/creation/voltageLevelCreation.utils.js +16 -0
  54. package/dist/components/network-modifications/voltageLevel/index.js +64 -0
  55. package/dist/components/network-modifications/voltageLevel/modification/voltageLevelModification.types.js +1 -0
  56. package/dist/components/network-modifications/voltageLevel/voltage-level.type.js +1 -0
  57. package/dist/components/node/build-status-chip.d.ts +12 -0
  58. package/dist/components/node/build-status-chip.js +75 -0
  59. package/dist/components/node/constant.d.ts +13 -0
  60. package/dist/components/node/constant.js +11 -0
  61. package/dist/components/node/index.d.ts +2 -0
  62. package/dist/components/node/index.js +6 -0
  63. package/dist/components/parameters/common/parameters-edition-dialog-props.d.ts +2 -0
  64. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.d.ts +1 -1
  65. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.js +2 -0
  66. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.d.ts +3 -1
  67. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +4 -2
  68. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.d.ts +3 -1
  69. package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.js +3 -0
  70. package/dist/components/parameters/sensi/sensitivity-parameters-selector.d.ts +3 -1
  71. package/dist/components/parameters/sensi/sensitivity-parameters-selector.js +11 -7
  72. package/dist/components/parameters/short-circuit/columns-definition.js +2 -2
  73. package/dist/components/parameters/short-circuit/short-circuit-icc-cluster-table-cell.js +0 -1
  74. package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.js +20 -11
  75. package/dist/index.js +65 -52
  76. package/dist/translations/en/businessErrorsEn.d.ts +2 -0
  77. package/dist/translations/en/businessErrorsEn.js +2 -0
  78. package/dist/translations/en/networkModificationsEn.d.ts +7 -3
  79. package/dist/translations/en/networkModificationsEn.js +9 -4
  80. package/dist/translations/en/parameters.d.ts +7 -0
  81. package/dist/translations/en/parameters.js +8 -1
  82. package/dist/translations/fr/businessErrorsFr.d.ts +2 -0
  83. package/dist/translations/fr/businessErrorsFr.js +2 -0
  84. package/dist/translations/fr/networkModificationsFr.d.ts +7 -3
  85. package/dist/translations/fr/networkModificationsFr.js +10 -5
  86. package/dist/translations/fr/parameters.d.ts +7 -0
  87. package/dist/translations/fr/parameters.js +8 -1
  88. package/dist/utils/types/metadata.d.ts +1 -0
  89. package/package.json +1 -1
  90. package/dist/components/network-modifications/voltage-level/creation/VoltageLevelCreationForm.js +0 -174
  91. package/dist/components/network-modifications/voltage-level/creation/coupling-omnibus/index.js +0 -6
  92. package/dist/components/network-modifications/voltage-level/creation/index.js +0 -24
  93. package/dist/components/network-modifications/voltage-level/creation/substation-creation/SubstationAutocompleteAddButton.d.ts +0 -5
  94. package/dist/components/network-modifications/voltage-level/creation/substation-creation/SubstationAutocompleteAddButton.js +0 -79
  95. package/dist/components/network-modifications/voltage-level/index.js +0 -31
  96. /package/dist/components/network-modifications/{voltage-level/modification/voltageLevelModification.types.js → by-filter/commons/by-filter.type.js} +0 -0
  97. /package/dist/components/network-modifications/{voltage-level/voltage-level.type.js → by-filter/deletion/byFilterDeletion.types.js} +0 -0
  98. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/creation/VoltageLevelCreationForm.d.ts +0 -0
  99. /package/dist/components/network-modifications/{voltage-level/creation/coupling-omnibus → voltageLevel/creation/tabs/structureTab/couplingOmnibus}/CouplingOmnibusForm.d.ts +0 -0
  100. /package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/SwitchesBetweenSections.d.ts +0 -0
  101. /package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/CreateSwitchesDialogSubmitButton.js +0 -0
  102. /package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/CreateSwitchesForm.d.ts +0 -0
  103. /package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/index.d.ts +0 -0
  104. /package/dist/components/network-modifications/{voltage-level/creation/switches-between-sections → voltageLevel/creation/tabs/structureTab/switchesBetweenSections}/creation/index.js +0 -0
  105. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/creation/voltageLevelCreation.types.d.ts +0 -0
  106. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/creation/voltageLevelCreation.types.js +0 -0
  107. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/index.d.ts +0 -0
  108. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/VoltageLevelModificationForm.d.ts +0 -0
  109. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/VoltageLevelModificationForm.js +0 -0
  110. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/index.d.ts +0 -0
  111. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/index.js +0 -0
  112. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/voltageLevelModification.types.d.ts +0 -0
  113. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/voltageLevelModification.utils.d.ts +0 -0
  114. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/modification/voltageLevelModification.utils.js +0 -0
  115. /package/dist/components/network-modifications/{voltage-level → voltageLevel}/voltage-level.type.d.ts +0 -0
@@ -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,
@@ -0,0 +1,64 @@
1
+ import { SwitchesBetweenSections } from "./creation/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 "./creation/VoltageLevelCreationForm.js";
38
+ import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, isAdditionalInformationTabError, isCharacteristicsTabError, isStructureTabError, isSubstationTabError, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./creation/voltageLevelCreation.utils.js";
39
+ import { SwitchKind } from "./creation/voltageLevelCreation.types.js";
40
+ import { VoltageLevelModificationForm } from "./modification/VoltageLevelModificationForm.js";
41
+ import { voltageLevelModificationDtoToForm, voltageLevelModificationEmptyFormData, voltageLevelModificationFormSchema, voltageLevelModificationFormToDto } from "./modification/voltageLevelModification.utils.js";
42
+ export {
43
+ SWITCH_TYPE,
44
+ SwitchKind,
45
+ SwitchesBetweenSections,
46
+ VoltageLevelCreationForm,
47
+ VoltageLevelModificationForm,
48
+ buildNewBusbarSections,
49
+ getCreateSwitchesEmptyFormData,
50
+ getCreateSwitchesValidationSchema,
51
+ isAdditionalInformationTabError,
52
+ isCharacteristicsTabError,
53
+ isStructureTabError,
54
+ isSubstationTabError,
55
+ translateSwitchKinds,
56
+ voltageLevelCreationDtoToForm,
57
+ voltageLevelCreationEmptyFormData,
58
+ voltageLevelCreationFormSchema,
59
+ voltageLevelCreationFormToDto,
60
+ voltageLevelModificationDtoToForm,
61
+ voltageLevelModificationEmptyFormData,
62
+ voltageLevelModificationFormSchema,
63
+ voltageLevelModificationFormToDto
64
+ };
@@ -0,0 +1,12 @@
1
+ import { default as React, ReactElement } from 'react';
2
+ import { SxStyle } from '../../utils';
3
+ import { BuildStatus } from './constant';
4
+ type BuildStatusChipProps = {
5
+ buildStatus?: BuildStatus;
6
+ sx?: SxStyle;
7
+ icon?: ReactElement;
8
+ onClick?: (e: React.MouseEvent) => void;
9
+ overrideLabel?: boolean;
10
+ };
11
+ export declare function BuildStatusChip({ buildStatus, sx, icon, onClick, overrideLabel, }: Readonly<BuildStatusChipProps>): import("react/jsx-runtime").JSX.Element;
12
+ export default BuildStatusChip;
@@ -0,0 +1,75 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Chip } from "@mui/material";
3
+ import { useIntl } from "react-intl";
4
+ import "../../utils/conversionUtils.js";
5
+ import "../../utils/types/equipmentType.js";
6
+ import "@mui/icons-material";
7
+ import { mergeSx } from "../../utils/styles.js";
8
+ import "../../utils/yupConfig.js";
9
+ import { BuildStatus } from "./constant.js";
10
+ function getBuildStatusSx(buildStatus) {
11
+ return (theme) => {
12
+ const bs = theme.node.buildStatus;
13
+ let bg;
14
+ switch (buildStatus) {
15
+ case BuildStatus.BUILT:
16
+ bg = bs.success;
17
+ break;
18
+ case BuildStatus.BUILT_WITH_WARNING:
19
+ bg = bs.warning;
20
+ break;
21
+ case BuildStatus.BUILT_WITH_ERROR:
22
+ bg = bs.error;
23
+ break;
24
+ default:
25
+ bg = bs.notBuilt;
26
+ break;
27
+ }
28
+ return {
29
+ background: bg,
30
+ // only set explicit contrast color when it's the "notBuilt" background
31
+ ...bg === bs.notBuilt ? { color: theme.palette.getContrastText(bg) } : {},
32
+ "&:hover": {
33
+ backgroundColor: bg
34
+ }
35
+ };
36
+ };
37
+ }
38
+ const baseStyle = (theme) => ({
39
+ padding: theme.spacing(1, 0.5),
40
+ fontSize: "12px",
41
+ fontWeight: 400,
42
+ lineHeight: "100%"
43
+ });
44
+ function BuildStatusChip({
45
+ buildStatus = BuildStatus.NOT_BUILT,
46
+ sx,
47
+ icon,
48
+ onClick,
49
+ overrideLabel = false
50
+ }) {
51
+ const intl = useIntl();
52
+ let labelId = buildStatus?.toString();
53
+ if (overrideLabel) {
54
+ if (labelId === BuildStatus.BUILT) {
55
+ labelId = "NODE_BUILT";
56
+ } else if (labelId === BuildStatus.NOT_BUILT) {
57
+ labelId = "NODE_NOT_BUILT";
58
+ }
59
+ }
60
+ const label = intl.formatMessage({ id: labelId });
61
+ return /* @__PURE__ */ jsx(
62
+ Chip,
63
+ {
64
+ label,
65
+ size: "small",
66
+ icon,
67
+ onClick,
68
+ sx: mergeSx(getBuildStatusSx(buildStatus), sx, baseStyle)
69
+ }
70
+ );
71
+ }
72
+ export {
73
+ BuildStatusChip,
74
+ BuildStatusChip as default
75
+ };
@@ -0,0 +1,13 @@
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 enum BuildStatus {
8
+ NOT_BUILT = "NOT_BUILT",
9
+ BUILDING = "BUILDING",
10
+ BUILT = "BUILT",
11
+ BUILT_WITH_WARNING = "BUILT_WITH_WARNING",
12
+ BUILT_WITH_ERROR = "BUILT_WITH_ERROR"
13
+ }
@@ -0,0 +1,11 @@
1
+ var BuildStatus = /* @__PURE__ */ ((BuildStatus2) => {
2
+ BuildStatus2["NOT_BUILT"] = "NOT_BUILT";
3
+ BuildStatus2["BUILDING"] = "BUILDING";
4
+ BuildStatus2["BUILT"] = "BUILT";
5
+ BuildStatus2["BUILT_WITH_WARNING"] = "BUILT_WITH_WARNING";
6
+ BuildStatus2["BUILT_WITH_ERROR"] = "BUILT_WITH_ERROR";
7
+ return BuildStatus2;
8
+ })(BuildStatus || {});
9
+ export {
10
+ BuildStatus
11
+ };
@@ -0,0 +1,2 @@
1
+ export * from './build-status-chip';
2
+ export * from './constant';
@@ -0,0 +1,6 @@
1
+ import { BuildStatusChip } from "./build-status-chip.js";
2
+ import { BuildStatus } from "./constant.js";
3
+ export {
4
+ BuildStatus,
5
+ BuildStatusChip
6
+ };
@@ -1,6 +1,7 @@
1
1
  import { UUID } from 'node:crypto';
2
2
  import { User } from 'oidc-client';
3
3
  import { GsLang } from '../../../utils';
4
+ import { BuildStatus } from '../../node/constant';
4
5
  export interface ParametersEditionDialogProps {
5
6
  id: UUID;
6
7
  open: boolean;
@@ -11,5 +12,6 @@ export interface ParametersEditionDialogProps {
11
12
  activeDirectory: UUID;
12
13
  language?: GsLang;
13
14
  user: User | null;
15
+ globalBuildStatus?: BuildStatus;
14
16
  isDeveloperMode?: boolean;
15
17
  }
@@ -1,2 +1,2 @@
1
1
  import { ParametersEditionDialogProps } from '../common';
2
- export declare function SensitivityAnalysisParametersDialog({ id, open, onClose, titleId, name, description, activeDirectory, language, user, isDeveloperMode, }: Readonly<ParametersEditionDialogProps>): import("react/jsx-runtime").JSX.Element;
2
+ export declare function SensitivityAnalysisParametersDialog({ id, open, onClose, titleId, name, description, activeDirectory, language, user, globalBuildStatus, isDeveloperMode, }: Readonly<ParametersEditionDialogProps>): import("react/jsx-runtime").JSX.Element;
@@ -54,6 +54,7 @@ function SensitivityAnalysisParametersDialog({
54
54
  activeDirectory,
55
55
  language,
56
56
  user,
57
+ globalBuildStatus,
57
58
  isDeveloperMode = false
58
59
  }) {
59
60
  const parametersBackend = useParametersBackend(
@@ -99,6 +100,7 @@ function SensitivityAnalysisParametersDialog({
99
100
  {
100
101
  sensitivityAnalysisMethods,
101
102
  isDeveloperMode,
103
+ globalBuildStatus,
102
104
  renderTitleFields: () => {
103
105
  return /* @__PURE__ */ jsx(
104
106
  NameElementEditorForm,
@@ -1,8 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { UseSensitivityAnalysisParametersReturn } from './use-sensitivity-analysis-parameters';
3
- export declare function SensitivityAnalysisParametersForm({ sensitivityAnalysisMethods, renderTitleFields, renderActions, isDeveloperMode, }: Readonly<{
3
+ import { BuildStatus } from '../../node/constant';
4
+ export declare function SensitivityAnalysisParametersForm({ sensitivityAnalysisMethods, renderTitleFields, renderActions, isDeveloperMode, globalBuildStatus, }: Readonly<{
4
5
  sensitivityAnalysisMethods: UseSensitivityAnalysisParametersReturn;
5
6
  renderTitleFields?: () => ReactNode;
6
7
  renderActions?: () => ReactNode;
7
8
  isDeveloperMode: boolean;
9
+ globalBuildStatus?: BuildStatus;
8
10
  }>): import("react/jsx-runtime").JSX.Element;
@@ -61,7 +61,8 @@ function SensitivityAnalysisParametersForm({
61
61
  sensitivityAnalysisMethods,
62
62
  renderTitleFields,
63
63
  renderActions,
64
- isDeveloperMode
64
+ isDeveloperMode,
65
+ globalBuildStatus
65
66
  }) {
66
67
  return /* @__PURE__ */ jsx(
67
68
  CustomFormProvider,
@@ -116,7 +117,8 @@ function SensitivityAnalysisParametersForm({
116
117
  isLoading: sensitivityAnalysisMethods.isLoading,
117
118
  factorsCount: sensitivityAnalysisMethods.factorsCount,
118
119
  isDeveloperMode,
119
- isStudyLinked: sensitivityAnalysisMethods.isStudyLinked
120
+ isStudyLinked: sensitivityAnalysisMethods.isStudyLinked,
121
+ globalBuildStatus
120
122
  }
121
123
  )
122
124
  ] }, "sensitivityAnalysisParameters")
@@ -1,13 +1,15 @@
1
1
  import { UUID } from 'node:crypto';
2
2
  import { UseParametersBackendReturnProps } from '../../../utils';
3
3
  import { ComputingType } from '../common';
4
+ import { BuildStatus } from '../../node/constant';
4
5
  interface SensitivityAnalysisParametersProps {
5
6
  studyUuid: UUID | null;
6
7
  currentNodeUuid: UUID | null;
7
8
  currentRootNetworkUuid: UUID | null;
8
9
  parametersBackend: UseParametersBackendReturnProps<ComputingType.SENSITIVITY_ANALYSIS>;
9
10
  setHaveDirtyFields: (isDirty: boolean) => void;
11
+ globalBuildStatus?: BuildStatus;
10
12
  isDeveloperMode: boolean;
11
13
  }
12
- export declare function SensitivityAnalysisParametersInline({ studyUuid, currentNodeUuid, currentRootNetworkUuid, parametersBackend, setHaveDirtyFields, isDeveloperMode, }: Readonly<SensitivityAnalysisParametersProps>): import("react/jsx-runtime").JSX.Element;
14
+ export declare function SensitivityAnalysisParametersInline({ studyUuid, currentNodeUuid, currentRootNetworkUuid, parametersBackend, setHaveDirtyFields, globalBuildStatus, isDeveloperMode, }: Readonly<SensitivityAnalysisParametersProps>): import("react/jsx-runtime").JSX.Element;
13
15
  export {};
@@ -52,10 +52,12 @@ function SensitivityAnalysisParametersInline({
52
52
  currentRootNetworkUuid,
53
53
  parametersBackend,
54
54
  setHaveDirtyFields,
55
+ globalBuildStatus,
55
56
  isDeveloperMode
56
57
  }) {
57
58
  const intl = useIntl();
58
59
  const { snackError } = useSnackMessage();
60
+ console.info(`globalBuildStatus : ${globalBuildStatus}`);
59
61
  const sensitivityAnalysisMethods = useSensitivityAnalysisParametersForm({
60
62
  studyUuid,
61
63
  currentNodeUuid,
@@ -112,6 +114,7 @@ function SensitivityAnalysisParametersInline({
112
114
  {
113
115
  sensitivityAnalysisMethods,
114
116
  isDeveloperMode,
117
+ globalBuildStatus,
115
118
  renderActions: () => {
116
119
  return /* @__PURE__ */ jsxs(Fragment, { children: [
117
120
  /* @__PURE__ */ jsx(Grid, { item: true, container: true, children: /* @__PURE__ */ jsxs(
@@ -1,10 +1,12 @@
1
1
  import { FactorsCount } from '../../../utils';
2
+ import { BuildStatus } from '../../node';
2
3
  interface SensitivityParametersSelectorProps {
3
4
  onFormChanged: () => void;
4
5
  isLoading: boolean;
5
6
  factorsCount: FactorsCount;
6
7
  isDeveloperMode: boolean;
7
8
  isStudyLinked: boolean;
9
+ globalBuildStatus?: BuildStatus;
8
10
  }
9
- declare function SensitivityParametersSelector({ onFormChanged, isLoading, factorsCount, isDeveloperMode, isStudyLinked, }: Readonly<SensitivityParametersSelectorProps>): import("react/jsx-runtime").JSX.Element;
11
+ declare function SensitivityParametersSelector({ onFormChanged, isLoading, factorsCount, isDeveloperMode, isStudyLinked, globalBuildStatus, }: Readonly<SensitivityParametersSelectorProps>): import("react/jsx-runtime").JSX.Element;
10
12
  export default SensitivityParametersSelector;