@gridsuite/commons-ui 0.295.0 → 0.297.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 (93) hide show
  1. package/dist/components/composite/agGridTable/BottomTableButtons.js +56 -44
  2. package/dist/components/composite/customAGGrid/custom-aggrid-filters/custom-aggrid-comparator-filter.js +32 -23
  3. package/dist/components/composite/customAGGrid/custom-aggrid-filters/custom-aggrid-text-filter.js +31 -23
  4. package/dist/components/composite/customAGGrid/custom-aggrid-header.js +67 -43
  5. package/dist/components/composite/elementSearch/elementSearchInput/ElementSearchInput.d.ts +3 -2
  6. package/dist/components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js +43 -28
  7. package/dist/components/composite/reactQueryBuilder/CustomReactQueryBuilder.js +4 -7
  8. package/dist/components/composite/reactQueryBuilder/FieldSelector.js +5 -3
  9. package/dist/components/composite/reactQueryBuilder/PropertyValueEditor.js +63 -52
  10. package/dist/components/composite/reactQueryBuilder/compositeRuleEditor/GroupValueEditor.js +22 -9
  11. package/dist/components/composite/reactQueryBuilder/compositeRuleEditor/RuleValueEditor.js +59 -24
  12. package/dist/components/ui/csvPicker/csv-picker.js +24 -12
  13. package/dist/components/ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js +15 -7
  14. package/dist/components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js +82 -39
  15. package/dist/components/ui/dialogs/modifyElementSelection/ModifyElementSelection.js +29 -9
  16. package/dist/components/ui/dialogs/name-element-editor/name-element-editor-form.js +24 -15
  17. package/dist/components/ui/inputs/ActivableChip.js +2 -2
  18. package/dist/components/ui/inputs/SelectClearable.js +4 -3
  19. package/dist/components/ui/reactHookForm/DirectoryItemsInput.js +1 -1
  20. package/dist/components/ui/reactHookForm/OverflowableChip.js +24 -13
  21. package/dist/components/ui/reactHookForm/OverflowableChipWithHelperText.js +9 -4
  22. package/dist/components/ui/reactHookForm/autocompleteInputs/AutocompleteInput.js +11 -5
  23. package/dist/components/ui/reactHookForm/directory-item-input/directory-item-input.js +13 -3
  24. package/dist/components/ui/reactHookForm/expandableInput/DeletableRow.js +3 -1
  25. package/dist/components/ui/reactHookForm/utils/HelperPreviousValue.js +11 -1
  26. package/dist/features/authentication/AuthenticationRouter.js +62 -53
  27. package/dist/features/authentication/Login.js +15 -7
  28. package/dist/features/authentication/Logout.js +9 -1
  29. package/dist/features/cardErrorBoundary/CardErrorBoundary.js +28 -10
  30. package/dist/features/global-filter/ui/global-filter-panel.js +4 -10
  31. package/dist/features/network-modifications/battery/creation/BatteryCreationForm.js +22 -12
  32. package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.js +21 -11
  33. package/dist/features/network-modifications/by-filter/deletion/ByFilterDeletionForm.js +35 -25
  34. package/dist/features/network-modifications/common/currentLimits/LimitsPane.js +28 -16
  35. package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsEditor.js +16 -4
  36. package/dist/features/network-modifications/common/currentLimits/limitsEditor/LimitsPropertiesSideStack.js +81 -68
  37. package/dist/features/network-modifications/common/measurements/BusbarSectionVoltageMeasurementsForm.js +31 -21
  38. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveTableForm.js +32 -21
  39. package/dist/features/network-modifications/common/regulatingTerminal/RegulatingTerminalForm.d.ts +1 -1
  40. package/dist/features/network-modifications/common/regulatingTerminal/RegulatingTerminalForm.js +1 -1
  41. package/dist/features/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.js +20 -9
  42. package/dist/features/network-modifications/generator/creation/GeneratorCreationForm.js +22 -12
  43. package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.js +28 -18
  44. package/dist/features/network-modifications/hvdcLine/vsc/common/converterStation/VscConverterStationPane.js +15 -4
  45. package/dist/features/network-modifications/hvdcLine/vsc/creation/vscHvdcLineCreation.utils.js +2 -2
  46. package/dist/features/network-modifications/hvdcLine/vsc/modification/vscHvdcLineModification.utils.js +7 -4
  47. package/dist/features/network-modifications/static-var-compensator/common/set-points-limits-form.js +70 -40
  48. package/dist/features/network-modifications/static-var-compensator/common/standby-automaton-form.js +35 -6
  49. package/dist/features/network-modifications/static-var-compensator/common/static-var-compensator-tabs-content.js +16 -7
  50. package/dist/features/network-modifications/tabular/TabularForm.js +102 -72
  51. package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js +20 -10
  52. package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.js +35 -17
  53. package/dist/features/network-modifications/voltageLevel/moveFeederBays/MoveVoltageLevelFeederBaysForm.js +9 -1
  54. package/dist/features/network-modifications/voltageLevel/moveFeederBays/feederBay/FeederBayPositionCellRender.js +6 -4
  55. package/dist/features/network-modifications/voltageLevel/section/VoltageLevelSectionCreationForm.js +17 -7
  56. package/dist/features/network-modifications/voltageLevel/topology/creation/CreateVoltageLevelTopologyForm.js +23 -13
  57. package/dist/features/network-modifications/voltageLevel/topology/modification/VoltageLevelTopologyModificationForm.js +25 -15
  58. package/dist/features/parameters/common/parameter-field.js +17 -4
  59. package/dist/features/parameters/common/parameter-table-field/parameter-table-field.js +23 -12
  60. package/dist/features/parameters/common/provider-param.js +1 -1
  61. package/dist/features/parameters/common/widget/parameter-float.js +16 -4
  62. package/dist/features/parameters/common/widget/parameter-line-directory-items-input.js +1 -1
  63. package/dist/features/parameters/common/widget/parameter-switch.js +13 -1
  64. package/dist/features/parameters/dynamic-simulation/curve/common/checkbox-select.js +6 -4
  65. package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-selector-dialog.js +43 -32
  66. package/dist/features/parameters/dynamic-simulation/curve/dialog/curve-selector.js +47 -25
  67. package/dist/features/parameters/network-visualizations/map-parameters.js +7 -3
  68. package/dist/features/parameters/network-visualizations/network-area-diagram-parameters.js +7 -3
  69. package/dist/features/parameters/network-visualizations/single-line-diagram-parameters.js +7 -3
  70. package/dist/features/parameters/security-analysis/security-analysis-violations-hiding.js +23 -13
  71. package/dist/features/parameters/sensi/sensitivity-analysis-parameters-factor-count.js +2 -2
  72. package/dist/features/parameters/sensi/sensitivity-analysis-parameters-form.js +12 -1
  73. package/dist/features/parameters/sensi/sensitivity-parameters-fields.js +36 -26
  74. package/dist/features/parameters/short-circuit/short-circuit-general-tab-panel.js +67 -26
  75. package/dist/features/parameters/short-circuit/short-circuit-power-electronics-tab-panel.js +15 -4
  76. package/dist/features/parameters/voltage-init/equipment-selection-parameters.js +51 -15
  77. package/dist/features/parameters/voltage-init/general-parameters.js +9 -1
  78. package/dist/features/process-configs/common/FormSubSection.js +2 -2
  79. package/dist/features/process-configs/common/GeneralInformationSection.js +1 -1
  80. package/dist/features/process-configs/common/SpecificInformationSection.js +12 -4
  81. package/dist/features/process-configs/common/process-config-modifications-edition.js +3 -3
  82. package/dist/features/process-configs/form/components/ProcessTypeChangeDialog.js +5 -2
  83. package/dist/features/side-bar/AppSideBarHeader.js +36 -16
  84. package/dist/features/side-bar/footer/AppSideBarFooter.js +46 -38
  85. package/dist/features/side-bar/footer/applications/OtherAppRedirection.js +10 -8
  86. package/dist/features/side-bar/footer/common/SideBarMenuItem.js +9 -1
  87. package/dist/features/side-bar/footer/profile/ProfileInfos.js +15 -6
  88. package/dist/features/side-bar/footer/settings/DarkModeToggle.js +16 -4
  89. package/dist/features/side-bar/footer/settings/SettingsMenu.js +16 -6
  90. package/dist/features/topBar/AboutDialog.js +46 -17
  91. package/dist/features/topBar/TopBar.js +2 -2
  92. package/dist/features/topBar/UserInformationDialog.js +198 -45
  93. package/package.json +16 -11
