@gridsuite/commons-ui 0.227.0 → 0.229.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 (195) hide show
  1. package/dist/components/composite/agGridTable/BottomTableButtons.d.ts +13 -0
  2. package/dist/components/composite/agGridTable/BottomTableButtons.js +92 -0
  3. package/dist/components/composite/agGridTable/CustomAgGridTable.d.ts +3 -2
  4. package/dist/components/composite/agGridTable/CustomAgGridTable.js +16 -38
  5. package/dist/components/composite/agGridTable/agGridTable-utils.d.ts +9 -0
  6. package/dist/components/composite/agGridTable/agGridTable-utils.js +1 -0
  7. package/dist/components/composite/agGridTable/cellEditors/index.js +3 -2
  8. package/dist/components/composite/agGridTable/cellEditors/numericEditor.d.ts +21 -19
  9. package/dist/components/composite/agGridTable/cellEditors/numericEditor.js +44 -57
  10. package/dist/components/composite/agGridTable/index.d.ts +2 -2
  11. package/dist/components/composite/agGridTable/index.js +5 -6
  12. package/dist/components/composite/dnd-table/dnd-table-add-rows-dialog.js +1 -0
  13. package/dist/components/composite/dnd-table/dnd-table-row.js +1 -0
  14. package/dist/components/composite/dnd-table/dnd-table.js +1 -0
  15. package/dist/components/composite/filter/HeaderFilterForm.js +1 -0
  16. package/dist/components/composite/filter/expert/ExpertFilterForm.js +1 -0
  17. package/dist/components/composite/filter/explicitNaming/ExplicitNamingFilterForm.js +122 -91
  18. package/dist/components/composite/index.js +4 -5
  19. package/dist/components/index.js +6 -5
  20. package/dist/components/ui/csvDownloader/use-csv-export.js +2 -2
  21. package/dist/components/ui/csvPicker/csv-picker-confirmation-dialog.d.ts +11 -0
  22. package/dist/components/ui/csvPicker/csv-picker-confirmation-dialog.js +65 -0
  23. package/dist/components/ui/csvPicker/csv-picker.d.ts +24 -0
  24. package/dist/components/ui/csvPicker/csv-picker.js +123 -0
  25. package/dist/components/{composite/agGridTable/csvUploader → ui/csvPicker}/index.d.ts +2 -2
  26. package/dist/components/ui/csvPicker/index.js +4 -0
  27. package/dist/components/ui/dialogs/elementSaveDialog/ElementSaveDialog.d.ts +2 -1
  28. package/dist/components/ui/dialogs/elementSaveDialog/ElementSaveDialog.js +6 -14
  29. package/dist/components/ui/index.d.ts +1 -0
  30. package/dist/components/ui/index.js +2 -0
  31. package/dist/components/ui/treeViewFinder/TreeViewFinder.js +14 -2
  32. package/dist/features/index.js +1 -0
  33. package/dist/features/network-modifications/battery/creation/BatteryCreationForm.js +2 -3
  34. package/dist/features/network-modifications/battery/creation/batteryCreation.utils.js +2 -3
  35. package/dist/features/network-modifications/battery/modification/BatteryDialogHeader.js +2 -3
  36. package/dist/features/network-modifications/battery/modification/BatteryDialogTabsContent.js +2 -3
  37. package/dist/features/network-modifications/battery/modification/batteryModification.utils.js +2 -3
  38. package/dist/features/network-modifications/by-filter/assignment/assignment/assignment-constants.d.ts +1 -1
  39. package/dist/features/network-modifications/by-filter/assignment/assignment/assignment-constants.js +17 -2
  40. package/dist/features/network-modifications/by-filter/assignment/assignment/assignment-form.js +1 -0
  41. package/dist/features/network-modifications/by-filter/assignment/modification-by-assignment-form.js +1 -0
  42. package/dist/features/network-modifications/by-filter/deletion/ByFilterDeletionForm.js +1 -0
  43. package/dist/features/network-modifications/common/activePowerControl/ActivePowerControlForm.js +1 -0
  44. package/dist/features/network-modifications/common/connectivity/ConnectivityForm.js +1 -0
  45. package/dist/features/network-modifications/common/connectivity/PositionForm.js +1 -0
  46. package/dist/features/network-modifications/common/connectivity/VoltageLevelConnectivityForm.js +1 -0
  47. package/dist/features/network-modifications/common/measurements/BusbarSectionVoltageMeasurementsForm.js +10 -8
  48. package/dist/features/network-modifications/common/measurements/PowerWithValidityForm.js +1 -0
  49. package/dist/features/network-modifications/common/measurements/measurement.type.d.ts +5 -0
  50. package/dist/features/network-modifications/common/properties/PropertiesForm.js +1 -0
  51. package/dist/features/network-modifications/common/properties/PropertyForm.js +1 -0
  52. package/dist/features/network-modifications/common/reactiveLimits/ReactiveLimitsForm.js +1 -0
  53. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveRowForm.js +1 -0
  54. package/dist/features/network-modifications/common/reactiveLimits/reactiveCapabilityCurve/ReactiveCapabilityCurveTableForm.js +1 -0
  55. package/dist/features/network-modifications/common/regulatingTerminal/RegulatingTerminalForm.js +1 -0
  56. package/dist/features/network-modifications/common/setpoints/SetPointsForm.js +1 -0
  57. package/dist/features/network-modifications/common/shortCircuit/ShortCircuitForm.js +1 -0
  58. package/dist/features/network-modifications/common/voltageRegulation/VoltageRegulationForm.js +1 -0
  59. package/dist/features/network-modifications/equipmentDeletion/EquipmentDeletionForm.js +2 -3
  60. package/dist/features/network-modifications/equipmentDeletion/equipmentDeletion.utils.js +1 -0
  61. package/dist/features/network-modifications/equipmentDeletion/hvdcLccDeletion/ShuntCompensatorSelectionForm.js +1 -0
  62. package/dist/features/network-modifications/generator/creation/GeneratorCreationForm.js +2 -3
  63. package/dist/features/network-modifications/generator/creation/generatorCreation.utils.js +2 -3
  64. package/dist/features/network-modifications/generator/modification/GeneratorDialogHeader.js +2 -3
  65. package/dist/features/network-modifications/generator/modification/GeneratorDialogTabsContent.js +2 -3
  66. package/dist/features/network-modifications/generator/modification/generatorModification.utils.js +2 -3
  67. package/dist/features/network-modifications/index.js +1 -0
  68. package/dist/features/network-modifications/load/common/LoadDialogHeader.js +2 -3
  69. package/dist/features/network-modifications/load/creation/loadCreation.utils.js +1 -0
  70. package/dist/features/network-modifications/load/modification/loadModification.utils.js +2 -3
  71. package/dist/features/network-modifications/shunt-compensator/common/CharacteristicsForm.js +1 -0
  72. package/dist/features/network-modifications/shunt-compensator/creation/ShuntCompensatorCreationForm.js +2 -3
  73. package/dist/features/network-modifications/shunt-compensator/creation/shuntCompensatorCreation.utils.js +2 -3
  74. package/dist/features/network-modifications/shunt-compensator/modification/ShuntCompensatorModificationForm.js +2 -3
  75. package/dist/features/network-modifications/shunt-compensator/modification/shuntCompensatorModification.utils.js +2 -3
  76. package/dist/features/network-modifications/substation/creation/SubstationCreationForm.js +2 -3
  77. package/dist/features/network-modifications/substation/modification/SubstationModificationForm.js +2 -3
  78. package/dist/features/network-modifications/voltageLevel/creation/VoltageLevelCreationForm.js +2 -3
  79. package/dist/features/network-modifications/voltageLevel/creation/index.js +2 -3
  80. package/dist/features/network-modifications/voltageLevel/creation/tabs/characteristicsTab/CharacteristicsTab.js +1 -0
  81. package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/StructureTab.js +1 -0
  82. package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/couplingOmnibus/CouplingOmnibusForm.js +1 -0
  83. package/dist/features/network-modifications/voltageLevel/creation/tabs/structureTab/switchesBetweenSections/SwitchesBetweenSections.js +1 -0
  84. package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationCreationSection.js +2 -3
  85. package/dist/features/network-modifications/voltageLevel/creation/tabs/substationTab/SubstationTab.js +1 -0
  86. package/dist/features/network-modifications/voltageLevel/creation/voltageLevelCreation.utils.js +2 -3
  87. package/dist/features/network-modifications/voltageLevel/index.js +2 -3
  88. package/dist/features/network-modifications/voltageLevel/modification/VoltageLevelModificationForm.js +2 -3
  89. package/dist/features/network-modifications/voltageLevel/modification/voltageLevelModification.utils.d.ts +1 -5
  90. package/dist/features/parameters/common/ProviderParam.js +1 -0
  91. package/dist/features/parameters/common/contingency-table/columns-definitions.js +1 -0
  92. package/dist/features/parameters/common/limitreductions/limit-reduction-table-cell.js +1 -0
  93. package/dist/features/parameters/common/limitreductions/limit-reductions-table-form.js +1 -0
  94. package/dist/features/parameters/common/name-element-editor/name-element-editor-utils.js +1 -0
  95. package/dist/features/parameters/common/parameter-field.js +1 -0
  96. package/dist/features/parameters/common/parameter-table-field/parameter-table-field.js +1 -0
  97. package/dist/features/parameters/common/voltage-level-table/custom-voltage-level-table-cell.js +1 -0
  98. package/dist/features/parameters/common/widget/parameter-float.js +1 -0
  99. package/dist/features/parameters/common/widget/parameter-line-directory-items-input.js +1 -0
  100. package/dist/features/parameters/common/widget/parameter-line-slider.js +1 -0
  101. package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-form.js +1 -0
  102. package/dist/features/parameters/dynamic-margin-calculation/dynamic-margin-calculation-inline.js +1 -0
  103. package/dist/features/parameters/dynamic-margin-calculation/loads-variations-parameters.js +1 -0
  104. package/dist/features/parameters/dynamic-margin-calculation/use-dynamic-margin-calculation-parameters-form.js +2 -1
  105. package/dist/features/parameters/dynamic-security-analysis/contingency-parameters.js +1 -0
  106. package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-inline.js +1 -0
  107. package/dist/features/parameters/dynamic-security-analysis/dynamic-security-analysis-parameters-form.js +1 -0
  108. package/dist/features/parameters/dynamic-security-analysis/use-dynamic-security-analysis-parameters-form.js +1 -0
  109. package/dist/features/parameters/dynamic-simulation/dynamic-simulation-inline.js +1 -0
  110. package/dist/features/parameters/dynamic-simulation/dynamic-simulation-parameters-form.js +1 -0
  111. package/dist/features/parameters/dynamic-simulation/use-dynamic-simulation-parameters-form.js +1 -0
  112. package/dist/features/parameters/loadflow/load-flow-general-parameters.js +1 -0
  113. package/dist/features/parameters/loadflow/load-flow-parameters-content.js +1 -0
  114. package/dist/features/parameters/loadflow/load-flow-parameters-dialog.js +1 -0
  115. package/dist/features/parameters/loadflow/load-flow-parameters-form.js +1 -0
  116. package/dist/features/parameters/loadflow/load-flow-parameters-header.js +1 -0
  117. package/dist/features/parameters/loadflow/load-flow-parameters-inline.js +1 -0
  118. package/dist/features/parameters/loadflow/load-flow-parameters-utils.js +1 -0
  119. package/dist/features/parameters/loadflow/use-load-flow-parameters-form.js +1 -0
  120. package/dist/features/parameters/network-visualizations/map-parameters.js +1 -0
  121. package/dist/features/parameters/network-visualizations/network-area-diagram-parameters.js +1 -0
  122. package/dist/features/parameters/network-visualizations/network-visualizations-form.js +1 -0
  123. package/dist/features/parameters/network-visualizations/network-visualizations-parameters-dialog.js +1 -0
  124. package/dist/features/parameters/network-visualizations/network-visualizations-parameters-inline.js +1 -0
  125. package/dist/features/parameters/network-visualizations/single-line-diagram-parameters.js +1 -0
  126. package/dist/features/parameters/network-visualizations/use-network-visualizations-parameters-form.js +1 -0
  127. package/dist/features/parameters/pcc-min/pcc-min-form-utils.js +1 -0
  128. package/dist/features/parameters/pcc-min/pcc-min-parameters-dialog.js +1 -0
  129. package/dist/features/parameters/pcc-min/pcc-min-parameters-form.js +1 -0
  130. package/dist/features/parameters/pcc-min/pcc-min-parameters-inline.js +1 -0
  131. package/dist/features/parameters/pcc-min/use-pcc-min-parameters-form.js +1 -0
  132. package/dist/features/parameters/security-analysis/columns-definitions.js +1 -0
  133. package/dist/features/parameters/security-analysis/security-analysis-parameters-dialog.js +1 -0
  134. package/dist/features/parameters/security-analysis/security-analysis-parameters-form.js +1 -0
  135. package/dist/features/parameters/security-analysis/security-analysis-parameters-inline.js +1 -0
  136. package/dist/features/parameters/security-analysis/security-analysis-parameters-selector.js +1 -0
  137. package/dist/features/parameters/security-analysis/security-analysis-violations-hiding.js +1 -0
  138. package/dist/features/parameters/security-analysis/use-security-analysis-parameters-form.js +1 -0
  139. package/dist/features/parameters/sensi/columns-definitions.js +1 -0
  140. package/dist/features/parameters/sensi/sensitivity-analysis-parameters-dialog.js +1 -0
  141. package/dist/features/parameters/sensi/sensitivity-analysis-parameters-form.js +1 -0
  142. package/dist/features/parameters/sensi/sensitivity-analysis-parameters-inline.js +1 -0
  143. package/dist/features/parameters/sensi/sensitivity-parameters-fields.js +1 -0
  144. package/dist/features/parameters/sensi/sensitivity-parameters-selector.js +33 -4
  145. package/dist/features/parameters/sensi/use-sensitivity-analysis-parameters.js +1 -0
  146. package/dist/features/parameters/sensi/utils.js +1 -0
  147. package/dist/features/parameters/short-circuit/short-circuit-general-tab-panel.js +1 -0
  148. package/dist/features/parameters/short-circuit/short-circuit-icc-cluster-table-cell.js +1 -0
  149. package/dist/features/parameters/short-circuit/short-circuit-icc-material-table-cell.js +1 -0
  150. package/dist/features/parameters/short-circuit/short-circuit-parameters-content.js +1 -0
  151. package/dist/features/parameters/short-circuit/short-circuit-parameters-dialog.js +1 -0
  152. package/dist/features/parameters/short-circuit/short-circuit-parameters-form.js +1 -0
  153. package/dist/features/parameters/short-circuit/short-circuit-parameters-inline.js +1 -0
  154. package/dist/features/parameters/short-circuit/short-circuit-parameters-utils.js +1 -0
  155. package/dist/features/parameters/short-circuit/short-circuit-power-electronics-tab-panel.js +1 -0
  156. package/dist/features/parameters/short-circuit/short-circuit-study-area-tab-panel.js +1 -0
  157. package/dist/features/parameters/short-circuit/use-short-circuit-parameters-form.js +1 -0
  158. package/dist/features/parameters/voltage-init/equipment-selection-parameters.js +1 -0
  159. package/dist/features/parameters/voltage-init/general-parameters.js +1 -0
  160. package/dist/features/parameters/voltage-init/use-voltage-init-parameters-form.js +1 -0
  161. package/dist/features/parameters/voltage-init/voltage-init-form-utils.js +1 -0
  162. package/dist/features/parameters/voltage-init/voltage-init-parameters-dialog.js +1 -0
  163. package/dist/features/parameters/voltage-init/voltage-init-parameters-form.js +1 -0
  164. package/dist/features/parameters/voltage-init/voltage-init-parameters-inline.js +1 -0
  165. package/dist/features/parameters/voltage-init/voltage-limits-parameters.js +1 -0
  166. package/dist/index.js +12 -8
  167. package/dist/translations/en/commonButtonEn.d.ts +2 -0
  168. package/dist/translations/en/commonButtonEn.js +2 -0
  169. package/dist/translations/en/csvEn.d.ts +2 -1
  170. package/dist/translations/en/csvEn.js +5 -4
  171. package/dist/translations/en/networkModificationsEn.d.ts +2 -0
  172. package/dist/translations/en/networkModificationsEn.js +2 -0
  173. package/dist/translations/fr/commonButtonFr.d.ts +2 -0
  174. package/dist/translations/fr/commonButtonFr.js +2 -0
  175. package/dist/translations/fr/csvFr.d.ts +2 -1
  176. package/dist/translations/fr/csvFr.js +6 -5
  177. package/dist/translations/fr/networkModificationsFr.d.ts +2 -0
  178. package/dist/translations/fr/networkModificationsFr.js +2 -0
  179. package/dist/utils/algos.d.ts +1 -0
  180. package/dist/utils/algos.js +13 -1
  181. package/dist/utils/functions.d.ts +5 -0
  182. package/dist/utils/functions.js +5 -0
  183. package/dist/utils/index.js +6 -3
  184. package/dist/utils/langs.d.ts +1 -0
  185. package/dist/utils/langs.js +5 -1
  186. package/dist/utils/types/elementType.d.ts +1 -0
  187. package/dist/utils/types/elementType.js +1 -0
  188. package/dist/utils/types/fieldType.d.ts +2 -0
  189. package/dist/utils/types/fieldType.js +2 -0
  190. package/package.json +1 -2
  191. package/dist/components/composite/agGridTable/BottomRightButtons.d.ts +0 -14
  192. package/dist/components/composite/agGridTable/BottomRightButtons.js +0 -62
  193. package/dist/components/composite/agGridTable/csvUploader/CsvUploader.d.ts +0 -15
  194. package/dist/components/composite/agGridTable/csvUploader/CsvUploader.js +0 -182
  195. package/dist/components/composite/agGridTable/csvUploader/index.js +0 -4
