@gridsuite/commons-ui 0.169.0 → 0.171.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/index.js +7 -0
- package/dist/components/inputs/reactHookForm/selectInputs/CountriesInput.js +13 -10
- package/dist/components/network-modifications/common/properties/propertyUtils.d.ts +1 -1
- package/dist/components/network-modifications/common/properties/propertyUtils.js +2 -2
- package/dist/components/network-modifications/index.js +7 -0
- package/dist/components/network-modifications/substation/index.d.ts +1 -0
- package/dist/components/network-modifications/substation/index.js +8 -1
- package/dist/components/network-modifications/substation/modification/SubstationModificationForm.d.ts +6 -0
- package/dist/components/network-modifications/substation/modification/SubstationModificationForm.js +89 -0
- package/dist/components/network-modifications/substation/modification/index.d.ts +9 -0
- package/dist/components/network-modifications/substation/modification/index.js +9 -0
- package/dist/components/network-modifications/substation/modification/substationModification.types.d.ts +17 -0
- package/dist/components/network-modifications/substation/modification/substationModification.types.js +1 -0
- package/dist/components/network-modifications/substation/modification/substationModification.utils.d.ts +24 -0
- package/dist/components/network-modifications/substation/modification/substationModification.utils.js +42 -0
- package/dist/components/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +5 -5
- package/dist/components/parameters/loadflow/load-flow-parameters-dialog.js +8 -15
- package/dist/components/parameters/loadflow/load-flow-parameters-form.js +2 -2
- package/dist/components/parameters/loadflow/load-flow-parameters-inline.js +2 -4
- package/dist/components/parameters/loadflow/use-load-flow-parameters-form.d.ts +2 -3
- package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +33 -43
- package/dist/components/parameters/security-analysis/security-analysis-parameters-dialog.js +7 -9
- package/dist/components/parameters/security-analysis/security-analysis-parameters-form.js +1 -1
- package/dist/components/parameters/security-analysis/security-analysis-parameters-inline.js +2 -3
- package/dist/components/parameters/security-analysis/use-security-analysis-parameters-form.d.ts +1 -3
- package/dist/components/parameters/security-analysis/use-security-analysis-parameters-form.js +13 -11
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-dialog.js +6 -7
- package/dist/components/parameters/sensi/use-sensitivity-analysis-parameters.js +1 -1
- package/dist/components/parameters/short-circuit/short-circuit-parameters-dialog.js +6 -14
- package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.js +1 -1
- package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.d.ts +0 -1
- package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.js +6 -6
- package/dist/hooks/use-parameters-backend.d.ts +2 -3
- package/dist/hooks/use-parameters-backend.js +33 -110
- package/dist/index.js +13 -6
- package/dist/services/index.js +2 -5
- package/dist/services/loadflow.d.ts +0 -1
- package/dist/services/loadflow.js +1 -8
- package/dist/services/security-analysis.d.ts +0 -2
- package/dist/services/security-analysis.js +2 -23
- package/dist/services/sensitivity-analysis.d.ts +0 -1
- package/dist/services/sensitivity-analysis.js +1 -8
- package/dist/translations/en/businessErrorsEn.d.ts +1 -0
- package/dist/translations/en/businessErrorsEn.js +1 -0
- package/dist/translations/en/networkModificationsEn.d.ts +2 -0
- package/dist/translations/en/networkModificationsEn.js +2 -0
- package/dist/translations/en/parameters.d.ts +0 -7
- package/dist/translations/en/parameters.js +0 -7
- package/dist/translations/fr/businessErrorsFr.d.ts +1 -0
- package/dist/translations/fr/businessErrorsFr.js +1 -0
- package/dist/translations/fr/networkModificationsFr.d.ts +2 -0
- package/dist/translations/fr/networkModificationsFr.js +2 -0
- package/dist/translations/fr/parameters.d.ts +0 -8
- package/dist/translations/fr/parameters.js +0 -8
- package/dist/utils/conversionUtils.d.ts +2 -0
- package/dist/utils/conversionUtils.js +6 -0
- package/dist/utils/index.js +4 -1
- package/dist/utils/types/index.d.ts +1 -0
- package/dist/utils/types/index.js +2 -0
- package/dist/utils/types/network-modification-types.d.ts +14 -0
- package/dist/utils/types/network-modification-types.js +8 -0
- package/dist/utils/types/parameters.type.d.ts +16 -13
- package/package.json +1 -1
package/dist/services/index.js
CHANGED
|
@@ -2,9 +2,9 @@ import { fetchAppsMetadata, fetchBaseVoltages, fetchDefaultCountry, fetchEnv, fe
|
|
|
2
2
|
import { fetchConfigParameter, fetchConfigParameters, getAppName, updateConfigParameter } from "./config.js";
|
|
3
3
|
import { PermissionType, elementAlreadyExists, fetchDirectoryContent, fetchDirectoryElementPath, fetchRootFolders, hasElementPermission } from "./directory.js";
|
|
4
4
|
import { createFilter, createParameter, fetchElementsInfos, saveFilter, updateParameter } from "./explore.js";
|
|
5
|
-
import { PREFIX_STUDY_QUERIES, fetchLoadFlowParameters,
|
|
5
|
+
import { PREFIX_STUDY_QUERIES, fetchLoadFlowParameters, getLoadFlowDefaultLimitReductions, getLoadFlowProviders, getLoadFlowSpecificParametersDescription, getLoadFlowUrl, setLoadFlowParameters } from "./loadflow.js";
|
|
6
6
|
import { fetchPccMinParameters, getPccMinStudyParameters, updatePccMinParameters } from "./pcc-min.js";
|
|
7
|
-
import {
|
|
7
|
+
import { fetchSecurityAnalysisParameters, fetchSecurityAnalysisProviders, getSecurityAnalysisDefaultLimitReductions, getSecurityAnalysisParameters, getStudyUrl, setSecurityAnalysisParameters, updateSecurityAnalysisParameters } from "./security-analysis.js";
|
|
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";
|
|
@@ -30,7 +30,6 @@ export {
|
|
|
30
30
|
fetchConfigParameters,
|
|
31
31
|
fetchCurrentAnnouncement,
|
|
32
32
|
fetchDefaultCountry,
|
|
33
|
-
fetchDefaultSecurityAnalysisProvider,
|
|
34
33
|
fetchDirectoryContent,
|
|
35
34
|
fetchDirectoryElementPath,
|
|
36
35
|
fetchDynamicMarginCalculationParameters,
|
|
@@ -49,7 +48,6 @@ export {
|
|
|
49
48
|
fetchUserDetails,
|
|
50
49
|
getAppName,
|
|
51
50
|
getAvailableComponentLibraries,
|
|
52
|
-
getDefaultLoadFlowProvider,
|
|
53
51
|
getLoadFlowDefaultLimitReductions,
|
|
54
52
|
getLoadFlowProviders,
|
|
55
53
|
getLoadFlowSpecificParametersDescription,
|
|
@@ -81,7 +79,6 @@ export {
|
|
|
81
79
|
updateParameter,
|
|
82
80
|
updatePccMinParameters,
|
|
83
81
|
updateSecurityAnalysisParameters,
|
|
84
|
-
updateSecurityAnalysisProvider,
|
|
85
82
|
updateShortCircuitParameters,
|
|
86
83
|
updateVoltageInitParameters
|
|
87
84
|
};
|
|
@@ -4,6 +4,5 @@ export declare function getLoadFlowUrl(): string;
|
|
|
4
4
|
export declare function getLoadFlowProviders(): Promise<any>;
|
|
5
5
|
export declare function getLoadFlowSpecificParametersDescription(): Promise<any>;
|
|
6
6
|
export declare function getLoadFlowDefaultLimitReductions(): Promise<any>;
|
|
7
|
-
export declare function getDefaultLoadFlowProvider(): Promise<string>;
|
|
8
7
|
export declare function fetchLoadFlowParameters(parameterUuid: string): Promise<any>;
|
|
9
8
|
export declare function setLoadFlowParameters(parameterUuid: UUID, newParams: any): Promise<Response>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { backendFetchJson,
|
|
1
|
+
import { backendFetchJson, backendFetch } from "./utils.js";
|
|
2
2
|
const PREFIX_LOADFLOW_SERVER_QUERIES = `${"api/gateway"}/loadflow`;
|
|
3
3
|
const PREFIX_STUDY_QUERIES = `${"api/gateway"}/study`;
|
|
4
4
|
function getLoadFlowUrl() {
|
|
@@ -22,12 +22,6 @@ function getLoadFlowDefaultLimitReductions() {
|
|
|
22
22
|
console.debug(getLoadFlowDefaultLimitReductionsUrl);
|
|
23
23
|
return backendFetchJson(getLoadFlowDefaultLimitReductionsUrl);
|
|
24
24
|
}
|
|
25
|
-
function getDefaultLoadFlowProvider() {
|
|
26
|
-
console.info("get default load flow provier");
|
|
27
|
-
const getDefaultLoadFlowProviderUrl = `${PREFIX_STUDY_QUERIES}/v1/loadflow-default-provider`;
|
|
28
|
-
console.debug(getDefaultLoadFlowProviderUrl);
|
|
29
|
-
return backendFetchText(getDefaultLoadFlowProviderUrl);
|
|
30
|
-
}
|
|
31
25
|
function fetchLoadFlowParameters(parameterUuid) {
|
|
32
26
|
console.info("fetch load flow parameters");
|
|
33
27
|
const url = `${getLoadFlowUrl()}parameters/${encodeURIComponent(parameterUuid)}`;
|
|
@@ -50,7 +44,6 @@ function setLoadFlowParameters(parameterUuid, newParams) {
|
|
|
50
44
|
export {
|
|
51
45
|
PREFIX_STUDY_QUERIES,
|
|
52
46
|
fetchLoadFlowParameters,
|
|
53
|
-
getDefaultLoadFlowProvider,
|
|
54
47
|
getLoadFlowDefaultLimitReductions,
|
|
55
48
|
getLoadFlowProviders,
|
|
56
49
|
getLoadFlowSpecificParametersDescription,
|
|
@@ -3,8 +3,6 @@ export declare const getStudyUrl: (studyUuid: UUID | null) => string;
|
|
|
3
3
|
export declare function fetchSecurityAnalysisProviders(): Promise<any>;
|
|
4
4
|
export declare function fetchSecurityAnalysisParameters(parameterUuid: string): Promise<any>;
|
|
5
5
|
export declare function getSecurityAnalysisDefaultLimitReductions(): Promise<any>;
|
|
6
|
-
export declare function updateSecurityAnalysisProvider(studyUuid: UUID, newProvider: string): Promise<Response>;
|
|
7
|
-
export declare function fetchDefaultSecurityAnalysisProvider(): Promise<string>;
|
|
8
6
|
export declare function getSecurityAnalysisParameters(studyUuid: UUID): Promise<any>;
|
|
9
7
|
export declare function setSecurityAnalysisParameters(studyUuid: UUID, newParams: any): Promise<Response>;
|
|
10
8
|
export declare function updateSecurityAnalysisParameters(parameterUuid: UUID, newParams: any): Promise<Response>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { safeEncodeURIComponent, backendFetchJson, backendFetch
|
|
1
|
+
import { safeEncodeURIComponent, backendFetchJson, backendFetch } from "./utils.js";
|
|
2
2
|
import { PREFIX_STUDY_QUERIES } from "./loadflow.js";
|
|
3
3
|
const PREFIX_SECURITY_ANALYSIS_SERVER_QUERIES = `${"api/gateway"}/security-analysis`;
|
|
4
4
|
const getStudyUrl = (studyUuid) => `${PREFIX_STUDY_QUERIES}/v1/studies/${safeEncodeURIComponent(studyUuid)}`;
|
|
@@ -23,25 +23,6 @@ function getSecurityAnalysisDefaultLimitReductions() {
|
|
|
23
23
|
console.debug(url);
|
|
24
24
|
return backendFetchJson(url);
|
|
25
25
|
}
|
|
26
|
-
function updateSecurityAnalysisProvider(studyUuid, newProvider) {
|
|
27
|
-
console.info("update security analysis provider");
|
|
28
|
-
const url = `${getStudyUrl(studyUuid)}/security-analysis/provider`;
|
|
29
|
-
console.debug(url);
|
|
30
|
-
return backendFetch(url, {
|
|
31
|
-
method: "POST",
|
|
32
|
-
headers: {
|
|
33
|
-
Accept: "application/json",
|
|
34
|
-
"Content-Type": "application/json"
|
|
35
|
-
},
|
|
36
|
-
body: newProvider
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
function fetchDefaultSecurityAnalysisProvider() {
|
|
40
|
-
console.info("fetch default security analysis provider");
|
|
41
|
-
const url = `${PREFIX_STUDY_QUERIES}/v1/security-analysis-default-provider`;
|
|
42
|
-
console.debug(url);
|
|
43
|
-
return backendFetchText(url);
|
|
44
|
-
}
|
|
45
26
|
function getSecurityAnalysisParameters(studyUuid) {
|
|
46
27
|
console.info("get security analysis parameters");
|
|
47
28
|
const url = `${getStudyUrl(studyUuid)}/security-analysis/parameters`;
|
|
@@ -75,13 +56,11 @@ function updateSecurityAnalysisParameters(parameterUuid, newParams) {
|
|
|
75
56
|
});
|
|
76
57
|
}
|
|
77
58
|
export {
|
|
78
|
-
fetchDefaultSecurityAnalysisProvider,
|
|
79
59
|
fetchSecurityAnalysisParameters,
|
|
80
60
|
fetchSecurityAnalysisProviders,
|
|
81
61
|
getSecurityAnalysisDefaultLimitReductions,
|
|
82
62
|
getSecurityAnalysisParameters,
|
|
83
63
|
getStudyUrl,
|
|
84
64
|
setSecurityAnalysisParameters,
|
|
85
|
-
updateSecurityAnalysisParameters
|
|
86
|
-
updateSecurityAnalysisProvider
|
|
65
|
+
updateSecurityAnalysisParameters
|
|
87
66
|
};
|
|
@@ -8,5 +8,4 @@ export declare function getSensitivityAnalysisParameters(studyUuid: UUID): Promi
|
|
|
8
8
|
export declare function fetchSensitivityAnalysisParameters(parameterUuid: string): Promise<any>;
|
|
9
9
|
export declare function setSensitivityAnalysisParameters(studyUuid: UUID | null, newParams: SensitivityAnalysisParametersInfos | null): Promise<Response>;
|
|
10
10
|
export declare function getSensitivityAnalysisFactorsCount(studyUuid: UUID | null, currentNodeUuid: UUID, currentRootNetworkUuid: UUID, newParams: SensitivityAnalysisParametersInfos): Promise<FactorsCount>;
|
|
11
|
-
export declare function fetchDefaultSensitivityAnalysisProvider(): Promise<string>;
|
|
12
11
|
export declare function updateSensitivityAnalysisParameters(parameterUuid: UUID, newParams: any): Promise<Response>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { safeEncodeURIComponent, backendFetchJson, backendFetch
|
|
1
|
+
import { safeEncodeURIComponent, backendFetchJson, backendFetch } from "./utils.js";
|
|
2
2
|
import { PREFIX_STUDY_QUERIES } from "./loadflow.js";
|
|
3
3
|
const GET_PARAMETERS_PREFIX = `${"api/gateway"}/sensitivity-analysis/v1/parameters`;
|
|
4
4
|
const PREFIX_SENSITIVITY_ANALYSIS_SERVER_QUERIES = `${"api/gateway"}/sensitivity-analysis`;
|
|
@@ -52,12 +52,6 @@ function getSensitivityAnalysisFactorsCount(studyUuid, currentNodeUuid, currentR
|
|
|
52
52
|
body: JSON.stringify(newParams)
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
function fetchDefaultSensitivityAnalysisProvider() {
|
|
56
|
-
console.info("fetch default sensitivity analysis provider");
|
|
57
|
-
const url = `${PREFIX_STUDY_QUERIES}/v1/sensitivity-analysis-default-provider`;
|
|
58
|
-
console.debug(url);
|
|
59
|
-
return backendFetchText(url);
|
|
60
|
-
}
|
|
61
55
|
function updateSensitivityAnalysisParameters(parameterUuid, newParams) {
|
|
62
56
|
console.info("set security analysis parameters");
|
|
63
57
|
const setSecurityAnalysisParametersUrl = `${getSensiUrl()}parameters/${parameterUuid}`;
|
|
@@ -72,7 +66,6 @@ function updateSensitivityAnalysisParameters(parameterUuid, newParams) {
|
|
|
72
66
|
});
|
|
73
67
|
}
|
|
74
68
|
export {
|
|
75
|
-
fetchDefaultSensitivityAnalysisProvider,
|
|
76
69
|
fetchSensitivityAnalysisParameters,
|
|
77
70
|
fetchSensitivityAnalysisProviders,
|
|
78
71
|
getSensiUrl,
|
|
@@ -58,6 +58,7 @@ export declare const businessErrorsEn: {
|
|
|
58
58
|
'shortcircuit.busOutOfVoltage': string;
|
|
59
59
|
'shortcircuit.missingExtensionData': string;
|
|
60
60
|
'shortcircuit.inconsistentVoltageLevels': string;
|
|
61
|
+
'securityAnalysis.contingencyListConfigEmpty': string;
|
|
61
62
|
'dynamicMapping.mappingNameNotProvided': string;
|
|
62
63
|
'dynamicSecurityAnalysis.providerNotFound': string;
|
|
63
64
|
'dynamicSecurityAnalysis.contingenciesNotFound': string;
|
|
@@ -52,6 +52,7 @@ const businessErrorsEn = {
|
|
|
52
52
|
"shortcircuit.busOutOfVoltage": "Selected bus is out of voltage.",
|
|
53
53
|
"shortcircuit.missingExtensionData": "Missing short-circuit extension data.",
|
|
54
54
|
"shortcircuit.inconsistentVoltageLevels": "Some voltage levels have wrong isc values. Check out the logs to find which ones.",
|
|
55
|
+
"securityAnalysis.contingencyListConfigEmpty": "The configuration does not contain any contingency.",
|
|
55
56
|
"dynamicMapping.mappingNameNotProvided": "Mapping name not provided",
|
|
56
57
|
"dynamicSecurityAnalysis.providerNotFound": "Dynamic security analysis provider not found.",
|
|
57
58
|
"dynamicSecurityAnalysis.contingenciesNotFound": "No contingencies provided.",
|
|
@@ -68,6 +68,8 @@ export declare const networkModificationsEn: {
|
|
|
68
68
|
ModificationReadError: string;
|
|
69
69
|
CreateSubstation: string;
|
|
70
70
|
SubstationCreationError: string;
|
|
71
|
+
ModifySubstation: string;
|
|
72
|
+
SubstationModificationError: string;
|
|
71
73
|
AdditionalInformation: string;
|
|
72
74
|
AddProperty: string;
|
|
73
75
|
PropertyName: string;
|
|
@@ -74,6 +74,8 @@ const networkModificationsEn = {
|
|
|
74
74
|
ModificationReadError: "An error occurred while fetching the modification",
|
|
75
75
|
CreateSubstation: "Create substation",
|
|
76
76
|
SubstationCreationError: "Error while creating substation",
|
|
77
|
+
ModifySubstation: "Modify substation",
|
|
78
|
+
SubstationModificationError: "Error while modifying substation",
|
|
77
79
|
AdditionalInformation: "Additional information",
|
|
78
80
|
AddProperty: "Add property",
|
|
79
81
|
PropertyName: "Property name",
|
|
@@ -236,19 +236,12 @@ export declare const parametersEn: {
|
|
|
236
236
|
fetchLoadFlowProvidersError: string;
|
|
237
237
|
fetchLoadFlowSpecificParametersError: string;
|
|
238
238
|
updateLoadFlowParametersError: string;
|
|
239
|
-
updateLoadFlowProviderError: string;
|
|
240
|
-
fetchDefaultSecurityAnalysisProviderError: string;
|
|
241
239
|
fetchSecurityAnalysisParametersError: string;
|
|
242
|
-
fetchSecurityAnalysisProviderError: string;
|
|
243
240
|
fetchSecurityAnalysisProvidersError: string;
|
|
244
241
|
updateSecurityAnalysisParametersError: string;
|
|
245
|
-
updateSecurityAnalysisProviderError: string;
|
|
246
|
-
fetchDefaultSensitivityAnalysisProviderError: string;
|
|
247
242
|
fetchSensitivityAnalysisParametersError: string;
|
|
248
|
-
fetchSensitivityAnalysisProviderError: string;
|
|
249
243
|
fetchSensitivityAnalysisProvidersError: string;
|
|
250
244
|
updateSensitivityAnalysisParametersError: string;
|
|
251
|
-
updateSensitivityAnalysisProviderError: string;
|
|
252
245
|
getSensitivityAnalysisFactorsCountError: string;
|
|
253
246
|
resetLoadFlowParametersWarning: string;
|
|
254
247
|
PccMinParametersError: string;
|
|
@@ -232,21 +232,14 @@ const parametersEn = {
|
|
|
232
232
|
fetchLoadFlowProvidersError: "An error occurred while fetching the load flow providers",
|
|
233
233
|
fetchLoadFlowSpecificParametersError: "An error occured when fetching the load flow specific parameters",
|
|
234
234
|
updateLoadFlowParametersError: "An error occurred while updating the load flow parameters",
|
|
235
|
-
updateLoadFlowProviderError: "An error occurred while updating the load flow provider",
|
|
236
235
|
// SecurityAnalysis
|
|
237
|
-
fetchDefaultSecurityAnalysisProviderError: "An error occured when fetching default security analysis provider",
|
|
238
236
|
fetchSecurityAnalysisParametersError: "An error occured when fetching the security analysis parameters",
|
|
239
|
-
fetchSecurityAnalysisProviderError: "An error occured when fetching security analysis provider",
|
|
240
237
|
fetchSecurityAnalysisProvidersError: "An error occured when fetching security analysis provider list",
|
|
241
238
|
updateSecurityAnalysisParametersError: "An error occurred while updating the security analysis parameters",
|
|
242
|
-
updateSecurityAnalysisProviderError: "An error occured when updating security analysis provider",
|
|
243
239
|
// SensitivityAnalysis
|
|
244
|
-
fetchDefaultSensitivityAnalysisProviderError: "An error occured when fetching default sensitivity analysis provider",
|
|
245
240
|
fetchSensitivityAnalysisParametersError: "An error occured when fetching the sensitivity analysis parameters",
|
|
246
|
-
fetchSensitivityAnalysisProviderError: "An error occured when fetching sensitivity analysis provider",
|
|
247
241
|
fetchSensitivityAnalysisProvidersError: "An error occured when fetching sensitivity analysis provider list",
|
|
248
242
|
updateSensitivityAnalysisParametersError: "An error occurred while updating the sensitivity analysis parameters",
|
|
249
|
-
updateSensitivityAnalysisProviderError: "An error occured when updating sensitivity analysis provider",
|
|
250
243
|
getSensitivityAnalysisFactorsCountError: "An error occured while estimating sensitivity analysis computations",
|
|
251
244
|
// Other
|
|
252
245
|
resetLoadFlowParametersWarning: "Impossible to retrieve the load flow parameters defined in the user profile (default values are used)",
|
|
@@ -58,6 +58,7 @@ export declare const businessErrorsFr: {
|
|
|
58
58
|
'shortcircuit.busOutOfVoltage': string;
|
|
59
59
|
'shortcircuit.missingExtensionData': string;
|
|
60
60
|
'shortcircuit.inconsistentVoltageLevels': string;
|
|
61
|
+
'securityAnalysis.contingencyListConfigEmpty': string;
|
|
61
62
|
'dynamicMapping.mappingNameNotProvided': string;
|
|
62
63
|
'dynamicSecurityAnalysis.providerNotFound': string;
|
|
63
64
|
'dynamicSecurityAnalysis.contingenciesNotFound': string;
|
|
@@ -52,6 +52,7 @@ const businessErrorsFr = {
|
|
|
52
52
|
"shortcircuit.busOutOfVoltage": "Bus sélectionné en dehors des limites de tension.",
|
|
53
53
|
"shortcircuit.missingExtensionData": "Données de l'extension court-circuit manquantes.",
|
|
54
54
|
"shortcircuit.inconsistentVoltageLevels": "Des postes ont des données Icc incohérentes. Vérifiez les logs pour déterminer lesquels.",
|
|
55
|
+
"securityAnalysis.contingencyListConfigEmpty": "La configuration ne contient aucun aléas.",
|
|
55
56
|
"dynamicMapping.mappingNameNotProvided": "Nom du mapping non fourni",
|
|
56
57
|
"dynamicSecurityAnalysis.providerNotFound": "Simulateur d'analyse de sécurité dynamique non trouvé.",
|
|
57
58
|
"dynamicSecurityAnalysis.contingenciesNotFound": "Aucun aléa fourni.",
|
|
@@ -68,6 +68,8 @@ export declare const networkModificationsFr: {
|
|
|
68
68
|
ModificationReadError: string;
|
|
69
69
|
CreateSubstation: string;
|
|
70
70
|
SubstationCreationError: string;
|
|
71
|
+
ModifySubstation: string;
|
|
72
|
+
SubstationModificationError: string;
|
|
71
73
|
AdditionalInformation: string;
|
|
72
74
|
AddProperty: string;
|
|
73
75
|
PropertyName: string;
|
|
@@ -74,6 +74,8 @@ const networkModificationsFr = {
|
|
|
74
74
|
ModificationReadError: "Une erreur est survenue lors de la récupération de la modification",
|
|
75
75
|
CreateSubstation: "Créer un site",
|
|
76
76
|
SubstationCreationError: "Erreur lors de la création d'un site'",
|
|
77
|
+
ModifySubstation: "Modifier un site",
|
|
78
|
+
SubstationModificationError: "Erreur lors de la modification d'un site",
|
|
77
79
|
AdditionalInformation: "Informations complémentaires",
|
|
78
80
|
AddProperty: "Ajouter une propriété",
|
|
79
81
|
PropertyName: "Nom de la propriété",
|
|
@@ -231,25 +231,17 @@ export declare const parametersFr: {
|
|
|
231
231
|
loadingComputing: string;
|
|
232
232
|
AddRows: string;
|
|
233
233
|
Optional: string;
|
|
234
|
-
fetchDefaultLoadFlowProviderError: string;
|
|
235
234
|
fetchLoadFlowParametersError: string;
|
|
236
235
|
fetchLoadFlowProviderError: string;
|
|
237
236
|
fetchLoadFlowProvidersError: string;
|
|
238
237
|
fetchLoadFlowSpecificParametersError: string;
|
|
239
238
|
updateLoadFlowParametersError: string;
|
|
240
|
-
updateLoadFlowProviderError: string;
|
|
241
|
-
fetchDefaultSecurityAnalysisProviderError: string;
|
|
242
239
|
fetchSecurityAnalysisParametersError: string;
|
|
243
|
-
fetchSecurityAnalysisProviderError: string;
|
|
244
240
|
fetchSecurityAnalysisProvidersError: string;
|
|
245
241
|
updateSecurityAnalysisParametersError: string;
|
|
246
|
-
updateSecurityAnalysisProviderError: string;
|
|
247
|
-
fetchDefaultSensitivityAnalysisProviderError: string;
|
|
248
242
|
fetchSensitivityAnalysisParametersError: string;
|
|
249
|
-
fetchSensitivityAnalysisProviderError: string;
|
|
250
243
|
fetchSensitivityAnalysisProvidersError: string;
|
|
251
244
|
updateSensitivityAnalysisParametersError: string;
|
|
252
|
-
updateSensitivityAnalysisProviderError: string;
|
|
253
245
|
getSensitivityAnalysisFactorsCountError: string;
|
|
254
246
|
resetLoadFlowParametersWarning: string;
|
|
255
247
|
PccMinParametersError: string;
|
|
@@ -227,27 +227,19 @@ const parametersFr = {
|
|
|
227
227
|
Optional: " (optionnel)",
|
|
228
228
|
// Computed translations used in the snackbars
|
|
229
229
|
// LoadFlow
|
|
230
|
-
fetchDefaultLoadFlowProviderError: "Une erreur est survenue lors de la récupération du fournisseur de calcul de répartition par défaut",
|
|
231
230
|
fetchLoadFlowParametersError: "Une erreur est survenue lors de la récupération des paramètres de calcul de répartition",
|
|
232
231
|
fetchLoadFlowProviderError: "Une erreur est survenue lors de la récupération du fournisseur de calcul de répartition",
|
|
233
232
|
fetchLoadFlowProvidersError: "Une erreur est survenue lors de la récupération des fournisseurs de calcul de répartition",
|
|
234
233
|
fetchLoadFlowSpecificParametersError: "Une erreur est survenue lors de la récupération des paramètres spécifiques de calcul de répartition",
|
|
235
234
|
updateLoadFlowParametersError: "Une erreur est survenue lors de la mise à jour des paramètres de calcul de répartition",
|
|
236
|
-
updateLoadFlowProviderError: "Une erreur est survenue lors de la mise à jour du fournisseur courant de calcul de répartition",
|
|
237
235
|
// SecurityAnalysis
|
|
238
|
-
fetchDefaultSecurityAnalysisProviderError: "Une erreur est survenue lors de la récupération du fournisseur d'analyse de sécurité par défaut",
|
|
239
236
|
fetchSecurityAnalysisParametersError: "Une erreur est survenue lors de la récupération des paramètres de l'analyse de sécurité",
|
|
240
|
-
fetchSecurityAnalysisProviderError: "Une erreur est survenue lors de la récupération du fournisseur courant d'analyse de sécurité",
|
|
241
237
|
fetchSecurityAnalysisProvidersError: "Une erreur est survenue lors de la récupération des fournisseurs d'analyse de sécurité",
|
|
242
238
|
updateSecurityAnalysisParametersError: "Une erreur est survenue lors de la mise a jour des paramètres de l'analyse de sécurité",
|
|
243
|
-
updateSecurityAnalysisProviderError: "Une erreur est survenue lors de la mise a jour du fournisseur courant d'analyse de sécurité",
|
|
244
239
|
// SensitivityAnalysis
|
|
245
|
-
fetchDefaultSensitivityAnalysisProviderError: "Une erreur est survenue lors de la récupération du fournisseur d'analyse de sensibilité par défaut",
|
|
246
240
|
fetchSensitivityAnalysisParametersError: "Une erreur est survenue lors de la récupération des paramètres de l'analyse de sensibilité",
|
|
247
|
-
fetchSensitivityAnalysisProviderError: "Une erreur est survenue lors de la récupération du fournisseur courant d'analyse de sensibilité",
|
|
248
241
|
fetchSensitivityAnalysisProvidersError: "Une erreur est survenue lors de la récupération des fournisseurs d'analyse de sensibilité",
|
|
249
242
|
updateSensitivityAnalysisParametersError: "Une erreur est survenue lors de la mise a jour des paramètres de l'analyse de sensibilité",
|
|
250
|
-
updateSensitivityAnalysisProviderError: "Une erreur est survenue lors de la mise a jour du fournisseur courant d'analyse de sensibilité",
|
|
251
243
|
getSensitivityAnalysisFactorsCountError: "Une erreur est survenue lors de l'estimation du nombre de calculs",
|
|
252
244
|
// Other
|
|
253
245
|
resetLoadFlowParametersWarning: "Impossible de récupérer les paramètres de calcul de répartition définis dans le profil utilisateur (les valeurs par défaut sont appliquées)",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AttributeModification } from './types';
|
|
1
2
|
import { FieldType } from './types/fieldType';
|
|
2
3
|
export declare const GRIDSUITE_DEFAULT_PRECISION: number;
|
|
3
4
|
export declare const roundToPrecision: (num: number, precision: number) => number;
|
|
@@ -9,3 +10,4 @@ export declare function unitToKiloUnit(num: number): number | undefined;
|
|
|
9
10
|
export declare function kiloUnitToUnit(num: number): number | undefined;
|
|
10
11
|
export declare function convertInputValue(field: FieldType, value: any): any;
|
|
11
12
|
export declare function convertOutputValue(field: FieldType, value: any): any;
|
|
13
|
+
export declare function toModificationOperation<T>(value: T): AttributeModification<Exclude<Exclude<T, null>, undefined>> | null;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import "./types/equipmentType.js";
|
|
1
2
|
import { FieldType } from "./types/fieldType.js";
|
|
3
|
+
import { OperationType } from "./types/network-modification-types.js";
|
|
2
4
|
const GRIDSUITE_DEFAULT_PRECISION = 13;
|
|
3
5
|
const roundToPrecision = (num, precision) => Number(num.toPrecision(precision));
|
|
4
6
|
const roundToDefaultPrecision = (num) => roundToPrecision(num, GRIDSUITE_DEFAULT_PRECISION);
|
|
@@ -66,6 +68,9 @@ function convertOutputValue(field, value) {
|
|
|
66
68
|
}
|
|
67
69
|
return value;
|
|
68
70
|
}
|
|
71
|
+
function toModificationOperation(value) {
|
|
72
|
+
return value === 0 || value === false || value ? { value, op: OperationType.SET } : null;
|
|
73
|
+
}
|
|
69
74
|
export {
|
|
70
75
|
GRIDSUITE_DEFAULT_PRECISION,
|
|
71
76
|
convertInputValue,
|
|
@@ -75,6 +80,7 @@ export {
|
|
|
75
80
|
microUnitToUnit,
|
|
76
81
|
roundToDefaultPrecision,
|
|
77
82
|
roundToPrecision,
|
|
83
|
+
toModificationOperation,
|
|
78
84
|
unitToKiloUnit,
|
|
79
85
|
unitToMicroUnit
|
|
80
86
|
};
|
package/dist/utils/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { AMPERE, DEGREE, KILO_AMPERE, KILO_METER, KILO_VOLT, MEGA_VAR, MEGA_VOLT
|
|
|
7
7
|
import { COMMON_APP_NAME, COMMON_CONFIG_PARAMS_NAMES, LAST_SELECTED_DIRECTORY, PARAM_DEVELOPER_MODE, PARAM_LANGUAGE, PARAM_THEME } from "./constants/configConstants.js";
|
|
8
8
|
import { FILTERS, FILTER_ID, FILTER_NAME, ID } from "./constants/filterConstant.js";
|
|
9
9
|
import { DUPLICATED_PROPS_ERROR, YUP_REQUIRED } from "./constants/translationKeys.js";
|
|
10
|
-
import { GRIDSUITE_DEFAULT_PRECISION, convertInputValue, convertOutputValue, isBlankOrEmpty, kiloUnitToUnit, microUnitToUnit, roundToDefaultPrecision, roundToPrecision, unitToKiloUnit, unitToMicroUnit } from "./conversionUtils.js";
|
|
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
12
|
import { areArrayElementsUnique, arraysContainIdenticalStrings, isEmpty, isObjectEmpty, keyGenerator } from "./functions.js";
|
|
13
13
|
import { getEquipmentTypeShortLabel } from "./labelUtils.js";
|
|
@@ -30,6 +30,7 @@ import { ParameterType } from "./types/parameters.type.js";
|
|
|
30
30
|
import { SolverTypeInfos } from "./types/dynamic-simulation.type.js";
|
|
31
31
|
import { DistributionType, SensitivityType } from "./types/sensitivity-analysis.type.js";
|
|
32
32
|
import { CalculationType, LoadModelsRule } from "./types/dynamic-margin-calculation.type.js";
|
|
33
|
+
import { OperationType } from "./types/network-modification-types.js";
|
|
33
34
|
import { getIdOrSelf, notNull, notUndefined, parseIntData, removeNullFields, sanitizeString } from "./ts-utils.js";
|
|
34
35
|
import { toNumber, validateValueIsANumber } from "./validation-functions.js";
|
|
35
36
|
import "./yupConfig.js";
|
|
@@ -95,6 +96,7 @@ export {
|
|
|
95
96
|
OHM,
|
|
96
97
|
OhmAdornment,
|
|
97
98
|
OperatingStatus,
|
|
99
|
+
OperationType,
|
|
98
100
|
PARAM_DEVELOPER_MODE,
|
|
99
101
|
PARAM_LANGUAGE,
|
|
100
102
|
PARAM_THEME,
|
|
@@ -152,6 +154,7 @@ export {
|
|
|
152
154
|
roundToPrecision,
|
|
153
155
|
sanitizeString,
|
|
154
156
|
snackWithFallback,
|
|
157
|
+
toModificationOperation,
|
|
155
158
|
toNestedGlobalSelectors,
|
|
156
159
|
toNumber,
|
|
157
160
|
unitToKiloUnit,
|
|
@@ -11,6 +11,7 @@ import { ParameterType } from "./parameters.type.js";
|
|
|
11
11
|
import { SolverTypeInfos } from "./dynamic-simulation.type.js";
|
|
12
12
|
import { DistributionType, SensitivityType } from "./sensitivity-analysis.type.js";
|
|
13
13
|
import { CalculationType, LoadModelsRule } from "./dynamic-margin-calculation.type.js";
|
|
14
|
+
import { OperationType } from "./network-modification-types.js";
|
|
14
15
|
export {
|
|
15
16
|
ALL_EQUIPMENTS,
|
|
16
17
|
AnnouncementSeverity,
|
|
@@ -37,6 +38,7 @@ export {
|
|
|
37
38
|
ModificationType,
|
|
38
39
|
NetworkTimeoutError,
|
|
39
40
|
OperatingStatus,
|
|
41
|
+
OperationType,
|
|
40
42
|
ParameterType,
|
|
41
43
|
ProblemDetailError,
|
|
42
44
|
SEARCH_EQUIPMENTS,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum OperationType {
|
|
8
|
+
SET = "SET",
|
|
9
|
+
UNSET = "UNSET"
|
|
10
|
+
}
|
|
11
|
+
export type AttributeModification<T> = {
|
|
12
|
+
value?: T;
|
|
13
|
+
op: OperationType;
|
|
14
|
+
};
|
|
@@ -30,16 +30,19 @@ export type SpecificParametersDescription = Record<string, SpecificParameterInfo
|
|
|
30
30
|
export type SpecificParametersValues = Record<string, any>;
|
|
31
31
|
export type SpecificParametersPerProvider = Record<string, SpecificParametersValues>;
|
|
32
32
|
export type ParametersInfos<T extends ComputingType> = T extends ComputingType.SENSITIVITY_ANALYSIS ? SensitivityAnalysisParametersInfos : T extends ComputingType.SECURITY_ANALYSIS ? SAParameters : T extends ComputingType.LOAD_FLOW ? LoadFlowParametersInfos : T extends ComputingType.DYNAMIC_SIMULATION ? DynamicSimulationParametersFetchReturn : T extends ComputingType.DYNAMIC_SECURITY_ANALYSIS ? DynamicSecurityAnalysisParametersFetchReturn : T extends ComputingType.DYNAMIC_MARGIN_CALCULATION ? DynamicMarginCalculationParametersInfos : T extends ComputingType.SHORT_CIRCUIT ? ShortCircuitParametersInfos : Record<string, any>;
|
|
33
|
-
export type
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
(
|
|
37
|
-
(
|
|
38
|
-
() =>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
export type BackendFunctions<T extends ComputingType> = {
|
|
34
|
+
backendFetchProviders?: (() => Promise<string[]>) | null;
|
|
35
|
+
backendFetchParameters: (paramsUuidOrStudyUuid: UUID) => Promise<ParametersInfos<T>>;
|
|
36
|
+
backendUpdateParameters?: (paramsUuidOrStudyUuid: UUID, newParam: ParametersInfos<T> | null) => Promise<any>;
|
|
37
|
+
backendFetchSpecificParametersDescription?: () => Promise<SpecificParametersDescription>;
|
|
38
|
+
backendFetchDefaultLimitReductions?: () => Promise<ILimitReductionsByVoltageLevel[]>;
|
|
39
|
+
};
|
|
40
|
+
export type UseParametersBackendReturnProps<T extends ComputingType> = {
|
|
41
|
+
providers: Record<string, string>;
|
|
42
|
+
params: ParametersInfos<T> | null;
|
|
43
|
+
fetchParameters: (paramsUuidOrStudyUuid: UUID) => void;
|
|
44
|
+
updateParameters: (newParams: ParametersInfos<T>) => void;
|
|
45
|
+
resetParameters: () => void;
|
|
46
|
+
specificParamsDescription: SpecificParametersDescription | null;
|
|
47
|
+
defaultLimitReductions: ILimitReductionsByVoltageLevel[];
|
|
48
|
+
};
|