nmrium 3.1.0 → 3.2.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 (523) hide show
  1. package/lib/component/1d/BrushTracker1D.d.ts.map +1 -1
  2. package/lib/component/1d/BrushTracker1D.js +5 -2
  3. package/lib/component/1d/BrushTracker1D.js.map +1 -1
  4. package/lib/component/1d/FloatPublicationString.d.ts.map +1 -1
  5. package/lib/component/1d/FloatPublicationString.js +28 -24
  6. package/lib/component/1d/FloatPublicationString.js.map +1 -1
  7. package/lib/component/1d/plugin_chart_brush_tracker.d.ts.map +1 -1
  8. package/lib/component/1d/plugin_chart_brush_tracker.js +2 -1
  9. package/lib/component/1d/plugin_chart_brush_tracker.js.map +1 -1
  10. package/lib/component/1d/plugin_svg_chart.d.ts.map +1 -1
  11. package/lib/component/1d/plugin_svg_chart.js +15 -2
  12. package/lib/component/1d/plugin_svg_chart.js.map +1 -1
  13. package/lib/component/1d/ranges/FloatingRanges.js +2 -2
  14. package/lib/component/1d/ranges/FloatingRanges.js.map +1 -1
  15. package/lib/component/1d/ranges/Range.d.ts.map +1 -1
  16. package/lib/component/1d/ranges/Range.js +1 -1
  17. package/lib/component/1d/ranges/Range.js.map +1 -1
  18. package/lib/component/1d-2d/FieldEdition.d.ts +2 -1
  19. package/lib/component/1d-2d/FieldEdition.d.ts.map +1 -1
  20. package/lib/component/1d-2d/FieldEdition.js +3 -3
  21. package/lib/component/1d-2d/FieldEdition.js.map +1 -1
  22. package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +3 -3
  23. package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js.map +1 -1
  24. package/lib/component/2d/1d-tracer/HorizontalSliceChart.d.ts.map +1 -1
  25. package/lib/component/2d/1d-tracer/HorizontalSliceChart.js +2 -1
  26. package/lib/component/2d/1d-tracer/HorizontalSliceChart.js.map +1 -1
  27. package/lib/component/2d/1d-tracer/VerticalSliceChart.d.ts.map +1 -1
  28. package/lib/component/2d/1d-tracer/VerticalSliceChart.js +2 -1
  29. package/lib/component/2d/1d-tracer/VerticalSliceChart.js.map +1 -1
  30. package/lib/component/2d/BrushTracker2D.d.ts.map +1 -1
  31. package/lib/component/2d/BrushTracker2D.js +5 -1
  32. package/lib/component/2d/BrushTracker2D.js.map +1 -1
  33. package/lib/component/2d/SVGContent2D.d.ts.map +1 -1
  34. package/lib/component/2d/SVGContent2D.js +2 -1
  35. package/lib/component/2d/SVGContent2D.js.map +1 -1
  36. package/lib/component/2d/SignalDeltaLine.d.ts +3 -0
  37. package/lib/component/2d/SignalDeltaLine.d.ts.map +1 -1
  38. package/lib/component/2d/SignalDeltaLine.js +3 -4
  39. package/lib/component/2d/SignalDeltaLine.js.map +1 -1
  40. package/lib/component/2d/linked-signals/LinkedSignal.d.ts +7 -0
  41. package/lib/component/2d/linked-signals/LinkedSignal.d.ts.map +1 -0
  42. package/lib/component/2d/linked-signals/LinkedSignal.js +42 -0
  43. package/lib/component/2d/linked-signals/LinkedSignal.js.map +1 -0
  44. package/lib/component/2d/linked-signals/LinkedSignalAssignmentLabel.d.ts +8 -0
  45. package/lib/component/2d/linked-signals/LinkedSignalAssignmentLabel.d.ts.map +1 -0
  46. package/lib/component/2d/linked-signals/LinkedSignalAssignmentLabel.js +152 -0
  47. package/lib/component/2d/linked-signals/LinkedSignalAssignmentLabel.js.map +1 -0
  48. package/lib/component/2d/linked-signals/LinkedSignals.d.ts +2 -0
  49. package/lib/component/2d/linked-signals/LinkedSignals.d.ts.map +1 -0
  50. package/lib/component/2d/linked-signals/LinkedSignals.js +32 -0
  51. package/lib/component/2d/linked-signals/LinkedSignals.js.map +1 -0
  52. package/lib/component/2d/linked-signals/SignalCrossingIndicator.d.ts +3 -0
  53. package/lib/component/2d/linked-signals/SignalCrossingIndicator.d.ts.map +1 -0
  54. package/lib/component/2d/linked-signals/SignalCrossingIndicator.js +36 -0
  55. package/lib/component/2d/linked-signals/SignalCrossingIndicator.js.map +1 -0
  56. package/lib/component/2d/linked-signals/useClassifyCorrelation.d.ts +5 -0
  57. package/lib/component/2d/linked-signals/useClassifyCorrelation.d.ts.map +1 -0
  58. package/lib/component/2d/linked-signals/useClassifyCorrelation.js +16 -0
  59. package/lib/component/2d/linked-signals/useClassifyCorrelation.js.map +1 -0
  60. package/lib/component/2d/linked-signals/useNearestSignalCrossing.d.ts +13 -0
  61. package/lib/component/2d/linked-signals/useNearestSignalCrossing.d.ts.map +1 -0
  62. package/lib/component/2d/linked-signals/useNearestSignalCrossing.js +41 -0
  63. package/lib/component/2d/linked-signals/useNearestSignalCrossing.js.map +1 -0
  64. package/lib/component/2d/linked-signals/utilities/getCorrelationColor.d.ts +5 -0
  65. package/lib/component/2d/linked-signals/utilities/getCorrelationColor.d.ts.map +1 -0
  66. package/lib/component/2d/linked-signals/utilities/getCorrelationColor.js +31 -0
  67. package/lib/component/2d/linked-signals/utilities/getCorrelationColor.js.map +1 -0
  68. package/lib/component/2d/linked-signals/utilities/getCouplingLength.d.ts +3 -0
  69. package/lib/component/2d/linked-signals/utilities/getCouplingLength.d.ts.map +1 -0
  70. package/lib/component/2d/linked-signals/utilities/getCouplingLength.js +41 -0
  71. package/lib/component/2d/linked-signals/utilities/getCouplingLength.js.map +1 -0
  72. package/lib/component/2d/linked-signals/utilities/signalCrossings.d.ts +45 -0
  73. package/lib/component/2d/linked-signals/utilities/signalCrossings.d.ts.map +1 -0
  74. package/lib/component/2d/linked-signals/utilities/signalCrossings.js +73 -0
  75. package/lib/component/2d/linked-signals/utilities/signalCrossings.js.map +1 -0
  76. package/lib/component/2d/utilities/extractSpectrumSignals.d.ts +5 -0
  77. package/lib/component/2d/utilities/extractSpectrumSignals.d.ts.map +1 -1
  78. package/lib/component/2d/utilities/extractSpectrumSignals.js +15 -0
  79. package/lib/component/2d/utilities/extractSpectrumSignals.js.map +1 -1
  80. package/lib/component/2d/utilities/useAssignmentLabelLinkPath.d.ts +17 -0
  81. package/lib/component/2d/utilities/useAssignmentLabelLinkPath.d.ts.map +1 -0
  82. package/lib/component/2d/utilities/useAssignmentLabelLinkPath.js +99 -0
  83. package/lib/component/2d/utilities/useAssignmentLabelLinkPath.js.map +1 -0
  84. package/lib/component/2d/zones/SignalsGuideLines.d.ts.map +1 -1
  85. package/lib/component/2d/zones/SignalsGuideLines.js +3 -2
  86. package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
  87. package/lib/component/2d/zones/Zone.d.ts.map +1 -1
  88. package/lib/component/2d/zones/Zone.js +47 -1
  89. package/lib/component/2d/zones/Zone.js.map +1 -1
  90. package/lib/component/2d/zones/ZonesAssignmentsLabels.d.ts.map +1 -1
  91. package/lib/component/2d/zones/ZonesAssignmentsLabels.js +4 -148
  92. package/lib/component/2d/zones/ZonesAssignmentsLabels.js.map +1 -1
  93. package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
  94. package/lib/component/EventsTrackers/BrushTracker.js +101 -16
  95. package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
  96. package/lib/component/EventsTrackers/KeysListenerTracker.d.ts.map +1 -1
  97. package/lib/component/EventsTrackers/KeysListenerTracker.js +6 -0
  98. package/lib/component/EventsTrackers/KeysListenerTracker.js.map +1 -1
  99. package/lib/component/EventsTrackers/brush_tracker.types.d.ts +40 -0
  100. package/lib/component/EventsTrackers/brush_tracker.types.d.ts.map +1 -1
  101. package/lib/component/EventsTrackers/brush_tracker_drag_gesture.d.ts +42 -0
  102. package/lib/component/EventsTrackers/brush_tracker_drag_gesture.d.ts.map +1 -0
  103. package/lib/component/EventsTrackers/brush_tracker_drag_gesture.js +46 -0
  104. package/lib/component/EventsTrackers/brush_tracker_drag_gesture.js.map +1 -0
  105. package/lib/component/EventsTrackers/brush_tracker_events_listeners.d.ts +1 -1
  106. package/lib/component/EventsTrackers/brush_tracker_events_listeners.d.ts.map +1 -1
  107. package/lib/component/EventsTrackers/brush_tracker_events_listeners.js.map +1 -1
  108. package/lib/component/context/DispatchContext.d.ts +2 -1
  109. package/lib/component/context/DispatchContext.d.ts.map +1 -1
  110. package/lib/component/context/DispatchContext.js.map +1 -1
  111. package/lib/component/context/processings_mutations_context.api.d.ts.map +1 -1
  112. package/lib/component/context/processings_mutations_context.api.js +5 -2
  113. package/lib/component/context/processings_mutations_context.api.js.map +1 -1
  114. package/lib/component/elements/ActionsButtonsPopover.d.ts +1 -0
  115. package/lib/component/elements/ActionsButtonsPopover.d.ts.map +1 -1
  116. package/lib/component/elements/ActionsButtonsPopover.js +14 -6
  117. package/lib/component/elements/ActionsButtonsPopover.js.map +1 -1
  118. package/lib/component/elements/export/ExportContent.js +1 -1
  119. package/lib/component/elements/export/ExportContent.js.map +1 -1
  120. package/lib/component/elements/print/PrintContent.js +1 -1
  121. package/lib/component/elements/print/PrintContent.js.map +1 -1
  122. package/lib/component/elements/tanstack_table/elements/table_row.d.ts.map +1 -1
  123. package/lib/component/elements/tanstack_table/elements/table_row.js +2 -2
  124. package/lib/component/elements/tanstack_table/elements/table_row.js.map +1 -1
  125. package/lib/component/elements/tanstack_table/table.d.ts.map +1 -1
  126. package/lib/component/elements/tanstack_table/table.js +2 -1
  127. package/lib/component/elements/tanstack_table/table.js.map +1 -1
  128. package/lib/component/elements/tanstack_table/types.d.ts +2 -0
  129. package/lib/component/elements/tanstack_table/types.d.ts.map +1 -1
  130. package/lib/component/highlight/index.d.ts +2 -0
  131. package/lib/component/highlight/index.d.ts.map +1 -1
  132. package/lib/component/highlight/index.js.map +1 -1
  133. package/lib/component/hooks/usePanelPreferences.d.ts +2 -2
  134. package/lib/component/hooks/usePanelPreferences.d.ts.map +1 -1
  135. package/lib/component/hooks/usePanelPreferences.js +5 -1
  136. package/lib/component/hooks/usePanelPreferences.js.map +1 -1
  137. package/lib/component/hooks/useToolsFunctions.d.ts.map +1 -1
  138. package/lib/component/hooks/useToolsFunctions.js +8 -5
  139. package/lib/component/hooks/useToolsFunctions.js.map +1 -1
  140. package/lib/component/hooks/use_publication_strings.d.ts +3 -1
  141. package/lib/component/hooks/use_publication_strings.d.ts.map +1 -1
  142. package/lib/component/hooks/use_publication_strings.js +10 -6
  143. package/lib/component/hooks/use_publication_strings.js.map +1 -1
  144. package/lib/component/modal/PredictSpectraModal.d.ts.map +1 -1
  145. package/lib/component/modal/PredictSpectraModal.js +5 -2
  146. package/lib/component/modal/PredictSpectraModal.js.map +1 -1
  147. package/lib/component/modal/PredictionLimitModal.d.ts +10 -0
  148. package/lib/component/modal/PredictionLimitModal.d.ts.map +1 -0
  149. package/lib/component/modal/PredictionLimitModal.js +31 -0
  150. package/lib/component/modal/PredictionLimitModal.js.map +1 -0
  151. package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js +1 -1
  152. package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js.map +1 -1
  153. package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +24 -0
  154. package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts.map +1 -1
  155. package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts +24 -0
  156. package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts.map +1 -1
  157. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +24 -0
  158. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts.map +1 -1
  159. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts +12 -0
  160. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts.map +1 -1
  161. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +12 -0
  162. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts.map +1 -1
  163. package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts +2 -0
  164. package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts.map +1 -1
  165. package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +12 -0
  166. package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts.map +1 -1
  167. package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts +12 -0
  168. package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts.map +1 -1
  169. package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts +12 -0
  170. package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts.map +1 -1
  171. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +12 -0
  172. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts.map +1 -1
  173. package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts +12 -0
  174. package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts.map +1 -1
  175. package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +12 -0
  176. package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts.map +1 -1
  177. package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts +12 -0
  178. package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts.map +1 -1
  179. package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts +12 -0
  180. package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts.map +1 -1
  181. package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts +12 -0
  182. package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts.map +1 -1
  183. package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.js +1 -1
  184. package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.js.map +1 -1
  185. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts +12 -0
  186. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts.map +1 -1
  187. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts +12 -0
  188. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts.map +1 -1
  189. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts +12 -0
  190. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts.map +1 -1
  191. package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts +12 -0
  192. package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts.map +1 -1
  193. package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.js +1 -1
  194. package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.js.map +1 -1
  195. package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.d.ts +11 -0
  196. package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.d.ts.map +1 -1
  197. package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.js +1 -0
  198. package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.js.map +1 -1
  199. package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.d.ts +1 -0
  200. package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.d.ts.map +1 -1
  201. package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.js +1 -0
  202. package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.js.map +1 -1
  203. package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts +12 -0
  204. package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts.map +1 -1
  205. package/lib/component/panels/IntegralsPanel/IntegralTable.js +2 -2
  206. package/lib/component/panels/IntegralsPanel/IntegralTable.js.map +1 -1
  207. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
  208. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +5 -5
  209. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
  210. package/lib/component/panels/MoleculesPanel/MoleculeStructure.d.ts.map +1 -1
  211. package/lib/component/panels/MoleculesPanel/MoleculeStructure.js +11 -9
  212. package/lib/component/panels/MoleculesPanel/MoleculeStructure.js.map +1 -1
  213. package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.d.ts.map +1 -1
  214. package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js +7 -2
  215. package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js.map +1 -1
  216. package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.d.ts +3 -0
  217. package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.d.ts.map +1 -1
  218. package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js +31 -17
  219. package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js.map +1 -1
  220. package/lib/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.d.ts +18 -0
  221. package/lib/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.d.ts.map +1 -0
  222. package/lib/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.js +113 -0
  223. package/lib/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.js.map +1 -0
  224. package/lib/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.d.ts +11 -0
  225. package/lib/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.d.ts.map +1 -0
  226. package/lib/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.js +28 -0
  227. package/lib/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.js.map +1 -0
  228. package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +2 -2
  229. package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js.map +1 -1
  230. package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js +2 -2
  231. package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js.map +1 -1
  232. package/lib/component/panels/SpectraPanel/SpectraPanelHeader.js +1 -1
  233. package/lib/component/panels/SpectraPanel/SpectraPanelHeader.js.map +1 -1
  234. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +1 -3
  235. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js.map +1 -1
  236. package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentLabelColumn.d.ts.map +1 -1
  237. package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentLabelColumn.js +40 -4
  238. package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentLabelColumn.js.map +1 -1
  239. package/lib/component/panels/ZonesPanel/ZonesPanel.d.ts.map +1 -1
  240. package/lib/component/panels/ZonesPanel/ZonesPanel.js +17 -5
  241. package/lib/component/panels/ZonesPanel/ZonesPanel.js.map +1 -1
  242. package/lib/component/panels/accordionItems.d.ts.map +1 -1
  243. package/lib/component/panels/accordionItems.js +7 -0
  244. package/lib/component/panels/accordionItems.js.map +1 -1
  245. package/lib/component/panels/assignment-summary/AssignmentSummaryPanel.d.ts +2 -0
  246. package/lib/component/panels/assignment-summary/AssignmentSummaryPanel.d.ts.map +1 -0
  247. package/lib/component/panels/assignment-summary/AssignmentSummaryPanel.js +136 -0
  248. package/lib/component/panels/assignment-summary/AssignmentSummaryPanel.js.map +1 -0
  249. package/lib/component/panels/assignment-summary/AssignmentsExportModal.d.ts +10 -0
  250. package/lib/component/panels/assignment-summary/AssignmentsExportModal.d.ts.map +1 -0
  251. package/lib/component/panels/assignment-summary/AssignmentsExportModal.js +128 -0
  252. package/lib/component/panels/assignment-summary/AssignmentsExportModal.js.map +1 -0
  253. package/lib/component/panels/assignment-summary/MoleculeAssignmentTable.d.ts +11 -0
  254. package/lib/component/panels/assignment-summary/MoleculeAssignmentTable.d.ts.map +1 -0
  255. package/lib/component/panels/assignment-summary/MoleculeAssignmentTable.js +113 -0
  256. package/lib/component/panels/assignment-summary/MoleculeAssignmentTable.js.map +1 -0
  257. package/lib/component/panels/assignment-summary/table-cells/AssignmentAtomCell.d.ts +8 -0
  258. package/lib/component/panels/assignment-summary/table-cells/AssignmentAtomCell.d.ts.map +1 -0
  259. package/lib/component/panels/assignment-summary/table-cells/AssignmentAtomCell.js +16 -0
  260. package/lib/component/panels/assignment-summary/table-cells/AssignmentAtomCell.js.map +1 -0
  261. package/lib/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.d.ts +7 -0
  262. package/lib/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.d.ts.map +1 -0
  263. package/lib/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.js +22 -0
  264. package/lib/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.js.map +1 -0
  265. package/lib/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.d.ts +7 -0
  266. package/lib/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.d.ts.map +1 -0
  267. package/lib/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.js +5 -0
  268. package/lib/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.js.map +1 -0
  269. package/lib/component/panels/assignment-summary/table-cells/AssignmentLabelCell.d.ts +9 -0
  270. package/lib/component/panels/assignment-summary/table-cells/AssignmentLabelCell.d.ts.map +1 -0
  271. package/lib/component/panels/assignment-summary/table-cells/AssignmentLabelCell.js +10 -0
  272. package/lib/component/panels/assignment-summary/table-cells/AssignmentLabelCell.js.map +1 -0
  273. package/lib/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.d.ts +54 -0
  274. package/lib/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.d.ts.map +1 -0
  275. package/lib/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.js +161 -0
  276. package/lib/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.js.map +1 -0
  277. package/lib/component/panels/assignment-summary/utilities/exportAssignments.d.ts +19 -0
  278. package/lib/component/panels/assignment-summary/utilities/exportAssignments.d.ts.map +1 -0
  279. package/lib/component/panels/assignment-summary/utilities/exportAssignments.js +74 -0
  280. package/lib/component/panels/assignment-summary/utilities/exportAssignments.js.map +1 -0
  281. package/lib/component/panels/assignment-summary/utilities/formatAssignmentACS.d.ts +7 -0
  282. package/lib/component/panels/assignment-summary/utilities/formatAssignmentACS.d.ts.map +1 -0
  283. package/lib/component/panels/assignment-summary/utilities/formatAssignmentACS.js +28 -0
  284. package/lib/component/panels/assignment-summary/utilities/formatAssignmentACS.js.map +1 -0
  285. package/lib/component/panels/assignment-summary/utilities/formatAssignmentShifts.d.ts +12 -0
  286. package/lib/component/panels/assignment-summary/utilities/formatAssignmentShifts.d.ts.map +1 -0
  287. package/lib/component/panels/assignment-summary/utilities/formatAssignmentShifts.js +14 -0
  288. package/lib/component/panels/assignment-summary/utilities/formatAssignmentShifts.js.map +1 -0
  289. package/lib/component/panels/assignment-summary/utilities/getAssignedAtomCounts.d.ts +9 -0
  290. package/lib/component/panels/assignment-summary/utilities/getAssignedAtomCounts.d.ts.map +1 -0
  291. package/lib/component/panels/assignment-summary/utilities/getAssignedAtomCounts.js +23 -0
  292. package/lib/component/panels/assignment-summary/utilities/getAssignedAtomCounts.js.map +1 -0
  293. package/lib/component/panels/assignment-summary/utilities/getAssignmentSignals.d.ts +7 -0
  294. package/lib/component/panels/assignment-summary/utilities/getAssignmentSignals.d.ts.map +1 -0
  295. package/lib/component/panels/assignment-summary/utilities/getAssignmentSignals.js +41 -0
  296. package/lib/component/panels/assignment-summary/utilities/getAssignmentSignals.js.map +1 -0
  297. package/lib/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.d.ts +18 -0
  298. package/lib/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.d.ts.map +1 -0
  299. package/lib/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.js +121 -0
  300. package/lib/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.js.map +1 -0
  301. package/lib/component/panels/assignment-summary/utilities/getSignalsByNucleus.d.ts +16 -0
  302. package/lib/component/panels/assignment-summary/utilities/getSignalsByNucleus.d.ts.map +1 -0
  303. package/lib/component/panels/assignment-summary/utilities/getSignalsByNucleus.js +53 -0
  304. package/lib/component/panels/assignment-summary/utilities/getSignalsByNucleus.js.map +1 -0
  305. package/lib/component/panels/assignment-summary/utilities/types.d.ts +39 -0
  306. package/lib/component/panels/assignment-summary/utilities/types.d.ts.map +1 -0
  307. package/lib/component/panels/assignment-summary/utilities/types.js +2 -0
  308. package/lib/component/panels/assignment-summary/utilities/types.js.map +1 -0
  309. package/lib/component/panels/extra/utilities/MultiplicityUtilities.js +2 -2
  310. package/lib/component/panels/extra/utilities/MultiplicityUtilities.js.map +1 -1
  311. package/lib/component/panels/filtersPanel/processings/operator_edit_banner.d.ts +6 -0
  312. package/lib/component/panels/filtersPanel/processings/operator_edit_banner.d.ts.map +1 -1
  313. package/lib/component/panels/filtersPanel/processings/operator_edit_banner.js +2 -2
  314. package/lib/component/panels/filtersPanel/processings/operator_edit_banner.js.map +1 -1
  315. package/lib/component/panels/filtersPanel/processings/processing_item.d.ts.map +1 -1
  316. package/lib/component/panels/filtersPanel/processings/processing_item.js +1 -1
  317. package/lib/component/panels/filtersPanel/processings/processing_item.js.map +1 -1
  318. package/lib/component/panels/predictionPanel/PredictionPanel.d.ts.map +1 -1
  319. package/lib/component/panels/predictionPanel/PredictionPanel.js +4 -2
  320. package/lib/component/panels/predictionPanel/PredictionPanel.js.map +1 -1
  321. package/lib/component/reducer/Reducer.d.ts.map +1 -1
  322. package/lib/component/reducer/Reducer.js +14 -2
  323. package/lib/component/reducer/Reducer.js.map +1 -1
  324. package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
  325. package/lib/component/reducer/actions/FiltersActions.js +5 -2
  326. package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
  327. package/lib/component/reducer/actions/LinkedSignalsActions.d.ts +29 -0
  328. package/lib/component/reducer/actions/LinkedSignalsActions.d.ts.map +1 -0
  329. package/lib/component/reducer/actions/LinkedSignalsActions.js +62 -0
  330. package/lib/component/reducer/actions/LinkedSignalsActions.js.map +1 -0
  331. package/lib/component/reducer/actions/MoleculeActions.d.ts +7 -28
  332. package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
  333. package/lib/component/reducer/actions/MoleculeActions.js +78 -10
  334. package/lib/component/reducer/actions/MoleculeActions.js.map +1 -1
  335. package/lib/component/reducer/actions/RangesActions.d.ts +2 -8
  336. package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
  337. package/lib/component/reducer/actions/RangesActions.js +3 -43
  338. package/lib/component/reducer/actions/RangesActions.js.map +1 -1
  339. package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
  340. package/lib/component/reducer/actions/ToolsActions.js +10 -0
  341. package/lib/component/reducer/actions/ToolsActions.js.map +1 -1
  342. package/lib/component/reducer/actions/ZonesActions.d.ts +16 -2
  343. package/lib/component/reducer/actions/ZonesActions.d.ts.map +1 -1
  344. package/lib/component/reducer/actions/ZonesActions.js +57 -14
  345. package/lib/component/reducer/actions/ZonesActions.js.map +1 -1
  346. package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +19 -1
  347. package/lib/component/reducer/helper/ZoomHistoryManager.d.ts.map +1 -1
  348. package/lib/component/reducer/helper/ZoomHistoryManager.js +19 -1
  349. package/lib/component/reducer/helper/ZoomHistoryManager.js.map +1 -1
  350. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts +3 -2
  351. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts.map +1 -1
  352. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +4 -1
  353. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js.map +1 -1
  354. package/lib/component/toolbar/ToolTypes.d.ts.map +1 -1
  355. package/lib/component/toolbar/ToolTypes.js +15 -0
  356. package/lib/component/toolbar/ToolTypes.js.map +1 -1
  357. package/lib/component/toolbar/nmr_toolbar.d.ts.map +1 -1
  358. package/lib/component/toolbar/nmr_toolbar.js +15 -7
  359. package/lib/component/toolbar/nmr_toolbar.js.map +1 -1
  360. package/lib/component/utility/core_slots/core_operator_chart_brush.commons.d.ts.map +1 -1
  361. package/lib/component/utility/core_slots/core_operator_chart_brush.commons.js +62 -4
  362. package/lib/component/utility/core_slots/core_operator_chart_brush.commons.js.map +1 -1
  363. package/lib/component/utility/core_slots/core_operator_chart_svg.d.ts.map +1 -1
  364. package/lib/component/utility/core_slots/core_operator_chart_svg.js +2 -2
  365. package/lib/component/utility/core_slots/core_operator_chart_svg.js.map +1 -1
  366. package/lib/component/workspaces/assignment.d.ts.map +1 -1
  367. package/lib/component/workspaces/assignment.js +5 -3
  368. package/lib/component/workspaces/assignment.js.map +1 -1
  369. package/lib/component/workspaces/basic.d.ts.map +1 -1
  370. package/lib/component/workspaces/basic.js +7 -5
  371. package/lib/component/workspaces/basic.js.map +1 -1
  372. package/lib/component/workspaces/embedded.d.ts.map +1 -1
  373. package/lib/component/workspaces/embedded.js +1 -0
  374. package/lib/component/workspaces/embedded.js.map +1 -1
  375. package/lib/component/workspaces/prediction.d.ts.map +1 -1
  376. package/lib/component/workspaces/prediction.js +1 -0
  377. package/lib/component/workspaces/prediction.js.map +1 -1
  378. package/lib/component/workspaces/workspaceDefaultProperties.d.ts.map +1 -1
  379. package/lib/component/workspaces/workspaceDefaultProperties.js +2 -0
  380. package/lib/component/workspaces/workspaceDefaultProperties.js.map +1 -1
  381. package/lib/data/PredictionManager.d.ts +5 -0
  382. package/lib/data/PredictionManager.d.ts.map +1 -1
  383. package/lib/data/PredictionManager.js +11 -1
  384. package/lib/data/PredictionManager.js.map +1 -1
  385. package/lib/data/constants/Multiplets.js +2 -2
  386. package/lib/data/constants/Multiplets.js.map +1 -1
  387. package/lib/data/data2d/Spectrum2D/initiateDatum2D.d.ts.map +1 -1
  388. package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -0
  389. package/lib/data/data2d/Spectrum2D/initiateDatum2D.js.map +1 -1
  390. package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js +1 -1
  391. package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js +9 -10
  392. package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js.map +1 -1
  393. package/lib/data/molecules/Molecule.d.ts +1 -0
  394. package/lib/data/molecules/Molecule.d.ts.map +1 -1
  395. package/lib/data/molecules/Molecule.js +18 -3
  396. package/lib/data/molecules/Molecule.js.map +1 -1
  397. package/lib/data/molecules/MoleculeManager.d.ts +5 -2
  398. package/lib/data/molecules/MoleculeManager.d.ts.map +1 -1
  399. package/lib/data/molecules/MoleculeManager.js +10 -7
  400. package/lib/data/molecules/MoleculeManager.js.map +1 -1
  401. package/lib/utils/clipboard/clipboardHooks.d.ts +3 -1
  402. package/lib/utils/clipboard/clipboardHooks.d.ts.map +1 -1
  403. package/lib/utils/clipboard/clipboardHooks.js +15 -9
  404. package/lib/utils/clipboard/clipboardHooks.js.map +1 -1
  405. package/lib/versionInfo.js +1 -1
  406. package/package.json +48 -48
  407. package/src/component/1d/BrushTracker1D.tsx +5 -2
  408. package/src/component/1d/FloatPublicationString.tsx +39 -33
  409. package/src/component/1d/plugin_chart_brush_tracker.tsx +2 -0
  410. package/src/component/1d/plugin_svg_chart.tsx +20 -1
  411. package/src/component/1d/ranges/FloatingRanges.tsx +2 -2
  412. package/src/component/1d/ranges/Range.tsx +1 -2
  413. package/src/component/1d-2d/FieldEdition.tsx +14 -4
  414. package/src/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.tsx +3 -3
  415. package/src/component/2d/1d-tracer/HorizontalSliceChart.tsx +6 -1
  416. package/src/component/2d/1d-tracer/VerticalSliceChart.tsx +6 -1
  417. package/src/component/2d/BrushTracker2D.tsx +7 -1
  418. package/src/component/2d/SVGContent2D.tsx +2 -0
  419. package/src/component/2d/SignalDeltaLine.tsx +8 -2
  420. package/src/component/2d/linked-signals/LinkedSignal.tsx +68 -0
  421. package/src/component/2d/linked-signals/LinkedSignalAssignmentLabel.tsx +248 -0
  422. package/src/component/2d/linked-signals/LinkedSignals.tsx +56 -0
  423. package/src/component/2d/linked-signals/SignalCrossingIndicator.tsx +63 -0
  424. package/src/component/2d/linked-signals/useClassifyCorrelation.ts +24 -0
  425. package/src/component/2d/linked-signals/useNearestSignalCrossing.ts +68 -0
  426. package/src/component/2d/linked-signals/utilities/getCorrelationColor.ts +46 -0
  427. package/src/component/2d/linked-signals/utilities/getCouplingLength.ts +58 -0
  428. package/src/component/2d/linked-signals/utilities/signalCrossings.ts +167 -0
  429. package/src/component/2d/utilities/extractSpectrumSignals.ts +22 -0
  430. package/src/component/2d/utilities/useAssignmentLabelLinkPath.ts +138 -0
  431. package/src/component/2d/zones/SignalsGuideLines.tsx +9 -2
  432. package/src/component/2d/zones/Zone.tsx +58 -1
  433. package/src/component/2d/zones/ZonesAssignmentsLabels.tsx +5 -198
  434. package/src/component/EventsTrackers/BrushTracker.tsx +135 -25
  435. package/src/component/EventsTrackers/KeysListenerTracker.tsx +6 -0
  436. package/src/component/EventsTrackers/brush_tracker.types.ts +43 -0
  437. package/src/component/EventsTrackers/brush_tracker_drag_gesture.ts +84 -0
  438. package/src/component/EventsTrackers/brush_tracker_events_listeners.ts +7 -1
  439. package/src/component/context/DispatchContext.tsx +2 -0
  440. package/src/component/context/processings_mutations_context.api.ts +6 -2
  441. package/src/component/elements/ActionsButtonsPopover.tsx +22 -3
  442. package/src/component/elements/export/ExportContent.tsx +1 -0
  443. package/src/component/elements/print/PrintContent.tsx +1 -0
  444. package/src/component/elements/tanstack_table/elements/table_row.tsx +5 -1
  445. package/src/component/elements/tanstack_table/table.tsx +2 -0
  446. package/src/component/elements/tanstack_table/types.ts +2 -0
  447. package/src/component/highlight/index.tsx +2 -0
  448. package/src/component/hooks/usePanelPreferences.ts +15 -5
  449. package/src/component/hooks/useToolsFunctions.ts +8 -4
  450. package/src/component/hooks/use_publication_strings.ts +19 -7
  451. package/src/component/modal/PredictSpectraModal.tsx +8 -2
  452. package/src/component/modal/PredictionLimitModal.tsx +88 -0
  453. package/src/component/modal/editRange/forms/validation/EditRangeValidation.ts +1 -1
  454. package/src/component/modal/setting/tanstack_general_settings/tabs/panels_tab.tsx +6 -0
  455. package/src/component/modal/setting/tanstack_general_settings/tabs/tools_tab.tsx +3 -0
  456. package/src/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.ts +1 -0
  457. package/src/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.ts +1 -0
  458. package/src/component/panels/IntegralsPanel/IntegralTable.tsx +2 -2
  459. package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +7 -5
  460. package/src/component/panels/MoleculesPanel/MoleculeStructure.tsx +14 -12
  461. package/src/component/panels/MoleculesPanel/hooks/useAtomAssignment.tsx +12 -2
  462. package/src/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.ts +57 -20
  463. package/src/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.ts +191 -0
  464. package/src/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.ts +29 -0
  465. package/src/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.tsx +2 -2
  466. package/src/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.tsx +2 -2
  467. package/src/component/panels/SpectraPanel/SpectraPanelHeader.tsx +1 -1
  468. package/src/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.tsx +3 -3
  469. package/src/component/panels/ZonesPanel/TableColumns/ZoneAssignmentLabelColumn.tsx +57 -4
  470. package/src/component/panels/ZonesPanel/ZonesPanel.tsx +19 -8
  471. package/src/component/panels/accordionItems.tsx +7 -0
  472. package/src/component/panels/assignment-summary/AssignmentSummaryPanel.tsx +263 -0
  473. package/src/component/panels/assignment-summary/AssignmentsExportModal.tsx +249 -0
  474. package/src/component/panels/assignment-summary/MoleculeAssignmentTable.tsx +223 -0
  475. package/src/component/panels/assignment-summary/table-cells/AssignmentAtomCell.tsx +36 -0
  476. package/src/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.tsx +57 -0
  477. package/src/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.tsx +23 -0
  478. package/src/component/panels/assignment-summary/table-cells/AssignmentLabelCell.tsx +16 -0
  479. package/src/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.ts +254 -0
  480. package/src/component/panels/assignment-summary/utilities/exportAssignments.ts +135 -0
  481. package/src/component/panels/assignment-summary/utilities/formatAssignmentACS.ts +35 -0
  482. package/src/component/panels/assignment-summary/utilities/formatAssignmentShifts.ts +26 -0
  483. package/src/component/panels/assignment-summary/utilities/getAssignedAtomCounts.ts +32 -0
  484. package/src/component/panels/assignment-summary/utilities/getAssignmentSignals.ts +55 -0
  485. package/src/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.ts +175 -0
  486. package/src/component/panels/assignment-summary/utilities/getSignalsByNucleus.ts +60 -0
  487. package/src/component/panels/assignment-summary/utilities/types.ts +47 -0
  488. package/src/component/panels/extra/utilities/MultiplicityUtilities.ts +2 -2
  489. package/src/component/panels/filtersPanel/processings/operator_edit_banner.tsx +8 -1
  490. package/src/component/panels/filtersPanel/processings/processing_item.tsx +2 -1
  491. package/src/component/panels/predictionPanel/PredictionPanel.tsx +6 -2
  492. package/src/component/reducer/Reducer.ts +23 -5
  493. package/src/component/reducer/actions/FiltersActions.ts +6 -2
  494. package/src/component/reducer/actions/LinkedSignalsActions.ts +128 -0
  495. package/src/component/reducer/actions/MoleculeActions.ts +139 -11
  496. package/src/component/reducer/actions/RangesActions.ts +3 -85
  497. package/src/component/reducer/actions/ToolsActions.ts +13 -0
  498. package/src/component/reducer/actions/ZonesActions.ts +95 -13
  499. package/src/component/reducer/helper/ZoomHistoryManager.ts +41 -1
  500. package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +7 -0
  501. package/src/component/toolbar/ToolTypes.ts +15 -0
  502. package/src/component/toolbar/nmr_toolbar.tsx +17 -21
  503. package/src/component/utility/core_slots/core_operator_chart_brush.commons.ts +99 -3
  504. package/src/component/utility/core_slots/core_operator_chart_svg.tsx +4 -0
  505. package/src/component/workspaces/assignment.ts +5 -3
  506. package/src/component/workspaces/basic.ts +7 -5
  507. package/src/component/workspaces/embedded.ts +1 -0
  508. package/src/component/workspaces/prediction.ts +1 -0
  509. package/src/component/workspaces/workspaceDefaultProperties.ts +2 -0
  510. package/src/data/PredictionManager.ts +11 -1
  511. package/src/data/constants/Multiplets.ts +2 -2
  512. package/src/data/data2d/Spectrum2D/initiateDatum2D.ts +1 -0
  513. package/src/data/data2d/Spectrum2D/zones/detectZonesManual.ts +1 -1
  514. package/src/data/data2d/Spectrum2D/zones/getDetectionZones.ts +7 -8
  515. package/src/data/molecules/Molecule.ts +22 -6
  516. package/src/data/molecules/MoleculeManager.ts +11 -9
  517. package/src/utils/clipboard/clipboardHooks.ts +19 -16
  518. package/src/versionInfo.ts +1 -1
  519. package/lib/utils/clipboard/clipboard.d.ts +0 -15
  520. package/lib/utils/clipboard/clipboard.d.ts.map +0 -1
  521. package/lib/utils/clipboard/clipboard.js +0 -19
  522. package/lib/utils/clipboard/clipboard.js.map +0 -1
  523. package/src/utils/clipboard/clipboard.ts +0 -36
