@gridsuite/commons-ui 0.255.0 → 0.257.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.
Files changed (93) hide show
  1. package/dist/components/composite/filter/FilterCreationDialog.js +6 -2
  2. package/dist/components/composite/filter/HeaderFilterForm.js +3 -2
  3. package/dist/components/composite/reactQueryBuilder/CustomReactQueryBuilder.js +7 -4
  4. package/dist/components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js +2 -1
  5. package/dist/components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js +2 -1
  6. package/dist/features/index.js +16 -0
  7. package/dist/features/network-modifications/battery/creation/batteryCreation.utils.js +3 -2
  8. package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.d.ts +5 -1
  9. package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.js +50 -10
  10. package/dist/features/network-modifications/battery/modification/BatteryModificationForm.d.ts +5 -1
  11. package/dist/features/network-modifications/battery/modification/BatteryModificationForm.js +4 -2
  12. package/dist/features/network-modifications/battery/modification/batteryModification.types.d.ts +6 -0
  13. package/dist/features/network-modifications/battery/modification/batteryModification.utils.d.ts +32 -0
  14. package/dist/features/network-modifications/battery/modification/batteryModification.utils.js +23 -2
  15. package/dist/features/network-modifications/by-filter/assignment/assignment/assignment-form.js +2 -1
  16. package/dist/features/network-modifications/by-filter/assignment/assignment/assignment-utils.js +2 -2
  17. package/dist/features/network-modifications/by-filter/formula/formula/formula-constants.d.ts +10 -0
  18. package/dist/features/network-modifications/by-filter/formula/formula/formula-constants.js +10 -0
  19. package/dist/features/network-modifications/by-filter/formula/formula/formula-form.d.ts +12 -0
  20. package/dist/features/network-modifications/by-filter/formula/formula/formula-form.js +139 -0
  21. package/dist/features/network-modifications/by-filter/formula/formula/formula-utils.d.ts +40 -0
  22. package/dist/features/network-modifications/by-filter/formula/formula/formula-utils.js +164 -0
  23. package/dist/features/network-modifications/by-filter/formula/formula/formula.type.d.ts +27 -0
  24. package/dist/features/network-modifications/by-filter/formula/formula/formula.type.js +1 -0
  25. package/dist/features/network-modifications/by-filter/formula/formula/reference-autocomplete-input.d.ts +15 -0
  26. package/dist/features/network-modifications/by-filter/formula/formula/reference-autocomplete-input.js +123 -0
  27. package/dist/features/network-modifications/by-filter/formula/index.d.ts +11 -0
  28. package/dist/features/network-modifications/by-filter/formula/index.js +18 -0
  29. package/dist/features/network-modifications/by-filter/formula/modification-by-formula-form.d.ts +1 -0
  30. package/dist/features/network-modifications/by-filter/formula/modification-by-formula-form.js +110 -0
  31. package/dist/features/network-modifications/by-filter/formula/modificationByFormula.utils.d.ts +32 -0
  32. package/dist/features/network-modifications/by-filter/formula/modificationByFormula.utils.js +126 -0
  33. package/dist/features/network-modifications/by-filter/index.d.ts +1 -0
  34. package/dist/features/network-modifications/by-filter/index.js +17 -1
  35. package/dist/features/network-modifications/common/activePowerControl/activePowerControlForm.utils.js +2 -1
  36. package/dist/features/network-modifications/common/connectivity/connectivityForm.utils.js +2 -1
  37. package/dist/features/network-modifications/common/currentLimits/limitsPane.utils.js +2 -1
  38. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/reactiveCapability.utils.js +2 -1
  39. package/dist/features/network-modifications/common/reactiveLimits/reactiveLimits.utils.js +3 -2
  40. package/dist/features/network-modifications/common/voltageRegulation/VoltageRegulationForm.js +1 -1
  41. package/dist/features/network-modifications/common/voltageRegulation/voltageRegulation.utils.js +3 -2
  42. package/dist/features/network-modifications/generator/creation/generatorCreation.utils.js +4 -3
  43. package/dist/features/network-modifications/generator/modification/generatorModification.utils.js +5 -4
  44. package/dist/features/network-modifications/index.js +16 -0
  45. package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.js +7 -6
  46. package/dist/features/network-modifications/shunt-compensator/common/characteristicsForm.utils.js +7 -6
  47. package/dist/features/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js +10 -9
  48. package/dist/features/network-modifications/voltageLevel/modification/voltageLevelModification.utils.js +6 -5
  49. package/dist/features/parameters/common/limitreductions/columns-definitions.js +3 -2
  50. package/dist/features/parameters/dynamic-margin-calculation/loads-variations-parameters.js +2 -2
  51. package/dist/features/parameters/security-analysis/columns-definitions.js +4 -3
  52. package/dist/features/parameters/voltage-init/use-voltage-init-parameters-form.js +3 -3
  53. package/dist/hooks/use-unique-name-validation.js +3 -2
  54. package/dist/index.js +43 -1
  55. package/dist/translations/en/descriptionEn.d.ts +0 -6
  56. package/dist/translations/en/descriptionEn.js +6 -1
  57. package/dist/translations/en/filterEn.d.ts +0 -2
  58. package/dist/translations/en/filterEn.js +0 -2
  59. package/dist/translations/en/generic-validationEn.d.ts +23 -0
  60. package/dist/translations/en/generic-validationEn.js +25 -0
  61. package/dist/translations/en/index.d.ts +2 -0
  62. package/dist/translations/en/index.js +4 -0
  63. package/dist/translations/en/network-modification-validationEn.d.ts +23 -0
  64. package/dist/translations/en/network-modification-validationEn.js +31 -0
  65. package/dist/translations/en/networkModificationsEn.d.ts +16 -30
  66. package/dist/translations/en/networkModificationsEn.js +10 -35
  67. package/dist/translations/en/parameters.d.ts +0 -2
  68. package/dist/translations/en/parameters.js +0 -2
  69. package/dist/translations/en/use-unique-name-validation-en.d.ts +0 -2
  70. package/dist/translations/en/use-unique-name-validation-en.js +1 -3
  71. package/dist/translations/fr/descriptionFr.d.ts +0 -6
  72. package/dist/translations/fr/descriptionFr.js +6 -1
  73. package/dist/translations/fr/filterFr.d.ts +0 -2
  74. package/dist/translations/fr/filterFr.js +0 -2
  75. package/dist/translations/fr/generic-validationFr.d.ts +17 -0
  76. package/dist/translations/fr/generic-validationFr.js +25 -0
  77. package/dist/translations/fr/index.d.ts +2 -0
  78. package/dist/translations/fr/index.js +4 -0
  79. package/dist/translations/fr/network-modification-validationFr.d.ts +23 -0
  80. package/dist/translations/fr/network-modification-validationFr.js +31 -0
  81. package/dist/translations/fr/networkModificationsFr.d.ts +16 -30
  82. package/dist/translations/fr/networkModificationsFr.js +10 -35
  83. package/dist/translations/fr/parameters.d.ts +0 -2
  84. package/dist/translations/fr/parameters.js +0 -2
  85. package/dist/translations/fr/use-unique-name-validation-fr.d.ts +0 -2
  86. package/dist/translations/fr/use-unique-name-validation-fr.js +1 -3
  87. package/dist/utils/constants/fieldConstants.d.ts +1 -0
  88. package/dist/utils/constants/fieldConstants.js +1 -0
  89. package/dist/utils/constants/index.js +19 -1
  90. package/dist/utils/constants/translationKeys.d.ts +18 -0
  91. package/dist/utils/constants/translationKeys.js +36 -0
  92. package/dist/utils/index.js +19 -1
  93. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  import { object, array, string, ref, number, boolean } from "yup";
