@gridsuite/commons-ui 0.256.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 (64) 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/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js +2 -1
  4. package/dist/components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js +2 -1
  5. package/dist/features/network-modifications/battery/creation/batteryCreation.utils.js +3 -2
  6. package/dist/features/network-modifications/battery/modification/batteryModification.utils.js +2 -1
  7. package/dist/features/network-modifications/by-filter/assignment/assignment/assignment-form.js +2 -1
  8. package/dist/features/network-modifications/by-filter/assignment/assignment/assignment-utils.js +2 -2
  9. package/dist/features/network-modifications/by-filter/formula/formula/formula-utils.js +5 -5
  10. package/dist/features/network-modifications/common/activePowerControl/activePowerControlForm.utils.js +2 -1
  11. package/dist/features/network-modifications/common/connectivity/connectivityForm.utils.js +2 -1
  12. package/dist/features/network-modifications/common/currentLimits/limitsPane.utils.js +2 -1
  13. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/reactiveCapability.utils.js +2 -1
  14. package/dist/features/network-modifications/common/reactiveLimits/reactiveLimits.utils.js +3 -2
  15. package/dist/features/network-modifications/common/voltageRegulation/voltageRegulation.utils.js +3 -2
  16. package/dist/features/network-modifications/generator/creation/generatorCreation.utils.js +4 -3
  17. package/dist/features/network-modifications/generator/modification/generatorModification.utils.js +5 -4
  18. package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.js +7 -6
  19. package/dist/features/network-modifications/shunt-compensator/common/characteristicsForm.utils.js +7 -6
  20. package/dist/features/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js +10 -9
  21. package/dist/features/network-modifications/voltageLevel/modification/voltageLevelModification.utils.js +6 -5
  22. package/dist/features/parameters/common/limitreductions/columns-definitions.js +3 -2
  23. package/dist/features/parameters/dynamic-margin-calculation/loads-variations-parameters.js +2 -2
  24. package/dist/features/parameters/security-analysis/columns-definitions.js +4 -3
  25. package/dist/features/parameters/voltage-init/use-voltage-init-parameters-form.js +3 -3
  26. package/dist/hooks/use-unique-name-validation.js +3 -2
  27. package/dist/index.js +27 -1
  28. package/dist/translations/en/descriptionEn.d.ts +0 -6
  29. package/dist/translations/en/descriptionEn.js +6 -1
  30. package/dist/translations/en/filterEn.d.ts +0 -2
  31. package/dist/translations/en/filterEn.js +0 -2
  32. package/dist/translations/en/generic-validationEn.d.ts +23 -0
  33. package/dist/translations/en/generic-validationEn.js +25 -0
  34. package/dist/translations/en/index.d.ts +2 -0
  35. package/dist/translations/en/index.js +4 -0
  36. package/dist/translations/en/network-modification-validationEn.d.ts +23 -0
  37. package/dist/translations/en/network-modification-validationEn.js +31 -0
  38. package/dist/translations/en/networkModificationsEn.d.ts +6 -33
  39. package/dist/translations/en/networkModificationsEn.js +0 -38
  40. package/dist/translations/en/parameters.d.ts +0 -2
  41. package/dist/translations/en/parameters.js +0 -2
  42. package/dist/translations/en/use-unique-name-validation-en.d.ts +0 -2
  43. package/dist/translations/en/use-unique-name-validation-en.js +1 -3
  44. package/dist/translations/fr/descriptionFr.d.ts +0 -6
  45. package/dist/translations/fr/descriptionFr.js +6 -1
  46. package/dist/translations/fr/filterFr.d.ts +0 -2
  47. package/dist/translations/fr/filterFr.js +0 -2
  48. package/dist/translations/fr/generic-validationFr.d.ts +17 -0
  49. package/dist/translations/fr/generic-validationFr.js +25 -0
  50. package/dist/translations/fr/index.d.ts +2 -0
  51. package/dist/translations/fr/index.js +4 -0
  52. package/dist/translations/fr/network-modification-validationFr.d.ts +23 -0
  53. package/dist/translations/fr/network-modification-validationFr.js +31 -0
  54. package/dist/translations/fr/networkModificationsFr.d.ts +6 -33
  55. package/dist/translations/fr/networkModificationsFr.js +0 -38
  56. package/dist/translations/fr/parameters.d.ts +0 -2
  57. package/dist/translations/fr/parameters.js +0 -2
  58. package/dist/translations/fr/use-unique-name-validation-fr.d.ts +0 -2
  59. package/dist/translations/fr/use-unique-name-validation-fr.js +1 -3
  60. package/dist/utils/constants/index.js +19 -1
  61. package/dist/utils/constants/translationKeys.d.ts +18 -0
  62. package/dist/utils/constants/translationKeys.js +36 -0
  63. package/dist/utils/index.js +19 -1
  64. package/package.json +1 -1
