@gridsuite/commons-ui 0.69.1 → 0.71.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 (32) hide show
  1. package/dist/components/directoryItemSelector/DirectoryItemSelector.d.ts +2 -1
  2. package/dist/components/directoryItemSelector/DirectoryItemSelector.js +17 -7
  3. package/dist/components/filter/index.d.ts +1 -0
  4. package/dist/components/snackbarProvider/SnackbarProvider.js +30 -6
  5. package/dist/hooks/index.d.ts +1 -0
  6. package/dist/hooks/index.js +2 -0
  7. package/dist/hooks/useModificationLabelComputer.d.ts +24 -0
  8. package/dist/hooks/useModificationLabelComputer.js +74 -0
  9. package/dist/hooks/useSnackMessage.js +5 -2
  10. package/dist/index.js +15 -3
  11. package/dist/services/appsMetadata.d.ts +1 -0
  12. package/dist/services/appsMetadata.js +2 -1
  13. package/dist/services/index.js +4 -2
  14. package/dist/services/utils.d.ts +1 -0
  15. package/dist/services/utils.js +8 -0
  16. package/dist/translations/en/index.d.ts +1 -0
  17. package/dist/translations/en/index.js +2 -0
  18. package/dist/translations/en/networkModificationsEn.d.ts +60 -0
  19. package/dist/translations/en/networkModificationsEn.js +57 -0
  20. package/dist/translations/fr/index.d.ts +1 -0
  21. package/dist/translations/fr/index.js +2 -0
  22. package/dist/translations/fr/networkModificationsFr.d.ts +60 -0
  23. package/dist/translations/fr/networkModificationsFr.js +57 -0
  24. package/dist/utils/index.js +5 -1
  25. package/dist/utils/types/equipmentType.d.ts +16 -1
  26. package/dist/utils/types/equipmentType.js +25 -1
  27. package/dist/utils/types/index.d.ts +1 -0
  28. package/dist/utils/types/index.js +5 -1
  29. package/dist/utils/types/modificationType.d.ts +170 -0
  30. package/dist/utils/types/modificationType.js +208 -0
  31. package/package.json +8 -4
  32. package/dist/components/topBar/tests/TopBar.test.d.ts +0 -7
