nmrium 2.2.0 → 2.3.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 (273) hide show
  1. package/lib/component/1d/PredictionErrorsNotations.js +3 -3
  2. package/lib/component/1d/PredictionErrorsNotations.js.map +1 -1
  3. package/lib/component/1d/peaks/Peaks.d.ts.map +1 -1
  4. package/lib/component/1d/peaks/Peaks.js +2 -1
  5. package/lib/component/1d/peaks/Peaks.js.map +1 -1
  6. package/lib/component/1d/peaks/usePeakShapesPath.d.ts.map +1 -1
  7. package/lib/component/1d/peaks/usePeakShapesPath.js.map +1 -1
  8. package/lib/component/1d/ranges/AssignmentLabel.js +1 -1
  9. package/lib/component/1d/ranges/AssignmentLabel.js.map +1 -1
  10. package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.d.ts +9 -0
  11. package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.d.ts.map +1 -0
  12. package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.js +138 -0
  13. package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.js.map +1 -0
  14. package/lib/component/1d/ranges/FloatingRanges.d.ts.map +1 -0
  15. package/lib/component/1d/ranges/FloatingRanges.js +362 -0
  16. package/lib/component/1d/ranges/FloatingRanges.js.map +1 -0
  17. package/lib/component/1d/ranges/Ranges.js +2 -2
  18. package/lib/component/1d/ranges/Ranges.js.map +1 -1
  19. package/lib/component/1d-2d/FieldEdition.d.ts +2 -2
  20. package/lib/component/1d-2d/FieldEdition.d.ts.map +1 -1
  21. package/lib/component/1d-2d/FieldEdition.js +2 -2
  22. package/lib/component/1d-2d/FieldEdition.js.map +1 -1
  23. package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +7 -7
  24. package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js.map +1 -1
  25. package/lib/component/2d/zones/SignalsGuideLines.js +1 -1
  26. package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
  27. package/lib/component/2d/zones/ZonesAssignmentsLabels.js +1 -1
  28. package/lib/component/2d/zones/ZonesAssignmentsLabels.js.map +1 -1
  29. package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
  30. package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
  31. package/lib/component/SVGTable.d.ts +5 -3
  32. package/lib/component/SVGTable.d.ts.map +1 -1
  33. package/lib/component/SVGTable.js +16 -16
  34. package/lib/component/SVGTable.js.map +1 -1
  35. package/lib/component/context/KeyModifierContext.d.ts.map +1 -1
  36. package/lib/component/context/KeyModifierContext.js.map +1 -1
  37. package/lib/component/context/LoggerContext.d.ts.map +1 -1
  38. package/lib/component/context/LoggerContext.js.map +1 -1
  39. package/lib/component/context/SortSpectraContext.d.ts.map +1 -1
  40. package/lib/component/context/SortSpectraContext.js.map +1 -1
  41. package/lib/component/elements/ActionsButtonsPopover.d.ts +2 -2
  42. package/lib/component/elements/ActionsButtonsPopover.d.ts.map +1 -1
  43. package/lib/component/elements/ActionsButtonsPopover.js +6 -9
  44. package/lib/component/elements/ActionsButtonsPopover.js.map +1 -1
  45. package/lib/component/elements/Button.d.ts.map +1 -1
  46. package/lib/component/elements/Button.js.map +1 -1
  47. package/lib/component/elements/Sections.d.ts.map +1 -1
  48. package/lib/component/elements/Sections.js.map +1 -1
  49. package/lib/component/elements/TabTitle.d.ts.map +1 -1
  50. package/lib/component/elements/TabTitle.js +2 -2
  51. package/lib/component/elements/TabTitle.js.map +1 -1
  52. package/lib/component/elements/ToolbarPopoverItem.d.ts +1 -0
  53. package/lib/component/elements/ToolbarPopoverItem.d.ts.map +1 -1
  54. package/lib/component/elements/ToolbarPopoverItem.js +10 -3
  55. package/lib/component/elements/ToolbarPopoverItem.js.map +1 -1
  56. package/lib/component/elements/dropDownButton/DropDownButton.d.ts.map +1 -1
  57. package/lib/component/elements/dropDownButton/DropDownButton.js +2 -2
  58. package/lib/component/elements/dropDownButton/DropDownButton.js.map +1 -1
  59. package/lib/component/elements/export/ExportOptionsModal.d.ts +1 -1
  60. package/lib/component/elements/export/ExportOptionsModal.d.ts.map +1 -1
  61. package/lib/component/elements/export/ExportOptionsModal.js +31 -110
  62. package/lib/component/elements/export/ExportOptionsModal.js.map +1 -1
  63. package/lib/component/elements/export/units.d.ts +0 -28
  64. package/lib/component/elements/export/units.d.ts.map +1 -1
  65. package/lib/component/elements/export/units.js +0 -5
  66. package/lib/component/elements/export/units.js.map +1 -1
  67. package/lib/component/elements/export/utilities/getExportOptions.d.ts.map +1 -1
  68. package/lib/component/elements/export/utilities/getExportOptions.js.map +1 -1
  69. package/lib/component/elements/print/pageSize.d.ts +1 -1
  70. package/lib/component/elements/print/pageSize.d.ts.map +1 -1
  71. package/lib/component/hooks/useExport.d.ts.map +1 -1
  72. package/lib/component/hooks/useExport.js.map +1 -1
  73. package/lib/component/hooks/usePanelPreferences.d.ts +3 -3
  74. package/lib/component/hooks/usePanelPreferences.d.ts.map +1 -1
  75. package/lib/component/hooks/useTextMetrics.d.ts.map +1 -1
  76. package/lib/component/hooks/useTextMetrics.js +1 -0
  77. package/lib/component/hooks/useTextMetrics.js.map +1 -1
  78. package/lib/component/main/NMRiumViewer.js +1 -1
  79. package/lib/component/main/NMRiumViewer.js.map +1 -1
  80. package/lib/component/modal/EditPeakShapeModal.js +2 -2
  81. package/lib/component/modal/EditPeakShapeModal.js.map +1 -1
  82. package/lib/component/modal/SaveAsModal.d.ts +2 -2
  83. package/lib/component/modal/SaveAsModal.d.ts.map +1 -1
  84. package/lib/component/modal/SaveAsModal.js +43 -35
  85. package/lib/component/modal/SaveAsModal.js.map +1 -1
  86. package/lib/component/modal/editRange/EditRangeModal.js +4 -3
  87. package/lib/component/modal/editRange/EditRangeModal.js.map +1 -1
  88. package/lib/component/modal/editRange/forms/components/NewSignalTab.js +2 -2
  89. package/lib/component/modal/editRange/forms/components/NewSignalTab.js.map +1 -1
  90. package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +5 -5
  91. package/lib/component/modal/setting/tanstack_general_settings/errors/context.js +3 -3
  92. package/lib/component/modal/setting/tanstack_general_settings/errors/context.js.map +1 -1
  93. package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts +5 -5
  94. package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.js +2 -2
  95. package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.js.map +1 -1
  96. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +5 -5
  97. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.js +2 -2
  98. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.js.map +1 -1
  99. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +5 -5
  100. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.js +2 -2
  101. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.js.map +1 -1
  102. package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +5 -5
  103. package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.js +2 -2
  104. package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.js.map +1 -1
  105. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.d.ts +14 -14
  106. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js +2 -2
  107. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js.map +1 -1
  108. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts.map +1 -1
  109. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.js +3 -2
  110. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.js.map +1 -1
  111. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts.map +1 -1
  112. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.js +3 -2
  113. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.js.map +1 -1
  114. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
  115. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +30 -3
  116. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
  117. package/lib/component/panels/PeaksPanel/PeaksPreferences.js +18 -18
  118. package/lib/component/panels/PeaksPanel/PeaksPreferences.js.map +1 -1
  119. package/lib/component/panels/PeaksPanel/PeaksTable.js +11 -11
  120. package/lib/component/panels/PeaksPanel/PeaksTable.js.map +1 -1
  121. package/lib/component/panels/RangesPanel/RangesHeader.d.ts.map +1 -1
  122. package/lib/component/panels/RangesPanel/RangesHeader.js.map +1 -1
  123. package/lib/component/panels/RangesPanel/RangesPreferences.js +22 -22
  124. package/lib/component/panels/RangesPanel/RangesPreferences.js.map +1 -1
  125. package/lib/component/panels/RangesPanel/RangesTable.d.ts +2 -2
  126. package/lib/component/panels/RangesPanel/RangesTable.d.ts.map +1 -1
  127. package/lib/component/panels/RangesPanel/RangesTable.js +5 -4
  128. package/lib/component/panels/RangesPanel/RangesTable.js.map +1 -1
  129. package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +2 -2
  130. package/lib/component/panels/RangesPanel/RangesTableRow.js +2 -2
  131. package/lib/component/panels/RangesPanel/RangesTableRow.js.map +1 -1
  132. package/lib/component/panels/SpectraPanel/SpectraTable.d.ts.map +1 -1
  133. package/lib/component/panels/SpectraPanel/SpectraTable.js +5 -1
  134. package/lib/component/panels/SpectraPanel/SpectraTable.js.map +1 -1
  135. package/lib/component/panels/SpectraPanel/base/RenderAsHTML.d.ts.map +1 -1
  136. package/lib/component/panels/SpectraPanel/base/RenderAsHTML.js +7 -4
  137. package/lib/component/panels/SpectraPanel/base/RenderAsHTML.js.map +1 -1
  138. package/lib/component/panels/SpectraPanel/base/SpectrumName.d.ts.map +1 -1
  139. package/lib/component/panels/SpectraPanel/base/SpectrumName.js +5 -1
  140. package/lib/component/panels/SpectraPanel/base/SpectrumName.js.map +1 -1
  141. package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.d.ts.map +1 -1
  142. package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.js +2 -2
  143. package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.js.map +1 -1
  144. package/lib/component/panels/SummaryPanel/SummaryPanel.d.ts.map +1 -1
  145. package/lib/component/panels/SummaryPanel/SummaryPanel.js.map +1 -1
  146. package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts +3 -2
  147. package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts.map +1 -1
  148. package/lib/component/panels/hooks/useMoleculeAnnotationCore.js +14 -8
  149. package/lib/component/panels/hooks/useMoleculeAnnotationCore.js.map +1 -1
  150. package/lib/component/panels/informationPanel/MixedValuesBadge.d.ts.map +1 -1
  151. package/lib/component/panels/informationPanel/MixedValuesBadge.js +2 -2
  152. package/lib/component/panels/informationPanel/MixedValuesBadge.js.map +1 -1
  153. package/lib/component/panels/informationPanel/SpectraPicker.d.ts.map +1 -1
  154. package/lib/component/panels/informationPanel/SpectraPicker.js +2 -2
  155. package/lib/component/panels/informationPanel/SpectraPicker.js.map +1 -1
  156. package/lib/component/reducer/actions/DomainActions.d.ts.map +1 -1
  157. package/lib/component/reducer/actions/DomainActions.js.map +1 -1
  158. package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
  159. package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
  160. package/lib/component/reducer/actions/LoadAction.d.ts.map +1 -1
  161. package/lib/component/reducer/actions/LoadAction.js.map +1 -1
  162. package/lib/component/reducer/helper/setRangesViewProperty.d.ts.map +1 -1
  163. package/lib/component/reducer/helper/setRangesViewProperty.js.map +1 -1
  164. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts.map +1 -1
  165. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +35 -26
  166. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js.map +1 -1
  167. package/lib/component/reducer/preferences/preferencesReducer.d.ts +2 -2
  168. package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
  169. package/lib/component/reducer/preferences/utilities/initWorkspace.d.ts +2 -2
  170. package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts +2 -2
  171. package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts.map +1 -1
  172. package/lib/component/toolbar/ToolTypes.d.ts +2 -2
  173. package/lib/component/utility/export.d.ts.map +1 -1
  174. package/lib/component/utility/export.js +1 -0
  175. package/lib/component/utility/export.js.map +1 -1
  176. package/lib/data/PredictionManager.js.map +1 -1
  177. package/lib/data/constants/signalsKinds.d.ts +1 -2
  178. package/lib/data/constants/signalsKinds.d.ts.map +1 -1
  179. package/lib/data/data1d/multipleSpectraAnalysis.d.ts +2 -2
  180. package/lib/data/matrixGeneration.d.ts.map +1 -1
  181. package/lib/data/matrixGeneration.js.map +1 -1
  182. package/lib/versionInfo.js +1 -1
  183. package/package.json +30 -31
  184. package/src/component/1d/PredictionErrorsNotations.tsx +5 -4
  185. package/src/component/1d/peaks/Peaks.tsx +5 -2
  186. package/src/component/1d/peaks/usePeakShapesPath.ts +0 -1
  187. package/src/component/1d/ranges/AssignmentLabel.tsx +1 -1
  188. package/src/component/1d/ranges/FloatingRangeTablePreferencesModal.tsx +238 -0
  189. package/src/component/1d/ranges/FloatingRanges.tsx +529 -0
  190. package/src/component/1d/ranges/Ranges.tsx +2 -2
  191. package/src/component/1d-2d/FieldEdition.tsx +4 -4
  192. package/src/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.tsx +8 -8
  193. package/src/component/2d/zones/SignalsGuideLines.tsx +1 -1
  194. package/src/component/2d/zones/ZonesAssignmentsLabels.tsx +1 -1
  195. package/src/component/EventsTrackers/BrushTracker.tsx +1 -2
  196. package/src/component/SVGTable.tsx +35 -33
  197. package/src/component/context/KeyModifierContext.tsx +1 -2
  198. package/src/component/context/LoggerContext.tsx +1 -7
  199. package/src/component/context/SortSpectraContext.tsx +1 -3
  200. package/src/component/elements/ActionsButtonsPopover.tsx +12 -14
  201. package/src/component/elements/Button.tsx +1 -6
  202. package/src/component/elements/Sections.tsx +5 -3
  203. package/src/component/elements/TabTitle.tsx +7 -5
  204. package/src/component/elements/ToolbarPopoverItem.tsx +13 -2
  205. package/src/component/elements/dropDownButton/DropDownButton.tsx +7 -5
  206. package/src/component/elements/export/ExportOptionsModal.tsx +56 -276
  207. package/src/component/elements/export/units.ts +0 -6
  208. package/src/component/elements/export/utilities/getExportOptions.ts +1 -0
  209. package/src/component/elements/print/pageSize.ts +1 -1
  210. package/src/component/hooks/useExport.tsx +1 -3
  211. package/src/component/hooks/usePanelPreferences.ts +4 -4
  212. package/src/component/hooks/useTextMetrics.ts +1 -0
  213. package/src/component/main/NMRiumViewer.tsx +1 -1
  214. package/src/component/modal/EditPeakShapeModal.tsx +2 -2
  215. package/src/component/modal/SaveAsModal.tsx +89 -82
  216. package/src/component/modal/editRange/EditRangeModal.tsx +6 -4
  217. package/src/component/modal/editRange/forms/components/NewSignalTab.tsx +3 -3
  218. package/src/component/modal/setting/WorkspaceItem.tsx +2 -2
  219. package/src/component/modal/setting/tanstack_general_settings/errors/context.tsx +3 -3
  220. package/src/component/modal/setting/tanstack_general_settings/errors/renderer.tsx +2 -2
  221. package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.tsx +2 -2
  222. package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.tsx +2 -2
  223. package/src/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.tsx +2 -2
  224. package/src/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.tsx +2 -2
  225. package/src/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.tsx +3 -2
  226. package/src/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.tsx +3 -2
  227. package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +41 -8
  228. package/src/component/panels/PeaksPanel/PeaksPreferences.tsx +18 -18
  229. package/src/component/panels/PeaksPanel/PeaksTable.tsx +11 -11
  230. package/src/component/panels/RangesPanel/RangesHeader.tsx +1 -2
  231. package/src/component/panels/RangesPanel/RangesPanel.tsx +2 -2
  232. package/src/component/panels/RangesPanel/RangesPreferences.tsx +22 -22
  233. package/src/component/panels/RangesPanel/RangesTable.tsx +19 -17
  234. package/src/component/panels/RangesPanel/RangesTableRow.tsx +25 -25
  235. package/src/component/panels/SpectraPanel/SpectraTable.tsx +12 -1
  236. package/src/component/panels/SpectraPanel/base/RenderAsHTML.tsx +22 -4
  237. package/src/component/panels/SpectraPanel/base/SpectrumName.tsx +15 -6
  238. package/src/component/panels/SpectraPanel/base/setting/SpectrumSetting.tsx +3 -2
  239. package/src/component/panels/SummaryPanel/SummaryPanel.tsx +1 -5
  240. package/src/component/panels/hooks/useMoleculeAnnotationCore.ts +17 -9
  241. package/src/component/panels/informationPanel/MixedValuesBadge.tsx +3 -2
  242. package/src/component/panels/informationPanel/SpectraPicker.tsx +12 -4
  243. package/src/component/panels/multipleAnalysisPanel/AnalysisChart.tsx +2 -2
  244. package/src/component/reducer/actions/DomainActions.ts +1 -4
  245. package/src/component/reducer/actions/FiltersActions.ts +1 -2
  246. package/src/component/reducer/actions/LoadAction.ts +1 -3
  247. package/src/component/reducer/helper/setRangesViewProperty.ts +1 -2
  248. package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +32 -19
  249. package/src/component/reducer/preferences/preferencesReducer.ts +2 -2
  250. package/src/component/reducer/preferences/utilities/initWorkspace.ts +2 -2
  251. package/src/component/reducer/preferences/utilities/mapWorkspaces.ts +2 -2
  252. package/src/component/toolbar/ToolTypes.ts +2 -2
  253. package/src/component/utility/export.ts +1 -0
  254. package/src/data/PredictionManager.ts +4 -6
  255. package/src/data/constants/signalsKinds.ts +1 -1
  256. package/src/data/data1d/multipleSpectraAnalysis.ts +2 -2
  257. package/src/data/matrixGeneration.ts +1 -5
  258. package/src/versionInfo.ts +1 -1
  259. package/lib/component/1d/FloatingRanges.d.ts.map +0 -1
  260. package/lib/component/1d/FloatingRanges.js +0 -263
  261. package/lib/component/1d/FloatingRanges.js.map +0 -1
  262. package/lib/component/elements/export/utilities/exportOptionValidationSchema.d.ts +0 -17
  263. package/lib/component/elements/export/utilities/exportOptionValidationSchema.d.ts.map +0 -1
  264. package/lib/component/elements/export/utilities/exportOptionValidationSchema.js +0 -79
  265. package/lib/component/elements/export/utilities/exportOptionValidationSchema.js.map +0 -1
  266. package/lib/component/elements/export/utilities/getModes.d.ts +0 -4
  267. package/lib/component/elements/export/utilities/getModes.d.ts.map +0 -1
  268. package/lib/component/elements/export/utilities/getModes.js +0 -11
  269. package/lib/component/elements/export/utilities/getModes.js.map +0 -1
  270. package/src/component/1d/FloatingRanges.tsx +0 -378
  271. package/src/component/elements/export/utilities/exportOptionValidationSchema.ts +0 -106
  272. package/src/component/elements/export/utilities/getModes.ts +0 -14
  273. /package/lib/component/1d/{FloatingRanges.d.ts → ranges/FloatingRanges.d.ts} +0 -0
