@gridsuite/commons-ui 0.245.0 → 0.247.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 (65) hide show
  1. package/dist/components/composite/agGridTable/BottomTableButtons.js +8 -23
  2. package/dist/components/composite/agGridTable/agGridTable-utils.d.ts +0 -1
  3. package/dist/components/composite/filter/expert/expertFilterConstants.js +12 -0
  4. package/dist/components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js +75 -64
  5. package/dist/components/index.js +4 -0
  6. package/dist/components/ui/csvDownloader/csv-download-button.d.ts +11 -0
  7. package/dist/components/ui/csvDownloader/csv-download-button.js +28 -0
  8. package/dist/components/ui/csvDownloader/export-csv-button.d.ts +3 -2
  9. package/dist/components/ui/csvDownloader/export-csv-button.js +2 -1
  10. package/dist/components/ui/csvDownloader/index.d.ts +1 -0
  11. package/dist/components/ui/csvDownloader/index.js +2 -0
  12. package/dist/components/ui/csvPicker/csv-picker.js +10 -24
  13. package/dist/components/ui/index.js +4 -0
  14. package/dist/components/ui/reactHookForm/index.js +2 -0
  15. package/dist/components/ui/reactHookForm/utils/CancelButton.d.ts +1 -1
  16. package/dist/components/ui/reactHookForm/utils/CancelButton.js +3 -4
  17. package/dist/components/ui/reactHookForm/utils/CloseButton.d.ts +2 -0
  18. package/dist/components/ui/reactHookForm/utils/CloseButton.js +9 -0
  19. package/dist/components/ui/reactHookForm/utils/index.d.ts +1 -0
  20. package/dist/components/ui/reactHookForm/utils/index.js +2 -0
  21. package/dist/features/index.js +2 -1
  22. package/dist/features/parameters/common/constants.d.ts +1 -0
  23. package/dist/features/parameters/common/constants.js +2 -0
  24. package/dist/features/parameters/common/index.js +2 -1
  25. package/dist/features/parameters/common/parameter-field.d.ts +2 -1
  26. package/dist/features/parameters/common/parameter-field.js +25 -6
  27. package/dist/features/parameters/index.js +2 -1
  28. package/dist/features/parameters/loadflow/load-flow-advanced-parameters.d.ts +5 -0
  29. package/dist/features/parameters/loadflow/load-flow-advanced-parameters.js +111 -0
  30. package/dist/features/parameters/loadflow/load-flow-general-parameters.d.ts +7 -6
  31. package/dist/features/parameters/loadflow/load-flow-general-parameters.js +8 -93
  32. package/dist/features/parameters/loadflow/load-flow-parameters-content.d.ts +1 -1
  33. package/dist/features/parameters/loadflow/load-flow-parameters-content.js +6 -2
  34. package/dist/features/parameters/loadflow/load-flow-parameters-form.js +2 -1
  35. package/dist/features/parameters/loadflow/load-flow-parameters-header.d.ts +2 -1
  36. package/dist/features/parameters/loadflow/load-flow-parameters-header.js +21 -1
  37. package/dist/features/parameters/loadflow/load-flow-parameters-type.d.ts +2 -1
  38. package/dist/features/parameters/loadflow/load-flow-parameters-utils.d.ts +22 -8
  39. package/dist/features/parameters/loadflow/load-flow-parameters-utils.js +39 -5
  40. package/dist/features/parameters/loadflow/load-flow-provider-specific-parameters.d.ts +7 -0
  41. package/dist/features/parameters/loadflow/load-flow-provider-specific-parameters.js +47 -0
  42. package/dist/features/parameters/loadflow/use-load-flow-parameters-form.js +28 -6
  43. package/dist/features/parameters/security-analysis/security-analysis-parameters-selector.js +1 -0
  44. package/dist/features/process-configs/security-analysis/update-sa-process-config.js +1 -0
  45. package/dist/features/topBar/AboutDialog.js +3 -2
  46. package/dist/features/topBar/UserInformationDialog.js +2 -2
  47. package/dist/features/topBar/UserSettingsDialog.js +3 -2
  48. package/dist/index.js +6 -1
  49. package/dist/translations/en/commonButtonEn.d.ts +1 -0
  50. package/dist/translations/en/commonButtonEn.js +1 -0
  51. package/dist/translations/en/csvEn.js +3 -3
  52. package/dist/translations/en/parameters.d.ts +3 -2
  53. package/dist/translations/en/parameters.js +4 -3
  54. package/dist/translations/en/topBarEn.d.ts +0 -1
  55. package/dist/translations/en/topBarEn.js +1 -2
  56. package/dist/translations/fr/commonButtonFr.d.ts +1 -0
  57. package/dist/translations/fr/commonButtonFr.js +1 -0
  58. package/dist/translations/fr/csvFr.js +3 -3
  59. package/dist/translations/fr/parameters.d.ts +3 -2
  60. package/dist/translations/fr/parameters.js +4 -3
  61. package/dist/translations/fr/topBarFr.d.ts +0 -1
  62. package/dist/translations/fr/topBarFr.js +1 -2
  63. package/dist/utils/types/equipmentType.js +7 -0
  64. package/dist/utils/types/parameters.type.d.ts +1 -0
  65. package/package.json +1 -1
