nmrium 0.63.2 → 0.65.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 (538) hide show
  1. package/lib/component/1d/BrushTracker1D.d.ts.map +1 -1
  2. package/lib/component/1d/BrushTracker1D.js +20 -5
  3. package/lib/component/1d/BrushTracker1D.js.map +1 -1
  4. package/lib/component/1d/FloatPublicationString.js +1 -1
  5. package/lib/component/1d/FloatPublicationString.js.map +1 -1
  6. package/lib/component/1d/FloatingRanges.js +1 -1
  7. package/lib/component/1d/FloatingRanges.js.map +1 -1
  8. package/lib/component/1d/PredictionErrorsNotations.d.ts +2 -0
  9. package/lib/component/1d/PredictionErrorsNotations.d.ts.map +1 -0
  10. package/lib/component/1d/PredictionErrorsNotations.js +112 -0
  11. package/lib/component/1d/PredictionErrorsNotations.js.map +1 -0
  12. package/lib/component/1d/SVGContent1D.d.ts.map +1 -1
  13. package/lib/component/1d/SVGContent1D.js +2 -1
  14. package/lib/component/1d/SVGContent1D.js.map +1 -1
  15. package/lib/component/1d/Viewer1D.js +1 -1
  16. package/lib/component/1d/Viewer1D.js.map +1 -1
  17. package/lib/component/1d/integral/IntegralResizable.d.ts +1 -1
  18. package/lib/component/1d/integral/IntegralResizable.d.ts.map +1 -1
  19. package/lib/component/1d/integral/IntegralsSeries.d.ts +1 -1
  20. package/lib/component/1d/integral/IntegralsSeries.d.ts.map +1 -1
  21. package/lib/component/1d/integral/IntegralsSeries.js.map +1 -1
  22. package/lib/component/1d/jCouplingGraph/JGraph.js.map +1 -1
  23. package/lib/component/1d/jCouplingGraph/JsCouplings.d.ts +1 -1
  24. package/lib/component/1d/jCouplingGraph/JsCouplings.d.ts.map +1 -1
  25. package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts +1 -1
  26. package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts.map +1 -1
  27. package/lib/component/1d/multiplicityTree/MultiplicityTree.js.map +1 -1
  28. package/lib/component/1d/multiplicityTree/generateTreeNodes.d.ts +1 -1
  29. package/lib/component/1d/multiplicityTree/generateTreeNodes.d.ts.map +1 -1
  30. package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.d.ts.map +1 -1
  31. package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js +2 -4
  32. package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js.map +1 -1
  33. package/lib/component/1d/peaks/Peaks.d.ts +1 -1
  34. package/lib/component/1d/peaks/Peaks.d.ts.map +1 -1
  35. package/lib/component/1d/peaks/usePeakShapesPath.d.ts +1 -1
  36. package/lib/component/1d/peaks/usePeakShapesPath.d.ts.map +1 -1
  37. package/lib/component/1d/ranges/AssignmentLabel.d.ts +1 -1
  38. package/lib/component/1d/ranges/AssignmentLabel.d.ts.map +1 -1
  39. package/lib/component/1d/ranges/Atoms.d.ts +1 -1
  40. package/lib/component/1d/ranges/Atoms.d.ts.map +1 -1
  41. package/lib/component/1d/ranges/Range.d.ts +1 -1
  42. package/lib/component/1d/ranges/Range.d.ts.map +1 -1
  43. package/lib/component/1d/ranges/Ranges.d.ts.map +1 -1
  44. package/lib/component/1d/ranges/Ranges.js.map +1 -1
  45. package/lib/component/1d-2d/components/SpectrumInfoBlock.d.ts.map +1 -1
  46. package/lib/component/1d-2d/components/SpectrumInfoBlock.js +2 -4
  47. package/lib/component/1d-2d/components/SpectrumInfoBlock.js.map +1 -1
  48. package/lib/component/1d-2d/tools/BrushXY.d.ts +10 -7
  49. package/lib/component/1d-2d/tools/BrushXY.d.ts.map +1 -1
  50. package/lib/component/1d-2d/tools/BrushXY.js +177 -16
  51. package/lib/component/1d-2d/tools/BrushXY.js.map +1 -1
  52. package/lib/component/2d/BrushTracker2D.d.ts.map +1 -1
  53. package/lib/component/2d/BrushTracker2D.js +15 -4
  54. package/lib/component/2d/BrushTracker2D.js.map +1 -1
  55. package/lib/component/2d/Viewer2D.d.ts.map +1 -1
  56. package/lib/component/2d/Viewer2D.js +1 -1
  57. package/lib/component/2d/Viewer2D.js.map +1 -1
  58. package/lib/component/2d/ft/Contours.d.ts.map +1 -1
  59. package/lib/component/2d/ft/Contours.js +3 -4
  60. package/lib/component/2d/ft/Contours.js.map +1 -1
  61. package/lib/component/2d/utilities/extractSpectrumSignals.d.ts +5 -3
  62. package/lib/component/2d/utilities/extractSpectrumSignals.d.ts.map +1 -1
  63. package/lib/component/2d/utilities/extractSpectrumSignals.js +3 -3
  64. package/lib/component/2d/utilities/extractSpectrumSignals.js.map +1 -1
  65. package/lib/component/2d/zones/Signal.d.ts +1 -1
  66. package/lib/component/2d/zones/Signal.d.ts.map +1 -1
  67. package/lib/component/2d/zones/SignalCrosshair.d.ts +1 -1
  68. package/lib/component/2d/zones/SignalCrosshair.d.ts.map +1 -1
  69. package/lib/component/2d/zones/SignalsGuideLines.d.ts.map +1 -1
  70. package/lib/component/2d/zones/SignalsGuideLines.js +74 -6
  71. package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
  72. package/lib/component/2d/zones/Zone.d.ts +1 -1
  73. package/lib/component/2d/zones/Zone.d.ts.map +1 -1
  74. package/lib/component/2d/zones/Zone.js.map +1 -1
  75. package/lib/component/2d/zones/ZonesAssignmentsLabels.js.map +1 -1
  76. package/lib/component/EventsTrackers/BrushTracker.d.ts +5 -0
  77. package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
  78. package/lib/component/EventsTrackers/BrushTracker.js +106 -31
  79. package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
  80. package/lib/component/SVGTable.d.ts.map +1 -1
  81. package/lib/component/SVGTable.js +1 -4
  82. package/lib/component/SVGTable.js.map +1 -1
  83. package/lib/component/assignment/AssignmentProvider.d.ts.map +1 -1
  84. package/lib/component/assignment/AssignmentProvider.js +2 -1
  85. package/lib/component/assignment/AssignmentProvider.js.map +1 -1
  86. package/lib/component/assignment/AssignmentsContext.d.ts +5 -2
  87. package/lib/component/assignment/AssignmentsContext.d.ts.map +1 -1
  88. package/lib/component/assignment/AssignmentsContext.js +2 -1
  89. package/lib/component/assignment/AssignmentsContext.js.map +1 -1
  90. package/lib/component/assignment/utilities/getAssignments.d.ts.map +1 -1
  91. package/lib/component/elements/ArrowBox.d.ts +16 -0
  92. package/lib/component/elements/ArrowBox.d.ts.map +1 -0
  93. package/lib/component/elements/ArrowBox.js +55 -0
  94. package/lib/component/elements/ArrowBox.js.map +1 -0
  95. package/lib/component/elements/DraggableDialog.js +2 -0
  96. package/lib/component/elements/DraggableDialog.js.map +1 -1
  97. package/lib/component/elements/Input.d.ts.map +1 -1
  98. package/lib/component/elements/Input.js +2 -2
  99. package/lib/component/elements/Input.js.map +1 -1
  100. package/lib/component/elements/Input2.js +2 -2
  101. package/lib/component/elements/Input2.js.map +1 -1
  102. package/lib/component/elements/NextPrev.d.ts.map +1 -1
  103. package/lib/component/elements/NextPrev.js +2 -4
  104. package/lib/component/elements/NextPrev.js.map +1 -1
  105. package/lib/component/elements/NumberInput2.js +1 -1
  106. package/lib/component/elements/NumberInput2.js.map +1 -1
  107. package/lib/component/elements/ReactTable/Elements/ReactTableRow.d.ts.map +1 -1
  108. package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +3 -1
  109. package/lib/component/elements/ReactTable/Elements/ReactTableRow.js.map +1 -1
  110. package/lib/component/elements/ReactTable/ReactTable.d.ts.map +1 -1
  111. package/lib/component/elements/ReactTable/ReactTable.js +6 -5
  112. package/lib/component/elements/ReactTable/ReactTable.js.map +1 -1
  113. package/lib/component/elements/SVGGroup.js +1 -1
  114. package/lib/component/elements/SVGGroup.js.map +1 -1
  115. package/lib/component/elements/Sections.d.ts +1 -0
  116. package/lib/component/elements/Sections.d.ts.map +1 -1
  117. package/lib/component/elements/Sections.js +42 -7
  118. package/lib/component/elements/Sections.js.map +1 -1
  119. package/lib/component/elements/Tab/Tabs.d.ts.map +1 -1
  120. package/lib/component/elements/Tab/Tabs.js +3 -1
  121. package/lib/component/elements/Tab/Tabs.js.map +1 -1
  122. package/lib/component/elements/pdnd.cjs +12 -0
  123. package/lib/component/elements/pdnd.cjs.map +1 -0
  124. package/lib/component/elements/pdnd.d.cts +2 -0
  125. package/lib/component/elements/pdnd.d.cts.map +1 -0
  126. package/lib/component/highlight/index.d.ts +2 -2
  127. package/lib/component/highlight/index.d.ts.map +1 -1
  128. package/lib/component/highlight/index.js +1 -1
  129. package/lib/component/highlight/index.js.map +1 -1
  130. package/lib/component/hooks/useCheckToolsVisibility.d.ts +1 -1
  131. package/lib/component/hooks/useCheckToolsVisibility.d.ts.map +1 -1
  132. package/lib/component/hooks/useCombinedRefs.d.ts +2 -2
  133. package/lib/component/hooks/useCombinedRefs.d.ts.map +1 -1
  134. package/lib/component/hooks/useCombinedRefs.js +2 -0
  135. package/lib/component/hooks/useCombinedRefs.js.map +1 -1
  136. package/lib/component/hooks/useDatumWithSpectraStatistics.d.ts +1 -1
  137. package/lib/component/hooks/useDatumWithSpectraStatistics.d.ts.map +1 -1
  138. package/lib/component/hooks/useFilter.d.ts +1 -1
  139. package/lib/component/hooks/useFilter.d.ts.map +1 -1
  140. package/lib/component/hooks/useToolsFunctions.js +1 -1
  141. package/lib/component/hooks/useToolsFunctions.js.map +1 -1
  142. package/lib/component/main/InnerNMRiumContents.d.ts.map +1 -1
  143. package/lib/component/main/InnerNMRiumContents.js +6 -3
  144. package/lib/component/main/InnerNMRiumContents.js.map +1 -1
  145. package/lib/component/modal/EditPeakShapeModal.d.ts +1 -1
  146. package/lib/component/modal/EditPeakShapeModal.d.ts.map +1 -1
  147. package/lib/component/modal/EditPeakShapeModal.js.map +1 -1
  148. package/lib/component/modal/editRange/EditRangeModal.js.map +1 -1
  149. package/lib/component/modal/editRange/forms/components/SignalsContent.d.ts +1 -1
  150. package/lib/component/modal/editRange/forms/components/SignalsContent.d.ts.map +1 -1
  151. package/lib/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.js.map +1 -1
  152. package/lib/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.js.map +1 -1
  153. package/lib/component/modal/editRange/utils/couplingsToMultiplicity.d.ts +1 -1
  154. package/lib/component/modal/editRange/utils/couplingsToMultiplicity.d.ts.map +1 -1
  155. package/lib/component/modal/editRange/utils/mapCouplings.d.ts +1 -1
  156. package/lib/component/modal/editRange/utils/mapCouplings.d.ts.map +1 -1
  157. package/lib/component/modal/editRange/utils/mapRange.d.ts +1 -1
  158. package/lib/component/modal/editRange/utils/mapRange.d.ts.map +1 -1
  159. package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.d.ts.map +1 -1
  160. package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js +7 -4
  161. package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js.map +1 -1
  162. package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js +3 -3
  163. package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js.map +1 -1
  164. package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts +1 -1
  165. package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts.map +1 -1
  166. package/lib/component/panels/IntegralsPanel/IntegralPanel.js.map +1 -1
  167. package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +1 -1
  168. package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts.map +1 -1
  169. package/lib/component/panels/IntegralsPanel/IntegralTable.js.map +1 -1
  170. package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.d.ts +2 -2
  171. package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.d.ts.map +1 -1
  172. package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +11 -11
  173. package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js.map +1 -1
  174. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +1 -1
  175. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
  176. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +21 -15
  177. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
  178. package/lib/component/panels/MoleculesPanel/Utilities.d.ts.map +1 -1
  179. package/lib/component/panels/MoleculesPanel/useAtomAssignment.d.ts.map +1 -1
  180. package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +17 -9
  181. package/lib/component/panels/MoleculesPanel/useAtomAssignment.js.map +1 -1
  182. package/lib/component/panels/Panels.d.ts +0 -4
  183. package/lib/component/panels/Panels.d.ts.map +1 -1
  184. package/lib/component/panels/Panels.js +8 -14
  185. package/lib/component/panels/Panels.js.map +1 -1
  186. package/lib/component/panels/PanelsBar.d.ts.map +1 -1
  187. package/lib/component/panels/PanelsBar.js +2 -4
  188. package/lib/component/panels/PanelsBar.js.map +1 -1
  189. package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts +1 -1
  190. package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts.map +1 -1
  191. package/lib/component/panels/PeaksPanel/PeaksPanel.js.map +1 -1
  192. package/lib/component/panels/PeaksPanel/PeaksTable.d.ts +1 -1
  193. package/lib/component/panels/PeaksPanel/PeaksTable.d.ts.map +1 -1
  194. package/lib/component/panels/PeaksPanel/PeaksTable.js.map +1 -1
  195. package/lib/component/panels/RangesPanel/RangesHeader.d.ts +1 -1
  196. package/lib/component/panels/RangesPanel/RangesHeader.d.ts.map +1 -1
  197. package/lib/component/panels/RangesPanel/RangesHeader.js +5 -8
  198. package/lib/component/panels/RangesPanel/RangesHeader.js.map +1 -1
  199. package/lib/component/panels/RangesPanel/RangesPanel.js.map +1 -1
  200. package/lib/component/panels/RangesPanel/RangesTable.d.ts +1 -1
  201. package/lib/component/panels/RangesPanel/RangesTable.d.ts.map +1 -1
  202. package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +1 -1
  203. package/lib/component/panels/RangesPanel/RangesTableRow.d.ts.map +1 -1
  204. package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.d.ts +1 -1
  205. package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.d.ts.map +1 -1
  206. package/lib/component/panels/RangesPanel/hooks/useMapRanges.d.ts +1 -1
  207. package/lib/component/panels/RangesPanel/hooks/useMapRanges.d.ts.map +1 -1
  208. package/lib/component/panels/SpectraPanel/base/setting/Spectrum2DSetting.d.ts.map +1 -1
  209. package/lib/component/panels/SpectraPanel/base/setting/Spectrum2DSetting.js +4 -1
  210. package/lib/component/panels/SpectraPanel/base/setting/Spectrum2DSetting.js.map +1 -1
  211. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts +1 -1
  212. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts.map +1 -1
  213. package/lib/component/panels/ZonesPanel/ZonesTable.d.ts +1 -1
  214. package/lib/component/panels/ZonesPanel/ZonesTable.d.ts.map +1 -1
  215. package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts +1 -1
  216. package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts.map +1 -1
  217. package/lib/component/panels/extra/utilities/MultiplicityUtilities.d.ts +1 -1
  218. package/lib/component/panels/extra/utilities/MultiplicityUtilities.d.ts.map +1 -1
  219. package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.d.ts.map +1 -1
  220. package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.js +7 -1
  221. package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.js.map +1 -1
  222. package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.d.ts.map +1 -1
  223. package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js +3 -3
  224. package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js.map +1 -1
  225. package/lib/component/panels/filtersPanel/Filters/hooks/useApodization.d.ts +1 -1
  226. package/lib/component/panels/filtersPanel/Filters/hooks/useApodization.d.ts.map +1 -1
  227. package/lib/component/panels/filtersPanel/Filters/hooks/useApodization.js.map +1 -1
  228. package/lib/component/panels/filtersPanel/Filters/hooks/useBaselineCorrection.d.ts +1 -1
  229. package/lib/component/panels/filtersPanel/Filters/hooks/useBaselineCorrection.d.ts.map +1 -1
  230. package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.d.ts +2 -2
  231. package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.d.ts.map +1 -1
  232. package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.js +15 -17
  233. package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.js.map +1 -1
  234. package/lib/component/panels/filtersPanel/Filters/hooks/useZeroFilling.js +2 -2
  235. package/lib/component/panels/filtersPanel/Filters/hooks/useZeroFilling.js.map +1 -1
  236. package/lib/component/panels/hooks/useTogglePanel.d.ts.map +1 -1
  237. package/lib/component/panels/hooks/useTogglePanel.js +4 -3
  238. package/lib/component/panels/hooks/useTogglePanel.js.map +1 -1
  239. package/lib/component/panels/spectrumSimulation/SpinSystemTable.js +2 -2
  240. package/lib/component/panels/spectrumSimulation/SpinSystemTable.js.map +1 -1
  241. package/lib/component/panels/spectrumSimulation/simulationValidation.d.ts +1 -1
  242. package/lib/component/panels/spectrumSimulation/simulationValidation.d.ts.map +1 -1
  243. package/lib/component/panels/spectrumSimulation/simulationValidation.js +4 -8
  244. package/lib/component/panels/spectrumSimulation/simulationValidation.js.map +1 -1
  245. package/lib/component/reducer/Reducer.d.ts +1 -1
  246. package/lib/component/reducer/Reducer.d.ts.map +1 -1
  247. package/lib/component/reducer/Reducer.js +2 -0
  248. package/lib/component/reducer/Reducer.js.map +1 -1
  249. package/lib/component/reducer/actions/AssignmentsActions.d.ts.map +1 -1
  250. package/lib/component/reducer/actions/AssignmentsActions.js.map +1 -1
  251. package/lib/component/reducer/actions/DatabaseActions.d.ts.map +1 -1
  252. package/lib/component/reducer/actions/DatabaseActions.js.map +1 -1
  253. package/lib/component/reducer/actions/DomainActions.d.ts.map +1 -1
  254. package/lib/component/reducer/actions/DomainActions.js +10 -5
  255. package/lib/component/reducer/actions/DomainActions.js.map +1 -1
  256. package/lib/component/reducer/actions/FiltersActions.d.ts +9 -4
  257. package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
  258. package/lib/component/reducer/actions/FiltersActions.js +58 -28
  259. package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
  260. package/lib/component/reducer/actions/InsetActions.d.ts.map +1 -1
  261. package/lib/component/reducer/actions/InsetActions.js +1 -5
  262. package/lib/component/reducer/actions/InsetActions.js.map +1 -1
  263. package/lib/component/reducer/actions/IntegralsActions.d.ts +1 -1
  264. package/lib/component/reducer/actions/IntegralsActions.d.ts.map +1 -1
  265. package/lib/component/reducer/actions/IntegralsActions.js +1 -1
  266. package/lib/component/reducer/actions/IntegralsActions.js.map +1 -1
  267. package/lib/component/reducer/actions/LoadActions.d.ts.map +1 -1
  268. package/lib/component/reducer/actions/LoadActions.js +4 -2
  269. package/lib/component/reducer/actions/LoadActions.js.map +1 -1
  270. package/lib/component/reducer/actions/PeaksActions.d.ts +2 -1
  271. package/lib/component/reducer/actions/PeaksActions.d.ts.map +1 -1
  272. package/lib/component/reducer/actions/PeaksActions.js +1 -1
  273. package/lib/component/reducer/actions/PeaksActions.js.map +1 -1
  274. package/lib/component/reducer/actions/RangesActions.d.ts +5 -3
  275. package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
  276. package/lib/component/reducer/actions/RangesActions.js +8 -15
  277. package/lib/component/reducer/actions/RangesActions.js.map +1 -1
  278. package/lib/component/reducer/actions/SpectraActions.d.ts +1 -1
  279. package/lib/component/reducer/actions/SpectraActions.d.ts.map +1 -1
  280. package/lib/component/reducer/actions/SpectraActions.js.map +1 -1
  281. package/lib/component/reducer/actions/ToolsActions.d.ts +1 -1
  282. package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
  283. package/lib/component/reducer/actions/ToolsActions.js +2 -2
  284. package/lib/component/reducer/actions/ToolsActions.js.map +1 -1
  285. package/lib/component/reducer/actions/ZonesActions.d.ts +1 -1
  286. package/lib/component/reducer/actions/ZonesActions.d.ts.map +1 -1
  287. package/lib/component/reducer/actions/ZonesActions.js.map +1 -1
  288. package/lib/component/reducer/helper/Zoom1DManager.d.ts +6 -1
  289. package/lib/component/reducer/helper/Zoom1DManager.d.ts.map +1 -1
  290. package/lib/component/reducer/helper/Zoom1DManager.js +44 -37
  291. package/lib/component/reducer/helper/Zoom1DManager.js.map +1 -1
  292. package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +3 -2
  293. package/lib/component/reducer/helper/ZoomHistoryManager.d.ts.map +1 -1
  294. package/lib/component/reducer/helper/ZoomHistoryManager.js +17 -8
  295. package/lib/component/reducer/helper/ZoomHistoryManager.js.map +1 -1
  296. package/lib/component/reducer/helper/removeSpectrumRelatedObjectsById.d.ts.map +1 -1
  297. package/lib/component/reducer/helper/removeSpectrumRelatedObjectsById.js +1 -0
  298. package/lib/component/reducer/helper/removeSpectrumRelatedObjectsById.js.map +1 -1
  299. package/lib/component/reducer/preferences/actions/matrixGeneration.d.ts +2 -2
  300. package/lib/component/reducer/preferences/actions/matrixGeneration.d.ts.map +1 -1
  301. package/lib/component/reducer/preferences/actions/togglePanel.d.ts.map +1 -1
  302. package/lib/component/reducer/preferences/actions/togglePanel.js +11 -6
  303. package/lib/component/reducer/preferences/actions/togglePanel.js.map +1 -1
  304. package/lib/component/reducer/preferences/preferencesReducer.d.ts +3 -1
  305. package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
  306. package/lib/component/reducer/preferences/preferencesReducer.js.map +1 -1
  307. package/lib/component/toolbar/ToolTypes.d.ts +1 -1
  308. package/lib/component/toolbar/ToolTypes.d.ts.map +1 -1
  309. package/lib/component/workspaces/prediction.js +1 -1
  310. package/lib/component/workspaces/prediction.js.map +1 -1
  311. package/lib/data/PredictionManager.d.ts.map +1 -1
  312. package/lib/data/PredictionManager.js +1 -0
  313. package/lib/data/PredictionManager.js.map +1 -1
  314. package/lib/data/data1d/Spectrum1D/SumManager.d.ts +1 -1
  315. package/lib/data/data1d/Spectrum1D/SumManager.d.ts.map +1 -1
  316. package/lib/data/data1d/Spectrum1D/SumManager.js.map +1 -1
  317. package/lib/data/data1d/Spectrum1D/generateJGraphData.d.ts +1 -1
  318. package/lib/data/data1d/Spectrum1D/generateJGraphData.d.ts.map +1 -1
  319. package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.d.ts.map +1 -1
  320. package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +2 -2
  321. package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts.map +1 -1
  322. package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js.map +1 -1
  323. package/lib/data/data1d/Spectrum1D/isRangeAssigned.d.ts +1 -1
  324. package/lib/data/data1d/Spectrum1D/isRangeAssigned.d.ts.map +1 -1
  325. package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts +1 -1
  326. package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts.map +1 -1
  327. package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js.map +1 -1
  328. package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +1 -1
  329. package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts.map +1 -1
  330. package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js.map +1 -1
  331. package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts +1 -1
  332. package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts.map +1 -1
  333. package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js.map +1 -1
  334. package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts +1 -1
  335. package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts.map +1 -1
  336. package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.d.ts.map +1 -1
  337. package/lib/data/data1d/Spectrum1D/ranges/createRange.d.ts +1 -1
  338. package/lib/data/data1d/Spectrum1D/ranges/createRange.d.ts.map +1 -1
  339. package/lib/data/data1d/Spectrum1D/ranges/createRange.js.map +1 -1
  340. package/lib/data/data1d/Spectrum1D/ranges/detectSignals.d.ts +30 -1
  341. package/lib/data/data1d/Spectrum1D/ranges/detectSignals.d.ts.map +1 -1
  342. package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +3 -3
  343. package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts.map +1 -1
  344. package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js.map +1 -1
  345. package/lib/data/data1d/Spectrum1D/ranges/resizeRange.d.ts +1 -1
  346. package/lib/data/data1d/Spectrum1D/ranges/resizeRange.d.ts.map +1 -1
  347. package/lib/data/data1d/Spectrum1D/ranges/resizeRange.js.map +1 -1
  348. package/lib/data/data1d/Spectrum1D/ranges/resurrectSpectrum.d.ts +1 -1
  349. package/lib/data/data1d/Spectrum1D/ranges/resurrectSpectrum.d.ts.map +1 -1
  350. package/lib/data/data1d/database.d.ts.map +1 -1
  351. package/lib/data/data1d/database.js +1 -1
  352. package/lib/data/data1d/database.js.map +1 -1
  353. package/lib/data/data1d/multipleSpectraAnalysis.d.ts.map +1 -1
  354. package/lib/data/data1d/multipleSpectraAnalysis.js +19 -12
  355. package/lib/data/data1d/multipleSpectraAnalysis.js.map +1 -1
  356. package/lib/data/data2d/Spectrum2D/contours.d.ts.map +1 -1
  357. package/lib/data/data2d/Spectrum2D/contours.js +6 -4
  358. package/lib/data/data2d/Spectrum2D/contours.js.map +1 -1
  359. package/lib/data/data2d/Spectrum2D/getMissingProjection.d.ts +1 -1
  360. package/lib/data/data2d/Spectrum2D/getMissingProjection.d.ts.map +1 -1
  361. package/lib/data/data2d/Spectrum2D/getMissingProjection.js.map +1 -1
  362. package/lib/data/data2d/Spectrum2D/initiateDatum2D.d.ts.map +1 -1
  363. package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +22 -10
  364. package/lib/data/data2d/Spectrum2D/initiateDatum2D.js.map +1 -1
  365. package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts +1 -1
  366. package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts.map +1 -1
  367. package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts.map +1 -1
  368. package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js.map +1 -1
  369. package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +1 -1
  370. package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts.map +1 -1
  371. package/lib/data/data2d/Spectrum2D/zones/initiateZones.js.map +1 -1
  372. package/lib/data/matrixGeneration.js +1 -1
  373. package/lib/data/matrixGeneration.js.map +1 -1
  374. package/lib/data/types/common/FilterEntry.d.ts +1 -1
  375. package/lib/data/types/common/FilterEntry.d.ts.map +1 -1
  376. package/lib/data/types/data1d/RangeDetectionResult.d.ts +1 -1
  377. package/lib/data/types/data1d/RangeDetectionResult.d.ts.map +1 -1
  378. package/lib/data/types/data1d/index.js +1 -1
  379. package/lib/data/types/data1d/index.js.map +1 -1
  380. package/lib/data/utilities/FindUtilities.d.ts +1 -1
  381. package/lib/data/utilities/FindUtilities.d.ts.map +1 -1
  382. package/lib/data/utilities/RangeUtilities.d.ts +1 -1
  383. package/lib/data/utilities/RangeUtilities.d.ts.map +1 -1
  384. package/lib/data/utilities/RangeUtilities.js.map +1 -1
  385. package/lib/data/utilities/ZoneUtilities.d.ts +1 -1
  386. package/lib/data/utilities/ZoneUtilities.d.ts.map +1 -1
  387. package/lib/versionInfo.js +1 -1
  388. package/package.json +32 -31
  389. package/src/component/1d/BrushTracker1D.tsx +39 -17
  390. package/src/component/1d/FloatPublicationString.tsx +2 -2
  391. package/src/component/1d/FloatingRanges.tsx +4 -4
  392. package/src/component/1d/PredictionErrorsNotations.tsx +209 -0
  393. package/src/component/1d/SVGContent1D.tsx +2 -0
  394. package/src/component/1d/Viewer1D.tsx +1 -1
  395. package/src/component/1d/integral/IntegralResizable.tsx +1 -1
  396. package/src/component/1d/integral/IntegralsSeries.tsx +1 -1
  397. package/src/component/1d/jCouplingGraph/JGraph.tsx +1 -1
  398. package/src/component/1d/jCouplingGraph/JsCouplings.tsx +1 -1
  399. package/src/component/1d/multiplicityTree/MultiplicityTree.tsx +2 -2
  400. package/src/component/1d/multiplicityTree/MultiplicityTrees.tsx +1 -1
  401. package/src/component/1d/multiplicityTree/generateTreeNodes.ts +1 -1
  402. package/src/component/1d/peaks/PeakAnnotationsSpreadMode.tsx +2 -6
  403. package/src/component/1d/peaks/Peaks.tsx +1 -1
  404. package/src/component/1d/peaks/usePeakShapesPath.ts +1 -1
  405. package/src/component/1d/ranges/AssignmentLabel.tsx +1 -1
  406. package/src/component/1d/ranges/Atoms.tsx +1 -1
  407. package/src/component/1d/ranges/Range.tsx +1 -1
  408. package/src/component/1d/ranges/Ranges.tsx +4 -1
  409. package/src/component/1d/tool/BaseLineZones.tsx +1 -1
  410. package/src/component/1d-2d/components/FloatMoleculeStructures/FloatMolecules.tsx +1 -1
  411. package/src/component/1d-2d/components/SpectrumInfoBlock.tsx +4 -6
  412. package/src/component/1d-2d/tools/BrushXY.tsx +319 -30
  413. package/src/component/2d/BrushTracker2D.tsx +18 -4
  414. package/src/component/2d/Viewer2D.tsx +6 -1
  415. package/src/component/2d/ft/Contours.tsx +3 -11
  416. package/src/component/2d/utilities/extractSpectrumSignals.ts +12 -9
  417. package/src/component/2d/zones/Signal.tsx +1 -1
  418. package/src/component/2d/zones/SignalCrosshair.tsx +1 -1
  419. package/src/component/2d/zones/SignalsGuideLines.tsx +108 -12
  420. package/src/component/2d/zones/Zone.tsx +2 -2
  421. package/src/component/2d/zones/Zones.tsx +1 -1
  422. package/src/component/2d/zones/ZonesAssignmentsLabels.tsx +3 -3
  423. package/src/component/EventsTrackers/BrushTracker.tsx +124 -30
  424. package/src/component/SVGTable.tsx +4 -6
  425. package/src/component/assignment/AssignmentProvider.tsx +2 -1
  426. package/src/component/assignment/AssignmentsContext.ts +7 -2
  427. package/src/component/assignment/utilities/getAssignments.ts +1 -1
  428. package/src/component/elements/ArrowBox.tsx +77 -0
  429. package/src/component/elements/DraggableDialog.tsx +2 -0
  430. package/src/component/elements/Input.tsx +3 -3
  431. package/src/component/elements/Input2.tsx +4 -4
  432. package/src/component/elements/NextPrev.tsx +2 -6
  433. package/src/component/elements/NumberInput2.tsx +1 -1
  434. package/src/component/elements/ReactTable/Elements/ReactTableRow.tsx +3 -1
  435. package/src/component/elements/ReactTable/ReactTable.tsx +6 -7
  436. package/src/component/elements/SVGGroup.tsx +2 -2
  437. package/src/component/elements/Sections.tsx +103 -19
  438. package/src/component/elements/Tab/Tabs.tsx +3 -1
  439. package/src/component/elements/pdnd.cts +9 -0
  440. package/src/component/highlight/index.tsx +5 -5
  441. package/src/component/hooks/useCheckToolsVisibility.ts +1 -1
  442. package/src/component/hooks/useCombinedRefs.ts +6 -4
  443. package/src/component/hooks/useDatumWithSpectraStatistics.ts +1 -1
  444. package/src/component/hooks/useFilter.ts +1 -1
  445. package/src/component/hooks/useToolsFunctions.ts +1 -1
  446. package/src/component/main/InnerNMRiumContents.tsx +6 -3
  447. package/src/component/modal/EditPeakShapeModal.tsx +7 -2
  448. package/src/component/modal/editRange/EditRangeModal.tsx +1 -1
  449. package/src/component/modal/editRange/forms/components/SignalsContent.tsx +1 -1
  450. package/src/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.tsx +1 -1
  451. package/src/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.tsx +1 -1
  452. package/src/component/modal/editRange/utils/couplingsToMultiplicity.ts +1 -1
  453. package/src/component/modal/editRange/utils/mapCouplings.ts +1 -1
  454. package/src/component/modal/editRange/utils/mapRange.ts +1 -1
  455. package/src/component/modal/editZone/EditZoneModal.tsx +1 -1
  456. package/src/component/modal/setting/settings-tabs/DatabasesTabContent.tsx +12 -7
  457. package/src/component/modal/setting/settings-tabs/ToolsTabContent.tsx +3 -3
  458. package/src/component/panels/IntegralsPanel/IntegralPanel.tsx +1 -1
  459. package/src/component/panels/IntegralsPanel/IntegralTable.tsx +1 -1
  460. package/src/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.tsx +22 -19
  461. package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +53 -48
  462. package/src/component/panels/MoleculesPanel/Utilities.ts +1 -1
  463. package/src/component/panels/MoleculesPanel/useAtomAssignment.tsx +29 -8
  464. package/src/component/panels/Panels.tsx +9 -24
  465. package/src/component/panels/PanelsBar.tsx +2 -6
  466. package/src/component/panels/PeaksPanel/PeaksPanel.tsx +1 -1
  467. package/src/component/panels/PeaksPanel/PeaksTable.tsx +1 -1
  468. package/src/component/panels/RangesPanel/RangesHeader.tsx +15 -22
  469. package/src/component/panels/RangesPanel/RangesPanel.tsx +1 -1
  470. package/src/component/panels/RangesPanel/RangesTable.tsx +1 -1
  471. package/src/component/panels/RangesPanel/RangesTableRow.tsx +1 -1
  472. package/src/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.tsx +1 -1
  473. package/src/component/panels/RangesPanel/hooks/useMapRanges.ts +1 -1
  474. package/src/component/panels/SpectraPanel/base/setting/Spectrum2DSetting.tsx +11 -1
  475. package/src/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.tsx +1 -1
  476. package/src/component/panels/ZonesPanel/ZonesTable.tsx +1 -1
  477. package/src/component/panels/ZonesPanel/hooks/useMapZones.ts +1 -1
  478. package/src/component/panels/filtersPanel/Filters/FiltersSectionsPanel.tsx +9 -0
  479. package/src/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.tsx +14 -4
  480. package/src/component/panels/filtersPanel/Filters/hooks/useApodization.tsx +1 -1
  481. package/src/component/panels/filtersPanel/Filters/hooks/useBaselineCorrection.tsx +1 -1
  482. package/src/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.tsx +17 -19
  483. package/src/component/panels/filtersPanel/Filters/hooks/useZeroFilling.tsx +3 -3
  484. package/src/component/panels/hooks/useTogglePanel.ts +4 -3
  485. package/src/component/panels/spectrumSimulation/SpinSystemTable.tsx +2 -2
  486. package/src/component/panels/spectrumSimulation/simulationValidation.ts +9 -13
  487. package/src/component/reducer/Reducer.ts +3 -1
  488. package/src/component/reducer/actions/AssignmentsActions.ts +2 -1
  489. package/src/component/reducer/actions/DatabaseActions.ts +2 -1
  490. package/src/component/reducer/actions/DomainActions.ts +11 -7
  491. package/src/component/reducer/actions/FiltersActions.ts +101 -56
  492. package/src/component/reducer/actions/InsetActions.ts +1 -5
  493. package/src/component/reducer/actions/IntegralsActions.ts +2 -2
  494. package/src/component/reducer/actions/LoadActions.ts +4 -2
  495. package/src/component/reducer/actions/PeaksActions.ts +5 -4
  496. package/src/component/reducer/actions/RangesActions.ts +14 -17
  497. package/src/component/reducer/actions/SpectraActions.ts +1 -1
  498. package/src/component/reducer/actions/ToolsActions.ts +2 -3
  499. package/src/component/reducer/actions/ZonesActions.ts +1 -1
  500. package/src/component/reducer/helper/Zoom1DManager.ts +67 -41
  501. package/src/component/reducer/helper/ZoomHistoryManager.ts +20 -9
  502. package/src/component/reducer/helper/removeSpectrumRelatedObjectsById.ts +1 -0
  503. package/src/component/reducer/preferences/actions/matrixGeneration.ts +2 -2
  504. package/src/component/reducer/preferences/actions/togglePanel.ts +10 -6
  505. package/src/component/reducer/preferences/preferencesReducer.ts +12 -2
  506. package/src/component/toolbar/ToolTypes.ts +1 -1
  507. package/src/component/workspaces/prediction.ts +1 -1
  508. package/src/data/PredictionManager.ts +2 -2
  509. package/src/data/data1d/Spectrum1D/SumManager.ts +1 -1
  510. package/src/data/data1d/Spectrum1D/generateJGraphData.ts +1 -1
  511. package/src/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.ts +1 -1
  512. package/src/data/data1d/Spectrum1D/integrals/initiateIntegrals.ts +1 -1
  513. package/src/data/data1d/Spectrum1D/isRangeAssigned.ts +1 -1
  514. package/src/data/data1d/Spectrum1D/peaks/autoPeakPicking.ts +1 -1
  515. package/src/data/data1d/Spectrum1D/peaks/initiatePeaks.ts +1 -1
  516. package/src/data/data1d/Spectrum1D/peaks/optimizePeaks.ts +1 -1
  517. package/src/data/data1d/Spectrum1D/ranges/autoRangesDetection.ts +1 -1
  518. package/src/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.ts +1 -1
  519. package/src/data/data1d/Spectrum1D/ranges/createRange.ts +1 -1
  520. package/src/data/data1d/Spectrum1D/ranges/initiateRanges.ts +1 -1
  521. package/src/data/data1d/Spectrum1D/ranges/resizeRange.ts +1 -1
  522. package/src/data/data1d/Spectrum1D/ranges/resurrectSpectrum.ts +1 -1
  523. package/src/data/data1d/database.ts +3 -2
  524. package/src/data/data1d/multipleSpectraAnalysis.ts +25 -18
  525. package/src/data/data2d/Spectrum2D/contours.ts +8 -4
  526. package/src/data/data2d/Spectrum2D/getMissingProjection.ts +1 -2
  527. package/src/data/data2d/Spectrum2D/initiateDatum2D.ts +34 -16
  528. package/src/data/data2d/Spectrum2D/zones/detectZones.ts +1 -1
  529. package/src/data/data2d/Spectrum2D/zones/detectZonesManual.ts +2 -2
  530. package/src/data/data2d/Spectrum2D/zones/initiateZones.ts +1 -1
  531. package/src/data/matrixGeneration.ts +1 -1
  532. package/src/data/types/common/FilterEntry.ts +1 -1
  533. package/src/data/types/data1d/RangeDetectionResult.ts +1 -1
  534. package/src/data/utilities/FindUtilities.ts +1 -1
  535. package/src/data/utilities/RangeUtilities.ts +1 -1
  536. package/src/data/utilities/ZoneUtilities.ts +1 -1
  537. package/src/index.tsx +3 -0
  538. package/src/versionInfo.ts +1 -1
