@gridsuite/commons-ui 0.143.0 → 0.144.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/index.js +2 -1
- package/dist/services/index.js +1 -2
- package/dist/services/utils.d.ts +0 -4
- package/dist/services/utils.js +4 -10
- 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/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
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,
|
|
@@ -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,
|