@gridsuite/commons-ui 0.171.0 → 0.173.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/index.js +13 -1
- package/dist/components/parameters/common/contingency-table/columns-definitions.js +1 -1
- package/dist/components/parameters/common/contingency-table/contingency-table.d.ts +4 -2
- package/dist/components/parameters/common/contingency-table/contingency-table.js +23 -12
- package/dist/components/parameters/common/contingency-table/index.d.ts +1 -0
- package/dist/components/parameters/common/contingency-table/types.d.ts +4 -0
- package/dist/components/parameters/common/index.d.ts +1 -0
- package/dist/components/parameters/common/index.js +7 -0
- package/dist/components/parameters/common/parameter-field.js +1 -0
- package/dist/components/parameters/common/parameters.js +1 -1
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js +1 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +1 -0
- package/dist/components/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.js +1 -0
- package/dist/components/parameters/index.js +13 -1
- package/dist/components/parameters/loadflow/load-flow-general-parameters.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-content.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-dialog.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-header.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-inline.js +1 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-utils.js +1 -0
- package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +1 -0
- package/dist/components/parameters/network-visualizations/map-parameters.js +1 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-form.js +1 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-inline.js +1 -0
- package/dist/components/parameters/network-visualizations/single-line-diagram-parameters.js +1 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-form.js +1 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-inline.js +1 -0
- package/dist/components/parameters/security-analysis/columns-definitions.js +1 -1
- package/dist/components/parameters/security-analysis/security-analysis-parameters-dialog.js +1 -0
- package/dist/components/parameters/security-analysis/security-analysis-parameters-form.d.ts +4 -2
- package/dist/components/parameters/security-analysis/security-analysis-parameters-form.js +5 -3
- package/dist/components/parameters/security-analysis/security-analysis-parameters-inline.d.ts +4 -2
- package/dist/components/parameters/security-analysis/security-analysis-parameters-inline.js +4 -1
- package/dist/components/parameters/security-analysis/security-analysis-parameters-selector.js +1 -0
- package/dist/components/parameters/security-analysis/security-analysis-violations-hiding.js +1 -0
- package/dist/components/parameters/security-analysis/use-security-analysis-parameters-form.js +2 -1
- package/dist/components/parameters/sensi/columns-definitions.js +1 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.js +1 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +1 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.js +1 -0
- package/dist/components/parameters/sensi/sensitivity-parameters-selector.js +2 -1
- package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.js +2 -1
- package/dist/components/parameters/sensi/utils.js +2 -1
- package/dist/components/parameters/short-circuit/constants.d.ts +5 -0
- package/dist/components/parameters/short-circuit/constants.js +10 -0
- package/dist/components/parameters/short-circuit/index.js +6 -1
- package/dist/components/parameters/short-circuit/short-circuit-general-tab-panel.d.ts +10 -0
- package/dist/components/parameters/short-circuit/short-circuit-general-tab-panel.js +207 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-content.d.ts +7 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-content.js +109 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-dialog.js +2 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-form.js +33 -30
- package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.d.ts +5 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.js +73 -25
- package/dist/components/parameters/short-circuit/short-circuit-power-electronics-tab-panel.d.ts +2 -0
- package/dist/components/parameters/short-circuit/short-circuit-power-electronics-tab-panel.js +96 -0
- package/dist/components/parameters/short-circuit/short-circuit-study-area-tab-panel.d.ts +2 -0
- package/dist/components/parameters/short-circuit/short-circuit-study-area-tab-panel.js +144 -0
- package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.d.ts +5 -0
- package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.js +29 -8
- package/dist/components/parameters/voltage-init/equipment-selection-parameters.js +1 -0
- package/dist/components/parameters/voltage-init/general-parameters.js +1 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-form.js +1 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-inline.js +1 -0
- package/dist/index.js +13 -1
- package/dist/services/directory.js +1 -1
- package/dist/services/explore.js +1 -1
- package/dist/translations/en/parameters.d.ts +10 -1
- package/dist/translations/en/parameters.js +10 -1
- package/dist/translations/fr/parameters.d.ts +10 -1
- package/dist/translations/fr/parameters.js +10 -1
- package/dist/utils/constants/adornments.js +1 -1
- package/package.json +1 -1
- package/dist/components/parameters/short-circuit/short-circuit-fields.d.ts +0 -10
- package/dist/components/parameters/short-circuit/short-circuit-fields.js +0 -276
package/dist/components/parameters/security-analysis/use-security-analysis-parameters-form.js
CHANGED
|
@@ -40,10 +40,11 @@ import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
|
40
40
|
import "react-querybuilder";
|
|
41
41
|
import "../common/widget/parameter-line-slider.js";
|
|
42
42
|
import { LIMIT_REDUCTIONS_FORM, IST_FORM, LIMIT_DURATION_FORM, toFormValuesLimitReductions } from "../common/limitreductions/columns-definitions.js";
|
|
43
|
+
import { ACTIVATED, DESCRIPTION, NAME, ID } from "../common/parameter-table/constants.js";
|
|
44
|
+
import "../common/contingency-table/columns-definitions.js";
|
|
43
45
|
import "../../filter/HeaderFilterForm.js";
|
|
44
46
|
import { getNameElementEditorEmptyFormData } from "../common/name-element-editor/name-element-editor-utils.js";
|
|
45
47
|
import { getSAParametersFormSchema, toFormValueSaParameters } from "./columns-definitions.js";
|
|
46
|
-
import { ACTIVATED, DESCRIPTION, NAME, ID } from "../common/parameter-table/constants.js";
|
|
47
48
|
const useSecurityAnalysisParametersForm = (parametersBackend, parametersUuid, name, description) => {
|
|
48
49
|
const { providers, params, updateParameters, defaultLimitReductions } = parametersBackend;
|
|
49
50
|
const previousWatchProviderRef = useRef(void 0);
|
|
@@ -39,6 +39,7 @@ import "react-querybuilder";
|
|
|
39
39
|
import "../common/widget/parameter-line-slider.js";
|
|
40
40
|
import "../common/limitreductions/columns-definitions.js";
|
|
41
41
|
import { ACTIVATED } from "../common/parameter-table/constants.js";
|
|
42
|
+
import "../common/contingency-table/columns-definitions.js";
|
|
42
43
|
const MONITORED_BRANCHES_EQUIPMENT_TYPES = [EquipmentType.LINE, EquipmentType.TWO_WINDINGS_TRANSFORMER];
|
|
43
44
|
const INJECTION_DISTRIBUTION_TYPES = [
|
|
44
45
|
{ id: "PROPORTIONAL", label: "Proportional" },
|
|
@@ -39,6 +39,7 @@ import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
|
39
39
|
import "react-querybuilder";
|
|
40
40
|
import "../common/widget/parameter-line-slider.js";
|
|
41
41
|
import "../common/limitreductions/columns-definitions.js";
|
|
42
|
+
import "../common/contingency-table/columns-definitions.js";
|
|
42
43
|
import { fetchSensitivityAnalysisProviders, fetchSensitivityAnalysisParameters, updateSensitivityAnalysisParameters } from "../../../services/sensitivity-analysis.js";
|
|
43
44
|
import { NameElementEditorForm } from "../common/name-element-editor/name-element-editor-form.js";
|
|
44
45
|
import { useSensitivityAnalysisParametersForm } from "./use-sensitivity-analysis-parameters.js";
|
|
@@ -40,6 +40,7 @@ import { LineSeparator } from "../common/line-separator.js";
|
|
|
40
40
|
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
41
41
|
import "../common/widget/parameter-line-slider.js";
|
|
42
42
|
import "../common/limitreductions/columns-definitions.js";
|
|
43
|
+
import "../common/contingency-table/columns-definitions.js";
|
|
43
44
|
import { SensitivityAnalysisFields } from "./sensitivity-Flow-parameters.js";
|
|
44
45
|
import SensitivityParametersSelector from "./sensitivity-parameters-selector.js";
|
|
45
46
|
const styles = {
|
|
@@ -41,6 +41,7 @@ import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
|
41
41
|
import "react-querybuilder";
|
|
42
42
|
import "../common/widget/parameter-line-slider.js";
|
|
43
43
|
import "../common/limitreductions/columns-definitions.js";
|
|
44
|
+
import "../common/contingency-table/columns-definitions.js";
|
|
44
45
|
import { fetchSensitivityAnalysisParameters, setSensitivityAnalysisParameters } from "../../../services/sensitivity-analysis.js";
|
|
45
46
|
import { useSensitivityAnalysisParametersForm } from "./use-sensitivity-analysis-parameters.js";
|
|
46
47
|
import { SensitivityAnalysisParametersForm } from "./sensitivity-analysis-parameters-form.js";
|
|
@@ -38,10 +38,11 @@ import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
|
38
38
|
import "react-querybuilder";
|
|
39
39
|
import "../common/widget/parameter-line-slider.js";
|
|
40
40
|
import "../common/limitreductions/columns-definitions.js";
|
|
41
|
+
import { ParameterTable } from "../common/parameter-table/parameter-table.js";
|
|
42
|
+
import "../common/contingency-table/columns-definitions.js";
|
|
41
43
|
import { SensitivityAnalysisParametersFactorCount } from "./sensitivity-analysis-parameters-factor-count.js";
|
|
42
44
|
import { MAX_VARIABLES_COUNT, MAX_RESULTS_COUNT } from "./constants.js";
|
|
43
45
|
import { isValidSensiParameterRow } from "./utils.js";
|
|
44
|
-
import { ParameterTable } from "../common/parameter-table/parameter-table.js";
|
|
45
46
|
const styles = {
|
|
46
47
|
boxContent: {
|
|
47
48
|
display: "flex",
|
|
@@ -41,12 +41,13 @@ import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
|
41
41
|
import "react-querybuilder";
|
|
42
42
|
import "../common/widget/parameter-line-slider.js";
|
|
43
43
|
import "../common/limitreductions/columns-definitions.js";
|
|
44
|
+
import { ACTIVATED } from "../common/parameter-table/constants.js";
|
|
45
|
+
import "../common/contingency-table/columns-definitions.js";
|
|
44
46
|
import { getFormSchema, getSensiNodesformatNewParams, getSensiPstformatNewParams, getSensiHvdcformatNewParams, getSensiInjectionsformatNewParams, getSensiInjectionsSetformatNewParams, filterSensiParameterRows } from "./utils.js";
|
|
45
47
|
import { DEFAULT_FACTOR_COUNT, PARAMETER_SENSI_NODES, PARAMETER_SENSI_PST, PARAMETER_SENSI_HVDC, PARAMETER_SENSI_INJECTION, PARAMETER_SENSI_INJECTIONS_SET, FLOW_VOLTAGE_SENSITIVITY_VALUE_THRESHOLD, ANGLE_FLOW_SENSITIVITY_VALUE_THRESHOLD, FLOW_FLOW_SENSITIVITY_VALUE_THRESHOLD, CONTAINER_NAME, CONTAINER_ID, EQUIPMENTS_IN_VOLTAGE_REGULATION, SUPERVISED_VOLTAGE_LEVELS, SENSITIVITY_TYPE, PSTS, MONITORED_BRANCHES, HVDC_LINES, INJECTIONS, DISTRIBUTION_TYPE, MAX_RESULTS_COUNT, MAX_VARIABLES_COUNT } from "./constants.js";
|
|
46
48
|
import { getSensitivityAnalysisFactorsCount, setSensitivityAnalysisParameters } from "../../../services/sensitivity-analysis.js";
|
|
47
49
|
import "../../filter/HeaderFilterForm.js";
|
|
48
50
|
import { getNameElementEditorEmptyFormData } from "../common/name-element-editor/name-element-editor-utils.js";
|
|
49
|
-
import { ACTIVATED } from "../common/parameter-table/constants.js";
|
|
50
51
|
const useSensitivityAnalysisParametersForm = ({
|
|
51
52
|
studyUuid,
|
|
52
53
|
currentNodeUuid,
|
|
@@ -40,9 +40,10 @@ import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
|
40
40
|
import "react-querybuilder";
|
|
41
41
|
import "../common/widget/parameter-line-slider.js";
|
|
42
42
|
import "../common/limitreductions/columns-definitions.js";
|
|
43
|
+
import { ACTIVATED } from "../common/parameter-table/constants.js";
|
|
44
|
+
import "../common/contingency-table/columns-definitions.js";
|
|
43
45
|
import "../../filter/HeaderFilterForm.js";
|
|
44
46
|
import { getNameElementEditorSchema } from "../common/name-element-editor/name-element-editor-utils.js";
|
|
45
|
-
import { ACTIVATED } from "../common/parameter-table/constants.js";
|
|
46
47
|
const getMonitoredBranchesSchema = () => {
|
|
47
48
|
return {
|
|
48
49
|
[MONITORED_BRANCHES]: yup.array().of(
|
|
@@ -23,9 +23,14 @@ export declare const SHORT_CIRCUIT_WITH_NEUTRAL_POSITION = "withNeutralPosition"
|
|
|
23
23
|
export declare const SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE = "initialVoltageProfileMode";
|
|
24
24
|
export declare const SHORT_CIRCUIT_VOLTAGE_RANGES = "voltageRanges";
|
|
25
25
|
export declare const SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_IN_CALCULATION_CLUSTER = "onlyStartedGeneratorsInCalculationCluster";
|
|
26
|
+
export declare const SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_OUTSIDE_CALCULATION_CLUSTER = "onlyStartedGeneratorsOutsideCalculationCluster";
|
|
27
|
+
export declare const NODE_CLUSTER = "nodeCluster";
|
|
28
|
+
export declare const NODE_CLUSTER_FILTER_IDS = "nodeClusterFilterIds";
|
|
26
29
|
export declare const SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS = "modelPowerElectronics";
|
|
27
30
|
export declare const SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS = "powerElectronicsMaterials";
|
|
28
31
|
export declare const SHORT_CIRCUIT_POWER_ELECTRONICS_CLUSTERS = "powerElectronicsClusters";
|
|
32
|
+
export declare const STARTED_GENERATORS_IN_CALCULATION_CLUSTER_THRESHOLD = "startedGeneratorsInCalculationClusterThreshold";
|
|
33
|
+
export declare const STARTED_GENERATORS_OUTSIDE_CALCULATION_CLUSTER_THRESHOLD = "startedGeneratorsOutsideCalculationClusterThreshold";
|
|
29
34
|
export declare const intlPredefinedParametersOptions: () => {
|
|
30
35
|
id: string;
|
|
31
36
|
label: string;
|
|
@@ -19,9 +19,14 @@ const SHORT_CIRCUIT_WITH_NEUTRAL_POSITION = "withNeutralPosition";
|
|
|
19
19
|
const SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE = "initialVoltageProfileMode";
|
|
20
20
|
const SHORT_CIRCUIT_VOLTAGE_RANGES = "voltageRanges";
|
|
21
21
|
const SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_IN_CALCULATION_CLUSTER = "onlyStartedGeneratorsInCalculationCluster";
|
|
22
|
+
const SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_OUTSIDE_CALCULATION_CLUSTER = "onlyStartedGeneratorsOutsideCalculationCluster";
|
|
23
|
+
const NODE_CLUSTER = "nodeCluster";
|
|
24
|
+
const NODE_CLUSTER_FILTER_IDS = "nodeClusterFilterIds";
|
|
22
25
|
const SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS = "modelPowerElectronics";
|
|
23
26
|
const SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS = "powerElectronicsMaterials";
|
|
24
27
|
const SHORT_CIRCUIT_POWER_ELECTRONICS_CLUSTERS = "powerElectronicsClusters";
|
|
28
|
+
const STARTED_GENERATORS_IN_CALCULATION_CLUSTER_THRESHOLD = "startedGeneratorsInCalculationClusterThreshold";
|
|
29
|
+
const STARTED_GENERATORS_OUTSIDE_CALCULATION_CLUSTER_THRESHOLD = "startedGeneratorsOutsideCalculationClusterThreshold";
|
|
25
30
|
const intlPredefinedParametersOptions = () => [
|
|
26
31
|
{
|
|
27
32
|
id: "ICC_MAX_WITH_NOMINAL_VOLTAGE_MAP",
|
|
@@ -60,10 +65,13 @@ const onlyStartedGeneratorsOptions = {
|
|
|
60
65
|
};
|
|
61
66
|
export {
|
|
62
67
|
InitialVoltage,
|
|
68
|
+
NODE_CLUSTER,
|
|
69
|
+
NODE_CLUSTER_FILTER_IDS,
|
|
63
70
|
PredefinedParameters,
|
|
64
71
|
SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE,
|
|
65
72
|
SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS,
|
|
66
73
|
SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_IN_CALCULATION_CLUSTER,
|
|
74
|
+
SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_OUTSIDE_CALCULATION_CLUSTER,
|
|
67
75
|
SHORT_CIRCUIT_POWER_ELECTRONICS_CLUSTERS,
|
|
68
76
|
SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS,
|
|
69
77
|
SHORT_CIRCUIT_PREDEFINED_PARAMS,
|
|
@@ -73,6 +81,8 @@ export {
|
|
|
73
81
|
SHORT_CIRCUIT_WITH_NEUTRAL_POSITION,
|
|
74
82
|
SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS,
|
|
75
83
|
SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS,
|
|
84
|
+
STARTED_GENERATORS_IN_CALCULATION_CLUSTER_THRESHOLD,
|
|
85
|
+
STARTED_GENERATORS_OUTSIDE_CALCULATION_CLUSTER_THRESHOLD,
|
|
76
86
|
intlInitialVoltageProfileMode,
|
|
77
87
|
intlPredefinedParametersOptions,
|
|
78
88
|
onlyStartedGeneratorsOptions
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { InitialVoltage, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_IN_CALCULATION_CLUSTER, SHORT_CIRCUIT_POWER_ELECTRONICS_CLUSTERS, SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS, 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";
|
|
1
|
+
import { InitialVoltage, NODE_CLUSTER, NODE_CLUSTER_FILTER_IDS, PredefinedParameters, SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_IN_CALCULATION_CLUSTER, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_OUTSIDE_CALCULATION_CLUSTER, SHORT_CIRCUIT_POWER_ELECTRONICS_CLUSTERS, SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS, 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, STARTED_GENERATORS_IN_CALCULATION_CLUSTER_THRESHOLD, STARTED_GENERATORS_OUTSIDE_CALCULATION_CLUSTER_THRESHOLD, 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
|
+
NODE_CLUSTER,
|
|
7
|
+
NODE_CLUSTER_FILTER_IDS,
|
|
6
8
|
PredefinedParameters,
|
|
7
9
|
SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE,
|
|
8
10
|
SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS,
|
|
9
11
|
SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_IN_CALCULATION_CLUSTER,
|
|
12
|
+
SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_OUTSIDE_CALCULATION_CLUSTER,
|
|
10
13
|
SHORT_CIRCUIT_POWER_ELECTRONICS_CLUSTERS,
|
|
11
14
|
SHORT_CIRCUIT_POWER_ELECTRONICS_MATERIALS,
|
|
12
15
|
SHORT_CIRCUIT_PREDEFINED_PARAMS,
|
|
@@ -16,6 +19,8 @@ export {
|
|
|
16
19
|
SHORT_CIRCUIT_WITH_NEUTRAL_POSITION,
|
|
17
20
|
SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS,
|
|
18
21
|
SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS,
|
|
22
|
+
STARTED_GENERATORS_IN_CALCULATION_CLUSTER_THRESHOLD,
|
|
23
|
+
STARTED_GENERATORS_OUTSIDE_CALCULATION_CLUSTER_THRESHOLD,
|
|
19
24
|
ShortCircuitParametersEditionDialog,
|
|
20
25
|
ShortCircuitParametersInLine,
|
|
21
26
|
intlInitialVoltageProfileMode,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TabPanelProps } from '@mui/lab';
|
|
2
|
+
import { PredefinedParameters } from './constants';
|
|
3
|
+
export interface ShortCircuitFieldsProps extends TabPanelProps {
|
|
4
|
+
resetAll: (predefinedParams: PredefinedParameters) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare enum Status {
|
|
7
|
+
SUCCESS = "SUCCESS",
|
|
8
|
+
ERROR = "ERROR"
|
|
9
|
+
}
|
|
10
|
+
export declare const ShortCircuitGeneralTabPanel: import('react').ForwardRefExoticComponent<Omit<Readonly<ShortCircuitFieldsProps>, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useState, useMemo, useEffect } from "react";
|
|
3
|
+
import { Grid } from "@mui/material";
|
|
4
|
+
import { green, red } from "@mui/material/colors";
|
|
5
|
+
import { Lens } from "@mui/icons-material";
|
|
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";
|
|
8
|
+
import { VoltageTable } from "./short-circuit-voltage-table.js";
|
|
9
|
+
import GridItem from "../../grid/grid-item.js";
|
|
10
|
+
import GridSection from "../../grid/grid-section.js";
|
|
11
|
+
import "react-intl";
|
|
12
|
+
import { FieldLabel } from "../../inputs/reactHookForm/utils/FieldLabel.js";
|
|
13
|
+
import "../../overflowableText/OverflowableText.js";
|
|
14
|
+
import "../../../utils/conversionUtils.js";
|
|
15
|
+
import "../../../utils/types/equipmentType.js";
|
|
16
|
+
import "../../../utils/yupConfig.js";
|
|
17
|
+
import "localized-countries";
|
|
18
|
+
import "localized-countries/data/fr";
|
|
19
|
+
import "localized-countries/data/en";
|
|
20
|
+
import "notistack";
|
|
21
|
+
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
22
|
+
import "yup";
|
|
23
|
+
import "../../treeViewFinder/TreeViewFinder.js";
|
|
24
|
+
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
25
|
+
import "../../customAGGrid/customAggrid.js";
|
|
26
|
+
import "ag-grid-community";
|
|
27
|
+
import "react-papaparse";
|
|
28
|
+
import "react-csv-downloader";
|
|
29
|
+
import { CheckboxInput } from "../../inputs/reactHookForm/booleans/CheckboxInput.js";
|
|
30
|
+
import { RadioInput } from "../../inputs/reactHookForm/booleans/RadioInput.js";
|
|
31
|
+
import { SwitchInput } from "../../inputs/reactHookForm/booleans/SwitchInput.js";
|
|
32
|
+
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
33
|
+
import { MuiSelectInput } from "../../inputs/reactHookForm/selectInputs/MuiSelectInput.js";
|
|
34
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
35
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
36
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
37
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
38
|
+
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
39
|
+
import "@react-querybuilder/material";
|
|
40
|
+
import "../../filter/expert/expertFilterConstants.js";
|
|
41
|
+
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
42
|
+
import "uuid";
|
|
43
|
+
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
44
|
+
import "react-querybuilder";
|
|
45
|
+
import { COMMON_PARAMETERS, SPECIFIC_PARAMETERS } from "../common/constants.js";
|
|
46
|
+
import { TabPanel } from "../common/parameters.js";
|
|
47
|
+
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
48
|
+
import "../common/widget/parameter-line-slider.js";
|
|
49
|
+
import "../common/limitreductions/columns-definitions.js";
|
|
50
|
+
import "../common/contingency-table/columns-definitions.js";
|
|
51
|
+
import { ShortCircuitParametersTabValues } from "./short-circuit-parameters-utils.js";
|
|
52
|
+
var Status = /* @__PURE__ */ ((Status2) => {
|
|
53
|
+
Status2["SUCCESS"] = "SUCCESS";
|
|
54
|
+
Status2["ERROR"] = "ERROR";
|
|
55
|
+
return Status2;
|
|
56
|
+
})(Status || {});
|
|
57
|
+
const ShortCircuitGeneralTabPanel = forwardRef(
|
|
58
|
+
({ resetAll, ...othersTabPanelProps }, ref) => {
|
|
59
|
+
const [status, setStatus] = useState(
|
|
60
|
+
"SUCCESS"
|
|
61
|
+
/* SUCCESS */
|
|
62
|
+
);
|
|
63
|
+
const watchInitialVoltageProfileMode = useWatch({
|
|
64
|
+
name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE}`
|
|
65
|
+
});
|
|
66
|
+
const watchPredefinedParams = useWatch({
|
|
67
|
+
name: SHORT_CIRCUIT_PREDEFINED_PARAMS
|
|
68
|
+
});
|
|
69
|
+
const watchLoads = useWatch({
|
|
70
|
+
name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_WITH_LOADS}`
|
|
71
|
+
});
|
|
72
|
+
const watchShuntCompensators = useWatch({
|
|
73
|
+
name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS}`
|
|
74
|
+
});
|
|
75
|
+
const watchVSC = useWatch({
|
|
76
|
+
name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS}`
|
|
77
|
+
});
|
|
78
|
+
const watchNeutralPosition = useWatch({
|
|
79
|
+
name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_WITH_NEUTRAL_POSITION}`
|
|
80
|
+
});
|
|
81
|
+
const watchOnlyStartedGeneratorsInCalculationCluster = useWatch({
|
|
82
|
+
name: `${SPECIFIC_PARAMETERS}.${SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_IN_CALCULATION_CLUSTER}`
|
|
83
|
+
});
|
|
84
|
+
const isIccMinFeaturesDefaultConfiguration = useMemo(() => {
|
|
85
|
+
return !watchLoads && !watchShuntCompensators && !watchVSC && !watchNeutralPosition && // if watchOnlyStartedGeneratorsInCalculationCluster is undefined, we consider IccMinFeaturesDefaultConfiguration as true
|
|
86
|
+
(watchOnlyStartedGeneratorsInCalculationCluster ?? true);
|
|
87
|
+
}, [
|
|
88
|
+
watchLoads,
|
|
89
|
+
watchShuntCompensators,
|
|
90
|
+
watchVSC,
|
|
91
|
+
watchNeutralPosition,
|
|
92
|
+
watchOnlyStartedGeneratorsInCalculationCluster
|
|
93
|
+
]);
|
|
94
|
+
const isIccMaxFeaturesDefaultConfiguration = useMemo(() => {
|
|
95
|
+
return !watchLoads && !watchShuntCompensators && watchVSC && !watchNeutralPosition && // if watchOnlyStartedGeneratorsInCalculationCluster is undefined, we consider IccMaxFeaturesDefaultConfiguration as true
|
|
96
|
+
!(watchOnlyStartedGeneratorsInCalculationCluster ?? false);
|
|
97
|
+
}, [
|
|
98
|
+
watchLoads,
|
|
99
|
+
watchShuntCompensators,
|
|
100
|
+
watchVSC,
|
|
101
|
+
watchNeutralPosition,
|
|
102
|
+
watchOnlyStartedGeneratorsInCalculationCluster
|
|
103
|
+
]);
|
|
104
|
+
const predefinedParamsOptions = useMemo(() => {
|
|
105
|
+
return intlPredefinedParametersOptions();
|
|
106
|
+
}, []);
|
|
107
|
+
const initialVoltageProfileMode = useMemo(() => {
|
|
108
|
+
return intlInitialVoltageProfileMode();
|
|
109
|
+
}, []);
|
|
110
|
+
const statusColor = useMemo(
|
|
111
|
+
() => ({ color: status === "SUCCESS" ? green[500] : red[500] }),
|
|
112
|
+
[status]
|
|
113
|
+
);
|
|
114
|
+
const statusToShow = /* @__PURE__ */ jsx(Lens, { fontSize: "medium", sx: statusColor });
|
|
115
|
+
const onPredefinedParametersManualChange = (event) => {
|
|
116
|
+
const newPredefinedParameters = event.target.value;
|
|
117
|
+
resetAll(newPredefinedParameters);
|
|
118
|
+
};
|
|
119
|
+
const feederResult = /* @__PURE__ */ jsxs(Grid, { container: true, alignItems: "center", spacing: 2, direction: "row", children: [
|
|
120
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 10, children: /* @__PURE__ */ jsx(FieldLabel, { label: "descWithFeederResult" }) }),
|
|
121
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 2, children: /* @__PURE__ */ jsx(SwitchInput, { name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_WITH_FEEDER_RESULT}` }) })
|
|
122
|
+
] });
|
|
123
|
+
const predefinedParameters = /* @__PURE__ */ jsx(
|
|
124
|
+
MuiSelectInput,
|
|
125
|
+
{
|
|
126
|
+
name: SHORT_CIRCUIT_PREDEFINED_PARAMS,
|
|
127
|
+
options: predefinedParamsOptions,
|
|
128
|
+
onChange: onPredefinedParametersManualChange,
|
|
129
|
+
fullWidth: true
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
const initialVoltageProfileModeField = /* @__PURE__ */ jsx(
|
|
133
|
+
RadioInput,
|
|
134
|
+
{
|
|
135
|
+
name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE}`,
|
|
136
|
+
options: Object.values(initialVoltageProfileMode)
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
const loads = /* @__PURE__ */ jsx(CheckboxInput, { name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_WITH_LOADS}`, label: "shortCircuitLoads" });
|
|
140
|
+
const vsc = /* @__PURE__ */ jsx(
|
|
141
|
+
CheckboxInput,
|
|
142
|
+
{
|
|
143
|
+
name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS}`,
|
|
144
|
+
label: "shortCircuitHvdc"
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
const shuntCompensators = /* @__PURE__ */ jsx(
|
|
148
|
+
CheckboxInput,
|
|
149
|
+
{
|
|
150
|
+
name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS}`,
|
|
151
|
+
label: "shortCircuitShuntCompensators"
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
const neutralPosition = /* @__PURE__ */ jsx(
|
|
155
|
+
CheckboxInput,
|
|
156
|
+
{
|
|
157
|
+
name: `${COMMON_PARAMETERS}.${SHORT_CIRCUIT_WITH_NEUTRAL_POSITION}`,
|
|
158
|
+
label: "shortCircuitNeutralPosition"
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
useEffect(() => {
|
|
162
|
+
const isIccMaxWithNominalVoltageMap = watchPredefinedParams === PredefinedParameters.ICC_MAX_WITH_NOMINAL_VOLTAGE_MAP;
|
|
163
|
+
const isIccMinWithNominal = watchPredefinedParams === PredefinedParameters.ICC_MIN_WITH_NOMINAL_VOLTAGE_MAP;
|
|
164
|
+
const isInitialVoltageNominal = watchInitialVoltageProfileMode === InitialVoltage.NOMINAL;
|
|
165
|
+
const isIccMaxNominalDefaultConfiguration = isIccMaxWithNominalVoltageMap && isInitialVoltageNominal;
|
|
166
|
+
const isIccMinNominalDefaultConfiguration = isIccMinWithNominal && isInitialVoltageNominal;
|
|
167
|
+
const isCEI909DefaultConfiguration = watchPredefinedParams === PredefinedParameters.ICC_MAX_WITH_CEI909 && watchInitialVoltageProfileMode === InitialVoltage.CEI909;
|
|
168
|
+
const isIccMaxDefaultConfiguration = (isIccMaxNominalDefaultConfiguration || isCEI909DefaultConfiguration) && isIccMaxFeaturesDefaultConfiguration;
|
|
169
|
+
const isIccMinDefaultConfiguration = isIccMinNominalDefaultConfiguration && isIccMinFeaturesDefaultConfiguration;
|
|
170
|
+
setStatus(
|
|
171
|
+
isIccMaxDefaultConfiguration || isIccMinDefaultConfiguration ? "SUCCESS" : "ERROR"
|
|
172
|
+
/* ERROR */
|
|
173
|
+
);
|
|
174
|
+
}, [
|
|
175
|
+
watchInitialVoltageProfileMode,
|
|
176
|
+
watchPredefinedParams,
|
|
177
|
+
isIccMaxFeaturesDefaultConfiguration,
|
|
178
|
+
isIccMinFeaturesDefaultConfiguration
|
|
179
|
+
]);
|
|
180
|
+
return /* @__PURE__ */ jsx(TabPanel, { index: ShortCircuitParametersTabValues.GENERAL, ref, ...othersTabPanelProps, children: /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, paddingLeft: 2, children: [
|
|
181
|
+
/* @__PURE__ */ jsx(Grid, { container: true, paddingTop: 2, xl: 6, children: /* @__PURE__ */ jsx(GridItem, { size: 10, children: feederResult }) }),
|
|
182
|
+
/* @__PURE__ */ jsx(GridSection, { title: "ShortCircuitPredefinedParameters", heading: 4 }),
|
|
183
|
+
/* @__PURE__ */ jsxs(Grid, { xl: 6, container: true, spacing: 1, alignItems: "center", children: [
|
|
184
|
+
/* @__PURE__ */ jsx(GridItem, { size: 9, children: predefinedParameters }),
|
|
185
|
+
/* @__PURE__ */ jsx(GridItem, { size: 2, children: statusToShow })
|
|
186
|
+
] }),
|
|
187
|
+
/* @__PURE__ */ jsx(GridSection, { title: "ShortCircuitCharacteristics", heading: 4 }),
|
|
188
|
+
/* @__PURE__ */ jsxs(Grid, { container: true, spacing: 5, children: [
|
|
189
|
+
/* @__PURE__ */ jsxs(Grid, { item: true, children: [
|
|
190
|
+
/* @__PURE__ */ jsx(GridItem, { children: loads }),
|
|
191
|
+
/* @__PURE__ */ jsx(GridItem, { children: shuntCompensators })
|
|
192
|
+
] }),
|
|
193
|
+
/* @__PURE__ */ jsxs(Grid, { item: true, xs: 8, children: [
|
|
194
|
+
/* @__PURE__ */ jsx(GridItem, { children: vsc }),
|
|
195
|
+
/* @__PURE__ */ jsx(GridItem, { children: neutralPosition })
|
|
196
|
+
] })
|
|
197
|
+
] }),
|
|
198
|
+
/* @__PURE__ */ jsx(GridSection, { title: "ShortCircuitVoltageProfileMode", heading: 4 }),
|
|
199
|
+
/* @__PURE__ */ jsx(Grid, { container: true, children: /* @__PURE__ */ jsx(GridItem, { size: 12, children: initialVoltageProfileModeField }) }),
|
|
200
|
+
/* @__PURE__ */ jsx(VoltageTable, { voltageProfileMode: watchInitialVoltageProfileMode })
|
|
201
|
+
] }) });
|
|
202
|
+
}
|
|
203
|
+
);
|
|
204
|
+
export {
|
|
205
|
+
ShortCircuitGeneralTabPanel,
|
|
206
|
+
Status
|
|
207
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UseShortCircuitParametersFormReturn } from './use-short-circuit-parameters-form';
|
|
2
|
+
type ShortCircuitParametersContentProps = {
|
|
3
|
+
shortCircuitMethods: UseShortCircuitParametersFormReturn;
|
|
4
|
+
isDeveloperMode: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare function ShortCircuitParametersContent({ shortCircuitMethods, isDeveloperMode, }: Readonly<ShortCircuitParametersContentProps>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default ShortCircuitParametersContent;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { useWatch } from "react-hook-form";
|
|
4
|
+
import { Grid, Tabs, Tab, Box } from "@mui/material";
|
|
5
|
+
import { FormattedMessage } from "react-intl";
|
|
6
|
+
import { getTabStyle, parametersStyles } from "../parameters-style.js";
|
|
7
|
+
import { ShortCircuitParametersTabValues } from "./short-circuit-parameters-utils.js";
|
|
8
|
+
import { ShortCircuitGeneralTabPanel } from "./short-circuit-general-tab-panel.js";
|
|
9
|
+
import { ShortCircuitStudyAreaTabPanel } from "./short-circuit-study-area-tab-panel.js";
|
|
10
|
+
import { ShortCircuitPowerElectronicsTabPanel } from "./short-circuit-power-electronics-tab-panel.js";
|
|
11
|
+
import { SPECIFIC_PARAMETERS } from "../common/constants.js";
|
|
12
|
+
import "../../../utils/conversionUtils.js";
|
|
13
|
+
import "../../../utils/types/equipmentType.js";
|
|
14
|
+
import "@mui/icons-material";
|
|
15
|
+
import "../../../utils/yupConfig.js";
|
|
16
|
+
import "localized-countries";
|
|
17
|
+
import "localized-countries/data/fr";
|
|
18
|
+
import "localized-countries/data/en";
|
|
19
|
+
import "notistack";
|
|
20
|
+
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
21
|
+
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
22
|
+
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
23
|
+
import "../../treeViewFinder/TreeViewFinder.js";
|
|
24
|
+
import "../../overflowableText/OverflowableText.js";
|
|
25
|
+
import "yup";
|
|
26
|
+
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
27
|
+
import "../../customAGGrid/customAggrid.js";
|
|
28
|
+
import "ag-grid-community";
|
|
29
|
+
import "react-papaparse";
|
|
30
|
+
import "react-csv-downloader";
|
|
31
|
+
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
32
|
+
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
33
|
+
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
34
|
+
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
35
|
+
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
36
|
+
import "@react-querybuilder/material";
|
|
37
|
+
import "../../filter/expert/expertFilterConstants.js";
|
|
38
|
+
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
39
|
+
import "uuid";
|
|
40
|
+
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
41
|
+
import "react-querybuilder";
|
|
42
|
+
import "../common/widget/parameter-line-slider.js";
|
|
43
|
+
import "../common/limitreductions/columns-definitions.js";
|
|
44
|
+
import "../common/contingency-table/columns-definitions.js";
|
|
45
|
+
const styles = {
|
|
46
|
+
container: {
|
|
47
|
+
...parametersStyles.scrollableGrid,
|
|
48
|
+
maxHeight: "100%"
|
|
49
|
+
},
|
|
50
|
+
maxWidth: {
|
|
51
|
+
width: "100%"
|
|
52
|
+
},
|
|
53
|
+
wrapper: {
|
|
54
|
+
flexGrow: 1,
|
|
55
|
+
overflow: "auto",
|
|
56
|
+
paddingLeft: 1
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
function ShortCircuitParametersContent({
|
|
60
|
+
shortCircuitMethods,
|
|
61
|
+
isDeveloperMode
|
|
62
|
+
}) {
|
|
63
|
+
const { resetAll, selectedTab, handleTabChange, tabIndexesWithError } = shortCircuitMethods;
|
|
64
|
+
const watchSpecificParameters = useWatch({
|
|
65
|
+
name: `${SPECIFIC_PARAMETERS}`
|
|
66
|
+
});
|
|
67
|
+
const isThereSpecificParameters = useMemo(
|
|
68
|
+
() => Object.keys(watchSpecificParameters).length > 0 && watchSpecificParameters.constructor === Object,
|
|
69
|
+
[watchSpecificParameters]
|
|
70
|
+
);
|
|
71
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
72
|
+
/* @__PURE__ */ jsx(Grid, { item: true, sx: { width: "100%" }, children: /* @__PURE__ */ jsxs(Tabs, { value: selectedTab, onChange: handleTabChange, children: [
|
|
73
|
+
/* @__PURE__ */ jsx(
|
|
74
|
+
Tab,
|
|
75
|
+
{
|
|
76
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: ShortCircuitParametersTabValues.GENERAL }),
|
|
77
|
+
value: ShortCircuitParametersTabValues.GENERAL,
|
|
78
|
+
sx: getTabStyle(tabIndexesWithError, ShortCircuitParametersTabValues.GENERAL)
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
isThereSpecificParameters && isDeveloperMode && /* @__PURE__ */ jsx(
|
|
82
|
+
Tab,
|
|
83
|
+
{
|
|
84
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: ShortCircuitParametersTabValues.STUDY_AREA }),
|
|
85
|
+
value: ShortCircuitParametersTabValues.STUDY_AREA,
|
|
86
|
+
sx: getTabStyle(tabIndexesWithError, ShortCircuitParametersTabValues.STUDY_AREA)
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
isThereSpecificParameters && isDeveloperMode && /* @__PURE__ */ jsx(
|
|
90
|
+
Tab,
|
|
91
|
+
{
|
|
92
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: ShortCircuitParametersTabValues.POWER_ELECTRONICS }),
|
|
93
|
+
value: ShortCircuitParametersTabValues.POWER_ELECTRONICS,
|
|
94
|
+
sx: getTabStyle(tabIndexesWithError, ShortCircuitParametersTabValues.POWER_ELECTRONICS)
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
] }) }),
|
|
98
|
+
/* @__PURE__ */ jsx(Box, { sx: styles.wrapper, children: /* @__PURE__ */ jsx(Grid, { container: true, sx: styles.container, children: /* @__PURE__ */ jsxs(Grid, { item: true, sx: styles.maxWidth, children: [
|
|
99
|
+
/* @__PURE__ */ jsx(ShortCircuitGeneralTabPanel, { resetAll, value: selectedTab }),
|
|
100
|
+
isThereSpecificParameters && isDeveloperMode && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
101
|
+
/* @__PURE__ */ jsx(ShortCircuitStudyAreaTabPanel, { value: selectedTab }),
|
|
102
|
+
/* @__PURE__ */ jsx(ShortCircuitPowerElectronicsTabPanel, { value: selectedTab })
|
|
103
|
+
] })
|
|
104
|
+
] }) }) })
|
|
105
|
+
] });
|
|
106
|
+
}
|
|
107
|
+
export {
|
|
108
|
+
ShortCircuitParametersContent as default
|
|
109
|
+
};
|
|
@@ -43,6 +43,7 @@ import { ShortCircuitParametersForm } from "./short-circuit-parameters-form.js";
|
|
|
43
43
|
import { ComputingType } from "../common/computing-type.js";
|
|
44
44
|
import "../common/widget/parameter-line-slider.js";
|
|
45
45
|
import "../common/limitreductions/columns-definitions.js";
|
|
46
|
+
import "../common/contingency-table/columns-definitions.js";
|
|
46
47
|
function ShortCircuitParametersEditionDialog({
|
|
47
48
|
id,
|
|
48
49
|
open,
|
|
@@ -85,6 +86,7 @@ function ShortCircuitParametersEditionDialog({
|
|
|
85
86
|
},
|
|
86
87
|
titleId,
|
|
87
88
|
disabledSave: disableSave,
|
|
89
|
+
maxWidth: "lg",
|
|
88
90
|
children: /* @__PURE__ */ jsx(
|
|
89
91
|
ShortCircuitParametersForm,
|
|
90
92
|
{
|
|
@@ -33,42 +33,45 @@ import "uuid";
|
|
|
33
33
|
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
34
34
|
import "react-querybuilder";
|
|
35
35
|
import { parametersStyles } from "../parameters-style.js";
|
|
36
|
-
import
|
|
36
|
+
import ShortCircuitParametersContent from "./short-circuit-parameters-content.js";
|
|
37
|
+
const styles = {
|
|
38
|
+
shortCircuitParameters: {
|
|
39
|
+
height: "100%",
|
|
40
|
+
display: "flex",
|
|
41
|
+
position: "relative",
|
|
42
|
+
flexDirection: "column"
|
|
43
|
+
}
|
|
44
|
+
};
|
|
37
45
|
function ShortCircuitParametersForm({
|
|
38
46
|
shortCircuitMethods,
|
|
39
47
|
renderTitleFields,
|
|
40
48
|
renderActions,
|
|
41
49
|
isDeveloperMode
|
|
42
50
|
}) {
|
|
43
|
-
const { formMethods, formSchema, paramsLoaded
|
|
44
|
-
return /* @__PURE__ */ jsx(CustomFormProvider, { validationSchema: formSchema, ...formMethods, removeOptional: true, children: /* @__PURE__ */ jsxs(
|
|
45
|
-
|
|
46
|
-
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
)
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
) });
|
|
51
|
+
const { formMethods, formSchema, paramsLoaded } = shortCircuitMethods;
|
|
52
|
+
return /* @__PURE__ */ jsx(CustomFormProvider, { validationSchema: formSchema, ...formMethods, removeOptional: true, children: /* @__PURE__ */ jsxs(Box, { sx: styles.shortCircuitParameters, children: [
|
|
53
|
+
/* @__PURE__ */ jsx(Grid, { item: true, container: true, direction: "column", children: renderTitleFields?.() }),
|
|
54
|
+
paramsLoaded ? /* @__PURE__ */ jsx(Grid, { sx: parametersStyles.scrollableGrid, children: /* @__PURE__ */ jsx(
|
|
55
|
+
ShortCircuitParametersContent,
|
|
56
|
+
{
|
|
57
|
+
isDeveloperMode,
|
|
58
|
+
shortCircuitMethods
|
|
59
|
+
}
|
|
60
|
+
) }) : /* @__PURE__ */ jsx(LinearProgress, {}),
|
|
61
|
+
/* @__PURE__ */ jsx(
|
|
62
|
+
Grid,
|
|
63
|
+
{
|
|
64
|
+
item: true,
|
|
65
|
+
container: true,
|
|
66
|
+
direction: "column",
|
|
67
|
+
sx: {
|
|
68
|
+
position: "absolute",
|
|
69
|
+
bottom: "15px"
|
|
70
|
+
},
|
|
71
|
+
children: renderActions?.()
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
] }) });
|
|
72
75
|
}
|
|
73
76
|
export {
|
|
74
77
|
ShortCircuitParametersForm
|
|
@@ -41,6 +41,7 @@ import { LabelledButton } from "../common/parameters.js";
|
|
|
41
41
|
import { CreateParameterDialog } from "../common/parameters-creation-dialog.js";
|
|
42
42
|
import "../common/widget/parameter-line-slider.js";
|
|
43
43
|
import "../common/limitreductions/columns-definitions.js";
|
|
44
|
+
import "../common/contingency-table/columns-definitions.js";
|
|
44
45
|
import { ShortCircuitParametersForm } from "./short-circuit-parameters-form.js";
|
|
45
46
|
import { useShortCircuitParametersForm } from "./use-short-circuit-parameters-form.js";
|
|
46
47
|
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
@@ -2,6 +2,11 @@ import { InitialVoltage } from './constants';
|
|
|
2
2
|
import { default as yup } from '../../../utils/yupConfig';
|
|
3
3
|
import { SpecificParameterInfos, SpecificParametersValues } from '../../../utils';
|
|
4
4
|
import { SnackInputs } from '../../../hooks';
|
|
5
|
+
export declare enum ShortCircuitParametersTabValues {
|
|
6
|
+
GENERAL = "General",
|
|
7
|
+
STUDY_AREA = "StudyArea",
|
|
8
|
+
POWER_ELECTRONICS = "PowerElectronics"
|
|
9
|
+
}
|
|
5
10
|
export declare const getCommonShortCircuitParametersFormSchema: () => yup.ObjectSchema<{
|
|
6
11
|
commonParameters: {
|
|
7
12
|
withFeederResult: NonNullable<boolean | undefined>;
|