@gridsuite/commons-ui 0.182.0 → 0.183.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/network-modifications/common/connectivity/connectivityForm.utils.js +2 -1
- package/dist/components/network-modifications/common/measurements/powerWithValidity.utils.js +2 -1
- package/dist/components/network-modifications/common/setpoints/setPoints.utils.js +3 -2
- package/dist/components/network-modifications/load/creation/loadCreation.utils.js +3 -3
- package/dist/components/network-modifications/voltage-level/creation/voltageLevelCreation.utils.js +8 -8
- package/dist/components/network-modifications/voltage-level/modification/voltageLevelModification.utils.js +6 -6
- package/dist/components/parameters/common/contingency-table/contingency-table.js +4 -1
- package/dist/components/parameters/security-analysis/columns-definitions.js +1 -1
- package/dist/hooks/useModificationLabelComputer.js +2 -0
- package/dist/index.js +2 -1
- package/dist/translations/en/networkModificationsEn.d.ts +2 -0
- package/dist/translations/en/networkModificationsEn.js +2 -0
- package/dist/translations/fr/networkModificationsFr.d.ts +2 -0
- package/dist/translations/fr/networkModificationsFr.js +2 -0
- package/dist/utils/constants/index.js +2 -1
- package/dist/utils/constants/translationKeys.d.ts +1 -0
- package/dist/utils/constants/translationKeys.js +2 -0
- package/dist/utils/index.js +2 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { object, bool, number, string } from "yup";
|
|
2
2
|
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
3
|
+
import { YUP_NOT_TYPE_NUMBER } from "../../../../utils/constants/translationKeys.js";
|
|
3
4
|
import "../../../../utils/conversionUtils.js";
|
|
4
5
|
import "../../../../utils/types/equipmentType.js";
|
|
5
6
|
import "react/jsx-runtime";
|
|
@@ -35,7 +36,7 @@ const getConnectivityPropertiesValidationSchema = (isEquipmentModification = fal
|
|
|
35
36
|
const getConnectivityWithPositionSchema = (isEquipmentModification = false) => object().shape({
|
|
36
37
|
[FieldConstants.CONNECTION_DIRECTION]: string().nullable(),
|
|
37
38
|
[FieldConstants.CONNECTION_NAME]: string(),
|
|
38
|
-
[FieldConstants.CONNECTION_POSITION]: number().nullable(),
|
|
39
|
+
[FieldConstants.CONNECTION_POSITION]: number().typeError(YUP_NOT_TYPE_NUMBER).nullable(),
|
|
39
40
|
[FieldConstants.CONNECTED]: bool().nullable().when([], {
|
|
40
41
|
is: () => !isEquipmentModification,
|
|
41
42
|
then: (schema) => schema.required()
|
package/dist/components/network-modifications/common/measurements/powerWithValidity.utils.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { object, boolean, number } from "yup";
|
|
2
2
|
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
3
|
+
import { YUP_NOT_TYPE_NUMBER } from "../../../../utils/constants/translationKeys.js";
|
|
3
4
|
import "../../../../utils/conversionUtils.js";
|
|
4
5
|
import "../../../../utils/types/equipmentType.js";
|
|
5
6
|
import "react/jsx-runtime";
|
|
@@ -16,7 +17,7 @@ function getPowerWithValidityEmptyFormData(id) {
|
|
|
16
17
|
function getPowerWithValidityValidationSchema(id) {
|
|
17
18
|
return {
|
|
18
19
|
[id]: object().shape({
|
|
19
|
-
[FieldConstants.VALUE]: number().nullable(),
|
|
20
|
+
[FieldConstants.VALUE]: number().typeError(YUP_NOT_TYPE_NUMBER).nullable(),
|
|
20
21
|
[FieldConstants.VALIDITY]: boolean().nullable()
|
|
21
22
|
})
|
|
22
23
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { number } from "yup";
|
|
2
2
|
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
3
|
+
import { YUP_NOT_TYPE_NUMBER } from "../../../../utils/constants/translationKeys.js";
|
|
3
4
|
import "../../../../utils/conversionUtils.js";
|
|
4
5
|
import "../../../../utils/types/equipmentType.js";
|
|
5
6
|
import "react/jsx-runtime";
|
|
@@ -27,7 +28,7 @@ const testValueWithinPowerIntervalOrEqualToZero = (value, context) => {
|
|
|
27
28
|
return testValueWithinPowerInterval(value, context);
|
|
28
29
|
};
|
|
29
30
|
const getActivePowerSetPointSchema = (isEquipmentModification = false) => ({
|
|
30
|
-
[FieldConstants.ACTIVE_POWER_SET_POINT]: number().when([], {
|
|
31
|
+
[FieldConstants.ACTIVE_POWER_SET_POINT]: number().typeError(YUP_NOT_TYPE_NUMBER).when([], {
|
|
31
32
|
is: () => isEquipmentModification,
|
|
32
33
|
then: (schema) => {
|
|
33
34
|
return schema.nullable();
|
|
@@ -44,7 +45,7 @@ const getActivePowerSetPointSchema = (isEquipmentModification = false) => ({
|
|
|
44
45
|
})
|
|
45
46
|
});
|
|
46
47
|
const getReactivePowerSetPointSchema = (isEquipmentModification = false) => ({
|
|
47
|
-
[FieldConstants.REACTIVE_POWER_SET_POINT]: number().nullable().when([FieldConstants.VOLTAGE_REGULATION], {
|
|
48
|
+
[FieldConstants.REACTIVE_POWER_SET_POINT]: number().typeError(YUP_NOT_TYPE_NUMBER).nullable().when([FieldConstants.VOLTAGE_REGULATION], {
|
|
48
49
|
is: (value) => !isEquipmentModification && !value,
|
|
49
50
|
then: (schema) => schema.required()
|
|
50
51
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { object, number, string } from "yup";
|
|
2
2
|
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
3
|
-
import { YUP_REQUIRED } from "../../../../utils/constants/translationKeys.js";
|
|
3
|
+
import { YUP_NOT_TYPE_NUMBER, YUP_REQUIRED } from "../../../../utils/constants/translationKeys.js";
|
|
4
4
|
import "../../../../utils/conversionUtils.js";
|
|
5
5
|
import { UNDEFINED_CONNECTION_DIRECTION, UNDEFINED_LOAD_TYPE } from "../../../../utils/types/equipmentType.js";
|
|
6
6
|
import { ModificationType } from "../../../../utils/types/modificationType.js";
|
|
@@ -42,8 +42,8 @@ const loadCreationFormSchema = object().shape({
|
|
|
42
42
|
[FieldConstants.EQUIPMENT_ID]: string().required(YUP_REQUIRED),
|
|
43
43
|
[FieldConstants.EQUIPMENT_NAME]: string().nullable(),
|
|
44
44
|
[FieldConstants.LOAD_TYPE]: string().nullable(),
|
|
45
|
-
[FieldConstants.ACTIVE_POWER_SET_POINT]: number().nullable().required(YUP_REQUIRED),
|
|
46
|
-
[FieldConstants.REACTIVE_POWER_SET_POINT]: number().nullable().required(YUP_REQUIRED),
|
|
45
|
+
[FieldConstants.ACTIVE_POWER_SET_POINT]: number().typeError(YUP_NOT_TYPE_NUMBER).nullable().required(YUP_REQUIRED),
|
|
46
|
+
[FieldConstants.REACTIVE_POWER_SET_POINT]: number().typeError(YUP_NOT_TYPE_NUMBER).nullable().required(YUP_REQUIRED),
|
|
47
47
|
[FieldConstants.CONNECTIVITY]: getConnectivityWithPositionSchema(false)
|
|
48
48
|
}).concat(creationPropertiesSchema).required(YUP_REQUIRED);
|
|
49
49
|
const loadCreationEmptyFormData = {
|
package/dist/components/network-modifications/voltage-level/creation/voltageLevelCreation.utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { object, array, string, number, boolean, ref } from "yup";
|
|
2
2
|
import { creationPropertiesSchema, toModificationProperties, getPropertiesFromModification, emptyProperties } from "../../common/properties/propertyUtils.js";
|
|
3
3
|
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
4
|
-
import { YUP_REQUIRED } from "../../../../utils/constants/translationKeys.js";
|
|
4
|
+
import { YUP_REQUIRED, YUP_NOT_TYPE_NUMBER } from "../../../../utils/constants/translationKeys.js";
|
|
5
5
|
import { convertOutputValue, convertInputValue } from "../../../../utils/conversionUtils.js";
|
|
6
6
|
import "../../../../utils/types/equipmentType.js";
|
|
7
7
|
import { MODIFICATION_TYPES } from "../../../../utils/types/modificationType.js";
|
|
@@ -102,23 +102,23 @@ const voltageLevelCreationFormSchema = object().shape({
|
|
|
102
102
|
[FieldConstants.COUNTRY]: string().nullable(),
|
|
103
103
|
[FieldConstants.SUBSTATION_CREATION]: creationPropertiesSchema,
|
|
104
104
|
[FieldConstants.HIDE_NOMINAL_VOLTAGE]: boolean().required(YUP_REQUIRED),
|
|
105
|
-
[FieldConstants.NOMINAL_V]: number().nullable().when([FieldConstants.HIDE_NOMINAL_VOLTAGE], {
|
|
105
|
+
[FieldConstants.NOMINAL_V]: number().typeError(YUP_NOT_TYPE_NUMBER).nullable().when([FieldConstants.HIDE_NOMINAL_VOLTAGE], {
|
|
106
106
|
is: (hideNominalVoltage) => !hideNominalVoltage,
|
|
107
107
|
then: (schema) => schema.min(0, "mustBeGreaterOrEqualToZero").required(YUP_REQUIRED)
|
|
108
108
|
}),
|
|
109
|
-
[FieldConstants.LOW_VOLTAGE_LIMIT]: number().nullable().min(0, "mustBeGreaterOrEqualToZero").max(ref(FieldConstants.HIGH_VOLTAGE_LIMIT), "voltageLevelNominalVoltageMaxValueError"),
|
|
110
|
-
[FieldConstants.HIGH_VOLTAGE_LIMIT]: number().nullable().min(0, "mustBeGreaterOrEqualToZero"),
|
|
111
|
-
[FieldConstants.LOW_SHORT_CIRCUIT_CURRENT_LIMIT]: number().nullable().min(0, "ShortCircuitCurrentLimitMustBeGreaterOrEqualToZero").max(ref(FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT), "ShortCircuitCurrentLimitMinMaxError"),
|
|
112
|
-
[FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT]: number().nullable().min(0, "ShortCircuitCurrentLimitMustBeGreaterOrEqualToZero").when([FieldConstants.LOW_SHORT_CIRCUIT_CURRENT_LIMIT], {
|
|
109
|
+
[FieldConstants.LOW_VOLTAGE_LIMIT]: number().typeError(YUP_NOT_TYPE_NUMBER).nullable().min(0, "mustBeGreaterOrEqualToZero").max(ref(FieldConstants.HIGH_VOLTAGE_LIMIT), "voltageLevelNominalVoltageMaxValueError"),
|
|
110
|
+
[FieldConstants.HIGH_VOLTAGE_LIMIT]: number().typeError(YUP_NOT_TYPE_NUMBER).nullable().min(0, "mustBeGreaterOrEqualToZero"),
|
|
111
|
+
[FieldConstants.LOW_SHORT_CIRCUIT_CURRENT_LIMIT]: number().typeError(YUP_NOT_TYPE_NUMBER).nullable().min(0, "ShortCircuitCurrentLimitMustBeGreaterOrEqualToZero").max(ref(FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT), "ShortCircuitCurrentLimitMinMaxError"),
|
|
112
|
+
[FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT]: number().typeError(YUP_NOT_TYPE_NUMBER).nullable().min(0, "ShortCircuitCurrentLimitMustBeGreaterOrEqualToZero").when([FieldConstants.LOW_SHORT_CIRCUIT_CURRENT_LIMIT], {
|
|
113
113
|
is: (lowShortCircuitCurrentLimit) => lowShortCircuitCurrentLimit != null,
|
|
114
114
|
then: (schema) => schema.required(YUP_REQUIRED)
|
|
115
115
|
}),
|
|
116
116
|
[FieldConstants.HIDE_BUS_BAR_SECTION]: boolean().required(YUP_REQUIRED),
|
|
117
|
-
[FieldConstants.BUS_BAR_COUNT]: number().nullable().when([FieldConstants.HIDE_BUS_BAR_SECTION], {
|
|
117
|
+
[FieldConstants.BUS_BAR_COUNT]: number().typeError(YUP_NOT_TYPE_NUMBER).nullable().when([FieldConstants.HIDE_BUS_BAR_SECTION], {
|
|
118
118
|
is: (hideBusBarSection) => !hideBusBarSection,
|
|
119
119
|
then: (schema) => schema.min(1, "BusBarCountMustBeGreaterThanOrEqualToOne").required(YUP_REQUIRED)
|
|
120
120
|
}),
|
|
121
|
-
[FieldConstants.SECTION_COUNT]: number().nullable().when([FieldConstants.HIDE_BUS_BAR_SECTION], {
|
|
121
|
+
[FieldConstants.SECTION_COUNT]: number().typeError(YUP_NOT_TYPE_NUMBER).nullable().when([FieldConstants.HIDE_BUS_BAR_SECTION], {
|
|
122
122
|
is: (hideBusBarSection) => !hideBusBarSection,
|
|
123
123
|
then: (schema) => schema.min(1, "SectionCountMustBeGreaterThanOrEqualToOne").required(YUP_REQUIRED)
|
|
124
124
|
}),
|
|
@@ -2,7 +2,7 @@ import { object, number, string, boolean, ref } from "yup";
|
|
|
2
2
|
import { modificationPropertiesSchema, toModificationProperties, getPropertiesFromModification } from "../../common/properties/propertyUtils.js";
|
|
3
3
|
import { toModificationOperation, convertInputValue, convertOutputValue } from "../../../../utils/conversionUtils.js";
|
|
4
4
|
import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
|
|
5
|
-
import { YUP_REQUIRED } from "../../../../utils/constants/translationKeys.js";
|
|
5
|
+
import { YUP_NOT_TYPE_NUMBER, YUP_REQUIRED } from "../../../../utils/constants/translationKeys.js";
|
|
6
6
|
import "../../../../utils/types/equipmentType.js";
|
|
7
7
|
import { ModificationType } from "../../../../utils/types/modificationType.js";
|
|
8
8
|
import { FieldType } from "../../../../utils/types/fieldType.js";
|
|
@@ -15,20 +15,20 @@ const voltageLevelModificationFormSchema = object().shape({
|
|
|
15
15
|
[FieldConstants.EQUIPMENT_NAME]: string().nullable(),
|
|
16
16
|
[FieldConstants.HIDE_SUBSTATION_FIELD]: boolean().required(YUP_REQUIRED),
|
|
17
17
|
[FieldConstants.SUBSTATION_ID]: string().nullable(),
|
|
18
|
-
[FieldConstants.NOMINAL_V]: number().nullable().min(0, "mustBeGreaterOrEqualToZero"),
|
|
19
|
-
[FieldConstants.LOW_VOLTAGE_LIMIT]: number().nullable().min(0, "mustBeGreaterOrEqualToZero").when([FieldConstants.HIGH_VOLTAGE_LIMIT], {
|
|
18
|
+
[FieldConstants.NOMINAL_V]: number().typeError(YUP_NOT_TYPE_NUMBER).nullable().min(0, "mustBeGreaterOrEqualToZero"),
|
|
19
|
+
[FieldConstants.LOW_VOLTAGE_LIMIT]: number().typeError(YUP_NOT_TYPE_NUMBER).nullable().min(0, "mustBeGreaterOrEqualToZero").when([FieldConstants.HIGH_VOLTAGE_LIMIT], {
|
|
20
20
|
is: (highVoltageLimit) => highVoltageLimit != null,
|
|
21
21
|
then: (schema) => schema.max(ref(FieldConstants.HIGH_VOLTAGE_LIMIT), "voltageLevelNominalVoltageMaxValueError")
|
|
22
22
|
}),
|
|
23
|
-
[FieldConstants.HIGH_VOLTAGE_LIMIT]: number().nullable().min(0, "mustBeGreaterOrEqualToZero"),
|
|
24
|
-
[FieldConstants.LOW_SHORT_CIRCUIT_CURRENT_LIMIT]: number().nullable().min(0, "ShortCircuitCurrentLimitMustBeGreaterOrEqualToZero").when([FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT], {
|
|
23
|
+
[FieldConstants.HIGH_VOLTAGE_LIMIT]: number().typeError(YUP_NOT_TYPE_NUMBER).nullable().min(0, "mustBeGreaterOrEqualToZero"),
|
|
24
|
+
[FieldConstants.LOW_SHORT_CIRCUIT_CURRENT_LIMIT]: number().typeError(YUP_NOT_TYPE_NUMBER).nullable().min(0, "ShortCircuitCurrentLimitMustBeGreaterOrEqualToZero").when([FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT], {
|
|
25
25
|
is: (highShortCircuitCurrentLimit) => highShortCircuitCurrentLimit != null,
|
|
26
26
|
then: (schema) => schema.max(
|
|
27
27
|
ref(FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT),
|
|
28
28
|
"ShortCircuitCurrentLimitMinMaxError"
|
|
29
29
|
)
|
|
30
30
|
}),
|
|
31
|
-
[FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT]: number().nullable().min(0, "ShortCircuitCurrentLimitMustBeGreaterOrEqualToZero")
|
|
31
|
+
[FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT]: number().typeError(YUP_NOT_TYPE_NUMBER).nullable().min(0, "ShortCircuitCurrentLimitMustBeGreaterOrEqualToZero")
|
|
32
32
|
}).concat(modificationPropertiesSchema);
|
|
33
33
|
const voltageLevelModificationEmptyFormData = {
|
|
34
34
|
equipmentID: "",
|
|
@@ -39,7 +39,10 @@ function ContingencyTable({
|
|
|
39
39
|
);
|
|
40
40
|
useEffect(() => {
|
|
41
41
|
if (showContingencyCount) {
|
|
42
|
-
|
|
42
|
+
const hasNoContingencies = !contingencyListsInfos || (contingencyListsInfos.length ?? 0) === 0 || contingencyListsInfos.every(
|
|
43
|
+
(contingencyList) => (contingencyList[CONTINGENCY_LISTS]?.length ?? 0) === 0
|
|
44
|
+
);
|
|
45
|
+
if (hasNoContingencies) {
|
|
43
46
|
setSimulatedContingencyCount(null);
|
|
44
47
|
return;
|
|
45
48
|
}
|
|
@@ -63,7 +63,7 @@ const getSAParametersFormSchema = (name, limitReductions) => {
|
|
|
63
63
|
};
|
|
64
64
|
const toFormValueSaParameters = (params) => ({
|
|
65
65
|
[PARAM_SA_PROVIDER]: params[PARAM_SA_PROVIDER],
|
|
66
|
-
...toFormValuesContingencyListsInfos(params?.[CONTINGENCY_LISTS_INFOS]),
|
|
66
|
+
...toFormValuesContingencyListsInfos(params?.[CONTINGENCY_LISTS_INFOS] ?? []),
|
|
67
67
|
...toFormValuesLimitReductions(params?.limitReductions),
|
|
68
68
|
// SA specific form values
|
|
69
69
|
[PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD]: params[PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD] * 100,
|
|
@@ -70,6 +70,8 @@ const useModificationLabelComputer = () => {
|
|
|
70
70
|
return `: ${modificationMetadata.rootNetworkName} / ${modificationMetadata.nodeName} / ${computedDateFormatted}`;
|
|
71
71
|
}
|
|
72
72
|
return "";
|
|
73
|
+
case MODIFICATION_TYPES.COMPOSITE_MODIFICATION.type:
|
|
74
|
+
return modificationMetadata.name;
|
|
73
75
|
default:
|
|
74
76
|
return modificationMetadata.equipmentId || "";
|
|
75
77
|
}
|
package/dist/index.js
CHANGED
|
@@ -271,7 +271,7 @@ import { MAX_CHAR_DESCRIPTION } from "./utils/constants/uiConstants.js";
|
|
|
271
271
|
import { AMPERE, DEGREE, KILO_AMPERE, KILO_METER, KILO_VOLT, MEGA_VAR, MEGA_VOLT_AMPERE, MEGA_WATT, MICRO_SIEMENS, OHM, PERCENTAGE, SIEMENS } from "./utils/constants/unitsConstants.js";
|
|
272
272
|
import { COMMON_APP_NAME, COMMON_CONFIG_PARAMS_NAMES, LAST_SELECTED_DIRECTORY, PARAM_DEVELOPER_MODE, PARAM_LANGUAGE, PARAM_THEME } from "./utils/constants/configConstants.js";
|
|
273
273
|
import { FILTERS, FILTER_ID, FILTER_NAME, ID } from "./utils/constants/filterConstant.js";
|
|
274
|
-
import { DUPLICATED_PROPS_ERROR, YUP_REQUIRED } from "./utils/constants/translationKeys.js";
|
|
274
|
+
import { DUPLICATED_PROPS_ERROR, YUP_NOT_TYPE_NUMBER, YUP_REQUIRED } from "./utils/constants/translationKeys.js";
|
|
275
275
|
import { GRIDSUITE_DEFAULT_PRECISION, convertInputValue, convertOutputValue, isBlankOrEmpty, kiloUnitToUnit, microUnitToUnit, roundToDefaultPrecision, roundToPrecision, toModificationOperation, unitToKiloUnit, unitToMicroUnit } from "./utils/conversionUtils.js";
|
|
276
276
|
import { catchErrorHandler, extractErrorMessageDescriptor, snackWithFallback } from "./utils/error.js";
|
|
277
277
|
import { areArrayElementsUnique, arraysContainIdenticalStrings, isEmpty, isObjectEmpty, keyGenerator } from "./utils/functions.js";
|
|
@@ -838,6 +838,7 @@ export {
|
|
|
838
838
|
VoltageLevelCreationForm,
|
|
839
839
|
VoltageLevelModificationForm,
|
|
840
840
|
WRITE_SLACK_BUS,
|
|
841
|
+
YUP_NOT_TYPE_NUMBER,
|
|
841
842
|
YUP_REQUIRED,
|
|
842
843
|
alertThresholdMarks,
|
|
843
844
|
areArrayElementsUnique,
|
|
@@ -20,6 +20,7 @@ export declare const networkModificationsEn: {
|
|
|
20
20
|
'network_modifications.GENERATOR_MODIFICATION': string;
|
|
21
21
|
'network_modifications.LINE_CREATION': string;
|
|
22
22
|
'network_modifications.LINE_MODIFICATION': string;
|
|
23
|
+
'network_modifications.COMPOSITE_MODIFICATION': string;
|
|
23
24
|
'network_modifications.TWO_WINDINGS_TRANSFORMER_CREATION': string;
|
|
24
25
|
'network_modifications.TWO_WINDINGS_TRANSFORMER_MODIFICATION': string;
|
|
25
26
|
'network_modifications.OPERATING_STATUS_MODIFICATION': string;
|
|
@@ -115,6 +116,7 @@ export declare const networkModificationsEn: {
|
|
|
115
116
|
ShortCircuitCurrentLimitMinMaxError: string;
|
|
116
117
|
DuplicatedPropsError: string;
|
|
117
118
|
YupRequired: string;
|
|
119
|
+
YupNotTypeNumber: string;
|
|
118
120
|
CreateLoad: string;
|
|
119
121
|
loadType: string;
|
|
120
122
|
ConnectivityTab: string;
|
|
@@ -26,6 +26,7 @@ const networkModificationsEn = {
|
|
|
26
26
|
"network_modifications.GENERATOR_MODIFICATION": "Modifying generator {computedLabel}",
|
|
27
27
|
"network_modifications.LINE_CREATION": "Creating line {computedLabel}",
|
|
28
28
|
"network_modifications.LINE_MODIFICATION": "Modifying line {computedLabel}",
|
|
29
|
+
"network_modifications.COMPOSITE_MODIFICATION": "{computedLabel}",
|
|
29
30
|
"network_modifications.TWO_WINDINGS_TRANSFORMER_CREATION": "Creating 2 windings transformer {computedLabel}",
|
|
30
31
|
"network_modifications.TWO_WINDINGS_TRANSFORMER_MODIFICATION": "Modifying 2 windings transformer {computedLabel}",
|
|
31
32
|
"network_modifications.OPERATING_STATUS_MODIFICATION": "{action, select, TRIP {Trip {computedLabel}} LOCKOUT {Lock out {computedLabel}} ENERGISE_END_ONE {Energise {computedLabel} on {energizedEnd}} ENERGISE_END_TWO {Energise {computedLabel} on {energizedEnd}} SWITCH_ON {Switch on {computedLabel}} other {Equipment operating status modification {computedLabel}}}",
|
|
@@ -121,6 +122,7 @@ const networkModificationsEn = {
|
|
|
121
122
|
ShortCircuitCurrentLimitMinMaxError: "Low short-circuit current limit must be less than or equal to high limit",
|
|
122
123
|
[DUPLICATED_PROPS_ERROR]: "Duplicated properties: each property must be unique",
|
|
123
124
|
[YUP_REQUIRED]: "This field is required",
|
|
125
|
+
YupNotTypeNumber: "This field only accepts numeric values",
|
|
124
126
|
CreateLoad: "Create load",
|
|
125
127
|
loadType: "Type",
|
|
126
128
|
ConnectivityTab: "Connectivity",
|
|
@@ -20,6 +20,7 @@ export declare const networkModificationsFr: {
|
|
|
20
20
|
'network_modifications.GENERATOR_MODIFICATION': string;
|
|
21
21
|
'network_modifications.LINE_CREATION': string;
|
|
22
22
|
'network_modifications.LINE_MODIFICATION': string;
|
|
23
|
+
'network_modifications.COMPOSITE_MODIFICATION': string;
|
|
23
24
|
'network_modifications.TWO_WINDINGS_TRANSFORMER_CREATION': string;
|
|
24
25
|
'network_modifications.TWO_WINDINGS_TRANSFORMER_MODIFICATION': string;
|
|
25
26
|
'network_modifications.OPERATING_STATUS_MODIFICATION': string;
|
|
@@ -115,6 +116,7 @@ export declare const networkModificationsFr: {
|
|
|
115
116
|
ShortCircuitCurrentLimitMinMaxError: string;
|
|
116
117
|
DuplicatedPropsError: string;
|
|
117
118
|
YupRequired: string;
|
|
119
|
+
YupNotTypeNumber: string;
|
|
118
120
|
CreateLoad: string;
|
|
119
121
|
loadType: string;
|
|
120
122
|
ConnectivityTab: string;
|
|
@@ -26,6 +26,7 @@ const networkModificationsFr = {
|
|
|
26
26
|
"network_modifications.GENERATOR_MODIFICATION": "Modification du générateur {computedLabel}",
|
|
27
27
|
"network_modifications.LINE_CREATION": "Création de la ligne {computedLabel}",
|
|
28
28
|
"network_modifications.LINE_MODIFICATION": "Modification de la ligne {computedLabel}",
|
|
29
|
+
"network_modifications.COMPOSITE_MODIFICATION": "{computedLabel}",
|
|
29
30
|
"network_modifications.TWO_WINDINGS_TRANSFORMER_CREATION": "Création du transformateur à 2 enroulements {computedLabel}",
|
|
30
31
|
"network_modifications.TWO_WINDINGS_TRANSFORMER_MODIFICATION": "Modification du transformateur à 2 enroulements {computedLabel}",
|
|
31
32
|
"network_modifications.OPERATING_STATUS_MODIFICATION": "{action, select, TRIP {Déclenchement de {computedLabel}} LOCKOUT {Consignation de {computedLabel}} ENERGISE_END_ONE {Mise sous tension à vide de {computedLabel} depuis {energizedEnd}} ENERGISE_END_TWO {Mise sous tension à vide de {computedLabel} depuis {energizedEnd}} SWITCH_ON {Mise en service de {computedLabel}} other {Modification du statut opérationnel de l'équipement {computedLabel}}}",
|
|
@@ -121,6 +122,7 @@ const networkModificationsFr = {
|
|
|
121
122
|
ShortCircuitCurrentLimitMinMaxError: "La limite ICC min doit être inférieure ou égale à la limite ICC max",
|
|
122
123
|
[DUPLICATED_PROPS_ERROR]: "Propriétés dupliquées : chaque propriété doit être unique",
|
|
123
124
|
[YUP_REQUIRED]: "Ce champ doit être renseigné",
|
|
125
|
+
YupNotTypeNumber: "Ce champ n'accepte que des valeurs numériques",
|
|
124
126
|
CreateLoad: "Créer une consommation",
|
|
125
127
|
loadType: "Type",
|
|
126
128
|
ConnectivityTab: "Connectivité",
|
|
@@ -5,7 +5,7 @@ import { MAX_CHAR_DESCRIPTION } from "./uiConstants.js";
|
|
|
5
5
|
import { AMPERE, DEGREE, KILO_AMPERE, KILO_METER, KILO_VOLT, MEGA_VAR, MEGA_VOLT_AMPERE, MEGA_WATT, MICRO_SIEMENS, OHM, PERCENTAGE, SIEMENS } from "./unitsConstants.js";
|
|
6
6
|
import { COMMON_APP_NAME, COMMON_CONFIG_PARAMS_NAMES, LAST_SELECTED_DIRECTORY, PARAM_DEVELOPER_MODE, PARAM_LANGUAGE, PARAM_THEME } from "./configConstants.js";
|
|
7
7
|
import { FILTERS, FILTER_ID, FILTER_NAME, ID } from "./filterConstant.js";
|
|
8
|
-
import { DUPLICATED_PROPS_ERROR, YUP_REQUIRED } from "./translationKeys.js";
|
|
8
|
+
import { DUPLICATED_PROPS_ERROR, YUP_NOT_TYPE_NUMBER, YUP_REQUIRED } from "./translationKeys.js";
|
|
9
9
|
export {
|
|
10
10
|
AMPERE,
|
|
11
11
|
ActivePowerAdornment,
|
|
@@ -44,5 +44,6 @@ export {
|
|
|
44
44
|
SIEMENS,
|
|
45
45
|
SusceptanceAdornment,
|
|
46
46
|
VoltageAdornment,
|
|
47
|
+
YUP_NOT_TYPE_NUMBER,
|
|
47
48
|
YUP_REQUIRED
|
|
48
49
|
};
|
package/dist/utils/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { MAX_CHAR_DESCRIPTION } from "./constants/uiConstants.js";
|
|
|
6
6
|
import { AMPERE, DEGREE, KILO_AMPERE, KILO_METER, KILO_VOLT, MEGA_VAR, MEGA_VOLT_AMPERE, MEGA_WATT, MICRO_SIEMENS, OHM, PERCENTAGE, SIEMENS } from "./constants/unitsConstants.js";
|
|
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
|
-
import { DUPLICATED_PROPS_ERROR, YUP_REQUIRED } from "./constants/translationKeys.js";
|
|
9
|
+
import { DUPLICATED_PROPS_ERROR, YUP_NOT_TYPE_NUMBER, YUP_REQUIRED } from "./constants/translationKeys.js";
|
|
10
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";
|
|
@@ -127,6 +127,7 @@ export {
|
|
|
127
127
|
VSC,
|
|
128
128
|
VoltageAdornment,
|
|
129
129
|
VoltageLevel,
|
|
130
|
+
YUP_NOT_TYPE_NUMBER,
|
|
130
131
|
YUP_REQUIRED,
|
|
131
132
|
areArrayElementsUnique,
|
|
132
133
|
areIdsEqual,
|