@gridsuite/commons-ui 0.270.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 +87 -2
- 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 +87 -2
- 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/index.js +98 -6
- 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 +70 -9
- package/dist/translations/en/networkModificationsEn.js +71 -10
- 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 +70 -9
- package/dist/translations/fr/networkModificationsFr.js +71 -10
- 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,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;
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Grid } from "@mui/material";
|
|
3
|
+
import { useMemo, useCallback, useEffect } from "react";
|
|
4
|
+
import { useFormContext, useWatch } from "react-hook-form";
|
|
5
|
+
import { useIntl } from "react-intl";
|
|
6
|
+
import { RatioTapChangerPaneSteps } from "./RatioTapChangerPaneSteps.js";
|
|
7
|
+
import { getComputedPreviousRatioRegulationType, getComputedRegulationModeId, getComputedRegulationTypeId, getComputedTapSideId } from "./ratioTapChanger.utils.js";
|
|
8
|
+
import { RegulatedTerminalSection } from "../RegulatedTerminalSection.js";
|
|
9
|
+
import { VoltageAdornment } from "../../../../../utils/constants/adornments.js";
|
|
10
|
+
import { FieldConstants } from "../../../../../utils/constants/fieldConstants.js";
|
|
11
|
+
import "../../../../../utils/conversionUtils.js";
|
|
12
|
+
import { RATIO_REGULATION_MODES } from "../../../../../utils/types/equipmentType.js";
|
|
13
|
+
import "@mui/icons-material";
|
|
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 "yup";
|
|
21
|
+
import "../../../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
22
|
+
import { SwitchInput } from "../../../../../components/ui/reactHookForm/booleans/SwitchInput.js";
|
|
23
|
+
import { FloatInput } from "../../../../../components/ui/reactHookForm/numbers/FloatInput.js";
|
|
24
|
+
import "../../../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
25
|
+
import { SelectInput } from "../../../../../components/ui/reactHookForm/selectInputs/SelectInput.js";
|
|
26
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
27
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
28
|
+
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
29
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
30
|
+
import "@material-symbols/svg-400/outlined/add_notes-fill.svg?react";
|
|
31
|
+
import "../../../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
32
|
+
import "../../../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
33
|
+
import { CheckboxNullableInput } from "../../../../../components/ui/reactHookForm/CheckboxNullableInput.js";
|
|
34
|
+
import "../../../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
35
|
+
import "@hello-pangea/dnd";
|
|
36
|
+
import "../../../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
37
|
+
import "../../../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
38
|
+
import "mui-nested-menu";
|
|
39
|
+
import "react-resizable-panels";
|
|
40
|
+
import "react-papaparse";
|
|
41
|
+
import "react-dom";
|
|
42
|
+
import "autosuggest-highlight/match";
|
|
43
|
+
import "autosuggest-highlight/parse";
|
|
44
|
+
import "clsx";
|
|
45
|
+
import "../../../../../components/composite/filter/FilterCreationDialog.js";
|
|
46
|
+
import "../../../../../components/composite/filter/HeaderFilterForm.js";
|
|
47
|
+
import "../../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js";
|
|
48
|
+
import "../../../../../components/composite/filter/expert/ExpertFilterForm.js";
|
|
49
|
+
import "../../../../../components/composite/filter/expert/ExpertFilterEditionDialog.js";
|
|
50
|
+
import "../../../../../components/composite/filter/expert/expertFilterConstants.js";
|
|
51
|
+
import "react-querybuilder";
|
|
52
|
+
import "uuid";
|
|
53
|
+
import "../../../../../components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js";
|
|
54
|
+
import "../../../../../components/composite/filter/utils/filterFormUtils.js";
|
|
55
|
+
import { GridItem } from "../../../../../components/composite/grid/grid-item.js";
|
|
56
|
+
import { GridSection } from "../../../../../components/composite/grid/grid-section.js";
|
|
57
|
+
import "@react-querybuilder/material";
|
|
58
|
+
import "../../../../../components/composite/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
59
|
+
import "../../../../../components/composite/reactQueryBuilder/PropertyValueEditor.js";
|
|
60
|
+
import "../../../../../components/composite/agGridTable/BottomTableButtons.js";
|
|
61
|
+
import "../../../../../components/composite/agGridTable/CustomAgGridTable.js";
|
|
62
|
+
import "ag-grid-community";
|
|
63
|
+
import "../../../../../components/composite/customAGGrid/customAggrid.js";
|
|
64
|
+
import "../../../../../components/composite/customAGGrid/context/custom-aggrid-context.js";
|
|
65
|
+
import "mathjs";
|
|
66
|
+
import "../../../../../components/composite/report/report-viewer/log-table/log-table.js";
|
|
67
|
+
import "react-window";
|
|
68
|
+
import "../../../../../components/composite/report/report-treeview/treeview-item.js";
|
|
69
|
+
import "../../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
70
|
+
function RatioTapChangerPane({
|
|
71
|
+
id = FieldConstants.RATIO_TAP_CHANGER,
|
|
72
|
+
voltageLevelOptions = [],
|
|
73
|
+
previousValues,
|
|
74
|
+
editData,
|
|
75
|
+
fetchVoltageLevelEquipments,
|
|
76
|
+
isModification = false
|
|
77
|
+
}) {
|
|
78
|
+
const { trigger, setValue, getValues } = useFormContext();
|
|
79
|
+
const intl = useIntl();
|
|
80
|
+
const previousRegulation = () => {
|
|
81
|
+
if (previousValues?.ratioTapChanger?.hasLoadTapChangingCapabilities) {
|
|
82
|
+
return intl.formatMessage({ id: "On" });
|
|
83
|
+
}
|
|
84
|
+
if (previousValues?.ratioTapChanger?.hasLoadTapChangingCapabilities === false) {
|
|
85
|
+
return intl.formatMessage({ id: "Off" });
|
|
86
|
+
}
|
|
87
|
+
return void 0;
|
|
88
|
+
};
|
|
89
|
+
const getRatioTapChangerRegulationModeLabel = (ratioTapChangerFormValues) => {
|
|
90
|
+
if (!ratioTapChangerFormValues) {
|
|
91
|
+
return void 0;
|
|
92
|
+
}
|
|
93
|
+
if (ratioTapChangerFormValues?.isRegulating) {
|
|
94
|
+
return intl.formatMessage({
|
|
95
|
+
id: RATIO_REGULATION_MODES.VOLTAGE_REGULATION.label
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return intl.formatMessage({
|
|
99
|
+
id: RATIO_REGULATION_MODES.FIXED_RATIO.label
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
const ratioTapChangerEnabledWatcher = useWatch({
|
|
103
|
+
name: `${id}.${FieldConstants.ENABLED}`
|
|
104
|
+
});
|
|
105
|
+
const ratioTapLoadTapChangingCapabilitiesWatcher = useWatch({
|
|
106
|
+
name: `${id}.${FieldConstants.LOAD_TAP_CHANGING_CAPABILITIES}`
|
|
107
|
+
});
|
|
108
|
+
const isRatioTapLoadTapChangingCapabilitiesOff = !ratioTapLoadTapChangingCapabilitiesWatcher || ratioTapLoadTapChangingCapabilitiesWatcher === null;
|
|
109
|
+
const regulationModeWatch = useWatch({
|
|
110
|
+
name: `${id}.${FieldConstants.REGULATION_MODE}`
|
|
111
|
+
});
|
|
112
|
+
const regulationTypeWatch = useWatch({
|
|
113
|
+
name: `${id}.${FieldConstants.REGULATION_TYPE}`
|
|
114
|
+
});
|
|
115
|
+
const regulationType = useMemo(() => {
|
|
116
|
+
return regulationTypeWatch || (previousValues ? getComputedPreviousRatioRegulationType(previousValues) : void 0);
|
|
117
|
+
}, [previousValues, regulationTypeWatch]);
|
|
118
|
+
const findAndSetVoltageLevelFromPrevious = useCallback(() => {
|
|
119
|
+
const prevVl = voltageLevelOptions.find(
|
|
120
|
+
(vl) => vl.id === previousValues?.ratioTapChanger?.regulatingTerminalVlId
|
|
121
|
+
);
|
|
122
|
+
if (prevVl) {
|
|
123
|
+
const newVlValue = {
|
|
124
|
+
id: prevVl.id,
|
|
125
|
+
label: prevVl.name ?? ""
|
|
126
|
+
};
|
|
127
|
+
setValue(`${id}.${FieldConstants.VOLTAGE_LEVEL}`, newVlValue);
|
|
128
|
+
} else {
|
|
129
|
+
console.error("Voltage level not found:", prevVl);
|
|
130
|
+
}
|
|
131
|
+
}, [setValue, id, voltageLevelOptions, previousValues]);
|
|
132
|
+
const setEquipmentFromPrevious = useCallback(() => {
|
|
133
|
+
const prevEquipmentId = previousValues?.ratioTapChanger?.regulatingTerminalConnectableId;
|
|
134
|
+
if (prevEquipmentId) {
|
|
135
|
+
const prevEquipmentType = previousValues?.ratioTapChanger?.regulatingTerminalConnectableType;
|
|
136
|
+
const newEquipment = {
|
|
137
|
+
id: prevEquipmentId,
|
|
138
|
+
label: prevEquipmentType,
|
|
139
|
+
type: prevEquipmentType
|
|
140
|
+
};
|
|
141
|
+
setValue(`${id}.${FieldConstants.EQUIPMENT}`, newEquipment);
|
|
142
|
+
}
|
|
143
|
+
}, [setValue, id, previousValues]);
|
|
144
|
+
const setValueIfNull = useCallback(
|
|
145
|
+
(curRatioTapChanger, field, value) => {
|
|
146
|
+
if (curRatioTapChanger[field] === null) {
|
|
147
|
+
setValue(`${id}.${field}`, value);
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
[setValue, id]
|
|
151
|
+
);
|
|
152
|
+
const fillRatioTapChangerRegulationAttributesWithPreviousValues = useCallback(
|
|
153
|
+
(newOnLoad) => {
|
|
154
|
+
if (newOnLoad !== true || !previousValues) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
const curRatioTapChanger = getValues(id);
|
|
158
|
+
setValueIfNull(
|
|
159
|
+
curRatioTapChanger,
|
|
160
|
+
FieldConstants.REGULATION_MODE,
|
|
161
|
+
getComputedRegulationModeId(previousValues)
|
|
162
|
+
);
|
|
163
|
+
setValueIfNull(curRatioTapChanger, FieldConstants.TARGET_V, previousValues?.ratioTapChanger?.targetV);
|
|
164
|
+
setValueIfNull(
|
|
165
|
+
curRatioTapChanger,
|
|
166
|
+
FieldConstants.TARGET_DEADBAND,
|
|
167
|
+
previousValues?.ratioTapChanger?.targetDeadband
|
|
168
|
+
);
|
|
169
|
+
setValueIfNull(
|
|
170
|
+
curRatioTapChanger,
|
|
171
|
+
FieldConstants.REGULATION_TYPE,
|
|
172
|
+
getComputedRegulationTypeId(previousValues)
|
|
173
|
+
);
|
|
174
|
+
setValueIfNull(curRatioTapChanger, FieldConstants.REGULATION_SIDE, getComputedTapSideId(previousValues));
|
|
175
|
+
if (curRatioTapChanger[FieldConstants.VOLTAGE_LEVEL] === null) {
|
|
176
|
+
findAndSetVoltageLevelFromPrevious();
|
|
177
|
+
}
|
|
178
|
+
if (curRatioTapChanger[FieldConstants.EQUIPMENT] === null) {
|
|
179
|
+
setEquipmentFromPrevious();
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
[id, previousValues, getValues, setValueIfNull, findAndSetVoltageLevelFromPrevious, setEquipmentFromPrevious]
|
|
183
|
+
);
|
|
184
|
+
useEffect(() => {
|
|
185
|
+
if (regulationModeWatch === RATIO_REGULATION_MODES.FIXED_RATIO.id) {
|
|
186
|
+
trigger(`${id}.${FieldConstants.REGULATION_TYPE}`).then();
|
|
187
|
+
trigger(`${id}.${FieldConstants.REGULATION_SIDE}`).then();
|
|
188
|
+
trigger(`${id}.${FieldConstants.TARGET_V}`).then();
|
|
189
|
+
}
|
|
190
|
+
}, [regulationModeWatch, trigger, id]);
|
|
191
|
+
const ratioTapLoadTapChangingCapabilitiesField = isModification ? /* @__PURE__ */ jsx(
|
|
192
|
+
CheckboxNullableInput,
|
|
193
|
+
{
|
|
194
|
+
name: `${id}.${FieldConstants.LOAD_TAP_CHANGING_CAPABILITIES}`,
|
|
195
|
+
label: "OnLoad",
|
|
196
|
+
formProps: {
|
|
197
|
+
disabled: !ratioTapChangerEnabledWatcher
|
|
198
|
+
},
|
|
199
|
+
previousValue: previousRegulation(),
|
|
200
|
+
onChange: fillRatioTapChangerRegulationAttributesWithPreviousValues
|
|
201
|
+
}
|
|
202
|
+
) : /* @__PURE__ */ jsx(
|
|
203
|
+
SwitchInput,
|
|
204
|
+
{
|
|
205
|
+
name: `${id}.${FieldConstants.LOAD_TAP_CHANGING_CAPABILITIES}`,
|
|
206
|
+
label: "OnLoad",
|
|
207
|
+
formProps: {
|
|
208
|
+
disabled: !ratioTapChangerEnabledWatcher
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
);
|
|
212
|
+
const regulationModeField = /* @__PURE__ */ jsx(
|
|
213
|
+
SelectInput,
|
|
214
|
+
{
|
|
215
|
+
name: `${id}.${FieldConstants.REGULATION_MODE}`,
|
|
216
|
+
label: "RegulationMode",
|
|
217
|
+
options: Object.values(RATIO_REGULATION_MODES),
|
|
218
|
+
size: "small",
|
|
219
|
+
disabled: isRatioTapLoadTapChangingCapabilitiesOff,
|
|
220
|
+
previousValue: getRatioTapChangerRegulationModeLabel(previousValues?.ratioTapChanger)
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
const targetVoltage1Field = /* @__PURE__ */ jsx(
|
|
224
|
+
FloatInput,
|
|
225
|
+
{
|
|
226
|
+
name: `${id}.${FieldConstants.TARGET_V}`,
|
|
227
|
+
label: "TargetVoltage",
|
|
228
|
+
adornment: VoltageAdornment,
|
|
229
|
+
formProps: {
|
|
230
|
+
disabled: isRatioTapLoadTapChangingCapabilitiesOff
|
|
231
|
+
},
|
|
232
|
+
previousValue: previousValues?.ratioTapChanger?.targetV ?? void 0
|
|
233
|
+
}
|
|
234
|
+
);
|
|
235
|
+
const targetDeadbandField = /* @__PURE__ */ jsx(
|
|
236
|
+
FloatInput,
|
|
237
|
+
{
|
|
238
|
+
name: `${id}.${FieldConstants.TARGET_DEADBAND}`,
|
|
239
|
+
label: "Deadband",
|
|
240
|
+
adornment: VoltageAdornment,
|
|
241
|
+
formProps: {
|
|
242
|
+
disabled: isRatioTapLoadTapChangingCapabilitiesOff
|
|
243
|
+
},
|
|
244
|
+
previousValue: previousValues?.ratioTapChanger?.targetDeadband
|
|
245
|
+
}
|
|
246
|
+
);
|
|
247
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
248
|
+
/* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
249
|
+
/* @__PURE__ */ jsx(GridItem, { children: ratioTapLoadTapChangingCapabilitiesField }),
|
|
250
|
+
/* @__PURE__ */ jsx(GridItem, { size: "auto" })
|
|
251
|
+
] }),
|
|
252
|
+
/* @__PURE__ */ jsx(GridSection, { title: "RegulationSection", heading: 4 }),
|
|
253
|
+
/* @__PURE__ */ jsxs(Grid, { container: true, spacing: 1, children: [
|
|
254
|
+
/* @__PURE__ */ jsx(GridItem, { size: 4, children: regulationModeField }),
|
|
255
|
+
/* @__PURE__ */ jsx(GridItem, { size: 4, children: targetVoltage1Field }),
|
|
256
|
+
/* @__PURE__ */ jsx(GridItem, { size: 4, children: targetDeadbandField })
|
|
257
|
+
] }),
|
|
258
|
+
/* @__PURE__ */ jsx(
|
|
259
|
+
RegulatedTerminalSection,
|
|
260
|
+
{
|
|
261
|
+
id,
|
|
262
|
+
voltageLevelOptions,
|
|
263
|
+
previousValues,
|
|
264
|
+
tapChangerDisabled: isRatioTapLoadTapChangingCapabilitiesOff,
|
|
265
|
+
regulationType,
|
|
266
|
+
fetchVoltageLevelEquipments
|
|
267
|
+
}
|
|
268
|
+
),
|
|
269
|
+
/* @__PURE__ */ jsx(GridSection, { title: "TapsSection", heading: 4 }),
|
|
270
|
+
/* @__PURE__ */ jsx(
|
|
271
|
+
RatioTapChangerPaneSteps,
|
|
272
|
+
{
|
|
273
|
+
disabled: !ratioTapChangerEnabledWatcher,
|
|
274
|
+
previousValues: previousValues?.ratioTapChanger,
|
|
275
|
+
editData,
|
|
276
|
+
isModification
|
|
277
|
+
}
|
|
278
|
+
)
|
|
279
|
+
] });
|
|
280
|
+
}
|
|
281
|
+
export {
|
|
282
|
+
RatioTapChangerPane
|
|
283
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TapChangerMapInfos } from '../../common/twoWindingsTransformer.types';
|
|
2
|
+
import { TwoWindingsTransformerModificationDto } from '../../modification/twoWindingsTransformerModification.types';
|
|
3
|
+
export interface RatioTapChangerPaneStepsProps {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
previousValues?: TapChangerMapInfos;
|
|
6
|
+
editData?: TwoWindingsTransformerModificationDto;
|
|
7
|
+
isModification?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function RatioTapChangerPaneSteps({ disabled, previousValues, editData, isModification, }: Readonly<RatioTapChangerPaneStepsProps>): import("react").JSX.Element;
|