@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Grid2, Typography, Select, MenuItem, Stack, Box } from "@mui/material";
|
|
3
3
|
import { useIntl, FormattedMessage } from "react-intl";
|
|
4
4
|
import { forwardRef, useState, useRef, useCallback, useEffect, useMemo, useImperativeHandle } from "react";
|
|
5
5
|
import { buildExpertFilter, CURVE_EQUIPMENT_TYPES, NOMINAL_VOLTAGE_UNIT } from "./curve-selector-utils.js";
|
|
@@ -17,7 +17,7 @@ import "mathjs";
|
|
|
17
17
|
const styles = {
|
|
18
18
|
grid: {
|
|
19
19
|
width: "100%",
|
|
20
|
-
|
|
20
|
+
flex: 1
|
|
21
21
|
},
|
|
22
22
|
criteria: {
|
|
23
23
|
width: "100%",
|
|
@@ -25,7 +25,7 @@ const styles = {
|
|
|
25
25
|
},
|
|
26
26
|
equipment: {
|
|
27
27
|
width: "100%",
|
|
28
|
-
|
|
28
|
+
flex: 1
|
|
29
29
|
},
|
|
30
30
|
equipmentTitle: (theme) => ({
|
|
31
31
|
marginBottom: theme.spacing(1)
|
|
@@ -156,9 +156,9 @@ const EquipmentFilter = forwardRef(
|
|
|
156
156
|
[]
|
|
157
157
|
);
|
|
158
158
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
159
|
-
/* @__PURE__ */ jsxs(
|
|
160
|
-
/* @__PURE__ */ jsx(
|
|
161
|
-
/* @__PURE__ */ jsx(
|
|
159
|
+
/* @__PURE__ */ jsxs(Grid2, { container: true, sx: styles.criteria, children: [
|
|
160
|
+
/* @__PURE__ */ jsx(Grid2, { size: 4, children: /* @__PURE__ */ jsx(Typography, { children: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationCurveEquipmentType" }) }) }),
|
|
161
|
+
/* @__PURE__ */ jsx(Grid2, { size: 8, children: /* @__PURE__ */ jsx(
|
|
162
162
|
Select,
|
|
163
163
|
{
|
|
164
164
|
labelId: "DynamicSimulationCurveEquipmentType",
|
|
@@ -170,9 +170,9 @@ const EquipmentFilter = forwardRef(
|
|
|
170
170
|
}
|
|
171
171
|
) })
|
|
172
172
|
] }),
|
|
173
|
-
/* @__PURE__ */ jsxs(
|
|
174
|
-
/* @__PURE__ */ jsx(
|
|
175
|
-
/* @__PURE__ */ jsx(
|
|
173
|
+
/* @__PURE__ */ jsxs(Grid2, { container: true, sx: styles.criteria, children: [
|
|
174
|
+
/* @__PURE__ */ jsx(Grid2, { size: 4, children: /* @__PURE__ */ jsx(Typography, { children: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationCurvePost" }) }) }),
|
|
175
|
+
/* @__PURE__ */ jsx(Grid2, { size: 8, children: /* @__PURE__ */ jsx(
|
|
176
176
|
CheckboxAutocomplete,
|
|
177
177
|
{
|
|
178
178
|
id: "voltage-level",
|
|
@@ -185,9 +185,9 @@ const EquipmentFilter = forwardRef(
|
|
|
185
185
|
}
|
|
186
186
|
) })
|
|
187
187
|
] }),
|
|
188
|
-
/* @__PURE__ */ jsxs(
|
|
189
|
-
/* @__PURE__ */ jsx(
|
|
190
|
-
/* @__PURE__ */ jsx(
|
|
188
|
+
/* @__PURE__ */ jsxs(Grid2, { container: true, sx: styles.criteria, children: [
|
|
189
|
+
/* @__PURE__ */ jsx(Grid2, { size: 4, children: /* @__PURE__ */ jsx(Typography, { children: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationCurveCountry" }) }) }),
|
|
190
|
+
/* @__PURE__ */ jsx(Grid2, { size: 8, children: /* @__PURE__ */ jsx(
|
|
191
191
|
CheckboxAutocomplete,
|
|
192
192
|
{
|
|
193
193
|
id: "country",
|
|
@@ -198,9 +198,9 @@ const EquipmentFilter = forwardRef(
|
|
|
198
198
|
}
|
|
199
199
|
) })
|
|
200
200
|
] }),
|
|
201
|
-
/* @__PURE__ */ jsxs(
|
|
202
|
-
/* @__PURE__ */ jsx(
|
|
203
|
-
/* @__PURE__ */ jsx(
|
|
201
|
+
/* @__PURE__ */ jsxs(Grid2, { container: true, sx: styles.criteria, children: [
|
|
202
|
+
/* @__PURE__ */ jsx(Grid2, { size: 4, children: /* @__PURE__ */ jsx(Typography, { children: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationCurveTension" }) }) }),
|
|
203
|
+
/* @__PURE__ */ jsx(Grid2, { size: 8, children: /* @__PURE__ */ jsx(
|
|
204
204
|
CheckboxAutocomplete,
|
|
205
205
|
{
|
|
206
206
|
id: "nominal-voltage",
|
|
@@ -211,12 +211,12 @@ const EquipmentFilter = forwardRef(
|
|
|
211
211
|
}
|
|
212
212
|
) })
|
|
213
213
|
] }),
|
|
214
|
-
/* @__PURE__ */ jsxs(
|
|
215
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ jsxs(Stack, { sx: styles.equipment, children: [
|
|
215
|
+
/* @__PURE__ */ jsxs(Typography, { sx: styles.equipmentTitle, variant: "subtitle1", children: [
|
|
216
216
|
/* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationCurveEquipment" }),
|
|
217
217
|
` (${selectedRowsLength} / ${equipmentRowData?.length ?? 0})`
|
|
218
|
-
] })
|
|
219
|
-
/* @__PURE__ */ jsx(
|
|
218
|
+
] }),
|
|
219
|
+
/* @__PURE__ */ jsx(Box, { sx: styles.grid, children: /* @__PURE__ */ jsx(
|
|
220
220
|
CustomAGGrid,
|
|
221
221
|
{
|
|
222
222
|
ref: equipmentsRef,
|
|
@@ -230,7 +230,7 @@ const EquipmentFilter = forwardRef(
|
|
|
230
230
|
overlayLoadingTemplate: intl.formatMessage({ id: "LoadingRemoteData" }),
|
|
231
231
|
overrideLocales: AGGRID_LOCALES
|
|
232
232
|
}
|
|
233
|
-
) })
|
|
233
|
+
) })
|
|
234
234
|
] })
|
|
235
235
|
] });
|
|
236
236
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useIntl, FormattedMessage } from "react-intl";
|
|
3
3
|
import { forwardRef, useState, useRef, useMemo, useCallback, useEffect, useImperativeHandle } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { Grid2, Typography, Stack, Box } from "@mui/material";
|
|
5
5
|
import CheckboxSelect from "../common/checkbox-select.js";
|
|
6
6
|
import CheckboxTreeview from "../common/checkbox-treeview.js";
|
|
7
7
|
import { EquipmentType } from "../../../../../utils/types/equipmentType.js";
|
|
@@ -31,7 +31,8 @@ const styles = {
|
|
|
31
31
|
border: "solid",
|
|
32
32
|
borderWidth: ".5px",
|
|
33
33
|
borderColor: theme.palette.divider,
|
|
34
|
-
overflow: "auto"
|
|
34
|
+
overflow: "auto",
|
|
35
|
+
flex: 1
|
|
35
36
|
}),
|
|
36
37
|
model: {
|
|
37
38
|
width: "100%"
|
|
@@ -41,7 +42,7 @@ const styles = {
|
|
|
41
42
|
}),
|
|
42
43
|
variable: {
|
|
43
44
|
width: "100%",
|
|
44
|
-
|
|
45
|
+
flex: 1
|
|
45
46
|
},
|
|
46
47
|
variableTree: {
|
|
47
48
|
maxHeight: "440px"
|
|
@@ -114,9 +115,9 @@ const ModelFilter = forwardRef(
|
|
|
114
115
|
return makeGetVariableLabel(intl);
|
|
115
116
|
}, [intl]);
|
|
116
117
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
117
|
-
/* @__PURE__ */ jsxs(
|
|
118
|
-
/* @__PURE__ */ jsx(
|
|
119
|
-
/* @__PURE__ */ jsx(
|
|
118
|
+
/* @__PURE__ */ jsxs(Grid2, { container: true, sx: styles.model, children: [
|
|
119
|
+
/* @__PURE__ */ jsx(Grid2, { size: 6, children: /* @__PURE__ */ jsx(Typography, { children: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationCurveModel" }) }) }),
|
|
120
|
+
/* @__PURE__ */ jsx(Grid2, { size: 6, children: /* @__PURE__ */ jsx(
|
|
120
121
|
CheckboxSelect,
|
|
121
122
|
{
|
|
122
123
|
options: initialSelectedModels,
|
|
@@ -127,9 +128,9 @@ const ModelFilter = forwardRef(
|
|
|
127
128
|
}
|
|
128
129
|
) })
|
|
129
130
|
] }),
|
|
130
|
-
/* @__PURE__ */ jsxs(
|
|
131
|
-
/* @__PURE__ */ jsx(
|
|
132
|
-
/* @__PURE__ */ jsx(
|
|
131
|
+
/* @__PURE__ */ jsxs(Stack, { sx: styles.variable, children: [
|
|
132
|
+
/* @__PURE__ */ jsx(Typography, { sx: styles.modelTitle, variant: "subtitle1", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationCurveVariable" }) }),
|
|
133
|
+
/* @__PURE__ */ jsx(Box, { sx: styles.tree, children: /* @__PURE__ */ jsx(
|
|
133
134
|
CheckboxTreeview,
|
|
134
135
|
{
|
|
135
136
|
ref: variablesRef,
|
|
@@ -138,7 +139,7 @@ const ModelFilter = forwardRef(
|
|
|
138
139
|
checkAll: true,
|
|
139
140
|
sx: styles.variableTree
|
|
140
141
|
}
|
|
141
|
-
) })
|
|
142
|
+
) })
|
|
142
143
|
] })
|
|
143
144
|
] });
|
|
144
145
|
}
|
|
@@ -1,52 +1,49 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import {
|
|
3
|
-
import { useState, useCallback, useEffect } from "react";
|
|
4
|
-
import { Grid } from "@mui/material";
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect } from "react";
|
|
5
3
|
import "../../../utils/conversionUtils.js";
|
|
6
4
|
import { snackWithFallback } from "../../../utils/error.js";
|
|
7
5
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
8
6
|
import "../../../utils/types/equipmentType.js";
|
|
9
7
|
import { mapDynamicSimulationParameters } from "../../../utils/types/dynamic-simulation.type.js";
|
|
10
8
|
import "@mui/icons-material";
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
16
|
-
import "react-hook-form";
|
|
9
|
+
import { ParameterLayout } from "../common/parameter-layout/parameter-layout.js";
|
|
10
|
+
import "../common/parameter-layout/parameter-layout-provider.js";
|
|
11
|
+
import "@mui/material";
|
|
12
|
+
import "react-intl";
|
|
17
13
|
import { fetchDynamicSimulationParameters } from "../../../services/dynamic-simulation.js";
|
|
18
14
|
import "localized-countries";
|
|
19
15
|
import "localized-countries/data/fr";
|
|
20
16
|
import "localized-countries/data/en";
|
|
21
17
|
import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
|
|
18
|
+
import "react-hook-form";
|
|
22
19
|
import { CustomFormProvider } from "../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
23
|
-
import
|
|
20
|
+
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
21
|
+
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
22
|
+
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
23
|
+
import "@hello-pangea/dnd";
|
|
24
|
+
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
24
25
|
import "yup";
|
|
25
|
-
import { DirectoryItemSelector } from "../../../components/ui/directoryItemSelector/DirectoryItemSelector.js";
|
|
26
26
|
import "../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
27
|
-
import { PopupConfirmationDialog } from "../../../components/ui/dialogs/popupConfirmationDialog/PopupConfirmationDialog.js";
|
|
28
27
|
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
29
28
|
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
30
29
|
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
31
30
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
32
31
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
33
|
-
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
34
32
|
import "../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
35
33
|
import "../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
36
|
-
import "@hello-pangea/dnd";
|
|
37
|
-
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
38
34
|
import "../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
39
35
|
import "mui-nested-menu";
|
|
40
36
|
import "react-resizable-panels";
|
|
41
37
|
import "react-papaparse";
|
|
42
|
-
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
43
38
|
import "../common/widget/parameter-line-slider.js";
|
|
44
39
|
import "../common/limitreductions/columns-definitions.js";
|
|
45
40
|
import "../common/contingency-table/contingency-table.js";
|
|
46
41
|
import "../common/contingency-table/columns-definitions.js";
|
|
42
|
+
import { useTabs } from "../common/hook/use-tabs.js";
|
|
47
43
|
import "@hookform/resolvers/yup";
|
|
48
44
|
import "../../../components/composite/filter/HeaderFilterForm.js";
|
|
49
45
|
import { useDynamicSimulationParametersForm, toParamsEnriched, toFormValues } from "./use-dynamic-simulation-parameters-form.js";
|
|
46
|
+
import { TabValues } from "./dynamic-simulation.type.js";
|
|
50
47
|
import { DynamicSimulationForm } from "./dynamic-simulation-parameters-form.js";
|
|
51
48
|
import useDefaultParams from "./hook/use-default-params.js";
|
|
52
49
|
function DynamicSimulationInline({
|
|
@@ -64,24 +61,15 @@ function DynamicSimulationInline({
|
|
|
64
61
|
name: null,
|
|
65
62
|
description: null
|
|
66
63
|
});
|
|
67
|
-
const intl = useIntl();
|
|
68
64
|
const { snackError } = useSnackMessage();
|
|
69
65
|
const { getDefaultParams, setDefaultParams } = useDefaultParams(params);
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}, []);
|
|
78
|
-
const handleCancelReset = useCallback(() => {
|
|
79
|
-
setOpenResetConfirmation(false);
|
|
80
|
-
}, []);
|
|
81
|
-
const handleReset = useCallback(() => {
|
|
82
|
-
resetParameters();
|
|
83
|
-
setOpenResetConfirmation(false);
|
|
84
|
-
}, [resetParameters]);
|
|
66
|
+
const { formMethods } = dynamicSimulationMethods;
|
|
67
|
+
const { reset, getValues, formState, handleSubmit } = formMethods;
|
|
68
|
+
const useTabsReturn = useTabs({
|
|
69
|
+
defaultTab: TabValues.TAB_TIME_DELAY,
|
|
70
|
+
tabEnum: TabValues,
|
|
71
|
+
errors: formState.errors
|
|
72
|
+
});
|
|
85
73
|
const onSubmit = useCallback(
|
|
86
74
|
(formData) => {
|
|
87
75
|
updateParameters(toParamsEnriched(formData, getDefaultParams()));
|
|
@@ -91,7 +79,6 @@ function DynamicSimulationInline({
|
|
|
91
79
|
const handleLoadParameter = useCallback(
|
|
92
80
|
(newParams) => {
|
|
93
81
|
if (newParams?.length) {
|
|
94
|
-
setOpenSelectParameterDialog(false);
|
|
95
82
|
const parametersUuid = newParams[0].id;
|
|
96
83
|
fetchDynamicSimulationParameters(parametersUuid).then((_params) => {
|
|
97
84
|
reset(toFormValues(_params), {
|
|
@@ -102,85 +89,36 @@ function DynamicSimulationInline({
|
|
|
102
89
|
snackWithFallback(snackError, error, { headerId: "paramsRetrievingError" });
|
|
103
90
|
});
|
|
104
91
|
}
|
|
105
|
-
setOpenSelectParameterDialog(false);
|
|
106
92
|
},
|
|
107
93
|
[reset, setDefaultParams, snackError]
|
|
108
94
|
);
|
|
109
95
|
useEffect(() => {
|
|
110
96
|
setHaveDirtyFields(formState.isDirty);
|
|
111
97
|
}, [formState, setHaveDirtyFields]);
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
label: "settings.button.chooseSettings"
|
|
129
|
-
}
|
|
130
|
-
),
|
|
131
|
-
/* @__PURE__ */ jsx(LabelledButton, { disabled: true, callback: () => setOpenCreateParameterDialog(true), label: "save" }),
|
|
132
|
-
/* @__PURE__ */ jsx(LabelledButton, { callback: handleResetClick, label: "resetToDefault" }),
|
|
133
|
-
/* @__PURE__ */ jsx(SubmitButton, { variant: "outlined", onClick: handleSubmit(onSubmit, onSubmitError), children: /* @__PURE__ */ jsx(FormattedMessage, { id: "validate" }) })
|
|
134
|
-
]
|
|
135
|
-
}
|
|
136
|
-
) }),
|
|
137
|
-
openCreateParameterDialog && /* @__PURE__ */ jsx(
|
|
138
|
-
CreateParameterDialog,
|
|
139
|
-
{
|
|
140
|
-
studyUuid,
|
|
141
|
-
open: openCreateParameterDialog,
|
|
142
|
-
onClose: () => setOpenCreateParameterDialog(false),
|
|
143
|
-
parameterValues: getValues,
|
|
144
|
-
parameterFormatter: (formData) => mapDynamicSimulationParameters(toParamsEnriched(formData, getDefaultParams())),
|
|
145
|
-
parameterType: ElementType.DYNAMIC_SIMULATION_PARAMETERS
|
|
146
|
-
}
|
|
147
|
-
),
|
|
148
|
-
openSelectParameterDialog && /* @__PURE__ */ jsx(
|
|
149
|
-
DirectoryItemSelector,
|
|
150
|
-
{
|
|
151
|
-
open: openSelectParameterDialog,
|
|
152
|
-
onClose: handleLoadParameter,
|
|
153
|
-
types: [ElementType.DYNAMIC_SIMULATION_PARAMETERS],
|
|
154
|
-
title: intl.formatMessage({
|
|
155
|
-
id: "showSelectParameterDialog"
|
|
156
|
-
}),
|
|
157
|
-
onlyLeaves: true,
|
|
158
|
-
multiSelect: false,
|
|
159
|
-
validationButtonText: intl.formatMessage({
|
|
160
|
-
id: "validate"
|
|
161
|
-
})
|
|
162
|
-
}
|
|
163
|
-
),
|
|
164
|
-
openResetConfirmation && /* @__PURE__ */ jsx(
|
|
165
|
-
PopupConfirmationDialog,
|
|
98
|
+
return /* @__PURE__ */ jsx(CustomFormProvider, { validationSchema: dynamicSimulationMethods.formSchema, ...formMethods, children: /* @__PURE__ */ jsx(
|
|
99
|
+
ParameterLayout,
|
|
100
|
+
{
|
|
101
|
+
title: "DynamicSimulation",
|
|
102
|
+
isLoading: !dynamicSimulationMethods.paramsLoaded,
|
|
103
|
+
parameterType: ElementType.DYNAMIC_SIMULATION_PARAMETERS,
|
|
104
|
+
createParameter: {
|
|
105
|
+
studyUuid,
|
|
106
|
+
parameterFormatter: (formData) => mapDynamicSimulationParameters(toParamsEnriched(formData, getDefaultParams())),
|
|
107
|
+
getParameterValues: getValues
|
|
108
|
+
},
|
|
109
|
+
selectParameterHandler: handleLoadParameter,
|
|
110
|
+
resetHandler: resetParameters,
|
|
111
|
+
validateHandler: handleSubmit(onSubmit, useTabsReturn.onError),
|
|
112
|
+
children: /* @__PURE__ */ jsx(
|
|
113
|
+
DynamicSimulationForm,
|
|
166
114
|
{
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
115
|
+
dynamicSimulationMethods,
|
|
116
|
+
useTabsReturn,
|
|
117
|
+
voltageLevelsFetcher,
|
|
118
|
+
countriesFetcher,
|
|
119
|
+
evaluateFilterFetcher
|
|
172
120
|
}
|
|
173
121
|
)
|
|
174
|
-
] });
|
|
175
|
-
};
|
|
176
|
-
return /* @__PURE__ */ jsx(CustomFormProvider, { validationSchema: formSchema, ...formMethods, children: /* @__PURE__ */ jsx(
|
|
177
|
-
DynamicSimulationForm,
|
|
178
|
-
{
|
|
179
|
-
dynamicSimulationMethods,
|
|
180
|
-
renderActions,
|
|
181
|
-
voltageLevelsFetcher,
|
|
182
|
-
countriesFetcher,
|
|
183
|
-
evaluateFilterFetcher
|
|
184
122
|
}
|
|
185
123
|
) });
|
|
186
124
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FieldErrors } from 'react-hook-form';
|
|
1
|
+
import { UseTabsReturn } from '../common';
|
|
3
2
|
import { VoltageLevelInfos } from '../../../utils/types/equipmentType';
|
|
3
|
+
import { TabValues } from './dynamic-simulation.type';
|
|
4
4
|
import { ExpertFilter, IdentifiableAttributes } from '../../../components/composite/filter';
|
|
5
5
|
import { UseComputationParametersFormReturn } from '../common/utils';
|
|
6
6
|
type DynamicSimulationFormProps = {
|
|
7
7
|
dynamicSimulationMethods: UseComputationParametersFormReturn;
|
|
8
|
-
|
|
9
|
-
renderActions?: (onSubmitError: (errors: FieldErrors) => void) => ReactNode;
|
|
8
|
+
useTabsReturn: UseTabsReturn<TabValues>;
|
|
10
9
|
voltageLevelsFetcher?: () => Promise<VoltageLevelInfos[]>;
|
|
11
10
|
countriesFetcher?: () => Promise<string[]>;
|
|
12
11
|
evaluateFilterFetcher?: (filter: ExpertFilter) => Promise<IdentifiableAttributes[]>;
|
|
13
12
|
};
|
|
14
|
-
export declare function DynamicSimulationForm({ dynamicSimulationMethods,
|
|
13
|
+
export declare function DynamicSimulationForm({ dynamicSimulationMethods, useTabsReturn, voltageLevelsFetcher, countriesFetcher, evaluateFilterFetcher, }: Readonly<DynamicSimulationFormProps>): import("react").JSX.Element;
|
|
15
14
|
export {};
|
|
@@ -1,43 +1,42 @@
|
|
|
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
|
-
import "../../../utils/conversionUtils.js";
|
|
5
|
-
import "../../../utils/types/equipmentType.js";
|
|
6
4
|
import "@mui/icons-material";
|
|
7
|
-
import { mergeSx } from "../../../utils/styles.js";
|
|
8
|
-
import { TabPanel } from "../common/parameters.js";
|
|
9
5
|
import "react";
|
|
6
|
+
import { TabPanel } from "../common/parameters.js";
|
|
7
|
+
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
8
|
+
import "../../../utils/conversionUtils.js";
|
|
9
|
+
import "../../../utils/types/equipmentType.js";
|
|
10
|
+
import "react-hook-form";
|
|
10
11
|
import "localized-countries";
|
|
11
12
|
import "localized-countries/data/fr";
|
|
12
13
|
import "localized-countries/data/en";
|
|
13
14
|
import "notistack";
|
|
14
|
-
import "react-hook-form";
|
|
15
15
|
import "../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
|
|
16
|
-
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
17
|
-
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
18
|
-
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
19
|
-
import "@hello-pangea/dnd";
|
|
20
|
-
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
21
|
-
import { ProviderParam } from "../common/ProviderParam.js";
|
|
22
16
|
import "yup";
|
|
17
|
+
import "../../../components/ui/treeViewFinder/TreeViewFinder.js";
|
|
23
18
|
import "../../../components/ui/reactHookForm/numbers/RangeInput.js";
|
|
24
19
|
import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
|
|
25
20
|
import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
|
|
26
21
|
import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
|
|
27
22
|
import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
|
|
28
23
|
import "@material-symbols/svg-400/outlined/add_notes.svg?react";
|
|
24
|
+
import "../../../components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
29
25
|
import "../../../components/ui/reactHookForm/expandableInput/ExpandableInput.js";
|
|
30
26
|
import "../../../components/ui/reactHookForm/directory-item-input/directory-item-utils.js";
|
|
27
|
+
import "@hello-pangea/dnd";
|
|
28
|
+
import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
31
29
|
import "../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
32
30
|
import "mui-nested-menu";
|
|
33
31
|
import "react-resizable-panels";
|
|
34
32
|
import "react-papaparse";
|
|
35
|
-
import
|
|
33
|
+
import "../common/parameter-layout/parameter-layout-provider.js";
|
|
34
|
+
import { ProviderParam } from "../common/provider-param.js";
|
|
35
|
+
import { parametersStyles, getTabStyle } from "../parameters-style.js";
|
|
36
36
|
import "../common/widget/parameter-line-slider.js";
|
|
37
37
|
import "../common/limitreductions/columns-definitions.js";
|
|
38
38
|
import "../common/contingency-table/contingency-table.js";
|
|
39
39
|
import "../common/contingency-table/columns-definitions.js";
|
|
40
|
-
import { useTabs } from "../common/hook/use-tabs.js";
|
|
41
40
|
import "@hookform/resolvers/yup";
|
|
42
41
|
import "../../../components/composite/filter/HeaderFilterForm.js";
|
|
43
42
|
import { TabValues } from "./dynamic-simulation.type.js";
|
|
@@ -53,95 +52,74 @@ import { NetworkParameters } from "./network/network-parameters.js";
|
|
|
53
52
|
import CurveParameters from "./curve/curve-parameters.js";
|
|
54
53
|
function DynamicSimulationForm({
|
|
55
54
|
dynamicSimulationMethods,
|
|
56
|
-
|
|
57
|
-
renderActions,
|
|
55
|
+
useTabsReturn,
|
|
58
56
|
// fetchers for curve parameters
|
|
59
57
|
voltageLevelsFetcher,
|
|
60
58
|
countriesFetcher,
|
|
61
59
|
evaluateFilterFetcher
|
|
62
60
|
}) {
|
|
63
|
-
const {
|
|
64
|
-
const { selectedTab, tabsWithError, onTabChange
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
sx: getTabStyle(tabsWithError, TabValues.TAB_TIME_DELAY)
|
|
79
|
-
}
|
|
80
|
-
),
|
|
81
|
-
/* @__PURE__ */ jsx(
|
|
82
|
-
Tab,
|
|
83
|
-
{
|
|
84
|
-
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationSolver" }),
|
|
85
|
-
value: TabValues.TAB_SOLVER,
|
|
86
|
-
sx: getTabStyle(tabsWithError, TabValues.TAB_SOLVER)
|
|
87
|
-
}
|
|
88
|
-
),
|
|
89
|
-
/* @__PURE__ */ jsx(
|
|
90
|
-
Tab,
|
|
91
|
-
{
|
|
92
|
-
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationMapping" }),
|
|
93
|
-
value: TabValues.TAB_MAPPING,
|
|
94
|
-
sx: getTabStyle(tabsWithError, TabValues.TAB_MAPPING)
|
|
95
|
-
}
|
|
96
|
-
),
|
|
97
|
-
/* @__PURE__ */ jsx(
|
|
98
|
-
Tab,
|
|
99
|
-
{
|
|
100
|
-
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationNetwork" }),
|
|
101
|
-
value: TabValues.TAB_NETWORK,
|
|
102
|
-
sx: getTabStyle(tabsWithError, TabValues.TAB_NETWORK)
|
|
103
|
-
}
|
|
104
|
-
),
|
|
105
|
-
/* @__PURE__ */ jsx(
|
|
106
|
-
Tab,
|
|
107
|
-
{
|
|
108
|
-
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationCurve" }),
|
|
109
|
-
value: TabValues.TAB_CURVE,
|
|
110
|
-
sx: getTabStyle(tabsWithError, TabValues.TAB_CURVE)
|
|
111
|
-
}
|
|
112
|
-
)
|
|
113
|
-
] }) }),
|
|
114
|
-
/* @__PURE__ */ jsxs(
|
|
115
|
-
Grid,
|
|
61
|
+
const { formattedProviders } = dynamicSimulationMethods;
|
|
62
|
+
const { selectedTab, tabsWithError, onTabChange } = useTabsReturn;
|
|
63
|
+
return /* @__PURE__ */ jsxs(Stack, { sx: parametersStyles.scrollableGrid, children: [
|
|
64
|
+
/* @__PURE__ */ jsx(Grid2, { size: 12, children: /* @__PURE__ */ jsx(ProviderParam, { options: formattedProviders, id: "Ds" }) }),
|
|
65
|
+
/* @__PURE__ */ jsx(Grid2, { size: 12, children: /* @__PURE__ */ jsxs(Tabs, { value: selectedTab, variant: "scrollable", onChange: onTabChange, "aria-label": "parameters", children: [
|
|
66
|
+
/* @__PURE__ */ jsx(
|
|
67
|
+
Tab,
|
|
68
|
+
{
|
|
69
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationTimeDelay" }),
|
|
70
|
+
value: TabValues.TAB_TIME_DELAY,
|
|
71
|
+
sx: getTabStyle(tabsWithError, TabValues.TAB_TIME_DELAY)
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ jsx(
|
|
75
|
+
Tab,
|
|
116
76
|
{
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
paddingTop: 0,
|
|
122
|
-
width: "100%"
|
|
123
|
-
}),
|
|
124
|
-
children: [
|
|
125
|
-
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.TAB_TIME_DELAY, children: /* @__PURE__ */ jsx(TimeDelayParameters, { path: TabValues.TAB_TIME_DELAY }) }),
|
|
126
|
-
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.TAB_SOLVER, children: /* @__PURE__ */ jsx(SolverParameters, { path: TabValues.TAB_SOLVER }) }),
|
|
127
|
-
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.TAB_MAPPING, children: /* @__PURE__ */ jsx(MappingParameters, { path: TabValues.TAB_MAPPING }) }),
|
|
128
|
-
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.TAB_NETWORK, children: /* @__PURE__ */ jsx(NetworkParameters, { path: TabValues.TAB_NETWORK }) }),
|
|
129
|
-
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.TAB_CURVE, children: /* @__PURE__ */ jsx(
|
|
130
|
-
CurveParameters,
|
|
131
|
-
{
|
|
132
|
-
path: TabValues.TAB_CURVE,
|
|
133
|
-
mappingPath: `${TabValues.TAB_MAPPING}.${MAPPING}`,
|
|
134
|
-
voltageLevelsFetcher,
|
|
135
|
-
countriesFetcher,
|
|
136
|
-
evaluateFilterFetcher
|
|
137
|
-
}
|
|
138
|
-
) })
|
|
139
|
-
]
|
|
140
|
-
},
|
|
141
|
-
"dsParameters"
|
|
77
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationSolver" }),
|
|
78
|
+
value: TabValues.TAB_SOLVER,
|
|
79
|
+
sx: getTabStyle(tabsWithError, TabValues.TAB_SOLVER)
|
|
80
|
+
}
|
|
142
81
|
),
|
|
143
|
-
|
|
144
|
-
|
|
82
|
+
/* @__PURE__ */ jsx(
|
|
83
|
+
Tab,
|
|
84
|
+
{
|
|
85
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationMapping" }),
|
|
86
|
+
value: TabValues.TAB_MAPPING,
|
|
87
|
+
sx: getTabStyle(tabsWithError, TabValues.TAB_MAPPING)
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ jsx(
|
|
91
|
+
Tab,
|
|
92
|
+
{
|
|
93
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationNetwork" }),
|
|
94
|
+
value: TabValues.TAB_NETWORK,
|
|
95
|
+
sx: getTabStyle(tabsWithError, TabValues.TAB_NETWORK)
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
/* @__PURE__ */ jsx(
|
|
99
|
+
Tab,
|
|
100
|
+
{
|
|
101
|
+
label: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationCurve" }),
|
|
102
|
+
value: TabValues.TAB_CURVE,
|
|
103
|
+
sx: getTabStyle(tabsWithError, TabValues.TAB_CURVE)
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
] }) }),
|
|
107
|
+
/* @__PURE__ */ jsxs(Grid2, { container: true, size: 12, sx: { paddingTop: 0, width: "100%", maxHeight: "100%" }, children: [
|
|
108
|
+
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.TAB_TIME_DELAY, children: /* @__PURE__ */ jsx(TimeDelayParameters, { path: TabValues.TAB_TIME_DELAY }) }),
|
|
109
|
+
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.TAB_SOLVER, children: /* @__PURE__ */ jsx(SolverParameters, { path: TabValues.TAB_SOLVER }) }),
|
|
110
|
+
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.TAB_MAPPING, children: /* @__PURE__ */ jsx(MappingParameters, { path: TabValues.TAB_MAPPING }) }),
|
|
111
|
+
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.TAB_NETWORK, children: /* @__PURE__ */ jsx(NetworkParameters, { path: TabValues.TAB_NETWORK }) }),
|
|
112
|
+
/* @__PURE__ */ jsx(TabPanel, { value: selectedTab, index: TabValues.TAB_CURVE, children: /* @__PURE__ */ jsx(
|
|
113
|
+
CurveParameters,
|
|
114
|
+
{
|
|
115
|
+
path: TabValues.TAB_CURVE,
|
|
116
|
+
mappingPath: `${TabValues.TAB_MAPPING}.${MAPPING}`,
|
|
117
|
+
voltageLevelsFetcher,
|
|
118
|
+
countriesFetcher,
|
|
119
|
+
evaluateFilterFetcher
|
|
120
|
+
}
|
|
121
|
+
) })
|
|
122
|
+
] }, "dsParameters")
|
|
145
123
|
] });
|
|
146
124
|
}
|
|
147
125
|
export {
|