@gridsuite/commons-ui 0.241.1 → 0.243.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 +10 -2
- package/dist/components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js +1 -1
- package/dist/components/composite/grid/grid-item.d.ts +2 -1
- package/dist/components/composite/grid/grid-item.js +9 -2
- package/dist/components/ui/csvPicker/csv-picker.d.ts +7 -2
- package/dist/components/ui/csvPicker/csv-picker.js +7 -6
- package/dist/components/ui/inputs/checkbox-autocomplete/checkbox-autocomplete.d.ts +1 -2
- package/dist/features/index.js +87 -3
- package/dist/features/network-modification-table/index.js +2 -1
- package/dist/features/network-modification-table/use-modifications-drag-and-drop.js +2 -1
- package/dist/features/network-modification-table/utils.d.ts +1 -0
- package/dist/features/network-modification-table/utils.js +5 -1
- package/dist/features/network-modifications/battery/creation/BatteryCreationForm.js +3 -0
- package/dist/features/network-modifications/battery/creation/batteryCreation.utils.js +3 -0
- package/dist/features/network-modifications/battery/modification/BatteryDialogHeader.js +3 -0
- package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.js +3 -0
- package/dist/features/network-modifications/battery/modification/batteryModification.utils.js +3 -0
- package/dist/features/network-modifications/common/connectivity/connectivityForm.utils.d.ts +71 -2
- package/dist/features/network-modifications/common/connectivity/connectivityForm.utils.js +26 -8
- package/dist/features/network-modifications/common/connectivity/index.js +3 -1
- package/dist/features/network-modifications/common/currentLimits/LimitsPane.d.ts +7 -0
- package/dist/features/network-modifications/common/currentLimits/LimitsPane.js +243 -0
- package/dist/features/network-modifications/common/currentLimits/LimitsTagChip.d.ts +9 -0
- package/dist/features/network-modifications/common/currentLimits/LimitsTagChip.js +29 -0
- package/dist/features/network-modifications/common/currentLimits/SelectedOperationalLimitGroup.d.ts +9 -0
- package/dist/features/network-modifications/common/currentLimits/SelectedOperationalLimitGroup.js +100 -0
- package/dist/features/network-modifications/common/currentLimits/index.d.ts +12 -0
- package/dist/features/network-modifications/common/currentLimits/index.js +47 -0
- package/dist/features/network-modifications/common/currentLimits/limits.types.d.ts +52 -0
- package/dist/features/network-modifications/common/currentLimits/limits.types.js +17 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsEditor.d.ts +10 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsEditor.js +285 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsPropertiesSideStack.d.ts +5 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsPropertiesSideStack.js +184 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/TemporaryLimitsTable.d.ts +14 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/TemporaryLimitsTable.js +166 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/index.d.ts +10 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/index.js +10 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/limitsChart.d.ts +11 -0
- package/dist/features/network-modifications/common/currentLimits/limitsEditor/limitsChart.js +177 -0
- package/dist/features/network-modifications/common/currentLimits/limitsPane.utils.d.ts +213 -0
- package/dist/features/network-modifications/common/currentLimits/limitsPane.utils.js +337 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsGroupsContextualMenu.d.ts +25 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsGroupsContextualMenu.js +92 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsPropertiesStack.d.ts +10 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsPropertiesStack.js +25 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroupTabLabel.d.ts +10 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroupTabLabel.js +73 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroups.d.ts +16 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroups.js +121 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/index.d.ts +11 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/index.js +12 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroups.types.d.ts +71 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroups.types.js +15 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroupsStyles.d.ts +46 -0
- package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroupsStyles.js +45 -0
- package/dist/features/network-modifications/common/index.d.ts +1 -0
- package/dist/features/network-modifications/common/index.js +50 -2
- package/dist/features/network-modifications/common/measurements/branchActiveReactivePowerForm.utils.d.ts +11 -0
- package/dist/features/network-modifications/common/measurements/branchActiveReactivePowerForm.utils.js +6 -4
- package/dist/features/network-modifications/common/measurements/index.js +2 -1
- package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveTableForm.js +1 -1
- package/dist/features/network-modifications/common/voltageRegulation/VoltageRegulationForm.js +3 -7
- package/dist/features/network-modifications/equipmentDeletion/EquipmentDeletionForm.js +3 -0
- package/dist/features/network-modifications/generator/creation/GeneratorCreationForm.js +9 -6
- package/dist/features/network-modifications/generator/creation/generatorCreation.utils.js +3 -0
- package/dist/features/network-modifications/generator/modification/GeneratorDialogHeader.js +3 -0
- package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.js +9 -6
- package/dist/features/network-modifications/generator/modification/generatorModification.utils.js +3 -0
- package/dist/features/network-modifications/index.d.ts +1 -0
- package/dist/features/network-modifications/index.js +85 -2
- package/dist/features/network-modifications/line/catalog/index.d.ts +8 -0
- package/dist/features/network-modifications/line/catalog/index.js +14 -0
- package/dist/features/network-modifications/line/catalog/lineCatalog.type.d.ts +66 -0
- package/dist/features/network-modifications/line/catalog/lineCatalog.type.js +7 -0
- package/dist/features/network-modifications/line/catalog/segment.utils.d.ts +90 -0
- package/dist/features/network-modifications/line/catalog/segment.utils.js +100 -0
- package/dist/features/network-modifications/line/characteristics/LineCharacteristicsPane.d.ts +8 -0
- package/dist/features/network-modifications/line/characteristics/LineCharacteristicsPane.js +152 -0
- package/dist/features/network-modifications/line/characteristics/index.d.ts +9 -0
- package/dist/features/network-modifications/line/characteristics/index.js +9 -0
- package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.types.d.ts +14 -0
- package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.types.js +1 -0
- package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.d.ts +52 -0
- package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.js +53 -0
- package/dist/features/network-modifications/line/common/LineDialogHeader.d.ts +6 -0
- package/dist/features/network-modifications/line/common/LineDialogHeader.js +103 -0
- package/dist/features/network-modifications/line/common/LineDialogTabs.d.ts +9 -0
- package/dist/features/network-modifications/line/common/LineDialogTabs.js +61 -0
- package/dist/features/network-modifications/line/common/LineDialogTabsContent.d.ts +8 -0
- package/dist/features/network-modifications/line/common/LineDialogTabsContent.js +96 -0
- package/dist/features/network-modifications/line/common/LineForm.d.ts +6 -0
- package/dist/features/network-modifications/line/common/LineForm.js +50 -0
- package/dist/features/network-modifications/line/common/index.d.ts +12 -0
- package/dist/features/network-modifications/line/common/index.js +13 -0
- package/dist/features/network-modifications/line/common/line.types.d.ts +47 -0
- package/dist/features/network-modifications/line/common/line.types.js +1 -0
- package/dist/features/network-modifications/line/common/line.utils.d.ts +13 -0
- package/dist/features/network-modifications/line/common/line.utils.js +34 -0
- package/dist/features/network-modifications/line/creation/index.d.ts +8 -0
- package/dist/features/network-modifications/line/creation/index.js +7 -0
- package/dist/features/network-modifications/line/creation/lineCreation.types.d.ts +39 -0
- package/dist/features/network-modifications/line/creation/lineCreation.types.js +1 -0
- package/dist/features/network-modifications/line/creation/lineCreation.utils.d.ts +151 -0
- package/dist/features/network-modifications/line/creation/lineCreation.utils.js +172 -0
- package/dist/features/network-modifications/line/index.d.ts +10 -0
- package/dist/features/network-modifications/line/index.js +37 -0
- package/dist/features/network-modifications/load/common/LoadDialogHeader.js +3 -0
- package/dist/features/network-modifications/load/modification/loadModification.utils.js +3 -0
- package/dist/features/network-modifications/shunt-compensator/common/CharacteristicsForm.js +7 -6
- package/dist/features/network-modifications/shunt-compensator/creation/ShuntCompensatorCreationForm.js +3 -0
- package/dist/features/network-modifications/shunt-compensator/creation/shuntCompensatorCreation.utils.js +3 -0
- package/dist/features/network-modifications/shunt-compensator/modification/ShuntCompensatorModificationForm.js +3 -0
- package/dist/features/network-modifications/shunt-compensator/modification/shuntCompensatorModification.utils.js +3 -0
- package/dist/features/network-modifications/substation/creation/SubstationCreationForm.js +3 -0
- package/dist/features/network-modifications/substation/modification/SubstationModificationForm.js +3 -0
- package/dist/features/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +3 -0
- package/dist/features/network-modifications/voltageLevel/creation/index.js +3 -0
- package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationCreationSection.js +3 -0
- package/dist/features/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js +3 -0
- package/dist/features/network-modifications/voltageLevel/index.js +3 -0
- package/dist/features/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js +4 -1
- package/dist/features/parameters/common/contingency-table/contingency-table.js +22 -10
- package/dist/features/parameters/common/contingency-table/types.d.ts +7 -8
- package/dist/features/parameters/common/contingency-table/utils.d.ts +13 -0
- package/dist/features/parameters/common/contingency-table/utils.js +31 -0
- package/dist/features/parameters/loadflow/load-flow-general-parameters.js +5 -1
- package/dist/features/parameters/security-analysis/security-analysis-parameters-form.js +19 -31
- package/dist/hooks/useModificationLabelComputer.js +1 -0
- package/dist/index.js +87 -7
- package/dist/translations/en/index.d.ts +0 -1
- package/dist/translations/en/index.js +0 -2
- package/dist/translations/en/networkModificationsEn.d.ts +28 -0
- package/dist/translations/en/networkModificationsEn.js +28 -0
- package/dist/translations/en/parameters.d.ts +3 -1
- package/dist/translations/en/parameters.js +3 -1
- package/dist/translations/fr/index.d.ts +0 -1
- package/dist/translations/fr/index.js +0 -2
- package/dist/translations/fr/networkModificationsFr.d.ts +28 -0
- package/dist/translations/fr/networkModificationsFr.js +28 -0
- package/dist/translations/fr/parameters.d.ts +3 -1
- package/dist/translations/fr/parameters.js +3 -1
- package/dist/utils/constants/fieldConstants.d.ts +47 -1
- package/dist/utils/constants/fieldConstants.js +46 -0
- package/dist/utils/types/modificationType.d.ts +4 -0
- package/dist/utils/types/modificationType.js +5 -0
- package/package.json +11 -4
- package/dist/translations/en/inputsEn.d.ts +0 -24
- package/dist/translations/en/inputsEn.js +0 -21
- package/dist/translations/fr/inputsFr.d.ts +0 -24
- package/dist/translations/fr/inputsFr.js +0 -21
|
@@ -63,6 +63,9 @@ import "../../../../components/composite/report/report-treeview/treeview-item.js
|
|
|
63
63
|
import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
64
64
|
import { getConnectivityWithPositionSchema, getConnectivityWithPositionEmptyFormDataProps, getConnectivityFormDataProps } from "../../common/connectivity/connectivityForm.utils.js";
|
|
65
65
|
import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
|
|
66
|
+
import "@mui/material/colors";
|
|
67
|
+
import "@mui/x-charts";
|
|
68
|
+
import "../../common/currentLimits/limitsPane.utils.js";
|
|
66
69
|
import { CHARACTERISTICS_CHOICES } from "../common/shuntCompensator.utils.js";
|
|
67
70
|
import { getCharacteristicsFormValidationSchema, getCharacteristicsEmptyFormData, getCharacteristicsFormData } from "../common/characteristicsForm.utils.js";
|
|
68
71
|
const shuntCompensatorModificationFormSchema = object().shape({
|
|
@@ -63,6 +63,9 @@ import "react-window";
|
|
|
63
63
|
import "../../../../components/composite/report/report-treeview/treeview-item.js";
|
|
64
64
|
import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
65
65
|
import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
|
|
66
|
+
import "@mui/material/colors";
|
|
67
|
+
import "@mui/x-charts";
|
|
68
|
+
import "../../common/currentLimits/limitsPane.utils.js";
|
|
66
69
|
function SubstationCreationForm() {
|
|
67
70
|
return /* @__PURE__ */ jsxs(Stack, { spacing: 2, children: [
|
|
68
71
|
/* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, children: [
|
package/dist/features/network-modifications/substation/modification/SubstationModificationForm.js
CHANGED
|
@@ -61,6 +61,9 @@ import "react-window";
|
|
|
61
61
|
import "../../../../components/composite/report/report-treeview/treeview-item.js";
|
|
62
62
|
import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
63
63
|
import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
|
|
64
|
+
import "@mui/material/colors";
|
|
65
|
+
import "@mui/x-charts";
|
|
66
|
+
import "../../common/currentLimits/limitsPane.utils.js";
|
|
64
67
|
function SubstationModificationForm({ substationToModify }) {
|
|
65
68
|
const { locale } = useIntl();
|
|
66
69
|
const { translate } = useLocalizedCountries(locale);
|
package/dist/features/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js
CHANGED
|
@@ -67,6 +67,9 @@ import "react-window";
|
|
|
67
67
|
import "../../../../components/composite/report/report-treeview/treeview-item.js";
|
|
68
68
|
import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
69
69
|
import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
|
|
70
|
+
import "@mui/material/colors";
|
|
71
|
+
import "@mui/x-charts";
|
|
72
|
+
import "../../common/currentLimits/limitsPane.utils.js";
|
|
70
73
|
import { getTabStyle, getTabIndicatorStyle } from "../../../parameters/parameters-style.js";
|
|
71
74
|
import { useTabsWithError } from "../../hooks/useTabsWithError.js";
|
|
72
75
|
function VoltageLevelCreationForm({
|
|
@@ -59,6 +59,9 @@ import "react-window";
|
|
|
59
59
|
import "../../../../components/composite/report/report-treeview/treeview-item.js";
|
|
60
60
|
import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
61
61
|
import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
|
|
62
|
+
import "@mui/material/colors";
|
|
63
|
+
import "@mui/x-charts";
|
|
64
|
+
import "../../common/currentLimits/limitsPane.utils.js";
|
|
62
65
|
import { MAX_SECTIONS_COUNT } from "./voltageLevel.constants.js";
|
|
63
66
|
import { VoltageLevelCreationForm } from "./VoltageLevelCreationForm.js";
|
|
64
67
|
import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./voltageLevelCreation.utils.js";
|
|
@@ -64,6 +64,9 @@ import "react-window";
|
|
|
64
64
|
import "../../../../../../components/composite/report/report-treeview/treeview-item.js";
|
|
65
65
|
import "../../../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
66
66
|
import "../../../../common/regulatingTerminal/RegulatingTerminalForm.js";
|
|
67
|
+
import "@mui/material/colors";
|
|
68
|
+
import "@mui/x-charts";
|
|
69
|
+
import "../../../../common/currentLimits/limitsPane.utils.js";
|
|
67
70
|
function SubstationCreationSection({
|
|
68
71
|
showDeleteButton = true,
|
|
69
72
|
onDelete
|
package/dist/features/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js
CHANGED
|
@@ -63,6 +63,9 @@ import "react-window";
|
|
|
63
63
|
import "../../../../components/composite/report/report-treeview/treeview-item.js";
|
|
64
64
|
import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
65
65
|
import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
|
|
66
|
+
import "@mui/material/colors";
|
|
67
|
+
import "@mui/x-charts";
|
|
68
|
+
import "../../common/currentLimits/limitsPane.utils.js";
|
|
66
69
|
import { substationCreationEmptyFormData } from "../../substation/creation/substationCreation.utils.js";
|
|
67
70
|
import "../../substation/modification/substationModification.utils.js";
|
|
68
71
|
const SWITCH_TYPE = {
|
|
@@ -59,6 +59,9 @@ import "react-window";
|
|
|
59
59
|
import "../../../components/composite/report/report-treeview/treeview-item.js";
|
|
60
60
|
import "../../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
61
61
|
import "../common/regulatingTerminal/RegulatingTerminalForm.js";
|
|
62
|
+
import "@mui/material/colors";
|
|
63
|
+
import "@mui/x-charts";
|
|
64
|
+
import "../common/currentLimits/limitsPane.utils.js";
|
|
62
65
|
import { MAX_SECTIONS_COUNT } from "./creation/voltageLevel.constants.js";
|
|
63
66
|
import { VoltageLevelCreationForm } from "./creation/VoltageLevelCreationForm.js";
|
|
64
67
|
import { SWITCH_TYPE, buildNewBusbarSections, getCreateSwitchesEmptyFormData, getCreateSwitchesValidationSchema, translateSwitchKinds, voltageLevelCreationDtoToForm, voltageLevelCreationEmptyFormData, voltageLevelCreationFormSchema, voltageLevelCreationFormToDto } from "./creation/voltageLevelCreation.utils.js";
|
|
@@ -40,7 +40,7 @@ import "../../common/properties/propertyUtils.js";
|
|
|
40
40
|
import { GridSection } from "../../../../components/composite/grid/grid-section.js";
|
|
41
41
|
import { BusbarSectionVoltageMeasurementsForm } from "../../common/measurements/BusbarSectionVoltageMeasurementsForm.js";
|
|
42
42
|
import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
|
|
43
|
-
import
|
|
43
|
+
import "@mui/material/colors";
|
|
44
44
|
import "react-dom";
|
|
45
45
|
import "autosuggest-highlight/match";
|
|
46
46
|
import "autosuggest-highlight/parse";
|
|
@@ -68,6 +68,9 @@ import "../../../../components/composite/report/report-viewer/log-table/log-tabl
|
|
|
68
68
|
import "react-window";
|
|
69
69
|
import "../../../../components/composite/report/report-treeview/treeview-item.js";
|
|
70
70
|
import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
|
|
71
|
+
import "@mui/x-charts";
|
|
72
|
+
import "../../common/currentLimits/limitsPane.utils.js";
|
|
73
|
+
import { getTabStyle, getTabIndicatorStyle } from "../../../parameters/parameters-style.js";
|
|
71
74
|
function VoltageLevelModificationForm({
|
|
72
75
|
voltageLevelToModify,
|
|
73
76
|
busbarSections = []
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Alert, CircularProgress } from "@mui/material";
|
|
3
3
|
import { forwardRef, useState, useImperativeHandle, useCallback, useEffect, useMemo } from "react";
|
|
4
4
|
import { useIntl, FormattedMessage } from "react-intl";
|
|
5
5
|
import { useFormContext } from "react-hook-form";
|
|
@@ -16,15 +16,19 @@ import "localized-countries/data/fr";
|
|
|
16
16
|
import "localized-countries/data/en";
|
|
17
17
|
import { useSnackMessage } from "../../../../hooks/useSnackMessage.js";
|
|
18
18
|
import { CONTINGENCY_LISTS } from "../constants.js";
|
|
19
|
+
import { mapSimulatedContingencyList } from "./utils.js";
|
|
19
20
|
const styles = {
|
|
20
|
-
alert: { color: "text.primary", paddingTop: 0, paddingBottom: 0 }
|
|
21
|
+
alert: { color: "text.primary", paddingTop: 0, paddingBottom: 0 },
|
|
22
|
+
error: { color: "error.main", paddingTop: 0, paddingBottom: 0 }
|
|
21
23
|
};
|
|
22
24
|
function ContingencyTableWithApiRef({ name, showContingencyCount = false, fetchContingencyCount, isBuiltCurrentNode }, apiRef) {
|
|
23
25
|
const intl = useIntl();
|
|
24
26
|
const { snackError } = useSnackMessage();
|
|
25
27
|
const { getValues } = useFormContext();
|
|
26
28
|
const [isLoading, setIsLoading] = useState(false);
|
|
27
|
-
const [simulatedContingencyCount, setSimulatedContingencyCount] = useState(
|
|
29
|
+
const [simulatedContingencyCount, setSimulatedContingencyCount] = useState(
|
|
30
|
+
null
|
|
31
|
+
);
|
|
28
32
|
const [contingencyCountRefreshTrigger, setContingencyCountRefreshTrigger] = useState(0);
|
|
29
33
|
useImperativeHandle(
|
|
30
34
|
apiRef,
|
|
@@ -66,7 +70,7 @@ function ContingencyTableWithApiRef({ name, showContingencyCount = false, fetchC
|
|
|
66
70
|
contingencyListsInfos.filter((lists) => lists[ACTIVATED]).flatMap((lists) => lists[CONTINGENCY_LISTS]?.map((contingencyList) => contingencyList[ID])),
|
|
67
71
|
abortSignal
|
|
68
72
|
).then((contingencyCount) => {
|
|
69
|
-
setSimulatedContingencyCount(contingencyCount);
|
|
73
|
+
setSimulatedContingencyCount(mapSimulatedContingencyList(contingencyCount, contingencyListsInfos));
|
|
70
74
|
loadingTimeoutId = setTimeout(() => {
|
|
71
75
|
setIsLoading(false);
|
|
72
76
|
}, 500);
|
|
@@ -98,18 +102,26 @@ function ContingencyTableWithApiRef({ name, showContingencyCount = false, fetchC
|
|
|
98
102
|
if (isLoading) {
|
|
99
103
|
return /* @__PURE__ */ jsx(Alert, { variant: "standard", icon: /* @__PURE__ */ jsx(CircularProgress, { size: 22 }), severity: "info", sx: styles.alert });
|
|
100
104
|
}
|
|
101
|
-
if (simulatedContingencyCount
|
|
105
|
+
if (simulatedContingencyCount === null || simulatedContingencyCount.success && simulatedContingencyCount.nbContingencies === 0) {
|
|
102
106
|
return /* @__PURE__ */ jsx(Alert, { variant: "standard", severity: "error", sx: styles.alert, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "noContingency" }) });
|
|
103
107
|
}
|
|
104
|
-
return /* @__PURE__ */ jsx(Alert, { variant: "standard", icon: false, severity: "info", sx: styles.alert, children: /* @__PURE__ */ jsx(
|
|
108
|
+
return simulatedContingencyCount.success ? /* @__PURE__ */ jsx(Alert, { variant: "standard", icon: false, severity: "info", sx: styles.alert, children: /* @__PURE__ */ jsx(
|
|
105
109
|
FormattedMessage,
|
|
106
110
|
{
|
|
107
111
|
id: "xContingenciesWillBeSimulatedAndYNotFound",
|
|
108
112
|
values: {
|
|
109
|
-
x: simulatedContingencyCount?.
|
|
113
|
+
x: simulatedContingencyCount?.nbContingencies ?? "...",
|
|
110
114
|
y: simulatedContingencyCount?.notFoundElements ?? "..."
|
|
111
115
|
}
|
|
112
116
|
}
|
|
117
|
+
) }) : /* @__PURE__ */ jsx(Alert, { variant: "standard", severity: "error", sx: styles.error, children: /* @__PURE__ */ jsx(
|
|
118
|
+
FormattedMessage,
|
|
119
|
+
{
|
|
120
|
+
id: "contingenciesWillNotBeSimulated",
|
|
121
|
+
values: {
|
|
122
|
+
invalidContingencyErrorMessage: simulatedContingencyCount.invalidContingencyErrorMessage
|
|
123
|
+
}
|
|
124
|
+
}
|
|
113
125
|
) });
|
|
114
126
|
};
|
|
115
127
|
const columnsDefinition = useMemo(() => {
|
|
@@ -120,7 +132,7 @@ function ContingencyTableWithApiRef({ name, showContingencyCount = false, fetchC
|
|
|
120
132
|
})
|
|
121
133
|
);
|
|
122
134
|
}, [intl]);
|
|
123
|
-
return /* @__PURE__ */
|
|
135
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
124
136
|
/* @__PURE__ */ jsx(
|
|
125
137
|
ParameterTableField,
|
|
126
138
|
{
|
|
@@ -132,7 +144,7 @@ function ContingencyTableWithApiRef({ name, showContingencyCount = false, fetchC
|
|
|
132
144
|
}
|
|
133
145
|
),
|
|
134
146
|
showContingencyCount && renderContingencyCount()
|
|
135
|
-
] })
|
|
147
|
+
] });
|
|
136
148
|
}
|
|
137
149
|
const ContingencyTable = forwardRef(ContingencyTableWithApiRef);
|
|
138
150
|
export {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { UUID } from 'node:crypto';
|
|
2
|
+
export interface ContingencyCountByContingencyList {
|
|
3
|
+
nbContingencies: number;
|
|
4
|
+
notFoundElements: Record<string, Set<string>> | null;
|
|
5
|
+
invalidContingencyErrorMessage: string | null;
|
|
6
|
+
}
|
|
7
7
|
export interface ContingencyCount {
|
|
8
|
-
|
|
9
|
-
notFoundElements: number;
|
|
8
|
+
countByContingencyList: Record<UUID, ContingencyCountByContingencyList>;
|
|
10
9
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ContingencyCount } from './types';
|
|
2
|
+
import { ContingencyListsInfosEnriched } from '../../../../utils';
|
|
3
|
+
export type SuccessCountType = {
|
|
4
|
+
success: true;
|
|
5
|
+
nbContingencies: number;
|
|
6
|
+
notFoundElements: number;
|
|
7
|
+
};
|
|
8
|
+
export type FailureCountType = {
|
|
9
|
+
success: false;
|
|
10
|
+
invalidContingencyErrorMessage: string;
|
|
11
|
+
};
|
|
12
|
+
export type SimulatedContingencyCountType = SuccessCountType | FailureCountType;
|
|
13
|
+
export declare function mapSimulatedContingencyList(contingencyCount: ContingencyCount, contingencyListsInfos: ContingencyListsInfosEnriched[]): SimulatedContingencyCountType;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function mapSimulatedContingencyList(contingencyCount, contingencyListsInfos) {
|
|
2
|
+
const namesById = {};
|
|
3
|
+
contingencyListsInfos.forEach((info) => {
|
|
4
|
+
info.contingencyLists.forEach((idName) => {
|
|
5
|
+
namesById[idName.id] = idName.name;
|
|
6
|
+
});
|
|
7
|
+
});
|
|
8
|
+
let total = 0;
|
|
9
|
+
let totalNotFound = 0;
|
|
10
|
+
for (const [uuid, countByList] of Object.entries(contingencyCount.countByContingencyList)) {
|
|
11
|
+
total += countByList.nbContingencies;
|
|
12
|
+
const listName = namesById[uuid] ?? uuid;
|
|
13
|
+
if (countByList.invalidContingencyErrorMessage !== null) {
|
|
14
|
+
return {
|
|
15
|
+
success: false,
|
|
16
|
+
invalidContingencyErrorMessage: `${countByList.invalidContingencyErrorMessage} in the list ${listName}`
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
if (countByList.notFoundElements !== null) {
|
|
20
|
+
totalNotFound += Object.entries(countByList.notFoundElements).length;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
success: true,
|
|
25
|
+
nbContingencies: total,
|
|
26
|
+
notFoundElements: totalNotFound
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
mapSimulatedContingencyList
|
|
31
|
+
};
|
|
@@ -74,9 +74,13 @@ const basicParams = [
|
|
|
74
74
|
type: ParameterType.STRING,
|
|
75
75
|
label: "descLfConnectedComponentMode",
|
|
76
76
|
possibleValues: [
|
|
77
|
+
{
|
|
78
|
+
id: "MAIN_SYNCHRONOUS",
|
|
79
|
+
label: "descLfConnectedComponentModeMainSync"
|
|
80
|
+
},
|
|
77
81
|
{
|
|
78
82
|
id: "MAIN_CONNECTED",
|
|
79
|
-
label: "
|
|
83
|
+
label: "descLfConnectedComponentModeMainConnected"
|
|
80
84
|
},
|
|
81
85
|
{
|
|
82
86
|
id: "ALL_CONNECTED",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Stack,
|
|
2
|
+
import { Stack, Box } from "@mui/material";
|
|
3
3
|
import { parametersStyles } from "../parameters-style.js";
|
|
4
4
|
import "@mui/icons-material";
|
|
5
5
|
import "react";
|
|
@@ -51,37 +51,25 @@ function SecurityAnalysisParametersForm({
|
|
|
51
51
|
}) {
|
|
52
52
|
return /* @__PURE__ */ jsxs(Stack, { sx: parametersStyles.scrollableGrid, children: [
|
|
53
53
|
/* @__PURE__ */ jsx(ProviderParam, { options: securityAnalysisMethods.formattedProviders, id: "Sa", sx: { paddingBottom: 1 } }),
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
|
|
54
|
+
/* @__PURE__ */ jsx(
|
|
55
|
+
ContingencyTable,
|
|
56
56
|
{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
/* @__PURE__ */ jsx(
|
|
74
|
-
SecurityAnalysisParametersSelector,
|
|
75
|
-
{
|
|
76
|
-
params: securityAnalysisMethods.params,
|
|
77
|
-
currentProvider: securityAnalysisMethods.watchProvider?.trim(),
|
|
78
|
-
isDeveloperMode,
|
|
79
|
-
defaultLimitReductions: securityAnalysisMethods.defaultLimitReductions
|
|
80
|
-
}
|
|
81
|
-
)
|
|
82
|
-
]
|
|
83
|
-
},
|
|
84
|
-
"securityAnalysisParameters"
|
|
57
|
+
name: CONTINGENCY_LISTS_INFOS,
|
|
58
|
+
showContingencyCount,
|
|
59
|
+
fetchContingencyCount,
|
|
60
|
+
isBuiltCurrentNode,
|
|
61
|
+
ref: contingencyTableApiRef
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
/* @__PURE__ */ jsx(Box, { paddingTop: 4, paddingBottom: 2, children: /* @__PURE__ */ jsx(LineSeparator, {}) }),
|
|
65
|
+
/* @__PURE__ */ jsx(
|
|
66
|
+
SecurityAnalysisParametersSelector,
|
|
67
|
+
{
|
|
68
|
+
params: securityAnalysisMethods.params,
|
|
69
|
+
currentProvider: securityAnalysisMethods.watchProvider?.trim(),
|
|
70
|
+
isDeveloperMode,
|
|
71
|
+
defaultLimitReductions: securityAnalysisMethods.defaultLimitReductions
|
|
72
|
+
}
|
|
85
73
|
)
|
|
86
74
|
] });
|
|
87
75
|
}
|
|
@@ -70,6 +70,7 @@ const useModificationLabelComputer = () => {
|
|
|
70
70
|
}
|
|
71
71
|
return "";
|
|
72
72
|
case MODIFICATION_TYPES.COMPOSITE_MODIFICATION.type:
|
|
73
|
+
case MODIFICATION_TYPES.MODIFICATION_REFERENCE.type:
|
|
73
74
|
return modificationMetadata.name;
|
|
74
75
|
default:
|
|
75
76
|
return modificationMetadata.equipmentId || "";
|