2
2
  import { creationPropertiesSchema, getPropertiesFromModification, emptyProperties, toModificationProperties } from "../../common/properties/propertyUtils.js";
3
3
  import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
4
+ import { SHORT_CIRCUIT_CURRENT_LIMIT_MUST_BE_GREATER_OR_EQUAL_TO_ZERO, MUST_BE_GREATER_OR_EQUAL_TO_ZERO, CREATE_SUBSTATION_IN_VOLTAGE_LEVEL_IDENTICAL_ID } from "../../../../utils/constants/translationKeys.js";
4
5
  import { convertInputValue, convertOutputValue } from "../../../../utils/conversionUtils.js";
5
6
  import "../../../../utils/types/equipmentType.js";
6
7
  import { MODIFICATION_TYPES } from "../../../../utils/types/modificationType.js";
@@ -101,13 +102,13 @@ const voltageLevelCreationFormSchema = object().shape({
101
102
  is: (addSubstationCreation) => !addSubstationCreation,
102
103
  then: (schema) => schema.notOneOf(
103
104
  [ref(FieldConstants.SUBSTATION_ID), null],
104
- "CreateSubstationInVoltageLevelIdenticalId"
105
+ CREATE_SUBSTATION_IN_VOLTAGE_LEVEL_IDENTICAL_ID
105
106
  )
106
107
  }).when([FieldConstants.ADD_SUBSTATION_CREATION], {
107
108
  is: (addSubstationCreation) => addSubstationCreation,
108
109
  then: (schema) => schema.notOneOf(
109
110
  [ref(FieldConstants.SUBSTATION_CREATION_ID), null],
110
- "CreateSubstationInVoltageLevelIdenticalId"
111
+ CREATE_SUBSTATION_IN_VOLTAGE_LEVEL_IDENTICAL_ID
111
112
  )
112
113
  }),
113
114
  [FieldConstants.EQUIPMENT_NAME]: string().nullable(),
@@ -116,14 +117,14 @@ const voltageLevelCreationFormSchema = object().shape({
116
117
  is: (addSubstationCreation) => !addSubstationCreation,
117
118
  then: (schema) => schema.required().notOneOf(
118
119
  [ref(FieldConstants.EQUIPMENT_ID), null],
119
- "CreateSubstationInVoltageLevelIdenticalId"
120
+ CREATE_SUBSTATION_IN_VOLTAGE_LEVEL_IDENTICAL_ID
120
121
  )
121
122
  }),
122
123
  [FieldConstants.SUBSTATION_CREATION_ID]: string().nullable().when([FieldConstants.ADD_SUBSTATION_CREATION], {
123
124
  is: (addSubstationCreation) => addSubstationCreation,
124
125
  then: (schema) => schema.required().notOneOf(
125
126
  [ref(FieldConstants.EQUIPMENT_ID), null],
126
- "CreateSubstationInVoltageLevelIdenticalId"
127
+ CREATE_SUBSTATION_IN_VOLTAGE_LEVEL_IDENTICAL_ID
127
128
  )
128
129
  }),
129
130
  [FieldConstants.SUBSTATION_NAME]: string().nullable(),
