@gridsuite/commons-ui 0.253.0 → 0.254.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 (31) hide show
  1. package/dist/components/composite/filter/FilterCreationDialog.js +2 -3
  2. package/dist/components/composite/filter/expert/ExpertFilterEditionDialog.js +2 -3
  3. package/dist/components/composite/filter/explicitNaming/ExplicitNamingFilterEditionDialog.js +2 -3
  4. package/dist/features/network-modifications/battery/batteryDialog.type.d.ts +6 -0
  5. package/dist/features/network-modifications/battery/creation/BatteryCreationForm.d.ts +5 -1
  6. package/dist/features/network-modifications/battery/creation/BatteryCreationForm.js +19 -3
  7. package/dist/features/network-modifications/battery/creation/batteryCreation.types.d.ts +5 -0
  8. package/dist/features/network-modifications/battery/creation/batteryCreation.utils.d.ts +32 -0
  9. package/dist/features/network-modifications/battery/creation/batteryCreation.utils.js +21 -1
  10. package/dist/features/network-modifications/common/voltageRegulation/VoltageRegulationForm.d.ts +2 -1
  11. package/dist/features/network-modifications/common/voltageRegulation/VoltageRegulationForm.js +3 -2
  12. package/dist/features/parameters/common/limitreductions/limit-reduction-table-cell.js +18 -2
  13. package/dist/features/parameters/common/limitreductions/limit-reductions-table-form.js +1 -1
  14. package/dist/features/parameters/common/voltage-level-table/custom-voltage-level-table.d.ts +3 -2
  15. package/dist/features/parameters/common/voltage-level-table/custom-voltage-level-table.js +47 -29
  16. package/dist/features/parameters/loadflow/load-flow-parameters-dialog.js +3 -3
  17. package/dist/features/parameters/network-visualizations/network-visualizations-parameters-dialog.js +3 -3
  18. package/dist/features/parameters/pcc-min/pcc-min-parameters-dialog.js +3 -3
  19. package/dist/features/parameters/security-analysis/security-analysis-parameters-dialog.js +3 -3
  20. package/dist/features/parameters/sensi/sensitivity-analysis-parameters-dialog.js +3 -3
  21. package/dist/features/parameters/short-circuit/short-circuit-parameters-dialog.js +3 -3
  22. package/dist/features/parameters/voltage-init/voltage-init-parameters-dialog.js +3 -3
  23. package/dist/index.js +4 -1
  24. package/dist/utils/form-utils.d.ts +2 -0
  25. package/dist/utils/form-utils.js +7 -0
  26. package/dist/utils/index.d.ts +1 -0
  27. package/dist/utils/index.js +4 -1
  28. package/dist/utils/types/index.js +2 -1
  29. package/dist/utils/types/types.d.ts +5 -0
  30. package/dist/utils/types/types.js +7 -1
  31. package/package.json +1 -1
@@ -15,6 +15,7 @@ import { MAX_CHAR_DESCRIPTION } from "../../../utils/constants/uiConstants.js";
15
15
  import { EXPERT_FILTER_QUERY } from "./expert/expertFilterConstants.js";
16
16
  import { FILTER_EQUIPMENTS_ATTRIBUTES } from "./explicitNaming/ExplicitNamingFilterConstants.js";
17
17
  import { snackWithFallback } from "../../../utils/error.js";
