@gridsuite/commons-ui 0.239.0 → 0.241.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/README.md +6 -2
- package/dist/components/composite/agGridTable/cellEditors/numericEditor.d.ts +9 -3
- package/dist/components/composite/agGridTable/cellEditors/numericEditor.js +24 -5
- package/dist/components/composite/customAGGrid/custom-aggrid-filters/custom-aggrid-comparator-filter.js +2 -2
- package/dist/components/composite/customAGGrid/custom-aggrid-filters/custom-aggrid-text-filter.js +4 -4
- package/dist/components/composite/customAGGrid/custom-aggrid-filters/custom-filter-icon.js +2 -2
- package/dist/components/composite/customAGGrid/custom-aggrid-header.js +26 -13
- package/dist/components/composite/customAGGrid/custom-aggrid-menu.js +2 -2
- package/dist/components/composite/dnd-table/dnd-table-bottom-left-buttons.js +4 -4
- package/dist/components/composite/dnd-table/dnd-table-bottom-right-buttons.js +6 -6
- package/dist/components/composite/dnd-table/dnd-table.js +4 -4
- package/dist/components/composite/filter/HeaderFilterForm.js +4 -4
- package/dist/components/composite/filter/explicitNaming/ExplicitNamingFilterForm.d.ts +1 -1
- package/dist/components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js +2 -4
- package/dist/components/composite/grid/grid-item.d.ts +4 -3
- package/dist/components/composite/grid/grid-item.js +8 -4
- package/dist/components/composite/grid/grid-section.d.ts +1 -1
- package/dist/components/composite/grid/grid-section.js +3 -3
- package/dist/components/composite/grid/index.js +6 -3
- package/dist/components/composite/index.js +4 -3
- package/dist/components/composite/reactQueryBuilder/PropertyValueEditor.js +5 -5
- package/dist/components/composite/reactQueryBuilder/compositeRuleEditor/GroupValueEditor.js +2 -2
- package/dist/components/composite/reactQueryBuilder/compositeRuleEditor/RuleValueEditor.js +5 -5
- package/dist/components/index.js +4 -3
- package/dist/components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js +9 -9
- package/dist/components/ui/dialogs/modifyElementSelection/ModifyElementSelection.js +3 -3
- package/dist/components/ui/reactHookForm/errorManagement/FieldErrorAlert.js +2 -2
- package/dist/components/ui/reactHookForm/expandableInput/DeletableRow.js +4 -4
- package/dist/components/ui/reactHookForm/expandableInput/ExpandableInput.js +4 -4
- package/dist/components/ui/reactHookForm/numbers/RangeInput.js +5 -5
- package/dist/components/ui/reactHookForm/utils/functions.js +2 -2
- package/dist/features/authentication/AuthenticationRouter.js +2 -2
- package/dist/features/authentication/AuthenticationRouterErrorDisplay.js +3 -3
- package/dist/features/index.js +6 -1
- package/dist/features/network-modifications/battery/creation/BatteryCreationForm.js +7 -7
- package/dist/features/network-modifications/battery/modification/BatteryDialogHeader.js +4 -4
- package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.js +8 -8
- package/dist/features/network-modifications/battery/modification/BatteryModificationForm.js +5 -5
- package/dist/features/network-modifications/by-filter/assignment/assignment/assignment-form.js +1 -1
- package/dist/features/network-modifications/by-filter/assignment/modification-by-assignment-form.js +4 -4
- package/dist/features/network-modifications/by-filter/deletion/ByFilterDeletionForm.js +4 -4
- package/dist/features/network-modifications/common/activePowerControl/ActivePowerControlForm.js +1 -1
- package/dist/features/network-modifications/common/connectivity/BranchConnectivityForm.js +1 -1
- package/dist/features/network-modifications/common/connectivity/ConnectivityForm.js +7 -7
- package/dist/features/network-modifications/common/connectivity/PositionForm.js +4 -4
- package/dist/features/network-modifications/common/connectivity/VoltageLevelConnectivityForm.js +4 -4
- package/dist/features/network-modifications/common/measurements/BranchActiveReactivePowerMeasurementsForm.js +4 -3
- package/dist/features/network-modifications/common/measurements/BusbarSectionVoltageMeasurementsForm.js +2 -2
- package/dist/features/network-modifications/common/measurements/PowerMeasurementsForm.js +4 -4
- package/dist/features/network-modifications/common/measurements/PowerWithValidityForm.js +4 -4
- package/dist/features/network-modifications/common/properties/PropertiesForm.js +1 -1
- package/dist/features/network-modifications/common/properties/PropertyForm.js +5 -5
- package/dist/features/network-modifications/common/reactiveLimits/ReactiveLimitsForm.js +3 -3
- package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveRowForm.js +1 -1
- package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveTableForm.js +7 -7
- package/dist/features/network-modifications/common/regulatingTerminal/RegulatingTerminalForm.js +2 -2
- package/dist/features/network-modifications/common/setpoints/SetPointsForm.js +5 -5
- package/dist/features/network-modifications/common/shortCircuit/ShortCircuitForm.js +3 -3
- package/dist/features/network-modifications/common/voltageRegulation/VoltageRegulationForm.js +5 -5
- package/dist/features/network-modifications/equipmentDeletion/EquipmentDeletionForm.js +6 -6
- package/dist/features/network-modifications/equipmentDeletion/hvdcLccDeletion/HvdcLccDeletionSpecificForm.js +5 -5
- package/dist/features/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.js +5 -5
- package/dist/features/network-modifications/generator/creation/GeneratorCreationForm.js +9 -9
- package/dist/features/network-modifications/generator/modification/GeneratorDialogHeader.js +5 -5
- package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.js +9 -9
- package/dist/features/network-modifications/generator/modification/GeneratorModificationForm.js +5 -5
- package/dist/features/network-modifications/load/common/LoadDialogHeader.js +5 -5
- package/dist/features/network-modifications/load/common/LoadDialogTabsContent.js +1 -1
- package/dist/features/network-modifications/load/common/LoadForm.js +5 -5
- package/dist/features/network-modifications/shunt-compensator/common/CharacteristicsForm.js +12 -12
- package/dist/features/network-modifications/shunt-compensator/common/characteristicsForm.utils.d.ts +8 -8
- package/dist/features/network-modifications/shunt-compensator/creation/ShuntCompensatorCreationForm.js +11 -11
- package/dist/features/network-modifications/shunt-compensator/creation/shuntCompensatorCreation.utils.d.ts +12 -12
- package/dist/features/network-modifications/shunt-compensator/modification/ShuntCompensatorModificationForm.js +3 -3
- package/dist/features/network-modifications/shunt-compensator/modification/shuntCompensatorModification.utils.d.ts +12 -12
- package/dist/features/network-modifications/substation/creation/SubstationCreationForm.js +7 -7
- package/dist/features/network-modifications/substation/modification/SubstationModificationForm.js +7 -7
- package/dist/features/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +7 -7
- package/dist/features/network-modifications/voltageLevel/creation/tabs/characteristicsTab/CharacteristicsTab.js +9 -9
- package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/StructureTab.js +5 -5
- package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/couplingOmnibus/CouplingOmnibusCreation.js +3 -3
- package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js +1 -1
- package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationCreationSection.js +7 -7
- package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.js +5 -5
- package/dist/features/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js +3 -3
- package/dist/features/network-modifications/voltageLevel/modification/voltageLevelModification.utils.d.ts +1 -1
- package/dist/features/parameters/common/contingency-table/contingency-table.js +4 -4
- package/dist/features/parameters/common/hook/use-tabs.d.ts +3 -2
- package/dist/features/parameters/common/hook/use-tabs.js +2 -3
- package/dist/features/parameters/common/index.d.ts +2 -1
- package/dist/features/parameters/common/index.js +6 -1
- package/dist/features/parameters/common/line-separator.js +2 -2
- package/dist/features/parameters/common/name-element-editor/name-element-editor-form.js +4 -4
- package/dist/features/parameters/common/parameter-field.js +5 -4
- package/dist/features/parameters/common/parameter-layout/index.d.ts +8 -0
- package/dist/features/parameters/common/parameter-layout/index.js +7 -0
- package/dist/features/parameters/common/parameter-layout/parameter-layout-provider.d.ts +10 -0
- package/dist/features/parameters/common/parameter-layout/parameter-layout-provider.js +15 -0
- package/dist/features/parameters/common/parameter-layout/parameter-layout.d.ts +23 -0
- package/dist/features/parameters/common/parameter-layout/parameter-layout.js +167 -0
- package/dist/features/parameters/common/parameter-table-field/parameter-table-field.js +3 -3
- package/dist/features/parameters/common/parameters.js +3 -3
- package/dist/features/parameters/common/provider-param.d.ts +10 -0
- package/dist/features/parameters/common/{ProviderParam.js → provider-param.js} +9 -11
- package/dist/features/parameters/common/widget/parameter-float.js +4 -4
- package/dist/features/parameters/common/widget/parameter-group.js +2 -2
- package/dist/features/parameters/common/widget/parameter-line-directory-items-input.js +4 -4
- package/dist/features/parameters/common/widget/parameter-line-slider.js +4 -4
- package/dist/features/parameters/common/widget/parameter-switch.js +2 -2
- package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.d.ts +4 -5
- package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js +39 -60
- package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +39 -101
- package/dist/features/parameters/dynamic-margin-calculation/loads-variations-parameters.js +2 -2
- package/dist/features/parameters/dynamic-margin-calculation/time-delay-parameters.js +2 -2
- package/dist/features/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.js +8 -7
- package/dist/features/parameters/dynamic-security-analysis/contingency-parameters.js +12 -11
- package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js +38 -71
- package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.d.ts +4 -5
- package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.js +39 -61
- package/dist/features/parameters/dynamic-security-analysis/scenario-parameters.js +2 -2
- package/dist/features/parameters/dynamic-security-analysis/use-dynamic-security-analysis-parameters-form.js +8 -7
- package/dist/features/parameters/dynamic-simulation/curve/common/grid-buttons.js +4 -4
- package/dist/features/parameters/dynamic-simulation/curve/curve-parameters.js +7 -8
- package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-preview.js +7 -7
- package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-selector-dialog.js +10 -10
- package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-selector.js +26 -50
- package/dist/features/parameters/dynamic-simulation/curve/dialog/equipment-filter.js +20 -20
- package/dist/features/parameters/dynamic-simulation/curve/dialog/model-filter.js +11 -10
- package/dist/features/parameters/dynamic-simulation/dynamic-simulation-inline.js +42 -104
- package/dist/features/parameters/dynamic-simulation/dynamic-simulation-parameters-form.d.ts +4 -5
- package/dist/features/parameters/dynamic-simulation/dynamic-simulation-parameters-form.js +75 -97
- package/dist/features/parameters/dynamic-simulation/mapping/mapping-parameters.js +10 -9
- package/dist/features/parameters/dynamic-simulation/network/network-parameters.js +2 -2
- package/dist/features/parameters/dynamic-simulation/solver/solver-parameters.js +2 -2
- package/dist/features/parameters/dynamic-simulation/time-delay/time-delay-parameters.js +2 -2
- package/dist/features/parameters/dynamic-simulation/use-dynamic-simulation-parameters-form.js +7 -6
- package/dist/features/parameters/index.js +6 -1
- package/dist/features/parameters/loadflow/load-flow-general-parameters.js +1 -0
- package/dist/features/parameters/loadflow/load-flow-parameters-content.js +14 -13
- package/dist/features/parameters/loadflow/load-flow-parameters-dialog.js +12 -18
- package/dist/features/parameters/loadflow/load-flow-parameters-form.d.ts +1 -6
- package/dist/features/parameters/loadflow/load-flow-parameters-form.js +26 -91
- package/dist/features/parameters/loadflow/load-flow-parameters-header.js +29 -53
- package/dist/features/parameters/loadflow/load-flow-parameters-inline.js +35 -128
- package/dist/features/parameters/loadflow/load-flow-parameters-utils.js +11 -10
- package/dist/features/parameters/loadflow/use-load-flow-parameters-form.js +10 -9
- package/dist/features/parameters/network-visualizations/map-parameters.js +18 -17
- package/dist/features/parameters/network-visualizations/network-area-diagram-parameters.js +4 -4
- package/dist/features/parameters/network-visualizations/network-visualizations-form.d.ts +1 -4
- package/dist/features/parameters/network-visualizations/network-visualizations-form.js +19 -48
- package/dist/features/parameters/network-visualizations/network-visualizations-parameters-dialog.js +13 -19
- package/dist/features/parameters/network-visualizations/network-visualizations-parameters-inline.js +34 -65
- package/dist/features/parameters/network-visualizations/single-line-diagram-parameters.js +18 -17
- package/dist/features/parameters/parameters-style.d.ts +0 -1
- package/dist/features/parameters/parameters-style.js +0 -2
- package/dist/features/parameters/pcc-min/pcc-min-parameters-dialog.js +13 -18
- package/dist/features/parameters/pcc-min/pcc-min-parameters-form.d.ts +7 -29
- package/dist/features/parameters/pcc-min/pcc-min-parameters-form.js +16 -109
- package/dist/features/parameters/pcc-min/pcc-min-parameters-inline.js +27 -84
- package/dist/features/parameters/security-analysis/columns-definitions.js +11 -10
- package/dist/features/parameters/security-analysis/security-analysis-parameters-dialog.js +20 -20
- package/dist/features/parameters/security-analysis/security-analysis-parameters-form.d.ts +2 -4
- package/dist/features/parameters/security-analysis/security-analysis-parameters-form.js +44 -115
- package/dist/features/parameters/security-analysis/security-analysis-parameters-inline.js +40 -109
- package/dist/features/parameters/security-analysis/security-analysis-parameters-selector.js +12 -11
- package/dist/features/parameters/security-analysis/security-analysis-violations-hiding.js +9 -11
- package/dist/features/parameters/security-analysis/use-security-analysis-parameters-form.js +7 -6
- package/dist/features/parameters/sensi/columns-definitions.js +9 -8
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-dialog.js +21 -21
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-form.d.ts +3 -5
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-form.js +33 -90
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-inline.js +40 -99
- package/dist/features/parameters/sensi/sensitivity-parameters-fields.js +8 -17
- package/dist/features/parameters/sensi/sensitivity-parameters-selector.js +10 -9
- package/dist/features/parameters/sensi/utils.js +8 -7
- package/dist/features/parameters/short-circuit/short-circuit-general-tab-panel.js +15 -14
- package/dist/features/parameters/short-circuit/short-circuit-parameters-content.js +11 -10
- package/dist/features/parameters/short-circuit/short-circuit-parameters-dialog.js +13 -18
- package/dist/features/parameters/short-circuit/short-circuit-parameters-form.d.ts +1 -4
- package/dist/features/parameters/short-circuit/short-circuit-parameters-form.js +5 -63
- package/dist/features/parameters/short-circuit/short-circuit-parameters-inline.js +33 -101
- package/dist/features/parameters/short-circuit/short-circuit-parameters-utils.js +12 -11
- package/dist/features/parameters/short-circuit/short-circuit-power-electronics-tab-panel.js +17 -16
- package/dist/features/parameters/short-circuit/short-circuit-study-area-tab-panel.js +15 -14
- package/dist/features/parameters/short-circuit/use-short-circuit-parameters-form.js +1 -0
- package/dist/features/parameters/voltage-init/equipment-selection-parameters.js +6 -5
- package/dist/features/parameters/voltage-init/general-parameters.js +11 -10
- package/dist/features/parameters/voltage-init/voltage-init-parameters-dialog.js +13 -18
- package/dist/features/parameters/voltage-init/voltage-init-parameters-form.d.ts +2 -24
- package/dist/features/parameters/voltage-init/voltage-init-parameters-form.js +51 -108
- package/dist/features/parameters/voltage-init/voltage-init-parameters-inline.js +34 -90
- package/dist/features/parameters/voltage-init/voltage-limits-parameters.js +2 -2
- package/dist/features/process-configs/security-analysis/update-sa-process-config.js +7 -6
- package/dist/features/topBar/AboutDialog.js +4 -7
- package/dist/index.js +13 -4
- package/dist/translations/en/commonButtonEn.d.ts +2 -0
- package/dist/translations/en/commonButtonEn.js +2 -0
- package/dist/translations/en/parameters.d.ts +1 -0
- package/dist/translations/en/parameters.js +3 -1
- package/dist/translations/fr/commonButtonFr.d.ts +2 -0
- package/dist/translations/fr/commonButtonFr.js +2 -0
- package/dist/translations/fr/parameters.d.ts +1 -0
- package/dist/translations/fr/parameters.js +3 -1
- package/dist/utils/types/elementType.d.ts +1 -0
- package/dist/utils/types/elementType.js +1 -0
- package/package.json +3 -2
- package/dist/features/parameters/common/ProviderParam.d.ts +0 -7
package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js
CHANGED
|
@@ -1,38 +1,34 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import {
|
|
3
|
-
import { FormattedMessage } from "react-intl";
|
|
4
|
-
import { useState, useCallback, useEffect } from "react";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect } from "react";
|
|
5
3
|
import "../../../utils/conversionUtils.js";
|
|
6
4
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
7
5
|
import "../../../utils/types/equipmentType.js";
|
|
8
6
|
import "@mui/icons-material";
|
|
9
|
-
import { mergeSx } from "../../../utils/styles.js";
|
|
10
7
|
import { useDynamicSecurityAnalysisParametersForm, toParamsInfos } from "./use-dynamic-security-analysis-parameters-form.js";
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { CreateParameterDialog } from "../common/parameters-creation-dialog.js";
|
|
16
|
-
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
17
|
-
import "react-hook-form";
|
|
8
|
+
import { ParameterLayout } from "../common/parameter-layout/parameter-layout.js";
|
|
9
|
+
import "../common/parameter-layout/parameter-layout-provider.js";
|
|
10
|
+
import "@mui/material";
|
|
11
|
+
import "react-intl";
|
|
18
12
|
import "localized-countries";
|
|
19
13
|
import "localized-countries/data/fr";
|
|
20
14
|
import "localized-countries/data/en";
|
|
21
15
|
import "notistack";
|
|
16
|
+
import "react-hook-form";
|
|
22
17
|
import { CustomFormProvider } from "../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
23
|
-
import "
|
|
18
|
+
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
19
|
+
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
24
20
|
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
21
|
+
import "@hello-pangea/dnd";
|
|
22
|
+
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
23
|
+
import "yup";
|
|
25
24
|
import "../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
26
25
|
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
27
26
|
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
28
27
|
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
29
28
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
30
29
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
31
|
-
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
32
30
|
import "../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
33
31
|
import "../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
34
|
-
import "@hello-pangea/dnd";
|
|
35
|
-
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
36
32
|
import "../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
37
33
|
import "mui-nested-menu";
|
|
38
34
|
import "react-resizable-panels";
|
|
@@ -41,9 +37,11 @@ import "../common/widget/parameter-line-slider.js";
|
|
|
41
37
|
import "../common/limitreductions/columns-definitions.js";
|
|
42
38
|
import "../common/contingency-table/contingency-table.js";
|
|
43
39
|
import "../common/contingency-table/columns-definitions.js";
|
|
40
|
+
import { useTabs } from "../common/hook/use-tabs.js";
|
|
44
41
|
import "@hookform/resolvers/yup";
|
|
45
42
|
import "../../../components/composite/filter/HeaderFilterForm.js";
|
|
46
43
|
import { DynamicSecurityAnalysisParametersForm } from "./dynamic-security-analysis-parameters-form.js";
|
|
44
|
+
import { TabValues } from "./dynamic-security-analysis.type.js";
|
|
47
45
|
function DynamicSecurityAnalysisInline({
|
|
48
46
|
studyUuid,
|
|
49
47
|
parametersBackend,
|
|
@@ -56,20 +54,13 @@ function DynamicSecurityAnalysisInline({
|
|
|
56
54
|
name: null,
|
|
57
55
|
description: null
|
|
58
56
|
});
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
const handleCancelReset = useCallback(() => {
|
|
67
|
-
setOpenResetConfirmation(false);
|
|
68
|
-
}, []);
|
|
69
|
-
const handleReset = useCallback(() => {
|
|
70
|
-
resetParameters();
|
|
71
|
-
setOpenResetConfirmation(false);
|
|
72
|
-
}, [resetParameters]);
|
|
57
|
+
const { formMethods } = dynamicSecurityAnalysisMethods;
|
|
58
|
+
const { getValues, formState, handleSubmit } = formMethods;
|
|
59
|
+
const useTabsReturn = useTabs({
|
|
60
|
+
defaultTab: TabValues.SCENARIO,
|
|
61
|
+
tabEnum: TabValues,
|
|
62
|
+
errors: formState.errors
|
|
63
|
+
});
|
|
73
64
|
const onSubmit = useCallback(
|
|
74
65
|
(formData) => {
|
|
75
66
|
updateParameters(toParamsInfos(formData));
|
|
@@ -79,50 +70,26 @@ function DynamicSecurityAnalysisInline({
|
|
|
79
70
|
useEffect(() => {
|
|
80
71
|
setHaveDirtyFields(formState.isDirty);
|
|
81
72
|
}, [formState, setHaveDirtyFields]);
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
) }),
|
|
98
|
-
openCreateParameterDialog && /* @__PURE__ */ jsx(
|
|
99
|
-
CreateParameterDialog,
|
|
100
|
-
{
|
|
101
|
-
studyUuid,
|
|
102
|
-
open: openCreateParameterDialog,
|
|
103
|
-
onClose: () => setOpenCreateParameterDialog(false),
|
|
104
|
-
parameterValues: getValues,
|
|
105
|
-
parameterFormatter: toParamsInfos,
|
|
106
|
-
parameterType: ElementType.DYNAMIC_SECURITY_ANALYSIS_PARAMETERS
|
|
107
|
-
}
|
|
108
|
-
),
|
|
109
|
-
openResetConfirmation && /* @__PURE__ */ jsx(
|
|
110
|
-
PopupConfirmationDialog,
|
|
73
|
+
return /* @__PURE__ */ jsx(CustomFormProvider, { validationSchema: dynamicSecurityAnalysisMethods.formSchema, ...formMethods, children: /* @__PURE__ */ jsx(
|
|
74
|
+
ParameterLayout,
|
|
75
|
+
{
|
|
76
|
+
title: "DynamicSecurityAnalysis",
|
|
77
|
+
isLoading: !dynamicSecurityAnalysisMethods.paramsLoaded,
|
|
78
|
+
parameterType: ElementType.DYNAMIC_SECURITY_ANALYSIS_PARAMETERS,
|
|
79
|
+
createParameter: {
|
|
80
|
+
studyUuid,
|
|
81
|
+
getParameterValues: getValues,
|
|
82
|
+
parameterFormatter: toParamsInfos
|
|
83
|
+
},
|
|
84
|
+
resetHandler: resetParameters,
|
|
85
|
+
validateHandler: handleSubmit(onSubmit, useTabsReturn.onError),
|
|
86
|
+
children: /* @__PURE__ */ jsx(
|
|
87
|
+
DynamicSecurityAnalysisParametersForm,
|
|
111
88
|
{
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
openConfirmationPopup: openResetConfirmation,
|
|
115
|
-
setOpenConfirmationPopup: handleCancelReset,
|
|
116
|
-
handlePopupConfirmation: handleReset
|
|
89
|
+
dynamicSecurityAnalysisMethods,
|
|
90
|
+
useTabsReturn
|
|
117
91
|
}
|
|
118
92
|
)
|
|
119
|
-
] });
|
|
120
|
-
};
|
|
121
|
-
return /* @__PURE__ */ jsx(CustomFormProvider, { validationSchema: formSchema, ...formMethods, children: /* @__PURE__ */ jsx(
|
|
122
|
-
DynamicSecurityAnalysisParametersForm,
|
|
123
|
-
{
|
|
124
|
-
dynamicSecurityAnalysisMethods,
|
|
125
|
-
renderActions
|
|
126
93
|
}
|
|
127
94
|
) });
|
|
128
95
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { UseTabsReturn } from '../common';
|
|
2
|
+
import { TabValues } from './dynamic-security-analysis.type';
|
|
3
3
|
import { UseComputationParametersFormReturn } from '../common/utils';
|
|
4
4
|
type DynamicSecurityAnalysisParametersFormProps = {
|
|
5
5
|
dynamicSecurityAnalysisMethods: UseComputationParametersFormReturn;
|
|
6
|
-
|
|
7
|
-
renderActions?: (onSubmitError: (errors: FieldErrors) => void) => ReactNode;
|
|
6
|
+
useTabsReturn: UseTabsReturn<TabValues>;
|
|
8
7
|
};
|
|
9
|
-
export declare function DynamicSecurityAnalysisParametersForm({ dynamicSecurityAnalysisMethods,
|
|
8
|
+
export declare function DynamicSecurityAnalysisParametersForm({ dynamicSecurityAnalysisMethods, useTabsReturn, }: Readonly<DynamicSecurityAnalysisParametersFormProps>): import("react").JSX.Element;
|
|
10
9
|
export {};
|
|
@@ -1,99 +1,77 @@
|
|
|
1
|
-
import { jsxs,
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Stack, Grid2, Tabs, Tab } from "@mui/material";
|
|
3
3
|
import { FormattedMessage } from "react-intl";
|
|
4
4
|
import ScenarioParameters from "./scenario-parameters.js";
|
|
5
5
|
import ContingencyParameters from "./contingency-parameters.js";
|
|
6
|
-
import "../../../utils/conversionUtils.js";
|
|
7
|
-
import "../../../utils/types/equipmentType.js";
|
|
8
6
|
import "@mui/icons-material";
|
|
9
|
-
import { mergeSx } from "../../../utils/styles.js";
|
|
10
|
-
import { TabPanel } from "../common/parameters.js";
|
|
11
7
|
import "react";
|
|
8
|
+
import { TabPanel } from "../common/parameters.js";
|
|
9
|
+
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
10
|
+
import "../../../utils/conversionUtils.js";
|
|
11
|
+
import "../../../utils/types/equipmentType.js";
|
|
12
|
+
import "react-hook-form";
|
|
12
13
|
import "localized-countries";
|
|
13
14
|
import "localized-countries/data/fr";
|
|
14
15
|
import "localized-countries/data/en";
|
|
15
16
|
import "notistack";
|
|
16
|
-
import "react-hook-form";
|
|
17
17
|
import "../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
18
|
-
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
19
|
-
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
20
|
-
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
21
|
-
import "@hello-pangea/dnd";
|
|
22
|
-
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
23
|
-
import { ProviderParam } from "../common/ProviderParam.js";
|
|
24
18
|
import "yup";
|
|
19
|
+
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
25
20
|
import "../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
26
21
|
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
27
22
|
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
28
23
|
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
29
24
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
30
25
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
26
|
+
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
31
27
|
import "../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
32
28
|
import "../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
29
|
+
import "@hello-pangea/dnd";
|
|
30
|
+
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
33
31
|
import "../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
34
32
|
import "mui-nested-menu";
|
|
35
33
|
import "react-resizable-panels";
|
|
36
34
|
import "react-papaparse";
|
|
37
|
-
import
|
|
35
|
+
import "../common/parameter-layout/parameter-layout-provider.js";
|
|
36
|
+
import { ProviderParam } from "../common/provider-param.js";
|
|
37
|
+
import { parametersStyles, getTabStyle } from "../parameters-style.js";
|
|
38
38
|
import "../common/widget/parameter-line-slider.js";
|
|
39
39
|
import "../common/limitreductions/columns-definitions.js";
|
|
40
40
|
import "../common/contingency-table/contingency-table.js";
|
|
41
41
|
import "../common/contingency-table/columns-definitions.js";
|
|
42
|
-
import { useTabs } from "../common/hook/use-tabs.js";
|
|
43
42
|
import "@hookform/resolvers/yup";
|
|
44
43
|
import "../../../components/composite/filter/HeaderFilterForm.js";
|
|
45
44
|
import { TabValues } from "./dynamic-security-analysis.type.js";
|
|
46
45
|
function DynamicSecurityAnalysisParametersForm({
|
|
47
46
|
dynamicSecurityAnalysisMethods,
|
|
48
|
-
|
|
49
|
-
renderActions
|
|
47
|
+
useTabsReturn
|
|
50
48
|
}) {
|
|
51
|
-
const {
|
|
52
|
-
const { selectedTab, tabsWithError, onTabChange
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
paramsLoaded ? /* @__PURE__ */ jsxs(Grid, { container: true, sx: { height: "100%" }, direction: "column", children: [
|
|
59
|
-
/* @__PURE__ */ jsx(Grid, { container: true, children: /* @__PURE__ */ jsx(ProviderParam, { options: formattedProviders }) }),
|
|
60
|
-
/* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsxs(Tabs, { value: selectedTab, variant: "scrollable", onChange: onTabChange, "aria-label": "parameters", children: [
|
|
61
|
-
/* @__PURE__ */ jsx(
|
|
62
|
-
Tab,
|
|
63
|
-
{
|
|
64
|
-
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSecurityAnalysisScenario" }),
|
|
65
|
-
value: TabValues.SCENARIO,
|
|
66
|
-
sx: getTabStyle(tabsWithError, TabValues.SCENARIO)
|
|
67
|
-
}
|
|
68
|
-
),
|
|
69
|
-
/* @__PURE__ */ jsx(
|
|
70
|
-
Tab,
|
|
71
|
-
{
|
|
72
|
-
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSecurityAnalysisContingency" }),
|
|
73
|
-
value: TabValues.CONTINGENCY,
|
|
74
|
-
sx: getTabStyle(tabsWithError, TabValues.CONTINGENCY)
|
|
75
|
-
}
|
|
76
|
-
)
|
|
77
|
-
] }) }),
|
|
78
|
-
/* @__PURE__ */ jsxs(
|
|
79
|
-
Grid,
|
|
49
|
+
const { formattedProviders } = dynamicSecurityAnalysisMethods;
|
|
50
|
+
const { selectedTab, tabsWithError, onTabChange } = useTabsReturn;
|
|
51
|
+
return /* @__PURE__ */ jsxs(Stack, { sx: parametersStyles.scrollableGrid, children: [
|
|
52
|
+
/* @__PURE__ */ jsx(Grid2, { size: 12, children: /* @__PURE__ */ jsx(ProviderParam, { options: formattedProviders, id: "Dsa" }) }),
|
|
53
|
+
/* @__PURE__ */ jsx(Grid2, { size: 12, children: /* @__PURE__ */ jsxs(Tabs, { value: selectedTab, variant: "scrollable", onChange: onTabChange, "aria-label": "parameters", children: [
|
|
54
|
+
/* @__PURE__ */ jsx(
|
|
55
|
+
Tab,
|
|
80
56
|
{
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
paddingTop: 0,
|
|
86
|
-
width: "100%"
|
|
87
|
-
}),
|
|
88
|
-
children: [
|
|
89
|
-
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.SCENARIO, children: /* @__PURE__ */ jsx(ScenarioParameters, { path: TabValues.SCENARIO }) }),
|
|
90
|
-
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.CONTINGENCY, children: /* @__PURE__ */ jsx(ContingencyParameters, { path: TabValues.CONTINGENCY }) })
|
|
91
|
-
]
|
|
92
|
-
},
|
|
93
|
-
"dsaParameters"
|
|
57
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSecurityAnalysisScenario" }),
|
|
58
|
+
value: TabValues.SCENARIO,
|
|
59
|
+
sx: getTabStyle(tabsWithError, TabValues.SCENARIO)
|
|
60
|
+
}
|
|
94
61
|
),
|
|
95
|
-
|
|
96
|
-
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
Tab,
|
|
64
|
+
{
|
|
65
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSecurityAnalysisContingency" }),
|
|
66
|
+
value: TabValues.CONTINGENCY,
|
|
67
|
+
sx: getTabStyle(tabsWithError, TabValues.CONTINGENCY)
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
] }) }),
|
|
71
|
+
/* @__PURE__ */ jsxs(Grid2, { container: true, size: 12, sx: { paddingTop: 0, width: "100%", maxHeight: "100%" }, children: [
|
|
72
|
+
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.SCENARIO, children: /* @__PURE__ */ jsx(ScenarioParameters, { path: TabValues.SCENARIO }) }),
|
|
73
|
+
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.CONTINGENCY, children: /* @__PURE__ */ jsx(ContingencyParameters, { path: TabValues.CONTINGENCY }) })
|
|
74
|
+
] }, "dsaParameters")
|
|
97
75
|
] });
|
|
98
76
|
}
|
|
99
77
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Grid2 } from "@mui/material";
|
|
3
3
|
import { SCENARIO_DURATION } from "./constants.js";
|
|
4
4
|
import "../../../utils/conversionUtils.js";
|
|
5
5
|
import "../../../utils/types/equipmentType.js";
|
|
@@ -14,7 +14,7 @@ const params = [
|
|
|
14
14
|
}
|
|
15
15
|
];
|
|
16
16
|
function ScenarioParameters({ path }) {
|
|
17
|
-
return /* @__PURE__ */ jsx(
|
|
17
|
+
return /* @__PURE__ */ jsx(Grid2, { container: true, children: params.map((param) => {
|
|
18
18
|
const { name, type, ...otherParams } = param;
|
|
19
19
|
return /* @__PURE__ */ jsx(ParameterField, { id: path, name: param.name, type: param.type, ...otherParams }, param.name);
|
|
20
20
|
}) });
|
|
@@ -4,21 +4,17 @@ import "../../../utils/conversionUtils.js";
|
|
|
4
4
|
import "../../../utils/types/equipmentType.js";
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
import "@mui/icons-material";
|
|
7
|
-
import { PROVIDER } from "../common/constants.js";
|
|
8
7
|
import "@mui/material";
|
|
9
|
-
import "react-intl";
|
|
10
8
|
import "react";
|
|
9
|
+
import "react-intl";
|
|
10
|
+
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
11
|
+
import "react-hook-form";
|
|
11
12
|
import "localized-countries";
|
|
12
13
|
import "localized-countries/data/fr";
|
|
13
14
|
import "localized-countries/data/en";
|
|
14
15
|
import "notistack";
|
|
15
|
-
import "react-hook-form";
|
|
16
16
|
import "../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
17
|
-
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
18
|
-
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
19
17
|
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
20
|
-
import "@hello-pangea/dnd";
|
|
21
|
-
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
22
18
|
import { NAME } from "../../../components/ui/reactHookForm/constants.js";
|
|
23
19
|
import "../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
24
20
|
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
@@ -26,12 +22,17 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
|
26
22
|
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
27
23
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
28
24
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
25
|
+
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
29
26
|
import "../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
30
27
|
import "../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
28
|
+
import "@hello-pangea/dnd";
|
|
29
|
+
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
31
30
|
import "../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
32
31
|
import "mui-nested-menu";
|
|
33
32
|
import "react-resizable-panels";
|
|
34
33
|
import "react-papaparse";
|
|
34
|
+
import "../common/parameter-layout/parameter-layout-provider.js";
|
|
35
|
+
import { PROVIDER } from "../common/constants.js";
|
|
35
36
|
import "../common/widget/parameter-line-slider.js";
|
|
36
37
|
import "../common/limitreductions/columns-definitions.js";
|
|
37
38
|
import "../common/contingency-table/contingency-table.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Grid2, IconButton } from "@mui/material";
|
|
3
3
|
import { AddCircle, Delete } from "@mui/icons-material";
|
|
4
4
|
import { useCallback } from "react";
|
|
5
5
|
import { useIntl } from "react-intl";
|
|
@@ -12,8 +12,8 @@ function GridButtons({ onAddButton, onDeleteButton, disabledAdd, disabledDelete
|
|
|
12
12
|
const handleDeleteButton = useCallback(() => {
|
|
13
13
|
onDeleteButton();
|
|
14
14
|
}, [onDeleteButton]);
|
|
15
|
-
return /* @__PURE__ */ jsxs(
|
|
16
|
-
/* @__PURE__ */ jsx(
|
|
15
|
+
return /* @__PURE__ */ jsxs(Grid2, { container: true, size: "grow", spacing: 1, sx: { justifyContent: "flex-end", alignItems: "flex-end" }, children: [
|
|
16
|
+
/* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(
|
|
17
17
|
CustomTooltip,
|
|
18
18
|
{
|
|
19
19
|
title: intl.formatMessage({
|
|
@@ -22,7 +22,7 @@ function GridButtons({ onAddButton, onDeleteButton, disabledAdd, disabledDelete
|
|
|
22
22
|
children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(IconButton, { color: "primary", onClick: () => handleAddButton(), disabled: disabledAdd, children: /* @__PURE__ */ jsx(AddCircle, {}) }) })
|
|
23
23
|
}
|
|
24
24
|
) }),
|
|
25
|
-
/* @__PURE__ */ jsx(
|
|
25
|
+
/* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(
|
|
26
26
|
CustomTooltip,
|
|
27
27
|
{
|
|
28
28
|
title: intl.formatMessage({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useTheme,
|
|
2
|
+
import { useTheme, Stack, Grid2, Typography, Box } from "@mui/material";
|
|
3
3
|
import { useState, useRef, useCallback, useMemo } from "react";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import { useFormContext, useFieldArray } from "react-hook-form";
|
|
@@ -121,15 +121,14 @@ function CurveParameters({
|
|
|
121
121
|
return mapping?.id ? fetchDynamicSimulationModels(mapping) : void 0;
|
|
122
122
|
}, [getValues, mappingPath]);
|
|
123
123
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
124
|
-
/* @__PURE__ */ jsxs(
|
|
125
|
-
/* @__PURE__ */ jsxs(
|
|
126
|
-
/* @__PURE__ */ jsx(
|
|
124
|
+
/* @__PURE__ */ jsxs(Stack, { sx: { height: 600 }, children: [
|
|
125
|
+
/* @__PURE__ */ jsxs(Grid2, { container: true, sx: { marginBottom: theme.spacing(1) }, children: [
|
|
126
|
+
/* @__PURE__ */ jsx(Grid2, { container: true, size: "auto", children: /* @__PURE__ */ jsx(GridSearch, { ref: quickFilterRef, gridRef }, "curve-quick-filter") }),
|
|
127
127
|
/* @__PURE__ */ jsx(
|
|
128
|
-
|
|
128
|
+
Grid2,
|
|
129
129
|
{
|
|
130
130
|
container: true,
|
|
131
|
-
|
|
132
|
-
xs: "auto",
|
|
131
|
+
size: "auto",
|
|
133
132
|
sx: {
|
|
134
133
|
justifyContent: "flex-end",
|
|
135
134
|
alignItems: "flex-end",
|
|
@@ -149,7 +148,7 @@ function CurveParameters({
|
|
|
149
148
|
}
|
|
150
149
|
)
|
|
151
150
|
] }),
|
|
152
|
-
/* @__PURE__ */ jsx(
|
|
151
|
+
/* @__PURE__ */ jsx(Grid2, { sx: { flexGrow: 1, minHeight: 0 }, children: /* @__PURE__ */ jsx(Box, { sx: styles.grid, children: /* @__PURE__ */ jsx(
|
|
153
152
|
CustomAGGrid,
|
|
154
153
|
{
|
|
155
154
|
ref: gridRef,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs,
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useRef, useState, useMemo, useCallback, useImperativeHandle } from "react";
|
|
3
3
|
import { useIntl, FormattedMessage } from "react-intl";
|
|
4
|
-
import {
|
|
4
|
+
import { Stack, Typography, Box } from "@mui/material";
|
|
5
5
|
import { AGGRID_LOCALES } from "../../../../../translations/not-intl/aggrid-locales.js";
|
|
6
6
|
import { CustomAGGrid } from "../../../../../components/composite/customAGGrid/customAggrid.js";
|
|
7
7
|
import "../../../../../utils/conversionUtils.js";
|
|
@@ -104,12 +104,12 @@ const CurvePreview = forwardRef((props, ref) => {
|
|
|
104
104
|
}),
|
|
105
105
|
[addCurves, removeCurves, rowData]
|
|
106
106
|
);
|
|
107
|
-
return /* @__PURE__ */ jsxs(
|
|
108
|
-
/* @__PURE__ */
|
|
107
|
+
return /* @__PURE__ */ jsxs(Stack, { sx: { height: "100%", minHeight: 0 }, children: [
|
|
108
|
+
/* @__PURE__ */ jsxs(Typography, { sx: styles.h6, variant: "h6", children: [
|
|
109
109
|
/* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationCurveToAdd" }),
|
|
110
110
|
` (${selectedRowsLength} / ${rowData.length})`
|
|
111
|
-
] })
|
|
112
|
-
/* @__PURE__ */ jsx(
|
|
111
|
+
] }),
|
|
112
|
+
/* @__PURE__ */ jsx(Box, { sx: [styles.grid, { flexGrow: 1, minHeight: 0 }], children: /* @__PURE__ */ jsx(
|
|
113
113
|
CustomAGGrid,
|
|
114
114
|
{
|
|
115
115
|
ref: gridRef,
|
|
@@ -120,7 +120,7 @@ const CurvePreview = forwardRef((props, ref) => {
|
|
|
120
120
|
onSelectionChanged,
|
|
121
121
|
overrideLocales: AGGRID_LOCALES
|
|
122
122
|
}
|
|
123
|
-
) })
|
|
123
|
+
) })
|
|
124
124
|
] });
|
|
125
125
|
});
|
|
126
126
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useTheme, Dialog, DialogTitle, Typography, DialogContent,
|
|
2
|
+
import { useTheme, Dialog, DialogTitle, Typography, DialogContent, Grid2, Stack, IconButton, DialogActions, Button } from "@mui/material";
|
|
3
3
|
import { useRef, useCallback } from "react";
|
|
4
4
|
import { useIntl, FormattedMessage } from "react-intl";
|
|
5
5
|
import { ArrowCircleRight, ArrowCircleLeft } from "@mui/icons-material";
|
|
@@ -55,7 +55,7 @@ function CurveSelectorDialog({
|
|
|
55
55
|
return /* @__PURE__ */ jsxs(Dialog, { open, "aria-labelledby": "curve-selector-dialog-title", maxWidth: "xl", fullWidth: true, children: [
|
|
56
56
|
/* @__PURE__ */ jsx(DialogTitle, { id: "curve-selector-dialog-title", children: /* @__PURE__ */ jsx(Typography, { component: "span", variant: "h5", sx: parametersStyles.title, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationCurveSelectorDialogTitle" }) }) }),
|
|
57
57
|
/* @__PURE__ */ jsx(DialogContent, { style: { overflowY: "hidden", height: "60vh" }, children: /* @__PURE__ */ jsxs(
|
|
58
|
-
|
|
58
|
+
Grid2,
|
|
59
59
|
{
|
|
60
60
|
container: true,
|
|
61
61
|
sx: mergeSx(parametersStyles.scrollableGrid, {
|
|
@@ -64,7 +64,7 @@ function CurveSelectorDialog({
|
|
|
64
64
|
maxHeight: "100%"
|
|
65
65
|
}),
|
|
66
66
|
children: [
|
|
67
|
-
/* @__PURE__ */ jsx(
|
|
67
|
+
/* @__PURE__ */ jsx(Grid2, { container: true, size: 8, spacing: theme.spacing(1), children: /* @__PURE__ */ jsx(
|
|
68
68
|
CurveSelector,
|
|
69
69
|
{
|
|
70
70
|
ref: selectorRef,
|
|
@@ -74,8 +74,8 @@ function CurveSelectorDialog({
|
|
|
74
74
|
modelsFetcher
|
|
75
75
|
}
|
|
76
76
|
) }),
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */ jsx(
|
|
77
|
+
/* @__PURE__ */ jsx(Grid2, { size: 0.5, display: "flex", justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs(Stack, { children: [
|
|
78
|
+
/* @__PURE__ */ jsx(
|
|
79
79
|
CustomTooltip,
|
|
80
80
|
{
|
|
81
81
|
title: intl.formatMessage({
|
|
@@ -91,8 +91,8 @@ function CurveSelectorDialog({
|
|
|
91
91
|
}
|
|
92
92
|
) })
|
|
93
93
|
}
|
|
94
|
-
)
|
|
95
|
-
/* @__PURE__ */ jsx(
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ jsx(
|
|
96
96
|
CustomTooltip,
|
|
97
97
|
{
|
|
98
98
|
title: intl.formatMessage({
|
|
@@ -108,9 +108,9 @@ function CurveSelectorDialog({
|
|
|
108
108
|
}
|
|
109
109
|
) })
|
|
110
110
|
}
|
|
111
|
-
)
|
|
112
|
-
] }),
|
|
113
|
-
/* @__PURE__ */ jsx(
|
|
111
|
+
)
|
|
112
|
+
] }) }),
|
|
113
|
+
/* @__PURE__ */ jsx(Grid2, { size: "grow", children: /* @__PURE__ */ jsx(CurvePreview, { ref: previewRef }) })
|
|
114
114
|
]
|
|
115
115
|
}
|
|
116
116
|
) }),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Grid2, Stack, Typography } from "@mui/material";
|
|
3
3
|
import { FormattedMessage } from "react-intl";
|
|
4
4
|
import { forwardRef, useRef, useState, useCallback, useImperativeHandle } from "react";
|
|
5
5
|
import { getReferencedEquipmentTypeForModel } from "./curve-selector-utils.js";
|
|
@@ -39,55 +39,31 @@ const CurveSelector = forwardRef(
|
|
|
39
39
|
[]
|
|
40
40
|
);
|
|
41
41
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42
|
-
/* @__PURE__ */ jsxs(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
),
|
|
68
|
-
/* @__PURE__ */ jsxs(
|
|
69
|
-
Grid,
|
|
70
|
-
{
|
|
71
|
-
item: true,
|
|
72
|
-
container: true,
|
|
73
|
-
xs: 6,
|
|
74
|
-
direction: "column",
|
|
75
|
-
alignItems: "flex-start",
|
|
76
|
-
justifyContent: "flex-start",
|
|
77
|
-
spacing: 1,
|
|
78
|
-
children: [
|
|
79
|
-
/* @__PURE__ */ jsx(Typography, { sx: styles.h6, variant: "h6", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationCurveCurveFilter" }) }),
|
|
80
|
-
/* @__PURE__ */ jsx(
|
|
81
|
-
ModelFilter,
|
|
82
|
-
{
|
|
83
|
-
ref: modelFilterRef,
|
|
84
|
-
equipmentType: getReferencedEquipmentTypeForModel(equipmentType),
|
|
85
|
-
modelsFetcher
|
|
86
|
-
}
|
|
87
|
-
)
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
)
|
|
42
|
+
/* @__PURE__ */ jsx(Grid2, { size: 6, children: /* @__PURE__ */ jsxs(Stack, { alignItems: "flex-start", justifyContent: "flex-start", spacing: 1, sx: { height: "100%" }, children: [
|
|
43
|
+
/* @__PURE__ */ jsx(Typography, { sx: styles.h6, variant: "h6", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationCurveEquipmentFilter" }) }),
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
EquipmentFilter,
|
|
46
|
+
{
|
|
47
|
+
ref: equipmentFilterRef,
|
|
48
|
+
equipmentType,
|
|
49
|
+
onChangeEquipmentType: handleChangeEquipmentType,
|
|
50
|
+
voltageLevelsFetcher,
|
|
51
|
+
countriesFetcher,
|
|
52
|
+
evaluateFilterFetcher
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] }) }),
|
|
56
|
+
/* @__PURE__ */ jsx(Grid2, { size: 6, children: /* @__PURE__ */ jsxs(Stack, { alignItems: "flex-start", justifyContent: "flex-start", spacing: 1, sx: { height: "100%" }, children: [
|
|
57
|
+
/* @__PURE__ */ jsx(Typography, { sx: styles.h6, variant: "h6", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationCurveCurveFilter" }) }),
|
|
58
|
+
/* @__PURE__ */ jsx(
|
|
59
|
+
ModelFilter,
|
|
60
|
+
{
|
|
61
|
+
ref: modelFilterRef,
|
|
62
|
+
equipmentType: getReferencedEquipmentTypeForModel(equipmentType),
|
|
63
|
+
modelsFetcher
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] }) })
|
|
91
67
|
] });
|
|
92
68
|
}
|
|
93
69
|
);
|