@gridsuite/commons-ui 0.131.0 → 0.133.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 (50) hide show
  1. package/dist/components/customAGGrid/separatorCellRenderer.d.ts +2 -11
  2. package/dist/components/customAGGrid/separatorCellRenderer.js +7 -2
  3. package/dist/components/dnd-table/dnd-table.js +3 -3
  4. package/dist/components/filter/FilterCreationDialog.js +13 -3
  5. package/dist/components/filter/expert/ExpertFilterEditionDialog.js +12 -4
  6. package/dist/components/filter/expert/expertFilterConstants.d.ts +13 -12
  7. package/dist/components/filter/expert/expertFilterConstants.js +17 -48
  8. package/dist/components/filter/expert/expertFilterUtils.js +6 -2
  9. package/dist/components/filter/utils/filterApi.js +14 -6
  10. package/dist/components/inputs/reactHookForm/DirectoryItemsInput.d.ts +2 -2
  11. package/dist/components/inputs/reactHookForm/DirectoryItemsInput.js +4 -2
  12. package/dist/components/inputs/reactHookForm/agGridTable/CustomAgGridTable.js +4 -0
  13. package/dist/components/parameters/short-circuit/short-circuit-fields.d.ts +2 -1
  14. package/dist/components/parameters/short-circuit/short-circuit-fields.js +20 -5
  15. package/dist/components/parameters/short-circuit/short-circuit-parameters-dialog.d.ts +1 -1
  16. package/dist/components/parameters/short-circuit/short-circuit-parameters-dialog.js +4 -2
  17. package/dist/components/parameters/short-circuit/short-circuit-parameters-form.d.ts +2 -1
  18. package/dist/components/parameters/short-circuit/short-circuit-parameters-form.js +3 -2
  19. package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.d.ts +2 -1
  20. package/dist/components/parameters/short-circuit/short-circuit-parameters-inline.js +3 -1
  21. package/dist/index.js +17 -3
  22. package/dist/services/businessErrorCode.d.ts +11 -0
  23. package/dist/services/businessErrorCode.js +10 -0
  24. package/dist/services/index.d.ts +1 -0
  25. package/dist/services/index.js +5 -1
  26. package/dist/services/utils.d.ts +14 -3
  27. package/dist/services/utils.js +44 -11
  28. package/dist/translations/en/businessErrorsEn.d.ts +28 -0
  29. package/dist/translations/en/businessErrorsEn.js +25 -0
  30. package/dist/translations/en/equipmentsEn.d.ts +1 -0
  31. package/dist/translations/en/equipmentsEn.js +2 -1
  32. package/dist/translations/en/errorsEn.d.ts +9 -0
  33. package/dist/translations/en/errorsEn.js +6 -0
  34. package/dist/translations/en/index.d.ts +2 -0
  35. package/dist/translations/en/index.js +4 -0
  36. package/dist/translations/fr/businessErrorsFr.d.ts +28 -0
  37. package/dist/translations/fr/businessErrorsFr.js +25 -0
  38. package/dist/translations/fr/equipmentsFr.d.ts +1 -0
  39. package/dist/translations/fr/equipmentsFr.js +2 -1
  40. package/dist/translations/fr/errorsFr.d.ts +9 -0
  41. package/dist/translations/fr/errorsFr.js +6 -0
  42. package/dist/translations/fr/index.d.ts +2 -0
  43. package/dist/translations/fr/index.js +4 -0
  44. package/dist/utils/index.js +4 -2
  45. package/dist/utils/types/equipmentType.d.ts +162 -8
  46. package/dist/utils/types/equipmentType.js +117 -9
  47. package/dist/utils/types/index.js +4 -2
  48. package/dist/utils/types/types.d.ts +4 -0
  49. package/dist/utils/types/types.js +7 -1
  50. package/package.json +4 -4
@@ -71,7 +71,7 @@ var ExtendedEquipmentType = /* @__PURE__ */ ((ExtendedEquipmentType2) => {
71
71
  ExtendedEquipmentType2["HVDC_LINE_VSC"] = "HVDC_LINE_VSC";
72
72
  return ExtendedEquipmentType2;
73
73
  })(ExtendedEquipmentType || {});
