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
@@ -0,0 +1,307 @@
1
+ import { Classes, Switch } from '@blueprintjs/core';
2
+ import styled from '@emotion/styled';
3
+ import type {
4
+ ProcessingOperatorId,
5
+ SpectrumProcessingOperation,
6
+ } from '@zakodium/nmrium-core';
7
+ import { cast } from '@zakodium/utils';
8
+ import type { Filter1D, Filter2D } from 'nmr-processing';
9
+ import type { Dispatch, SetStateAction } from 'react';
10
+ import { useMemo, useState } from 'react';
11
+ import { ObjectInspector } from 'react-inspector';
12
+ import { Button } from 'react-science/ui';
13
+
14
+ import { useChartData } from '../../context/ChartContext.tsx';
15
+ import { useCore } from '../../context/CoreContext.tsx';
16
+ import type { AlertButton } from '../../elements/Alert.tsx';
17
+ import { useAlert } from '../../elements/Alert.tsx';
18
+ import { EmptyText } from '../../elements/EmptyText.tsx';
19
+ import { Sections } from '../../elements/Sections.tsx';
20
+ import useSpectrum from '../../hooks/useSpectrum.ts';
21
+ import type { Tool } from '../../toolbar/ToolTypes.ts';
22
+ import {
23
+ CoreOperatorExpanded,
24
+ CoreOperatorName,
25
+ } from '../../utility/CoreSlot.tsx';
26
+ import DefaultPanelHeader from '../header/DefaultPanelHeader.tsx';
27
+ import type { ProcessingsMutations } from '../hooks/use_processings_mutation.ts';
28
+ import { useProcessingsMutations } from '../hooks/use_processings_mutation.ts';
29
+
30
+ const mapToolsToProcessing: Partial<Record<Tool, ProcessingOperatorId>> = {
31
+ apodization: '@zakodium/nmrium-core-plugins#apodization1D',
32
+ zeroFilling: '@zakodium/nmrium-core-plugins#zeroFilling1D',
33
+ fft: '@zakodium/nmrium-core-plugins#fft1D',
34
+ phaseCorrection: '@zakodium/nmrium-core-plugins#phaseCorrection1D',
35
+ };
36
+
37
+ type FilterName = Filter1D['name'] | Filter2D['name'];
38
+ const mapFiltersToProcessings: Partial<
39
+ Record<FilterName, ProcessingOperatorId>
40
+ > = {
41
+ apodization: '@zakodium/nmrium-core-plugins#apodization1D',
42
+ digitalFilter: '@zakodium/nmrium-core-plugins#digitalFilter1D',
43
+ fft: '@zakodium/nmrium-core-plugins#fft1D',
44
+ phaseCorrection: '@zakodium/nmrium-core-plugins#phaseCorrection1D',
45
+ shiftX: '@zakodium/nmrium-core-plugins#shiftX1D',
46
+ zeroFilling: '@zakodium/nmrium-core-plugins#zeroFilling1D',
47
+ };
48
+
49
+ const unremoveableProcessings = new Set<ProcessingOperatorId>([
50
+ '@zakodium/nmrium-core-plugins#digitalFilter1D',
51
+ '@zakodium/nmrium-core-plugins#digitalFilter2D',
52
+ ]);
53
+
54
+ export function ProcessingsSectionsPanel() {
55
+ const core = useCore();
56
+ const { showAlert } = useAlert();
57
+ const spectrum = useSpectrum();
58
+ const { toolOptions } = useChartData();
59
+ const processingsMutations = useProcessingsMutations();
60
+
61
+ cast<FilterName>(toolOptions.data.activeFilterID);
62
+ const selectedToolProcessing = mapToolsToProcessing[toolOptions.selectedTool];
63
+ const activeProcessing =
64
+ mapFiltersToProcessings[toolOptions.data.activeFilterID];
65
+ const [openedOperation, setOpenedOperation] = useState<string>();
66
+
67
+ const processings = spectrum?.processings ?? [];
68
+
69
+ const selectedProcessing = useMemo<{
70
+ operatorId?: ProcessingOperatorId;
71
+ operationId?: string;
72
+ }>(() => {
73
+ if (selectedToolProcessing) return { operatorId: selectedToolProcessing };
74
+ if (
75
+ activeProcessing &&
76
+ spectrum?.processings?.some((p) => p.operatorId === activeProcessing)
77
+ ) {
78
+ return { operatorId: activeProcessing };
79
+ }
80
+
81
+ return { operationId: openedOperation };
82
+ }, [
83
+ activeProcessing,
84
+ openedOperation,
85
+ selectedToolProcessing,
86
+ spectrum?.processings,
87
+ ]);
88
+
89
+ function handleDeleteFilter() {
90
+ const buttons: AlertButton[] = [
91
+ {
92
+ text: 'Yes',
93
+ intent: 'danger',
94
+ onClick: () => void processingsMutations.removeAll(),
95
+ },
96
+ { text: 'No' },
97
+ ];
98
+
99
+ showAlert({
100
+ message:
101
+ 'You are about to delete all processing steps, Are you sure?. Experimental, not implemented yet',
102
+ buttons,
103
+ });
104
+ }
105
+
106
+ function toggleSection(operationId: string) {
107
+ setOpenedOperation(
108
+ openedOperation === operationId ? undefined : operationId,
109
+ );
110
+ }
111
+
112
+ function onReorder(sourceIndex: number, targetIndex: number) {
113
+ void processingsMutations.reorder(sourceIndex, targetIndex);
114
+ }
115
+
116
+ if (!spectrum) return null;
117
+
118
+ return (
119
+ <>
120
+ <DefaultPanelHeader
121
+ deleteTooltip="Delete all filters"
122
+ onDelete={handleDeleteFilter}
123
+ total={processings?.length}
124
+ hideCounter
125
+ />
126
+
127
+ {processings.length === 0 && <EmptyText text="No Processings" />}
128
+ {processings.length > 0 && (
129
+ <Sections isOverflow renderActiveSectionContentOnly>
130
+ {processings?.map((operation, index) => {
131
+ const operatorUI = core.slotOperator(operation.operatorId);
132
+ const isOpen =
133
+ selectedProcessing.operatorId === operation.operatorId ||
134
+ selectedProcessing.operationId === operation.uid;
135
+ const isEditable = operatorUI?.isEditable;
136
+
137
+ return (
138
+ <Sections.Item
139
+ key={operation.uid}
140
+ id={operation.uid}
141
+ title={
142
+ <CoreOperatorName
143
+ id={operation.operatorId}
144
+ fallback={operation.operatorId.split('#', 2).at(-1)}
145
+ />
146
+ }
147
+ isOpen={isOpen}
148
+ index={index}
149
+ serial={index + 1}
150
+ sticky
151
+ onReorder={onReorder}
152
+ onClick={() => toggleSection(operation.uid)}
153
+ rightElement={
154
+ <ProcessingItemExtra
155
+ isOpen={isOpen}
156
+ isEditable={isEditable}
157
+ setOpenedOperation={setOpenedOperation}
158
+ processingsMutations={processingsMutations}
159
+ operation={operation}
160
+ />
161
+ }
162
+ >
163
+ <Sections.Body style={{ paddingBottom: '120px' }}>
164
+ <CoreOperatorExpanded
165
+ id={operation.operatorId}
166
+ fallback={<OperationFallback operation={operation} />}
167
+ operation={operation}
168
+ core={core}
169
+ onChange={(operation) => {
170
+ void processingsMutations.apply(
171
+ // onChange generally change settings
172
+ // so options should be re-computed
173
+ { ...operation, options: undefined },
174
+ index,
175
+ );
176
+ setOpenedOperation(undefined);
177
+ }}
178
+ >
179
+ {(children) => (
180
+ <LiveEditBanner>
181
+ <Switch
182
+ label="Live preview"
183
+ innerLabelChecked="On"
184
+ innerLabel="Off"
185
+ checked
186
+ />
187
+ <Switch
188
+ label="Processed"
189
+ innerLabelChecked="On"
190
+ innerLabel="Off"
191
+ checked
192
+ />
193
+ <Spacer />
194
+ {children}
195
+ <Button
196
+ variant="minimal"
197
+ intent="danger"
198
+ onClick={() => setOpenedOperation(undefined)}
199
+ size="small"
200
+ >
201
+ Cancel
202
+ </Button>
203
+ </LiveEditBanner>
204
+ )}
205
+ </CoreOperatorExpanded>
206
+ </Sections.Body>
207
+ </Sections.Item>
208
+ );
209
+ })}
210
+ </Sections>
211
+ )}
212
+ </>
213
+ );
214
+ }
215
+
216
+ interface ProcessingItemExtraProps {
217
+ operation: SpectrumProcessingOperation<unknown, unknown>;
218
+ isOpen: boolean;
219
+ isEditable: boolean | undefined;
220
+ setOpenedOperation: Dispatch<SetStateAction<string | undefined>>;
221
+ processingsMutations: ProcessingsMutations;
222
+ }
223
+
224
+ function ProcessingItemExtra(props: ProcessingItemExtraProps) {
225
+ const {
226
+ operation,
227
+ isOpen,
228
+ isEditable,
229
+ setOpenedOperation,
230
+ processingsMutations,
231
+ } = props;
232
+
233
+ return (
234
+ <CompactControls>
235
+ {isEditable && (
236
+ <Button
237
+ tooltipProps={{ content: 'Edit filter' }}
238
+ intent="success"
239
+ variant="minimal"
240
+ onClick={() => setOpenedOperation(operation.uid)}
241
+ icon="annotation"
242
+ disabled={isOpen}
243
+ />
244
+ )}
245
+
246
+ <Button
247
+ tooltipProps={{ content: 'Delete filter' }}
248
+ intent="danger"
249
+ variant="minimal"
250
+ onClick={() => processingsMutations.remove(operation.uid)}
251
+ disabled={unremoveableProcessings.has(operation.operatorId)}
252
+ icon="trash"
253
+ />
254
+
255
+ <Switch
256
+ checked={operation.enabled ?? false}
257
+ innerLabelChecked="On"
258
+ innerLabel="Off"
259
+ onChange={() => processingsMutations.switchEnabled(operation.uid)}
260
+ />
261
+ </CompactControls>
262
+ );
263
+ }
264
+
265
+ interface OperationFallbackProps {
266
+ operation: SpectrumProcessingOperation<unknown, unknown>;
267
+ }
268
+
269
+ function OperationFallback(props: OperationFallbackProps) {
270
+ const { operation } = props;
271
+ const { settings, options } = operation;
272
+
273
+ if (settings === null) {
274
+ return <EmptyText text=" No options available" />;
275
+ }
276
+
277
+ return <ObjectInspector data={{ settings, options }} />;
278
+ }
279
+
280
+ const CompactControls = styled.div`
281
+ display: flex;
282
+ align-items: center;
283
+
284
+ .${Classes.CONTROL} {
285
+ margin-bottom: 0;
286
+ }
287
+ `;
288
+
289
+ const LiveEditBanner = styled.div`
290
+ background-color: white;
291
+ box-shadow: rgb(0 0 0 / 16%) 0 1px 4px;
292
+ margin-left: -10px;
293
+ margin-right: -10px;
294
+ transform: translateY(-10px);
295
+ padding: 5px;
296
+ display: flex;
297
+ align-items: center;
298
+ gap: 5px;
299
+
300
+ .${Classes.CONTROL} {
301
+ margin-bottom: 0;
302
+ }
303
+ `;
304
+
305
+ const Spacer = styled.span`
306
+ flex: 1;
307
+ `;
@@ -0,0 +1,171 @@
1
+ import type {
2
+ Spectrum,
3
+ SpectrumProcessingOperation,
4
+ } from '@zakodium/nmrium-core';
5
+ import { sliceSpectrum } from '@zakodium/nmrium-core';
6
+ import { noop } from '@zakodium/utils';
7
+ import type { Draft } from 'immer';
8
+
9
+ import { initializeContoursLevels } from '../../../data/data2d/Spectrum2D/contours.ts';
10
+ import { isSpectrum2D } from '../../../data/data2d/Spectrum2D/index.ts';
11
+ import { useChartData } from '../../context/ChartContext.tsx';
12
+ import { useCore } from '../../context/CoreContext.tsx';
13
+ import { useDispatch } from '../../context/DispatchContext.tsx';
14
+ import type { State } from '../../reducer/Reducer.ts';
15
+ import { setDomain, setMode } from '../../reducer/actions/DomainActions.ts';
16
+ import { updateView } from '../../reducer/actions/FiltersActions.ts';
17
+ import { resetSelectedTool } from '../../reducer/actions/ToolsActions.ts';
18
+ import zoomHistoryManager from '../../reducer/helper/ZoomHistoryManager.ts';
19
+ import { getActiveSpectrum } from '../../reducer/helper/getActiveSpectrum.ts';
20
+
21
+ export type ProcessingsMutations = ReturnType<typeof useProcessingsMutations>;
22
+
23
+ export function useProcessingsMutations() {
24
+ const core = useCore();
25
+ const state = useChartData();
26
+ const dispatch = useDispatch();
27
+
28
+ function setIsLoading(isLoading: boolean) {
29
+ dispatch({
30
+ type: 'SET_LOADING_FLAG',
31
+ payload: { isLoading },
32
+ });
33
+ }
34
+
35
+ /**
36
+ * Return sliced spectrum allowing free mutations
37
+ */
38
+ function getSpectrum() {
39
+ const activeSpectrum = getActiveSpectrum(state);
40
+ if (!activeSpectrum) return {};
41
+
42
+ const id = activeSpectrum.id;
43
+ const indexSpectrum = state.data.findIndex((s) => s.id === id);
44
+ if (indexSpectrum === -1) return {};
45
+
46
+ const spectrum = sliceSpectrum(state.data[indexSpectrum]);
47
+
48
+ return { spectrum, indexSpectrum };
49
+ }
50
+
51
+ async function submit(
52
+ spectrum: Spectrum,
53
+ index: number,
54
+ onProduce: (draft: Draft<State>, processedSpectrum: Spectrum) => void,
55
+ ) {
56
+ setIsLoading(true);
57
+ const processedSpectrum = await core
58
+ .processSpectrum(spectrum)
59
+ .finally(() => setIsLoading(false));
60
+
61
+ dispatch({
62
+ type: 'SET_SPECTRUM',
63
+ payload: {
64
+ index,
65
+ spectrum: processedSpectrum,
66
+ onProduce,
67
+ },
68
+ });
69
+ }
70
+
71
+ return {
72
+ async apply(
73
+ operation: SpectrumProcessingOperation<any, any>,
74
+ indexOperation: number,
75
+ ) {
76
+ const { spectrum, indexSpectrum } = getSpectrum();
77
+
78
+ if (!spectrum?.processings) return;
79
+ if (indexOperation > spectrum.processings.length) return;
80
+
81
+ spectrum.processings[indexOperation] = operation;
82
+
83
+ await submit(spectrum, indexSpectrum, (draft) => {
84
+ const {
85
+ domainUpdateRules = {
86
+ updateXDomain: false,
87
+ updateYDomain: false,
88
+ },
89
+ } = core.getOperator(operation.operatorId) ?? {};
90
+ updateView(draft, domainUpdateRules);
91
+ });
92
+ },
93
+
94
+ async reorder(sourceIndex: number, targetIndex: number) {
95
+ const { spectrum, indexSpectrum } = getSpectrum();
96
+ if (!spectrum?.processings) return;
97
+
98
+ [spectrum.processings[sourceIndex], spectrum.processings[targetIndex]] = [
99
+ spectrum.processings[targetIndex],
100
+ spectrum.processings[sourceIndex],
101
+ ];
102
+
103
+ await submit(spectrum, indexSpectrum, noop);
104
+ },
105
+
106
+ async remove(uid: string) {
107
+ const { spectrum, indexSpectrum } = getSpectrum();
108
+ if (!spectrum?.processings) return;
109
+
110
+ spectrum.processings = spectrum.processings.filter((p) => p.uid !== uid);
111
+
112
+ await submit(spectrum, indexSpectrum, (draft) => {
113
+ draft.toolOptions.data.activeFilterID = null;
114
+ resetSelectedTool(draft);
115
+ setDomain(draft);
116
+ setMode(draft);
117
+ });
118
+ },
119
+
120
+ async removeAll() {
121
+ const { spectrum, indexSpectrum } = getSpectrum();
122
+
123
+ if (!spectrum?.processings) return;
124
+ if (spectrum.processings.length === 0) return;
125
+
126
+ spectrum.processings = [];
127
+
128
+ await submit(spectrum, indexSpectrum, (draft) => {
129
+ draft.toolOptions.data.activeFilterID = null;
130
+ resetSelectedTool(draft);
131
+ setDomain(draft);
132
+ setMode(draft);
133
+ });
134
+ },
135
+
136
+ async switchEnabled(uid: string) {
137
+ const { spectrum, indexSpectrum } = getSpectrum();
138
+ if (!spectrum?.processings) return;
139
+
140
+ const operationIndex = spectrum.processings.findIndex(
141
+ (p) => p.uid === uid,
142
+ );
143
+ if (operationIndex === -1) return;
144
+
145
+ const operation = spectrum.processings[operationIndex];
146
+ operation.enabled = !operation.enabled;
147
+
148
+ await submit(spectrum, indexSpectrum, (draft, processedSpectrum) => {
149
+ if (isSpectrum2D(processedSpectrum) && processedSpectrum.info.isFt) {
150
+ draft.view.spectraContourLevels[processedSpectrum.id] =
151
+ initializeContoursLevels(processedSpectrum);
152
+ }
153
+
154
+ resetSelectedTool(draft);
155
+ setDomain(draft);
156
+ setMode(draft);
157
+
158
+ const zoomHistory = zoomHistoryManager(
159
+ draft.zoom.history,
160
+ draft.view.spectra.activeTab,
161
+ );
162
+ const zoomValue = zoomHistory.getLast();
163
+
164
+ if (zoomValue) {
165
+ draft.xDomain = zoomValue.xDomain;
166
+ draft.yDomain = zoomValue.yDomain;
167
+ }
168
+ });
169
+ },
170
+ };
171
+ }
@@ -13,7 +13,7 @@ import { booleanToString } from '../../utility/booleanToString.js';
13
13
 
