@gridsuite/commons-ui 0.174.0 → 0.175.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.
|
@@ -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
|
);
|