@gridsuite/commons-ui 0.105.1 → 0.106.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/dialogs/customMuiDialog/CustomMuiDialog.d.ts +4 -3
- package/dist/components/dialogs/customMuiDialog/CustomMuiDialog.js +3 -1
- package/dist/components/dialogs/descriptionModificationDialog/DescriptionModificationDialog.d.ts +3 -8
- package/dist/components/index.js +33 -0
- package/dist/components/parameters/common/name-element-editor/index.d.ts +8 -0
- package/dist/components/parameters/common/name-element-editor/index.js +7 -0
- package/dist/components/parameters/common/name-element-editor/name-element-editor-form.d.ts +8 -0
- package/dist/components/parameters/common/name-element-editor/name-element-editor-form.js +57 -0
- package/dist/components/parameters/common/name-element-editor/name-element-editor-utils.d.ts +12 -0
- package/dist/components/parameters/common/name-element-editor/name-element-editor-utils.js +48 -0
- package/dist/components/parameters/index.d.ts +1 -0
- package/dist/components/parameters/index.js +33 -0
- package/dist/components/parameters/loadflow/load-flow-parameters-dialog.js +14 -24
- package/dist/components/parameters/loadflow/load-flow-parameters-form.js +1 -1
- package/dist/components/parameters/loadflow/load-flow-parameters-inline.js +1 -1
- package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +4 -3
- package/dist/components/parameters/network-visualizations/constants.d.ts +41 -0
- package/dist/components/parameters/network-visualizations/constants.js +94 -0
- package/dist/components/parameters/network-visualizations/index.d.ts +10 -0
- package/dist/components/parameters/network-visualizations/index.js +35 -0
- package/dist/components/parameters/network-visualizations/map-parameters.d.ts +1 -0
- package/dist/components/parameters/network-visualizations/map-parameters.js +97 -0
- package/dist/components/parameters/network-visualizations/network-area-diagram-parameters.d.ts +1 -0
- package/dist/components/parameters/network-visualizations/network-area-diagram-parameters.js +52 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-form.d.ts +11 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-form.js +102 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-dialog.d.ts +14 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-dialog.js +93 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-inline.d.ts +10 -0
- package/dist/components/parameters/network-visualizations/network-visualizations-parameters-inline.js +125 -0
- package/dist/components/parameters/network-visualizations/network-visualizations.types.d.ts +34 -0
- package/dist/components/parameters/network-visualizations/network-visualizations.types.js +17 -0
- package/dist/components/parameters/network-visualizations/single-line-diagram-parameters.d.ts +10 -0
- package/dist/components/parameters/network-visualizations/single-line-diagram-parameters.js +101 -0
- package/dist/components/parameters/network-visualizations/use-network-visualizations-parameters-form.d.ts +16 -0
- package/dist/components/parameters/network-visualizations/use-network-visualizations-parameters-form.js +151 -0
- package/dist/index.js +48 -1
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.js +15 -1
- package/dist/services/study-config.d.ts +3 -0
- package/dist/services/study-config.js +18 -0
- package/dist/services/study.d.ts +4 -0
- package/dist/services/study.js +24 -2
- package/dist/translations/en/networkModificationsEn.d.ts +1 -0
- package/dist/translations/en/networkModificationsEn.js +1 -0
- package/dist/translations/en/parameters.d.ts +24 -0
- package/dist/translations/en/parameters.js +25 -1
- package/dist/translations/fr/networkModificationsFr.d.ts +1 -0
- package/dist/translations/fr/networkModificationsFr.js +1 -0
- package/dist/translations/fr/parameters.d.ts +24 -0
- package/dist/translations/fr/parameters.js +25 -1
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { UUID } from 'crypto';
|
|
2
|
+
export declare const MAP_BASEMAP_MAPBOX = "mapbox";
|
|
3
|
+
export declare const MAP_BASEMAP_CARTO = "carto";
|
|
4
|
+
export declare const MAP_BASEMAP_CARTO_NOLABEL = "cartonolabel";
|
|
5
|
+
export declare enum SubstationLayout {
|
|
6
|
+
HORIZONTAL = "horizontal",
|
|
7
|
+
VERTICAL = "vertical",
|
|
8
|
+
SMART = "smart",
|
|
9
|
+
SMARTHORIZONTALCOMPACTION = "smartHorizontalCompaction",
|
|
10
|
+
SMARTVERTICALCOMPACTION = "smartVerticalCompaction"
|
|
11
|
+
}
|
|
12
|
+
type MapParameters = {
|
|
13
|
+
lineFullPath: boolean;
|
|
14
|
+
lineParallelPath: boolean;
|
|
15
|
+
lineFlowMode: string;
|
|
16
|
+
mapManualRefresh: boolean;
|
|
17
|
+
mapBaseMap: typeof MAP_BASEMAP_MAPBOX | typeof MAP_BASEMAP_CARTO | typeof MAP_BASEMAP_CARTO_NOLABEL;
|
|
18
|
+
};
|
|
19
|
+
type SingleLineDiagramParameters = {
|
|
20
|
+
diagonalLabel: boolean;
|
|
21
|
+
centerLabel: boolean;
|
|
22
|
+
substationLayout: string;
|
|
23
|
+
componentLibrary: string;
|
|
24
|
+
};
|
|
25
|
+
type NetworkAreaDiagramParameters = {
|
|
26
|
+
initNadWithGeoData: boolean;
|
|
27
|
+
};
|
|
28
|
+
export type NetworkVisualizationParameters = {
|
|
29
|
+
id: UUID;
|
|
30
|
+
mapParameters: MapParameters;
|
|
31
|
+
singleLineDiagramParameters: SingleLineDiagramParameters;
|
|
32
|
+
networkAreaDiagramParameters: NetworkAreaDiagramParameters;
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const MAP_BASEMAP_MAPBOX = "mapbox";
|
|
2
|
+
const MAP_BASEMAP_CARTO = "carto";
|
|
3
|
+
const MAP_BASEMAP_CARTO_NOLABEL = "cartonolabel";
|
|
4
|
+
var SubstationLayout = /* @__PURE__ */ ((SubstationLayout2) => {
|
|
5
|
+
SubstationLayout2["HORIZONTAL"] = "horizontal";
|
|
6
|
+
SubstationLayout2["VERTICAL"] = "vertical";
|
|
7
|
+
SubstationLayout2["SMART"] = "smart";
|
|
8
|
+
SubstationLayout2["SMARTHORIZONTALCOMPACTION"] = "smartHorizontalCompaction";
|
|
9
|
+
SubstationLayout2["SMARTVERTICALCOMPACTION"] = "smartVerticalCompaction";
|
|
10
|
+
return SubstationLayout2;
|
|
11
|
+
})(SubstationLayout || {});
|
|
12
|
+
export {
|
|
13
|
+
MAP_BASEMAP_CARTO,
|
|
14
|
+
MAP_BASEMAP_CARTO_NOLABEL,
|
|
15
|
+
MAP_BASEMAP_MAPBOX,
|
|
16
|
+
SubstationLayout
|
|
17
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022, 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 interface SingleLineDiagramParametersProps {
|
|
8
|
+
componentLibraries: string[];
|
|
9
|
+
}
|
|
10
|
+
export declare function SingleLineDiagramParameters({ componentLibraries }: Readonly<SingleLineDiagramParametersProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Grid } from "@mui/material";
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { FormattedMessage } from "react-intl";
|
|
5
|
+
import { LineSeparator } from "../common/line-separator.js";
|
|
6
|
+
import { parametersStyles } from "../parameters-style.js";
|
|
7
|
+
import "../../../utils/types/equipmentType.js";
|
|
8
|
+
import "localized-countries";
|
|
9
|
+
import "localized-countries/data/fr";
|
|
10
|
+
import "localized-countries/data/en";
|
|
11
|
+
import "notistack";
|
|
12
|
+
import "react-hook-form";
|
|
13
|
+
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
14
|
+
import "../../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
|
|
15
|
+
import "../../dialogs/elementSaveDialog/ElementSaveDialog.js";
|
|
16
|
+
import "@mui/icons-material";
|
|
17
|
+
import "../../treeViewFinder/TreeViewFinder.js";
|
|
18
|
+
import "yup";
|
|
19
|
+
import "../../overflowableText/OverflowableText.js";
|
|
20
|
+
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
21
|
+
import "../../customAGGrid/customAggrid.js";
|
|
22
|
+
import "ag-grid-community";
|
|
23
|
+
import "react-papaparse";
|
|
24
|
+
import "react-csv-downloader";
|
|
25
|
+
import { SwitchInput } from "../../inputs/reactHookForm/booleans/SwitchInput.js";
|
|
26
|
+
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
27
|
+
import { MuiSelectInput } from "../../inputs/reactHookForm/selectInputs/MuiSelectInput.js";
|
|
28
|
+
import "../../../utils/conversionUtils.js";
|
|
29
|
+
import "../../../utils/yupConfig.js";
|
|
30
|
+
import "@react-querybuilder/material";
|
|
31
|
+
import "../../filter/expert/expertFilterConstants.js";
|
|
32
|
+
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
33
|
+
import "uuid";
|
|
34
|
+
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
35
|
+
import "react-querybuilder";
|
|
36
|
+
import "../common/widget/parameter-line-slider.js";
|
|
37
|
+
import "../common/limitreductions/columns-definitions.js";
|
|
38
|
+
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 } from "./constants.js";
|
|
39
|
+
function SingleLineDiagramParameters({ componentLibraries }) {
|
|
40
|
+
var _a, _b;
|
|
41
|
+
const componentLibsRenderCache = useMemo(
|
|
42
|
+
() => Object.fromEntries(componentLibraries.filter(Boolean).map((libLabel) => [libLabel, libLabel])),
|
|
43
|
+
[componentLibraries]
|
|
44
|
+
);
|
|
45
|
+
const substationLayoutOptions = useMemo(() => {
|
|
46
|
+
return INTL_SUBSTATION_LAYOUT_OPTIONS;
|
|
47
|
+
}, []);
|
|
48
|
+
const labelPosition = (name, label) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
49
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 8, sx: parametersStyles.parameterName, children: /* @__PURE__ */ jsx(FormattedMessage, { id: label }) }),
|
|
50
|
+
/* @__PURE__ */ jsx(Grid, { item: true, container: true, xs: 4, sx: parametersStyles.controlItem, children: /* @__PURE__ */ jsx(SwitchInput, { name: `${NetworkVisualizationTabValues.SINGLE_LINE_DIAGRAM}.${name}` }) })
|
|
51
|
+
] });
|
|
52
|
+
const substationLineDropDown = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
53
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 8, sx: parametersStyles.parameterName, children: /* @__PURE__ */ jsx(FormattedMessage, { id: SUBSTATION_LAYOUT }) }),
|
|
54
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 4, sx: parametersStyles.controlItem, children: /* @__PURE__ */ jsx(
|
|
55
|
+
MuiSelectInput,
|
|
56
|
+
{
|
|
57
|
+
fullWidth: true,
|
|
58
|
+
name: `${NetworkVisualizationTabValues.SINGLE_LINE_DIAGRAM}.${PARAM_SUBSTATION_LAYOUT}`,
|
|
59
|
+
size: "small",
|
|
60
|
+
options: (_a = Object.values(substationLayoutOptions)) == null ? void 0 : _a.map((option) => option)
|
|
61
|
+
}
|
|
62
|
+
) })
|
|
63
|
+
] });
|
|
64
|
+
const componentLineDropDown = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
65
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 8, sx: parametersStyles.parameterName, children: /* @__PURE__ */ jsx(FormattedMessage, { id: COMPONENT_LIBRARY }) }),
|
|
66
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 4, sx: parametersStyles.controlItem, children: /* @__PURE__ */ jsx(
|
|
67
|
+
MuiSelectInput,
|
|
68
|
+
{
|
|
69
|
+
fullWidth: true,
|
|
70
|
+
name: `${NetworkVisualizationTabValues.SINGLE_LINE_DIAGRAM}.${PARAM_COMPONENT_LIBRARY}`,
|
|
71
|
+
size: "small",
|
|
72
|
+
options: (_b = Object.values(componentLibsRenderCache)) == null ? void 0 : _b.map((option) => {
|
|
73
|
+
return { id: option, label: option };
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
) })
|
|
77
|
+
] });
|
|
78
|
+
return /* @__PURE__ */ jsxs(
|
|
79
|
+
Grid,
|
|
80
|
+
{
|
|
81
|
+
container: true,
|
|
82
|
+
spacing: 1,
|
|
83
|
+
sx: parametersStyles.scrollableGrid,
|
|
84
|
+
marginTop: -3,
|
|
85
|
+
justifyContent: "space-between",
|
|
86
|
+
children: [
|
|
87
|
+
labelPosition(PARAM_DIAGONAL_LABEL, DIAGONAL_LABEL),
|
|
88
|
+
/* @__PURE__ */ jsx(LineSeparator, {}),
|
|
89
|
+
labelPosition(PARAM_CENTER_LABEL, CENTER_LABEL),
|
|
90
|
+
/* @__PURE__ */ jsx(LineSeparator, {}),
|
|
91
|
+
substationLineDropDown,
|
|
92
|
+
/* @__PURE__ */ jsx(LineSeparator, {}),
|
|
93
|
+
componentLineDropDown
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
"singleLineDiagramParameters"
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
export {
|
|
100
|
+
SingleLineDiagramParameters
|
|
101
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
2
|
+
import { SyntheticEvent } from 'react';
|
|
3
|
+
import { ObjectSchema } from 'yup';
|
|
4
|
+
import { UUID } from 'crypto';
|
|
5
|
+
import { NetworkVisualizationTabValues as TabValues } from './constants';
|
|
6
|
+
import { NetworkVisualizationParameters } from './network-visualizations.types';
|
|
7
|
+
export interface UseNetworkVisualizationParametersFormReturn {
|
|
8
|
+
formMethods: UseFormReturn;
|
|
9
|
+
formSchema: ObjectSchema<any>;
|
|
10
|
+
selectedTab: TabValues;
|
|
11
|
+
handleTabChange: (event: SyntheticEvent, newValue: TabValues) => void;
|
|
12
|
+
paramsLoaded: boolean;
|
|
13
|
+
onSaveInline: (formData: Record<string, any>) => void;
|
|
14
|
+
onSaveDialog: (formData: Record<string, any>) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const useNetworkVisualizationParametersForm: (parametersUuid: UUID | null, studyUuid: UUID | null, parameters: NetworkVisualizationParameters | null, name: string | null, description: string | null) => UseNetworkVisualizationParametersFormReturn;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { useForm } from "react-hook-form";
|
|
2
|
+
import { yupResolver } from "@hookform/resolvers/yup";
|
|
3
|
+
import { useState, useCallback, useMemo, useEffect } from "react";
|
|
4
|
+
import "../../../utils/yupConfig.js";
|
|
5
|
+
import "react/jsx-runtime";
|
|
6
|
+
import "react-intl";
|
|
7
|
+
import "@mui/material";
|
|
8
|
+
import { DESCRIPTION_INPUT, NAME } from "../../inputs/reactHookForm/DirectoryItemsInput.js";
|
|
9
|
+
import "../../inputs/reactHookForm/agGridTable/BottomRightButtons.js";
|
|
10
|
+
import "../../customAGGrid/customAggrid.js";
|
|
11
|
+
import "ag-grid-community";
|
|
12
|
+
import "react-papaparse";
|
|
13
|
+
import "react-csv-downloader";
|
|
14
|
+
import * as yup from "yup";
|
|
15
|
+
import "../../inputs/reactHookForm/provider/CustomFormProvider.js";
|
|
16
|
+
import "@mui/icons-material";
|
|
17
|
+
import "../../inputs/reactHookForm/numbers/RangeInput.js";
|
|
18
|
+
import "localized-countries";
|
|
19
|
+
import "localized-countries/data/fr";
|
|
20
|
+
import "localized-countries/data/en";
|
|
21
|
+
import "../../../utils/conversionUtils.js";
|
|
22
|
+
import { ElementType } from "../../../utils/types/elementType.js";
|
|
23
|
+
import "../../../utils/types/equipmentType.js";
|
|
24
|
+
import { updateParameter } from "../../../services/explore.js";
|
|
25
|
+
import { setStudyNetworkVisualizationParameters } from "../../../services/study.js";
|
|
26
|
+
import { getNetworkVisualizationsParameters } from "../../../services/study-config.js";
|
|
27
|
+
import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
|
|
28
|
+
import "@react-querybuilder/material";
|
|
29
|
+
import "../../filter/expert/expertFilterConstants.js";
|
|
30
|
+
import "../../inputs/reactQueryBuilder/CustomReactQueryBuilder.js";
|
|
31
|
+
import "uuid";
|
|
32
|
+
import "../../inputs/reactQueryBuilder/PropertyValueEditor.js";
|
|
33
|
+
import "react-querybuilder";
|
|
34
|
+
import { NetworkVisualizationTabValues, PARAM_INIT_NAD_WITH_GEO_DATA, PARAM_COMPONENT_LIBRARY, PARAM_SUBSTATION_LAYOUT, PARAM_CENTER_LABEL, PARAM_DIAGONAL_LABEL, PARAM_MAP_BASEMAP, PARAM_MAP_MANUAL_REFRESH, PARAM_LINE_FLOW_MODE, PARAM_LINE_PARALLEL_PATH, PARAM_LINE_FULL_PATH } from "./constants.js";
|
|
35
|
+
import "../../filter/HeaderFilterForm.js";
|
|
36
|
+
import { getNameElementEditorSchema, getNameElementEditorEmptyFormData } from "../common/name-element-editor/name-element-editor-utils.js";
|
|
37
|
+
const useNetworkVisualizationParametersForm = (parametersUuid, studyUuid, parameters, name, description) => {
|
|
38
|
+
const [selectedTab, setSelectedTab] = useState(NetworkVisualizationTabValues.MAP);
|
|
39
|
+
const [paramsLoaded, setParamsLoaded] = useState(false);
|
|
40
|
+
const { snackError } = useSnackMessage();
|
|
41
|
+
const handleTabChange = useCallback((event, newValue) => {
|
|
42
|
+
setSelectedTab(newValue);
|
|
43
|
+
}, []);
|
|
44
|
+
const formSchema = useMemo(() => {
|
|
45
|
+
return yup.object({
|
|
46
|
+
[NetworkVisualizationTabValues.MAP]: yup.object().shape({
|
|
47
|
+
[PARAM_LINE_FULL_PATH]: yup.boolean(),
|
|
48
|
+
[PARAM_LINE_PARALLEL_PATH]: yup.boolean(),
|
|
49
|
+
[PARAM_LINE_FLOW_MODE]: yup.string(),
|
|
50
|
+
[PARAM_MAP_MANUAL_REFRESH]: yup.boolean(),
|
|
51
|
+
[PARAM_MAP_BASEMAP]: yup.string()
|
|
52
|
+
}),
|
|
53
|
+
[NetworkVisualizationTabValues.SINGLE_LINE_DIAGRAM]: yup.object().shape({
|
|
54
|
+
[PARAM_DIAGONAL_LABEL]: yup.boolean(),
|
|
55
|
+
[PARAM_CENTER_LABEL]: yup.boolean(),
|
|
56
|
+
[PARAM_SUBSTATION_LAYOUT]: yup.string(),
|
|
57
|
+
[PARAM_COMPONENT_LIBRARY]: yup.string()
|
|
58
|
+
}),
|
|
59
|
+
[NetworkVisualizationTabValues.NETWORK_AREA_DIAGRAM]: yup.object().shape({
|
|
60
|
+
[PARAM_INIT_NAD_WITH_GEO_DATA]: yup.boolean()
|
|
61
|
+
})
|
|
62
|
+
}).concat(getNameElementEditorSchema(name));
|
|
63
|
+
}, [name]);
|
|
64
|
+
const formMethods = useForm({
|
|
65
|
+
defaultValues: {
|
|
66
|
+
...getNameElementEditorEmptyFormData(name, description),
|
|
67
|
+
[NetworkVisualizationTabValues.MAP]: {
|
|
68
|
+
[PARAM_LINE_FULL_PATH]: false,
|
|
69
|
+
[PARAM_LINE_PARALLEL_PATH]: false,
|
|
70
|
+
[PARAM_LINE_FLOW_MODE]: "",
|
|
71
|
+
[PARAM_MAP_MANUAL_REFRESH]: false,
|
|
72
|
+
[PARAM_MAP_BASEMAP]: ""
|
|
73
|
+
},
|
|
74
|
+
[NetworkVisualizationTabValues.SINGLE_LINE_DIAGRAM]: {
|
|
75
|
+
[PARAM_DIAGONAL_LABEL]: false,
|
|
76
|
+
[PARAM_CENTER_LABEL]: false,
|
|
77
|
+
[PARAM_SUBSTATION_LAYOUT]: "",
|
|
78
|
+
[PARAM_COMPONENT_LIBRARY]: ""
|
|
79
|
+
},
|
|
80
|
+
[NetworkVisualizationTabValues.NETWORK_AREA_DIAGRAM]: {
|
|
81
|
+
[PARAM_INIT_NAD_WITH_GEO_DATA]: false
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
resolver: yupResolver(formSchema)
|
|
85
|
+
});
|
|
86
|
+
const { reset } = formMethods;
|
|
87
|
+
const onSaveInline = useCallback(
|
|
88
|
+
(formData) => {
|
|
89
|
+
if (studyUuid) {
|
|
90
|
+
setStudyNetworkVisualizationParameters(studyUuid, formData).catch((error) => {
|
|
91
|
+
snackError({
|
|
92
|
+
messageTxt: error.message,
|
|
93
|
+
headerId: "updateNetworkVisualizationsParametersError"
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
[snackError, studyUuid]
|
|
99
|
+
);
|
|
100
|
+
const onSaveDialog = useCallback(
|
|
101
|
+
(formData) => {
|
|
102
|
+
if (parametersUuid) {
|
|
103
|
+
updateParameter(
|
|
104
|
+
parametersUuid,
|
|
105
|
+
formData,
|
|
106
|
+
formData[NAME],
|
|
107
|
+
ElementType.NETWORK_VISUALIZATIONS_PARAMETERS,
|
|
108
|
+
formData[DESCRIPTION_INPUT] ?? ""
|
|
109
|
+
).catch((error) => {
|
|
110
|
+
snackError({
|
|
111
|
+
messageTxt: error.message,
|
|
112
|
+
headerId: "updateNetworkVisualizationsParametersError"
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
[parametersUuid, snackError]
|
|
118
|
+
);
|
|
119
|
+
useEffect(() => {
|
|
120
|
+
if (parametersUuid) {
|
|
121
|
+
setParamsLoaded(false);
|
|
122
|
+
getNetworkVisualizationsParameters(parametersUuid).then((params) => {
|
|
123
|
+
reset(params);
|
|
124
|
+
setParamsLoaded(true);
|
|
125
|
+
}).catch((error) => {
|
|
126
|
+
snackError({
|
|
127
|
+
messageTxt: error.message,
|
|
128
|
+
headerId: "getNetworkVisualizationsParametersError"
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}, [parametersUuid, reset, snackError]);
|
|
133
|
+
useEffect(() => {
|
|
134
|
+
if (parameters) {
|
|
135
|
+
reset(parameters);
|
|
136
|
+
setParamsLoaded(true);
|
|
137
|
+
}
|
|
138
|
+
}, [parameters, reset]);
|
|
139
|
+
return {
|
|
140
|
+
formMethods,
|
|
141
|
+
formSchema,
|
|
142
|
+
selectedTab,
|
|
143
|
+
handleTabChange,
|
|
144
|
+
paramsLoaded,
|
|
145
|
+
onSaveInline,
|
|
146
|
+
onSaveDialog
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
export {
|
|
150
|
+
useNetworkVisualizationParametersForm
|
|
151
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -132,6 +132,10 @@ import { toFormValueSaParameters, toFormValuesLimitReductions } from "./componen
|
|
|
132
132
|
import { LimitReductionsTableForm } from "./components/parameters/common/limitreductions/limit-reductions-table-form.js";
|
|
133
133
|
import { LimitReductionTableRow } from "./components/parameters/common/limitreductions/limit-reduction-table-row.js";
|
|
134
134
|
import { LimitReductionTableCell } from "./components/parameters/common/limitreductions/limit-reduction-table-cell.js";
|
|
135
|
+
import { CENTER_LABEL, COMPONENT_LIBRARY, DIAGONAL_LABEL, INIT_NAD_WITH_GEO_DATA, INTL_LINE_FLOW_MODE_OPTIONS, INTL_MAP_BASE_MAP_OPTIONS, INTL_SUBSTATION_LAYOUT_OPTIONS, LINE_FLOW_MODE, LineFlowMode, MAP_BASE_MAP, MAP_MANUAL_REFRESH, NetworkVisualizationTabValues, PARAM_CENTER_LABEL, PARAM_COMPONENT_LIBRARY, PARAM_DIAGONAL_LABEL, PARAM_INIT_NAD_WITH_GEO_DATA, PARAM_LINE_FLOW_MODE, PARAM_LINE_FULL_PATH, PARAM_LINE_PARALLEL_PATH, PARAM_MAP_BASEMAP, PARAM_MAP_MANUAL_REFRESH, PARAM_SUBSTATION_LAYOUT, SUBSTATION_LAYOUT } from "./components/parameters/network-visualizations/constants.js";
|
|
136
|
+
import { MAP_BASEMAP_CARTO, MAP_BASEMAP_CARTO_NOLABEL, MAP_BASEMAP_MAPBOX, SubstationLayout } from "./components/parameters/network-visualizations/network-visualizations.types.js";
|
|
137
|
+
import { NetworkVisualizationParametersInline } from "./components/parameters/network-visualizations/network-visualizations-parameters-inline.js";
|
|
138
|
+
import { NetworkVisualizationsParametersEditionDialog } from "./components/parameters/network-visualizations/network-visualizations-parameters-dialog.js";
|
|
135
139
|
import { getTabIndicatorStyle, getTabStyle, parametersStyles } from "./components/parameters/parameters-style.js";
|
|
136
140
|
import { BALANCE_TYPE, COMMON_PARAMETERS, CONNECTED_COMPONENT_MODE, COUNTRIES_TO_BALANCE, DC, DC_POWER_FACTOR, DC_USE_TRANSFORMER_RATIO, DEFAULT_LIMIT_REDUCTION_VALUE, DISTRIBUTED_SLACK, HVDC_AC_EMULATION, MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION, PARAM_LIMIT_REDUCTION, PARAM_PROVIDER_OPENLOADFLOW, PHASE_SHIFTER_REGULATION_ON, READ_SLACK_BUS, SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON, SPECIFIC_PARAMETERS, TRANSFORMER_VOLTAGE_CONTROL_ON, TWT_SPLIT_SHUNT_ADMITTANCE, USE_REACTIVE_LIMITS, VOLTAGE_INIT_MODE, WRITE_SLACK_BUS, alertThresholdMarks } from "./components/parameters/loadflow/constants.js";
|
|
137
141
|
import { LoadFlowParametersInline } from "./components/parameters/loadflow/load-flow-parameters-inline.js";
|
|
@@ -156,7 +160,9 @@ import { backendFetch, backendFetchJson, backendFetchText, catchErrorHandler, ge
|
|
|
156
160
|
import { createFilter, createParameter, fetchElementsInfos, saveFilter, updateParameter } from "./services/explore.js";
|
|
157
161
|
import { fetchAppsMetadata, fetchDefaultCountry, fetchEnv, fetchFavoriteAndDefaultCountries, fetchStudyMetadata, isStudyMetadata } from "./services/appsMetadata.js";
|
|
158
162
|
import { elementAlreadyExists, fetchDirectoryContent, fetchDirectoryElementPath, fetchRootFolders } from "./services/directory.js";
|
|
159
|
-
import {
|
|
163
|
+
import { PREFIX_STUDY_QUERIES, fetchLoadFlowParameters, getDefaultLoadFlowProvider, getLoadFlowDefaultLimitReductions, getLoadFlowProviders, getLoadFlowSpecificParametersDescription, getLoadFlowUrl, setLoadFlowParameters } from "./services/loadflow.js";
|
|
164
|
+
import { exportFilter, getAvailableComponentLibraries, getStudyNetworkVisualizationsParameters, setStudyNetworkVisualizationParameters } from "./services/study.js";
|
|
165
|
+
import { getNetworkVisualizationsParameters } from "./services/study-config.js";
|
|
160
166
|
import { fetchCurrentAnnouncement, fetchUserDetails } from "./services/userAdmin.js";
|
|
161
167
|
import { equalsArray } from "./utils/algos.js";
|
|
162
168
|
import { FetchStatus } from "./utils/constants/fetchStatus.js";
|
|
@@ -246,9 +252,11 @@ export {
|
|
|
246
252
|
BooleanInput,
|
|
247
253
|
BottomRightButtons,
|
|
248
254
|
BusBar,
|
|
255
|
+
CENTER_LABEL,
|
|
249
256
|
COLUMNS_DEFINITIONS_LIMIT_REDUCTIONS,
|
|
250
257
|
COMBINATOR_OPTIONS,
|
|
251
258
|
COMMON_PARAMETERS,
|
|
259
|
+
COMPONENT_LIBRARY,
|
|
252
260
|
CONNECTED_COMPONENT_MODE,
|
|
253
261
|
CONTINGENCY_LIST_EQUIPMENTS,
|
|
254
262
|
CONVERTERS_MODE_OPTIONS,
|
|
@@ -285,6 +293,7 @@ export {
|
|
|
285
293
|
DEFAULT_RANGE_VALUE,
|
|
286
294
|
DEGREE,
|
|
287
295
|
DESCRIPTION_INPUT,
|
|
296
|
+
DIAGONAL_LABEL,
|
|
288
297
|
DISTRIBUTED_SLACK,
|
|
289
298
|
DISTRIBUTION_KEY,
|
|
290
299
|
DanglingLine,
|
|
@@ -339,6 +348,10 @@ export {
|
|
|
339
348
|
HelperPreviousValue,
|
|
340
349
|
Hvdc,
|
|
341
350
|
HvdcType,
|
|
351
|
+
INIT_NAD_WITH_GEO_DATA,
|
|
352
|
+
INTL_LINE_FLOW_MODE_OPTIONS,
|
|
353
|
+
INTL_MAP_BASE_MAP_OPTIONS,
|
|
354
|
+
INTL_SUBSTATION_LAYOUT_OPTIONS,
|
|
342
355
|
IST_FORM,
|
|
343
356
|
InputWithPopupConfirmation,
|
|
344
357
|
IntegerInput,
|
|
@@ -352,6 +365,7 @@ export {
|
|
|
352
365
|
LIGHT_THEME,
|
|
353
366
|
LIMIT_DURATION_FORM,
|
|
354
367
|
LIMIT_REDUCTIONS_FORM,
|
|
368
|
+
LINE_FLOW_MODE,
|
|
355
369
|
LOAD_TYPE_OPTIONS,
|
|
356
370
|
LOGOUT_ERROR,
|
|
357
371
|
LabelledButton,
|
|
@@ -361,6 +375,7 @@ export {
|
|
|
361
375
|
LimitReductionTableRow,
|
|
362
376
|
LimitReductionsTableForm,
|
|
363
377
|
Line,
|
|
378
|
+
LineFlowMode,
|
|
364
379
|
LineSeparator,
|
|
365
380
|
Load,
|
|
366
381
|
LoadFlowParametersEditionDialog,
|
|
@@ -368,6 +383,11 @@ export {
|
|
|
368
383
|
Login,
|
|
369
384
|
LogoText,
|
|
370
385
|
Logout,
|
|
386
|
+
MAP_BASEMAP_CARTO,
|
|
387
|
+
MAP_BASEMAP_CARTO_NOLABEL,
|
|
388
|
+
MAP_BASEMAP_MAPBOX,
|
|
389
|
+
MAP_BASE_MAP,
|
|
390
|
+
MAP_MANUAL_REFRESH,
|
|
371
391
|
MAX_CHAR_DESCRIPTION,
|
|
372
392
|
MAX_VALUE_ALLOWED_FOR_LIMIT_REDUCTION,
|
|
373
393
|
MEGA_VAR,
|
|
@@ -384,6 +404,9 @@ export {
|
|
|
384
404
|
MultipleSelectionDialog,
|
|
385
405
|
NAME,
|
|
386
406
|
NO_ITEM_SELECTION_FOR_COPY,
|
|
407
|
+
NetworkVisualizationParametersInline,
|
|
408
|
+
NetworkVisualizationTabValues,
|
|
409
|
+
NetworkVisualizationsParametersEditionDialog,
|
|
387
410
|
NotificationsContext,
|
|
388
411
|
NotificationsProvider,
|
|
389
412
|
NotificationsUrlKeys,
|
|
@@ -394,7 +417,16 @@ export {
|
|
|
394
417
|
OperatorType,
|
|
395
418
|
OptionalServicesStatus,
|
|
396
419
|
OverflowableText,
|
|
420
|
+
PARAM_CENTER_LABEL,
|
|
421
|
+
PARAM_COMPONENT_LIBRARY,
|
|
422
|
+
PARAM_DIAGONAL_LABEL,
|
|
423
|
+
PARAM_INIT_NAD_WITH_GEO_DATA,
|
|
397
424
|
PARAM_LIMIT_REDUCTION,
|
|
425
|
+
PARAM_LINE_FLOW_MODE,
|
|
426
|
+
PARAM_LINE_FULL_PATH,
|
|
427
|
+
PARAM_LINE_PARALLEL_PATH,
|
|
428
|
+
PARAM_MAP_BASEMAP,
|
|
429
|
+
PARAM_MAP_MANUAL_REFRESH,
|
|
398
430
|
PARAM_PROVIDER_OPENLOADFLOW,
|
|
399
431
|
PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD,
|
|
400
432
|
PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD,
|
|
@@ -402,12 +434,14 @@ export {
|
|
|
402
434
|
PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD,
|
|
403
435
|
PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD,
|
|
404
436
|
PARAM_SA_PROVIDER,
|
|
437
|
+
PARAM_SUBSTATION_LAYOUT,
|
|
405
438
|
PERCENTAGE,
|
|
406
439
|
PHASE_REGULATION_MODE_OPTIONS,
|
|
407
440
|
PHASE_SHIFTER_REGULATION_ON,
|
|
408
441
|
PREFIX_CONFIG_NOTIFICATION_WS,
|
|
409
442
|
PREFIX_DIRECTORY_NOTIFICATION_WS,
|
|
410
443
|
PREFIX_STUDY_NOTIFICATION_WS,
|
|
444
|
+
PREFIX_STUDY_QUERIES,
|
|
411
445
|
PROVIDER,
|
|
412
446
|
ParameterFloat,
|
|
413
447
|
ParameterGroup,
|
|
@@ -436,6 +470,7 @@ export {
|
|
|
436
470
|
SIEMENS,
|
|
437
471
|
SIGNIN_CALLBACK_ERROR,
|
|
438
472
|
SPECIFIC_PARAMETERS,
|
|
473
|
+
SUBSTATION_LAYOUT,
|
|
439
474
|
SVAR_REGULATION_MODE_OPTIONS,
|
|
440
475
|
SVC,
|
|
441
476
|
SelectClearable,
|
|
@@ -449,6 +484,7 @@ export {
|
|
|
449
484
|
SolverTypeInfos,
|
|
450
485
|
SubmitButton,
|
|
451
486
|
Substation,
|
|
487
|
+
SubstationLayout,
|
|
452
488
|
SwitchInput,
|
|
453
489
|
SwitchWithLabel,
|
|
454
490
|
TAB_INFO,
|
|
@@ -531,6 +567,7 @@ export {
|
|
|
531
567
|
fetchElementsInfos,
|
|
532
568
|
fetchEnv,
|
|
533
569
|
fetchFavoriteAndDefaultCountries,
|
|
570
|
+
fetchLoadFlowParameters,
|
|
534
571
|
fetchRootFolders,
|
|
535
572
|
fetchStudyMetadata,
|
|
536
573
|
fetchUserDetails,
|
|
@@ -543,20 +580,28 @@ export {
|
|
|
543
580
|
formatComputingTypeLabel,
|
|
544
581
|
genHelperError,
|
|
545
582
|
generateTreeViewFinderClass,
|
|
583
|
+
getAvailableComponentLibraries,
|
|
546
584
|
getComputedLanguage,
|
|
547
585
|
getCriteriaBasedFormData,
|
|
548
586
|
getCriteriaBasedSchema,
|
|
587
|
+
getDefaultLoadFlowProvider,
|
|
549
588
|
getEquipmentsInfosForSearchBar,
|
|
550
589
|
getExpertFilterEmptyFormData,
|
|
551
590
|
getExplicitNamingFilterEmptyFormData,
|
|
552
591
|
getFileIcon,
|
|
553
592
|
getLimitReductionsFormSchema,
|
|
593
|
+
getLoadFlowDefaultLimitReductions,
|
|
594
|
+
getLoadFlowProviders,
|
|
595
|
+
getLoadFlowSpecificParametersDescription,
|
|
596
|
+
getLoadFlowUrl,
|
|
597
|
+
getNetworkVisualizationsParameters,
|
|
554
598
|
getNumberOfSiblings,
|
|
555
599
|
getOperators,
|
|
556
600
|
getPreLoginPath,
|
|
557
601
|
getRangeInputSchema,
|
|
558
602
|
getRequestParamFromList,
|
|
559
603
|
getSAParametersFromSchema,
|
|
604
|
+
getStudyNetworkVisualizationsParameters,
|
|
560
605
|
getSystemLanguage,
|
|
561
606
|
getTabIndicatorStyle,
|
|
562
607
|
getTabStyle,
|
|
@@ -608,10 +653,12 @@ export {
|
|
|
608
653
|
saveExplicitNamingFilter,
|
|
609
654
|
saveFilter,
|
|
610
655
|
setCommonStore,
|
|
656
|
+
setLoadFlowParameters,
|
|
611
657
|
setLoggedUser,
|
|
612
658
|
setLogoutError,
|
|
613
659
|
setShowAuthenticationRouterLogin,
|
|
614
660
|
setSignInCallbackError,
|
|
661
|
+
setStudyNetworkVisualizationParameters,
|
|
615
662
|
setUnauthorizedUserInfo,
|
|
616
663
|
setUserValidationError,
|
|
617
664
|
styles,
|
package/dist/services/index.d.ts
CHANGED
package/dist/services/index.js
CHANGED
|
@@ -2,9 +2,12 @@ import { backendFetch, backendFetchJson, backendFetchText, catchErrorHandler, ge
|
|
|
2
2
|
import { createFilter, createParameter, fetchElementsInfos, saveFilter, updateParameter } from "./explore.js";
|
|
3
3
|
import { fetchAppsMetadata, fetchDefaultCountry, fetchEnv, fetchFavoriteAndDefaultCountries, fetchStudyMetadata, isStudyMetadata } from "./appsMetadata.js";
|
|
4
4
|
import { elementAlreadyExists, fetchDirectoryContent, fetchDirectoryElementPath, fetchRootFolders } from "./directory.js";
|
|
5
|
-
import {
|
|
5
|
+
import { PREFIX_STUDY_QUERIES, fetchLoadFlowParameters, getDefaultLoadFlowProvider, getLoadFlowDefaultLimitReductions, getLoadFlowProviders, getLoadFlowSpecificParametersDescription, getLoadFlowUrl, setLoadFlowParameters } from "./loadflow.js";
|
|
6
|
+
import { exportFilter, getAvailableComponentLibraries, getStudyNetworkVisualizationsParameters, setStudyNetworkVisualizationParameters } from "./study.js";
|
|
7
|
+
import { getNetworkVisualizationsParameters } from "./study-config.js";
|
|
6
8
|
import { fetchCurrentAnnouncement, fetchUserDetails } from "./userAdmin.js";
|
|
7
9
|
export {
|
|
10
|
+
PREFIX_STUDY_QUERIES,
|
|
8
11
|
backendFetch,
|
|
9
12
|
backendFetchJson,
|
|
10
13
|
backendFetchText,
|
|
@@ -21,11 +24,22 @@ export {
|
|
|
21
24
|
fetchElementsInfos,
|
|
22
25
|
fetchEnv,
|
|
23
26
|
fetchFavoriteAndDefaultCountries,
|
|
27
|
+
fetchLoadFlowParameters,
|
|
24
28
|
fetchRootFolders,
|
|
25
29
|
fetchStudyMetadata,
|
|
26
30
|
fetchUserDetails,
|
|
31
|
+
getAvailableComponentLibraries,
|
|
32
|
+
getDefaultLoadFlowProvider,
|
|
33
|
+
getLoadFlowDefaultLimitReductions,
|
|
34
|
+
getLoadFlowProviders,
|
|
35
|
+
getLoadFlowSpecificParametersDescription,
|
|
36
|
+
getLoadFlowUrl,
|
|
37
|
+
getNetworkVisualizationsParameters,
|
|
27
38
|
getRequestParamFromList,
|
|
39
|
+
getStudyNetworkVisualizationsParameters,
|
|
28
40
|
isStudyMetadata,
|
|
29
41
|
saveFilter,
|
|
42
|
+
setLoadFlowParameters,
|
|
43
|
+
setStudyNetworkVisualizationParameters,
|
|
30
44
|
updateParameter
|
|
31
45
|
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { UUID } from 'crypto';
|
|
2
|
+
import { NetworkVisualizationParameters } from '../components/parameters/network-visualizations/network-visualizations.types';
|
|
3
|
+
export declare function getNetworkVisualizationsParameters(paramsUuid: UUID): Promise<NetworkVisualizationParameters>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { backendFetchJson } from "./utils.js";
|
|
2
|
+
const PREFIX_STUDY_CONFIG_SERVER_QUERIES = `${"api/gateway"}/study-config`;
|
|
3
|
+
function getNetworkVisualizationsParametersUrl() {
|
|
4
|
+
return `${PREFIX_STUDY_CONFIG_SERVER_QUERIES}/v1/network-visualizations-params`;
|
|
5
|
+
}
|
|
6
|
+
function getNetworkVisualizationsParameters(paramsUuid) {
|
|
7
|
+
console.info("get network visualization parameters");
|
|
8
|
+
const fetchUrl = `${getNetworkVisualizationsParametersUrl()}/${paramsUuid}`;
|
|
9
|
+
return backendFetchJson(fetchUrl, {
|
|
10
|
+
method: "GET",
|
|
11
|
+
headers: {
|
|
12
|
+
"Content-Type": "application/json"
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
getNetworkVisualizationsParameters
|
|
18
|
+
};
|
package/dist/services/study.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import { UUID } from 'crypto';
|
|
2
|
+
import { NetworkVisualizationParameters } from '../components/parameters/network-visualizations/network-visualizations.types';
|
|
2
3
|
export declare function exportFilter(studyUuid: UUID, filterUuid?: UUID, token?: string): Promise<any>;
|
|
4
|
+
export declare function getAvailableComponentLibraries(): Promise<string[]>;
|
|
5
|
+
export declare function getStudyNetworkVisualizationsParameters(studyUuid: UUID): Promise<NetworkVisualizationParameters>;
|
|
6
|
+
export declare function setStudyNetworkVisualizationParameters(studyUuid: UUID, newParams: Record<string, any>): Promise<Response>;
|
package/dist/services/study.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { backendFetchJson } from "./utils.js";
|
|
1
|
+
import { backendFetchJson, backendFetch } from "./utils.js";
|
|
2
2
|
const PREFIX_STUDY_QUERIES = `${"api/gateway"}/study`;
|
|
3
3
|
function exportFilter(studyUuid, filterUuid, token) {
|
|
4
4
|
console.info("get filter export on study root node");
|
|
@@ -11,6 +11,28 @@ function exportFilter(studyUuid, filterUuid, token) {
|
|
|
11
11
|
token
|
|
12
12
|
);
|
|
13
13
|
}
|
|
14
|
+
function getAvailableComponentLibraries() {
|
|
15
|
+
console.info("get available component libraries for diagrams");
|
|
16
|
+
return backendFetchJson(`${PREFIX_STUDY_QUERIES}/v1/svg-component-libraries`);
|
|
17
|
+
}
|
|
18
|
+
function getStudyNetworkVisualizationsParameters(studyUuid) {
|
|
19
|
+
console.info("get study network visualization parameters");
|
|
20
|
+
return backendFetchJson(`${PREFIX_STUDY_QUERIES}/v1/studies/${studyUuid}/network-visualizations/parameters`);
|
|
21
|
+
}
|
|
22
|
+
function setStudyNetworkVisualizationParameters(studyUuid, newParams) {
|
|
23
|
+
console.info("set study network visualization parameters");
|
|
24
|
+
return backendFetch(`${PREFIX_STUDY_QUERIES}/v1/studies/${studyUuid}/network-visualizations/parameters`, {
|
|
25
|
+
method: "POST",
|
|
26
|
+
headers: {
|
|
27
|
+
Accept: "application/json",
|
|
28
|
+
"Content-Type": "application/json"
|
|
29
|
+
},
|
|
30
|
+
body: JSON.stringify(newParams)
|
|
31
|
+
});
|
|
32
|
+
}
|
|
14
33
|
export {
|
|
15
|
-
exportFilter
|
|
34
|
+
exportFilter,
|
|
35
|
+
getAvailableComponentLibraries,
|
|
36
|
+
getStudyNetworkVisualizationsParameters,
|
|
37
|
+
setStudyNetworkVisualizationParameters
|
|
16
38
|
};
|
|
@@ -57,6 +57,7 @@ export declare const networkModificationsEn: {
|
|
|
57
57
|
'network_modifications.tabular.SUBSTATION_MODIFICATION': string;
|
|
58
58
|
'network_modifications.TABULAR_CREATION': string;
|
|
59
59
|
'network_modifications.tabular.GENERATOR_CREATION': string;
|
|
60
|
+
'network_modifications.tabular.SHUNT_COMPENSATOR_CREATION': string;
|
|
60
61
|
'network_modifications.LCC_CREATION': string;
|
|
61
62
|
'network_modifications.LCC_MODIFICATION': string;
|
|
62
63
|
'network_modifications.STATIC_VAR_COMPENSATOR_CREATION': string;
|
|
@@ -51,6 +51,7 @@ const networkModificationsEn = {
|
|
|
51
51
|
"network_modifications.tabular.SUBSTATION_MODIFICATION": "substation modifications",
|
|
52
52
|
"network_modifications.TABULAR_CREATION": "Tabular creation - {computedLabel}",
|
|
53
53
|
"network_modifications.tabular.GENERATOR_CREATION": "generator creations",
|
|
54
|
+
"network_modifications.tabular.SHUNT_COMPENSATOR_CREATION": "linear shunt compensator creations",
|
|
54
55
|
"network_modifications.LCC_CREATION": "Creating HVDC (LCC) {computedLabel}",
|
|
55
56
|
"network_modifications.LCC_MODIFICATION": "Modifying HVDC (LCC) {computedLabel}",
|
|
56
57
|
"network_modifications.STATIC_VAR_COMPENSATOR_CREATION": "Creating static var compensator {computedLabel}",
|