14
14
  import { InformationEditionModal } from './InformationEditionModal.js';
15
15
 
16
- const emptyData = { info: {}, meta: {} };
16
+ const emptyData = { info: {}, meta: {}, customInfo: {} };
17
17
 
18
18
  function getToggleInformationBlock(
19
19
  isVisible: boolean,
@@ -648,6 +648,8 @@ function innerSpectrumReducer(draft: Draft<State>, action: Action) {
648
648
  return ToolsActions.setSpectraSameTopHandler(draft);
649
649
  case 'RESET_SPECTRA_SCALE':
650
650
  return ToolsActions.resetSpectraScale(draft);
651
+ case 'SET_SPECTRUM':
652
+ return SpectraActions.setSpectrum(draft, action);
651
653
 
652
654
  case 'CHANGE_SPECTRUM_DISPLAY_VIEW_MODE':
653
655
  return ToolsActions.handleChangeSpectrumDisplayMode(draft);
@@ -741,6 +743,8 @@ function innerSpectrumReducer(draft: Draft<State>, action: Action) {
741
743
  draft,
742
744
  action,
743
745
  );
746
+ case 'CHANGE_SIGNAL_DELTA':
747
+ return RangesActions.handleChangeSignalDelta(draft, action);
744
748
 
745
749
  case 'SET_KEY_PREFERENCES':
746
750
  return PreferencesActions.handleSetKeyPreferences(draft, action);
@@ -58,7 +58,7 @@ export type CorrelationsActions =
58
58
  | DeleteCorrelationAction;
59
59
 
60
60
  function handleUpdateCorrelations(draft: Draft<State>) {
61
- const { data: spectra, correlations } = draft;
61
+ const { data: spectra, correlations } = original(draft);
62
62
  draft.correlations = buildCorrelationData(spectra as Spectrum, {
63
63
  ...correlations.options,
64
64
  values: lodashCloneDeep(correlations.values),
@@ -160,7 +160,7 @@ function handleDeleteCorrelation(
160
160
  if (zone && signal) {
161
161
  deleteSignal2D(draft, {
162
162
  spectrumId: spectrum.id,
163
- zone,
163
+ zone: original(zone),
164
164
  signalId: signal.id,
165
165
  });
166
166
  }
@@ -738,7 +738,7 @@ function getActiveFilterIndex(draft: Draft<State>) {
738
738
  return -1;
739
739
  }
740
740
 
741
- function updateView(
741
+ export function updateView(
742
742
  draft: Draft<State>,
743
743
  filterUpdateDomainRules: Readonly<FilterDomainUpdateRules>,
744
744
  ) {