@@ -106,7 +106,16 @@ function StandbyAutomatonForm() {
106
106
  labelPlacement: "start"
107
107
  }
108
108
  ),
109
- hover && watchVoltageMode !== VOLTAGE_REGULATION_MODES.VOLTAGE.id && /* @__PURE__ */ jsx(Box, { marginLeft: 2, marginTop: "5px", children: /* @__PURE__ */ jsx(Tooltip, { title: /* @__PURE__ */ jsx(FormattedMessage, { id: "StandbyNotAvailable" }), children: /* @__PURE__ */ jsx(WarningAmber, { color: "warning" }) }) })
109
+ hover && watchVoltageMode !== VOLTAGE_REGULATION_MODES.VOLTAGE.id && /* @__PURE__ */ jsx(
110
+ Box,
111
+ {
112
+ sx: {
113
+ marginLeft: 2,
114
+ marginTop: "5px"
115
+ },
116
+ children: /* @__PURE__ */ jsx(Tooltip, { title: /* @__PURE__ */ jsx(FormattedMessage, { id: "StandbyNotAvailable" }), children: /* @__PURE__ */ jsx(WarningAmber, { color: "warning" }) })
117
+ }
118
+ )
110
119
  ] }) }),
111
120
  lVoltageSetLimit: createField(
112
121
  `${id}.${FieldConstants.LOW_VOLTAGE_SET_POINT}`,
@@ -132,11 +141,31 @@ function StandbyAutomatonForm() {
132
141
  return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
133
142
  /* @__PURE__ */ jsx(Grid, { size: 4, children: /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(CheckboxInput, { name: `${id}.${FieldConstants.ADD_STAND_BY_AUTOMATON}`, label: "AddAutomaton" }) }) }),