@@ -1,15 +1,15 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { useEffect, useMemo, useCallback } from "react";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useEffect, useMemo, useCallback, useState, useRef } from "react";
3
3
  import { useIntl } from "react-intl";
4
4
  import { useWatch } from "react-hook-form";
5
- import { Box } from "@mui/material";
5
+ import { Grid2, Alert } from "@mui/material";
6
6
  import { v4 } from "uuid";
7
7
  import * as yup from "yup";
8
8
  import { FieldConstants } from "../../../../utils/constants/fieldConstants.js";
9
9
  import { CustomAgGridTable } from "../../agGridTable/CustomAgGridTable.js";
10
10
  import { SelectInput } from "../../../ui/reactHookForm/selectInputs/SelectInput.js";
11
11
  import { isInjection } from "../../../../utils/types/equipmentTypes.js";
12
- import { NumericEditor } from "../../agGridTable/cellEditors/numericEditor.js";
12
+ import { suppressNonNumericKeyboardEvent, NumericEditor } from "../../agGridTable/cellEditors/numericEditor.js";
13
13
  import { InputWithPopupConfirmation } from "../../../ui/reactHookForm/selectInputs/InputWithPopupConfirmation.js";
14
14
  import { toFloatOrNullValue } from "../../../ui/reactHookForm/utils/functions.js";