@@ -135,12 +136,12 @@ const voltageLevelCreationFormSchema = object().shape({
135
136
  [FieldConstants.HIDE_NOMINAL_VOLTAGE]: boolean().required(),
136
137
  [FieldConstants.NOMINAL_V]: number().nullable().when([FieldConstants.HIDE_NOMINAL_VOLTAGE], {
137
138
  is: (hideNominalVoltage) => !hideNominalVoltage,
138
- then: (schema) => schema.min(0, "mustBeGreaterOrEqualToZero").required()
139
+ then: (schema) => schema.min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO).required()
139
140
  }),
140
- [FieldConstants.LOW_VOLTAGE_LIMIT]: number().nullable().min(0, "mustBeGreaterOrEqualToZero").max(ref(FieldConstants.HIGH_VOLTAGE_LIMIT), "voltageLevelNominalVoltageMaxValueError"),
141
- [FieldConstants.HIGH_VOLTAGE_LIMIT]: number().nullable().min(0, "mustBeGreaterOrEqualToZero"),
142
- [FieldConstants.LOW_SHORT_CIRCUIT_CURRENT_LIMIT]: number().nullable().min(0, "ShortCircuitCurrentLimitMustBeGreaterOrEqualToZero").max(ref(FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT), "ShortCircuitCurrentLimitMinMaxError"),
143
- [FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT]: number().nullable().min(0, "ShortCircuitCurrentLimitMustBeGreaterOrEqualToZero").when([FieldConstants.LOW_SHORT_CIRCUIT_CURRENT_LIMIT], {
141
+ [FieldConstants.LOW_VOLTAGE_LIMIT]: number().nullable().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO).max(ref(FieldConstants.HIGH_VOLTAGE_LIMIT), "voltageLevelNominalVoltageMaxValueError"),
142
+ [FieldConstants.HIGH_VOLTAGE_LIMIT]: number().nullable().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO),
143
+ [FieldConstants.LOW_SHORT_CIRCUIT_CURRENT_LIMIT]: number().nullable().min(0, SHORT_CIRCUIT_CURRENT_LIMIT_MUST_BE_GREATER_OR_EQUAL_TO_ZERO).max(ref(FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT), "ShortCircuitCurrentLimitMinMaxError"),
144
+ [FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT]: number().nullable().min(0, SHORT_CIRCUIT_CURRENT_LIMIT_MUST_BE_GREATER_OR_EQUAL_TO_ZERO).when([FieldConstants.LOW_SHORT_CIRCUIT_CURRENT_LIMIT], {
144
145
  is: (lowShortCircuitCurrentLimit) => lowShortCircuitCurrentLimit != null,
145
146
  then: (schema) => schema.required()
146
147
  }),
@@ -2,6 +2,7 @@ import { object, number, ref, string, boolean, array } from "yup";
2
2
  import { modificationPropertiesSchema, getPropertiesFromModification, toModificationProperties } from "../../common/properties/propertyUtils.js";
3
3
  import { convertInputValue, toModificationOperation, convertOutputValue } from "../../../../utils/conversionUtils.js";
4
4
  import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
5
+ import { SHORT_CIRCUIT_CURRENT_LIMIT_MUST_BE_GREATER_OR_EQUAL_TO_ZERO, MUST_BE_GREATER_OR_EQUAL_TO_ZERO } from "../../../../utils/constants/translationKeys.js";
5
6
  import "../../../../utils/types/equipmentType.js";
6
7
  import { ModificationType } from "../../../../utils/types/modificationType.js";
7
8
  import { FieldType } from "../../../../utils/types/fieldType.js";
@@ -13,20 +14,20 @@ const voltageLevelModificationFormSchema = object().shape({
13
14
  [FieldConstants.EQUIPMENT_NAME]: string().nullable(),
14
15
  [FieldConstants.HIDE_SUBSTATION_FIELD]: boolean().required(),
15
16
  [FieldConstants.SUBSTATION_ID]: string().nullable(),
16
- [FieldConstants.NOMINAL_V]: number().nullable().min(0, "mustBeGreaterOrEqualToZero"),
17
- [FieldConstants.LOW_VOLTAGE_LIMIT]: number().nullable().min(0, "mustBeGreaterOrEqualToZero").when([FieldConstants.HIGH_VOLTAGE_LIMIT], {
17
+ [FieldConstants.NOMINAL_V]: number().nullable().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO),
18
+ [FieldConstants.LOW_VOLTAGE_LIMIT]: number().nullable().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO).when([FieldConstants.HIGH_VOLTAGE_LIMIT], {
18
19
  is: (highVoltageLimit) => highVoltageLimit != null,
19
20
  then: (schema) => schema.max(ref(FieldConstants.HIGH_VOLTAGE_LIMIT), "voltageLevelNominalVoltageMaxValueError")
20
21
  }),
21
- [FieldConstants.HIGH_VOLTAGE_LIMIT]: number().nullable().min(0, "mustBeGreaterOrEqualToZero"),
22
- [FieldConstants.LOW_SHORT_CIRCUIT_CURRENT_LIMIT]: number().nullable().min(0, "ShortCircuitCurrentLimitMustBeGreaterOrEqualToZero").when([FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT], {
22
+ [FieldConstants.HIGH_VOLTAGE_LIMIT]: number().nullable().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO),
23
+ [FieldConstants.LOW_SHORT_CIRCUIT_CURRENT_LIMIT]: number().nullable().min(0, SHORT_CIRCUIT_CURRENT_LIMIT_MUST_BE_GREATER_OR_EQUAL_TO_ZERO).when([FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT], {
23
24
  is: (highShortCircuitCurrentLimit) => highShortCircuitCurrentLimit != null,
24
25
  then: (schema) => schema.max(
25
26
  ref(FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT),
26
27
  "ShortCircuitCurrentLimitMinMaxError"
27
28
  )
28
29
  }),
29
- [FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT]: number().nullable().min(0, "ShortCircuitCurrentLimitMustBeGreaterOrEqualToZero")
30
+ [FieldConstants.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT]: number().nullable().min(0, SHORT_CIRCUIT_CURRENT_LIMIT_MUST_BE_GREATER_OR_EQUAL_TO_ZERO)
30
31
  }).concat(modificationPropertiesSchema);
31
32
  const voltageLevelModificationEmptyFormData = {
32
33
  equipmentID: "",
@@ -1,4 +1,5 @@
1
1
  import * as yup from "yup";
2
+ import { REAL_PERCENTAGE } from "../../../../utils/constants/translationKeys.js";
2
3
  const LIMIT_REDUCTIONS_FORM = "limitReductionsForm";
3
4
  const VOLTAGE_LEVELS_FORM = "voltageLevelsForm";
4
5
  const IST_FORM = "istForm";
@@ -18,7 +19,7 @@ const COLUMNS_DEFINITIONS_LIMIT_REDUCTIONS = [
18
19
  const getLimitDurationsFormSchema = (nbLimits) => {
19
20
  const limitDurationsFormSchema = {};
20
21
  for (let i = 0; i < nbLimits; i++) {
21
- limitDurationsFormSchema[LIMIT_DURATION_FORM + i] = yup.number().min(0, "RealPercentage").max(1, "RealPercentage").nullable().required();
22
+ limitDurationsFormSchema[LIMIT_DURATION_FORM + i] = yup.number().min(0, REAL_PERCENTAGE).max(1, REAL_PERCENTAGE).nullable().required();
22
23
  }
23
24
  return limitDurationsFormSchema;
24
25
  };
@@ -27,7 +28,7 @@ const getLimitReductionsFormSchema = (nbTemporaryLimits) => {
27
28
  [LIMIT_REDUCTIONS_FORM]: yup.array().of(
28
29
  yup.object().shape({
29
30
  [VOLTAGE_LEVELS_FORM]: yup.string(),
30
- [IST_FORM]: yup.number().min(0, "RealPercentage").max(1, "RealPercentage").nullable().required(),
31
+ [IST_FORM]: yup.number().min(0, REAL_PERCENTAGE).max(1, REAL_PERCENTAGE).nullable().required(),
31
32
  ...getLimitDurationsFormSchema(nbTemporaryLimits)
32
33
  })
33
34
  )
@@ -5,7 +5,7 @@ import { Grid2 } from "@mui/material";
5
5
  import * as yup from "yup";
6
6
  import { LOADS_VARIATIONS, VARIATION, LOAD_FILTERS, LOAD_MODELS_RULE, ACCURACY, CALCULATION_TYPE } from "./constants.js";
7
7
  import { ID } from "../../../utils/constants/filterConstant.js";
8
- import { YUP_REQUIRED } from "../../../utils/constants/translationKeys.js";
8
+ import { MUST_BE_GREATER_OR_EQUAL_TO_ZERO, YUP_REQUIRED } from "../../../utils/constants/translationKeys.js";
9
9
  import "../../../utils/conversionUtils.js";
10
10
  import { ElementType } from "../../../utils/types/elementType.js";
11
11
  import { EquipmentType } from "../../../utils/types/equipmentType.js";
@@ -54,7 +54,7 @@ const formSchema = yup.object().shape({
54
54
  [NAME]: yup.string().nullable().notRequired()
55
55
  })
56
56
  ).min(1, YUP_REQUIRED),
57
- [VARIATION]: yup.number().min(0, "mustBeGreaterOrEqualToZero").required(),
57
+ [VARIATION]: yup.number().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO).required(),
58
58
  [ACTIVE]: yup.boolean().nullable().notRequired()
59
59
  })
60
60
  )
