@gridsuite/commons-ui 0.259.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
  {
@@ -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",
@@ -3,6 +3,7 @@ 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
  }
@@ -1,4 +1,5 @@
1
1
  var ElementStatus = /* @__PURE__ */ ((ElementStatus2) => {
2
+ ElementStatus2["CREATING"] = "CREATING";
2
3
  ElementStatus2["CREATED"] = "CREATED";
3
4
  ElementStatus2["DELETING"] = "DELETING";
4
5
  return ElementStatus2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.259.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",