@gridsuite/commons-ui 0.254.0 → 0.255.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.
@@ -2,6 +2,6 @@ import { BranchInfos } from '../../line/common/line.types';
2
2
  export interface LimitsPaneProps {
3
3
  id?: string;
4
4
  equipmentToModify?: BranchInfos | null;
5
- clearableFields?: boolean;
5
+ isModification?: boolean;
6
6
  }
7
- export declare function LimitsPane({ id, equipmentToModify, clearableFields, }: Readonly<LimitsPaneProps>): import("react").JSX.Element;
7
+ export declare function LimitsPane({ id, equipmentToModify, isModification, }: Readonly<LimitsPaneProps>): import("react").JSX.Element;
@@ -76,7 +76,7 @@ const limitsStyles = {
76
76
  function LimitsPane({
77
77
  id = FieldConstants.LIMITS,
78
78
  equipmentToModify,
79
- clearableFields
79
+ isModification
80
80
  }) {
81
81
  const [indexSelectedLimitSet, setIndexSelectedLimitSet] = useState(null);
82
82
  const { getValues, reset } = useFormContext();
@@ -225,7 +225,7 @@ function LimitsPane({
225
225
  LimitsEditor,
226
226
  {
227
227
  name: `${id}.${FieldConstants.OPERATIONAL_LIMITS_GROUPS}[${index}]`,
228
- clearableFields,
228
+ clearableFields: isModification,
229
229
  permanentCurrentLimitPreviousValue: getCurrentLimits(equipmentToModify, operationalLimitsGroup.id)?.permanentLimit ?? getCurrentLimitsIgnoreApplicability(
230
230
  equipmentToModify,
231
231
  operationalLimitsGroup.name
@@ -5,4 +5,4 @@ export interface LineDialogTabsContentProps extends ConnectivityNetworkProps, Li
5
5
  lineToModify?: BranchInfos | null;
6
6
  tabIndex: number;
7
7
  }
8
- export declare function LineDialogTabsContent({ lineToModify, isModification, withConnectivity, clearableFields, tabIndex, voltageLevelOptions, PositionDiagramPane, fetchBusesOrBusbarSections, }: Readonly<LineDialogTabsContentProps>): import("react").JSX.Element;
8
+ export declare function LineDialogTabsContent({ lineToModify, isModification, withConnectivity, tabIndex, voltageLevelOptions, PositionDiagramPane, fetchBusesOrBusbarSections, }: Readonly<LineDialogTabsContentProps>): import("react").JSX.Element;
@@ -66,7 +66,6 @@ function LineDialogTabsContent({
66
66
  lineToModify,
67
67
  isModification = false,
68
68
  withConnectivity = true,
69
- clearableFields = false,
70
69
  tabIndex,
71
70
  voltageLevelOptions = [],
72
71
  PositionDiagramPane,
@@ -87,7 +86,7 @@ function LineDialogTabsContent({
87
86
  )
88
87
  ] }),
89
88
  /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== LineDialogTab.CHARACTERISTICS_TAB, children: /* @__PURE__ */ jsx(LineCharacteristicsPane, { lineToModify, isModification }) }),
90
- /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== LineDialogTab.LIMITS_TAB, children: /* @__PURE__ */ jsx(LimitsPane, { equipmentToModify: lineToModify, clearableFields }) }),
89
+ /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== LineDialogTab.LIMITS_TAB, children: /* @__PURE__ */ jsx(LimitsPane, { equipmentToModify: lineToModify, isModification }) }),
91
90
  isModification && /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== LineDialogTab.STATE_ESTIMATION_TAB, children: /* @__PURE__ */ jsx(BranchActiveReactivePowerMeasurementsForm, { equipmentToModify: lineToModify }) })
92
91
  ] });
93
92
  }
@@ -2,5 +2,5 @@ import { LineDialogHeaderProps } from './LineDialogHeader';
2
2
  import { LineDialogTabsContentProps } from './LineDialogTabsContent';
3
3
  interface LineFormProps extends LineDialogHeaderProps, Omit<LineDialogTabsContentProps, 'tabIndex' | 'isModification' | 'lineToModify'> {
4
4
  }
5
- export declare function LineForm({ lineToModify, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, isModification, withConnectivity, clearableFields, }: Readonly<LineFormProps>): import("react").JSX.Element;
5
+ export declare function LineForm({ lineToModify, voltageLevelOptions, fetchBusesOrBusbarSections, PositionDiagramPane, isModification, withConnectivity, }: Readonly<LineFormProps>): import("react").JSX.Element;
6
6
  export {};
@@ -11,8 +11,7 @@ function LineForm({
11
11
  fetchBusesOrBusbarSections,
12
12
  PositionDiagramPane,
13
13
  isModification = false,
14
- withConnectivity = true,
15
- clearableFields = false
14
+ withConnectivity = true
16
15
  }) {
17
16
  const { tabIndex, setTabIndex, tabIndexesWithError } = useTabsWithError(
18
17
  LINE_TAB_FIELDS,
@@ -39,8 +38,7 @@ function LineForm({
39
38
  fetchBusesOrBusbarSections,
40
39
  PositionDiagramPane,
41
40
  isModification,
42
- withConnectivity,
43
- clearableFields
41
+ withConnectivity
44
42
  }
45
43
  ) })
46
44
  ] });
@@ -2,7 +2,6 @@ import { FieldConstants } from '../../../../utils';
2
2
  export interface LineDialogOptions {
3
3
  isModification?: boolean;
4
4
  withConnectivity?: boolean;
5
- clearableFields?: boolean;
6
5
  }
7
6
  export declare const enum LineDialogTab {
8
7
  CONNECTIVITY_TAB = 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsuite/commons-ui",
3
- "version": "0.254.0",
3
+ "version": "0.255.0",
4
4
  "description": "common react components for gridsuite applications",
5
5
  "author": "gridsuite team",
6
6
  "homepage": "https://github.com/gridsuite",