134
143
  watchAddStandbyAutomatonProps && /* @__PURE__ */ jsxs(Fragment, { children: [
135
- /* @__PURE__ */ jsx(Grid, { container: true, spacing: 2, padding: 2, children: Object.keys(fields).map((key) => {
136
- const typedKey = key;
137
- return /* @__PURE__ */ jsx(Grid, { size: 6, children: fields[typedKey] }, key);
138
- }) }),
139
- /* @__PURE__ */ jsx(Grid, { container: true, spacing: 2, padding: 2, children: /* @__PURE__ */ jsx(SusceptanceArea, {}) })
144
+ /* @__PURE__ */ jsx(
145
+ Grid,
146
+ {
147
+ container: true,
148
+ spacing: 2,
149
+ sx: {
150
+ padding: 2
151
+ },
152
+ children: Object.keys(fields).map((key) => {
153
+ const typedKey = key;
154
+ return /* @__PURE__ */ jsx(Grid, { size: 6, children: fields[typedKey] }, key);
155
+ })
156
+ }
157
+ ),
158
+ /* @__PURE__ */ jsx(
159
+ Grid,
160
+ {
161
+ container: true,
162
+ spacing: 2,
163
+ sx: {
164
+ padding: 2
165
+ },
166
+ children: /* @__PURE__ */ jsx(SusceptanceArea, {})
167
+ }
168
+ )
140
169
  ] })
141
170
  ] });
142
171
  }
