@gridsuite/commons-ui 0.179.0 → 0.180.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 (82) hide show
  1. package/dist/components/index.js +73 -1
  2. package/dist/components/inputs/index.js +2 -0
  3. package/dist/components/inputs/reactHookForm/CheckboxNullableInput.d.ts +15 -0
  4. package/dist/components/inputs/reactHookForm/CheckboxNullableInput.js +75 -0
  5. package/dist/components/inputs/reactHookForm/index.d.ts +1 -0
  6. package/dist/components/inputs/reactHookForm/index.js +2 -0
  7. package/dist/components/network-modifications/common/connectivity/BranchConnectivityForm.d.ts +7 -0
  8. package/dist/components/network-modifications/common/connectivity/BranchConnectivityForm.js +63 -0
  9. package/dist/components/network-modifications/common/connectivity/ConnectivityForm.d.ts +37 -0
  10. package/dist/components/network-modifications/common/connectivity/ConnectivityForm.js +267 -0
  11. package/dist/components/network-modifications/common/connectivity/connectivity.type.d.ts +34 -0
  12. package/dist/components/network-modifications/common/connectivity/connectivity.type.js +1 -0
  13. package/dist/components/network-modifications/common/connectivity/connectivityForm.utils.d.ts +241 -0
  14. package/dist/components/network-modifications/common/connectivity/connectivityForm.utils.js +196 -0
  15. package/dist/components/network-modifications/common/connectivity/index.d.ts +10 -0
  16. package/dist/components/network-modifications/common/connectivity/index.js +25 -0
  17. package/dist/components/network-modifications/common/index.d.ts +4 -1
  18. package/dist/components/network-modifications/common/index.js +56 -1
  19. package/dist/components/network-modifications/common/measurements/BranchActiveReactivePowerMeasurementsForm.d.ts +2 -0
  20. package/dist/components/network-modifications/common/measurements/BranchActiveReactivePowerMeasurementsForm.js +37 -0
  21. package/dist/components/network-modifications/common/measurements/PowerMeasurementsForm.d.ts +9 -0
  22. package/dist/components/network-modifications/common/measurements/PowerMeasurementsForm.js +52 -0
  23. package/dist/components/network-modifications/common/measurements/PowerWithValidityForm.d.ts +2 -0
  24. package/dist/components/network-modifications/common/measurements/PowerWithValidityForm.js +74 -0
  25. package/dist/components/network-modifications/common/measurements/branchActiveReactivePowerForm.utils.d.ts +56 -0
  26. package/dist/components/network-modifications/common/measurements/branchActiveReactivePowerForm.utils.js +69 -0
  27. package/dist/components/network-modifications/common/measurements/index.d.ts +13 -0
  28. package/dist/components/network-modifications/common/measurements/index.js +26 -0
  29. package/dist/components/network-modifications/common/measurements/injectionActiveReactivePowerForm.utils.d.ts +58 -0
  30. package/dist/components/network-modifications/common/measurements/injectionActiveReactivePowerForm.utils.js +55 -0
  31. package/dist/components/network-modifications/common/measurements/measurement.type.d.ts +13 -0
  32. package/dist/components/network-modifications/common/measurements/measurement.type.js +1 -0
  33. package/dist/components/network-modifications/common/measurements/powerWithValidity.utils.d.ts +22 -0
  34. package/dist/components/network-modifications/common/measurements/powerWithValidity.utils.js +36 -0
  35. package/dist/components/network-modifications/common/setpoints/SetPointsForm.d.ts +15 -0
  36. package/dist/components/network-modifications/common/setpoints/SetPointsForm.js +71 -0
  37. package/dist/components/network-modifications/common/setpoints/index.d.ts +8 -0
  38. package/dist/components/network-modifications/common/setpoints/index.js +10 -0
  39. package/dist/components/network-modifications/common/setpoints/setPoints.utils.d.ts +16 -0
  40. package/dist/components/network-modifications/common/setpoints/setPoints.utils.js +62 -0
  41. package/dist/components/network-modifications/index.d.ts +1 -0
  42. package/dist/components/network-modifications/index.js +71 -1
  43. package/dist/components/network-modifications/load/common/LoadDialogHeader.d.ts +7 -0
  44. package/dist/components/network-modifications/load/common/LoadDialogHeader.js +103 -0
  45. package/dist/components/network-modifications/load/common/LoadDialogTabs.d.ts +14 -0
  46. package/dist/components/network-modifications/load/common/LoadDialogTabs.js +49 -0
  47. package/dist/components/network-modifications/load/common/LoadDialogTabsContent.d.ts +8 -0
  48. package/dist/components/network-modifications/load/common/LoadDialogTabsContent.js +61 -0
  49. package/dist/components/network-modifications/load/common/LoadForm.d.ts +5 -0
  50. package/dist/components/network-modifications/load/common/LoadForm.js +73 -0
  51. package/dist/components/network-modifications/load/common/index.d.ts +12 -0
  52. package/dist/components/network-modifications/load/common/index.js +12 -0
  53. package/dist/components/network-modifications/load/common/load.types.d.ts +16 -0
  54. package/dist/components/network-modifications/load/common/load.types.js +1 -0
  55. package/dist/components/network-modifications/load/common/load.utils.d.ts +11 -0
  56. package/dist/components/network-modifications/load/common/load.utils.js +8 -0
  57. package/dist/components/network-modifications/load/creation/index.d.ts +8 -0
  58. package/dist/components/network-modifications/load/creation/index.js +7 -0
  59. package/dist/components/network-modifications/load/creation/loadCreation.types.d.ts +16 -0
  60. package/dist/components/network-modifications/load/creation/loadCreation.types.js +1 -0
  61. package/dist/components/network-modifications/load/creation/loadCreation.utils.d.ts +53 -0
  62. package/dist/components/network-modifications/load/creation/loadCreation.utils.js +98 -0
  63. package/dist/components/network-modifications/load/index.d.ts +8 -0
  64. package/dist/components/network-modifications/load/index.js +17 -0
  65. package/dist/components/network-modifications/substation/creation/substationCreation.utils.js +2 -1
  66. package/dist/components/network-modifications/voltage-level/index.d.ts +1 -0
  67. package/dist/components/network-modifications/voltage-level/voltage-level.type.d.ts +12 -0
  68. package/dist/components/network-modifications/voltage-level/voltage-level.type.js +1 -0
  69. package/dist/index.js +83 -3
  70. package/dist/translations/en/networkModificationsEn.d.ts +17 -0
  71. package/dist/translations/en/networkModificationsEn.js +18 -1
  72. package/dist/translations/fr/networkModificationsFr.d.ts +17 -0
  73. package/dist/translations/fr/networkModificationsFr.js +18 -1
  74. package/dist/utils/constants/fieldConstants.d.ts +24 -1
  75. package/dist/utils/constants/fieldConstants.js +24 -1
  76. package/dist/utils/index.js +10 -2
  77. package/dist/utils/ts-utils.d.ts +5 -6
  78. package/dist/utils/ts-utils.js +11 -0
  79. package/dist/utils/types/equipmentType.d.ts +18 -0
  80. package/dist/utils/types/equipmentType.js +27 -1
  81. package/dist/utils/types/index.js +8 -2
  82. package/package.json +1 -1