18
+ import { isDisabledValidationButton } from "../../../utils/form-utils.js";
18
19
  const emptyFormData = {
19
20
  [FieldConstants.NAME]: "",
20
21
  [FieldConstants.DESCRIPTION]: "",
@@ -47,8 +48,6 @@ function FilterCreationDialog({
47
48
  const {
48
49
  formState: { errors }
49
50
  } = formMethods;
50
- const nameError = errors[FieldConstants.NAME];
51
- const isValidating = errors.root?.isValidating;
52
51
  const onSubmit = useCallback(
53
52
  (filterForm) => {
54
53
  if (filterType?.id === FilterType.EXPLICIT_NAMING.id) {
@@ -106,7 +105,7 @@ function FilterCreationDialog({
106
105
  isDeveloperMode
107
106
  },
108
107
  titleId,
109
- disabledSave: !!nameError || !!isValidating,
108
+ disabledSave: isDisabledValidationButton(errors),
110
109
  unscrollableFullHeight: true,
111
110
  children: /* @__PURE__ */ jsx(
112
111
  FilterForm,
@@ -16,6 +16,7 @@ import { importExpertRules } from "./expertFilterUtils.js";
16
16
  import { HeaderFilterSchema } from "../HeaderFilterForm.js";
17
17
  import { EXPERT_FILTER_QUERY } from "./expertFilterConstants.js";
18
18
  import { snackWithFallback } from "../../../../utils/error.js";
19
+ import { isDisabledValidationButton } from "../../../../utils/form-utils.js";
19
20
  const formSchema = yup.object().shape({
20
21
  ...HeaderFilterSchema,
21
22
  ...expertFilterSchema
@@ -44,8 +45,6 @@ function ExpertFilterEditionDialog({
44
45
  reset,
45
46
  formState: { errors }
46
47
  } = formMethods;
47
- const nameError = errors[FieldConstants.NAME];
48
- const isValidating = errors.root?.isValidating;
49
48
  useEffect(() => {
50
49
  if (id && open) {
51
50
  setDataFetchStatus(FetchStatus.FETCHING);
@@ -100,7 +99,7 @@ function ExpertFilterEditionDialog({
100
99
  isDeveloperMode
101
100
  },
102
101
  titleId,
103
- disabledSave: !!nameError || !!isValidating,
102
+ disabledSave: isDisabledValidationButton(errors),
104
103
  isDataFetching: dataFetchStatus === FetchStatus.FETCHING,
105
104
  unscrollableFullHeight: true,
106
105
  children: isDataReady && /* @__PURE__ */ jsx(FilterForm, { activeDirectory, filterType: FilterType.EXPERT, isEditing: true })
@@ -17,6 +17,7 @@ import { NO_ITEM_SELECTION_FOR_COPY } from "../../../../utils/directory-utils.js
17
17
  import { HeaderFilterSchema } from "../HeaderFilterForm.js";
18
18
  import { FILTER_EQUIPMENTS_ATTRIBUTES } from "./ExplicitNamingFilterConstants.js";
19
19
  import { snackWithFallback } from "../../../../utils/error.js";
20
+ import { isDisabledValidationButton } from "../../../../utils/form-utils.js";
20
21
  const formSchema = yup.object().shape({
21
22
  ...HeaderFilterSchema,
22
23
  ...explicitNamingFilterSchema
@@ -45,8 +46,6 @@ function ExplicitNamingFilterEditionDialog({
45
46
  reset,
46
47
  formState: { errors }
47
48
  } = formMethods;
48
- const nameError = errors[FieldConstants.NAME];
49
- const isValidating = errors.root?.isValidating;
50
49
  useEffect(() => {
51
50
  if (id && open) {
52
51
  setDataFetchStatus(FetchStatus.FETCHING);
@@ -103,7 +102,7 @@ function ExplicitNamingFilterEditionDialog({
103
102
  isDeveloperMode
104
103
  },
105
104
  titleId,
106
- disabledSave: !!nameError || !!isValidating,
105
+ disabledSave: isDisabledValidationButton(errors),
107
106
  isDataFetching: dataFetchStatus === FetchStatus.FETCHING,
108
107
  unscrollableFullHeight: true,
109
108
  children: isDataReady && /* @__PURE__ */ jsx(FilterForm, { activeDirectory, filterType: FilterType.EXPLICIT_NAMING, isEditing: true })
@@ -10,10 +10,16 @@ export interface BatteryFormInfos {
10
10
  minP: number;
11
11
  targetP: number;
12
12
  targetQ: number;
13
+ targetV: number;
14
+ voltageRegulatorOn: boolean;
13
15
  connectablePosition: ConnectablePositionFormInfos;
14
16
  minMaxReactiveLimits: MinMaxReactiveLimitsFormInfos;
15
17
  activePowerControl: ActivePowerControlInfos;
16
18
  batteryShortCircuit: ShortCircuitInfos;
19
+ regulatingTerminalId: string;
20
+ regulatingTerminalVlId: string;
21
+ regulatingTerminalConnectableId: string;
22
+ regulatingTerminalConnectableType: string;
17
23
  reactiveCapabilityCurvePoints: ReactiveCapabilityCurvePoints[];
18
24
  voltageLevelId: string;
19
25
  busOrBusbarSectionId: string;
@@ -1,4 +1,8 @@
1
1
  import { ConnectivityNetworkProps } from '../../common';
2
+ import { EquipmentType, Identifiable } from '../../../../utils';
2
3
  export interface BatteryCreationFormProps extends ConnectivityNetworkProps {
4
+ fetchVoltageLevelEquipments: (voltageLevelId: string) => Promise<(Identifiable & {
5
+ type: EquipmentType;
6
+ })[]>;
3
7
  }
4
- export declare function BatteryCreationForm({ voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, }: Readonly<BatteryCreationFormProps>): import("react").JSX.Element;
8
+ export declare function BatteryCreationForm({ voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, fetchVoltageLevelEquipments, }: Readonly<BatteryCreationFormProps>): import("react").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
- import { Grid2 } from "@mui/material";
2
+ import { Box, Grid2 } from "@mui/material";
3
3
  import { filledTextField } from "../../common/form.utils.js";
4
4
  import { PropertiesForm } from "../../common/properties/PropertiesForm.js";
5
5
  import "react";
@@ -18,6 +18,7 @@ import "notistack";
18
18
  import "../../../../components/ui/reactHookForm/provider/CustomFormProvider.js";
19
19
  import "yup";
20
20
  import "../../../../components/ui/treeViewFinder/TreeViewFinder.js";
21
+ import { SwitchInput } from "../../../../components/ui/reactHookForm/booleans/SwitchInput.js";
21
22
  import { FloatInput } from "../../../../components/ui/reactHookForm/numbers/FloatInput.js";
22
23
  import { TextInput } from "../../../../components/ui/reactHookForm/text/TextInput.js";
23
24
  import "../../../../components/ui/reactHookForm/numbers/RangeInput.js";
@@ -71,13 +72,15 @@ import { ActivePowerControlForm } from "../../common/activePowerControl/ActivePo
71
72
  import { ShortCircuitForm } from "../../common/shortCircuit/ShortCircuitForm.js";
72
73
  import { ReactiveLimitsForm } from "../../common/reactiveLimits/ReactiveLimitsForm.js";
73
74
  import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
75
+ import { VoltageRegulationForm } from "../../common/voltageRegulation/VoltageRegulationForm.js";
74
76
  import "@mui/material/colors";
75
77
  import "@mui/x-charts";
76
78
  import "../../common/currentLimits/limitsPane.utils.js";
77
79
  function BatteryCreationForm({
78
80
  voltageLevelOptions,
79
81
  fetchBusesOrBusbarSections,
80
- PositionDiagramPane
82
+ PositionDiagramPane,
83
+ fetchVoltageLevelEquipments
81
84
  }) {
82
85
  const batteryIdField = /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.EQUIPMENT_ID, label: "ID", formProps: { autoFocus: true, ...filledTextField } });
83
86
  const batteryNameField = /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.EQUIPMENT_NAME, label: "Name", formProps: filledTextField });
@@ -105,6 +108,15 @@ function BatteryCreationForm({
105
108
  adornment: ActivePowerAdornment
106
109
  }
107
110
  );
111
+ const voltageRegulationField = /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(SwitchInput, { name: FieldConstants.VOLTAGE_REGULATION, label: "VoltageRegulationText" }) });
112
+ const voltageRegulationForm = /* @__PURE__ */ jsx(
113
+ VoltageRegulationForm,
114
+ {
115
+ voltageLevelOptions,
116
+ fetchVoltageLevelEquipments,
117
+ isGenerator: false
118
+ }
119
+ );
108
120
  return /* @__PURE__ */ jsxs(Fragment, { children: [
109
121
  /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, children: [
110
122
  /* @__PURE__ */ jsx(GridItem, { size: 4, children: batteryIdField }),
@@ -120,7 +132,11 @@ function BatteryCreationForm({
120
132
  /* @__PURE__ */ jsx(GridSection, { title: "ReactiveLimits" }),
121
133
  /* @__PURE__ */ jsx(ReactiveLimitsForm, {}),
122
134
  /* @__PURE__ */ jsx(SetPointsForm, {}),
123
- /* @__PURE__ */ jsx(Grid2, { container: true, spacing: 2, paddingTop: 2, children: /* @__PURE__ */ jsx(ActivePowerControlForm, {}) }),
135
+ /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, paddingTop: 2, children: [
136
+ /* @__PURE__ */ jsx(GridItem, { size: 4, children: voltageRegulationField }),
137
+ voltageRegulationForm,
138
+ /* @__PURE__ */ jsx(ActivePowerControlForm, {})
139
+ ] }),
124
140
  /* @__PURE__ */ jsx(GridSection, { title: "ShortCircuit" }),
125
141
  /* @__PURE__ */ jsx(ShortCircuitForm, {}),
126
142
  /* @__PURE__ */ jsx(PropertiesForm, { networkElementType: "battery" })
@@ -9,6 +9,11 @@ export interface BatteryCreationDto {
9
9
  reactiveCapabilityCurve?: boolean | null;
10
10
  targetP: number;
11
11
  targetQ: number;
12
+ targetV: number | null;
13
+ voltageRegulationOn: boolean | null;
14
+ regulatingTerminalId: string | null;
15
+ regulatingTerminalType: string | null;
16
+ regulatingTerminalVlId: string | null;
12
17
  voltageLevelId: string | null;
13
18
  busOrBusbarSectionId: string | null;
14
19
  reactiveCapabilityCurvePoints: ReactiveCapabilityCurvePoints[] | null;
@@ -6,6 +6,22 @@ export declare const batteryCreationFormSchema: import('yup').ObjectSchema<NonNu
6
6
  directTransX: number | null | undefined;
7
7
  frequencyRegulation: boolean | null | undefined;
8
8
  droop: number | null | undefined;
9
+ voltageRegulation: boolean | null | undefined;
10
+ voltageRegulationType: string | null | undefined;
11
+ voltageSetpoint: number | null | undefined;
12
+ qPercent: number | null | undefined;
13
+ voltageLevel: {
14
+ id?: string | undefined;
15
+ name?: string | undefined;
16
+ nominalVoltage?: string | undefined;
17
+ substationId?: string | undefined;
18
+ topologyKind?: string | null | undefined;
19
+ } | null;
20
+ equipment: {
21
+ id?: string | undefined;
22
+ name?: string | null | undefined;
23
+ type?: string | undefined;
24
+ } | null;
9
25
  reactivePowerSetpoint: number | null | undefined;
10
26
  activePowerSetpoint: number | undefined;
11
27
  equipmentID: string;
@@ -47,6 +63,22 @@ export declare const batteryCreationFormSchema: import('yup').ObjectSchema<NonNu
47
63
  directTransX: undefined;
48
64
  frequencyRegulation: undefined;
49
65
  droop: undefined;
66
+ voltageRegulation: undefined;
67
+ voltageRegulationType: undefined;
68
+ voltageSetpoint: undefined;
69
+ qPercent: undefined;
70
+ voltageLevel: {
71
+ id: undefined;
72
+ name: undefined;
73
+ substationId: undefined;
74
+ nominalVoltage: undefined;
75
+ topologyKind: undefined;
76
+ };
77
+ equipment: {
78
+ id: undefined;
79
+ name: undefined;
80
+ type: undefined;
81
+ };
50
82
  reactivePowerSetpoint: undefined;
51
83
  activePowerSetpoint: undefined;
52
84
  equipmentID: undefined;
@@ -66,6 +66,8 @@ import { getActivePowerControlSchema, getActivePowerControlEmptyFormData } from
66
66
  import { getShortCircuitFormSchema, getShortCircuitEmptyFormData, getShortCircuitFormData } from "../../common/shortCircuit/shortCircuitForm.utils.js";
67
67
  import { getReactiveLimitsValidationSchema, getReactiveLimitsEmptyFormDataProps, getReactiveLimitsFormDataProps } from "../../common/reactiveLimits/reactiveLimits.utils.js";
68
68
  import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
69
+ import { getRegulatingTerminalEquipmentData, getRegulatingTerminalVoltageLevelData } from "../../common/regulatingTerminal/regulatingTerminal.utils.js";
70
+ import { getVoltageRegulationSchema, getVoltageRegulationEmptyFormData, REGULATION_TYPES } from "../../common/voltageRegulation/voltageRegulation.utils.js";
69
71
  import "@mui/material/colors";
70
72
  import "@mui/x-charts";
71
73
  import "../../common/currentLimits/limitsPane.utils.js";
@@ -89,6 +91,7 @@ const batteryCreationFormSchema = object().shape({
89
91
  [FieldConstants.CONNECTIVITY]: getConnectivityWithPositionSchema(false),
90
92
  [FieldConstants.REACTIVE_LIMITS]: getReactiveLimitsValidationSchema(),
91
93
  ...getSetPointsSchema(),
94
+ ...getVoltageRegulationSchema(),
92
95
  ...getActivePowerControlSchema(),
93
96
  ...getShortCircuitFormSchema()
94
97
  }).concat(creationPropertiesSchema).required();
@@ -101,6 +104,7 @@ const batteryCreationEmptyFormData = {
101
104
  reactiveLimits: getReactiveLimitsEmptyFormDataProps(),
102
105
  AdditionalProperties: [],
103
106
  ...getSetPointsEmptyFormData(),
107
+ ...getVoltageRegulationEmptyFormData(),
104
108
  ...getActivePowerControlEmptyFormData(),
105
109
  ...getShortCircuitEmptyFormData()
106
110
  };
@@ -128,6 +132,16 @@ const batteryCreationDtoToForm = (dto) => {
128
132
  maximumReactivePower: dto?.maxQ,
129
133
  reactiveCapabilityCurvePoints: dto?.reactiveCapabilityCurve ? dto?.reactiveCapabilityCurvePoints : null
130
134
  }),
135
+ voltageLevel: getRegulatingTerminalVoltageLevelData({
136
+ voltageLevelId: dto.regulatingTerminalVlId
137
+ }),
138
+ equipment: getRegulatingTerminalEquipmentData({
139
+ equipmentId: dto.regulatingTerminalId,
140
+ equipmentType: dto.regulatingTerminalType ?? void 0
141
+ }),
142
+ voltageRegulationType: dto?.regulatingTerminalId ? REGULATION_TYPES.DISTANT.id : REGULATION_TYPES.LOCAL.id,
143
+ voltageRegulation: dto.voltageRegulationOn,
144
+ voltageSetpoint: dto.targetV,
131
145
  AdditionalProperties: getFilledPropertiesFromModification(dto.properties),
132
146
  ...getShortCircuitFormData({
133
147
  directTransX: dto.directTransX,
@@ -137,6 +151,7 @@ const batteryCreationDtoToForm = (dto) => {
137
151
  };
138
152
  const batteryCreationFormToDto = (form) => {
139
153
  const isReactiveCapabilityCurveOn = form.reactiveLimits.reactiveCapabilityCurveChoice === "CURVE";
154
+ const isDistantRegulation = form[FieldConstants.VOLTAGE_REGULATION_TYPE] === REGULATION_TYPES.DISTANT.id;
140
155
  return {
141
156
  type: ModificationType.BATTERY_CREATION,
142
157
  equipmentId: form.equipmentID,
@@ -156,10 +171,15 @@ const batteryCreationFormToDto = (form) => {
156
171
  reactiveCapabilityCurvePoints: isReactiveCapabilityCurveOn ? form.reactiveLimits.reactiveCapabilityCurveTable ?? null : null,
157
172
  targetP: form.activePowerSetpoint ?? 0,
158
173
  targetQ: form.reactivePowerSetpoint ?? 0,
174
+ targetV: form.voltageSetpoint ?? null,
175
+ voltageRegulationOn: form.voltageRegulation ?? null,
159
176
  participate: form.frequencyRegulation ?? null,
160
177
  droop: form.droop ?? null,
161
178
  directTransX: form.directTransX ?? null,
162
- stepUpTransformerX: form.transformerReactance ?? null
179
+ stepUpTransformerX: form.transformerReactance ?? null,
180
+ regulatingTerminalId: isDistantRegulation ? form.equipment?.id ?? null : null,
181
+ regulatingTerminalType: isDistantRegulation ? form.equipment?.type ?? null : null,
182
+ regulatingTerminalVlId: isDistantRegulation ? form.voltageLevel?.id ?? null : null
163
183
  };
164
184
  };
165
185
  export {
@@ -13,5 +13,6 @@ export interface VoltageRegulationFormProps {
13
13
  })[]>;
14
14
  previousValues?: VoltageRegulationFormPreviousValues;
15
15
  isEquipmentModification?: boolean;
16
+ isGenerator?: boolean;
16
17
  }
17
- export declare function VoltageRegulationForm({ voltageLevelOptions, fetchVoltageLevelEquipments, previousValues, isEquipmentModification, }: Readonly<VoltageRegulationFormProps>): import("react").JSX.Element;
18
+ export declare function VoltageRegulationForm({ voltageLevelOptions, fetchVoltageLevelEquipments, previousValues, isEquipmentModification, isGenerator, }: Readonly<VoltageRegulationFormProps>): import("react").JSX.Element;
@@ -40,7 +40,8 @@ function VoltageRegulationForm({
40
40
  voltageLevelOptions,
41
41
  fetchVoltageLevelEquipments,
42
42
  previousValues,
43
- isEquipmentModification
43
+ isEquipmentModification,
44
+ isGenerator = true
44
45
  }) {
45
46
  const intl = useIntl();
46
47
  const previousRegulationType = useMemo(() => {
@@ -95,7 +96,7 @@ function VoltageRegulationForm({
95
96
  equipmentSectionType: previousEquipmentSectionType
96
97
  }
97
98
  ) }),
98
- /* @__PURE__ */ jsx(GridItem, { size: 4, offset: 4, children: /* @__PURE__ */ jsx(
99
+ isGenerator && /* @__PURE__ */ jsx(GridItem, { size: 4, offset: 4, children: /* @__PURE__ */ jsx(
99
100
  FloatInput,
100
101
  {
101
102
  name: FieldConstants.Q_PERCENT,
@@ -38,7 +38,8 @@ function LimitReductionTableCell({
38
38
  column,
39
39
  limits
40
40
  }) {
41
- return column.dataKey === VOLTAGE_LEVELS_FORM && limits[rowIndex] ? /* @__PURE__ */ jsx(
41
+ const isVoltageLevelColumn = column.dataKey === VOLTAGE_LEVELS_FORM;
42
+ return isVoltageLevelColumn && limits[rowIndex] ? /* @__PURE__ */ jsx(
42
43
  CustomTooltip,
43
44
  {
44
45
  title: /* @__PURE__ */ jsx(
@@ -53,7 +54,22 @@ function LimitReductionTableCell({
53
54
  ),
54
55
  children: /* @__PURE__ */ jsx(TableCell, { sx: { fontWeight: "bold" }, children: /* @__PURE__ */ jsx(RawReadOnlyInput, { name: `${LIMIT_REDUCTIONS_FORM}[${rowIndex}].${column.dataKey}` }) })
55
56
  }
56
- ) : /* @__PURE__ */ jsx(TableCell, { sx: { fontWeight: "bold" }, children: column.dataKey === VOLTAGE_LEVELS_FORM ? /* @__PURE__ */ jsx(RawReadOnlyInput, { name: `${LIMIT_REDUCTIONS_FORM}[${rowIndex}].${column.dataKey}` }) : /* @__PURE__ */ jsx(FloatInput, { name: `${LIMIT_REDUCTIONS_FORM}[${rowIndex}].${column.dataKey}` }) });
57
+ ) : /* @__PURE__ */ jsx(TableCell, { sx: { fontWeight: "bold", p: 0.75 }, children: isVoltageLevelColumn ? /* @__PURE__ */ jsx(RawReadOnlyInput, { name: `${LIMIT_REDUCTIONS_FORM}[${rowIndex}].${column.dataKey}` }) : /* @__PURE__ */ jsx(
58
+ FloatInput,
59
+ {
60
+ formProps: {
61
+ sx: {
62
+ "& .MuiInputBase-root": {
63
+ padding: 0
64
+ },
65
+ "& .MuiInputBase-input": {
66
+ textAlign: "right"
67
+ }
68
+ }
69
+ },
70
+ name: `${LIMIT_REDUCTIONS_FORM}[${rowIndex}].${column.dataKey}`
71
+ }
72
+ ) });
57
73
  }
58
74
  export {
59
75
  LimitReductionTableCell
@@ -56,7 +56,7 @@ function LimitReductionsTableForm({ limits }) {
56
56
  {
57
57
  formName: LIMIT_REDUCTIONS_FORM,
58
58
  columnsDefinition,
59
- tableHeight: 450,
59
+ tableMinWidth: 600,
60
60
  limits
61
61
  }
62
62
  );
@@ -1,9 +1,10 @@
1
1
  import { LimitReductionIColumnsDef, ILimitReductionsByVoltageLevel } from '../limitreductions/columns-definitions';
2
2
  interface LimitReductionsTableProps {
3
3
  columnsDefinition: LimitReductionIColumnsDef[];
4
- tableHeight: number;
4
+ tableHeight?: number;
5
+ tableMinWidth?: number;
5
6
  formName: string;
6
7
  limits?: ILimitReductionsByVoltageLevel[];
7
8
  }
8
- export declare function CustomVoltageLevelTable({ formName, columnsDefinition, tableHeight, limits, }: Readonly<LimitReductionsTableProps>): import("react").JSX.Element;
9
+ export declare function CustomVoltageLevelTable({ formName, columnsDefinition, tableHeight, tableMinWidth, limits, }: Readonly<LimitReductionsTableProps>): import("react").JSX.Element;
9
10
  export {};
@@ -5,10 +5,16 @@ import { CustomTooltip } from "../../../../components/ui/tooltip/CustomTooltip.j
5
5
  import { LIMIT_REDUCTIONS_FORM } from "../limitreductions/columns-definitions.js";
6
6
  import { LimitReductionTableRow } from "../limitreductions/limit-reduction-table-row.js";
7
7
  import { CustomVoltageLevelTableRow } from "./custom-voltage-level-table-row.js";
8
+ const stickyFirstColumnSx = {
9
+ position: "sticky",
10
+ left: 0,
11
+ backgroundColor: "background.paper"
12
+ };
8
13
  function CustomVoltageLevelTable({
9
14
  formName,
10
15
  columnsDefinition,
11
16
  tableHeight,
17
+ tableMinWidth,
12
18
  limits
13
19
  }) {
14
20
  const { fields: rows } = useFieldArray({
@@ -18,41 +24,53 @@ function CustomVoltageLevelTable({
18
24
  TableContainer,
19
25
  {
20
26
  sx: {
21
- height: tableHeight,
27
+ ...tableHeight ? { height: tableHeight } : {},
22
28
  width: "inherit",
29
+ overflowX: "auto",
23
30
  border: "solid 0px rgba(0,0,0,0.1)"
24
31
  },
25
- children: /* @__PURE__ */ jsxs(Table, { stickyHeader: true, size: "small", sx: { tableLayout: "fixed" }, children: [
26
- /* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsx(TableRow, { children: columnsDefinition.map((column) => /* @__PURE__ */ jsx(CustomTooltip, { title: column.tooltip, children: /* @__PURE__ */ jsx(
27
- TableCell,
28
- {
29
- sx: {
32
+ children: /* @__PURE__ */ jsxs(
33
+ Table,
34
+ {
35
+ stickyHeader: true,
36
+ size: "small",
37
+ sx: {
38
+ tableLayout: "fixed",
39
+ ...tableMinWidth ? { minWidth: tableMinWidth } : {},
40
+ "& th:first-of-type": {
41
+ ...stickyFirstColumnSx,
42
+ zIndex: 3,
30
43
  textAlign: "center"
31
44
  },
32
- children: column.label
45
+ "& td:first-of-type": {
46
+ ...stickyFirstColumnSx,
47
+ zIndex: 1
48
+ }
33
49
  },
34
- column.dataKey
35
- ) })) }) }),
36
- /* @__PURE__ */ jsx(TableBody, { children: rows.map(
37
- (row, index) => formName === LIMIT_REDUCTIONS_FORM && limits ? /* @__PURE__ */ jsx(
38
- LimitReductionTableRow,
39
- {
40
- columnsDefinition,
41
- index,
42
- limits
43
- },
44
- `${row.id}`
45
- ) : /* @__PURE__ */ jsx(
46
- CustomVoltageLevelTableRow,
47
- {
48
- columnsDefinition,
49
- index,
50
- formName
51
- },
52
- `${row.id}`
53
- )
54
- ) })
55
- ] })
50
+ children: [
51
+ /* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsx(TableRow, { children: columnsDefinition.map((column) => /* @__PURE__ */ jsx(CustomTooltip, { title: column.tooltip, children: /* @__PURE__ */ jsx(TableCell, { sx: { textAlign: "center" }, children: column.label }, column.dataKey) })) }) }),
52
+ /* @__PURE__ */ jsx(TableBody, { children: rows.map(
53
+ (row, index) => formName === LIMIT_REDUCTIONS_FORM && limits ? /* @__PURE__ */ jsx(
54
+ LimitReductionTableRow,
55
+ {
56
+ columnsDefinition,
57
+ index,
58
+ limits
59
+ },
60
+ `${row.id}`
61
+ ) : /* @__PURE__ */ jsx(
62
+ CustomVoltageLevelTableRow,
63
+ {
64
+ columnsDefinition,
65
+ index,
66
+ formName
67
+ },
68
+ `${row.id}`
69
+ )
70
+ ) })
71
+ ]
72
+ }
73
+ )
56
74
  }
57
75
  );
58
76
  }
@@ -7,6 +7,7 @@ import "../../../utils/conversionUtils.js";
7
7
  import { ElementType } from "../../../utils/types/elementType.js";
8
8
  import "../../../utils/types/equipmentType.js";
9
9
  import { ComputingType } from "../../../utils/types/computing-type.js";
10
+ import { isDisabledValidationButton } from "../../../utils/form-utils.js";
10
11
  import { LANG_ENGLISH } from "../../../utils/langs.js";
11
12
  import "@mui/icons-material";
12
13
  import { getLoadFlowDefaultLimitReductions, getLoadFlowProviders, fetchLoadFlowParameters, setLoadFlowParameters, getLoadFlowSpecificParametersDescription } from "../../../services/loadflow.js";
@@ -66,9 +67,8 @@ function LoadFlowParametersEditionDialog({
66
67
  );
67
68
  const loadflowMethods = useLoadFlowParametersForm(parametersBackend, isDeveloperMode, id, name, description);
68
69
  const {
69
- formState: { errors, dirtyFields }
70
+ formState: { errors }
70
71
  } = loadflowMethods.formMethods;
71
- const disableSave = Object.keys(errors).length > 0 || Object.keys(dirtyFields).length === 0;
72
72
  return /* @__PURE__ */ jsx(
73
73
  CustomMuiDialog,
74
74
  {
@@ -83,7 +83,7 @@ function LoadFlowParametersEditionDialog({
83
83
  language
84
84
  },
85
85
  titleId,
86
- disabledSave: disableSave,
86
+ disabledSave: isDisabledValidationButton(errors),
87
87
  children: /* @__PURE__ */ jsxs(LoadFlowProvider, { children: [
88
88
  /* @__PURE__ */ jsx(Grid2, { container: true, sx: { width: "100%" }, children: /* @__PURE__ */ jsx(
89
89
  NameElementEditorForm,
@@ -6,6 +6,7 @@ import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
6
6
  import "../../../utils/conversionUtils.js";
7
7
  import { ElementType } from "../../../utils/types/elementType.js";
8
8
  import "../../../utils/types/equipmentType.js";
9
+ import { isDisabledValidationButton } from "../../../utils/form-utils.js";
9
10
  import "@mui/icons-material";
10
11
  import "react";
11
12
  import "react-intl";
@@ -53,9 +54,8 @@ function NetworkVisualizationsParametersEditionDialog({
53
54
  parameters: null
54
55
  });
55
56
  const {
56
- formState: { errors, dirtyFields }
57
+ formState: { errors }
57
58
  } = networkVisuMethods.formMethods;
58
- const disableSave = Object.keys(errors).length > 0 || Object.keys(dirtyFields).length === 0;
59
59
  return /* @__PURE__ */ jsxs(
60
60
  CustomMuiDialog,
61
61
  {
@@ -70,7 +70,7 @@ function NetworkVisualizationsParametersEditionDialog({
70
70
  language
71
71
  },
72
72
  titleId,
73
- disabledSave: disableSave,
73
+ disabledSave: isDisabledValidationButton(errors),
74
74
  PaperProps: {
75
75
  sx: {
76
76
  height: "65vh"
@@ -6,6 +6,7 @@ import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
6
6
  import "../../../utils/conversionUtils.js";
7
7
  import { ElementType } from "../../../utils/types/elementType.js";
8
8
  import "../../../utils/types/equipmentType.js";
9
+ import { isDisabledValidationButton } from "../../../utils/form-utils.js";
9
10
  import "@mui/icons-material";
10
11
  import "react";
11
12
  import "react-intl";
@@ -52,9 +53,8 @@ function PccMinParametersEditionDialog({
52
53
  parameters: null
53
54
  });
54
55
  const {
55
- formState: { errors, dirtyFields }
56
+ formState: { errors }
56
57
  } = pccMinMethods.formMethods;
57
- const disableSave = Object.keys(errors).length > 0 || Object.keys(dirtyFields).length === 0;
58
58
  return /* @__PURE__ */ jsxs(
59
59
  CustomMuiDialog,
60
60
  {
@@ -68,7 +68,7 @@ function PccMinParametersEditionDialog({
68
68
  language
69
69
  },
70
70
  titleId,
71
- disabledSave: disableSave,
71
+ disabledSave: isDisabledValidationButton(errors),
72
72
  PaperProps: {
73
73
  sx: {
74
74
  height: "90vh"
@@ -6,6 +6,7 @@ import "../../../utils/conversionUtils.js";
6
6
  import { ElementType } from "../../../utils/types/elementType.js";
7
7
  import "../../../utils/types/equipmentType.js";
8
8
  import { ComputingType } from "../../../utils/types/computing-type.js";
9
+ import { isDisabledValidationButton } from "../../../utils/form-utils.js";
9
10
  import "@mui/icons-material";
10
11
  import { getSecurityAnalysisDefaultLimitReductions, fetchSecurityAnalysisProviders, fetchSecurityAnalysisParameters, updateSecurityAnalysisParameters } from "../../../services/security-analysis.js";
11
12
  import "localized-countries";
@@ -62,9 +63,8 @@ function SecurityAnalysisParametersDialog({
62
63
  );
63
64
  const securityAnalysisMethods = useSecurityAnalysisParametersForm(parametersBackend, id, name, description);
64
65
  const {
65
- formState: { errors, dirtyFields }
66
+ formState: { errors }
66
67
  } = securityAnalysisMethods.formMethods;
67
- const disableSave = Object.keys(errors).length > 0 || Object.keys(dirtyFields).length === 0;
68
68
  return /* @__PURE__ */ jsxs(
69
69
  CustomMuiDialog,
70
70
  {
@@ -79,7 +79,7 @@ function SecurityAnalysisParametersDialog({
79
79
  language
80
80
  },
81
81
  titleId,
82
- disabledSave: disableSave,
82
+ disabledSave: isDisabledValidationButton(errors),
83
83
  PaperProps: {
84
84
  sx: {
85
85
  height: "90vh"
@@ -6,6 +6,7 @@ import "../../../utils/conversionUtils.js";
6
6
  import { ElementType } from "../../../utils/types/elementType.js";
7
7
  import "../../../utils/types/equipmentType.js";
8
8
  import { ComputingType } from "../../../utils/types/computing-type.js";
9
+ import { isDisabledValidationButton } from "../../../utils/form-utils.js";
9
10
  import "@mui/icons-material";
10
11
  import { fetchSensitivityAnalysisProviders, fetchSensitivityAnalysisParameters, updateSensitivityAnalysisParameters } from "../../../services/sensitivity-analysis.js";
11
12
  import "localized-countries";
@@ -74,9 +75,8 @@ function SensitivityAnalysisParametersDialog({
74
75
  isRootNode
75
76
  });
76
77
  const {
77
- formState: { errors, dirtyFields }
78
+ formState: { errors }
78
79
  } = sensitivityAnalysisMethods.formMethods;
79
- const disableSave = Object.keys(errors).length > 0 || Object.keys(dirtyFields).length === 0;
80
80
  return /* @__PURE__ */ jsxs(
81
81
  CustomMuiDialog,
82
82
  {
@@ -90,7 +90,7 @@ function SensitivityAnalysisParametersDialog({
90
90
  language
91
91
  },
92
92
  titleId,
93
- disabledSave: disableSave,
93
+ disabledSave: isDisabledValidationButton(errors),
94
94
  children: [
95
95
  /* @__PURE__ */ jsx(Grid2, { container: true, sx: { width: "100%" }, children: /* @__PURE__ */ jsx(
96
96
  NameElementEditorForm,
@@ -7,6 +7,7 @@ import "../../../utils/conversionUtils.js";
7
7
  import { ElementType } from "../../../utils/types/elementType.js";
8
8
  import "../../../utils/types/equipmentType.js";
9
9
  import { ComputingType } from "../../../utils/types/computing-type.js";
10
+ import { isDisabledValidationButton } from "../../../utils/form-utils.js";
10
11
  import "@mui/icons-material";
11
12
  import { fetchShortCircuitParameters, updateShortCircuitParameters, getShortCircuitSpecificParametersDescription } from "../../../services/short-circuit-analysis.js";
12
13
  import "react";
@@ -66,9 +67,8 @@ function ShortCircuitParametersEditionDialog({
66
67
  description
67
68
  });
68
69
  const {
69
- formState: { errors, dirtyFields }
70
+ formState: { errors }
70
71
  } = shortCircuitMethods.formMethods;
71
- const disableSave = Object.keys(errors).length > 0 || Object.keys(dirtyFields).length === 0;
72
72
  return /* @__PURE__ */ jsxs(
73
73
  CustomMuiDialog,
74
74
  {
@@ -83,7 +83,7 @@ function ShortCircuitParametersEditionDialog({
83
83
  language
84
84
  },
85
85
  titleId,
86
- disabledSave: disableSave,
86
+ disabledSave: isDisabledValidationButton(errors),
87
87
  maxWidth: "lg",
88
88
  children: [
89
89
  /* @__PURE__ */ jsx(Grid2, { container: true, sx: { width: "100%" }, children: /* @__PURE__ */ jsx(
@@ -6,6 +6,7 @@ import "../../../components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
6
6
  import "../../../utils/conversionUtils.js";
7
7
  import { ElementType } from "../../../utils/types/elementType.js";
8
8
  import "../../../utils/types/equipmentType.js";
9
+ import { isDisabledValidationButton } from "../../../utils/form-utils.js";
9
10
  import "@mui/icons-material";
10
11
  import "react";
11
12
  import "react-intl";
@@ -52,9 +53,8 @@ function VoltageInitParametersEditionDialog({
52
53
  parameters: null
53
54
  });
54
55
  const {
55
- formState: { errors, dirtyFields }
56
+ formState: { errors }
56
57
  } = voltageInitMethods.formMethods;
57
- const disableSave = Object.keys(errors).length > 0 || Object.keys(dirtyFields).length === 0;
58
58
  return /* @__PURE__ */ jsxs(
59
59
  CustomMuiDialog,
60
60
  {
@@ -69,7 +69,7 @@ function VoltageInitParametersEditionDialog({
69
69
  removeOptional: true,
70
70
  language
71
71
  },
72
- disabledSave: disableSave,
72
+ disabledSave: isDisabledValidationButton(errors),
73
73
  PaperProps: {
74
74
  sx: {
75
75
  height: "90vh"
package/dist/index.js CHANGED
@@ -298,6 +298,7 @@ import { FILTERS, FILTER_ID, FILTER_NAME, ID } from "./utils/constants/filterCon
298
298
  import { DUPLICATED_PROPS_ERROR, YUP_DEFAULT, YUP_NOT_NULL, YUP_NOT_TYPE_DEFAULT, YUP_NOT_TYPE_NUMBER, YUP_POSITIVE, YUP_REQUIRED } from "./utils/constants/translationKeys.js";
299
299
  import { GRIDSUITE_DEFAULT_PRECISION, convertInputValue, convertOutputValue, isBlankOrEmpty, kiloUnitToUnit, microUnitToUnit, roundToDefaultPrecision, roundToPrecision, toModificationOperation, unitToKiloUnit, unitToMicroUnit } from "./utils/conversionUtils.js";
300
300
  import { catchErrorHandler, extractErrorMessageDescriptor, snackWithFallback } from "./utils/error.js";
301
+ import { isDisabledValidationButton } from "./utils/form-utils.js";
301
302
  import { areArrayElementsUnique, arraysContainIdenticalStrings, getRows, hasNonEmptyRows, isEmpty, isObjectEmpty, keyGenerator } from "./utils/functions.js";
302
303
  import { getEquipmentTypeShortLabel } from "./utils/labelUtils.js";
303
304
  import { LANG_ENGLISH, LANG_FRENCH, LANG_SYSTEM, getCsvDelimiter } from "./utils/langs.js";
@@ -312,7 +313,7 @@ import { NetworkTimeoutError } from "./utils/types/NetworkTimeoutError.js";
312
313
  import { ElementType } from "./utils/types/elementType.js";
313
314
  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";
314
315
  import { Battery, BoundaryLine, BusBar, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel, isInjection } from "./utils/types/equipmentTypes.js";
315
- import { AnnouncementSeverity, ArrayAction } from "./utils/types/types.js";
316
+ import { AnnouncementSeverity, ArrayAction, ElementStatus } from "./utils/types/types.js";
316
317
  import { MODIFICATION_TYPES, ModificationType } from "./utils/types/modificationType.js";
317
318
  import { FieldType } from "./utils/types/fieldType.js";
318
319
  import { ParameterType } from "./utils/types/parameters.type.js";
@@ -697,6 +698,7 @@ export {
697
698
  ElementSaveDialog,
698
699
  ElementSearchDialog,
699
700
  ElementSearchInput,
701
+ ElementStatus,
700
702
  ElementType,
701
703
  ElementValueEditor,
702
704
  EnumInput,
@@ -1465,6 +1467,7 @@ export {
1465
1467
  intlPredefinedParametersOptions,
1466
1468
  isBlankOrEmpty,
1467
1469
  isCompositeModification,
1470
+ isDisabledValidationButton,
1468
1471
  isEmpty,
1469
1472
  isExploreMetadata,
1470
1473
  isFieldRequired,
@@ -0,0 +1,2 @@
1
+ import { FieldErrors } from 'react-hook-form';
2
+ export declare function isDisabledValidationButton(formErrors: FieldErrors, fieldName?: string): boolean;
@@ -0,0 +1,7 @@
1
+ import { FieldConstants } from "./constants/fieldConstants.js";
2
+ function isDisabledValidationButton(formErrors, fieldName) {
3
+ return Boolean(formErrors[fieldName ?? FieldConstants.NAME] || formErrors.root?.isValidating);
4
+ }
5
+ export {
6
+ isDisabledValidationButton
7
+ };
@@ -8,6 +8,7 @@ export * from './algos';
8
8
  export * from './constants';
9
9
  export * from './conversionUtils';
10
10
  export * from './error';
11
+ export * from './form-utils';
11
12
  export * from './functions';
12
13
  export * from './labelUtils';
13
14
  export * from './langs';
@@ -9,6 +9,7 @@ import { FILTERS, FILTER_ID, FILTER_NAME, ID } from "./constants/filterConstant.
9
9
  import { DUPLICATED_PROPS_ERROR, YUP_DEFAULT, YUP_NOT_NULL, YUP_NOT_TYPE_DEFAULT, YUP_NOT_TYPE_NUMBER, YUP_POSITIVE, YUP_REQUIRED } from "./constants/translationKeys.js";
10
10
  import { GRIDSUITE_DEFAULT_PRECISION, convertInputValue, convertOutputValue, isBlankOrEmpty, kiloUnitToUnit, microUnitToUnit, roundToDefaultPrecision, roundToPrecision, toModificationOperation, unitToKiloUnit, unitToMicroUnit } from "./conversionUtils.js";
11
11
  import { catchErrorHandler, extractErrorMessageDescriptor, snackWithFallback } from "./error.js";
12
+ import { isDisabledValidationButton } from "./form-utils.js";
12
13
  import { areArrayElementsUnique, arraysContainIdenticalStrings, getRows, hasNonEmptyRows, isEmpty, isObjectEmpty, keyGenerator } from "./functions.js";
13
14
  import { getEquipmentTypeShortLabel } from "./labelUtils.js";
14
15
  import { LANG_ENGLISH, LANG_FRENCH, LANG_SYSTEM, getCsvDelimiter } from "./langs.js";
@@ -23,7 +24,7 @@ import { NetworkTimeoutError } from "./types/NetworkTimeoutError.js";
23
24
  import { ElementType } from "./types/elementType.js";
24
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";
25
26
  import { Battery, BoundaryLine, BusBar, Generator, Hvdc, LCC, Line, Load, SVC, ShuntCompensator, Substation, ThreeWindingTransfo, TwoWindingTransfo, VSC, VoltageLevel, isInjection } from "./types/equipmentTypes.js";
26
- import { AnnouncementSeverity, ArrayAction } from "./types/types.js";
27
+ import { AnnouncementSeverity, ArrayAction, ElementStatus } from "./types/types.js";
27
28
  import { MODIFICATION_TYPES, ModificationType } from "./types/modificationType.js";
28
29
  import { FieldType } from "./types/fieldType.js";
29
30
  import { ParameterType } from "./types/parameters.type.js";
@@ -64,6 +65,7 @@ export {
64
65
  EQUIPMENTS_WITH_THREE_NOMINAL_VOLTAGES,
65
66
  EQUIPMENTS_WITH_TWO_NOMINAL_VOLTAGES,
66
67
  EQUIPMENTS_WITH_TWO_SUBSTATIONS,
68
+ ElementStatus,
67
69
  ElementType,
68
70
  EquipmentType,
69
71
  ExtendedEquipmentType,
@@ -170,6 +172,7 @@ export {
170
172
  getRows,
171
173
  hasNonEmptyRows,
172
174
  isBlankOrEmpty,
175
+ isDisabledValidationButton,
173
176
  isEmpty,
174
177
  isInjection,
175
178
  isNonEmptyStringOrArray,
@@ -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 } from "./types.js";
7
+ import { AnnouncementSeverity, ArrayAction, ElementStatus } 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";
@@ -34,6 +34,7 @@ export {
34
34
  EQUIPMENTS_WITH_THREE_NOMINAL_VOLTAGES,
35
35
  EQUIPMENTS_WITH_TWO_NOMINAL_VOLTAGES,
36
36
  EQUIPMENTS_WITH_TWO_SUBSTATIONS,
37
+ ElementStatus,
37
38
  ElementType,
38
39
  EquipmentType,
39
40
  ExtendedEquipmentType,
@@ -2,6 +2,10 @@ import { UUID } from 'node:crypto';
2
2
  import { MessageDescriptor, PrimitiveType } from 'react-intl';
3
3
  import { ElementType } from './elementType';
4
4
  export type Input = string | number;
5
+ export declare enum ElementStatus {
6
+ CREATED = "CREATED",
7
+ DELETING = "DELETING"
8
+ }
5
9
  export type ElementAttributes = {
6
10
  elementUuid: UUID;
7
11
  elementName: string;
@@ -17,6 +21,7 @@ export type ElementAttributes = {
17
21
  lastModificationDate: string;
18
22
  lastModifiedBy: string;
19
23
  lastModifiedByLabel?: string;
24
+ status?: ElementStatus;
20
25
  children: ElementAttributes[];
21
26
  parentUuid: null | UUID;
22
27
  specificMetadata: {
@@ -1,3 +1,8 @@
1
+ var ElementStatus = /* @__PURE__ */ ((ElementStatus2) => {
2
+ ElementStatus2["CREATED"] = "CREATED";
3
+ ElementStatus2["DELETING"] = "DELETING";
4
+ return ElementStatus2;
5
+ })(ElementStatus || {});
1
6
  var AnnouncementSeverity = /* @__PURE__ */ ((AnnouncementSeverity2) => {
2
7
  AnnouncementSeverity2["INFO"] = "INFO";
3
8
  AnnouncementSeverity2["WARN"] = "WARN";
@@ -10,5 +15,6 @@ var ArrayAction = /* @__PURE__ */ ((ArrayAction2) => {
10
15
  })(ArrayAction || {});
11
16
  export {
12
17
  AnnouncementSeverity,
13
- ArrayAction
18
+ ArrayAction,
19
+ ElementStatus
14
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.253.0",
3
+ "version": "0.254.0",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "author": "gridsuite team",
6
6
  "homepage": "https://github.com/gridsuite",