@@ -67,15 +67,24 @@ function StaticVarCompensatorTabsContent({
67
67
  fetchVoltageLevelEquipments
68
68
  }) {
69
69
  return /* @__PURE__ */ jsxs(Fragment, { children: [
70
- /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== StaticVarCompensatorDialogTab.CONNECTIVITY_TAB, p: 1, children: /* @__PURE__ */ jsx(Grid, { container: true, spacing: 2, children: /* @__PURE__ */ jsx(GridItem, { size: 12, children: /* @__PURE__ */ jsx(
71
- ConnectivityForm,
70
+ /* @__PURE__ */ jsx(
71
+ Box,
72
72
  {
73
- previousValues: void 0,
74
- voltageLevelOptions,
75
- PositionDiagramPane,
76
- fetchBusesOrBusbarSections
73
+ hidden: tabIndex !== StaticVarCompensatorDialogTab.CONNECTIVITY_TAB,
74
+ sx: {
75
+ p: 1
76
+ },
77
+ children: /* @__PURE__ */ jsx(Grid, { container: true, spacing: 2, children: /* @__PURE__ */ jsx(GridItem, { size: 12, children: /* @__PURE__ */ jsx(
78
+ ConnectivityForm,
79
+ {
80
+ previousValues: void 0,
81
+ voltageLevelOptions,
82
+ PositionDiagramPane,
83
+ fetchBusesOrBusbarSections
84
+ }
85
+ ) }) })
77
86
  }
78
- ) }) }) }),
87
+ ),
79
88
  /* @__PURE__ */ jsx(Box, { hidden: tabIndex !== StaticVarCompensatorDialogTab.SET_POINTS_LIMITS_TAB, children: /* @__PURE__ */ jsx(
80
89
  SetPointsLimitsForm,
81
90
  {
@@ -442,86 +442,116 @@ function TabularForm({
442
442
  shouldDirty: true
443
443
  });
444
444
  };
445
- return /* @__PURE__ */ jsxs(Stack, { spacing: 2, paddingTop: 1, sx: { height: "100%" }, children: [
446
- /* @__PURE__ */ jsx(Grid, { sx: { width: 400, maxWidth: "100%" }, children: equipmentTypeField }),
447
- equipmentType && /* @__PURE__ */ jsxs(Fragment, { children: [
448
- /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, justifyContent: "space-between", alignItems: "center", children: [
449
- /* @__PURE__ */ jsxs(Grid, { container: true, alignItems: "center", children: [
450
- /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
451
- Button,
445
+ return /* @__PURE__ */ jsxs(
446
+ Stack,
447
+ {
448
+ spacing: 2,
449
+ sx: {
450
+ paddingTop: 1,
451
+ height: "100%"
452
+ },
453
+ children: [
454
+ /* @__PURE__ */ jsx(Grid, { sx: { width: 400, maxWidth: "100%" }, children: equipmentTypeField }),
455
+ equipmentType && /* @__PURE__ */ jsxs(Fragment, { children: [
456
+ /* @__PURE__ */ jsxs(
457
+ Grid,
452
458
  {
453
- variant: "contained",
454
- onClick: () => {
455
- propertiesDialogOpen.setTrue();
459
+ container: true,
460
+ spacing: 2,
461
+ sx: {
462
+ justifyContent: "space-between",
463
+ alignItems: "center"
456
464
  },
457
- children: /* @__PURE__ */ jsx(FormattedMessage, { id: "DefinePropertiesButton" })
465
+ children: [
466
+ /* @__PURE__ */ jsxs(
467
+ Grid,
468
+ {
469
+ container: true,
470
+ sx: {
471
+ alignItems: "center"
472
+ },
473
+ children: [
474
+ /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
475
+ Button,
476
+ {
477
+ variant: "contained",
478
+ onClick: () => {
479
+ propertiesDialogOpen.setTrue();
480
+ },
481
+ children: /* @__PURE__ */ jsx(FormattedMessage, { id: "DefinePropertiesButton" })
482
+ }
483
+ ) }),
484
+ /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
485
+ CsvDownloadButton,
486
+ {
487
+ data: getTemplateData,
488
+ fileName: csvProps.fileName,
489
+ language,
490
+ labelId: "GenerateCSV",
491
+ variant: "contained"
492
+ }
493
+ ) }),
494
+ renderActions?.({
495
+ dialogMode,
496
+ equipmentType,
497
+ csvColumns,
498
+ commentLines,
499
+ predefinedEquipmentProperties
500
+ })
501
+ ]
502
+ }
503
+ ),
504
+ /* @__PURE__ */ jsx(Grid, { sx: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ jsx(
505
+ CsvPicker,
506
+ {
507
+ label: "UploadCSV",
508
+ requiredColumns,
509
+ language,
510
+ parseConfig,
511
+ selectedFile: showCsvFileName ? selectedFile : void 0,
512
+ onFileChange: setSelectedFile,
513
+ onFileError: setFileErrorMessage,
514
+ getTableData: () => getValues(TabularFieldConstants.MODIFICATIONS_TABLE),
515
+ onReplace: (results, file) => tableRef.current?.replace(getDataFromCsvFile(results, file)),
516
+ onAppend: (results, file) => tableRef.current?.append(getDataFromCsvFile(results, file))
517
+ }
518
+ ) })
519
+ ]
458
520
  }
459
- ) }),
460
- /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
461
- CsvDownloadButton,
521
+ ),
522
+ fileErrorMessage && /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(Alert, { severity: "error", children: fileErrorMessage }) }),
523
+ fileWarningMessage && /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(Alert, { severity: "warning", children: fileWarningMessage }) }),
524
+ /* @__PURE__ */ jsx(Grid, { sx: { flexGrow: 1, minHeight: 0, display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ jsx(
525
+ CustomAgGridTable,
462
526
  {
463
- data: getTemplateData,
464
- fileName: csvProps.fileName,
465
- language,
466
- labelId: "GenerateCSV",
467
- variant: "contained"
527
+ ref: tableRef,
528
+ name: TabularFieldConstants.MODIFICATIONS_TABLE,
529
+ columnDefs,
530
+ defaultColDef,
531
+ makeDefaultRowData,
532
+ loading: isFetching,
533
+ pagination: true,
534
+ rowSelection: {
535
+ mode: "multiRow"
536
+ },
537
+ overrideLocales: AGGRID_LOCALES,
538
+ csvProps
468
539
  }
469
- ) }),
470
- renderActions?.({
471
- dialogMode,
472
- equipmentType,
473
- csvColumns,
474
- commentLines,
475
- predefinedEquipmentProperties
476
- })
540
+ ) })
477
541
  ] }),
478
- /* @__PURE__ */ jsx(Grid, { sx: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ jsx(
479
- CsvPicker,
542
+ /* @__PURE__ */ jsx(
543
+ DefineTabularPropertiesDialog,
480
544
  {
481
- label: "UploadCSV",
482
- requiredColumns,
483
- language,
484
- parseConfig,
485
- selectedFile: showCsvFileName ? selectedFile : void 0,
486
- onFileChange: setSelectedFile,
487
- onFileError: setFileErrorMessage,
488
- getTableData: () => getValues(TabularFieldConstants.MODIFICATIONS_TABLE),
489
- onReplace: (results, file) => tableRef.current?.replace(getDataFromCsvFile(results, file)),
490
- onAppend: (results, file) => tableRef.current?.append(getDataFromCsvFile(results, file))
545
+ open: propertiesDialogOpen,
546
+ equipmentType,
547
+ currentProperties: tabularProperties,
548
+ predefinedEquipmentProperties,
549
+ onValidate: onPropertiesChange
491
550
  }
492
- ) })
493
- ] }),
494
- fileErrorMessage && /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(Alert, { severity: "error", children: fileErrorMessage }) }),
495
- fileWarningMessage && /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(Alert, { severity: "warning", children: fileWarningMessage }) }),
496
- /* @__PURE__ */ jsx(Grid, { sx: { flexGrow: 1, minHeight: 0, display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ jsx(
497
- CustomAgGridTable,
498
- {
499
- ref: tableRef,
500
- name: TabularFieldConstants.MODIFICATIONS_TABLE,
501
- columnDefs,
502
- defaultColDef,
503
- makeDefaultRowData,
504
- loading: isFetching,
505
- pagination: true,
506
- rowSelection: {
507
- mode: "multiRow"
508
- },
509
- overrideLocales: AGGRID_LOCALES,
510
- csvProps
511
- }
512
- ) })
513
- ] }),
514
- /* @__PURE__ */ jsx(
515
- DefineTabularPropertiesDialog,
516
- {
517
- open: propertiesDialogOpen,
518
- equipmentType,
519
- currentProperties: tabularProperties,
520
- predefinedEquipmentProperties,
521
- onValidate: onPropertiesChange
522
- }
523
- )
524
- ] });
551
+ )
552
+ ]
553
+ }
554
+ );
525
555
  }
