@gridsuite/commons-ui 0.269.0 → 0.271.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/ui/dialogs/customMuiDialog/CustomMuiDialog.d.ts +10 -3
- package/dist/components/ui/dialogs/customMuiDialog/CustomMuiDialog.js +33 -28
- package/dist/features/index.js +96 -3
- package/dist/features/network-modifications/common/branch/branchCreation.types.d.ts +26 -0
- package/dist/features/network-modifications/common/branch/branchModification.types.d.ts +36 -0
- package/dist/features/network-modifications/common/branch/branchModification.types.js +1 -0
- package/dist/features/network-modifications/{line/characteristics/lineCharacteristicsPane.types.d.ts → common/branch/index.d.ts} +2 -8
- package/dist/features/network-modifications/common/branch/index.js +1 -0
- package/dist/features/network-modifications/common/connectivity/connectivityForm.utils.d.ts +2 -0
- package/dist/features/network-modifications/common/currentLimits/limits.types.d.ts +1 -0
- package/dist/features/network-modifications/common/currentLimits/limitsPane.utils.d.ts +2 -2
- package/dist/features/network-modifications/common/index.d.ts +1 -0
- package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/reactiveCapability.utils.js +1 -1
- package/dist/features/network-modifications/common/regulatingTerminal/regulatingTerminal.utils.d.ts +2 -2
- package/dist/features/network-modifications/common/regulatingTerminal/regulatingTerminal.utils.js +2 -2
- package/dist/features/network-modifications/index.d.ts +1 -0
- package/dist/features/network-modifications/index.js +96 -3
- package/dist/features/network-modifications/line/characteristics/index.d.ts +0 -1
- package/dist/features/network-modifications/line/characteristics/index.js +1 -2
- package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.d.ts +4 -19
- package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.js +0 -14
- package/dist/features/network-modifications/line/creation/lineCreation.types.d.ts +6 -26
- package/dist/features/network-modifications/line/index.js +1 -2
- package/dist/features/network-modifications/line/modification/lineModification.types.d.ts +3 -35
- package/dist/features/network-modifications/twoWindingsTransformer/characteristics/TwoWindingsTransformerCharacteristicsPane.d.ts +7 -0
- package/dist/features/network-modifications/twoWindingsTransformer/characteristics/TwoWindingsTransformerCharacteristicsPane.js +168 -0
- package/dist/features/network-modifications/twoWindingsTransformer/characteristics/index.d.ts +8 -0
- package/dist/features/network-modifications/twoWindingsTransformer/characteristics/index.js +8 -0
- package/dist/features/network-modifications/twoWindingsTransformer/characteristics/twoWindingsTransformerCharacteristicsPane.utils.d.ts +41 -0
- package/dist/features/network-modifications/twoWindingsTransformer/characteristics/twoWindingsTransformerCharacteristicsPane.utils.js +51 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogHeader.d.ts +6 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogHeader.js +123 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabs.d.ts +9 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabs.js +89 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabsContent.d.ts +14 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerDialogTabsContent.js +118 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerForm.d.ts +6 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/TwoWindingsTransformerForm.js +47 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/index.d.ts +12 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/index.js +13 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.types.d.ts +87 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.types.js +1 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.utils.d.ts +10 -0
- package/dist/features/network-modifications/twoWindingsTransformer/common/twoWindingsTransformer.utils.js +50 -0
- package/dist/features/network-modifications/twoWindingsTransformer/creation/index.d.ts +8 -0
- package/dist/features/network-modifications/twoWindingsTransformer/creation/index.js +12 -0
- package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.types.d.ts +47 -0
- package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.types.js +8 -0
- package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.utils.d.ts +248 -0
- package/dist/features/network-modifications/twoWindingsTransformer/creation/twoWindingsTransformerCreation.utils.js +325 -0
- package/dist/features/network-modifications/twoWindingsTransformer/index.d.ts +11 -0
- package/dist/features/network-modifications/twoWindingsTransformer/index.js +88 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/index.d.ts +9 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/index.js +10 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/ToBeEstimatedForm.d.ts +6 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/ToBeEstimatedForm.js +104 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/index.d.ts +9 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/index.js +7 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.type.d.ts +10 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.type.js +1 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.utils.d.ts +12 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/measurements/toBeEstimated.utils.js +18 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.types.d.ts +39 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.types.js +1 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.utils.d.ts +265 -0
- package/dist/features/network-modifications/twoWindingsTransformer/modification/twoWindingsTransformerModification.utils.js +100 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/RegulatedTerminalSection.d.ts +13 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/RegulatedTerminalSection.js +130 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/TapChangerSteps.d.ts +20 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/TapChangerSteps.js +311 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/index.d.ts +12 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/index.js +53 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPane.d.ts +2 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPane.js +198 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPaneSteps.d.ts +9 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/PhaseTapChangerPaneSteps.js +201 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/index.d.ts +9 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/index.js +15 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/phaseTapChanger.utils.d.ts +114 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/phaseTapChanger/phaseTapChanger.utils.js +242 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPane.d.ts +2 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPane.js +283 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPaneSteps.d.ts +9 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/RatioTapChangerPaneSteps.js +181 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/index.d.ts +9 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/index.js +18 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/ratioTapChanger.utils.d.ts +132 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/ratioTapChanger/ratioTapChanger.utils.js +211 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialog.d.ts +2 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialog.js +102 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialogSubmitButton.d.ts +7 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleDialogSubmitButton.js +22 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleForm.d.ts +6 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/CreateRuleForm.js +86 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/ImportRuleDialog.d.ts +10 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/ImportRuleDialog.js +140 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/index.d.ts +12 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/index.js +13 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.types.d.ts +12 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.types.js +1 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.utils.d.ts +9 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/regulationRule/regulationRule.utils.js +19 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/tapChanger.utils.d.ts +14 -0
- package/dist/features/network-modifications/twoWindingsTransformer/tapChanger/tapChanger.utils.js +79 -0
- package/dist/features/network-modifications/voltageLevel/index.d.ts +1 -0
- package/dist/features/network-modifications/voltageLevel/index.js +9 -1
- package/dist/features/network-modifications/voltageLevel/section/VoltageLevelSectionCreationForm.d.ts +10 -0
- package/dist/features/network-modifications/voltageLevel/section/VoltageLevelSectionCreationForm.js +375 -0
- package/dist/features/network-modifications/voltageLevel/section/index.d.ts +9 -0
- package/dist/features/network-modifications/voltageLevel/section/index.js +10 -0
- package/dist/features/network-modifications/voltageLevel/section/voltageLevelSectionCreation.types.d.ts +15 -0
- package/dist/features/network-modifications/voltageLevel/section/voltageLevelSectionCreation.types.js +1 -0
- package/dist/features/network-modifications/voltageLevel/section/voltageLevelSectionCreation.utils.d.ts +48 -0
- package/dist/features/network-modifications/voltageLevel/section/voltageLevelSectionCreation.utils.js +100 -0
- package/dist/index.js +107 -7
- package/dist/translations/en/filterExpertEn.d.ts +0 -3
- package/dist/translations/en/filterExpertEn.js +0 -3
- package/dist/translations/en/network-modification-validationEn.d.ts +1 -0
- package/dist/translations/en/network-modification-validationEn.js +2 -1
- package/dist/translations/en/networkModificationsEn.d.ts +87 -9
- package/dist/translations/en/networkModificationsEn.js +91 -12
- package/dist/translations/fr/filterExpertFr.d.ts +0 -3
- package/dist/translations/fr/filterExpertFr.js +0 -3
- package/dist/translations/fr/network-modification-validationFr.d.ts +1 -0
- package/dist/translations/fr/network-modification-validationFr.js +2 -1
- package/dist/translations/fr/networkModificationsFr.d.ts +87 -9
- package/dist/translations/fr/networkModificationsFr.js +91 -12
- package/dist/utils/constants/fieldConstants.d.ts +37 -0
- package/dist/utils/constants/fieldConstants.js +37 -0
- package/dist/utils/constants/index.js +2 -1
- package/dist/utils/constants/translationKeys.d.ts +1 -0
- package/dist/utils/constants/translationKeys.js +2 -0
- package/dist/utils/functions.d.ts +9 -0
- package/dist/utils/functions.js +40 -0
- package/dist/utils/index.js +11 -4
- package/dist/utils/langs.d.ts +1 -0
- package/dist/utils/langs.js +9 -1
- package/dist/utils/types/equipmentType.d.ts +34 -0
- package/dist/utils/types/equipmentType.js +28 -0
- package/dist/utils/types/index.js +4 -1
- package/package.json +1 -1
- /package/dist/features/network-modifications/{line/characteristics/lineCharacteristicsPane.types.js → common/branch/branchCreation.types.js} +0 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { useIntl } from "react-intl";
|
|
4
|
+
import { FieldConstants } from "../../../../../utils/constants/fieldConstants.js";
|
|
5
|
+
import "../../../../../utils/conversionUtils.js";
|
|
6
|
+
import "../../../../../utils/types/equipmentType.js";
|
|
7
|
+
import "@mui/icons-material";
|
|
8
|
+
import { parseIntData } from "../../../../../utils/ts-utils.js";
|
|
9
|
+
import { TapChangerSteps } from "../TapChangerSteps.js";
|
|
10
|
+
import "@mui/material";
|
|
11
|
+
import "../../../../../components/ui/overflowableText/OverflowableText.js";
|
|
12
|
+
import "react-hook-form";
|
|
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 "../../../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
21
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
22
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
23
|
+
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
24
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
25
|
+
import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
|
|
26
|
+
import "../../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
27
|
+
import "../../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
28
|
+
import "../../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
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-papaparse";
|
|
35
|
+
import "react-dom";
|
|
36
|
+
import { DndColumnType } from "../../../../../components/composite/dnd-table/dnd-table.type.js";
|
|
37
|
+
import "autosuggest-highlight/match";
|
|
38
|
+
import "autosuggest-highlight/parse";
|
|
39
|
+
import "clsx";
|
|
40
|
+
import "../../../../../components/composite/filter/FilterCreationDialog.js";
|
|
41
|
+
import "../../../../../components/composite/filter/HeaderFilterForm.js";
|
|
42
|
+
import "../../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
|
|
43
|
+
import "../../../../../components/composite/filter/expert/ExpertFilterForm.js";
|
|
44
|
+
import "../../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
|
|
45
|
+
import "../../../../../components/composite/filter/expert/expertFilterConstants.js";
|
|
46
|
+
import "react-querybuilder";
|
|
47
|
+
import "uuid";
|
|
48
|
+
import "../../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
|
|
49
|
+
import "../../../../../components/composite/filter/utils/filterFormUtils.js";
|
|
50
|
+
import "@react-querybuilder/material";
|
|
51
|
+
import "../../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
52
|
+
import "../../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
|
|
53
|
+
import "../../../../../components/composite/agGridTable/BottomTableButtons.js";
|
|
54
|
+
import "../../../../../components/composite/agGridTable/CustomAgGridTable.js";
|
|
55
|
+
import "ag-grid-community";
|
|
56
|
+
import "../../../../../components/composite/customAGGrid/customAggrid.js";
|
|
57
|
+
import "../../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
|
|
58
|
+
import "mathjs";
|
|
59
|
+
import "../../../../../components/composite/report/report-viewer/log-table/log-table.js";
|
|
60
|
+
import "react-window";
|
|
61
|
+
import "../../../../../components/composite/report/report-treeview/treeview-item.js";
|
|
62
|
+
import "../../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
63
|
+
function PhaseTapChangerPaneSteps({
|
|
64
|
+
disabled,
|
|
65
|
+
previousValues,
|
|
66
|
+
editData,
|
|
67
|
+
isModification = false
|
|
68
|
+
}) {
|
|
69
|
+
const intl = useIntl();
|
|
70
|
+
const COLUMNS_DEFINITIONS = useMemo(() => {
|
|
71
|
+
return [
|
|
72
|
+
{
|
|
73
|
+
label: "Tap",
|
|
74
|
+
dataKey: FieldConstants.STEPS_TAP,
|
|
75
|
+
type: DndColumnType.TEXT
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
label: "DeltaResistance",
|
|
79
|
+
dataKey: FieldConstants.STEPS_RESISTANCE,
|
|
80
|
+
initialValue: 0,
|
|
81
|
+
editable: true,
|
|
82
|
+
type: DndColumnType.NUMERIC,
|
|
83
|
+
clearable: false
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
label: "DeltaReactance",
|
|
87
|
+
dataKey: FieldConstants.STEPS_REACTANCE,
|
|
88
|
+
initialValue: 0,
|
|
89
|
+
editable: true,
|
|
90
|
+
type: DndColumnType.NUMERIC,
|
|
91
|
+
clearable: false
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
label: "DeltaConductance",
|
|
95
|
+
dataKey: FieldConstants.STEPS_CONDUCTANCE,
|
|
96
|
+
initialValue: 0,
|
|
97
|
+
editable: true,
|
|
98
|
+
type: DndColumnType.NUMERIC,
|
|
99
|
+
clearable: false
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
label: "DeltaSusceptance",
|
|
103
|
+
dataKey: FieldConstants.STEPS_SUSCEPTANCE,
|
|
104
|
+
initialValue: 0,
|
|
105
|
+
editable: true,
|
|
106
|
+
type: DndColumnType.NUMERIC,
|
|
107
|
+
clearable: false
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
label: "Ratio",
|
|
111
|
+
dataKey: FieldConstants.STEPS_RATIO,
|
|
112
|
+
initialValue: 1,
|
|
113
|
+
editable: true,
|
|
114
|
+
type: DndColumnType.NUMERIC,
|
|
115
|
+
clearable: false
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
label: "Alpha",
|
|
119
|
+
dataKey: FieldConstants.STEPS_ALPHA,
|
|
120
|
+
initialValue: 0,
|
|
121
|
+
editable: true,
|
|
122
|
+
type: DndColumnType.NUMERIC,
|
|
123
|
+
clearable: false
|
|
124
|
+
}
|
|
125
|
+
].map((column) => ({
|
|
126
|
+
...column,
|
|
127
|
+
label: intl.formatMessage({ id: column.label }).toLowerCase().replace(/^\w/, (c) => c.toUpperCase())
|
|
128
|
+
}));
|
|
129
|
+
}, [intl]);
|
|
130
|
+
const csvColumns = useMemo(() => {
|
|
131
|
+
return [
|
|
132
|
+
intl.formatMessage({ id: "ImportFileResistance" }),
|
|
133
|
+
intl.formatMessage({ id: "ImportFileReactance" }),
|
|
134
|
+
intl.formatMessage({ id: "ImportFileConductance" }),
|
|
135
|
+
intl.formatMessage({ id: "ImportFileSusceptance" }),
|
|
136
|
+
intl.formatMessage({ id: "Ratio" }),
|
|
137
|
+
intl.formatMessage({ id: "ImportFileAlpha" })
|
|
138
|
+
];
|
|
139
|
+
}, [intl]);
|
|
140
|
+
const handleImportRow = (val) => {
|
|
141
|
+
return {
|
|
142
|
+
[FieldConstants.STEPS_RESISTANCE]: parseIntData(
|
|
143
|
+
val[intl.formatMessage({
|
|
144
|
+
id: "ImportFileResistance"
|
|
145
|
+
})],
|
|
146
|
+
0
|
|
147
|
+
),
|
|
148
|
+
[FieldConstants.STEPS_REACTANCE]: parseIntData(
|
|
149
|
+
val[intl.formatMessage({
|
|
150
|
+
id: "ImportFileReactance"
|
|
151
|
+
})],
|
|
152
|
+
0
|
|
153
|
+
),
|
|
154
|
+
[FieldConstants.STEPS_CONDUCTANCE]: parseIntData(
|
|
155
|
+
val[intl.formatMessage({
|
|
156
|
+
id: "ImportFileConductance"
|
|
157
|
+
})],
|
|
158
|
+
0
|
|
159
|
+
),
|
|
160
|
+
[FieldConstants.STEPS_SUSCEPTANCE]: parseIntData(
|
|
161
|
+
val[intl.formatMessage({
|
|
162
|
+
id: "ImportFileSusceptance"
|
|
163
|
+
})],
|
|
164
|
+
0
|
|
165
|
+
),
|
|
166
|
+
[FieldConstants.STEPS_RATIO]: Number.isNaN(Number.parseFloat(val[intl.formatMessage({ id: "Ratio" })])) ? 1 : Number.parseFloat(val[intl.formatMessage({ id: "Ratio" })]),
|
|
167
|
+
[FieldConstants.STEPS_ALPHA]: Number.isNaN(
|
|
168
|
+
Number.parseFloat(
|
|
169
|
+
val[intl.formatMessage({
|
|
170
|
+
id: "ImportFileAlpha"
|
|
171
|
+
})]
|
|
172
|
+
)
|
|
173
|
+
) ? 1 : Number.parseFloat(
|
|
174
|
+
val[intl.formatMessage({
|
|
175
|
+
id: "ImportFileAlpha"
|
|
176
|
+
})]
|
|
177
|
+
)
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
return /* @__PURE__ */ jsx(
|
|
181
|
+
TapChangerSteps,
|
|
182
|
+
{
|
|
183
|
+
tapChanger: FieldConstants.PHASE_TAP_CHANGER,
|
|
184
|
+
createTapRuleColumn: FieldConstants.STEPS_ALPHA,
|
|
185
|
+
columnsDefinition: COLUMNS_DEFINITIONS,
|
|
186
|
+
csvColumns,
|
|
187
|
+
createRuleMessageId: "CreateDephasingRule",
|
|
188
|
+
createRuleAllowNegativeValues: true,
|
|
189
|
+
importRuleMessageId: "ImportDephasingRule",
|
|
190
|
+
resetButtonMessageId: "ResetRegulationRule",
|
|
191
|
+
handleImportRow,
|
|
192
|
+
disabled,
|
|
193
|
+
previousValues,
|
|
194
|
+
editData: editData?.phaseTapChanger?.steps,
|
|
195
|
+
isModification
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
export {
|
|
200
|
+
PhaseTapChangerPaneSteps
|
|
201
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export * from './phaseTapChanger.utils';
|
|
8
|
+
export * from './PhaseTapChangerPaneSteps';
|
|
9
|
+
export * from './PhaseTapChangerPane';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { getComputedPhaseRegulationType, getComputedPhaseRegulationTypeId, getComputedPhaseTapChangerRegulationMode, getComputedPreviousPhaseRegulationType, getPhaseTapChangerEmptyFormData, getPhaseTapChangerFormData, getPhaseTapChangerValidationSchemaProps, getPhaseTapRegulationSideId } from "./phaseTapChanger.utils.js";
|
|
2
|
+
import { PhaseTapChangerPaneSteps } from "./PhaseTapChangerPaneSteps.js";
|
|
3
|
+
import { PhaseTapChangerPane } from "./PhaseTapChangerPane.js";
|
|
4
|
+
export {
|
|
5
|
+
PhaseTapChangerPane,
|
|
6
|
+
PhaseTapChangerPaneSteps,
|
|
7
|
+
getComputedPhaseRegulationType,
|
|
8
|
+
getComputedPhaseRegulationTypeId,
|
|
9
|
+
getComputedPhaseTapChangerRegulationMode,
|
|
10
|
+
getComputedPreviousPhaseRegulationType,
|
|
11
|
+
getPhaseTapChangerEmptyFormData,
|
|
12
|
+
getPhaseTapChangerFormData,
|
|
13
|
+
getPhaseTapChangerValidationSchemaProps,
|
|
14
|
+
getPhaseTapRegulationSideId
|
|
15
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { InferType } from 'yup';
|
|
2
|
+
import { TapChangerMapInfos, TapChangerStep, TwoWindingsTransformerMapInfos } from '../../common/twoWindingsTransformer.types';
|
|
3
|
+
import { REGULATION_TYPES } from '../../../common';
|
|
4
|
+
import { DeepNullable, FieldConstants, PHASE_REGULATION_MODES } from '../../../../../utils';
|
|
5
|
+
export declare const getPhaseTapChangerValidationSchemaProps: (isModification?: boolean) => import('yup').ObjectSchema<{
|
|
6
|
+
voltageLevel: {
|
|
7
|
+
id?: string | undefined;
|
|
8
|
+
name?: string | undefined;
|
|
9
|
+
nominalVoltage?: string | undefined;
|
|
10
|
+
substationId?: string | undefined;
|
|
11
|
+
topologyKind?: string | null | undefined;
|
|
12
|
+
} | null;
|
|
13
|
+
equipment: {
|
|
14
|
+
id?: string | undefined;
|
|
15
|
+
name?: string | null | undefined;
|
|
16
|
+
type?: string | undefined;
|
|
17
|
+
} | null;
|
|
18
|
+
enabled: NonNullable<boolean | undefined>;
|
|
19
|
+
regulationMode: string | null | undefined;
|
|
20
|
+
regulationType: string | null | undefined;
|
|
21
|
+
regulationSide: string | null | undefined;
|
|
22
|
+
currentLimiterRegulatingValue: number | null | undefined;
|
|
23
|
+
flowSetPointRegulatingValue: number | null | undefined;
|
|
24
|
+
targetDeadband: number | null | undefined;
|
|
25
|
+
lowTapPosition: number | null | undefined;
|
|
26
|
+
highTapPosition: number | null | undefined;
|
|
27
|
+
tapPosition: number | null | undefined;
|
|
28
|
+
steps: {
|
|
29
|
+
b?: number | undefined;
|
|
30
|
+
g?: number | undefined;
|
|
31
|
+
r?: number | undefined;
|
|
32
|
+
x?: number | undefined;
|
|
33
|
+
rho?: number | undefined;
|
|
34
|
+
alpha?: number | undefined;
|
|
35
|
+
index: number;
|
|
36
|
+
}[] | undefined;
|
|
37
|
+
}, import('yup').AnyObject, {
|
|
38
|
+
voltageLevel: {
|
|
39
|
+
id: undefined;
|
|
40
|
+
name: undefined;
|
|
41
|
+
substationId: undefined;
|
|
42
|
+
nominalVoltage: undefined;
|
|
43
|
+
topologyKind: undefined;
|
|
44
|
+
};
|
|
45
|
+
equipment: {
|
|
46
|
+
id: undefined;
|
|
47
|
+
name: undefined;
|
|
48
|
+
type: undefined;
|
|
49
|
+
};
|
|
50
|
+
enabled: undefined;
|
|
51
|
+
regulationMode: undefined;
|
|
52
|
+
regulationType: undefined;
|
|
53
|
+
regulationSide: undefined;
|
|
54
|
+
currentLimiterRegulatingValue: undefined;
|
|
55
|
+
flowSetPointRegulatingValue: undefined;
|
|
56
|
+
targetDeadband: undefined;
|
|
57
|
+
lowTapPosition: undefined;
|
|
58
|
+
highTapPosition: undefined;
|
|
59
|
+
tapPosition: undefined;
|
|
60
|
+
steps: "";
|
|
61
|
+
}, "">;
|
|
62
|
+
export type PhaseTapChangerFormSchema = InferType<ReturnType<typeof getPhaseTapChangerValidationSchemaProps>>;
|
|
63
|
+
export declare const getPhaseTapChangerEmptyFormData: (isModification?: boolean) => DeepNullable<PhaseTapChangerFormSchema>;
|
|
64
|
+
interface PhaseTapChangerFormDataInput {
|
|
65
|
+
[FieldConstants.ENABLED]?: boolean;
|
|
66
|
+
[FieldConstants.REGULATION_MODE]?: string | null;
|
|
67
|
+
[FieldConstants.REGULATION_TYPE]?: string | null;
|
|
68
|
+
[FieldConstants.REGULATION_SIDE]?: string | null;
|
|
69
|
+
[FieldConstants.CURRENT_LIMITER_REGULATING_VALUE]?: number | null;
|
|
70
|
+
flowSetpointRegulatingValue?: number | null;
|
|
71
|
+
[FieldConstants.TARGET_DEADBAND]?: number | null;
|
|
72
|
+
[FieldConstants.LOW_TAP_POSITION]?: number | null;
|
|
73
|
+
[FieldConstants.HIGH_TAP_POSITION]?: number | null;
|
|
74
|
+
[FieldConstants.TAP_POSITION]?: number | null;
|
|
75
|
+
[FieldConstants.STEPS]?: TapChangerStep[];
|
|
76
|
+
[FieldConstants.VOLTAGE_LEVEL_ID]?: string;
|
|
77
|
+
[FieldConstants.EQUIPMENT_ID]?: string;
|
|
78
|
+
[FieldConstants.EQUIPMENT_TYPE]?: string;
|
|
79
|
+
}
|
|
80
|
+
export declare const getPhaseTapChangerFormData: ({ enabled, regulationMode, regulationType, regulationSide, currentLimiterRegulatingValue, flowSetpointRegulatingValue, targetDeadband, lowTapPosition, highTapPosition, tapPosition, steps, voltageLevelId, equipmentID, equipmentType, }: PhaseTapChangerFormDataInput, id?: typeof FieldConstants.PHASE_TAP_CHANGER) => {
|
|
81
|
+
phaseTapChanger: {
|
|
82
|
+
voltageLevel: {
|
|
83
|
+
id: string;
|
|
84
|
+
name: string;
|
|
85
|
+
substationId: string;
|
|
86
|
+
nominalVoltage: string;
|
|
87
|
+
topologyKind: string;
|
|
88
|
+
} | null;
|
|
89
|
+
equipment: {
|
|
90
|
+
id: string;
|
|
91
|
+
name: string | null;
|
|
92
|
+
type: string;
|
|
93
|
+
} | null;
|
|
94
|
+
enabled: boolean;
|
|
95
|
+
regulationMode: string | null;
|
|
96
|
+
regulationType: string | null;
|
|
97
|
+
regulationSide: string | null;
|
|
98
|
+
currentLimiterRegulatingValue: number | null;
|
|
99
|
+
flowSetPointRegulatingValue: number | null;
|
|
100
|
+
targetDeadband: number | null;
|
|
101
|
+
lowTapPosition: number | null;
|
|
102
|
+
highTapPosition: number | null;
|
|
103
|
+
tapPosition: number | null;
|
|
104
|
+
steps: TapChangerStep[];
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
type PhaseRegulationMode = (typeof PHASE_REGULATION_MODES)[keyof typeof PHASE_REGULATION_MODES] | undefined;
|
|
108
|
+
export declare const getComputedPhaseTapChangerRegulationMode: (phaseTapChangerFormValues?: TapChangerMapInfos) => PhaseRegulationMode;
|
|
109
|
+
export declare const getPhaseTapRegulationSideId: (twt?: TwoWindingsTransformerMapInfos) => string | null;
|
|
110
|
+
type RegulationType = (typeof REGULATION_TYPES)[keyof typeof REGULATION_TYPES] | null;
|
|
111
|
+
export declare const getComputedPhaseRegulationType: (twt?: TwoWindingsTransformerMapInfos) => RegulationType;
|
|
112
|
+
export declare const getComputedPhaseRegulationTypeId: (twt?: TwoWindingsTransformerMapInfos) => string | null;
|
|
113
|
+
export declare const getComputedPreviousPhaseRegulationType: (previousValues?: TwoWindingsTransformerMapInfos) => string | null;
|
|
114
|
+
export {};
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { object, array, number, ref, string, bool } from "yup";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "react";
|
|
4
|
+
import "react-hook-form";
|
|
5
|
+
import "../../../common/properties/propertyUtils.js";
|
|
6
|
+
import "@mui/material";
|
|
7
|
+
import { FieldConstants } from "../../../../../utils/constants/fieldConstants.js";
|
|
8
|
+
import { TARGET_DEADBAND_MUST_BE_GREATER_OR_EQUAL_TO_ZERO } from "../../../../../utils/constants/translationKeys.js";
|
|
9
|
+
import "../../../../../utils/conversionUtils.js";
|
|
10
|
+
import { PHASE_REGULATION_MODES, REGULATION_SIDES } from "../../../../../utils/types/equipmentType.js";
|
|
11
|
+
import { areNumbersOrdered, areArrayElementsUnique } from "../../../../../utils/functions.js";
|
|
12
|
+
import "@mui/icons-material";
|
|
13
|
+
import "react-intl";
|
|
14
|
+
import "../../../../../components/ui/overflowableText/OverflowableText.js";
|
|
15
|
+
import "localized-countries";
|
|
16
|
+
import "localized-countries/data/fr";
|
|
17
|
+
import "localized-countries/data/en";
|
|
18
|
+
import "notistack";
|
|
19
|
+
import "../../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
20
|
+
import "../../../../../components/ui/treeViewFinder/TreeViewFinder.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-fill.svg?react";
|
|
27
|
+
import "../../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
28
|
+
import "../../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
29
|
+
import "../../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
30
|
+
import "@hello-pangea/dnd";
|
|
31
|
+
import "../../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
32
|
+
import "../../../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
33
|
+
import "mui-nested-menu";
|
|
34
|
+
import "react-resizable-panels";
|
|
35
|
+
import "react-papaparse";
|
|
36
|
+
import "react-dom";
|
|
37
|
+
import "autosuggest-highlight/match";
|
|
38
|
+
import "autosuggest-highlight/parse";
|
|
39
|
+
import "clsx";
|
|
40
|
+
import "../../../../../components/composite/filter/FilterCreationDialog.js";
|
|
41
|
+
import "../../../../../components/composite/filter/HeaderFilterForm.js";
|
|
42
|
+
import "../../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
|
|
43
|
+
import "../../../../../components/composite/filter/expert/ExpertFilterForm.js";
|
|
44
|
+
import "../../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
|
|
45
|
+
import "../../../../../components/composite/filter/expert/expertFilterConstants.js";
|
|
46
|
+
import "react-querybuilder";
|
|
47
|
+
import "uuid";
|
|
48
|
+
import "../../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
|
|
49
|
+
import "../../../../../components/composite/filter/utils/filterFormUtils.js";
|
|
50
|
+
import "@react-querybuilder/material";
|
|
51
|
+
import "../../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
52
|
+
import "../../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
|
|
53
|
+
import "../../../../../components/composite/agGridTable/BottomTableButtons.js";
|
|
54
|
+
import "../../../../../components/composite/agGridTable/CustomAgGridTable.js";
|
|
55
|
+
import "ag-grid-community";
|
|
56
|
+
import "../../../../../components/composite/customAGGrid/customAggrid.js";
|
|
57
|
+
import "../../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
|
|
58
|
+
import "mathjs";
|
|
59
|
+
import "../../../../../components/composite/report/report-viewer/log-table/log-table.js";
|
|
60
|
+
import "react-window";
|
|
61
|
+
import "../../../../../components/composite/report/report-treeview/treeview-item.js";
|
|
62
|
+
import "../../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
63
|
+
import "../../../common/regulatingTerminal/RegulatingTerminalForm.js";
|
|
64
|
+
import { getRegulatingTerminalEmptyFormData, getRegulatingTerminalFormData } from "../../../common/regulatingTerminal/regulatingTerminal.utils.js";
|
|
65
|
+
import { REGULATION_TYPES } from "../../../common/voltageRegulation/voltageRegulation.utils.js";
|
|
66
|
+
import "@mui/material/colors";
|
|
67
|
+
import "@mui/x-charts";
|
|
68
|
+
import "../../../common/currentLimits/limitsPane.utils.js";
|
|
69
|
+
const getRegulatingTerminalPhaseTapChangerValidationSchema = () => ({
|
|
70
|
+
[FieldConstants.VOLTAGE_LEVEL]: object().nullable().shape({
|
|
71
|
+
[FieldConstants.ID]: string(),
|
|
72
|
+
[FieldConstants.NAME]: string(),
|
|
73
|
+
[FieldConstants.SUBSTATION_ID]: string(),
|
|
74
|
+
[FieldConstants.NOMINAL_VOLTAGE]: string(),
|
|
75
|
+
[FieldConstants.TOPOLOGY_KIND]: string().nullable()
|
|
76
|
+
}).when([FieldConstants.ENABLED, FieldConstants.REGULATION_TYPE], {
|
|
77
|
+
is: (enabled, regulationType) => enabled && regulationType === REGULATION_TYPES.DISTANT.id,
|
|
78
|
+
then: (schema) => schema.required()
|
|
79
|
+
}),
|
|
80
|
+
[FieldConstants.EQUIPMENT]: object().nullable().shape({
|
|
81
|
+
[FieldConstants.ID]: string(),
|
|
82
|
+
[FieldConstants.NAME]: string().nullable(),
|
|
83
|
+
[FieldConstants.TYPE]: string()
|
|
84
|
+
}).when([FieldConstants.ENABLED, FieldConstants.REGULATION_TYPE], {
|
|
85
|
+
is: (enabled, regulationType) => enabled && regulationType === REGULATION_TYPES.DISTANT.id,
|
|
86
|
+
then: (schema) => schema.required()
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
const getPhaseTapChangerValidationSchemaProps = (isModification = false) => object().shape({
|
|
90
|
+
[FieldConstants.ENABLED]: bool().required(),
|
|
91
|
+
[FieldConstants.REGULATION_MODE]: string().nullable().when([FieldConstants.ENABLED], {
|
|
92
|
+
is: true,
|
|
93
|
+
then: (schema) => schema.required()
|
|
94
|
+
}),
|
|
95
|
+
[FieldConstants.REGULATION_TYPE]: string().nullable().when([FieldConstants.ENABLED, FieldConstants.REGULATION_MODE], {
|
|
96
|
+
is: (enabled, regulationMode) => enabled && regulationMode !== PHASE_REGULATION_MODES.OFF.id,
|
|
97
|
+
then: (schema) => schema.required()
|
|
98
|
+
}),
|
|
99
|
+
[FieldConstants.REGULATION_SIDE]: string().nullable().when([FieldConstants.ENABLED, FieldConstants.REGULATION_TYPE], {
|
|
100
|
+
is: (enabled, regulationType) => enabled && regulationType === REGULATION_TYPES.LOCAL.id,
|
|
101
|
+
then: (schema) => schema.required()
|
|
102
|
+
}),
|
|
103
|
+
[FieldConstants.CURRENT_LIMITER_REGULATING_VALUE]: number().nullable().when([FieldConstants.ENABLED, FieldConstants.REGULATION_MODE], {
|
|
104
|
+
is: (enabled, regulationMode) => enabled && regulationMode === PHASE_REGULATION_MODES.CURRENT_LIMITER.id,
|
|
105
|
+
then: (schema) => schema.positive("CurrentLimiterMustBeGreaterThanZero").required()
|
|
106
|
+
}),
|
|
107
|
+
[FieldConstants.FLOW_SET_POINT_REGULATING_VALUE]: number().nullable().when([FieldConstants.ENABLED, FieldConstants.REGULATION_MODE], {
|
|
108
|
+
is: (enabled, regulationMode) => enabled && regulationMode === PHASE_REGULATION_MODES.ACTIVE_POWER_CONTROL.id,
|
|
109
|
+
then: (schema) => schema.required()
|
|
110
|
+
}),
|
|
111
|
+
[FieldConstants.TARGET_DEADBAND]: number().nullable().min(0, TARGET_DEADBAND_MUST_BE_GREATER_OR_EQUAL_TO_ZERO),
|
|
112
|
+
[FieldConstants.LOW_TAP_POSITION]: number().nullable().when(FieldConstants.ENABLED, {
|
|
113
|
+
is: (enabled) => enabled && !isModification,
|
|
114
|
+
then: (schema) => schema.required()
|
|
115
|
+
}),
|
|
116
|
+
[FieldConstants.HIGH_TAP_POSITION]: number().nullable(),
|
|
117
|
+
[FieldConstants.TAP_POSITION]: number().nullable().when(FieldConstants.ENABLED, {
|
|
118
|
+
is: (enabled) => enabled && !isModification,
|
|
119
|
+
then: (schema) => schema.required().min(ref(FieldConstants.LOW_TAP_POSITION), "TapPositionMustBeBetweenLowAndHighTapPositionValue").max(
|
|
120
|
+
ref(FieldConstants.HIGH_TAP_POSITION),
|
|
121
|
+
"TapPositionMustBeBetweenLowAndHighTapPositionValue"
|
|
122
|
+
)
|
|
123
|
+
}),
|
|
124
|
+
[FieldConstants.STEPS]: array().of(
|
|
125
|
+
object().shape({
|
|
126
|
+
[FieldConstants.STEPS_TAP]: number().required(),
|
|
127
|
+
[FieldConstants.STEPS_RESISTANCE]: number(),
|
|
128
|
+
[FieldConstants.STEPS_REACTANCE]: number(),
|
|
129
|
+
[FieldConstants.STEPS_CONDUCTANCE]: number(),
|
|
130
|
+
[FieldConstants.STEPS_SUSCEPTANCE]: number(),
|
|
131
|
+
[FieldConstants.STEPS_RATIO]: number(),
|
|
132
|
+
[FieldConstants.STEPS_ALPHA]: number()
|
|
133
|
+
})
|
|
134
|
+
).when(FieldConstants.ENABLED, {
|
|
135
|
+
is: (enabled) => enabled && !isModification,
|
|
136
|
+
then: (schema) => schema.min(1, "GeneratePhaseTapRowsError")
|
|
137
|
+
}).test("distinctOrderedAlpha", "PhaseShiftValuesError", (stepsArray) => {
|
|
138
|
+
const alphaArray = (stepsArray ?? []).map((step) => step[FieldConstants.STEPS_ALPHA]);
|
|
139
|
+
return areNumbersOrdered(alphaArray) && areArrayElementsUnique(alphaArray);
|
|
140
|
+
}),
|
|
141
|
+
...getRegulatingTerminalPhaseTapChangerValidationSchema()
|
|
142
|
+
});
|
|
143
|
+
const getPhaseTapChangerEmptyFormData = (isModification = false) => {
|
|
144
|
+
return {
|
|
145
|
+
[FieldConstants.ENABLED]: false,
|
|
146
|
+
[FieldConstants.REGULATION_MODE]: null,
|
|
147
|
+
[FieldConstants.REGULATION_TYPE]: null,
|
|
148
|
+
[FieldConstants.REGULATION_SIDE]: isModification ? null : REGULATION_SIDES.SIDE1.id,
|
|
149
|
+
[FieldConstants.CURRENT_LIMITER_REGULATING_VALUE]: null,
|
|
150
|
+
[FieldConstants.FLOW_SET_POINT_REGULATING_VALUE]: null,
|
|
151
|
+
[FieldConstants.TARGET_DEADBAND]: null,
|
|
152
|
+
[FieldConstants.LOW_TAP_POSITION]: null,
|
|
153
|
+
[FieldConstants.HIGH_TAP_POSITION]: null,
|
|
154
|
+
[FieldConstants.TAP_POSITION]: null,
|
|
155
|
+
[FieldConstants.STEPS]: [],
|
|
156
|
+
...getRegulatingTerminalEmptyFormData()
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
const getPhaseTapChangerFormData = ({
|
|
160
|
+
enabled = false,
|
|
161
|
+
regulationMode = null,
|
|
162
|
+
regulationType = null,
|
|
163
|
+
regulationSide = REGULATION_SIDES.SIDE1.id,
|
|
164
|
+
currentLimiterRegulatingValue = null,
|
|
165
|
+
flowSetpointRegulatingValue = null,
|
|
166
|
+
targetDeadband = null,
|
|
167
|
+
lowTapPosition = null,
|
|
168
|
+
highTapPosition = null,
|
|
169
|
+
tapPosition = null,
|
|
170
|
+
steps = [],
|
|
171
|
+
voltageLevelId,
|
|
172
|
+
equipmentID,
|
|
173
|
+
equipmentType
|
|
174
|
+
}, id = FieldConstants.PHASE_TAP_CHANGER) => ({
|
|
175
|
+
[id]: {
|
|
176
|
+
[FieldConstants.ENABLED]: enabled,
|
|
177
|
+
[FieldConstants.REGULATION_MODE]: regulationMode,
|
|
178
|
+
[FieldConstants.REGULATION_TYPE]: regulationType,
|
|
179
|
+
[FieldConstants.REGULATION_SIDE]: regulationSide,
|
|
180
|
+
[FieldConstants.CURRENT_LIMITER_REGULATING_VALUE]: currentLimiterRegulatingValue,
|
|
181
|
+
[FieldConstants.FLOW_SET_POINT_REGULATING_VALUE]: flowSetpointRegulatingValue,
|
|
182
|
+
[FieldConstants.TARGET_DEADBAND]: targetDeadband,
|
|
183
|
+
[FieldConstants.LOW_TAP_POSITION]: lowTapPosition,
|
|
184
|
+
[FieldConstants.HIGH_TAP_POSITION]: highTapPosition,
|
|
185
|
+
[FieldConstants.TAP_POSITION]: tapPosition,
|
|
186
|
+
[FieldConstants.STEPS]: steps,
|
|
187
|
+
...getRegulatingTerminalFormData({
|
|
188
|
+
[FieldConstants.EQUIPMENT_ID]: equipmentID,
|
|
189
|
+
[FieldConstants.EQUIPMENT_TYPE]: equipmentType,
|
|
190
|
+
[FieldConstants.VOLTAGE_LEVEL_ID]: voltageLevelId
|
|
191
|
+
})
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
const getComputedPhaseTapChangerRegulationMode = (phaseTapChangerFormValues) => {
|
|
195
|
+
if (phaseTapChangerFormValues?.[FieldConstants.REGULATION_MODE] === PHASE_REGULATION_MODES.OFF.id || phaseTapChangerFormValues?.[FieldConstants.REGULATING] === false) {
|
|
196
|
+
return PHASE_REGULATION_MODES.OFF;
|
|
197
|
+
}
|
|
198
|
+
if (phaseTapChangerFormValues?.[FieldConstants.REGULATION_MODE] === PHASE_REGULATION_MODES.CURRENT_LIMITER.id && phaseTapChangerFormValues?.[FieldConstants.REGULATING] === true) {
|
|
199
|
+
return PHASE_REGULATION_MODES.CURRENT_LIMITER;
|
|
200
|
+
}
|
|
201
|
+
if (phaseTapChangerFormValues?.[FieldConstants.REGULATION_MODE] === PHASE_REGULATION_MODES.ACTIVE_POWER_CONTROL.id && phaseTapChangerFormValues?.[FieldConstants.REGULATING] === true) {
|
|
202
|
+
return PHASE_REGULATION_MODES.ACTIVE_POWER_CONTROL;
|
|
203
|
+
}
|
|
204
|
+
return void 0;
|
|
205
|
+
};
|
|
206
|
+
const getPhaseTapRegulationSideId = (twt) => {
|
|
207
|
+
const phaseTapChangerValues = twt?.phaseTapChanger;
|
|
208
|
+
if (!phaseTapChangerValues || !twt) {
|
|
209
|
+
return null;
|
|
210
|
+
}
|
|
211
|
+
if (phaseTapChangerValues?.regulatingTerminalConnectableId === twt?.id) {
|
|
212
|
+
return phaseTapChangerValues?.regulatingTerminalVlId === twt?.voltageLevelId1 ? REGULATION_SIDES.SIDE1.id : REGULATION_SIDES.SIDE2.id;
|
|
213
|
+
}
|
|
214
|
+
return null;
|
|
215
|
+
};
|
|
216
|
+
const getComputedPhaseRegulationType = (twt) => {
|
|
217
|
+
if (!twt?.[FieldConstants.PHASE_TAP_CHANGER]?.regulatingTerminalConnectableId) {
|
|
218
|
+
return null;
|
|
219
|
+
}
|
|
220
|
+
if (twt?.[FieldConstants.PHASE_TAP_CHANGER]?.regulatingTerminalConnectableId !== twt?.id) {
|
|
221
|
+
return REGULATION_TYPES.DISTANT;
|
|
222
|
+
}
|
|
223
|
+
return REGULATION_TYPES.LOCAL;
|
|
224
|
+
};
|
|
225
|
+
const getComputedPhaseRegulationTypeId = (twt) => {
|
|
226
|
+
const regulationType = getComputedPhaseRegulationType(twt);
|
|
227
|
+
return regulationType?.id ?? null;
|
|
228
|
+
};
|
|
229
|
+
const getComputedPreviousPhaseRegulationType = (previousValues) => {
|
|
230
|
+
const previousRegulationType = getComputedPhaseRegulationType(previousValues);
|
|
231
|
+
return previousRegulationType?.id ?? null;
|
|
232
|
+
};
|
|
233
|
+
export {
|
|
234
|
+
getComputedPhaseRegulationType,
|
|
235
|
+
getComputedPhaseRegulationTypeId,
|
|
236
|
+
getComputedPhaseTapChangerRegulationMode,
|
|
237
|
+
getComputedPreviousPhaseRegulationType,
|
|
238
|
+
getPhaseTapChangerEmptyFormData,
|
|
239
|
+
getPhaseTapChangerFormData,
|
|
240
|
+
getPhaseTapChangerValidationSchemaProps,
|
|
241
|
+
getPhaseTapRegulationSideId
|
|
242
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { TapChangerPaneProps } from '../../common/twoWindingsTransformer.types';
|
|
2
|
+
export declare function RatioTapChangerPane({ id, voltageLevelOptions, previousValues, editData, fetchVoltageLevelEquipments, isModification, }: Readonly<TapChangerPaneProps>): import("react").JSX.Element;
|