@gridsuite/commons-ui 0.174.0 → 0.176.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/parameters/short-circuit/short-circuit-general-tab-panel.js +12 -5
- package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.js +12 -1
- package/dist/translations/en/businessErrorsEn.d.ts +1 -0
- package/dist/translations/en/businessErrorsEn.js +1 -0
- package/dist/translations/fr/businessErrorsFr.d.ts +1 -0
- package/dist/translations/fr/businessErrorsFr.js +1 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ 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 } 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, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_IN_CALCULATION_CLUSTER, intlPredefinedParametersOptions, intlInitialVoltageProfileMode, PredefinedParameters, 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, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_IN_CALCULATION_CLUSTER, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_OUTSIDE_CALCULATION_CLUSTER, intlPredefinedParametersOptions, intlInitialVoltageProfileMode, PredefinedParameters, 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";
|
|
@@ -81,25 +81,32 @@ const ShortCircuitGeneralTabPanel = forwardRef(
|
|
|
81
81
|
const watchOnlyStartedGeneratorsInCalculationCluster = useWatch({
|
|
82
82
|
name: `${SPECIFIC_PARAMETERS}.${SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_IN_CALCULATION_CLUSTER}`
|
|
83
83
|
});
|
|
84
|
+
const watchOnlyStartedGeneratorsOutsideCalculationCluster = useWatch({
|
|
85
|
+
name: `${SPECIFIC_PARAMETERS}.${SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_OUTSIDE_CALCULATION_CLUSTER}`
|
|
86
|
+
});
|
|
84
87
|
const isIccMinFeaturesDefaultConfiguration = useMemo(() => {
|
|
85
88
|
return !watchLoads && !watchShuntCompensators && !watchVSC && !watchNeutralPosition && // if watchOnlyStartedGeneratorsInCalculationCluster is undefined, we consider IccMinFeaturesDefaultConfiguration as true
|
|
86
|
-
(watchOnlyStartedGeneratorsInCalculationCluster ?? true)
|
|
89
|
+
(watchOnlyStartedGeneratorsInCalculationCluster ?? true) && // if watchOnlyStartedGeneratorsOutsideCalculationCluster is undefined, we consider IccMinFeaturesDefaultConfiguration as true
|
|
90
|
+
(watchOnlyStartedGeneratorsOutsideCalculationCluster ?? true);
|
|
87
91
|
}, [
|
|
88
92
|
watchLoads,
|
|
89
93
|
watchShuntCompensators,
|
|
90
94
|
watchVSC,
|
|
91
95
|
watchNeutralPosition,
|
|
92
|
-
watchOnlyStartedGeneratorsInCalculationCluster
|
|
96
|
+
watchOnlyStartedGeneratorsInCalculationCluster,
|
|
97
|
+
watchOnlyStartedGeneratorsOutsideCalculationCluster
|
|
93
98
|
]);
|
|
94
99
|
const isIccMaxFeaturesDefaultConfiguration = useMemo(() => {
|
|
95
100
|
return !watchLoads && !watchShuntCompensators && watchVSC && !watchNeutralPosition && // if watchOnlyStartedGeneratorsInCalculationCluster is undefined, we consider IccMaxFeaturesDefaultConfiguration as true
|
|
96
|
-
!(watchOnlyStartedGeneratorsInCalculationCluster ?? false)
|
|
101
|
+
!(watchOnlyStartedGeneratorsInCalculationCluster ?? false) && // if watchOnlyStartedGeneratorsOutsideCalculationCluster is undefined, we consider IccMaxFeaturesDefaultConfiguration as true
|
|
102
|
+
(watchOnlyStartedGeneratorsOutsideCalculationCluster ?? true);
|
|
97
103
|
}, [
|
|
98
104
|
watchLoads,
|
|
99
105
|
watchShuntCompensators,
|
|
100
106
|
watchVSC,
|
|
101
107
|
watchNeutralPosition,
|
|
102
|
-
watchOnlyStartedGeneratorsInCalculationCluster
|
|
108
|
+
watchOnlyStartedGeneratorsInCalculationCluster,
|
|
109
|
+
watchOnlyStartedGeneratorsOutsideCalculationCluster
|
|
103
110
|
]);
|
|
104
111
|
const predefinedParamsOptions = useMemo(() => {
|
|
105
112
|
return intlPredefinedParametersOptions();
|
|
@@ -37,7 +37,7 @@ import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
|
37
37
|
import "uuid";
|
|
38
38
|
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
39
39
|
import "react-querybuilder";
|
|
40
|
-
import { SHORT_CIRCUIT_PREDEFINED_PARAMS, PredefinedParameters, 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, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_IN_CALCULATION_CLUSTER, SHORT_CIRCUIT_VOLTAGE_RANGES, SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS, SHORT_CIRCUIT_POWER_ELECTRONICS_CLUSTERS,
|
|
40
|
+
import { SHORT_CIRCUIT_PREDEFINED_PARAMS, PredefinedParameters, 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, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_IN_CALCULATION_CLUSTER, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_OUTSIDE_CALCULATION_CLUSTER, SHORT_CIRCUIT_VOLTAGE_RANGES, SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS, SHORT_CIRCUIT_POWER_ELECTRONICS_CLUSTERS, NODE_CLUSTER_FILTER_IDS } from "./constants.js";
|
|
41
41
|
import "../../filter/HeaderFilterForm.js";
|
|
42
42
|
import { getNameElementEditorSchema, getNameElementEditorEmptyFormData } from "../common/name-element-editor/name-element-editor-utils.js";
|
|
43
43
|
import { SPECIFIC_PARAMETERS, COMMON_PARAMETERS, VERSION_PARAMETER, PROVIDER } from "../common/constants.js";
|
|
@@ -119,6 +119,17 @@ const useShortCircuitParametersForm = ({
|
|
|
119
119
|
dirty
|
|
120
120
|
);
|
|
121
121
|
}
|
|
122
|
+
const onlyStartedGeneratorsOutsideCalculationCluster = specificParametersDescriptionForProvider?.find(
|
|
123
|
+
(specificParam) => specificParam.name === SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_OUTSIDE_CALCULATION_CLUSTER
|
|
124
|
+
);
|
|
125
|
+
if (onlyStartedGeneratorsOutsideCalculationCluster) {
|
|
126
|
+
setValue(
|
|
127
|
+
`${SPECIFIC_PARAMETERS}.${SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_OUTSIDE_CALCULATION_CLUSTER}`,
|
|
128
|
+
true,
|
|
129
|
+
// for all predefined parameters
|
|
130
|
+
dirty
|
|
131
|
+
);
|
|
132
|
+
}
|
|
122
133
|
},
|
|
123
134
|
[setValue, specificParametersDescriptionForProvider]
|
|
124
135
|
);
|
|
@@ -58,6 +58,7 @@ export declare const businessErrorsEn: {
|
|
|
58
58
|
'shortcircuit.busOutOfVoltage': string;
|
|
59
59
|
'shortcircuit.missingExtensionData': string;
|
|
60
60
|
'shortcircuit.inconsistentVoltageLevels': string;
|
|
61
|
+
'shortcircuit.busOutOfNodeCluster': string;
|
|
61
62
|
'securityAnalysis.contingencyListConfigEmpty': string;
|
|
62
63
|
'dynamicMapping.mappingNameNotProvided': string;
|
|
63
64
|
'dynamicSecurityAnalysis.providerNotFound': string;
|
|
@@ -52,6 +52,7 @@ const businessErrorsEn = {
|
|
|
52
52
|
"shortcircuit.busOutOfVoltage": "Selected bus is out of voltage.",
|
|
53
53
|
"shortcircuit.missingExtensionData": "Missing short-circuit extension data.",
|
|
54
54
|
"shortcircuit.inconsistentVoltageLevels": "Some voltage levels have wrong isc values. Check out the logs to find which ones.",
|
|
55
|
+
"shortcircuit.busOutOfNodeCluster": "Selected bus is out of node cluster",
|
|
55
56
|
"securityAnalysis.contingencyListConfigEmpty": "The configuration does not contain any contingency.",
|
|
56
57
|
"dynamicMapping.mappingNameNotProvided": "Mapping name not provided",
|
|
57
58
|
"dynamicSecurityAnalysis.providerNotFound": "Dynamic security analysis provider not found.",
|
|
@@ -58,6 +58,7 @@ export declare const businessErrorsFr: {
|
|
|
58
58
|
'shortcircuit.busOutOfVoltage': string;
|
|
59
59
|
'shortcircuit.missingExtensionData': string;
|
|
60
60
|
'shortcircuit.inconsistentVoltageLevels': string;
|
|
61
|
+
'shortcircuit.busOutOfNodeCluster': string;
|
|
61
62
|
'securityAnalysis.contingencyListConfigEmpty': string;
|
|
62
63
|
'dynamicMapping.mappingNameNotProvided': string;
|
|
63
64
|
'dynamicSecurityAnalysis.providerNotFound': string;
|
|
@@ -52,6 +52,7 @@ const businessErrorsFr = {
|
|
|
52
52
|
"shortcircuit.busOutOfVoltage": "Bus sélectionné en dehors des limites de tension.",
|
|
53
53
|
"shortcircuit.missingExtensionData": "Données de l'extension court-circuit manquantes.",
|
|
54
54
|
"shortcircuit.inconsistentVoltageLevels": "Des postes ont des données Icc incohérentes. Vérifiez les logs pour déterminer lesquels.",
|
|
55
|
+
"shortcircuit.busOutOfNodeCluster": "Le nœud électrique sélectionné est en dehors de la zone intérieure",
|
|
55
56
|
"securityAnalysis.contingencyListConfigEmpty": "La configuration ne contient aucun aléas.",
|
|
56
57
|
"dynamicMapping.mappingNameNotProvided": "Nom du mapping non fourni",
|
|
57
58
|
"dynamicSecurityAnalysis.providerNotFound": "Simulateur d'analyse de sécurité dynamique non trouvé.",
|