526
556
  export {
527
557
  TabularForm
@@ -69,19 +69,29 @@ function SwitchesBetweenSections() {
69
69
  }
70
70
  return /* @__PURE__ */ jsxs(Fragment, { children: [
71
71
  /* @__PURE__ */ jsx(GridSection, { title: "SwitchesBetweenSections" }),
72
- /* @__PURE__ */ jsx(Grid, { container: true, spacing: 2, pt: 1, children: rows.map((value, index) => /* @__PURE__ */ jsx(Grid, { size: 4, children: /* @__PURE__ */ jsx(
73
- EnumInput,
72
+ /* @__PURE__ */ jsx(
73
+ Grid,
74
74
  {
75
- options: Object.values(SWITCH_TYPE),
76
- name: `${FieldConstants.SWITCH_KINDS}.${index}.${FieldConstants.SWITCH_KIND}`,
77
- label: "SwitchBetweenSectionsLabel",
78
- labelValues: {
79
- index1: String(index + 1),
80
- index2: String(index + 2)
75
+ container: true,
76
+ spacing: 2,
77
+ sx: {
78
+ pt: 1
81
79
  },
82
- size: "small"
80
+ children: rows.map((value, index) => /* @__PURE__ */ jsx(Grid, { size: 4, children: /* @__PURE__ */ jsx(
81
+ EnumInput,
82
+ {
83
+ options: Object.values(SWITCH_TYPE),
84
+ name: `${FieldConstants.SWITCH_KINDS}.${index}.${FieldConstants.SWITCH_KIND}`,
85
+ label: "SwitchBetweenSectionsLabel",
86
+ labelValues: {
87
+ index1: String(index + 1),
88
+ index2: String(index + 2)
89
+ },
90
+ size: "small"
91
+ }
92
+ ) }, value.id))
83
93
  }
84
- ) }, value.id)) })
94
+ )
85
95
  ] });
86
96
  }
87
97
  export {
@@ -49,23 +49,41 @@ function SubstationTab({ substationOptions, showDeleteButton }) {
49
49
  });
50
50
  }
51
51
  }, [setValue, getValues, watchAddSubstationCreation]);
52
- return watchAddSubstationCreation ? /* @__PURE__ */ jsx(SubstationCreationSection, { showDeleteButton, onDelete: handleDeleteSubstationCreation }) : /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, pt: 2, children: [
53
- /* @__PURE__ */ jsx(Grid, { size: 4, children: substationOptions ? /* @__PURE__ */ jsx(
54
- AutocompleteInput,
55
- {
56
- name: FieldConstants.SUBSTATION_ID,
57
- label: "SUBSTATION",
58
- openOnFocus: true,
59
- forcePopupIcon: true,
60
- options: substationOptions,
61
- size: "small",
62
- allowNewValue: false,
63
- noOptionsText: ""
64
- }
65
- ) : /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.SUBSTATION_ID, label: "SUBSTATION" }) }),
66
- /* @__PURE__ */ jsx(Grid, { mt: 0.75, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "Or" }) }),
67
- /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(AddButton, { label: "CreateSubstation", onClick: handleCreateSubstation }) })
68
- ] });
52
+ return watchAddSubstationCreation ? /* @__PURE__ */ jsx(SubstationCreationSection, { showDeleteButton, onDelete: handleDeleteSubstationCreation }) : /* @__PURE__ */ jsxs(
53
+ Grid,
54
+ {
55
+ container: true,
56
+ spacing: 2,
57
+ sx: {
58
+ pt: 2
59
+ },
60
+ children: [
61
+ /* @__PURE__ */ jsx(Grid, { size: 4, children: substationOptions ? /* @__PURE__ */ jsx(
62
+ AutocompleteInput,
63
+ {
64
+ name: FieldConstants.SUBSTATION_ID,
65
+ label: "SUBSTATION",
66
+ openOnFocus: true,
67
+ forcePopupIcon: true,
68
+ options: substationOptions,
69
+ size: "small",
70
+ allowNewValue: false,
71
+ noOptionsText: ""
72
+ }
73
+ ) : /* @__PURE__ */ jsx(TextInput, { name: FieldConstants.SUBSTATION_ID, label: "SUBSTATION" }) }),
74
+ /* @__PURE__ */ jsx(
75
+ Grid,
76
+ {
77
+ sx: {
78
+ mt: 0.75
79
+ },
80
+ children: /* @__PURE__ */ jsx(FormattedMessage, { id: "Or" })
81
+ }
82
+ ),
83
+ /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(AddButton, { label: "CreateSubstation", onClick: handleCreateSubstation }) })
84
+ ]
85
+ }
86
+ );
69
87
  }