@@ -0,0 +1,135 @@
1
+ import type { ACSExportOptions, Spectrum } from '@zakodium/nmrium-core';
2
+ import type { GroupedDiaID, TopicMolecule } from 'openchemlib-utils';
3
+ import papa from 'papaparse';
4
+
5
+ import { formatAssignmentLabel } from '../table-cells/AssignmentLabelCell.js';
6
+
7
+ import {
8
+ atomGroupsToAssignmentRows,
9
+ getHydrogenIDsByParent,
10
+ getVisibleAssignmentRows,
11
+ } from './atomGroupsToAssignmentRows.js';
12
+ import { formatAssignmentACS } from './formatAssignmentACS.js';
13
+ import { formatAssignmentShifts } from './formatAssignmentShifts.js';
14
+ import { getAssignmentSignals } from './getAssignmentSignals.js';
15
+ import {
16
+ formatLinkedCorrelations,
17
+ getLinkedCorrelationsByExperiment,
18
+ } from './getLinkedCorrelationsByExperiment.js';
19
+ import { getSignalsByNucleus } from './getSignalsByNucleus.js';
20
+ import type { GetAssignmentSignalsOptions } from './types.js';
21
+
22
+ export type AssignmentExportRowMode = 'current' | 'expanded' | 'collapsed';
23
+
24
+ interface AssignmentExportOptions {
25
+ groups: GroupedDiaID[];
26
+ topicMolecule: TopicMolecule;
27
+ spectra: Spectrum[];
28
+ expandedGroups: Set<string>;
29
+ rowMode: AssignmentExportRowMode;
30
+ acsExportSettings: Record<string, ACSExportOptions>;
31
+ defaultACSOptions: ACSExportOptions;
32
+ delimiter: ',' | '\t';
33
+ }
34
+
35
+ /**
36
+ * Export the selected molecule as CSV or TSV using the table's formatting rules.
37
+ */
38
+ export function exportAssignments(options: AssignmentExportOptions): string {
39
+ const { fields, data } = getAssignmentExportData(options);
40
+ return papa.unparse(
41
+ { fields, data },
42
+ { delimiter: options.delimiter, escapeFormulae: true },
43
+ );
44
+ }
45
+
46
+ function getAssignmentExportData(options: AssignmentExportOptions) {
47
+ const {
48
+ groups,
49
+ topicMolecule,
50
+ spectra,
51
+ expandedGroups,
52
+ rowMode,
53
+ acsExportSettings,
54
+ defaultACSOptions,
55
+ } = options;
56
+ const allRows = atomGroupsToAssignmentRows(groups, true);
57
+ const rows =
58
+ rowMode === 'expanded'
59
+ ? allRows
60
+ : getVisibleAssignmentRows(
61
+ allRows,
62
+ rowMode === 'current' ? expandedGroups : new Set<string>(),
63
+ );
64
+ const hydrogenIDsByParent = getHydrogenIDsByParent(allRows);
65
+ const linkedAssignmentsByExperiment = Array.from(
66
+ getLinkedCorrelationsByExperiment(spectra, topicMolecule),
67
+ );
68
+ const nuclei = Array.from(
69
+ getSignalsByNucleus(spectra),
70
+ ([nucleus, signals]) => ({
71
+ nucleus,
72
+ signalsByOclID: signals,
73
+ acs: acsExportSettings[nucleus] ?? defaultACSOptions,
74
+ }),
75
+ );
76
+
77
+ const fields = [
78
+ 'Atom',
79
+ 'Atom numbers',
80
+ 'Atom labels',
81
+ ...nuclei.map(({ nucleus }) => nucleus),
82
+ ...linkedAssignmentsByExperiment.map(([experiment]) => experiment),
83
+ ];
84
+ const data = rows.map((row) => [
85
+ row.atomLabel,
86
+ formatAssignmentLabel({
87
+ value: row.atomNumbers,
88
+ hydrogenValue: row.hydrogenAtomNumbers,
89
+ isExpanded: row.isExpanded,
90
+ }),
91
+ formatAssignmentLabel({
92
+ value: row.atomLabels,
93
+ hydrogenValue: row.hydrogenAtomLabels,
94
+ isExpanded: row.isExpanded,
95
+ }),
96
+ ...nuclei.map(({ signalsByOclID, acs }) =>
97
+ formatAssignmentCell({
98
+ row,
99
+ signalsByOclID,
100
+ hydrogenIDsByParent,
101
+ groups,
102
+ acs,
103
+ }),
104
+ ),
105
+ ...linkedAssignmentsByExperiment.map(([, assignmentsByOclID]) =>
106
+ formatLinkedCorrelations(row, assignmentsByOclID, hydrogenIDsByParent)
107
+ .map(({ text }) => text)
108
+ .join(', '),
109
+ ),
110
+ ]);
111
+
112
+ return { fields, data };
113
+ }
114
+
115
+ interface FormatAssignmentCellOptions extends GetAssignmentSignalsOptions {
116
+ acs: ACSExportOptions;
117
+ }
118
+
119
+ function formatAssignmentCell(options: FormatAssignmentCellOptions): string {
120
+ const { row, acs } = options;
121
+
122
+ return getAssignmentSignals(options)
123
+ .map((assignment) => {
124
+ if (row.isHydrogen) {
125
+ return `${formatAssignmentShifts({ assignment, deltaFormat: acs.deltaFormat })} ppm`;
126
+ }
127
+ // The ACS formatter emits <i>J</i> for couplings
128
+ // Strip HTML tags so spreadsheet cells contain plain text.
129
+ return formatAssignmentACS({ assignment, acs }).replaceAll(
130
+ /<[^>]+>/g,
131
+ '',
132
+ );
133
+ })
134
+ .join(', ');
135
+ }
@@ -0,0 +1,35 @@
1
+ import type { ACSExportOptions } from '@zakodium/nmrium-core';
2
+ import { rangesToACS } from 'nmr-processing';
3
+
4
+ import { getRangesToACSOptions } from '../../../hooks/use_publication_strings.js';
5
+
6
+ import type { FormatAssignmentOptions } from './types.js';
7
+
8
+ const assignmentACSOptions: Partial<ACSExportOptions> = {
9
+ signalKind: 'signal',
10
+ ascending: true,
11
+ format: 'IMJ',
12
+ textStyle: {},
13
+ };
14
+
15
+ /**
16
+ * Format one spectrum's assignments as ACS HTML without the spectrum header,
17
+ * delta prefix, or final period.
18
+ */
19
+ export function formatAssignmentACS(options: FormatAssignmentOptions): string {
20
+ const { assignment } = options;
21
+ const { spectrum, ranges } = assignment;
22
+ const acs = {
23
+ ...options.acs,
24
+ ...assignmentACSOptions,
25
+ ...(spectrum.info.nucleus === '13C' && { format: 'D' }),
26
+ };
27
+
28
+ const acsString = rangesToACS(ranges, {
29
+ ...getRangesToACSOptions(spectrum.info, acs),
30
+ filter: false,
31
+ });
32
+
33
+ // "1H NMR (600 MHz): δ 4.04 (d)." becomes "4.04 (d)".
34
+ return acsString.replaceAll(/^(?:[^:]*:\s*)?\u{03B4}\s*|\.$/gu, '');
35
+ }
@@ -0,0 +1,26 @@
1
+ import { formatNumber } from '../../../utility/formatNumber.js';
2
+
3
+ import type { AssignmentSignals } from './types.js';
4
+
5
+ interface FormatAssignmentShiftsOptions {
6
+ assignment: AssignmentSignals;
7
+ deltaFormat: string;
8
+ }
9
+
10
+ /**
11
+ * Sort and format signal deltas without adding spectrum details or units.
12
+ * @returns Shift values joined with ', '
13
+ */
14
+ export function formatAssignmentShifts(
15
+ options: FormatAssignmentShiftsOptions,
16
+ ): string {
17
+ const { assignment, deltaFormat } = options;
18
+ const deltas = assignment.ranges.flatMap(({ signals }) =>
19
+ signals.map(({ delta }) => delta),
20
+ );
21
+
22
+ return deltas
23
+ .toSorted((a, b) => a - b)
24
+ .map((delta) => formatNumber(delta, deltaFormat))
25
+ .join(', ');
26
+ }
@@ -0,0 +1,32 @@
1
+ import type { GroupedDiaID } from 'openchemlib-utils';
2
+
3
+ import type { AssignedAtomCounts, SignalsByOclID } from './types.js';
4
+
5
+ /**
6
+ * Count atoms of the nucleus's element in the selected molecule.
7
+ * The lookup must belong to that nucleus. Counts measure assignment coverage,
8
+ * not the number of signals or whether the assignments have been verified.
9
+ */
10
+ export function getAssignedAtomCounts(
11
+ groups: GroupedDiaID[],
12
+ signalsByOclID: SignalsByOclID,
13
+ nucleus: string,
14
+ ): AssignedAtomCounts {
15
+ let assigned = 0;
16
+ let total = 0;
17
+ const atomLabel = nucleus.replace(/^\d+/, '');
18
+
19
+ for (const group of groups) {
20
+ if (group.atomLabel !== atomLabel) continue;
21
+
22
+ // Count individual equivalent atoms (for example, 3 H in a methyl group),
23
+ // not one atom per group. The total is independent of observed signals.
24
+ total += group.atoms.length;
25
+ // A group counts once if assigned in any spectrum of this nucleus.
26
+ if (signalsByOclID.has(group.oclID)) {
27
+ assigned += group.atoms.length;
28
+ }
29
+ }
30
+
31
+ return { assigned, total };
32
+ }
@@ -0,0 +1,55 @@
1
+ import type { Range } from '@zakodium/nmr-types';
2
+
3
+ import type {
4
+ AssignedSignal,
5
+ AssignmentSignals,
6
+ GetAssignmentSignalsOptions,
7
+ } from './types.js';
8
+
9
+ /**
10
+ * Build each spectrum's ranges for a row, keeping only the row's signals and
11
+ * write how many of the row's atoms each range is assigned to as its integration.
12
+ */
13
+ export function getAssignmentSignals(
14
+ options: GetAssignmentSignalsOptions,
15
+ ): AssignmentSignals[] {
16
+ const { row, groups, signalsByOclID, hydrogenIDsByParent } = options;
17
+ const atomCountByOclID = new Map(
18
+ groups.map(({ oclID, atoms }) => [oclID, atoms.length]),
19
+ );
20
+
21
+ // A signal appears under every group it is assigned to, so visiting the
22
+ // row's groups accumulates exactly the row's atoms for that signal.
23
+ const atomCounts = new Map<AssignedSignal, number>();
24
+ for (const oclID of [row.id, ...(hydrogenIDsByParent.get(row.id) ?? [])]) {
25
+ for (const entry of signalsByOclID.get(oclID) ?? []) {
26
+ const atomCount = atomCountByOclID.get(oclID) ?? 0;
27
+ atomCounts.set(entry, (atomCounts.get(entry) ?? 0) + atomCount);
28
+ }
29
+ }
30
+
31
+ const assignmentsBySpectrum = new Map<string, AssignmentSignals>();
32
+ const rowRangeBySource = new Map<Range, Range>();
33
+ for (const [{ spectrum, range, signal }, atomCount] of atomCounts) {
34
+ let assignment = assignmentsBySpectrum.get(spectrum.id);
35
+ if (!assignment) {
36
+ assignment = { spectrum, ranges: [] };
37
+ assignmentsBySpectrum.set(spectrum.id, assignment);
38
+ }
39
+ let rowRange = rowRangeBySource.get(range);
40
+ if (!rowRange) {
41
+ rowRange = {
42
+ ...range,
43
+ signals: [],
44
+ integration: 0,
45
+ pubIntegral: undefined,
46
+ };
47
+ rowRangeBySource.set(range, rowRange);
48
+ assignment.ranges.push(rowRange);
49
+ }
50
+ rowRange.signals.push(signal);
51
+ rowRange.integration = (rowRange.integration ?? 0) + atomCount;
52
+ }
53
+
54
+ return Array.from(assignmentsBySpectrum.values());
55
+ }
@@ -0,0 +1,175 @@
1
+ import type { Spectrum } from '@zakodium/nmrium-core';
2
+ import { isSpectrum1D, isSpectrum2DFt } from '@zakodium/nmrium-core';
3
+ import type { TopicMolecule } from 'openchemlib-utils';
4
+
5
+ import { getCouplingLength } from '../../../2d/linked-signals/utilities/getCouplingLength.js';
6
+ import { sortAssignmentLabels } from '../../MoleculesPanel/utilities/sortAssignmentLabels.js';
7
+
8
+ import type { AssignmentListRow } from './atomGroupsToAssignmentRows.js';
9
+
10
+ export interface LinkedAssignment {
11
+ text: string;
12
+ coupling?: { distance: number; labels: string };
13
+ }
14
+
15
+ type LinkedAssignmentsByOclID = Map<string, Map<string, LinkedAssignment>>;
16
+
17
+ function getOclIDsBySignalId(spectra: Spectrum[]): Map<string, string[]> {
18
+ const oclIDsBySignalId = new Map<string, string[]>();
19
+
20
+ for (const spectrum of spectra) {
21
+ if (!isSpectrum1D(spectrum)) continue;
22
+
23
+ for (const range of spectrum.ranges.values) {
24
+ for (const signal of range.signals) {
25
+ oclIDsBySignalId.set(signal.id, signal.diaIDs ?? []);
26
+ }
27
+ }
28
+ }
29
+
30
+ return oclIDsBySignalId;
31
+ }
32
+
33
+ function getAtomLabel(topicMolecule: TopicMolecule, atom: number): string {
34
+ const molecule = topicMolecule.moleculeWithH;
35
+ const label = molecule.getAtomCustomLabel(atom);
36
+ const heavyAtomLabel =
37
+ molecule.getAtomicNo(atom) === 1
38
+ ? molecule.getAtomCustomLabel(molecule.getConnAtom(atom, 0))
39
+ : undefined;
40
+ return (label || heavyAtomLabel || '').replace(/^\]/, '').trim();
41
+ }
42
+
43
+ function getShortestAssignment(
44
+ topicMolecule: TopicMolecule,
45
+ xOclIDs: string[],
46
+ yOclIDs: string[],
47
+ ): ResolvedLinkAssignment | null {
48
+ const distance = getCouplingLength(
49
+ { selected: topicMolecule },
50
+ xOclIDs,
51
+ yOclIDs,
52
+ );
53
+ if (!distance) return null;
54
+
55
+ const groups = topicMolecule.getDiaIDsObject();
56
+ const matrix = topicMolecule.distanceMatrix;
57
+ for (const xDiaID of xOclIDs) {
58
+ for (const yDiaID of yOclIDs) {
59
+ for (const xAtom of groups[xDiaID]?.atoms ?? []) {
60
+ for (const yAtom of groups[yDiaID]?.atoms ?? []) {
61
+ if (matrix[xAtom][yAtom] !== distance) continue;
62
+
63
+ const xLabel = getAtomLabel(topicMolecule, xAtom);
64
+ const yLabel = getAtomLabel(topicMolecule, yAtom);
65
+ if (!xLabel || !yLabel) return null;
66
+ const labels = `${xLabel} - ${yLabel}`;
67
+ return {
68
+ oclIDs: [xDiaID, yDiaID],
69
+ assignment: {
70
+ text: `${distance}J${labels}`,
71
+ coupling: { distance, labels },
72
+ },
73
+ };
74
+ }
75
+ }
76
+ }
77
+ }
78
+ return null;
79
+ }
80
+
81
+ interface ResolvedLinkAssignment {
82
+ oclIDs: string[];
83
+ assignment: LinkedAssignment;
84
+ }
85
+
86
+ /**
87
+ * Decide what a single 2D link contributes to the summary:
88
+ * the shortest coupling path when the molecule provides one,
89
+ * otherwise the label saved on the link.
90
+ */
91
+ function resolveLinkAssignment(
92
+ topicMolecule: TopicMolecule,
93
+ link: { xOclIDs: string[]; yOclIDs: string[]; assignment?: string },
94
+ ): ResolvedLinkAssignment | null {
95
+ const { xOclIDs, yOclIDs, assignment } = link;
96
+ const shortest = getShortestAssignment(topicMolecule, xOclIDs, yOclIDs);
97
+ if (shortest) return shortest;
98
+
99
+ if (!assignment) return null;
100
+
101
+ return { oclIDs: [...xOclIDs, ...yOclIDs], assignment: { text: assignment } };
102
+ }
103
+
104
+ /**
105
+ * Group 2D correlations by experiment and the selected molecule's atom groups.
106
+ */
107
+ export function getLinkedCorrelationsByExperiment(
108
+ spectra: Spectrum[],
109
+ topicMolecule: TopicMolecule,
110
+ ): Map<string, LinkedAssignmentsByOclID> {
111
+ const oclIDsBySignalId = getOclIDsBySignalId(spectra);
112
+ const assignmentsByExperiment = new Map<string, LinkedAssignmentsByOclID>();
113
+
114
+ for (const spectrum of spectra) {
115
+ if (!isSpectrum2DFt(spectrum)) continue;
116
+
117
+ const experiment = spectrum.info.experiment?.toUpperCase() || '2D';
118
+ let assignmentsByOclID = assignmentsByExperiment.get(experiment);
119
+ if (!assignmentsByOclID) {
120
+ assignmentsByOclID = new Map();
121
+ assignmentsByExperiment.set(experiment, assignmentsByOclID);
122
+ }
123
+
124
+ for (const link of spectrum.linkedSignals ?? []) {
125
+ const resolved = resolveLinkAssignment(topicMolecule, {
126
+ xOclIDs: oclIDsBySignalId.get(link.xSignalId) ?? [],
127
+ yOclIDs: oclIDsBySignalId.get(link.ySignalId) ?? [],
128
+ assignment: link.assignment,
129
+ });
130
+ if (!resolved) continue;
131
+ addAssignmentToAtoms(
132
+ assignmentsByOclID,
133
+ resolved.oclIDs,
134
+ resolved.assignment,
135
+ );
136
+ }
137
+ }
138
+
139
+ return assignmentsByExperiment;
140
+ }
141
+
142
+ function addAssignmentToAtoms(
143
+ assignmentsByOclID: LinkedAssignmentsByOclID,
144
+ oclIDs: string[],
145
+ assignment: LinkedAssignment,
146
+ ) {
147
+ for (const oclID of oclIDs) {
148
+ let assignments = assignmentsByOclID.get(oclID);
149
+ if (!assignments) {
150
+ assignments = new Map();
151
+ assignmentsByOclID.set(oclID, assignments);
152
+ }
153
+ assignments.set(assignment.text, assignment);
154
+ }
155
+ }
156
+
157
+ export function formatLinkedCorrelations(
158
+ row: AssignmentListRow,
159
+ assignmentsByOclID: LinkedAssignmentsByOclID,
160
+ hydrogenIDsByParent: Map<string, string[]>,
161
+ ): LinkedAssignment[] {
162
+ const oclIDs = [row.id, ...(hydrogenIDsByParent.get(row.id) ?? [])];
163
+ const assignments = new Map<string, LinkedAssignment>();
164
+
165
+ for (const oclID of oclIDs) {
166
+ for (const [text, assignment] of assignmentsByOclID.get(oclID) ?? []) {
167
+ assignments.set(text, assignment);
168
+ }
169
+ }
170
+ const assignmentKeys = Array.from(assignments.keys());
171
+ return sortAssignmentLabels(assignmentKeys).flatMap((text) => {
172
+ const assignment = assignments.get(text);
173
+ return assignment ? [assignment] : [];
174
+ });
175
+ }
@@ -0,0 +1,60 @@
1
+ import type { Spectrum } from '@zakodium/nmrium-core';
2
+ import { isSpectrum1D } from '@zakodium/nmrium-core';
3
+
4
+ import type {
5
+ AssignedSignal,
6
+ AssignmentSpectrum,
7
+ SignalsByNucleus,
8
+ } from './types.js';
9
+
10
+ /**
11
+ * Build a nucleus to oclIDs lookup of assigned 1D signals.
12
+ *
13
+ * @returns A map containing an OCL ID lookup for each 1D nucleus, including
14
+ * nuclei without assignments so their columns remain visible.
15
+ * Only the spectrum ID, nucleus, and frequency are retained in a shared metadata
16
+ * object.
17
+ *
18
+ * Notes:
19
+ * 1. Unassigned signals are omitted.
20
+ * 2. Repeated IDs within a signal occur once.
21
+ */
22
+ export function getSignalsByNucleus(spectra: Spectrum[]): SignalsByNucleus {
23
+ const signalsByNucleus = new Map<string, Map<string, AssignedSignal[]>>();
24
+ for (const spectrum of spectra) {
25
+ if (!isSpectrum1D(spectrum)) continue;
26
+
27
+ // Share one atom-group lookup across all 1D spectra of the same nucleus.
28
+ // Create it even without assignments so the nucleus column stays visible.
29
+ const nucleus = spectrum.info.nucleus;
30
+ let signalsByOclID = signalsByNucleus.get(nucleus);
31
+
32
+ if (!signalsByOclID) {
33
+ signalsByOclID = new Map();
34
+ signalsByNucleus.set(nucleus, signalsByOclID);
35
+ }
36
+ // Keep each spectrum's frequency for formatting its own coupling values.
37
+ const assignmentSpectrum: AssignmentSpectrum = {
38
+ id: spectrum.id,
39
+ info: {
40
+ nucleus: spectrum.info.nucleus,
41
+ originFrequency: spectrum.info.originFrequency,
42
+ },
43
+ };
44
+ for (const range of spectrum.ranges.values) {
45
+ for (const signal of range.signals) {
46
+ const entry = { spectrum: assignmentSpectrum, range, signal };
47
+ // Index a signal under every linked group, without repeating a link.
48
+ for (const oclID of new Set(signal.diaIDs)) {
49
+ const entries = signalsByOclID.get(oclID);
50
+ if (entries) {
51
+ entries.push(entry);
52
+ } else {
53
+ signalsByOclID.set(oclID, [entry]);
54
+ }
55
+ }
56
+ }
57
+ }
58
+ }
59
+ return signalsByNucleus;
60
+ }
@@ -0,0 +1,47 @@
1
+ import type { Range, Signal1D } from '@zakodium/nmr-types';
2
+ import type { ACSExportOptions, Spectrum1D } from '@zakodium/nmrium-core';
3
+ import type { GroupedDiaID } from 'openchemlib-utils';
4
+
5
+ import type { AssignmentListRow } from './atomGroupsToAssignmentRows.js';
6
+
7
+ export interface AssignmentSpectrum {
8
+ id: string;
9
+ info: Pick<Spectrum1D['info'], 'nucleus' | 'originFrequency'>;
10
+ }
11
+
12
+ export interface AssignedSignal {
13
+ spectrum: AssignmentSpectrum;
14
+ range: Range;
15
+ signal: Signal1D;
16
+ }
17
+
18
+ export type SignalsByOclID = Map<string, AssignedSignal[]>;
19
+
20
+ /**
21
+ * Index signals by nucleus, then OCL ID, so each column can directly look up
22
+ * assignments across all spectra of its nucleus without filtering other nuclei.
23
+ * Entries retain spectrum metadata because ACS formatting needs its frequency.
24
+ */
25
+ export type SignalsByNucleus = Map<string, SignalsByOclID>;
26
+
27
+ export interface AssignedAtomCounts {
28
+ assigned: number;
29
+ total: number;
30
+ }
31
+
32
+ export interface AssignmentSignals {
33
+ spectrum: AssignmentSpectrum;
34
+ ranges: Range[];
35
+ }
36
+
37
+ export interface GetAssignmentSignalsOptions {
38
+ row: AssignmentListRow;
39
+ groups: GroupedDiaID[];
40
+ signalsByOclID: SignalsByOclID;
41
+ hydrogenIDsByParent: Map<string, string[]>;
42
+ }
43
+
44
+ export interface FormatAssignmentOptions {
45
+ assignment: AssignmentSignals;
46
+ acs: ACSExportOptions;
47
+ }
@@ -1,6 +1,6 @@
1
1
  import {
2
- checkMultiplicity,
3
2
  findMultiplet,
3
+ isMultiplicityValid,
4
4
  translateMultiplet,
5
5
  } from 'nmr-processing';
