@gridsuite/commons-ui 0.258.0 → 0.260.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.
@@ -1293,7 +1293,7 @@ const EXPERT_FILTER_FIELDS = {
1293
1293
  FIELDS_OPTIONS.TARGET_P,
1294
1294
  FIELDS_OPTIONS.TARGET_Q,
1295
1295
  FIELDS_OPTIONS.VOLTAGE_REGULATOR_ON,
1296
- FIELDS_OPTIONS.TARGET_V,
1296
+ FIELDS_OPTIONS.VOLTAGE_SET_POINT,
1297
1297
  FIELDS_OPTIONS.PLANNED_ACTIVE_POWER_SET_POINT,
1298
1298
  FIELDS_OPTIONS.MARGINAL_COST,
1299
1299
  FIELDS_OPTIONS.PLANNED_OUTAGE_RATE,
@@ -1314,6 +1314,8 @@ const EXPERT_FILTER_FIELDS = {
1314
1314
  FIELDS_OPTIONS.MAX_P,
1315
1315
  FIELDS_OPTIONS.TARGET_P,
1316
1316
  FIELDS_OPTIONS.TARGET_Q,
1317
+ FIELDS_OPTIONS.VOLTAGE_REGULATOR_ON,
1318
+ FIELDS_OPTIONS.VOLTAGE_SET_POINT,
1317
1319
  FIELDS_OPTIONS.PROPERTY,
1318
1320
  FIELDS_OPTIONS.SUBSTATION_ID,
1319
1321
  FIELDS_OPTIONS.SUBSTATION_PROPERTY,
@@ -1,15 +1,15 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { Box, Grid2 } from "@mui/material";
3
+ import { FormattedMessage } from "react-intl";
4
+ import { useWatch } from "react-hook-form";
3
5
  import { filledTextField } from "../../common/form.utils.js";
4
6
  import { PropertiesForm } from "../../common/properties/PropertiesForm.js";
5
7
  import "react";
6
- import "react-hook-form";
7
8
  import { ActivePowerAdornment } from "../../../../utils/constants/adornments.js";
8
9
  import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
9
10
  import "../../../../utils/conversionUtils.js";
10
11
  import "../../../../utils/types/equipmentType.js";
11
12
  import "@mui/icons-material";
12
- import "react-intl";
13
13
  import "../../../../components/ui/overflowableText/OverflowableText.js";
14
14
  import "localized-countries";
15
15
  import "localized-countries/data/fr";
@@ -117,6 +117,9 @@ function BatteryCreationForm({
117
117
  isGenerator: false
118
118
  }
119
119
  );
120
+ const watchVoltageRegulation = useWatch({
121
+ name: FieldConstants.VOLTAGE_REGULATION
122
+ });
120
123
  return /* @__PURE__ */ jsxs(Fragment, { children: [
121
124
  /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, children: [
122
125
  /* @__PURE__ */ jsx(GridItem, { size: 4, children: batteryIdField }),
@@ -133,7 +136,14 @@ function BatteryCreationForm({
133
136
  /* @__PURE__ */ jsx(ReactiveLimitsForm, {}),
134
137
  /* @__PURE__ */ jsx(SetPointsForm, {}),
135
138
  /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, paddingTop: 2, children: [
136
- /* @__PURE__ */ jsx(GridItem, { size: 4, children: voltageRegulationField }),
139
+ /* @__PURE__ */ jsx(
140
+ GridItem,
141
+ {
142
+ size: 4,
143
+ tooltip: watchVoltageRegulation !== null ? "" : /* @__PURE__ */ jsx(FormattedMessage, { id: "NoModification" }),
144
+ children: voltageRegulationField
145
+ }
146
+ ),
137
147
  voltageRegulationForm,
138
148
  /* @__PURE__ */ jsx(ActivePowerControlForm, {})
139
149
  ] }),
@@ -7,7 +7,7 @@ export declare const EQUIPMENTS_FIELDS: {
7
7
  readonly TWO_WINDINGS_TRANSFORMER: readonly [FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType];
8
8
  readonly THREE_WINDINGS_TRANSFORMER: readonly [FieldOptionType];
9
9
  readonly GENERATOR: readonly [FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType];
10
- readonly BATTERY: readonly [FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType];
10
+ readonly BATTERY: readonly [FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType];
11
11
  readonly LOAD: readonly [FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType];
12
12
  readonly SHUNT_COMPENSATOR: readonly [FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType, FieldOptionType];
13
13
  readonly STATIC_VAR_COMPENSATOR: readonly [FieldOptionType, FieldOptionType, FieldOptionType];
@@ -1,5 +1,5 @@
1
1
  import { DataType } from "./assignment.type.js";
2
- import { MEGA_VAR, SIEMENS, MEGA_WATT, PERCENTAGE, OHM, MEGA_VOLT_AMPERE, KILO_VOLT, MICRO_SIEMENS, KILO_AMPERE } from "../../../../../utils/constants/unitsConstants.js";
2
+ import { MEGA_VAR, SIEMENS, MEGA_WATT, KILO_VOLT, PERCENTAGE, OHM, MEGA_VOLT_AMPERE, MICRO_SIEMENS, KILO_AMPERE } from "../../../../../utils/constants/unitsConstants.js";
3
3
  import "../../../../../utils/conversionUtils.js";
4
4
  import { EquipmentType, LOAD_TYPES } from "../../../../../utils/types/equipmentType.js";
5
5
  import { FieldType } from "../../../../../utils/types/fieldType.js";
@@ -55,7 +55,7 @@ const FIELD_OPTIONS = {
55
55
  },
56
56
  VOLTAGE_SET_POINT: {
57
57
  id: FieldType.VOLTAGE_SET_POINT,
58
- label: "GeneratorTargetV",
58
+ label: "TargetV",
59
59
  unit: KILO_VOLT,
60
60
  dataType: DataType.DOUBLE
61
61
  },
@@ -382,6 +382,8 @@ const EQUIPMENTS_FIELDS = {
382
382
  ],
383
383
  [EquipmentType.BATTERY]: [
384
384
  FIELD_OPTIONS.PROPERTY,
385
+ FIELD_OPTIONS.VOLTAGE_REGULATOR_ON,
386
+ FIELD_OPTIONS.VOLTAGE_SET_POINT,
385
387
  FIELD_OPTIONS.MINIMUM_ACTIVE_POWER,
386
388
  FIELD_OPTIONS.MAXIMUM_ACTIVE_POWER,
387
389
  FIELD_OPTIONS.ACTIVE_POWER_SET_POINT,
@@ -15,7 +15,7 @@ const EQUIPMENTS_FIELDS = {
15
15
  { id: "MAXIMUM_ACTIVE_POWER", label: "MaximumActivePowerText", unit: MEGA_WATT },
16
16
  { id: "ACTIVE_POWER_SET_POINT", label: "ActivePowerSetPointText", unit: MEGA_WATT },
17
17
  { id: "REACTIVE_POWER_SET_POINT", label: "ReactivePowerSetPointText", unit: MEGA_VAR },
18
- { id: "VOLTAGE_SET_POINT", label: "GeneratorTargetV", unit: KILO_VOLT },
18
+ { id: "VOLTAGE_SET_POINT", label: "TargetV", unit: KILO_VOLT },
19
19
  {
20
20
  id: "PLANNED_ACTIVE_POWER_SET_POINT",
21
21
  label: "PlannedActivePowerSetPointForm",
@@ -38,6 +38,7 @@ const EQUIPMENTS_FIELDS = {
38
38
  { id: "MAXIMUM_ACTIVE_POWER", label: "MaximumActivePowerText", unit: MEGA_WATT },
39
39
  { id: "ACTIVE_POWER_SET_POINT", label: "ActivePowerSetPointText", unit: MEGA_WATT },
40
40
  { id: "REACTIVE_POWER_SET_POINT", label: "ReactivePowerSetPointText", unit: MEGA_VAR },
41
+ { id: "VOLTAGE_SET_POINT", label: "TargetV", unit: KILO_VOLT },
41
42
  { id: "DROOP", label: "Droop", unit: PERCENTAGE },
42
43
  { id: "TRANSIENT_REACTANCE", label: "TransientReactanceForm", unit: OHM },
43
44
  {
package/dist/index.js CHANGED
@@ -316,7 +316,7 @@ import { NetworkTimeoutError } from "./utils/types/NetworkTimeoutError.js";
316
316
  import { ElementType } from "./utils/types/elementType.js";
317
317
  import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, CONNECTION_DIRECTIONS, ENERGY_SOURCES, EQUIPMENTS_WITH_ONE_NOMINAL_VOLTAGE, EQUIPMENTS_WITH_ONE_SUBSTATION, EQUIPMENTS_WITH_THREE_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_SUBSTATIONS, EquipmentType, ExtendedEquipmentType, HvdcType, LOAD_TYPES, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, UNDEFINED_CONNECTION_DIRECTION, UNDEFINED_LOAD_TYPE, VL_TAG_MAX_SIZE, equipmentStyles, getConnectionDirectionLabel, getEnergySourceLabel, getEquipmentsInfosForSearchBar, getLoadTypeLabel } from "./utils/types/equipmentType.js";
318
318
  import { Battery, BoundaryLine, BusBar, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel, isInjection } from "./utils/types/equipmentTypes.js";
319
- import { AnnouncementSeverity, ArrayAction, ElementStatus } from "./utils/types/types.js";
319
+ import { AnnouncementSeverity, ArrayAction, ElementStatus, ReferenceType } from "./utils/types/types.js";
320
320
  import { MODIFICATION_TYPES, ModificationType } from "./utils/types/modificationType.js";
321
321
  import { FieldType } from "./utils/types/fieldType.js";
322
322
  import { ParameterType } from "./utils/types/parameters.type.js";
@@ -1035,6 +1035,7 @@ export {
1035
1035
  ReactiveLimitsForm,
1036
1036
  ReactivePowerAdornment,
1037
1037
  ReadOnlyInput,
1038
+ ReferenceType,
1038
1039
  RegulatingTerminalForm,
1039
1040
  RemoveButton,
1040
1041
  ReportFetcherContext,
@@ -171,7 +171,7 @@ export declare const networkModificationsEn: {
171
171
  ReactivePowerSetPointText: string;
172
172
  ReactivePowerMeasurementValue: string;
173
173
  ReactivePowerMeasurementValidity: string;
174
- GeneratorTargetV: string;
174
+ TargetV: string;
175
175
  PlannedActivePowerSetPointForm: string;
176
176
  MarginalCost: string;
177
177
  plannedOutageRate: string;
@@ -165,7 +165,7 @@ const networkModificationsEn = {
165
165
  ReactivePowerSetPointText: "Reactive power setpoint",
166
166
  ReactivePowerMeasurementValue: "Reactive power measurement value",
167
167
  ReactivePowerMeasurementValidity: "Reactive power measurement validity",
168
- GeneratorTargetV: "Target V",
168
+ TargetV: "Target V",
169
169
  PlannedActivePowerSetPointForm: "Planning active power set point",
170
170
  MarginalCost: "Generation dispatch cost",
171
171
  plannedOutageRate: "Planning outage rate",
@@ -171,7 +171,7 @@ export declare const networkModificationsFr: {
171
171
  ReactivePowerSetPointText: string;
172
172
  ReactivePowerMeasurementValue: string;
173
173
  ReactivePowerMeasurementValidity: string;
174
- GeneratorTargetV: string;
174
+ TargetV: string;
175
175
  PlannedActivePowerSetPointForm: string;
176
176
  MarginalCost: string;
177
177
  plannedOutageRate: string;
@@ -165,7 +165,7 @@ const networkModificationsFr = {
165
165
  ReactivePowerSetPointText: "Consigne de puissance réactive",
166
166
  ReactivePowerMeasurementValue: "Valeur TM puissance réactive",
167
167
  ReactivePowerMeasurementValidity: "Validité TM puissance réactive",
168
- GeneratorTargetV: "Consigne tension",
168
+ TargetV: "Consigne tension",
169
169
  PlannedActivePowerSetPointForm: "Puissance imposée",
170
170
  MarginalCost: "Coût de démarrage",
171
171
  plannedOutageRate: "Indisponibilité programmée",
@@ -24,7 +24,7 @@ import { NetworkTimeoutError } from "./types/NetworkTimeoutError.js";
24
24
  import { ElementType } from "./types/elementType.js";
25
25
  import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, CONNECTION_DIRECTIONS, ENERGY_SOURCES, EQUIPMENTS_WITH_ONE_NOMINAL_VOLTAGE, EQUIPMENTS_WITH_ONE_SUBSTATION, EQUIPMENTS_WITH_THREE_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_SUBSTATIONS, EquipmentType, ExtendedEquipmentType, HvdcType, LOAD_TYPES, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, UNDEFINED_CONNECTION_DIRECTION, UNDEFINED_LOAD_TYPE, VL_TAG_MAX_SIZE, equipmentStyles, getConnectionDirectionLabel, getEnergySourceLabel, getEquipmentsInfosForSearchBar, getLoadTypeLabel } from "./types/equipmentType.js";
26
26
  import { Battery, BoundaryLine, BusBar, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel, isInjection } from "./types/equipmentTypes.js";
27
- import { AnnouncementSeverity, ArrayAction, ElementStatus } from "./types/types.js";
27
+ import { AnnouncementSeverity, ArrayAction, ElementStatus, ReferenceType } from "./types/types.js";
28
28
  import { MODIFICATION_TYPES, ModificationType } from "./types/modificationType.js";
29
29
  import { FieldType } from "./types/fieldType.js";
30
30
  import { ParameterType } from "./types/parameters.type.js";
@@ -135,6 +135,7 @@ export {
135
135
  REACTIVE_LIMITS_MIN_MAX_INVALID,
136
136
  REAL_PERCENTAGE,
137
137
  ReactivePowerAdornment,
138
+ ReferenceType,
138
139
  SEARCH_EQUIPMENTS,
139
140
  SECTION_COUNT_MUST_BE_BETWEEN_ZERO_AND_MAXIMUM_SECTION_COUNT,
140
141
  SHORT_CIRCUIT_CURRENT_LIMIT_MUST_BE_GREATER_OR_EQUAL_TO_ZERO,
@@ -4,7 +4,7 @@ import { NetworkTimeoutError } from "./NetworkTimeoutError.js";
4
4
  import { ElementType } from "./elementType.js";
5
5
  import { ALL_EQUIPMENTS, BASE_EQUIPMENTS, CONNECTION_DIRECTIONS, ENERGY_SOURCES, EQUIPMENTS_WITH_ONE_NOMINAL_VOLTAGE, EQUIPMENTS_WITH_ONE_SUBSTATION, EQUIPMENTS_WITH_THREE_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_NOMINAL_VOLTAGES, EQUIPMENTS_WITH_TWO_SUBSTATIONS, EquipmentType, ExtendedEquipmentType, HvdcType, LOAD_TYPES, OperatingStatus, SEARCH_EQUIPMENTS, TYPE_TAG_MAX_SIZE, UNDEFINED_CONNECTION_DIRECTION, UNDEFINED_LOAD_TYPE, VL_TAG_MAX_SIZE, equipmentStyles, getConnectionDirectionLabel, getEnergySourceLabel, getEquipmentsInfosForSearchBar, getLoadTypeLabel } from "./equipmentType.js";
6
6
  import { Battery, BoundaryLine, BusBar, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel, isInjection } from "./equipmentTypes.js";
7
- import { AnnouncementSeverity, ArrayAction, ElementStatus } from "./types.js";
7
+ import { AnnouncementSeverity, ArrayAction, ElementStatus, ReferenceType } from "./types.js";
8
8
  import { MODIFICATION_TYPES, ModificationType } from "./modificationType.js";
9
9
  import { FieldType } from "./fieldType.js";
10
10
  import { ParameterType } from "./parameters.type.js";
@@ -54,6 +54,7 @@ export {
54
54
  OperationType,
55
55
  ParameterType,
56
56
  ProblemDetailError,
57
+ ReferenceType,
57
58
  SEARCH_EQUIPMENTS,
58
59
  SVC,
59
60
  SensitivityType,
@@ -3,9 +3,19 @@ import { MessageDescriptor, PrimitiveType } from 'react-intl';
3
3
  import { ElementType } from './elementType';
4
4
  export type Input = string | number;
5
5
  export declare enum ElementStatus {
6
+ CREATING = "CREATING",
6
7
  CREATED = "CREATED",
7
8
  DELETING = "DELETING"
8
9
  }
10
+ export declare enum ReferenceType {
11
+ STUDY_NODE = "STUDY_NODE",
12
+ NETWORK_MODIFICATION = "NETWORK_MODIFICATION",
13
+ DIRECTORY_ELEMENT = "DIRECTORY_ELEMENT"
14
+ }
15
+ export type ReferenceAttributes = {
16
+ referenceId: UUID;
17
+ referenceType: ReferenceType;
18
+ };
9
19
  export type ElementAttributes = {
10
20
  elementUuid: UUID;
11
21
  elementName: string;
@@ -34,6 +44,7 @@ export type ElementAttributes = {
34
44
  hasMetadata?: boolean;
35
45
  subtype?: string;
36
46
  id?: string;
47
+ references?: ReferenceAttributes[];
37
48
  };
38
49
  export type Option = {
39
50
  id: string;
@@ -1,8 +1,15 @@
1
1
  var ElementStatus = /* @__PURE__ */ ((ElementStatus2) => {
2
+ ElementStatus2["CREATING"] = "CREATING";
2
3
  ElementStatus2["CREATED"] = "CREATED";
3
4
  ElementStatus2["DELETING"] = "DELETING";
4
5
  return ElementStatus2;
5
6
  })(ElementStatus || {});
7
+ var ReferenceType = /* @__PURE__ */ ((ReferenceType2) => {
8
+ ReferenceType2["STUDY_NODE"] = "STUDY_NODE";
9
+ ReferenceType2["NETWORK_MODIFICATION"] = "NETWORK_MODIFICATION";
10
+ ReferenceType2["DIRECTORY_ELEMENT"] = "DIRECTORY_ELEMENT";
11
+ return ReferenceType2;
12
+ })(ReferenceType || {});
6
13
  var AnnouncementSeverity = /* @__PURE__ */ ((AnnouncementSeverity2) => {
7
14
  AnnouncementSeverity2["INFO"] = "INFO";
8
15
  AnnouncementSeverity2["WARN"] = "WARN";
@@ -16,5 +23,6 @@ var ArrayAction = /* @__PURE__ */ ((ArrayAction2) => {
16
23
  export {
17
24
  AnnouncementSeverity,
18
25
  ArrayAction,
19
- ElementStatus
26
+ ElementStatus,
27
+ ReferenceType
20
28
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.258.0",
3
+ "version": "0.260.0",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "author": "gridsuite team",
6
6
  "homepage": "https://github.com/gridsuite",