@gridsuite/commons-ui 0.141.0 → 0.143.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/cardErrorBoundary/CardErrorBoundary.d.ts +1 -1
- package/dist/components/csvDownloader/csv-export.d.ts +1 -0
- package/dist/components/dnd-table/dnd-table.type.d.ts +1 -1
- package/dist/components/index.js +6 -3
- package/dist/components/overflowableText/OverflowableText.js +1 -1
- package/dist/components/parameters/common/constant.d.ts +3 -0
- package/dist/components/parameters/common/constant.js +6 -0
- package/dist/components/parameters/common/index.js +4 -1
- package/dist/components/parameters/common/utils.d.ts +14 -0
- package/dist/components/parameters/common/utils.js +89 -0
- package/dist/components/parameters/index.js +6 -3
- package/dist/components/parameters/loadflow/constants.d.ts +0 -3
- package/dist/components/parameters/loadflow/constants.js +0 -6
- package/dist/components/parameters/loadflow/index.js +1 -4
- package/dist/components/parameters/loadflow/load-flow-general-parameters.js +5 -1
- package/dist/components/parameters/loadflow/load-flow-parameters-form.js +2 -2
- package/dist/components/parameters/loadflow/load-flow-parameters-type.d.ts +11 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-type.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-utils.d.ts +0 -11
- package/dist/components/parameters/loadflow/load-flow-parameters-utils.js +3 -50
- package/dist/components/parameters/loadflow/use-load-flow-parameters-form.d.ts +3 -3
- package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +26 -55
- package/dist/components/parameters/short-circuit/constants.d.ts +12 -0
- package/dist/components/parameters/short-circuit/constants.js +16 -1
- package/dist/components/parameters/short-circuit/index.js +5 -2
- package/dist/components/parameters/short-circuit/short-circuit-fields.js +55 -14
- package/dist/components/parameters/short-circuit/short-circuit-parameters-dialog.d.ts +3 -1
- package/dist/components/parameters/short-circuit/short-circuit-parameters-dialog.js +24 -5
- package/dist/components/parameters/short-circuit/short-circuit-parameters-form.js +2 -2
- package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.d.ts +4 -3
- package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.js +22 -29
- package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.d.ts +27 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.js +61 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters.type.d.ts +7 -21
- package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.d.ts +15 -15
- package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.js +120 -127
- package/dist/hooks/use-parameters-backend.d.ts +2 -2
- package/dist/hooks/use-parameters-backend.js +6 -4
- package/dist/hooks/useIntlRef.d.ts +1 -1
- package/dist/hooks/usePrevious.js +1 -1
- package/dist/index.js +13 -7
- package/dist/services/appsMetadata.d.ts +2 -1
- package/dist/services/appsMetadata.js +9 -2
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.js +7 -4
- package/dist/services/short-circuit-analysis.d.ts +3 -0
- package/dist/services/short-circuit-analysis.js +25 -4
- package/dist/services/study.d.ts +1 -3
- package/dist/services/study.js +0 -19
- package/dist/translations/en/parameters.d.ts +3 -0
- package/dist/translations/en/parameters.js +3 -0
- package/dist/translations/fr/parameters.d.ts +3 -0
- package/dist/translations/fr/parameters.js +3 -0
- package/dist/utils/types/loadflow.type.d.ts +1 -1
- package/dist/utils/types/metadata.d.ts +14 -0
- package/dist/utils/types/parameters.type.d.ts +6 -3
- package/package.json +8 -8
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { useForm } from "react-hook-form";
|
|
2
2
|
import { yupResolver } from "@hookform/resolvers/yup";
|
|
3
3
|
import { useState, useCallback, useMemo, useEffect } from "react";
|
|
4
|
-
import { TabValues,
|
|
5
|
-
import {
|
|
6
|
-
import { PROVIDER } from "../common/constant.js";
|
|
4
|
+
import { TabValues, getCommonLoadFlowParametersFormSchema, mapLimitReductions, setLimitReductions } from "./load-flow-parameters-utils.js";
|
|
5
|
+
import { PROVIDER, SPECIFIC_PARAMETERS, COMMON_PARAMETERS, VERSION_PARAMETER } from "../common/constant.js";
|
|
7
6
|
import "react/jsx-runtime";
|
|
8
7
|
import "@mui/material";
|
|
9
8
|
import "react-intl";
|
|
@@ -40,9 +39,10 @@ import "react-querybuilder";
|
|
|
40
39
|
import "../common/widget/parameter-line-slider.js";
|
|
41
40
|
import { getLimitReductionsFormSchema, LIMIT_REDUCTIONS_FORM } from "../common/limitreductions/columns-definitions.js";
|
|
42
41
|
import { toFormValuesLimitReductions } from "../common/limitreductions/limit-reductions-form-util.js";
|
|
43
|
-
import { PARAM_LIMIT_REDUCTION,
|
|
42
|
+
import { PARAM_LIMIT_REDUCTION, PARAM_PROVIDER_OPENLOADFLOW } from "./constants.js";
|
|
44
43
|
import "../../filter/HeaderFilterForm.js";
|
|
45
44
|
import { getNameElementEditorSchema, getNameElementEditorEmptyFormData } from "../common/name-element-editor/name-element-editor-utils.js";
|
|
45
|
+
import { getDefaultSpecificParamsValues, getSpecificParametersFormSchema, getAllSpecificParametersValues, formatSpecificParameters, setSpecificParameters } from "../common/utils.js";
|
|
46
46
|
const useLoadFlowParametersForm = (parametersBackend, enableDeveloperMode, parametersUuid, name, description) => {
|
|
47
47
|
const [
|
|
48
48
|
providers,
|
|
@@ -65,30 +65,21 @@ const useLoadFlowParametersForm = (parametersBackend, enableDeveloperMode, param
|
|
|
65
65
|
const handleTabChange = useCallback((event, newValue) => {
|
|
66
66
|
setSelectedTab(newValue);
|
|
67
67
|
}, []);
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
return getDefaultSpecificParamsValues(specificParams);
|
|
71
|
-
}, [currentProvider, specificParamsDescriptions]);
|
|
72
|
-
const specificParameters = useMemo(() => {
|
|
73
|
-
const specificParams = currentProvider ? specificParamsDescriptions?.[currentProvider] : void 0;
|
|
74
|
-
return specificParams?.map((param) => ({
|
|
75
|
-
name: param.name,
|
|
76
|
-
type: param.type,
|
|
77
|
-
label: param.label,
|
|
78
|
-
description: param.description,
|
|
79
|
-
possibleValues: param.possibleValues,
|
|
80
|
-
defaultValue: param.defaultValue
|
|
81
|
-
}));
|
|
68
|
+
const specificParametersDescriptionForProvider = useMemo(() => {
|
|
69
|
+
return currentProvider && specificParamsDescriptions ? specificParamsDescriptions[currentProvider] : [];
|
|
82
70
|
}, [currentProvider, specificParamsDescriptions]);
|
|
71
|
+
const specificParametersDefaultValues = useMemo(() => {
|
|
72
|
+
return getDefaultSpecificParamsValues(specificParametersDescriptionForProvider);
|
|
73
|
+
}, [specificParametersDescriptionForProvider]);
|
|
83
74
|
const formSchema = useMemo(() => {
|
|
84
75
|
return yup.object({
|
|
85
76
|
[PROVIDER]: yup.string().required(),
|
|
86
77
|
[PARAM_LIMIT_REDUCTION]: yup.number().nullable(),
|
|
87
78
|
...getCommonLoadFlowParametersFormSchema().fields,
|
|
88
79
|
...getLimitReductionsFormSchema(limitReductionNumber).fields,
|
|
89
|
-
...
|
|
80
|
+
...getSpecificParametersFormSchema(specificParametersDescriptionForProvider).fields
|
|
90
81
|
}).concat(getNameElementEditorSchema(name));
|
|
91
|
-
}, [name, limitReductionNumber,
|
|
82
|
+
}, [name, limitReductionNumber, specificParametersDescriptionForProvider]);
|
|
92
83
|
const formMethods = useForm({
|
|
93
84
|
defaultValues: {
|
|
94
85
|
...getNameElementEditorEmptyFormData(name, description),
|
|
@@ -98,7 +89,7 @@ const useLoadFlowParametersForm = (parametersBackend, enableDeveloperMode, param
|
|
|
98
89
|
...params?.commonParameters
|
|
99
90
|
},
|
|
100
91
|
[SPECIFIC_PARAMETERS]: {
|
|
101
|
-
...
|
|
92
|
+
...specificParametersDefaultValues
|
|
102
93
|
},
|
|
103
94
|
[LIMIT_REDUCTIONS_FORM]: []
|
|
104
95
|
},
|
|
@@ -125,17 +116,6 @@ const useLoadFlowParametersForm = (parametersBackend, enableDeveloperMode, param
|
|
|
125
116
|
},
|
|
126
117
|
[defaultLimitReductions, params?.limitReductions, watchProvider]
|
|
127
118
|
);
|
|
128
|
-
const getSpecificParametersPerProvider = (formData, _specificParametersValues) => {
|
|
129
|
-
return Object.keys(formData[SPECIFIC_PARAMETERS]).reduce(
|
|
130
|
-
(acc, key) => {
|
|
131
|
-
if (_specificParametersValues[key].toString() !== formData[SPECIFIC_PARAMETERS][key].toString()) {
|
|
132
|
-
acc[key] = formData[SPECIFIC_PARAMETERS][key].toString();
|
|
133
|
-
}
|
|
134
|
-
return acc;
|
|
135
|
-
},
|
|
136
|
-
{}
|
|
137
|
-
);
|
|
138
|
-
};
|
|
139
119
|
const formatNewParams = useCallback(
|
|
140
120
|
(formData) => {
|
|
141
121
|
return {
|
|
@@ -146,32 +126,20 @@ const useLoadFlowParametersForm = (parametersBackend, enableDeveloperMode, param
|
|
|
146
126
|
// PowSyBl requires that "version" appears first
|
|
147
127
|
...formData[COMMON_PARAMETERS]
|
|
148
128
|
},
|
|
149
|
-
specificParametersPerProvider: {
|
|
150
|
-
[formData.provider]:
|
|
151
|
-
|
|
129
|
+
specificParametersPerProvider: specificParametersDefaultValues ? {
|
|
130
|
+
[formData.provider]: getAllSpecificParametersValues(
|
|
131
|
+
formData,
|
|
132
|
+
specificParametersDefaultValues
|
|
133
|
+
)
|
|
134
|
+
} : {},
|
|
152
135
|
limitReductions: toLimitReductions(formData[LIMIT_REDUCTIONS_FORM])
|
|
153
136
|
};
|
|
154
137
|
},
|
|
155
|
-
[
|
|
138
|
+
[specificParametersDefaultValues, toLimitReductions]
|
|
156
139
|
);
|
|
157
140
|
const toLoadFlowFormValues = useCallback(
|
|
158
141
|
(_params) => {
|
|
159
|
-
const
|
|
160
|
-
const specificParamsPerProvider = _params.specificParametersPerProvider[_params.provider];
|
|
161
|
-
const formatted = specificParams?.reduce((acc, param) => {
|
|
162
|
-
if (specificParamsPerProvider && Object.prototype.hasOwnProperty.call(specificParamsPerProvider, param.name)) {
|
|
163
|
-
if (param.type === ParameterType.BOOLEAN) {
|
|
164
|
-
acc[param.name] = specificParamsPerProvider[param.name] === "true";
|
|
165
|
-
} else if (param.type === ParameterType.STRING_LIST) {
|
|
166
|
-
acc[param.name] = specificParamsPerProvider[param.name] !== "" ? specificParamsPerProvider[param.name].split(",") : [];
|
|
167
|
-
} else {
|
|
168
|
-
acc[param.name] = specificParamsPerProvider[param.name];
|
|
169
|
-
}
|
|
170
|
-
} else {
|
|
171
|
-
acc[param.name] = getDefaultSpecificParamsValues([param])[param.name];
|
|
172
|
-
}
|
|
173
|
-
return acc;
|
|
174
|
-
}, {});
|
|
142
|
+
const specificParamsListForCurrentProvider = _params.specificParametersPerProvider[_params.provider];
|
|
175
143
|
return {
|
|
176
144
|
[PROVIDER]: _params.provider,
|
|
177
145
|
[PARAM_LIMIT_REDUCTION]: _params.limitReduction,
|
|
@@ -179,12 +147,15 @@ const useLoadFlowParametersForm = (parametersBackend, enableDeveloperMode, param
|
|
|
179
147
|
..._params.commonParameters
|
|
180
148
|
},
|
|
181
149
|
[SPECIFIC_PARAMETERS]: {
|
|
182
|
-
...
|
|
150
|
+
...formatSpecificParameters(
|
|
151
|
+
specificParametersDescriptionForProvider,
|
|
152
|
+
specificParamsListForCurrentProvider
|
|
153
|
+
)
|
|
183
154
|
},
|
|
184
155
|
...toFormValuesLimitReductions(_params.limitReductions)
|
|
185
156
|
};
|
|
186
157
|
},
|
|
187
|
-
[
|
|
158
|
+
[specificParametersDescriptionForProvider]
|
|
188
159
|
);
|
|
189
160
|
const paramsLoaded = useMemo(() => !!params && !!currentProvider, [currentProvider, params]);
|
|
190
161
|
const formattedProviders = useMemo(() => {
|
|
@@ -266,7 +237,7 @@ const useLoadFlowParametersForm = (parametersBackend, enableDeveloperMode, param
|
|
|
266
237
|
handleTabChange,
|
|
267
238
|
tabIndexesWithError,
|
|
268
239
|
formattedProviders,
|
|
269
|
-
|
|
240
|
+
specificParametersDescriptionForProvider,
|
|
270
241
|
defaultLimitReductions,
|
|
271
242
|
toLoadFlowFormValues,
|
|
272
243
|
formatNewParams,
|
|
@@ -21,6 +21,8 @@ export declare const SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS = "withVSCConvert
|
|
|
21
21
|
export declare const SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS = "withShuntCompensators";
|
|
22
22
|
export declare const SHORT_CIRCUIT_WITH_NEUTRAL_POSITION = "withNeutralPosition";
|
|
23
23
|
export declare const SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE = "initialVoltageProfileMode";
|
|
24
|
+
export declare const SHORT_CIRCUIT_VOLTAGE_RANGES = "voltageRanges";
|
|
25
|
+
export declare const SHORT_CIRCUIT_ONLY_STARTED_GENERATORS = "onlyStartedGenerators";
|
|
24
26
|
export declare const intlPredefinedParametersOptions: () => {
|
|
25
27
|
id: string;
|
|
26
28
|
label: string;
|
|
@@ -35,3 +37,13 @@ export declare const intlInitialVoltageProfileMode: () => {
|
|
|
35
37
|
label: string;
|
|
36
38
|
};
|
|
37
39
|
};
|
|
40
|
+
export declare const onlyStartedGeneratorsOptions: {
|
|
41
|
+
ALL: {
|
|
42
|
+
id: string;
|
|
43
|
+
label: string;
|
|
44
|
+
};
|
|
45
|
+
STARTED: {
|
|
46
|
+
id: string;
|
|
47
|
+
label: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -17,6 +17,8 @@ const SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS = "withVSCConverterStations";
|
|
|
17
17
|
const SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS = "withShuntCompensators";
|
|
18
18
|
const SHORT_CIRCUIT_WITH_NEUTRAL_POSITION = "withNeutralPosition";
|
|
19
19
|
const SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE = "initialVoltageProfileMode";
|
|
20
|
+
const SHORT_CIRCUIT_VOLTAGE_RANGES = "voltageRanges";
|
|
21
|
+
const SHORT_CIRCUIT_ONLY_STARTED_GENERATORS = "onlyStartedGenerators";
|
|
20
22
|
const intlPredefinedParametersOptions = () => [
|
|
21
23
|
{
|
|
22
24
|
id: "ICC_MAX_WITH_NOMINAL_VOLTAGE_MAP",
|
|
@@ -43,16 +45,29 @@ const intlInitialVoltageProfileMode = () => {
|
|
|
43
45
|
}
|
|
44
46
|
};
|
|
45
47
|
};
|
|
48
|
+
const onlyStartedGeneratorsOptions = {
|
|
49
|
+
ALL: {
|
|
50
|
+
id: "false",
|
|
51
|
+
label: "ShortCircuitAllLabel"
|
|
52
|
+
},
|
|
53
|
+
STARTED: {
|
|
54
|
+
id: "true",
|
|
55
|
+
label: "ShortCircuitStartedLabel"
|
|
56
|
+
}
|
|
57
|
+
};
|
|
46
58
|
export {
|
|
47
59
|
InitialVoltage,
|
|
48
60
|
PredefinedParameters,
|
|
49
61
|
SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE,
|
|
62
|
+
SHORT_CIRCUIT_ONLY_STARTED_GENERATORS,
|
|
50
63
|
SHORT_CIRCUIT_PREDEFINED_PARAMS,
|
|
64
|
+
SHORT_CIRCUIT_VOLTAGE_RANGES,
|
|
51
65
|
SHORT_CIRCUIT_WITH_FEEDER_RESULT,
|
|
52
66
|
SHORT_CIRCUIT_WITH_LOADS,
|
|
53
67
|
SHORT_CIRCUIT_WITH_NEUTRAL_POSITION,
|
|
54
68
|
SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS,
|
|
55
69
|
SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS,
|
|
56
70
|
intlInitialVoltageProfileMode,
|
|
57
|
-
intlPredefinedParametersOptions
|
|
71
|
+
intlPredefinedParametersOptions,
|
|
72
|
+
onlyStartedGeneratorsOptions
|
|
58
73
|
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { InitialVoltage, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, intlInitialVoltageProfileMode, intlPredefinedParametersOptions } from "./constants.js";
|
|
1
|
+
import { InitialVoltage, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_VOLTAGE_RANGES, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, intlInitialVoltageProfileMode, intlPredefinedParametersOptions, onlyStartedGeneratorsOptions } from "./constants.js";
|
|
2
2
|
import { ShortCircuitParametersInLine } from "./short-circuit-parameters-inline.js";
|
|
3
3
|
import { ShortCircuitParametersEditionDialog } from "./short-circuit-parameters-dialog.js";
|
|
4
4
|
export {
|
|
5
5
|
InitialVoltage,
|
|
6
6
|
PredefinedParameters,
|
|
7
7
|
SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE,
|
|
8
|
+
SHORT_CIRCUIT_ONLY_STARTED_GENERATORS,
|
|
8
9
|
SHORT_CIRCUIT_PREDEFINED_PARAMS,
|
|
10
|
+
SHORT_CIRCUIT_VOLTAGE_RANGES,
|
|
9
11
|
SHORT_CIRCUIT_WITH_FEEDER_RESULT,
|
|
10
12
|
SHORT_CIRCUIT_WITH_LOADS,
|
|
11
13
|
SHORT_CIRCUIT_WITH_NEUTRAL_POSITION,
|
|
@@ -14,5 +16,6 @@ export {
|
|
|
14
16
|
ShortCircuitParametersEditionDialog,
|
|
15
17
|
ShortCircuitParametersInLine,
|
|
16
18
|
intlInitialVoltageProfileMode,
|
|
17
|
-
intlPredefinedParametersOptions
|
|
19
|
+
intlPredefinedParametersOptions,
|
|
20
|
+
onlyStartedGeneratorsOptions
|
|
18
21
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useMemo, useEffect } from "react";
|
|
3
3
|
import { Grid } from "@mui/material";
|
|
4
4
|
import { green, red } from "@mui/material/colors";
|
|
5
5
|
import { Lens } from "@mui/icons-material";
|
|
6
6
|
import { useWatch, useFormContext } from "react-hook-form";
|
|
7
|
-
import { SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, intlPredefinedParametersOptions, PredefinedParameters, intlInitialVoltageProfileMode, InitialVoltage, SHORT_CIRCUIT_WITH_FEEDER_RESULT } from "./constants.js";
|
|
7
|
+
import { SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, intlPredefinedParametersOptions, PredefinedParameters, intlInitialVoltageProfileMode, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS, onlyStartedGeneratorsOptions, InitialVoltage, SHORT_CIRCUIT_WITH_FEEDER_RESULT } from "./constants.js";
|
|
8
8
|
import { VoltageTable } from "./short-circuit-voltage-table.js";
|
|
9
9
|
import GridItem from "../../grid/grid-item.js";
|
|
10
10
|
import GridSection from "../../grid/grid-section.js";
|
|
@@ -37,6 +37,11 @@ import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
|
37
37
|
import "uuid";
|
|
38
38
|
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
39
39
|
import "react-querybuilder";
|
|
40
|
+
import { COMMON_PARAMETERS, SPECIFIC_PARAMETERS } from "../common/constant.js";
|
|
41
|
+
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
42
|
+
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
43
|
+
import "../common/widget/parameter-line-slider.js";
|
|
44
|
+
import "../common/limitreductions/columns-definitions.js";
|
|
40
45
|
var Status = /* @__PURE__ */ ((Status2) => {
|
|
41
46
|
Status2["SUCCESS"] = "SUCCESS";
|
|
42
47
|
Status2["ERROR"] = "ERROR";
|
|
@@ -48,23 +53,30 @@ function ShortCircuitFields({ resetAll, enableDeveloperMode = true }) {
|
|
|
48
53
|
/* SUCCESS */
|
|
49
54
|
);
|
|
50
55
|
const watchInitialVoltageProfileMode = useWatch({
|
|
51
|
-
name: SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE
|
|
56
|
+
name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE}`
|
|
52
57
|
});
|
|
53
58
|
const watchPredefinedParams = useWatch({
|
|
54
59
|
name: SHORT_CIRCUIT_PREDEFINED_PARAMS
|
|
55
60
|
});
|
|
56
61
|
const watchLoads = useWatch({
|
|
57
|
-
name: SHORT_CIRCUIT_WITH_LOADS
|
|
62
|
+
name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_WITH_LOADS}`
|
|
58
63
|
});
|
|
59
64
|
const watchShuntCompensators = useWatch({
|
|
60
|
-
name: SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS
|
|
65
|
+
name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS}`
|
|
61
66
|
});
|
|
62
67
|
const watchVSC = useWatch({
|
|
63
|
-
name: SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS
|
|
68
|
+
name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS}`
|
|
64
69
|
});
|
|
65
70
|
const watchNeutralPosition = useWatch({
|
|
66
|
-
name: SHORT_CIRCUIT_WITH_NEUTRAL_POSITION
|
|
71
|
+
name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_WITH_NEUTRAL_POSITION}`
|
|
67
72
|
});
|
|
73
|
+
const watchSpecificParameters = useWatch({
|
|
74
|
+
name: `${SPECIFIC_PARAMETERS}`
|
|
75
|
+
});
|
|
76
|
+
const isThereSpecificParameters = useMemo(
|
|
77
|
+
() => Object.keys(watchSpecificParameters).length > 0 && watchSpecificParameters.constructor === Object,
|
|
78
|
+
[watchSpecificParameters]
|
|
79
|
+
);
|
|
68
80
|
const isIccMinFeaturesDefaultConfiguration = useMemo(() => {
|
|
69
81
|
return !watchLoads && !watchShuntCompensators && !watchVSC && !watchNeutralPosition;
|
|
70
82
|
}, [watchLoads, watchShuntCompensators, watchVSC, watchNeutralPosition]);
|
|
@@ -104,7 +116,7 @@ function ShortCircuitFields({ resetAll, enableDeveloperMode = true }) {
|
|
|
104
116
|
}, [enableDeveloperMode, watchPredefinedParams, setValue]);
|
|
105
117
|
const feederResult = /* @__PURE__ */ jsxs(Grid, { container: true, alignItems: "center", spacing: 2, direction: "row", children: [
|
|
106
118
|
/* @__PURE__ */ jsx(Grid, { item: true, xs: 10, children: /* @__PURE__ */ jsx(FieldLabel, { label: "descWithFeederResult" }) }),
|
|
107
|
-
/* @__PURE__ */ jsx(Grid, { item: true, xs: 2, children: /* @__PURE__ */ jsx(SwitchInput, { name: SHORT_CIRCUIT_WITH_FEEDER_RESULT }) })
|
|
119
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 2, children: /* @__PURE__ */ jsx(SwitchInput, { name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_WITH_FEEDER_RESULT}` }) })
|
|
108
120
|
] });
|
|
109
121
|
const predefinedParameters = /* @__PURE__ */ jsx(
|
|
110
122
|
MuiSelectInput,
|
|
@@ -118,14 +130,39 @@ function ShortCircuitFields({ resetAll, enableDeveloperMode = true }) {
|
|
|
118
130
|
const initialVoltageProfileModeField = /* @__PURE__ */ jsx(
|
|
119
131
|
RadioInput,
|
|
120
132
|
{
|
|
121
|
-
name: SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE
|
|
133
|
+
name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE}`,
|
|
122
134
|
options: Object.values(initialVoltageProfileMode)
|
|
123
135
|
}
|
|
124
136
|
);
|
|
125
|
-
const loads = /* @__PURE__ */ jsx(CheckboxInput, { name: SHORT_CIRCUIT_WITH_LOADS
|
|
126
|
-
const vsc = /* @__PURE__ */ jsx(
|
|
127
|
-
|
|
128
|
-
|
|
137
|
+
const loads = /* @__PURE__ */ jsx(CheckboxInput, { name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_WITH_LOADS}`, label: "shortCircuitLoads" });
|
|
138
|
+
const vsc = /* @__PURE__ */ jsx(
|
|
139
|
+
CheckboxInput,
|
|
140
|
+
{
|
|
141
|
+
name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS}`,
|
|
142
|
+
label: "shortCircuitHvdc"
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
const shuntCompensators = /* @__PURE__ */ jsx(
|
|
146
|
+
CheckboxInput,
|
|
147
|
+
{
|
|
148
|
+
name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS}`,
|
|
149
|
+
label: "shortCircuitShuntCompensators"
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
const neutralPosition = /* @__PURE__ */ jsx(
|
|
153
|
+
CheckboxInput,
|
|
154
|
+
{
|
|
155
|
+
name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_WITH_NEUTRAL_POSITION}`,
|
|
156
|
+
label: "shortCircuitNeutralPosition"
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
const onlyStartedGenerators = /* @__PURE__ */ jsx(
|
|
160
|
+
RadioInput,
|
|
161
|
+
{
|
|
162
|
+
name: `${SPECIFIC_PARAMETERS}.${SHORT_CIRCUIT_ONLY_STARTED_GENERATORS}`,
|
|
163
|
+
options: Object.values(onlyStartedGeneratorsOptions)
|
|
164
|
+
}
|
|
165
|
+
);
|
|
129
166
|
useEffect(() => {
|
|
130
167
|
const isIccMaxWithNominalVoltageMap = watchPredefinedParams === PredefinedParameters.ICC_MAX_WITH_NOMINAL_VOLTAGE_MAP;
|
|
131
168
|
const isIccMinWithNominal = watchPredefinedParams === PredefinedParameters.ICC_MIN_WITH_NOMINAL_VOLTAGE_MAP;
|
|
@@ -165,7 +202,11 @@ function ShortCircuitFields({ resetAll, enableDeveloperMode = true }) {
|
|
|
165
202
|
] }),
|
|
166
203
|
/* @__PURE__ */ jsx(GridSection, { title: "ShortCircuitVoltageProfileMode", heading: 4 }),
|
|
167
204
|
/* @__PURE__ */ jsx(Grid, { container: true, children: /* @__PURE__ */ jsx(GridItem, { size: 12, children: initialVoltageProfileModeField }) }),
|
|
168
|
-
/* @__PURE__ */ jsx(VoltageTable, { voltageProfileMode: watchInitialVoltageProfileMode })
|
|
205
|
+
/* @__PURE__ */ jsx(VoltageTable, { voltageProfileMode: watchInitialVoltageProfileMode }),
|
|
206
|
+
isThereSpecificParameters && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
207
|
+
/* @__PURE__ */ jsx(GridSection, { title: "ShortCircuitStartedGeneratorsMode", heading: 4 }),
|
|
208
|
+
/* @__PURE__ */ jsx(Grid, { container: true, children: /* @__PURE__ */ jsx(GridItem, { size: 12, children: onlyStartedGenerators }) })
|
|
209
|
+
] })
|
|
169
210
|
] });
|
|
170
211
|
}
|
|
171
212
|
export {
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { ParametersEditionDialogProps } from '../common';
|
|
2
|
-
export declare function ShortCircuitParametersEditionDialog({ id, open, onClose, titleId, name, description, activeDirectory, language, enableDeveloperMode, }: Readonly<ParametersEditionDialogProps
|
|
2
|
+
export declare function ShortCircuitParametersEditionDialog({ id, open, onClose, titleId, name, description, activeDirectory, user, language, enableDeveloperMode, }: Readonly<ParametersEditionDialogProps & {
|
|
3
|
+
enableDeveloperMode: boolean;
|
|
4
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,11 +13,13 @@ import "notistack";
|
|
|
13
13
|
import "../../../utils/conversionUtils.js";
|
|
14
14
|
import "../../../utils/types/equipmentType.js";
|
|
15
15
|
import "../../../utils/yupConfig.js";
|
|
16
|
+
import { getShortCircuitSpecificParametersDescription, updateShortCircuitParameters, fetchShortCircuitParameters } from "../../../services/short-circuit-analysis.js";
|
|
16
17
|
import { NameElementEditorForm } from "../common/name-element-editor/name-element-editor-form.js";
|
|
17
18
|
import "../../overflowableText/OverflowableText.js";
|
|
18
19
|
import "localized-countries";
|
|
19
20
|
import "localized-countries/data/fr";
|
|
20
21
|
import "localized-countries/data/en";
|
|
22
|
+
import { useParametersBackend, OptionalServicesStatus } from "../../../hooks/use-parameters-backend.js";
|
|
21
23
|
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
22
24
|
import "yup";
|
|
23
25
|
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
@@ -34,6 +36,9 @@ import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
|
34
36
|
import "react-querybuilder";
|
|
35
37
|
import { useShortCircuitParametersForm } from "./use-short-circuit-parameters-form.js";
|
|
36
38
|
import { ShortCircuitParametersForm } from "./short-circuit-parameters-form.js";
|
|
39
|
+
import { ComputingType } from "../common/computing-type.js";
|
|
40
|
+
import "../common/widget/parameter-line-slider.js";
|
|
41
|
+
import "../common/limitreductions/columns-definitions.js";
|
|
37
42
|
function ShortCircuitParametersEditionDialog({
|
|
38
43
|
id,
|
|
39
44
|
open,
|
|
@@ -42,15 +47,28 @@ function ShortCircuitParametersEditionDialog({
|
|
|
42
47
|
name,
|
|
43
48
|
description,
|
|
44
49
|
activeDirectory,
|
|
50
|
+
user,
|
|
45
51
|
language,
|
|
46
52
|
enableDeveloperMode
|
|
47
53
|
}) {
|
|
54
|
+
const parametersBackend = useParametersBackend(
|
|
55
|
+
user,
|
|
56
|
+
id,
|
|
57
|
+
ComputingType.SHORT_CIRCUIT,
|
|
58
|
+
OptionalServicesStatus.Up,
|
|
59
|
+
null,
|
|
60
|
+
null,
|
|
61
|
+
null,
|
|
62
|
+
null,
|
|
63
|
+
fetchShortCircuitParameters,
|
|
64
|
+
updateShortCircuitParameters,
|
|
65
|
+
getShortCircuitSpecificParametersDescription
|
|
66
|
+
);
|
|
48
67
|
const shortCircuitMethods = useShortCircuitParametersForm({
|
|
68
|
+
parametersBackend,
|
|
49
69
|
parametersUuid: id,
|
|
50
70
|
name,
|
|
51
|
-
description
|
|
52
|
-
studyUuid: null,
|
|
53
|
-
studyShortCircuitParameters: null
|
|
71
|
+
description
|
|
54
72
|
});
|
|
55
73
|
const {
|
|
56
74
|
formState: { errors, dirtyFields }
|
|
@@ -62,6 +80,7 @@ function ShortCircuitParametersEditionDialog({
|
|
|
62
80
|
open,
|
|
63
81
|
onClose,
|
|
64
82
|
onSave: shortCircuitMethods.onSaveDialog,
|
|
83
|
+
onValidationError: shortCircuitMethods.onValidationError,
|
|
65
84
|
formSchema: shortCircuitMethods.formSchema,
|
|
66
85
|
formMethods: shortCircuitMethods.formMethods,
|
|
67
86
|
titleId,
|
|
@@ -72,6 +91,7 @@ function ShortCircuitParametersEditionDialog({
|
|
|
72
91
|
ShortCircuitParametersForm,
|
|
73
92
|
{
|
|
74
93
|
shortCircuitMethods,
|
|
94
|
+
enableDeveloperMode,
|
|
75
95
|
renderTitleFields: () => {
|
|
76
96
|
return /* @__PURE__ */ jsx(
|
|
77
97
|
NameElementEditorForm,
|
|
@@ -81,8 +101,7 @@ function ShortCircuitParametersEditionDialog({
|
|
|
81
101
|
elementType: ElementType.SHORT_CIRCUIT_PARAMETERS
|
|
82
102
|
}
|
|
83
103
|
);
|
|
84
|
-
}
|
|
85
|
-
enableDeveloperMode: enableDeveloperMode ?? false
|
|
104
|
+
}
|
|
86
105
|
}
|
|
87
106
|
)
|
|
88
107
|
}
|
|
@@ -35,7 +35,7 @@ function ShortCircuitParametersForm({
|
|
|
35
35
|
renderActions,
|
|
36
36
|
enableDeveloperMode
|
|
37
37
|
}) {
|
|
38
|
-
const { formMethods, formSchema,
|
|
38
|
+
const { formMethods, formSchema, paramsLoaded, resetAll } = shortCircuitMethods;
|
|
39
39
|
return /* @__PURE__ */ jsx(CustomFormProvider, { validationSchema: formSchema, ...formMethods, removeOptional: true, children: /* @__PURE__ */ jsxs(
|
|
40
40
|
Box,
|
|
41
41
|
{
|
|
@@ -47,7 +47,7 @@ function ShortCircuitParametersForm({
|
|
|
47
47
|
},
|
|
48
48
|
children: [
|
|
49
49
|
/* @__PURE__ */ jsx(Grid, { item: true, container: true, direction: "column", children: renderTitleFields?.() }),
|
|
50
|
-
|
|
50
|
+
paramsLoaded ? /* @__PURE__ */ jsx(Grid, { sx: parametersStyles.scrollableGrid, children: /* @__PURE__ */ jsx(ShortCircuitFields, { enableDeveloperMode, resetAll }) }) : /* @__PURE__ */ jsx(LinearProgress, {}),
|
|
51
51
|
/* @__PURE__ */ jsx(
|
|
52
52
|
Grid,
|
|
53
53
|
{
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { UUID } from 'node:crypto';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { UseParametersBackendReturnProps } from '../../../utils';
|
|
3
|
+
import { ComputingType } from '../common';
|
|
4
|
+
export declare function ShortCircuitParametersInLine({ studyUuid, setHaveDirtyFields, parametersBackend, enableDeveloperMode, }: Readonly<{
|
|
4
5
|
studyUuid: UUID | null;
|
|
5
6
|
setHaveDirtyFields: (isDirty: boolean) => void;
|
|
6
|
-
|
|
7
|
+
parametersBackend: UseParametersBackendReturnProps<ComputingType.SHORT_CIRCUIT>;
|
|
7
8
|
enableDeveloperMode: boolean;
|
|
8
9
|
}>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,6 +8,7 @@ import { snackWithFallback } from "../../../utils/error.js";
|
|
|
8
8
|
import "@mui/icons-material";
|
|
9
9
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
10
10
|
import "../../../utils/yupConfig.js";
|
|
11
|
+
import { fetchShortCircuitParameters } from "../../../services/short-circuit-analysis.js";
|
|
11
12
|
import "localized-countries";
|
|
12
13
|
import "localized-countries/data/fr";
|
|
13
14
|
import "localized-countries/data/en";
|
|
@@ -34,60 +35,42 @@ import { LabelledButton } from "../common/parameters.js";
|
|
|
34
35
|
import { CreateParameterDialog } from "../common/parameters-creation-dialog.js";
|
|
35
36
|
import "../common/widget/parameter-line-slider.js";
|
|
36
37
|
import "../common/limitreductions/columns-definitions.js";
|
|
37
|
-
import { SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, InitialVoltage } from "./constants.js";
|
|
38
|
-
import { fetchShortCircuitParameters } from "../../../services/short-circuit-analysis.js";
|
|
39
38
|
import { ShortCircuitParametersForm } from "./short-circuit-parameters-form.js";
|
|
40
39
|
import { useShortCircuitParametersForm } from "./use-short-circuit-parameters-form.js";
|
|
41
40
|
function ShortCircuitParametersInLine({
|
|
42
41
|
studyUuid,
|
|
43
42
|
setHaveDirtyFields,
|
|
44
|
-
|
|
43
|
+
parametersBackend,
|
|
45
44
|
enableDeveloperMode
|
|
46
45
|
}) {
|
|
47
46
|
const shortCircuitMethods = useShortCircuitParametersForm({
|
|
47
|
+
parametersBackend,
|
|
48
48
|
parametersUuid: null,
|
|
49
49
|
name: null,
|
|
50
|
-
description: null
|
|
51
|
-
studyUuid,
|
|
52
|
-
studyShortCircuitParameters: shortCircuitParameters
|
|
50
|
+
description: null
|
|
53
51
|
});
|
|
54
52
|
const intl = useIntl();
|
|
55
53
|
const [openCreateParameterDialog, setOpenCreateParameterDialog] = useState(false);
|
|
56
54
|
const [openSelectParameterDialog, setOpenSelectParameterDialog] = useState(false);
|
|
57
55
|
const { snackError } = useSnackMessage();
|
|
58
|
-
const {
|
|
59
|
-
const {
|
|
60
|
-
const replaceFormValues = useCallback(
|
|
61
|
-
(param) => {
|
|
62
|
-
const dirty = { shouldDirty: true };
|
|
63
|
-
setValue(SHORT_CIRCUIT_WITH_FEEDER_RESULT, param.parameters.withFeederResult, dirty);
|
|
64
|
-
setValue(SHORT_CIRCUIT_PREDEFINED_PARAMS, param.predefinedParameters, dirty);
|
|
65
|
-
setValue(SHORT_CIRCUIT_WITH_LOADS, param.parameters.withLoads, dirty);
|
|
66
|
-
setValue(SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, param.parameters.withVSCConverterStations, dirty);
|
|
67
|
-
setValue(SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, param.parameters.withShuntCompensators, dirty);
|
|
68
|
-
setValue(SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, !param.parameters.withNeutralPosition, dirty);
|
|
69
|
-
setValue(
|
|
70
|
-
SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE,
|
|
71
|
-
param.parameters.initialVoltageProfileMode === InitialVoltage.CONFIGURED ? InitialVoltage.CEI909 : param.parameters.initialVoltageProfileMode,
|
|
72
|
-
dirty
|
|
73
|
-
);
|
|
74
|
-
},
|
|
75
|
-
[setValue]
|
|
76
|
-
);
|
|
56
|
+
const { formMethods } = shortCircuitMethods;
|
|
57
|
+
const { getValues, formState, handleSubmit, reset } = formMethods;
|
|
77
58
|
const handleLoadParameters = useCallback(
|
|
78
59
|
(newParams) => {
|
|
79
60
|
if (newParams?.length) {
|
|
80
61
|
setOpenSelectParameterDialog(false);
|
|
81
62
|
const paramUuid = newParams[0].id;
|
|
82
63
|
fetchShortCircuitParameters(paramUuid).then((parameters) => {
|
|
83
|
-
|
|
64
|
+
reset(shortCircuitMethods.toShortCircuitFormValues(parameters), {
|
|
65
|
+
keepDefaultValues: true
|
|
66
|
+
});
|
|
84
67
|
}).catch((error) => {
|
|
85
68
|
snackWithFallback(snackError, error, { headerId: "paramsRetrievingError" });
|
|
86
69
|
});
|
|
87
70
|
}
|
|
88
71
|
setOpenSelectParameterDialog(false);
|
|
89
72
|
},
|
|
90
|
-
[snackError,
|
|
73
|
+
[snackError, shortCircuitMethods, reset]
|
|
91
74
|
);
|
|
92
75
|
useEffect(() => {
|
|
93
76
|
setHaveDirtyFields(!!Object.keys(formState.dirtyFields).length);
|
|
@@ -108,7 +91,17 @@ function ShortCircuitParametersInLine({
|
|
|
108
91
|
}
|
|
109
92
|
),
|
|
110
93
|
/* @__PURE__ */ jsx(LabelledButton, { callback: () => setOpenCreateParameterDialog(true), label: "save" }),
|
|
111
|
-
/* @__PURE__ */ jsx(
|
|
94
|
+
/* @__PURE__ */ jsx(
|
|
95
|
+
SubmitButton,
|
|
96
|
+
{
|
|
97
|
+
onClick: handleSubmit(
|
|
98
|
+
shortCircuitMethods.onSaveInline,
|
|
99
|
+
shortCircuitMethods.onValidationError
|
|
100
|
+
),
|
|
101
|
+
variant: "outlined",
|
|
102
|
+
children: /* @__PURE__ */ jsx(FormattedMessage, { id: "validate" })
|
|
103
|
+
}
|
|
104
|
+
)
|
|
112
105
|
] }),
|
|
113
106
|
openCreateParameterDialog && /* @__PURE__ */ jsx(
|
|
114
107
|
CreateParameterDialog,
|
|
@@ -116,7 +109,7 @@ function ShortCircuitParametersInLine({
|
|
|
116
109
|
studyUuid,
|
|
117
110
|
open: openCreateParameterDialog,
|
|
118
111
|
onClose: () => setOpenCreateParameterDialog(false),
|
|
119
|
-
parameterValues: () =>
|
|
112
|
+
parameterValues: () => shortCircuitMethods.formatNewParams(getValues()),
|
|
120
113
|
parameterFormatter: (newParams) => newParams,
|
|
121
114
|
parameterType: ElementType.SHORT_CIRCUIT_PARAMETERS
|
|
122
115
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { InitialVoltage, PredefinedParameters } from './constants';
|
|
2
|
+
import { default as yup } from '../../../utils/yupConfig';
|
|
3
|
+
import { SpecificParametersValues } from '../../../utils';
|
|
4
|
+
export declare const getCommonShortCircuitParametersFormSchema: () => yup.ObjectSchema<{
|
|
5
|
+
commonParameters: {
|
|
6
|
+
withFeederResult: NonNullable<boolean | undefined>;
|
|
7
|
+
withLoads: NonNullable<boolean | undefined>;
|
|
8
|
+
withVSCConverterStations: NonNullable<boolean | undefined>;
|
|
9
|
+
withShuntCompensators: NonNullable<boolean | undefined>;
|
|
10
|
+
withNeutralPosition: NonNullable<boolean | undefined>;
|
|
11
|
+
initialVoltageProfileMode: NonNullable<InitialVoltage | undefined>;
|
|
12
|
+
};
|
|
13
|
+
}, yup.AnyObject, {
|
|
14
|
+
commonParameters: {
|
|
15
|
+
withFeederResult: undefined;
|
|
16
|
+
withLoads: undefined;
|
|
17
|
+
withVSCConverterStations: undefined;
|
|
18
|
+
withShuntCompensators: undefined;
|
|
19
|
+
withNeutralPosition: undefined;
|
|
20
|
+
initialVoltageProfileMode: undefined;
|
|
21
|
+
};
|
|
22
|
+
}, "">;
|
|
23
|
+
export declare const resetSpecificParameters: (specificDefaultValues: SpecificParametersValues, predefinedParameter: PredefinedParameters) => {
|
|
24
|
+
onlyStartedGenerators: boolean;
|
|
25
|
+
} | {
|
|
26
|
+
[x: string]: any;
|
|
27
|
+
};
|