@@ -1,52 +1,48 @@
1
- import { Checkbox, DialogFooter, Radio, RadioGroup } from '@blueprintjs/core';
1
+ import { DialogBody, DialogFooter } from '@blueprintjs/core';
2
+ import { revalidateLogic } from '@tanstack/react-form';
2
3
  import { useMemo } from 'react';
3
- import { Controller, useForm } from 'react-hook-form';
4
+ import { Button, Form, useForm } from 'react-science/ui';
5
+ import { z } from 'zod/v4';
4
6
 
5
7
  import { DataExportOptions } from '../../data/SpectraManager.js';
6
8
  import { useChartData } from '../context/ChartContext.js';
7
- import ActionButtons from '../elements/ActionButtons.js';
8
- import { Input2Controller } from '../elements/Input2Controller.js';
9
- import type { LabelStyle } from '../elements/Label.js';
10
- import Label from '../elements/Label.js';
11
9
  import { StandardDialog } from '../elements/StandardDialog.tsx';
12
- import { StyledDialogBody } from '../elements/StyledDialogBody.js';
13
- import type { SaveOptions } from '../hooks/useExport.js';
14
10
  import { useExport } from '../hooks/useExport.js';
15
11
 
16
- const INITIAL_VALUE: SaveOptions = {
12
+ const formSchema = z.object({
13
+ name: z.string().min(1, { error: 'Name is required' }),
14
+ include: z.object({
15
+ dataType: z.enum([
16
+ 'NO_DATA',
17
+ 'SELF_CONTAINED',
18
+ 'SELF_CONTAINED_EXTERNAL_DATASOURCE',
19
+ ]),
20
+ view: z.boolean(),
21
+ settings: z.boolean(),
22
+ }),
23
+ });
24
+
25
+ const INITIAL_VALUE: z.input<typeof formSchema> = {
17
26
  name: '',
18
27
  include: {
19
- dataType: DataExportOptions.SELF_CONTAINED,
28
+ dataType: 'SELF_CONTAINED',
20
29
  view: false,
21
30
  settings: false,
22
31
  },
23
32
  };
24
33
 
25
- const labelStyle: LabelStyle = {
26
- label: {
27
- flex: 4,
28
- color: '#232323',
29
- },
30
- wrapper: {
31
- flex: 8,
32
- display: 'flex',
33
- justifyContent: 'flex-start',
34
- },
35
- container: { padding: '5px 0' },
36
- };
37
-
38
34
  interface InnerSaveAsModalProps {
39
35
  onCloseDialog: () => void;
40
36
  }
37
+
41
38
  interface SaveAsModalProps extends InnerSaveAsModalProps {
42
39
  isOpen: boolean;
43
40
  }
44
41
 
45
- function SaveAsModal(props: SaveAsModalProps) {
42
+ export default function SaveAsModal(props: SaveAsModalProps) {
46
43
  const { onCloseDialog, isOpen } = props;
47
44
 
48
45
  if (!isOpen) return;
49
-
50
46
  return <InnerSaveAsModal onCloseDialog={onCloseDialog} />;
51
47
  }
52
48
 
@@ -54,21 +50,35 @@ function InnerSaveAsModal(props: InnerSaveAsModalProps) {
54
50
  const { onCloseDialog } = props;
55
51
  const { data, aggregator } = useChartData();
56
52
  const { saveHandler } = useExport();
57
- const fileName = data[0]?.info?.name;
58
53
 
59
- function submitHandler(values: SaveOptions) {
60
- saveHandler(values);
61
- onCloseDialog?.();
62
- }
54
+ const form = useForm({
55
+ defaultValues: { ...INITIAL_VALUE, name: data[0]?.info?.name },
56
+ validators: { onDynamic: formSchema },
57
+ validationLogic: revalidateLogic({ modeAfterSubmission: 'change' }),
58
+ onSubmit: ({ value }) => {
59
+ const parsedValue = formSchema.parse(value);
60
+ saveHandler(parsedValue);
63
61
 
64
- const { handleSubmit, control, register } = useForm({
65
- defaultValues: { ...INITIAL_VALUE, name: fileName },
62
+ onCloseDialog();
63
+ },
66
64
  });
67
65
 
68
66
  const containsLinkedFiles = useMemo(() => {
69
67
  return aggregator.sources.some((s) => !s.baseURL?.startsWith('ium:'));
70
68
  }, [aggregator]);
71
69
 
70
+ const options = useMemo(() => {
71
+ return [
72
+ { value: DataExportOptions.SELF_CONTAINED, label: 'Embed data' },
73
+ {
74
+ value: DataExportOptions.SELF_CONTAINED_EXTERNAL_DATASOURCE,
75
+ label: 'Link data',
76
+ disabled: !containsLinkedFiles,
77
+ },
78
+ { value: DataExportOptions.NO_DATA, label: 'None' },
79
+ ];
80
+ }, [containsLinkedFiles]);
81
+
72
82
  return (
73
83
  <StandardDialog
74
84
  isOpen
@@ -76,57 +86,54 @@ function InnerSaveAsModal(props: InnerSaveAsModalProps) {
76
86
  onClose={onCloseDialog}
77
87
  style={{ width: 600 }}
78
88
  >
79
- <StyledDialogBody>
80
- <Label style={labelStyle} title="Name">
81
- <Input2Controller
82
- name="name"
83
- control={control}
84
- fill
85
- controllerProps={{ rules: { required: true } }}
86
- />
87
- </Label>
88
- <Label style={labelStyle} title="Include view">
89
- <Checkbox style={{ margin: 0 }} {...register(`include.view`)} />
90
- </Label>
91
- <Label style={labelStyle} title="Include workspace">
92
- <Checkbox style={{ margin: 0 }} {...register(`include.settings`)} />
93
- </Label>
94
- <Label style={labelStyle} title="Include data">
95
- <Controller
96
- name="include.dataType"
97
- control={control}
98
- render={({ field }) => {
99
- const { value, ref, ...otherFieldProps } = field;
100
- return (
101
- <RadioGroup inline selectedValue={value} {...otherFieldProps}>
102
- <Radio
103
- label="External data embed"
104
- value={DataExportOptions.SELF_CONTAINED}
105
- />
106
- <Radio
107
- label="External data linked"
108
- disabled={!containsLinkedFiles}
109
- value={DataExportOptions.SELF_CONTAINED_EXTERNAL_DATASOURCE}
110
- />
111
- <Radio label="No data" value={DataExportOptions.NO_DATA} />
112
- </RadioGroup>
113
- );
114
- }}
115
- />
116
- </Label>
117
- </StyledDialogBody>
118
- <DialogFooter>
119
- <ActionButtons
120
- style={{ flexDirection: 'row-reverse', margin: 0 }}
121
- onDone={() => {
122
- void handleSubmit(submitHandler)();
89
+ <form.AppForm>
90
+ <Form
91
+ layout="inline"
92
+ noValidate
93
+ onSubmit={(event) => {
94
+ event.preventDefault();
95
+ void form.handleSubmit();
123
96
  }}
124
- doneLabel="Save"
125
- onCancel={() => onCloseDialog?.()}
126
- />
127
- </DialogFooter>
97
+ >
98
+ <DialogBody style={{ backgroundColor: 'white' }}>
99
+ <form.Section title="General information">
100
+ <form.AppField name="name">
101
+ {(field) => <field.Input label="Name" required autoFocus />}
102
+ </form.AppField>
103
+ </form.Section>
104
+ <form.Section title="Include">
105
+ <form.AppField name="include.view">
106
+ {(field) => <field.Checkbox label="View" />}
107
+ </form.AppField>
108
+
109
+ <form.AppField name="include.settings">
110
+ {(field) => <field.Checkbox label="Workspace" />}
111
+ </form.AppField>
112
+
113
+ <form.AppField name="include.dataType">
114
+ {(field) => (
115
+ <field.RadioGroup inline label="Data" options={options} />
116
+ )}
117
+ </form.AppField>
118
+ </form.Section>
119
+ </DialogBody>
120
+
121
+ <DialogFooter
122
+ actions={
123
+ <>
124
+ <Button
125
+ variant="outlined"
126
+ intent="danger"
127
+ onClick={() => onCloseDialog?.()}
128
+ >
129
+ Cancel
130
+ </Button>
131
+ <form.SubmitButton intent="success">Save</form.SubmitButton>
132
+ </>
133
+ }
134
+ />
135
+ </Form>
136
+ </form.AppForm>
128
137
  </StandardDialog>
129
138
  );
130
139
  }
131
-
132
- export default SaveAsModal;
@@ -67,7 +67,7 @@ function InnerEditRangeModal(props: InnerEditRangeModalProps) {
67
67
  const dispatch = useDispatch();
68
68
  const range = useRange(rangeID);
69
69
  const originalRangeRef = useRef(range);
70
- const rangesPreferences = usePanelPreferences('ranges', activeTab);
70
+ const preferences = usePanelPreferences('ranges', activeTab);
71
71
 
72
72
  function handleOnZoom() {
73
73
  onZoom(range);
@@ -113,14 +113,16 @@ function InnerEditRangeModal(props: InnerEditRangeModalProps) {
113
113
  },
114
114
  });
115
115
 
116
- if (!rangesPreferences || !range) {
116
+ if (!preferences || !range) {
117
117
  return;
118
118
  }
119
119
 
120
+ const { tablePreferences } = preferences;
121
+
120
122
  const title = ` Range and Signal edition: ${formatNumber(
121
123
  range?.from,
122
- rangesPreferences.from.format,
123
- )} ppm to ${formatNumber(range?.to, rangesPreferences.to.format)} ppm`;
124
+ tablePreferences.from.format,
125
+ )} ppm to ${formatNumber(range?.to, tablePreferences.to.format)} ppm`;
124
126
 
125
127
  return (
126
128
  <TabsProvider defaultSelectedTabId={0}>
@@ -42,7 +42,7 @@ export function NewSignalTab(props: NewSignalTabProps) {
42
42
  const { selectedTabId: signalIndex, selectTab } = useTabsController();
43
43
  const { signals } = useWatch();
44
44
  const activeTab = useActiveNucleusTab();
45
- const rangesPreferences = usePanelPreferences('ranges', activeTab);
45
+ const { tablePreferences } = usePanelPreferences('ranges', activeTab);
46
46
 
47
47
  function saveHandler(val: any) {
48
48
  const newSignal = {
@@ -95,8 +95,8 @@ export function NewSignalTab(props: NewSignalTabProps) {
95
95
  Edit or select a delta value of new signal in range [
96
96
  {`${formatNumber(
97
97
  range.from,
98
- rangesPreferences.from.format,
99
- )} ppm - ${formatNumber(range.to, rangesPreferences.to.format)} ppm`}
98
+ tablePreferences.from.format,
99
+ )} ppm - ${formatNumber(range.to, tablePreferences.to.format)} ppm`}
100
100
  ]:
101
101
  </p>
102
102
  <NumberInput2Controller
@@ -1,4 +1,4 @@
1
- import type { WorkSpaceSource } from '@zakodium/nmrium-core';
1
+ import type { WorkspaceSource } from '@zakodium/nmrium-core';
2
2
  import type { CSSProperties, ChangeEvent, MouseEvent } from 'react';
3
3
  import { useState } from 'react';
4
4
  import { Button } from 'react-science/ui';
@@ -115,7 +115,7 @@ const style = {
115
115
  alignItems: 'center',
116
116
  };
117
117
 
118
- const WorkspaceIndicator = (props: { source: WorkSpaceSource }) => {
118
+ const WorkspaceIndicator = (props: { source: WorkspaceSource }) => {
119
119
  let letter = '';
120
120
  let backgroundColor = 'red';
121
121
 
@@ -1,4 +1,4 @@
1
- import { useStore } from '@tanstack/react-form';
1
+ import { useSelector } from '@tanstack/react-store';
2
2
  import type { Dispatch, ReactNode, SetStateAction } from 'react';
3
3
  import {
4
4
  createContext,
@@ -38,9 +38,9 @@ export const GeneralSettingsErrorsOpenProvider = withForm({
38
38
  render: function GeneralSettingsErrorsOpenProvider({ form, children }) {
39
39
  const [isOpen, setIsOpen] = useState(false);
40
40
 
41
- const submitCount = useStore(form.store, (s) => s.submissionAttempts);
41
+ const submitCount = useSelector(form.store, (s) => s.submissionAttempts);
42
42
  const previousSubmitCount = useRef(submitCount);
43
- const errorsCount = useStore(form.store, (s) => {
43
+ const errorsCount = useSelector(form.store, (s) => {
44
44
  const recordErrors = s.errorMap.onDynamic;
45
45
  if (!recordErrors) return 0;
46
46
 
@@ -1,6 +1,6 @@
1
1
  import { Callout, Collapse } from '@blueprintjs/core';
2
2
  import styled from '@emotion/styled';
3
- import { useStore } from '@tanstack/react-form';
3
+ import { useSelector } from '@tanstack/react-store';
4
4
  import { Button, withForm } from 'react-science/ui';
5
5
 
6
6
  import {
@@ -15,7 +15,7 @@ export const GeneralSettingsErrorRenderer = withForm({
15
15
  validators: { onDynamic: workspaceValidation },
16
16
  render: function GeneralSettingsErrorRenderer({ form }) {
17
17
  const { isOpen, setIsOpen } = useErrors();
18
- const errors = useStore(form.store, (state) => {
18
+ const errors = useSelector(form.store, (state) => {
19
19
  return Object.values(state.errorMap.onDynamic ?? {}).flat();
20
20
  });
21
21
 
@@ -1,6 +1,6 @@
1
1
  import { Classes, Tab, Tabs as BPTabs } from '@blueprintjs/core';
2
2
  import styled from '@emotion/styled';
3
- import { useStore } from '@tanstack/react-form';
3
+ import { useSelector } from '@tanstack/react-store';
4
4
  import { withForm } from 'react-science/ui';
5
5
 
6
6
  import { StyledDialogBody } from '../../../elements/StyledDialogBody.js';
@@ -54,7 +54,7 @@ export const GeneralSettingsDialogBody = withForm({
54
54
  height: undefined as number | undefined,
55
55
  },
56
56
  render: function GeneralSettingsDialogBody({ height, form }) {
57
- const isExperimentalEnabled = useStore(
57
+ const isExperimentalEnabled = useSelector(
58
58
  form.store,
59
59
  (state) =>
60
60
  state.values.display.general?.experimentalFeatures?.display ?? false,
@@ -1,6 +1,6 @@
1
1
  import { Classes } from '@blueprintjs/core';
2
2
  import styled from '@emotion/styled';
3
- import { useStore } from '@tanstack/react-form';
3
+ import { useSelector } from '@tanstack/react-store';
4
4
  import { Button, withForm } from 'react-science/ui';
5
5
 
6
6
  import { useErrors } from './errors/context.tsx';
@@ -12,7 +12,7 @@ export const GeneralSettingsDialogHeader = withForm({
12
12
  defaultValues: defaultGeneralSettingsFormValues,
13
13
  render: function GeneralSettingsDialogHeader({ form }) {
14
14
  const { reset, store } = form;
15
- const formValues = useStore(store, (state) => state.values);
15
+ const formValues = useSelector(store, (state) => state.values);
16
16
 
17
17
  return (
18
18
  <DialogHeader className={Classes.DIALOG_HEADER}>
@@ -1,4 +1,4 @@
1
- import { useStore } from '@tanstack/react-form';
1
+ import { useSelector } from '@tanstack/react-store';
2
2
  import { withFieldGroup, withForm } from 'react-science/ui';
3
3
  import type { z } from 'zod';
4
4
 
@@ -9,7 +9,7 @@ import { defaultGeneralSettingsFormValues } from '../validation.ts';
9
9
  export const AutoProcessingTab = withForm({
10
10
  defaultValues: defaultGeneralSettingsFormValues,
11
11
  render: function Render({ form }) {
12
- const isExperimentalFeatures = useStore(
12
+ const isExperimentalFeatures = useSelector(
13
13
  form.store,
14
14
  (state) => state.values.display.general?.experimentalFeatures?.display,
15
15
  );
@@ -1,5 +1,5 @@
1
1
  import { Checkbox, Tag } from '@blueprintjs/core';
2
- import { useStore } from '@tanstack/react-form';
2
+ import { useSelector } from '@tanstack/react-store';
3
3
  import type { PageSizeName, Unit } from '@zakodium/nmrium-core';
4
4
  import { units } from '@zakodium/nmrium-core';
5
5
  import { memo, useMemo } from 'react';
@@ -77,7 +77,7 @@ function safeStringNumber(str: string, onInvalid: (str: string) => void) {
77
77
  export const ExportFields = withFieldGroup({
78
78
  defaultValues: defaultGeneralSettingsFormValues.export.png,
79
79
  render: function ExportFields({ group }) {
80
- const inputValues = useStore(group.store, (s) => s.values);
80
+ const inputValues = useSelector(group.store, (s) => s.values);
81
81
  const outputValues = useMemo(() => {
82
82
  return exportSettingsValidation.decode(inputValues);
83
83
  }, [inputValues]);
@@ -1,6 +1,7 @@
1
1
  import { Classes } from '@blueprintjs/core';
2
2
  import styled from '@emotion/styled';
3
- import { useField, useStore } from '@tanstack/react-form';
3
+ import { useField } from '@tanstack/react-form';
4
+ import { useSelector } from '@tanstack/react-store';
4
5
  import { useCallback, useMemo, useState } from 'react';
5
6
  import { FaRegTrashAlt } from 'react-icons/fa';
6
7
  import {
@@ -163,7 +164,7 @@ const TableFields = withForm({
163
164
  [setValue],
164
165
  );
165
166
 
166
- const fieldsData = useStore(store, (s) => s.value);
167
+ const fieldsData = useSelector(store, (s) => s.value);
167
168
 
168
169
  return (
169
170
  <TableSection
@@ -1,6 +1,7 @@
1
1
  import { Classes } from '@blueprintjs/core';
2
2
  import styled from '@emotion/styled';
3
- import { useField, useStore } from '@tanstack/react-form';
3
+ import { useField } from '@tanstack/react-form';
4
+ import { useSelector } from '@tanstack/react-store';
4
5
  import { useCallback, useMemo, useState } from 'react';
5
6
  import { FaRegTrashAlt } from 'react-icons/fa';
6
7
  import {
@@ -180,7 +181,7 @@ const TableFields = withForm({
180
181
 
181
182
  // It seems fields.setValue don't always trigger rerender
182
183
  // so fields.state.value can de-sync and cause weird behavior with DnD reorder.
183
- const fieldsData = useStore(store, (s) => s.value);
184
+ const fieldsData = useSelector(store, (s) => s.value);
184
185
 
185
186
  return (
186
187
  <TableSection
@@ -8,8 +8,10 @@ import {
8
8
  FaDownload,
9
9
  FaFileExport,
10
10
  FaFileImage,
11
+ FaMinusSquare,
11
12
  FaPaste,
12
13
  FaPlus,
14
+ FaPlusSquare,
13
15
  FaRegBookmark,
14
16
  FaRegTrashAlt,
15
17
  } from 'react-icons/fa';
@@ -112,6 +114,7 @@ const MOL_EXPORT_MENU: Array<ToolbarPopoverMenuItem<ExportDataItem>> = [
112
114
  },
113
115
  },
114
116
  ];
117
+
115
118
  interface MoleculePanelHeaderProps {
116
119
  currentIndex: number;
117
120
  molecules: StateMoleculeExtended[];
@@ -146,6 +149,9 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
146
149
  const { dialog, openDialog, closeDialog } = useDialogToggle({
147
150
  autoLabelDatabaseDialog: false,
148
151
  });
152
+ const { toggleAtomAnnotation, isActiveAnnotation, setAtomAnnotation } =
153
+ useMoleculeAnnotationCore(moleculeKey, moleculesView[moleculeKey]);
154
+
149
155
  const saveAsSVGHandler = useCallback(() => {
150
156
  if (!rootRef) return;
151
157
  exportAsSVG(`molSVG${currentIndex}`, {
@@ -318,6 +324,25 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
318
324
  payload: { id, label, molfile: molecule.toMolfileV3() },
319
325
  });
320
326
  }
327
+ function toggleProchirality(action: 'add' | 'remove') {
328
+ const molecule = molecules[currentIndex];
329
+
330
+ setAtomAnnotation('custom-labels');
331
+
332
+ if (!molecule) return;
333
+
334
+ const { id, label } = molecule;
335
+ if (action === 'add') {
336
+ topicMolecule[id].setProchiralHydrogenLabels();
337
+ } else {
338
+ topicMolecule[id].removeProchiralHydrogenLabels();
339
+ }
340
+
341
+ dispatch({
342
+ type: 'SET_MOLECULE',
343
+ payload: { id, label, molfile: topicMolecule[id].toMolfile() },
344
+ });
345
+ }
321
346
 
322
347
  function autoLabels() {
323
348
  const currentMolecule = molecules[currentIndex];
@@ -371,10 +396,18 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
371
396
  text: 'Template database',
372
397
  onClick: () => openDialog('autoLabelDatabaseDialog'),
373
398
  },
399
+ {
400
+ icon: <FaPlusSquare />,
401
+ text: 'Add prochirality',
402
+ onClick: () => toggleProchirality('add'),
403
+ },
404
+ {
405
+ icon: <FaMinusSquare />,
406
+ text: 'Remove prochirality',
407
+ onClick: () => toggleProchirality('remove'),
408
+ },
374
409
  ];
375
410
 
376
- const { handleChangeAtomAnnotation, isAnnotation } =
377
- useMoleculeAnnotationCore(moleculeKey, moleculesView[moleculeKey]);
378
411
  return (
379
412
  <PanelHeader
380
413
  onClickSettings={onClickPreferences}
@@ -422,23 +455,23 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
422
455
  )}
423
456
 
424
457
  <Toolbar.Item
425
- tooltip={`${booleanToString(!isAnnotation('atom-numbers'))} atom number`}
458
+ tooltip={`${booleanToString(!isActiveAnnotation('atom-numbers'))} atom number`}
426
459
  icon={<MdNumbers />}
427
- onClick={() => handleChangeAtomAnnotation('atom-numbers')}
428
- active={isAnnotation('atom-numbers')}
460
+ onClick={() => toggleAtomAnnotation('atom-numbers')}
461
+ active={isActiveAnnotation('atom-numbers')}
429
462
  disabled={!hasMolecules}
430
463
  />
431
464
  <Toolbar.Item
432
465
  tooltip={
433
466
  <TooltipHelpContent
434
- title={`${booleanToString(!isAnnotation('custom-labels'), { trueLabel: 'Display' })} custom atom labels`}
467
+ title={`${booleanToString(!isActiveAnnotation('custom-labels'), { trueLabel: 'Display' })} custom atom labels`}
435
468
  description="Custom atom labels can be displayed or hidden on the molecule structure"
436
469
  link="https://docs.nmrium.org/help/structure-labelling/"
437
470
  />
438
471
  }
439
472
  icon={<FaRegBookmark />}
440
- onClick={() => handleChangeAtomAnnotation('custom-labels')}
441
- active={isAnnotation('custom-labels')}
473
+ onClick={() => toggleAtomAnnotation('custom-labels')}
474
+ active={isActiveAnnotation('custom-labels')}
442
475
  disabled={!hasMolecules}
443
476
  />
444
477
  </>
@@ -21,66 +21,66 @@ const formatFields: NucleusPreferenceField[] = [
21
21
  {
22
22
  id: 1,
23
23
  label: 'Serial number :',
24
- checkFieldName: 'showSerialNumber',
24
+ checkFieldName: 'tablePreferences.showSerialNumber',
25
25
  hideFormatField: true,
26
26
  },
27
27
  {
28
28
  id: 2,
29
29
  label: 'δ (ppm) :',
30
- checkFieldName: 'deltaPPM.show',
31
- formatFieldName: 'deltaPPM.format',
30
+ checkFieldName: 'tablePreferences.deltaPPM.show',
31
+ formatFieldName: 'tablePreferences.deltaPPM.format',
32
32
  },
33
33
  {
34
34
  id: 3,
35
35
  label: 'δ (Hz) :',
36
- checkFieldName: 'deltaHz.show',
37
- formatFieldName: 'deltaHz.format',
36
+ checkFieldName: 'tablePreferences.deltaHz.show',
37
+ formatFieldName: 'tablePreferences.deltaHz.format',
38
38
  },
39
39
  {
40
40
  id: 4,
41
41
  label: 'Peak Width (Hz)',
42
- checkFieldName: 'peakWidth.show',
43
- formatFieldName: 'peakWidth.format',
42
+ checkFieldName: 'tablePreferences.peakWidth.show',
43
+ formatFieldName: 'tablePreferences.peakWidth.format',
44
44
  },
45
45
  {
46
46
  id: 5,
47
47
  label: 'Intensity :',
48
- checkFieldName: 'intensity.show',
49
- formatFieldName: 'intensity.format',
48
+ checkFieldName: 'tablePreferences.intensity.show',
49
+ formatFieldName: 'tablePreferences.intensity.format',
50
50
  },
51
51
  {
52
52
  id: 6,
53
53
  label: 'kind :',
54
- checkFieldName: 'fwhm.show',
54
+ checkFieldName: 'tablePreferences.fwhm.show',
55
55
  },
56
56
  {
57
57
  id: 7,
58
58
  label: 'fwhm :',
59
- checkFieldName: 'fwhm.show',
60
- formatFieldName: 'fwhm.format',
59
+ checkFieldName: 'tablePreferences.fwhm.show',
60
+ formatFieldName: 'tablePreferences.fwhm.format',
61
61
  },
62
62
  {
63
63
  id: 8,
64
64
  label: 'mu :',
65
- checkFieldName: 'mu.show',
66
- formatFieldName: 'mu.format',
65
+ checkFieldName: 'tablePreferences.mu.show',
66
+ formatFieldName: 'tablePreferences.mu.format',
67
67
  },
68
68
  {
69
69
  id: 11,
70
70
  label: 'gamma :',
71
- checkFieldName: 'gamma.show',
72
- formatFieldName: 'gamma.format',
71
+ checkFieldName: 'tablePreferences.gamma.show',
72
+ formatFieldName: 'tablePreferences.gamma.format',
73
73
  },
74
74
  {
75
75
  id: 9,
76
76
  label: 'Delete action :',
77
- checkFieldName: 'showDeleteAction',
77
+ checkFieldName: 'tablePreferences.showDeleteAction',
78
78
  hideFormatField: true,
79
79
  },
80
80
  {
81
81
  id: 10,
82
82
  label: 'Edit peak shape action :',
83
- checkFieldName: 'showEditPeakShapeAction',
83
+ checkFieldName: 'tablePreferences.showEditPeakShapeAction',
84
84
  hideFormatField: true,
85
85
  },
86
86
  ];