@gridsuite/commons-ui 0.252.0 → 0.254.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/composite/filter/FilterCreationDialog.js +2 -3
- package/dist/components/composite/filter/expert/ExpertFilterEditionDialog.js +2 -3
- package/dist/components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js +2 -3
- package/dist/features/network-modification-table/use-modifications-drag-and-drop.js +43 -49
- package/dist/features/network-modifications/battery/batteryDialog.type.d.ts +6 -0
- package/dist/features/network-modifications/battery/creation/BatteryCreationForm.d.ts +5 -1
- package/dist/features/network-modifications/battery/creation/BatteryCreationForm.js +19 -3
- package/dist/features/network-modifications/battery/creation/batteryCreation.types.d.ts +5 -0
- package/dist/features/network-modifications/battery/creation/batteryCreation.utils.d.ts +32 -0
- package/dist/features/network-modifications/battery/creation/batteryCreation.utils.js +21 -1
- package/dist/features/network-modifications/common/voltageRegulation/VoltageRegulationForm.d.ts +2 -1
- package/dist/features/network-modifications/common/voltageRegulation/VoltageRegulationForm.js +3 -2
- package/dist/features/parameters/common/limitreductions/limit-reduction-table-cell.js +18 -2
- package/dist/features/parameters/common/limitreductions/limit-reductions-table-form.js +1 -1
- package/dist/features/parameters/common/parameter-field.js +1 -9
- package/dist/features/parameters/common/voltage-level-table/custom-voltage-level-table.d.ts +3 -2
- package/dist/features/parameters/common/voltage-level-table/custom-voltage-level-table.js +47 -29
- package/dist/features/parameters/loadflow/load-flow-parameters-dialog.js +3 -3
- package/dist/features/parameters/network-visualizations/map-parameters.js +1 -12
- package/dist/features/parameters/network-visualizations/network-visualizations-parameters-dialog.js +3 -3
- package/dist/features/parameters/network-visualizations/single-line-diagram-parameters.js +2 -13
- package/dist/features/parameters/parameters-style.d.ts +0 -1
- package/dist/features/parameters/parameters-style.js +0 -1
- package/dist/features/parameters/pcc-min/pcc-min-parameters-dialog.js +3 -3
- package/dist/features/parameters/security-analysis/security-analysis-parameters-dialog.js +3 -3
- package/dist/features/parameters/sensi/sensitivity-analysis-parameters-dialog.js +3 -3
- package/dist/features/parameters/short-circuit/short-circuit-parameters-dialog.js +3 -3
- package/dist/features/parameters/voltage-init/voltage-init-parameters-dialog.js +3 -3
- package/dist/index.js +7 -4
- package/dist/services/index.js +3 -3
- package/dist/services/networkModification.d.ts +9 -17
- package/dist/services/networkModification.js +16 -19
- package/dist/utils/form-utils.d.ts +2 -0
- package/dist/utils/form-utils.js +7 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +4 -1
- package/dist/utils/types/index.js +2 -1
- package/dist/utils/types/types.d.ts +5 -0
- package/dist/utils/types/types.js +7 -1
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ import "../../../utils/conversionUtils.js";
|
|
|
7
7
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
8
8
|
import "../../../utils/types/equipmentType.js";
|
|
9
9
|
import { ComputingType } from "../../../utils/types/computing-type.js";
|
|
10
|
+
import { isDisabledValidationButton } from "../../../utils/form-utils.js";
|
|
10
11
|
import { LANG_ENGLISH } from "../../../utils/langs.js";
|
|
11
12
|
import "@mui/icons-material";
|
|
12
13
|
import { getLoadFlowDefaultLimitReductions, getLoadFlowProviders, fetchLoadFlowParameters, setLoadFlowParameters, getLoadFlowSpecificParametersDescription } from "../../../services/loadflow.js";
|
|
@@ -66,9 +67,8 @@ function LoadFlowParametersEditionDialog({
|
|
|
66
67
|
);
|
|
67
68
|
const loadflowMethods = useLoadFlowParametersForm(parametersBackend, isDeveloperMode, id, name, description);
|
|
68
69
|
const {
|
|
69
|
-
formState: { errors
|
|
70
|
+
formState: { errors }
|
|
70
71
|
} = loadflowMethods.formMethods;
|
|
71
|
-
const disableSave = Object.keys(errors).length > 0 || Object.keys(dirtyFields).length === 0;
|
|
72
72
|
return /* @__PURE__ */ jsx(
|
|
73
73
|
CustomMuiDialog,
|
|
74
74
|
{
|
|
@@ -83,7 +83,7 @@ function LoadFlowParametersEditionDialog({
|
|
|
83
83
|
language
|
|
84
84
|
},
|
|
85
85
|
titleId,
|
|
86
|
-
disabledSave:
|
|
86
|
+
disabledSave: isDisabledValidationButton(errors),
|
|
87
87
|
children: /* @__PURE__ */ jsxs(LoadFlowProvider, { children: [
|
|
88
88
|
/* @__PURE__ */ jsx(Grid2, { container: true, sx: { width: "100%" }, children: /* @__PURE__ */ jsx(
|
|
89
89
|
NameElementEditorForm,
|
|
@@ -3,8 +3,8 @@ import { Grid2 } from "@mui/material";
|
|
|
3
3
|
import { FormattedMessage } from "react-intl";
|
|
4
4
|
import { useState, useEffect } from "react";
|
|
5
5
|
import { MAP_BASE_MAP, NetworkVisualizationTabValues, PARAM_MAP_BASEMAP, PARAM_LINE_FULL_PATH, PARAM_LINE_PARALLEL_PATH, INTL_LINE_FLOW_MODE_OPTIONS, LINE_FLOW_MODE, PARAM_LINE_FLOW_MODE, MAP_MANUAL_REFRESH, PARAM_MAP_MANUAL_REFRESH } from "./constants.js";
|
|
6
|
-
import "@mui/icons-material";
|
|
7
6
|
import { parametersStyles } from "../parameters-style.js";
|
|
7
|
+
import "@mui/icons-material";
|
|
8
8
|
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
9
9
|
import "../../../utils/conversionUtils.js";
|
|
10
10
|
import { snackWithFallback } from "../../../utils/error.js";
|
|
@@ -35,13 +35,6 @@ import "../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
|
35
35
|
import "mui-nested-menu";
|
|
36
36
|
import "react-resizable-panels";
|
|
37
37
|
import "react-papaparse";
|
|
38
|
-
import { LineSeparator } from "../common/line-separator.js";
|
|
39
|
-
import "../common/parameter-layout/parameter-layout-provider.js";
|
|
40
|
-
import "../common/widget/parameter-line-slider.js";
|
|
41
|
-
import "../common/contingency-table/contingency-table.js";
|
|
42
|
-
import "../common/contingency-table/columns-definitions.js";
|
|
43
|
-
import "@hookform/resolvers/yup";
|
|
44
|
-
import "../../../components/composite/filter/HeaderFilterForm.js";
|
|
45
38
|
const fetchMapBaseOption = async () => {
|
|
46
39
|
const studyMetadata = await fetchStudyMetadata();
|
|
47
40
|
return studyMetadata.baseMapOptions;
|
|
@@ -96,13 +89,9 @@ function MapParameters() {
|
|
|
96
89
|
justifyContent: "space-between",
|
|
97
90
|
children: [
|
|
98
91
|
lineSwitch(PARAM_LINE_FULL_PATH, PARAM_LINE_FULL_PATH),
|
|
99
|
-
/* @__PURE__ */ jsx(LineSeparator, {}),
|
|
100
92
|
lineSwitch(PARAM_LINE_PARALLEL_PATH, PARAM_LINE_PARALLEL_PATH),
|
|
101
|
-
/* @__PURE__ */ jsx(LineSeparator, {}),
|
|
102
93
|
lineFlow(PARAM_LINE_FLOW_MODE, LINE_FLOW_MODE, INTL_LINE_FLOW_MODE_OPTIONS),
|
|
103
|
-
/* @__PURE__ */ jsx(LineSeparator, {}),
|
|
104
94
|
lineSwitch(PARAM_MAP_MANUAL_REFRESH, MAP_MANUAL_REFRESH),
|
|
105
|
-
/* @__PURE__ */ jsx(LineSeparator, {}),
|
|
106
95
|
mapBaseMap
|
|
107
96
|
]
|
|
108
97
|
},
|
package/dist/features/parameters/network-visualizations/network-visualizations-parameters-dialog.js
CHANGED
|
@@ -6,6 +6,7 @@ import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
|
6
6
|
import "../../../utils/conversionUtils.js";
|
|
7
7
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
8
8
|
import "../../../utils/types/equipmentType.js";
|
|
9
|
+
import { isDisabledValidationButton } from "../../../utils/form-utils.js";
|
|
9
10
|
import "@mui/icons-material";
|
|
10
11
|
import "react";
|
|
11
12
|
import "react-intl";
|
|
@@ -53,9 +54,8 @@ function NetworkVisualizationsParametersEditionDialog({
|
|
|
53
54
|
parameters: null
|
|
54
55
|
});
|
|
55
56
|
const {
|
|
56
|
-
formState: { errors
|
|
57
|
+
formState: { errors }
|
|
57
58
|
} = networkVisuMethods.formMethods;
|
|
58
|
-
const disableSave = Object.keys(errors).length > 0 || Object.keys(dirtyFields).length === 0;
|
|
59
59
|
return /* @__PURE__ */ jsxs(
|
|
60
60
|
CustomMuiDialog,
|
|
61
61
|
{
|
|
@@ -70,7 +70,7 @@ function NetworkVisualizationsParametersEditionDialog({
|
|
|
70
70
|
language
|
|
71
71
|
},
|
|
72
72
|
titleId,
|
|
73
|
-
disabledSave:
|
|
73
|
+
disabledSave: isDisabledValidationButton(errors),
|
|
74
74
|
PaperProps: {
|
|
75
75
|
sx: {
|
|
76
76
|
height: "65vh"
|
|
@@ -2,8 +2,8 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Grid2 } from "@mui/material";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { FormattedMessage } from "react-intl";
|
|
5
|
+
import { INTL_SUBSTATION_LAYOUT_OPTIONS, SUBSTATION_LAYOUT, NetworkVisualizationTabValues, PARAM_SUBSTATION_LAYOUT, COMPONENT_LIBRARY, PARAM_COMPONENT_LIBRARY, DIAGONAL_LABEL, PARAM_DIAGONAL_LABEL, CENTER_LABEL, PARAM_CENTER_LABEL, CUSTOM_REAL_TIME_STATE_ESTIMATION, PARAM_STATE_ESTIMATION } from "./constants.js";
|
|
5
6
|
import "@mui/icons-material";
|
|
6
|
-
import { parametersStyles } from "../parameters-style.js";
|
|
7
7
|
import "../../../components/ui/overflowableText/OverflowableText.js";
|
|
8
8
|
import "../../../utils/conversionUtils.js";
|
|
9
9
|
import "../../../utils/types/equipmentType.js";
|
|
@@ -32,14 +32,7 @@ import "../../../components/ui/snackbarProvider/SnackbarProvider.js";
|
|
|
32
32
|
import "mui-nested-menu";
|
|
33
33
|
import "react-resizable-panels";
|
|
34
34
|
import "react-papaparse";
|
|
35
|
-
import {
|
|
36
|
-
import "../common/parameter-layout/parameter-layout-provider.js";
|
|
37
|
-
import "../common/widget/parameter-line-slider.js";
|
|
38
|
-
import "../common/contingency-table/contingency-table.js";
|
|
39
|
-
import "../common/contingency-table/columns-definitions.js";
|
|
40
|
-
import "@hookform/resolvers/yup";
|
|
41
|
-
import "../../../components/composite/filter/HeaderFilterForm.js";
|
|
42
|
-
import { INTL_SUBSTATION_LAYOUT_OPTIONS, SUBSTATION_LAYOUT, NetworkVisualizationTabValues, PARAM_SUBSTATION_LAYOUT, COMPONENT_LIBRARY, PARAM_COMPONENT_LIBRARY, DIAGONAL_LABEL, PARAM_DIAGONAL_LABEL, CENTER_LABEL, PARAM_CENTER_LABEL, CUSTOM_REAL_TIME_STATE_ESTIMATION, PARAM_STATE_ESTIMATION } from "./constants.js";
|
|
35
|
+
import { parametersStyles } from "../parameters-style.js";
|
|
43
36
|
function SingleLineDiagramParameters({ componentLibraries }) {
|
|
44
37
|
const componentLibsRenderCache = useMemo(
|
|
45
38
|
() => Object.fromEntries(componentLibraries.filter(Boolean).map((libLabel) => [libLabel, libLabel])),
|
|
@@ -88,13 +81,9 @@ function SingleLineDiagramParameters({ componentLibraries }) {
|
|
|
88
81
|
justifyContent: "space-between",
|
|
89
82
|
children: [
|
|
90
83
|
labelPosition(PARAM_DIAGONAL_LABEL, DIAGONAL_LABEL),
|
|
91
|
-
/* @__PURE__ */ jsx(LineSeparator, {}),
|
|
92
84
|
labelPosition(PARAM_CENTER_LABEL, CENTER_LABEL),
|
|
93
|
-
/* @__PURE__ */ jsx(LineSeparator, {}),
|
|
94
85
|
substationLineDropDown,
|
|
95
|
-
/* @__PURE__ */ jsx(LineSeparator, {}),
|
|
96
86
|
componentLineDropDown,
|
|
97
|
-
/* @__PURE__ */ jsx(LineSeparator, {}),
|
|
98
87
|
labelPosition(PARAM_STATE_ESTIMATION, CUSTOM_REAL_TIME_STATE_ESTIMATION)
|
|
99
88
|
]
|
|
100
89
|
},
|
|
@@ -6,6 +6,7 @@ import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
|
6
6
|
import "../../../utils/conversionUtils.js";
|
|
7
7
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
8
8
|
import "../../../utils/types/equipmentType.js";
|
|
9
|
+
import { isDisabledValidationButton } from "../../../utils/form-utils.js";
|
|
9
10
|
import "@mui/icons-material";
|
|
10
11
|
import "react";
|
|
11
12
|
import "react-intl";
|
|
@@ -52,9 +53,8 @@ function PccMinParametersEditionDialog({
|
|
|
52
53
|
parameters: null
|
|
53
54
|
});
|
|
54
55
|
const {
|
|
55
|
-
formState: { errors
|
|
56
|
+
formState: { errors }
|
|
56
57
|
} = pccMinMethods.formMethods;
|
|
57
|
-
const disableSave = Object.keys(errors).length > 0 || Object.keys(dirtyFields).length === 0;
|
|
58
58
|
return /* @__PURE__ */ jsxs(
|
|
59
59
|
CustomMuiDialog,
|
|
60
60
|
{
|
|
@@ -68,7 +68,7 @@ function PccMinParametersEditionDialog({
|
|
|
68
68
|
language
|
|
69
69
|
},
|
|
70
70
|
titleId,
|
|
71
|
-
disabledSave:
|
|
71
|
+
disabledSave: isDisabledValidationButton(errors),
|
|
72
72
|
PaperProps: {
|
|
73
73
|
sx: {
|
|
74
74
|
height: "90vh"
|
|
@@ -6,6 +6,7 @@ import "../../../utils/conversionUtils.js";
|
|
|
6
6
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
7
7
|
import "../../../utils/types/equipmentType.js";
|
|
8
8
|
import { ComputingType } from "../../../utils/types/computing-type.js";
|
|
9
|
+
import { isDisabledValidationButton } from "../../../utils/form-utils.js";
|
|
9
10
|
import "@mui/icons-material";
|
|
10
11
|
import { getSecurityAnalysisDefaultLimitReductions, fetchSecurityAnalysisProviders, fetchSecurityAnalysisParameters, updateSecurityAnalysisParameters } from "../../../services/security-analysis.js";
|
|
11
12
|
import "localized-countries";
|
|
@@ -62,9 +63,8 @@ function SecurityAnalysisParametersDialog({
|
|
|
62
63
|
);
|
|
63
64
|
const securityAnalysisMethods = useSecurityAnalysisParametersForm(parametersBackend, id, name, description);
|
|
64
65
|
const {
|
|
65
|
-
formState: { errors
|
|
66
|
+
formState: { errors }
|
|
66
67
|
} = securityAnalysisMethods.formMethods;
|
|
67
|
-
const disableSave = Object.keys(errors).length > 0 || Object.keys(dirtyFields).length === 0;
|
|
68
68
|
return /* @__PURE__ */ jsxs(
|
|
69
69
|
CustomMuiDialog,
|
|
70
70
|
{
|
|
@@ -79,7 +79,7 @@ function SecurityAnalysisParametersDialog({
|
|
|
79
79
|
language
|
|
80
80
|
},
|
|
81
81
|
titleId,
|
|
82
|
-
disabledSave:
|
|
82
|
+
disabledSave: isDisabledValidationButton(errors),
|
|
83
83
|
PaperProps: {
|
|
84
84
|
sx: {
|
|
85
85
|
height: "90vh"
|
|
@@ -6,6 +6,7 @@ import "../../../utils/conversionUtils.js";
|
|
|
6
6
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
7
7
|
import "../../../utils/types/equipmentType.js";
|
|
8
8
|
import { ComputingType } from "../../../utils/types/computing-type.js";
|
|
9
|
+
import { isDisabledValidationButton } from "../../../utils/form-utils.js";
|
|
9
10
|
import "@mui/icons-material";
|
|
10
11
|
import { fetchSensitivityAnalysisProviders, fetchSensitivityAnalysisParameters, updateSensitivityAnalysisParameters } from "../../../services/sensitivity-analysis.js";
|
|
11
12
|
import "localized-countries";
|
|
@@ -74,9 +75,8 @@ function SensitivityAnalysisParametersDialog({
|
|
|
74
75
|
isRootNode
|
|
75
76
|
});
|
|
76
77
|
const {
|
|
77
|
-
formState: { errors
|
|
78
|
+
formState: { errors }
|
|
78
79
|
} = sensitivityAnalysisMethods.formMethods;
|
|
79
|
-
const disableSave = Object.keys(errors).length > 0 || Object.keys(dirtyFields).length === 0;
|
|
80
80
|
return /* @__PURE__ */ jsxs(
|
|
81
81
|
CustomMuiDialog,
|
|
82
82
|
{
|
|
@@ -90,7 +90,7 @@ function SensitivityAnalysisParametersDialog({
|
|
|
90
90
|
language
|
|
91
91
|
},
|
|
92
92
|
titleId,
|
|
93
|
-
disabledSave:
|
|
93
|
+
disabledSave: isDisabledValidationButton(errors),
|
|
94
94
|
children: [
|
|
95
95
|
/* @__PURE__ */ jsx(Grid2, { container: true, sx: { width: "100%" }, children: /* @__PURE__ */ jsx(
|
|
96
96
|
NameElementEditorForm,
|
|
@@ -7,6 +7,7 @@ import "../../../utils/conversionUtils.js";
|
|
|
7
7
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
8
8
|
import "../../../utils/types/equipmentType.js";
|
|
9
9
|
import { ComputingType } from "../../../utils/types/computing-type.js";
|
|
10
|
+
import { isDisabledValidationButton } from "../../../utils/form-utils.js";
|
|
10
11
|
import "@mui/icons-material";
|
|
11
12
|
import { fetchShortCircuitParameters, updateShortCircuitParameters, getShortCircuitSpecificParametersDescription } from "../../../services/short-circuit-analysis.js";
|
|
12
13
|
import "react";
|
|
@@ -66,9 +67,8 @@ function ShortCircuitParametersEditionDialog({
|
|
|
66
67
|
description
|
|
67
68
|
});
|
|
68
69
|
const {
|
|
69
|
-
formState: { errors
|
|
70
|
+
formState: { errors }
|
|
70
71
|
} = shortCircuitMethods.formMethods;
|
|
71
|
-
const disableSave = Object.keys(errors).length > 0 || Object.keys(dirtyFields).length === 0;
|
|
72
72
|
return /* @__PURE__ */ jsxs(
|
|
73
73
|
CustomMuiDialog,
|
|
74
74
|
{
|
|
@@ -83,7 +83,7 @@ function ShortCircuitParametersEditionDialog({
|
|
|
83
83
|
language
|
|
84
84
|
},
|
|
85
85
|
titleId,
|
|
86
|
-
disabledSave:
|
|
86
|
+
disabledSave: isDisabledValidationButton(errors),
|
|
87
87
|
maxWidth: "lg",
|
|
88
88
|
children: [
|
|
89
89
|
/* @__PURE__ */ jsx(Grid2, { container: true, sx: { width: "100%" }, children: /* @__PURE__ */ jsx(
|
|
@@ -6,6 +6,7 @@ import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
|
6
6
|
import "../../../utils/conversionUtils.js";
|
|
7
7
|
import { ElementType } from "../../../utils/types/elementType.js";
|
|
8
8
|
import "../../../utils/types/equipmentType.js";
|
|
9
|
+
import { isDisabledValidationButton } from "../../../utils/form-utils.js";
|
|
9
10
|
import "@mui/icons-material";
|
|
10
11
|
import "react";
|
|
11
12
|
import "react-intl";
|
|
@@ -52,9 +53,8 @@ function VoltageInitParametersEditionDialog({
|
|
|
52
53
|
parameters: null
|
|
53
54
|
});
|
|
54
55
|
const {
|
|
55
|
-
formState: { errors
|
|
56
|
+
formState: { errors }
|
|
56
57
|
} = voltageInitMethods.formMethods;
|
|
57
|
-
const disableSave = Object.keys(errors).length > 0 || Object.keys(dirtyFields).length === 0;
|
|
58
58
|
return /* @__PURE__ */ jsxs(
|
|
59
59
|
CustomMuiDialog,
|
|
60
60
|
{
|
|
@@ -69,7 +69,7 @@ function VoltageInitParametersEditionDialog({
|
|
|
69
69
|
removeOptional: true,
|
|
70
70
|
language
|
|
71
71
|
},
|
|
72
|
-
disabledSave:
|
|
72
|
+
disabledSave: isDisabledValidationButton(errors),
|
|
73
73
|
PaperProps: {
|
|
74
74
|
sx: {
|
|
75
75
|
height: "90vh"
|
package/dist/index.js
CHANGED
|
@@ -298,6 +298,7 @@ import { FILTERS, FILTER_ID, FILTER_NAME, ID } from "./utils/constants/filterCon
|
|
|
298
298
|
import { DUPLICATED_PROPS_ERROR, YUP_DEFAULT, YUP_NOT_NULL, YUP_NOT_TYPE_DEFAULT, YUP_NOT_TYPE_NUMBER, YUP_POSITIVE, YUP_REQUIRED } from "./utils/constants/translationKeys.js";
|
|
299
299
|
import { GRIDSUITE_DEFAULT_PRECISION, convertInputValue, convertOutputValue, isBlankOrEmpty, kiloUnitToUnit, microUnitToUnit, roundToDefaultPrecision, roundToPrecision, toModificationOperation, unitToKiloUnit, unitToMicroUnit } from "./utils/conversionUtils.js";
|
|
300
300
|
import { catchErrorHandler, extractErrorMessageDescriptor, snackWithFallback } from "./utils/error.js";
|
|
301
|
+
import { isDisabledValidationButton } from "./utils/form-utils.js";
|
|
301
302
|
import { areArrayElementsUnique, arraysContainIdenticalStrings, getRows, hasNonEmptyRows, isEmpty, isObjectEmpty, keyGenerator } from "./utils/functions.js";
|
|
302
303
|
import { getEquipmentTypeShortLabel } from "./utils/labelUtils.js";
|
|
303
304
|
import { LANG_ENGLISH, LANG_FRENCH, LANG_SYSTEM, getCsvDelimiter } from "./utils/langs.js";
|
|
@@ -312,7 +313,7 @@ import { NetworkTimeoutError } from "./utils/types/NetworkTimeoutError.js";
|
|
|
312
313
|
import { ElementType } from "./utils/types/elementType.js";
|
|
313
314
|
import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, CONNECTION_DIRECTIONS, ENERGY_SOURCES, EQUIPMENTS_WITH_ONE_NOMINAL_VOLTAGE, EQUIPMENTS_WITH_ONE_SUBSTATION, EQUIPMENTS_WITH_THREE_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_SUBSTATIONS, EquipmentType, ExtendedEquipmentType, HvdcType, LOAD_TYPES, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, UNDEFINED_CONNECTION_DIRECTION, UNDEFINED_LOAD_TYPE, VL_TAG_MAX_SIZE, equipmentStyles, getConnectionDirectionLabel, getEnergySourceLabel, getEquipmentsInfosForSearchBar, getLoadTypeLabel } from "./utils/types/equipmentType.js";
|
|
314
315
|
import { Battery, BoundaryLine, BusBar, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel, isInjection } from "./utils/types/equipmentTypes.js";
|
|
315
|
-
import { AnnouncementSeverity, ArrayAction } from "./utils/types/types.js";
|
|
316
|
+
import { AnnouncementSeverity, ArrayAction, ElementStatus } from "./utils/types/types.js";
|
|
316
317
|
import { MODIFICATION_TYPES, ModificationType } from "./utils/types/modificationType.js";
|
|
317
318
|
import { FieldType } from "./utils/types/fieldType.js";
|
|
318
319
|
import { ParameterType } from "./utils/types/parameters.type.js";
|
|
@@ -340,7 +341,7 @@ import { fetchCurrentAnnouncement, fetchUserDetails } from "./services/userAdmin
|
|
|
340
341
|
import { DEFAULT_TIMEOUT_MS, IGNORE_SIGNAL, backendFetch, backendFetchFile, backendFetchJson, backendFetchText, getRequestParamFromList, handleNotOkResponse, parseError, safeEncodeURIComponent } from "./services/utils.js";
|
|
341
342
|
import { getVoltageInitParameters, getVoltageInitUrl } from "./services/voltage-init.js";
|
|
342
343
|
import { fetchShortCircuitParameters, getShortCircuitSpecificParametersDescription, updateShortCircuitParameters } from "./services/short-circuit-analysis.js";
|
|
343
|
-
import {
|
|
344
|
+
import { ModificationContainerType, fetchBusBarSectionsForNewCoupler, fetchNetworkModification, getBaseNetworkModificationUrl, getNetworkModificationsFromComposite, getStudyUrlWithNodeUuid, moveModification, setModificationMetadata, updateModification, updateModificationStatusByRootNetwork, updateNetworkModificationsMetadata } from "./services/networkModification.js";
|
|
344
345
|
import { fetchDynamicSimulationModels } from "./services/dynamic-mapping.js";
|
|
345
346
|
import { fetchDynamicSimulationParameters, fetchDynamicSimulationProviders, updateDynamicSimulationParameters } from "./services/dynamic-simulation.js";
|
|
346
347
|
import { fetchContingencyAndFiltersLists, fetchDynamicSecurityAnalysisProviders } from "./services/dynamic-security-analysis.js";
|
|
@@ -697,6 +698,7 @@ export {
|
|
|
697
698
|
ElementSaveDialog,
|
|
698
699
|
ElementSearchDialog,
|
|
699
700
|
ElementSearchInput,
|
|
701
|
+
ElementStatus,
|
|
700
702
|
ElementType,
|
|
701
703
|
ElementValueEditor,
|
|
702
704
|
EnumInput,
|
|
@@ -864,6 +866,7 @@ export {
|
|
|
864
866
|
MicroSusceptanceAdornment,
|
|
865
867
|
MidFormError,
|
|
866
868
|
ModificationByAssignmentForm,
|
|
869
|
+
ModificationContainerType,
|
|
867
870
|
ModificationRow,
|
|
868
871
|
ModificationType,
|
|
869
872
|
ModifyElementSelection,
|
|
@@ -1165,8 +1168,6 @@ export {
|
|
|
1165
1168
|
cardErrorBoundaryEn,
|
|
1166
1169
|
cardErrorBoundaryFr,
|
|
1167
1170
|
catchErrorHandler,
|
|
1168
|
-
changeCompositeSubModificationOrder,
|
|
1169
|
-
changeNetworkModificationOrder,
|
|
1170
1171
|
commonButtonEn,
|
|
1171
1172
|
commonButtonFr,
|
|
1172
1173
|
componentsEn,
|
|
@@ -1466,6 +1467,7 @@ export {
|
|
|
1466
1467
|
intlPredefinedParametersOptions,
|
|
1467
1468
|
isBlankOrEmpty,
|
|
1468
1469
|
isCompositeModification,
|
|
1470
|
+
isDisabledValidationButton,
|
|
1469
1471
|
isEmpty,
|
|
1470
1472
|
isExploreMetadata,
|
|
1471
1473
|
isFieldRequired,
|
|
@@ -1519,6 +1521,7 @@ export {
|
|
|
1519
1521
|
modificationByAssignmentFormSchema,
|
|
1520
1522
|
modificationByAssignmentFormToDto,
|
|
1521
1523
|
modificationPropertiesSchema,
|
|
1524
|
+
moveModification,
|
|
1522
1525
|
moveSubModificationInTree,
|
|
1523
1526
|
multipleSelectionDialogEn,
|
|
1524
1527
|
multipleSelectionDialogFr,
|
package/dist/services/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { fetchCurrentAnnouncement, fetchUserDetails } from "./userAdmin.js";
|
|
|
12
12
|
import { DEFAULT_TIMEOUT_MS, IGNORE_SIGNAL, backendFetch, backendFetchFile, backendFetchJson, backendFetchText, getRequestParamFromList, handleNotOkResponse, parseError, safeEncodeURIComponent } from "./utils.js";
|
|
13
13
|
import { getVoltageInitParameters, getVoltageInitUrl } from "./voltage-init.js";
|
|
14
14
|
import { fetchShortCircuitParameters, getShortCircuitSpecificParametersDescription, updateShortCircuitParameters } from "./short-circuit-analysis.js";
|
|
15
|
-
import {
|
|
15
|
+
import { ModificationContainerType, fetchBusBarSectionsForNewCoupler, fetchNetworkModification, getBaseNetworkModificationUrl, getNetworkModificationsFromComposite, getStudyUrlWithNodeUuid, moveModification, setModificationMetadata, updateModification, updateModificationStatusByRootNetwork, updateNetworkModificationsMetadata } from "./networkModification.js";
|
|
16
16
|
import { fetchDynamicSimulationModels } from "./dynamic-mapping.js";
|
|
17
17
|
import { fetchDynamicSimulationParameters, fetchDynamicSimulationProviders, updateDynamicSimulationParameters } from "./dynamic-simulation.js";
|
|
18
18
|
import { fetchContingencyAndFiltersLists, fetchDynamicSecurityAnalysisProviders } from "./dynamic-security-analysis.js";
|
|
@@ -20,14 +20,13 @@ import { fetchDynamicMarginCalculationParameters, fetchDynamicMarginCalculationP
|
|
|
20
20
|
export {
|
|
21
21
|
DEFAULT_TIMEOUT_MS,
|
|
22
22
|
IGNORE_SIGNAL,
|
|
23
|
+
ModificationContainerType,
|
|
23
24
|
PREFIX_STUDY_QUERIES,
|
|
24
25
|
PermissionType,
|
|
25
26
|
backendFetch,
|
|
26
27
|
backendFetchFile,
|
|
27
28
|
backendFetchJson,
|
|
28
29
|
backendFetchText,
|
|
29
|
-
changeCompositeSubModificationOrder,
|
|
30
|
-
changeNetworkModificationOrder,
|
|
31
30
|
createFilter,
|
|
32
31
|
createParameter,
|
|
33
32
|
elementAlreadyExists,
|
|
@@ -94,6 +93,7 @@ export {
|
|
|
94
93
|
hasElementPermission,
|
|
95
94
|
isExploreMetadata,
|
|
96
95
|
isStudyMetadata,
|
|
96
|
+
moveModification,
|
|
97
97
|
parseError,
|
|
98
98
|
safeEncodeURIComponent,
|
|
99
99
|
saveFilter,
|
|
@@ -2,6 +2,14 @@ import { UUID } from 'node:crypto';
|
|
|
2
2
|
import { ComposedModificationMetadata, NetworkModificationMetadata } from '../utils';
|
|
3
3
|
export declare const getBaseNetworkModificationUrl: () => string;
|
|
4
4
|
export declare const getStudyUrlWithNodeUuid: (studyUuid: string | null | undefined, nodeUuid: string | undefined) => string;
|
|
5
|
+
export declare enum ModificationContainerType {
|
|
6
|
+
GROUP = "GROUP",
|
|
7
|
+
COMPOSITE = "COMPOSITE"
|
|
8
|
+
}
|
|
9
|
+
export type ModificationContainer = {
|
|
10
|
+
id: UUID | null;
|
|
11
|
+
type: ModificationContainerType | null;
|
|
12
|
+
};
|
|
5
13
|
export declare function fetchNetworkModification(modificationUuid: UUID): Promise<Response>;
|
|
6
14
|
export declare function fetchBusBarSectionsForNewCoupler(voltageLevelId: string, busBarCount: number, sectionCount: number, switchKindList: string[]): Promise<string[]>;
|
|
7
15
|
export declare function updateModification({ modificationUuid, body }: {
|
|
@@ -14,22 +22,6 @@ export declare function updateModification({ modificationUuid, body }: {
|
|
|
14
22
|
*/
|
|
15
23
|
export declare function updateNetworkModificationsMetadata(modificationUuids: UUID[], metadata: Partial<ComposedModificationMetadata>): Promise<Response>;
|
|
16
24
|
export declare function getNetworkModificationsFromComposite(compositeModificationUuids: string[], onlyMetadata?: boolean): Promise<Record<UUID, NetworkModificationMetadata[]>>;
|
|
17
|
-
|
|
18
|
-
* Move a composite sub-modification within or between composites, or between a composite and the group root.
|
|
19
|
-
*
|
|
20
|
-
* The four scenarios are encoded by the nullable sourceCompositeUuid / targetCompositeUuid:
|
|
21
|
-
* - both present → sub-to-sub (same composite = reorder, different = cross-composite move)
|
|
22
|
-
* - source only → extract from composite to root level
|
|
23
|
-
* - target only → embed root-level modification into a composite
|
|
24
|
-
*
|
|
25
|
-
* @param studyUuid
|
|
26
|
-
* @param nodeUuid
|
|
27
|
-
* @param modificationUuid
|
|
28
|
-
* @param sourceCompositeUuid UUID of the composite that currently owns the modification; null if at root
|
|
29
|
-
* @param targetCompositeUuid UUID of the target composite; null to place at root level
|
|
30
|
-
* @param beforeUuid insert before this UUID in the target collection; null to append at end
|
|
31
|
-
*/
|
|
32
|
-
export declare function changeCompositeSubModificationOrder(studyUuid: UUID | null, nodeUuid: UUID | undefined, modificationUuid: UUID, sourceCompositeUuid: UUID | null, targetCompositeUuid: UUID | null, beforeUuid: UUID | null): Promise<Response>;
|
|
33
|
-
export declare function changeNetworkModificationOrder(studyUuid: UUID | null, nodeUuid: UUID | undefined, itemUuid: UUID, beforeUuid: UUID | null): Promise<Response>;
|
|
25
|
+
export declare function moveModification(studyUuid: UUID | null, nodeUuid: UUID | undefined, modificationUuid: UUID, sourceContainer: ModificationContainer, targetContainer: ModificationContainer, beforeUuid: UUID | null): Promise<Response>;
|
|
34
26
|
export declare function setModificationMetadata(studyUuid: UUID | null, nodeUuid: UUID | undefined, modificationUuid: UUID | undefined, metadata: Partial<NetworkModificationMetadata | ComposedModificationMetadata>): Promise<Response>;
|
|
35
27
|
export declare function updateModificationStatusByRootNetwork(studyUuid: UUID, nodeUuid: UUID, rootNetworkUuid: UUID, modificationUuid: UUID, activated: boolean): Promise<Response>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { backendFetchJson, backendFetch, safeEncodeURIComponent, backendFetchText } from "./utils.js";
|
|
2
2
|
import { PREFIX_STUDY_QUERIES } from "./loadflow.js";
|
|
3
3
|
const PREFIX_NETWORK_MODIFICATION_QUERIES = `${"api/gateway"}/network-modification`;
|
|
4
4
|
const getBaseNetworkModificationUrl = () => `${PREFIX_NETWORK_MODIFICATION_QUERIES}/v1`;
|
|
@@ -6,6 +6,11 @@ const getStudyUrlWithNodeUuid = (studyUuid, nodeUuid) => `${PREFIX_STUDY_QUERIES
|
|
|
6
6
|
function getUrl() {
|
|
7
7
|
return `${PREFIX_NETWORK_MODIFICATION_QUERIES}/v1/network-modifications`;
|
|
8
8
|
}
|
|
9
|
+
var ModificationContainerType = /* @__PURE__ */ ((ModificationContainerType2) => {
|
|
10
|
+
ModificationContainerType2["GROUP"] = "GROUP";
|
|
11
|
+
ModificationContainerType2["COMPOSITE"] = "COMPOSITE";
|
|
12
|
+
return ModificationContainerType2;
|
|
13
|
+
})(ModificationContainerType || {});
|
|
9
14
|
function fetchNetworkModification(modificationUuid) {
|
|
10
15
|
const modificationFetchUrl = `${getUrl()}/${safeEncodeURIComponent(modificationUuid)}`;
|
|
11
16
|
console.debug(modificationFetchUrl);
|
|
@@ -58,23 +63,15 @@ function getNetworkModificationsFromComposite(compositeModificationUuids, onlyMe
|
|
|
58
63
|
console.debug(url);
|
|
59
64
|
return backendFetchJson(url);
|
|
60
65
|
}
|
|
61
|
-
function
|
|
62
|
-
console.info(`move
|
|
63
|
-
const
|
|
64
|
-
if (sourceCompositeUuid) params.set("sourceCompositeUuid", sourceCompositeUuid);
|
|
65
|
-
if (targetCompositeUuid) params.set("targetCompositeUuid", targetCompositeUuid);
|
|
66
|
-
if (beforeUuid) params.set("beforeUuid", beforeUuid);
|
|
67
|
-
const paramsStr = params.toString() ? `?${params.toString()}` : ``;
|
|
68
|
-
const url = `${getStudyUrlWithNodeUuid(studyUuid, nodeUuid)}/composite-sub-modification/${modificationUuid}${paramsStr}`;
|
|
66
|
+
function moveModification(studyUuid, nodeUuid, modificationUuid, sourceContainer, targetContainer, beforeUuid) {
|
|
67
|
+
console.info(`move modification ${modificationUuid} in node ${nodeUuid}`);
|
|
68
|
+
const url = `${getStudyUrlWithNodeUuid(studyUuid, nodeUuid)}/network-modification/${modificationUuid}`;
|
|
69
69
|
console.debug(url);
|
|
70
|
-
return backendFetch(url, {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const url = `${getStudyUrlWithNodeUuid(studyUuid, nodeUuid)}/network-modification/${itemUuid}?${beforeParam}`;
|
|
76
|
-
console.debug(url);
|
|
77
|
-
return backendFetch(url, { method: "put" });
|
|
70
|
+
return backendFetch(url, {
|
|
71
|
+
method: "put",
|
|
72
|
+
headers: { "Content-Type": "application/json" },
|
|
73
|
+
body: JSON.stringify({ source: sourceContainer, target: targetContainer, beforeUuid })
|
|
74
|
+
});
|
|
78
75
|
}
|
|
79
76
|
const getStudyUrlWithNodeUuidAndRootNetworkUuid = (studyUuid, nodeUuid, rootNetworkUuid) => `${PREFIX_STUDY_QUERIES}/v1/studies/${safeEncodeURIComponent(studyUuid)}/root-networks/${safeEncodeURIComponent(
|
|
80
77
|
rootNetworkUuid
|
|
@@ -104,13 +101,13 @@ function updateModificationStatusByRootNetwork(studyUuid, nodeUuid, rootNetworkU
|
|
|
104
101
|
return backendFetch(url, { method: "PUT" });
|
|
105
102
|
}
|
|
106
103
|
export {
|
|
107
|
-
|
|
108
|
-
changeNetworkModificationOrder,
|
|
104
|
+
ModificationContainerType,
|
|
109
105
|
fetchBusBarSectionsForNewCoupler,
|
|
110
106
|
fetchNetworkModification,
|
|
111
107
|
getBaseNetworkModificationUrl,
|
|
112
108
|
getNetworkModificationsFromComposite,
|
|
113
109
|
getStudyUrlWithNodeUuid,
|
|
110
|
+
moveModification,
|
|
114
111
|
setModificationMetadata,
|
|
115
112
|
updateModification,
|
|
116
113
|
updateModificationStatusByRootNetwork,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FieldConstants } from "./constants/fieldConstants.js";
|
|
2
|
+
function isDisabledValidationButton(formErrors, fieldName) {
|
|
3
|
+
return Boolean(formErrors[fieldName ?? FieldConstants.NAME] || formErrors.root?.isValidating);
|
|
4
|
+
}
|
|
5
|
+
export {
|
|
6
|
+
isDisabledValidationButton
|
|
7
|
+
};
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import { FILTERS, FILTER_ID, FILTER_NAME, ID } from "./constants/filterConstant.
|
|
|
9
9
|
import { DUPLICATED_PROPS_ERROR, YUP_DEFAULT, YUP_NOT_NULL, YUP_NOT_TYPE_DEFAULT, YUP_NOT_TYPE_NUMBER, YUP_POSITIVE, YUP_REQUIRED } from "./constants/translationKeys.js";
|
|
10
10
|
import { GRIDSUITE_DEFAULT_PRECISION, convertInputValue, convertOutputValue, isBlankOrEmpty, kiloUnitToUnit, microUnitToUnit, roundToDefaultPrecision, roundToPrecision, toModificationOperation, unitToKiloUnit, unitToMicroUnit } from "./conversionUtils.js";
|
|
11
11
|
import { catchErrorHandler, extractErrorMessageDescriptor, snackWithFallback } from "./error.js";
|
|
12
|
+
import { isDisabledValidationButton } from "./form-utils.js";
|
|
12
13
|
import { areArrayElementsUnique, arraysContainIdenticalStrings, getRows, hasNonEmptyRows, isEmpty, isObjectEmpty, keyGenerator } from "./functions.js";
|
|
13
14
|
import { getEquipmentTypeShortLabel } from "./labelUtils.js";
|
|
14
15
|
import { LANG_ENGLISH, LANG_FRENCH, LANG_SYSTEM, getCsvDelimiter } from "./langs.js";
|
|
@@ -23,7 +24,7 @@ import { NetworkTimeoutError } from "./types/NetworkTimeoutError.js";
|
|
|
23
24
|
import { ElementType } from "./types/elementType.js";
|
|
24
25
|
import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, CONNECTION_DIRECTIONS, ENERGY_SOURCES, EQUIPMENTS_WITH_ONE_NOMINAL_VOLTAGE, EQUIPMENTS_WITH_ONE_SUBSTATION, EQUIPMENTS_WITH_THREE_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_SUBSTATIONS, EquipmentType, ExtendedEquipmentType, HvdcType, LOAD_TYPES, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, UNDEFINED_CONNECTION_DIRECTION, UNDEFINED_LOAD_TYPE, VL_TAG_MAX_SIZE, equipmentStyles, getConnectionDirectionLabel, getEnergySourceLabel, getEquipmentsInfosForSearchBar, getLoadTypeLabel } from "./types/equipmentType.js";
|
|
25
26
|
import { Battery, BoundaryLine, BusBar, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel, isInjection } from "./types/equipmentTypes.js";
|
|
26
|
-
import { AnnouncementSeverity, ArrayAction } from "./types/types.js";
|
|
27
|
+
import { AnnouncementSeverity, ArrayAction, ElementStatus } from "./types/types.js";
|
|
27
28
|
import { MODIFICATION_TYPES, ModificationType } from "./types/modificationType.js";
|
|
28
29
|
import { FieldType } from "./types/fieldType.js";
|
|
29
30
|
import { ParameterType } from "./types/parameters.type.js";
|
|
@@ -64,6 +65,7 @@ export {
|
|
|
64
65
|
EQUIPMENTS_WITH_THREE_NOMINAL_VOLTAGES,
|
|
65
66
|
EQUIPMENTS_WITH_TWO_NOMINAL_VOLTAGES,
|
|
66
67
|
EQUIPMENTS_WITH_TWO_SUBSTATIONS,
|
|
68
|
+
ElementStatus,
|
|
67
69
|
ElementType,
|
|
68
70
|
EquipmentType,
|
|
69
71
|
ExtendedEquipmentType,
|
|
@@ -170,6 +172,7 @@ export {
|
|
|
170
172
|
getRows,
|
|
171
173
|
hasNonEmptyRows,
|
|
172
174
|
isBlankOrEmpty,
|
|
175
|
+
isDisabledValidationButton,
|
|
173
176
|
isEmpty,
|
|
174
177
|
isInjection,
|
|
175
178
|
isNonEmptyStringOrArray,
|
|
@@ -4,7 +4,7 @@ import { NetworkTimeoutError } from "./NetworkTimeoutError.js";
|
|
|
4
4
|
import { ElementType } from "./elementType.js";
|
|
5
5
|
import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, CONNECTION_DIRECTIONS, ENERGY_SOURCES, EQUIPMENTS_WITH_ONE_NOMINAL_VOLTAGE, EQUIPMENTS_WITH_ONE_SUBSTATION, EQUIPMENTS_WITH_THREE_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_SUBSTATIONS, EquipmentType, ExtendedEquipmentType, HvdcType, LOAD_TYPES, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, UNDEFINED_CONNECTION_DIRECTION, UNDEFINED_LOAD_TYPE, VL_TAG_MAX_SIZE, equipmentStyles, getConnectionDirectionLabel, getEnergySourceLabel, getEquipmentsInfosForSearchBar, getLoadTypeLabel } from "./equipmentType.js";
|
|
6
6
|
import { Battery, BoundaryLine, BusBar, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel, isInjection } from "./equipmentTypes.js";
|
|
7
|
-
import { AnnouncementSeverity, ArrayAction } from "./types.js";
|
|
7
|
+
import { AnnouncementSeverity, ArrayAction, ElementStatus } from "./types.js";
|
|
8
8
|
import { MODIFICATION_TYPES, ModificationType } from "./modificationType.js";
|
|
9
9
|
import { FieldType } from "./fieldType.js";
|
|
10
10
|
import { ParameterType } from "./parameters.type.js";
|
|
@@ -34,6 +34,7 @@ export {
|
|
|
34
34
|
EQUIPMENTS_WITH_THREE_NOMINAL_VOLTAGES,
|
|
35
35
|
EQUIPMENTS_WITH_TWO_NOMINAL_VOLTAGES,
|
|
36
36
|
EQUIPMENTS_WITH_TWO_SUBSTATIONS,
|
|
37
|
+
ElementStatus,
|
|
37
38
|
ElementType,
|
|
38
39
|
EquipmentType,
|
|
39
40
|
ExtendedEquipmentType,
|
|
@@ -2,6 +2,10 @@ import { UUID } from 'node:crypto';
|
|
|
2
2
|
import { MessageDescriptor, PrimitiveType } from 'react-intl';
|
|
3
3
|
import { ElementType } from './elementType';
|
|
4
4
|
export type Input = string | number;
|
|
5
|
+
export declare enum ElementStatus {
|
|
6
|
+
CREATED = "CREATED",
|
|
7
|
+
DELETING = "DELETING"
|
|
8
|
+
}
|
|
5
9
|
export type ElementAttributes = {
|
|
6
10
|
elementUuid: UUID;
|
|
7
11
|
elementName: string;
|
|
@@ -17,6 +21,7 @@ export type ElementAttributes = {
|
|
|
17
21
|
lastModificationDate: string;
|
|
18
22
|
lastModifiedBy: string;
|
|
19
23
|
lastModifiedByLabel?: string;
|
|
24
|
+
status?: ElementStatus;
|
|
20
25
|
children: ElementAttributes[];
|
|
21
26
|
parentUuid: null | UUID;
|
|
22
27
|
specificMetadata: {
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
var ElementStatus = /* @__PURE__ */ ((ElementStatus2) => {
|
|
2
|
+
ElementStatus2["CREATED"] = "CREATED";
|
|
3
|
+
ElementStatus2["DELETING"] = "DELETING";
|
|
4
|
+
return ElementStatus2;
|
|
5
|
+
})(ElementStatus || {});
|
|
1
6
|
var AnnouncementSeverity = /* @__PURE__ */ ((AnnouncementSeverity2) => {
|
|
2
7
|
AnnouncementSeverity2["INFO"] = "INFO";
|
|
3
8
|
AnnouncementSeverity2["WARN"] = "WARN";
|
|
@@ -10,5 +15,6 @@ var ArrayAction = /* @__PURE__ */ ((ArrayAction2) => {
|
|
|
10
15
|
})(ArrayAction || {});
|
|
11
16
|
export {
|
|
12
17
|
AnnouncementSeverity,
|
|
13
|
-
ArrayAction
|
|
18
|
+
ArrayAction,
|
|
19
|
+
ElementStatus
|
|
14
20
|
};
|