@gridsuite/commons-ui 0.218.0 → 0.219.1
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.
- package/dist/features/index.js +16 -0
- package/dist/features/network-modifications/battery/batteryDialog.type.d.ts +27 -0
- package/dist/features/network-modifications/battery/batteryDialog.type.js +1 -0
- package/dist/features/network-modifications/battery/index.d.ts +2 -0
- package/dist/features/network-modifications/battery/index.js +17 -1
- package/dist/features/network-modifications/battery/modification/BatteryDialogHeader.d.ts +6 -0
- package/dist/features/network-modifications/battery/modification/BatteryDialogHeader.js +87 -0
- package/dist/features/network-modifications/battery/modification/BatteryDialogTabs.d.ts +13 -0
- package/dist/features/network-modifications/battery/modification/BatteryDialogTabs.js +51 -0
- package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.d.ts +8 -0
- package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.js +177 -0
- package/dist/features/network-modifications/battery/modification/BatteryModificationForm.d.ts +6 -0
- package/dist/features/network-modifications/battery/modification/BatteryModificationForm.js +50 -0
- package/dist/features/network-modifications/battery/modification/batteryModification.types.d.ts +31 -0
- package/dist/features/network-modifications/battery/modification/batteryModification.types.js +1 -0
- package/dist/features/network-modifications/battery/modification/batteryModification.utils.d.ts +95 -0
- package/dist/features/network-modifications/battery/modification/batteryModification.utils.js +163 -0
- package/dist/features/network-modifications/battery/modification/batteryTabs.utils.d.ts +8 -0
- package/dist/features/network-modifications/battery/modification/batteryTabs.utils.js +38 -0
- package/dist/features/network-modifications/battery/modification/index.d.ts +13 -0
- package/dist/features/network-modifications/battery/modification/index.js +18 -0
- package/dist/features/network-modifications/common/measurements/BusbarSectionVoltageMeasurementsForm.js +7 -7
- package/dist/features/network-modifications/index.js +16 -0
- package/dist/features/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js +59 -59
- package/dist/index.js +16 -0
- package/dist/translations/en/networkModificationsEn.d.ts +6 -0
- package/dist/translations/en/networkModificationsEn.js +6 -0
- package/dist/translations/fr/networkModificationsFr.d.ts +6 -0
- package/dist/translations/fr/networkModificationsFr.js +6 -0
- package/package.json +1 -1
package/dist/features/index.js
CHANGED
|
@@ -157,6 +157,12 @@ import { emptyModificationByAssignmentFormData, modificationByAssignmentDtoToFor
|
|
|
157
157
|
import { DataType } from "./network-modifications/by-filter/assignment/assignment/assignment.type.js";
|
|
158
158
|
import { batteryCreationDtoToForm, batteryCreationEmptyFormData, batteryCreationFormSchema, batteryCreationFormToDto } from "./network-modifications/battery/creation/batteryCreation.utils.js";
|
|
159
159
|
import { BatteryCreationForm } from "./network-modifications/battery/creation/BatteryCreationForm.js";
|
|
160
|
+
import { batteryModificationDtoToForm, batteryModificationEmptyFormData, batteryModificationFormSchema, batteryModificationFormToDto } from "./network-modifications/battery/modification/batteryModification.utils.js";
|
|
161
|
+
import { BATTERY_TAB_FIELDS, BatteryDialogTab } from "./network-modifications/battery/modification/batteryTabs.utils.js";
|
|
162
|
+
import { BatteryDialogHeader } from "./network-modifications/battery/modification/BatteryDialogHeader.js";
|
|
163
|
+
import { BatteryDialogTabs } from "./network-modifications/battery/modification/BatteryDialogTabs.js";
|
|
164
|
+
import { BatteryDialogTabsContent } from "./network-modifications/battery/modification/BatteryDialogTabsContent.js";
|
|
165
|
+
import { BatteryModificationForm } from "./network-modifications/battery/modification/BatteryModificationForm.js";
|
|
160
166
|
import { CHARACTERISTICS_CHOICES, SHUNT_COMPENSATOR_TYPES, computeSwitchedOnValue } from "./network-modifications/shunt-compensator/common/shuntCompensator.utils.js";
|
|
161
167
|
import { CharacteristicsForm } from "./network-modifications/shunt-compensator/common/CharacteristicsForm.js";
|
|
162
168
|
import { getCharacteristicsCreateFormDataFromSearchCopy, getCharacteristicsEmptyFormData, getCharacteristicsFormData, getCharacteristicsFormValidationSchema } from "./network-modifications/shunt-compensator/common/characteristicsForm.utils.js";
|
|
@@ -199,7 +205,13 @@ export {
|
|
|
199
205
|
default2 as AuthenticationRouterErrorDisplay,
|
|
200
206
|
BALANCE_TYPE,
|
|
201
207
|
BASE_MODIFICATION_TABLE_COLUMNS,
|
|
208
|
+
BATTERY_TAB_FIELDS,
|
|
202
209
|
BatteryCreationForm,
|
|
210
|
+
BatteryDialogHeader,
|
|
211
|
+
BatteryDialogTab,
|
|
212
|
+
BatteryDialogTabs,
|
|
213
|
+
BatteryDialogTabsContent,
|
|
214
|
+
BatteryModificationForm,
|
|
203
215
|
BranchActiveReactivePowerMeasurementsForm,
|
|
204
216
|
BranchConnectivityForm,
|
|
205
217
|
BuildStatus,
|
|
@@ -475,6 +487,10 @@ export {
|
|
|
475
487
|
batteryCreationEmptyFormData,
|
|
476
488
|
batteryCreationFormSchema,
|
|
477
489
|
batteryCreationFormToDto,
|
|
490
|
+
batteryModificationDtoToForm,
|
|
491
|
+
batteryModificationEmptyFormData,
|
|
492
|
+
batteryModificationFormSchema,
|
|
493
|
+
batteryModificationFormToDto,
|
|
478
494
|
buildNewBusbarSections,
|
|
479
495
|
byFilterDeletionDtoToForm,
|
|
480
496
|
byFilterDeletionFormSchema,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactiveCapabilityCurvePoints, MinMaxReactiveLimitsFormInfos } from '../common/reactiveLimits/reactiveLimits.type';
|
|
2
|
+
import { ActivePowerControlInfos } from '../common/activePowerControl/activePowerControlForm.type';
|
|
3
|
+
import { ConnectablePositionFormInfos } from '../common/connectivity/connectivity.type';
|
|
4
|
+
import { ShortCircuitInfos } from '../common/shortCircuit/shortCircuitForm.type';
|
|
5
|
+
import { MeasurementInfo } from '../common/measurements/measurement.type';
|
|
6
|
+
export interface BatteryFormInfos {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
maxP: number;
|
|
10
|
+
minP: number;
|
|
11
|
+
targetP: number;
|
|
12
|
+
targetQ: number;
|
|
13
|
+
connectablePosition: ConnectablePositionFormInfos;
|
|
14
|
+
minMaxReactiveLimits: MinMaxReactiveLimitsFormInfos;
|
|
15
|
+
activePowerControl: ActivePowerControlInfos;
|
|
16
|
+
batteryShortCircuit: ShortCircuitInfos;
|
|
17
|
+
reactiveCapabilityCurvePoints: ReactiveCapabilityCurvePoints[];
|
|
18
|
+
voltageLevelId: string;
|
|
19
|
+
busOrBusbarSectionId: string;
|
|
20
|
+
connectionDirection: string | null;
|
|
21
|
+
connectionName?: string | null;
|
|
22
|
+
connectionPosition?: number | null;
|
|
23
|
+
terminalConnected?: boolean | null;
|
|
24
|
+
measurementP: MeasurementInfo | undefined;
|
|
25
|
+
measurementQ: MeasurementInfo | undefined;
|
|
26
|
+
properties: Record<string, string> | undefined;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
import { batteryCreationDtoToForm, batteryCreationEmptyFormData, batteryCreationFormSchema, batteryCreationFormToDto } from "./creation/batteryCreation.utils.js";
|
|
2
2
|
import { BatteryCreationForm } from "./creation/BatteryCreationForm.js";
|
|
3
|
+
import { batteryModificationDtoToForm, batteryModificationEmptyFormData, batteryModificationFormSchema, batteryModificationFormToDto } from "./modification/batteryModification.utils.js";
|
|
4
|
+
import { BATTERY_TAB_FIELDS, BatteryDialogTab } from "./modification/batteryTabs.utils.js";
|
|
5
|
+
import { BatteryDialogHeader } from "./modification/BatteryDialogHeader.js";
|
|
6
|
+
import { BatteryDialogTabs } from "./modification/BatteryDialogTabs.js";
|
|
7
|
+
import { BatteryDialogTabsContent } from "./modification/BatteryDialogTabsContent.js";
|
|
8
|
+
import { BatteryModificationForm } from "./modification/BatteryModificationForm.js";
|
|
3
9
|
export {
|
|
10
|
+
BATTERY_TAB_FIELDS,
|
|
4
11
|
BatteryCreationForm,
|
|
12
|
+
BatteryDialogHeader,
|
|
13
|
+
BatteryDialogTab,
|
|
14
|
+
BatteryDialogTabs,
|
|
15
|
+
BatteryDialogTabsContent,
|
|
16
|
+
BatteryModificationForm,
|
|
5
17
|
batteryCreationDtoToForm,
|
|
6
18
|
batteryCreationEmptyFormData,
|
|
7
19
|
batteryCreationFormSchema,
|
|
8
|
-
batteryCreationFormToDto
|
|
20
|
+
batteryCreationFormToDto,
|
|
21
|
+
batteryModificationDtoToForm,
|
|
22
|
+
batteryModificationEmptyFormData,
|
|
23
|
+
batteryModificationFormSchema,
|
|
24
|
+
batteryModificationFormToDto
|
|
9
25
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BatteryFormInfos } from '../batteryDialog.type';
|
|
2
|
+
export interface BatteryDialogHeaderProps {
|
|
3
|
+
batteryToModify?: BatteryFormInfos | null;
|
|
4
|
+
equipmentId?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function BatteryDialogHeader({ batteryToModify, equipmentId }: Readonly<BatteryDialogHeaderProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Grid, TextField } from "@mui/material";
|
|
3
|
+
import { filledTextField } from "../../common/form.utils.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "react-hook-form";
|
|
6
|
+
import "../../common/properties/propertyUtils.js";
|
|
7
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
8
|
+
import "../../../../utils/conversionUtils.js";
|
|
9
|
+
import "../../../../utils/types/equipmentType.js";
|
|
10
|
+
import "@mui/icons-material";
|
|
11
|
+
import "react-intl";
|
|
12
|
+
import "../../../../components/ui/overflowableText/OverflowableText.js";
|
|
13
|
+
import "localized-countries";
|
|
14
|
+
import "localized-countries/data/fr";
|
|
15
|
+
import "localized-countries/data/en";
|
|
16
|
+
import "notistack";
|
|
17
|
+
import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
18
|
+
import "yup";
|
|
19
|
+
import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
20
|
+
import { TextInput } from "../../../../components/ui/reactHookForm/text/TextInput.js";
|
|
21
|
+
import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
22
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
23
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
24
|
+
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
25
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
26
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
27
|
+
import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
28
|
+
import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
29
|
+
import "@hello-pangea/dnd";
|
|
30
|
+
import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
31
|
+
import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
32
|
+
import "mui-nested-menu";
|
|
33
|
+
import "react-resizable-panels";
|
|
34
|
+
import "react-dom";
|
|
35
|
+
import "autosuggest-highlight/match";
|
|
36
|
+
import "autosuggest-highlight/parse";
|
|
37
|
+
import "clsx";
|
|
38
|
+
import "../../../../components/composite/filter/FilterCreationDialog.js";
|
|
39
|
+
import "../../../../components/composite/filter/HeaderFilterForm.js";
|
|
40
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
|
|
41
|
+
import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
|
|
42
|
+
import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
|
|
43
|
+
import "../../../../components/composite/filter/expert/expertFilterConstants.js";
|
|
44
|
+
import "react-querybuilder";
|
|
45
|
+
import "uuid";
|
|
46
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
|
|
47
|
+
import "../../../../components/composite/filter/utils/filterFormUtils.js";
|
|
48
|
+
import "@react-querybuilder/material";
|
|
49
|
+
import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
50
|
+
import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
|
|
51
|
+
import "../../../../components/composite/agGridTable/BottomRightButtons.js";
|
|
52
|
+
import "../../../../components/composite/customAGGrid/customAggrid.js";
|
|
53
|
+
import "ag-grid-community";
|
|
54
|
+
import "react-papaparse";
|
|
55
|
+
import "react-csv-downloader";
|
|
56
|
+
import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
|
|
57
|
+
function BatteryDialogHeader({ batteryToModify, equipmentId }) {
|
|
58
|
+
return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
59
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
|
|
60
|
+
TextField,
|
|
61
|
+
{
|
|
62
|
+
size: "small",
|
|
63
|
+
fullWidth: true,
|
|
64
|
+
label: "ID",
|
|
65
|
+
value: equipmentId ?? "",
|
|
66
|
+
InputProps: {
|
|
67
|
+
readOnly: true
|
|
68
|
+
},
|
|
69
|
+
disabled: true,
|
|
70
|
+
...filledTextField
|
|
71
|
+
}
|
|
72
|
+
) }),
|
|
73
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
|
|
74
|
+
TextInput,
|
|
75
|
+
{
|
|
76
|
+
name: FieldConstants.EQUIPMENT_NAME,
|
|
77
|
+
label: "Name",
|
|
78
|
+
formProps: filledTextField,
|
|
79
|
+
previousValue: batteryToModify?.name ?? void 0,
|
|
80
|
+
clearable: true
|
|
81
|
+
}
|
|
82
|
+
) })
|
|
83
|
+
] });
|
|
84
|
+
}
|
|
85
|
+
export {
|
|
86
|
+
BatteryDialogHeader
|
|
87
|
+
};
|
|
@@ -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
|
+
interface BatteryDialogTabsProps {
|
|
8
|
+
tabIndex: number;
|
|
9
|
+
tabIndexesWithError: number[];
|
|
10
|
+
setTabIndex: (newTabIndex: number) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function BatteryDialogTabs({ tabIndex, tabIndexesWithError, setTabIndex }: Readonly<BatteryDialogTabsProps>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Tabs, Tab } from "@mui/material";
|
|
3
|
+
import { FormattedMessage } from "react-intl";
|
|
4
|
+
import { BatteryDialogTab } from "./batteryTabs.utils.js";
|
|
5
|
+
import { getTabIndicatorStyle, getTabStyle } from "../../../parameters/parameters-style.js";
|
|
6
|
+
function BatteryDialogTabs({ tabIndex, tabIndexesWithError, setTabIndex }) {
|
|
7
|
+
return /* @__PURE__ */ jsxs(
|
|
8
|
+
Tabs,
|
|
9
|
+
{
|
|
10
|
+
value: tabIndex,
|
|
11
|
+
variant: "scrollable",
|
|
12
|
+
onChange: (_event, newValue) => setTabIndex(newValue),
|
|
13
|
+
TabIndicatorProps: {
|
|
14
|
+
sx: getTabIndicatorStyle(tabIndexesWithError, tabIndex)
|
|
15
|
+
},
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ jsx(
|
|
18
|
+
Tab,
|
|
19
|
+
{
|
|
20
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "ConnectivityTab" }),
|
|
21
|
+
sx: getTabStyle(tabIndexesWithError, BatteryDialogTab.CONNECTIVITY_TAB)
|
|
22
|
+
}
|
|
23
|
+
),
|
|
24
|
+
/* @__PURE__ */ jsx(
|
|
25
|
+
Tab,
|
|
26
|
+
{
|
|
27
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "SetpointsAndLimitsTab" }),
|
|
28
|
+
sx: getTabStyle(tabIndexesWithError, BatteryDialogTab.LIMITS_AND_SETPOINTS_TAB)
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
/* @__PURE__ */ jsx(
|
|
32
|
+
Tab,
|
|
33
|
+
{
|
|
34
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "SpecificTab" }),
|
|
35
|
+
sx: getTabStyle(tabIndexesWithError, BatteryDialogTab.SPECIFIC_TAB)
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
/* @__PURE__ */ jsx(
|
|
39
|
+
Tab,
|
|
40
|
+
{
|
|
41
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "AdditionalInformationTab" }),
|
|
42
|
+
sx: getTabStyle(tabIndexesWithError, BatteryDialogTab.ADDITIONAL_INFORMATION_TAB)
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
BatteryDialogTabs
|
|
51
|
+
};
|
package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BatteryFormInfos } from '../batteryDialog.type';
|
|
2
|
+
import { ConnectivityNetworkProps } from '../../common';
|
|
3
|
+
export interface BatteryDialogTabsContentProps extends ConnectivityNetworkProps {
|
|
4
|
+
batteryToModify?: BatteryFormInfos | null;
|
|
5
|
+
updatePreviousReactiveCapabilityCurveTable: (action: string, index: number) => void;
|
|
6
|
+
tabIndex: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function BatteryDialogTabsContent({ batteryToModify, updatePreviousReactiveCapabilityCurveTable, tabIndex, voltageLevelOptions, PositionDiagramPane, fetchBusesOrBusbarSections, }: Readonly<BatteryDialogTabsContentProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Grid } from "@mui/material";
|
|
3
|
+
import { FormattedMessage } from "react-intl";
|
|
4
|
+
import { BatteryDialogTab } from "./batteryTabs.utils.js";
|
|
5
|
+
import GridSection from "../../../../components/composite/grid/grid-section.js";
|
|
6
|
+
import GridItem from "../../../../components/composite/grid/grid-item.js";
|
|
7
|
+
import { PropertiesForm } from "../../common/properties/PropertiesForm.js";
|
|
8
|
+
import "react";
|
|
9
|
+
import "react-hook-form";
|
|
10
|
+
import { ActivePowerAdornment, ReactivePowerAdornment } from "../../../../utils/constants/adornments.js";
|
|
11
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
12
|
+
import "../../../../utils/conversionUtils.js";
|
|
13
|
+
import "../../../../utils/types/equipmentType.js";
|
|
14
|
+
import "@mui/icons-material";
|
|
15
|
+
import "../../../../components/ui/overflowableText/OverflowableText.js";
|
|
16
|
+
import "localized-countries";
|
|
17
|
+
import "localized-countries/data/fr";
|
|
18
|
+
import "localized-countries/data/en";
|
|
19
|
+
import "notistack";
|
|
20
|
+
import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
21
|
+
import "yup";
|
|
22
|
+
import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
23
|
+
import { FloatInput } from "../../../../components/ui/reactHookForm/numbers/FloatInput.js";
|
|
24
|
+
import "../../../../components/ui/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/arrows_input.svg?react";
|
|
28
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
29
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
30
|
+
import "../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
31
|
+
import "../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
32
|
+
import "@hello-pangea/dnd";
|
|
33
|
+
import "../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
34
|
+
import "../../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
35
|
+
import "mui-nested-menu";
|
|
36
|
+
import "react-resizable-panels";
|
|
37
|
+
import "../../common/properties/propertyUtils.js";
|
|
38
|
+
import { PowerMeasurementsForm } from "../../common/measurements/PowerMeasurementsForm.js";
|
|
39
|
+
import "react-dom";
|
|
40
|
+
import "autosuggest-highlight/match";
|
|
41
|
+
import "autosuggest-highlight/parse";
|
|
42
|
+
import "clsx";
|
|
43
|
+
import "../../../../components/composite/filter/FilterCreationDialog.js";
|
|
44
|
+
import "../../../../components/composite/filter/HeaderFilterForm.js";
|
|
45
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
|
|
46
|
+
import "../../../../components/composite/filter/expert/ExpertFilterForm.js";
|
|
47
|
+
import "../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
|
|
48
|
+
import "../../../../components/composite/filter/expert/expertFilterConstants.js";
|
|
49
|
+
import "react-querybuilder";
|
|
50
|
+
import "uuid";
|
|
51
|
+
import "../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
|
|
52
|
+
import "../../../../components/composite/filter/utils/filterFormUtils.js";
|
|
53
|
+
import "@react-querybuilder/material";
|
|
54
|
+
import "../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
55
|
+
import "../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
|
|
56
|
+
import "../../../../components/composite/agGridTable/BottomRightButtons.js";
|
|
57
|
+
import "../../../../components/composite/customAGGrid/customAggrid.js";
|
|
58
|
+
import "ag-grid-community";
|
|
59
|
+
import "react-papaparse";
|
|
60
|
+
import "react-csv-downloader";
|
|
61
|
+
import { ConnectivityForm } from "../../common/connectivity/ConnectivityForm.js";
|
|
62
|
+
import { ActivePowerControlForm } from "../../common/activePowerControl/ActivePowerControlForm.js";
|
|
63
|
+
import { ShortCircuitForm } from "../../common/shortCircuit/ShortCircuitForm.js";
|
|
64
|
+
import { ReactiveLimitsForm } from "../../common/reactiveLimits/ReactiveLimitsForm.js";
|
|
65
|
+
import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
|
|
66
|
+
function BatteryDialogTabsContent({
|
|
67
|
+
batteryToModify,
|
|
68
|
+
updatePreviousReactiveCapabilityCurveTable,
|
|
69
|
+
tabIndex,
|
|
70
|
+
voltageLevelOptions = [],
|
|
71
|
+
PositionDiagramPane,
|
|
72
|
+
fetchBusesOrBusbarSections
|
|
73
|
+
}) {
|
|
74
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
75
|
+
/* @__PURE__ */ jsxs(Box, { hidden: tabIndex !== BatteryDialogTab.CONNECTIVITY_TAB, children: [
|
|
76
|
+
/* @__PURE__ */ jsx(GridSection, { title: "Connectivity" }),
|
|
77
|
+
/* @__PURE__ */ jsx(
|
|
78
|
+
ConnectivityForm,
|
|
79
|
+
{
|
|
80
|
+
isEquipmentModification: true,
|
|
81
|
+
previousValues: {
|
|
82
|
+
connectablePosition: batteryToModify?.connectablePosition,
|
|
83
|
+
voltageLevelId: batteryToModify?.voltageLevelId,
|
|
84
|
+
busOrBusbarSectionId: batteryToModify?.busOrBusbarSectionId,
|
|
85
|
+
terminalConnected: batteryToModify?.terminalConnected
|
|
86
|
+
},
|
|
87
|
+
voltageLevelOptions,
|
|
88
|
+
PositionDiagramPane,
|
|
89
|
+
fetchBusesOrBusbarSections
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
] }),
|
|
93
|
+
/* @__PURE__ */ jsxs(Box, { hidden: tabIndex !== BatteryDialogTab.LIMITS_AND_SETPOINTS_TAB, children: [
|
|
94
|
+
/* @__PURE__ */ jsx(GridSection, { title: "Setpoints" }),
|
|
95
|
+
/* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
96
|
+
/* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(
|
|
97
|
+
FloatInput,
|
|
98
|
+
{
|
|
99
|
+
name: FieldConstants.ACTIVE_POWER_SET_POINT,
|
|
100
|
+
label: "ActivePowerText",
|
|
101
|
+
adornment: ActivePowerAdornment,
|
|
102
|
+
previousValue: batteryToModify?.targetP,
|
|
103
|
+
clearable: true
|
|
104
|
+
}
|
|
105
|
+
) }),
|
|
106
|
+
/* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(
|
|
107
|
+
FloatInput,
|
|
108
|
+
{
|
|
109
|
+
name: FieldConstants.REACTIVE_POWER_SET_POINT,
|
|
110
|
+
label: "ReactivePowerText",
|
|
111
|
+
adornment: ReactivePowerAdornment,
|
|
112
|
+
previousValue: batteryToModify?.targetQ,
|
|
113
|
+
clearable: true
|
|
114
|
+
}
|
|
115
|
+
) })
|
|
116
|
+
] }),
|
|
117
|
+
/* @__PURE__ */ jsx(Grid, { container: true, spacing: 2, paddingTop: 2, children: /* @__PURE__ */ jsx(
|
|
118
|
+
ActivePowerControlForm,
|
|
119
|
+
{
|
|
120
|
+
isEquipmentModification: true,
|
|
121
|
+
previousValues: batteryToModify?.activePowerControl
|
|
122
|
+
}
|
|
123
|
+
) }),
|
|
124
|
+
/* @__PURE__ */ jsx(Grid, { container: true, spacing: 2, children: /* @__PURE__ */ jsxs(Grid, { item: true, xs: 12, children: [
|
|
125
|
+
/* @__PURE__ */ jsx("h3", { children: /* @__PURE__ */ jsx(FormattedMessage, { id: "Limits" }) }),
|
|
126
|
+
/* @__PURE__ */ jsx("h4", { children: /* @__PURE__ */ jsx(FormattedMessage, { id: "ActiveLimits" }) })
|
|
127
|
+
] }) }),
|
|
128
|
+
/* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
129
|
+
/* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(
|
|
130
|
+
FloatInput,
|
|
131
|
+
{
|
|
132
|
+
name: FieldConstants.MINIMUM_ACTIVE_POWER,
|
|
133
|
+
label: "MinimumActivePowerText",
|
|
134
|
+
adornment: ActivePowerAdornment,
|
|
135
|
+
previousValue: batteryToModify?.minP,
|
|
136
|
+
clearable: true
|
|
137
|
+
}
|
|
138
|
+
) }),
|
|
139
|
+
/* @__PURE__ */ jsx(GridItem, { size: 4, children: /* @__PURE__ */ jsx(
|
|
140
|
+
FloatInput,
|
|
141
|
+
{
|
|
142
|
+
name: FieldConstants.MAXIMUM_ACTIVE_POWER,
|
|
143
|
+
label: "MaximumActivePowerText",
|
|
144
|
+
adornment: ActivePowerAdornment,
|
|
145
|
+
previousValue: batteryToModify?.maxP,
|
|
146
|
+
clearable: true
|
|
147
|
+
}
|
|
148
|
+
) })
|
|
149
|
+
] }),
|
|
150
|
+
/* @__PURE__ */ jsx(Grid, { container: true, spacing: 2, children: /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx("h4", { children: /* @__PURE__ */ jsx(FormattedMessage, { id: "ReactiveLimits" }) }) }) }),
|
|
151
|
+
/* @__PURE__ */ jsx(
|
|
152
|
+
ReactiveLimitsForm,
|
|
153
|
+
{
|
|
154
|
+
previousReactiveCapabilityCurvePoints: batteryToModify?.reactiveCapabilityCurvePoints,
|
|
155
|
+
previousMinMaxReactiveLimits: batteryToModify?.minMaxReactiveLimits,
|
|
156
|
+
updatePreviousReactiveCapabilityCurveTable
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
] }),
|
|
160
|
+
/* @__PURE__ */ jsxs(Box, { hidden: tabIndex !== BatteryDialogTab.SPECIFIC_TAB, children: [
|
|
161
|
+
/* @__PURE__ */ jsx(GridSection, { title: "ShortCircuit" }),
|
|
162
|
+
/* @__PURE__ */ jsx(ShortCircuitForm, { previousValues: batteryToModify?.batteryShortCircuit }),
|
|
163
|
+
/* @__PURE__ */ jsx(GridSection, { title: "MeasurementsSection" }),
|
|
164
|
+
/* @__PURE__ */ jsx(
|
|
165
|
+
PowerMeasurementsForm,
|
|
166
|
+
{
|
|
167
|
+
activePowerMeasurement: batteryToModify?.measurementP,
|
|
168
|
+
reactivePowerMeasurement: batteryToModify?.measurementQ
|
|
169
|
+
}
|
|
170
|
+
)
|
|
171
|
+
] }),
|
|
172
|
+
/* @__PURE__ */ jsx(Box, { hidden: tabIndex !== BatteryDialogTab.ADDITIONAL_INFORMATION_TAB, children: /* @__PURE__ */ jsx(PropertiesForm, { networkElementType: "battery", isModification: true }) })
|
|
173
|
+
] });
|
|
174
|
+
}
|
|
175
|
+
export {
|
|
176
|
+
BatteryDialogTabsContent
|
|
177
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BatteryDialogHeaderProps } from './BatteryDialogHeader';
|
|
2
|
+
import { BatteryDialogTabsContentProps } from './BatteryDialogTabsContent';
|
|
3
|
+
interface BatteryModificationFormProps extends BatteryDialogHeaderProps, Omit<BatteryDialogTabsContentProps, 'tabIndex'> {
|
|
4
|
+
}
|
|
5
|
+
export declare function BatteryModificationForm({ batteryToModify, updatePreviousReactiveCapabilityCurveTable, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, }: Readonly<BatteryModificationFormProps>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Grid } from "@mui/material";
|
|
3
|
+
import { useWatch } from "react-hook-form";
|
|
4
|
+
import { BatteryDialogHeader } from "./BatteryDialogHeader.js";
|
|
5
|
+
import { BatteryDialogTabs } from "./BatteryDialogTabs.js";
|
|
6
|
+
import { BatteryDialogTabsContent } from "./BatteryDialogTabsContent.js";
|
|
7
|
+
import { BatteryDialogTab, BATTERY_TAB_FIELDS } from "./batteryTabs.utils.js";
|
|
8
|
+
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
9
|
+
import "../../../../utils/conversionUtils.js";
|
|
10
|
+
import "../../../../utils/types/equipmentType.js";
|
|
11
|
+
import "@mui/icons-material";
|
|
12
|
+
import { useTabsWithError } from "../../hooks/useTabsWithError.js";
|
|
13
|
+
function BatteryModificationForm({
|
|
14
|
+
batteryToModify,
|
|
15
|
+
updatePreviousReactiveCapabilityCurveTable,
|
|
16
|
+
voltageLevelOptions,
|
|
17
|
+
fetchBusesOrBusbarSections,
|
|
18
|
+
PositionDiagramPane
|
|
19
|
+
}) {
|
|
20
|
+
const { tabIndex, setTabIndex, tabIndexesWithError } = useTabsWithError(
|
|
21
|
+
BATTERY_TAB_FIELDS,
|
|
22
|
+
BatteryDialogTab.CONNECTIVITY_TAB
|
|
23
|
+
);
|
|
24
|
+
const equipmentId = useWatch({ name: FieldConstants.EQUIPMENT_ID });
|
|
25
|
+
return /* @__PURE__ */ jsxs(Grid, { container: true, direction: "column", spacing: 2, children: [
|
|
26
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(BatteryDialogHeader, { batteryToModify, equipmentId }) }),
|
|
27
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
|
|
28
|
+
BatteryDialogTabs,
|
|
29
|
+
{
|
|
30
|
+
tabIndex,
|
|
31
|
+
tabIndexesWithError,
|
|
32
|
+
setTabIndex
|
|
33
|
+
}
|
|
34
|
+
) }),
|
|
35
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
|
|
36
|
+
BatteryDialogTabsContent,
|
|
37
|
+
{
|
|
38
|
+
tabIndex,
|
|
39
|
+
batteryToModify,
|
|
40
|
+
voltageLevelOptions,
|
|
41
|
+
fetchBusesOrBusbarSections,
|
|
42
|
+
PositionDiagramPane,
|
|
43
|
+
updatePreviousReactiveCapabilityCurveTable
|
|
44
|
+
}
|
|
45
|
+
) })
|
|
46
|
+
] });
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
BatteryModificationForm
|
|
50
|
+
};
|
package/dist/features/network-modifications/battery/modification/batteryModification.types.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AttributeModification, ModificationType } from '../../../../utils';
|
|
2
|
+
import { ReactiveCapabilityCurvePoints } from '../../common/reactiveLimits';
|
|
3
|
+
import { Property } from '../../common/properties';
|
|
4
|
+
export interface BatteryModificationDto {
|
|
5
|
+
type: ModificationType;
|
|
6
|
+
equipmentId: string;
|
|
7
|
+
equipmentName: AttributeModification<string> | null;
|
|
8
|
+
maxP: AttributeModification<number> | null;
|
|
9
|
+
minP: AttributeModification<number> | null;
|
|
10
|
+
targetP: AttributeModification<number> | null;
|
|
11
|
+
targetQ: AttributeModification<number> | null;
|
|
12
|
+
participate: AttributeModification<boolean> | null;
|
|
13
|
+
droop: AttributeModification<number> | null;
|
|
14
|
+
reactiveCapabilityCurve: AttributeModification<boolean> | null;
|
|
15
|
+
minQ: AttributeModification<number> | null;
|
|
16
|
+
maxQ: AttributeModification<number> | null;
|
|
17
|
+
reactiveCapabilityCurvePoints: ReactiveCapabilityCurvePoints[] | null;
|
|
18
|
+
voltageLevelId: AttributeModification<string> | null;
|
|
19
|
+
busOrBusbarSectionId: AttributeModification<string> | null;
|
|
20
|
+
connectionDirection: AttributeModification<string> | null;
|
|
21
|
+
connectionName: AttributeModification<string> | null;
|
|
22
|
+
connectionPosition: AttributeModification<number> | null;
|
|
23
|
+
terminalConnected: AttributeModification<boolean> | null;
|
|
24
|
+
pMeasurementValue: AttributeModification<number> | null;
|
|
25
|
+
pMeasurementValidity: AttributeModification<boolean> | null;
|
|
26
|
+
qMeasurementValue: AttributeModification<number> | null;
|
|
27
|
+
qMeasurementValidity: AttributeModification<boolean> | null;
|
|
28
|
+
properties: Property[] | null;
|
|
29
|
+
directTransX: AttributeModification<number> | null;
|
|
30
|
+
stepUpTransformerX: AttributeModification<number> | null;
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/dist/features/network-modifications/battery/modification/batteryModification.utils.d.ts
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { InferType } from 'yup';
|
|
2
|
+
import { DeepNullable } from '../../../../utils';
|
|
3
|
+
import { BatteryModificationDto } from './batteryModification.types';
|
|
4
|
+
export declare const batteryModificationFormSchema: import('yup').ObjectSchema<NonNullable<{
|
|
5
|
+
transformerReactance: number | null | undefined;
|
|
6
|
+
directTransX: number | null | undefined;
|
|
7
|
+
frequencyRegulation: boolean | null | undefined;
|
|
8
|
+
droop: number | null | undefined;
|
|
9
|
+
reactivePowerSetpoint: number | null | undefined;
|
|
10
|
+
activePowerSetpoint: number | undefined;
|
|
11
|
+
equipmentID: string;
|
|
12
|
+
equipmentName: string | null | undefined;
|
|
13
|
+
maximumActivePower: number | null | undefined;
|
|
14
|
+
minimumActivePower: number | null | undefined;
|
|
15
|
+
connectivity: {
|
|
16
|
+
terminalConnected?: boolean | null | undefined;
|
|
17
|
+
connectionDirection?: string | null | undefined;
|
|
18
|
+
connectionName?: string | undefined;
|
|
19
|
+
connectionPosition?: number | null | undefined;
|
|
20
|
+
busOrBusbarSection: {
|
|
21
|
+
id?: string | undefined;
|
|
22
|
+
} | null;
|
|
23
|
+
voltageLevel: {
|
|
24
|
+
id?: string | undefined;
|
|
25
|
+
} | null;
|
|
26
|
+
};
|
|
27
|
+
reactiveLimits: {
|
|
28
|
+
minimumReactivePower?: number | null | undefined;
|
|
29
|
+
maximumReactivePower?: number | null | undefined;
|
|
30
|
+
reactiveCapabilityCurveTable?: {
|
|
31
|
+
minQ: number | null;
|
|
32
|
+
maxQ: number | null;
|
|
33
|
+
p: number | null;
|
|
34
|
+
}[] | null | undefined;
|
|
35
|
+
reactiveCapabilityCurveChoice: string;
|
|
36
|
+
};
|
|
37
|
+
stateEstimation: {
|
|
38
|
+
[x: string]: {
|
|
39
|
+
validity?: boolean | null | undefined;
|
|
40
|
+
value?: number | null | undefined;
|
|
41
|
+
};
|
|
42
|
+
[x: number]: {
|
|
43
|
+
validity?: boolean | null | undefined;
|
|
44
|
+
value?: number | null | undefined;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
} & {
|
|
48
|
+
AdditionalProperties: {
|
|
49
|
+
previousValue?: string | null | undefined;
|
|
50
|
+
value?: string | null | undefined;
|
|
51
|
+
added: NonNullable<boolean | undefined>;
|
|
52
|
+
deletionMark: NonNullable<boolean | undefined>;
|
|
53
|
+
name: string;
|
|
54
|
+
}[] | undefined;
|
|
55
|
+
}>, import('yup').AnyObject, {
|
|
56
|
+
transformerReactance: undefined;
|
|
57
|
+
directTransX: undefined;
|
|
58
|
+
frequencyRegulation: undefined;
|
|
59
|
+
droop: undefined;
|
|
60
|
+
reactivePowerSetpoint: undefined;
|
|
61
|
+
activePowerSetpoint: undefined;
|
|
62
|
+
equipmentID: undefined;
|
|
63
|
+
equipmentName: undefined;
|
|
64
|
+
maximumActivePower: undefined;
|
|
65
|
+
minimumActivePower: undefined;
|
|
66
|
+
connectivity: {
|
|
67
|
+
voltageLevel: {
|
|
68
|
+
id: undefined;
|
|
69
|
+
};
|
|
70
|
+
busOrBusbarSection: {
|
|
71
|
+
id: undefined;
|
|
72
|
+
};
|
|
73
|
+
connectionDirection: undefined;
|
|
74
|
+
connectionName: undefined;
|
|
75
|
+
connectionPosition: undefined;
|
|
76
|
+
terminalConnected: undefined;
|
|
77
|
+
};
|
|
78
|
+
reactiveLimits: {
|
|
79
|
+
reactiveCapabilityCurveChoice: undefined;
|
|
80
|
+
minimumReactivePower: undefined;
|
|
81
|
+
maximumReactivePower: undefined;
|
|
82
|
+
reactiveCapabilityCurveTable: "";
|
|
83
|
+
};
|
|
84
|
+
stateEstimation: {
|
|
85
|
+
[x: string]: {
|
|
86
|
+
value: undefined;
|
|
87
|
+
validity: undefined;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
AdditionalProperties: "";
|
|
91
|
+
}, "">;
|
|
92
|
+
export type BatteryModificationFormData = InferType<typeof batteryModificationFormSchema>;
|
|
93
|
+
export declare const batteryModificationEmptyFormData: DeepNullable<BatteryModificationFormData>;
|
|
94
|
+
export declare const batteryModificationDtoToForm: (dto: BatteryModificationDto, includePreviousValues?: boolean) => BatteryModificationFormData;
|
|
95
|
+
export declare const batteryModificationFormToDto: (form: BatteryModificationFormData) => BatteryModificationDto;
|