@gridsuite/commons-ui 0.279.0 → 0.281.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 (132) hide show
  1. package/dist/components/composite/customAGGrid/separatorCellRenderer.d.ts +7 -2
  2. package/dist/components/composite/customAGGrid/separatorCellRenderer.js +2 -2
  3. package/dist/components/ui/dialogs/elementSaveDialog/ElementSaveDialog.d.ts +6 -1
  4. package/dist/components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js +29 -5
  5. package/dist/components/ui/reactHookForm/booleans/RadioInput.d.ts +1 -0
  6. package/dist/components/ui/reactHookForm/booleans/RadioInput.js +2 -1
  7. package/dist/features/index.js +93 -3
  8. package/dist/features/network-modifications/index.d.ts +1 -0
  9. package/dist/features/network-modifications/index.js +91 -3
  10. package/dist/features/network-modifications/tabular/TabularForm.d.ts +22 -0
  11. package/dist/features/network-modifications/tabular/TabularForm.js +536 -0
  12. package/dist/features/network-modifications/tabular/index.d.ts +7 -0
  13. package/dist/features/network-modifications/tabular/index.js +65 -0
  14. package/dist/features/network-modifications/tabular/properties/DefineTabularPropertiesDialog.d.ts +12 -0
  15. package/dist/features/network-modifications/tabular/properties/DefineTabularPropertiesDialog.js +123 -0
  16. package/dist/features/network-modifications/tabular/properties/TabularPropertiesForm.d.ts +1 -0
  17. package/dist/features/network-modifications/tabular/properties/TabularPropertiesForm.js +87 -0
  18. package/dist/features/network-modifications/tabular/properties/TabularPropertyForm.d.ts +5 -0
  19. package/dist/features/network-modifications/tabular/properties/TabularPropertyForm.js +91 -0
  20. package/dist/features/network-modifications/tabular/properties/index.d.ts +4 -0
  21. package/dist/features/network-modifications/tabular/properties/index.js +13 -0
  22. package/dist/features/network-modifications/tabular/properties/tabularProperty.utils.d.ts +26 -0
  23. package/dist/features/network-modifications/tabular/properties/tabularProperty.utils.js +50 -0
  24. package/dist/features/network-modifications/tabular/tabular.constants.d.ts +59 -0
  25. package/dist/features/network-modifications/tabular/tabular.constants.js +75 -0
  26. package/dist/features/network-modifications/tabular/tabular.types.d.ts +41 -0
  27. package/dist/features/network-modifications/tabular/tabular.types.js +8 -0
  28. package/dist/features/network-modifications/tabular/tabular.utils.d.ts +68 -0
  29. package/dist/features/network-modifications/tabular/tabular.utils.js +301 -0
  30. package/dist/features/network-modifications/tabular/tabularCreation.utils.d.ts +25 -0
  31. package/dist/features/network-modifications/tabular/tabularCreation.utils.js +276 -0
  32. package/dist/features/network-modifications/tabular/tabularModification.utils.d.ts +43 -0
  33. package/dist/features/network-modifications/tabular/tabularModification.utils.js +406 -0
  34. package/dist/features/network-modifications/voltageLevel/common/HeaderWithTooltip.d.ts +8 -0
  35. package/dist/features/network-modifications/voltageLevel/common/HeaderWithTooltip.js +119 -0
  36. package/dist/features/network-modifications/voltageLevel/common/index.d.ts +1 -0
  37. package/dist/features/network-modifications/voltageLevel/common/index.js +4 -0
  38. package/dist/features/network-modifications/voltageLevel/index.d.ts +4 -1
  39. package/dist/features/network-modifications/voltageLevel/index.js +28 -3
  40. package/dist/features/network-modifications/voltageLevel/moveFeederBays/MoveVoltageLevelFeederBaysForm.d.ts +8 -0
  41. package/dist/features/network-modifications/voltageLevel/moveFeederBays/MoveVoltageLevelFeederBaysForm.js +387 -0
  42. package/dist/features/network-modifications/voltageLevel/moveFeederBays/feederBay/FeederBayDirectionCellRender.d.ts +6 -0
  43. package/dist/features/network-modifications/voltageLevel/moveFeederBays/feederBay/FeederBayDirectionCellRender.js +64 -0
  44. package/dist/features/network-modifications/voltageLevel/moveFeederBays/feederBay/FeederBayPositionCellRender.d.ts +6 -0
  45. package/dist/features/network-modifications/voltageLevel/moveFeederBays/feederBay/FeederBayPositionCellRender.js +102 -0
  46. package/dist/features/network-modifications/voltageLevel/moveFeederBays/feederBay/index.d.ts +2 -0
  47. package/dist/features/network-modifications/voltageLevel/moveFeederBays/feederBay/index.js +6 -0
  48. package/dist/features/network-modifications/voltageLevel/moveFeederBays/index.d.ts +4 -0
  49. package/dist/features/network-modifications/voltageLevel/moveFeederBays/index.js +13 -0
  50. package/dist/features/network-modifications/voltageLevel/moveFeederBays/moveVoltageLevelFeederBays.type.d.ts +36 -0
  51. package/dist/features/network-modifications/voltageLevel/moveFeederBays/moveVoltageLevelFeederBays.utils.d.ts +37 -0
  52. package/dist/features/network-modifications/voltageLevel/moveFeederBays/moveVoltageLevelFeederBays.utils.js +86 -0
  53. package/dist/features/network-modifications/voltageLevel/topology/{CreateVoltageLevelTopologyForm.d.ts → creation/CreateVoltageLevelTopologyForm.d.ts} +1 -1
  54. package/dist/features/network-modifications/voltageLevel/topology/{CreateVoltageLevelTopologyForm.js → creation/CreateVoltageLevelTopologyForm.js} +38 -38
  55. package/dist/features/network-modifications/voltageLevel/topology/{voltageLevelTopologyCreation.types.d.ts → creation/voltageLevelTopologyCreation.types.d.ts} +1 -1
  56. package/dist/features/network-modifications/voltageLevel/topology/creation/voltageLevelTopologyCreation.types.js +1 -0
  57. package/dist/features/network-modifications/voltageLevel/topology/{voltageLevelTopologyCreation.utils.d.ts → creation/voltageLevelTopologyCreation.utils.d.ts} +1 -1
  58. package/dist/features/network-modifications/voltageLevel/topology/{voltageLevelTopologyCreation.utils.js → creation/voltageLevelTopologyCreation.utils.js} +5 -5
  59. package/dist/features/network-modifications/voltageLevel/topology/modification/ConnectionCellRender.d.ts +6 -0
  60. package/dist/features/network-modifications/voltageLevel/topology/modification/ConnectionCellRender.js +80 -0
  61. package/dist/features/network-modifications/voltageLevel/topology/modification/VoltageLevelTopologyModificationForm.d.ts +10 -0
  62. package/dist/features/network-modifications/voltageLevel/topology/modification/VoltageLevelTopologyModificationForm.js +284 -0
  63. package/dist/features/network-modifications/voltageLevel/topology/modification/constants.d.ts +10 -0
  64. package/dist/features/network-modifications/voltageLevel/topology/modification/constants.js +10 -0
  65. package/dist/features/network-modifications/voltageLevel/topology/modification/index.d.ts +10 -0
  66. package/dist/features/network-modifications/voltageLevel/topology/modification/index.js +14 -0
  67. package/dist/features/network-modifications/voltageLevel/topology/modification/voltageLevelTopologyModification.types.d.ts +28 -0
  68. package/dist/features/network-modifications/voltageLevel/topology/modification/voltageLevelTopologyModification.types.js +1 -0
  69. package/dist/features/network-modifications/voltageLevel/topology/modification/voltageLevelTopologyModification.utils.d.ts +29 -0
  70. package/dist/features/network-modifications/voltageLevel/topology/modification/voltageLevelTopologyModification.utils.js +124 -0
  71. package/dist/features/parameters/common/index.d.ts +1 -0
  72. package/dist/features/parameters/common/index.js +2 -0
  73. package/dist/features/parameters/common/parameter-field.d.ts +2 -2
  74. package/dist/features/parameters/common/parameter-field.js +1 -1
  75. package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js +1 -1
  76. package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +6 -6
  77. package/dist/features/parameters/dynamic-margin-calculation/loads-variations-parameters.js +1 -1
  78. package/dist/features/parameters/dynamic-margin-calculation/time-delay-parameters.js +1 -1
  79. package/dist/features/parameters/dynamic-security-analysis/contingency-parameters.js +1 -1
  80. package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js +6 -6
  81. package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.js +1 -1
  82. package/dist/features/parameters/dynamic-security-analysis/scenario-parameters.js +1 -1
  83. package/dist/features/parameters/dynamic-simulation/dynamic-simulation-inline.js +6 -6
  84. package/dist/features/parameters/dynamic-simulation/dynamic-simulation-parameters-form.js +1 -1
  85. package/dist/features/parameters/dynamic-simulation/network/network-parameters.js +1 -1
  86. package/dist/features/parameters/dynamic-simulation/solver/common-solver/common-solver-parameters.js +1 -1
  87. package/dist/features/parameters/dynamic-simulation/solver/ida-solver/ida-solver-parameters.js +1 -1
  88. package/dist/features/parameters/dynamic-simulation/solver/sim-solver/simplified-solver-parameters.js +1 -1
  89. package/dist/features/parameters/dynamic-simulation/solver/solver-parameters.js +1 -1
  90. package/dist/features/parameters/dynamic-simulation/time-delay/time-delay-parameters.js +1 -1
  91. package/dist/features/parameters/index.js +2 -0
  92. package/dist/features/parameters/loadflow/load-flow-advanced-parameters.js +1 -1
  93. package/dist/features/parameters/loadflow/load-flow-general-parameters.js +1 -1
  94. package/dist/features/parameters/loadflow/load-flow-parameters-inline.js +5 -5
  95. package/dist/features/parameters/loadflow/load-flow-provider-specific-parameters.js +1 -1
  96. package/dist/features/parameters/network-visualizations/network-visualizations-parameters-inline.js +5 -5
  97. package/dist/features/parameters/pcc-min/pcc-min-parameters-inline.js +5 -5
  98. package/dist/features/parameters/security-analysis/security-analysis-parameters-inline.js +6 -6
  99. package/dist/features/parameters/sensi/sensitivity-analysis-parameters-inline.js +6 -6
  100. package/dist/features/parameters/short-circuit/short-circuit-parameters-inline.js +5 -5
  101. package/dist/features/parameters/voltage-init/voltage-init-parameters-inline.js +5 -5
  102. package/dist/features/side-bar/AppSideBarHeader.js +20 -5
  103. package/dist/features/side-bar/EnvironmentChip.d.ts +13 -0
  104. package/dist/features/side-bar/EnvironmentChip.js +49 -0
  105. package/dist/index.js +97 -5
  106. package/dist/services/appsMetadata.d.ts +2 -0
  107. package/dist/services/directory.d.ts +1 -1
  108. package/dist/services/directory.js +6 -2
  109. package/dist/services/index.js +2 -1
  110. package/dist/services/userAdmin.d.ts +2 -1
  111. package/dist/services/userAdmin.js +9 -1
  112. package/dist/translations/en/businessErrorsEn.d.ts +1 -0
  113. package/dist/translations/en/businessErrorsEn.js +1 -0
  114. package/dist/translations/en/networkModificationsEn.d.ts +97 -0
  115. package/dist/translations/en/networkModificationsEn.js +103 -1
  116. package/dist/translations/fr/businessErrorsFr.d.ts +1 -0
  117. package/dist/translations/fr/businessErrorsFr.js +1 -0
  118. package/dist/translations/fr/networkModificationsFr.d.ts +97 -0
  119. package/dist/translations/fr/networkModificationsFr.js +103 -1
  120. package/dist/utils/constants/fieldConstants.d.ts +7 -1
  121. package/dist/utils/constants/fieldConstants.js +6 -0
  122. package/dist/utils/constants/index.js +2 -1
  123. package/dist/utils/constants/notificationsProvider.d.ts +1 -0
  124. package/dist/utils/constants/notificationsProvider.js +1 -0
  125. package/dist/utils/constants/translationKeys.d.ts +1 -0
  126. package/dist/utils/constants/translationKeys.js +2 -0
  127. package/dist/utils/index.js +2 -1
  128. package/dist/utils/types/types.d.ts +4 -0
  129. package/package.json +1 -1
  130. /package/dist/features/network-modifications/voltageLevel/{topology/voltageLevelTopologyCreation.types.js → moveFeederBays/moveVoltageLevelFeederBays.type.js} +0 -0
  131. /package/dist/features/network-modifications/voltageLevel/topology/{index.d.ts → creation/index.d.ts} +0 -0
  132. /package/dist/features/network-modifications/voltageLevel/topology/{index.js → creation/index.js} +0 -0
