@gridsuite/commons-ui 0.241.1 → 0.243.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 (151) hide show
  1. package/README.md +10 -2
  2. package/dist/components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js +1 -1
  3. package/dist/components/composite/grid/grid-item.d.ts +2 -1
  4. package/dist/components/composite/grid/grid-item.js +9 -2
  5. package/dist/components/ui/csvPicker/csv-picker.d.ts +7 -2
  6. package/dist/components/ui/csvPicker/csv-picker.js +7 -6
  7. package/dist/components/ui/inputs/checkbox-autocomplete/checkbox-autocomplete.d.ts +1 -2
  8. package/dist/features/index.js +87 -3
  9. package/dist/features/network-modification-table/index.js +2 -1
  10. package/dist/features/network-modification-table/use-modifications-drag-and-drop.js +2 -1
  11. package/dist/features/network-modification-table/utils.d.ts +1 -0
  12. package/dist/features/network-modification-table/utils.js +5 -1
  13. package/dist/features/network-modifications/battery/creation/BatteryCreationForm.js +3 -0
  14. package/dist/features/network-modifications/battery/creation/batteryCreation.utils.js +3 -0
  15. package/dist/features/network-modifications/battery/modification/BatteryDialogHeader.js +3 -0
  16. package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.js +3 -0
  17. package/dist/features/network-modifications/battery/modification/batteryModification.utils.js +3 -0
  18. package/dist/features/network-modifications/common/connectivity/connectivityForm.utils.d.ts +71 -2
  19. package/dist/features/network-modifications/common/connectivity/connectivityForm.utils.js +26 -8
  20. package/dist/features/network-modifications/common/connectivity/index.js +3 -1
  21. package/dist/features/network-modifications/common/currentLimits/LimitsPane.d.ts +7 -0
  22. package/dist/features/network-modifications/common/currentLimits/LimitsPane.js +243 -0
  23. package/dist/features/network-modifications/common/currentLimits/LimitsTagChip.d.ts +9 -0
  24. package/dist/features/network-modifications/common/currentLimits/LimitsTagChip.js +29 -0
  25. package/dist/features/network-modifications/common/currentLimits/SelectedOperationalLimitGroup.d.ts +9 -0
  26. package/dist/features/network-modifications/common/currentLimits/SelectedOperationalLimitGroup.js +100 -0
  27. package/dist/features/network-modifications/common/currentLimits/index.d.ts +12 -0
  28. package/dist/features/network-modifications/common/currentLimits/index.js +47 -0
  29. package/dist/features/network-modifications/common/currentLimits/limits.types.d.ts +52 -0
  30. package/dist/features/network-modifications/common/currentLimits/limits.types.js +17 -0
  31. package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsEditor.d.ts +10 -0
  32. package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsEditor.js +285 -0
  33. package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsPropertiesSideStack.d.ts +5 -0
  34. package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsPropertiesSideStack.js +184 -0
  35. package/dist/features/network-modifications/common/currentLimits/limitsEditor/TemporaryLimitsTable.d.ts +14 -0
  36. package/dist/features/network-modifications/common/currentLimits/limitsEditor/TemporaryLimitsTable.js +166 -0
  37. package/dist/features/network-modifications/common/currentLimits/limitsEditor/index.d.ts +10 -0
  38. package/dist/features/network-modifications/common/currentLimits/limitsEditor/index.js +10 -0
  39. package/dist/features/network-modifications/common/currentLimits/limitsEditor/limitsChart.d.ts +11 -0
  40. package/dist/features/network-modifications/common/currentLimits/limitsEditor/limitsChart.js +177 -0
  41. package/dist/features/network-modifications/common/currentLimits/limitsPane.utils.d.ts +213 -0
  42. package/dist/features/network-modifications/common/currentLimits/limitsPane.utils.js +337 -0
  43. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsGroupsContextualMenu.d.ts +25 -0
  44. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsGroupsContextualMenu.js +92 -0
  45. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsPropertiesStack.d.ts +10 -0
  46. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/LimitsPropertiesStack.js +25 -0
  47. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroupTabLabel.d.ts +10 -0
  48. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroupTabLabel.js +73 -0
  49. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroups.d.ts +16 -0
  50. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroups.js +121 -0
  51. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/index.d.ts +11 -0
  52. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/index.js +12 -0
  53. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroups.types.d.ts +71 -0
  54. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroups.types.js +15 -0
  55. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroupsStyles.d.ts +46 -0
  56. package/dist/features/network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroupsStyles.js +45 -0
  57. package/dist/features/network-modifications/common/index.d.ts +1 -0
  58. package/dist/features/network-modifications/common/index.js +50 -2
  59. package/dist/features/network-modifications/common/measurements/branchActiveReactivePowerForm.utils.d.ts +11 -0
  60. package/dist/features/network-modifications/common/measurements/branchActiveReactivePowerForm.utils.js +6 -4
  61. package/dist/features/network-modifications/common/measurements/index.js +2 -1
  62. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveTableForm.js +1 -1
  63. package/dist/features/network-modifications/common/voltageRegulation/VoltageRegulationForm.js +3 -7
  64. package/dist/features/network-modifications/equipmentDeletion/EquipmentDeletionForm.js +3 -0
  65. package/dist/features/network-modifications/generator/creation/GeneratorCreationForm.js +9 -6
  66. package/dist/features/network-modifications/generator/creation/generatorCreation.utils.js +3 -0
  67. package/dist/features/network-modifications/generator/modification/GeneratorDialogHeader.js +3 -0
  68. package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.js +9 -6
  69. package/dist/features/network-modifications/generator/modification/generatorModification.utils.js +3 -0
  70. package/dist/features/network-modifications/index.d.ts +1 -0
  71. package/dist/features/network-modifications/index.js +85 -2
  72. package/dist/features/network-modifications/line/catalog/index.d.ts +8 -0
  73. package/dist/features/network-modifications/line/catalog/index.js +14 -0
  74. package/dist/features/network-modifications/line/catalog/lineCatalog.type.d.ts +66 -0
  75. package/dist/features/network-modifications/line/catalog/lineCatalog.type.js +7 -0
  76. package/dist/features/network-modifications/line/catalog/segment.utils.d.ts +90 -0
  77. package/dist/features/network-modifications/line/catalog/segment.utils.js +100 -0
  78. package/dist/features/network-modifications/line/characteristics/LineCharacteristicsPane.d.ts +8 -0
  79. package/dist/features/network-modifications/line/characteristics/LineCharacteristicsPane.js +152 -0
  80. package/dist/features/network-modifications/line/characteristics/index.d.ts +9 -0
  81. package/dist/features/network-modifications/line/characteristics/index.js +9 -0
  82. package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.types.d.ts +14 -0
  83. package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.types.js +1 -0
  84. package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.d.ts +52 -0
  85. package/dist/features/network-modifications/line/characteristics/lineCharacteristicsPane.utils.js +53 -0
  86. package/dist/features/network-modifications/line/common/LineDialogHeader.d.ts +6 -0
  87. package/dist/features/network-modifications/line/common/LineDialogHeader.js +103 -0
  88. package/dist/features/network-modifications/line/common/LineDialogTabs.d.ts +9 -0
  89. package/dist/features/network-modifications/line/common/LineDialogTabs.js +61 -0
  90. package/dist/features/network-modifications/line/common/LineDialogTabsContent.d.ts +8 -0
  91. package/dist/features/network-modifications/line/common/LineDialogTabsContent.js +96 -0
  92. package/dist/features/network-modifications/line/common/LineForm.d.ts +6 -0
  93. package/dist/features/network-modifications/line/common/LineForm.js +50 -0
  94. package/dist/features/network-modifications/line/common/index.d.ts +12 -0
  95. package/dist/features/network-modifications/line/common/index.js +13 -0
  96. package/dist/features/network-modifications/line/common/line.types.d.ts +47 -0
  97. package/dist/features/network-modifications/line/common/line.types.js +1 -0
  98. package/dist/features/network-modifications/line/common/line.utils.d.ts +13 -0
  99. package/dist/features/network-modifications/line/common/line.utils.js +34 -0
  100. package/dist/features/network-modifications/line/creation/index.d.ts +8 -0
  101. package/dist/features/network-modifications/line/creation/index.js +7 -0
  102. package/dist/features/network-modifications/line/creation/lineCreation.types.d.ts +39 -0
  103. package/dist/features/network-modifications/line/creation/lineCreation.types.js +1 -0
  104. package/dist/features/network-modifications/line/creation/lineCreation.utils.d.ts +151 -0
  105. package/dist/features/network-modifications/line/creation/lineCreation.utils.js +172 -0
  106. package/dist/features/network-modifications/line/index.d.ts +10 -0
  107. package/dist/features/network-modifications/line/index.js +37 -0
  108. package/dist/features/network-modifications/load/common/LoadDialogHeader.js +3 -0
  109. package/dist/features/network-modifications/load/modification/loadModification.utils.js +3 -0
  110. package/dist/features/network-modifications/shunt-compensator/common/CharacteristicsForm.js +7 -6
  111. package/dist/features/network-modifications/shunt-compensator/creation/ShuntCompensatorCreationForm.js +3 -0
  112. package/dist/features/network-modifications/shunt-compensator/creation/shuntCompensatorCreation.utils.js +3 -0
  113. package/dist/features/network-modifications/shunt-compensator/modification/ShuntCompensatorModificationForm.js +3 -0
  114. package/dist/features/network-modifications/shunt-compensator/modification/shuntCompensatorModification.utils.js +3 -0
  115. package/dist/features/network-modifications/substation/creation/SubstationCreationForm.js +3 -0
  116. package/dist/features/network-modifications/substation/modification/SubstationModificationForm.js +3 -0
  117. package/dist/features/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +3 -0
  118. package/dist/features/network-modifications/voltageLevel/creation/index.js +3 -0
  119. package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationCreationSection.js +3 -0
  120. package/dist/features/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js +3 -0
  121. package/dist/features/network-modifications/voltageLevel/index.js +3 -0
  122. package/dist/features/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js +4 -1
  123. package/dist/features/parameters/common/contingency-table/contingency-table.js +22 -10
  124. package/dist/features/parameters/common/contingency-table/types.d.ts +7 -8
  125. package/dist/features/parameters/common/contingency-table/utils.d.ts +13 -0
  126. package/dist/features/parameters/common/contingency-table/utils.js +31 -0
  127. package/dist/features/parameters/loadflow/load-flow-general-parameters.js +5 -1
  128. package/dist/features/parameters/security-analysis/security-analysis-parameters-form.js +19 -31
  129. package/dist/hooks/useModificationLabelComputer.js +1 -0
  130. package/dist/index.js +87 -7
  131. package/dist/translations/en/index.d.ts +0 -1
  132. package/dist/translations/en/index.js +0 -2
  133. package/dist/translations/en/networkModificationsEn.d.ts +28 -0
  134. package/dist/translations/en/networkModificationsEn.js +28 -0
  135. package/dist/translations/en/parameters.d.ts +3 -1
  136. package/dist/translations/en/parameters.js +3 -1
  137. package/dist/translations/fr/index.d.ts +0 -1
  138. package/dist/translations/fr/index.js +0 -2
  139. package/dist/translations/fr/networkModificationsFr.d.ts +28 -0
  140. package/dist/translations/fr/networkModificationsFr.js +28 -0
  141. package/dist/translations/fr/parameters.d.ts +3 -1
  142. package/dist/translations/fr/parameters.js +3 -1
  143. package/dist/utils/constants/fieldConstants.d.ts +47 -1
  144. package/dist/utils/constants/fieldConstants.js +46 -0
  145. package/dist/utils/types/modificationType.d.ts +4 -0
  146. package/dist/utils/types/modificationType.js +5 -0
  147. package/package.json +11 -4
  148. package/dist/translations/en/inputsEn.d.ts +0 -24
  149. package/dist/translations/en/inputsEn.js +0 -21
  150. package/dist/translations/fr/inputsFr.d.ts +0 -24
  151. package/dist/translations/fr/inputsFr.js +0 -21