@@ -5,6 +5,7 @@ import "@mui/icons-material";
5
5
  import "react";
6
6
  import "react-intl";
7
7
  import "../../../components/ui/overflowableText/OverflowableText.js";
8
+ import { NORMALIZED_PERCENTAGE } from "../../../utils/constants/translationKeys.js";
8
9
  import "../../../utils/conversionUtils.js";
9
10
  import "../../../utils/types/equipmentType.js";
10
11
  import "react-hook-form";
@@ -48,10 +49,10 @@ const getSAParametersFormSchema = (name, limitReductions) => {
48
49
  limitReductions?.length ? limitReductions[0].temporaryLimitReductions.length : 0
49
50
  );
50
51
  const thresholdsSchema = yup.object().shape({
51
- [FLOW_PROPORTIONAL_THRESHOLD]: yup.number().min(0, "NormalizedPercentage").max(100, "NormalizedPercentage").required(),
52
- [LOW_VOLTAGE_PROPORTIONAL_THRESHOLD]: yup.number().min(0, "NormalizedPercentage").max(100, "NormalizedPercentage").required(),
52
+ [FLOW_PROPORTIONAL_THRESHOLD]: yup.number().min(0, NORMALIZED_PERCENTAGE).max(100, NORMALIZED_PERCENTAGE).required(),
53
+ [LOW_VOLTAGE_PROPORTIONAL_THRESHOLD]: yup.number().min(0, NORMALIZED_PERCENTAGE).max(100, NORMALIZED_PERCENTAGE).required(),
53
54
  [LOW_VOLTAGE_ABSOLUTE_THRESHOLD]: yup.number().required(),
54
- [HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD]: yup.number().min(0, "NormalizedPercentage").max(100, "NormalizedPercentage").required(),
55
+ [HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD]: yup.number().min(0, NORMALIZED_PERCENTAGE).max(100, NORMALIZED_PERCENTAGE).required(),
55
56
  [HIGH_VOLTAGE_ABSOLUTE_THRESHOLD]: yup.number().required()
56
57
  });
