@gridsuite/commons-ui 0.143.0 → 0.145.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/elementSaveDialog/ElementSaveDialog.js +1 -1
- package/dist/components/dnd-table/dnd-table-add-rows-dialog.js +2 -2
- package/dist/components/dnd-table/dnd-table.js +3 -3
- package/dist/components/inputs/reactHookForm/DirectoryItemsInput.d.ts +2 -1
- package/dist/components/inputs/reactHookForm/DirectoryItemsInput.js +118 -75
- package/dist/components/inputs/reactHookForm/OverflowableChip.d.ts +3 -2
- package/dist/components/inputs/reactHookForm/OverflowableChip.js +5 -5
- package/dist/components/inputs/reactHookForm/OverflowableChipWithHelperText.d.ts +1 -1
- package/dist/components/inputs/reactHookForm/OverflowableChipWithHelperText.js +20 -4
- package/dist/components/inputs/reactHookForm/selectInputs/SelectInput.js +3 -1
- package/dist/components/inputs/reactHookForm/text/DescriptionField.d.ts +3 -1
- package/dist/components/inputs/reactHookForm/text/DescriptionField.js +13 -4
- package/dist/components/overflowableText/OverflowableText.js +9 -1
- package/dist/components/parameters/common/ProviderParam.js +3 -3
- package/dist/components/parameters/common/limitreductions/limit-reduction-table-cell.js +3 -3
- package/dist/components/parameters/common/limitreductions/limit-reductions-table-form.js +2 -2
- package/dist/components/parameters/common/name-element-editor/name-element-editor-utils.js +3 -3
- package/dist/components/parameters/common/voltage-level-table/custom-voltage-level-table-cell.js +3 -3
- package/dist/components/parameters/common/widget/parameter-float.js +3 -3
- package/dist/components/parameters/common/widget/parameter-line-directory-items-input.js +3 -3
- package/dist/components/parameters/common/widget/parameter-line-slider.js +3 -3
- package/dist/components/parameters/loadflow/load-flow-general-parameters.js +2 -2
- package/dist/components/parameters/loadflow/load-flow-parameter-field.js +3 -3
- package/dist/components/parameters/loadflow/load-flow-parameters-form.js +3 -3
- package/dist/components/parameters/loadflow/load-flow-parameters-header.js +3 -3
- package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +7 -4
- package/dist/components/parameters/network-visualizations/network-area-diagram-parameters.js +3 -3
- package/dist/components/parameters/network-visualizations/network-visualizations-form.js +2 -2
- package/dist/components/parameters/network-visualizations/use-network-visualizations-parameters-form.js +1 -1
- package/dist/components/parameters/pcc-min/pcc-min-form-utils.js +3 -3
- package/dist/components/parameters/pcc-min/pcc-min-parameters-form.js +3 -3
- package/dist/components/parameters/security-analysis/security-analysis-parameters-form.js +3 -3
- package/dist/components/parameters/security-analysis/security-analysis-violations-hiding.js +3 -3
- package/dist/components/parameters/sensi/sensitivity-Flow-parameters.js +3 -3
- package/dist/components/parameters/sensi/sensitivity-analysis-parameters-form.js +3 -3
- package/dist/components/parameters/sensi/sensitivity-table.js +1 -1
- package/dist/components/parameters/sensi/table-cell.js +3 -3
- package/dist/components/parameters/short-circuit/short-circuit-fields.js +1 -1
- package/dist/components/parameters/short-circuit/short-circuit-parameters-form.js +3 -3
- package/dist/components/parameters/short-circuit/use-short-circuit-parameters-form.js +1 -1
- package/dist/components/parameters/voltage-init/equipment-selection-parameters.js +3 -3
- package/dist/components/parameters/voltage-init/use-voltage-init-parameters-form.js +1 -1
- package/dist/components/parameters/voltage-init/voltage-init-form-utils.js +3 -3
- package/dist/components/parameters/voltage-init/voltage-init-parameters-form.js +3 -3
- package/dist/hooks/useModificationLabelComputer.js +10 -0
- package/dist/index.js +3 -1
- package/dist/services/index.js +2 -2
- package/dist/services/utils.d.ts +2 -10
- package/dist/services/utils.js +18 -30
- package/dist/translations/en/businessErrorsEn.d.ts +17 -0
- package/dist/translations/en/businessErrorsEn.js +20 -3
- package/dist/translations/en/inputsEn.d.ts +1 -1
- package/dist/translations/en/inputsEn.js +1 -1
- package/dist/translations/fr/businessErrorsFr.d.ts +17 -0
- package/dist/translations/fr/businessErrorsFr.js +20 -3
- package/dist/translations/fr/inputsFr.d.ts +1 -1
- package/dist/translations/fr/inputsFr.js +1 -1
- package/dist/utils/error.js +8 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/types/CustomError.d.ts +2 -2
- package/dist/utils/types/NetworkTimeoutError.d.ts +10 -0
- package/dist/utils/types/NetworkTimeoutError.js +9 -0
- package/dist/utils/types/index.d.ts +1 -0
- package/dist/utils/types/index.js +2 -0
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ const businessErrorsFr = {
|
|
|
7
7
|
"directory.someElementsAreMissing": "Certains des éléments demandés sont manquants.",
|
|
8
8
|
"directory.elementNotFound": "L'élément du dossier demandé est introuvable.",
|
|
9
9
|
"explore.permissionDenied": "Vous n'êtes pas autorisé à effectuer cette action.",
|
|
10
|
-
"explore.maxElementsExceeded": "
|
|
10
|
+
"explore.maxElementsExceeded": "Vous avez atteint votre quota utilisateur en termes de situations et d'études ({limit} situations et études).",
|
|
11
11
|
"explore.incorrectCaseFile": "Le fichier réseau fourni est incorrect.",
|
|
12
12
|
"study.notFound": "Étude non trouvée.",
|
|
13
13
|
"study.computationRunning": "L'opération ne peut être menée car un calcul est en cours.",
|
|
@@ -20,7 +20,7 @@ const businessErrorsFr = {
|
|
|
20
20
|
"study.nodeNameAlreadyExist": "Ce nom de noeud existe déjà.",
|
|
21
21
|
"study.timeSeriesBadType": "Série temporelle de mauvais type.",
|
|
22
22
|
"study.noVoltageInitResultsForNode": "Pas de résultats pour l'initialisation du plan de tension.",
|
|
23
|
-
"study.maxNodeBuildsExceeded": "
|
|
23
|
+
"study.maxNodeBuildsExceeded": "Vous avez atteint votre quota utilisateur en termes de réalisation de nœud par étude ({limit} réalisations).",
|
|
24
24
|
"study.rootNetworkDeleteForbidden": "Impossible de supprimer ce réseau racine.",
|
|
25
25
|
"study.maximumRootNetworkByStudyReached": "Nombre maximal de réseau racine par étude atteint.",
|
|
26
26
|
"study.maximumTagLengthExceeded": "Taille maximale d'étiquette atteinte.",
|
|
@@ -36,7 +36,24 @@ const businessErrorsFr = {
|
|
|
36
36
|
"useradmin.groupAlreadyExists": "Le groupe d'utilisateurs existe déjà.",
|
|
37
37
|
"useradmin.announcementInvalidPeriod": "La période de l'annonce est invalide.",
|
|
38
38
|
"useradmin.announcementOverlap": "La période de l'annonce chevauche une autre annonce existante.",
|
|
39
|
-
"filter.filterCycleDetected": "Cycle de filtre détecté: {filters}"
|
|
39
|
+
"filter.filterCycleDetected": "Cycle de filtre détecté: {filters}",
|
|
40
|
+
"computation.resultNotFound": "Résultats non trouvés.",
|
|
41
|
+
"computation.parametersNotFound": "Paramètres non trouvés.",
|
|
42
|
+
"computation.invalidSortFormat": "Le format du tri est incorrect.",
|
|
43
|
+
"computation.invalidExportParams": "Les paramètres d'export sont incorrects.",
|
|
44
|
+
"computation.limitReductionConfigError": "La configuration des abattements est incorrect.",
|
|
45
|
+
"computation.runnerError": "Une erreur est survenue durant l'exécution du calcul.",
|
|
46
|
+
"voltageInit.missingFilter": "La configuration contient un ou des filtres qui ont été supprimés.",
|
|
47
|
+
"shortcircuit.busOutOfVoltage": "Bus sélectionné en dehors des limites de tension.",
|
|
48
|
+
"shortcircuit.missingExtensionData": "Données de l'extension court-circuit manquantes.",
|
|
49
|
+
"shortcircuit.inconsistentVoltageLevels": "Des postes ont des données Icc incohérentes. Vérifiez les logs pour déterminer lesquels.",
|
|
50
|
+
"dynamicMapping.mappingNameNotProvided": "Nom du mapping non fourni",
|
|
51
|
+
"dynamicSecurityAnalysis.providerNotFound": "Simulateur d'analyse de sécurité dynamique non trouvé.",
|
|
52
|
+
"dynamicSecurityAnalysis.contingenciesNotFound": "Aucun aléa fourni.",
|
|
53
|
+
"dynamicSecurityAnalysis.contingencyListEmpty": "La liste d'aléas fournie ne doit pas être nulle ou vide.",
|
|
54
|
+
"dynamicSimulation.providerNotFound": "Simulateur pour la simulation dynamique non trouvé.",
|
|
55
|
+
"dynamicSimulation.mappingNotProvided": "Mapping pour la simulation dynamique non fourni.",
|
|
56
|
+
"dynamicSimulation.mappingNotLastRuleWithEmptyFilterError": "Seule la dernière règle peut avoir un filtre vide : type {equipmentType}, indice de la règle : {index}."
|
|
40
57
|
};
|
|
41
58
|
export {
|
|
42
59
|
businessErrorsFr
|
package/dist/utils/error.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CustomError, formatMessageValues } from "./types/CustomError.js";
|
|
2
|
+
import { NetworkTimeoutError } from "./types/NetworkTimeoutError.js";
|
|
2
3
|
function catchErrorHandler(error, callback) {
|
|
3
4
|
if (error instanceof Object && "message" in error && typeof error.message === "string") {
|
|
4
5
|
callback(error.message);
|
|
@@ -7,6 +8,13 @@ function catchErrorHandler(error, callback) {
|
|
|
7
8
|
}
|
|
8
9
|
}
|
|
9
10
|
function snackWithFallback(snackError, error, headerInputs) {
|
|
11
|
+
if (error instanceof NetworkTimeoutError) {
|
|
12
|
+
snackError({
|
|
13
|
+
messageId: error.message,
|
|
14
|
+
...headerInputs
|
|
15
|
+
});
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
10
18
|
if (error instanceof CustomError && error.businessErrorCode) {
|
|
11
19
|
snackError({
|
|
12
20
|
messageId: error.businessErrorCode,
|
package/dist/utils/index.js
CHANGED
|
@@ -15,6 +15,7 @@ import { copyToClipboard } from "./navigator-clipboard.js";
|
|
|
15
15
|
import { NotificationsUrlKeys, PREFIX_CONFIG_NOTIFICATION_WS, PREFIX_DIRECTORY_NOTIFICATION_WS, PREFIX_STUDY_NOTIFICATION_WS } from "./constants/notificationsProvider.js";
|
|
16
16
|
import { DARK_THEME, LIGHT_THEME, makeComposeClasses, mergeSx, toNestedGlobalSelectors } from "./styles.js";
|
|
17
17
|
import { CustomError, formatMessageValues } from "./types/CustomError.js";
|
|
18
|
+
import { NetworkTimeoutError } from "./types/NetworkTimeoutError.js";
|
|
18
19
|
import { ElementType } from "./types/elementType.js";
|
|
19
20
|
import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, EquipmentType, ExtendedEquipmentType, HvdcType, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./types/equipmentType.js";
|
|
20
21
|
import { Battery, BusBar, DanglingLine, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel } from "./types/equipmentTypes.js";
|
|
@@ -75,6 +76,7 @@ export {
|
|
|
75
76
|
MICRO_SIEMENS,
|
|
76
77
|
MODIFICATION_TYPES,
|
|
77
78
|
ModificationType,
|
|
79
|
+
NetworkTimeoutError,
|
|
78
80
|
NotificationsUrlKeys,
|
|
79
81
|
OHM,
|
|
80
82
|
OperatingStatus,
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
6
6
|
*/
|
|
7
7
|
export declare class CustomError extends Error {
|
|
8
|
-
status
|
|
8
|
+
status?: number;
|
|
9
9
|
businessErrorCode?: string;
|
|
10
10
|
businessErrorValues?: Record<string, unknown>;
|
|
11
|
-
constructor(message: string, status
|
|
11
|
+
constructor(message: string, status?: number, businessErrorCode?: string, businessErrorValues?: Record<string, unknown>);
|
|
12
12
|
}
|
|
13
13
|
export declare function formatMessageValues(properties: Record<string, unknown>): Record<string, string>;
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
/** Custom error type thrown when AbortSignal.timeout triggers. */
|
|
8
|
+
export declare class NetworkTimeoutError extends Error {
|
|
9
|
+
constructor(messageKey?: string);
|
|
10
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CustomError, formatMessageValues } from "./CustomError.js";
|
|
2
|
+
import { NetworkTimeoutError } from "./NetworkTimeoutError.js";
|
|
2
3
|
import { ElementType } from "./elementType.js";
|
|
3
4
|
import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, EquipmentType, ExtendedEquipmentType, HvdcType, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./equipmentType.js";
|
|
4
5
|
import { Battery, BusBar, DanglingLine, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel } from "./equipmentTypes.js";
|
|
@@ -30,6 +31,7 @@ export {
|
|
|
30
31
|
Load,
|
|
31
32
|
MODIFICATION_TYPES,
|
|
32
33
|
ModificationType,
|
|
34
|
+
NetworkTimeoutError,
|
|
33
35
|
OperatingStatus,
|
|
34
36
|
ParameterType,
|
|
35
37
|
SEARCH_EQUIPMENTS,
|