@@ -1,26 +1,35 @@
1
1
  import styled from '@emotion/styled';
2
+ import type { Range } from '@zakodium/nmr-types';
2
3
  import type { Spectrum1D } from '@zakodium/nmrium-core';
4
+ import { useRef } from 'react';
5
+ import { LuLink, LuUnlink } from 'react-icons/lu';
3
6
  import { PiTextTBold, PiTextTSlashBold } from 'react-icons/pi';
4
7
 
5
8
  import { FieldEdition } from '../../1d-2d/FieldEdition.js';
9
+ import {
10
+ useAssignment,
11
+ useAssignmentContext,
12
+ } from '../../assignment/AssignmentsContext.js';
13
+ import { filterAssignedIDs } from '../../assignment/utilities/filterAssignedIDs.js';
6
14
  import { useChartData } from '../../context/ChartContext.js';
7
15
  import { useDispatch } from '../../context/DispatchContext.js';
8
16
  import {
9
17
  ShareDataProvider,
10
18
  useShareData,
11
19
  } from '../../context/ShareDataContext.js';
12
- import { ActionsButtonsPopover } from '../../elements/ActionsButtonsPopover.js';
13
20
  import type { ActionsButtonsPopoverProps } from '../../elements/ActionsButtonsPopover.js';
21
+ import { ActionsButtonsPopover } from '../../elements/ActionsButtonsPopover.js';
22
+ import { HighlightEventSource, useHighlight } from '../../highlight/index.js';
14
23
  import { useCanvasContext } from '../../hooks/useCanvasContext.js';