@@ -0,0 +1,60 @@
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
+ export declare const networkModificationsFr: {
8
+ 'network_modifications.modificationsCount': string;
9
+ 'network_modifications.EQUIPMENT_DELETION': string;
10
+ 'network_modifications.BY_FILTER_DELETION': string;
11
+ 'network_modifications.SUBSTATION_CREATION': string;
12
+ 'network_modifications.SUBSTATION_MODIFICATION': string;
13
+ 'network_modifications.VOLTAGE_LEVEL_CREATION': string;
14
+ 'network_modifications.VOLTAGE_LEVEL_MODIFICATION': string;
15
+ 'network_modifications.LINE_SPLIT_WITH_VOLTAGE_LEVEL': string;
16
+ 'network_modifications.LINE_ATTACH_TO_VOLTAGE_LEVEL': string;
17
+ 'network_modifications.LINES_ATTACH_TO_SPLIT_LINES': string;
18
+ 'network_modifications.LOAD_SCALING': string;
19
+ 'network_modifications.DELETE_VOLTAGE_LEVEL_ON_LINE': string;
20
+ 'network_modifications.DELETE_ATTACHING_LINE': string;
21
+ 'network_modifications.LOAD_CREATION': string;
22
+ 'network_modifications.LOAD_MODIFICATION': string;
23
+ 'network_modifications.BATTERY_CREATION': string;
24
+ 'network_modifications.BATTERY_MODIFICATION': string;
25
+ 'network_modifications.GENERATOR_CREATION': string;
26
+ 'network_modifications.GENERATOR_MODIFICATION': string;
27
+ 'network_modifications.LINE_CREATION': string;
28
+ 'network_modifications.LINE_MODIFICATION': string;
29
+ 'network_modifications.TWO_WINDINGS_TRANSFORMER_CREATION': string;
30
+ 'network_modifications.TWO_WINDINGS_TRANSFORMER_MODIFICATION': string;
31
+ 'network_modifications.OPERATING_STATUS_MODIFICATION': string;
32
+ 'network_modifications.SHUNT_COMPENSATOR_CREATION': string;
33
+ 'network_modifications.SHUNT_COMPENSATOR_MODIFICATION': string;
34
+ 'network_modifications.GENERATOR_SCALING': string;
35
+ 'network_modifications.VSC_CREATION': string;
36
+ 'network_modifications.VSC_MODIFICATION': string;
37
+ 'network_modifications.GROOVY_SCRIPT': string;
38
+ 'network_modifications.EQUIPMENT_ATTRIBUTE_MODIFICATION': string;
39
+ 'network_modifications.creatingModification': string;
40
+ 'network_modifications.deletingModification': string;
41
+ 'network_modifications.updatingModification': string;
42
+ 'network_modifications.stashingModification': string;
43
+ 'network_modifications.restoringModification': string;
44
+ 'network_modifications.modifications': string;
45
+ 'network_modifications.GENERATION_DISPATCH': string;
46
+ 'network_modifications.VOLTAGE_INIT_MODIFICATION': string;
47
+ 'network_modifications.TABULAR_MODIFICATION': string;
48
+ 'network_modifications.tabular.GENERATOR_MODIFICATION': string;
49
+ 'network_modifications.tabular.LOAD_MODIFICATION': string;
50
+ 'network_modifications.BY_FORMULA_MODIFICATION': string;
51
+ 'network_modifications.MODIFICATION_BY_ASSIGNMENT': string;
52
+ 'network_modifications.tabular.LINE_MODIFICATION': string;
53
+ 'network_modifications.tabular.BATTERY_MODIFICATION': string;
54
+ 'network_modifications.tabular.VOLTAGE_LEVEL_MODIFICATION': string;
55
+ 'network_modifications.tabular.TWO_WINDINGS_TRANSFORMER_MODIFICATION': string;
56
+ 'network_modifications.tabular.SHUNT_COMPENSATOR_MODIFICATION': string;
57
+ 'network_modifications.tabular.SUBSTATION_MODIFICATION': string;
58
+ 'network_modifications.TABULAR_CREATION': string;
59
+ 'network_modifications.tabular.GENERATOR_CREATION': string;
60
+ };
@@ -0,0 +1,57 @@
1
+ const networkModificationsFr = {
2
+ "network_modifications.modificationsCount": "{hide, select, false {{count, plural, =0 {aucune modification} =1 {# modification} other {# modifications}}} other {...}}",
3
+ "network_modifications.EQUIPMENT_DELETION": "Suppression de {computedLabel}",
4
+ "network_modifications.BY_FILTER_DELETION": "Suppression par filtre ({computedLabel})",
5
+ "network_modifications.SUBSTATION_CREATION": "Création du site {computedLabel}",
6
+ "network_modifications.SUBSTATION_MODIFICATION": "Modification du site {computedLabel}",
7
+ "network_modifications.VOLTAGE_LEVEL_CREATION": "Création du poste {computedLabel}",
8
+ "network_modifications.VOLTAGE_LEVEL_MODIFICATION": "Modification du poste {computedLabel}",
9
+ "network_modifications.LINE_SPLIT_WITH_VOLTAGE_LEVEL": "Création d'une coupure {computedLabel}",
10
+ "network_modifications.LINE_ATTACH_TO_VOLTAGE_LEVEL": "Création d'un piquage {computedLabel}",
11
+ "network_modifications.LINES_ATTACH_TO_SPLIT_LINES": "Passage de piquage en coupure {computedLabel}",
12
+ "network_modifications.LOAD_SCALING": "Variation plan de consommation {computedLabel}",
13
+ "network_modifications.DELETE_VOLTAGE_LEVEL_ON_LINE": "Suppression d'une coupure {computedLabel}",
14
+ "network_modifications.DELETE_ATTACHING_LINE": "Suppression d'un piquage {computedLabel}",
15
+ "network_modifications.LOAD_CREATION": "Création de la charge {computedLabel}",
16
+ "network_modifications.LOAD_MODIFICATION": "Modification de la charge {computedLabel}",
17
+ "network_modifications.BATTERY_CREATION": "Création de batterie {computedLabel}",
18
+ "network_modifications.BATTERY_MODIFICATION": "Modification de batterie {computedLabel}",
19
+ "network_modifications.GENERATOR_CREATION": "Création du générateur {computedLabel}",
20
+ "network_modifications.GENERATOR_MODIFICATION": "Modification du générateur {computedLabel}",
21
+ "network_modifications.LINE_CREATION": "Création de la ligne {computedLabel}",
22
+ "network_modifications.LINE_MODIFICATION": "Modification de la ligne {computedLabel}",
23
+ "network_modifications.TWO_WINDINGS_TRANSFORMER_CREATION": "Création du transformateur à 2 enroulements {computedLabel}",
24
+ "network_modifications.TWO_WINDINGS_TRANSFORMER_MODIFICATION": "Modification du transformateur à 2 enroulements {computedLabel}",
25
+ "network_modifications.OPERATING_STATUS_MODIFICATION": "{action, select, TRIP {Déclenchement de {computedLabel}} LOCKOUT {Consignation de {computedLabel}} ENERGISE_END_ONE {Mise sous tension à vide de {computedLabel} depuis {energizedEnd}} ENERGISE_END_TWO {Mise sous tension à vide de {computedLabel} depuis {energizedEnd}} SWITCH_ON {Mise en service de {computedLabel}} other {Modification du statut opérationnel de l'équipement {computedLabel}}}",
26
+ "network_modifications.SHUNT_COMPENSATOR_CREATION": "Création d'un moyen de compensation {computedLabel}",
27
+ "network_modifications.SHUNT_COMPENSATOR_MODIFICATION": "Modification d'un moyen de compensation {computedLabel}",
28
+ "network_modifications.GENERATOR_SCALING": "Variation plan de production {computedLabel}",
29
+ "network_modifications.VSC_CREATION": "Création de la HVDC (VSC) {computedLabel}",
30
+ "network_modifications.VSC_MODIFICATION": "Modification de la HVDC (VSC) {computedLabel}",
31
+ "network_modifications.GROOVY_SCRIPT": "Modification par script",
32
+ "network_modifications.EQUIPMENT_ATTRIBUTE_MODIFICATION": "{equipmentAttributeName, select, open {{equipmentAttributeValue, select, true {Ouverture de {computedLabel}} other {Fermeture de {computedLabel}}}} other {Modification de l'equipement {computedLabel}}}",
33
+ "network_modifications.creatingModification": "Création de la modification en cours ...",
34
+ "network_modifications.deletingModification": "Suppression de la modification en cours ...",
35
+ "network_modifications.updatingModification": "Mise à jour de la modification en cours ...",
36
+ "network_modifications.stashingModification": "Mise en corbeille de la modification en cours ...",
37
+ "network_modifications.restoringModification": "Restauration de la modification en cours ...",
38
+ "network_modifications.modifications": "Mise à jour de la liste des modifications en cours ...",
39
+ "network_modifications.GENERATION_DISPATCH": "Démarrage de groupes {computedLabel}",
40
+ "network_modifications.VOLTAGE_INIT_MODIFICATION": "Initialisation du plan de tension {computedLabel}",
41
+ "network_modifications.TABULAR_MODIFICATION": "Modification tabulaire - {computedLabel}",
42
+ "network_modifications.tabular.GENERATOR_MODIFICATION": "modifications de générateurs",
43
+ "network_modifications.tabular.LOAD_MODIFICATION": "modifications de consommations",
44
+ "network_modifications.BY_FORMULA_MODIFICATION": "Modification par formule {computedLabel}",
45
+ "network_modifications.MODIFICATION_BY_ASSIGNMENT": "Modification par filtre {computedLabel}",
46
+ "network_modifications.tabular.LINE_MODIFICATION": "modifications de lignes",
47
+ "network_modifications.tabular.BATTERY_MODIFICATION": "modifications de batteries",
48
+ "network_modifications.tabular.VOLTAGE_LEVEL_MODIFICATION": "modifications de postes",
49
+ "network_modifications.tabular.TWO_WINDINGS_TRANSFORMER_MODIFICATION": "modifications de transformateurs à 2 enroulements",
50
+ "network_modifications.tabular.SHUNT_COMPENSATOR_MODIFICATION": "modifications de MCS linéaires",
51
+ "network_modifications.tabular.SUBSTATION_MODIFICATION": "modifications de sites",
52
+ "network_modifications.TABULAR_CREATION": "Création tabulaire - {computedLabel}",
53
+ "network_modifications.tabular.GENERATOR_CREATION": "créations de générateurs"
54
+ };
55
+ export {
56
+ networkModificationsFr
57
+ };
@@ -8,8 +8,9 @@ import { getFileIcon } from "./mapper/getFileIcon.js";
8
8
  import { equipmentTypesForPredefinedPropertiesMapper } from "./mapper/equipmentTypesForPredefinedPropertiesMapper.js";