package/README.md CHANGED
@@ -20,8 +20,12 @@ Components are organized as follows:
20
20
 
21
21
  #### For developers
22
22
 
23
- The commons-ui library have a demo app in which you can call your components to test them.
24
- The `npm start` command install the library's dependencies then launches the demo app.
23
+ The commons-ui library has a demo app in which you can call your components to test them.
24
+ The `npm start` command installs the library's dependencies then launches the demo app.
25
+
26
+ The commons-ui Storybook is also available at https://www.gridsuite.org/commons-ui/.
27
+ It is the reference place to document and preview reusable UI components from `src/components/ui`.
28
+ When you add a new component under `src/components/ui`, also add the corresponding story so it is available in Storybook.
25
29
 
26
30
  ##### Development Scripts
27
31
 
@@ -35,6 +39,10 @@ This ensures all developers use the project's local tools version from `node_mod
35
39
 
36
40
  - **`npm run prebuild`** - Runs linting and type checking before the build (`npm run lint && npm run type-check:build`). This script is executed automatically by npm before `npm run build` and ensures that the build is not executed if linting or type checking fails. You don't need to call this manually unless you want to verify code quality without building.
37
41
 
42
+ - **`npm run storybook`** - Starts the Storybook development server. Changes to components and stories are reflected automatically during development.
43
+
44
+ - **`npm run build-storybook`** - Builds the static Storybook site. This is useful for verifying the production build or publishing the component documentation. This script is used when storybook.yml action is run.
45
+
38
46
  ##### Local Testing
39
47
 
40
48
  If you want to test your library integration with a consumer application my-app you have first
