nmrium 2.3.0 → 2.5.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 (372) hide show
  1. package/lib/component/1d/HorizontalAxis1D.d.ts.map +1 -1
  2. package/lib/component/1d/HorizontalAxis1D.js +4 -1
  3. package/lib/component/1d/HorizontalAxis1D.js.map +1 -1
  4. package/lib/component/1d/SVGContent1D.d.ts.map +1 -1
  5. package/lib/component/1d/SVGContent1D.js +2 -1
  6. package/lib/component/1d/SVGContent1D.js.map +1 -1
  7. package/lib/component/1d/Viewer1D.d.ts.map +1 -1
  8. package/lib/component/1d/Viewer1D.js +2 -1
  9. package/lib/component/1d/Viewer1D.js.map +1 -1
  10. package/lib/component/1d/integral/IntegralResizable.d.ts.map +1 -1
  11. package/lib/component/1d/integral/IntegralResizable.js +4 -4
  12. package/lib/component/1d/integral/IntegralResizable.js.map +1 -1
  13. package/lib/component/1d/peaks/PeakEditionManager.d.ts +1 -1
  14. package/lib/component/1d/ranges/Range.d.ts.map +1 -1
  15. package/lib/component/1d/ranges/Range.js +3 -3
  16. package/lib/component/1d/ranges/Range.js.map +1 -1
  17. package/lib/component/1d/ranges/Signals.d.ts +2 -0
  18. package/lib/component/1d/ranges/Signals.d.ts.map +1 -0
  19. package/lib/component/1d/ranges/Signals.js +16 -0
  20. package/lib/component/1d/ranges/Signals.js.map +1 -0
  21. package/lib/component/1d-2d/components/RangeIndicator.d.ts +13 -0
  22. package/lib/component/1d-2d/components/RangeIndicator.d.ts.map +1 -0
  23. package/lib/component/1d-2d/components/RangeIndicator.js +52 -0
  24. package/lib/component/1d-2d/components/RangeIndicator.js.map +1 -0
  25. package/lib/component/1d-2d/components/Signals1D.d.ts +19 -0
  26. package/lib/component/1d-2d/components/Signals1D.d.ts.map +1 -0
  27. package/lib/component/1d-2d/components/Signals1D.js +155 -0
  28. package/lib/component/1d-2d/components/Signals1D.js.map +1 -0
  29. package/lib/component/1d-2d/tools/BrushXY.js +6 -6
  30. package/lib/component/1d-2d/tools/BrushXY.js.map +1 -1
  31. package/lib/component/1d-2d/tools/CrossLinePointer.d.ts +16 -1
  32. package/lib/component/1d-2d/tools/CrossLinePointer.d.ts.map +1 -1
  33. package/lib/component/1d-2d/tools/CrossLinePointer.js +25 -15
  34. package/lib/component/1d-2d/tools/CrossLinePointer.js.map +1 -1
  35. package/lib/component/1d-2d/tools/CursorToolIcon.d.ts +9 -0
  36. package/lib/component/1d-2d/tools/CursorToolIcon.d.ts.map +1 -0
  37. package/lib/component/1d-2d/tools/CursorToolIcon.js +58 -0
  38. package/lib/component/1d-2d/tools/CursorToolIcon.js.map +1 -0
  39. package/lib/component/2d/1d-tracer/Left1DChart.d.ts.map +1 -1
  40. package/lib/component/2d/1d-tracer/Left1DChart.js +7 -2
  41. package/lib/component/2d/1d-tracer/Left1DChart.js.map +1 -1
  42. package/lib/component/2d/1d-tracer/Ranges1D.d.ts +9 -0
  43. package/lib/component/2d/1d-tracer/Ranges1D.d.ts.map +1 -0
  44. package/lib/component/2d/1d-tracer/Ranges1D.js +20 -0
  45. package/lib/component/2d/1d-tracer/Ranges1D.js.map +1 -0
  46. package/lib/component/2d/1d-tracer/Top1DChart.d.ts.map +1 -1
  47. package/lib/component/2d/1d-tracer/Top1DChart.js +7 -2
  48. package/lib/component/2d/1d-tracer/Top1DChart.js.map +1 -1
  49. package/lib/component/2d/DirectAxis2D.d.ts.map +1 -1
  50. package/lib/component/2d/DirectAxis2D.js +4 -1
  51. package/lib/component/2d/DirectAxis2D.js.map +1 -1
  52. package/lib/component/2d/IndirectAxis2D.d.ts.map +1 -1
  53. package/lib/component/2d/IndirectAxis2D.js +5 -2
  54. package/lib/component/2d/IndirectAxis2D.js.map +1 -1
  55. package/lib/component/2d/Viewer2D.d.ts.map +1 -1
  56. package/lib/component/2d/Viewer2D.js +2 -1
  57. package/lib/component/2d/Viewer2D.js.map +1 -1
  58. package/lib/component/2d/ft/FTContainer.d.ts.map +1 -1
  59. package/lib/component/2d/ft/FTContainer.js.map +1 -1
  60. package/lib/component/AnchorSVG.d.ts +36 -0
  61. package/lib/component/AnchorSVG.d.ts.map +1 -0
  62. package/lib/component/AnchorSVG.js +140 -0
  63. package/lib/component/AnchorSVG.js.map +1 -0
  64. package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
  65. package/lib/component/EventsTrackers/BrushTracker.js +16 -2
  66. package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
  67. package/lib/component/EventsTrackers/MouseTracker.d.ts +3 -0
  68. package/lib/component/EventsTrackers/MouseTracker.d.ts.map +1 -1
  69. package/lib/component/EventsTrackers/MouseTracker.js +15 -0
  70. package/lib/component/EventsTrackers/MouseTracker.js.map +1 -1
  71. package/lib/component/context/KeyModifierContext.d.ts +2 -0
  72. package/lib/component/context/KeyModifierContext.d.ts.map +1 -1
  73. package/lib/component/context/KeyModifierContext.js +26 -6
  74. package/lib/component/context/KeyModifierContext.js.map +1 -1
  75. package/lib/component/elements/D3Axis.d.ts.map +1 -1
  76. package/lib/component/elements/D3Axis.js +4 -3
  77. package/lib/component/elements/D3Axis.js.map +1 -1
  78. package/lib/component/elements/DraggableDialog.d.ts.map +1 -1
  79. package/lib/component/elements/DraggableDialog.js +1 -2
  80. package/lib/component/elements/DraggableDialog.js.map +1 -1
  81. package/lib/component/elements/Sections.d.ts +3 -3
  82. package/lib/component/elements/Sections.d.ts.map +1 -1
  83. package/lib/component/elements/Sections.js +1 -1
  84. package/lib/component/elements/Sections.js.map +1 -1
  85. package/lib/component/elements/export/ExportOptionsModal.js +2 -5
  86. package/lib/component/elements/export/ExportOptionsModal.js.map +1 -1
  87. package/lib/component/header/AutoPeakPickingOptionPanel.d.ts.map +1 -1
  88. package/lib/component/header/AutoPeakPickingOptionPanel.js +59 -31
  89. package/lib/component/header/AutoPeakPickingOptionPanel.js.map +1 -1
  90. package/lib/component/header/Header.d.ts.map +1 -1
  91. package/lib/component/header/Header.js +2 -4
  92. package/lib/component/header/Header.js.map +1 -1
  93. package/lib/component/header/RangesPickingOptionPanel.d.ts.map +1 -1
  94. package/lib/component/header/RangesPickingOptionPanel.js +34 -19
  95. package/lib/component/header/RangesPickingOptionPanel.js.map +1 -1
  96. package/lib/component/hooks/useAddMultipletSignal.d.ts +7 -0
  97. package/lib/component/hooks/useAddMultipletSignal.d.ts.map +1 -0
  98. package/lib/component/hooks/useAddMultipletSignal.js +28 -0
  99. package/lib/component/hooks/useAddMultipletSignal.js.map +1 -0
  100. package/lib/component/hooks/useFilter.d.ts.map +1 -1
  101. package/lib/component/hooks/useFilter.js.map +1 -1
  102. package/lib/component/hooks/useSaveSettings.d.ts.map +1 -1
  103. package/lib/component/hooks/useSaveSettings.js +3 -6
  104. package/lib/component/hooks/useSaveSettings.js.map +1 -1
  105. package/lib/component/hooks/useSpectrum.d.ts +3 -1
  106. package/lib/component/hooks/useSpectrum.d.ts.map +1 -1
  107. package/lib/component/hooks/useSpectrum.js +1 -1
  108. package/lib/component/hooks/useSpectrum.js.map +1 -1
  109. package/lib/component/hooks/useSpectrumWithDataSource.d.ts +1 -1
  110. package/lib/component/hooks/useSpectrumWithDataSource.d.ts.map +1 -1
  111. package/lib/component/hooks/useSpectrumWithDataSource.js.map +1 -1
  112. package/lib/component/hooks/useTempSpectrum.d.ts +1 -1
  113. package/lib/component/hooks/useTempSpectrum.d.ts.map +1 -1
  114. package/lib/component/hooks/use_ticks_config.d.ts +1 -4
  115. package/lib/component/hooks/use_ticks_config.d.ts.map +1 -1
  116. package/lib/component/hooks/use_ticks_config.js +1 -6
  117. package/lib/component/hooks/use_ticks_config.js.map +1 -1
  118. package/lib/component/modal/PublicationStringModal.d.ts +1 -1
  119. package/lib/component/modal/PublicationStringModal.d.ts.map +1 -1
  120. package/lib/component/modal/PublicationStringModal.js +4 -8
  121. package/lib/component/modal/PublicationStringModal.js.map +1 -1
  122. package/lib/component/modal/SaveAsModal.js +3 -6
  123. package/lib/component/modal/SaveAsModal.js.map +1 -1
  124. package/lib/component/modal/aboutUs/AboutUsModal.d.ts.map +1 -1
  125. package/lib/component/modal/aboutUs/AboutUsModal.js +2 -4
  126. package/lib/component/modal/aboutUs/AboutUsModal.js.map +1 -1
  127. package/lib/component/modal/editRange/forms/components/NewSignalTab.d.ts.map +1 -1
  128. package/lib/component/modal/editRange/forms/components/NewSignalTab.js +38 -36
  129. package/lib/component/modal/editRange/forms/components/NewSignalTab.js.map +1 -1
  130. package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +142 -24
  131. package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts.map +1 -1
  132. package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts +142 -24
  133. package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts.map +1 -1
  134. package/lib/component/modal/setting/tanstack_general_settings/general_settings.d.ts.map +1 -1
  135. package/lib/component/modal/setting/tanstack_general_settings/general_settings.js +9 -12
  136. package/lib/component/modal/setting/tanstack_general_settings/general_settings.js.map +1 -1
  137. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +142 -24
  138. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts.map +1 -1
  139. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts +120 -24
  140. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts.map +1 -1
  141. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +120 -24
  142. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts.map +1 -1
  143. package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts +20 -4
  144. package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts.map +1 -1
  145. package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +120 -24
  146. package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts.map +1 -1
  147. package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts +120 -24
  148. package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts.map +1 -1
  149. package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.js +12 -1
  150. package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.js.map +1 -1
  151. package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts +120 -24
  152. package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts.map +1 -1
  153. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +120 -24
  154. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts.map +1 -1
  155. package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts +120 -24
  156. package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts.map +1 -1
  157. package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +120 -24
  158. package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts.map +1 -1
  159. package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts +120 -24
  160. package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts.map +1 -1
  161. package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts +120 -24
  162. package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts.map +1 -1
  163. package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts +120 -24
  164. package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts.map +1 -1
  165. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts +120 -24
  166. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts.map +1 -1
  167. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts +120 -24
  168. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts.map +1 -1
  169. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts +120 -24
  170. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts.map +1 -1
  171. package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts +120 -24
  172. package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts.map +1 -1
  173. package/lib/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.d.ts +22 -0
  174. package/lib/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.d.ts.map +1 -1
  175. package/lib/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.js +15 -2
  176. package/lib/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.js.map +1 -1
  177. package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts +22 -0
  178. package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts.map +1 -1
  179. package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js +1 -1
  180. package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js.map +1 -1
  181. package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts.map +1 -1
  182. package/lib/component/panels/PeaksPanel/PeaksPanel.js +1 -9
  183. package/lib/component/panels/PeaksPanel/PeaksPanel.js.map +1 -1
  184. package/lib/component/panels/PeaksPanel/PeaksPreferences.js +1 -1
  185. package/lib/component/panels/PeaksPanel/PeaksPreferences.js.map +1 -1
  186. package/lib/component/panels/PeaksPanel/PeaksTable.d.ts.map +1 -1
  187. package/lib/component/panels/PeaksPanel/PeaksTable.js +9 -9
  188. package/lib/component/panels/PeaksPanel/PeaksTable.js.map +1 -1
  189. package/lib/component/panels/RangesPanel/RangesPanel.d.ts.map +1 -1
  190. package/lib/component/panels/RangesPanel/RangesPanel.js +1 -3
  191. package/lib/component/panels/RangesPanel/RangesPanel.js.map +1 -1
  192. package/lib/component/panels/RangesPanel/RangesTableRow.d.ts.map +1 -1
  193. package/lib/component/panels/RangesPanel/RangesTableRow.js +10 -12
  194. package/lib/component/panels/RangesPanel/RangesTableRow.js.map +1 -1
  195. package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.d.ts +1 -1
  196. package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.d.ts.map +1 -1
  197. package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
  198. package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js.map +1 -1
  199. package/lib/component/panels/SummaryPanel/SummaryPanel.d.ts.map +1 -1
  200. package/lib/component/panels/SummaryPanel/SummaryPanel.js +7 -0
  201. package/lib/component/panels/SummaryPanel/SummaryPanel.js.map +1 -1
  202. package/lib/component/panels/filtersPanel/FilterPanel.d.ts.map +1 -1
  203. package/lib/component/panels/filtersPanel/FilterPanel.js +5 -2
  204. package/lib/component/panels/filtersPanel/FilterPanel.js.map +1 -1
  205. package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js +1 -1
  206. package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js.map +1 -1
  207. package/lib/component/panels/filtersPanel/processings_sections_panel.d.ts +2 -0
  208. package/lib/component/panels/filtersPanel/processings_sections_panel.d.ts.map +1 -0
  209. package/lib/component/panels/filtersPanel/processings_sections_panel.js +134 -0
  210. package/lib/component/panels/filtersPanel/processings_sections_panel.js.map +1 -0
  211. package/lib/component/panels/hooks/use_processings_mutation.d.ts +10 -0
  212. package/lib/component/panels/hooks/use_processings_mutation.d.ts.map +1 -0
  213. package/lib/component/panels/hooks/use_processings_mutation.js +130 -0
  214. package/lib/component/panels/hooks/use_processings_mutation.js.map +1 -0
  215. package/lib/component/panels/informationPanel/InformationPanel.js +1 -1
  216. package/lib/component/panels/informationPanel/InformationPanel.js.map +1 -1
  217. package/lib/component/reducer/Reducer.d.ts.map +1 -1
  218. package/lib/component/reducer/Reducer.js +4 -0
  219. package/lib/component/reducer/Reducer.js.map +1 -1
  220. package/lib/component/reducer/actions/CorrelationsActions.js +2 -2
  221. package/lib/component/reducer/actions/CorrelationsActions.js.map +1 -1
  222. package/lib/component/reducer/actions/FiltersActions.d.ts +2 -0
  223. package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
  224. package/lib/component/reducer/actions/FiltersActions.js +1 -1
  225. package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
  226. package/lib/component/reducer/actions/MoleculeActions.d.ts +9 -0
  227. package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
  228. package/lib/component/reducer/actions/RangesActions.d.ts +11 -2
  229. package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
  230. package/lib/component/reducer/actions/RangesActions.js +36 -29
  231. package/lib/component/reducer/actions/RangesActions.js.map +1 -1
  232. package/lib/component/reducer/actions/SpectraActions.d.ts +8 -2
  233. package/lib/component/reducer/actions/SpectraActions.d.ts.map +1 -1
  234. package/lib/component/reducer/actions/SpectraActions.js +6 -1
  235. package/lib/component/reducer/actions/SpectraActions.js.map +1 -1
  236. package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
  237. package/lib/component/reducer/actions/ToolsActions.js +5 -17
  238. package/lib/component/reducer/actions/ToolsActions.js.map +1 -1
  239. package/lib/component/reducer/helper/getTraceSpectrumID.d.ts +5 -0
  240. package/lib/component/reducer/helper/getTraceSpectrumID.d.ts.map +1 -0
  241. package/lib/component/reducer/helper/getTraceSpectrumID.js +14 -0
  242. package/lib/component/reducer/helper/getTraceSpectrumID.js.map +1 -0
  243. package/lib/component/reducer/preferences/actions/setPreferences.d.ts +2 -2
  244. package/lib/component/reducer/preferences/actions/setPreferences.d.ts.map +1 -1
  245. package/lib/component/reducer/preferences/actions/setPreferences.js +8 -5
  246. package/lib/component/reducer/preferences/actions/setPreferences.js.map +1 -1
  247. package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
  248. package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
  249. package/lib/component/toolbar/ToolTypes.d.ts +21 -1
  250. package/lib/component/toolbar/ToolTypes.d.ts.map +1 -1
  251. package/lib/component/toolbar/ToolTypes.js +40 -0
  252. package/lib/component/toolbar/ToolTypes.js.map +1 -1
  253. package/lib/component/toolbar/nmr_toolbar.d.ts.map +1 -1
  254. package/lib/component/toolbar/nmr_toolbar.js +12 -36
  255. package/lib/component/toolbar/nmr_toolbar.js.map +1 -1
  256. package/lib/component/utility/CoreSlot.d.ts +27 -0
  257. package/lib/component/utility/CoreSlot.d.ts.map +1 -0
  258. package/lib/component/utility/CoreSlot.js +56 -0
  259. package/lib/component/utility/CoreSlot.js.map +1 -0
  260. package/lib/component/workspaces/workspaceDefaultProperties.d.ts.map +1 -1
  261. package/lib/component/workspaces/workspaceDefaultProperties.js +19 -2
  262. package/lib/component/workspaces/workspaceDefaultProperties.js.map +1 -1
  263. package/lib/data/data1d/Spectrum1D/initiateDatum1D.d.ts.map +1 -1
  264. package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +13 -5
  265. package/lib/data/data1d/Spectrum1D/initiateDatum1D.js.map +1 -1
  266. package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts.map +1 -1
  267. package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -0
  268. package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js.map +1 -1
  269. package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts.map +1 -1
  270. package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +35 -30
  271. package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js.map +1 -1
  272. package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.d.ts.map +1 -1
  273. package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.js +1 -0
  274. package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.js.map +1 -1
  275. package/lib/data/data2d/Spectrum2D/initiateDatum2D.d.ts.map +1 -1
  276. package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +12 -4
  277. package/lib/data/data2d/Spectrum2D/initiateDatum2D.js.map +1 -1
  278. package/lib/data/data2d/Spectrum2D/isSpectrum2D.d.ts +1 -1
  279. package/lib/data/data2d/Spectrum2D/isSpectrum2D.d.ts.map +1 -1
  280. package/lib/data/data2d/Spectrum2D/isSpectrum2D.js.map +1 -1
  281. package/lib/data/utilities/RangeUtilities.d.ts +1 -6
  282. package/lib/data/utilities/RangeUtilities.d.ts.map +1 -1
  283. package/lib/data/utilities/RangeUtilities.js +10 -27
  284. package/lib/data/utilities/RangeUtilities.js.map +1 -1
  285. package/lib/versionInfo.js +1 -1
  286. package/package.json +29 -27
  287. package/src/component/1d/HorizontalAxis1D.tsx +12 -2
  288. package/src/component/1d/SVGContent1D.tsx +2 -0
  289. package/src/component/1d/Viewer1D.tsx +2 -0
  290. package/src/component/1d/integral/IntegralResizable.tsx +6 -6
  291. package/src/component/1d/ranges/Range.tsx +6 -6
  292. package/src/component/1d/ranges/Signals.tsx +28 -0
  293. package/src/component/1d-2d/components/RangeIndicator.tsx +106 -0
  294. package/src/component/1d-2d/components/Signals1D.tsx +306 -0
  295. package/src/component/1d-2d/tools/BrushXY.tsx +8 -8
  296. package/src/component/1d-2d/tools/CrossLinePointer.tsx +75 -32
  297. package/src/component/1d-2d/tools/CursorToolIcon.tsx +110 -0
  298. package/src/component/2d/1d-tracer/Left1DChart.tsx +26 -1
  299. package/src/component/2d/1d-tracer/Ranges1D.tsx +38 -0
  300. package/src/component/2d/1d-tracer/Top1DChart.tsx +31 -2
  301. package/src/component/2d/DirectAxis2D.tsx +12 -3
  302. package/src/component/2d/IndirectAxis2D.tsx +9 -5
  303. package/src/component/2d/Viewer2D.tsx +5 -2
  304. package/src/component/2d/ft/FTContainer.tsx +1 -0
  305. package/src/component/AnchorSVG.tsx +369 -0
  306. package/src/component/EventsTrackers/BrushTracker.tsx +25 -5
  307. package/src/component/EventsTrackers/MouseTracker.tsx +21 -0
  308. package/src/component/context/KeyModifierContext.tsx +32 -8
  309. package/src/component/elements/D3Axis.tsx +31 -9
  310. package/src/component/elements/DraggableDialog.tsx +1 -2
  311. package/src/component/elements/Sections.tsx +4 -4
  312. package/src/component/elements/export/ExportOptionsModal.tsx +22 -31
  313. package/src/component/header/AutoPeakPickingOptionPanel.tsx +173 -102
  314. package/src/component/header/Header.tsx +2 -4
  315. package/src/component/header/RangesPickingOptionPanel.tsx +72 -59
  316. package/src/component/hooks/useAddMultipletSignal.tsx +32 -0
  317. package/src/component/hooks/useFilter.ts +2 -1
  318. package/src/component/hooks/useSaveSettings.tsx +4 -15
  319. package/src/component/hooks/useSpectrum.ts +7 -1
  320. package/src/component/hooks/useSpectrumWithDataSource.ts +16 -8
  321. package/src/component/hooks/use_ticks_config.ts +1 -7
  322. package/src/component/modal/PublicationStringModal.tsx +8 -14
  323. package/src/component/modal/SaveAsModal.tsx +41 -50
  324. package/src/component/modal/aboutUs/AboutUsModal.tsx +5 -4
  325. package/src/component/modal/editRange/forms/components/NewSignalTab.tsx +57 -57
  326. package/src/component/modal/setting/tanstack_general_settings/general_settings.tsx +23 -29
  327. package/src/component/modal/setting/tanstack_general_settings/tabs/axis_tab.tsx +76 -12
  328. package/src/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.ts +16 -2
  329. package/src/component/panels/MoleculesPanel/hooks/useAtomAssignment.tsx +1 -1
  330. package/src/component/panels/PeaksPanel/PeaksPanel.tsx +1 -8
  331. package/src/component/panels/PeaksPanel/PeaksPreferences.tsx +1 -1
  332. package/src/component/panels/PeaksPanel/PeaksTable.tsx +11 -9
  333. package/src/component/panels/RangesPanel/RangesPanel.tsx +1 -3
  334. package/src/component/panels/RangesPanel/RangesTableRow.tsx +10 -12
  335. package/src/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.tsx +2 -2
  336. package/src/component/panels/SummaryPanel/SummaryPanel.tsx +13 -11
  337. package/src/component/panels/filtersPanel/FilterPanel.tsx +10 -0
  338. package/src/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.tsx +1 -0
  339. package/src/component/panels/filtersPanel/processings_sections_panel.tsx +307 -0
  340. package/src/component/panels/hooks/use_processings_mutation.ts +171 -0
  341. package/src/component/panels/informationPanel/InformationPanel.tsx +1 -1
  342. package/src/component/reducer/Reducer.ts +4 -0
  343. package/src/component/reducer/actions/CorrelationsActions.ts +2 -2
  344. package/src/component/reducer/actions/FiltersActions.ts +1 -1
  345. package/src/component/reducer/actions/RangesActions.ts +53 -30
  346. package/src/component/reducer/actions/SpectraActions.ts +20 -1
  347. package/src/component/reducer/actions/ToolsActions.ts +5 -21
  348. package/src/component/reducer/helper/getTraceSpectrumID.tsx +25 -0
  349. package/src/component/reducer/preferences/actions/setPreferences.ts +18 -10
  350. package/src/component/reducer/preferences/preferencesReducer.ts +1 -1
  351. package/src/component/toolbar/ToolTypes.ts +92 -1
  352. package/src/component/toolbar/nmr_toolbar.tsx +15 -71
  353. package/src/component/utility/CoreSlot.tsx +126 -0
  354. package/src/component/workspaces/workspaceDefaultProperties.ts +19 -2
  355. package/src/data/data1d/Spectrum1D/initiateDatum1D.ts +14 -8
  356. package/src/data/data1d/Spectrum1D/peaks/autoPeakPicking.ts +1 -0
  357. package/src/data/data1d/Spectrum1D/peaks/optimizePeaks.ts +35 -30
  358. package/src/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.ts +1 -0
  359. package/src/data/data2d/Spectrum2D/initiateDatum2D.ts +12 -4
  360. package/src/data/data2d/Spectrum2D/isSpectrum2D.ts +1 -1
  361. package/src/data/utilities/RangeUtilities.ts +12 -36
  362. package/src/versionInfo.ts +1 -1
  363. package/lib/component/1d/integral/IntegralIndicator.d.ts +0 -9
  364. package/lib/component/1d/integral/IntegralIndicator.d.ts.map +0 -1
  365. package/lib/component/1d/integral/IntegralIndicator.js +0 -22
  366. package/lib/component/1d/integral/IntegralIndicator.js.map +0 -1
  367. package/lib/component/utility/renderCoreSlot.d.ts +0 -11
  368. package/lib/component/utility/renderCoreSlot.d.ts.map +0 -1
  369. package/lib/component/utility/renderCoreSlot.js +0 -13
  370. package/lib/component/utility/renderCoreSlot.js.map +0 -1
  371. package/src/component/1d/integral/IntegralIndicator.tsx +0 -43
  372. package/src/component/utility/renderCoreSlot.tsx +0 -21