9
9
  import { makeComposeClasses, mergeSx, toNestedGlobalSelectors } from "./styles.js";
10
10
  import { ElementType } from "./types/elementType.js";
11
- import { EQUIPMENT_TYPE, EquipmentType, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./types/equipmentType.js";
11
+ import { EQUIPMENT_TYPE, EquipmentType, OperatingStatus, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./types/equipmentType.js";
12
12
  import { Battery, BusBar, DanglingLine, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel } from "./types/equipmentTypes.js";
13
+ import { MODIFICATION_TYPES, ModificationType } from "./types/modificationType.js";
13
14
  import "./yupConfig.js";
14
15
  import * as yup from "yup";
15
16
  export {
@@ -32,6 +33,9 @@ export {
32
33
  LIGHT_THEME,
33
34
  Line,
34
35
  Load,
36
+ MODIFICATION_TYPES,
37
+ ModificationType,
38
+ OperatingStatus,
35
39
  SVC,
36
40
  ShuntCompensator,
37
41
  Substation,
@@ -58,7 +58,10 @@ export declare enum EquipmentType {
58
58
  HVDC_CONVERTER_STATION = "HVDC_CONVERTER_STATION",
59
59
  VSC_CONVERTER_STATION = "VSC_CONVERTER_STATION",
60
60
  LCC_CONVERTER_STATION = "LCC_CONVERTER_STATION",
61
- DANGLING_LINE = "DANGLING_LINE"
61
+ DANGLING_LINE = "DANGLING_LINE",
62
+ TIE_LINE = "TIE_LINE",
63
+ DISCONNECTOR = "DISCONNECTOR",
64
+ BREAKER = "BREAKER"
62
65
  }
63
66
  export declare const EQUIPMENT_TYPE: Record<EquipmentType, {
64
67
  name: EquipmentType;
@@ -78,5 +81,17 @@ export interface EquipmentInfos extends Identifiable {
78
81
  type: EquipmentType;
79
82
  voltageLevelLabel?: string;
80
83
  voltageLevelId?: string;
84
+ operatingStatus?: string;
85
+ terminal1Connected?: boolean;
86
+ terminal2Connected?: boolean;
87
+ voltageLevelId1?: string;
88
+ voltageLevelName1?: string;
89
+ voltageLevelId2?: string;
90
+ voltageLevelName2?: string;
81
91
  }
92
+ export declare const OperatingStatus: {
93
+ IN_OPERATION: string;
94
+ PLANNED_OUTAGE: string;
95
+ FORCED_OUTAGE: string;
96
+ };
82
97
  export declare const getEquipmentsInfosForSearchBar: (equipmentsInfos: Equipment[], getNameOrId: (e: Identifiable) => string) => EquipmentInfos[];
@@ -60,6 +60,9 @@ var EquipmentType = /* @__PURE__ */ ((EquipmentType2) => {
60
60
  EquipmentType2["VSC_CONVERTER_STATION"] = "VSC_CONVERTER_STATION";
61
61
  EquipmentType2["LCC_CONVERTER_STATION"] = "LCC_CONVERTER_STATION";
62
62
  EquipmentType2["DANGLING_LINE"] = "DANGLING_LINE";
63
+ EquipmentType2["TIE_LINE"] = "TIE_LINE";
64
+ EquipmentType2["DISCONNECTOR"] = "DISCONNECTOR";
65
+ EquipmentType2["BREAKER"] = "BREAKER";
63
66
  return EquipmentType2;
64
67
  })(EquipmentType || {});
65
68
  const EQUIPMENT_TYPE = {
@@ -188,7 +191,27 @@ const EQUIPMENT_TYPE = {
188
191
  ]: {
189
192
  name: "LCC_CONVERTER_STATION",
190
193
  tagLabel: "equipment_search/lccConverterStationTag"
191
- }
194
+ },
195
+ [
196
+ "TIE_LINE"
197
+ /* TIE_LINE */
198
+ ]: void 0,
199
+ // Not used in the UI
200
+ [
201
+ "DISCONNECTOR"
202
+ /* DISCONNECTOR */
203
+ ]: void 0,
204
+ // Not used in the UI
205
+ [
206
+ "BREAKER"
207
+ /* BREAKER */
208
+ ]: void 0
209
+ // Not used in the UI
210
+ };
211
+ const OperatingStatus = {
212
+ IN_OPERATION: "IN_OPERATION",
213
+ PLANNED_OUTAGE: "PLANNED_OUTAGE",
214
+ FORCED_OUTAGE: "FORCED_OUTAGE"
192
215
  };
193
216
  const getEquipmentsInfosForSearchBar = (equipmentsInfos, getNameOrId) => {
194
217
  return equipmentsInfos.flatMap((e) => {
@@ -216,6 +239,7 @@ const getEquipmentsInfosForSearchBar = (equipmentsInfos, getNameOrId) => {
216
239
  export {
217
240
  EQUIPMENT_TYPE,
218
241
  EquipmentType,
242
+ OperatingStatus,
219
243
  TYPE_TAG_MAX_SIZE,
220
244
  VL_TAG_MAX_SIZE,
221
245
  equipmentStyles,
@@ -9,3 +9,4 @@ export * from './equipmentType';
9
9
  export * from './equipmentTypes';
10
10
  export * from './metadata';
11
11
  export * from './types';
12
+ export * from './modificationType';
@@ -1,6 +1,7 @@
1
1
  import { ElementType } from "./elementType.js";
2
- import { EQUIPMENT_TYPE, EquipmentType, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./equipmentType.js";
2
+ import { EQUIPMENT_TYPE, EquipmentType, OperatingStatus, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./equipmentType.js";
3
3
  import { Battery, BusBar, DanglingLine, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel } from "./equipmentTypes.js";
4
+ import { MODIFICATION_TYPES, ModificationType } from "./modificationType.js";
4
5
  export {
5
6
  Battery,
6
7
  BusBar,
@@ -13,6 +14,9 @@ export {
13
14
  LCC,
14
15
  Line,
15
16
  Load,
17
+ MODIFICATION_TYPES,
18
+ ModificationType,
19
+ OperatingStatus,
16
20
  SVC,
17
21
  ShuntCompensator,
18
22
  Substation,
@@ -0,0 +1,170 @@
1
+ /**
2
+ * Copyright (c) 2023, 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 enum ModificationType {
8
+ GROOVY_SCRIPT = "GROOVY_SCRIPT",
9
+ LOAD_CREATION = "LOAD_CREATION",
10
+ LOAD_MODIFICATION = "LOAD_MODIFICATION",
11
+ BATTERY_CREATION = "BATTERY_CREATION",
12
+ BATTERY_MODIFICATION = "BATTERY_MODIFICATION",
13
+ GENERATOR_CREATION = "GENERATOR_CREATION",
14
+ GENERATOR_MODIFICATION = "GENERATOR_MODIFICATION",
15
+ LINE_CREATION = "LINE_CREATION",
16
+ LINE_MODIFICATION = "LINE_MODIFICATION",
17
+ SUBSTATION_CREATION = "SUBSTATION_CREATION",
18
+ SUBSTATION_MODIFICATION = "SUBSTATION_MODIFICATION",
19
+ VOLTAGE_LEVEL_CREATION = "VOLTAGE_LEVEL_CREATION",
20
+ VOLTAGE_LEVEL_MODIFICATION = "VOLTAGE_LEVEL_MODIFICATION",
21
+ SHUNT_COMPENSATOR_CREATION = "SHUNT_COMPENSATOR_CREATION",
22
+ SHUNT_COMPENSATOR_MODIFICATION = "SHUNT_COMPENSATOR_MODIFICATION",
23
+ STATIC_VAR_COMPENSATOR_CREATION = "STATIC_VAR_COMPENSATOR_CREATION",
24
+ TWO_WINDINGS_TRANSFORMER_CREATION = "TWO_WINDINGS_TRANSFORMER_CREATION",
25
+ TWO_WINDINGS_TRANSFORMER_MODIFICATION = "TWO_WINDINGS_TRANSFORMER_MODIFICATION",
26
+ VSC_CREATION = "VSC_CREATION",
27
+ EQUIPMENT_DELETION = "EQUIPMENT_DELETION",
28
+ BY_FILTER_DELETION = "BY_FILTER_DELETION",
29
+ LINE_SPLIT_WITH_VOLTAGE_LEVEL = "LINE_SPLIT_WITH_VOLTAGE_LEVEL",
30
+ LINE_ATTACH_TO_VOLTAGE_LEVEL = "LINE_ATTACH_TO_VOLTAGE_LEVEL",
31
+ LINES_ATTACH_TO_SPLIT_LINES = "LINES_ATTACH_TO_SPLIT_LINES",
32
+ OPERATING_STATUS_MODIFICATION = "OPERATING_STATUS_MODIFICATION",
33
+ EQUIPMENT_ATTRIBUTE_MODIFICATION = "EQUIPMENT_ATTRIBUTE_MODIFICATION",
34
+ LOAD_SCALING = "LOAD_SCALING",
35
+ DELETE_VOLTAGE_LEVEL_ON_LINE = "DELETE_VOLTAGE_LEVEL_ON_LINE",
36
+ DELETE_ATTACHING_LINE = "DELETE_ATTACHING_LINE",
37
+ GENERATOR_SCALING = "GENERATOR_SCALING",
38
+ GENERATION_DISPATCH = "GENERATION_DISPATCH",
39
+ VOLTAGE_INIT_MODIFICATION = "VOLTAGE_INIT_MODIFICATION",
40
+ CONVERTER_STATION_CREATION = "CONVERTER_STATION_CREATION",
41
+ TABULAR_MODIFICATION = "TABULAR_MODIFICATION",
42
+ BY_FORMULA_MODIFICATION = "BY_FORMULA_MODIFICATION",
43
+ MODIFICATION_BY_ASSIGNMENT = "MODIFICATION_BY_ASSIGNMENT",
44
+ TABULAR_CREATION = "TABULAR_CREATION",
45
+ VSC_MODIFICATION = "VSC_MODIFICATION",
46
+ CONVERTER_STATION_MODIFICATION = "CONVERTER_STATION_MODIFICATION",
47
+ COMPOSITE_MODIFICATION = "COMPOSITE_MODIFICATION"
48
+ }
49
+ export declare const MODIFICATION_TYPES: {
50
+ GROOVY_SCRIPT: {
51
+ type: ModificationType;
52
+ };
53
+ LOAD_CREATION: {
54
+ type: ModificationType;
55
+ };
56
+ LOAD_MODIFICATION: {
57
+ type: ModificationType;
58
+ };
59
+ BATTERY_CREATION: {
60
+ type: ModificationType;
61
+ };
62
+ BATTERY_MODIFICATION: {
63
+ type: ModificationType;
64
+ };
65
+ GENERATOR_CREATION: {
66
+ type: ModificationType;
67
+ };
68
+ GENERATOR_MODIFICATION: {
69
+ type: ModificationType;
70
+ };
71
+ LINE_CREATION: {
72
+ type: ModificationType;
73
+ };
74
+ LINE_MODIFICATION: {
75
+ type: ModificationType;
76
+ };
77
+ SUBSTATION_CREATION: {
78
+ type: ModificationType;
79
+ };
80
+ SUBSTATION_MODIFICATION: {
81
+ type: ModificationType;
82
+ };
83
+ VOLTAGE_LEVEL_CREATION: {
84
+ type: ModificationType;
85
+ };
86
+ VOLTAGE_LEVEL_MODIFICATION: {
87
+ type: ModificationType;
88
+ };
89
+ SHUNT_COMPENSATOR_CREATION: {
90
+ type: ModificationType;
91
+ };
92
+ SHUNT_COMPENSATOR_MODIFICATION: {
93
+ type: ModificationType;
94
+ };
95
+ STATIC_VAR_COMPENSATOR_CREATION: {
96
+ type: ModificationType;
97
+ };
98
+ TWO_WINDINGS_TRANSFORMER_CREATION: {
99
+ type: ModificationType;
100
+ };
101
+ TWO_WINDINGS_TRANSFORMER_MODIFICATION: {
102
+ type: ModificationType;
103
+ };
104
+ VSC_CREATION: {
105
+ type: ModificationType;
106
+ };
107
+ EQUIPMENT_DELETION: {
108
+ type: ModificationType;
109
+ };
110
+ BY_FILTER_DELETION: {
111
+ type: ModificationType;
112
+ };
113
+ LINE_SPLIT_WITH_VOLTAGE_LEVEL: {
114
+ type: ModificationType;
115
+ };
116
+ LINE_ATTACH_TO_VOLTAGE_LEVEL: {
117
+ type: ModificationType;
118
+ };
119
+ LINES_ATTACH_TO_SPLIT_LINES: {
120
+ type: ModificationType;
121
+ };
122
+ OPERATING_STATUS_MODIFICATION: {
123
+ type: ModificationType;
124
+ };
125
+ EQUIPMENT_ATTRIBUTE_MODIFICATION: {
126
+ type: ModificationType;
127
+ };
128
+ LOAD_SCALING: {
129
+ type: ModificationType;
130
+ };
131
+ DELETE_VOLTAGE_LEVEL_ON_LINE: {
132
+ type: ModificationType;
133
+ };
134
+ DELETE_ATTACHING_LINE: {
135
+ type: ModificationType;
136
+ };
137
+ GENERATOR_SCALING: {
138
+ type: ModificationType;
139
+ };
140
+ GENERATION_DISPATCH: {
141
+ type: ModificationType;
142
+ };
143
+ VOLTAGE_INIT_MODIFICATION: {
144
+ type: ModificationType;
145
+ };
146
+ CONVERTER_STATION_CREATION: {
147
+ type: ModificationType;
148
+ };
149
+ TABULAR_MODIFICATION: {
150
+ type: ModificationType;
151
+ };
152
+ BY_FORMULA_MODIFICATION: {
153
+ type: ModificationType;
154
+ };
155
+ MODIFICATION_BY_ASSIGNMENT: {
156
+ type: string;
157
+ };
158
+ TABULAR_CREATION: {
159
+ type: ModificationType;
160
+ };
161
+ VSC_MODIFICATION: {
162
+ type: ModificationType;
163
+ };
164
+ CONVERTER_STATION_MODIFICATION: {
165
+ type: ModificationType;
166
+ };
167
+ COMPOSITE_MODIFICATION: {
168
+ type: ModificationType;
169
+ };
170
+ };
@@ -0,0 +1,208 @@
1
+ var ModificationType = /* @__PURE__ */ ((ModificationType2) => {
2
+ ModificationType2["GROOVY_SCRIPT"] = "GROOVY_SCRIPT";
3
+ ModificationType2["LOAD_CREATION"] = "LOAD_CREATION";
4
+ ModificationType2["LOAD_MODIFICATION"] = "LOAD_MODIFICATION";
5
+ ModificationType2["BATTERY_CREATION"] = "BATTERY_CREATION";
6
+ ModificationType2["BATTERY_MODIFICATION"] = "BATTERY_MODIFICATION";
7
+ ModificationType2["GENERATOR_CREATION"] = "GENERATOR_CREATION";
8
+ ModificationType2["GENERATOR_MODIFICATION"] = "GENERATOR_MODIFICATION";
9
+ ModificationType2["LINE_CREATION"] = "LINE_CREATION";
10
+ ModificationType2["LINE_MODIFICATION"] = "LINE_MODIFICATION";
11
+ ModificationType2["SUBSTATION_CREATION"] = "SUBSTATION_CREATION";
12
+ ModificationType2["SUBSTATION_MODIFICATION"] = "SUBSTATION_MODIFICATION";
13
+ ModificationType2["VOLTAGE_LEVEL_CREATION"] = "VOLTAGE_LEVEL_CREATION";
14
+ ModificationType2["VOLTAGE_LEVEL_MODIFICATION"] = "VOLTAGE_LEVEL_MODIFICATION";
15
+ ModificationType2["SHUNT_COMPENSATOR_CREATION"] = "SHUNT_COMPENSATOR_CREATION";
16
+ ModificationType2["SHUNT_COMPENSATOR_MODIFICATION"] = "SHUNT_COMPENSATOR_MODIFICATION";
17
+ ModificationType2["STATIC_VAR_COMPENSATOR_CREATION"] = "STATIC_VAR_COMPENSATOR_CREATION";
18
+ ModificationType2["TWO_WINDINGS_TRANSFORMER_CREATION"] = "TWO_WINDINGS_TRANSFORMER_CREATION";
19
+ ModificationType2["TWO_WINDINGS_TRANSFORMER_MODIFICATION"] = "TWO_WINDINGS_TRANSFORMER_MODIFICATION";
20
+ ModificationType2["VSC_CREATION"] = "VSC_CREATION";
21
+ ModificationType2["EQUIPMENT_DELETION"] = "EQUIPMENT_DELETION";
22
+ ModificationType2["BY_FILTER_DELETION"] = "BY_FILTER_DELETION";
23
+ ModificationType2["LINE_SPLIT_WITH_VOLTAGE_LEVEL"] = "LINE_SPLIT_WITH_VOLTAGE_LEVEL";
24
+ ModificationType2["LINE_ATTACH_TO_VOLTAGE_LEVEL"] = "LINE_ATTACH_TO_VOLTAGE_LEVEL";
25
+ ModificationType2["LINES_ATTACH_TO_SPLIT_LINES"] = "LINES_ATTACH_TO_SPLIT_LINES";
26
+ ModificationType2["OPERATING_STATUS_MODIFICATION"] = "OPERATING_STATUS_MODIFICATION";
27
+ ModificationType2["EQUIPMENT_ATTRIBUTE_MODIFICATION"] = "EQUIPMENT_ATTRIBUTE_MODIFICATION";
28
+ ModificationType2["LOAD_SCALING"] = "LOAD_SCALING";
29
+ ModificationType2["DELETE_VOLTAGE_LEVEL_ON_LINE"] = "DELETE_VOLTAGE_LEVEL_ON_LINE";
30
+ ModificationType2["DELETE_ATTACHING_LINE"] = "DELETE_ATTACHING_LINE";
31
+ ModificationType2["GENERATOR_SCALING"] = "GENERATOR_SCALING";
32
+ ModificationType2["GENERATION_DISPATCH"] = "GENERATION_DISPATCH";
33
+ ModificationType2["VOLTAGE_INIT_MODIFICATION"] = "VOLTAGE_INIT_MODIFICATION";
34
+ ModificationType2["CONVERTER_STATION_CREATION"] = "CONVERTER_STATION_CREATION";
35
+ ModificationType2["TABULAR_MODIFICATION"] = "TABULAR_MODIFICATION";
36
+ ModificationType2["BY_FORMULA_MODIFICATION"] = "BY_FORMULA_MODIFICATION";
37
+ ModificationType2["MODIFICATION_BY_ASSIGNMENT"] = "MODIFICATION_BY_ASSIGNMENT";
38
+ ModificationType2["TABULAR_CREATION"] = "TABULAR_CREATION";
39
+ ModificationType2["VSC_MODIFICATION"] = "VSC_MODIFICATION";
40
+ ModificationType2["CONVERTER_STATION_MODIFICATION"] = "CONVERTER_STATION_MODIFICATION";
41
+ ModificationType2["COMPOSITE_MODIFICATION"] = "COMPOSITE_MODIFICATION";
42
+ return ModificationType2;
43
+ })(ModificationType || {});
44
+ const MODIFICATION_TYPES = {
45
+ GROOVY_SCRIPT: {
46
+ type: "GROOVY_SCRIPT"
47
+ /* GROOVY_SCRIPT */
48
+ },
49
+ LOAD_CREATION: {
50
+ type: "LOAD_CREATION"
51
+ /* LOAD_CREATION */
52
+ },
53
+ LOAD_MODIFICATION: {
54
+ type: "LOAD_MODIFICATION"
55
+ /* LOAD_MODIFICATION */
56
+ },
57
+ BATTERY_CREATION: {
58
+ type: "BATTERY_CREATION"
59
+ /* BATTERY_CREATION */
60
+ },
61
+ BATTERY_MODIFICATION: {
62
+ type: "BATTERY_MODIFICATION"
63
+ /* BATTERY_MODIFICATION */
64
+ },
65
+ GENERATOR_CREATION: {
66
+ type: "GENERATOR_CREATION"
67
+ /* GENERATOR_CREATION */
68
+ },
69
+ GENERATOR_MODIFICATION: {
70
+ type: "GENERATOR_MODIFICATION"
71
+ /* GENERATOR_MODIFICATION */
72
+ },
73
+ LINE_CREATION: {
74
+ type: "LINE_CREATION"
75
+ /* LINE_CREATION */
76
+ },
77
+ LINE_MODIFICATION: {
78
+ type: "LINE_MODIFICATION"
79
+ /* LINE_MODIFICATION */
80
+ },
81
+ SUBSTATION_CREATION: {
82
+ type: "SUBSTATION_CREATION"
83
+ /* SUBSTATION_CREATION */
84
+ },
85
+ SUBSTATION_MODIFICATION: {
86
+ type: "SUBSTATION_MODIFICATION"
87
+ /* SUBSTATION_MODIFICATION */
88
+ },
89
+ VOLTAGE_LEVEL_CREATION: {
90
+ type: "VOLTAGE_LEVEL_CREATION"
91
+ /* VOLTAGE_LEVEL_CREATION */
92
+ },
93
+ VOLTAGE_LEVEL_MODIFICATION: {
94
+ type: "VOLTAGE_LEVEL_MODIFICATION"
95
+ /* VOLTAGE_LEVEL_MODIFICATION */
96
+ },
97
+ SHUNT_COMPENSATOR_CREATION: {
98
+ type: "SHUNT_COMPENSATOR_CREATION"
99
+ /* SHUNT_COMPENSATOR_CREATION */
100
+ },
101
+ SHUNT_COMPENSATOR_MODIFICATION: {
102
+ type: "SHUNT_COMPENSATOR_MODIFICATION"
103
+ /* SHUNT_COMPENSATOR_MODIFICATION */
104
+ },
105
+ STATIC_VAR_COMPENSATOR_CREATION: {
106
+ type: "STATIC_VAR_COMPENSATOR_CREATION"
107
+ /* STATIC_VAR_COMPENSATOR_CREATION */
108
+ },
109
+ TWO_WINDINGS_TRANSFORMER_CREATION: {
110
+ type: "TWO_WINDINGS_TRANSFORMER_CREATION"
111
+ /* TWO_WINDINGS_TRANSFORMER_CREATION */
112
+ },
113
+ TWO_WINDINGS_TRANSFORMER_MODIFICATION: {
114
+ type: "TWO_WINDINGS_TRANSFORMER_MODIFICATION"
115
+ /* TWO_WINDINGS_TRANSFORMER_MODIFICATION */
116
+ },
117
+ VSC_CREATION: {
118
+ type: "VSC_CREATION"
119
+ /* VSC_CREATION */
120
+ },
121
+ EQUIPMENT_DELETION: {
122
+ type: "EQUIPMENT_DELETION"
123
+ /* EQUIPMENT_DELETION */
124
+ },
125
+ BY_FILTER_DELETION: {
126
+ type: "BY_FILTER_DELETION"
127
+ /* BY_FILTER_DELETION */
128
+ },
129
+ LINE_SPLIT_WITH_VOLTAGE_LEVEL: {
130
+ type: "LINE_SPLIT_WITH_VOLTAGE_LEVEL"
131
+ /* LINE_SPLIT_WITH_VOLTAGE_LEVEL */
132
+ },
133
+ LINE_ATTACH_TO_VOLTAGE_LEVEL: {
134
+ type: "LINE_ATTACH_TO_VOLTAGE_LEVEL"
135
+ /* LINE_ATTACH_TO_VOLTAGE_LEVEL */
136
+ },
137
+ LINES_ATTACH_TO_SPLIT_LINES: {
138
+ type: "LINES_ATTACH_TO_SPLIT_LINES"
139
+ /* LINES_ATTACH_TO_SPLIT_LINES */
140
+ },
141
+ OPERATING_STATUS_MODIFICATION: {
142
+ type: "OPERATING_STATUS_MODIFICATION"
143
+ /* OPERATING_STATUS_MODIFICATION */
144
+ },
145
+ EQUIPMENT_ATTRIBUTE_MODIFICATION: {
146
+ type: "EQUIPMENT_ATTRIBUTE_MODIFICATION"
147
+ /* EQUIPMENT_ATTRIBUTE_MODIFICATION */
148
+ },
149
+ LOAD_SCALING: {
150
+ type: "LOAD_SCALING"
151
+ /* LOAD_SCALING */
152
+ },
153
+ DELETE_VOLTAGE_LEVEL_ON_LINE: {
154
+ type: "DELETE_VOLTAGE_LEVEL_ON_LINE"
155
+ /* DELETE_VOLTAGE_LEVEL_ON_LINE */
156
+ },
157
+ DELETE_ATTACHING_LINE: {
158
+ type: "DELETE_ATTACHING_LINE"
159
+ /* DELETE_ATTACHING_LINE */
160
+ },
161
+ GENERATOR_SCALING: {
162
+ type: "GENERATOR_SCALING"
163
+ /* GENERATOR_SCALING */
164
+ },
165
+ GENERATION_DISPATCH: {
166
+ type: "GENERATION_DISPATCH"
167
+ /* GENERATION_DISPATCH */
168
+ },
169
+ VOLTAGE_INIT_MODIFICATION: {
170
+ type: "VOLTAGE_INIT_MODIFICATION"
171
+ /* VOLTAGE_INIT_MODIFICATION */
172
+ },
173
+ CONVERTER_STATION_CREATION: {
174
+ type: "CONVERTER_STATION_CREATION"
175
+ /* CONVERTER_STATION_CREATION */
176
+ },
177
+ TABULAR_MODIFICATION: {
178
+ type: "TABULAR_MODIFICATION"
179
+ /* TABULAR_MODIFICATION */
180
+ },
181
+ BY_FORMULA_MODIFICATION: {
182
+ type: "BY_FORMULA_MODIFICATION"
183
+ /* BY_FORMULA_MODIFICATION */
184
+ },
185
+ MODIFICATION_BY_ASSIGNMENT: {
186
+ type: "MODIFICATION_BY_ASSIGNMENT"
187
+ },
188
+ TABULAR_CREATION: {
189
+ type: "TABULAR_CREATION"
190
+ /* TABULAR_CREATION */
191
+ },
192
+ VSC_MODIFICATION: {
193
+ type: "VSC_MODIFICATION"
194
+ /* VSC_MODIFICATION */
195
+ },
196
+ CONVERTER_STATION_MODIFICATION: {
197
+ type: "CONVERTER_STATION_MODIFICATION"
198
+ /* CONVERTER_STATION_MODIFICATION */
199
+ },
200
+ COMPOSITE_MODIFICATION: {
201
+ type: "COMPOSITE_MODIFICATION"
202
+ /* COMPOSITE_MODIFICATION */
203
+ }
204
+ };
205
+ export {
206
+ MODIFICATION_TYPES,
207
+ ModificationType
208
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.69.1",
3
+ "version": "0.71.0",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "engines": {
6
6
  "npm": ">=9",
@@ -46,18 +46,18 @@
46
46
  "uuid": "^9.0.1"
47
47
  },
48
48
  "peerDependencies": {
49
- "@mui/system": "^5.15.15",
50
- "@mui/x-tree-view": "^6.17.0",
51
- "papaparse": "^5.4.1",
52
49
  "@emotion/react": "^11.11.4",
53
50
  "@emotion/styled": "^11.11.0",
54
51
  "@hookform/resolvers": "^3.3.4",
55
52
  "@mui/icons-material": "^5.15.14",
56
53
  "@mui/lab": "5.0.0-alpha.169",
57
54
  "@mui/material": "^5.15.14",
55
+ "@mui/system": "^5.15.15",
56
+ "@mui/x-tree-view": "^6.17.0",
58
57
  "ag-grid-community": "^31.0.0",
59
58
  "ag-grid-react": "^31.2.0",
60
59
  "notistack": "^3.0.1",
60
+ "papaparse": "^5.4.1",
61
61
  "react": "^18.2.0",
62
62
  "react-dom": "^18.2.0",
63
63
  "react-hook-form": "^7.51.2",
@@ -80,10 +80,13 @@
80
80
  "@mui/lab": "5.0.0-alpha.169",
81
81
  "@mui/material": "^5.15.14",
82
82
  "@react-hook/window-size": "^3.1.1",
83
+ "@testing-library/jest-dom": "^6.5.0",
83
84
  "@testing-library/react": "^16.0.0",
85
+ "@testing-library/user-event": "^14.5.2",
84
86
  "@types/autosuggest-highlight": "^3.2.3",
85
87
  "@types/eslint": "^8.56.7",
86
88
  "@types/eslint-config-prettier": "^6.11.3",
89
+ "@types/jest": "^29.5.13",
87
90
  "@types/json-logic-js": "^2.0.7",
88
91
  "@types/license-checker": "^25.0.6",
89
92
  "@types/localized-countries": "^2.0.3",
@@ -119,6 +122,7 @@
119
122
  "glob": "^10.3.12",
120
123
  "identity-obj-proxy": "^3.0.0",
121
124
  "jest": "^29.7.0",
125
+ "jest-dom": "^4.0.0",
122
126
  "jest-environment-jsdom": "^29.7.0",
123
127
  "license-checker": "^25.0.1",
124
128
  "notistack": "^3.0.1",