@gridsuite/commons-ui 0.146.0 → 0.147.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/checkBoxList/CheckBoxListItem.js +1 -1
- package/dist/components/checkBoxList/CheckBoxListItemContent.js +1 -1
- package/dist/components/checkBoxList/DraggableCheckBoxListItem.js +1 -1
- package/dist/components/checkBoxList/DraggableCheckBoxListItemContent.js +1 -1
- package/dist/components/csvDownloader/use-csv-export.js +1 -1
- package/dist/components/customAGGrid/cell-renderers.js +1 -1
- package/dist/components/customAGGrid/separatorCellRenderer.js +1 -1
- package/dist/components/dialogs/elementSaveDialog/ElementSaveDialog.js +1 -1
- package/dist/components/directoryItemSelector/utils.js +2 -2
- package/dist/components/dnd-table/dnd-table-add-rows-dialog.js +1 -1
- package/dist/components/filter/HeaderFilterForm.js +1 -1
- package/dist/components/filter/expert/expertFilterConstants.js +1 -1
- package/dist/components/filter/utils/filterFormUtils.js +1 -1
- package/dist/components/index.js +1 -2
- package/dist/components/inputs/reactHookForm/DirectoryItemsInput.js +1 -1
- package/dist/components/inputs/reactHookForm/OverflowableChipWithHelperText.js +1 -1
- package/dist/components/inputs/reactHookForm/agGridTable/CustomAgGridTable.js +1 -1
- package/dist/components/inputs/reactHookForm/agGridTable/csvUploader/CsvUploader.js +1 -1
- package/dist/components/inputs/reactHookForm/chip-items-input.js +1 -1
- package/dist/components/inputs/reactQueryBuilder/CountryValueEditor.js +1 -1
- package/dist/components/inputs/reactQueryBuilder/ElementValueEditor.js +1 -1
- package/dist/components/inputs/reactQueryBuilder/OperatorSelector.js +1 -1
- package/dist/components/overflowableText/OverflowableText.js +1 -1
- package/dist/components/parameters/common/ProviderParam.js +1 -1
- package/dist/components/parameters/common/limitreductions/limit-reduction-table-cell.js +1 -1
- package/dist/components/parameters/common/limitreductions/limit-reductions-table-form.js +1 -1
- package/dist/components/parameters/common/name-element-editor/name-element-editor-form.js +1 -1
- package/dist/components/parameters/common/name-element-editor/name-element-editor-utils.js +1 -1
- package/dist/components/parameters/common/utils.js +2 -2
- package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-cell.js +1 -1
- package/dist/components/parameters/common/widget/parameter-float.js +1 -1
- package/dist/components/parameters/common/widget/parameter-line-directory-items-input.js +1 -1
- package/dist/components/parameters/common/widget/parameter-line-slider.js +1 -1
- package/dist/components/parameters/index.js +1 -2
- package/dist/components/parameters/loadflow/load-flow-general-parameters.js +1 -1
- package/dist/components/parameters/loadflow/load-flow-parameter-field.js +1 -1
- package/dist/components/parameters/loadflow/load-flow-parameters-content.js +1 -1
- package/dist/components/parameters/loadflow/load-flow-parameters-dialog.js +1 -1
- package/dist/components/parameters/loadflow/load-flow-parameters-form.js +1 -1
- package/dist/components/parameters/loadflow/load-flow-parameters-header.js +1 -1
- package/dist/components/parameters/loadflow/load-flow-parameters-utils.js +1 -1
- package/dist/components/parameters/network-visualizations/constants.d.ts +0 -4
- package/dist/components/parameters/network-visualizations/constants.js +1 -20
- package/dist/components/parameters/network-visualizations/index.js +1 -2
- package/dist/components/parameters/network-visualizations/map-parameters.js +21 -4
- package/dist/components/parameters/network-visualizations/network-area-diagram-parameters.js +1 -1
- package/dist/components/parameters/network-visualizations/network-visualizations-form.js +1 -1
- package/dist/components/parameters/network-visualizations/single-line-diagram-parameters.js +1 -1
- package/dist/components/parameters/pcc-min/pcc-min-form-utils.js +1 -1
- package/dist/components/parameters/pcc-min/pcc-min-parameters-form.js +1 -1
- package/dist/components/parameters/pcc-min/pcc-min-parameters-inline.js +1 -1
- package/dist/components/parameters/pcc-min/use-pcc-min-parameters-form.js +1 -1
- package/dist/components/parameters/security-analysis/security-analysis-parameters-dialog.js +1 -1
- package/dist/components/parameters/security-analysis/security-analysis-parameters-form.js +1 -1
- package/dist/components/parameters/security-analysis/security-analysis-parameters-selector.js +1 -1
- package/dist/components/parameters/sensi/columns-definitions.js +2 -2
- package/dist/components/parameters/sensi/sensitivity-Flow-parameters.js +1 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.js +1 -1
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +1 -1
- package/dist/components/parameters/sensi/table-cell.js +1 -1
- package/dist/components/parameters/sensi/utils.js +2 -2
- package/dist/components/parameters/short-circuit/short-circuit-fields.js +16 -6
- package/dist/components/parameters/short-circuit/short-circuit-parameters-form.js +1 -1
- package/dist/components/parameters/short-circuit/short-circuit-parameters-utils.js +1 -1
- package/dist/components/parameters/voltage-init/equipment-selection-parameters.js +1 -1
- package/dist/components/parameters/voltage-init/general-parameters.js +1 -1
- package/dist/components/parameters/voltage-init/voltage-init-form-utils.js +1 -1
- package/dist/components/parameters/voltage-init/voltage-init-parameters-form.js +1 -1
- package/dist/hooks/use-unique-name-validation.js +1 -1
- package/dist/hooks/useConfidentialityWarning.js +1 -1
- package/dist/hooks/useModificationLabelComputer.js +1 -1
- package/dist/index.js +4 -3
- package/dist/services/config.js +1 -1
- package/dist/services/utils.d.ts +2 -7
- package/dist/services/utils.js +7 -1
- package/dist/utils/error.js +3 -1
- package/dist/utils/index.js +3 -1
- package/dist/utils/types/CustomError.d.ts +13 -0
- package/dist/utils/types/CustomError.js +20 -0
- package/dist/utils/types/ProblemDetailError.d.ts +3 -12
- package/dist/utils/types/ProblemDetailError.js +4 -15
- package/dist/utils/types/index.d.ts +1 -0
- package/dist/utils/types/index.js +3 -1
- package/dist/utils/types/metadata.d.ts +4 -0
- package/package.json +1 -1
package/dist/components/parameters/network-visualizations/network-area-diagram-parameters.js
CHANGED
|
@@ -5,8 +5,8 @@ import { NAD_POSITIONS_GENERATION_MODE_LABEL, NetworkVisualizationTabValues, PAR
|
|
|
5
5
|
import { parametersStyles } from "../parameters-style.js";
|
|
6
6
|
import "../../overflowableText/OverflowableText.js";
|
|
7
7
|
import "../../../utils/conversionUtils.js";
|
|
8
|
-
import "@mui/icons-material";
|
|
9
8
|
import "../../../utils/types/equipmentType.js";
|
|
9
|
+
import "@mui/icons-material";
|
|
10
10
|
import "../../../utils/yupConfig.js";
|
|
11
11
|
import "react";
|
|
12
12
|
import "react-hook-form";
|
|
@@ -4,8 +4,8 @@ import { useState, useEffect } from "react";
|
|
|
4
4
|
import { FormattedMessage } from "react-intl";
|
|
5
5
|
import "../../overflowableText/OverflowableText.js";
|
|
6
6
|
import "../../../utils/conversionUtils.js";
|
|
7
|
-
import "@mui/icons-material";
|
|
8
7
|
import "../../../utils/types/equipmentType.js";
|
|
8
|
+
import "@mui/icons-material";
|
|
9
9
|
import "../../../utils/yupConfig.js";
|
|
10
10
|
import "react-hook-form";
|
|
11
11
|
import { getAvailableComponentLibraries } from "../../../services/study.js";
|
|
@@ -5,8 +5,8 @@ import { FormattedMessage } from "react-intl";
|
|
|
5
5
|
import { LineSeparator } from "../common/line-separator.js";
|
|
6
6
|
import { parametersStyles } from "../parameters-style.js";
|
|
7
7
|
import "../../../utils/conversionUtils.js";
|
|
8
|
-
import "@mui/icons-material";
|
|
9
8
|
import "../../../utils/types/equipmentType.js";
|
|
9
|
+
import "@mui/icons-material";
|
|
10
10
|
import "../../../utils/yupConfig.js";
|
|
11
11
|
import "localized-countries";
|
|
12
12
|
import "localized-countries/data/fr";
|
|
@@ -4,8 +4,8 @@ import "react-intl";
|
|
|
4
4
|
import "@mui/material";
|
|
5
5
|
import "../../overflowableText/OverflowableText.js";
|
|
6
6
|
import "../../../utils/conversionUtils.js";
|
|
7
|
-
import "@mui/icons-material";
|
|
8
7
|
import "../../../utils/types/equipmentType.js";
|
|
8
|
+
import "@mui/icons-material";
|
|
9
9
|
import "../../../utils/yupConfig.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import "react-hook-form";
|
|
@@ -4,9 +4,9 @@ import "react-intl";
|
|
|
4
4
|
import "../../overflowableText/OverflowableText.js";
|
|
5
5
|
import { FILTERS } from "../../../utils/constants/filterConstant.js";
|
|
6
6
|
import "../../../utils/conversionUtils.js";
|
|
7
|
-
import "@mui/icons-material";
|
|
8
7
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
9
8
|
import { EquipmentType } from "../../../utils/types/equipmentType.js";
|
|
9
|
+
import "@mui/icons-material";
|
|
10
10
|
import "../../../utils/yupConfig.js";
|
|
11
11
|
import "react";
|
|
12
12
|
import "react-hook-form";
|
|
@@ -3,8 +3,8 @@ import { useState, useCallback, useEffect } from "react";
|
|
|
3
3
|
import { Box, Grid } from "@mui/material";
|
|
4
4
|
import { FormattedMessage } from "react-intl";
|
|
5
5
|
import "../../../utils/conversionUtils.js";
|
|
6
|
-
import "@mui/icons-material";
|
|
7
6
|
import "../../../utils/types/equipmentType.js";
|
|
7
|
+
import "@mui/icons-material";
|
|
8
8
|
import "../../../utils/yupConfig.js";
|
|
9
9
|
import { updatePccMinParameters } from "../../../services/pcc-min.js";
|
|
10
10
|
import "localized-countries";
|
|
@@ -7,8 +7,8 @@ import "react/jsx-runtime";
|
|
|
7
7
|
import "react-intl";
|
|
8
8
|
import { FILTERS, ID } from "../../../utils/constants/filterConstant.js";
|
|
9
9
|
import "../../../utils/conversionUtils.js";
|
|
10
|
-
import "@mui/icons-material";
|
|
11
10
|
import "../../../utils/types/equipmentType.js";
|
|
11
|
+
import "@mui/icons-material";
|
|
12
12
|
import { updatePccMinParameters, getPccMinStudyParameters } from "../../../services/pcc-min.js";
|
|
13
13
|
import "@mui/material";
|
|
14
14
|
import "localized-countries";
|
|
@@ -2,9 +2,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-intl";
|
|
4
4
|
import "../../../utils/conversionUtils.js";
|
|
5
|
-
import "@mui/icons-material";
|
|
6
5
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
7
6
|
import "../../../utils/types/equipmentType.js";
|
|
7
|
+
import "@mui/icons-material";
|
|
8
8
|
import "../../../utils/yupConfig.js";
|
|
9
9
|
import { getSecurityAnalysisDefaultLimitReductions, updateSecurityAnalysisParameters, fetchSecurityAnalysisParameters, fetchDefaultSecurityAnalysisProvider, fetchSecurityAnalysisProviders } from "../../../services/security-analysis.js";
|
|
10
10
|
import "@mui/material";
|
|
@@ -3,9 +3,9 @@ import { FormattedMessage } from "react-intl";
|
|
|
3
3
|
import { Grid, Box, LinearProgress } from "@mui/material";
|
|
4
4
|
import "../../overflowableText/OverflowableText.js";
|
|
5
5
|
import "../../../utils/conversionUtils.js";
|
|
6
|
+
import "../../../utils/types/equipmentType.js";
|
|
6
7
|
import "@mui/icons-material";
|
|
7
8
|
import { mergeSx } from "../../../utils/styles.js";
|
|
8
|
-
import "../../../utils/types/equipmentType.js";
|
|
9
9
|
import "../../../utils/yupConfig.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import "react-hook-form";
|
package/dist/components/parameters/security-analysis/security-analysis-parameters-selector.js
CHANGED
|
@@ -4,8 +4,8 @@ import { FormattedMessage } from "react-intl";
|
|
|
4
4
|
import { Grid, Tabs, Tab } from "@mui/material";
|
|
5
5
|
import { TabPanel } from "../common/parameters.js";
|
|
6
6
|
import "../../../utils/conversionUtils.js";
|
|
7
|
-
import "@mui/icons-material";
|
|
8
7
|
import "../../../utils/types/equipmentType.js";
|
|
8
|
+
import "@mui/icons-material";
|
|
9
9
|
import "../../../utils/yupConfig.js";
|
|
10
10
|
import "localized-countries";
|
|
11
11
|
import "localized-countries/data/fr";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { MONITORED_BRANCHES, INJECTIONS, DISTRIBUTION_TYPE, CONTINGENCIES, ACTIVATED, SENSITIVITY_TYPE, HVDC_LINES, PSTS, SUPERVISED_VOLTAGE_LEVELS, EQUIPMENTS_IN_VOLTAGE_REGULATION, PARAMETER_SENSI_INJECTIONS_SET, PARAMETER_SENSI_INJECTION, PARAMETER_SENSI_HVDC, PARAMETER_SENSI_PST, PARAMETER_SENSI_NODES } from "./constants.js";
|
|
2
2
|
import "../../../utils/conversionUtils.js";
|
|
3
|
-
import "react/jsx-runtime";
|
|
4
|
-
import "@mui/icons-material";
|
|
5
3
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
6
4
|
import { EquipmentType } from "../../../utils/types/equipmentType.js";
|
|
5
|
+
import "react/jsx-runtime";
|
|
6
|
+
import "@mui/icons-material";
|
|
7
7
|
import "../../../utils/yupConfig.js";
|
|
8
8
|
const MONITORED_BRANCHES_EQUIPMENT_TYPES = [EquipmentType.LINE, EquipmentType.TWO_WINDINGS_TRANSFORMER];
|
|
9
9
|
const INJECTION_DISTRIBUTION_TYPES = [
|
|
@@ -4,8 +4,8 @@ import { FormattedMessage } from "react-intl";
|
|
|
4
4
|
import { FLOW_FLOW_SENSITIVITY_VALUE_THRESHOLD, ANGLE_FLOW_SENSITIVITY_VALUE_THRESHOLD, FLOW_VOLTAGE_SENSITIVITY_VALUE_THRESHOLD } from "./constants.js";
|
|
5
5
|
import "../../overflowableText/OverflowableText.js";
|
|
6
6
|
import "../../../utils/conversionUtils.js";
|
|
7
|
-
import "@mui/icons-material";
|
|
8
7
|
import "../../../utils/types/equipmentType.js";
|
|
8
|
+
import "@mui/icons-material";
|
|
9
9
|
import "../../../utils/yupConfig.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import "react-hook-form";
|
|
@@ -4,9 +4,9 @@ import "@mui/material";
|
|
|
4
4
|
import "react-intl";
|
|
5
5
|
import "react";
|
|
6
6
|
import "../../../utils/conversionUtils.js";
|
|
7
|
-
import "@mui/icons-material";
|
|
8
7
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
9
8
|
import "../../../utils/types/equipmentType.js";
|
|
9
|
+
import "@mui/icons-material";
|
|
10
10
|
import "../../../utils/yupConfig.js";
|
|
11
11
|
import "localized-countries";
|
|
12
12
|
import "localized-countries/data/fr";
|
|
@@ -4,9 +4,9 @@ import { FormattedMessage } from "react-intl";
|
|
|
4
4
|
import { parametersStyles } from "../parameters-style.js";
|
|
5
5
|
import "../../overflowableText/OverflowableText.js";
|
|
6
6
|
import "../../../utils/conversionUtils.js";
|
|
7
|
+
import "../../../utils/types/equipmentType.js";
|
|
7
8
|
import "@mui/icons-material";
|
|
8
9
|
import { mergeSx } from "../../../utils/styles.js";
|
|
9
|
-
import "../../../utils/types/equipmentType.js";
|
|
10
10
|
import "../../../utils/yupConfig.js";
|
|
11
11
|
import "react";
|
|
12
12
|
import "react-hook-form";
|
|
@@ -3,8 +3,8 @@ import { TableCell } from "@mui/material";
|
|
|
3
3
|
import "react-intl";
|
|
4
4
|
import "../../overflowableText/OverflowableText.js";
|
|
5
5
|
import "../../../utils/conversionUtils.js";
|
|
6
|
-
import "@mui/icons-material";
|
|
7
6
|
import "../../../utils/types/equipmentType.js";
|
|
7
|
+
import "@mui/icons-material";
|
|
8
8
|
import "../../../utils/yupConfig.js";
|
|
9
9
|
import "react";
|
|
10
10
|
import "react-hook-form";
|
|
@@ -2,10 +2,10 @@ import "../../../utils/yupConfig.js";
|
|
|
2
2
|
import { FLOW_VOLTAGE_SENSITIVITY_VALUE_THRESHOLD, ANGLE_FLOW_SENSITIVITY_VALUE_THRESHOLD, FLOW_FLOW_SENSITIVITY_VALUE_THRESHOLD, PARAMETER_SENSI_NODES, EQUIPMENTS_IN_VOLTAGE_REGULATION, SUPERVISED_VOLTAGE_LEVELS, PARAMETER_SENSI_PST, PSTS, ACTIVATED, PARAMETER_SENSI_HVDC, HVDC_LINES, PARAMETER_SENSI_INJECTION, INJECTIONS, PARAMETER_SENSI_INJECTIONS_SET, DISTRIBUTION_TYPE, COUNT, CONTINGENCIES, SENSITIVITY_TYPE, MONITORED_BRANCHES, CONTAINER_NAME, CONTAINER_ID } from "./constants.js";
|
|
3
3
|
import { ID } from "../../../utils/constants/filterConstant.js";
|
|
4
4
|
import "../../../utils/conversionUtils.js";
|
|
5
|
-
import "react/jsx-runtime";
|
|
6
|
-
import "@mui/icons-material";
|
|
7
5
|
import "../../../utils/types/equipmentType.js";
|
|
8
6
|
import { DistributionType, SensitivityType } from "../../../utils/types/sensitivity-analysis.type.js";
|
|
7
|
+
import "react/jsx-runtime";
|
|
8
|
+
import "@mui/icons-material";
|
|
9
9
|
import { PROVIDER } from "../common/constant.js";
|
|
10
10
|
import "@mui/material";
|
|
11
11
|
import "react-intl";
|
|
@@ -4,7 +4,7 @@ import { Grid } from "@mui/material";
|
|
|
4
4
|
import { green, red } from "@mui/material/colors";
|
|
5
5
|
import { Lens } from "@mui/icons-material";
|
|
6
6
|
import { useWatch, useFormContext } from "react-hook-form";
|
|
7
|
-
import { SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, intlPredefinedParametersOptions, PredefinedParameters, intlInitialVoltageProfileMode,
|
|
7
|
+
import { SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE, SHORT_CIRCUIT_PREDEFINED_PARAMS, SHORT_CIRCUIT_WITH_LOADS, SHORT_CIRCUIT_WITH_SHUNT_COMPENSATORS, SHORT_CIRCUIT_WITH_VSC_CONVERTER_STATIONS, SHORT_CIRCUIT_WITH_NEUTRAL_POSITION, SHORT_CIRCUIT_ONLY_STARTED_GENERATORS, intlPredefinedParametersOptions, PredefinedParameters, intlInitialVoltageProfileMode, onlyStartedGeneratorsOptions, InitialVoltage, SHORT_CIRCUIT_WITH_FEEDER_RESULT } from "./constants.js";
|
|
8
8
|
import { VoltageTable } from "./short-circuit-voltage-table.js";
|
|
9
9
|
import GridItem from "../../grid/grid-item.js";
|
|
10
10
|
import GridSection from "../../grid/grid-section.js";
|
|
@@ -77,12 +77,15 @@ function ShortCircuitFields({ resetAll, isDeveloperMode = true }) {
|
|
|
77
77
|
() => Object.keys(watchSpecificParameters).length > 0 && watchSpecificParameters.constructor === Object,
|
|
78
78
|
[watchSpecificParameters]
|
|
79
79
|
);
|
|
80
|
+
const watchOnlyStartedGenerators = useWatch({
|
|
81
|
+
name: `${SPECIFIC_PARAMETERS}.${SHORT_CIRCUIT_ONLY_STARTED_GENERATORS}`
|
|
82
|
+
});
|
|
80
83
|
const isIccMinFeaturesDefaultConfiguration = useMemo(() => {
|
|
81
|
-
return !watchLoads && !watchShuntCompensators && !watchVSC && !watchNeutralPosition;
|
|
82
|
-
}, [watchLoads, watchShuntCompensators, watchVSC, watchNeutralPosition]);
|
|
84
|
+
return !watchLoads && !watchShuntCompensators && !watchVSC && !watchNeutralPosition && watchOnlyStartedGenerators;
|
|
85
|
+
}, [watchLoads, watchShuntCompensators, watchVSC, watchNeutralPosition, watchOnlyStartedGenerators]);
|
|
83
86
|
const isIccMaxFeaturesDefaultConfiguration = useMemo(() => {
|
|
84
|
-
return !watchLoads && !watchShuntCompensators && watchVSC && !watchNeutralPosition;
|
|
85
|
-
}, [watchLoads, watchShuntCompensators, watchVSC, watchNeutralPosition]);
|
|
87
|
+
return !watchLoads && !watchShuntCompensators && watchVSC && !watchNeutralPosition && !watchOnlyStartedGenerators;
|
|
88
|
+
}, [watchLoads, watchShuntCompensators, watchVSC, watchNeutralPosition, watchOnlyStartedGenerators]);
|
|
86
89
|
const predefinedParamsOptions = useMemo(() => {
|
|
87
90
|
const options = intlPredefinedParametersOptions();
|
|
88
91
|
if (!isDeveloperMode) {
|
|
@@ -160,7 +163,14 @@ function ShortCircuitFields({ resetAll, isDeveloperMode = true }) {
|
|
|
160
163
|
RadioInput,
|
|
161
164
|
{
|
|
162
165
|
name: `${SPECIFIC_PARAMETERS}.${SHORT_CIRCUIT_ONLY_STARTED_GENERATORS}`,
|
|
163
|
-
options: Object.values(onlyStartedGeneratorsOptions)
|
|
166
|
+
options: Object.values(onlyStartedGeneratorsOptions),
|
|
167
|
+
formProps: {
|
|
168
|
+
onChange: (_event, value) => {
|
|
169
|
+
setValue(`${SPECIFIC_PARAMETERS}.${SHORT_CIRCUIT_ONLY_STARTED_GENERATORS}`, value === "true", {
|
|
170
|
+
shouldDirty: true
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
}
|
|
164
174
|
}
|
|
165
175
|
);
|
|
166
176
|
useEffect(() => {
|
|
@@ -3,8 +3,8 @@ import { Box, Grid, LinearProgress } from "@mui/material";
|
|
|
3
3
|
import "react-intl";
|
|
4
4
|
import "../../overflowableText/OverflowableText.js";
|
|
5
5
|
import "../../../utils/conversionUtils.js";
|
|
6
|
-
import "@mui/icons-material";
|
|
7
6
|
import "../../../utils/types/equipmentType.js";
|
|
7
|
+
import "@mui/icons-material";
|
|
8
8
|
import "../../../utils/yupConfig.js";
|
|
9
9
|
import "react";
|
|
10
10
|
import "react-hook-form";
|
|
@@ -6,8 +6,8 @@ import "@mui/material";
|
|
|
6
6
|
import "react-intl";
|
|
7
7
|
import "react";
|
|
8
8
|
import "../../../utils/conversionUtils.js";
|
|
9
|
-
import "@mui/icons-material";
|
|
10
9
|
import "../../../utils/types/equipmentType.js";
|
|
10
|
+
import "@mui/icons-material";
|
|
11
11
|
import "localized-countries";
|
|
12
12
|
import "localized-countries/data/fr";
|
|
13
13
|
import "localized-countries/data/en";
|
|
@@ -3,9 +3,9 @@ import { Grid, Alert } from "@mui/material";
|
|
|
3
3
|
import { FormattedMessage } from "react-intl";
|
|
4
4
|
import "../../overflowableText/OverflowableText.js";
|
|
5
5
|
import "../../../utils/conversionUtils.js";
|
|
6
|
-
import "@mui/icons-material";
|
|
7
6
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
8
7
|
import { EquipmentType } from "../../../utils/types/equipmentType.js";
|
|
8
|
+
import "@mui/icons-material";
|
|
9
9
|
import "../../../utils/yupConfig.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import "react-hook-form";
|
|
@@ -8,8 +8,8 @@ import { ReactivePowerAdornment } from "../common/constant.js";
|
|
|
8
8
|
import { LineSeparator } from "../common/line-separator.js";
|
|
9
9
|
import { parametersStyles } from "../parameters-style.js";
|
|
10
10
|
import "../../../utils/conversionUtils.js";
|
|
11
|
-
import "@mui/icons-material";
|
|
12
11
|
import "../../../utils/types/equipmentType.js";
|
|
12
|
+
import "@mui/icons-material";
|
|
13
13
|
import "../../../utils/yupConfig.js";
|
|
14
14
|
import "localized-countries";
|
|
15
15
|
import "localized-countries/data/fr";
|
|
@@ -6,8 +6,8 @@ import "@mui/material";
|
|
|
6
6
|
import "../../overflowableText/OverflowableText.js";
|
|
7
7
|
import { FILTER_NAME, FILTER_ID, ID, FILTERS } from "../../../utils/constants/filterConstant.js";
|
|
8
8
|
import "../../../utils/conversionUtils.js";
|
|
9
|
-
import "@mui/icons-material";
|
|
10
9
|
import "../../../utils/types/equipmentType.js";
|
|
10
|
+
import "@mui/icons-material";
|
|
11
11
|
import "../../../utils/yupConfig.js";
|
|
12
12
|
import "react";
|
|
13
13
|
import "react-hook-form";
|
|
@@ -4,8 +4,8 @@ import { FormattedMessage } from "react-intl";
|
|
|
4
4
|
import { getTabIndicatorStyle, getTabStyle } from "../parameters-style.js";
|
|
5
5
|
import "../../overflowableText/OverflowableText.js";
|
|
6
6
|
import "../../../utils/conversionUtils.js";
|
|
7
|
-
import "@mui/icons-material";
|
|
8
7
|
import "../../../utils/types/equipmentType.js";
|
|
8
|
+
import "@mui/icons-material";
|
|
9
9
|
import "../../../utils/yupConfig.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import "react-hook-form";
|
|
@@ -2,9 +2,9 @@ import { useCallback, useEffect } from "react";
|
|
|
2
2
|
import { useFormContext, useController } from "react-hook-form";
|
|
3
3
|
import { FieldConstants } from "../utils/constants/fieldConstants.js";
|
|
4
4
|
import "../utils/conversionUtils.js";
|
|
5
|
+
import "../utils/types/equipmentType.js";
|
|
5
6
|
import "react/jsx-runtime";
|
|
6
7
|
import "@mui/icons-material";
|
|
7
|
-
import "../utils/types/equipmentType.js";
|
|
8
8
|
import "../utils/yupConfig.js";
|
|
9
9
|
import { useDebounce } from "./useDebounce.js";
|
|
10
10
|
import { elementAlreadyExists } from "../services/directory.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useState, useEffect } from "react";
|
|
2
2
|
import { fetchEnv } from "../services/appsMetadata.js";
|
|
3
3
|
import "../utils/conversionUtils.js";
|
|
4
|
+
import "../utils/types/equipmentType.js";
|
|
4
5
|
import "react/jsx-runtime";
|
|
5
6
|
import "@mui/icons-material";
|
|
6
|
-
import "../utils/types/equipmentType.js";
|
|
7
7
|
import "../utils/yupConfig.js";
|
|
8
8
|
const useConfidentialityWarning = () => {
|
|
9
9
|
const [confidentialityWarningKey, setConfidentialityWarningKey] = useState();
|
|
@@ -2,9 +2,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useIntl } from "react-intl";
|
|
3
3
|
import { useCallback } from "react";
|
|
4
4
|
import "../utils/conversionUtils.js";
|
|
5
|
-
import "@mui/icons-material";
|
|
6
5
|
import { EquipmentType } from "../utils/types/equipmentType.js";
|
|
7
6
|
import { MODIFICATION_TYPES } from "../utils/types/modificationType.js";
|
|
7
|
+
import "@mui/icons-material";
|
|
8
8
|
import "../utils/yupConfig.js";
|
|
9
9
|
const getOperatingStatusModificationValues = (modification, formatBold) => {
|
|
10
10
|
return {
|
package/dist/index.js
CHANGED
|
@@ -153,7 +153,7 @@ import { toFormValueSaParameters, toFormValuesLimitReductions } from "./componen
|
|
|
153
153
|
import { LimitReductionsTableForm } from "./components/parameters/common/limitreductions/limit-reductions-table-form.js";
|
|
154
154
|
import { LimitReductionTableRow } from "./components/parameters/common/limitreductions/limit-reduction-table-row.js";
|
|
155
155
|
import { LimitReductionTableCell } from "./components/parameters/common/limitreductions/limit-reduction-table-cell.js";
|
|
156
|
-
import { CENTER_LABEL, COMPONENT_LIBRARY, DIAGONAL_LABEL, INTL_LINE_FLOW_MODE_OPTIONS,
|
|
156
|
+
import { CENTER_LABEL, COMPONENT_LIBRARY, DIAGONAL_LABEL, INTL_LINE_FLOW_MODE_OPTIONS, INTL_SUBSTATION_LAYOUT_OPTIONS, LINE_FLOW_MODE, LineFlowMode, MAP_BASE_MAP, MAP_MANUAL_REFRESH, NAD_POSITIONS_GENERATION_MODE, NAD_POSITIONS_GENERATION_MODE_LABEL, NetworkVisualizationTabValues, PARAM_CENTER_LABEL, PARAM_COMPONENT_LIBRARY, PARAM_DIAGONAL_LABEL, PARAM_LINE_FLOW_MODE, PARAM_LINE_FULL_PATH, PARAM_LINE_PARALLEL_PATH, PARAM_MAP_BASEMAP, PARAM_MAP_MANUAL_REFRESH, PARAM_NAD_POSITIONS_GENERATION_MODE, PARAM_SUBSTATION_LAYOUT, SUBSTATION_LAYOUT } from "./components/parameters/network-visualizations/constants.js";
|
|
157
157
|
import { MAP_BASEMAP_CARTO, MAP_BASEMAP_CARTO_NOLABEL, MAP_BASEMAP_ETALAB, MAP_BASEMAP_MAPBOX, NadPositionsGenerationMode, SubstationLayout } from "./components/parameters/network-visualizations/network-visualizations.types.js";
|
|
158
158
|
import { NetworkVisualizationParametersInline } from "./components/parameters/network-visualizations/network-visualizations-parameters-inline.js";
|
|
159
159
|
import { NetworkVisualizationsParametersEditionDialog } from "./components/parameters/network-visualizations/network-visualizations-parameters-dialog.js";
|
|
@@ -223,7 +223,8 @@ import { equipmentTypesForPredefinedPropertiesMapper } from "./utils/mapper/equi
|
|
|
223
223
|
import { copyToClipboard } from "./utils/navigator-clipboard.js";
|
|
224
224
|
import { NotificationsUrlKeys, PREFIX_CONFIG_NOTIFICATION_WS, PREFIX_DIRECTORY_NOTIFICATION_WS, PREFIX_STUDY_NOTIFICATION_WS } from "./utils/constants/notificationsProvider.js";
|
|
225
225
|
import { DARK_THEME, LIGHT_THEME, makeComposeClasses, mergeSx, toNestedGlobalSelectors } from "./utils/styles.js";
|
|
226
|
-
import {
|
|
226
|
+
import { CustomError, formatMessageValues } from "./utils/types/CustomError.js";
|
|
227
|
+
import { ProblemDetailError } from "./utils/types/ProblemDetailError.js";
|
|
227
228
|
import { NetworkTimeoutError } from "./utils/types/NetworkTimeoutError.js";
|
|
228
229
|
import { ElementType } from "./utils/types/elementType.js";
|
|
229
230
|
import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, EquipmentType, ExtendedEquipmentType, HvdcType, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./utils/types/equipmentType.js";
|
|
@@ -352,6 +353,7 @@ export {
|
|
|
352
353
|
CsvUploader,
|
|
353
354
|
CustomAGGrid,
|
|
354
355
|
CustomAgGridTable,
|
|
356
|
+
CustomError,
|
|
355
357
|
CustomFormContext,
|
|
356
358
|
CustomFormProvider,
|
|
357
359
|
CustomMenuItem,
|
|
@@ -449,7 +451,6 @@ export {
|
|
|
449
451
|
INJECTIONS_EQUIPMENT_TYPES,
|
|
450
452
|
INJECTION_DISTRIBUTION_TYPES,
|
|
451
453
|
INTL_LINE_FLOW_MODE_OPTIONS,
|
|
452
|
-
INTL_MAP_BASE_MAP_OPTIONS,
|
|
453
454
|
INTL_SUBSTATION_LAYOUT_OPTIONS,
|
|
454
455
|
IST_FORM,
|
|
455
456
|
InitialVoltage,
|
package/dist/services/config.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { backendFetch, backendFetchJson } from "./utils.js";
|
|
2
2
|
import { COMMON_APP_NAME, COMMON_CONFIG_PARAMS_NAMES } from "../utils/constants/configConstants.js";
|
|
3
3
|
import "../utils/conversionUtils.js";
|
|
4
|
+
import "../utils/types/equipmentType.js";
|
|
4
5
|
import "react/jsx-runtime";
|
|
5
6
|
import "@mui/icons-material";
|
|
6
|
-
import "../utils/types/equipmentType.js";
|
|
7
7
|
import "../utils/yupConfig.js";
|
|
8
8
|
const PREFIX_CONFIG_QUERIES = `${"api/gateway"}/config`;
|
|
9
9
|
function getAppName(appName, name) {
|
package/dist/services/utils.d.ts
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
* Copyright (c) 2024, RTE (http://www.rte-france.com)
|
|
3
|
-
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
-
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
-
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
-
*/
|
|
1
|
+
import { CustomError } from '../utils/types/CustomError';
|
|
7
2
|
/** Optional convenience: allow per-call timeout override without crafting a signal manually. */
|
|
8
3
|
type FetchInitWithTimeout = RequestInit & {
|
|
9
4
|
/** If provided and no signal is set, use this as the timeout override (ms). */
|
|
10
5
|
timeoutMs?: number;
|
|
11
6
|
};
|
|
12
|
-
export declare const convertToCustomError: (textError: string) =>
|
|
7
|
+
export declare const convertToCustomError: (textError: string) => CustomError;
|
|
13
8
|
export declare const backendFetch: (url: string, init?: FetchInitWithTimeout, token?: string) => Promise<Response>;
|
|
14
9
|
export declare const backendFetchJson: (url: string, init?: FetchInitWithTimeout, token?: string) => Promise<any>;
|
|
15
10
|
export declare function backendFetchText(url: string, init?: FetchInitWithTimeout, token?: string): Promise<string>;
|
package/dist/services/utils.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getUserToken } from "../redux/commonStore.js";
|
|
2
2
|
import { ProblemDetailError } from "../utils/types/ProblemDetailError.js";
|
|
3
3
|
import { NetworkTimeoutError } from "../utils/types/NetworkTimeoutError.js";
|
|
4
|
+
import { CustomError } from "../utils/types/CustomError.js";
|
|
4
5
|
const DEFAULT_TIMEOUT_MS = 5e4;
|
|
5
6
|
const parseError = (text) => {
|
|
6
7
|
try {
|
|
@@ -45,7 +46,12 @@ const convertToCustomError = (textError) => {
|
|
|
45
46
|
errorJson.businessErrorValues
|
|
46
47
|
);
|
|
47
48
|
}
|
|
48
|
-
return new
|
|
49
|
+
return new CustomError(
|
|
50
|
+
errorJson.detail,
|
|
51
|
+
errorJson.status,
|
|
52
|
+
errorJson.businessErrorCode,
|
|
53
|
+
errorJson.businessErrorValues
|
|
54
|
+
);
|
|
49
55
|
};
|
|
50
56
|
const handleError = (response) => {
|
|
51
57
|
return response.text().then((text) => {
|
package/dist/utils/error.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { ProblemDetailError
|
|
1
|
+
import { ProblemDetailError } from "./types/ProblemDetailError.js";
|
|
2
2
|
import { NetworkTimeoutError } from "./types/NetworkTimeoutError.js";
|
|
3
|
+
import { formatMessageValues } from "./types/CustomError.js";
|
|
4
|
+
import "./types/equipmentType.js";
|
|
3
5
|
function catchErrorHandler(error, callback) {
|
|
4
6
|
if (error instanceof Object && "message" in error && typeof error.message === "string") {
|
|
5
7
|
callback(error.message);
|
package/dist/utils/index.js
CHANGED
|
@@ -14,7 +14,8 @@ import { equipmentTypesForPredefinedPropertiesMapper } from "./mapper/equipmentT
|
|
|
14
14
|
import { copyToClipboard } from "./navigator-clipboard.js";
|
|
15
15
|
import { NotificationsUrlKeys, PREFIX_CONFIG_NOTIFICATION_WS, PREFIX_DIRECTORY_NOTIFICATION_WS, PREFIX_STUDY_NOTIFICATION_WS } from "./constants/notificationsProvider.js";
|
|
16
16
|
import { DARK_THEME, LIGHT_THEME, makeComposeClasses, mergeSx, toNestedGlobalSelectors } from "./styles.js";
|
|
17
|
-
import {
|
|
17
|
+
import { CustomError, formatMessageValues } from "./types/CustomError.js";
|
|
18
|
+
import { ProblemDetailError } from "./types/ProblemDetailError.js";
|
|
18
19
|
import { NetworkTimeoutError } from "./types/NetworkTimeoutError.js";
|
|
19
20
|
import { ElementType } from "./types/elementType.js";
|
|
20
21
|
import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, EquipmentType, ExtendedEquipmentType, HvdcType, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./types/equipmentType.js";
|
|
@@ -39,6 +40,7 @@ export {
|
|
|
39
40
|
BusBar,
|
|
40
41
|
COMMON_APP_NAME,
|
|
41
42
|
COMMON_CONFIG_PARAMS_NAMES,
|
|
43
|
+
CustomError,
|
|
42
44
|
DARK_THEME,
|
|
43
45
|
DEGREE,
|
|
44
46
|
DanglingLine,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export declare class CustomError extends Error {
|
|
8
|
+
status: number;
|
|
9
|
+
businessErrorCode?: string;
|
|
10
|
+
businessErrorValues?: Record<string, unknown>;
|
|
11
|
+
constructor(message: string, status: number, businessErrorCode?: string, businessErrorValues?: Record<string, unknown>);
|
|
12
|
+
}
|
|
13
|
+
export declare function formatMessageValues(properties: Record<string, unknown>): Record<string, string>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
class CustomError extends Error {
|
|
2
|
+
constructor(message, status, businessErrorCode, businessErrorValues) {
|
|
3
|
+
super(message);
|
|
4
|
+
this.status = status;
|
|
5
|
+
this.businessErrorCode = businessErrorCode;
|
|
6
|
+
this.businessErrorValues = businessErrorValues;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
function formatMessageValues(properties) {
|
|
10
|
+
return Object.fromEntries(
|
|
11
|
+
Object.entries(properties).map(([key, value]) => [
|
|
12
|
+
key,
|
|
13
|
+
typeof value === "object" && value !== null ? JSON.stringify(value) : String(value)
|
|
14
|
+
])
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
CustomError,
|
|
19
|
+
formatMessageValues
|
|
20
|
+
};
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
-
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
-
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
-
*/
|
|
7
|
-
export declare class ProblemDetailError extends Error {
|
|
1
|
+
import { CustomError } from './CustomError';
|
|
2
|
+
export declare class ProblemDetailError extends CustomError {
|
|
8
3
|
serverName: string;
|
|
9
4
|
timestamp: Date;
|
|
10
5
|
traceId: string;
|
|
11
|
-
status?:
|
|
12
|
-
businessErrorCode?: string;
|
|
13
|
-
businessErrorValues?: Record<string, unknown>;
|
|
14
|
-
constructor(message: string, serverName: string, timestamp: Date, traceId: string, status?: number, businessErrorCode?: string, businessErrorValues?: Record<string, unknown>);
|
|
6
|
+
constructor(message: string, serverName: string, timestamp: Date, traceId: string, status: number, businessErrorCode?: string, businessErrorValues?: Record<string, unknown>);
|
|
15
7
|
}
|
|
16
|
-
export declare function formatMessageValues(properties: Record<string, unknown>): Record<string, string>;
|
|
@@ -1,23 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { CustomError } from "./CustomError.js";
|
|
2
|
+
class ProblemDetailError extends CustomError {
|
|
2
3
|
constructor(message, serverName, timestamp, traceId, status, businessErrorCode, businessErrorValues) {
|
|
3
|
-
super(message);
|
|
4
|
+
super(message, status, businessErrorCode, businessErrorValues);
|
|
4
5
|
this.serverName = serverName;
|
|
5
6
|
this.timestamp = timestamp;
|
|
6
7
|
this.traceId = traceId;
|
|
7
|
-
this.status = status;
|
|
8
|
-
this.businessErrorCode = businessErrorCode;
|
|
9
|
-
this.businessErrorValues = businessErrorValues;
|
|
10
8
|
}
|
|
11
9
|
}
|
|
12
|
-
function formatMessageValues(properties) {
|
|
13
|
-
return Object.fromEntries(
|
|
14
|
-
Object.entries(properties).map(([key, value]) => [
|
|
15
|
-
key,
|
|
16
|
-
typeof value === "object" && value !== null ? JSON.stringify(value) : String(value)
|
|
17
|
-
])
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
10
|
export {
|
|
21
|
-
ProblemDetailError
|
|
22
|
-
formatMessageValues
|
|
11
|
+
ProblemDetailError
|
|
23
12
|
};
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
5
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
6
|
*/
|
|
7
|
+
export * from './CustomError';
|
|
7
8
|
export * from './ProblemDetailError';
|
|
8
9
|
export * from './NetworkTimeoutError';
|
|
9
10
|
export * from './elementType';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CustomError, formatMessageValues } from "./CustomError.js";
|
|
2
|
+
import { ProblemDetailError } from "./ProblemDetailError.js";
|
|
2
3
|
import { NetworkTimeoutError } from "./NetworkTimeoutError.js";
|
|
3
4
|
import { ElementType } from "./elementType.js";
|
|
4
5
|
import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, EquipmentType, ExtendedEquipmentType, HvdcType, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./equipmentType.js";
|
|
@@ -16,6 +17,7 @@ export {
|
|
|
16
17
|
BASE_EQUIPMENTS,
|
|
17
18
|
Battery,
|
|
18
19
|
BusBar,
|
|
20
|
+
CustomError,
|
|
19
21
|
DanglingLine,
|
|
20
22
|
DistributionType,
|
|
21
23
|
ElementType,
|
|
@@ -22,6 +22,10 @@ export type StudyMetadata = Metadata & {
|
|
|
22
22
|
defaultCountry?: string;
|
|
23
23
|
favoriteCountries?: string[];
|
|
24
24
|
substationPropertiesGlobalFilters?: Map<string, string[]>;
|
|
25
|
+
baseMapOptions?: {
|
|
26
|
+
id: string;
|
|
27
|
+
label: string;
|
|
28
|
+
}[];
|
|
25
29
|
};
|
|
26
30
|
type ThemeColors = Record<string, string>;
|
|
27
31
|
type SldAndNadColors = {
|