@gridsuite/commons-ui 0.181.0 → 0.182.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/index.js +28 -1
  2. package/dist/components/inputs/index.js +4 -0
  3. package/dist/components/inputs/reactHookForm/index.d.ts +1 -0
  4. package/dist/components/inputs/reactHookForm/index.js +4 -0
  5. package/dist/components/inputs/reactHookForm/readOnly/ButtonReadOnlyInput.d.ts +7 -0
  6. package/dist/components/inputs/reactHookForm/readOnly/ButtonReadOnlyInput.js +50 -0
  7. package/dist/components/inputs/reactHookForm/readOnly/ReadOnlyInput.d.ts +12 -0
  8. package/dist/components/inputs/reactHookForm/readOnly/ReadOnlyInput.js +35 -0
  9. package/dist/components/inputs/reactHookForm/readOnly/index.d.ts +8 -0
  10. package/dist/components/inputs/reactHookForm/readOnly/index.js +6 -0
  11. package/dist/components/network-modifications/equipmentDeletion/EquipmentDeletionForm.d.ts +9 -0
  12. package/dist/components/network-modifications/equipmentDeletion/EquipmentDeletionForm.js +173 -0
  13. package/dist/components/network-modifications/equipmentDeletion/equipmentDeletion.types.d.ts +17 -0
  14. package/dist/components/network-modifications/equipmentDeletion/equipmentDeletion.types.js +1 -0
  15. package/dist/components/network-modifications/equipmentDeletion/equipmentDeletion.utils.d.ts +33 -0
  16. package/dist/components/network-modifications/equipmentDeletion/equipmentDeletion.utils.js +78 -0
  17. package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/HvdcLccDeletionSpecificForm.d.ts +7 -0
  18. package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/HvdcLccDeletionSpecificForm.js +43 -0
  19. package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.d.ts +13 -0
  20. package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.js +58 -0
  21. package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/hvdcLccDeletion.utils.d.ts +21 -0
  22. package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/hvdcLccDeletion.utils.js +22 -0
  23. package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/index.d.ts +10 -0
  24. package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/index.js +10 -0
  25. package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/useHvdcLccDeletion.d.ts +8 -0
  26. package/dist/components/network-modifications/equipmentDeletion/hvdcLccDeletion/useHvdcLccDeletion.js +85 -0
  27. package/dist/components/network-modifications/equipmentDeletion/index.d.ts +10 -0
  28. package/dist/components/network-modifications/equipmentDeletion/index.js +18 -0
  29. package/dist/components/network-modifications/index.d.ts +1 -0
  30. package/dist/components/network-modifications/index.js +24 -1
  31. package/dist/components/network-modifications/voltage-level/index.d.ts +1 -0
  32. package/dist/components/network-modifications/voltage-level/index.js +8 -1
  33. package/dist/components/network-modifications/voltage-level/modification/VoltageLevelModificationForm.d.ts +5 -0
  34. package/dist/components/network-modifications/voltage-level/modification/VoltageLevelModificationForm.js +159 -0
  35. package/dist/components/network-modifications/voltage-level/modification/index.d.ts +9 -0
  36. package/dist/components/network-modifications/voltage-level/modification/index.js +9 -0
  37. package/dist/components/network-modifications/voltage-level/modification/voltageLevelModification.types.d.ts +35 -0
  38. package/dist/components/network-modifications/voltage-level/modification/voltageLevelModification.types.js +1 -0
  39. package/dist/components/network-modifications/voltage-level/modification/voltageLevelModification.utils.d.ts +36 -0
  40. package/dist/components/network-modifications/voltage-level/modification/voltageLevelModification.utils.js +75 -0
  41. package/dist/components/parameters/loadflow/use-load-flow-parameters-form.js +11 -10
  42. package/dist/hooks/index.d.ts +1 -0
  43. package/dist/hooks/index.js +2 -0
  44. package/dist/hooks/useGetLabelEquipmentTypes.d.ts +2 -0
  45. package/dist/hooks/useGetLabelEquipmentTypes.js +20 -0
  46. package/dist/index.js +37 -1
  47. package/dist/translations/en/equipmentTypesEn.d.ts +30 -0
  48. package/dist/translations/en/equipmentTypesEn.js +27 -0
  49. package/dist/translations/en/index.d.ts +1 -0
  50. package/dist/translations/en/index.js +2 -0
  51. package/dist/translations/en/networkModificationsEn.d.ts +7 -0
  52. package/dist/translations/en/networkModificationsEn.js +10 -3
  53. package/dist/translations/fr/equipmentTypesFr.d.ts +30 -0
  54. package/dist/translations/fr/equipmentTypesFr.js +27 -0
  55. package/dist/translations/fr/index.d.ts +1 -0
  56. package/dist/translations/fr/index.js +2 -0
  57. package/dist/translations/fr/networkModificationsFr.d.ts +7 -0
  58. package/dist/translations/fr/networkModificationsFr.js +12 -5
  59. package/dist/utils/constants/fieldConstants.d.ts +7 -0
  60. package/dist/utils/constants/fieldConstants.js +7 -0
  61. package/dist/utils/index.js +4 -1
  62. package/dist/utils/ts-utils.d.ts +3 -0
  63. package/dist/utils/ts-utils.js +10 -0
  64. package/package.json +1 -1