15
24
  import { useTriggerNewAssignmentLabel } from '../../hooks/useTriggerNewAssignmentLabel.js';
16
25
  import { stackOverlappingLabelsArray } from '../../utility/stackOverlappingLabels.js';
17
26
  import { useTracesSpectra } from '../useTracesSpectra.js';
27
+ import type { ExtractedSignal } from '../utilities/extractSpectrumSignals.js';
18
28
  import { extractSpectrumSignals } from '../utilities/extractSpectrumSignals.js';
19
- import type { BaseSignal } from '../utilities/extractSpectrumSignals.js';
20
29
  import { useScale2DX, useScale2DY } from '../utilities/scale.js';
21
30
 
22
- const Rect = styled.rect`
23
- fill: transparent;
31
+ const Rect = styled.rect<{ isActive: boolean }>`
32
+ fill: ${({ isActive }) => (isActive ? '#ff6f0057' : 'transparent')};
24
33
 
25
34
  &:hover {
26
35
  fill: #ff6f0057;
@@ -42,13 +51,18 @@ interface IndicationLinesProps extends SignalsGuideLinesProps {
42
51
  const labelSize = 12;
43
52
  const padding = 2;
44
53
 
45
- interface ProcessedSignal extends BaseSignal {
54
+ interface ExtraExtractProperties {
55
+ range: Range;
56
+ }
57
+ interface ProcessedSignal extends ExtractedSignal<ExtraExtractProperties> {
46
58
  labelWidth: number;
47
59
  deltaInPixel: number;
48
60
  }
49
61
 
50
62
  function useSignalsOverlap(axis: IndicationLinesAxis, spectrum: Spectrum1D) {
51
- const signals = extractSpectrumSignals(spectrum);
63
+ const signals = extractSpectrumSignals<ExtraExtractProperties>(spectrum, {
64
+ include: (range) => ({ range }),
65
+ });
52
66
  const scaleX = useScale2DX();
53
67
  const scaleY = useScale2DY();
54
68
  const context = useCanvasContext(labelSize);
@@ -87,13 +101,14 @@ function IndicationLines(props: IndicationLinesProps) {
87
101
  return (
88
102
  <g>
89
103
  {normalizedSignals.map(
90
- ({ deltaInPixel, stackIndex, assignment, id, rangeId }) => {
104
+ ({ deltaInPixel, stackIndex, assignment, id, range }) => {
91
105
  return (
92
106
  <IndicationLine
93
107
  key={`${axis}[${id}]`}
94
- {...{ deltaInPixel, stackIndex, assignment, id, rangeId }}
108
+ {...{ deltaInPixel, stackIndex, assignment, id }}
95
109
  axis={axis}
96
110
  spectrumId={spectrum.id}
111
+ range={range}
97
112
  />
98
113
  );
99
114
  },
@@ -102,11 +117,10 @@ function IndicationLines(props: IndicationLinesProps) {
102
117
  );
103
118
  }
104
119
 
105
- interface IndicationLineProps {
120
+ interface IndicationLineProps extends ExtraExtractProperties {
106
121
  deltaInPixel: number;
107
122
  stackIndex: number;
108
123
  assignment?: string;
109
- rangeId: string;
110
124
  spectrumId: string;
111
125
  axis: IndicationLinesAxis;
112
126
  }
@@ -121,12 +135,45 @@ function getAxisRangeId(options: GetAxisRangeIdOptions) {
121
135
  return `${axis}[${rangeId}]`;
122
136
  }
123
137
 
138
+ interface UseRangeAssignmentOptions {
139
+ rangeId: string;
140
+ signalsIds: string[];
141
+ spectrumId: string;
142
+ }
143
+
144
+ function useRangeAssignment(options: UseRangeAssignmentOptions) {
145
+ const { rangeId, signalsIds, spectrumId } = options;
146
+
147
+ const assignmentData = useAssignmentContext();
148
+ const assignmentContext = useAssignment(rangeId, spectrumId);
149
+ const highlightId = [rangeId]
150
+ .concat(assignmentContext.assignedDiaIds?.x || [])
151
+ .concat(filterAssignedIDs(assignmentData.data, signalsIds));
152
+
153
+ const highlightContext = useHighlight(highlightId, {
154
+ type: HighlightEventSource.RANGE,
155
+ extra: { id: rangeId, spectrumID: spectrumId },
156
+ });
157
+ return { highlightContext, assignmentContext };
158
+ }
159
+
124
160
  function IndicationLine(props: IndicationLineProps) {
125
- const { deltaInPixel, stackIndex, assignment, rangeId, axis, spectrumId } =
161
+ const isAssignBtnTrigged = useRef(false);
162
+ const { deltaInPixel, stackIndex, assignment, axis, spectrumId, range } =
126
163
  props;
164
+ const { id: rangeId, diaIDs = [], signals } = range;
165
+ const signalsIds = signals.map(({ id }) => id);
127
166
  const { margin, width, height } = useChartData();
128
167
  const { setData: addNewAssignmentLabel } = useShareData();
129
168
  const dispatch = useDispatch();
169
+ const { assignmentContext, highlightContext } = useRangeAssignment({
170
+ rangeId,
171
+ spectrumId,
172
+ signalsIds,
173
+ });
174
+ const hasDiaIDs = diaIDs.length > 0;
175
+ const isAssignmentActive = assignmentContext.isActive;
176
+ const isHighlighted = highlightContext.isActive || isAssignmentActive;
130
177
 
131
178
  const innerWidth = width - margin.left - margin.right;
132
179
  const innerHeight = height - margin.top - margin.bottom;
@@ -157,7 +204,45 @@ function IndicationLine(props: IndicationLineProps) {
157
204
  });
158
205
  }
159
206
 
207
+ function mouseEnterHandler() {
208
+ assignmentContext.highlight('x');
209
+ highlightContext.show();
210
+ }
211
+
212
+ function mouseLeaveHandler() {
213
+ assignmentContext.clearHighlight();
214
+ highlightContext.hide();
215
+ }
216
+
217
+ function assignHandler() {
218
+ isAssignBtnTrigged.current = true;
219
+ assignmentContext.activate('x');
220
+ }
221
+
222
+ function unAssignHandler() {
223
+ dispatch({
224
+ type: 'UNLINK_RANGE',
225
+ payload: {
226
+ rangeKey: rangeId,
227
+ spectrumId,
228
+ },
229
+ });
230
+ }
231
+
160
232
  const actionsButtons: ActionsButtonsPopoverProps['buttons'] = [
233
+ {
234
+ icon: <LuLink />,
235
+ onClick: assignHandler,
236
+ intent: 'success',
237
+ title: 'Assign range',
238
+ },
239
+ {
240
+ icon: <LuUnlink />,
241
+ onClick: () => unAssignHandler(),
242
+ intent: 'danger',
243
+ title: 'Unassign range',
244
+ visible: !!(isAssignmentActive || hasDiaIDs),
245
+ },
161
246
  {
162
247
  icon: <PiTextTBold />,
163
248
  onClick: () => addNewAssignmentLabel(getAxisRangeId({ axis, rangeId })),
@@ -174,14 +259,24 @@ function IndicationLine(props: IndicationLineProps) {
174
259
  },
175
260
  ];
176
261
 
262
+ const isOpen = isAssignBtnTrigged.current ? isAssignmentActive : undefined;
263
+
177
264
  return (
178
265
  <ActionsButtonsPopover
266
+ isOpen={isOpen}
179
267
  targetTagName="g"
180
268
  buttons={actionsButtons}
181
269
  space={2}
182
270
  position={isOverXAxis ? 'right-top' : 'top-left'}
271
+ onClosed={() => {
272
+ isAssignBtnTrigged.current = false;
273
+ }}
183
274
  >
184
- <g transform={`translate(${x},${y})`}>
275
+ <g
276
+ transform={`translate(${x},${y})`}
277
+ onMouseEnter={mouseEnterHandler}
278
+ onMouseLeave={mouseLeaveHandler}
279
+ >
185
280
  <line stroke="lightgrey" x1={0} x2={x2} y1={0} y2={y2} />
186
281
  <Rect
187
282
  x={-rectXOffset}
@@ -189,6 +284,7 @@ function IndicationLine(props: IndicationLineProps) {
189
284
  width={rectWidth}
190
285
  height={rectHeight}
191
286
  data-no-export="true"
287
+ isActive={isHighlighted}
192
288
  />
193
289
  <AssignmentLabel
194
290
  x={labelX}
@@ -1,12 +1,12 @@
1
- import type { Zone as ZoneType } from 'nmr-processing';
1
+ import type { Zone as ZoneType } from '@zakodium/nmr-types';
2
2
  import { useEffect, useState } from 'react';
3
3
  import { PiTextTBold } from 'react-icons/pi';
4
4
 
5
5
  import { checkZoneKind } from '../../../data/utilities/ZoneUtilities.js';
6
6
  import { useAssignment } from '../../assignment/AssignmentsContext.js';
7
7
  import { useShareData } from '../../context/ShareDataContext.js';
8
- import { ActionsButtonsPopover } from '../../elements/ActionsButtonsPopover.js';
9
8
  import type { ActionsButtonsPopoverProps } from '../../elements/ActionsButtonsPopover.js';
9
+ import { ActionsButtonsPopover } from '../../elements/ActionsButtonsPopover.js';
10
10
  import { HighlightEventSource, useHighlight } from '../../highlight/index.js';
11
11
  import { useActiveSpectrumZonesViewState } from '../../hooks/useActiveSpectrumZonesViewState.js';
12
12
  import { useScale2DX, useScale2DY } from '../utilities/scale.js';
@@ -1,5 +1,5 @@
1
+ import type { Zones as ZonesType } from '@zakodium/nmr-types';
1
2
  import type { Display2D, Spectrum2D } from '@zakodium/nmrium-core';
2
- import type { Zones as ZonesType } from 'nmr-processing';
3
3
  import { memo } from 'react';
4
4
 
5
5
  import useSpectrum from '../../hooks/useSpectrum.js';
@@ -1,6 +1,6 @@
1
1
  import styled from '@emotion/styled';
2
+ import type { Zone, Zones as ZonesType } from '@zakodium/nmr-types';
2
3
  import type { Spectrum2D } from '@zakodium/nmrium-core';
3
- import type { Zone, Zones as ZonesType } from 'nmr-processing';
4
4
  import { useEffect, useLayoutEffect, useRef, useState } from 'react';
5
5
  import { PiTextTSlash } from 'react-icons/pi';
6
6
 
@@ -16,10 +16,10 @@ import useDraggable from '../../elements/draggable/useDraggable.js';
16
16
  import { useHighlight } from '../../highlight/index.js';
17
17
  import { useActiveSpectrumZonesViewState } from '../../hooks/useActiveSpectrumZonesViewState.js';
18
18
  import useSpectrum from '../../hooks/useSpectrum.js';
19
- import { getTracesSpectra } from '../useTracesSpectra.js';
20
19
  import type { GetTracesSpectraOptions } from '../useTracesSpectra.js';
21
- import { extractSpectrumSignals } from '../utilities/extractSpectrumSignals.js';
20
+ import { getTracesSpectra } from '../useTracesSpectra.js';
22
21
  import type { BaseSignal } from '../utilities/extractSpectrumSignals.js';
22
+ import { extractSpectrumSignals } from '../utilities/extractSpectrumSignals.js';
23
23
  import { useScale2DX, useScale2DY } from '../utilities/scale.js';
24
24
 
25
25
  interface ZonesInnerProps {
@@ -124,6 +124,16 @@ interface BrushTrackerProps {
124
124
  onClick?: OnClick;
125
125
  noPropagation?: boolean;
126
126
  brushDetectionOptions?: BaseDetectBrushingOptions;
127
+ clickTriggerMode?: 'native' | 'debounced';
128
+ }
129
+
130
+ function getMouseXY(event: React.MouseEvent, currentTarget?: Element) {
131
+ const boundingRect = (
132
+ currentTarget ?? event.currentTarget
133
+ ).getBoundingClientRect();
134
+ const x = event.clientX - boundingRect.x;
135
+ const y = event.clientY - boundingRect.y;
136
+ return { x, y };
127
137
  }
128
138
 
129
139
  export function BrushTracker(options: BrushTrackerProps) {
@@ -138,6 +148,7 @@ export function BrushTracker(options: BrushTrackerProps) {
138
148
  onClick = () => null,
139
149
  noPropagation,
140
150
  brushDetectionOptions = { thresholdFormat: 'fixed' },
151
+ clickTriggerMode = 'native',
141
152
  } = options;
142
153
 
143
154
  const [state, dispatch] = useReducer<
@@ -151,11 +162,9 @@ export function BrushTracker(options: BrushTrackerProps) {
151
162
  const startPositionRef = useRef<Position>({ x: 0, y: 0 });
152
163
  const lastRef = useRef<Position>({ x: 0, y: 0 });
153
164
 
154
- const clickHandler = useCallback(
155
- (event: React.MouseEvent, targetElement: Element) => {
156
- const boundingRect = targetElement.getBoundingClientRect();
157
- const x = event.clientX - boundingRect.x;
158
- const y = event.clientY - boundingRect.y;
165
+ const handleClickWithDebounce = useCallback(
166
+ (event: React.MouseEvent, currentTarget: Element) => {
167
+ const { x, y } = getMouseXY(event, currentTarget);
159
168
 
160
169
  // Clear timeout
161
170
  if (timeoutRef.current) {
@@ -181,9 +190,23 @@ export function BrushTracker(options: BrushTrackerProps) {
181
190
  [onClick, onDoubleClick],
182
191
  );
183
192
 
193
+ function handleClick(event: React.MouseEvent) {
194
+ if (isDraggingRef.current || clickTriggerMode !== 'native') return;
195
+ const { x, y } = getMouseXY(event);
196
+ onClick({ ...event, x, y });
197
+ }
198
+
199
+ function handleDoubleClick(event: React.MouseEvent) {
200
+ if (isDraggingRef.current || clickTriggerMode !== 'native') return;
201
+
202
+ const { x, y } = getMouseXY(event);
203
+ onDoubleClick({ ...event, x, y });
204
+ }
205
+
184
206
  const pointerDownHandler = useCallback(
185
207
  (event: React.PointerEvent) => {
186
- const targetElement = event.currentTarget;
208
+ event.persist();
209
+ const currentTarget = event.currentTarget;
187
210
  isDraggingRef.current = false; // Reset dragging flag
188
211
 
189
212
  //check that the right or left mouse button pressed
@@ -198,6 +221,7 @@ export function BrushTracker(options: BrushTrackerProps) {
198
221
  x: event.clientX - boundingRect.x,
199
222
  y: event.clientY - boundingRect.y,
200
223
  };
224
+ lastRef.current = { x: 0, y: 0 };
201
225
 
202
226
  if (!event.ctrlKey) {
203
227
  dispatch({
@@ -223,24 +247,27 @@ export function BrushTracker(options: BrushTrackerProps) {
223
247
  if (event.ctrlKey) {
224
248
  if (boundingRectRef.current) {
225
249
  const boundingRect = boundingRectRef.current;
250
+
226
251
  const x = clientX - boundingRect.x;
227
252
  const y = clientY - boundingRect.y;
228
253
 
229
- const deltaX = clientX - boundingRect.x - lastRef.current.x;
230
- const deltaY = clientY - boundingRect.y - lastRef.current.y;
231
-
254
+ if (lastRef.current.x > 0 && lastRef.current.y > 0) {
255
+ const deltaX = x - lastRef.current.x;
256
+ const deltaY = y - lastRef.current.y;
257
+
258
+ onZoom({
259
+ deltaY,
260
+ deltaX,
261
+ shiftKey,
262
+ altKey,
263
+ x: startPositionRef.current.x,
264
+ y: startPositionRef.current.y,
265
+ ctrlKey,
266
+ deltaMode: 0,
267
+ isBidirectionalZoom: true,
268
+ });
269
+ }
232
270
  lastRef.current = { x, y };
233
- onZoom({
234
- deltaY,
235
- deltaX,
236
- shiftKey,
237
- altKey,
238
- x: startPositionRef.current.x,
239
- y: startPositionRef.current.y,
240
- ctrlKey,
241
- deltaMode: 0,
242
- isBidirectionalZoom: true,
243
- });
244
271
  }
245
272
  } else {
246
273
  dispatch({
@@ -264,7 +291,9 @@ export function BrushTracker(options: BrushTrackerProps) {
264
291
  dispatch({
265
292
  type: 'DONE',
266
293
  });
267
- clickHandler(event, targetElement);
294
+ if (clickTriggerMode === 'debounced') {
295
+ handleClickWithDebounce(event, currentTarget);
296
+ }
268
297
  }
269
298
 
270
299
  globalThis.removeEventListener('pointermove', moveCallback);
@@ -276,7 +305,7 @@ export function BrushTracker(options: BrushTrackerProps) {
276
305
 
277
306
  return false;
278
307
  },
279
- [clickHandler, noPropagation, onZoom],
308
+ [clickTriggerMode, handleClickWithDebounce, noPropagation, onZoom],
280
309
  );
281
310
 
282
311
  const handleMouseWheel = useCallback(
@@ -320,10 +349,25 @@ export function BrushTracker(options: BrushTrackerProps) {
320
349
  }
321
350
  }, [onBrush, onBrushEnd, state]);
322
351
 
352
+ function handleStopBrush(event: React.KeyboardEvent) {
353
+ const isEscapePressed = event.key === 'Escape';
354
+ const isBrushing = state.step === 'brushing';
355
+ if (!isEscapePressed || !isBrushing) return;
356
+
357
+ event.stopPropagation();
358
+
359
+ dispatch({
360
+ type: 'DONE',
361
+ });
362
+ }
363
+
323
364
  return (
324
365
  <BrushDetectionOptionsContext.Provider value={brushDetectionOptions}>
325
366
  <BrushContext.Provider value={state}>
326
367
  <div
368
+ tabIndex={0}
369
+ onClick={handleClick}
370
+ onDoubleClick={handleDoubleClick}
327
371
  onContextMenu={(e) => {
328
372
  if (e.ctrlKey && e.button === 0) {
329
373
  e.preventDefault();
@@ -333,6 +377,7 @@ export function BrushTracker(options: BrushTrackerProps) {
333
377
  style={{ ...style, touchAction: 'none' }}
334
378
  onPointerDown={pointerDownHandler}
335
379
  onWheel={handleMouseWheel}
380
+ onKeyDown={handleStopBrush}
336
381
  onMouseEnter={() => {
337
382
  // disable page scrolling once the mouse over the Displayer
338
383
  window.addEventListener('wheel', stopPageScrolling, {
@@ -440,6 +485,10 @@ interface DetectBrushingResult extends BrushCoordination {
440
485
  type: BrushAxis;
441
486
  scaleX: number;
442
487
  scaleY: number;
488
+ directionX: number;
489
+ directionY: number;
490
+ xThreshold: number;
491
+ yThreshold: number;
443
492
  }
444
493
  interface DetectBrushingThreshold {
445
494
  /** Width in pixels */
@@ -479,7 +528,14 @@ export function detectBrushing(
479
528
  let xThreshold;
480
529
  let yThreshold;
481
530
  const { width, height, thresholdFormat, thresholdAxis = 'both' } = options;
482
- const { startX, endX, startY, endY } = coordination;
531
+ const { startX: x1, endX: x2, startY: y1, endY: y2 } = coordination;
532
+ const startX = Math.min(x1, x2);
533
+ const endX = Math.max(x1, x2);
534
+ const startY = Math.min(y1, y2);
535
+ const endY = Math.max(y1, y2);
536
+ const directionX = endX >= startX ? 1 : -1;
537
+ const directionY = endY >= startY ? 1 : -1;
538
+
483
539
  const xDiff = Math.abs(endX - startX);
484
540
  const yDiff = Math.abs(endY - startY);
485
541
 
@@ -497,9 +553,25 @@ export function detectBrushing(
497
553
 
498
554
  const scaleY = (endY - startY) / height;
499
555
  const scaleX = (endX - startX) / width;
556
+
557
+ const common = {
558
+ directionX,
559
+ directionY,
560
+ xThreshold,
561
+ yThreshold,
562
+ };
500
563
  if (thresholdAxis === 'y') {
501
- if (yDiff >= yThreshold) {
502
- return { type: 'XY', startX, startY, endX, endY, scaleX, scaleY };
564
+ if (yDiff >= yThreshold && yThreshold > 0) {
565
+ return {
566
+ type: 'XY',
567
+ startX,
568
+ startY,
569
+ endX,
570
+ endY,
571
+ scaleX,
572
+ scaleY,
573
+ ...common,
574
+ };
503
575
  }
504
576
 
505
577
  return {
@@ -510,11 +582,21 @@ export function detectBrushing(
510
582
  endY: height,
511
583
  scaleX,
512
584
  scaleY: 1,
585
+ ...common,
513
586
  };
514
587
  }
515
588
  if (thresholdAxis === 'x') {
516
- if (xDiff >= xThreshold) {
517
- return { type: 'XY', startX, startY, endX, endY, scaleX, scaleY };
589
+ if (xDiff >= xThreshold && xThreshold > 0) {
590
+ return {
591
+ type: 'XY',
592
+ startX,
593
+ startY,
594
+ endX,
595
+ endY,
596
+ scaleX,
597
+ scaleY,
598
+ ...common,
599
+ };
518
600
  }
519
601
 
520
602
  return {
@@ -525,10 +607,11 @@ export function detectBrushing(
525
607
  endY,
526
608
  scaleX: 1,
527
609
  scaleY,
610
+ ...common,
528
611
  };
529
612
  }
530
613
 
531
- if (xDiff >= xThreshold && yDiff < yThreshold) {
614
+ if (yDiff < yThreshold) {
532
615
  return {
533
616
  type: 'X',
534
617
  startX,
@@ -537,10 +620,11 @@ export function detectBrushing(
537
620
  endY: height,
538
621
  scaleX,
539
622
  scaleY: 1,
623
+ ...common,
540
624
  };
541
625
  }
542
626
 
543
- if (yDiff >= yThreshold && xDiff < xThreshold) {
627
+ if (xDiff < xThreshold) {
544
628
  return {
545
629
  type: 'Y',
546
630
  startX: 0,
@@ -549,8 +633,18 @@ export function detectBrushing(
549
633
  endY,
550
634
  scaleX: 1,
551
635
  scaleY,
636
+ ...common,
552
637
  };
553
638
  }
554
639
 
555
- return { type: 'XY', startX, startY, endX, endY, scaleX, scaleY };
640
+ return {
641
+ type: 'XY',
642
+ startX,
643
+ startY,
644
+ endX,
645
+ endY,
646
+ scaleX,
647
+ scaleY,
648
+ ...common,
649
+ };
556
650
  }
@@ -134,8 +134,6 @@ export function SVGTable<T>(props: SVGTableProps<T>) {
134
134
 
135
135
  const { width, columns } = mapColumns(externalColumns);
136
136
 
137
- let yOffset = rowHeight;
138
-
139
137
  const tableOptions = useMemo(() => {
140
138
  return { rowHeight };
141
139
  }, [rowHeight]);
@@ -172,11 +170,11 @@ export function SVGTable<T>(props: SVGTableProps<T>) {
172
170
  })}
173
171
 
174
172
  {data.map((row, rowIndex) => {
175
- const currentY = yOffset;
176
- yOffset += rowHeight;
177
-
178
173
  return (
179
- <g key={rowIndex} transform={`translate(0, ${currentY})`}>
174
+ <g
175
+ key={rowIndex}
176
+ transform={`translate(0, ${rowHeight * (rowIndex + 1)})`}
177
+ >
180
178
  {columns.map((col) => {
181
179
  const {
182
180
  cellBoxProps,
@@ -24,10 +24,11 @@ export function AssignmentProvider(props: AssignmentProviderProps) {
24
24
 
25
25
  const memoState = useMemo<AssignmentContext>(() => {
26
26
  const activate = (options: ActivateAssignmentOptions) => {
27
+ const { id, axis, spectrumId } = options;
27
28
  setState((prevState) => ({
28
29
  ...prevState,
29
30
  activated: !prevState.activated
30
- ? { id: options.id, axis: options.axis || null }
31
+ ? { id, axis: axis || null, spectrumId }
31
32
  : null,
32
33
  }));
33
34
  };
@@ -32,6 +32,7 @@ export interface HighlightAssignmentOptions {
32
32
  export interface ActivateAssignmentOptions {
33
33
  id: string;
34
34
  axis: Axis;
35
+ spectrumId?: string;
35
36
  }
36
37
 
37
38
  export const assignmentStatus: AssignmentStatus = {
@@ -40,7 +41,7 @@ export const assignmentStatus: AssignmentStatus = {
40
41
  };
41
42
 
42
43
  export interface AssignmentStatus {
43
- activated: AssignmentItem | null;
44
+ activated: (AssignmentItem & { spectrumId?: string }) | null;
44
45
  highlighted: AssignmentItem | null;
45
46
  }
46
47
  export interface AssignmentContext extends AssignmentStatus {
@@ -82,7 +83,10 @@ export function useAssignmentContext() {
82
83
  }
83
84
 
84
85
  // key can be signal id,range id or zone id
85
- export function useAssignment(id: string): AssignmentsData {
86
+ export function useAssignment(
87
+ id: string,
88
+ spectrumId?: string,
89
+ ): AssignmentsData {
86
90
  const { data, activated, highlighted, activate, highlight, clearHighlight } =
87
91
  useAssignmentContext();
88
92
 
@@ -93,6 +97,7 @@ export function useAssignment(id: string): AssignmentsData {
93
97
  function activateAssignment(axis: Axis) {
94
98
  if (id) {
95
99
  activate({
100
+ spectrumId,
96
101
  id,
97
102
  axis,
98
103
  });
@@ -1,5 +1,5 @@
1
+ import type { Ranges, Zones } from '@zakodium/nmr-types';
1
2
  import type { Spectrum } from '@zakodium/nmrium-core';
2
- import type { Ranges, Zones } from 'nmr-processing';
3
3
 
4
4
  import { isSpectrum1D } from '../../../data/data1d/Spectrum1D/index.js';
5
5
  import type { Assignments, Axis } from '../AssignmentsContext.js';