@@ -227,7 +227,7 @@ function ExplicitNamingFilterForm({
227
227
  CsvPicker,
228
228
  {
229
229
  label: "UploadCSV",
230
- header: csvFileHeaders,
230
+ requiredColumns: csvFileHeaders,
231
231
  language: language ?? LANG_SYSTEM,
232
232
  disabled: !watchEquipmentType,
233
233
  selectedFile,
@@ -2,8 +2,9 @@ import { PropsWithChildren, ReactNode } from 'react';
2
2
  import { Grid2Props } from '@mui/material';
3
3
  export interface GridItemProps extends PropsWithChildren {
4
4
  size?: Grid2Props['size'];
5
+ offset?: Grid2Props['offset'];
5
6
  alignItem?: string;
6
7
  tooltip?: ReactNode;
7
8
  sx?: Grid2Props['sx'];
8
9
  }
9
- export declare function GridItem({ children, size, alignItem, tooltip, sx }: Readonly<GridItemProps>): import("react").JSX.Element;
10
+ export declare function GridItem({ children, size, offset, alignItem, tooltip, sx, }: Readonly<GridItemProps>): import("react").JSX.Element;
@@ -5,8 +5,15 @@ import "../../../utils/conversionUtils.js";
5
5
  import "../../../utils/types/equipmentType.js";
6
6
  import "@mui/icons-material";
7
7
  import { mergeSx } from "../../../utils/styles.js";
8
- function GridItem({ children, size = 6, alignItem = "flex-start", tooltip, sx }) {
9
- return /* @__PURE__ */ jsx(Grid2, { size, sx: mergeSx({ alignItems: alignItem }, sx), children: children && (tooltip ? /* @__PURE__ */ jsx(CustomTooltip, { title: tooltip, children: /* @__PURE__ */ jsx("div", { children }) }) : children) });
8
+ function GridItem({
9
+ children,
10
+ size = 6,
11
+ offset,
12
+ alignItem = "flex-start",
13
+ tooltip,
14
+ sx
15
+ }) {
16
+ return /* @__PURE__ */ jsx(Grid2, { size, offset, sx: mergeSx({ alignItems: alignItem }, sx), children: children && (tooltip ? /* @__PURE__ */ jsx(CustomTooltip, { title: tooltip, children: /* @__PURE__ */ jsx("div", { children }) }) : children) });
10
17
  }
11
18
  export {
12
19
  GridItem
@@ -10,7 +10,12 @@ type CsvPickerCallbacks<TData> = {
10
10
  };
11
11
  export type CsvPickerProps<TData = unknown> = {
12
12
  label: string;
13
- header: string[];
13
+ /**
14
+ * Columns that must be present in the imported file. The file is accepted as soon as it
15
+ * contains every column listed here, in any order; any column that matches none of them is
16
+ * ignored (not rejected). Pass an empty array to accept any header.
17
+ */
18
+ requiredColumns: string[];
14
19
  maxLineNumber?: number;
15
20
  disabled?: boolean;
16
21
  language: string;
@@ -20,5 +25,5 @@ export type CsvPickerProps<TData = unknown> = {
20
25
  onFileError: (error: string | undefined) => void;
21
26
  getTableData?: () => unknown[];
22
27
  } & CsvPickerCallbacks<TData>;
23
- export declare function CsvPicker<TData = unknown>({ label, header, maxLineNumber, disabled, language, parseConfig, selectedFile, onFileChange, onFileError, onComplete, onAppend, onReplace, getTableData, }: CsvPickerProps<TData>): import("react").JSX.Element;
28
+ export declare function CsvPicker<TData = unknown>({ label, requiredColumns, maxLineNumber, disabled, language, parseConfig, selectedFile, onFileChange, onFileError, onComplete, onAppend, onReplace, getTableData, }: CsvPickerProps<TData>): import("react").JSX.Element;
24
29
  export {};
@@ -3,7 +3,6 @@ import { useState, useCallback } from "react";
3
3
  import { useIntl, FormattedMessage } from "react-intl";
4
4
  import { Button } from "@mui/material";
5
5
  import { useCSVReader } from "react-papaparse";
6
- import { equalsArrayAnyOrder } from "../../../utils/algos.js";
7
6
  import "../../../utils/conversionUtils.js";
8
7
  import "../../../utils/types/equipmentType.js";
9
8
  import { hasNonEmptyRows } from "../../../utils/functions.js";
@@ -12,7 +11,7 @@ import "@mui/icons-material";
12
11
  import { CsvPickerConfirmationDialog } from "./csv-picker-confirmation-dialog.js";
13
12
  function CsvPicker({
14
13
  label,
15
- header,
14
+ requiredColumns,
16
15
  maxLineNumber,
17
16
  disabled = false,
18
17
  language,
@@ -30,12 +29,14 @@ function CsvPicker({
30
29
  const [pendingImport, setPendingImport] = useState(null);
31
30
  const handleUploadAccepted = useCallback(
32
31
  (results, acceptedFile) => {
32
+ const actualHeader = Object.keys(results.data[0] ?? {});
33
+ const isHeaderValid = requiredColumns.every((column) => actualHeader.includes(column));
33
34
  if (results.data.length === 0) {
34
35
  onFileError(intl.formatMessage({ id: "noDataInCsvFile" }, { filename: acceptedFile.name }));
35
- } else if (!equalsArrayAnyOrder(header, Object.keys(results.data[0]))) {
36
+ } else if (!isHeaderValid) {
36
37
  console.warn("Wrong CSV headers");
37
- console.warn("Expected:", header);
38
- console.warn("Actual:", Object.keys(results.data[0]));
38
+ console.warn("Required:", requiredColumns);
39
+ console.warn("Actual:", actualHeader);
39
40
  onFileError(intl.formatMessage({ id: "wrongCsvHeadersError" }, { filename: acceptedFile.name }));
40
41
  } else if (maxLineNumber && results.data.length > maxLineNumber) {
41
42
  onFileError(
@@ -59,7 +60,7 @@ function CsvPicker({
59
60
  }
60
61
  }
61
62
  },
62
- [header, intl, maxLineNumber, onAppend, onComplete, onFileChange, onFileError, onReplace, getTableData]
63
+ [requiredColumns, intl, maxLineNumber, onAppend, onComplete, onFileChange, onFileError, onReplace, getTableData]
63
64
  );
64
65
  return /* @__PURE__ */ jsxs(Fragment, { children: [
65
66
  /* @__PURE__ */ jsx(
@@ -1,5 +1,5 @@
1
1
  import { AutocompleteProps } from '@mui/material';
2
- interface CheckboxAutocompleteProps<Value> extends Omit<AutocompleteProps<Value, true, false, false>, 'limitTags' | 'multiple' | 'ListboxComponent' | 'renderInput' | 'renderOption' | 'inputValue' | 'onChange' | 'onBlur'> {
2
+ export interface CheckboxAutocompleteProps<Value> extends Omit<AutocompleteProps<Value, true, false, false>, 'limitTags' | 'multiple' | 'ListboxComponent' | 'renderInput' | 'renderOption' | 'inputValue' | 'onChange' | 'onBlur'> {
3
3
  id?: string;
4
4
  virtualize?: boolean;
5
5
  maxSelection?: number;
@@ -9,4 +9,3 @@ interface CheckboxAutocompleteProps<Value> extends Omit<AutocompleteProps<Value,
9
9
  onChange: (value: Value[]) => void;
10
10
  }
11
11
  export declare function CheckboxAutocomplete<Value>({ id, virtualize, maxSelection, options, getOptionLabel, onChange, ...otherProps }: Readonly<CheckboxAutocompleteProps<Value>>): import("react").JSX.Element;
12
- export {};
@@ -74,14 +74,14 @@ import { PropertyForm } from "./network-modifications/common/properties/Property
74
74
  import { copyEquipmentPropertiesForCreation, createPropertyModification, creationPropertiesSchema, emptyProperties, fetchPredefinedProperties, getConcatenatedProperties, getFilledPropertiesFromModification, getPropertiesFromModification, getPropertyValue, initializedProperty, mergeModificationAndEquipmentProperties, modificationPropertiesSchema, toModificationProperties } from "./network-modifications/common/properties/propertyUtils.js";
75
75
  import { getPowerWithValidityEditData, getPowerWithValidityEmptyFormData, getPowerWithValidityValidationSchema } from "./network-modifications/common/measurements/powerWithValidity.utils.js";
76
76
  import { getInjectionActiveReactivePowerEditData, getInjectionActiveReactivePowerEditDataProperties, getInjectionActiveReactivePowerEmptyFormData, getInjectionActiveReactivePowerEmptyFormDataProperties, getInjectionActiveReactivePowerValidationSchema, getInjectionActiveReactivePowerValidationSchemaProperties } from "./network-modifications/common/measurements/injectionActiveReactivePowerForm.utils.js";
77
- import { getBranchActiveReactivePowerEditData, getBranchActiveReactivePowerEditDataProperties, getBranchActiveReactivePowerEmptyFormData, getBranchActiveReactivePowerEmptyFormDataProperties, getBranchActiveReactivePowerValidationSchema, getBranchActiveReactivePowerValidationSchemaProperties } from "./network-modifications/common/measurements/branchActiveReactivePowerForm.utils.js";
77
+ import { getBranchActiveReactivePowerEditData, getBranchActiveReactivePowerEditDataProperties, getBranchActiveReactivePowerEmptyFormData, getBranchActiveReactivePowerEmptyFormDataProperties, getBranchActiveReactivePowerValidationSchema, getBranchActiveReactivePowerValidationSchemaObject, getBranchActiveReactivePowerValidationSchemaProperties } from "./network-modifications/common/measurements/branchActiveReactivePowerForm.utils.js";
78
78
  import { PowerWithValidityForm } from "./network-modifications/common/measurements/PowerWithValidityForm.js";
79
79
  import { PowerMeasurementsForm } from "./network-modifications/common/measurements/PowerMeasurementsForm.js";
80
80
  import { BranchActiveReactivePowerMeasurementsForm } from "./network-modifications/common/measurements/BranchActiveReactivePowerMeasurementsForm.js";
81
81
  import { BusbarSectionVoltageMeasurementsForm } from "./network-modifications/common/measurements/BusbarSectionVoltageMeasurementsForm.js";
82
82
  import { getActivePowerSetPointSchema, getReactivePowerSetPointSchema, getSetPointsEmptyFormData, getSetPointsSchema, testValueWithinPowerInterval } from "./network-modifications/common/setpoints/setPoints.utils.js";
83
83
  import { SetPointsForm } from "./network-modifications/common/setpoints/SetPointsForm.js";
84
- import { createConnectivityData, getCon1andCon2WithPositionValidationSchema, getConnectivityBusBarSectionData, getConnectivityData, getConnectivityFormData, getConnectivityFormDataProps, getConnectivityPropertiesData, getConnectivityPropertiesEmptyFormData, getConnectivityPropertiesValidationSchema, getConnectivityVoltageLevelData, getConnectivityWithPositionEmptyFormData, getConnectivityWithPositionEmptyFormDataProps, getConnectivityWithPositionSchema, getConnectivityWithPositionValidationSchema, getConnectivityWithoutPositionEmptyFormData, getConnectivityWithoutPositionValidationSchema, getCont1Cont2WithPositionEmptyFormData, getNewVoltageLevelData } from "./network-modifications/common/connectivity/connectivityForm.utils.js";
84
+ import { createConnectivityData, getBranchConnectivityWithPositionEmptyFormDataProps, getBranchConnectivityWithPositionSchema, getCon1andCon2WithPositionValidationSchema, getConnectivityBusBarSectionData, getConnectivityData, getConnectivityFormData, getConnectivityFormDataProps, getConnectivityPropertiesData, getConnectivityPropertiesEmptyFormData, getConnectivityPropertiesValidationSchema, getConnectivityVoltageLevelData, getConnectivityWithPositionEmptyFormData, getConnectivityWithPositionEmptyFormDataProps, getConnectivityWithPositionSchema, getConnectivityWithPositionValidationSchema, getConnectivityWithoutPositionEmptyFormData, getConnectivityWithoutPositionValidationSchema, getCont1Cont2WithPositionEmptyFormData, getNewVoltageLevelData } from "./network-modifications/common/connectivity/connectivityForm.utils.js";
85
85
  import { ConnectivityForm } from "./network-modifications/common/connectivity/ConnectivityForm.js";
86
86
  import { BranchConnectivityForm } from "./network-modifications/common/connectivity/BranchConnectivityForm.js";
87
87
  import { VoltageLevelConnectivityForm } from "./network-modifications/common/connectivity/VoltageLevelConnectivityForm.js";
@@ -98,6 +98,19 @@ import { RegulatingTerminalForm } from "./network-modifications/common/regulatin
98
98
  import { getRegulatingTerminalEmptyFormData, getRegulatingTerminalEquipmentData, getRegulatingTerminalFormData, getRegulatingTerminalVoltageLevelData } from "./network-modifications/common/regulatingTerminal/regulatingTerminal.utils.js";
99
99
  import { VoltageRegulationForm } from "./network-modifications/common/voltageRegulation/VoltageRegulationForm.js";
100
100
  import { REGULATION_TYPES, getVoltageRegulationEmptyFormData, getVoltageRegulationSchema } from "./network-modifications/common/voltageRegulation/voltageRegulation.utils.js";
101
+ import { APPLICABILITY, TEMPORARY_LIMIT_MODIFICATION_TYPE } from "./network-modifications/common/currentLimits/limits.types.js";
102
+ import { LimitsTagChip, getPropertyAvatar } from "./network-modifications/common/currentLimits/LimitsTagChip.js";
103
+ import { LimitsPane } from "./network-modifications/common/currentLimits/LimitsPane.js";
104
+ import { addModificationTypeToOpLimitsGroups, addModificationTypeToTemporaryLimits, addOperationTypeToSelectedOpLG, convertToOperationalLimitsGroupFormSchema, formatMapInfosToTemporaryLimitsFormSchema, formatOpLimitGroupsToFormInfos, formatTemporaryLimitsModificationToFormSchema, generateEmptyOperationalLimitsGroup, generateUniqueId, getAllLimitsFormData, getAllLimitsFormDataProperties, getLimitsEmptyFormData, getLimitsEmptyFormDataProps, getLimitsValidationSchema, getLimitsValidationSchemaProps, mapServerLimitsGroupsToFormInfos, sanitizeLimitNames, sanitizeLimitsGroups } from "./network-modifications/common/currentLimits/limitsPane.utils.js";
105
+ import { LimitsChart } from "./network-modifications/common/currentLimits/limitsEditor/limitsChart.js";
106
+ import { LimitsPropertiesSideStack } from "./network-modifications/common/currentLimits/limitsEditor/LimitsPropertiesSideStack.js";
107
+ import { LimitsEditor } from "./network-modifications/common/currentLimits/limitsEditor/LimitsEditor.js";
108
+ import { TemporaryLimitsTable } from "./network-modifications/common/currentLimits/limitsEditor/TemporaryLimitsTable.js";
109
+ import { OPERATIONAL_LIMITS_GROUPS_MODIFICATION_TYPE } from "./network-modifications/common/currentLimits/operationalLimitsGroups/operationalLimitsGroups.types.js";
110
+ import { LimitsGroupsContextualMenu } from "./network-modifications/common/currentLimits/operationalLimitsGroups/LimitsGroupsContextualMenu.js";
111
+ import { LimitsPropertiesStack } from "./network-modifications/common/currentLimits/operationalLimitsGroups/LimitsPropertiesStack.js";
112
+ import { OperationalLimitsGroups } from "./network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroups.js";
113
+ import { OperationalLimitsGroupTabLabel } from "./network-modifications/common/currentLimits/operationalLimitsGroups/OperationalLimitsGroupTabLabel.js";
101
114
  import { getHvdcLccDeletionSchema } from "./network-modifications/equipmentDeletion/hvdcLccDeletion/hvdcLccDeletion.utils.js";
102
115
  import { ShuntCompensatorSelectionForm } from "./network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.js";
103
116
  import { useHvdcLccDeletion } from "./network-modifications/equipmentDeletion/hvdcLccDeletion/useHvdcLccDeletion.js";
@@ -182,6 +195,16 @@ import { ShuntCompensatorCreationForm } from "./network-modifications/shunt-comp
182
195
  import { shuntCompensatorCreationDtoToForm, shuntCompensatorCreationEmptyFormData, shuntCompensatorCreationFormSchema, shuntCompensatorCreationFormToDto } from "./network-modifications/shunt-compensator/creation/shuntCompensatorCreation.utils.js";
183
196
  import { ShuntCompensatorModificationForm } from "./network-modifications/shunt-compensator/modification/ShuntCompensatorModificationForm.js";
184
197
  import { shuntCompensatorModificationDtoToForm, shuntCompensatorModificationEmptyFormData, shuntCompensatorModificationFormSchema, shuntCompensatorModificationFormToDto } from "./network-modifications/shunt-compensator/modification/shuntCompensatorModification.utils.js";
198
+ import { getCharacteristicsValidationSchema, getLineCharacteristicsEmptyFormData, getLineCharacteristicsFormData, getLineCharacteristicsValidationSchemaProps } from "./network-modifications/line/characteristics/lineCharacteristicsPane.utils.js";
199
+ import { LineCharacteristicsPane } from "./network-modifications/line/characteristics/LineCharacteristicsPane.js";
200
+ import { CATEGORIES_TABS } from "./network-modifications/line/catalog/lineCatalog.type.js";
201
+ import { LineSegmentsInfoSchema, SegmentCurrentLimitsSchema, SegmentInfoSchema, SegmentSchema, SegmentTemporaryLimitSchema, convertLimitsToOperationalLimitsGroupFormSchema, convertToLineSegmentInfos, convertToLineSegmentsFormData, emptyLineSegment } from "./network-modifications/line/catalog/segment.utils.js";
202
+ import { LINE_TAB_FIELDS, LineDialogTab } from "./network-modifications/line/common/line.utils.js";
203
+ import { LineDialogTabs } from "./network-modifications/line/common/LineDialogTabs.js";
204
+ import { LineDialogTabsContent } from "./network-modifications/line/common/LineDialogTabsContent.js";
205
+ import { LineDialogHeader } from "./network-modifications/line/common/LineDialogHeader.js";
206
+ import { LineForm } from "./network-modifications/line/common/LineForm.js";
207
+ import { lineCreationDtoToForm, lineCreationEmptyFormData, lineCreationFormSchema, lineCreationFormToDto } from "./network-modifications/line/creation/lineCreation.utils.js";
185
208
  import { BuildStatusChip } from "./node/build-status-chip.js";
186
209
  import { BuildStatus } from "./node/constant.js";
187
210
  import { COLUMNS_WITHOUT_BORDER, DEPTH_CELL_WIDTH, DROP_FORBIDDEN_INDICATOR_BOTTOM, DROP_FORBIDDEN_INDICATOR_TOP, DROP_INDICATOR_BOTTOM, DROP_INDICATOR_TOP, MODIFICATION_ROW_HEIGHT, createCellBorderColor, createCellContentWrapperSx, createCellStyle, createEditDescriptionStyle, createHeaderCellStyle, createModificationNameCellStyle, createNameCellLabelBoxSx, createNameCellRootStyle, createRootNetworkChipCellSx, createRowSx, networkModificationTableStyles } from "./network-modification-table/network-modification-table-styles.js";
@@ -200,7 +223,7 @@ import { SelectHeaderCell } from "./network-modification-table/renderers/select-
200
223
  import { SwitchCell } from "./network-modification-table/renderers/switch-cell.js";
201
224
  import { DragCloneRow } from "./network-modification-table/row/drag-row-clone.js";
202
225
  import { ModificationRow } from "./network-modification-table/row/modification-row.js";
203
- import { MAX_COMPOSITE_NESTING_DEPTH, fetchSubModificationsForExpandedRows, findAllLoadedCompositeModifications, findDepth, findModificationInTree, formatToComposedModification, isCompositeModification, mergeSubModificationsIntoTree, moveSubModificationInTree, removeUuidsFromTree, updateModificationFieldInTree, updateSubModificationsOfACompositeInTree } from "./network-modification-table/utils.js";
226
+ import { MAX_COMPOSITE_NESTING_DEPTH, fetchSubModificationsForExpandedRows, findAllLoadedCompositeModifications, findDepth, findModificationInTree, formatToComposedModification, isCompositeModification, isSharedModification, mergeSubModificationsIntoTree, moveSubModificationInTree, removeUuidsFromTree, updateModificationFieldInTree, updateSubModificationsOfACompositeInTree } from "./network-modification-table/utils.js";
204
227
  import { AnnouncementBanner } from "./announcement/AnnouncementBanner.js";
205
228
  import { AnnouncementNotification } from "./announcement/AnnouncementNotification.js";
206
229
  import { useGlobalAnnouncement } from "./announcement/useGlobalAnnouncement.js";
@@ -214,6 +237,7 @@ import { ProcessType } from "./process-configs/process-configs.type.js";
214
237
  export {
215
238
  ACCURACY,
216
239
  ACTIVE,
240
+ APPLICABILITY,
217
241
  AUTO_EXTENSIBLE_COLUMNS,
218
242
  AboutDialog,
219
243
  ActivePowerControlForm,
@@ -238,6 +262,7 @@ export {
238
262
  BusbarSectionVoltageMeasurementsForm,
239
263
  ByFilterDeletionForm,
240
264
  CALCULATION_TYPE,
265
+ CATEGORIES_TABS,
241
266
  CENTER_LABEL,
242
267
  CHARACTERISTICS_CHOICES,
243
268
  COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS,
@@ -323,6 +348,7 @@ export {
323
348
  LIMIT_DURATION_FORM,
324
349
  LIMIT_REDUCTIONS_FORM,
325
350
  LINE_FLOW_MODE,
351
+ LINE_TAB_FIELDS,
326
352
  LOADS_VARIATIONS,
327
353
  LOAD_FILTERS,
328
354
  LOAD_INCREASE_START_TIME,
@@ -334,7 +360,21 @@ export {
334
360
  LimitReductionTableCell,
335
361
  LimitReductionTableRow,
336
362
  LimitReductionsTableForm,
363
+ LimitsChart,
364
+ LimitsEditor,
365
+ LimitsGroupsContextualMenu,
366
+ LimitsPane,
367
+ LimitsPropertiesSideStack,
368
+ LimitsPropertiesStack,
369
+ LimitsTagChip,
370
+ LineCharacteristicsPane,
371
+ LineDialogHeader,
372
+ LineDialogTab,
373
+ LineDialogTabs,
374
+ LineDialogTabsContent,
337
375
  LineFlowMode,
376
+ LineForm,
377
+ LineSegmentsInfoSchema,
338
378
  LineSeparator,
339
379
  LoadDialogHeader,
340
380
  LoadDialogTab,
@@ -378,6 +418,9 @@ export {
378
418
  NmkType,
379
419
  NotificationsContext,
380
420
  NotificationsProvider,
421
+ OPERATIONAL_LIMITS_GROUPS_MODIFICATION_TYPE,
422
+ OperationalLimitsGroupTabLabel,
423
+ OperationalLimitsGroups,
381
424
  PAGE_OPTIONS,
382
425
  PARAM_CENTER_LABEL,
383
426
  PARAM_COMPONENT_LIBRARY,
@@ -463,6 +506,10 @@ export {
463
506
  SecurityAnalysisParametersInline,
464
507
  SecurityAnalysisResultNmk,
465
508
  SecurityAnalysisTable,
509
+ SegmentCurrentLimitsSchema,
510
+ SegmentInfoSchema,
511
+ SegmentSchema,
512
+ SegmentTemporaryLimitSchema,
466
513
  SelectCell,
467
514
  SelectCellRenderer,
468
515
  SelectHeaderCell,
@@ -489,10 +536,12 @@ export {
489
536
  SwitchWithLabel,
490
537
  SwitchesBetweenSections,
491
538
  TAB_INFO,
539
+ TEMPORARY_LIMIT_MODIFICATION_TYPE,
492
540
  TRANSFORMERS_SELECTION_TYPE,
493
541
  TWT_SPLIT_SHUNT_ADMITTANCE,
494
542
  TabPanel,
495
543
  TabValues,
544
+ TemporaryLimitsTable,
496
545
  TopBar,
497
546
  UPDATE_BUS_VOLTAGE,
498
547
  USE_REACTIVE_LIMITS,
@@ -517,6 +566,9 @@ export {
517
566
  VoltageLevelModificationForm,
518
567
  VoltageRegulationForm,
519
568
  WRITE_SLACK_BUS,
569
+ addModificationTypeToOpLimitsGroups,
570
+ addModificationTypeToTemporaryLimits,
571
+ addOperationTypeToSelectedOpLG,
520
572
  alertThresholdMarks,
521
573
  batteryCreationDtoToForm,
522
574
  batteryCreationEmptyFormData,
@@ -532,6 +584,10 @@ export {
532
584
  byFilterDeletionFormToDto,
533
585
  computeSwitchedOnValue,
534
586
  computeTagMinSize,
587
+ convertLimitsToOperationalLimitsGroupFormSchema,
588
+ convertToLineSegmentInfos,
589
+ convertToLineSegmentsFormData,
590
+ convertToOperationalLimitsGroupFormSchema,
535
591
  copyEquipmentPropertiesForCreation,
536
592
  createCellBorderColor,
537
593
  createCellContentWrapperSx,
@@ -548,6 +604,7 @@ export {
548
604
  creationPropertiesSchema,
549
605
  dispatchUser,
550
606
  emptyFormData,
607
+ emptyLineSegment,
551
608
  emptyModificationByAssignmentFormData,
552
609
  emptyProperties,
553
610
  equipmentDeletionDtoToForm,
@@ -563,7 +620,12 @@ export {
563
620
  flattenNmKResultsConstraints,
564
621
  flattenNmKResultsContingencies,
565
622
  formatComputingTypeLabel,
623
+ formatMapInfosToTemporaryLimitsFormSchema,
624
+ formatOpLimitGroupsToFormInfos,
625
+ formatTemporaryLimitsModificationToFormSchema,
566
626
  formatToComposedModification,
627
+ generateEmptyOperationalLimitsGroup,
628
+ generateUniqueId,
567
629
  generatorCreationDtoToForm,
568
630
  generatorCreationEmptyFormData,
569
631
  generatorCreationFormSchema,
@@ -575,16 +637,22 @@ export {
575
637
  getActivePowerControlEmptyFormData,
576
638
  getActivePowerControlSchema,
577
639
  getActivePowerSetPointSchema,
640
+ getAllLimitsFormData,
641
+ getAllLimitsFormDataProperties,
578
642
  getBranchActiveReactivePowerEditData,
579
643
  getBranchActiveReactivePowerEditDataProperties,
580
644
  getBranchActiveReactivePowerEmptyFormData,
581
645
  getBranchActiveReactivePowerEmptyFormDataProperties,
582
646
  getBranchActiveReactivePowerValidationSchema,
647
+ getBranchActiveReactivePowerValidationSchemaObject,
583
648
  getBranchActiveReactivePowerValidationSchemaProperties,
649
+ getBranchConnectivityWithPositionEmptyFormDataProps,
650
+ getBranchConnectivityWithPositionSchema,
584
651
  getCharacteristicsCreateFormDataFromSearchCopy,
585
652
  getCharacteristicsEmptyFormData,
586
653
  getCharacteristicsFormData,
587
654
  getCharacteristicsFormValidationSchema,
655
+ getCharacteristicsValidationSchema,
588
656
  getCon1andCon2WithPositionValidationSchema,
589
657
  getConcatenatedProperties,
590
658
  getConnectivityBusBarSectionData,
@@ -614,6 +682,13 @@ export {
614
682
  getInjectionActiveReactivePowerValidationSchema,
615
683
  getInjectionActiveReactivePowerValidationSchemaProperties,
616
684
  getLimitReductionsFormSchema,
685
+ getLimitsEmptyFormData,
686
+ getLimitsEmptyFormDataProps,
687
+ getLimitsValidationSchema,
688
+ getLimitsValidationSchemaProps,
689
+ getLineCharacteristicsEmptyFormData,
690
+ getLineCharacteristicsFormData,
691
+ getLineCharacteristicsValidationSchemaProps,
617
692
  getNewVoltageLevelData,
618
693
  getNoRowsMessage,
619
694
  getPowerWithValidityEditData,
@@ -621,6 +696,7 @@ export {
621
696
  getPowerWithValidityValidationSchema,
622
697
  getPreLoginPath,
623
698
  getPropertiesFromModification,
699
+ getPropertyAvatar,
624
700
  getPropertyValue,
625
701
  getReactiveCapabilityCurveValidationSchema,
626
702
  getReactiveCapabilityCurveValidationSchemaArray,
@@ -655,9 +731,14 @@ export {
655
731
  intlPredefinedParametersOptions,
656
732
  isCompositeModification,
657
733
  isProcessType,
734
+ isSharedModification,
658
735
  isValidComputingType,
659
736
  isValidContingencyRow,
660
737
  italicFontTextField,
738
+ lineCreationDtoToForm,
739
+ lineCreationEmptyFormData,
740
+ lineCreationFormSchema,
741
+ lineCreationFormToDto,
661
742
  loadCreationDtoToForm,
662
743
  loadCreationEmptyFormData,
663
744
  loadCreationFormSchema,
@@ -669,6 +750,7 @@ export {
669
750
  login,
670
751
  logout,
671
752
  mapNmKResultsCutOffPower,
753
+ mapServerLimitsGroupsToFormInfos,
672
754
  mergeModificationAndEquipmentProperties,
673
755
  mergeSubModificationsIntoTree,
674
756
  modificationByAssignmentDtoToForm,
@@ -680,6 +762,8 @@ export {
680
762
  newEquipmentDeletionDto,
681
763
  onlyStartedGeneratorsOptions,
682
764
  removeUuidsFromTree,
765
+ sanitizeLimitNames,
766
+ sanitizeLimitsGroups,
683
767
  sanitizePercentageValue,
684
768
  setCurrentReactiveCapabilityCurveTable,
685
769
  setSelectedReactiveLimits,
@@ -14,7 +14,7 @@ import { SelectHeaderCell } from "./renderers/select-header-cell.js";
14
14
  import { SwitchCell } from "./renderers/switch-cell.js";
15
15
  import { DragCloneRow } from "./row/drag-row-clone.js";
16
16
  import { ModificationRow } from "./row/modification-row.js";
17
- import { MAX_COMPOSITE_NESTING_DEPTH, fetchSubModificationsForExpandedRows, findAllLoadedCompositeModifications, findDepth, findModificationInTree, formatToComposedModification, isCompositeModification, mergeSubModificationsIntoTree, moveSubModificationInTree, removeUuidsFromTree, updateModificationFieldInTree, updateSubModificationsOfACompositeInTree } from "./utils.js";
17
+ import { MAX_COMPOSITE_NESTING_DEPTH, fetchSubModificationsForExpandedRows, findAllLoadedCompositeModifications, findDepth, findModificationInTree, formatToComposedModification, isCompositeModification, isSharedModification, mergeSubModificationsIntoTree, moveSubModificationInTree, removeUuidsFromTree, updateModificationFieldInTree, updateSubModificationsOfACompositeInTree } from "./utils.js";
18
18
  export {
19
19
  AUTO_EXTENSIBLE_COLUMNS,
20
20
  BASE_MODIFICATION_TABLE_COLUMNS,
@@ -64,6 +64,7 @@ export {
64
64
  findModificationInTree,
65
65
  formatToComposedModification,
66
66
  isCompositeModification,
67
+ isSharedModification,
67
68
  mergeSubModificationsIntoTree,
68
69
  moveSubModificationInTree,
69
70
  networkModificationTableStyles,
@@ -7,7 +7,7 @@ import "@hello-pangea/dnd";
7
7
  import "react-intl";
8
8
  import "./columns-definition.js";
9
9
  import { DROP_FORBIDDEN_INDICATOR_BOTTOM, DROP_FORBIDDEN_INDICATOR_TOP, DROP_INDICATOR_BOTTOM, DROP_INDICATOR_TOP } from "./network-modification-table-styles.js";
10
- import { isCompositeModification, MAX_COMPOSITE_NESTING_DEPTH, findModificationInTree, moveSubModificationInTree } from "./utils.js";
10
+ import { isCompositeModification, MAX_COMPOSITE_NESTING_DEPTH, findModificationInTree, isSharedModification, moveSubModificationInTree } from "./utils.js";
11
11
  import "../../utils/conversionUtils.js";
12
12
  import { snackWithFallback } from "../../utils/error.js";
13
13
  import "../../utils/types/equipmentType.js";
@@ -70,6 +70,7 @@ const useModificationsDragAndDrop = ({
70
70
  const targetDepth = computeTargetDepth(sourceRow, targetRow);
71
71
  return (sourceRow.original.maxDepth ?? 0) + targetDepth > MAX_COMPOSITE_NESTING_DEPTH || !!(isCompositeModification(sourceRow.original) && findModificationInTree(targetRow.original.uuid, [sourceRow.original]));
72
72
  }
73
+ if (isSharedModification(sourceRow.original)) return true;
73
74
  return false;
74
75
  },
75
76
  [computeTargetDepth]
@@ -4,6 +4,7 @@ import { ComposedModificationMetadata, NetworkModificationMetadata } from '../..
4
4
  export declare const MAX_COMPOSITE_NESTING_DEPTH = 5;
5
5
  export declare const formatToComposedModification: (modifications: NetworkModificationMetadata[]) => ComposedModificationMetadata[];
6
6
  export declare function isCompositeModification(modification: ComposedModificationMetadata | undefined): boolean;
7
+ export declare function isSharedModification(modification: ComposedModificationMetadata | undefined): boolean;
7
8
  export declare function findDepth(mods: ComposedModificationMetadata[], uuid: UUID, currentDepth?: number): number;
8
9
  export declare function removeUuidsFromTree(mods: ComposedModificationMetadata[], uuidsToRemove: Set<string>): ComposedModificationMetadata[];
9
10
  /**
@@ -9,7 +9,10 @@ const formatToComposedModification = (modifications) => {
9
9
  return modifications.map((modification) => ({ ...modification, subModifications: [] }));
10
10
  };
11
11
  function isCompositeModification(modification) {
12
- return modification?.messageType === MODIFICATION_TYPES.COMPOSITE_MODIFICATION.type;
12
+ return modification?.type === MODIFICATION_TYPES.COMPOSITE_MODIFICATION.type;
13
+ }
14
+ function isSharedModification(modification) {
15
+ return modification?.type === MODIFICATION_TYPES.MODIFICATION_REFERENCE.type;
13
16
  }
14
17
  function findDepth(mods, uuid, currentDepth = 0) {
15
18
  for (const mod of mods) {
@@ -174,6 +177,7 @@ export {
174
177
  findModificationInTree,
175
178
  formatToComposedModification,
176
179
  isCompositeModification,
180
+ isSharedModification,
177
181
  mergeSubModificationsIntoTree,
178
182
  moveSubModificationInTree,
179
183
  removeUuidsFromTree,
@@ -71,6 +71,9 @@ import { ActivePowerControlForm } from "../../common/activePowerControl/ActivePo
71
71
  import { ShortCircuitForm } from "../../common/shortCircuit/ShortCircuitForm.js";
72
72
  import { ReactiveLimitsForm } from "../../common/reactiveLimits/ReactiveLimitsForm.js";
73
73
  import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
74
+ import "@mui/material/colors";
75
+ import "@mui/x-charts";
76
+ import "../../common/currentLimits/limitsPane.utils.js";
74
77
  function BatteryCreationForm({
75
78
  voltageLevelOptions,
76
79
  fetchBusesOrBusbarSections,
@@ -66,6 +66,9 @@ 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 "@mui/material/colors";
70
+ import "@mui/x-charts";
71
+ import "../../common/currentLimits/limitsPane.utils.js";
69
72
  const batteryCreationFormSchema = object().shape({
70
73
  [FieldConstants.EQUIPMENT_ID]: string().required(),
71
74
  [FieldConstants.EQUIPMENT_NAME]: string().nullable(),
@@ -61,6 +61,9 @@ import "react-window";
61
61
  import "../../../../components/composite/report/report-treeview/treeview-item.js";
62
62
  import "../../../../components/composite/report/report-viewer/context/report-viewer-context.js";
63
63
  import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
64
+ import "@mui/material/colors";
65
+ import "@mui/x-charts";
66
+ import "../../common/currentLimits/limitsPane.utils.js";
64
67
  function BatteryDialogHeader({ batteryToModify, equipmentId }) {
65
68
  return /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, children: [
66
69
  /* @__PURE__ */ jsx(Grid2, { size: 4, children: /* @__PURE__ */ jsx(
@@ -70,6 +70,9 @@ import { ActivePowerControlForm } from "../../common/activePowerControl/ActivePo
70
70
  import { ShortCircuitForm } from "../../common/shortCircuit/ShortCircuitForm.js";
71
71
  import { ReactiveLimitsForm } from "../../common/reactiveLimits/ReactiveLimitsForm.js";
72
72
  import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
73
+ import "@mui/material/colors";
74
+ import "@mui/x-charts";
75
+ import "../../common/currentLimits/limitsPane.utils.js";
73
76
  function BatteryDialogTabsContent({
74
77
  batteryToModify,
75
78
  updatePreviousReactiveCapabilityCurveTable,
@@ -67,6 +67,9 @@ import { getActivePowerControlSchema, getActivePowerControlEmptyFormData } from
67
67
  import { getShortCircuitFormSchema, getShortCircuitEmptyFormData, getShortCircuitFormData } from "../../common/shortCircuit/shortCircuitForm.utils.js";
68
68
  import { getReactiveLimitsValidationSchema, getReactiveLimitsEmptyFormDataProps, getReactiveLimitsFormDataProps } from "../../common/reactiveLimits/reactiveLimits.utils.js";
69
69
  import "../../common/regulatingTerminal/RegulatingTerminalForm.js";
70
+ import "@mui/material/colors";
71
+ import "@mui/x-charts";
72
+ import "../../common/currentLimits/limitsPane.utils.js";
70
73
  const batteryModificationFormSchema = object().shape({
71
74
  [FieldConstants.EQUIPMENT_ID]: string().required(),
72
75
  [FieldConstants.EQUIPMENT_NAME]: string().nullable(),
@@ -1,6 +1,6 @@
1
1
  import { VoltageLevelFormInfos } from '../../voltageLevel/voltage-level.type';
2
2
  import { FieldConstants } from '../../../../utils';
3
- export declare const getConnectivityPropertiesValidationSchema: (isEquipmentModification?: boolean) => {
3
+ export declare const getConnectivityPropertiesValidationSchema: (isEquipmentModification?: boolean, displayConnectivity?: boolean) => {
4
4
  voltageLevel: import('yup').ObjectSchema<{
5
5
  id: string | undefined;
6
6
  } | null, import('yup').AnyObject, {
@@ -12,7 +12,7 @@ export declare const getConnectivityPropertiesValidationSchema: (isEquipmentModi
12
12
  id: undefined;
13
13
  }, "">;
14
14
  };
15
- export declare const getConnectivityWithPositionSchema: (isEquipmentModification?: boolean) => import('yup').ObjectSchema<{
15
+ export declare const getConnectivityWithPositionSchema: (isEquipmentModification?: boolean, displayConnectivity?: boolean) => import('yup').ObjectSchema<{
16
16
  voltageLevel: {
17
17
  id?: string | undefined;
18
18
  } | null;
@@ -60,6 +60,57 @@ export declare const getConnectivityWithPositionValidationSchema: (isEquipmentMo
60
60
  terminalConnected: undefined;
61
61
  }, "">;
62
62
  };
63
+ export declare const getBranchConnectivityWithPositionSchema: (isEquipmentModification: boolean, displayConnectivity: boolean) => import('yup').ObjectSchema<{
64
+ connectivity1: {
65
+ terminalConnected?: boolean | null | undefined;
66
+ connectionDirection?: string | null | undefined;
67
+ connectionName?: string | undefined;
68
+ connectionPosition?: number | null | undefined;
69
+ busOrBusbarSection: {
70
+ id?: string | undefined;
71
+ } | null;
72
+ voltageLevel: {
73
+ id?: string | undefined;
74
+ } | null;
75
+ };
76
+ connectivity2: {
77
+ terminalConnected?: boolean | null | undefined;
78
+ connectionDirection?: string | null | undefined;
79
+ connectionName?: string | undefined;
80
+ connectionPosition?: number | null | undefined;
81
+ busOrBusbarSection: {
82
+ id?: string | undefined;
83
+ } | null;
84
+ voltageLevel: {
85
+ id?: string | undefined;
86
+ } | null;
87
+ };
88
+ }, import('yup').AnyObject, {
89
+ connectivity1: {
90
+ voltageLevel: {
91
+ id: undefined;
92
+ };
93
+ busOrBusbarSection: {
94
+ id: undefined;
95
+ };
96
+ connectionDirection: undefined;
97
+ connectionName: undefined;
98
+ connectionPosition: undefined;
99
+ terminalConnected: undefined;
100
+ };
101
+ connectivity2: {
102
+ voltageLevel: {
103
+ id: undefined;
104
+ };
105
+ busOrBusbarSection: {
106
+ id: undefined;
107
+ };
108
+ connectionDirection: undefined;
109
+ connectionName: undefined;
110
+ connectionPosition: undefined;
111
+ terminalConnected: undefined;
112
+ };
113
+ }, "">;
63
114
  export declare const getCon1andCon2WithPositionValidationSchema: (isEquipmentModification?: boolean, id?: FieldConstants) => {
64
115
  [x: string]: import('yup').ObjectSchema<{
65
116
  [x: string]: {
@@ -119,6 +170,24 @@ export declare const getConnectivityWithPositionEmptyFormDataProps: (isEquipment
119
170
  busOrBusbarSection: null;
120
171
  terminalConnected: boolean | null;
121
172
  };
173
+ export declare const getBranchConnectivityWithPositionEmptyFormDataProps: (isEquipmentModification?: boolean) => {
174
+ connectivity1: {
175
+ connectionDirection: null;
176
+ connectionName: string;
177
+ connectionPosition: null;
178
+ voltageLevel: null;
179
+ busOrBusbarSection: null;
180
+ terminalConnected: boolean | null;
181
+ };
182
+ connectivity2: {
183
+ connectionDirection: null;
184
+ connectionName: string;
185
+ connectionPosition: null;
186
+ voltageLevel: null;
187
+ busOrBusbarSection: null;
188
+ terminalConnected: boolean | null;
189
+ };
190
+ };
122
191
  export declare const getConnectivityWithPositionEmptyFormData: (isEquipmentModification?: boolean, id?: FieldConstants) => {
123
192
  [x: string]: {
124
193
  connectionDirection: null;