15
15
  import { DISTRIBUTION_KEY } from "../constants/FilterConstants.js";
@@ -18,17 +18,13 @@ import { useSnackMessage } from "../../../../hooks/useSnackMessage.js";
18
18
  import { ElementType } from "../../../../utils/types/elementType.js";
19
19
  import { ModifyElementSelection } from "../../../ui/dialogs/modifyElementSelection/ModifyElementSelection.js";
20
20
  import { exportFilter } from "../../../../services/study.js";
21
- import { unscrollableDialogStyles } from "../../../ui/dialogs/customMuiDialog/CustomMuiDialog.js";
22
- import "../../../ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
23
- import "../../../ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
21
+ import { FILTER_EQUIPMENTS_ATTRIBUTES } from "./ExplicitNamingFilterConstants.js";
24
22
  import "../../../../utils/conversionUtils.js";
25
23
  import { snackWithFallback } from "../../../../utils/error.js";
26
24
  import "../../../../utils/types/equipmentType.js";
25
+ import { LANG_SYSTEM } from "../../../../utils/langs.js";
27
26
  import "@mui/icons-material";
28
- import "@hello-pangea/dnd";
29
27
  import "../../../ui/overflowableText/OverflowableText.js";
30
- import { FILTER_EQUIPMENTS_ATTRIBUTES } from "./ExplicitNamingFilterConstants.js";
31
- import { filterStyles } from "../HeaderFilterForm.js";
32
28
  import "localized-countries";
