@gridsuite/commons-ui 0.191.0 → 0.193.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/filter/constants/FilterConstants.d.ts +6 -2
- package/dist/components/filter/constants/FilterConstants.js +1 -10
- package/dist/components/filter/expert/ExpertFilterEditionDialog.js +2 -1
- package/dist/components/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js +2 -1
- package/dist/components/filter/explicitNaming/ExplicitNamingFilterForm.d.ts +1 -1
- package/dist/components/filter/filter.type.d.ts +27 -17
- package/dist/components/filter/index.js +1 -2
- package/dist/components/index.js +9 -4
- package/dist/components/inputs/checkbox-autocomplete/checkbox-autocomplete.d.ts +12 -0
- package/dist/components/inputs/checkbox-autocomplete/checkbox-autocomplete.js +126 -0
- package/dist/components/inputs/checkbox-autocomplete/checkbox-item.d.ts +8 -0
- package/dist/components/inputs/checkbox-autocomplete/checkbox-item.js +17 -0
- package/dist/components/inputs/checkbox-autocomplete/index.d.ts +7 -0
- package/dist/components/inputs/checkbox-autocomplete/index.js +4 -0
- package/dist/components/inputs/checkbox-autocomplete/virtualized-list-item.d.ts +15 -0
- package/dist/components/inputs/checkbox-autocomplete/virtualized-list-item.js +27 -0
- package/dist/components/inputs/checkbox-autocomplete/virtualized-list.d.ts +3 -0
- package/dist/components/inputs/checkbox-autocomplete/virtualized-list.js +30 -0
- package/dist/components/network-modifications/by-filter/deletion/ByFilterDeletionForm.d.ts +0 -6
- package/dist/components/network-modifications/by-filter/deletion/ByFilterDeletionForm.js +6 -10
- package/dist/components/network-modifications/common/connectivity/BranchConnectivityForm.js +35 -39
- package/dist/components/network-modifications/common/measurements/BranchActiveReactivePowerMeasurementsForm.js +1 -7
- package/dist/components/network-modifications/common/measurements/PowerMeasurementsForm.js +3 -4
- package/dist/components/network-modifications/common/measurements/PowerWithValidityForm.js +19 -22
- package/dist/components/network-modifications/common/properties/PropertiesForm.js +14 -15
- package/dist/components/network-modifications/common/properties/PropertyForm.d.ts +1 -1
- package/dist/components/network-modifications/common/properties/PropertyForm.js +42 -50
- package/dist/components/network-modifications/common/setpoints/SetPointsForm.js +21 -24
- package/dist/components/network-modifications/equipmentDeletion/EquipmentDeletionForm.js +35 -38
- package/dist/components/network-modifications/equipmentDeletion/equipmentDeletion.utils.js +1 -1
- package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/HvdcLccDeletionSpecificForm.js +5 -6
- package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.d.ts +0 -6
- package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.js +6 -5
- package/dist/components/network-modifications/load/common/LoadDialogHeader.js +6 -17
- package/dist/components/network-modifications/load/common/LoadDialogTabs.js +4 -4
- package/dist/components/network-modifications/load/common/LoadDialogTabsContent.js +21 -18
- package/dist/components/network-modifications/load/modification/loadModification.utils.js +1 -1
- package/dist/components/network-modifications/substation/creation/SubstationCreationForm.js +16 -12
- package/dist/components/network-modifications/substation/modification/SubstationModificationForm.js +40 -44
- package/dist/components/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +22 -14
- package/dist/components/network-modifications/voltageLevel/creation/tabs/characteristicsTab/CharacteristicsTab.js +5 -6
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/StructureTab.js +3 -4
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/couplingOmnibus/CouplingOmnibusCreation.js +3 -3
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js +2 -3
- package/dist/components/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/creation/CreateSwitchesForm.js +10 -21
- package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationCreationSection.js +3 -3
- package/dist/components/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.js +2 -2
- package/dist/components/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js +103 -110
- package/dist/components/node/build-status-chip.d.ts +2 -1
- package/dist/components/node/build-status-chip.js +13 -3
- package/dist/components/parameters/common/hook/index.d.ts +8 -0
- package/dist/components/parameters/common/hook/index.js +6 -0
- package/dist/components/parameters/common/hook/use-parameters-form.d.ts +13 -0
- package/dist/components/parameters/common/hook/use-parameters-form.js +60 -0
- package/dist/components/parameters/common/hook/use-tabs.d.ts +13 -0
- package/dist/components/parameters/common/hook/use-tabs.js +60 -0
- package/dist/components/parameters/common/index.d.ts +1 -0
- package/dist/components/parameters/common/index.js +5 -1
- package/dist/components/parameters/common/parameter-field.js +2 -0
- package/dist/components/parameters/common/parameters-edition-dialog-props.d.ts +1 -0
- package/dist/components/parameters/common/utils.d.ts +2 -15
- package/dist/components/parameters/common/utils.js +1 -40
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.d.ts +4 -3
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js +19 -12
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +9 -6
- package/dist/components/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.d.ts +1 -3
- package/dist/components/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.js +9 -54
- package/dist/components/parameters/dynamic-security-analysis/contingency-parameters.js +14 -7
- package/dist/components/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js +9 -6
- package/dist/components/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.d.ts +4 -3
- package/dist/components/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.js +41 -40
- package/dist/components/parameters/dynamic-security-analysis/dynamic-security-analysis.type.d.ts +10 -0
- package/dist/components/parameters/dynamic-security-analysis/dynamic-security-analysis.type.js +8 -0
- package/dist/components/parameters/dynamic-security-analysis/scenario-parameters.js +15 -6
- package/dist/components/parameters/dynamic-security-analysis/use-dynamic-security-analysis-parameters-form.d.ts +1 -6
- package/dist/components/parameters/dynamic-security-analysis/use-dynamic-security-analysis-parameters-form.js +19 -96
- package/dist/components/parameters/dynamic-simulation/curve/common/checkbox-select.d.ts +15 -0
- package/dist/components/parameters/dynamic-simulation/curve/common/checkbox-select.js +83 -0
- package/dist/components/parameters/dynamic-simulation/curve/common/checkbox-treeview.d.ts +22 -0
- package/dist/components/parameters/dynamic-simulation/curve/common/checkbox-treeview.js +163 -0
- package/dist/components/parameters/dynamic-simulation/curve/common/curve.type.d.ts +14 -0
- package/dist/components/parameters/dynamic-simulation/curve/common/curve.type.js +1 -0
- package/dist/components/parameters/dynamic-simulation/curve/common/grid-buttons.d.ts +8 -0
- package/dist/components/parameters/dynamic-simulation/curve/common/grid-buttons.js +39 -0
- package/dist/components/parameters/dynamic-simulation/curve/common/grid-search.d.ts +8 -0
- package/dist/components/parameters/dynamic-simulation/curve/common/grid-search.js +60 -0
- package/dist/components/parameters/dynamic-simulation/curve/curve-parameters-constants.d.ts +11 -0
- package/dist/components/parameters/dynamic-simulation/curve/curve-parameters-constants.js +9 -0
- package/dist/components/parameters/dynamic-simulation/curve/curve-parameters-utils.d.ts +12 -0
- package/dist/components/parameters/dynamic-simulation/curve/curve-parameters-utils.js +18 -0
- package/dist/components/parameters/dynamic-simulation/curve/curve-parameters.d.ts +11 -0
- package/dist/components/parameters/dynamic-simulation/curve/curve-parameters.js +177 -0
- package/dist/components/parameters/dynamic-simulation/curve/curve-parameters.type.d.ts +6 -0
- package/dist/components/parameters/dynamic-simulation/curve/curve-parameters.type.js +1 -0
- package/dist/components/parameters/dynamic-simulation/curve/dialog/curve-preview.d.ts +8 -0
- package/dist/components/parameters/dynamic-simulation/curve/dialog/curve-preview.js +123 -0
- package/dist/components/parameters/dynamic-simulation/curve/dialog/curve-selector-dialog.d.ts +15 -0
- package/dist/components/parameters/dynamic-simulation/curve/dialog/curve-selector-dialog.js +126 -0
- package/dist/components/parameters/dynamic-simulation/curve/dialog/curve-selector-utils.d.ts +20 -0
- package/dist/components/parameters/dynamic-simulation/curve/dialog/curve-selector-utils.js +283 -0
- package/dist/components/parameters/dynamic-simulation/curve/dialog/curve-selector.d.ts +16 -0
- package/dist/components/parameters/dynamic-simulation/curve/dialog/curve-selector.js +96 -0
- package/dist/components/parameters/dynamic-simulation/curve/dialog/equipment-filter.d.ts +14 -0
- package/dist/components/parameters/dynamic-simulation/curve/dialog/equipment-filter.js +239 -0
- package/dist/components/parameters/dynamic-simulation/curve/dialog/model-filter-utils.d.ts +3 -0
- package/dist/components/parameters/dynamic-simulation/curve/dialog/model-filter-utils.js +68 -0
- package/dist/components/parameters/dynamic-simulation/curve/dialog/model-filter.d.ts +12 -0
- package/dist/components/parameters/dynamic-simulation/curve/dialog/model-filter.js +148 -0
- package/dist/components/parameters/dynamic-simulation/dynamic-simulation-inline.d.ts +15 -0
- package/dist/components/parameters/dynamic-simulation/dynamic-simulation-inline.js +191 -0
- package/dist/components/parameters/dynamic-simulation/dynamic-simulation-parameters-form.d.ts +15 -0
- package/dist/components/parameters/dynamic-simulation/dynamic-simulation-parameters-form.js +153 -0
- package/dist/components/parameters/dynamic-simulation/dynamic-simulation.type.d.ts +13 -0
- package/dist/components/parameters/dynamic-simulation/dynamic-simulation.type.js +11 -0
- package/dist/components/parameters/dynamic-simulation/hook/use-default-params.d.ts +4 -0
- package/dist/components/parameters/dynamic-simulation/hook/use-default-params.js +22 -0
- package/dist/components/parameters/dynamic-simulation/index.d.ts +7 -0
- package/dist/components/parameters/dynamic-simulation/index.js +4 -0
- package/dist/components/parameters/dynamic-simulation/mapping/index.d.ts +9 -0
- package/dist/components/parameters/dynamic-simulation/mapping/index.js +9 -0
- package/dist/components/parameters/dynamic-simulation/mapping/mapping-parameters-constants.d.ts +7 -0
- package/dist/components/parameters/dynamic-simulation/mapping/mapping-parameters-constants.js +4 -0
- package/dist/components/parameters/dynamic-simulation/mapping/mapping-parameters-utils.d.ts +9 -0
- package/dist/components/parameters/dynamic-simulation/mapping/mapping-parameters-utils.js +13 -0
- package/dist/components/parameters/dynamic-simulation/mapping/mapping-parameters.d.ts +5 -0
- package/dist/components/parameters/dynamic-simulation/mapping/mapping-parameters.js +53 -0
- package/dist/components/parameters/dynamic-simulation/network/index.d.ts +9 -0
- package/dist/components/parameters/dynamic-simulation/network/index.js +10 -0
- package/dist/components/parameters/dynamic-simulation/network/network-parameters-constants.d.ts +29 -0
- package/dist/components/parameters/dynamic-simulation/network/network-parameters-constants.js +28 -0
- package/dist/components/parameters/dynamic-simulation/network/network-parameters-utils.d.ts +66 -0
- package/dist/components/parameters/dynamic-simulation/network/network-parameters-utils.js +51 -0
- package/dist/components/parameters/dynamic-simulation/network/network-parameters.d.ts +3 -0
- package/dist/components/parameters/dynamic-simulation/network/network-parameters.js +120 -0
- package/dist/components/parameters/dynamic-simulation/solver/common-solver/common-solver-parameters-constants.d.ts +31 -0
- package/dist/components/parameters/dynamic-simulation/solver/common-solver/common-solver-parameters-constants.js +29 -0
- package/dist/components/parameters/dynamic-simulation/solver/common-solver/common-solver-parameters-utils.d.ts +26 -0
- package/dist/components/parameters/dynamic-simulation/solver/common-solver/common-solver-parameters-utils.js +33 -0
- package/dist/components/parameters/dynamic-simulation/solver/common-solver/common-solver-parameters.d.ts +3 -0
- package/dist/components/parameters/dynamic-simulation/solver/common-solver/common-solver-parameters.js +134 -0
- package/dist/components/parameters/dynamic-simulation/solver/common-solver/index.d.ts +9 -0
- package/dist/components/parameters/dynamic-simulation/solver/common-solver/index.js +8 -0
- package/dist/components/parameters/dynamic-simulation/solver/ida-solver/ida-solver-parameters-constants.d.ts +14 -0
- package/dist/components/parameters/dynamic-simulation/solver/ida-solver/ida-solver-parameters-constants.js +12 -0
- package/dist/components/parameters/dynamic-simulation/solver/ida-solver/ida-solver-parameters-utils.d.ts +62 -0
- package/dist/components/parameters/dynamic-simulation/solver/ida-solver/ida-solver-parameters-utils.js +17 -0
- package/dist/components/parameters/dynamic-simulation/solver/ida-solver/ida-solver-parameters.d.ts +3 -0
- package/dist/components/parameters/dynamic-simulation/solver/ida-solver/ida-solver-parameters.js +53 -0
- package/dist/components/parameters/dynamic-simulation/solver/ida-solver/index.d.ts +9 -0
- package/dist/components/parameters/dynamic-simulation/solver/ida-solver/index.js +8 -0
- package/dist/components/parameters/dynamic-simulation/solver/index.d.ts +9 -0
- package/dist/components/parameters/dynamic-simulation/solver/index.js +9 -0
- package/dist/components/parameters/dynamic-simulation/solver/sim-solver/index.d.ts +9 -0
- package/dist/components/parameters/dynamic-simulation/solver/sim-solver/index.js +8 -0
- package/dist/components/parameters/dynamic-simulation/solver/sim-solver/simplified-solver-parameters-constant.d.ts +26 -0
- package/dist/components/parameters/dynamic-simulation/solver/sim-solver/simplified-solver-parameters-constant.js +24 -0
- package/dist/components/parameters/dynamic-simulation/solver/sim-solver/simplified-solver-parameters-utils.d.ts +86 -0
- package/dist/components/parameters/dynamic-simulation/solver/sim-solver/simplified-solver-parameters-utils.js +31 -0
- package/dist/components/parameters/dynamic-simulation/solver/sim-solver/simplified-solver-parameters.d.ts +3 -0
- package/dist/components/parameters/dynamic-simulation/solver/sim-solver/simplified-solver-parameters.js +113 -0
- package/dist/components/parameters/dynamic-simulation/solver/solver-parameters-constants.d.ts +10 -0
- package/dist/components/parameters/dynamic-simulation/solver/solver-parameters-constants.js +8 -0
- package/dist/components/parameters/dynamic-simulation/solver/solver-parameters-utils.d.ts +12 -0
- package/dist/components/parameters/dynamic-simulation/solver/solver-parameters-utils.js +38 -0
- package/dist/components/parameters/dynamic-simulation/solver/solver-parameters.d.ts +5 -0
- package/dist/components/parameters/dynamic-simulation/solver/solver-parameters.js +52 -0
- package/dist/components/parameters/dynamic-simulation/time-delay/index.d.ts +9 -0
- package/dist/components/parameters/dynamic-simulation/time-delay/index.js +9 -0
- package/dist/components/parameters/dynamic-simulation/time-delay/time-delay-parameters-constants.d.ts +10 -0
- package/dist/components/parameters/dynamic-simulation/time-delay/time-delay-parameters-constants.js +8 -0
- package/dist/components/parameters/dynamic-simulation/time-delay/time-delay-parameters-utils.d.ts +12 -0
- package/dist/components/parameters/dynamic-simulation/time-delay/time-delay-parameters-utils.js +21 -0
- package/dist/components/parameters/dynamic-simulation/time-delay/time-delay-parameters.d.ts +3 -0
- package/dist/components/parameters/dynamic-simulation/time-delay/time-delay-parameters.js +30 -0
- package/dist/components/parameters/dynamic-simulation/use-dynamic-simulation-parameters-form.d.ts +13 -0
- package/dist/components/parameters/dynamic-simulation/use-dynamic-simulation-parameters-form.js +122 -0
- package/dist/components/parameters/index.d.ts +2 -1
- package/dist/components/parameters/index.js +9 -3
- package/dist/components/parameters/loadflow/load-flow-general-parameters.js +2 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-content.js +2 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-dialog.js +2 -1
- package/dist/components/parameters/loadflow/load-flow-parameters-header.js +2 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-inline.js +2 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-utils.js +2 -0
- package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +1 -1
- package/dist/components/parameters/network-visualizations/map-parameters.js +2 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-form.js +2 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-inline.js +2 -0
- package/dist/components/parameters/network-visualizations/single-line-diagram-parameters.js +2 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-form.js +2 -0
- package/dist/components/parameters/pcc-min/pcc-min-parameters-inline.js +2 -0
- package/dist/components/parameters/security-analysis/columns-definitions.js +1 -0
- package/dist/components/parameters/security-analysis/security-analysis-parameters-dialog.js +2 -1
- package/dist/components/parameters/security-analysis/security-analysis-parameters-form.js +2 -0
- package/dist/components/parameters/security-analysis/security-analysis-parameters-inline.js +2 -0
- package/dist/components/parameters/security-analysis/security-analysis-parameters-selector.js +2 -2
- package/dist/components/parameters/security-analysis/security-analysis-violations-hiding.js +2 -0
- package/dist/components/parameters/sensi/columns-definitions.js +2 -0
- package/dist/components/parameters/sensi/constants.d.ts +2 -2
- package/dist/components/parameters/sensi/constants.js +1 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.d.ts +1 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.js +7 -2
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-factor-count.d.ts +1 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-factor-count.js +4 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.d.ts +2 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +4 -0
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.d.ts +2 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-inline.js +7 -2
- package/dist/components/parameters/sensi/sensitivity-parameters-selector.d.ts +2 -1
- package/dist/components/parameters/sensi/sensitivity-parameters-selector.js +12 -2
- package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.d.ts +6 -1
- package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.js +38 -11
- package/dist/components/parameters/sensi/utils.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-general-tab-panel.js +2 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-content.js +2 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-dialog.js +1 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.js +2 -0
- package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.js +2 -0
- package/dist/components/parameters/short-circuit/short-circuit-power-electronics-tab-panel.js +2 -0
- package/dist/components/parameters/short-circuit/short-circuit-study-area-tab-panel.js +2 -0
- package/dist/components/parameters/voltage-init/equipment-selection-parameters.js +2 -0
- package/dist/components/parameters/voltage-init/general-parameters.js +2 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-form.js +2 -0
- package/dist/components/parameters/voltage-init/voltage-init-parameters-inline.js +2 -0
- package/dist/index.js +24 -5
- package/dist/services/dynamic-mapping.d.ts +3 -0
- package/dist/services/dynamic-mapping.js +21 -0
- package/dist/services/dynamic-margin-calculation.js +1 -1
- package/dist/services/dynamic-simulation.d.ts +5 -0
- package/dist/services/dynamic-simulation.js +35 -0
- package/dist/services/index.d.ts +3 -1
- package/dist/services/index.js +8 -1
- package/dist/translations/en/parameters.d.ts +102 -2
- package/dist/translations/en/parameters.js +119 -5
- package/dist/translations/fr/parameters.d.ts +102 -2
- package/dist/translations/fr/parameters.js +119 -5
- package/dist/translations/not-intl/aggrid-locales.d.ts +8 -0
- package/dist/translations/not-intl/aggrid-locales.js +12 -0
- package/dist/utils/directory-utils.d.ts +2 -0
- package/dist/utils/directory-utils.js +11 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +8 -1
- package/dist/utils/types/dynamic-simulation.type.d.ts +14 -24
- package/dist/utils/types/elementType.d.ts +2 -1
- package/dist/utils/types/elementType.js +2 -1
- package/dist/utils/types/equipmentType.d.ts +9 -0
- package/dist/utils/types/equipmentType.js +52 -0
- package/dist/utils/types/index.js +6 -1
- package/dist/utils/types/parameters.type.d.ts +2 -2
- package/dist/utils/types/sensitivity-analysis.type.d.ts +2 -2
- package/dist/utils/types/types.d.ts +11 -0
- package/package.json +3 -1
- package/dist/components/parameters/util/make-component-utils.d.ts +0 -17
- package/dist/components/parameters/util/make-component-utils.js +0 -97
- package/dist/components/parameters/util/styles.d.ts +0 -38
- package/dist/components/parameters/util/styles.js +0 -41
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme, Grid, Typography, Box } from "@mui/material";
|
|
3
|
+
import { useState, useRef, useCallback, useMemo } from "react";
|
|
4
|
+
import { useIntl } from "react-intl";
|
|
5
|
+
import { useFormContext, useFieldArray } from "react-hook-form";
|
|
6
|
+
import CurveSelectorDialog from "./dialog/curve-selector-dialog.js";
|
|
7
|
+
import { GridButtons } from "./common/grid-buttons.js";
|
|
8
|
+
import { AGGRID_LOCALES } from "../../../../translations/not-intl/aggrid-locales.js";
|
|
9
|
+
import { GridSearch } from "./common/grid-search.js";
|
|
10
|
+
import { Curve } from "./curve-parameters-constants.js";
|
|
11
|
+
import "../../../../utils/conversionUtils.js";
|
|
12
|
+
import "../../../../utils/types/equipmentType.js";
|
|
13
|
+
import { isEmpty } from "../../../../utils/functions.js";
|
|
14
|
+
import "@mui/icons-material";
|
|
15
|
+
import "../../../../utils/yupConfig.js";
|
|
16
|
+
import { fetchDynamicSimulationModels } from "../../../../services/dynamic-mapping.js";
|
|
17
|
+
import { CustomAGGrid } from "../../../customAGGrid/customAggrid.js";
|
|
18
|
+
const styles = {
|
|
19
|
+
grid: {
|
|
20
|
+
width: "auto",
|
|
21
|
+
height: "100%"
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
function CurveParameters({
|
|
25
|
+
path,
|
|
26
|
+
mappingPath,
|
|
27
|
+
voltageLevelsFetcher,
|
|
28
|
+
countriesFetcher,
|
|
29
|
+
evaluateFilterFetcher
|
|
30
|
+
}) {
|
|
31
|
+
const intl = useIntl();
|
|
32
|
+
const [selectedRowsLength, setSelectedRowsLength] = useState(0);
|
|
33
|
+
const { control, getValues } = useFormContext();
|
|
34
|
+
const { fields, append, remove } = useFieldArray({
|
|
35
|
+
control,
|
|
36
|
+
name: `${path}.${Curve.CURVES}`
|
|
37
|
+
});
|
|
38
|
+
const rowData = fields;
|
|
39
|
+
const gridRef = useRef(null);
|
|
40
|
+
const [open, setOpen] = useState(false);
|
|
41
|
+
const handleClose = useCallback(() => {
|
|
42
|
+
setOpen((prevState) => !prevState);
|
|
43
|
+
}, []);
|
|
44
|
+
const handleAppend = useCallback(
|
|
45
|
+
(newCurves) => {
|
|
46
|
+
const notYetAddedCurves = newCurves.filter(
|
|
47
|
+
// use functional keys to lookup
|
|
48
|
+
(curve) => !rowData.some(
|
|
49
|
+
(elem) => elem[Curve.EQUIPMENT_ID] === curve[Curve.EQUIPMENT_ID] && elem[Curve.VARIABLE_ID] === curve[Curve.VARIABLE_ID]
|
|
50
|
+
)
|
|
51
|
+
);
|
|
52
|
+
append(notYetAddedCurves);
|
|
53
|
+
setOpen((prevState) => !prevState);
|
|
54
|
+
},
|
|
55
|
+
[append, rowData]
|
|
56
|
+
);
|
|
57
|
+
const handleAdd = useCallback(() => {
|
|
58
|
+
setOpen((prevState) => !prevState);
|
|
59
|
+
}, []);
|
|
60
|
+
const handleDelete = useCallback(() => {
|
|
61
|
+
const selectedRows = gridRef.current?.api.getSelectedRows();
|
|
62
|
+
const indexesToRemove = selectedRows?.map(
|
|
63
|
+
(elem) => (
|
|
64
|
+
// use functional keys to lookup
|
|
65
|
+
rowData.findIndex(
|
|
66
|
+
(row) => elem[Curve.EQUIPMENT_ID] === row[Curve.EQUIPMENT_ID] && elem[Curve.VARIABLE_ID] === row[Curve.VARIABLE_ID]
|
|
67
|
+
)
|
|
68
|
+
)
|
|
69
|
+
);
|
|
70
|
+
remove(indexesToRemove);
|
|
71
|
+
setSelectedRowsLength(0);
|
|
72
|
+
}, [remove, rowData]);
|
|
73
|
+
const quickFilterRef = useRef(null);
|
|
74
|
+
const theme = useTheme();
|
|
75
|
+
const columnDefs = useMemo(() => {
|
|
76
|
+
return [
|
|
77
|
+
{
|
|
78
|
+
field: Curve.EQUIPMENT_ID,
|
|
79
|
+
checkboxSelection: true,
|
|
80
|
+
headerCheckboxSelection: true,
|
|
81
|
+
headerCheckboxSelectionFilteredOnly: true,
|
|
82
|
+
minWidth: 80,
|
|
83
|
+
headerName: intl.formatMessage({
|
|
84
|
+
id: "DynamicSimulationCurveDynamicModelHeader"
|
|
85
|
+
})
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
field: Curve.VARIABLE_ID,
|
|
89
|
+
minWidth: 80,
|
|
90
|
+
headerName: intl.formatMessage({
|
|
91
|
+
id: "DynamicSimulationCurveVariableHeader"
|
|
92
|
+
}),
|
|
93
|
+
valueFormatter: (params) => intl.formatMessage({
|
|
94
|
+
id: `variables.${params.value}`
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
];
|
|
98
|
+
}, [intl]);
|
|
99
|
+
const defaultColDef = useMemo(() => {
|
|
100
|
+
return {
|
|
101
|
+
flex: 1,
|
|
102
|
+
minWidth: 100,
|
|
103
|
+
filter: true,
|
|
104
|
+
sortable: true,
|
|
105
|
+
resizable: true,
|
|
106
|
+
lockPinned: true,
|
|
107
|
+
wrapHeaderText: true,
|
|
108
|
+
autoHeaderHeight: true
|
|
109
|
+
};
|
|
110
|
+
}, []);
|
|
111
|
+
const onSelectionChanged = useCallback(() => {
|
|
112
|
+
const selectedRows = gridRef.current?.api.getSelectedRows();
|
|
113
|
+
setSelectedRowsLength(selectedRows?.length ?? 0);
|
|
114
|
+
}, []);
|
|
115
|
+
const modelsFetcher = useCallback(() => {
|
|
116
|
+
const mapping = getValues(mappingPath);
|
|
117
|
+
return isEmpty(mapping) ? void 0 : fetchDynamicSimulationModels(mapping);
|
|
118
|
+
}, [getValues, mappingPath]);
|
|
119
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
120
|
+
/* @__PURE__ */ jsxs(Grid, { container: true, direction: "column", sx: { height: 600 }, children: [
|
|
121
|
+
/* @__PURE__ */ jsxs(Grid, { container: true, item: true, sx: { marginBottom: theme.spacing(1) }, children: [
|
|
122
|
+
/* @__PURE__ */ jsx(Grid, { container: true, item: true, xs: "auto", children: /* @__PURE__ */ jsx(GridSearch, { ref: quickFilterRef, gridRef }, "curve-quick-filter") }),
|
|
123
|
+
/* @__PURE__ */ jsx(
|
|
124
|
+
Grid,
|
|
125
|
+
{
|
|
126
|
+
container: true,
|
|
127
|
+
item: true,
|
|
128
|
+
xs: "auto",
|
|
129
|
+
sx: {
|
|
130
|
+
justifyContent: "flex-end",
|
|
131
|
+
alignItems: "flex-end",
|
|
132
|
+
paddingLeft: theme.spacing(1)
|
|
133
|
+
},
|
|
134
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "subtitle1", children: `${intl.formatMessage({
|
|
135
|
+
id: "DynamicSimulationCurveSelectedNumber"
|
|
136
|
+
})} (${selectedRowsLength} / ${rowData.length})` })
|
|
137
|
+
}
|
|
138
|
+
),
|
|
139
|
+
/* @__PURE__ */ jsx(
|
|
140
|
+
GridButtons,
|
|
141
|
+
{
|
|
142
|
+
onAddButton: handleAdd,
|
|
143
|
+
onDeleteButton: handleDelete,
|
|
144
|
+
disabledDelete: !selectedRowsLength
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
] }),
|
|
148
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(Box, { sx: styles.grid, children: /* @__PURE__ */ jsx(
|
|
149
|
+
CustomAGGrid,
|
|
150
|
+
{
|
|
151
|
+
ref: gridRef,
|
|
152
|
+
rowData,
|
|
153
|
+
columnDefs,
|
|
154
|
+
defaultColDef,
|
|
155
|
+
rowSelection: "multiple",
|
|
156
|
+
onSelectionChanged,
|
|
157
|
+
overrideLocales: AGGRID_LOCALES
|
|
158
|
+
}
|
|
159
|
+
) }) })
|
|
160
|
+
] }),
|
|
161
|
+
open && /* @__PURE__ */ jsx(
|
|
162
|
+
CurveSelectorDialog,
|
|
163
|
+
{
|
|
164
|
+
open,
|
|
165
|
+
onClose: handleClose,
|
|
166
|
+
onSave: handleAppend,
|
|
167
|
+
voltageLevelsFetcher,
|
|
168
|
+
countriesFetcher,
|
|
169
|
+
evaluateFilterFetcher,
|
|
170
|
+
modelsFetcher
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
] });
|
|
174
|
+
}
|
|
175
|
+
export {
|
|
176
|
+
CurveParameters as default
|
|
177
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Curve } from '../common/curve.type';
|
|
2
|
+
export type CurvePreviewApi = {
|
|
3
|
+
addCurves: (curves: Curve[]) => void;
|
|
4
|
+
removeCurves: () => void;
|
|
5
|
+
getCurves: () => Curve[];
|
|
6
|
+
};
|
|
7
|
+
declare const CurvePreview: import('react').ForwardRefExoticComponent<import('react').RefAttributes<CurvePreviewApi>>;
|
|
8
|
+
export default CurvePreview;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useRef, useState, useMemo, useCallback, useImperativeHandle } from "react";
|
|
3
|
+
import { useIntl, FormattedMessage } from "react-intl";
|
|
4
|
+
import { Grid, Typography, Box } from "@mui/material";
|
|
5
|
+
import { AGGRID_LOCALES } from "../../../../../translations/not-intl/aggrid-locales.js";
|
|
6
|
+
import { CustomAGGrid } from "../../../../customAGGrid/customAggrid.js";
|
|
7
|
+
import "../../../../../utils/conversionUtils.js";
|
|
8
|
+
import "../../../../../utils/types/equipmentType.js";
|
|
9
|
+
import "@mui/icons-material";
|
|
10
|
+
import "../../../../../utils/yupConfig.js";
|
|
11
|
+
const styles = {
|
|
12
|
+
grid: {
|
|
13
|
+
width: "auto",
|
|
14
|
+
height: "100%"
|
|
15
|
+
},
|
|
16
|
+
h6: (theme) => ({
|
|
17
|
+
marginBottom: theme.spacing(2)
|
|
18
|
+
})
|
|
19
|
+
};
|
|
20
|
+
function isSameCurve(curve1, curve2) {
|
|
21
|
+
return curve1.equipmentType === curve2.equipmentType && curve1.equipmentId === curve2.equipmentId && curve1.variableId === curve2.variableId;
|
|
22
|
+
}
|
|
23
|
+
function isCurveAlreadyAdded(curves, curve) {
|
|
24
|
+
return curves.some((elem) => isSameCurve(elem, curve));
|
|
25
|
+
}
|
|
26
|
+
function isRowSelected(elem, selectedRows) {
|
|
27
|
+
return selectedRows.some((selectedElem) => isSameCurve(elem, selectedElem));
|
|
28
|
+
}
|
|
29
|
+
const CurvePreview = forwardRef((props, ref) => {
|
|
30
|
+
const intl = useIntl();
|
|
31
|
+
const gridRef = useRef(null);
|
|
32
|
+
const [rowData, setRowData] = useState([]);
|
|
33
|
+
const [selectedRowsLength, setSelectedRowsLength] = useState(0);
|
|
34
|
+
const columnDefs = useMemo(() => {
|
|
35
|
+
return [
|
|
36
|
+
{
|
|
37
|
+
field: "equipmentId",
|
|
38
|
+
minWidth: 80,
|
|
39
|
+
headerName: intl.formatMessage({
|
|
40
|
+
id: "DynamicSimulationCurveDynamicModelHeader"
|
|
41
|
+
})
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
field: "variableId",
|
|
45
|
+
minWidth: 80,
|
|
46
|
+
headerName: intl.formatMessage({
|
|
47
|
+
id: "DynamicSimulationCurveVariableHeader"
|
|
48
|
+
}),
|
|
49
|
+
valueFormatter: (params) => intl.formatMessage({
|
|
50
|
+
id: `variables.${params.value}`
|
|
51
|
+
})
|
|
52
|
+
}
|
|
53
|
+
];
|
|
54
|
+
}, [intl]);
|
|
55
|
+
const defaultColDef = useMemo(() => {
|
|
56
|
+
return {
|
|
57
|
+
flex: 1,
|
|
58
|
+
minWidth: 100,
|
|
59
|
+
filter: true,
|
|
60
|
+
sortable: true,
|
|
61
|
+
resizable: true,
|
|
62
|
+
lockPinned: true,
|
|
63
|
+
wrapHeaderText: true,
|
|
64
|
+
autoHeaderHeight: true
|
|
65
|
+
};
|
|
66
|
+
}, []);
|
|
67
|
+
const onSelectionChanged = useCallback(() => {
|
|
68
|
+
if (!gridRef.current) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const selectedRows = gridRef.current.api.getSelectedRows();
|
|
72
|
+
setSelectedRowsLength(selectedRows.length);
|
|
73
|
+
}, []);
|
|
74
|
+
const addCurves = useCallback((curves) => {
|
|
75
|
+
setRowData((prev) => {
|
|
76
|
+
const notYetAddedCurves = curves.filter((curve) => !isCurveAlreadyAdded(prev, curve));
|
|
77
|
+
return [...prev, ...notYetAddedCurves];
|
|
78
|
+
});
|
|
79
|
+
}, []);
|
|
80
|
+
const removeCurves = useCallback(() => {
|
|
81
|
+
if (!gridRef.current) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const selectedRows = gridRef.current.api.getSelectedRows();
|
|
85
|
+
setSelectedRowsLength(0);
|
|
86
|
+
setRowData((prev) => {
|
|
87
|
+
const remainingRows = prev.filter((elem) => !isRowSelected(elem, selectedRows));
|
|
88
|
+
return remainingRows;
|
|
89
|
+
});
|
|
90
|
+
}, []);
|
|
91
|
+
useImperativeHandle(
|
|
92
|
+
ref,
|
|
93
|
+
() => ({
|
|
94
|
+
addCurves,
|
|
95
|
+
removeCurves,
|
|
96
|
+
getCurves: () => {
|
|
97
|
+
return rowData;
|
|
98
|
+
}
|
|
99
|
+
}),
|
|
100
|
+
[addCurves, removeCurves, rowData]
|
|
101
|
+
);
|
|
102
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
103
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsxs(Typography, { sx: styles.h6, variant: "h6", children: [
|
|
104
|
+
/* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationCurveToAdd" }),
|
|
105
|
+
` (${selectedRowsLength} / ${rowData.length})`
|
|
106
|
+
] }) }),
|
|
107
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: true, children: /* @__PURE__ */ jsx(Box, { sx: styles.grid, children: /* @__PURE__ */ jsx(
|
|
108
|
+
CustomAGGrid,
|
|
109
|
+
{
|
|
110
|
+
ref: gridRef,
|
|
111
|
+
rowData,
|
|
112
|
+
columnDefs,
|
|
113
|
+
defaultColDef,
|
|
114
|
+
rowSelection: "multiple",
|
|
115
|
+
onSelectionChanged,
|
|
116
|
+
overrideLocales: AGGRID_LOCALES
|
|
117
|
+
}
|
|
118
|
+
) }) })
|
|
119
|
+
] });
|
|
120
|
+
});
|
|
121
|
+
export {
|
|
122
|
+
CurvePreview as default
|
|
123
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DynamicSimulationModelInfos } from '../../../../../utils/types/dynamic-simulation.type';
|
|
2
|
+
import { VoltageLevelInfos } from '../../../../../utils/types/equipmentType';
|
|
3
|
+
import { ExpertFilter, IdentifiableAttributes } from '../../../../filter';
|
|
4
|
+
import { Curve } from '../common/curve.type';
|
|
5
|
+
interface CurveSelectorDialogProps {
|
|
6
|
+
open: boolean;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
onSave: (curves: Curve[]) => void;
|
|
9
|
+
voltageLevelsFetcher?: () => Promise<VoltageLevelInfos[]>;
|
|
10
|
+
countriesFetcher?: () => Promise<string[]>;
|
|
11
|
+
evaluateFilterFetcher?: (filter: ExpertFilter) => Promise<IdentifiableAttributes[]>;
|
|
12
|
+
modelsFetcher?: () => Promise<DynamicSimulationModelInfos[]> | undefined;
|
|
13
|
+
}
|
|
14
|
+
declare function CurveSelectorDialog({ open, onClose, onSave, voltageLevelsFetcher, countriesFetcher, evaluateFilterFetcher, modelsFetcher, }: Readonly<CurveSelectorDialogProps>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default CurveSelectorDialog;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme, Dialog, DialogTitle, Typography, DialogContent, Grid, Tooltip, IconButton, DialogActions, Button } from "@mui/material";
|
|
3
|
+
import { useRef, useCallback } from "react";
|
|
4
|
+
import { useIntl, FormattedMessage } from "react-intl";
|
|
5
|
+
import { ArrowCircleRight, ArrowCircleLeft } from "@mui/icons-material";
|
|
6
|
+
import CurvePreview from "./curve-preview.js";
|
|
7
|
+
import CurveSelector from "./curve-selector.js";
|
|
8
|
+
import { mergeSx } from "../../../../../utils/styles.js";
|
|
9
|
+
import { parametersStyles } from "../../../parameters-style.js";
|
|
10
|
+
function CurveSelectorDialog({
|
|
11
|
+
open,
|
|
12
|
+
onClose,
|
|
13
|
+
onSave,
|
|
14
|
+
voltageLevelsFetcher,
|
|
15
|
+
countriesFetcher,
|
|
16
|
+
evaluateFilterFetcher,
|
|
17
|
+
modelsFetcher
|
|
18
|
+
}) {
|
|
19
|
+
const theme = useTheme();
|
|
20
|
+
const selectorRef = useRef(null);
|
|
21
|
+
const previewRef = useRef(null);
|
|
22
|
+
const handleClose = useCallback(() => {
|
|
23
|
+
onClose();
|
|
24
|
+
}, [onClose]);
|
|
25
|
+
const handleAdd = useCallback(() => {
|
|
26
|
+
if (!previewRef.current) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
onSave(previewRef.current.getCurves());
|
|
30
|
+
}, [onSave]);
|
|
31
|
+
const intl = useIntl();
|
|
32
|
+
const handleAddButton = useCallback(() => {
|
|
33
|
+
if (!selectorRef.current || !previewRef.current) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const selectedEquipments = selectorRef.current.getSelectedEquipments();
|
|
37
|
+
const selectedVariables = selectorRef.current.getSelectedVariables();
|
|
38
|
+
const curves = selectedEquipments.flatMap(
|
|
39
|
+
(equipment) => selectedVariables.map((variable) => ({
|
|
40
|
+
equipmentType: equipment.type,
|
|
41
|
+
equipmentId: equipment.id,
|
|
42
|
+
variableId: variable.variableId
|
|
43
|
+
}))
|
|
44
|
+
);
|
|
45
|
+
previewRef.current.addCurves(curves);
|
|
46
|
+
}, []);
|
|
47
|
+
const handleDeleteButton = useCallback(() => {
|
|
48
|
+
if (!previewRef.current) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
previewRef.current.removeCurves();
|
|
52
|
+
}, []);
|
|
53
|
+
const hasSelectedRow = false;
|
|
54
|
+
return /* @__PURE__ */ jsxs(Dialog, { open, "aria-labelledby": "curve-selector-dialog-title", maxWidth: "xl", fullWidth: true, children: [
|
|
55
|
+
/* @__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" }) }) }),
|
|
56
|
+
/* @__PURE__ */ jsx(DialogContent, { style: { overflowY: "hidden", height: "60vh" }, children: /* @__PURE__ */ jsxs(
|
|
57
|
+
Grid,
|
|
58
|
+
{
|
|
59
|
+
container: true,
|
|
60
|
+
sx: mergeSx(parametersStyles.scrollableGrid, {
|
|
61
|
+
maxWidth: "xl",
|
|
62
|
+
height: "100%",
|
|
63
|
+
maxHeight: "100%"
|
|
64
|
+
}),
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ jsx(Grid, { item: true, container: true, xs: 8, spacing: theme.spacing(1), children: /* @__PURE__ */ jsx(
|
|
67
|
+
CurveSelector,
|
|
68
|
+
{
|
|
69
|
+
ref: selectorRef,
|
|
70
|
+
voltageLevelsFetcher,
|
|
71
|
+
countriesFetcher,
|
|
72
|
+
evaluateFilterFetcher,
|
|
73
|
+
modelsFetcher
|
|
74
|
+
}
|
|
75
|
+
) }),
|
|
76
|
+
/* @__PURE__ */ jsxs(Grid, { item: true, container: true, direction: "column", justifyContent: "center", alignItems: "center", xs: 0.5, children: [
|
|
77
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
|
|
78
|
+
Tooltip,
|
|
79
|
+
{
|
|
80
|
+
title: intl.formatMessage({
|
|
81
|
+
id: "AddRows"
|
|
82
|
+
}),
|
|
83
|
+
placement: "top",
|
|
84
|
+
children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(
|
|
85
|
+
IconButton,
|
|
86
|
+
{
|
|
87
|
+
color: "primary",
|
|
88
|
+
onClick: () => handleAddButton(),
|
|
89
|
+
disabled: hasSelectedRow,
|
|
90
|
+
children: /* @__PURE__ */ jsx(ArrowCircleRight, {})
|
|
91
|
+
}
|
|
92
|
+
) })
|
|
93
|
+
}
|
|
94
|
+
) }),
|
|
95
|
+
/* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(
|
|
96
|
+
Tooltip,
|
|
97
|
+
{
|
|
98
|
+
title: intl.formatMessage({
|
|
99
|
+
id: "DeleteRows"
|
|
100
|
+
}),
|
|
101
|
+
placement: "top",
|
|
102
|
+
children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(
|
|
103
|
+
IconButton,
|
|
104
|
+
{
|
|
105
|
+
color: "primary",
|
|
106
|
+
onClick: () => handleDeleteButton(),
|
|
107
|
+
disabled: hasSelectedRow,
|
|
108
|
+
children: /* @__PURE__ */ jsx(ArrowCircleLeft, {})
|
|
109
|
+
}
|
|
110
|
+
) })
|
|
111
|
+
}
|
|
112
|
+
) })
|
|
113
|
+
] }),
|
|
114
|
+
/* @__PURE__ */ jsx(Grid, { item: true, container: true, xs: true, direction: "column", children: /* @__PURE__ */ jsx(CurvePreview, { ref: previewRef }) })
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
) }),
|
|
118
|
+
/* @__PURE__ */ jsxs(DialogActions, { children: [
|
|
119
|
+
/* @__PURE__ */ jsx(Button, { onClick: handleAdd, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationAdd" }) }),
|
|
120
|
+
/* @__PURE__ */ jsx(Button, { onClick: handleClose, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "DynamicSimulationClose" }) })
|
|
121
|
+
] })
|
|
122
|
+
] });
|
|
123
|
+
}
|
|
124
|
+
export {
|
|
125
|
+
CurveSelectorDialog as default
|
|
126
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EquipmentType } from '../../../../../utils/types/equipmentType';
|
|
2
|
+
import { CombinatorType, DataType } from '../../../../filter/expert/expertFilter.type';
|
|
3
|
+
import { ExpertFilter } from '../../../../filter/filter.type';
|
|
4
|
+
export declare const CURVE_EQUIPMENT_TYPES: EquipmentType[];
|
|
5
|
+
export declare const getReferencedEquipmentTypeForModel: (equipmentType: EquipmentType) => EquipmentType.SUBSTATION | EquipmentType.VOLTAGE_LEVEL | EquipmentType.BUS | EquipmentType.SWITCH | EquipmentType.LINE | EquipmentType.TWO_WINDINGS_TRANSFORMER | EquipmentType.THREE_WINDINGS_TRANSFORMER | EquipmentType.GENERATOR | EquipmentType.BATTERY | EquipmentType.LOAD | EquipmentType.SHUNT_COMPENSATOR | EquipmentType.STATIC_VAR_COMPENSATOR | EquipmentType.HVDC_LINE | EquipmentType.HVDC_CONVERTER_STATION | EquipmentType.VSC_CONVERTER_STATION | EquipmentType.LCC_CONVERTER_STATION | EquipmentType.DANGLING_LINE | EquipmentType.TIE_LINE | EquipmentType.DISCONNECTOR | EquipmentType.BREAKER;
|
|
6
|
+
export declare const getTopologyKindIfNecessary: (equipmentType: string) => {
|
|
7
|
+
topologyKind: string;
|
|
8
|
+
} | {
|
|
9
|
+
topologyKind?: undefined;
|
|
10
|
+
};
|
|
11
|
+
export declare const buildExpertRules: (equipmentType: EquipmentType, voltageLevelIds: string[] | undefined, countries: string[] | undefined, nominalVoltages: number[] | undefined, substationProperties: Record<string, string[]> | undefined, ids: Record<string, string[]> | undefined) => {
|
|
12
|
+
combinator: CombinatorType;
|
|
13
|
+
dataType: DataType;
|
|
14
|
+
rules: any[];
|
|
15
|
+
};
|
|
16
|
+
/** @deprecated The behavior of this local builder function differs from the backend one used by others (analysis results & spreadsheet).
|
|
17
|
+
* A new endpoint is now available to evaluate a global-filter on a network. To migrate to it.
|
|
18
|
+
*/
|
|
19
|
+
export declare const buildExpertFilter: (equipmentType: EquipmentType, voltageLevelIds: string[], countries: string[], nominalVoltages: number[], substationProperties?: Record<string, string[]>, ids?: Record<string, string[]>) => ExpertFilter;
|
|
20
|
+
export declare const NOMINAL_VOLTAGE_UNIT = "kV";
|