@gridsuite/commons-ui 0.131.0 → 0.133.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/customAGGrid/separatorCellRenderer.d.ts +2 -11
- package/dist/components/customAGGrid/separatorCellRenderer.js +7 -2
- package/dist/components/dnd-table/dnd-table.js +3 -3
- package/dist/components/filter/FilterCreationDialog.js +13 -3
- package/dist/components/filter/expert/ExpertFilterEditionDialog.js +12 -4
- package/dist/components/filter/expert/expertFilterConstants.d.ts +13 -12
- package/dist/components/filter/expert/expertFilterConstants.js +17 -48
- package/dist/components/filter/expert/expertFilterUtils.js +6 -2
- package/dist/components/filter/utils/filterApi.js +14 -6
- package/dist/components/inputs/reactHookForm/DirectoryItemsInput.d.ts +2 -2
- package/dist/components/inputs/reactHookForm/DirectoryItemsInput.js +4 -2
- package/dist/components/inputs/reactHookForm/agGridTable/CustomAgGridTable.js +4 -0
- package/dist/components/parameters/short-circuit/short-circuit-fields.d.ts +2 -1
- package/dist/components/parameters/short-circuit/short-circuit-fields.js +20 -5
- package/dist/components/parameters/short-circuit/short-circuit-parameters-dialog.d.ts +1 -1
- package/dist/components/parameters/short-circuit/short-circuit-parameters-dialog.js +4 -2
- package/dist/components/parameters/short-circuit/short-circuit-parameters-form.d.ts +2 -1
- package/dist/components/parameters/short-circuit/short-circuit-parameters-form.js +3 -2
- package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.d.ts +2 -1
- package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.js +3 -1
- package/dist/index.js +17 -3
- package/dist/services/businessErrorCode.d.ts +11 -0
- package/dist/services/businessErrorCode.js +10 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.js +5 -1
- package/dist/services/utils.d.ts +14 -3
- package/dist/services/utils.js +44 -11
- package/dist/translations/en/businessErrorsEn.d.ts +28 -0
- package/dist/translations/en/businessErrorsEn.js +25 -0
- package/dist/translations/en/equipmentsEn.d.ts +1 -0
- package/dist/translations/en/equipmentsEn.js +2 -1
- package/dist/translations/en/errorsEn.d.ts +9 -0
- package/dist/translations/en/errorsEn.js +6 -0
- package/dist/translations/en/index.d.ts +2 -0
- package/dist/translations/en/index.js +4 -0
- package/dist/translations/fr/businessErrorsFr.d.ts +28 -0
- package/dist/translations/fr/businessErrorsFr.js +25 -0
- package/dist/translations/fr/equipmentsFr.d.ts +1 -0
- package/dist/translations/fr/equipmentsFr.js +2 -1
- package/dist/translations/fr/errorsFr.d.ts +9 -0
- package/dist/translations/fr/errorsFr.js +6 -0
- package/dist/translations/fr/index.d.ts +2 -0
- package/dist/translations/fr/index.js +4 -0
- package/dist/utils/index.js +4 -2
- package/dist/utils/types/equipmentType.d.ts +162 -8
- package/dist/utils/types/equipmentType.js +117 -9
- package/dist/utils/types/index.js +4 -2
- package/dist/utils/types/types.d.ts +4 -0
- package/dist/utils/types/types.js +7 -1
- package/package.json +4 -4
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export declare class CustomError extends Error {
|
|
8
|
+
status: number;
|
|
9
|
+
businessErrorCode?: string;
|
|
10
|
+
constructor(message: string, status: number, businessErrorCode?: string);
|
|
11
|
+
}
|
package/dist/services/index.d.ts
CHANGED
package/dist/services/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { backendFetch, backendFetchJson, backendFetchText, catchErrorHandler, getRequestParamFromList } from "./utils.js";
|
|
1
|
+
import { NetworkTimeoutError, backendFetch, backendFetchFile, backendFetchJson, backendFetchText, catchErrorHandler, getRequestParamFromList } from "./utils.js";
|
|
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, fetchConfigParameter, fetchConfigParameters, fetchDirectoryContent, fetchDirectoryElementPath, fetchRootFolders, getAppName, updateConfigParameter } from "./directory.js";
|
|
@@ -8,9 +8,13 @@ import { getNetworkVisualizationsParameters } from "./study-config.js";
|
|
|
8
8
|
import { fetchCurrentAnnouncement, fetchUserDetails } from "./userAdmin.js";
|
|
9
9
|
import { getVoltageInitParameters, getVoltageInitUrl } from "./voltage-init.js";
|
|
10
10
|
import { fetchDefaultSecurityAnalysisProvider, fetchSecurityAnalysisParameters, fetchSecurityAnalysisProviders, getSecurityAnalysisDefaultLimitReductions, getSecurityAnalysisParameters, getStudyUrl, safeEncodeURIComponent, setSecurityAnalysisParameters, updateSecurityAnalysisParameters, updateSecurityAnalysisProvider } from "./security-analysis.js";
|
|
11
|
+
import { CustomError } from "./businessErrorCode.js";
|
|
11
12
|
export {
|
|
13
|
+
CustomError,
|
|
14
|
+
NetworkTimeoutError,
|
|
12
15
|
PREFIX_STUDY_QUERIES,
|
|
13
16
|
backendFetch,
|
|
17
|
+
backendFetchFile,
|
|
14
18
|
backendFetchJson,
|
|
15
19
|
backendFetchText,
|
|
16
20
|
catchErrorHandler,
|
package/dist/services/utils.d.ts
CHANGED
|
@@ -4,8 +4,19 @@
|
|
|
4
4
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
5
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
/** Optional convenience: allow per-call timeout override without crafting a signal manually. */
|
|
8
|
+
type FetchInitWithTimeout = RequestInit & {
|
|
9
|
+
/** If provided and no signal is set, use this as the timeout override (ms). */
|
|
10
|
+
timeoutMs?: number;
|
|
11
|
+
};
|
|
12
|
+
/** Custom error type thrown when AbortSignal.timeout triggers. */
|
|
13
|
+
export declare class NetworkTimeoutError extends Error {
|
|
14
|
+
constructor(messageKey?: string);
|
|
15
|
+
}
|
|
16
|
+
export declare const backendFetch: (url: string, init?: FetchInitWithTimeout, token?: string) => Promise<Response>;
|
|
17
|
+
export declare const backendFetchJson: (url: string, init?: FetchInitWithTimeout, token?: string) => Promise<any>;
|
|
18
|
+
export declare function backendFetchText(url: string, init?: FetchInitWithTimeout, token?: string): Promise<string>;
|
|
19
|
+
export declare const backendFetchFile: (url: string, init: RequestInit, token?: string) => Promise<Blob>;
|
|
10
20
|
export declare const getRequestParamFromList: (paramName: string, params?: string[]) => URLSearchParams;
|
|
11
21
|
export declare const catchErrorHandler: (error: unknown, callback: (message: string) => void) => void;
|
|
22
|
+
export {};
|
package/dist/services/utils.js
CHANGED
|
@@ -1,40 +1,67 @@
|
|
|
1
1
|
import { getUserToken } from "../redux/commonStore.js";
|
|
2
|
+
import { CustomError } from "./businessErrorCode.js";
|
|
3
|
+
const DEFAULT_TIMEOUT_MS = 5e4;
|
|
4
|
+
class NetworkTimeoutError extends Error {
|
|
5
|
+
constructor(messageKey = "errors.network.timeout") {
|
|
6
|
+
super(messageKey);
|
|
7
|
+
this.name = "NetworkTimeoutError";
|
|
8
|
+
}
|
|
9
|
+
}
|
|
2
10
|
const parseError = (text) => {
|
|
3
11
|
try {
|
|
4
12
|
return JSON.parse(text);
|
|
5
|
-
} catch
|
|
13
|
+
} catch {
|
|
6
14
|
return null;
|
|
7
15
|
}
|
|
8
16
|
};
|
|
17
|
+
const ensureSignal = (init) => {
|
|
18
|
+
if (init == null ? void 0 : init.signal) return init;
|
|
19
|
+
const timeoutMs = typeof (init == null ? void 0 : init.timeoutMs) === "number" ? init.timeoutMs : DEFAULT_TIMEOUT_MS;
|
|
20
|
+
return {
|
|
21
|
+
...init,
|
|
22
|
+
signal: AbortSignal.timeout(timeoutMs)
|
|
23
|
+
};
|
|
24
|
+
};
|
|
9
25
|
const prepareRequest = (init, token) => {
|
|
10
26
|
if (!(typeof init === "undefined" || typeof init === "object")) {
|
|
11
27
|
throw new TypeError(`First argument of prepareRequest is not an object : ${typeof init}`);
|
|
12
28
|
}
|
|
13
|
-
const
|
|
14
|
-
|
|
29
|
+
const initWithSignal = ensureSignal(init);
|
|
30
|
+
initWithSignal.headers = new Headers(initWithSignal.headers || {});
|
|
15
31
|
const tokenCopy = token ?? getUserToken();
|
|
16
|
-
|
|
17
|
-
return
|
|
32
|
+
initWithSignal.headers.append("Authorization", `Bearer ${tokenCopy}`);
|
|
33
|
+
return initWithSignal;
|
|
18
34
|
};
|
|
19
35
|
const handleError = (response) => {
|
|
20
36
|
return response.text().then((text) => {
|
|
21
37
|
const errorName = "HttpResponseError : ";
|
|
22
38
|
const errorJson = parseError(text);
|
|
23
39
|
let customError;
|
|
40
|
+
if ((errorJson == null ? void 0 : errorJson.businessErrorCode) != null) {
|
|
41
|
+
throw new CustomError(errorJson.message, errorJson.status, errorJson.businessErrorCode);
|
|
42
|
+
}
|
|
24
43
|
if (errorJson && errorJson.status && errorJson.error && errorJson.message) {
|
|
25
|
-
customError = new
|
|
26
|
-
`${errorName + errorJson.status} ${errorJson.error}, message : ${errorJson.message}
|
|
44
|
+
customError = new CustomError(
|
|
45
|
+
`${errorName + errorJson.status} ${errorJson.error}, message : ${errorJson.message}`,
|
|
46
|
+
errorJson.status
|
|
27
47
|
);
|
|
28
|
-
customError.status = errorJson.status;
|
|
29
48
|
} else {
|
|
30
|
-
customError = new
|
|
31
|
-
|
|
49
|
+
customError = new CustomError(
|
|
50
|
+
`${errorName + response.status} ${response.statusText}, message : ${text}`,
|
|
51
|
+
response.status
|
|
52
|
+
);
|
|
32
53
|
}
|
|
33
54
|
throw customError;
|
|
34
55
|
});
|
|
35
56
|
};
|
|
57
|
+
const handleTimeoutError = (error) => {
|
|
58
|
+
if (error instanceof Error && (error.name === "AbortError" || error.name === "TimeoutError")) {
|
|
59
|
+
throw new NetworkTimeoutError();
|
|
60
|
+
}
|
|
61
|
+
throw error;
|
|
62
|
+
};
|
|
36
63
|
const safeFetch = (url, initCopy) => {
|
|
37
|
-
return fetch(url, initCopy).then((response) => response.ok ? response : handleError(response));
|
|
64
|
+
return fetch(url, initCopy).then((response) => response.ok ? response : handleError(response)).catch(handleTimeoutError);
|
|
38
65
|
};
|
|
39
66
|
const backendFetch = (url, init, token) => {
|
|
40
67
|
const initCopy = prepareRequest(init, token);
|
|
@@ -48,6 +75,10 @@ function backendFetchText(url, init, token) {
|
|
|
48
75
|
const initCopy = prepareRequest(init, token);
|
|
49
76
|
return safeFetch(url, initCopy).then((safeResponse) => safeResponse.text());
|
|
50
77
|
}
|
|
78
|
+
const backendFetchFile = (url, init, token) => {
|
|
79
|
+
const initCopy = prepareRequest(init, token);
|
|
80
|
+
return safeFetch(url, initCopy).then((safeResponse) => safeResponse.blob());
|
|
81
|
+
};
|
|
51
82
|
const getRequestParamFromList = (paramName, params = []) => {
|
|
52
83
|
return new URLSearchParams(params.map((param) => [paramName, param]));
|
|
53
84
|
};
|
|
@@ -59,7 +90,9 @@ const catchErrorHandler = (error, callback) => {
|
|
|
59
90
|
}
|
|
60
91
|
};
|
|
61
92
|
export {
|
|
93
|
+
NetworkTimeoutError,
|
|
62
94
|
backendFetch,
|
|
95
|
+
backendFetchFile,
|
|
63
96
|
backendFetchJson,
|
|
64
97
|
backendFetchText,
|
|
65
98
|
catchErrorHandler,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export declare const businessErrorsEn: {
|
|
8
|
+
'directory.permissionDenied': string;
|
|
9
|
+
'directory.elementNameBlank': string;
|
|
10
|
+
'directory.notDirectory': string;
|
|
11
|
+
'directory.elementNameConflict': string;
|
|
12
|
+
'directory.moveInDescendantNotAllowed': string;
|
|
13
|
+
'directory.someElementsAreMissing': string;
|
|
14
|
+
'directory.elementNotFound': string;
|
|
15
|
+
'explore.permissionDenied': string;
|
|
16
|
+
'explore.maxElementsExceeded': string;
|
|
17
|
+
'explore.incorrectCaseFile': string;
|
|
18
|
+
'useradmin.permissionDenied': string;
|
|
19
|
+
'useradmin.userNotFound': string;
|
|
20
|
+
'useradmin.userAlreadyExists': string;
|
|
21
|
+
'useradmin.profileNotFound': string;
|
|
22
|
+
'useradmin.profileAlreadyExists': string;
|
|
23
|
+
'useradmin.groupNotFound': string;
|
|
24
|
+
'useradmin.groupAlreadyExists': string;
|
|
25
|
+
'useradmin.announcementInvalidPeriod': string;
|
|
26
|
+
'useradmin.announcementOverlap': string;
|
|
27
|
+
'filter.filterCycleDetected': string;
|
|
28
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const businessErrorsEn = {
|
|
2
|
+
"directory.permissionDenied": "You are not allowed to perform this action.",
|
|
3
|
+
"directory.elementNameBlank": "Element name must not be blank.",
|
|
4
|
+
"directory.notDirectory": "The selected element is not a directory.",
|
|
5
|
+
"directory.elementNameConflict": "An element with the same name already exists in the directory.",
|
|
6
|
+
"directory.moveInDescendantNotAllowed": "Cannot move an element inside one of its descendants.",
|
|
7
|
+
"directory.someElementsAreMissing": "Some of the requested directory elements are missing.",
|
|
8
|
+
"directory.elementNotFound": "The requested directory element could not be found.",
|
|
9
|
+
"explore.permissionDenied": "You are not allowed to perform this action.",
|
|
10
|
+
"explore.maxElementsExceeded": "The number of allowed elements has been exceeded.",
|
|
11
|
+
"explore.incorrectCaseFile": "The provided case file is incorrect.",
|
|
12
|
+
"useradmin.permissionDenied": "You don't have permission to perform this action.",
|
|
13
|
+
"useradmin.userNotFound": "User not found.",
|
|
14
|
+
"useradmin.userAlreadyExists": "User already exists.",
|
|
15
|
+
"useradmin.profileNotFound": "User profile not found.",
|
|
16
|
+
"useradmin.profileAlreadyExists": "User profile already exists.",
|
|
17
|
+
"useradmin.groupNotFound": "User's group not found.",
|
|
18
|
+
"useradmin.groupAlreadyExists": "User group already exists.",
|
|
19
|
+
"useradmin.announcementInvalidPeriod": "The announcement has an invalid time period.",
|
|
20
|
+
"useradmin.announcementOverlap": "The announcement period overlaps with an existing one.",
|
|
21
|
+
"filter.filterCycleDetected": "Filter cycle detected."
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
businessErrorsEn
|
|
25
|
+
};
|
|
@@ -16,7 +16,8 @@ const equipmentsEn = {
|
|
|
16
16
|
Other: "Other",
|
|
17
17
|
LccConverterStations: "LCC converter stations",
|
|
18
18
|
VscConverterStations: "VSC converter stations",
|
|
19
|
-
StaticVarCompensators: "Static var compensators"
|
|
19
|
+
StaticVarCompensators: "Static var compensators",
|
|
20
|
+
BusBarSections: "Busbar sections"
|
|
20
21
|
};
|
|
21
22
|
export {
|
|
22
23
|
equipmentsEn
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export declare const errorsEn: {
|
|
8
|
+
'errors.network.timeout': string;
|
|
9
|
+
};
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
6
|
*/
|
|
7
7
|
export * from './cardErrorBoundaryEn';
|
|
8
|
+
export * from './businessErrorsEn';
|
|
8
9
|
export * from './commonButtonEn';
|
|
9
10
|
export * from './csvEn';
|
|
10
11
|
export * from './descriptionEn';
|
|
@@ -13,6 +14,7 @@ export * from './dndTableEn';
|
|
|
13
14
|
export * from './elementSearchEn';
|
|
14
15
|
export * from './equipmentSearchEn';
|
|
15
16
|
export * from './equipmentsEn';
|
|
17
|
+
export * from './errorsEn';
|
|
16
18
|
export * from './filterEn';
|
|
17
19
|
export * from './filterExpertEn';
|
|
18
20
|
export * from './flatParametersEn';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cardErrorBoundaryEn } from "./cardErrorBoundaryEn.js";
|
|
2
|
+
import { businessErrorsEn } from "./businessErrorsEn.js";
|
|
2
3
|
import { commonButtonEn } from "./commonButtonEn.js";
|
|
3
4
|
import { csvEn } from "./csvEn.js";
|
|
4
5
|
import { descriptionEn } from "./descriptionEn.js";
|
|
@@ -7,6 +8,7 @@ import { dndTableEn } from "./dndTableEn.js";
|
|
|
7
8
|
import { elementSearchEn } from "./elementSearchEn.js";
|
|
8
9
|
import { equipmentSearchEn } from "./equipmentSearchEn.js";
|
|
9
10
|
import { equipmentsEn } from "./equipmentsEn.js";
|
|
11
|
+
import { errorsEn } from "./errorsEn.js";
|
|
10
12
|
import { filterEn } from "./filterEn.js";
|
|
11
13
|
import { filterExpertEn } from "./filterExpertEn.js";
|
|
12
14
|
import { flatParametersEn } from "./flatParametersEn.js";
|
|
@@ -24,6 +26,7 @@ import { componentsEn } from "./componentsEn.js";
|
|
|
24
26
|
import { parametersEn } from "./parameters.js";
|
|
25
27
|
import { useUniqueNameValidationEn } from "./use-unique-name-validation-en.js";
|
|
26
28
|
export {
|
|
29
|
+
businessErrorsEn,
|
|
27
30
|
cardErrorBoundaryEn,
|
|
28
31
|
commonButtonEn,
|
|
29
32
|
componentsEn,
|
|
@@ -34,6 +37,7 @@ export {
|
|
|
34
37
|
elementSearchEn,
|
|
35
38
|
equipmentSearchEn,
|
|
36
39
|
equipmentsEn,
|
|
40
|
+
errorsEn,
|
|
37
41
|
exportParamsEn,
|
|
38
42
|
filterEn,
|
|
39
43
|
filterExpertEn,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export declare const businessErrorsFr: {
|
|
8
|
+
'directory.permissionDenied': string;
|
|
9
|
+
'directory.elementNameBlank': string;
|
|
10
|
+
'directory.notDirectory': string;
|
|
11
|
+
'directory.elementNameConflict': string;
|
|
12
|
+
'directory.moveInDescendantNotAllowed': string;
|
|
13
|
+
'directory.someElementsAreMissing': string;
|
|
14
|
+
'directory.elementNotFound': string;
|
|
15
|
+
'explore.permissionDenied': string;
|
|
16
|
+
'explore.maxElementsExceeded': string;
|
|
17
|
+
'explore.incorrectCaseFile': string;
|
|
18
|
+
'useradmin.permissionDenied': string;
|
|
19
|
+
'useradmin.userNotFound': string;
|
|
20
|
+
'useradmin.userAlreadyExists': string;
|
|
21
|
+
'useradmin.profileNotFound': string;
|
|
22
|
+
'useradmin.profileAlreadyExists': string;
|
|
23
|
+
'useradmin.groupNotFound': string;
|
|
24
|
+
'useradmin.groupAlreadyExists': string;
|
|
25
|
+
'useradmin.announcementInvalidPeriod': string;
|
|
26
|
+
'useradmin.announcementOverlap': string;
|
|
27
|
+
'filter.filterCycleDetected': string;
|
|
28
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const businessErrorsFr = {
|
|
2
|
+
"directory.permissionDenied": "Vous n'êtes pas autorisé à effectuer cette action.",
|
|
3
|
+
"directory.elementNameBlank": "Le nom de l'élément ne peut pas être vide.",
|
|
4
|
+
"directory.notDirectory": "L'élément sélectionné n'est pas un dossier.",
|
|
5
|
+
"directory.elementNameConflict": "Un élément portant le même nom existe déjà dans le dossier.",
|
|
6
|
+
"directory.moveInDescendantNotAllowed": "Impossible de déplacer un élément dans l’un de ses descendants.",
|
|
7
|
+
"directory.someElementsAreMissing": "Certains des éléments demandés sont manquants.",
|
|
8
|
+
"directory.elementNotFound": "L'élément du dossier demandé est introuvable.",
|
|
9
|
+
"explore.permissionDenied": "Vous n'êtes pas autorisé à effectuer cette action.",
|
|
10
|
+
"explore.maxElementsExceeded": "Le nombre d'éléments autorisés a été dépassé.",
|
|
11
|
+
"explore.incorrectCaseFile": "Le fichier réseau fourni est incorrect.",
|
|
12
|
+
"useradmin.permissionDenied": "Vous n'avez pas la permission d'effectuer cette action.",
|
|
13
|
+
"useradmin.userNotFound": "Utilisateur introuvable.",
|
|
14
|
+
"useradmin.userAlreadyExists": "L'utilisateur existe déjà.",
|
|
15
|
+
"useradmin.profileNotFound": "Profil utilisateur introuvable.",
|
|
16
|
+
"useradmin.profileAlreadyExists": "Le profil utilisateur existe déjà.",
|
|
17
|
+
"useradmin.groupNotFound": "Le groupe de l'utilisateur est introuvable.",
|
|
18
|
+
"useradmin.groupAlreadyExists": "Le groupe d'utilisateurs existe déjà.",
|
|
19
|
+
"useradmin.announcementInvalidPeriod": "La période de l'annonce est invalide.",
|
|
20
|
+
"useradmin.announcementOverlap": "La période de l'annonce chevauche une autre annonce existante.",
|
|
21
|
+
"filter.filterCycleDetected": "Cycle de filtre détecté."
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
businessErrorsFr
|
|
25
|
+
};
|
|
@@ -16,7 +16,8 @@ const equipmentsFr = {
|
|
|
16
16
|
Other: "Autre",
|
|
17
17
|
LccConverterStations: "Stations de conversion LCC",
|
|
18
18
|
VscConverterStations: "Stations de conversion VSC",
|
|
19
|
-
StaticVarCompensators: "CSPR"
|
|
19
|
+
StaticVarCompensators: "CSPR",
|
|
20
|
+
BusBarSections: "Sections de jeux de barres"
|
|
20
21
|
};
|
|
21
22
|
export {
|
|
22
23
|
equipmentsFr
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, RTE (http://www.rte-france.com)
|
|
3
|
+
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
5
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
|
+
*/
|
|
7
|
+
export declare const errorsFr: {
|
|
8
|
+
'errors.network.timeout': string;
|
|
9
|
+
};
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
6
|
*/
|
|
7
7
|
export * from './cardErrorBoundaryFr';
|
|
8
|
+
export * from './businessErrorsFr';
|
|
8
9
|
export * from './commonButtonFr';
|
|
9
10
|
export * from './csvFr';
|
|
10
11
|
export * from './descriptionFr';
|
|
@@ -13,6 +14,7 @@ export * from './dndTableFr';
|
|
|
13
14
|
export * from './elementSearchFr';
|
|
14
15
|
export * from './equipmentSearchFr';
|
|
15
16
|
export * from './equipmentsFr';
|
|
17
|
+
export * from './errorsFr';
|
|
16
18
|
export * from './filterExpertFr';
|
|
17
19
|
export * from './filterFr';
|
|
18
20
|
export * from './flatParametersFr';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { cardErrorBoundaryFr } from "./cardErrorBoundaryFr.js";
|
|
2
|
+
import { businessErrorsFr } from "./businessErrorsFr.js";
|
|
2
3
|
import { commonButtonFr } from "./commonButtonFr.js";
|
|
3
4
|
import { csvFr } from "./csvFr.js";
|
|
4
5
|
import { descriptionFr } from "./descriptionFr.js";
|
|
@@ -7,6 +8,7 @@ import { dndTableFr } from "./dndTableFr.js";
|
|
|
7
8
|
import { elementSearchFr } from "./elementSearchFr.js";
|
|
8
9
|
import { equipmentSearchFr } from "./equipmentSearchFr.js";
|
|
9
10
|
import { equipmentsFr } from "./equipmentsFr.js";
|
|
11
|
+
import { errorsFr } from "./errorsFr.js";
|
|
10
12
|
import { filterExpertFr } from "./filterExpertFr.js";
|
|
11
13
|
import { filterFr } from "./filterFr.js";
|
|
12
14
|
import { flatParametersFr } from "./flatParametersFr.js";
|
|
@@ -24,6 +26,7 @@ import { componentsFr } from "./componentsFr.js";
|
|
|
24
26
|
import { parametersFr } from "./parameters.js";
|
|
25
27
|
import { useUniqueNameValidationFr } from "./use-unique-name-validation-fr.js";
|
|
26
28
|
export {
|
|
29
|
+
businessErrorsFr,
|
|
27
30
|
cardErrorBoundaryFr,
|
|
28
31
|
commonButtonFr,
|
|
29
32
|
componentsFr,
|
|
@@ -34,6 +37,7 @@ export {
|
|
|
34
37
|
elementSearchFr,
|
|
35
38
|
equipmentSearchFr,
|
|
36
39
|
equipmentsFr,
|
|
40
|
+
errorsFr,
|
|
37
41
|
exportParamsFr,
|
|
38
42
|
filterExpertFr,
|
|
39
43
|
filterFr,
|
package/dist/utils/index.js
CHANGED
|
@@ -12,9 +12,9 @@ import { equipmentTypesForPredefinedPropertiesMapper } from "./mapper/equipmentT
|
|
|
12
12
|
import { NotificationsUrlKeys, PREFIX_CONFIG_NOTIFICATION_WS, PREFIX_DIRECTORY_NOTIFICATION_WS, PREFIX_STUDY_NOTIFICATION_WS } from "./constants/notificationsProvider.js";
|
|
13
13
|
import { DARK_THEME, LIGHT_THEME, makeComposeClasses, mergeSx, toNestedGlobalSelectors } from "./styles.js";
|
|
14
14
|
import { ElementType } from "./types/elementType.js";
|
|
15
|
-
import { BASE_EQUIPMENTS, EQUIPMENT_TYPE, EquipmentType, ExtendedEquipmentType, HvdcType, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./types/equipmentType.js";
|
|
15
|
+
import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, EQUIPMENT_TYPE, EquipmentType, ExtendedEquipmentType, HvdcType, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./types/equipmentType.js";
|
|
16
16
|
import { Battery, BusBar, DanglingLine, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel } from "./types/equipmentTypes.js";
|
|
17
|
-
import { AnnouncementSeverity } from "./types/types.js";
|
|
17
|
+
import { AnnouncementSeverity, ArrayAction } from "./types/types.js";
|
|
18
18
|
import { MODIFICATION_TYPES, ModificationType } from "./types/modificationType.js";
|
|
19
19
|
import { FieldType } from "./types/fieldType.js";
|
|
20
20
|
import { ParameterType } from "./types/parameters.type.js";
|
|
@@ -24,8 +24,10 @@ import { toNumber, validateValueIsANumber } from "./validation-functions.js";
|
|
|
24
24
|
import "./yupConfig.js";
|
|
25
25
|
import * as yup from "yup";
|
|
26
26
|
export {
|
|
27
|
+
ALL_EQUIPMENTS,
|
|
27
28
|
AMPERE,
|
|
28
29
|
AnnouncementSeverity,
|
|
30
|
+
ArrayAction,
|
|
29
31
|
BASE_EQUIPMENTS,
|
|
30
32
|
Battery,
|
|
31
33
|
BusBar,
|
|
@@ -71,18 +71,172 @@ export declare enum ExtendedEquipmentType {
|
|
|
71
71
|
HVDC_LINE_LCC = "HVDC_LINE_LCC",
|
|
72
72
|
HVDC_LINE_VSC = "HVDC_LINE_VSC"
|
|
73
73
|
}
|
|
74
|
-
export declare const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
export declare const ALL_EQUIPMENTS: {
|
|
75
|
+
SUBSTATION: {
|
|
76
|
+
id: EquipmentType;
|
|
77
|
+
label: string;
|
|
78
|
+
};
|
|
79
|
+
VOLTAGE_LEVEL: {
|
|
80
|
+
id: EquipmentType;
|
|
81
|
+
label: string;
|
|
82
|
+
};
|
|
83
|
+
LINE: {
|
|
84
|
+
id: EquipmentType;
|
|
85
|
+
label: string;
|
|
86
|
+
};
|
|
87
|
+
TWO_WINDINGS_TRANSFORMER: {
|
|
88
|
+
id: EquipmentType;
|
|
89
|
+
label: string;
|
|
90
|
+
};
|
|
91
|
+
THREE_WINDINGS_TRANSFORMER: {
|
|
92
|
+
id: EquipmentType;
|
|
93
|
+
label: string;
|
|
94
|
+
};
|
|
95
|
+
GENERATOR: {
|
|
96
|
+
id: EquipmentType;
|
|
97
|
+
label: string;
|
|
98
|
+
};
|
|
99
|
+
BATTERY: {
|
|
100
|
+
id: EquipmentType;
|
|
101
|
+
label: string;
|
|
102
|
+
};
|
|
103
|
+
LOAD: {
|
|
104
|
+
id: EquipmentType;
|
|
105
|
+
label: string;
|
|
106
|
+
};
|
|
107
|
+
SHUNT_COMPENSATOR: {
|
|
108
|
+
id: EquipmentType;
|
|
109
|
+
label: string;
|
|
110
|
+
};
|
|
111
|
+
STATIC_VAR_COMPENSATOR: {
|
|
112
|
+
id: EquipmentType;
|
|
113
|
+
label: string;
|
|
114
|
+
};
|
|
115
|
+
DANGLING_LINE: {
|
|
116
|
+
id: EquipmentType;
|
|
117
|
+
label: string;
|
|
118
|
+
};
|
|
119
|
+
BUSBAR_SECTION: {
|
|
120
|
+
id: EquipmentType;
|
|
121
|
+
label: string;
|
|
122
|
+
};
|
|
123
|
+
HVDC_LINE: {
|
|
124
|
+
id: EquipmentType;
|
|
125
|
+
label: string;
|
|
126
|
+
};
|
|
127
|
+
HVDC_LINE_LCC: {
|
|
128
|
+
id: ExtendedEquipmentType;
|
|
129
|
+
label: string;
|
|
130
|
+
};
|
|
131
|
+
HVDC_LINE_VSC: {
|
|
132
|
+
id: ExtendedEquipmentType;
|
|
133
|
+
label: string;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
export declare const BASE_EQUIPMENTS: {
|
|
137
|
+
SUBSTATION: {
|
|
138
|
+
id: EquipmentType;
|
|
139
|
+
label: string;
|
|
140
|
+
};
|
|
141
|
+
VOLTAGE_LEVEL: {
|
|
142
|
+
id: EquipmentType;
|
|
143
|
+
label: string;
|
|
144
|
+
};
|
|
145
|
+
LINE: {
|
|
146
|
+
id: EquipmentType;
|
|
147
|
+
label: string;
|
|
148
|
+
};
|
|
149
|
+
TWO_WINDINGS_TRANSFORMER: {
|
|
150
|
+
id: EquipmentType;
|
|
151
|
+
label: string;
|
|
152
|
+
};
|
|
153
|
+
THREE_WINDINGS_TRANSFORMER: {
|
|
154
|
+
id: EquipmentType;
|
|
155
|
+
label: string;
|
|
156
|
+
};
|
|
157
|
+
GENERATOR: {
|
|
158
|
+
id: EquipmentType;
|
|
159
|
+
label: string;
|
|
160
|
+
};
|
|
161
|
+
BATTERY: {
|
|
162
|
+
id: EquipmentType;
|
|
163
|
+
label: string;
|
|
164
|
+
};
|
|
165
|
+
LOAD: {
|
|
166
|
+
id: EquipmentType;
|
|
167
|
+
label: string;
|
|
168
|
+
};
|
|
169
|
+
SHUNT_COMPENSATOR: {
|
|
170
|
+
id: EquipmentType;
|
|
171
|
+
label: string;
|
|
172
|
+
};
|
|
173
|
+
STATIC_VAR_COMPENSATOR: {
|
|
174
|
+
id: EquipmentType;
|
|
175
|
+
label: string;
|
|
176
|
+
};
|
|
177
|
+
DANGLING_LINE: {
|
|
178
|
+
id: EquipmentType;
|
|
179
|
+
label: string;
|
|
180
|
+
};
|
|
181
|
+
};
|
|
78
182
|
export declare const EQUIPMENT_TYPE: Partial<Record<EquipmentType | ExtendedEquipmentType, {
|
|
79
183
|
name: EquipmentType | ExtendedEquipmentType;
|
|
80
184
|
tagLabel: string;
|
|
81
185
|
} | undefined>>;
|
|
82
|
-
export declare const SEARCH_EQUIPMENTS:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
186
|
+
export declare const SEARCH_EQUIPMENTS: {
|
|
187
|
+
HVDC_LINE_LCC: {
|
|
188
|
+
id: ExtendedEquipmentType;
|
|
189
|
+
label: string;
|
|
190
|
+
};
|
|
191
|
+
HVDC_LINE_VSC: {
|
|
192
|
+
id: ExtendedEquipmentType;
|
|
193
|
+
label: string;
|
|
194
|
+
};
|
|
195
|
+
SUBSTATION: {
|
|
196
|
+
id: EquipmentType;
|
|
197
|
+
label: string;
|
|
198
|
+
};
|
|
199
|
+
VOLTAGE_LEVEL: {
|
|
200
|
+
id: EquipmentType;
|
|
201
|
+
label: string;
|
|
202
|
+
};
|
|
203
|
+
LINE: {
|
|
204
|
+
id: EquipmentType;
|
|
205
|
+
label: string;
|
|
206
|
+
};
|
|
207
|
+
TWO_WINDINGS_TRANSFORMER: {
|
|
208
|
+
id: EquipmentType;
|
|
209
|
+
label: string;
|
|
210
|
+
};
|
|
211
|
+
THREE_WINDINGS_TRANSFORMER: {
|
|
212
|
+
id: EquipmentType;
|
|
213
|
+
label: string;
|
|
214
|
+
};
|
|
215
|
+
GENERATOR: {
|
|
216
|
+
id: EquipmentType;
|
|
217
|
+
label: string;
|
|
218
|
+
};
|
|
219
|
+
BATTERY: {
|
|
220
|
+
id: EquipmentType;
|
|
221
|
+
label: string;
|
|
222
|
+
};
|
|
223
|
+
LOAD: {
|
|
224
|
+
id: EquipmentType;
|
|
225
|
+
label: string;
|
|
226
|
+
};
|
|
227
|
+
SHUNT_COMPENSATOR: {
|
|
228
|
+
id: EquipmentType;
|
|
229
|
+
label: string;
|
|
230
|
+
};
|
|
231
|
+
STATIC_VAR_COMPENSATOR: {
|
|
232
|
+
id: EquipmentType;
|
|
233
|
+
label: string;
|
|
234
|
+
};
|
|
235
|
+
DANGLING_LINE: {
|
|
236
|
+
id: EquipmentType;
|
|
237
|
+
label: string;
|
|
238
|
+
};
|
|
239
|
+
};
|
|
86
240
|
export interface Identifiable {
|
|
87
241
|
id: string;
|
|
88
242
|
name?: string;
|