6
6
 
@@ -17,7 +17,7 @@ function hasCouplingConstant(multiplet: string) {
17
17
  multiplet = translateMultiplet(multiplet);
18
18
  }
19
19
  // with the pre-set rejected ones, we check the given multiplicity for the need of having a coupling constant (massive and singlet do not)
20
- return checkMultiplicity(multiplet, ['m', 's']);
20
+ return isMultiplicityValid(multiplet, ['m', 's']);
21
21
  }
22
22
 
23
23
  function getPascal(n: number | undefined, spin: number) {
@@ -7,6 +7,12 @@ import { Button } from 'react-science/ui';
7
7
  import type { UseLiveEdit } from './use_live_edit.ts';
8
8
 
9
9
  interface OperatorEditBannerProps {
10
+ /**
11
+ * Content rendered at the leftmost position of the banner, before the
12
+ * live preview controls. Provided by the processing operator UI
13
+ * (second argument of the `children` render method).
14
+ */
15
+ leftContent?: ReactNode;
10
16
  isLiveEditable: boolean;
11
17
  liveEdit: UseLiveEdit;
12
18
  onClose: () => void;
@@ -14,10 +20,11 @@ interface OperatorEditBannerProps {
14
20
  }
15
21
 
16
22
  export function OperatorEditBanner(props: OperatorEditBannerProps) {
17
- const { isLiveEditable, liveEdit, children, onClose } = props;
23
+ const { leftContent, isLiveEditable, liveEdit, children, onClose } = props;
18
24
 
19
25
  return (
20
26
  <LiveEditBanner>
27
+ {leftContent}
21
28
  {isLiveEditable && (
22
29
  <>
23
30
  <Switch
@@ -125,9 +125,10 @@ export function ProcessingItem(props: ProcessingItemProps) {
125
125
  );
126
126
  }}
127
127
  >
128
- {(submitButton) =>
128
+ {(submitButton, leftContent) =>
129
129
  !isEditable ? null : (
130
130
  <OperatorEditBanner
131
+ leftContent={leftContent}
131
132
  isLiveEditable={isLiveEditable ?? false}
132
133
  liveEdit={liveEdit}
133
134
  onClose={() => selectProcessingOperator(undefined)}
@@ -15,6 +15,7 @@ import { useToaster } from '../../context/ToasterContext.js';
15
15
  import { NextPrev } from '../../elements/NextPrev.js';
16
16
  import { usePanelPreferences } from '../../hooks/usePanelPreferences.js';
17
17
  import { useMoleculeEditor } from '../../modal/MoleculeStructureEditorModal.js';
18
+ import { usePredictionErrorHandler } from '../../modal/PredictionLimitModal.tsx';
18
19
  import MoleculeHeader from '../MoleculesPanel/MoleculeHeader.js';
19
20
  import MoleculePanelHeader from '../MoleculesPanel/MoleculePanelHeader.js';
20
21
  import { TablePanel } from '../extra/BasicPanelStyle.js';
@@ -61,6 +62,8 @@ export default function PredictionPanel() {
61
62
  const { open: openAccordionPanel } = useAccordionControls();
62
63
  const predictionPreferences = usePanelPreferences('prediction');
63
64
  const { modal, openMoleculeEditor } = useMoleculeEditor(true);
65
+ const { handlePredictionError, predictionLimitModal } =
66
+ usePredictionErrorHandler();
64
67
  const refreshSliderRef = useRef<boolean>(true);
65
68
 
66
69
  const [initialMolfile] = useState(molfile ?? '');
@@ -129,8 +132,8 @@ export default function PredictionPanel() {
129
132
  },
130
133
  });
131
134
  openAccordionPanel('spectraPanel');
132
- } catch (error: any) {
133
- toaster.show({ message: error.message, intent: 'danger' });
135
+ } catch (error: unknown) {
136
+ handlePredictionError(error);
134
137
  } finally {
135
138
  hideLoading();
136
139
  }
@@ -261,6 +264,7 @@ export default function PredictionPanel() {
261
264
  </>
262
265
  )}
263
266
  {modal}
267
+ {predictionLimitModal}
264
268
  </TablePanel>
265
269
  );
266
270
  }