@@ -78,6 +78,8 @@ export declare const networkModificationsFr: {
78
78
  Country: string;
79
79
  CreateVoltageLevel: string;
80
80
  VoltageLevelCreationError: string;
81
+ ModifyVoltageLevel: string;
82
+ VoltageLevelModificationError: string;
81
83
  SUBSTATION: string;
82
84
  VoltageText: string;
83
85
  NominalVoltage: string;
@@ -135,4 +137,9 @@ export declare const networkModificationsFr: {
135
137
  MeasurementsSection: string;
136
138
  ValidMeasurement: string;
137
139
  InvalidMeasurement: string;
140
+ DeleteEquipment: string;
141
+ UnableToDeleteEquipment: string;
142
+ LCCConverterStationShuntCompensators: string;
143
+ Side1: string;
144
+ Side2: string;
138
145
  };
@@ -84,14 +84,16 @@ const networkModificationsFr = {
84
84
  Country: "Pays",
85
85
  CreateVoltageLevel: "Créer un poste",
86
86
  VoltageLevelCreationError: "Erreur lors de la création d'un poste",
87
+ ModifyVoltageLevel: "Modifier un poste",
88
+ VoltageLevelModificationError: "Erreur lors de la modification d'un poste",
87
89
  SUBSTATION: "Site",
88
90
  VoltageText: "Tension",
89
91
  NominalVoltage: "Tension nominale",
90
- LowVoltageLimit: "Limite de tension basse",
91
- HighVoltageLimit: "Limite de tension haute",
92
+ LowVoltageLimit: "Limite tension basse",
93
+ HighVoltageLimit: "Limite tension haute",
92
94
  ShortCircuit: "Court-circuit",
93
- LowShortCircuitCurrentLimit: "Ip min",
94
- HighShortCircuitCurrentLimit: "Ip max",
95
+ LowShortCircuitCurrentLimit: "Limite ICC min",
96
+ HighShortCircuitCurrentLimit: "Limite ICC max",
95
97
  BusBarSections: "Section de jeu de barres",
96
98
  BusBarCount: "Nb de barres",
97
99
  numberOfSections: "Nb de sections",
@@ -140,7 +142,12 @@ const networkModificationsFr = {
140
142
  StateEstimationTab: "Estimation d'état",
141
143
  MeasurementsSection: "Télémesures",
142
144
  ValidMeasurement: "Valide",
143
- InvalidMeasurement: "Invalide"
145
+ InvalidMeasurement: "Invalide",
146
+ DeleteEquipment: "Supprimer un ouvrage",
147
+ UnableToDeleteEquipment: "Impossible de supprimer l'ouvrage",
148
+ LCCConverterStationShuntCompensators: "Moyens de compensation liés à la LCC",
149
+ Side1: "Côté 1",
150
+ Side2: "Côté 2"
144
151
  };
145
152
  export {
146
153
  networkModificationsFr
@@ -30,6 +30,8 @@ export declare enum FieldConstants {
30
30
  COUNTRY = "country",
31
31
  CURRENT_PARAMETERS = "currentParameters",
32
32
  DELETION_MARK = "deletionMark",
33
+ DELETION_SPECIFIC_DATA = "equipmentInfos",
34
+ DELETION_SPECIFIC_TYPE = "specificType",
33
35
  DESCRIPTION = "description",
34
36
  DIRECTORY = "directory",
35
37
  ENERGY_SOURCE = "energySource",
@@ -43,6 +45,7 @@ export declare enum FieldConstants {
43
45
  FOLDER_ID = "folderId",
44
46
  FOLDER_NAME = "folderName",
45
47
  FORMATTED_CASE_PARAMETERS = "formattedCaseParameters",
48
+ HVDC_LINE_LCC_DELETION_SPECIFIC_TYPE = "HVDC_LINE_WITH_LCC",
46
49
  ID = "id",
47
50
  LOAD_TYPE = "loadType",
48
51
  MAXIMUM_ACTIVE_POWER = "maximumActivePower",
@@ -66,6 +69,9 @@ export declare enum FieldConstants {
66
69
  PROPERTY_VALUES = "propertyValues",
67
70
  REACTIVE_POWER_SET_POINT = "reactivePowerSetpoint",
68
71
  SCRIPT = "script",
72
+ SHUNT_COMPENSATOR_SIDE_1 = "mcsOnSide1",
73
+ SHUNT_COMPENSATOR_SIDE_2 = "mcsOnSide2",
74
+ SHUNT_COMPENSATOR_SELECTED = "connectedToHvdc",
69
75
  STATE_ESTIMATION = "stateEstimation",
70
76
  STUDY_NAME = "studyName",
71
77
  TYPE = "type",
@@ -84,6 +90,7 @@ export declare enum FieldConstants {
84
90
  COUPLING_OMNIBUS = "couplingOmnibus",
85
91
  HIDE_BUS_BAR_SECTION = "hideBusBarSection",
86
92
  HIDE_NOMINAL_VOLTAGE = "hideNominalVoltage",
93
+ HIDE_SUBSTATION_FIELD = "hideSubstationField",
87
94
  HIGH_SHORT_CIRCUIT_CURRENT_LIMIT = "highShortCircuitCurrentLimit",
88
95
  HIGH_VOLTAGE_LIMIT = "highVoltageLimit",
89
96
  LOW_SHORT_CIRCUIT_CURRENT_LIMIT = "lowShortCircuitCurrentLimit",
@@ -24,6 +24,8 @@ var FieldConstants = /* @__PURE__ */ ((FieldConstants2) => {
24
24
  FieldConstants2["COUNTRY"] = "country";
25
25
  FieldConstants2["CURRENT_PARAMETERS"] = "currentParameters";
26
26
  FieldConstants2["DELETION_MARK"] = "deletionMark";
27
+ FieldConstants2["DELETION_SPECIFIC_DATA"] = "equipmentInfos";
28
+ FieldConstants2["DELETION_SPECIFIC_TYPE"] = "specificType";
27
29
  FieldConstants2["DESCRIPTION"] = "description";
28
30
  FieldConstants2["DIRECTORY"] = "directory";
29
31
  FieldConstants2["ENERGY_SOURCE"] = "energySource";
@@ -37,6 +39,7 @@ var FieldConstants = /* @__PURE__ */ ((FieldConstants2) => {
37
39
  FieldConstants2["FOLDER_ID"] = "folderId";
38
40
  FieldConstants2["FOLDER_NAME"] = "folderName";
39
41
  FieldConstants2["FORMATTED_CASE_PARAMETERS"] = "formattedCaseParameters";
42
+ FieldConstants2["HVDC_LINE_LCC_DELETION_SPECIFIC_TYPE"] = "HVDC_LINE_WITH_LCC";
40
43
  FieldConstants2["ID"] = "id";
41
44
  FieldConstants2["LOAD_TYPE"] = "loadType";
42
45
  FieldConstants2["MAXIMUM_ACTIVE_POWER"] = "maximumActivePower";
@@ -60,6 +63,9 @@ var FieldConstants = /* @__PURE__ */ ((FieldConstants2) => {
60
63
  FieldConstants2["PROPERTY_VALUES"] = "propertyValues";
61
64
  FieldConstants2["REACTIVE_POWER_SET_POINT"] = "reactivePowerSetpoint";
62
65
  FieldConstants2["SCRIPT"] = "script";
66
+ FieldConstants2["SHUNT_COMPENSATOR_SIDE_1"] = "mcsOnSide1";
67
+ FieldConstants2["SHUNT_COMPENSATOR_SIDE_2"] = "mcsOnSide2";
68
+ FieldConstants2["SHUNT_COMPENSATOR_SELECTED"] = "connectedToHvdc";
63
69
  FieldConstants2["STATE_ESTIMATION"] = "stateEstimation";
64
70
  FieldConstants2["STUDY_NAME"] = "studyName";
65
71
  FieldConstants2["TYPE"] = "type";
@@ -78,6 +84,7 @@ var FieldConstants = /* @__PURE__ */ ((FieldConstants2) => {
78
84
  FieldConstants2["COUPLING_OMNIBUS"] = "couplingOmnibus";
79
85
  FieldConstants2["HIDE_BUS_BAR_SECTION"] = "hideBusBarSection";
80
86
  FieldConstants2["HIDE_NOMINAL_VOLTAGE"] = "hideNominalVoltage";
87
+ FieldConstants2["HIDE_SUBSTATION_FIELD"] = "hideSubstationField";
81
88
  FieldConstants2["HIGH_SHORT_CIRCUIT_CURRENT_LIMIT"] = "highShortCircuitCurrentLimit";
82
89
  FieldConstants2["HIGH_VOLTAGE_LIMIT"] = "highVoltageLimit";
83
90
  FieldConstants2["LOW_SHORT_CIRCUIT_CURRENT_LIMIT"] = "lowShortCircuitCurrentLimit";
@@ -31,7 +31,7 @@ import { SolverTypeInfos } from "./types/dynamic-simulation.type.js";
31
31
  import { DistributionType, SensitivityType } from "./types/sensitivity-analysis.type.js";
32
32
  import { CalculationType, LoadModelsRule } from "./types/dynamic-margin-calculation.type.js";
33
33
  import { OperationType } from "./types/network-modification-types.js";
34
- import { areIdsEqual, getIdOrSelf, getObjectId, notNull, notUndefined, parseIntData, removeNullFields, sanitizeString } from "./ts-utils.js";
34
+ import { areIdsEqual, getIdOrSelf, getIdOrValue, getLabelOrValue, getObjectId, notNull, notUndefined, parseIntData, removeNullFields, richTypeEquals, sanitizeString } from "./ts-utils.js";
35
35
  import { toNumber, validateValueIsANumber } from "./validation-functions.js";
36
36
  import "./yupConfig.js";
37
37
  import * as yup from "yup";
@@ -144,6 +144,8 @@ export {
144
144
  getEquipmentsInfosForSearchBar,
145
145
  getFileIcon,
146
146
  getIdOrSelf,
147
+ getIdOrValue,
148
+ getLabelOrValue,
147
149
  getLoadTypeLabel,
148
150
  getObjectId,
149
151
  isBlankOrEmpty,
@@ -158,6 +160,7 @@ export {
158
160
  notUndefined,
159
161
  parseIntData,
160
162
  removeNullFields,
163
+ richTypeEquals,
161
164
  roundToDefaultPrecision,
162
165
  roundToPrecision,
163
166
  sanitizeString,
@@ -15,3 +15,6 @@ export declare const areIdsEqual: (val1: Option, val2: Option) => boolean;
15
15
  export declare const getObjectId: (object: string | {
16
16
  id: string;
17
17
  }) => string;
18
+ export declare const richTypeEquals: (a: unknown, b: unknown) => boolean;
19
+ export declare function getIdOrValue(value: any): any;
20
+ export declare function getLabelOrValue(value: any): any;
@@ -36,13 +36,23 @@ const areIdsEqual = (val1, val2) => {
36
36
  const getObjectId = (object) => {
37
37
  return typeof object === "string" ? object : object?.id ?? null;
38
38
  };
39
+ const richTypeEquals = (a, b) => a === b;
40
+ function getIdOrValue(value) {
41
+ return typeof value !== "string" ? value?.id ?? null : value;
42
+ }
43
+ function getLabelOrValue(value) {
44
+ return typeof value !== "string" ? value?.label ?? null : value;
45
+ }
39
46
  export {
40
47
  areIdsEqual,
41
48
  getIdOrSelf,
49
+ getIdOrValue,
50
+ getLabelOrValue,
42
51
  getObjectId,
43
52
  notNull,
44
53
  notUndefined,
45
54
  parseIntData,
46
55
  removeNullFields,
56
+ richTypeEquals,
47
57
  sanitizeString
48
58
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.181.0",
3
+ "version": "0.182.0",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "author": "gridsuite team",
6
6
  "homepage": "https://github.com/gridsuite",