@@ -0,0 +1,37 @@
1
+ import { InferType } from 'yup';
2
+ import { MoveVoltageLevelFeederBaysDto } from './moveVoltageLevelFeederBays.type';
3
+ import * as yup from 'yup';
4
+ export declare const emptyMoveVoltageLevelFeederBaysFormData: {
5
+ equipmentID: null;
6
+ moveVoltageLevelFeederBaysTable: {
7
+ equipmentID: null;
8
+ busbarSectionId: null;
9
+ busbarSectionIds: never[];
10
+ connectionSide: null;
11
+ connectionName: null;
12
+ connectionDirection: null;
13
+ connectionPosition: null;
14
+ isRemoved: boolean;
15
+ isSeparator: boolean;
16
+ }[];
17
+ };
18
+ export declare const moveVoltageLevelFeederBaysFormSchema: yup.ObjectSchema<{
19
+ equipmentID: string;
20
+ moveVoltageLevelFeederBaysTable: {
21
+ connectionSide?: string | null | undefined;
22
+ connectionDirection?: string | null | undefined;
23
+ connectionName?: string | null | undefined;
24
+ connectionPosition?: number | null | undefined;
25
+ equipmentID?: string | undefined;
26
+ busbarSectionId?: string | undefined;
27
+ busbarSectionIds?: (string | undefined)[] | undefined;
28
+ isRemoved?: boolean | undefined;
29
+ isSeparator?: boolean | undefined;
30
+ }[] | undefined;
31
+ }, yup.AnyObject, {
32
+ equipmentID: undefined;
33
+ moveVoltageLevelFeederBaysTable: "";
34
+ }, "">;
35
+ export type MoveVoltageLevelFeederBaysFormSchemaType = InferType<typeof moveVoltageLevelFeederBaysFormSchema>;
36
+ export declare const moveVoltageLevelFeederBaysDtoToForm: (moveVoltageLevelFeederBays: MoveVoltageLevelFeederBaysDto) => MoveVoltageLevelFeederBaysFormSchemaType;
37
+ export declare const moveVoltageLevelFeederBaysFormToDto: (moveVoltageLevelFeederBays: MoveVoltageLevelFeederBaysFormSchemaType) => MoveVoltageLevelFeederBaysDto;
@@ -0,0 +1,86 @@
1
+ import * as yup from "yup";
2
+ import { isNumber } from "mathjs";
3
+ import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
4
+ import "../../../../utils/conversionUtils.js";
5
+ import "../../../../utils/types/equipmentType.js";
6
+ import { ModificationType } from "../../../../utils/types/modificationType.js";
7
+ import "react/jsx-runtime";
8
+ import "@mui/icons-material";
9
+ const emptyMoveVoltageLevelFeederBaysFormData = {
10
+ [FieldConstants.EQUIPMENT_ID]: null,
11
+ [FieldConstants.MOVE_VOLTAGE_LEVEL_FEEDER_BAYS_TABLE]: [
12
+ {
13
+ [FieldConstants.EQUIPMENT_ID]: null,
14
+ [FieldConstants.BUSBAR_SECTION_ID]: null,
15
+ [FieldConstants.BUSBAR_SECTION_IDS]: [],
16
+ [FieldConstants.CONNECTION_SIDE]: null,
17
+ [FieldConstants.CONNECTION_NAME]: null,
18
+ [FieldConstants.CONNECTION_DIRECTION]: null,
19
+ [FieldConstants.CONNECTION_POSITION]: null,
20
+ [FieldConstants.IS_REMOVED]: false,
21
+ [FieldConstants.IS_SEPARATOR]: false
22
+ }
23
+ ]
24
+ };
25
+ function requiredWhenActive(schema) {
26
+ return schema.when(
27
+ [FieldConstants.IS_REMOVED, FieldConstants.IS_SEPARATOR],
28
+ ([isRemoved, isSeparator], baseSchema) => !isRemoved && !isSeparator ? baseSchema.nullable().required() : baseSchema.nullable()
29
+ );
30
+ }
31
+ const moveVoltageLevelFeederBaysFormSchema = yup.object().shape({
32
+ [FieldConstants.EQUIPMENT_ID]: yup.string().required(),
33
+ [FieldConstants.MOVE_VOLTAGE_LEVEL_FEEDER_BAYS_TABLE]: yup.array().of(
34
+ yup.object().shape({
35
+ [FieldConstants.EQUIPMENT_ID]: requiredWhenActive(yup.string()),
36
+ [FieldConstants.BUSBAR_SECTION_ID]: requiredWhenActive(yup.string()),
37
+ [FieldConstants.BUSBAR_SECTION_IDS]: requiredWhenActive(yup.array().of(yup.string())),
38
+ [FieldConstants.CONNECTION_SIDE]: yup.string().nullable(),
39
+ [FieldConstants.CONNECTION_NAME]: yup.string().nullable(),
40
+ [FieldConstants.CONNECTION_DIRECTION]: yup.string().nullable(),
41
+ [FieldConstants.CONNECTION_POSITION]: yup.number().nullable().positive(),
42
+ [FieldConstants.IS_REMOVED]: yup.boolean(),
43
+ [FieldConstants.IS_SEPARATOR]: yup.boolean()
44
+ })
45
+ )
46
+ });
47
+ const moveVoltageLevelFeederBaysDtoToForm = (moveVoltageLevelFeederBays) => {
48
+ const moveVoltageLevelFeederBaysTable = moveVoltageLevelFeederBays.feederBays.map((row, index) => ({
49
+ [FieldConstants.EQUIPMENT_ID]: row.equipmentId ?? "",
50
+ [FieldConstants.BUSBAR_SECTION_ID]: row.busbarSectionId ?? "",
51
+ [FieldConstants.BUSBAR_SECTION_IDS]: [],
52
+ [FieldConstants.CONNECTION_SIDE]: row.connectionSide ?? null,
53
+ [FieldConstants.CONNECTION_NAME]: row.connectionName ?? null,
54
+ [FieldConstants.CONNECTION_DIRECTION]: row.connectionDirection ?? null,
55
+ [FieldConstants.CONNECTION_POSITION]: isNumber(row.connectionPosition) ? Number.parseInt(row.connectionPosition, 10) : null,
56
+ [FieldConstants.IS_REMOVED]: false,
57
+ [FieldConstants.IS_SEPARATOR]: false,
58
+ [FieldConstants.ROW_ID]: `${row.equipmentId}-${row.connectionSide}-${index}`
59
+ }));
60
+ return {
61
+ [FieldConstants.EQUIPMENT_ID]: moveVoltageLevelFeederBays.voltageLevelId,
62
+ [FieldConstants.MOVE_VOLTAGE_LEVEL_FEEDER_BAYS_TABLE]: moveVoltageLevelFeederBaysTable
63
+ };
64
+ };
65
+ const moveVoltageLevelFeederBaysFormToDto = (moveVoltageLevelFeederBays) => {
66
+ const tableData = moveVoltageLevelFeederBays[FieldConstants.MOVE_VOLTAGE_LEVEL_FEEDER_BAYS_TABLE];
67
+ const feederBays = tableData && Array.isArray(tableData) ? tableData.filter((row) => row != null).map((row) => ({
68
+ equipmentId: row[FieldConstants.EQUIPMENT_ID] ?? "",
69
+ busbarSectionId: row[FieldConstants.BUSBAR_SECTION_ID] ?? "",
70
+ connectionSide: row[FieldConstants.CONNECTION_SIDE] ?? null,
71
+ connectionPosition: isNumber(row[FieldConstants.CONNECTION_POSITION]) ? row[FieldConstants.CONNECTION_POSITION].toString() : null,
72
+ connectionName: row[FieldConstants.CONNECTION_NAME] ?? null,
73
+ connectionDirection: row[FieldConstants.CONNECTION_DIRECTION] ?? null
74
+ })) : [];
75
+ return {
76
+ type: ModificationType.MOVE_VOLTAGE_LEVEL_FEEDER_BAYS,
77
+ voltageLevelId: moveVoltageLevelFeederBays[FieldConstants.EQUIPMENT_ID],
78
+ feederBays
79
+ };
80
+ };
81
+ export {
82
+ emptyMoveVoltageLevelFeederBaysFormData,
83
+ moveVoltageLevelFeederBaysDtoToForm,
84
+ moveVoltageLevelFeederBaysFormSchema,
85
+ moveVoltageLevelFeederBaysFormToDto
86
+ };
@@ -1,4 +1,4 @@
1
- import { PositionDiagramPaneType } from '../../common';
1
+ import { PositionDiagramPaneType } from '../../../common';
2
2
  export interface CreateVoltageLevelTopologyFormProps {
3
3
  voltageLevelId: string;
4
4
  PositionDiagramPane?: PositionDiagramPaneType;
@@ -4,70 +4,70 @@ import { TextField, Stack, Grid, Button, Tooltip, Box } from "@mui/material";
4
4
  import { useIntl, FormattedMessage } from "react-intl";
5
5
  import { InfoOutlined } from "@mui/icons-material";
6
6
  import { useFormContext, useWatch } from "react-hook-form";
7
- import "../../../../components/ui/overflowableText/OverflowableText.js";
8
- import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
9
- import "../../../../utils/conversionUtils.js";
10
- import "../../../../utils/types/equipmentType.js";
7
+ import "../../../../../components/ui/overflowableText/OverflowableText.js";
8
+ import { FieldConstants } from "../../../../../utils/constants/fieldConstants.js";
9
+ import "../../../../../utils/conversionUtils.js";
10
+ import "../../../../../utils/types/equipmentType.js";
11
11
  import "localized-countries";
12
12
  import "localized-countries/data/fr";
13
13
  import "localized-countries/data/en";
14
14
  import "notistack";
15
- import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
16
- import { useCustomFormContext } from "../../../../components/ui/reactHookForm/provider/useCustomFormContext.js";
15
+ import "../../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
16
+ import { useCustomFormContext } from "../../../../../components/ui/reactHookForm/provider/useCustomFormContext.js";
17
17
  import "yup";
18
- import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
19
- import { IntegerInput } from "../../../../components/ui/reactHookForm/numbers/IntegerInput.js";
20
- import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
18
+ import "../../../../../components/ui/treeViewFinder/TreeViewFinder.js";
19
+ import { IntegerInput } from "../../../../../components/ui/reactHookForm/numbers/IntegerInput.js";
20
+ import "../../../../../components/ui/reactHookForm/numbers/RangeInput.js";
21
21
  import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
22
22
  import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
23
23
  import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
24
24
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
25
25
  import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
26
- import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
27
- import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
28
- import "../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
26
+ import "../../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
27
+ import "../../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
28
+ import "../../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
29
29
  import "@hello-pangea/dnd";
30
- import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
31
- import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
30
+ import "../../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
31
+ import "../../../../../components/ui/snackbarProvider/SnackbarProvider.js";
32
32
  import "mui-nested-menu";
33
33
  import "react-resizable-panels";
34
34
  import "react-papaparse";
35
- import { SwitchesBetweenSections } from "../creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js";
36
- import { filledTextField } from "../../common/form.utils.js";
37
- import "../../common/properties/propertyUtils.js";
35
+ import { SwitchesBetweenSections } from "../../creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js";
36
+ import { filledTextField } from "../../../common/form.utils.js";
37
+ import "../../../common/properties/propertyUtils.js";
38
38
  import "react-dom";
39
39
  import "autosuggest-highlight/match";
40
40
  import "autosuggest-highlight/parse";
41
41
  import "clsx";
42
- import "../../../../components/composite/filter/FilterCreationDialog.js";
43
- import "../../../../components/composite/filter/HeaderFilterForm.js";
44
- import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
45
- import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
46
- import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
47
- import "../../../../components/composite/filter/expert/expertFilterConstants.js";
42
+ import "../../../../../components/composite/filter/FilterCreationDialog.js";
43
+ import "../../../../../components/composite/filter/HeaderFilterForm.js";
44
+ import "../../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
45
+ import "../../../../../components/composite/filter/expert/ExpertFilterForm.js";
46
+ import "../../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
47
+ import "../../../../../components/composite/filter/expert/expertFilterConstants.js";
48
48
  import "react-querybuilder";
49
49
  import "uuid";
50
- import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
51
- import "../../../../components/composite/filter/utils/filterFormUtils.js";
50
+ import "../../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
51
+ import "../../../../../components/composite/filter/utils/filterFormUtils.js";
52
52
  import "@react-querybuilder/material";
53
- import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
54
- import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
55
- import "../../../../components/composite/agGridTable/BottomTableButtons.js";
56
- import "../../../../components/composite/agGridTable/CustomAgGridTable.js";
53
+ import "../../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
54
+ import "../../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
55
+ import "../../../../../components/composite/agGridTable/BottomTableButtons.js";
56
+ import "../../../../../components/composite/agGridTable/CustomAgGridTable.js";
57
57
  import "ag-grid-community";
58
- import "../../../../components/composite/customAGGrid/customAggrid.js";
59
- import "../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
58
+ import "../../../../../components/composite/customAGGrid/customAggrid.js";
59
+ import "../../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
60
60
  import "mathjs";
61
- import "../../../../components/composite/report/report-viewer/log-table/log-table.js";
61
+ import "../../../../../components/composite/report/report-viewer/log-table/log-table.js";
62
62
  import "react-window";
63
- import "../../../../components/composite/report/report-treeview/treeview-item.js";
64
- import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
65
- import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
63
+ import "../../../../../components/composite/report/report-treeview/treeview-item.js";
64
+ import "../../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
65
+ import "../../../common/regulatingTerminal/RegulatingTerminalForm.js";
66
66
  import "@mui/material/colors";
67
67
  import "@mui/x-charts";
68
- import "../../common/currentLimits/limitsPane.utils.js";
69
- import "../creation/voltageLevel.constants.js";
70
- import "../creation/voltageLevelCreation.utils.js";
68
+ import "../../../common/currentLimits/limitsPane.utils.js";
69
+ import "../../creation/voltageLevel.constants.js";
70
+ import "../../creation/voltageLevelCreation.utils.js";
71
71
  function CreateVoltageLevelTopologyForm({
72
72
  voltageLevelId,
73
73
  PositionDiagramPane
@@ -1,4 +1,4 @@
1
- import { ModificationType } from '../../../../utils';
1
+ import { ModificationType } from '../../../../../utils';
2
2
  export interface CreateVoltageLevelTopologyDto {
3
3
  type: ModificationType;
4
4
  uuid?: string;
@@ -1,5 +1,5 @@
1
1
  import { IntlShape } from 'react-intl';
2
- import { DeepNullable } from '../../../../utils';
2
+ import { DeepNullable } from '../../../../../utils';
3
3
  import { CreateVoltageLevelTopologyDto } from './voltageLevelTopologyCreation.types';
4
4
  /**
5
5
  * Copyright (c) 2026, RTE (http://www.rte-france.com)
@@ -1,11 +1,11 @@
1
1
  import * as yup from "yup";
2
- import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
3
- import "../../../../utils/conversionUtils.js";
4
- import "../../../../utils/types/equipmentType.js";
5
- import { ModificationType } from "../../../../utils/types/modificationType.js";
2
+ import { FieldConstants } from "../../../../../utils/constants/fieldConstants.js";
3
+ import "../../../../../utils/conversionUtils.js";
4
+ import "../../../../../utils/types/equipmentType.js";
5
+ import { ModificationType } from "../../../../../utils/types/modificationType.js";
6
6
  import "react/jsx-runtime";
7
7
  import "@mui/icons-material";
8
- import { MAX_SECTIONS_COUNT } from "../creation/voltageLevel.constants.js";
8
+ import { MAX_SECTIONS_COUNT } from "../../creation/voltageLevel.constants.js";
9
9
  const createVoltageLevelTopologyFormSchema = yup.object().shape({
10
10
  [FieldConstants.SECTION_COUNT]: yup.number().required().nullable().min(1, "AtLeastOneSectionAdded").max(MAX_SECTIONS_COUNT, "SectionCountMustBeLessThanOrEqualToTwenty"),
11
11
  [FieldConstants.SWITCHES_BETWEEN_SECTIONS]: yup.string().nullable().when([FieldConstants.SECTION_COUNT], {
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ type ConnectionCellRendererProps = {
3
+ name: string;
4
+ };
5
+ export declare function ConnectionCellRenderer({ name }: Readonly<ConnectionCellRendererProps>): React.JSX.Element;
6
+ export {};
@@ -0,0 +1,80 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useMemo, useCallback } from "react";
3
+ import { useController } from "react-hook-form";
4
+ import "@mui/material";
5
+ import "@mui/icons-material";
6
+ import "react-intl";
7
+ import "../../../../../components/ui/overflowableText/OverflowableText.js";
8
+ import "../../../../../utils/conversionUtils.js";
9
+ import "../../../../../utils/types/equipmentType.js";
10
+ import "localized-countries";
11
+ import "localized-countries/data/fr";
12
+ import "localized-countries/data/en";
13
+ import "notistack";
14
+ import "../../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
15
+ import "yup";
16
+ import "../../../../../components/ui/treeViewFinder/TreeViewFinder.js";
17
+ import "../../../../../components/ui/reactHookForm/numbers/RangeInput.js";
18
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
19
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
20
+ import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
21
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
22
+ import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
23
+ import "../../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
24
+ import "../../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
25
+ import { CheckboxNullableInput } from "../../../../../components/ui/reactHookForm/CheckboxNullableInput.js";
26
+ import "../../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
27
+ import "@hello-pangea/dnd";
28
+ import "../../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
29
+ import "../../../../../components/ui/snackbarProvider/SnackbarProvider.js";
30
+ import "mui-nested-menu";
31
+ import "react-resizable-panels";
32
+ import "react-papaparse";
33
+ import "react-dom";
34
+ import "autosuggest-highlight/match";
35
+ import "autosuggest-highlight/parse";
36
+ import "clsx";
37
+ import "../../../../../components/composite/filter/FilterCreationDialog.js";
38
+ import "../../../../../components/composite/filter/HeaderFilterForm.js";
39
+ import "../../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
40
+ import "../../../../../components/composite/filter/expert/ExpertFilterForm.js";
41
+ import "../../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
42
+ import "../../../../../components/composite/filter/expert/expertFilterConstants.js";
43
+ import "react-querybuilder";
44
+ import "uuid";
45
+ import "../../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
46
+ import "../../../../../components/composite/filter/utils/filterFormUtils.js";
47
+ import "@react-querybuilder/material";
48
+ import "../../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
49
+ import "../../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
50
+ import "../../../../../components/composite/agGridTable/BottomTableButtons.js";
51
+ import "../../../../../components/composite/agGridTable/CustomAgGridTable.js";
52
+ import "ag-grid-community";
53
+ import "../../../../../components/composite/customAGGrid/customAggrid.js";
54
+ import "../../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
55
+ import "mathjs";
56
+ import "../../../../../components/composite/report/report-viewer/log-table/log-table.js";
57
+ import "react-window";
58
+ import "../../../../../components/composite/report/report-treeview/treeview-item.js";
59
+ import "../../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
60
+ function ConnectionCellRenderer({ name }) {
61
+ const {
62
+ field: { value }
63
+ } = useController({ name });
64
+ const color = useMemo(() => {
65
+ if (value === null) {
66
+ return "grey";
67
+ }
68
+ return "";
69
+ }, [value]);
70
+ const getLabel = useCallback((checked) => {
71
+ if (checked === null) {
72
+ return "NoModification";
73
+ }
74
+ return checked ? "Closed" : "Open";
75
+ }, []);
76
+ return /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx(CheckboxNullableInput, { name, label: getLabel, style: { color } }) });
77
+ }
78
+ export {
79
+ ConnectionCellRenderer
80
+ };
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { SwitchDto, TopologyVoltageLevelModificationDto } from './voltageLevelTopologyModification.types';
3
+ interface VoltageLevelTopologyModificationFormProps {
4
+ voltageLevelToModify: TopologyVoltageLevelModificationDto | null | undefined;
5
+ switchesToModify?: SwitchDto[];
6
+ isModification?: boolean;
7
+ isPreviousStatusEnabled?: boolean;
8
+ }
9
+ export declare function VoltageLevelTopologyModificationForm({ voltageLevelToModify, switchesToModify, isModification, isPreviousStatusEnabled, }: Readonly<VoltageLevelTopologyModificationFormProps>): React.JSX.Element;
10
+ export {};