70
88
  export {
71
89
  SubstationTab
@@ -340,7 +340,15 @@ function MoveVoltageLevelFeederBaysForm({
340
340
  diagramToolTip
341
341
  ] })
342
342
  ] }),
343
- /* @__PURE__ */ jsx(Grid, { paddingTop: 2, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "moveFeederBaysSections" }) }),
343
+ /* @__PURE__ */ jsx(
344
+ Grid,
345
+ {
346
+ sx: {
347
+ paddingTop: 2
348
+ },
349
+ children: /* @__PURE__ */ jsx(FormattedMessage, { id: "moveFeederBaysSections" })
350
+ }
351
+ ),
344
352
  /* @__PURE__ */ jsx(Box, { sx: { pt: 1, flex: 1, minHeight: 0 }, children: /* @__PURE__ */ jsx(
345
353
  CustomAGGrid,
346
354
  {
@@ -75,10 +75,12 @@ function FeederBayPositionCellRenderer({ name, disabled }) {
75
75
  size: "small",
76
76
  variant: "outlined",
77
77
  helperText: isDuplicate && /* @__PURE__ */ jsx(Typography, { variant: "caption", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "DuplicatedPositionsWarning" }) }),
78
- FormHelperTextProps: {
79
- sx: {
80
- ml: "auto",
81
- color: (theme) => isDuplicate ? theme.palette.warning.main : theme.palette.text.secondary
78
+ slotProps: {
79
+ formHelperText: {
80
+ sx: {
81
+ ml: "auto",
82
+ color: (theme) => isDuplicate ? theme.palette.warning.main : theme.palette.text.secondary
83
+ }
82
84
  }
83
85
  },
84
86
  sx: {
@@ -334,13 +334,23 @@ function VoltageLevelSectionCreationForm({
334
334
  const diagramToolTip = /* @__PURE__ */ jsx(Tooltip, { sx: { paddingLeft: 1 }, title: intl.formatMessage({ id: "builtNodeTooltipForDiagram" }), children: /* @__PURE__ */ jsx(InfoOutlined, { color: "info", fontSize: "medium" }) });
335
335
  return /* @__PURE__ */ jsxs(Box, { sx: { p: 2 }, children: [
336
336
  /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
337
- /* @__PURE__ */ jsx(Grid, { size: 12, children: /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, alignItems: "center", children: [
338
- /* @__PURE__ */ jsx(Grid, { size: { xs: 12, md: 6 }, children: voltageLevelIdField }),
339
- PositionDiagramPane && isNodeBuilt && /* @__PURE__ */ jsxs(Grid, { size: { xs: 12, md: 3 }, children: [
340
- /* @__PURE__ */ jsx(Button, { onClick: handleClickOpenDiagramPane, variant: "outlined", size: "small", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "CreateCouplingDeviceDiagramButton" }) }),
341
- diagramToolTip
342
- ] })
343
- ] }) }),
337
+ /* @__PURE__ */ jsx(Grid, { size: 12, children: /* @__PURE__ */ jsxs(
338
+ Grid,
339
+ {
340
+ container: true,
341
+ spacing: 2,
342
+ sx: {
343
+ alignItems: "center"
344
+ },
345
+ children: [
346
+ /* @__PURE__ */ jsx(Grid, { size: { xs: 12, md: 6 }, children: voltageLevelIdField }),
347
+ PositionDiagramPane && isNodeBuilt && /* @__PURE__ */ jsxs(Grid, { size: { xs: 12, md: 3 }, children: [
348
+ /* @__PURE__ */ jsx(Button, { onClick: handleClickOpenDiagramPane, variant: "outlined", size: "small", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "CreateCouplingDeviceDiagramButton" }) }),
349
+ diagramToolTip
350
+ ] })
351
+ ]
352
+ }
353
+ ) }),
344
354
  isNotFoundOrNotSupported && /* @__PURE__ */ jsx(Grid, { size: 12, children: /* @__PURE__ */ jsx(Typography, { variant: "body1", color: "red", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "notValidVoltageLevel" }) }) }),
345
355
  /* @__PURE__ */ jsx(Grid, { size: 12, children: /* @__PURE__ */ jsx(GridSection, { title: "SectionPosition" }) }),
346
356
  /* @__PURE__ */ jsx(Grid, { size: 4, children: busbarCountField }),
@@ -105,19 +105,29 @@ function CreateVoltageLevelTopologyForm({
105
105
  return /* @__PURE__ */ jsxs(Fragment, { children: [
106
106
  /* @__PURE__ */ jsxs(Stack, { children: [
107
107
  /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsxs(Stack, { spacing: 2, children: [
108
- /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 3, alignItems: "center", children: [
109
- /* @__PURE__ */ jsx(Grid, { size: 4, children: voltageLevelIdField }),
110
- PositionDiagramPane && isNodeBuilt && /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 1, children: [
111
- /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(Button, { onClick: handleClickOpenDiagramPane, variant: "outlined", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "CreateCouplingDeviceDiagramButton" }) }) }),
112
- /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
113
- Tooltip,
114
- {
115
- title: intl.formatMessage({ id: "builtNodeTooltipForDiagram" }),
116
- children: /* @__PURE__ */ jsx(InfoOutlined, { color: "info", fontSize: "small" })
117
- }
118
- ) })
119
- ] }) })
120
- ] }) }),
108
+ /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsxs(
109
+ Grid,
110
+ {
111
+ container: true,
112
+ spacing: 3,
113
+ sx: {
114
+ alignItems: "center"
115
+ },
116
+ children: [
117
+ /* @__PURE__ */ jsx(Grid, { size: 4, children: voltageLevelIdField }),
118
+ PositionDiagramPane && isNodeBuilt && /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 1, children: [
119
+ /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(Button, { onClick: handleClickOpenDiagramPane, variant: "outlined", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "CreateCouplingDeviceDiagramButton" }) }) }),
120
+ /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(
121
+ Tooltip,
122
+ {
123
+ title: intl.formatMessage({ id: "builtNodeTooltipForDiagram" }),
124
+ children: /* @__PURE__ */ jsx(InfoOutlined, { color: "info", fontSize: "small" })
125
+ }
126
+ ) })
127
+ ] }) })
128
+ ]
129
+ }
130
+ ) }),
121
131
  /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(Grid, { container: true, spacing: 3, children: /* @__PURE__ */ jsx(Grid, { size: 4, children: /* @__PURE__ */ jsx(IntegerInput, { name: FieldConstants.SECTION_COUNT, label: "SectionCount" }) }) }) })