33
29
  import "localized-countries/data/fr";
34
30
  import "localized-countries/data/en";
@@ -41,10 +37,14 @@ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
41
37
  import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
42
38
  import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
43
39
  import "@material-symbols/svg-400/outlined/add_notes.svg?react";
40
+ import "../../../ui/dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
44
41
  import "../../../ui/reactHookForm/expandableInput/ExpandableInput.js";
42
+ import "@hello-pangea/dnd";
43
+ import "../../../ui/dialogs/elementSaveDialog/ElementSaveDialog.js";
45
44
  import "../../../ui/snackbarProvider/SnackbarProvider.js";
46
45
  import "mui-nested-menu";
47
46
  import "react-resizable-panels";
47
+ import { CsvPicker } from "../../../ui/csvPicker/csv-picker.js";
48
48
  const explicitNamingFilterSchema = {
49
49
  [FILTER_EQUIPMENTS_ATTRIBUTES]: yup.array().of(
50
50
  yup.object().shape({
@@ -118,6 +118,7 @@ function ExplicitNamingFilterForm({
118
118
  editable: true,
119
119
  singleClickEdit: true,
120
120
  cellEditor: NumericEditor,
121
+ suppressKeyboardEvent: suppressNonNumericKeyboardEvent,
121
122
  flex: 1
122
123
  });
123
124
  }
@@ -129,25 +130,35 @@ function ExplicitNamingFilterForm({
129
130
  }),
130
131
  []
131
132
  );
132
- const csvFileHeaders = useMemo(() => {
133
- const newCsvFileHeaders = [intl.formatMessage({ id: FieldConstants.EQUIPMENT_ID })];
134
- if (forGeneratorBatteryOrLoad) {
135
- newCsvFileHeaders.push(intl.formatMessage({ id: DISTRIBUTION_KEY }));
136
- }
137
- return newCsvFileHeaders;
138
- }, [intl, forGeneratorBatteryOrLoad]);
139
- const getDataFromCsvFile = useCallback((csvData) => {
140
- if (csvData) {
141
- return csvData.map((value) => {
142
- return {
143
- [FieldConstants.AG_GRID_ROW_UUID]: v4(),
144
- [FieldConstants.EQUIPMENT_ID]: value[0]?.trim(),
145
- [DISTRIBUTION_KEY]: toFloatOrNullValue(value[1]?.trim())
146
- };
147
- });
148
- }
149
- return [];
150
- }, []);
133
+ const csvFileHeaders = useMemo(() => columnDefs.map((c) => c.headerName), [columnDefs]);
134
+ const getDataFromCsvFile = useCallback(
135
+ (csvData) => {
136
+ const [equipmentIdHeader, distributionKeyHeader] = csvFileHeaders;
137
+ return csvData.map((row) => ({
138
+ [FieldConstants.AG_GRID_ROW_UUID]: v4(),
139
+ [FieldConstants.EQUIPMENT_ID]: row[equipmentIdHeader]?.trim() ?? null,
140
+ [DISTRIBUTION_KEY]: distributionKeyHeader ? toFloatOrNullValue(row[distributionKeyHeader]?.trim()) : null
141
+ }));
142
+ },
143
+ [csvFileHeaders]
144
+ );
145
+ const [selectedFile, setSelectedFile] = useState();
146
+ const [fileErrorMessage, setFileErrorMessage] = useState();
147
+ const tableRef = useRef(null);
148
+ useEffect(() => {
149
+ setSelectedFile(void 0);
150
+ setFileErrorMessage(void 0);
151
+ }, [watchEquipmentType]);
152
+ const getTemplateData = useCallback(() => [csvFileHeaders], [csvFileHeaders]);
153
+ const getTableData = useCallback(() => {
154
+ const rows = getValues(FILTER_EQUIPMENTS_ATTRIBUTES) ?? [];
155
+ return [
156
+ csvFileHeaders,
157
+ ...rows.map(
158
+ (r) => forGeneratorBatteryOrLoad ? [r[FieldConstants.EQUIPMENT_ID] ?? "", r[DISTRIBUTION_KEY] ?? ""] : [r[FieldConstants.EQUIPMENT_ID] ?? ""]
159
+ )
160
+ ];
161
+ }, [csvFileHeaders, forGeneratorBatteryOrLoad, getValues]);
151
162
  const openConfirmationPopup = () => {
152
163
  return getValues(FILTER_EQUIPMENTS_ATTRIBUTES).some(
153
164
  (row) => row[DISTRIBUTION_KEY] || row[FieldConstants.EQUIPMENT_ID]
@@ -170,69 +181,89 @@ function ExplicitNamingFilterForm({
170
181
  (error) => snackWithFallback(snackError, error, { headerId: "convertIntoExplicitNamingFilterError" })
171
182
  );
172
183
  };
173
- return /* @__PURE__ */ jsxs(Fragment, { children: [
174
- /* @__PURE__ */ jsxs(Box, { sx: unscrollableDialogStyles.unscrollableHeader, children: [
175
- /* @__PURE__ */ jsx(
176
- InputWithPopupConfirmation,
177
- {
178
- Input: SelectInput,
179
- name: FieldConstants.EQUIPMENT_TYPE,
180
- options: Object.values(FILTER_EQUIPMENTS),
181
- disabled: !!sourceFilterForExplicitNamingConversion || isEditing && !isDeveloperMode,
182
- label: "equipmentType",
183
- shouldOpenPopup: openConfirmationPopup,
184
- resetOnConfirmation: handleResetOnConfirmation,
185
- message: "changeTypeMessage",
186
- validateButtonLabel: "button.changeType",
187
- sx: filterStyles.textField,
188
- "data-testid": "EquipmentTypeSelector"
189
- }
190
- ),
191
- sourceFilterForExplicitNamingConversion && /* @__PURE__ */ jsx(
192
- ModifyElementSelection,
193
- {
194
- elementType: ElementType.STUDY,
195
- onElementValidated: onStudySelected,
196
- dialogOpeningButtonLabel: "selectStudyDialogButton",
197
- dialogTitleLabel: "selectStudyDialogTitle",
198
- dialogMessageLabel: "selectStudyText",
199
- noElementMessageLabel: "noSelectedStudyText"
200
- }
201
- )
202
- ] }),
203
- watchEquipmentType && /* @__PURE__ */ jsx(
204
- CustomAgGridTable,
205
- {
206
- name: FILTER_EQUIPMENTS_ATTRIBUTES,
207
- columnDefs,
208
- defaultColDef,
209
- makeDefaultRowData,
210
- pagination: true,
211
- paginationPageSize: 100,
212
- rowSelection: {
213
- mode: "multiRow",
214
- enableClickSelection: false,
215
- checkboxes: true,
216
- headerCheckbox: true
217
- },
218
- alwaysShowVerticalScroll: true,
219
- csvProps: {
220
- fileName: intl.formatMessage({
221
- id: "filterCsvFileName"
222
- }),
223
- fileHeaders: csvFileHeaders,
224
- getDataFromCsv: getDataFromCsvFile,
225
- language
226
- },
227
- cssProps: {
228
- padding: 1,
229
- "& .ag-root-wrapper-body": {
230
- maxHeight: "unset"
184
+ return /* @__PURE__ */ jsxs(
185
+ Grid2,
186
+ {
187
+ container: true,
188
+ direction: "column",
189
+ spacing: 2,
190
+ padding: 1,
191
+ sx: { flexGrow: 1, flexWrap: "nowrap", minHeight: 0 },
192
+ children: [
193
+ /* @__PURE__ */ jsxs(Grid2, { container: true, justifyContent: "space-between", alignItems: "center", children: [
194
+ /* @__PURE__ */ jsxs(Grid2, { children: [
195
+ /* @__PURE__ */ jsx(
196
+ InputWithPopupConfirmation,
197
+ {
198
+ Input: SelectInput,
199
+ name: FieldConstants.EQUIPMENT_TYPE,
200
+ options: Object.values(FILTER_EQUIPMENTS),
201
+ disabled: !!sourceFilterForExplicitNamingConversion || isEditing && !isDeveloperMode,
202
+ label: "equipmentType",
203
+ shouldOpenPopup: openConfirmationPopup,
204
+ resetOnConfirmation: handleResetOnConfirmation,
205
+ message: "changeTypeMessage",
206
+ validateButtonLabel: "button.changeType",
207
+ sx: { width: 400, maxWidth: "100%" },
208
+ "data-testid": "EquipmentTypeSelector"
209
+ }
210
+ ),
211
+ sourceFilterForExplicitNamingConversion && /* @__PURE__ */ jsx(
212
+ ModifyElementSelection,
213
+ {
214
+ elementType: ElementType.STUDY,
215
+ onElementValidated: onStudySelected,
216
+ dialogOpeningButtonLabel: "selectStudyDialogButton",
217
+ dialogTitleLabel: "selectStudyDialogTitle",
218
+ dialogMessageLabel: "selectStudyText",
219
+ noElementMessageLabel: "noSelectedStudyText"
220
+ }
221
+ )
222
+ ] }),
223
+ /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(
224
+ CsvPicker,
225
+ {
226
+ label: "UploadCSV",
227
+ header: csvFileHeaders,
228
+ language: language ?? LANG_SYSTEM,
229
+ disabled: !watchEquipmentType,
230
+ selectedFile,
231
+ onFileChange: setSelectedFile,
232
+ onFileError: setFileErrorMessage,
233
+ getTableData: () => getValues(FILTER_EQUIPMENTS_ATTRIBUTES),
234
+ onAppend: (results) => tableRef.current?.append(getDataFromCsvFile(results.data)),
235
+ onReplace: (results) => tableRef.current?.replace(getDataFromCsvFile(results.data))
236
+ }
237
+ ) })
238
+ ] }),
239
+ fileErrorMessage && /* @__PURE__ */ jsx(Grid2, { children: /* @__PURE__ */ jsx(Alert, { severity: "error", children: fileErrorMessage }) }),
240
+ watchEquipmentType && /* @__PURE__ */ jsx(Grid2, { sx: { flexGrow: 1, minHeight: 0, display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ jsx(
241
+ CustomAgGridTable,
242
+ {
243
+ ref: tableRef,
244
+ name: FILTER_EQUIPMENTS_ATTRIBUTES,
245
+ columnDefs,
246
+ defaultColDef,
247
+ makeDefaultRowData,
248
+ pagination: true,
249
+ rowSelection: {
250
+ mode: "multiRow",
251
+ enableClickSelection: false,
252
+ checkboxes: true,
253
+ headerCheckbox: true
254
+ },
255
+ alwaysShowVerticalScroll: true,
256
+ csvProps: {
257
+ fileName: intl.formatMessage({ id: "filterCsvFileName" }),
258
+ language,
259
+ getTemplateData,
260
+ getTableData
261
+ }
231
262
  }
232
- }
233
- }
234
- )
235
- ] });
263
+ ) })
264
+ ]
265
+ }
266
+ );
236
267
  }
237
268
  export {
238
269
  ExplicitNamingFilterForm,
@@ -43,10 +43,9 @@ import { GroupValueEditor } from "./reactQueryBuilder/compositeRuleEditor/GroupV
43
43
  import { RuleValueEditor } from "./reactQueryBuilder/compositeRuleEditor/RuleValueEditor.js";
44
44
  import { useConvertValue } from "./reactQueryBuilder/hooks/useConvertValue.js";
45
45
  import { useValid } from "./reactQueryBuilder/hooks/useValid.js";
46
- import { BottomRightButtons } from "./agGridTable/BottomRightButtons.js";
46
+ import { BottomTableButtons } from "./agGridTable/BottomTableButtons.js";
47
47
  import { CustomAgGridTable } from "./agGridTable/CustomAgGridTable.js";
48
- import { NumericEditor } from "./agGridTable/cellEditors/numericEditor.js";
49
- import { CsvUploader } from "./agGridTable/csvUploader/CsvUploader.js";
48
+ import { NumericEditor, suppressNonNumericKeyboardEvent } from "./agGridTable/cellEditors/numericEditor.js";
50
49
  import { CUSTOM_AGGRID_THEME, styles } from "./customAGGrid/customAggrid.style.js";
51
50
  import { CustomAGGrid } from "./customAGGrid/customAggrid.js";
52
51
  import { SeparatorCellRenderer } from "./customAGGrid/separatorCellRenderer.js";
@@ -55,7 +54,7 @@ export {
55
54
  AutocompleteWithFavorites,
56
55
  BooleanCellRenderer,
57
56
  BooleanNullableCellRenderer,
58
- BottomRightButtons,
57
+ BottomTableButtons,
59
58
  COMBINATOR_OPTIONS,
60
59
  CONTINGENCY_LIST_EQUIPMENTS,
61
60
  CONVERTERS_MODE_OPTIONS,
@@ -64,7 +63,6 @@ export {
64
63
  CombinatorType,
65
64
  ContingencyCellRenderer,
66
65
  CountryValueEditor,
67
- CsvUploader,
68
66
  CustomAGGrid,
69
67
  CustomAgGridTable,
70
68
  CustomReactQueryBuilder,
@@ -139,6 +137,7 @@ export {
139
137
  saveExpertFilter,
140
138
  saveExplicitNamingFilter,
141
139
  styles,
140
+ suppressNonNumericKeyboardEvent,
142
141
  testQuery,
143
142
  useConvertValue,
144
143
  useElementSearch,
@@ -68,6 +68,7 @@ import { ResizeHandle } from "./ui/resizablePanels/ResizeHandle.js";
68
68
  import { CsvExport } from "./ui/csvDownloader/csv-export.js";
69
69
  import { ExportCsvButton } from "./ui/csvDownloader/export-csv-button.js";
70
70
  import { fetchCsvSeparator, useCsvExport } from "./ui/csvDownloader/use-csv-export.js";
71
+ import { CsvPicker } from "./ui/csvPicker/csv-picker.js";
71
72
  import { TreeViewFinder, generateTreeViewFinderClass } from "./ui/treeViewFinder/TreeViewFinder.js";
72
73
  import { doesNodeHasChildren } from "./ui/treeViewFinder/TreeViewUtils.js";
73
74
  import { DirectoryItemSelector } from "./ui/directoryItemSelector/DirectoryItemSelector.js";
@@ -116,10 +117,9 @@ import { GroupValueEditor } from "./composite/reactQueryBuilder/compositeRuleEdi
116
117
  import { RuleValueEditor } from "./composite/reactQueryBuilder/compositeRuleEditor/RuleValueEditor.js";
117
118
  import { useConvertValue } from "./composite/reactQueryBuilder/hooks/useConvertValue.js";
118
119
  import { useValid } from "./composite/reactQueryBuilder/hooks/useValid.js";
119
- import { BottomRightButtons } from "./composite/agGridTable/BottomRightButtons.js";
120
+ import { BottomTableButtons } from "./composite/agGridTable/BottomTableButtons.js";
120
121
  import { CustomAgGridTable } from "./composite/agGridTable/CustomAgGridTable.js";
121
- import { NumericEditor } from "./composite/agGridTable/cellEditors/numericEditor.js";
122
- import { CsvUploader } from "./composite/agGridTable/csvUploader/CsvUploader.js";
122
+ import { NumericEditor, suppressNonNumericKeyboardEvent } from "./composite/agGridTable/cellEditors/numericEditor.js";
123
123
  import { CUSTOM_AGGRID_THEME, styles } from "./composite/customAGGrid/customAggrid.style.js";
124
124
  import { CustomAGGrid } from "./composite/customAGGrid/customAggrid.js";
125
125
  import { SeparatorCellRenderer } from "./composite/customAGGrid/separatorCellRenderer.js";
@@ -135,7 +135,7 @@ export {
135
135
  BooleanCellRenderer,
136
136
  BooleanInput,
137
137
  BooleanNullableCellRenderer,
138
- BottomRightButtons,
138
+ BottomTableButtons,
139
139
  ButtonReadOnlyInput,
140
140
  COMBINATOR_OPTIONS,
141
141
  CONTINGENCY_LIST_EQUIPMENTS,
@@ -153,7 +153,7 @@ export {
153
153
  CountrySelectionInput,
154
154
  CountryValueEditor,
155
155
  CsvExport,
156
- CsvUploader,
156
+ CsvPicker,
157
157
  CustomAGGrid,
158
158
  CustomAgGridTable,
159
159
  CustomFormContext,
@@ -296,6 +296,7 @@ export {
296
296
  saveExpertFilter,
297
297
  saveExplicitNamingFilter,
298
298
  styles,
299
+ suppressNonNumericKeyboardEvent,
299
300
  testQuery,
300
301
  toFloatOrNullValue,
301
302
  unscrollableDialogStyles,
@@ -2,7 +2,7 @@ import { useCallback } from "react";
2
2
  import { useIntl } from "react-intl";
3
3
  import "../../../utils/conversionUtils.js";
4
4
  import "../../../utils/types/equipmentType.js";
5
- import { LANG_FRENCH } from "../../../utils/langs.js";
5
+ import { getCsvDelimiter, LANG_FRENCH } from "../../../utils/langs.js";
6
6
  import "react/jsx-runtime";
7
7
  import "@mui/icons-material";
8
8
  import { fetchStudyMetadata } from "../../../services/appsMetadata.js";
@@ -37,7 +37,7 @@ const useCsvExport = () => {
37
37
  return tableName.trim().replace(/[\\/:"*?<>|\s]/g, "-").substring(0, 27);
38
38
  };
39
39
  const prefix = props.tableNamePrefix ?? "";
40
- const defaultSeparator = props.language === LANG_FRENCH ? ";" : ",";
40
+ const defaultSeparator = getCsvDelimiter(props.language);
41
41
  const columnSeparatorValue = props.isCopyCsv ? await fetchCsvSeparator() ?? defaultSeparator : defaultSeparator;
42
42
  return props.getData({
43
43
  suppressQuotes: false,
@@ -0,0 +1,11 @@
1
+ import { ParseResult } from 'papaparse';
2
+ export interface CsvPickerConfirmationDialogProps<TData = unknown> {
3
+ pendingImport: {
4
+ results: ParseResult<TData>;
5
+ file: File;
6
+ } | null;
7
+ onReplace: (results: ParseResult<TData>, file: File) => void;
8
+ onAppend: (results: ParseResult<TData>, file: File) => void;
9
+ onClose: () => void;
10
+ }
11
+ export declare function CsvPickerConfirmationDialog<TData = unknown>({ pendingImport, onReplace, onAppend, onClose, }: CsvPickerConfirmationDialogProps<TData>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,65 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useIntl, FormattedMessage } from "react-intl";
3
+ import { Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions, Button } from "@mui/material";
4
+ import "../overflowableText/OverflowableText.js";
5
+ import "../../../utils/conversionUtils.js";
6
+ import "../../../utils/types/equipmentType.js";
7
+ import "@mui/icons-material";
8
+ import "react";
9
+ import "react-hook-form";
10
+ import "localized-countries";
11
+ import "localized-countries/data/fr";
12
+ import "localized-countries/data/en";
13
+ import "notistack";
14
+ import "../reactHookForm/provider/CustomFormProvider.js";
15
+ import { CancelButton } from "../reactHookForm/utils/CancelButton.js";
16
+ import "yup";
17
+ import "../treeViewFinder/TreeViewFinder.js";
18
+ import "../reactHookForm/numbers/RangeInput.js";
19
+ import "@material-symbols/svg-400/outlined/left_panel_open.svg?react";
20
+ import "@material-symbols/svg-400/outlined/arrows_output.svg?react";
21
+ import "@material-symbols/svg-400/outlined/arrows_input.svg?react";
22
+ import "@material-symbols/svg-400/outlined/left_panel_close.svg?react";
23
+ import "@material-symbols/svg-400/outlined/add_notes.svg?react";
24
+ import "../dialogs/descriptionModificationDialog/DescriptionModificationDialog.js";
25
+ import "../reactHookForm/expandableInput/ExpandableInput.js";
26
+ function CsvPickerConfirmationDialog({
27
+ pendingImport,
28
+ onReplace,
29
+ onAppend,
30
+ onClose
31
+ }) {
32
+ const intl = useIntl();
33
+ return /* @__PURE__ */ jsxs(Dialog, { open: pendingImport !== null, "aria-labelledby": "csv-picker-confirmation", children: [
34
+ /* @__PURE__ */ jsx(DialogTitle, { id: "csv-picker-confirmation", children: "Confirmation" }),
35
+ /* @__PURE__ */ jsx(DialogContent, { children: /* @__PURE__ */ jsx(DialogContentText, { children: intl.formatMessage({ id: "keepCSVDataMessage" }) }) }),
36
+ /* @__PURE__ */ jsxs(DialogActions, { children: [
37
+ /* @__PURE__ */ jsx(CancelButton, { onClick: onClose }),
38
+ /* @__PURE__ */ jsx(
39
+ Button,
40
+ {
41
+ variant: "outlined",
42
+ onClick: () => {
43
+ onReplace(pendingImport.results, pendingImport.file);
44
+ onClose();
45
+ },
46
+ children: /* @__PURE__ */ jsx(FormattedMessage, { id: "replace" })
47
+ }
48
+ ),
49
+ /* @__PURE__ */ jsx(
50
+ Button,
51
+ {
52
+ variant: "outlined",
53
+ onClick: () => {
54
+ onAppend(pendingImport.results, pendingImport.file);
55
+ onClose();
56
+ },
57
+ children: /* @__PURE__ */ jsx(FormattedMessage, { id: "add" })
58
+ }
59
+ )
60
+ ] })
61
+ ] });
62
+ }
63
+ export {
64
+ CsvPickerConfirmationDialog
65
+ };
@@ -0,0 +1,24 @@
1
+ import { ParseConfig, ParseResult } from 'papaparse';
2
+ type CsvPickerCallbacks<TData> = {
3
+ onComplete: (results: ParseResult<TData>, file: File) => void;
4
+ onAppend?: never;
5
+ onReplace?: never;
6
+ } | {
7
+ onComplete?: never;
8
+ onAppend: (results: ParseResult<TData>, file: File) => void;
9
+ onReplace: (results: ParseResult<TData>, file: File) => void;
10
+ };
11
+ export type CsvPickerProps<TData = unknown> = {
12
+ label: string;
13
+ header: string[];
14
+ maxLineNumber?: number;
15
+ disabled?: boolean;
16
+ language: string;
17
+ parseConfig?: Partial<ParseConfig<TData>>;
18
+ selectedFile?: File;
19
+ onFileChange: (file: File | undefined) => void;
20
+ onFileError: (error: string | undefined) => void;
21
+ getTableData?: () => unknown[];
22
+ } & 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-runtime").JSX.Element;
24
+ export {};
@@ -0,0 +1,123 @@
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { useState, useCallback } from "react";
3
+ import { useIntl, FormattedMessage } from "react-intl";
4
+ import { Button } from "@mui/material";
5
+ import { useCSVReader } from "react-papaparse";
6
+ import { equalsArrayAnyOrder } from "../../../utils/algos.js";
7
+ import "../../../utils/conversionUtils.js";
8
+ import "../../../utils/types/equipmentType.js";
9
+ import { hasNonEmptyRows } from "../../../utils/functions.js";
10
+ import { getCsvDelimiter } from "../../../utils/langs.js";
11
+ import "@mui/icons-material";
12
+ import { CsvPickerConfirmationDialog } from "./csv-picker-confirmation-dialog.js";
13
+ function CsvPicker({
14
+ label,
15
+ header,
16
+ maxLineNumber,
17
+ disabled = false,
18
+ language,
19
+ parseConfig,
20
+ selectedFile,
21
+ onFileChange,
22
+ onFileError,
23
+ onComplete,
24
+ onAppend,
25
+ onReplace,
26
+ getTableData
27
+ }) {
28
+ const intl = useIntl();
29
+ const { CSVReader } = useCSVReader();
30
+ const [pendingImport, setPendingImport] = useState(null);
31
+ const handleUploadAccepted = useCallback(
32
+ (results, acceptedFile) => {
33
+ if (results.data.length === 0) {
34
+ onFileError(intl.formatMessage({ id: "noDataInCsvFile" }, { filename: acceptedFile.name }));
35
+ } else if (!equalsArrayAnyOrder(header, Object.keys(results.data[0]))) {
36
+ console.warn("Wrong CSV headers");
37
+ console.warn("Expected:", header);
38
+ console.warn("Actual:", Object.keys(results.data[0]));
39
+ onFileError(intl.formatMessage({ id: "wrongCsvHeadersError" }, { filename: acceptedFile.name }));
40
+ } else if (maxLineNumber && results.data.length > maxLineNumber) {
41
+ onFileError(
42
+ intl.formatMessage(
43
+ { id: "tooManyLinesInCsvFile" },
44
+ { value: maxLineNumber, filename: acceptedFile.name }
45
+ )
46
+ );
47
+ } else {
48
+ onFileError(void 0);
49
+ if (onAppend && onReplace) {
50
+ if (hasNonEmptyRows(getTableData?.())) {
51
+ setPendingImport({ results, file: acceptedFile });
52
+ } else {
53
+ onReplace(results, acceptedFile);
54
+ onFileChange(acceptedFile);
55
+ }
56
+ } else {
57
+ onComplete?.(results, acceptedFile);
58
+ onFileChange(acceptedFile);
59
+ }
60
+ }
61
+ },
62
+ [header, intl, maxLineNumber, onAppend, onComplete, onFileChange, onFileError, onReplace, getTableData]
63
+ );
64
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
65
+ /* @__PURE__ */ jsx(
66
+ CSVReader,
67
+ {
68
+ config: {
69
+ header: true,
70
+ skipEmptyLines: true,
71
+ comments: "#",
72
+ delimiter: getCsvDelimiter(language),
73
+ ...parseConfig
74
+ },
75
+ onUploadAccepted: handleUploadAccepted,
76
+ children: ({ getRootProps, ProgressBar }) => /* @__PURE__ */ jsxs(Fragment, { children: [
77
+ /* @__PURE__ */ jsx(
78
+ "span",
79
+ {
80
+ style: {
81
+ marginRight: "10px",
82
+ fontWeight: "bold"
83
+ },
84
+ children: selectedFile ? selectedFile.name : intl.formatMessage({ id: "uploadMessage" })
85
+ }
86
+ ),
87
+ /* @__PURE__ */ jsxs(Button, { ...getRootProps(), variant: "outlined", disabled, children: [
88
+ /* @__PURE__ */ jsx(FormattedMessage, { id: label }),
89
+ /* @__PURE__ */ jsx(
90
+ ProgressBar,
91
+ {
92
+ style: {
93
+ position: "absolute",
94
+ inset: 0,
95
+ width: "100%",
96
+ height: "100%"
97
+ }
98
+ }
99
+ )
100
+ ] })
101
+ ] })
102
+ }
103
+ ),
104
+ onAppend && onReplace && /* @__PURE__ */ jsx(
105
+ CsvPickerConfirmationDialog,
106
+ {
107
+ pendingImport,
108
+ onReplace: (r, f) => {
109
+ onReplace(r, f);
110
+ onFileChange(f);
111
+ },
112
+ onAppend: (r, f) => {
113
+ onAppend(r, f);
114
+ onFileChange(f);
115
+ },
116
+ onClose: () => setPendingImport(null)
117
+ }
118
+ )
119
+ ] });
120
+ }
121
+ export {
122
+ CsvPicker
123
+ };
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Copyright (c) 2024, RTE (http://www.rte-france.com)
2
+ * Copyright (c) 2026, RTE (http://www.rte-france.com)
3
3
  * This Source Code Form is subject to the terms of the Mozilla Public
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 './CsvUploader';
7
+ export * from './csv-picker';
@@ -0,0 +1,4 @@
1
+ import { CsvPicker } from "./csv-picker.js";
2
+ export {
3
+ CsvPicker
4
+ };
@@ -25,6 +25,7 @@ export type ElementSaveDialogProps = {
25
25
  onSave: (data: IElementCreationDialog) => void;
26
26
  OnUpdate?: (data: IElementUpdateDialog) => void;
27
27
  prefixIdForGeneratedName?: string;
28
+ defaultName?: string | null;
28
29
  initialOperation?: OperationType;
29
30
  selectorTitleId?: string;
30
31
  createLabelId?: string;
@@ -52,5 +53,5 @@ export type ElementSaveDialogProps = {
52
53
  /** or directly a given directory */
53
54
  initDirectory?: ElementAttributes;
54
55
  });
55
- export declare function ElementSaveDialog({ open, onSave, OnUpdate, onClose, type, titleId, prefixIdForGeneratedName, studyUuid, initDirectory, initialOperation, selectorTitleId, createLabelId, updateLabelId, createOnlyMode, }: Readonly<ElementSaveDialogProps>): import("react/jsx-runtime").JSX.Element;
56
+ export declare function ElementSaveDialog({ open, onSave, OnUpdate, onClose, type, titleId, prefixIdForGeneratedName, defaultName, studyUuid, initDirectory, initialOperation, selectorTitleId, createLabelId, updateLabelId, createOnlyMode, }: Readonly<ElementSaveDialogProps>): import("react/jsx-runtime").JSX.Element;
56
57
  export {};