74
- const BASE_EQUIPMENTS = {
74
+ const ALL_EQUIPMENTS = {
75
75
  [
76
76
  "SUBSTATION"
77
77
  /* SUBSTATION */
@@ -148,8 +148,115 @@ const BASE_EQUIPMENTS = {
148
148
  ]: {
149
149
  id: "DANGLING_LINE",
150
150
  label: "DanglingLines"
151
+ },
152
+ [
153
+ "BUSBAR_SECTION"
154
+ /* BUSBAR_SECTION */
155
+ ]: {
156
+ id: "BUSBAR_SECTION",
157
+ label: "BusBarSections"
158
+ },
159
+ [
160
+ "HVDC_LINE"
161
+ /* HVDC_LINE */
162
+ ]: {
163
+ id: "HVDC_LINE",
164
+ label: "Hvdc"
165
+ },
166
+ [
167
+ "HVDC_LINE_LCC"
168
+ /* HVDC_LINE_LCC */
169
+ ]: {
170
+ id: "HVDC_LINE_LCC",
171
+ label: "LCC"
172
+ },
173
+ [
174
+ "HVDC_LINE_VSC"
175
+ /* HVDC_LINE_VSC */
176
+ ]: {
177
+ id: "HVDC_LINE_VSC",
178
+ label: "VSC"
151
179
  }
152
180
  };
181
+ const BASE_EQUIPMENTS = {
182
+ [
183
+ "SUBSTATION"
184
+ /* SUBSTATION */
185
+ ]: ALL_EQUIPMENTS[
186
+ "SUBSTATION"
187
+ /* SUBSTATION */
188
+ ],
189
+ [
190
+ "VOLTAGE_LEVEL"
191
+ /* VOLTAGE_LEVEL */
192
+ ]: ALL_EQUIPMENTS[
193
+ "VOLTAGE_LEVEL"
194
+ /* VOLTAGE_LEVEL */
195
+ ],
196
+ [
197
+ "LINE"
198
+ /* LINE */
199
+ ]: ALL_EQUIPMENTS[
200
+ "LINE"
201
+ /* LINE */
202
+ ],
203
+ [
204
+ "TWO_WINDINGS_TRANSFORMER"
205
+ /* TWO_WINDINGS_TRANSFORMER */
206
+ ]: ALL_EQUIPMENTS[
207
+ "TWO_WINDINGS_TRANSFORMER"
208
+ /* TWO_WINDINGS_TRANSFORMER */
209
+ ],
210
+ [
211
+ "THREE_WINDINGS_TRANSFORMER"
212
+ /* THREE_WINDINGS_TRANSFORMER */
213
+ ]: ALL_EQUIPMENTS[
214
+ "THREE_WINDINGS_TRANSFORMER"
215
+ /* THREE_WINDINGS_TRANSFORMER */
216
+ ],
217
+ [
218
+ "GENERATOR"
219
+ /* GENERATOR */
220
+ ]: ALL_EQUIPMENTS[
221
+ "GENERATOR"
222
+ /* GENERATOR */
223
+ ],
224
+ [
225
+ "BATTERY"
226
+ /* BATTERY */
227
+ ]: ALL_EQUIPMENTS[
228
+ "BATTERY"
229
+ /* BATTERY */
230
+ ],
231
+ [
232
+ "LOAD"
233
+ /* LOAD */
234
+ ]: ALL_EQUIPMENTS[
235
+ "LOAD"
236
+ /* LOAD */
237
+ ],
238
+ [
239
+ "SHUNT_COMPENSATOR"
240
+ /* SHUNT_COMPENSATOR */
241
+ ]: ALL_EQUIPMENTS[
242
+ "SHUNT_COMPENSATOR"
243
+ /* SHUNT_COMPENSATOR */
244
+ ],
245
+ [
246
+ "STATIC_VAR_COMPENSATOR"
247
+ /* STATIC_VAR_COMPENSATOR */
248
+ ]: ALL_EQUIPMENTS[
249
+ "STATIC_VAR_COMPENSATOR"
250
+ /* STATIC_VAR_COMPENSATOR */
251
+ ],
252
+ [
253
+ "DANGLING_LINE"
254
+ /* DANGLING_LINE */
255
+ ]: ALL_EQUIPMENTS[
256
+ "DANGLING_LINE"
257
+ /* DANGLING_LINE */
258
+ ]
259
+ };
153
260
  const EQUIPMENT_TYPE = {
154
261
  [
155
262
  "SUBSTATION"
@@ -290,17 +397,17 @@ const SEARCH_EQUIPMENTS = {
290
397
  [
291
398
  "HVDC_LINE_LCC"
292
399
  /* HVDC_LINE_LCC */
293
- ]: {
294
- id: "HVDC_LINE_LCC",
295
- label: "LCC"
296
- },
400
+ ]: ALL_EQUIPMENTS[
401
+ "HVDC_LINE_LCC"
402
+ /* HVDC_LINE_LCC */
403
+ ],
297
404
  [
298
405
  "HVDC_LINE_VSC"
299
406
  /* HVDC_LINE_VSC */
300
- ]: {
301
- id: "HVDC_LINE_VSC",
302
- label: "VSC"
303
- }
407
+ ]: ALL_EQUIPMENTS[
408
+ "HVDC_LINE_VSC"
409
+ /* HVDC_LINE_VSC */
410
+ ]
304
411
  };
305
412
  var OperatingStatus = /* @__PURE__ */ ((OperatingStatus2) => {
306
413
  OperatingStatus2["IN_OPERATION"] = "IN_OPERATION";
@@ -330,6 +437,7 @@ function getEquipmentsInfosForSearchBar(equipmentsInfos, getNameOrId) {
330
437
  });
331
438
  }
332
439
  export {
440
+ ALL_EQUIPMENTS,
333
441
  BASE_EQUIPMENTS,
334
442
  EQUIPMENT_TYPE,
335
443
  EquipmentType,
@@ -1,14 +1,16 @@
1
1
  import { ElementType } from "./elementType.js";
2
- import { BASE_EQUIPMENTS, EQUIPMENT_TYPE, EquipmentType, ExtendedEquipmentType, HvdcType, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, VL_TAG_MAX_SIZE, equipmentStyles, getEquipmentsInfosForSearchBar } from "./equipmentType.js";
2
+ import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, EQUIPMENT_TYPE, EquipmentType, ExtendedEquipmentType, HvdcType, OperatingStatus, SEARCH_EQUIPMENTS, 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 { AnnouncementSeverity } from "./types.js";
4
+ import { AnnouncementSeverity, ArrayAction } from "./types.js";
5
5
  import { MODIFICATION_TYPES, ModificationType } from "./modificationType.js";
6
6
  import { FieldType } from "./fieldType.js";
7
7
  import { ParameterType } from "./parameters.type.js";
8
8
  import { SolverTypeInfos } from "./dynamic-simulation.type.js";
9
9
  import { DistributionType, SensitivityType } from "./sensitivity-analysis.type.js";
10
10
  export {
11
+ ALL_EQUIPMENTS,
11
12
  AnnouncementSeverity,
13
+ ArrayAction,
12
14
  BASE_EQUIPMENTS,
13
15
  Battery,
14
16
  BusBar,
@@ -56,3 +56,7 @@ export type AnnouncementDto = {
56
56
  severity: AnnouncementSeverity;
57
57
  remainingDuration: number;
58
58
  };
59
+ export declare enum ArrayAction {
60
+ ADD = "ADD",
61
+ REMOVE = "REMOVE"
62
+ }
@@ -3,6 +3,12 @@ var AnnouncementSeverity = /* @__PURE__ */ ((AnnouncementSeverity2) => {
3
3
  AnnouncementSeverity2["WARN"] = "WARN";
4
4
  return AnnouncementSeverity2;
5
5
  })(AnnouncementSeverity || {});
6
+ var ArrayAction = /* @__PURE__ */ ((ArrayAction2) => {
7
+ ArrayAction2["ADD"] = "ADD";
8
+ ArrayAction2["REMOVE"] = "REMOVE";
9
+ return ArrayAction2;
10
+ })(ArrayAction || {});
6
11
  export {
7
- AnnouncementSeverity
12
+ AnnouncementSeverity,
13
+ ArrayAction
8
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.131.0",
3
+ "version": "0.133.0",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "author": "gridsuite team",
6
6
  "homepage": "https://github.com/gridsuite",
@@ -37,8 +37,8 @@
37
37
  "@ag-grid-community/locale": "^33.3.2",
38
38
  "@hello-pangea/dnd": "^18.0.1",
39
39
  "@material-symbols/svg-400": "^0.31.9",
40
- "@react-querybuilder/dnd": "^8.8.4",
41
- "@react-querybuilder/material": "^8.8.4",
40
+ "@react-querybuilder/dnd": "^8.11.0",
41
+ "@react-querybuilder/material": "^8.11.0",
42
42
  "autosuggest-highlight": "^3.3.4",
43
43
  "clsx": "^2.1.1",
44
44
  "jwt-decode": "^4.0.0",
@@ -49,7 +49,7 @@
49
49
  "react-csv-downloader": "^3.3.0",
50
50
  "react-dnd": "^16.0.1",
51
51
  "react-dnd-html5-backend": "^16.0.1",
52
- "react-querybuilder": "^8.2.0",
52
+ "react-querybuilder": "^8.11.0",
53
53
  "reconnecting-websocket": "^4.4.0",
54
54
  "type-fest": "^4.41.0",
55
55
  "uuid": "^13.0.0"