122
132
  ] }) }),
123
133
  /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(SwitchesBetweenSections, {}) })
@@ -237,25 +237,35 @@ function VoltageLevelTopologyModificationForm({
237
237
  ...filledTextField
238
238
  }
239
239
  ) }),
240
- /* @__PURE__ */ jsx(Grid, { size: 8, container: true, justifyContent: "flex-end", children: isPreviousStatusEnabled && /* @__PURE__ */ jsx(
241
- Button,
240
+ /* @__PURE__ */ jsx(
241
+ Grid,
242
242
  {
243
- variant: "outlined",
244
- color: "primary",
245
- size: "small",
246
- onClick: copyPreviousToCurrentStatus,
247
- startIcon: /* @__PURE__ */ jsx(
248
- PublishedWithChanges,
243
+ size: 8,
244
+ container: true,
245
+ sx: {
246
+ justifyContent: "flex-end"
247
+ },
248
+ children: isPreviousStatusEnabled && /* @__PURE__ */ jsx(
249
+ Button,
249
250
  {
250
- style: {
251
- width: 24,
252
- height: 24
253
- }
251
+ variant: "outlined",
252
+ color: "primary",
253
+ size: "small",
254
+ onClick: copyPreviousToCurrentStatus,
255
+ startIcon: /* @__PURE__ */ jsx(
256
+ PublishedWithChanges,
257
+ {
258
+ style: {
259
+ width: 24,
260
+ height: 24
261
+ }
262
+ }
263
+ ),
264
+ children: intl.formatMessage({ id: "copyPreviousTopologyStatus" })
254
265
  }
255
- ),
256
- children: intl.formatMessage({ id: "copyPreviousTopologyStatus" })
266
+ )
257
267
  }
258
- ) })
268
+ )
259
269
  ] }),