@@ -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";
@@ -473,12 +473,14 @@ import { tableEn } from "./translations/en/tableEn.js";
473
473
  import { topBarEn } from "./translations/en/topBarEn.js";
474
474
  import { treeviewFinderEn } from "./translations/en/treeviewFinderEn.js";
475
475
  import { networkModificationsEn } from "./translations/en/networkModificationsEn.js";
476
+ import { networkModificationValidationEn } from "./translations/en/network-modification-validationEn.js";
476
477
  import { exportParamsEn } from "./translations/en/external/exportParamsEn.js";
477
478
  import { importParamsEn } from "./translations/en/external/importParamsEn.js";
478
479
  import { componentsEn } from "./translations/en/componentsEn.js";
479
480
  import { parametersEn } from "./translations/en/parameters.js";
480
481
  import { useUniqueNameValidationEn } from "./translations/en/use-unique-name-validation-en.js";
481
482
  import { processConfigEn } from "./translations/en/processConfigEn.js";
483
+ import { genericValidationEn } from "./translations/en/generic-validationEn.js";
482
484
  import { cardErrorBoundaryFr } from "./translations/fr/cardErrorBoundaryFr.js";
483
485
  import { businessErrorsFr } from "./translations/fr/businessErrorsFr.js";
484
486
  import { commonButtonFr } from "./translations/fr/commonButtonFr.js";
@@ -503,15 +505,18 @@ import { tableFr } from "./translations/fr/tableFr.js";
503
505
  import { topBarFr } from "./translations/fr/topBarFr.js";
504
506
  import { treeviewFinderFr } from "./translations/fr/treeviewFinderFr.js";
505
507
  import { networkModificationsFr } from "./translations/fr/networkModificationsFr.js";
508
+ import { networkModificationValidationFr } from "./translations/fr/network-modification-validationFr.js";
506
509
  import { exportParamsFr } from "./translations/fr/external/exportParamsFr.js";
507
510
  import { importParamsFr } from "./translations/fr/external/importParamsFr.js";
508
511
  import { componentsFr } from "./translations/fr/componentsFr.js";
509
512
  import { parametersFr } from "./translations/fr/parameters.js";
510
513
  import { useUniqueNameValidationFr } from "./translations/fr/use-unique-name-validation-fr.js";
511
514
  import { processConfigFr } from "./translations/fr/processConfigFr.js";
