@gridsuite/commons-ui 0.157.0 → 0.159.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/FilterForm.js +1 -1
- package/dist/components/filter/HeaderFilterForm.js +1 -1
- package/dist/components/filter/expert/ExpertFilterForm.js +1 -1
- package/dist/components/filter/expert/expertFilterConstants.js +1 -1
- package/dist/components/filter/utils/filterFormUtils.js +1 -1
- package/dist/components/icons/EditNoteIcon.d.ts +3 -9
- package/dist/components/icons/EditNoteIcon.js +4 -12
- package/dist/components/icons/LeftPanelCloseIcon.d.ts +2 -7
- package/dist/components/icons/LeftPanelCloseIcon.js +3 -13
- package/dist/components/icons/LeftPanelOpenIcon.d.ts +2 -7
- package/dist/components/icons/LeftPanelOpenIcon.js +3 -13
- 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/computing-type.d.ts +1 -0
- package/dist/components/parameters/common/computing-type.js +3 -0
- 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/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 +2 -2
- 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/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/network-visualizations-parameters-dialog.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-dialog.js +1 -1
- package/dist/components/parameters/pcc-min/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 +2 -2
- package/dist/components/parameters/security-analysis/security-analysis-parameters-selector.js +1 -1
- package/dist/components/parameters/security-analysis/security-analysis-violations-hiding.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/sensitivity-parameters-selector.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-icc-material-table-cell.js +1 -1
- package/dist/components/parameters/short-circuit/short-circuit-parameters-dialog.js +1 -1
- package/dist/components/parameters/short-circuit/short-circuit-parameters-form.js +1 -1
- package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.js +32 -0
- 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-dialog.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 +5 -4
- package/dist/services/config.js +1 -1
- package/dist/services/index.js +3 -2
- package/dist/services/utils.d.ts +8 -2
- package/dist/services/utils.js +61 -35
- package/dist/utils/error.js +2 -5
- package/dist/utils/index.js +2 -2
- package/dist/utils/types/CustomError.d.ts +2 -5
- package/dist/utils/types/CustomError.js +3 -14
- package/dist/utils/types/ProblemDetailError.d.ts +5 -2
- package/dist/utils/types/ProblemDetailError.js +14 -3
- package/dist/utils/types/index.js +2 -2
- package/package.json +1 -1
|
@@ -4,8 +4,8 @@ import "@mui/material";
|
|
|
4
4
|
import "react-intl";
|
|
5
5
|
import "react";
|
|
6
6
|
import "../../../utils/conversionUtils.js";
|
|
7
|
-
import "../../../utils/types/equipmentType.js";
|
|
8
7
|
import "@mui/icons-material";
|
|
8
|
+
import "../../../utils/types/equipmentType.js";
|
|
9
9
|
import "../../../utils/yupConfig.js";
|
|
10
10
|
import "localized-countries";
|
|
11
11
|
import "localized-countries/data/fr";
|
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 "../../../utils/types/equipmentType.js";
|
|
9
8
|
import "@mui/icons-material";
|
|
9
|
+
import "../../../utils/types/equipmentType.js";
|
|
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 "../../../utils/types/equipmentType.js";
|
|
8
7
|
import "@mui/icons-material";
|
|
8
|
+
import "../../../utils/types/equipmentType.js";
|
|
9
9
|
import "../../../utils/yupConfig.js";
|
|
10
10
|
import "react-hook-form";
|
|
11
11
|
import { getAvailableComponentLibraries } from "../../../services/study.js";
|
|
@@ -3,9 +3,9 @@ import { CustomMuiDialog } from "../../dialogs/customMuiDialog/CustomMuiDialog.j
|
|
|
3
3
|
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
4
4
|
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
5
5
|
import "../../../utils/conversionUtils.js";
|
|
6
|
+
import "@mui/icons-material";
|
|
6
7
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
7
8
|
import "../../../utils/types/equipmentType.js";
|
|
8
|
-
import "@mui/icons-material";
|
|
9
9
|
import "../../../utils/yupConfig.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import "@mui/material";
|
|
@@ -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 "../../../utils/types/equipmentType.js";
|
|
9
8
|
import "@mui/icons-material";
|
|
9
|
+
import "../../../utils/types/equipmentType.js";
|
|
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 "../../../utils/types/equipmentType.js";
|
|
8
7
|
import "@mui/icons-material";
|
|
8
|
+
import "../../../utils/types/equipmentType.js";
|
|
9
9
|
import "../../../utils/yupConfig.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import "react-hook-form";
|
|
@@ -3,9 +3,9 @@ import { CustomMuiDialog } from "../../dialogs/customMuiDialog/CustomMuiDialog.j
|
|
|
3
3
|
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
4
4
|
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
5
5
|
import "../../../utils/conversionUtils.js";
|
|
6
|
+
import "@mui/icons-material";
|
|
6
7
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
7
8
|
import "../../../utils/types/equipmentType.js";
|
|
8
|
-
import "@mui/icons-material";
|
|
9
9
|
import "../../../utils/yupConfig.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import "@mui/material";
|
|
@@ -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";
|
|
7
8
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
8
9
|
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";
|
|
@@ -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";
|
|
5
6
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
6
7
|
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";
|
|
7
6
|
import "@mui/icons-material";
|
|
8
7
|
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";
|
|
@@ -60,7 +60,7 @@ function SecurityAnalysisParametersForm({
|
|
|
60
60
|
{
|
|
61
61
|
validationSchema: securityAnalysisMethods.formSchema,
|
|
62
62
|
...securityAnalysisMethods.formMethods,
|
|
63
|
-
children: /* @__PURE__ */ jsx(Grid, { item: true, sx: { height: "100%" },
|
|
63
|
+
children: /* @__PURE__ */ jsx(Grid, { item: true, sx: { height: "100%" }, children: /* @__PURE__ */ jsx(
|
|
64
64
|
Box,
|
|
65
65
|
{
|
|
66
66
|
sx: {
|
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 "../../../utils/types/equipmentType.js";
|
|
8
7
|
import "@mui/icons-material";
|
|
8
|
+
import "../../../utils/types/equipmentType.js";
|
|
9
9
|
import "../../../utils/yupConfig.js";
|
|
10
10
|
import "localized-countries";
|
|
11
11
|
import "localized-countries/data/fr";
|
|
@@ -129,7 +129,7 @@ function ViolationsHidingParameters() {
|
|
|
129
129
|
)
|
|
130
130
|
] }) }),
|
|
131
131
|
fieldsToShow?.map((item) => {
|
|
132
|
-
return /* @__PURE__ */ jsx(Grid, { item: true,
|
|
132
|
+
return /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(SecurityAnalysisFields, { ...item }) }, item.label);
|
|
133
133
|
})
|
|
134
134
|
] });
|
|
135
135
|
}
|
|
@@ -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 { ElementType } from "../../../utils/types/elementType.js";
|
|
4
|
-
import { EquipmentType } from "../../../utils/types/equipmentType.js";
|
|
5
3
|
import "react/jsx-runtime";
|
|
6
4
|
import "@mui/icons-material";
|
|
5
|
+
import { ElementType } from "../../../utils/types/elementType.js";
|
|
6
|
+
import { EquipmentType } from "../../../utils/types/equipmentType.js";
|
|
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 "../../../utils/types/equipmentType.js";
|
|
8
7
|
import "@mui/icons-material";
|
|
8
|
+
import "../../../utils/types/equipmentType.js";
|
|
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";
|
|
7
8
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
8
9
|
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";
|
|
8
7
|
import "@mui/icons-material";
|
|
9
8
|
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";
|
|
@@ -6,8 +6,8 @@ import { SensiTabValues, SensiBranchesTabValues, SensiInjectionsSet, SensiInject
|
|
|
6
6
|
import { SensitivityTable } from "./sensitivity-table.js";
|
|
7
7
|
import { TabPanel } from "../common/parameters.js";
|
|
8
8
|
import "../../../utils/conversionUtils.js";
|
|
9
|
-
import "../../../utils/types/equipmentType.js";
|
|
10
9
|
import "@mui/icons-material";
|
|
10
|
+
import "../../../utils/types/equipmentType.js";
|
|
11
11
|
import "../../../utils/yupConfig.js";
|
|
12
12
|
import "localized-countries";
|
|
13
13
|
import "localized-countries/data/fr";
|
|
@@ -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 "../../../utils/types/equipmentType.js";
|
|
7
6
|
import "@mui/icons-material";
|
|
7
|
+
import "../../../utils/types/equipmentType.js";
|
|
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, 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 "../../../utils/types/equipmentType.js";
|
|
6
|
-
import { DistributionType, SensitivityType } from "../../../utils/types/sensitivity-analysis.type.js";
|
|
7
5
|
import "react/jsx-runtime";
|
|
8
6
|
import "@mui/icons-material";
|
|
7
|
+
import "../../../utils/types/equipmentType.js";
|
|
8
|
+
import { DistributionType, SensitivityType } from "../../../utils/types/sensitivity-analysis.type.js";
|
|
9
9
|
import { PROVIDER } from "../common/constant.js";
|
|
10
10
|
import "@mui/material";
|
|
11
11
|
import "react-intl";
|
|
@@ -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 "../../../utils/types/equipmentType.js";
|
|
7
6
|
import "@mui/icons-material";
|
|
7
|
+
import "../../../utils/types/equipmentType.js";
|
|
8
8
|
import "../../../utils/yupConfig.js";
|
|
9
9
|
import "react";
|
|
10
10
|
import "react-hook-form";
|
|
@@ -3,9 +3,9 @@ import { CustomMuiDialog } from "../../dialogs/customMuiDialog/CustomMuiDialog.j
|
|
|
3
3
|
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
4
4
|
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
5
5
|
import "../../../utils/conversionUtils.js";
|
|
6
|
+
import "@mui/icons-material";
|
|
6
7
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
7
8
|
import "../../../utils/types/equipmentType.js";
|
|
8
|
-
import "@mui/icons-material";
|
|
9
9
|
import "../../../utils/yupConfig.js";
|
|
10
10
|
import { getShortCircuitSpecificParametersDescription, updateShortCircuitParameters, fetchShortCircuitParameters } from "../../../services/short-circuit-analysis.js";
|
|
11
11
|
import "react";
|
|
@@ -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 "../../../utils/types/equipmentType.js";
|
|
7
6
|
import "@mui/icons-material";
|
|
7
|
+
import "../../../utils/types/equipmentType.js";
|
|
8
8
|
import "../../../utils/yupConfig.js";
|
|
9
9
|
import "react";
|
|
10
10
|
import "react-hook-form";
|
|
@@ -25,6 +25,7 @@ import "ag-grid-community";
|
|
|
25
25
|
import "react-papaparse";
|
|
26
26
|
import "react-csv-downloader";
|
|
27
27
|
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
28
|
+
import { PopupConfirmationDialog } from "../../dialogs/popupConfirmationDialog/PopupConfirmationDialog.js";
|
|
28
29
|
import "@react-querybuilder/material";
|
|
29
30
|
import "../../filter/expert/expertFilterConstants.js";
|
|
30
31
|
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
@@ -37,6 +38,8 @@ import "../common/widget/parameter-line-slider.js";
|
|
|
37
38
|
import "../common/limitreductions/columns-definitions.js";
|
|
38
39
|
import { ShortCircuitParametersForm } from "./short-circuit-parameters-form.js";
|
|
39
40
|
import { useShortCircuitParametersForm } from "./use-short-circuit-parameters-form.js";
|
|
41
|
+
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
42
|
+
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
40
43
|
function ShortCircuitParametersInLine({
|
|
41
44
|
studyUuid,
|
|
42
45
|
setHaveDirtyFields,
|
|
@@ -52,6 +55,9 @@ function ShortCircuitParametersInLine({
|
|
|
52
55
|
const intl = useIntl();
|
|
53
56
|
const [openCreateParameterDialog, setOpenCreateParameterDialog] = useState(false);
|
|
54
57
|
const [openSelectParameterDialog, setOpenSelectParameterDialog] = useState(false);
|
|
58
|
+
const [, , , , , , , , resetParameters, ,] = parametersBackend;
|
|
59
|
+
const [openResetConfirmation, setOpenResetConfirmation] = useState(false);
|
|
60
|
+
const [pendingResetAction, setPendingResetAction] = useState(null);
|
|
55
61
|
const { snackError } = useSnackMessage();
|
|
56
62
|
const { formMethods } = shortCircuitMethods;
|
|
57
63
|
const { getValues, formState, handleSubmit, reset } = formMethods;
|
|
@@ -72,6 +78,21 @@ function ShortCircuitParametersInLine({
|
|
|
72
78
|
},
|
|
73
79
|
[snackError, shortCircuitMethods, reset]
|
|
74
80
|
);
|
|
81
|
+
const executeResetAction = useCallback(() => {
|
|
82
|
+
if (pendingResetAction === "all" || pendingResetAction === "parameters") {
|
|
83
|
+
resetParameters();
|
|
84
|
+
}
|
|
85
|
+
setOpenResetConfirmation(false);
|
|
86
|
+
setPendingResetAction(null);
|
|
87
|
+
}, [pendingResetAction, resetParameters]);
|
|
88
|
+
const handleResetAllClick = useCallback(() => {
|
|
89
|
+
setPendingResetAction("all");
|
|
90
|
+
setOpenResetConfirmation(true);
|
|
91
|
+
}, []);
|
|
92
|
+
const handleCancelReset = useCallback(() => {
|
|
93
|
+
setOpenResetConfirmation(false);
|
|
94
|
+
setPendingResetAction(null);
|
|
95
|
+
}, []);
|
|
75
96
|
useEffect(() => {
|
|
76
97
|
setHaveDirtyFields(!!Object.keys(formState.dirtyFields).length);
|
|
77
98
|
}, [formState, setHaveDirtyFields]);
|
|
@@ -91,6 +112,7 @@ function ShortCircuitParametersInLine({
|
|
|
91
112
|
}
|
|
92
113
|
),
|
|
93
114
|
/* @__PURE__ */ jsx(LabelledButton, { callback: () => setOpenCreateParameterDialog(true), label: "save" }),
|
|
115
|
+
/* @__PURE__ */ jsx(LabelledButton, { callback: handleResetAllClick, label: "resetToDefault" }),
|
|
94
116
|
/* @__PURE__ */ jsx(
|
|
95
117
|
SubmitButton,
|
|
96
118
|
{
|
|
@@ -128,6 +150,16 @@ function ShortCircuitParametersInLine({
|
|
|
128
150
|
id: "validate"
|
|
129
151
|
})
|
|
130
152
|
}
|
|
153
|
+
),
|
|
154
|
+
openResetConfirmation && /* @__PURE__ */ jsx(
|
|
155
|
+
PopupConfirmationDialog,
|
|
156
|
+
{
|
|
157
|
+
message: "resetParamsConfirmation",
|
|
158
|
+
validateButtonLabel: "validate",
|
|
159
|
+
openConfirmationPopup: openResetConfirmation,
|
|
160
|
+
setOpenConfirmationPopup: handleCancelReset,
|
|
161
|
+
handlePopupConfirmation: executeResetAction
|
|
162
|
+
}
|
|
131
163
|
)
|
|
132
164
|
] });
|
|
133
165
|
}
|
|
@@ -6,8 +6,8 @@ import "@mui/material";
|
|
|
6
6
|
import "react-intl";
|
|
7
7
|
import "react";
|
|
8
8
|
import "../../../utils/conversionUtils.js";
|
|
9
|
-
import "../../../utils/types/equipmentType.js";
|
|
10
9
|
import "@mui/icons-material";
|
|
10
|
+
import "../../../utils/types/equipmentType.js";
|
|
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";
|
|
6
7
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
7
8
|
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 "../../../utils/types/equipmentType.js";
|
|
12
11
|
import "@mui/icons-material";
|
|
12
|
+
import "../../../utils/types/equipmentType.js";
|
|
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 "../../../utils/types/equipmentType.js";
|
|
10
9
|
import "@mui/icons-material";
|
|
10
|
+
import "../../../utils/types/equipmentType.js";
|
|
11
11
|
import "../../../utils/yupConfig.js";
|
|
12
12
|
import "react";
|
|
13
13
|
import "react-hook-form";
|
|
@@ -3,9 +3,9 @@ import { CustomMuiDialog } from "../../dialogs/customMuiDialog/CustomMuiDialog.j
|
|
|
3
3
|
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
4
4
|
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
5
5
|
import "../../../utils/conversionUtils.js";
|
|
6
|
+
import "@mui/icons-material";
|
|
6
7
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
7
8
|
import "../../../utils/types/equipmentType.js";
|
|
8
|
-
import "@mui/icons-material";
|
|
9
9
|
import "../../../utils/yupConfig.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import "@mui/material";
|
|
@@ -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 "../../../utils/types/equipmentType.js";
|
|
8
7
|
import "@mui/icons-material";
|
|
8
|
+
import "../../../utils/types/equipmentType.js";
|
|
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";
|
|
6
5
|
import "react/jsx-runtime";
|
|
7
6
|
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";
|
|
5
4
|
import "react/jsx-runtime";
|
|
6
5
|
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";
|
|
5
6
|
import { EquipmentType } from "../utils/types/equipmentType.js";
|
|
6
7
|
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
|
@@ -204,7 +204,7 @@ import { fetchDefaultSecurityAnalysisProvider, fetchSecurityAnalysisParameters,
|
|
|
204
204
|
import { exportFilter, getAvailableComponentLibraries, getStudyNetworkVisualizationsParameters, getStudyShortCircuitParameters, setStudyNetworkVisualizationParameters, updateVoltageInitParameters } from "./services/study.js";
|
|
205
205
|
import { getNetworkVisualizationsParameters } from "./services/study-config.js";
|
|
206
206
|
import { fetchCurrentAnnouncement, fetchUserDetails } from "./services/userAdmin.js";
|
|
207
|
-
import { backendFetch, backendFetchFile, backendFetchJson, backendFetchText,
|
|
207
|
+
import { backendFetch, backendFetchFile, backendFetchJson, backendFetchText, getRequestParamFromList, handleNotOkResponse, parseError } from "./services/utils.js";
|
|
208
208
|
import { getVoltageInitParameters, getVoltageInitUrl } from "./services/voltage-init.js";
|
|
209
209
|
import { fetchShortCircuitParameters, getShortCircuitSpecificParametersDescription, updateShortCircuitParameters } from "./services/short-circuit-analysis.js";
|
|
210
210
|
import { equalsArray } from "./utils/algos.js";
|
|
@@ -223,8 +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 { CustomError
|
|
227
|
-
import { ProblemDetailError } from "./utils/types/ProblemDetailError.js";
|
|
226
|
+
import { CustomError } from "./utils/types/CustomError.js";
|
|
227
|
+
import { ProblemDetailError, formatMessageValues } from "./utils/types/ProblemDetailError.js";
|
|
228
228
|
import { NetworkTimeoutError } from "./utils/types/NetworkTimeoutError.js";
|
|
229
229
|
import { ElementType } from "./utils/types/elementType.js";
|
|
230
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";
|
|
@@ -713,7 +713,6 @@ export {
|
|
|
713
713
|
componentsFr,
|
|
714
714
|
convertInputValue,
|
|
715
715
|
convertOutputValue,
|
|
716
|
-
convertToCustomError,
|
|
717
716
|
copyToClipboard,
|
|
718
717
|
countRules,
|
|
719
718
|
createFilter,
|
|
@@ -815,6 +814,7 @@ export {
|
|
|
815
814
|
getVoltageInitParameters,
|
|
816
815
|
getVoltageInitUrl,
|
|
817
816
|
gridItem,
|
|
817
|
+
handleNotOkResponse,
|
|
818
818
|
handleSigninCallback,
|
|
819
819
|
handleSilentRenewCallback,
|
|
820
820
|
hasElementPermission,
|
|
@@ -852,6 +852,7 @@ export {
|
|
|
852
852
|
onlyStartedGeneratorsOptions,
|
|
853
853
|
parametersEn,
|
|
854
854
|
parametersFr,
|
|
855
|
+
parseError,
|
|
855
856
|
queryValidator,
|
|
856
857
|
recursiveRemove,
|
|
857
858
|
reportViewerEn,
|
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";
|
|
5
4
|
import "react/jsx-runtime";
|
|
6
5
|
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/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { fetchDefaultSecurityAnalysisProvider, fetchSecurityAnalysisParameters,
|
|
|
8
8
|
import { exportFilter, getAvailableComponentLibraries, getStudyNetworkVisualizationsParameters, getStudyShortCircuitParameters, setStudyNetworkVisualizationParameters, updateVoltageInitParameters } from "./study.js";
|
|
9
9
|
import { getNetworkVisualizationsParameters } from "./study-config.js";
|
|
10
10
|
import { fetchCurrentAnnouncement, fetchUserDetails } from "./userAdmin.js";
|
|
11
|
-
import { backendFetch, backendFetchFile, backendFetchJson, backendFetchText,
|
|
11
|
+
import { backendFetch, backendFetchFile, backendFetchJson, backendFetchText, getRequestParamFromList, handleNotOkResponse, parseError } from "./utils.js";
|
|
12
12
|
import { getVoltageInitParameters, getVoltageInitUrl } from "./voltage-init.js";
|
|
13
13
|
import { fetchShortCircuitParameters, getShortCircuitSpecificParametersDescription, updateShortCircuitParameters } from "./short-circuit-analysis.js";
|
|
14
14
|
export {
|
|
@@ -18,7 +18,6 @@ export {
|
|
|
18
18
|
backendFetchFile,
|
|
19
19
|
backendFetchJson,
|
|
20
20
|
backendFetchText,
|
|
21
|
-
convertToCustomError,
|
|
22
21
|
createFilter,
|
|
23
22
|
createParameter,
|
|
24
23
|
elementAlreadyExists,
|
|
@@ -61,8 +60,10 @@ export {
|
|
|
61
60
|
getStudyUrl,
|
|
62
61
|
getVoltageInitParameters,
|
|
63
62
|
getVoltageInitUrl,
|
|
63
|
+
handleNotOkResponse,
|
|
64
64
|
hasElementPermission,
|
|
65
65
|
isStudyMetadata,
|
|
66
|
+
parseError,
|
|
66
67
|
safeEncodeURIComponent,
|
|
67
68
|
saveFilter,
|
|
68
69
|
setLoadFlowParameters,
|
package/dist/services/utils.d.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
|
|
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
|
+
*/
|
|
2
7
|
/** Optional convenience: allow per-call timeout override without crafting a signal manually. */
|
|
3
8
|
type FetchInitWithTimeout = RequestInit & {
|
|
4
9
|
/** If provided and no signal is set, use this as the timeout override (ms). */
|
|
5
10
|
timeoutMs?: number;
|
|
6
11
|
};
|
|
7
|
-
export declare const
|
|
12
|
+
export declare const parseError: (errorTxt: string) => Error;
|
|
13
|
+
export declare const handleNotOkResponse: (response: Response) => Promise<never>;
|
|
8
14
|
export declare const backendFetch: (url: string, init?: FetchInitWithTimeout, token?: string) => Promise<Response>;
|
|
9
15
|
export declare const backendFetchJson: (url: string, init?: FetchInitWithTimeout, token?: string) => Promise<any>;
|
|
10
16
|
export declare function backendFetchText(url: string, init?: FetchInitWithTimeout, token?: string): Promise<string>;
|