260
270
  /* @__PURE__ */ jsx(Box, { sx: { pt: 2, flex: 1, minHeight: 0 }, children: /* @__PURE__ */ jsx(
261
271
  CustomAGGrid,
@@ -101,10 +101,23 @@ function ParameterField({
101
101
  };
102
102
  const LABEL_GRID_SIZE = type !== ParameterType.COUNTRIES ? 8 : 3;
103
103
  const INPUT_GRID_SIZE = 12 - LABEL_GRID_SIZE;
104
- return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 1, paddingTop: 1, justifyContent: "space-between", sx: { width: "100%" }, children: [
105
- /* @__PURE__ */ jsx(Grid, { size: LABEL_GRID_SIZE, children: /* @__PURE__ */ jsx(CustomTooltip, { title: description, children: /* @__PURE__ */ jsx(Typography, { sx: parametersStyles.parameterName, children: label ? /* @__PURE__ */ jsx(FormattedMessage, { id: label }) : name }) }, name) }),
106
- /* @__PURE__ */ jsx(Grid, { container: true, size: INPUT_GRID_SIZE, sx: parametersStyles.controlItem, children: renderField() })
107
- ] }, name);
104
+ return /* @__PURE__ */ jsxs(
105
+ Grid,
106
+ {
107
+ container: true,
108
+ spacing: 1,
109
+ sx: {
110
+ paddingTop: 1,
111
+ justifyContent: "space-between",
112
+ width: "100%"
113
+ },
114
+ children: [
115
+ /* @__PURE__ */ jsx(Grid, { size: LABEL_GRID_SIZE, children: /* @__PURE__ */ jsx(CustomTooltip, { title: description, children: /* @__PURE__ */ jsx(Typography, { sx: parametersStyles.parameterName, children: label ? /* @__PURE__ */ jsx(FormattedMessage, { id: label }) : name }) }, name) }),
116
+ /* @__PURE__ */ jsx(Grid, { container: true, size: INPUT_GRID_SIZE, sx: parametersStyles.controlItem, children: renderField() })
117
+ ]
118
+ },
119
+ name
120
+ );
108
121
  }
109
122
  export {
110
123
  ParameterField
@@ -78,18 +78,29 @@ function ParameterTableField({
78
78
  [isValidRow, onChange]
79
79
  );
80
80
  return /* @__PURE__ */ jsxs(Grid, { container: true, sx: sxContainerProps, size: 12, children: [
81
- label && /* @__PURE__ */ jsxs(Grid, { container: true, alignItems: "center", paddingBottom: 2, paddingTop: 2, children: [
82
- /* @__PURE__ */ jsx(Typography, { component: "span", variant: "h6", children: /* @__PURE__ */ jsx(FormattedMessage, { id: label }) }),
83
- tooltipProps && /* @__PURE__ */ jsx(
84
- CustomTooltip,
85
- {
86
- title: typeof title === "string" ? /* @__PURE__ */ jsx(FormattedMessage, { id: title }) : title,
87
- sx: { marginLeft: 1 },
88
- ...otherTooltipProps,
89
- children: /* @__PURE__ */ jsx(Info, {})
90
- }
91
- )
92
- ] }),
81
+ label && /* @__PURE__ */ jsxs(
82
+ Grid,
83
+ {
84
+ container: true,
85
+ sx: {
86
+ alignItems: "center",
87
+ paddingBottom: 2,
88
+ paddingTop: 2
89
+ },
90
+ children: [
91
+ /* @__PURE__ */ jsx(Typography, { component: "span", variant: "h6", children: /* @__PURE__ */ jsx(FormattedMessage, { id: label }) }),
92
+ tooltipProps && /* @__PURE__ */ jsx(
93
+ CustomTooltip,
94
+ {
95
+ title: typeof title === "string" ? /* @__PURE__ */ jsx(FormattedMessage, { id: title }) : title,
96
+ sx: { marginLeft: 1 },
97
+ ...otherTooltipProps,
98
+ children: /* @__PURE__ */ jsx(Info, {})
99
+ }
100
+ )
101
+ ]
102
+ }
103
+ ),
93
104
  /* @__PURE__ */ jsx(
94
105
  DndTable,
95
106
  {
@@ -33,7 +33,7 @@ const styles = {
33
33
  }
34
34
  };
35
35
  function ProviderParam({ options, id, sx }) {
36
- return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 1, sx: mergeSx(styles.providerParam, sx), justifyContent: "space-between", children: [
36
+ return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 1, sx: mergeSx({ justifyContent: "space-between" }, styles.providerParam, sx), children: [
37
37
  /* @__PURE__ */ jsx(Grid, { size: "auto", sx: mergeSx(parametersStyles.parameterName, { paddingRight: 2 }), children: /* @__PURE__ */ jsx(FormattedMessage, { id: "Provider" }) }),
38
38
  /* @__PURE__ */ jsx(Grid, { size: "auto", sx: parametersStyles.controlItem, children: /* @__PURE__ */ jsx(MuiSelectInput, { name: PROVIDER, size: "small", options, "data-testid": `${id}Provider` }) }),
39
39
  /* @__PURE__ */ jsx(LineSeparator, {})