515
+ import { genericValidationFr } from "./translations/fr/generic-validationFr.js";
512
516
  export {
513
517
  ACCURACY,
514
518
  ACTIVE,
519
+ ACTIVE_LIMITS_MIN_MAX_INVALID,
515
520
  ADVANCED_PARAMETERS,
516
521
  ALL_EQUIPMENTS,
517
522
  AMPERE,
@@ -586,6 +591,7 @@ export {
586
591
  CONTINGENCY_LIST_EQUIPMENTS,
587
592
  CONVERTERS_MODE_OPTIONS,
588
593
  COUNTRIES_TO_BALANCE,
594
+ CREATE_SUBSTATION_IN_VOLTAGE_LEVEL_IDENTICAL_ID,
589
595
  CUSTOM_AGGRID_THEME,
590
596
  CUSTOM_REAL_TIME_STATE_ESTIMATION,
591
597
  CalculationType,
@@ -650,6 +656,7 @@ export {
650
656
  DEGREE,
651
657
  DEPTH_CELL_WIDTH,
652
658
  DESCRIPTION,
659
+ DESCRIPTION_LIMIT_ERROR,
653
660
  DIAGONAL_LABEL,
654
661
  DIRECTORY_ITEM,
655
662
  DIRECTORY_ITEM_FULL_PATH,
@@ -852,6 +859,7 @@ export {
852
859
  MAP_BASE_MAP,
853
860
  MAP_MANUAL_REFRESH,
854
861
  MARGIN_CALCULATION_START_TIME,
862
+ MAXIMUM_SECTION_COUNT_MUST_BE_GREATER_OR_EQUAL_TO_ONE,
855
863
  MAX_CHAR_DESCRIPTION,
856
864
  MAX_COMPOSITE_NESTING_DEPTH,
857
865
  MAX_ROWS_NUMBER,
@@ -861,11 +869,13 @@ export {
861
869
  MEGA_VOLT_AMPERE,
862
870
  MEGA_WATT,
863
871
  MICRO_SIEMENS,
872
+ MIN_ACTIVE_POWER_MUST_BE_LESS_OR_EQUAL_TO_MAX_ACTIVE_POWER,
864
873
  MIN_VALUE_ALLOWED_FOR_LIMIT_REDUCTION,
865
874
  MODIFICATION_ROW_HEIGHT,
866
875
  MODIFICATION_TYPES,
867
876
  MONITORED_BRANCHES_EQUIPMENT_TYPES,
868
877
  MONITORED_VOLTAGE_LEVELS_EQUIPMENT_TYPES,
878
+ MUST_BE_GREATER_OR_EQUAL_TO_ZERO,
869
879
  MVAPowerAdornment,
870
880
  ManagedExportCsvButton,
871
881
  MessageLogCellRenderer,
@@ -883,10 +893,14 @@ export {
883
893
  NAD_POSITIONS_GENERATION_MODE,
884
894
  NAD_POSITIONS_GENERATION_MODE_LABEL,
885
895
  NAME,
896
+ NAME_ALREADY_USED,
897
+ NAME_EMPTY,
886
898
  NETWORK_MODIFICATION,
887
899
  NODE_CLUSTER,
888
900
  NODE_CLUSTER_FILTER_IDS,
901
+ NORMALIZED_PERCENTAGE,
889
902
  NO_ITEM_SELECTION_FOR_COPY,
903
+ NUMERIC_VALUE_OR_EMPTY_FIELD,
890
904
  NadPositionsGenerationMode,
891
905
  NameCell,
892
906
  NameCellRenderer,
@@ -974,9 +988,11 @@ export {
974
988
  RATIO_REGULATION_MODE_OPTIONS,
975
989
  RATIO_TAP_CHANGER_POSITION,
976
990
  RATIO_TAP_CHANGER_TARGET_V,
991
+ REACTIVE_LIMITS_MIN_MAX_INVALID,
977
992
  REACTIVE_LIMIT_TYPES,
978
993
  REACTIVE_SLACKS_THRESHOLD,
979
994
  READ_SLACK_BUS,
995
+ REAL_PERCENTAGE,
980
996
  REFERENCE_FIELD_OR_VALUE_1,
981
997
  REFERENCE_FIELD_OR_VALUE_2,
982
998
  REGULATION_TYPES,
@@ -1007,9 +1023,11 @@ export {
1007
1023
  RuleValueEditor,
1008
1024
  SCENARIO_DURATION,
1009
1025
  SEARCH_EQUIPMENTS,
1026
+ SECTION_COUNT_MUST_BE_BETWEEN_ZERO_AND_MAXIMUM_SECTION_COUNT,
1010
1027
  SELECTED,
1011
1028
  SELECTION_TYPE,
1012
1029
  SENSITIVITY_TYPES,
1030
+ SHORT_CIRCUIT_CURRENT_LIMIT_MUST_BE_GREATER_OR_EQUAL_TO_ZERO,
1013
1031
  SHORT_CIRCUIT_INITIAL_VOLTAGE_PROFILE_MODE,
1014
1032
  SHORT_CIRCUIT_MODEL_POWER_ELECTRONICS,
1015
1033
  SHORT_CIRCUIT_ONLY_STARTED_GENERATORS_IN_CALCULATION_CLUSTER,
@@ -1026,6 +1044,7 @@ export {
1026
1044
  SHOW_AUTH_INFO_LOGIN,
1027
1045
  SHUNT_COMPENSATORS_SELECTION_TYPE,
1028
1046
  SHUNT_COMPENSATOR_ACTIVATION_THRESHOLD,
1047
+ SHUNT_COMPENSATOR_ERROR_Q_AT_NOMINAL_VOLTAGE_LESS_THAN_ZERO,
1029
1048
  SHUNT_COMPENSATOR_TYPES,
1030
1049
  SHUNT_COMPENSATOR_TYPE_OPTIONS,
1031
1050
  SHUNT_COMPENSATOR_VOLTAGE_CONTROL_ON,
@@ -1118,6 +1137,8 @@ export {
1118
1137
  UniqueNameInput,
1119
1138
  UpdateSAProcessConfigDialog,
1120
1139
  UserManagerMock,
1140
+ VALUE_MUST_BE_NUMERIC_WHEN_PERCENTAGE_ERROR,
1141
+ VALUE_MUST_BE_REF_WHEN_PERCENTAGE_ERROR,
1121
1142
  VARIABLE_Q_GENERATORS,
1122
1143
  VARIABLE_SHUNT_COMPENSATORS,
1123
1144
  VARIABLE_TRANSFORMERS,
@@ -1143,6 +1164,7 @@ export {
1143
1164
  VoltageRegulationForm,
1144
1165
  VoltageUnitIcon,
1145
1166
  WRITE_SLACK_BUS,
1167
+ WRONG_REF_OR_VALUE_ERROR,
1146
1168
  YUP_DEFAULT,
1147
1169
  YUP_NOT_NULL,
1148
1170
  YUP_NOT_TYPE_DEFAULT,
@@ -1322,6 +1344,8 @@ export {
1322
1344
  generatorModificationEmptyFormData,
1323
1345
  generatorModificationFormSchema,
1324
1346
  generatorModificationFormToDto,
1347
+ genericValidationEn,
1348
+ genericValidationFr,
1325
1349
  getAbsenceLabelKeyFromType,
1326
1350
  getActivePowerControlEmptyFormData,
1327
1351
  getActivePowerControlSchema,
@@ -1542,6 +1566,8 @@ export {
1542
1566
  multipleSelectionDialogEn,
1543
1567
  multipleSelectionDialogFr,
1544
1568
  networkModificationTableStyles,
1569
+ networkModificationValidationEn,
1570
+ networkModificationValidationFr,
1545
1571
  networkModificationsEn,
1546
1572
  networkModificationsFr,
1547
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
+ };
@@ -0,0 +1,31 @@
1
+ import { VALUE_MUST_BE_REF_WHEN_PERCENTAGE_ERROR, VALUE_MUST_BE_NUMERIC_WHEN_PERCENTAGE_ERROR, WRONG_REF_OR_VALUE_ERROR, REACTIVE_LIMITS_MIN_MAX_INVALID, ACTIVE_LIMITS_MIN_MAX_INVALID, MIN_ACTIVE_POWER_MUST_BE_LESS_OR_EQUAL_TO_MAX_ACTIVE_POWER, SECTION_COUNT_MUST_BE_BETWEEN_ZERO_AND_MAXIMUM_SECTION_COUNT, MAXIMUM_SECTION_COUNT_MUST_BE_GREATER_OR_EQUAL_TO_ONE, SHUNT_COMPENSATOR_ERROR_Q_AT_NOMINAL_VOLTAGE_LESS_THAN_ZERO, SHORT_CIRCUIT_CURRENT_LIMIT_MUST_BE_GREATER_OR_EQUAL_TO_ZERO, CREATE_SUBSTATION_IN_VOLTAGE_LEVEL_IDENTICAL_ID } 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 networkModificationValidationEn = {
7
+ BusBarCountMustBeGreaterThanOrEqualToOne: "Number of busbars must be greater than or equal to 1",
8
+ SectionCountMustBeGreaterThanOrEqualToOne: "Number of sections must be greater than or equal to 1",
9
+ SectionCountMustBeLessThanOrEqualToTwenty: "Number of sections must be less than or equal to 20",
10
+ CreateCouplingDeviceIdenticalBusBar: "Bus bar section / bus 1 and 2 must be different",
11
+ [CREATE_SUBSTATION_IN_VOLTAGE_LEVEL_IDENTICAL_ID]: "Voltage Level ID can not match Substation ID",
12
+ voltageLevelNominalVoltageMaxValueError: "Low voltage limit must be inferior to high voltage limit",
13
+ [SHORT_CIRCUIT_CURRENT_LIMIT_MUST_BE_GREATER_OR_EQUAL_TO_ZERO]: "Short-circuit current limit must be greater than or equal to 0",
14
+ ShortCircuitCurrentLimitMinMaxError: "Low short-circuit current limit must be less than or equal to high limit",
15
+ [SHUNT_COMPENSATOR_ERROR_Q_AT_NOMINAL_VOLTAGE_LESS_THAN_ZERO]: "Q at nominal voltage value should be greater than or equal to 0",
16
+ [MAXIMUM_SECTION_COUNT_MUST_BE_GREATER_OR_EQUAL_TO_ONE]: "Maximum section count must be greater than or equal to 1",
17
+ [SECTION_COUNT_MUST_BE_BETWEEN_ZERO_AND_MAXIMUM_SECTION_COUNT]: "Section count must be between 0 and Maximum section count",
18
+ [MIN_ACTIVE_POWER_MUST_BE_LESS_OR_EQUAL_TO_MAX_ACTIVE_POWER]: "Minimum active power value must be less than or equal to maximum active power value",
19
+ [ACTIVE_LIMITS_MIN_MAX_INVALID]: "Maximum active power must be greater than minimum active power",
20
+ [REACTIVE_LIMITS_MIN_MAX_INVALID]: "Maximum reactive power must be greater than minimum reactive power",
21
+ [WRONG_REF_OR_VALUE_ERROR]: "Please enter a valid numeric value or a valid field reference. Use # to select a field",
22
+ [VALUE_MUST_BE_NUMERIC_WHEN_PERCENTAGE_ERROR]: "When using %, this field must be a valid positive numeric value",
23
+ [VALUE_MUST_BE_REF_WHEN_PERCENTAGE_ERROR]: "When using %, this field must be a valid field reference",
24
+ TemporaryLimitNameUnicityError: "Temporary limit names must be unique in the table",
25
+ TemporaryLimitDurationUnicityError: "Temporary limit acceptable durations must be unique in the table",
26
+ LimitSetApplicabilityError: "2 limit sets with the same name must have different application sides.",
27
+ permanentCurrentLimitMustBeGreaterThanZero: "The permanent current limit value must be greater than 0"
28
+ };
29
+ export {
30
+ networkModificationValidationEn
31
+ };
@@ -1,3 +1,9 @@
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
+ */
1
7
  export declare const networkModificationsEn: {
2
8
  'network_modifications.modificationsCount': string;
3
9
  'network_modifications.EQUIPMENT_DELETION': string;
@@ -114,22 +120,6 @@ export declare const networkModificationsEn: {
114
120
  BREAKER: string;
115
121
  DISCONNECTOR: string;
116
122
  Disconnector: string;
117
- BusBarCountMustBeGreaterThanOrEqualToOne: string;
118
- SectionCountMustBeGreaterThanOrEqualToOne: string;
119
- SectionCountMustBeLessThanOrEqualToTwenty: string;
120
- mustBeGreaterOrEqualToZero: string;
121
- CreateCouplingDeviceIdenticalBusBar: string;
122
- CreateSubstationInVoltageLevelIdenticalId: string;
123
- voltageLevelNominalVoltageMaxValueError: string;
124
- ShortCircuitCurrentLimitMustBeGreaterOrEqualToZero: string;
125
- ShortCircuitCurrentLimitMinMaxError: string;
126
- DuplicatedPropsError: string;
127
- YupRequired: string;
128
- YupNotNull: string;
129
- YupDefault: string;
130
- YupPositive: string;
131
- YupNotTypeNumber: string;
132
- YupNotTypeDefault: string;
133
123
  CreateLoad: string;
134
124
  loadType: string;
135
125
  CreateShuntCompensator: string;
@@ -143,9 +133,6 @@ export declare const networkModificationsEn: {
143
133
  SusceptanceLabel: string;
144
134
  SwitchedOnMaxQAtNominalV: string;
145
135
  SwitchedOnMaxSusceptance: string;
146
- ShuntCompensatorErrorQAtNominalVoltageLessThanZero: string;
147
- MaximumSectionCountMustBeGreaterOrEqualToOne: string;
148
- SectionCountMustBeBetweenZeroAndMaximumSectionCount: string;
149
136
  VOLTAGE_LEVEL: string;
150
137
  BusBarBus: string;
151
138
  ConnectionName: string;
@@ -224,7 +211,6 @@ export declare const networkModificationsEn: {
224
211
  operationalLimitsGroup2WithProperties: string;
225
212
  Value: string;
226
213
  EmptyField: string;
227
- NumericValueOrEmptyField: string;
228
214
  ValueOrEmptyField: string;
229
215
  addNewAssignment: string;
230
216
  changeTypeConfirmation: string;
@@ -236,21 +222,17 @@ export declare const networkModificationsEn: {
236
222
  Connectivity: string;
237
223
  ActiveLimits: string;
238
224
  ReactiveLimits: string;
239
- NormalizedPercentage: string;
240
225
  On: string;
241
226
  Off: string;
242
227
  FrequencyRegulation: string;
243
228
  Droop: string;
244
229
  Limits: string;
245
- MinActivePowerMustBeLessOrEqualToMaxActivePower: string;
246
230
  activePowerControlTooltip: string;
247
231
  NoModification: string;
248
232
  ReactiveLimitsKindMinMax: string;
249
233
  ReactiveLimitsKindCurve: string;
250
234
  MinimumReactivePower: string;
251
235
  MaximumReactivePower: string;
252
- ActiveLimitsMinMaxInvalid: string;
253
- ReactiveLimitsMinMaxInvalid: string;
254
236
  MinReactivePowerRequired: string;
255
237
  MaxReactivePowerRequired: string;
256
238
  ReactiveCapabilityCurveCreationErrorMissingPoints: string;
@@ -298,21 +280,12 @@ export declare const networkModificationsEn: {
298
280
  disableOLGedition: string;
299
281
  Edit: string;
300
282
  View: string;
301
- TemporaryLimitNameUnicityError: string;
302
- TemporaryLimitDurationUnicityError: string;
303
- LimitSetApplicabilityError: string;
304
- permanentCurrentLimitMustBeGreaterThanZero: string;
305
- UniqueName: string;
306
- FieldNotEmpty: string;
307
283
  TemporaryCurrentLimitsText: string;
308
284
  SelectedOperationalLimitGroup: string;
309
285
  ReferenceFieldOrValue: string;
310
286
  Operator: string;
311
287
  UseDashToSelectField: string;
312
288
  filter: string;
313
- ValueMustBeNumericWhenPercentageError: string;
314
- ValueMustBeRefWhenPercentageError: string;
315
- WrongRefOrValueError: string;
316
289
  G: string;
317
290
  B: string;
318
291
  SubstationTab: string;
@@ -1,8 +1,3 @@
1
- import { YUP_NOT_TYPE_DEFAULT, YUP_NOT_TYPE_NUMBER, YUP_POSITIVE, YUP_DEFAULT, YUP_NOT_NULL, YUP_REQUIRED, DUPLICATED_PROPS_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";
6
1
  const networkModificationsEn = {
7
2
  "network_modifications.modificationsCount": "{hide, select, false {{count, plural, =0 {no modification} =1 {{count} modification} other {{count} modifications}}} other {...}}",
8
3
  "network_modifications.EQUIPMENT_DELETION": "Deletion of {computedLabel}",
@@ -119,22 +114,6 @@ const networkModificationsEn = {
119
114
  BREAKER: "Breaker",
120
115
  DISCONNECTOR: "Disconnector",
121
116
  Disconnector: "Disconnector",
122
- BusBarCountMustBeGreaterThanOrEqualToOne: "Number of busbars must be greater than or equal to 1",
123
- SectionCountMustBeGreaterThanOrEqualToOne: "Number of sections must be greater than or equal to 1",
124
- SectionCountMustBeLessThanOrEqualToTwenty: "Number of sections must be less than or equal to 20",
125
- mustBeGreaterOrEqualToZero: "Must be greater than or equal to 0",
126
- CreateCouplingDeviceIdenticalBusBar: "Bus bar section / bus 1 and 2 must be different",
127
- CreateSubstationInVoltageLevelIdenticalId: "Voltage Level ID can not match Substation ID",
128
- voltageLevelNominalVoltageMaxValueError: "Low voltage limit must be inferior to high voltage limit",
129
- ShortCircuitCurrentLimitMustBeGreaterOrEqualToZero: "Short-circuit current limit must be greater than or equal to 0",
130
- ShortCircuitCurrentLimitMinMaxError: "Low short-circuit current limit must be less than or equal to high limit",
131
- [DUPLICATED_PROPS_ERROR]: "Duplicated properties: each property must be unique",
132
- [YUP_REQUIRED]: "Required",
133
- [YUP_NOT_NULL]: "Cannot be empty",
134
- [YUP_DEFAULT]: "This field is invalid",
135
- [YUP_POSITIVE]: "Must be a positive number",
136
- [YUP_NOT_TYPE_NUMBER]: "This field only accepts numeric values",
137
- [YUP_NOT_TYPE_DEFAULT]: "Field value format is incorrect",
138
117
  CreateLoad: "Create load",
139
118
  loadType: "Type",
140
119
  CreateShuntCompensator: "Create shunt compensator (Linear)",
@@ -148,9 +127,6 @@ const networkModificationsEn = {
148
127
  SusceptanceLabel: "Susceptance (S)",
149
128
  SwitchedOnMaxQAtNominalV: "Switch-on Q at nominal voltage",
150
129
  SwitchedOnMaxSusceptance: "Switch-on susceptance",
151
- ShuntCompensatorErrorQAtNominalVoltageLessThanZero: "Q at nominal voltage value should be greater than or equal to 0",
152
- MaximumSectionCountMustBeGreaterOrEqualToOne: "Maximum section count must be greater than or equal to 1",
153
- SectionCountMustBeBetweenZeroAndMaximumSectionCount: "Section count must be between 0 and Maximum section count",
154
130
  VOLTAGE_LEVEL: "Voltage Level",
155
131
  BusBarBus: "Bus bar section / bus",
156
132
  ConnectionName: "Connection name",
@@ -229,7 +205,6 @@ const networkModificationsEn = {
229
205
  operationalLimitsGroup2WithProperties: "Active limit set on side 2 with property",
230
206
  Value: "Value",
231
207
  EmptyField: "Empty the field",
232
- NumericValueOrEmptyField: "Numeric value or Empty the field",
233
208
  ValueOrEmptyField: "Value or Empty the field",
234
209
  addNewAssignment: "Modify another field",
235
210
  changeTypeConfirmation: "The type will be changed. All fields values will be erased.",
@@ -241,21 +216,17 @@ const networkModificationsEn = {
241
216
  Connectivity: "Connectivity",
242
217
  ActiveLimits: "Active limits",
243
218
  ReactiveLimits: "Reactive limits",
244
- NormalizedPercentage: "This percentage must be between 0 and 100",
245
219
  On: "On",
246
220
  Off: "Off",
247
221
  FrequencyRegulation: "Active power regulation",
248
222
  Droop: "Droop",
249
223
  Limits: "Limits",
250
- MinActivePowerMustBeLessOrEqualToMaxActivePower: "Minimum active power value must be less than or equal to maximum active power value",
251
224
  activePowerControlTooltip: "Slack bus active power repartition key: maxP/droop, default droop = 4 (used if balanceType is PROPORTIONAL_TO_GENERATION_P_MAX)",
252
225
  NoModification: "No modification",
253
226
  ReactiveLimitsKindMinMax: "By range",
254
227
  ReactiveLimitsKindCurve: "By diagram",
255
228
  MinimumReactivePower: "Minimum reactive power",
256
229
  MaximumReactivePower: "Maximum reactive power",
257
- ActiveLimitsMinMaxInvalid: "Maximum active power must be greater than minimum active power",
258
- ReactiveLimitsMinMaxInvalid: "Maximum reactive power must be greater than minimum reactive power",
259
230
  MinReactivePowerRequired: "Minimum reactive power is required if maximum is defined",
260
231
  MaxReactivePowerRequired: "Maximum reactive power is required if minimum is defined",
261
232
  ReactiveCapabilityCurveCreationErrorMissingPoints: "The table of reactive capability curve must have at least four points.",
@@ -303,21 +274,12 @@ const networkModificationsEn = {
303
274
  disableOLGedition: "Entered limit sets data will be lost. Do you wish to continue?",
304
275
  Edit: "Edit",
305
276
  View: "View",
306
- TemporaryLimitNameUnicityError: "Temporary limit names must be unique in the table",
307
- TemporaryLimitDurationUnicityError: "Temporary limit acceptable durations must be unique in the table",
308
- LimitSetApplicabilityError: "2 limit sets with the same name must have different application sides.",
309
- permanentCurrentLimitMustBeGreaterThanZero: "The permanent current limit value must be greater than 0",
310
- UniqueName: "Name should be unique",
311
- FieldNotEmpty: "Field should not be empty",
312
277
  TemporaryCurrentLimitsText: "Temporary current limits",
313
278
  SelectedOperationalLimitGroup: "Active limit set",
314
279
  ReferenceFieldOrValue: "Reference field or value",
315
280
  Operator: "Operator",
316
281
  UseDashToSelectField: "Use # to select a field",
317
282
  filter: "Filter",
318
- ValueMustBeNumericWhenPercentageError: "When using %, this field must be a valid positive numeric value",
319
- ValueMustBeRefWhenPercentageError: "When using %, this field must be a valid field reference",
320
- WrongRefOrValueError: "Please enter a valid numeric value or a valid field reference. Use # to select a field",
321
283
  G: "Magnetizing conductance",
322
284
  B: "Magnetizing susceptance",
323
285
  // Tabs
@@ -24,7 +24,6 @@ export declare const parametersEn: {
24
24
  showSelectParameterDialog: string;
25
25
  createParameterLabel: string;
26
26
  updateParameterLabel: string;
27
- nameAlreadyUsed: string;
28
27
  tagAlreadyUsed: string;
29
28
  studyDirectoryFetchingError: string;
30
29
  AddDescription: string;
@@ -51,7 +50,6 @@ export declare const parametersEn: {
51
50
  descLfCountriesToBalance: string;
52
51
  inputLabelLfCountriesToBalance: string;
53
52
  editParameters: string;
54
- RealPercentage: string;
55
53
  General: string;
56
54
  LimitReductions: string;
57
55
  StudyArea: string;
@@ -18,7 +18,6 @@ const parametersEn = {
18
18
  showSelectParameterDialog: "Choose parameters",
19
19
  createParameterLabel: "Create new parameters",
20
20
  updateParameterLabel: "Replace existing parameters",
21
- nameAlreadyUsed: "This name is already used",
22
21
  tagAlreadyUsed: "This tag is already used",
23
22
  studyDirectoryFetchingError: "An error occurred while fetching study directory",
24
23
  AddDescription: "Add a description (optional)",
@@ -45,7 +44,6 @@ const parametersEn = {
45
44
  descLfCountriesToBalance: "Balancing countries",
46
45
  inputLabelLfCountriesToBalance: "Countries participating in balancing",
47
46
  editParameters: "Edit parameters",
48
- RealPercentage: "This value must be between 0 and 1",
49
47
  General: "General",
50
48
  LimitReductions: "Limit reductions",
51
49
  StudyArea: "Study area",
@@ -5,8 +5,6 @@
5
5
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
6
  */
7
7
  export declare const useUniqueNameValidationEn: {
8
- 'use-unique-name-validation/nameAlreadyUsed': string;
9
8
  'use-unique-name-validation/nameValidityCheckErrorMsg': string;
10
9
  'use-unique-name-validation/cantSubmitWhileValidating': string;
11
- 'use-unique-name-validation/nameEmpty': string;
12
10
  };