@@ -0,0 +1,267 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { IconButton, Tooltip, Grid } from "@mui/material";
3
+ import { ExploreOutlined, ExploreOffOutlined } from "@mui/icons-material";
4
+ import { useState, useRef, useMemo, useEffect, useCallback } from "react";
5
+ import { useWatch } from "react-hook-form";
6
+ import { useIntl } from "react-intl";
7
+ import { getConnectivityVoltageLevelData, getConnectivityBusBarSectionData } from "./connectivityForm.utils.js";
8
+ import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
9
+ import "../../../../utils/conversionUtils.js";
10
+ import { getConnectionDirectionLabel, CONNECTION_DIRECTIONS } from "../../../../utils/types/equipmentType.js";
11
+ import { getObjectId, areIdsEqual } from "../../../../utils/ts-utils.js";
12
+ import "../../../../utils/yupConfig.js";
13
+ import "../../../overflowableText/OverflowableText.js";
14
+ import "localized-countries";
15
+ import "localized-countries/data/fr";
16
+ import "localized-countries/data/en";
17
+ import "notistack";
18
+ import "../../../inputs/reactHookForm/provider/CustomFormProvider.js";
19
+ import { useCustomFormContext } from "../../../inputs/reactHookForm/provider/useCustomFormContext.js";
20
+ import "yup";
21
+ import "../../../treeViewFinder/TreeViewFinder.js";
22
+ import "../../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
23
+ import "../../../customAGGrid/customAggrid.js";
24
+ import "ag-grid-community";
25
+ import "react-papaparse";
26
+ import "react-csv-downloader";
27
+ import { AutocompleteInput } from "../../../inputs/reactHookForm/autocompleteInputs/AutocompleteInput.js";
28
+ import { SwitchInput } from "../../../inputs/reactHookForm/booleans/SwitchInput.js";
29
+ import { TextInput } from "../../../inputs/reactHookForm/text/TextInput.js";
30
+ import { IntegerInput } from "../../../inputs/reactHookForm/numbers/IntegerInput.js";
31
+ import "../../../inputs/reactHookForm/numbers/RangeInput.js";
32
+ import { SelectInput } from "../../../inputs/reactHookForm/selectInputs/SelectInput.js";
33
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
34
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
35
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
36
+ import "@material-symbols/svg-400/outlined/add_notes.svg?react";
37
+ import "../../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
38
+ import { CheckboxNullableInput } from "../../../inputs/reactHookForm/CheckboxNullableInput.js";
39
+ import "@react-querybuilder/material";
40
+ import "../../../filter/expert/expertFilterConstants.js";
41
+ import "../../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
42
+ import "uuid";
43
+ import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
44
+ import "react-querybuilder";
45
+ function ConnectivityForm({
46
+ id = FieldConstants.CONNECTIVITY,
47
+ voltageLevelSelectLabel = "VOLTAGE_LEVEL",
48
+ direction = "row",
49
+ withDirectionsInfos = true,
50
+ withPosition = false,
51
+ newBusOrBusbarSectionOptions = [],
52
+ onVoltageLevelChangeCallback = void 0,
53
+ isEquipmentModification = false,
54
+ previousValues,
55
+ voltageLevelOptions = [],
56
+ PositionDiagramPane,
57
+ fetchBusesOrBusbarSections
58
+ }) {
59
+ const [busOrBusbarSectionOptions, setBusOrBusbarSectionOptions] = useState([]);
60
+ const [isDiagramPaneOpen, setIsDiagramPaneOpen] = useState(false);
61
+ const lastFetchedBusesVlIds = useRef(null);
62
+ const intl = useIntl();
63
+ const { getValues, isNodeBuilt, setValue } = useCustomFormContext();
64
+ const watchVoltageLevelId = useWatch({
65
+ name: `${id}.${FieldConstants.VOLTAGE_LEVEL}.${FieldConstants.ID}`
66
+ });
67
+ const vlOptions = useMemo(
68
+ () => voltageLevelOptions.map((item) => ({
69
+ id: item.id,
70
+ label: item.name ?? ""
71
+ })),
72
+ [voltageLevelOptions]
73
+ );
74
+ useEffect(() => {
75
+ if (!fetchBusesOrBusbarSections) {
76
+ return;
77
+ }
78
+ if (watchVoltageLevelId) {
79
+ const existingVoltageLevelOption = voltageLevelOptions.find((option) => option.id === watchVoltageLevelId);
80
+ if (existingVoltageLevelOption) {
81
+ fetchBusesOrBusbarSections(watchVoltageLevelId).then((busesOrbusbarSections) => {
82
+ lastFetchedBusesVlIds.current = watchVoltageLevelId;
83
+ setBusOrBusbarSectionOptions(
84
+ busesOrbusbarSections?.map((busesOrbusbarSection) => ({
85
+ id: busesOrbusbarSection.id,
86
+ label: busesOrbusbarSection?.name ?? ""
87
+ })) || []
88
+ );
89
+ });
90
+ }
91
+ if (watchVoltageLevelId !== lastFetchedBusesVlIds.current) {
92
+ setBusOrBusbarSectionOptions([]);
93
+ }
94
+ } else {
95
+ setBusOrBusbarSectionOptions([]);
96
+ }
97
+ }, [id, fetchBusesOrBusbarSections, voltageLevelOptions, watchVoltageLevelId]);
98
+ useEffect(() => {
99
+ if (newBusOrBusbarSectionOptions?.length > 0) {
100
+ setBusOrBusbarSectionOptions(newBusOrBusbarSectionOptions);
101
+ }
102
+ }, [newBusOrBusbarSectionOptions]);
103
+ const handleChangeVoltageLevel = useCallback(() => {
104
+ onVoltageLevelChangeCallback?.();
105
+ setValue(`${id}.${FieldConstants.BUS_OR_BUSBAR_SECTION}`, null);
106
+ }, [id, onVoltageLevelChangeCallback, setValue]);
107
+ useEffect(() => {
108
+ const currentBusOrBusbarSection = getValues(`${id}.${FieldConstants.BUS_OR_BUSBAR_SECTION}`);
109
+ if (busOrBusbarSectionOptions?.length > 0 && currentBusOrBusbarSection?.id !== null) {
110
+ setValue(`${id}.${FieldConstants.BUS_OR_BUSBAR_SECTION}`, currentBusOrBusbarSection);
111
+ }
112
+ }, [busOrBusbarSectionOptions, setValue, id, getValues]);
113
+ const newVoltageLevelField = /* @__PURE__ */ jsx(
114
+ AutocompleteInput,
115
+ {
116
+ isOptionEqualToValue: areIdsEqual,
117
+ outputTransform: (value) => {
118
+ if (typeof value === "string") {
119
+ const data = getConnectivityVoltageLevelData({ voltageLevelId: value });
120
+ return { id: data?.id ?? "", label: "" };
121
+ }
122
+ return value;
123
+ },
124
+ previousValue: isEquipmentModification ? previousValues?.voltageLevelId : void 0,
125
+ onChangeCallback: handleChangeVoltageLevel,
126
+ allowNewValue: true,
127
+ forcePopupIcon: true,
128
+ selectOnFocus: true,
129
+ name: `${id}.${FieldConstants.VOLTAGE_LEVEL}`,
130
+ label: voltageLevelSelectLabel,
131
+ options: vlOptions,
132
+ getOptionLabel: getObjectId,
133
+ size: "small"
134
+ }
135
+ );
136
+ const previousConnectedField = useMemo(() => {
137
+ if (!isEquipmentModification) {
138
+ return null;
139
+ }
140
+ return previousValues?.terminalConnected ? intl.formatMessage({ id: "connected" }) : intl.formatMessage({ id: "disconnected" });
141
+ }, [intl, previousValues, isEquipmentModification]);
142
+ const connectedField = isEquipmentModification ? /* @__PURE__ */ jsx(
143
+ CheckboxNullableInput,
144
+ {
145
+ name: `${id}.${FieldConstants.CONNECTED}`,
146
+ label: "connected",
147
+ previousValue: previousConnectedField ?? void 0
148
+ }
149
+ ) : /* @__PURE__ */ jsx(SwitchInput, { name: `${id}.${FieldConstants.CONNECTED}`, label: "connected" });
150
+ const newBusOrBusbarSectionField = /* @__PURE__ */ jsx(
151
+ AutocompleteInput,
152
+ {
153
+ allowNewValue: true,
154
+ forcePopupIcon: true,
155
+ name: `${id}.${FieldConstants.BUS_OR_BUSBAR_SECTION}`,
156
+ label: "BusBarBus",
157
+ options: busOrBusbarSectionOptions,
158
+ previousValue: isEquipmentModification ? previousValues?.busOrBusbarSectionId : void 0,
159
+ getOptionLabel: getObjectId,
160
+ isOptionEqualToValue: areIdsEqual,
161
+ inputTransform: (value) => value ?? "",
162
+ outputTransform: (value) => {
163
+ if (typeof value === "string") {
164
+ const data = getConnectivityBusBarSectionData({ busbarSectionId: value });
165
+ return { id: data?.id ?? "", label: "" };
166
+ }
167
+ return value;
168
+ },
169
+ size: "small"
170
+ }
171
+ );
172
+ const newConnectionNameField = /* @__PURE__ */ jsx(
173
+ TextInput,
174
+ {
175
+ name: `${id}.${FieldConstants.CONNECTION_NAME}`,
176
+ label: "ConnectionName",
177
+ previousValue: isEquipmentModification ? previousValues?.connectablePosition?.connectionName ?? void 0 : void 0
178
+ }
179
+ );
180
+ const previousConnectionDirectionLabel = isEquipmentModification ? getConnectionDirectionLabel(previousValues?.connectablePosition?.connectionDirection) ?? null : null;
181
+ const newConnectionDirectionField = /* @__PURE__ */ jsx(
182
+ SelectInput,
183
+ {
184
+ name: `${id}.${FieldConstants.CONNECTION_DIRECTION}`,
185
+ label: "ConnectionDirection",
186
+ options: Object.values(CONNECTION_DIRECTIONS),
187
+ previousValue: (previousConnectionDirectionLabel && intl.formatMessage({
188
+ id: previousConnectionDirectionLabel
189
+ })) ?? void 0,
190
+ fullWidth: true,
191
+ size: "small"
192
+ }
193
+ );
194
+ const handleClickOpenDiagramPane = useCallback(() => {
195
+ setIsDiagramPaneOpen(true);
196
+ }, []);
197
+ const handleCloseDiagramPane = useCallback(() => {
198
+ setIsDiagramPaneOpen(false);
199
+ }, []);
200
+ const newConnectionPositionField = /* @__PURE__ */ jsx(
201
+ IntegerInput,
202
+ {
203
+ name: `${id}.${FieldConstants.CONNECTION_POSITION}`,
204
+ label: "ConnectionPosition",
205
+ previousValue: isEquipmentModification ? previousValues?.connectablePosition?.connectionPosition ?? void 0 : void 0,
206
+ clearable: true
207
+ }
208
+ );
209
+ const voltageLevelForPositionIcon = useMemo(
210
+ () => watchVoltageLevelId ?? (isEquipmentModification ? previousValues?.voltageLevelId : void 0),
211
+ [watchVoltageLevelId, isEquipmentModification, previousValues?.voltageLevelId]
212
+ );
213
+ const getPositionIconTooltipMessageId = useMemo(() => {
214
+ if (!isNodeBuilt) {
215
+ return "NodeNotBuildPositionMessage";
216
+ }
217
+ if (voltageLevelForPositionIcon) {
218
+ return "DisplayTakenPositions";
219
+ }
220
+ return "NoVoltageLevelPositionMessage";
221
+ }, [isNodeBuilt, voltageLevelForPositionIcon]);
222
+ const newPositionIconField = /* @__PURE__ */ jsx(
223
+ IconButton,
224
+ {
225
+ ...isNodeBuilt && voltageLevelForPositionIcon && { onClick: handleClickOpenDiagramPane },
226
+ disableRipple: !isNodeBuilt || !voltageLevelForPositionIcon,
227
+ edge: "start",
228
+ children: /* @__PURE__ */ jsx(
229
+ Tooltip,
230
+ {
231
+ title: intl.formatMessage({
232
+ id: getPositionIconTooltipMessageId
233
+ }),
234
+ children: isNodeBuilt && voltageLevelForPositionIcon ? /* @__PURE__ */ jsx(ExploreOutlined, { color: "action" }) : /* @__PURE__ */ jsx(ExploreOffOutlined, { color: "action" })
235
+ }
236
+ )
237
+ }
238
+ );
239
+ const gridSize = direction && (direction === "column" || direction === "column-reverse") ? 24 : 12;
240
+ const conditionalSize = withPosition && withDirectionsInfos ? 8 : gridSize;
241
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
242
+ /* @__PURE__ */ jsxs(Grid, { container: true, direction: direction || "row", spacing: 2, columns: 24, children: [
243
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: conditionalSize, sx: { align: "start" }, children: newVoltageLevelField }),
244
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: conditionalSize, sx: { align: "start" }, children: newBusOrBusbarSectionField }),
245
+ withDirectionsInfos && /* @__PURE__ */ jsxs(Fragment, { children: [
246
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: conditionalSize, sx: { align: "start" }, children: connectedField }),
247
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: conditionalSize, sx: { align: "start" }, children: newConnectionNameField }),
248
+ /* @__PURE__ */ jsx(Grid, { item: true, xs: conditionalSize, sx: { align: "start" }, children: newConnectionDirectionField }),
249
+ withPosition && /* @__PURE__ */ jsxs(Fragment, { children: [
250
+ /* @__PURE__ */ jsx(Grid, { xs: conditionalSize - 1, item: true, sx: { align: "start" }, children: newConnectionPositionField }),
251
+ PositionDiagramPane && /* @__PURE__ */ jsx(Grid, { xs: 1, item: true, sx: { align: "start" }, children: newPositionIconField })
252
+ ] })
253
+ ] })
254
+ ] }),
255
+ PositionDiagramPane && /* @__PURE__ */ jsx(
256
+ PositionDiagramPane,
257
+ {
258
+ open: isDiagramPaneOpen,
259
+ onClose: handleCloseDiagramPane,
260
+ voltageLevelId: voltageLevelForPositionIcon
261
+ }
262
+ )
263
+ ] });
264
+ }
265
+ export {
266
+ ConnectivityForm
267
+ };
@@ -0,0 +1,34 @@
1
+ import { Identifiable } from '../../../../utils';
2
+ export interface ConnectablePositionFormInfos {
3
+ connectionDirection: string | null;
4
+ connectionName?: string | null;
5
+ connectionPosition?: number | null;
6
+ }
7
+ export interface ConnectablePositionInfos {
8
+ connectionDirection: string | null;
9
+ connectionName?: string | null;
10
+ connectionPosition?: number | null;
11
+ }
12
+ export interface Connectivity {
13
+ voltageLevel: {
14
+ id?: string;
15
+ };
16
+ busOrBusbarSection: {
17
+ id?: string;
18
+ };
19
+ connectionDirection?: string;
20
+ connectionName?: string;
21
+ connectionPosition?: number;
22
+ terminalConnected?: boolean;
23
+ }
24
+ type PositionDiagramPaneType = React.ComponentType<{
25
+ open: boolean;
26
+ onClose: () => void;
27
+ voltageLevelId: string;
28
+ }>;
29
+ export interface ConnectivityNetworkProps {
30
+ voltageLevelOptions?: Identifiable[];
31
+ PositionDiagramPane?: PositionDiagramPaneType;
32
+ fetchBusesOrBusbarSections?: (voltageLevelId: string) => Promise<Identifiable[]>;
33
+ }
34
+ export {};
@@ -0,0 +1,241 @@
1
+ import { VoltageLevelFormInfos } from '../../voltage-level/voltage-level.type';
2
+ import { FieldConstants } from '../../../../utils';
3
+ export declare const getConnectivityPropertiesValidationSchema: (isEquipmentModification?: boolean) => {
4
+ voltageLevel: import('yup').ObjectSchema<{
5
+ id: string | undefined;
6
+ } | null, import('yup').AnyObject, {
7
+ id: undefined;
8
+ }, "">;
9
+ busOrBusbarSection: import('yup').ObjectSchema<{
10
+ id: string | undefined;
11
+ } | null, import('yup').AnyObject, {
12
+ id: undefined;
13
+ }, "">;
14
+ };
15
+ export declare const getConnectivityWithPositionSchema: (isEquipmentModification?: boolean) => import('yup').ObjectSchema<{
16
+ voltageLevel: {
17
+ id?: string | undefined;
18
+ } | null;
19
+ busOrBusbarSection: {
20
+ id?: string | undefined;
21
+ } | null;
22
+ connectionDirection: string | null | undefined;
23
+ connectionName: string | undefined;
24
+ connectionPosition: number | null | undefined;
25
+ terminalConnected: boolean | null | undefined;
26
+ }, import('yup').AnyObject, {
27
+ voltageLevel: {
28
+ id: undefined;
29
+ };
30
+ busOrBusbarSection: {
31
+ id: undefined;
32
+ };
33
+ connectionDirection: undefined;
34
+ connectionName: undefined;
35
+ connectionPosition: undefined;
36
+ terminalConnected: undefined;
37
+ }, "">;
38
+ export declare const getConnectivityWithPositionValidationSchema: (isEquipmentModification?: boolean, id?: FieldConstants) => {
39
+ [x: string]: import('yup').ObjectSchema<{
40
+ voltageLevel: {
41
+ id?: string | undefined;
42
+ } | null;
43
+ busOrBusbarSection: {
44
+ id?: string | undefined;
45
+ } | null;
46
+ connectionDirection: string | null | undefined;
47
+ connectionName: string | undefined;
48
+ connectionPosition: number | null | undefined;
49
+ terminalConnected: boolean | null | undefined;
50
+ }, import('yup').AnyObject, {
51
+ voltageLevel: {
52
+ id: undefined;
53
+ };
54
+ busOrBusbarSection: {
55
+ id: undefined;
56
+ };
57
+ connectionDirection: undefined;
58
+ connectionName: undefined;
59
+ connectionPosition: undefined;
60
+ terminalConnected: undefined;
61
+ }, "">;
62
+ };
63
+ export declare const getCon1andCon2WithPositionValidationSchema: (isEquipmentModification?: boolean, id?: FieldConstants) => {
64
+ [x: string]: import('yup').ObjectSchema<{
65
+ [x: string]: {
66
+ terminalConnected?: boolean | null | undefined;
67
+ connectionDirection?: string | null | undefined;
68
+ connectionName?: string | undefined;
69
+ connectionPosition?: number | null | undefined;
70
+ busOrBusbarSection: {
71
+ id?: string | undefined;
72
+ } | null;
73
+ voltageLevel: {
74
+ id?: string | undefined;
75
+ } | null;
76
+ };
77
+ }, import('yup').AnyObject, {
78
+ [x: string]: {
79
+ voltageLevel: {
80
+ id: undefined;
81
+ };
82
+ busOrBusbarSection: {
83
+ id: undefined;
84
+ };
85
+ connectionDirection: undefined;
86
+ connectionName: undefined;
87
+ connectionPosition: undefined;
88
+ terminalConnected: undefined;
89
+ };
90
+ }, "">;
91
+ };
92
+ export declare const getConnectivityWithoutPositionValidationSchema: (id?: FieldConstants) => {
93
+ [x: string]: import('yup').ObjectSchema<{
94
+ voltageLevel: {
95
+ id?: string | undefined;
96
+ } | null;
97
+ busOrBusbarSection: {
98
+ id?: string | undefined;
99
+ } | null;
100
+ }, import('yup').AnyObject, {
101
+ voltageLevel: {
102
+ id: undefined;
103
+ };
104
+ busOrBusbarSection: {
105
+ id: undefined;
106
+ };
107
+ }, "">;
108
+ };
109
+ export declare const getConnectivityPropertiesEmptyFormData: (isEquipmentModification?: boolean) => {
110
+ voltageLevel: null;
111
+ busOrBusbarSection: null;
112
+ terminalConnected: boolean | null;
113
+ };
114
+ export declare const getConnectivityWithPositionEmptyFormDataProps: (isEquipmentModification?: boolean) => {
115
+ connectionDirection: null;
116
+ connectionName: string;
117
+ connectionPosition: null;
118
+ voltageLevel: null;
119
+ busOrBusbarSection: null;
120
+ terminalConnected: boolean | null;
121
+ };
122
+ export declare const getConnectivityWithPositionEmptyFormData: (isEquipmentModification?: boolean, id?: FieldConstants) => {
123
+ [x: string]: {
124
+ connectionDirection: null;
125
+ connectionName: string;
126
+ connectionPosition: null;
127
+ voltageLevel: null;
128
+ busOrBusbarSection: null;
129
+ terminalConnected: boolean | null;
130
+ };
131
+ };
132
+ export declare const getCont1Cont2WithPositionEmptyFormData: (isEquipmentModification?: boolean, id?: FieldConstants) => {
133
+ [x: string]: {
134
+ [x: string]: {
135
+ connectionDirection: null;
136
+ connectionName: string;
137
+ connectionPosition: null;
138
+ voltageLevel: null;
139
+ busOrBusbarSection: null;
140
+ terminalConnected: boolean | null;
141
+ };
142
+ };
143
+ };
144
+ export declare const getConnectivityWithoutPositionEmptyFormData: (id?: FieldConstants) => {
145
+ [x: string]: {
146
+ voltageLevel: null;
147
+ busOrBusbarSection: null;
148
+ terminalConnected: boolean | null;
149
+ };
150
+ };
151
+ export declare const getConnectivityVoltageLevelData: ({ voltageLevelId }: {
152
+ voltageLevelId?: string | null;
153
+ }) => {
154
+ id: string;
155
+ } | null;
156
+ export declare const getConnectivityBusBarSectionData: ({ busbarSectionId }: {
157
+ busbarSectionId?: string | null;
158
+ }) => {
159
+ id: string;
160
+ } | null;
161
+ export declare const getConnectivityPropertiesData: ({ voltageLevelId, busbarSectionId, }: {
162
+ voltageLevelId?: string | null;
163
+ busbarSectionId?: string | null;
164
+ }) => {
165
+ voltageLevel: {
166
+ id: string;
167
+ } | null;
168
+ busOrBusbarSection: {
169
+ id: string;
170
+ } | null;
171
+ };
172
+ export declare const getNewVoltageLevelData: (newVoltageLevel: VoltageLevelFormInfos) => {
173
+ id: string;
174
+ name: string;
175
+ substationId: string | null | undefined;
176
+ topologyKind: string | null | undefined;
177
+ };
178
+ export declare const getConnectivityData: ({ voltageLevelId, busbarSectionId }: {
179
+ voltageLevelId?: string | null;
180
+ busbarSectionId?: string | null;
181
+ }, id?: FieldConstants) => {
182
+ [x: string]: {
183
+ voltageLevel: {
184
+ id: string;
185
+ } | null;
186
+ busOrBusbarSection: {
187
+ id: string;
188
+ } | null;
189
+ };
190
+ };
191
+ export declare const getConnectivityFormDataProps: ({ voltageLevelId, busbarSectionId, connectionDirection, connectionName, connectionPosition, terminalConnected, isEquipmentModification, }: {
192
+ voltageLevelId?: string | null;
193
+ busbarSectionId?: string | null;
194
+ connectionDirection?: string | null;
195
+ connectionName?: string | null;
196
+ connectionPosition?: number | null;
197
+ terminalConnected?: boolean | null;
198
+ isEquipmentModification?: boolean;
199
+ }) => {
200
+ connectionDirection: string | null;
201
+ connectionName: string;
202
+ connectionPosition: number | null;
203
+ terminalConnected: boolean | null;
204
+ voltageLevel: {
205
+ id: string;
206
+ } | null;
207
+ busOrBusbarSection: {
208
+ id: string;
209
+ } | null;
210
+ };
211
+ export declare const getConnectivityFormData: ({ voltageLevelId, busbarSectionId, connectionDirection, connectionName, connectionPosition, terminalConnected, isEquipmentModification, }: {
212
+ voltageLevelId?: string | null;
213
+ busbarSectionId?: string | null;
214
+ connectionDirection?: string | null;
215
+ connectionName?: string | null;
216
+ connectionPosition?: number | null;
217
+ terminalConnected?: boolean | null;
218
+ isEquipmentModification?: boolean;
219
+ }, id?: FieldConstants) => {
220
+ [x: string]: {
221
+ connectionDirection: string | null;
222
+ connectionName: string;
223
+ connectionPosition: number | null;
224
+ terminalConnected: boolean | null;
225
+ voltageLevel: {
226
+ id: string;
227
+ } | null;
228
+ busOrBusbarSection: {
229
+ id: string;
230
+ } | null;
231
+ };
232
+ };
233
+ export declare const createConnectivityData: (equipmentToModify: any, index: number) => {
234
+ busbarSectionId: any;
235
+ connectionDirection: any;
236
+ connectionName: any;
237
+ connectionPosition: any;
238
+ voltageLevelId: any;
239
+ terminalConnected: any;
240
+ isEquipmentModification: boolean;
241
+ };