@gridsuite/commons-ui 0.191.0 → 0.192.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/network-modifications/by-filter/deletion/ByFilterDeletionForm.d.ts +0 -6
- package/dist/components/network-modifications/by-filter/deletion/ByFilterDeletionForm.js +6 -10
- package/dist/components/network-modifications/common/connectivity/BranchConnectivityForm.js +35 -39
- package/dist/components/network-modifications/common/measurements/BranchActiveReactivePowerMeasurementsForm.js +1 -7
- package/dist/components/network-modifications/common/measurements/PowerMeasurementsForm.js +3 -4
- package/dist/components/network-modifications/common/measurements/PowerWithValidityForm.js +19 -22
- package/dist/components/network-modifications/common/properties/PropertiesForm.js +14 -15
- package/dist/components/network-modifications/common/properties/PropertyForm.d.ts +1 -1
- package/dist/components/network-modifications/common/properties/PropertyForm.js +42 -50
- package/dist/components/network-modifications/common/setpoints/SetPointsForm.js +21 -24
- package/dist/components/network-modifications/equipmentDeletion/EquipmentDeletionForm.js +35 -38
- package/dist/components/network-modifications/equipmentDeletion/equipmentDeletion.utils.js +1 -1
- package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/HvdcLccDeletionSpecificForm.js +5 -6
- package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.d.ts +0 -6
- package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.js +6 -5
- package/dist/components/network-modifications/load/common/LoadDialogHeader.js +6 -17
- package/dist/components/network-modifications/load/common/LoadDialogTabs.js +4 -4
- package/dist/components/network-modifications/load/common/LoadDialogTabsContent.js +21 -18
- package/dist/components/network-modifications/load/modification/loadModification.utils.js +1 -1
- package/dist/components/network-modifications/substation/creation/SubstationCreationForm.js +16 -12
- package/dist/components/network-modifications/substation/modification/SubstationModificationForm.js +40 -44
- package/dist/components/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +22 -14
- package/dist/components/network-modifications/voltageLevel/creation/tabs/characteristicsTab/CharacteristicsTab.js +5 -6
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/StructureTab.js +3 -4
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/couplingOmnibus/CouplingOmnibusCreation.js +3 -3
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js +2 -3
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/creation/CreateSwitchesForm.js +10 -21
- package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationCreationSection.js +3 -3
- package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.js +2 -2
- package/dist/components/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js +103 -110
- package/dist/components/node/build-status-chip.d.ts +2 -1
- package/dist/components/node/build-status-chip.js +13 -3
- package/dist/components/parameters/common/parameters-edition-dialog-props.d.ts +1 -0
- package/dist/components/parameters/sensi/constants.d.ts +2 -2
- package/dist/components/parameters/sensi/constants.js +1 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.d.ts +1 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.js +5 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-factor-count.d.ts +1 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-factor-count.js +4 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.d.ts +2 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +2 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.d.ts +2 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.js +5 -2
- package/dist/components/parameters/sensi/sensitivity-parameters-selector.d.ts +2 -1
- package/dist/components/parameters/sensi/sensitivity-parameters-selector.js +10 -2
- package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.d.ts +6 -1
- package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.js +36 -9
- package/dist/translations/en/parameters.d.ts +1 -0
- package/dist/translations/en/parameters.js +4 -3
- package/dist/translations/fr/parameters.d.ts +1 -0
- package/dist/translations/fr/parameters.js +4 -3
- package/dist/utils/types/sensitivity-analysis.type.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,7 +1 @@
|
|
|
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
1
|
export declare function ByFilterDeletionForm(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Grid } from "@mui/material";
|
|
3
|
-
import { useCallback
|
|
3
|
+
import { useCallback } from "react";
|
|
4
4
|
import { useWatch, useFormContext } from "react-hook-form";
|
|
5
5
|
import "react-intl";
|
|
6
6
|
import "../../../overflowableText/OverflowableText.js";
|
|
@@ -48,24 +48,20 @@ function ByFilterDeletionForm() {
|
|
|
48
48
|
const handleEquipmentTypeChange = useCallback(() => {
|
|
49
49
|
setValue(FieldConstants.FILTERS, []);
|
|
50
50
|
}, [setValue]);
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}, []);
|
|
54
|
-
return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, padding: 0.5, alignItems: "center", children: [
|
|
55
|
-
/* @__PURE__ */ jsx(Grid, { item: true, xs: 6, children: /* @__PURE__ */ jsx(
|
|
51
|
+
return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, pt: 1, children: [
|
|
52
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(
|
|
56
53
|
AutocompleteInput,
|
|
57
54
|
{
|
|
58
55
|
isOptionEqualToValue: richTypeEquals,
|
|
59
56
|
name: FieldConstants.TYPE,
|
|
60
57
|
label: "Type",
|
|
61
|
-
options:
|
|
58
|
+
options: EQUIPMENT_TYPE_ORDER,
|
|
62
59
|
onChangeCallback: handleEquipmentTypeChange,
|
|
63
60
|
getOptionLabel,
|
|
64
|
-
size: "small"
|
|
65
|
-
formProps: { variant: "filled" }
|
|
61
|
+
size: "small"
|
|
66
62
|
}
|
|
67
63
|
) }),
|
|
68
|
-
/* @__PURE__ */ jsx(Grid, { item: true, xs:
|
|
64
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(
|
|
69
65
|
DirectoryItemsInput,
|
|
70
66
|
{
|
|
71
67
|
name: FieldConstants.FILTERS,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Grid } from "@mui/material";
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
3
2
|
import GridSection from "../../../grid/grid-section.js";
|
|
4
|
-
import GridItem from "../../../grid/grid-item.js";
|
|
5
3
|
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
6
4
|
import "../../../../utils/conversionUtils.js";
|
|
7
5
|
import "../../../../utils/types/equipmentType.js";
|
|
@@ -17,45 +15,43 @@ function BranchConnectivityForm({
|
|
|
17
15
|
}) {
|
|
18
16
|
const id1 = `${FieldConstants.CONNECTIVITY}.${FieldConstants.CONNECTIVITY_1}`;
|
|
19
17
|
const id2 = `${FieldConstants.CONNECTIVITY}.${FieldConstants.CONNECTIVITY_2}`;
|
|
20
|
-
const connectivity1Field = /* @__PURE__ */ jsx(
|
|
21
|
-
ConnectivityForm,
|
|
22
|
-
{
|
|
23
|
-
id: id1,
|
|
24
|
-
withPosition: true,
|
|
25
|
-
isEquipmentModification: isModification,
|
|
26
|
-
previousValues: {
|
|
27
|
-
connectablePosition: previousValues?.connectablePosition1,
|
|
28
|
-
voltageLevelId: previousValues?.voltageLevelId1,
|
|
29
|
-
busOrBusbarSectionId: previousValues?.busOrBusbarSectionId1,
|
|
30
|
-
terminalConnected: previousValues?.terminal1Connected
|
|
31
|
-
},
|
|
32
|
-
voltageLevelOptions,
|
|
33
|
-
fetchBusesOrBusbarSections,
|
|
34
|
-
PositionDiagramPane
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
const connectivity2Field = /* @__PURE__ */ jsx(
|
|
38
|
-
ConnectivityForm,
|
|
39
|
-
{
|
|
40
|
-
id: id2,
|
|
41
|
-
withPosition: true,
|
|
42
|
-
isEquipmentModification: isModification,
|
|
43
|
-
previousValues: {
|
|
44
|
-
connectablePosition: previousValues?.connectablePosition2,
|
|
45
|
-
voltageLevelId: previousValues?.voltageLevelId2,
|
|
46
|
-
busOrBusbarSectionId: previousValues?.busOrBusbarSectionId2,
|
|
47
|
-
terminalConnected: previousValues?.terminal2Connected
|
|
48
|
-
},
|
|
49
|
-
voltageLevelOptions,
|
|
50
|
-
fetchBusesOrBusbarSections,
|
|
51
|
-
PositionDiagramPane
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
18
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
55
19
|
/* @__PURE__ */ jsx(GridSection, { title: "Side1", heading: 4 }),
|
|
56
|
-
/* @__PURE__ */ jsx(
|
|
20
|
+
/* @__PURE__ */ jsx(
|
|
21
|
+
ConnectivityForm,
|
|
22
|
+
{
|
|
23
|
+
id: id1,
|
|
24
|
+
withPosition: true,
|
|
25
|
+
isEquipmentModification: isModification,
|
|
26
|
+
previousValues: {
|
|
27
|
+
connectablePosition: previousValues?.connectablePosition1,
|
|
28
|
+
voltageLevelId: previousValues?.voltageLevelId1,
|
|
29
|
+
busOrBusbarSectionId: previousValues?.busOrBusbarSectionId1,
|
|
30
|
+
terminalConnected: previousValues?.terminal1Connected
|
|
31
|
+
},
|
|
32
|
+
voltageLevelOptions,
|
|
33
|
+
fetchBusesOrBusbarSections,
|
|
34
|
+
PositionDiagramPane
|
|
35
|
+
}
|
|
36
|
+
),
|
|
57
37
|
/* @__PURE__ */ jsx(GridSection, { title: "Side2", heading: 4 }),
|
|
58
|
-
/* @__PURE__ */ jsx(
|
|
38
|
+
/* @__PURE__ */ jsx(
|
|
39
|
+
ConnectivityForm,
|
|
40
|
+
{
|
|
41
|
+
id: id2,
|
|
42
|
+
withPosition: true,
|
|
43
|
+
isEquipmentModification: isModification,
|
|
44
|
+
previousValues: {
|
|
45
|
+
connectablePosition: previousValues?.connectablePosition2,
|
|
46
|
+
voltageLevelId: previousValues?.voltageLevelId2,
|
|
47
|
+
busOrBusbarSectionId: previousValues?.busOrBusbarSectionId2,
|
|
48
|
+
terminalConnected: previousValues?.terminal2Connected
|
|
49
|
+
},
|
|
50
|
+
voltageLevelOptions,
|
|
51
|
+
fetchBusesOrBusbarSections,
|
|
52
|
+
PositionDiagramPane
|
|
53
|
+
}
|
|
54
|
+
)
|
|
59
55
|
] });
|
|
60
56
|
}
|
|
61
57
|
export {
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PowerMeasurementsForm } from "./PowerMeasurementsForm.js";
|
|
3
3
|
import GridSection from "../../../grid/grid-section.js";
|
|
4
|
-
const styles = {
|
|
5
|
-
h3: {
|
|
6
|
-
marginTop: 0,
|
|
7
|
-
marginBottom: 0
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
4
|
function BranchActiveReactivePowerMeasurementsForm({
|
|
11
5
|
equipmentToModify
|
|
12
6
|
}) {
|
|
13
7
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14
|
-
/* @__PURE__ */ jsx(GridSection, { title: "MeasurementsSection"
|
|
8
|
+
/* @__PURE__ */ jsx(GridSection, { title: "MeasurementsSection" }),
|
|
15
9
|
/* @__PURE__ */ jsx(GridSection, { title: "Side1", heading: 4 }),
|
|
16
10
|
/* @__PURE__ */ jsx(
|
|
17
11
|
PowerMeasurementsForm,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Grid } from "@mui/material";
|
|
3
3
|
import { PowerWithValidityForm } from "./PowerWithValidityForm.js";
|
|
4
|
-
import GridItem from "../../../grid/grid-item.js";
|
|
5
4
|
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
6
5
|
import "../../../../utils/conversionUtils.js";
|
|
7
6
|
import "../../../../utils/types/equipmentType.js";
|
|
@@ -28,8 +27,8 @@ function PowerMeasurementsForm({
|
|
|
28
27
|
};
|
|
29
28
|
const activePowerId = `${FieldConstants.STATE_ESTIMATION}.${getActiveMeasurementType(side)}`;
|
|
30
29
|
const reactivePowerId = `${FieldConstants.STATE_ESTIMATION}.${getReactiveMeasurementType(side)}`;
|
|
31
|
-
return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
32
|
-
!reactivePowerOnly && /* @__PURE__ */ jsx(
|
|
30
|
+
return /* @__PURE__ */ jsxs(Grid, { container: true, direction: "column", spacing: 2, children: [
|
|
31
|
+
!reactivePowerOnly && /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
|
|
33
32
|
PowerWithValidityForm,
|
|
34
33
|
{
|
|
35
34
|
id: activePowerId,
|
|
@@ -37,7 +36,7 @@ function PowerMeasurementsForm({
|
|
|
37
36
|
measurement: activePowerMeasurement
|
|
38
37
|
}
|
|
39
38
|
) }),
|
|
40
|
-
/* @__PURE__ */ jsx(
|
|
39
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
|
|
41
40
|
PowerWithValidityForm,
|
|
42
41
|
{
|
|
43
42
|
id: reactivePowerId,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
4
|
import { Grid } from "@mui/material";
|
|
5
|
-
import GridItem from "../../../grid/grid-item.js";
|
|
6
5
|
import { CheckboxNullableInput } from "../../../inputs/reactHookForm/CheckboxNullableInput.js";
|
|
7
6
|
import "../../../overflowableText/OverflowableText.js";
|
|
8
7
|
import { ActivePowerAdornment, ReactivePowerAdornment } from "../../../../utils/constants/adornments.js";
|
|
@@ -47,27 +46,25 @@ function PowerWithValidityForm({ id, field, measurement }) {
|
|
|
47
46
|
}
|
|
48
47
|
return measurement.validity ? intl.formatMessage({ id: "ValidMeasurement" }) : intl.formatMessage({ id: "InvalidMeasurement" });
|
|
49
48
|
}, [intl, measurement?.validity]);
|
|
50
|
-
const valueField = /* @__PURE__ */ jsx(
|
|
51
|
-
FloatInput,
|
|
52
|
-
{
|
|
53
|
-
name: `${id}.${FieldConstants.VALUE}`,
|
|
54
|
-
label: field === FieldType.ACTIVE_POWER ? "ActivePowerText" : "ReactivePowerText",
|
|
55
|
-
adornment: field === FieldType.ACTIVE_POWER ? ActivePowerAdornment : ReactivePowerAdornment,
|
|
56
|
-
previousValue: convertInputValue(field, measurement?.value),
|
|
57
|
-
clearable: true
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
const validityField = /* @__PURE__ */ jsx(
|
|
61
|
-
CheckboxNullableInput,
|
|
62
|
-
{
|
|
63
|
-
name: `${id}.${FieldConstants.VALIDITY}`,
|
|
64
|
-
label: "ValidMeasurement",
|
|
65
|
-
previousValue: previousValidityField
|
|
66
|
-
}
|
|
67
|
-
);
|
|
68
49
|
return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
69
|
-
/* @__PURE__ */ jsx(
|
|
70
|
-
|
|
50
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
|
|
51
|
+
FloatInput,
|
|
52
|
+
{
|
|
53
|
+
name: `${id}.${FieldConstants.VALUE}`,
|
|
54
|
+
label: field === FieldType.ACTIVE_POWER ? "ActivePowerText" : "ReactivePowerText",
|
|
55
|
+
adornment: field === FieldType.ACTIVE_POWER ? ActivePowerAdornment : ReactivePowerAdornment,
|
|
56
|
+
previousValue: convertInputValue(field, measurement?.value),
|
|
57
|
+
clearable: true
|
|
58
|
+
}
|
|
59
|
+
) }),
|
|
60
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
|
|
61
|
+
CheckboxNullableInput,
|
|
62
|
+
{
|
|
63
|
+
name: `${id}.${FieldConstants.VALIDITY}`,
|
|
64
|
+
label: "ValidMeasurement",
|
|
65
|
+
previousValue: previousValidityField
|
|
66
|
+
}
|
|
67
|
+
) })
|
|
71
68
|
] });
|
|
72
69
|
}
|
|
73
70
|
export {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Grid } from "@mui/material";
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
3
2
|
import { useState, useEffect, useCallback } from "react";
|
|
4
3
|
import { useWatch, useFormContext } from "react-hook-form";
|
|
5
4
|
import { fetchPredefinedProperties, initializedProperty } from "./propertyUtils.js";
|
|
@@ -11,6 +10,7 @@ import "../../../../utils/types/equipmentType.js";
|
|
|
11
10
|
import "@mui/icons-material";
|
|
12
11
|
import "../../../../utils/yupConfig.js";
|
|
13
12
|
import "react-intl";
|
|
13
|
+
import "@mui/material";
|
|
14
14
|
import "../../../overflowableText/OverflowableText.js";
|
|
15
15
|
import "localized-countries";
|
|
16
16
|
import "localized-countries/data/fr";
|
|
@@ -93,20 +93,19 @@ function PropertiesForm({ id, networkElementType, isModification = false }) {
|
|
|
93
93
|
deleteCallback,
|
|
94
94
|
watchProps
|
|
95
95
|
} : {};
|
|
96
|
-
|
|
97
|
-
ExpandableInput,
|
|
98
|
-
{
|
|
99
|
-
name: additionalProperties,
|
|
100
|
-
Field: PropertyForm,
|
|
101
|
-
fieldProps: { predefinedProperties },
|
|
102
|
-
addButtonLabel: "AddProperty",
|
|
103
|
-
initialValue: initializedProperty(),
|
|
104
|
-
...modificationProperties
|
|
105
|
-
}
|
|
106
|
-
);
|
|
107
|
-
return /* @__PURE__ */ jsxs(Grid, { container: true, children: [
|
|
96
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
108
97
|
/* @__PURE__ */ jsx(GridSection, { title: "AdditionalInformation" }),
|
|
109
|
-
|
|
98
|
+
/* @__PURE__ */ jsx(
|
|
99
|
+
ExpandableInput,
|
|
100
|
+
{
|
|
101
|
+
name: additionalProperties,
|
|
102
|
+
Field: PropertyForm,
|
|
103
|
+
fieldProps: { predefinedProperties },
|
|
104
|
+
addButtonLabel: "AddProperty",
|
|
105
|
+
initialValue: initializedProperty(),
|
|
106
|
+
...modificationProperties
|
|
107
|
+
}
|
|
108
|
+
)
|
|
110
109
|
] });
|
|
111
110
|
}
|
|
112
111
|
export {
|
|
@@ -4,5 +4,5 @@ type PropertyFormProps = {
|
|
|
4
4
|
index: string;
|
|
5
5
|
predefinedProperties: PredefinedProperties;
|
|
6
6
|
};
|
|
7
|
-
export declare
|
|
7
|
+
export declare function PropertyForm({ name, index, predefinedProperties }: PropertyFormProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { useWatch } from "react-hook-form";
|
|
4
|
+
import { Grid } from "@mui/material";
|
|
4
5
|
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
5
6
|
import "../../../../utils/conversionUtils.js";
|
|
6
7
|
import "../../../../utils/types/equipmentType.js";
|
|
7
8
|
import "@mui/icons-material";
|
|
8
9
|
import "../../../../utils/yupConfig.js";
|
|
9
|
-
import GridItem from "../../../grid/grid-item.js";
|
|
10
10
|
import "react-intl";
|
|
11
|
-
import "@mui/material";
|
|
12
11
|
import "../../../overflowableText/OverflowableText.js";
|
|
13
12
|
import "localized-countries";
|
|
14
13
|
import "localized-countries/data/fr";
|
|
@@ -38,7 +37,7 @@ import "uuid";
|
|
|
38
37
|
import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
39
38
|
import "react-querybuilder";
|
|
40
39
|
import { italicFontTextField } from "../form.utils.js";
|
|
41
|
-
|
|
40
|
+
function PropertyForm({ name, index, predefinedProperties }) {
|
|
42
41
|
const watchPropertyName = useWatch({ name: `${name}.${index}.${FieldConstants.NAME}` });
|
|
43
42
|
const watchPropertyPreviousValue = useWatch({
|
|
44
43
|
name: `${name}.${index}.${FieldConstants.PREVIOUS_VALUE}`
|
|
@@ -57,52 +56,45 @@ const PropertyForm = ({ name, index, predefinedProperties }) => {
|
|
|
57
56
|
const values = predefinedProperties?.[watchPropertyName] ?? [];
|
|
58
57
|
return values.sort((a, b) => a.localeCompare(b));
|
|
59
58
|
}, [watchPropertyName, predefinedProperties]);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
);
|
|
98
|
-
|
|
99
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
100
|
-
watchPropertyDeletionMark || watchPropertyAdded === false && watchPropertyPreviousValue ? /* @__PURE__ */ jsx(GridItem, { size: 5, children: nameReadOnlyField }) : /* @__PURE__ */ jsx(GridItem, { size: 5, children: nameField }),
|
|
101
|
-
watchPropertyDeletionMark ? /* @__PURE__ */ jsx(GridItem, { size: 5, children: valueReadOnlyField }) : /* @__PURE__ */ jsx(GridItem, { size: 5, children: valueField })
|
|
102
|
-
] });
|
|
103
|
-
}
|
|
104
|
-
return renderPropertyLine();
|
|
105
|
-
};
|
|
59
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
60
|
+
watchPropertyDeletionMark || watchPropertyAdded === false && watchPropertyPreviousValue ? /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
|
|
61
|
+
TextInput,
|
|
62
|
+
{
|
|
63
|
+
name: `${name}.${index}.${FieldConstants.NAME}`,
|
|
64
|
+
label: "PropertyName",
|
|
65
|
+
formProps: { disabled: true, ...italicFontTextField }
|
|
66
|
+
}
|
|
67
|
+
) }) : /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
|
|
68
|
+
AutocompleteInput,
|
|
69
|
+
{
|
|
70
|
+
name: `${name}.${index}.${FieldConstants.NAME}`,
|
|
71
|
+
options: predefinedNames,
|
|
72
|
+
label: "PropertyName",
|
|
73
|
+
size: "small",
|
|
74
|
+
allowNewValue: true
|
|
75
|
+
}
|
|
76
|
+
) }),
|
|
77
|
+
watchPropertyDeletionMark ? /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
|
|
78
|
+
TextInput,
|
|
79
|
+
{
|
|
80
|
+
name: `${name}.${index}.${FieldConstants.VALUE}`,
|
|
81
|
+
label: "PropertyValue",
|
|
82
|
+
previousValue: watchPropertyPreviousValue,
|
|
83
|
+
formProps: { disabled: true, ...italicFontTextField }
|
|
84
|
+
}
|
|
85
|
+
) }) : /* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
|
|
86
|
+
AutocompleteInput,
|
|
87
|
+
{
|
|
88
|
+
name: `${name}.${index}.${FieldConstants.VALUE}`,
|
|
89
|
+
options: predefinedValues,
|
|
90
|
+
label: "PropertyValue",
|
|
91
|
+
size: "small",
|
|
92
|
+
allowNewValue: true,
|
|
93
|
+
previousValue: watchPropertyPreviousValue
|
|
94
|
+
}
|
|
95
|
+
) })
|
|
96
|
+
] });
|
|
97
|
+
}
|
|
106
98
|
export {
|
|
107
99
|
PropertyForm
|
|
108
100
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Grid } from "@mui/material";
|
|
3
3
|
import GridSection from "../../../grid/grid-section.js";
|
|
4
|
-
import GridItem from "../../../grid/grid-item.js";
|
|
5
4
|
import { ActivePowerAdornment, ReactivePowerAdornment } from "../../../../utils/constants/adornments.js";
|
|
6
5
|
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
7
6
|
import "../../../../utils/conversionUtils.js";
|
|
@@ -39,31 +38,29 @@ import "uuid";
|
|
|
39
38
|
import "../../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
40
39
|
import "react-querybuilder";
|
|
41
40
|
function SetPointsForm({ previousValues, isModification = false }) {
|
|
42
|
-
const activePowerSetPointField = /* @__PURE__ */ jsx(
|
|
43
|
-
FloatInput,
|
|
44
|
-
{
|
|
45
|
-
name: FieldConstants.ACTIVE_POWER_SET_POINT,
|
|
46
|
-
label: "ActivePowerText",
|
|
47
|
-
adornment: ActivePowerAdornment,
|
|
48
|
-
previousValue: previousValues?.activePower ?? void 0,
|
|
49
|
-
clearable: isModification
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
const reactivePowerSetPointField = /* @__PURE__ */ jsx(
|
|
53
|
-
FloatInput,
|
|
54
|
-
{
|
|
55
|
-
name: FieldConstants.REACTIVE_POWER_SET_POINT,
|
|
56
|
-
label: "ReactivePowerText",
|
|
57
|
-
adornment: ReactivePowerAdornment,
|
|
58
|
-
previousValue: previousValues?.reactivePower ?? void 0,
|
|
59
|
-
clearable: isModification
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
41
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
63
42
|
/* @__PURE__ */ jsx(GridSection, { title: "Setpoints" }),
|
|
64
43
|
/* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
65
|
-
/* @__PURE__ */ jsx(
|
|
66
|
-
|
|
44
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
|
|
45
|
+
FloatInput,
|
|
46
|
+
{
|
|
47
|
+
name: FieldConstants.ACTIVE_POWER_SET_POINT,
|
|
48
|
+
label: "ActivePowerText",
|
|
49
|
+
adornment: ActivePowerAdornment,
|
|
50
|
+
previousValue: previousValues?.activePower ?? void 0,
|
|
51
|
+
clearable: isModification
|
|
52
|
+
}
|
|
53
|
+
) }),
|
|
54
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 4, children: /* @__PURE__ */ jsx(
|
|
55
|
+
FloatInput,
|
|
56
|
+
{
|
|
57
|
+
name: FieldConstants.REACTIVE_POWER_SET_POINT,
|
|
58
|
+
label: "ReactivePowerText",
|
|
59
|
+
adornment: ReactivePowerAdornment,
|
|
60
|
+
previousValue: previousValues?.reactivePower ?? void 0,
|
|
61
|
+
clearable: isModification
|
|
62
|
+
}
|
|
63
|
+
) })
|
|
67
64
|
] })
|
|
68
65
|
] });
|
|
69
66
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Grid } from "@mui/material";
|
|
3
3
|
import { useRef, useState, useMemo, useEffect, useCallback } from "react";
|
|
4
4
|
import { useWatch, useFormContext } from "react-hook-form";
|
|
@@ -12,7 +12,6 @@ import { richTypeEquals, getObjectId, areIdsEqual } from "../../../utils/ts-util
|
|
|
12
12
|
import "../../../utils/yupConfig.js";
|
|
13
13
|
import { filledTextField } from "../common/form.utils.js";
|
|
14
14
|
import "../common/properties/propertyUtils.js";
|
|
15
|
-
import GridItem from "../../grid/grid-item.js";
|
|
16
15
|
import "react-intl";
|
|
17
16
|
import "../../overflowableText/OverflowableText.js";
|
|
18
17
|
import "localized-countries";
|
|
@@ -131,42 +130,40 @@ function EquipmentDeletionForm({
|
|
|
131
130
|
const handleTypeChange = useCallback(() => {
|
|
132
131
|
setValue(FieldConstants.EQUIPMENT_ID, null);
|
|
133
132
|
}, [setValue]);
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
] }),
|
|
169
|
-
watchSpecificData?.specificType === FieldConstants.HVDC_LINE_LCC_DELETION_SPECIFIC_TYPE && /* @__PURE__ */ jsx(HvdcLccDeletionSpecificForm, {})
|
|
133
|
+
return /* @__PURE__ */ jsxs(Grid, { container: true, direction: "column", children: [
|
|
134
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
135
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(
|
|
136
|
+
AutocompleteInput,
|
|
137
|
+
{
|
|
138
|
+
isOptionEqualToValue: richTypeEquals,
|
|
139
|
+
name: FieldConstants.TYPE,
|
|
140
|
+
label: "Type",
|
|
141
|
+
options: typesOptions,
|
|
142
|
+
onChangeCallback: handleTypeChange,
|
|
143
|
+
getOptionLabel,
|
|
144
|
+
size: "small",
|
|
145
|
+
inputTransform: (value) => typesOptions.find((option) => option === value) || value,
|
|
146
|
+
formProps: filledTextField
|
|
147
|
+
}
|
|
148
|
+
) }),
|
|
149
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(
|
|
150
|
+
AutocompleteInput,
|
|
151
|
+
{
|
|
152
|
+
isOptionEqualToValue: areIdsEqual,
|
|
153
|
+
allowNewValue: true,
|
|
154
|
+
forcePopupIcon: true,
|
|
155
|
+
name: FieldConstants.EQUIPMENT_ID,
|
|
156
|
+
label: "ID",
|
|
157
|
+
options: equipmentsOptions,
|
|
158
|
+
getOptionLabel: getObjectId,
|
|
159
|
+
inputTransform: (value) => value ?? "",
|
|
160
|
+
outputTransform: (value) => value === "" ? null : getObjectId(value),
|
|
161
|
+
size: "small",
|
|
162
|
+
formProps: filledTextField
|
|
163
|
+
}
|
|
164
|
+
) })
|
|
165
|
+
] }) }),
|
|
166
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: watchSpecificData?.specificType === FieldConstants.HVDC_LINE_LCC_DELETION_SPECIFIC_TYPE && /* @__PURE__ */ jsx(HvdcLccDeletionSpecificForm, {}) })
|
|
170
167
|
] });
|
|
171
168
|
}
|
|
172
169
|
export {
|
|
@@ -2,7 +2,6 @@ import { object, mixed, string } from "yup";
|
|
|
2
2
|
import { EquipmentType } from "../../../utils/types/equipmentType.js";
|
|
3
3
|
import { getHvdcLccDeletionSchema } from "./hvdcLccDeletion/hvdcLccDeletion.utils.js";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
|
-
import "react-intl";
|
|
6
5
|
import "@mui/material";
|
|
7
6
|
import { FieldConstants } from "../../../utils/constants/fieldConstants.js";
|
|
8
7
|
import { YUP_REQUIRED } from "../../../utils/constants/translationKeys.js";
|
|
@@ -10,6 +9,7 @@ import "../../../utils/conversionUtils.js";
|
|
|
10
9
|
import { ModificationType } from "../../../utils/types/modificationType.js";
|
|
11
10
|
import "@mui/icons-material";
|
|
12
11
|
import "../../../utils/yupConfig.js";
|
|
12
|
+
import "react-intl";
|
|
13
13
|
import "../../overflowableText/OverflowableText.js";
|
|
14
14
|
import "react";
|
|
15
15
|
import "react-hook-form";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Grid } from "@mui/material";
|
|
3
3
|
import { useFieldArray } from "react-hook-form";
|
|
4
4
|
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
@@ -7,7 +7,6 @@ import "../../../../utils/types/equipmentType.js";
|
|
|
7
7
|
import "@mui/icons-material";
|
|
8
8
|
import "../../../../utils/yupConfig.js";
|
|
9
9
|
import GridSection from "../../../grid/grid-section.js";
|
|
10
|
-
import GridItem from "../../../grid/grid-item.js";
|
|
11
10
|
import { ShuntCompensatorSelectionForm } from "./ShuntCompensatorSelectionForm.js";
|
|
12
11
|
function HvdcLccDeletionSpecificForm() {
|
|
13
12
|
const { fields: mcsRows1 } = useFieldArray({
|
|
@@ -16,10 +15,10 @@ function HvdcLccDeletionSpecificForm() {
|
|
|
16
15
|
const { fields: mcsRows2 } = useFieldArray({
|
|
17
16
|
name: `${FieldConstants.DELETION_SPECIFIC_DATA}.${FieldConstants.SHUNT_COMPENSATOR_SIDE_2}`
|
|
18
17
|
});
|
|
19
|
-
return /* @__PURE__ */ jsxs(
|
|
18
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20
19
|
/* @__PURE__ */ jsx(GridSection, { title: "LCCConverterStationShuntCompensators" }),
|
|
21
|
-
/* @__PURE__ */ jsxs(Grid, { container: true, spacing:
|
|
22
|
-
/* @__PURE__ */ jsx(
|
|
20
|
+
/* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
21
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(
|
|
23
22
|
ShuntCompensatorSelectionForm,
|
|
24
23
|
{
|
|
25
24
|
title: "Side1",
|
|
@@ -27,7 +26,7 @@ function HvdcLccDeletionSpecificForm() {
|
|
|
27
26
|
mcsRows: mcsRows1
|
|
28
27
|
}
|
|
29
28
|
) }),
|
|
30
|
-
/* @__PURE__ */ jsx(
|
|
29
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(
|
|
31
30
|
ShuntCompensatorSelectionForm,
|
|
32
31
|
{
|
|
33
32
|
title: "Side2",
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2023, 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
1
|
interface ShuntCompensatorSelectionFormProps {
|
|
8
2
|
title: string;
|
|
9
3
|
arrayFormName: string;
|