@@ -1,12 +1,12 @@
1
- import { Button } from '@blueprintjs/core';
2
- import { yupResolver } from '@hookform/resolvers/yup';
1
+ import { revalidateLogic } from '@tanstack/react-form';
3
2
  import type { Range } from '@zakodium/nmr-types';
4
3
  import type { CSSProperties } from 'react';
5
- import { useEffect } from 'react';
6
- import { useForm, useFormContext, useWatch } from 'react-hook-form';
7
- import * as Yup from 'yup';
4
+ import { useMemo } from 'react';
5
+ import { useFormContext, useWatch } from 'react-hook-form';
6
+ import { AppForm, useForm } from 'react-science/ui';
7
+ import { z } from 'zod/v4';
8
+ import type { CheckParams } from 'zod/v4/core';
8
9
 
9
- import { NumberInput2Controller } from '../../../../elements/NumberInput2Controller.js';
10
10
  import { useTabsController } from '../../../../elements/TabsProvider.js';
11
11
  import { useActiveNucleusTab } from '../../../../hooks/useActiveNucleusTab.js';
12
12
  import { usePanelPreferences } from '../../../../hooks/usePanelPreferences.js';
@@ -44,29 +44,41 @@ export function NewSignalTab(props: NewSignalTabProps) {
44
44
  const activeTab = useActiveNucleusTab();
45
45
  const { tablePreferences } = usePanelPreferences('ranges', activeTab);
46
46
 
47
- function saveHandler(val: any) {
47
+ const schemaFormValidation = useMemo(() => {
48
+ return getSignalValidationSchema(range);
49
+ }, [range]);
50
+
51
+ function saveHandler({ delta }: z.infer<typeof schemaFormValidation>) {
48
52
  const newSignal = {
49
53
  multiplicity: 'm',
50
54
  kind: 'signal',
51
- delta: val.delta,
55
+ delta,
52
56
  js: [{ multiplicity: 'm', coupling: '' }],
53
57
  };
54
- const _signals = signals.slice().concat(newSignal);
55
58
 
59
+ const _signals = [...signals, newSignal];
56
60
  setValue('signals', _signals);
57
61
  selectTab(_signals.length - 1);
58
62
  }
59
- const { handleSubmit, reset, control, setFocus } = useForm({
63
+
64
+ const form = useForm({
60
65
  defaultValues: {
61
- delta: (range.from + range.to) / 2,
66
+ delta: String((range.from + range.to) / 2),
67
+ },
68
+ onSubmit: ({ value }) => {
69
+ const parsedValues = schemaFormValidation.parse(value);
70
+ saveHandler(parsedValues);
71
+ },
72
+ validationLogic: revalidateLogic({ modeAfterSubmission: 'change' }),
73
+ validators: {
74
+ onDynamic: schemaFormValidation,
62
75
  },
63
- resolver: yupResolver(getSignalValidationSchema(range)),
64
76
  });
65
77
 
66
78
  useEvent({
67
79
  onClick: ({ xPPM, shiftKey }) => {
68
80
  if (signalIndex === -1 && shiftKey) {
69
- reset({ delta: xPPM });
81
+ form.reset({ delta: String(xPPM) });
70
82
  }
71
83
  },
72
84
  onBrushEnd: (options) => {
@@ -75,65 +87,53 @@ export function NewSignalTab(props: NewSignalTabProps) {
75
87
  shiftKey,
76
88
  } = options;
77
89
  if (signalIndex === -1 && shiftKey) {
78
- reset({ delta: (to - from) / 2 + from });
90
+ form.reset({ delta: String((to - from) / 2 + from) });
79
91
  }
80
92
  },
81
93
  });
82
94
 
83
- useEffect(() => {
84
- requestAnimationFrame(() => {
85
- setTimeout(() => {
86
- setFocus('delta', { shouldSelect: true });
87
- }, 0);
88
- });
89
- });
90
-
91
95
  return (
92
96
  <div style={styles.container}>
93
97
  <div style={styles.innerContainer}>
94
- <p style={styles.infoText}>
95
- Edit or select a delta value of new signal in range [
96
- {`${formatNumber(
97
- range.from,
98
- tablePreferences.from.format,
99
- )} ppm - ${formatNumber(range.to, tablePreferences.to.format)} ppm`}
100
- ]:
101
- </p>
102
- <NumberInput2Controller
103
- control={control}
104
- name="delta"
105
- placeholder={`𝛅(ppm)`}
106
- autoSelect
107
- fill
108
- />
109
- <Button
110
- intent="success"
111
- style={{
112
- marginTop: '20px',
98
+ <AppForm
99
+ form={form}
100
+ onSubmitMeta={(event) => {
101
+ event.stopPropagation();
113
102
  }}
114
- onClick={() => handleSubmit(saveHandler)()}
115
103
  >
116
- Add a signal
117
- </Button>
104
+ <form.AppField name="delta">
105
+ {(field) => (
106
+ <field.NumericInput
107
+ autoFocus
108
+ placeholder="𝛅(ppm)"
109
+ label="Edit or select a delta value of new signal"
110
+ helpText={`Value should be in range [${formatNumber(
111
+ range.from,
112
+ tablePreferences.from.format,
113
+ )} ppm - ${formatNumber(range.to, tablePreferences.to.format)} ppm]`}
114
+ />
115
+ )}
116
+ </form.AppField>
117
+
118
+ <form.SubmitButton intent="success">Add a signal</form.SubmitButton>
119
+ </AppForm>
118
120
  </div>
119
121
  </div>
120
122
  );
121
123
  }
122
124
 
123
125
  function getSignalValidationSchema(range: Range) {
124
- return Yup.object().shape({
125
- delta: Yup.number()
126
- .test(`test-range`, '', function testNewSignalDelta(value, context) {
127
- const { path, createError } = context;
128
- if (value && value >= range.from && value <= range.to) {
129
- return true;
130
- }
126
+ const params: CheckParams = {
127
+ error: (ctx) => {
128
+ const input = Number(ctx.input);
129
+ return `${input.toFixed(5)} ppm out of the range`;
130
+ },
131
+ };
131
132
 
132
- const errorMessage = ` ${
133
- value ? value.toFixed(5) : 0
134
- } ppm out of the range`;
135
- return createError({ path, message: errorMessage });
136
- })
137
- .required(),
133
+ return z.object({
134
+ delta: z.coerce
135
+ .number<string>()
136
+ .min(range.from, params)
137
+ .max(range.to, params),
138
138
  });
139
139
  }
@@ -3,8 +3,9 @@ import styled from '@emotion/styled';
3
3
  import { revalidateLogic } from '@tanstack/react-form';
4
4
  import type { Workspace } from '@zakodium/nmrium-core';
5
5
  import { ErrorBoundary } from 'react-error-boundary';
6
- import { Form, assert, useForm } from 'react-science/ui';
6
+ import { AppForm, useForm } from 'react-science/ui';
7
7
  import { match } from 'ts-pattern';
8
+ import { z } from 'zod';
8
9
 
9
10
  import { usePreferences } from '../../../context/PreferencesContext.js';
10
11
  import ErrorOverlay from '../../../main/ErrorOverlay.tsx';
@@ -60,7 +61,9 @@ interface GeneralSettingsProps extends Omit<
60
61
  onSave: (values?: Partial<Workspace>) => void;
61
62
  }
62
63
 
63
- type FormMeta = 'apply' | 'save';
64
+ const metaSchema = z.enum(['apply', 'save']);
65
+ type FormMeta = z.input<typeof metaSchema>;
66
+ const onSubmitMeta: FormMeta = 'apply';
64
67
 
65
68
  function GeneralSettings(props: GeneralSettingsProps) {
66
69
  const { close, height, onSave } = props;
@@ -74,10 +77,12 @@ function GeneralSettings(props: GeneralSettingsProps) {
74
77
  },
75
78
  validationLogic: revalidateLogic({ mode: 'change' }),
76
79
  defaultValues,
77
- // We don't want onSubmitMeta to be inferred as sting.
78
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
79
- onSubmitMeta: 'apply' as FormMeta,
80
+ onSubmitMeta,
80
81
  onSubmit: ({ value, meta }) => {
82
+ meta = metaSchema.parse(meta, {
83
+ error: () =>
84
+ 'Submit event must be attached to a submitter with "data-action" attribute with "apply" or "save" value',
85
+ });
81
86
  const mergedValues = formValueToWorkspace(value, currentWorkspace);
82
87
 
83
88
  match(meta)
@@ -97,30 +102,19 @@ function GeneralSettings(props: GeneralSettingsProps) {
97
102
  });
98
103
 
99
104
  return (
100
- <form.AppForm>
101
- <Form
102
- layout="inline"
103
- noValidate
104
- onSubmit={(event) => {
105
- event.preventDefault();
106
-
107
- const nativeEvent = event.nativeEvent as SubmitEvent;
108
- const submitter = nativeEvent.submitter as HTMLButtonElement | null;
109
- assert(submitter, 'form event should have a submitter');
110
- const action = submitter.dataset.action;
111
-
112
- void form.handleSubmit(action as FormMeta);
113
- }}
114
- >
115
- <PreventImplicitSubmit />
116
-
117
- <GeneralSettingsErrorsOpenProvider form={form}>
118
- <GeneralSettingsDialogHeader form={form} />
119
- <GeneralSettingsDialogBody form={form} height={height} />
120
- <GeneralSettingsDialogFooter form={form} onCancel={close} />
121
- </GeneralSettingsErrorsOpenProvider>
122
- </Form>
123
- </form.AppForm>
105
+ <AppForm
106
+ form={form}
107
+ layout="inline"
108
+ onSubmitMeta={(event) => event.nativeEvent.submitter?.dataset.action}
109
+ >
110
+ <PreventImplicitSubmit />
111
+
112
+ <GeneralSettingsErrorsOpenProvider form={form}>
113
+ <GeneralSettingsDialogHeader form={form} />
114
+ <GeneralSettingsDialogBody form={form} height={height} />
115
+ <GeneralSettingsDialogFooter form={form} onCancel={close} />
116
+ </GeneralSettingsErrorsOpenProvider>
117
+ </AppForm>
124
118
  );
125
119
  }
126
120
 
@@ -1,3 +1,4 @@
1
+ import styled from '@emotion/styled';
1
2
  import {
2
3
  FieldGroupSVGLineStyleFields,
3
4
  FieldGroupSVGTextStyleFields,
@@ -9,6 +10,18 @@ import type { z } from 'zod';
9
10
  import type { gridlineValidation } from '../validation/axis_tab_validation.ts';
10
11
  import { defaultGeneralSettingsFormValues } from '../validation.ts';
11
12
 
13
+ // TODO: Expose the Fieldset and Legend components in react-science/ui package
14
+ const Fieldset = styled.fieldset`
15
+ display: block;
16
+ border-top: 1px lightgrey groove;
17
+ min-inline-size: min-content;
18
+ `;
19
+
20
+ const Legend = styled.legend`
21
+ display: block;
22
+ padding-inline-end: 5px;
23
+ `;
24
+
12
25
  export const AxisTab = withForm({
13
26
  defaultValues: defaultGeneralSettingsFormValues,
14
27
  render: ({ form }) => {
@@ -28,18 +41,69 @@ const TicksSection = withFieldGroup({
28
41
  const { AppField, Section } = group;
29
42
 
30
43
  return (
31
- <Section title="Ticks">
32
- <FieldGroupSVGTextStyleFields
33
- form={group}
34
- fields="primaryTicks.textStyle"
35
- label="Annotation style"
36
- previewText="0"
37
- />
38
- <hr />
39
- <AppField name="secondaryTicks.enabled">
40
- {({ Checkbox }) => <Checkbox label="Show secondary ticks" />}
41
- </AppField>
42
- </Section>
44
+ <>
45
+ <Section title="Axis label">
46
+ <FieldGroupSVGTextStyleFields
47
+ form={group}
48
+ fields="labelStyle"
49
+ label="Style"
50
+ previewText="0"
51
+ />
52
+ </Section>
53
+ <Section title="Primary ticks">
54
+ <FieldGroupSVGTextStyleFields
55
+ form={group}
56
+ fields="primaryTicks.textStyle"
57
+ label="Label style"
58
+ previewText="0"
59
+ />
60
+ <Fieldset>
61
+ <Legend>Line style</Legend>
62
+ <group.AppField name="primaryTicks.tickStyle.stroke">
63
+ {(field) => <field.ColorPicker label="Color" disableAlpha />}
64
+ </group.AppField>
65
+ <group.AppField name="primaryTicks.tickStyle.strokeOpacity">
66
+ {(field) => (
67
+ <field.NumericInput
68
+ label="Opacity"
69
+ min={0}
70
+ max={1}
71
+ minorStepSize={0.01}
72
+ step={0.05}
73
+ majorStepSize={0.1}
74
+ />
75
+ )}
76
+ </group.AppField>
77
+ <group.AppField name="primaryTicks.tickStyle.strokeWidth">
78
+ {(field) => <field.NumericInput label="Width" />}
79
+ </group.AppField>
80
+ </Fieldset>
81
+ </Section>
82
+
83
+ <Section title="Secondary ticks">
84
+ <AppField name="secondaryTicks.enabled">
85
+ {({ Checkbox }) => <Checkbox label="Show secondary ticks" />}
86
+ </AppField>
87
+ <group.AppField name="secondaryTicks.tickStyle.stroke">
88
+ {(field) => <field.ColorPicker label="Color" disableAlpha />}
89
+ </group.AppField>
90
+ <group.AppField name="secondaryTicks.tickStyle.strokeOpacity">
91
+ {(field) => (
92
+ <field.NumericInput
93
+ label="Opacity"
94
+ min={0}
95
+ max={1}
96
+ minorStepSize={0.01}
97
+ step={0.05}
98
+ majorStepSize={0.1}
99
+ />
100
+ )}
101
+ </group.AppField>
102
+ <group.AppField name="secondaryTicks.tickStyle.strokeWidth">
103
+ {(field) => <field.NumericInput label="Width" />}
104
+ </group.AppField>
105
+ </Section>
106
+ </>
43
107
  );
44
108
  },
45
109
  });
@@ -14,10 +14,24 @@ const gridlinesValidation = z.object({
14
14
  secondary: gridlineValidation,
15
15
  });
16
16
 
17
+ const primaryTicksValidation = z.object({
18
+ textStyle: svgTextStyleFieldsSchema,
19
+ tickStyle: svgLineStyleFieldsSchema.omit({
20
+ strokeDasharray: true,
21
+ }),
22
+ });
23
+ const secondaryTicksValidation = z.object({
24
+ enabled: z.boolean(),
25
+ tickStyle: svgLineStyleFieldsSchema.omit({
26
+ strokeDasharray: true,
27
+ }),
28
+ });
29
+
17
30
  export const axisValidation = z
18
31
  .object({
19
- primaryTicks: z.object({ textStyle: svgTextStyleFieldsSchema }),
20
- secondaryTicks: z.object({ enabled: z.boolean() }),
32
+ labelStyle: svgTextStyleFieldsSchema,
33
+ primaryTicks: primaryTicksValidation,
34
+ secondaryTicks: secondaryTicksValidation,
21
35
  gridlines1D: gridlinesValidation,
22
36
  gridlines2D: gridlinesValidation,
23
37
  })
@@ -273,7 +273,7 @@ export default function useAtomAssignment() {
273
273
  if (oclIDs.length > 0) {
274
274
  // set all IDs to highlight when hovering over an atom from assignment data
275
275
  const highlights = getHighlightsOnHover(assignments, oclIDs, [
276
- spectrum,
276
+ ...(spectrum ? [spectrum] : []),
277
277
  ...tracesSpectra,
278
278
  ]);
279
279
  highlightedIdDsRef.current = highlights;
@@ -111,14 +111,7 @@ function PeaksPanelInner(props: PeaksPanelInnerProps) {
111
111
  const filterPeaks = peaks.values.filter((peak) =>
112
112
  isInRange(peak.x, { from, to }),
113
113
  );
114
- if (filterPeaks.length <= 15) {
115
- dispatch({ type: 'OPTIMIZE_PEAKS', payload: { peaks: filterPeaks } });
116
- } else {
117
- toaster.show({
118
- message: 'optimization can be done on no more than 15 peaks',
119
- intent: 'danger',
120
- });
121
- }
114
+ dispatch({ type: 'OPTIMIZE_PEAKS', payload: { peaks: filterPeaks } });
122
115
  };
123
116
 
124
117
  function toggleViewProperty(key: keyof FilterType<PeaksViewState, boolean>) {
@@ -51,7 +51,7 @@ const formatFields: NucleusPreferenceField[] = [
51
51
  {
52
52
  id: 6,
53
53
  label: 'kind :',
54
- checkFieldName: 'tablePreferences.fwhm.show',
54
+ checkFieldName: 'tablePreferences.showKind',
55
55
  },
56
56
  {
57
57
  id: 7,
@@ -110,10 +110,10 @@ export function usePeaksTableColumns(activeTab: string) {
110
110
  accessor: (row) => row?.shape?.fwhm || '',
111
111
  Cell: ({ row }: CellProps<PeakRecord>) => {
112
112
  const fwhm = row.original?.shape?.fwhm;
113
- if (fwhm) {
114
- return formatNumber(fwhm, tablePreferences.fwhm.format);
113
+ if (typeof fwhm !== 'number') {
114
+ return '';
115
115
  }
116
- return '';
116
+ return formatNumber(fwhm, tablePreferences.fwhm.format);
117
117
  },
118
118
  },
119
119
  {
@@ -126,10 +126,10 @@ export function usePeaksTableColumns(activeTab: string) {
126
126
  const mu =
127
127
  row.original?.shape?.kind === 'pseudoVoigt' &&
128
128
  row.original?.shape?.mu;
129
- if (mu) {
130
- return formatNumber(mu, tablePreferences.mu.format);
129
+ if (typeof mu !== 'number') {
130
+ return '';
131
131
  }
132
- return '';
132
+ return formatNumber(mu, tablePreferences.mu.format);
133
133
  },
134
134
  },
135
135
  {
@@ -143,10 +143,12 @@ export function usePeaksTableColumns(activeTab: string) {
143
143
  const gamma =
144
144
  row.original?.shape?.kind === 'generalizedLorentzian' &&
145
145
  row.original?.shape?.gamma;
146
- if (gamma) {
147
- return formatNumber(gamma, tablePreferences.gamma.format);
146
+
147
+ if (typeof gamma !== 'number') {
148
+ return '';
148
149
  }
149
- return '';
150
+
151
+ return formatNumber(gamma, tablePreferences.gamma.format);
150
152
  },
151
153
  },
152
154
  {
@@ -92,9 +92,7 @@ function RangesTablePanelInner(props: RangesTablePanelInnerProps) {
92
92
  const unlinkRangeHandler = useCallback(() => {
93
93
  dispatch({
94
94
  type: 'UNASSIGN_1D_SIGNAL',
95
- payload: {
96
- signalIndex: -1,
97
- },
95
+ payload: {},
98
96
  });
99
97
  }, [dispatch]);
100
98
 
@@ -105,25 +105,23 @@ export default function RangesTableRow(props: RangesTableRowProps) {
105
105
  }, [rowData.tableMetaInfo]);
106
106
 
107
107
  const unlinkHandler = useCallback(
108
- (e: MouseEvent, isOnRangeLevel: boolean) => {
108
+ (e: MouseEvent) => {
109
109
  // stop propagation here to prevent enabling/disabling the assignment mode at the same time
110
110
  if (e) {
111
111
  e.stopPropagation();
112
112
  }
113
113
 
114
- if (isOnRangeLevel !== undefined) {
115
- const { id: rangeKey, tableMetaInfo } = rowData;
114
+ const { id: rangeKey, tableMetaInfo } = rowData;
116
115
 
117
- const signalIndex = isOnRangeLevel ? -1 : tableMetaInfo.signalIndex;
116
+ const signalIndex = tableMetaInfo.signalIndex;
118
117
 
119
- dispatch({
120
- type: 'UNASSIGN_1D_SIGNAL',
121
- payload: {
122
- rangeKey,
123
- signalIndex,
124
- },
125
- });
126
- }
118
+ dispatch({
119
+ type: 'UNASSIGN_1D_SIGNAL',
120
+ payload: {
121
+ rangeKey,
122
+ signalIndex,
123
+ },
124
+ });
127
125
  },
128
126
  [dispatch, rowData],
129
127
  );
@@ -12,7 +12,7 @@ interface SignalAssignmentsColumnProps
12
12
  isActive: boolean;
13
13
  };
14
14
  onLink?: (a: MouseEvent, b: AssignmentsData) => void;
15
- onUnlink?: (element: MouseEvent, b: boolean) => void;
15
+ onUnlink?: (element: MouseEvent) => void;
16
16
  }
17
17
 
18
18
  function SignalAssignmentsColumn({
@@ -44,7 +44,7 @@ function SignalAssignmentsColumn({
44
44
  onClick={assignHandler}
45
45
  style={{ padding: '0', ...tdCss }}
46
46
  hideRemoveAssignmentButton={!diaIDs || diaIDs.length === 0}
47
- onRemove={(e) => onUnlink?.(e, false)}
47
+ onRemove={(e) => onUnlink?.(e)}
48
48
  >
49
49
  {(diaIDs?.length > 0 || assignment.isActive) && (
50
50
  <span>{diaIDs?.length || 0}</span>
@@ -10,6 +10,7 @@ import { getLinkDelta, getLinkDim } from 'nmr-correlation';
10
10
  import { memo, useCallback, useMemo, useState } from 'react';
11
11
  import { FaFlask, FaSlidersH } from 'react-icons/fa';
12
12
 
13
+ import { isSpectrum2D } from '../../../data/data2d/Spectrum2D/isSpectrum2D.ts';
13
14
  import {
14
15
  findRange,
15
16
  findSignal1D,
@@ -148,11 +149,10 @@ function SummaryPanel() {
148
149
  // try to find a link which contains the belonging 2D signal in the spectra in view
149
150
  if (
150
151
  correlation.link.some((link: Link) => {
151
- const spectrum = findSpectrum(
152
- spectraData,
153
- link.experimentID,
154
- true,
155
- ) as Spectrum2D;
152
+ const spectrum = findSpectrum(spectraData, link.experimentID, true);
153
+
154
+ if (!isSpectrum2D(spectrum)) return false;
155
+
156
156
  return findSignalMatch1D(
157
157
  spectrum,
158
158
  link,
@@ -178,8 +178,11 @@ function SummaryPanel() {
178
178
  spectraData,
179
179
  firstLink2D.experimentID,
180
180
  true,
181
- ) as Spectrum2D;
181
+ );
182
182
  // correlation is represented by a 2D signal
183
+
184
+ if (!isSpectrum2D(spectrum)) return false;
185
+
183
186
  if (
184
187
  findSignalMatch2D(
185
188
  spectrum,
@@ -196,11 +199,10 @@ function SummaryPanel() {
196
199
  // try to find a link which contains the belonging 2D signal in the spectra in view
197
200
  else if (
198
201
  correlation.link.some((link: any) => {
199
- const spectrum = findSpectrum(
200
- spectraData,
201
- link.experimentID,
202
- true,
203
- ) as Spectrum2D;
202
+ const spectrum = findSpectrum(spectraData, link.experimentID, true);
203
+
204
+ if (!isSpectrum2D(spectrum)) return false;
205
+
204
206
  return findSignalMatch2D(
205
207
  spectrum,
206
208
  link,
@@ -2,17 +2,20 @@ import { useDispatch } from '../../context/DispatchContext.js';
2
2
  import { useToaster } from '../../context/ToasterContext.js';
3
3
  import type { AlertButton } from '../../elements/Alert.js';
4
4
  import { useAlert } from '../../elements/Alert.js';
5
+ import useCheckExperimentalFeature from '../../hooks/useCheckExperimentalFeature.ts';
5
6
  import useSpectrum from '../../hooks/useSpectrum.js';
6
7
  import { TablePanel } from '../extra/BasicPanelStyle.js';
7
8
  import DefaultPanelHeader from '../header/DefaultPanelHeader.js';
8
9
 
9
10
  import { FiltersSectionsPanel } from './Filters/FiltersSectionsPanel.js';
11
+ import { ProcessingsSectionsPanel } from './processings_sections_panel.tsx';
10
12
 
11
13
  export default function FiltersPanel() {
12
14
  const dispatch = useDispatch();
13
15
  const toaster = useToaster();
14
16
  const { showAlert } = useAlert();
15
17
  const { filters } = useSpectrum({ filters: [] });
18
+ const isExperimental = useCheckExperimentalFeature();
16
19
 
17
20
  function handleDeleteFilter() {
18
21
  const buttons: AlertButton[] = [
@@ -46,6 +49,13 @@ export default function FiltersPanel() {
46
49
  />
47
50
  <div className="inner-container">
48
51
  <FiltersSectionsPanel />
52
+
53
+ {isExperimental && (
54
+ <>
55
+ <hr />
56
+ <ProcessingsSectionsPanel />
57
+ </>
58
+ )}
49
59
  </div>
50
60
  </TablePanel>
51
61
  );
@@ -330,6 +330,7 @@ function OptionsSection(options: OptionsSectionProps) {
330
330
 
331
331
  return (
332
332
  <Sections.Item
333
+ id={algorithm}
333
334
  title={algorithmTitle}
334
335
  arrowProps={{ hide: true }}
335
336
  isOpen={isApplyChecked}