@gridsuite/commons-ui 0.142.0 → 0.144.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/dialogs/elementSaveDialog/ElementSaveDialog.js +1 -1
- package/dist/components/dnd-table/dnd-table-add-rows-dialog.js +2 -2
- package/dist/components/dnd-table/dnd-table.js +3 -3
- package/dist/components/index.js +6 -3
- package/dist/components/inputs/reactHookForm/DirectoryItemsInput.d.ts +2 -1
- package/dist/components/inputs/reactHookForm/DirectoryItemsInput.js +118 -75
- package/dist/components/inputs/reactHookForm/OverflowableChip.d.ts +3 -2
- package/dist/components/inputs/reactHookForm/OverflowableChip.js +5 -5
- package/dist/components/inputs/reactHookForm/OverflowableChipWithHelperText.d.ts +1 -1
- package/dist/components/inputs/reactHookForm/OverflowableChipWithHelperText.js +20 -4
- package/dist/components/inputs/reactHookForm/selectInputs/SelectInput.js +3 -1
- package/dist/components/inputs/reactHookForm/text/DescriptionField.d.ts +3 -1
- package/dist/components/inputs/reactHookForm/text/DescriptionField.js +13 -4
- package/dist/components/overflowableText/OverflowableText.js +9 -1
- package/dist/components/parameters/common/ProviderParam.js +3 -3
- 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/limitreductions/limit-reduction-table-cell.js +3 -3
- package/dist/components/parameters/common/limitreductions/limit-reductions-table-form.js +2 -2
- package/dist/components/parameters/common/name-element-editor/name-element-editor-utils.js +3 -3
- package/dist/components/parameters/common/utils.d.ts +14 -0
- package/dist/components/parameters/common/utils.js +89 -0
- package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-cell.js +3 -3
- package/dist/components/parameters/common/widget/parameter-float.js +3 -3
- package/dist/components/parameters/common/widget/parameter-line-directory-items-input.js +3 -3
- package/dist/components/parameters/common/widget/parameter-line-slider.js +3 -3
- 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 +7 -3
- package/dist/components/parameters/loadflow/load-flow-parameter-field.js +3 -3
- package/dist/components/parameters/loadflow/load-flow-parameters-form.js +5 -5
- package/dist/components/parameters/loadflow/load-flow-parameters-header.js +3 -3
- 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 +33 -59
- package/dist/components/parameters/network-visualizations/network-area-diagram-parameters.js +3 -3
- package/dist/components/parameters/network-visualizations/network-visualizations-form.js +2 -2
- package/dist/components/parameters/network-visualizations/use-network-visualizations-parameters-form.js +1 -1
- package/dist/components/parameters/pcc-min/pcc-min-form-utils.js +3 -3
- package/dist/components/parameters/pcc-min/pcc-min-parameters-form.js +3 -3
- package/dist/components/parameters/security-analysis/security-analysis-parameters-form.js +3 -3
- package/dist/components/parameters/security-analysis/security-analysis-violations-hiding.js +3 -3
- package/dist/components/parameters/sensi/sensitivity-Flow-parameters.js +3 -3
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +3 -3
- package/dist/components/parameters/sensi/sensitivity-table.js +1 -1
- package/dist/components/parameters/sensi/table-cell.js +3 -3
- 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 +56 -15
- 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 +5 -5
- 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 +121 -128
- package/dist/components/parameters/voltage-init/equipment-selection-parameters.js +3 -3
- package/dist/components/parameters/voltage-init/use-voltage-init-parameters-form.js +1 -1
- package/dist/components/parameters/voltage-init/voltage-init-form-utils.js +3 -3
- package/dist/components/parameters/voltage-init/voltage-init-parameters-form.js +3 -3
- package/dist/hooks/use-parameters-backend.d.ts +2 -2
- package/dist/hooks/use-parameters-backend.js +6 -4
- package/dist/index.js +13 -7
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.js +6 -5
- 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/services/utils.d.ts +0 -4
- package/dist/services/utils.js +4 -10
- package/dist/translations/en/businessErrorsEn.d.ts +17 -0
- package/dist/translations/en/businessErrorsEn.js +20 -3
- package/dist/translations/en/inputsEn.d.ts +1 -1
- package/dist/translations/en/inputsEn.js +1 -1
- package/dist/translations/en/parameters.d.ts +3 -0
- package/dist/translations/en/parameters.js +3 -0
- package/dist/translations/fr/businessErrorsFr.d.ts +17 -0
- package/dist/translations/fr/businessErrorsFr.js +20 -3
- package/dist/translations/fr/inputsFr.d.ts +1 -1
- package/dist/translations/fr/inputsFr.js +1 -1
- package/dist/translations/fr/parameters.d.ts +3 -0
- package/dist/translations/fr/parameters.js +3 -0
- package/dist/utils/error.js +8 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/types/NetworkTimeoutError.d.ts +10 -0
- package/dist/utils/types/NetworkTimeoutError.js +9 -0
- package/dist/utils/types/index.d.ts +1 -0
- package/dist/utils/types/index.js +2 -0
- package/dist/utils/types/loadflow.type.d.ts +1 -1
- package/dist/utils/types/parameters.type.d.ts +6 -3
- package/package.json +2 -2
|
@@ -6,13 +6,12 @@ import "react/jsx-runtime";
|
|
|
6
6
|
import "react-intl";
|
|
7
7
|
import "@mui/material";
|
|
8
8
|
import "../../overflowableText/OverflowableText.js";
|
|
9
|
-
import "../../../utils/types/equipmentType.js";
|
|
10
9
|
import "../../../utils/conversionUtils.js";
|
|
11
10
|
import { snackWithFallback } from "../../../utils/error.js";
|
|
12
11
|
import "@mui/icons-material";
|
|
13
12
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
13
|
+
import "../../../utils/types/equipmentType.js";
|
|
14
14
|
import { updateParameter } from "../../../services/explore.js";
|
|
15
|
-
import { setStudyShortCircuitParameters, invalidateStudyShortCircuitStatus } from "../../../services/study.js";
|
|
16
15
|
import "localized-countries";
|
|
17
16
|
import "localized-countries/data/fr";
|
|
18
17
|
import "localized-countries/data/en";
|
|
@@ -33,135 +32,143 @@ import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
|
33
32
|
import "uuid";
|
|
34
33
|
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
35
34
|
import "react-querybuilder";
|
|
36
|
-
import {
|
|
35
|
+
import { SHORT_CIRCUIT_PREDEFINED_PARAMS, PredefinedParameters, InitialVoltage, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_FEEDER_RESULT, SHORT_CIRCUIT_VOLTAGE_RANGES } from "./constants.js";
|
|
37
36
|
import "../../filter/HeaderFilterForm.js";
|
|
38
37
|
import { getNameElementEditorSchema, getNameElementEditorEmptyFormData } from "../common/name-element-editor/name-element-editor-utils.js";
|
|
39
|
-
import {
|
|
38
|
+
import { SPECIFIC_PARAMETERS, COMMON_PARAMETERS, VERSION_PARAMETER, PROVIDER } from "../common/constant.js";
|
|
39
|
+
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
40
|
+
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
41
|
+
import "../common/widget/parameter-line-slider.js";
|
|
42
|
+
import "../common/limitreductions/columns-definitions.js";
|
|
43
|
+
import { getCommonShortCircuitParametersFormSchema, resetSpecificParameters } from "./short-circuit-parameters-utils.js";
|
|
44
|
+
import { getDefaultSpecificParamsValues, getSpecificParametersFormSchema, getAllSpecificParametersValues, formatSpecificParameters } from "../common/utils.js";
|
|
40
45
|
const useShortCircuitParametersForm = ({
|
|
46
|
+
parametersBackend,
|
|
41
47
|
parametersUuid,
|
|
42
48
|
name,
|
|
43
|
-
description
|
|
44
|
-
studyUuid,
|
|
45
|
-
studyShortCircuitParameters
|
|
49
|
+
description
|
|
46
50
|
}) => {
|
|
51
|
+
const [, provider, , , , params, , updateParameters, , specificParamsDescriptions] = parametersBackend;
|
|
52
|
+
const [paramsLoaded, setParamsLoaded] = useState(false);
|
|
47
53
|
const { snackError } = useSnackMessage();
|
|
48
|
-
const
|
|
49
|
-
|
|
54
|
+
const specificParametersDescriptionForProvider = useMemo(() => {
|
|
55
|
+
return provider && specificParamsDescriptions?.[provider] ? specificParamsDescriptions[provider] : [];
|
|
56
|
+
}, [provider, specificParamsDescriptions]);
|
|
57
|
+
const specificParametersDefaultValues = useMemo(() => {
|
|
58
|
+
return getDefaultSpecificParamsValues(specificParametersDescriptionForProvider);
|
|
59
|
+
}, [specificParametersDescriptionForProvider]);
|
|
50
60
|
const formSchema = useMemo(() => {
|
|
51
|
-
return yup.object(
|
|
52
|
-
[SHORT_CIRCUIT_WITH_FEEDER_RESULT]: yup.boolean().required(),
|
|
61
|
+
return yup.object({
|
|
53
62
|
[SHORT_CIRCUIT_PREDEFINED_PARAMS]: yup.mixed().oneOf(Object.values(PredefinedParameters)).required(),
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}, [name]);
|
|
61
|
-
const emptyFormData = useMemo(() => {
|
|
62
|
-
return {
|
|
63
|
+
...getCommonShortCircuitParametersFormSchema().fields,
|
|
64
|
+
...getSpecificParametersFormSchema(specificParametersDescriptionForProvider).fields
|
|
65
|
+
}).concat(getNameElementEditorSchema(name));
|
|
66
|
+
}, [name, specificParametersDescriptionForProvider]);
|
|
67
|
+
const formMethods = useForm({
|
|
68
|
+
defaultValues: {
|
|
63
69
|
...getNameElementEditorEmptyFormData(name, description),
|
|
64
|
-
[SHORT_CIRCUIT_WITH_FEEDER_RESULT]: false,
|
|
65
70
|
[SHORT_CIRCUIT_PREDEFINED_PARAMS]: PredefinedParameters.ICC_MAX_WITH_CEI909,
|
|
66
|
-
[
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
[
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const formMethods = useForm({
|
|
74
|
-
defaultValues: emptyFormData,
|
|
71
|
+
[COMMON_PARAMETERS]: {
|
|
72
|
+
...params?.commonParameters
|
|
73
|
+
},
|
|
74
|
+
[SPECIFIC_PARAMETERS]: {
|
|
75
|
+
...specificParametersDefaultValues
|
|
76
|
+
}
|
|
77
|
+
},
|
|
75
78
|
resolver: yupResolver(formSchema)
|
|
76
79
|
});
|
|
77
|
-
const {
|
|
80
|
+
const { reset, setValue } = formMethods;
|
|
78
81
|
const resetAll = useCallback(
|
|
79
82
|
(predefinedParameter) => {
|
|
80
83
|
const dirty = { shouldDirty: true };
|
|
81
|
-
setValue(SHORT_CIRCUIT_WITH_FEEDER_RESULT, false, dirty);
|
|
82
|
-
setValue(SHORT_CIRCUIT_WITH_LOADS, false, dirty);
|
|
83
84
|
setValue(
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
COMMON_PARAMETERS,
|
|
86
|
+
{
|
|
87
|
+
...params?.commonParameters,
|
|
88
|
+
// for VERSION_PARAMETER and other non managed params
|
|
89
|
+
[SHORT_CIRCUIT_WITH_FEEDER_RESULT]: false,
|
|
90
|
+
[SHORT_CIRCUIT_WITH_LOADS]: false,
|
|
91
|
+
[SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS]: predefinedParameter !== PredefinedParameters.ICC_MIN_WITH_NOMINAL_VOLTAGE_MAP,
|
|
92
|
+
[SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS]: false,
|
|
93
|
+
[SHORT_CIRCUIT_WITH_NEUTRAL_POSITION]: false,
|
|
94
|
+
[SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE]: predefinedParameter === PredefinedParameters.ICC_MAX_WITH_CEI909 ? InitialVoltage.CEI909 : InitialVoltage.NOMINAL
|
|
95
|
+
},
|
|
86
96
|
dirty
|
|
87
97
|
);
|
|
88
|
-
setValue(SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, false, dirty);
|
|
89
|
-
setValue(SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, false, dirty);
|
|
90
|
-
const initialVoltageProfileMode = predefinedParameter === PredefinedParameters.ICC_MAX_WITH_CEI909 ? InitialVoltage.CEI909 : InitialVoltage.NOMINAL;
|
|
91
|
-
setValue(SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, initialVoltageProfileMode, dirty);
|
|
92
98
|
setValue(SHORT_CIRCUIT_PREDEFINED_PARAMS, predefinedParameter, dirty);
|
|
99
|
+
setValue(
|
|
100
|
+
SPECIFIC_PARAMETERS,
|
|
101
|
+
resetSpecificParameters(specificParametersDefaultValues, predefinedParameter),
|
|
102
|
+
dirty
|
|
103
|
+
);
|
|
93
104
|
},
|
|
94
|
-
[setValue]
|
|
105
|
+
[specificParametersDefaultValues, params?.commonParameters, setValue]
|
|
95
106
|
);
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
107
|
+
const formatNewParams = useCallback(
|
|
108
|
+
(formData) => {
|
|
109
|
+
if (!provider) {
|
|
110
|
+
return {};
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
provider: formData[PROVIDER],
|
|
114
|
+
predefinedParameters: formData[SHORT_CIRCUIT_PREDEFINED_PARAMS],
|
|
115
|
+
commonParameters: {
|
|
116
|
+
[VERSION_PARAMETER]: formData[COMMON_PARAMETERS][VERSION_PARAMETER],
|
|
117
|
+
// PowSyBl requires that "version" appears first
|
|
118
|
+
...formData[COMMON_PARAMETERS],
|
|
119
|
+
// this should be inverted for API compatibility
|
|
120
|
+
[SHORT_CIRCUIT_WITH_NEUTRAL_POSITION]: !formData[COMMON_PARAMETERS][SHORT_CIRCUIT_WITH_NEUTRAL_POSITION],
|
|
121
|
+
[SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE]: formData[COMMON_PARAMETERS][SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE] === InitialVoltage.CEI909 ? InitialVoltage.CONFIGURED : formData[COMMON_PARAMETERS][SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE],
|
|
122
|
+
// we need to add voltageRanges to the parameters only when initialVoltageProfileMode is equals to CEI909
|
|
123
|
+
[SHORT_CIRCUIT_VOLTAGE_RANGES]: formData[COMMON_PARAMETERS][SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE] === InitialVoltage.CEI909 ? params?.cei909VoltageRanges : void 0
|
|
124
|
+
},
|
|
125
|
+
specificParametersPerProvider: {
|
|
126
|
+
[provider]: getAllSpecificParametersValues(formData, specificParametersDefaultValues)
|
|
127
|
+
}
|
|
116
128
|
};
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
const
|
|
126
|
-
return {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
129
|
+
},
|
|
130
|
+
[params?.cei909VoltageRanges, provider, specificParametersDefaultValues]
|
|
131
|
+
);
|
|
132
|
+
const toShortCircuitFormValues = useCallback(
|
|
133
|
+
(_params) => {
|
|
134
|
+
if (!provider) {
|
|
135
|
+
return {};
|
|
136
|
+
}
|
|
137
|
+
const specificParamsListForCurrentProvider = _params.specificParametersPerProvider[provider];
|
|
138
|
+
return {
|
|
139
|
+
[PROVIDER]: _params.provider,
|
|
140
|
+
[SHORT_CIRCUIT_PREDEFINED_PARAMS]: _params.predefinedParameters,
|
|
141
|
+
[COMMON_PARAMETERS]: {
|
|
142
|
+
..._params.commonParameters,
|
|
143
|
+
[SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE]: _params.commonParameters.initialVoltageProfileMode === InitialVoltage.CONFIGURED ? InitialVoltage.CEI909 : _params.commonParameters.initialVoltageProfileMode,
|
|
144
|
+
// invert back the value for the form
|
|
145
|
+
[SHORT_CIRCUIT_WITH_NEUTRAL_POSITION]: !_params.commonParameters.withNeutralPosition
|
|
146
|
+
},
|
|
147
|
+
[SPECIFIC_PARAMETERS]: {
|
|
148
|
+
...formatSpecificParameters(
|
|
149
|
+
specificParametersDescriptionForProvider,
|
|
150
|
+
specificParamsListForCurrentProvider
|
|
151
|
+
)
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
},
|
|
155
|
+
[provider, specificParametersDescriptionForProvider]
|
|
156
|
+
);
|
|
157
|
+
const onValidationError = useCallback((_errors) => {
|
|
158
|
+
}, []);
|
|
141
159
|
const onSaveInline = useCallback(
|
|
142
160
|
(formData) => {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
setStudyShortCircuitParameters(studyUuid, {
|
|
146
|
-
...prepareDataToSend(shortCircuitParameters, formData)
|
|
147
|
-
}).then(() => {
|
|
148
|
-
invalidateStudyShortCircuitStatus(studyUuid).catch((error) => {
|
|
149
|
-
snackWithFallback(snackError, error, { headerId: "invalidateShortCircuitStatusError" });
|
|
150
|
-
});
|
|
151
|
-
}).catch((error) => {
|
|
152
|
-
setShortCircuitParameters(oldParams);
|
|
153
|
-
snackWithFallback(snackError, error, { headerId: "paramsChangingError" });
|
|
154
|
-
});
|
|
155
|
-
}
|
|
161
|
+
const data = formatNewParams(formData);
|
|
162
|
+
updateParameters(data);
|
|
156
163
|
},
|
|
157
|
-
[
|
|
164
|
+
[updateParameters, formatNewParams]
|
|
158
165
|
);
|
|
159
166
|
const onSaveDialog = useCallback(
|
|
160
167
|
(formData) => {
|
|
161
|
-
if (parametersUuid
|
|
168
|
+
if (parametersUuid) {
|
|
162
169
|
updateParameter(
|
|
163
170
|
parametersUuid,
|
|
164
|
-
|
|
171
|
+
formatNewParams(formData),
|
|
165
172
|
formData[NAME],
|
|
166
173
|
ElementType.SHORT_CIRCUIT_PARAMETERS,
|
|
167
174
|
formData[DESCRIPTION] ?? ""
|
|
@@ -170,42 +177,28 @@ const useShortCircuitParametersForm = ({
|
|
|
170
177
|
});
|
|
171
178
|
}
|
|
172
179
|
},
|
|
173
|
-
[
|
|
180
|
+
[formatNewParams, parametersUuid, snackError]
|
|
174
181
|
);
|
|
175
182
|
useEffect(() => {
|
|
176
|
-
if (
|
|
177
|
-
|
|
178
|
-
setParamsLoading(true);
|
|
179
|
-
}, 700);
|
|
180
|
-
fetchShortCircuitParameters(parametersUuid).then((params) => {
|
|
181
|
-
setShortCircuitParameters(params);
|
|
182
|
-
}).catch((error) => {
|
|
183
|
-
snackWithFallback(snackError, error, { headerId: "paramsRetrievingError" });
|
|
184
|
-
}).finally(() => {
|
|
185
|
-
clearTimeout(timer);
|
|
186
|
-
setParamsLoading(false);
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
}, [parametersUuid, snackError]);
|
|
190
|
-
useEffect(() => {
|
|
191
|
-
if (studyShortCircuitParameters) {
|
|
192
|
-
setShortCircuitParameters(studyShortCircuitParameters);
|
|
193
|
-
}
|
|
194
|
-
}, [studyShortCircuitParameters]);
|
|
195
|
-
useEffect(() => {
|
|
196
|
-
if (shortCircuitParameters) {
|
|
197
|
-
const { parameters, predefinedParameters } = shortCircuitParameters;
|
|
198
|
-
reset(formatShortCircuitParameters(parameters, predefinedParameters));
|
|
183
|
+
if (!params || !provider || !specificParamsDescriptions) {
|
|
184
|
+
return;
|
|
199
185
|
}
|
|
200
|
-
|
|
186
|
+
reset(toShortCircuitFormValues(params));
|
|
187
|
+
setParamsLoaded(true);
|
|
188
|
+
}, [provider, params, reset, specificParamsDescriptions, toShortCircuitFormValues]);
|
|
201
189
|
return {
|
|
202
190
|
formMethods,
|
|
203
191
|
formSchema,
|
|
204
|
-
|
|
192
|
+
specificParametersDescriptionForProvider,
|
|
193
|
+
toShortCircuitFormValues,
|
|
194
|
+
formatNewParams,
|
|
195
|
+
params,
|
|
196
|
+
provider,
|
|
197
|
+
paramsLoaded,
|
|
198
|
+
onValidationError,
|
|
205
199
|
onSaveInline,
|
|
206
200
|
onSaveDialog,
|
|
207
|
-
resetAll
|
|
208
|
-
getCurrentValues
|
|
201
|
+
resetAll
|
|
209
202
|
};
|
|
210
203
|
};
|
|
211
204
|
export {
|
|
@@ -2,13 +2,13 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Grid, Alert } from "@mui/material";
|
|
3
3
|
import { FormattedMessage } from "react-intl";
|
|
4
4
|
import "../../overflowableText/OverflowableText.js";
|
|
5
|
-
import "react";
|
|
6
|
-
import "react-hook-form";
|
|
7
|
-
import { EquipmentType } from "../../../utils/types/equipmentType.js";
|
|
8
5
|
import "../../../utils/conversionUtils.js";
|
|
9
6
|
import "@mui/icons-material";
|
|
10
7
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
8
|
+
import { EquipmentType } from "../../../utils/types/equipmentType.js";
|
|
11
9
|
import "../../../utils/yupConfig.js";
|
|
10
|
+
import "react";
|
|
11
|
+
import "react-hook-form";
|
|
12
12
|
import "localized-countries";
|
|
13
13
|
import "localized-countries/data/fr";
|
|
14
14
|
import "localized-countries/data/en";
|
|
@@ -6,12 +6,12 @@ import "react/jsx-runtime";
|
|
|
6
6
|
import "react-intl";
|
|
7
7
|
import "@mui/material";
|
|
8
8
|
import "../../overflowableText/OverflowableText.js";
|
|
9
|
-
import "../../../utils/types/equipmentType.js";
|
|
10
9
|
import { ID, FILTERS } from "../../../utils/constants/filterConstant.js";
|
|
11
10
|
import { isBlankOrEmpty } from "../../../utils/conversionUtils.js";
|
|
12
11
|
import { snackWithFallback } from "../../../utils/error.js";
|
|
13
12
|
import "@mui/icons-material";
|
|
14
13
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
14
|
+
import "../../../utils/types/equipmentType.js";
|
|
15
15
|
import { updateParameter } from "../../../services/explore.js";
|
|
16
16
|
import { updateVoltageInitParameters } from "../../../services/study.js";
|
|
17
17
|
import { getVoltageInitParameters } from "../../../services/voltage-init.js";
|
|
@@ -4,13 +4,13 @@ import "react/jsx-runtime";
|
|
|
4
4
|
import "react-intl";
|
|
5
5
|
import "@mui/material";
|
|
6
6
|
import "../../overflowableText/OverflowableText.js";
|
|
7
|
-
import "react";
|
|
8
|
-
import "react-hook-form";
|
|
9
|
-
import "../../../utils/types/equipmentType.js";
|
|
10
7
|
import { FILTER_NAME, FILTER_ID, ID, FILTERS } from "../../../utils/constants/filterConstant.js";
|
|
11
8
|
import "../../../utils/conversionUtils.js";
|
|
12
9
|
import "@mui/icons-material";
|
|
10
|
+
import "../../../utils/types/equipmentType.js";
|
|
13
11
|
import "../../../utils/yupConfig.js";
|
|
12
|
+
import "react";
|
|
13
|
+
import "react-hook-form";
|
|
14
14
|
import "localized-countries";
|
|
15
15
|
import "localized-countries/data/fr";
|
|
16
16
|
import "localized-countries/data/en";
|
|
@@ -3,12 +3,12 @@ import { Box, Grid, LinearProgress, Tabs, Tab } from "@mui/material";
|
|
|
3
3
|
import { FormattedMessage } from "react-intl";
|
|
4
4
|
import { getTabIndicatorStyle, getTabStyle } from "../parameters-style.js";
|
|
5
5
|
import "../../overflowableText/OverflowableText.js";
|
|
6
|
-
import "react";
|
|
7
|
-
import "react-hook-form";
|
|
8
|
-
import "../../../utils/types/equipmentType.js";
|
|
9
6
|
import "../../../utils/conversionUtils.js";
|
|
10
7
|
import "@mui/icons-material";
|
|
8
|
+
import "../../../utils/types/equipmentType.js";
|
|
11
9
|
import "../../../utils/yupConfig.js";
|
|
10
|
+
import "react";
|
|
11
|
+
import "react-hook-form";
|
|
12
12
|
import "localized-countries";
|
|
13
13
|
import "localized-countries/data/fr";
|
|
14
14
|
import "localized-countries/data/en";
|
|
@@ -2,10 +2,10 @@ import { UUID } from 'node:crypto';
|
|
|
2
2
|
import { User } from 'oidc-client';
|
|
3
3
|
import { ComputingType } from '../components/parameters/common/computing-type';
|
|
4
4
|
import { ILimitReductionsByVoltageLevel } from '../components/parameters/common/limitreductions/columns-definitions';
|
|
5
|
-
import { ParametersInfos,
|
|
5
|
+
import { ParametersInfos, SpecificParametersDescription, UseParametersBackendReturnProps } from '../utils/types/parameters.type';
|
|
6
6
|
export declare enum OptionalServicesStatus {
|
|
7
7
|
Up = "UP",
|
|
8
8
|
Down = "DOWN",
|
|
9
9
|
Pending = "PENDING"
|
|
10
10
|
}
|
|
11
|
-
export declare const useParametersBackend: <T extends ComputingType>(user: User | null, studyUuid: UUID | null, type: T, optionalServiceStatus: OptionalServicesStatus | undefined, backendFetchProviders: () => Promise<string[]
|
|
11
|
+
export declare const useParametersBackend: <T extends ComputingType>(user: User | null, studyUuid: UUID | null, type: T, optionalServiceStatus: OptionalServicesStatus | undefined, backendFetchProviders: (() => Promise<string[]>) | null, backendFetchProvider: ((studyUuid: UUID) => Promise<string>) | null, backendFetchDefaultProvider: (() => Promise<string>) | null, backendUpdateProvider: ((studyUuid: UUID, newProvider: string) => Promise<any>) | null, backendFetchParameters: (studyUuid: UUID) => Promise<ParametersInfos<T>>, backendUpdateParameters?: (studyUuid: UUID, newParam: ParametersInfos<T> | null) => Promise<any>, backendFetchSpecificParametersDescription?: () => Promise<SpecificParametersDescription>, backendFetchDefaultLimitReductions?: () => Promise<ILimitReductionsByVoltageLevel[]>) => UseParametersBackendReturnProps<T>;
|
|
@@ -17,7 +17,9 @@ const useParametersBackend = (user, studyUuid, type, optionalServiceStatus, back
|
|
|
17
17
|
const providerRef = useRef(provider);
|
|
18
18
|
providerRef.current = provider;
|
|
19
19
|
const [params, setParams] = useState(null);
|
|
20
|
-
const [specificParamsDescription, setSpecificParamsDescription] = useState(
|
|
20
|
+
const [specificParamsDescription, setSpecificParamsDescription] = useState(
|
|
21
|
+
null
|
|
22
|
+
);
|
|
21
23
|
const [defaultLimitReductions, setDefaultLimitReductions] = useState([]);
|
|
22
24
|
const optionalServiceStatusRef = useRef(optionalServiceStatus);
|
|
23
25
|
optionalServiceStatusRef.current = optionalServiceStatus;
|
|
@@ -44,7 +46,7 @@ const useParametersBackend = (user, studyUuid, type, optionalServiceStatus, back
|
|
|
44
46
|
[backendUpdateProvider, studyUuid, snackError, type]
|
|
45
47
|
);
|
|
46
48
|
const resetProvider = useCallback(() => {
|
|
47
|
-
backendFetchDefaultProvider().then((defaultProvider) => {
|
|
49
|
+
backendFetchDefaultProvider?.().then((defaultProvider) => {
|
|
48
50
|
const providerNames = Object.keys(providersRef.current);
|
|
49
51
|
if (providerNames.length > 0) {
|
|
50
52
|
const newProvider = defaultProvider in providersRef.current ? defaultProvider : providerNames[0];
|
|
@@ -59,7 +61,7 @@ const useParametersBackend = (user, studyUuid, type, optionalServiceStatus, back
|
|
|
59
61
|
});
|
|
60
62
|
}, [backendFetchDefaultProvider, updateProvider, snackError, type]);
|
|
61
63
|
const fetchAvailableProviders = useCallback(() => {
|
|
62
|
-
return backendFetchProviders().then((providers) => {
|
|
64
|
+
return backendFetchProviders?.().then((providers) => {
|
|
63
65
|
const providersObj = providers.reduce((acc, v) => {
|
|
64
66
|
return {
|
|
65
67
|
...acc,
|
|
@@ -91,7 +93,7 @@ const useParametersBackend = (user, studyUuid, type, optionalServiceStatus, back
|
|
|
91
93
|
);
|
|
92
94
|
useEffect(() => {
|
|
93
95
|
if (user !== null && studyUuid && optionalServiceStatus === "UP") {
|
|
94
|
-
fetchAvailableProviders()
|
|
96
|
+
fetchAvailableProviders()?.then(() => fetchProvider(studyUuid));
|
|
95
97
|
}
|
|
96
98
|
}, [fetchAvailableProviders, fetchProvider, optionalServiceStatus, studyUuid, user]);
|
|
97
99
|
const fetchSpecificParametersDescription = useCallback(() => {
|
package/dist/index.js
CHANGED
|
@@ -134,7 +134,7 @@ import { DeviceHubIcon } from "./components/icons/DeviceHubIcon.js";
|
|
|
134
134
|
import { TuneIcon } from "./components/icons/TuneIcon.js";
|
|
135
135
|
import { PhotoLibraryIcon } from "./components/icons/PhotoLibraryIcon.js";
|
|
136
136
|
import { ComputingType, formatComputingTypeLabel, isValidComputingType } from "./components/parameters/common/computing-type.js";
|
|
137
|
-
import { PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_PROVIDER, PROVIDER, ReactivePowerAdornment, VOLTAGE_LEVEL, VoltageAdornment } from "./components/parameters/common/constant.js";
|
|
137
|
+
import { COMMON_PARAMETERS, PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_PROVIDER, PROVIDER, ReactivePowerAdornment, SPECIFIC_PARAMETERS, VERSION_PARAMETER, VOLTAGE_LEVEL, VoltageAdornment } from "./components/parameters/common/constant.js";
|
|
138
138
|
import { LineSeparator } from "./components/parameters/common/line-separator.js";
|
|
139
139
|
import { LabelledButton, SwitchWithLabel, TabPanel } from "./components/parameters/common/parameters.js";
|
|
140
140
|
import { CreateParameterDialog } from "./components/parameters/common/parameters-creation-dialog.js";
|
|
@@ -156,10 +156,10 @@ import { CENTER_LABEL, COMPONENT_LIBRARY, DIAGONAL_LABEL, INTL_LINE_FLOW_MODE_OP
|
|
|
156
156
|
import { MAP_BASEMAP_CARTO, MAP_BASEMAP_CARTO_NOLABEL, MAP_BASEMAP_ETALAB, MAP_BASEMAP_MAPBOX, NadPositionsGenerationMode, SubstationLayout } from "./components/parameters/network-visualizations/network-visualizations.types.js";
|
|
157
157
|
import { NetworkVisualizationParametersInline } from "./components/parameters/network-visualizations/network-visualizations-parameters-inline.js";
|
|
158
158
|
import { NetworkVisualizationsParametersEditionDialog } from "./components/parameters/network-visualizations/network-visualizations-parameters-dialog.js";
|
|
159
|
-
import { BALANCE_TYPE,
|
|
159
|
+
import { BALANCE_TYPE, CONNECTED_COMPONENT_MODE, COUNTRIES_TO_BALANCE, DC, DC_POWER_FACTOR, DC_USE_TRANSFORMER_RATIO, DEFAULT_LIMIT_REDUCTION_VALUE, DISTRIBUTED_SLACK, HVDC_AC_EMULATION, MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, PARAM_LIMIT_REDUCTION, PARAM_PROVIDER_OPENLOADFLOW, PHASE_SHIFTER_REGULATION_ON, READ_SLACK_BUS, SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON, TWT_SPLIT_SHUNT_ADMITTANCE, USE_REACTIVE_LIMITS, VOLTAGE_INIT_MODE, WRITE_SLACK_BUS, alertThresholdMarks } from "./components/parameters/loadflow/constants.js";
|
|
160
160
|
import { LoadFlowParametersInline } from "./components/parameters/loadflow/load-flow-parameters-inline.js";
|
|
161
161
|
import { LoadFlowParametersEditionDialog } from "./components/parameters/loadflow/load-flow-parameters-dialog.js";
|
|
162
|
-
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 "./components/parameters/short-circuit/constants.js";
|
|
162
|
+
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 "./components/parameters/short-circuit/constants.js";
|
|
163
163
|
import { ShortCircuitParametersInLine } from "./components/parameters/short-circuit/short-circuit-parameters-inline.js";
|
|
164
164
|
import { ShortCircuitParametersEditionDialog } from "./components/parameters/short-circuit/short-circuit-parameters-dialog.js";
|
|
165
165
|
import { DEFAULT_GENERAL_APPLY_MODIFICATIONS, DEFAULT_REACTIVE_SLACKS_THRESHOLD, DEFAULT_SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, DEFAULT_UPDATE_BUS_VOLTAGE, GENERAL, GENERAL_APPLY_MODIFICATIONS, GENERATORS_SELECTION_TYPE, HIGH_VOLTAGE_LIMIT, LEG_SIDE, LOW_VOLTAGE_LIMIT, PRIORITY, RATIO_TAP_CHANGER_POSITION, RATIO_TAP_CHANGER_TARGET_V, REACTIVE_SLACKS_THRESHOLD, SELECTION_TYPE, SHUNT_COMPENSATORS_SELECTION_TYPE, SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD, TRANSFORMERS_SELECTION_TYPE, UPDATE_BUS_VOLTAGE, VARIABLE_Q_GENERATORS, VARIABLE_SHUNT_COMPENSATORS, VARIABLE_TRANSFORMERS, VOLTAGE_LIMITS_DEFAULT, VOLTAGE_LIMITS_MODIFICATION, VoltageInitTabValues } from "./components/parameters/voltage-init/constants.js";
|
|
@@ -200,11 +200,12 @@ import { createFilter, createParameter, fetchElementsInfos, saveFilter, updatePa
|
|
|
200
200
|
import { PREFIX_STUDY_QUERIES, fetchLoadFlowParameters, getDefaultLoadFlowProvider, getLoadFlowDefaultLimitReductions, getLoadFlowProviders, getLoadFlowSpecificParametersDescription, getLoadFlowUrl, setLoadFlowParameters } from "./services/loadflow.js";
|
|
201
201
|
import { getPccMinStudyParameters, updatePccMinParameters } from "./services/pcc-min.js";
|
|
202
202
|
import { fetchDefaultSecurityAnalysisProvider, fetchSecurityAnalysisParameters, fetchSecurityAnalysisProviders, getSecurityAnalysisDefaultLimitReductions, getSecurityAnalysisParameters, getStudyUrl, safeEncodeURIComponent, setSecurityAnalysisParameters, updateSecurityAnalysisParameters, updateSecurityAnalysisProvider } from "./services/security-analysis.js";
|
|
203
|
-
import { exportFilter, getAvailableComponentLibraries, getStudyNetworkVisualizationsParameters, getStudyShortCircuitParameters,
|
|
203
|
+
import { exportFilter, getAvailableComponentLibraries, getStudyNetworkVisualizationsParameters, getStudyShortCircuitParameters, setStudyNetworkVisualizationParameters, updateVoltageInitParameters } from "./services/study.js";
|
|
204
204
|
import { getNetworkVisualizationsParameters } from "./services/study-config.js";
|
|
205
205
|
import { fetchCurrentAnnouncement, fetchUserDetails } from "./services/userAdmin.js";
|
|
206
|
-
import {
|
|
206
|
+
import { backendFetch, backendFetchFile, backendFetchJson, backendFetchText, getRequestParamFromList } from "./services/utils.js";
|
|
207
207
|
import { getVoltageInitParameters, getVoltageInitUrl } from "./services/voltage-init.js";
|
|
208
|
+
import { fetchShortCircuitParameters, getShortCircuitSpecificParametersDescription, updateShortCircuitParameters } from "./services/short-circuit-analysis.js";
|
|
208
209
|
import { equalsArray } from "./utils/algos.js";
|
|
209
210
|
import { FetchStatus } from "./utils/constants/fetchStatus.js";
|
|
210
211
|
import { FieldConstants } from "./utils/constants/fieldConstants.js";
|
|
@@ -222,6 +223,7 @@ import { copyToClipboard } from "./utils/navigator-clipboard.js";
|
|
|
222
223
|
import { NotificationsUrlKeys, PREFIX_CONFIG_NOTIFICATION_WS, PREFIX_DIRECTORY_NOTIFICATION_WS, PREFIX_STUDY_NOTIFICATION_WS } from "./utils/constants/notificationsProvider.js";
|
|
223
224
|
import { DARK_THEME, LIGHT_THEME, makeComposeClasses, mergeSx, toNestedGlobalSelectors } from "./utils/styles.js";
|
|
224
225
|
import { CustomError, formatMessageValues } from "./utils/types/CustomError.js";
|
|
226
|
+
import { NetworkTimeoutError } from "./utils/types/NetworkTimeoutError.js";
|
|
225
227
|
import { ElementType } from "./utils/types/elementType.js";
|
|
226
228
|
import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, EquipmentType, ExtendedEquipmentType, HvdcType, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./utils/types/equipmentType.js";
|
|
227
229
|
import { Battery, BusBar, DanglingLine, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel } from "./utils/types/equipmentTypes.js";
|
|
@@ -597,7 +599,9 @@ export {
|
|
|
597
599
|
SELECTION_TYPE,
|
|
598
600
|
SENSITIVITY_TYPES,
|
|
599
601
|
SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE,
|
|
602
|
+
SHORT_CIRCUIT_ONLY_STARTED_GENERATORS,
|
|
600
603
|
SHORT_CIRCUIT_PREDEFINED_PARAMS,
|
|
604
|
+
SHORT_CIRCUIT_VOLTAGE_RANGES,
|
|
601
605
|
SHORT_CIRCUIT_WITH_FEEDER_RESULT,
|
|
602
606
|
SHORT_CIRCUIT_WITH_LOADS,
|
|
603
607
|
SHORT_CIRCUIT_WITH_NEUTRAL_POSITION,
|
|
@@ -757,6 +761,7 @@ export {
|
|
|
757
761
|
fetchRootFolders,
|
|
758
762
|
fetchSecurityAnalysisParameters,
|
|
759
763
|
fetchSecurityAnalysisProviders,
|
|
764
|
+
fetchShortCircuitParameters,
|
|
760
765
|
fetchStudyMetadata,
|
|
761
766
|
fetchUserDetails,
|
|
762
767
|
filterEn,
|
|
@@ -794,6 +799,7 @@ export {
|
|
|
794
799
|
getSAParametersFromSchema,
|
|
795
800
|
getSecurityAnalysisDefaultLimitReductions,
|
|
796
801
|
getSecurityAnalysisParameters,
|
|
802
|
+
getShortCircuitSpecificParametersDescription,
|
|
797
803
|
getStudyNetworkVisualizationsParameters,
|
|
798
804
|
getStudyShortCircuitParameters,
|
|
799
805
|
getStudyUrl,
|
|
@@ -815,7 +821,6 @@ export {
|
|
|
815
821
|
inputsFr,
|
|
816
822
|
intlInitialVoltageProfileMode,
|
|
817
823
|
intlPredefinedParametersOptions,
|
|
818
|
-
invalidateStudyShortCircuitStatus,
|
|
819
824
|
isBlankOrEmpty,
|
|
820
825
|
isFieldRequired,
|
|
821
826
|
isFloatNumber,
|
|
@@ -836,6 +841,7 @@ export {
|
|
|
836
841
|
multipleSelectionDialogFr,
|
|
837
842
|
networkModificationsEn,
|
|
838
843
|
networkModificationsFr,
|
|
844
|
+
onlyStartedGeneratorsOptions,
|
|
839
845
|
parametersEn,
|
|
840
846
|
parametersFr,
|
|
841
847
|
queryValidator,
|
|
@@ -858,7 +864,6 @@ export {
|
|
|
858
864
|
setShowAuthenticationRouterLogin,
|
|
859
865
|
setSignInCallbackError,
|
|
860
866
|
setStudyNetworkVisualizationParameters,
|
|
861
|
-
setStudyShortCircuitParameters,
|
|
862
867
|
setUnauthorizedUserInfo,
|
|
863
868
|
setUserValidationError,
|
|
864
869
|
snackWithFallback,
|
|
@@ -884,6 +889,7 @@ export {
|
|
|
884
889
|
updatePccMinParameters,
|
|
885
890
|
updateSecurityAnalysisParameters,
|
|
886
891
|
updateSecurityAnalysisProvider,
|
|
892
|
+
updateShortCircuitParameters,
|
|
887
893
|
updateVoltageInitParameters,
|
|
888
894
|
useConfidentialityWarning,
|
|
889
895
|
useConvertValue,
|
package/dist/services/index.d.ts
CHANGED
package/dist/services/index.js
CHANGED
|
@@ -5,13 +5,13 @@ import { createFilter, createParameter, fetchElementsInfos, saveFilter, updatePa
|
|
|
5
5
|
import { PREFIX_STUDY_QUERIES, fetchLoadFlowParameters, getDefaultLoadFlowProvider, getLoadFlowDefaultLimitReductions, getLoadFlowProviders, getLoadFlowSpecificParametersDescription, getLoadFlowUrl, setLoadFlowParameters } from "./loadflow.js";
|
|
6
6
|
import { getPccMinStudyParameters, updatePccMinParameters } from "./pcc-min.js";
|
|
7
7
|
import { fetchDefaultSecurityAnalysisProvider, fetchSecurityAnalysisParameters, fetchSecurityAnalysisProviders, getSecurityAnalysisDefaultLimitReductions, getSecurityAnalysisParameters, getStudyUrl, safeEncodeURIComponent, setSecurityAnalysisParameters, updateSecurityAnalysisParameters, updateSecurityAnalysisProvider } from "./security-analysis.js";
|
|
8
|
-
import { exportFilter, getAvailableComponentLibraries, getStudyNetworkVisualizationsParameters, getStudyShortCircuitParameters,
|
|
8
|
+
import { exportFilter, getAvailableComponentLibraries, getStudyNetworkVisualizationsParameters, getStudyShortCircuitParameters, setStudyNetworkVisualizationParameters, updateVoltageInitParameters } from "./study.js";
|
|
9
9
|
import { getNetworkVisualizationsParameters } from "./study-config.js";
|
|
10
10
|
import { fetchCurrentAnnouncement, fetchUserDetails } from "./userAdmin.js";
|
|
11
|
-
import {
|
|
11
|
+
import { backendFetch, backendFetchFile, backendFetchJson, backendFetchText, getRequestParamFromList } from "./utils.js";
|
|
12
12
|
import { getVoltageInitParameters, getVoltageInitUrl } from "./voltage-init.js";
|
|
13
|
+
import { fetchShortCircuitParameters, getShortCircuitSpecificParametersDescription, updateShortCircuitParameters } from "./short-circuit-analysis.js";
|
|
13
14
|
export {
|
|
14
|
-
NetworkTimeoutError,
|
|
15
15
|
PREFIX_STUDY_QUERIES,
|
|
16
16
|
PermissionType,
|
|
17
17
|
backendFetch,
|
|
@@ -38,6 +38,7 @@ export {
|
|
|
38
38
|
fetchRootFolders,
|
|
39
39
|
fetchSecurityAnalysisParameters,
|
|
40
40
|
fetchSecurityAnalysisProviders,
|
|
41
|
+
fetchShortCircuitParameters,
|
|
41
42
|
fetchStudyMetadata,
|
|
42
43
|
fetchUserDetails,
|
|
43
44
|
getAppName,
|
|
@@ -52,24 +53,24 @@ export {
|
|
|
52
53
|
getRequestParamFromList,
|
|
53
54
|
getSecurityAnalysisDefaultLimitReductions,
|
|
54
55
|
getSecurityAnalysisParameters,
|
|
56
|
+
getShortCircuitSpecificParametersDescription,
|
|
55
57
|
getStudyNetworkVisualizationsParameters,
|
|
56
58
|
getStudyShortCircuitParameters,
|
|
57
59
|
getStudyUrl,
|
|
58
60
|
getVoltageInitParameters,
|
|
59
61
|
getVoltageInitUrl,
|
|
60
62
|
hasElementPermission,
|
|
61
|
-
invalidateStudyShortCircuitStatus,
|
|
62
63
|
isStudyMetadata,
|
|
63
64
|
safeEncodeURIComponent,
|
|
64
65
|
saveFilter,
|
|
65
66
|
setLoadFlowParameters,
|
|
66
67
|
setSecurityAnalysisParameters,
|
|
67
68
|
setStudyNetworkVisualizationParameters,
|
|
68
|
-
setStudyShortCircuitParameters,
|
|
69
69
|
updateConfigParameter,
|
|
70
70
|
updateParameter,
|
|
71
71
|
updatePccMinParameters,
|
|
72
72
|
updateSecurityAnalysisParameters,
|
|
73
73
|
updateSecurityAnalysisProvider,
|
|
74
|
+
updateShortCircuitParameters,
|
|
74
75
|
updateVoltageInitParameters
|
|
75
76
|
};
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
1
2
|
import { ShortCircuitParametersInfos } from '../components/parameters/short-circuit/short-circuit-parameters.type';
|
|
3
|
+
export declare function getShortCircuitSpecificParametersDescription(): Promise<any>;
|
|
2
4
|
export declare function fetchShortCircuitParameters(parameterUuid: string): Promise<ShortCircuitParametersInfos>;
|
|
5
|
+
export declare function updateShortCircuitParameters(parameterUuid: UUID, newParams: any): Promise<Response>;
|