57
58
  return yup.object().shape({
@@ -8,7 +8,7 @@ import "@mui/icons-material";
8
8
  import "react-intl";
9
9
  import "../../../components/ui/overflowableText/OverflowableText.js";
10
10
  import { ID, FILTERS } from "../../../utils/constants/filterConstant.js";
11
- import { YUP_REQUIRED } from "../../../utils/constants/translationKeys.js";
11
+ import { MUST_BE_GREATER_OR_EQUAL_TO_ZERO, YUP_REQUIRED } from "../../../utils/constants/translationKeys.js";
12
12
  import { isBlankOrEmpty } from "../../../utils/conversionUtils.js";
13
13
  import { snackWithFallback } from "../../../utils/error.js";
14
14
  import { ElementType } from "../../../utils/types/elementType.js";
@@ -88,10 +88,10 @@ const useVoltageInitParametersForm = ({
88
88
  [NAME]: yup.string().required()
89
89
  })
90
90
  ).min(1, YUP_REQUIRED),
91
- [LOW_VOLTAGE_LIMIT]: yup.number().min(0, "mustBeGreaterOrEqualToZero").nullable().test((value, context) => {
91
+ [LOW_VOLTAGE_LIMIT]: yup.number().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO).nullable().test((value, context) => {
92
92
  return !isBlankOrEmpty(value) || !isBlankOrEmpty(context.parent[HIGH_VOLTAGE_LIMIT]);
93
93
  }),
94
- [HIGH_VOLTAGE_LIMIT]: yup.number().min(0, "mustBeGreaterOrEqualToZero").nullable().test((value, context) => {
94
+ [HIGH_VOLTAGE_LIMIT]: yup.number().min(0, MUST_BE_GREATER_OR_EQUAL_TO_ZERO).nullable().test((value, context) => {
95
95
  return !isBlankOrEmpty(value) || !isBlankOrEmpty(context.parent[LOW_VOLTAGE_LIMIT]);
96
96
  })
97
97
  })
@@ -1,6 +1,7 @@
1
1
  import { useRef, useCallback, useEffect } from "react";
2
2
  import { useFormContext, useController } from "react-hook-form";
3
3
  import { FieldConstants } from "../utils/constants/fieldConstants.js";
4
+ import { NAME_ALREADY_USED, NAME_EMPTY } from "../utils/constants/translationKeys.js";
4
5
  import "../utils/conversionUtils.js";
5
6
  import "../utils/types/equipmentType.js";
6
7
  import "react/jsx-runtime";
@@ -41,7 +42,7 @@ function useUniqueNameValidation({
41
42
  if (alreadyExist) {
42
43
  setError(name, {
43
44
  type: "validate",
44
- message: "use-unique-name-validation/nameAlreadyUsed"
45
+ message: NAME_ALREADY_USED
45
46
  });
46
47
  }
47
48
  }).catch(() => {
@@ -97,7 +98,7 @@ function useUniqueNameValidation({
97
98
  clearErrors("root.isValidating");
98
99
  setError(name, {
99
100
  type: "validate",
100
- message: "use-unique-name-validation/nameEmpty"
101
+ message: NAME_EMPTY
101
102
  });
102
103
  }
103
104
  }, [
package/dist/index.js CHANGED
@@ -295,7 +295,7 @@ import { MAX_CHAR_DESCRIPTION } from "./utils/constants/uiConstants.js";
295
295
  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";
296
296
  import { COMMON_APP_NAME, COMMON_CONFIG_PARAMS_NAMES, LAST_SELECTED_DIRECTORY, PARAM_DEVELOPER_MODE, PARAM_LANGUAGE, PARAM_THEME } from "./utils/constants/configConstants.js";
297
297
  import { FILTERS, FILTER_ID, FILTER_NAME, ID } from "./utils/constants/filterConstant.js";
298
- import { DUPLICATED_PROPS_ERROR, YUP_DEFAULT, YUP_NOT_NULL, YUP_NOT_TYPE_DEFAULT, YUP_NOT_TYPE_NUMBER, YUP_POSITIVE, YUP_REQUIRED } from "./utils/constants/translationKeys.js";
298
+ import { ACTIVE_LIMITS_MIN_MAX_INVALID, CREATE_SUBSTATION_IN_VOLTAGE_LEVEL_IDENTICAL_ID, DESCRIPTION_LIMIT_ERROR, DUPLICATED_PROPS_ERROR, MAXIMUM_SECTION_COUNT_MUST_BE_GREATER_OR_EQUAL_TO_ONE, MIN_ACTIVE_POWER_MUST_BE_LESS_OR_EQUAL_TO_MAX_ACTIVE_POWER, MUST_BE_GREATER_OR_EQUAL_TO_ZERO, NAME_ALREADY_USED, NAME_EMPTY, NORMALIZED_PERCENTAGE, NUMERIC_VALUE_OR_EMPTY_FIELD, REACTIVE_LIMITS_MIN_MAX_INVALID, REAL_PERCENTAGE, SECTION_COUNT_MUST_BE_BETWEEN_ZERO_AND_MAXIMUM_SECTION_COUNT, SHORT_CIRCUIT_CURRENT_LIMIT_MUST_BE_GREATER_OR_EQUAL_TO_ZERO, SHUNT_COMPENSATOR_ERROR_Q_AT_NOMINAL_VOLTAGE_LESS_THAN_ZERO, VALUE_MUST_BE_NUMERIC_WHEN_PERCENTAGE_ERROR, VALUE_MUST_BE_REF_WHEN_PERCENTAGE_ERROR, WRONG_REF_OR_VALUE_ERROR, YUP_DEFAULT, YUP_NOT_NULL, YUP_NOT_TYPE_DEFAULT, YUP_NOT_TYPE_NUMBER, YUP_POSITIVE, YUP_REQUIRED } from "./utils/constants/translationKeys.js";
299
299
  import { GRIDSUITE_DEFAULT_PRECISION, convertInputValue, convertOutputValue, isBlankOrEmpty, kiloUnitToUnit, microUnitToUnit, roundToDefaultPrecision, roundToPrecision, toModificationOperation, unitToKiloUnit, unitToMicroUnit } from "./utils/conversionUtils.js";
300
300
  import { catchErrorHandler, extractErrorMessageDescriptor, snackWithFallback } from "./utils/error.js";
301
301
  import { isDisabledValidationButton } from "./utils/form-utils.js";
@@ -366,6 +366,10 @@ import { EQUIPMENT_TYPE_ORDER, byFilterDeletionDtoToForm, byFilterDeletionFormSc
366
366
  import { ModificationByAssignmentForm } from "./features/network-modifications/by-filter/assignment/modification-by-assignment-form.js";
367
367
  import { emptyModificationByAssignmentFormData, modificationByAssignmentDtoToForm, modificationByAssignmentFormSchema, modificationByAssignmentFormToDto } from "./features/network-modifications/by-filter/assignment/modificationByAssignment.utils.js";
368
368
  import { DataType as DataType2 } from "./features/network-modifications/by-filter/assignment/assignment/assignment.type.js";
369
+ import { ModificationByFormulaForm } from "./features/network-modifications/by-filter/formula/modification-by-formula-form.js";
370
+ import { EQUIPMENTS_FIELDS, getFormulaInitialValue, getFormulaSchema } from "./features/network-modifications/by-filter/formula/formula/formula-utils.js";
371
+ import { emptyModificationFormData, modificationByFormulaDtoToForm, modificationByFormulaFormSchema, modificationByFormulaFormToDto } from "./features/network-modifications/by-filter/formula/modificationByFormula.utils.js";
372
+ import { FORMULAS, OPERATOR, REFERENCE_FIELD_OR_VALUE_1, REFERENCE_FIELD_OR_VALUE_2 } from "./features/network-modifications/by-filter/formula/formula/formula-constants.js";
369
373
  import { generatorCreationDtoToForm, generatorCreationEmptyFormData, generatorCreationFormSchema, generatorCreationFormToDto } from "./features/network-modifications/generator/creation/generatorCreation.utils.js";
370
374
  import { GeneratorCreationForm } from "./features/network-modifications/generator/creation/GeneratorCreationForm.js";
371
375
  import { generatorModificationDtoToForm, generatorModificationEmptyFormData, generatorModificationFormSchema, generatorModificationFormToDto } from "./features/network-modifications/generator/modification/generatorModification.utils.js";
@@ -469,12 +473,14 @@ import { tableEn } from "./translations/en/tableEn.js";
469
473
  import { topBarEn } from "./translations/en/topBarEn.js";
470
474
  import { treeviewFinderEn } from "./translations/en/treeviewFinderEn.js";
471
475
  import { networkModificationsEn } from "./translations/en/networkModificationsEn.js";
476
+ import { networkModificationValidationEn } from "./translations/en/network-modification-validationEn.js";
472
477
  import { exportParamsEn } from "./translations/en/external/exportParamsEn.js";
473
478
  import { importParamsEn } from "./translations/en/external/importParamsEn.js";
474
479
  import { componentsEn } from "./translations/en/componentsEn.js";
475
480
  import { parametersEn } from "./translations/en/parameters.js";
476
481
  import { useUniqueNameValidationEn } from "./translations/en/use-unique-name-validation-en.js";
477
482
  import { processConfigEn } from "./translations/en/processConfigEn.js";
483
+ import { genericValidationEn } from "./translations/en/generic-validationEn.js";
478
484
  import { cardErrorBoundaryFr } from "./translations/fr/cardErrorBoundaryFr.js";
479
485
  import { businessErrorsFr } from "./translations/fr/businessErrorsFr.js";
480
486
  import { commonButtonFr } from "./translations/fr/commonButtonFr.js";
@@ -499,15 +505,18 @@ import { tableFr } from "./translations/fr/tableFr.js";
499
505
  import { topBarFr } from "./translations/fr/topBarFr.js";
500
506
  import { treeviewFinderFr } from "./translations/fr/treeviewFinderFr.js";
501
507
  import { networkModificationsFr } from "./translations/fr/networkModificationsFr.js";
508
+ import { networkModificationValidationFr } from "./translations/fr/network-modification-validationFr.js";
502
509
  import { exportParamsFr } from "./translations/fr/external/exportParamsFr.js";
503
510
  import { importParamsFr } from "./translations/fr/external/importParamsFr.js";
504
511
  import { componentsFr } from "./translations/fr/componentsFr.js";
505
512
  import { parametersFr } from "./translations/fr/parameters.js";
506
513
  import { useUniqueNameValidationFr } from "./translations/fr/use-unique-name-validation-fr.js";
507
514
  import { processConfigFr } from "./translations/fr/processConfigFr.js";
515
+ import { genericValidationFr } from "./translations/fr/generic-validationFr.js";
508
516
  export {
509
517
  ACCURACY,
510
518
  ACTIVE,
519
+ ACTIVE_LIMITS_MIN_MAX_INVALID,
511
520
  ADVANCED_PARAMETERS,
512
521
  ALL_EQUIPMENTS,
513
522
  AMPERE,
@@ -582,6 +591,7 @@ export {
582
591
  CONTINGENCY_LIST_EQUIPMENTS,
583
592
  CONVERTERS_MODE_OPTIONS,
584
593
  COUNTRIES_TO_BALANCE,
594
+ CREATE_SUBSTATION_IN_VOLTAGE_LEVEL_IDENTICAL_ID,
585
595
  CUSTOM_AGGRID_THEME,
586
596
  CUSTOM_REAL_TIME_STATE_ESTIMATION,
587
597
  CalculationType,
@@ -646,6 +656,7 @@ export {
646
656
  DEGREE,
647
657
  DEPTH_CELL_WIDTH,
648
658
  DESCRIPTION,
659
+ DESCRIPTION_LIMIT_ERROR,
649
660
  DIAGONAL_LABEL,
650
661
  DIRECTORY_ITEM,
651
662
  DIRECTORY_ITEM_FULL_PATH,
@@ -684,6 +695,7 @@ export {
684
695
  DynamicSimulationInline,
685
696
  ENERGY_SOURCES,
686
697
  ENERGY_SOURCE_OPTIONS,
698
+ EQUIPMENTS_FIELDS,
687
699
  EQUIPMENTS_IN_VOLTAGE_REGULATION_TYPES,
688
700
  EQUIPMENTS_WITH_ONE_NOMINAL_VOLTAGE,
689
701
  EQUIPMENTS_WITH_ONE_SUBSTATION,
@@ -725,6 +737,7 @@ export {
725
737
  FILTER_ID,
726
738
  FILTER_NAME,
727
739
  FLOW_PROPORTIONAL_THRESHOLD,
740
+ FORMULAS,
728
741
  FetchStatus,
729
742
  FieldConstants,
730
743
  FieldErrorAlert,
@@ -846,6 +859,7 @@ export {
846
859
  MAP_BASE_MAP,
847
860
  MAP_MANUAL_REFRESH,
848
861
  MARGIN_CALCULATION_START_TIME,
862
+ MAXIMUM_SECTION_COUNT_MUST_BE_GREATER_OR_EQUAL_TO_ONE,
849
863
  MAX_CHAR_DESCRIPTION,
850
864
  MAX_COMPOSITE_NESTING_DEPTH,
851
865
  MAX_ROWS_NUMBER,
@@ -855,17 +869,20 @@ export {
855
869
  MEGA_VOLT_AMPERE,
856
870
  MEGA_WATT,
857
871
  MICRO_SIEMENS,
872
+ MIN_ACTIVE_POWER_MUST_BE_LESS_OR_EQUAL_TO_MAX_ACTIVE_POWER,
858
873
  MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION,
859
874
  MODIFICATION_ROW_HEIGHT,
860
875
  MODIFICATION_TYPES,
861
876
  MONITORED_BRANCHES_EQUIPMENT_TYPES,
862
877
  MONITORED_VOLTAGE_LEVELS_EQUIPMENT_TYPES,
878
+ MUST_BE_GREATER_OR_EQUAL_TO_ZERO,
863
879
  MVAPowerAdornment,
864
880
  ManagedExportCsvButton,
865
881
  MessageLogCellRenderer,
866
882
  MicroSusceptanceAdornment,
867
883
  MidFormError,
868
884
  ModificationByAssignmentForm,
885
+ ModificationByFormulaForm,
869
886
  ModificationContainerType,
870
887
  ModificationRow,
871
888
  ModificationType,
@@ -876,10 +893,14 @@ export {
876
893
  NAD_POSITIONS_GENERATION_MODE,
877
894
  NAD_POSITIONS_GENERATION_MODE_LABEL,
878
895
  NAME,
896
+ NAME_ALREADY_USED,
897
+ NAME_EMPTY,
879
898
  NETWORK_MODIFICATION,
880
899
  NODE_CLUSTER,
881
900
  NODE_CLUSTER_FILTER_IDS,
901
+ NORMALIZED_PERCENTAGE,
882
902
  NO_ITEM_SELECTION_FOR_COPY,
903
+ NUMERIC_VALUE_OR_EMPTY_FIELD,
883
904
  NadPositionsGenerationMode,
884
905
  NameCell,
885
906
  NameCellRenderer,
@@ -899,6 +920,7 @@ export {
899
920
  NumericEditor,
900
921
  OHM,
901
922
  OPERATIONAL_LIMITS_GROUPS_MODIFICATION_TYPE,
923
+ OPERATOR,
902
924
  OPERATOR_OPTIONS,
903
925
  OhmAdornment,
904
926
  OperatingStatus,
@@ -966,9 +988,13 @@ export {
966
988
  RATIO_REGULATION_MODE_OPTIONS,
967
989
  RATIO_TAP_CHANGER_POSITION,
968
990
  RATIO_TAP_CHANGER_TARGET_V,
991
+ REACTIVE_LIMITS_MIN_MAX_INVALID,
969
992
  REACTIVE_LIMIT_TYPES,
970
993
  REACTIVE_SLACKS_THRESHOLD,
971
994
  READ_SLACK_BUS,
995
+ REAL_PERCENTAGE,
996
+ REFERENCE_FIELD_OR_VALUE_1,
997
+ REFERENCE_FIELD_OR_VALUE_2,
972
998
  REGULATION_TYPES,
973
999
  REGULATION_TYPE_OPTIONS,
974
1000
  REMOVE,
@@ -997,9 +1023,11 @@ export {
997
1023
  RuleValueEditor,
998
1024
  SCENARIO_DURATION,
999
1025
  SEARCH_EQUIPMENTS,
1026
+ SECTION_COUNT_MUST_BE_BETWEEN_ZERO_AND_MAXIMUM_SECTION_COUNT,
1000
1027
  SELECTED,
1001
1028
  SELECTION_TYPE,
1002
1029
  SENSITIVITY_TYPES,
1030
+ SHORT_CIRCUIT_CURRENT_LIMIT_MUST_BE_GREATER_OR_EQUAL_TO_ZERO,
1003
1031
  SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE,
1004
1032
  SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS,
1005
1033
  SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_IN_CALCULATION_CLUSTER,
@@ -1016,6 +1044,7 @@ export {
1016
1044
  SHOW_AUTH_INFO_LOGIN,
1017
1045
  SHUNT_COMPENSATORS_SELECTION_TYPE,
1018
1046
  SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD,
1047
+ SHUNT_COMPENSATOR_ERROR_Q_AT_NOMINAL_VOLTAGE_LESS_THAN_ZERO,
1019
1048
  SHUNT_COMPENSATOR_TYPES,
1020
1049
  SHUNT_COMPENSATOR_TYPE_OPTIONS,
1021
1050
  SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON,
@@ -1108,6 +1137,8 @@ export {
1108
1137
  UniqueNameInput,
1109
1138
  UpdateSAProcessConfigDialog,
1110
1139
  UserManagerMock,
1140
+ VALUE_MUST_BE_NUMERIC_WHEN_PERCENTAGE_ERROR,
1141
+ VALUE_MUST_BE_REF_WHEN_PERCENTAGE_ERROR,
1111
1142
  VARIABLE_Q_GENERATORS,
1112
1143
  VARIABLE_SHUNT_COMPENSATORS,
1113
1144
  VARIABLE_TRANSFORMERS,
@@ -1133,6 +1164,7 @@ export {
1133
1164
  VoltageRegulationForm,
1134
1165
  VoltageUnitIcon,
1135
1166
  WRITE_SLACK_BUS,
1167
+ WRONG_REF_OR_VALUE_ERROR,
1136
1168
  YUP_DEFAULT,
1137
1169
  YUP_NOT_NULL,
1138
1170
  YUP_NOT_TYPE_DEFAULT,
@@ -1216,6 +1248,7 @@ export {
1216
1248
  emptyFormData,
1217
1249
  emptyLineSegment,
1218
1250
  emptyModificationByAssignmentFormData,
1251
+ emptyModificationFormData,
1219
1252
  emptyProperties,
1220
1253
  enrichPccMinParameters,
1221
1254
  enrichSecurityAnalysisParameters,
@@ -1311,6 +1344,8 @@ export {
1311
1344
  generatorModificationEmptyFormData,
1312
1345
  generatorModificationFormSchema,
1313
1346
  generatorModificationFormToDto,
1347
+ genericValidationEn,
1348
+ genericValidationFr,
1314
1349
  getAbsenceLabelKeyFromType,
1315
1350
  getActivePowerControlEmptyFormData,
1316
1351
  getActivePowerControlSchema,
@@ -1367,6 +1402,8 @@ export {
1367
1402
  getExplicitNamingFilterEmptyFormData,
1368
1403
  getFileIcon,
1369
1404
  getFilledPropertiesFromModification,
1405
+ getFormulaInitialValue,
1406
+ getFormulaSchema,
1370
1407
  getHvdcLccDeletionSchema,
1371
1408
  getIdOrSelf,
1372
1409
  getIdOrValue,
@@ -1520,12 +1557,17 @@ export {
1520
1557
  modificationByAssignmentDtoToForm,
1521
1558
  modificationByAssignmentFormSchema,
1522
1559
  modificationByAssignmentFormToDto,
1560
+ modificationByFormulaDtoToForm,
1561
+ modificationByFormulaFormSchema,
1562
+ modificationByFormulaFormToDto,
1523
1563
  modificationPropertiesSchema,
1524
1564
  moveModification,
1525
1565
  moveSubModificationInTree,
1526
1566
  multipleSelectionDialogEn,
1527
1567
  multipleSelectionDialogFr,
1528
1568
  networkModificationTableStyles,
1569
+ networkModificationValidationEn,
1570
+ networkModificationValidationFr,
1529
1571
  networkModificationsEn,
1530
1572
  networkModificationsFr,
1531
1573
  newEquipmentDeletionDto,
@@ -1,9 +1,3 @@
1
- /**
2
- * Copyright (c) 2024, 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
1
  export declare const descriptionEn: {
8
2
  description: string;
9
3
  descriptionProperty: string;
@@ -1,8 +1,13 @@
1
+ import { DESCRIPTION_LIMIT_ERROR } from "../../utils/constants/translationKeys.js";
2
+ import "../../utils/conversionUtils.js";
3
+ import "../../utils/types/equipmentType.js";
4
+ import "react/jsx-runtime";
5
+ import "@mui/icons-material";
1
6
  const descriptionEn = {
2
7
  description: "Description",
3
8
  descriptionProperty: "Description",
4
9
  descriptionModificationError: "An error occurred while editing the description",
5
- descriptionLimitError: "Description exceeds character limit",
10
+ [DESCRIPTION_LIMIT_ERROR]: "Description exceeds character limit",
6
11
  AddDescription: "Add a description"
7
12
  };
8
13
  export {
@@ -28,7 +28,6 @@ export declare const filterEn: {
28
28
  Hvdc: string;
29
29
  'filter.expert': string;
30
30
  'filter.explicitNaming': string;
31
- nameEmpty: string;
32
31
  equipmentType: string;
33
32
  changeTypeMessage: string;
34
33
  PropertyValues: string;
@@ -52,7 +51,6 @@ export declare const filterEn: {
52
51
  Countries2: string;
53
52
  nominalVoltage: string;
54
53
  EnergySourceText: string;
55
- nameAlreadyUsed: string;
56
54
  nameValidityCheckErrorMsg: string;
57
55
  cantSubmitWhileValidating: string;
58
56
  elementNotFound: string;
@@ -22,7 +22,6 @@ const filterEn = {
22
22
  Hvdc: "HVDC",
23
23
  "filter.expert": "Criteria based",
24
24
  "filter.explicitNaming": "Explicit naming",
25
- nameEmpty: "The name is empty",
26
25
  equipmentType: "Equipment type",
27
26
  changeTypeMessage: "The equipment type will be changed and the current configuration will be erased.",
28
27
  PropertyValues: "Property values",
@@ -46,7 +45,6 @@ const filterEn = {
46
45
  Countries2: "Countries 2",
47
46
  nominalVoltage: "Nominal voltage",
48
47
  EnergySourceText: "Energy source",
49
- nameAlreadyUsed: "This name is already used",
50
48
  nameValidityCheckErrorMsg: "Error while checking name validity",
51
49
  cantSubmitWhileValidating: "Impossible to submit the form while validating a field",
52
50
  elementNotFound: "element not found"
@@ -0,0 +1,23 @@
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 const genericValidationEn: {
8
+ YupRequired: string;
9
+ YupNotNull: string;
10
+ YupDefault: string;
11
+ YupPositive: string;
12
+ YupNotTypeNumber: string;
13
+ YupNotTypeDefault: string;
14
+ DuplicatedPropsError: string;
15
+ mustBeGreaterOrEqualToZero: string;
16
+ NormalizedPercentage: string;
17
+ RealPercentage: string;
18
+ nameEmpty: string;
19
+ nameAlreadyUsed: string;
20
+ NumericValueOrEmptyField: string;
21
+ UniqueName: string;
22
+ FieldNotEmpty: string;
23
+ };
@@ -0,0 +1,25 @@
1
+ import { NUMERIC_VALUE_OR_EMPTY_FIELD, NAME_ALREADY_USED, NAME_EMPTY, REAL_PERCENTAGE, NORMALIZED_PERCENTAGE, MUST_BE_GREATER_OR_EQUAL_TO_ZERO, DUPLICATED_PROPS_ERROR, YUP_NOT_TYPE_DEFAULT, YUP_NOT_TYPE_NUMBER, YUP_POSITIVE, YUP_DEFAULT, YUP_NOT_NULL, YUP_REQUIRED } from "../../utils/constants/translationKeys.js";
2
+ import "../../utils/conversionUtils.js";
3
+ import "../../utils/types/equipmentType.js";
4
+ import "react/jsx-runtime";
5
+ import "@mui/icons-material";
6
+ const genericValidationEn = {
7
+ [YUP_REQUIRED]: "Required",
8
+ [YUP_NOT_NULL]: "Cannot be empty",
9
+ [YUP_DEFAULT]: "This field is invalid",
10
+ [YUP_POSITIVE]: "Must be a positive number",
11
+ [YUP_NOT_TYPE_NUMBER]: "This field only accepts numeric values",
12
+ [YUP_NOT_TYPE_DEFAULT]: "Field value format is incorrect",
13
+ [DUPLICATED_PROPS_ERROR]: "Duplicated properties: each property must be unique",
14
+ [MUST_BE_GREATER_OR_EQUAL_TO_ZERO]: "Must be greater than or equal to 0",
15
+ [NORMALIZED_PERCENTAGE]: "This percentage must be between 0 and 100",
16
+ [REAL_PERCENTAGE]: "This value must be between 0 and 1",
17
+ [NAME_EMPTY]: "The name is empty",
18
+ [NAME_ALREADY_USED]: "This name is already used",
19
+ [NUMERIC_VALUE_OR_EMPTY_FIELD]: "Numeric value or Empty the field",
20
+ UniqueName: "Name should be unique",
21
+ FieldNotEmpty: "Field should not be empty"
22
+ };
23
+ export {
24
+ genericValidationEn
25
+ };
@@ -28,9 +28,11 @@ export * from './tableEn';
28
28
  export * from './topBarEn';
29
29
  export * from './treeviewFinderEn';
30
30
  export * from './networkModificationsEn';
31
+ export * from './network-modification-validationEn';
31
32
  export * from './external/exportParamsEn';
32
33
  export * from './external/importParamsEn';
33
34
  export * from './componentsEn';
34
35
  export * from './parameters';
35
36
  export * from './use-unique-name-validation-en';
36
37
  export * from './processConfigEn';
38
+ export * from './generic-validationEn';
@@ -22,12 +22,14 @@ import { tableEn } from "./tableEn.js";
22
22
  import { topBarEn } from "./topBarEn.js";
23
23
  import { treeviewFinderEn } from "./treeviewFinderEn.js";
24
24
  import { networkModificationsEn } from "./networkModificationsEn.js";
25
+ import { networkModificationValidationEn } from "./network-modification-validationEn.js";
25
26
  import { exportParamsEn } from "./external/exportParamsEn.js";
26
27
  import { importParamsEn } from "./external/importParamsEn.js";
27
28
  import { componentsEn } from "./componentsEn.js";
28
29
  import { parametersEn } from "./parameters.js";
29
30
  import { useUniqueNameValidationEn } from "./use-unique-name-validation-en.js";
30
31
  import { processConfigEn } from "./processConfigEn.js";
32
+ import { genericValidationEn } from "./generic-validationEn.js";
31
33
  export {
32
34
  businessErrorsEn,
33
35
  cardErrorBoundaryEn,
@@ -48,9 +50,11 @@ export {
48
50
  filterEn,
49
51
  filterExpertEn,
50
52
  flatParametersEn,
53
+ genericValidationEn,
51
54
  importParamsEn,
52
55
  loginEn,
53
56
  multipleSelectionDialogEn,
57
+ networkModificationValidationEn,
54
58
  networkModificationsEn,
55
59
  parametersEn,
56
60
  processConfigEn,
@@ -0,0 +1,23 @@
1
+ export declare const networkModificationValidationEn: {
2
+ BusBarCountMustBeGreaterThanOrEqualToOne: string;
3
+ SectionCountMustBeGreaterThanOrEqualToOne: string;
4
+ SectionCountMustBeLessThanOrEqualToTwenty: string;
5
+ CreateCouplingDeviceIdenticalBusBar: string;
6
+ CreateSubstationInVoltageLevelIdenticalId: string;
7
+ voltageLevelNominalVoltageMaxValueError: string;
8
+ ShortCircuitCurrentLimitMustBeGreaterOrEqualToZero: string;
9
+ ShortCircuitCurrentLimitMinMaxError: string;
10
+ ShuntCompensatorErrorQAtNominalVoltageLessThanZero: string;
11
+ MaximumSectionCountMustBeGreaterOrEqualToOne: string;
12
+ SectionCountMustBeBetweenZeroAndMaximumSectionCount: string;
13
+ MinActivePowerMustBeLessOrEqualToMaxActivePower: string;
14
+ ActiveLimitsMinMaxInvalid: string;
15
+ ReactiveLimitsMinMaxInvalid: string;
16
+ WrongRefOrValueError: string;
17
+ ValueMustBeNumericWhenPercentageError: string;
18
+ ValueMustBeRefWhenPercentageError: string;
19
+ TemporaryLimitNameUnicityError: string;
20
+ TemporaryLimitDurationUnicityError: string;
21
+ LimitSetApplicabilityError: string;
22
+ permanentCurrentLimitMustBeGreaterThanZero: string;
23
+ };