@@ -1,25 +1,18 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { styled, IconButton, Grid2, Box, Button } from "@mui/material";
2
+ import { styled, IconButton, Grid2, Box } from "@mui/material";
3
3
  import { ControlPoint, Delete, ArrowCircleUp, ArrowCircleDown } from "@mui/icons-material";
4
- import { FormattedMessage } from "react-intl";
5
- import { useCSVDownloader } from "react-papaparse";
6
4
  import { ErrorInput } from "../../ui/reactHookForm/errorManagement/ErrorInput.js";
7
5
  import { FieldErrorAlert } from "../../ui/reactHookForm/errorManagement/FieldErrorAlert.js";
6
+ import { CsvDownloadButton } from "../../ui/csvDownloader/csv-download-button.js";
7
+ import "react";
8
+ import "react-intl";
8
9
  import "../../../utils/conversionUtils.js";
9
10
  import "../../../utils/types/equipmentType.js";
10
- import { getCsvDelimiter } from "../../../utils/langs.js";
11
11
  const InnerColoredButton = styled(IconButton)(({ theme }) => {
12
12
  return {
13
13
  color: theme.palette.primary.main
14
14
  };
15
15
  });
16
- function CsvDownloadButton({ data, fileName, delimiter, labelId, disabled }) {
17
- const { CSVDownloader } = useCSVDownloader();
18
- if (disabled) {
19
- return /* @__PURE__ */ jsx(Button, { variant: "outlined", disabled: true, children: /* @__PURE__ */ jsx(FormattedMessage, { id: labelId }) });
20
- }
21
- return /* @__PURE__ */ jsx(CSVDownloader, { data, filename: fileName, config: { delimiter }, children: /* @__PURE__ */ jsx(Button, { variant: "outlined", children: /* @__PURE__ */ jsx(FormattedMessage, { id: labelId }) }) });
22
- }
23
16
  function BottomTableButtons({
24
17
  name,
25
18
  disableUp,
@@ -32,24 +25,16 @@ function BottomTableButtons({
32
25
  csvProps
33
26
  }) {
34
27
  return /* @__PURE__ */ jsxs(Fragment, { children: [
35
- /* @__PURE__ */ jsxs(Grid2, { container: true, paddingTop: 1, alignItems: "center", spacing: 1, children: [
36
- csvProps?.getTemplateData && /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(
37
- CsvDownloadButton,
38
- {
39
- data: csvProps.getTemplateData,
40
- fileName: csvProps.fileName,
41
- delimiter: getCsvDelimiter(csvProps.language),
42
- labelId: "GenerateCSV"
43
- }
44
- ) }),
28
+ /* @__PURE__ */ jsxs(Grid2, { container: true, paddingTop: 1, paddingLeft: 1, alignItems: "center", spacing: 1, children: [
45
29
  csvProps?.getTableData && /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(
46
30
  CsvDownloadButton,
47
31
  {
48
32
  data: csvProps.getTableData,
49
33
  fileName: csvProps.fileName,
50
- delimiter: getCsvDelimiter(csvProps.language),
34
+ language: csvProps.language,
51
35
  labelId: "DownloadCSV",
52
- disabled: !csvProps.hasTableData
36
+ disabled: !csvProps.hasTableData,
37
+ withExportButton: true
53
38
  }
54
39
  ) }),
55
40
  csvProps?.extraButtons && /* @__PURE__ */ jsx(Grid2, { children: csvProps.extraButtons }),
@@ -2,7 +2,6 @@ import { ReactNode } from 'react';
2
2
  export interface CsvProps {
3
3
  fileName: string;
4
4
  language?: string;
5
- getTemplateData?: () => unknown[];
6
5
  getTableData?: () => unknown[];
7
6
  extraButtons?: ReactNode;
8
7
  hasTableData?: boolean;
@@ -16,6 +16,7 @@ const EXPERT_FILTER_QUERY = "rules";
16
16
  const EXPERT_FILTER_EQUIPMENTS = {
17
17
  [EquipmentType.SUBSTATION]: ALL_EQUIPMENTS[EquipmentType.SUBSTATION],
18
18
  [EquipmentType.VOLTAGE_LEVEL]: ALL_EQUIPMENTS[EquipmentType.VOLTAGE_LEVEL],
19
+ [EquipmentType.BUSBAR_SECTION]: ALL_EQUIPMENTS[EquipmentType.BUSBAR_SECTION],
19
20
  [EquipmentType.LINE]: ALL_EQUIPMENTS[EquipmentType.LINE],
20
21
  [EquipmentType.TWO_WINDINGS_TRANSFORMER]: ALL_EQUIPMENTS[EquipmentType.TWO_WINDINGS_TRANSFORMER],
21
22
  [EquipmentType.THREE_WINDINGS_TRANSFORMER]: ALL_EQUIPMENTS[EquipmentType.THREE_WINDINGS_TRANSFORMER],
@@ -1122,6 +1123,17 @@ const EXPERT_FILTER_FIELDS = {
1122
1123
  FIELDS_OPTIONS.LOW_SHORT_CIRCUIT_CURRENT_LIMIT,
1123
1124
  FIELDS_OPTIONS.HIGH_SHORT_CIRCUIT_CURRENT_LIMIT
1124
1125
  ],
1126
+ BUSBAR_SECTION: [
1127
+ FIELDS_OPTIONS.ID,
1128
+ FIELDS_OPTIONS.NAME,
1129
+ FIELDS_OPTIONS.COUNTRY,
1130
+ FIELDS_OPTIONS.VOLTAGE_LEVEL_ID,
1131
+ FIELDS_OPTIONS.NOMINAL_VOLTAGE,
1132
+ FIELDS_OPTIONS.PROPERTY,
1133
+ FIELDS_OPTIONS.SUBSTATION_ID,
1134
+ FIELDS_OPTIONS.SUBSTATION_PROPERTY,
1135
+ FIELDS_OPTIONS.VOLTAGE_LEVEL_PROPERTY
1136
+ ],
1125
1137
  LINE: [
1126
1138
  FIELDS_OPTIONS.ID,
1127
1139
  FIELDS_OPTIONS.NAME,
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
1
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { useEffect, useMemo, useCallback, useState, useRef } from "react";
3
3
  import { useIntl } from "react-intl";
4
4
  import { useWatch } from "react-hook-form";
@@ -45,6 +45,7 @@ import "../../../ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
45
45
  import "../../../ui/snackbarProvider/SnackbarProvider.js";
46
46
  import "mui-nested-menu";
47
47
  import "react-resizable-panels";
48
+ import { CsvDownloadButton } from "../../../ui/csvDownloader/csv-download-button.js";
48
49
  import { CsvPicker } from "../../../ui/csvPicker/csv-picker.js";
49
50
  const explicitNamingFilterSchema = {
50
51
  [FILTER_EQUIPMENTS_ATTRIBUTES]: yup.array().of(
@@ -193,77 +194,87 @@ function ExplicitNamingFilterForm({
193
194
  padding: 1,
194
195
  sx: { flexGrow: 1, flexWrap: "nowrap", minHeight: 0 },
195
196
  children: [
196
- /* @__PURE__ */ jsxs(Grid2, { container: true, justifyContent: "space-between", alignItems: "center", children: [
197
- /* @__PURE__ */ jsxs(Grid2, { children: [
198
- /* @__PURE__ */ jsx(
199
- InputWithPopupConfirmation,
197
+ /* @__PURE__ */ jsxs(Grid2, { children: [
198
+ /* @__PURE__ */ jsx(
199
+ InputWithPopupConfirmation,
200
+ {
201
+ Input: SelectInput,
202
+ name: FieldConstants.EQUIPMENT_TYPE,
203
+ options: Object.values(FILTER_EQUIPMENTS),
204
+ disabled: !!sourceFilterForExplicitNamingConversion || isEditing && !isDeveloperMode,
205
+ label: "equipmentType",
206
+ shouldOpenPopup: openConfirmationPopup,
207
+ resetOnConfirmation: handleResetOnConfirmation,
208
+ message: "changeTypeMessage",
209
+ validateButtonLabel: "button.changeType",
210
+ sx: { width: 400, maxWidth: "100%" },
211
+ "data-testid": "EquipmentTypeSelector"
212
+ }
213
+ ),
214
+ sourceFilterForExplicitNamingConversion && /* @__PURE__ */ jsx(
215
+ ModifyElementSelection,
216
+ {
217
+ elementType: ElementType.STUDY,
218
+ onElementValidated: onStudySelected,
219
+ dialogOpeningButtonLabel: "selectStudyDialogButton",
220
+ dialogTitleLabel: "selectStudyDialogTitle",
221
+ dialogMessageLabel: "selectStudyText",
222
+ noElementMessageLabel: "noSelectedStudyText"
223
+ }
224
+ )
225
+ ] }),
226
+ watchEquipmentType && /* @__PURE__ */ jsxs(Fragment, { children: [
227
+ /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 2, justifyContent: "space-between", alignItems: "center", children: [
228
+ /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(
229
+ CsvDownloadButton,
200
230
  {
201
- Input: SelectInput,
202
- name: FieldConstants.EQUIPMENT_TYPE,
203
- options: Object.values(FILTER_EQUIPMENTS),
204
- disabled: !!sourceFilterForExplicitNamingConversion || isEditing && !isDeveloperMode,
205
- label: "equipmentType",
206
- shouldOpenPopup: openConfirmationPopup,
207
- resetOnConfirmation: handleResetOnConfirmation,
208
- message: "changeTypeMessage",
209
- validateButtonLabel: "button.changeType",
210
- sx: { width: 400, maxWidth: "100%" },
211
- "data-testid": "EquipmentTypeSelector"
231
+ data: getTemplateData,
232
+ fileName: intl.formatMessage({ id: "filterCsvFileName" }),
233
+ language,
234
+ labelId: "GenerateCSV",
235
+ variant: "contained"
212
236
  }
213
- ),
214
- sourceFilterForExplicitNamingConversion && /* @__PURE__ */ jsx(
215
- ModifyElementSelection,
237
+ ) }),
238
+ /* @__PURE__ */ jsx(Grid2, { sx: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ jsx(
239
+ CsvPicker,
216
240
  {
217
- elementType: ElementType.STUDY,
218
- onElementValidated: onStudySelected,
219
- dialogOpeningButtonLabel: "selectStudyDialogButton",
220
- dialogTitleLabel: "selectStudyDialogTitle",
221
- dialogMessageLabel: "selectStudyText",
222
- noElementMessageLabel: "noSelectedStudyText"
241
+ label: "UploadCSV",
242
+ requiredColumns: csvFileHeaders,
243
+ language: language ?? LANG_SYSTEM,
244
+ selectedFile,
245
+ onFileChange: setSelectedFile,
246
+ onFileError: setFileErrorMessage,
247
+ getTableData: () => getValues(FILTER_EQUIPMENTS_ATTRIBUTES),
248
+ onAppend: (results) => tableRef.current?.append(getDataFromCsvFile(results.data)),
249
+ onReplace: (results) => tableRef.current?.replace(getDataFromCsvFile(results.data))
223
250
  }
224
- )
251
+ ) })
225
252
  ] }),
226
- /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(
227
- CsvPicker,
253
+ fileErrorMessage && /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(Alert, { severity: "error", children: fileErrorMessage }) }),
254
+ /* @__PURE__ */ jsx(Grid2, { sx: { flexGrow: 1, minHeight: 0, display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ jsx(
255
+ CustomAgGridTable,
228
256
  {
229
- label: "UploadCSV",
230
- requiredColumns: csvFileHeaders,
231
- language: language ?? LANG_SYSTEM,
232
- disabled: !watchEquipmentType,
233
- selectedFile,
234
- onFileChange: setSelectedFile,
235
- onFileError: setFileErrorMessage,
236
- getTableData: () => getValues(FILTER_EQUIPMENTS_ATTRIBUTES),
237
- onAppend: (results) => tableRef.current?.append(getDataFromCsvFile(results.data)),
238
- onReplace: (results) => tableRef.current?.replace(getDataFromCsvFile(results.data))
257
+ ref: tableRef,
258
+ name: FILTER_EQUIPMENTS_ATTRIBUTES,
259
+ columnDefs,
260
+ defaultColDef,
261
+ makeDefaultRowData,
262
+ pagination: true,
263
+ rowSelection: {
264
+ mode: "multiRow",
265
+ enableClickSelection: false,
266
+ checkboxes: true,
267
+ headerCheckbox: true
268
+ },
269
+ alwaysShowVerticalScroll: true,
270
+ csvProps: {
271
+ fileName: intl.formatMessage({ id: "filterCsvFileName" }),
272
+ language,
273
+ getTableData
274
+ }
239
275
  }
240
276
  ) })
241
- ] }),
242
- fileErrorMessage && /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(Alert, { severity: "error", children: fileErrorMessage }) }),
243
- watchEquipmentType && /* @__PURE__ */ jsx(Grid2, { sx: { flexGrow: 1, minHeight: 0, display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ jsx(
244
- CustomAgGridTable,
245
- {
246
- ref: tableRef,
247
- name: FILTER_EQUIPMENTS_ATTRIBUTES,
248
- columnDefs,
249
- defaultColDef,
250
- makeDefaultRowData,
251
- pagination: true,
252
- rowSelection: {
253
- mode: "multiRow",
254
- enableClickSelection: false,
255
- checkboxes: true,
256
- headerCheckbox: true
257
- },
258
- alwaysShowVerticalScroll: true,
259
- csvProps: {
260
- fileName: intl.formatMessage({ id: "filterCsvFileName" }),
261
- language,
262
- getTemplateData,
263
- getTableData
264
- }
265
- }
266
- ) })
277
+ ] })
267
278
  ]
268
279
  }
269
280
  );
@@ -36,6 +36,7 @@ import { TextInput } from "./ui/reactHookForm/text/TextInput.js";
36
36
  import { UniqueNameInput } from "./ui/reactHookForm/text/UniqueNameInput.js";
37
37
  import { DescriptionInput } from "./ui/reactHookForm/text/DescriptionInput.js";
38
38
  import { CancelButton } from "./ui/reactHookForm/utils/CancelButton.js";
39
+ import { CloseButton } from "./ui/reactHookForm/utils/CloseButton.js";
39
40
  import { FieldLabel } from "./ui/reactHookForm/utils/FieldLabel.js";
40
41
  import { SubmitButton } from "./ui/reactHookForm/utils/SubmitButton.js";
41
42
  import { TextFieldWithAdornment } from "./ui/reactHookForm/utils/TextFieldWithAdornment.js";
@@ -68,6 +69,7 @@ import { EditNoteIcon } from "./ui/icons/EditNoteIcon.js";
68
69
  import { VoltageUnitIcon } from "./ui/icons/VoltageUnitIcon.js";
69
70
  import { CustomMenuItem, CustomNestedMenuItem } from "./ui/menus/custom-nested-menu.js";
70
71
  import { ResizeHandle } from "./ui/resizablePanels/ResizeHandle.js";
72
+ import { CsvDownloadButton } from "./ui/csvDownloader/csv-download-button.js";
71
73
  import { CsvExport } from "./ui/csvDownloader/csv-export.js";
72
74
  import { ExportCsvButton } from "./ui/csvDownloader/export-csv-button.js";
73
75
  import { ManagedExportCsvButton } from "./ui/csvDownloader/managed-export-csv-button.js";
@@ -175,6 +177,7 @@ export {
175
177
  CheckboxInput,
176
178
  CheckboxNullableInput,
177
179
  ChipItemsInput,
180
+ CloseButton,
178
181
  ColumnTypes,
179
182
  CombinatorSelector,
180
183
  CombinatorType,
@@ -182,6 +185,7 @@ export {
182
185
  CountriesInput,
183
186
  CountrySelectionInput,
184
187
  CountryValueEditor,
188
+ CsvDownloadButton,
185
189
  CsvExport,
186
190
  CsvPicker,
187
191
  CustomAGGrid,
@@ -0,0 +1,11 @@
1
+ import { ButtonProps } from '@mui/material';
2
+ export interface CsvDownloadButtonProps {
3
+ labelId: string;
4
+ data: () => unknown[];
5
+ fileName: string;
6
+ language?: string;
7
+ withExportButton?: boolean;
8
+ disabled?: boolean;
9
+ variant?: ButtonProps['variant'];
10
+ }
11
+ export declare function CsvDownloadButton({ labelId, data, fileName, language, withExportButton, disabled, variant, }: Readonly<CsvDownloadButtonProps>): import("react").JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Button } from "@mui/material";
3
+ import { FormattedMessage } from "react-intl";
4
+ import { useCSVDownloader } from "react-papaparse";
5
+ import "../../../utils/conversionUtils.js";
6
+ import "../../../utils/types/equipmentType.js";
7
+ import { getCsvDelimiter } from "../../../utils/langs.js";
8
+ import "@mui/icons-material";
9
+ import { ExportCsvButton } from "./export-csv-button.js";
10
+ function CsvDownloadButton({
11
+ labelId,
12
+ data,
13
+ fileName,
14
+ language,
15
+ withExportButton = false,
16
+ disabled,
17
+ variant = "outlined"
18
+ }) {
19
+ const { CSVDownloader } = useCSVDownloader();
20
+ const button = withExportButton ? /* @__PURE__ */ jsx(ExportCsvButton, { labelId, disabled }) : /* @__PURE__ */ jsx(Button, { variant, disabled, children: /* @__PURE__ */ jsx(FormattedMessage, { id: labelId }) });
21
+ if (disabled) {
22
+ return button;
23
+ }
24
+ return /* @__PURE__ */ jsx(CSVDownloader, { data, filename: fileName, config: { delimiter: getCsvDelimiter(language) }, children: button });
25
+ }
26
+ export {
27
+ CsvDownloadButton
28
+ };
@@ -1,7 +1,8 @@
1
1
  export interface ExportButtonProps {
2
+ labelId?: string;
2
3
  disabled?: boolean;
3
- onClick: () => void;
4
+ onClick?: () => void;
4
5
  isDownloadLoading?: boolean;
5
6
  isDownloadSuccessful?: boolean;
6
7
  }
7
- export declare function ExportCsvButton({ onClick, disabled, isDownloadLoading: isCsvLoading, isDownloadSuccessful, }: Readonly<ExportButtonProps>): import("react").JSX.Element;
8
+ export declare function ExportCsvButton({ labelId, onClick, disabled, isDownloadLoading: isCsvLoading, isDownloadSuccessful, }: Readonly<ExportButtonProps>): import("react").JSX.Element;
@@ -3,13 +3,14 @@ import { Box, IconButton, CircularProgress } from "@mui/material";
3
3
  import { FormattedMessage } from "react-intl";
4
4
  import { Check, GetApp } from "@mui/icons-material";
5
5
  function ExportCsvButton({
6
+ labelId = "MuiVirtualizedTable/exportCSV",
6
7
  onClick,
7
8
  disabled = false,
8
9
  isDownloadLoading: isCsvLoading = false,
9
10
  isDownloadSuccessful = false
10
11
  }) {
11
12
  return /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center" }, children: [
12
- /* @__PURE__ */ jsx(FormattedMessage, { id: "MuiVirtualizedTable/exportCSV" }),
13
+ /* @__PURE__ */ jsx(FormattedMessage, { id: labelId }),
13
14
  /* @__PURE__ */ jsxs(Box, { sx: { position: "relative" }, children: [
14
15
  /* @__PURE__ */ jsx(IconButton, { disabled, "aria-label": "exportCSVButton", onClick, children: isDownloadSuccessful ? /* @__PURE__ */ jsx(Check, {}) : /* @__PURE__ */ jsx(GetApp, {}) }),
15
16
  isCsvLoading && /* @__PURE__ */ jsx(
@@ -4,6 +4,7 @@
4
4
  * License, v. 2.0. If a copy of the MPL was not distributed with this
5
5
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
6
  */
7
+ export * from './csv-download-button';
7
8
  export * from './csv-export';
8
9
  export * from './csv-export.type';
9
10
  export * from './export-csv-button';
@@ -1,8 +1,10 @@
1
+ import { CsvDownloadButton } from "./csv-download-button.js";
1
2
  import { CsvExport } from "./csv-export.js";
2
3
  import { ExportCsvButton } from "./export-csv-button.js";
3
4
  import { ManagedExportCsvButton } from "./managed-export-csv-button.js";
4
5
  import { fetchCsvSeparator, useCsvExport } from "./use-csv-export.js";
5
6
  export {
7
+ CsvDownloadButton,
6
8
  CsvExport,
7
9
  ExportCsvButton,
8
10
  ManagedExportCsvButton,
@@ -1,7 +1,7 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useState, useCallback } from "react";
3
3
  import { useIntl, FormattedMessage } from "react-intl";
4
- import { Button } from "@mui/material";
4
+ import { Grid2, Tooltip, Typography, Button } from "@mui/material";
5
5
  import { useCSVReader } from "react-papaparse";
6
6
  import "../../../utils/conversionUtils.js";
7
7
  import "../../../utils/types/equipmentType.js";
@@ -74,31 +74,17 @@ function CsvPicker({
74
74
  ...parseConfig
75
75
  },
76
76
  onUploadAccepted: handleUploadAccepted,
77
- children: ({ getRootProps, ProgressBar }) => /* @__PURE__ */ jsxs(Fragment, { children: [
78
- /* @__PURE__ */ jsx(
79
- "span",
77
+ children: ({ getRootProps }) => /* @__PURE__ */ jsxs(Grid2, { container: true, spacing: 1, alignItems: "center", justifyContent: "right", wrap: "nowrap", children: [
78
+ /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(Tooltip, { title: selectedFile?.name, children: /* @__PURE__ */ jsx(Typography, { sx: { fontWeight: "bold", overflow: "hidden", textOverflow: "ellipsis" }, children: selectedFile ? selectedFile.name : /* @__PURE__ */ jsx(FormattedMessage, { id: "uploadMessage" }) }) }) }),
79
+ /* @__PURE__ */ jsx(Grid2, { size: "auto", children: /* @__PURE__ */ jsx(
80
+ Button,
80
81
  {
81
- style: {
82
- marginRight: "10px",
83
- fontWeight: "bold"
84
- },
85
- children: selectedFile ? selectedFile.name : intl.formatMessage({ id: "uploadMessage" })
82
+ ...getRootProps(),
83
+ variant: selectedFile ? "contained" : "text",
84
+ disabled,
85
+ children: /* @__PURE__ */ jsx(FormattedMessage, { id: label })
86
86
  }
87
- ),
88
- /* @__PURE__ */ jsxs(Button, { ...getRootProps(), variant: "outlined", disabled, children: [
89
- /* @__PURE__ */ jsx(FormattedMessage, { id: label }),
90
- /* @__PURE__ */ jsx(
91
- ProgressBar,
92
- {
93
- style: {
94
- position: "absolute",
95
- inset: 0,
96
- width: "100%",
97
- height: "100%"
98
- }
99
- }
100
- )
101
- ] })
87
+ ) })
102
88
  ] })
103
89
  }
104
90
  ),
@@ -36,6 +36,7 @@ import { TextInput } from "./reactHookForm/text/TextInput.js";
36
36
  import { UniqueNameInput } from "./reactHookForm/text/UniqueNameInput.js";
37
37
  import { DescriptionInput } from "./reactHookForm/text/DescriptionInput.js";
38
38
  import { CancelButton } from "./reactHookForm/utils/CancelButton.js";
39
+ import { CloseButton } from "./reactHookForm/utils/CloseButton.js";
39
40
  import { FieldLabel } from "./reactHookForm/utils/FieldLabel.js";
40
41
  import { SubmitButton } from "./reactHookForm/utils/SubmitButton.js";
41
42
  import { TextFieldWithAdornment } from "./reactHookForm/utils/TextFieldWithAdornment.js";
@@ -68,6 +69,7 @@ import { EditNoteIcon } from "./icons/EditNoteIcon.js";
68
69
  import { VoltageUnitIcon } from "./icons/VoltageUnitIcon.js";
69
70
  import { CustomMenuItem, CustomNestedMenuItem } from "./menus/custom-nested-menu.js";
70
71
  import { ResizeHandle } from "./resizablePanels/ResizeHandle.js";
72
+ import { CsvDownloadButton } from "./csvDownloader/csv-download-button.js";
71
73
  import { CsvExport } from "./csvDownloader/csv-export.js";
72
74
  import { ExportCsvButton } from "./csvDownloader/export-csv-button.js";
73
75
  import { ManagedExportCsvButton } from "./csvDownloader/managed-export-csv-button.js";
@@ -91,8 +93,10 @@ export {
91
93
  CheckboxInput,
92
94
  CheckboxNullableInput,
93
95
  ChipItemsInput,
96
+ CloseButton,
94
97
  CountriesInput,
95
98
  CountrySelectionInput,
99
+ CsvDownloadButton,
96
100
  CsvExport,
97
101
  CsvPicker,
98
102
  CustomFormContext,
@@ -35,6 +35,7 @@ import { TextInput } from "./text/TextInput.js";
35
35
  import { UniqueNameInput } from "./text/UniqueNameInput.js";
36
36
  import { DescriptionInput } from "./text/DescriptionInput.js";
37
37
  import { CancelButton } from "./utils/CancelButton.js";
38
+ import { CloseButton } from "./utils/CloseButton.js";
38
39
  import { FieldLabel } from "./utils/FieldLabel.js";
39
40
  import { SubmitButton } from "./utils/SubmitButton.js";
40
41
  import { TextFieldWithAdornment } from "./utils/TextFieldWithAdornment.js";
@@ -54,6 +55,7 @@ export {
54
55
  CheckboxInput,
55
56
  CheckboxNullableInput,
56
57
  ChipItemsInput,
58
+ CloseButton,
57
59
  CountriesInput,
58
60
  CountrySelectionInput,
59
61
  CustomFormContext,
@@ -1,2 +1,2 @@
1
1
  import { ButtonProps } from '@mui/material';
2
- export declare function CancelButton(inProps: Readonly<Omit<ButtonProps, 'children'>>): import("react").JSX.Element;
2
+ export declare function CancelButton(buttonProps: Readonly<Omit<ButtonProps, 'children'>>): import("react").JSX.Element;
@@ -1,9 +1,8 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { useThemeProps, Button } from "@mui/material";
2
+ import { Button } from "@mui/material";
3
3
  import { FormattedMessage } from "react-intl";
4
- function CancelButton(inProps) {
5
- const props = useThemeProps({ props: inProps, name: "CancelButton" });
6
- return /* @__PURE__ */ jsx(Button, { "data-testid": "CancelButton", ...props, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "cancel" }) });
4
+ function CancelButton(buttonProps) {
5
+ return /* @__PURE__ */ jsx(Button, { "data-testid": "CancelButton", ...buttonProps, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "cancel" }) });
7
6
  }
8
7
  export {
9
8
  CancelButton
@@ -0,0 +1,2 @@
1
+ import { ButtonProps } from '@mui/material';
2
+ export declare function CloseButton(buttonProps: Readonly<Omit<ButtonProps, 'children'>>): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Button } from "@mui/material";
3
+ import { FormattedMessage } from "react-intl";
4
+ function CloseButton(buttonProps) {
5
+ return /* @__PURE__ */ jsx(Button, { "data-testid": "CloseButton", ...buttonProps, children: /* @__PURE__ */ jsx(FormattedMessage, { id: "close" }) });
6
+ }
7
+ export {
8
+ CloseButton
9
+ };
@@ -5,6 +5,7 @@
5
5
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
6
  */
7
7
  export * from './CancelButton';
8
+ export * from './CloseButton';
8
9
  export * from './FieldLabel';
9
10
  export * from './SubmitButton';
10
11
  export * from './TextFieldWithAdornment';
@@ -1,4 +1,5 @@
1
1
  import { CancelButton } from "./CancelButton.js";
2
+ import { CloseButton } from "./CloseButton.js";
2
3
  import { FieldLabel } from "./FieldLabel.js";
3
4
  import { SubmitButton } from "./SubmitButton.js";
4
5
  import { TextFieldWithAdornment } from "./TextFieldWithAdornment.js";
@@ -6,6 +7,7 @@ import { genHelperError, gridItem, identity, isFieldRequired, toFloatOrNullValue
6
7
  import { HelperPreviousValue } from "./HelperPreviousValue.js";
7
8
  export {
8
9
  CancelButton,
10
+ CloseButton,
9
11
  FieldLabel,
10
12
  HelperPreviousValue,
11
13
  SubmitButton,
@@ -21,7 +21,7 @@ import { TopBar } from "./topBar/TopBar.js";
21
21
  import { ParameterLayout } from "./parameters/common/parameter-layout/parameter-layout.js";
22
22
  import { ParameterLayoutProvider, useParameterLayoutContext } from "./parameters/common/parameter-layout/parameter-layout-provider.js";
23
23
  import { formatComputingTypeLabel, isValidComputingType } from "./parameters/common/computing-type.js";
24
- import { COMMON_PARAMETERS, CONTINGENCIES, CONTINGENCY_LISTS, CONTINGENCY_LISTS_INFOS, PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_PROVIDER, PROVIDER, SPECIFIC_PARAMETERS, VERSION_PARAMETER, VOLTAGE_LEVEL } from "./parameters/common/constants.js";
24
+ import { ADVANCED_PARAMETERS, COMMON_PARAMETERS, CONTINGENCIES, CONTINGENCY_LISTS, CONTINGENCY_LISTS_INFOS, PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_PROVIDER, PROVIDER, SPECIFIC_PARAMETERS, VERSION_PARAMETER, VOLTAGE_LEVEL } from "./parameters/common/constants.js";
25
25
  import { LineSeparator } from "./parameters/common/line-separator.js";
26
26
  import { LabelledButton, SwitchWithLabel, TabPanel } from "./parameters/common/parameters.js";
27
27
  import { CreateParameterDialog } from "./parameters/common/parameters-creation-dialog.js";
@@ -237,6 +237,7 @@ import { ProcessType } from "./process-configs/process-configs.type.js";
237
237
  export {
238
238
  ACCURACY,
239
239
  ACTIVE,
240
+ ADVANCED_PARAMETERS,
240
241
  APPLICABILITY,
241
242
  AUTO_EXTENSIBLE_COLUMNS,
242
243
  AboutDialog,
@@ -8,6 +8,7 @@ export declare const PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD = "highVoltage
8
8
  export declare const PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD = "highVoltageAbsoluteThreshold";
9
9
  export declare const VERSION_PARAMETER = "version";
10
10
  export declare const COMMON_PARAMETERS = "commonParameters";
11
+ export declare const ADVANCED_PARAMETERS = "advancedParameters";
11
12
  export declare const SPECIFIC_PARAMETERS = "specificParametersPerProvider";
12
13
  export declare const CONTINGENCY_LISTS_INFOS = "contingencyListsInfos";
13
14
  export declare const CONTINGENCY_LISTS = "contingencyLists";
@@ -8,11 +8,13 @@ const PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD = "highVoltageProportionalThr
8
8
  const PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD = "highVoltageAbsoluteThreshold";
9
9
  const VERSION_PARAMETER = "version";
10
10
  const COMMON_PARAMETERS = "commonParameters";
11
+ const ADVANCED_PARAMETERS = "advancedParameters";
11
12
  const SPECIFIC_PARAMETERS = "specificParametersPerProvider";
12
13
  const CONTINGENCY_LISTS_INFOS = "contingencyListsInfos";
13
14
  const CONTINGENCY_LISTS = "contingencyLists";
14
15
  const CONTINGENCIES = "contingencies";
15
16
  export {
17
+ ADVANCED_PARAMETERS,
16
18
  COMMON_PARAMETERS,
17
19
  CONTINGENCIES,
18
20
  CONTINGENCY_LISTS,
@@ -1,7 +1,7 @@
1
1
  import { ParameterLayout } from "./parameter-layout/parameter-layout.js";
2
2
  import { ParameterLayoutProvider, useParameterLayoutContext } from "./parameter-layout/parameter-layout-provider.js";
3
3
  import { formatComputingTypeLabel, isValidComputingType } from "./computing-type.js";
4
- import { COMMON_PARAMETERS, CONTINGENCIES, CONTINGENCY_LISTS, CONTINGENCY_LISTS_INFOS, PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_PROVIDER, PROVIDER, SPECIFIC_PARAMETERS, VERSION_PARAMETER, VOLTAGE_LEVEL } from "./constants.js";
4
+ import { ADVANCED_PARAMETERS, COMMON_PARAMETERS, CONTINGENCIES, CONTINGENCY_LISTS, CONTINGENCY_LISTS_INFOS, PARAM_SA_FLOW_PROPORTIONAL_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_HIGH_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_LOW_VOLTAGE_ABSOLUTE_THRESHOLD, PARAM_SA_LOW_VOLTAGE_PROPORTIONAL_THRESHOLD, PARAM_SA_PROVIDER, PROVIDER, SPECIFIC_PARAMETERS, VERSION_PARAMETER, VOLTAGE_LEVEL } from "./constants.js";
5
5
  import { LineSeparator } from "./line-separator.js";
6
6
  import { LabelledButton, SwitchWithLabel, TabPanel } from "./parameters.js";
7
7
  import { CreateParameterDialog } from "./parameters-creation-dialog.js";
@@ -23,6 +23,7 @@ import { COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS, getContingencyListsInfosFo
23
23
  import { useTabs } from "./hook/use-tabs.js";
24
24
  import { useParametersForm } from "./hook/use-parameters-form.js";
25
25
  export {
26
+ ADVANCED_PARAMETERS,
26
27
  COLUMNS_DEFINITIONS_CONTINGENCY_LISTS_INFOS,
27
28
  COLUMNS_DEFINITIONS_LIMIT_REDUCTIONS,
28
29
  COMMON_PARAMETERS,
@@ -4,6 +4,7 @@ interface ParameterFieldProps {
4
4
  name: string;
5
5
  type: string;
6
6
  label?: string;
7
+ inputLabel?: string;
7
8
  description?: string;
8
9
  possibleValues?: {
9
10
  id: string;
@@ -11,5 +12,5 @@ interface ParameterFieldProps {
11
12
  }[] | string[];
12
13
  sx?: SxProps;
13
14
  }
14
- declare function ParameterField({ id, name, type, label, description, possibleValues, sx }: Readonly<ParameterFieldProps>): import("react").JSX.Element;
15
+ declare function ParameterField({ id, name, type, label, inputLabel, description, possibleValues, sx, }: Readonly<ParameterFieldProps>): import("react").JSX.Element;
15
16
  export default ParameterField;