nmrium 2.3.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (372) hide show
  1. package/lib/component/1d/HorizontalAxis1D.d.ts.map +1 -1
  2. package/lib/component/1d/HorizontalAxis1D.js +4 -1
  3. package/lib/component/1d/HorizontalAxis1D.js.map +1 -1
  4. package/lib/component/1d/SVGContent1D.d.ts.map +1 -1
  5. package/lib/component/1d/SVGContent1D.js +2 -1
  6. package/lib/component/1d/SVGContent1D.js.map +1 -1
  7. package/lib/component/1d/Viewer1D.d.ts.map +1 -1
  8. package/lib/component/1d/Viewer1D.js +2 -1
  9. package/lib/component/1d/Viewer1D.js.map +1 -1
  10. package/lib/component/1d/integral/IntegralResizable.d.ts.map +1 -1
  11. package/lib/component/1d/integral/IntegralResizable.js +4 -4
  12. package/lib/component/1d/integral/IntegralResizable.js.map +1 -1
  13. package/lib/component/1d/peaks/PeakEditionManager.d.ts +1 -1
  14. package/lib/component/1d/ranges/Range.d.ts.map +1 -1
  15. package/lib/component/1d/ranges/Range.js +3 -3
  16. package/lib/component/1d/ranges/Range.js.map +1 -1
  17. package/lib/component/1d/ranges/Signals.d.ts +2 -0
  18. package/lib/component/1d/ranges/Signals.d.ts.map +1 -0
  19. package/lib/component/1d/ranges/Signals.js +16 -0
  20. package/lib/component/1d/ranges/Signals.js.map +1 -0
  21. package/lib/component/1d-2d/components/RangeIndicator.d.ts +13 -0
  22. package/lib/component/1d-2d/components/RangeIndicator.d.ts.map +1 -0
  23. package/lib/component/1d-2d/components/RangeIndicator.js +52 -0
  24. package/lib/component/1d-2d/components/RangeIndicator.js.map +1 -0
  25. package/lib/component/1d-2d/components/Signals1D.d.ts +19 -0
  26. package/lib/component/1d-2d/components/Signals1D.d.ts.map +1 -0
  27. package/lib/component/1d-2d/components/Signals1D.js +155 -0
  28. package/lib/component/1d-2d/components/Signals1D.js.map +1 -0
  29. package/lib/component/1d-2d/tools/BrushXY.js +6 -6
  30. package/lib/component/1d-2d/tools/BrushXY.js.map +1 -1
  31. package/lib/component/1d-2d/tools/CrossLinePointer.d.ts +16 -1
  32. package/lib/component/1d-2d/tools/CrossLinePointer.d.ts.map +1 -1
  33. package/lib/component/1d-2d/tools/CrossLinePointer.js +25 -15
  34. package/lib/component/1d-2d/tools/CrossLinePointer.js.map +1 -1
  35. package/lib/component/1d-2d/tools/CursorToolIcon.d.ts +9 -0
  36. package/lib/component/1d-2d/tools/CursorToolIcon.d.ts.map +1 -0
  37. package/lib/component/1d-2d/tools/CursorToolIcon.js +58 -0
  38. package/lib/component/1d-2d/tools/CursorToolIcon.js.map +1 -0
  39. package/lib/component/2d/1d-tracer/Left1DChart.d.ts.map +1 -1
  40. package/lib/component/2d/1d-tracer/Left1DChart.js +7 -2
  41. package/lib/component/2d/1d-tracer/Left1DChart.js.map +1 -1
  42. package/lib/component/2d/1d-tracer/Ranges1D.d.ts +9 -0
  43. package/lib/component/2d/1d-tracer/Ranges1D.d.ts.map +1 -0
  44. package/lib/component/2d/1d-tracer/Ranges1D.js +20 -0
  45. package/lib/component/2d/1d-tracer/Ranges1D.js.map +1 -0
  46. package/lib/component/2d/1d-tracer/Top1DChart.d.ts.map +1 -1
  47. package/lib/component/2d/1d-tracer/Top1DChart.js +7 -2
  48. package/lib/component/2d/1d-tracer/Top1DChart.js.map +1 -1
  49. package/lib/component/2d/DirectAxis2D.d.ts.map +1 -1
  50. package/lib/component/2d/DirectAxis2D.js +4 -1
  51. package/lib/component/2d/DirectAxis2D.js.map +1 -1
  52. package/lib/component/2d/IndirectAxis2D.d.ts.map +1 -1
  53. package/lib/component/2d/IndirectAxis2D.js +5 -2
  54. package/lib/component/2d/IndirectAxis2D.js.map +1 -1
  55. package/lib/component/2d/Viewer2D.d.ts.map +1 -1
  56. package/lib/component/2d/Viewer2D.js +2 -1
  57. package/lib/component/2d/Viewer2D.js.map +1 -1
  58. package/lib/component/2d/ft/FTContainer.d.ts.map +1 -1
  59. package/lib/component/2d/ft/FTContainer.js.map +1 -1
  60. package/lib/component/AnchorSVG.d.ts +36 -0
  61. package/lib/component/AnchorSVG.d.ts.map +1 -0
  62. package/lib/component/AnchorSVG.js +140 -0
  63. package/lib/component/AnchorSVG.js.map +1 -0
  64. package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
  65. package/lib/component/EventsTrackers/BrushTracker.js +16 -2
  66. package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
  67. package/lib/component/EventsTrackers/MouseTracker.d.ts +3 -0
  68. package/lib/component/EventsTrackers/MouseTracker.d.ts.map +1 -1
  69. package/lib/component/EventsTrackers/MouseTracker.js +15 -0
  70. package/lib/component/EventsTrackers/MouseTracker.js.map +1 -1
  71. package/lib/component/context/KeyModifierContext.d.ts +2 -0
  72. package/lib/component/context/KeyModifierContext.d.ts.map +1 -1
  73. package/lib/component/context/KeyModifierContext.js +26 -6
  74. package/lib/component/context/KeyModifierContext.js.map +1 -1
  75. package/lib/component/elements/D3Axis.d.ts.map +1 -1
  76. package/lib/component/elements/D3Axis.js +4 -3
  77. package/lib/component/elements/D3Axis.js.map +1 -1
  78. package/lib/component/elements/DraggableDialog.d.ts.map +1 -1
  79. package/lib/component/elements/DraggableDialog.js +1 -2
  80. package/lib/component/elements/DraggableDialog.js.map +1 -1
  81. package/lib/component/elements/Sections.d.ts +3 -3
  82. package/lib/component/elements/Sections.d.ts.map +1 -1
  83. package/lib/component/elements/Sections.js +1 -1
  84. package/lib/component/elements/Sections.js.map +1 -1
  85. package/lib/component/elements/export/ExportOptionsModal.js +2 -5
  86. package/lib/component/elements/export/ExportOptionsModal.js.map +1 -1
  87. package/lib/component/header/AutoPeakPickingOptionPanel.d.ts.map +1 -1
  88. package/lib/component/header/AutoPeakPickingOptionPanel.js +59 -31
  89. package/lib/component/header/AutoPeakPickingOptionPanel.js.map +1 -1
  90. package/lib/component/header/Header.d.ts.map +1 -1
  91. package/lib/component/header/Header.js +2 -4
  92. package/lib/component/header/Header.js.map +1 -1
  93. package/lib/component/header/RangesPickingOptionPanel.d.ts.map +1 -1
  94. package/lib/component/header/RangesPickingOptionPanel.js +34 -19
  95. package/lib/component/header/RangesPickingOptionPanel.js.map +1 -1
  96. package/lib/component/hooks/useAddMultipletSignal.d.ts +7 -0
  97. package/lib/component/hooks/useAddMultipletSignal.d.ts.map +1 -0
  98. package/lib/component/hooks/useAddMultipletSignal.js +28 -0
  99. package/lib/component/hooks/useAddMultipletSignal.js.map +1 -0
  100. package/lib/component/hooks/useFilter.d.ts.map +1 -1
  101. package/lib/component/hooks/useFilter.js.map +1 -1
  102. package/lib/component/hooks/useSaveSettings.d.ts.map +1 -1
  103. package/lib/component/hooks/useSaveSettings.js +3 -6
  104. package/lib/component/hooks/useSaveSettings.js.map +1 -1
  105. package/lib/component/hooks/useSpectrum.d.ts +3 -1
  106. package/lib/component/hooks/useSpectrum.d.ts.map +1 -1
  107. package/lib/component/hooks/useSpectrum.js +1 -1
  108. package/lib/component/hooks/useSpectrum.js.map +1 -1
  109. package/lib/component/hooks/useSpectrumWithDataSource.d.ts +1 -1
  110. package/lib/component/hooks/useSpectrumWithDataSource.d.ts.map +1 -1
  111. package/lib/component/hooks/useSpectrumWithDataSource.js.map +1 -1
  112. package/lib/component/hooks/useTempSpectrum.d.ts +1 -1
  113. package/lib/component/hooks/useTempSpectrum.d.ts.map +1 -1
  114. package/lib/component/hooks/use_ticks_config.d.ts +1 -4
  115. package/lib/component/hooks/use_ticks_config.d.ts.map +1 -1
  116. package/lib/component/hooks/use_ticks_config.js +1 -6
  117. package/lib/component/hooks/use_ticks_config.js.map +1 -1
  118. package/lib/component/modal/PublicationStringModal.d.ts +1 -1
  119. package/lib/component/modal/PublicationStringModal.d.ts.map +1 -1
  120. package/lib/component/modal/PublicationStringModal.js +4 -8
  121. package/lib/component/modal/PublicationStringModal.js.map +1 -1
  122. package/lib/component/modal/SaveAsModal.js +3 -6
  123. package/lib/component/modal/SaveAsModal.js.map +1 -1
  124. package/lib/component/modal/aboutUs/AboutUsModal.d.ts.map +1 -1
  125. package/lib/component/modal/aboutUs/AboutUsModal.js +2 -4
  126. package/lib/component/modal/aboutUs/AboutUsModal.js.map +1 -1
  127. package/lib/component/modal/editRange/forms/components/NewSignalTab.d.ts.map +1 -1
  128. package/lib/component/modal/editRange/forms/components/NewSignalTab.js +38 -36
  129. package/lib/component/modal/editRange/forms/components/NewSignalTab.js.map +1 -1
  130. package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +142 -24
  131. package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts.map +1 -1
  132. package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts +142 -24
  133. package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts.map +1 -1
  134. package/lib/component/modal/setting/tanstack_general_settings/general_settings.d.ts.map +1 -1
  135. package/lib/component/modal/setting/tanstack_general_settings/general_settings.js +9 -12
  136. package/lib/component/modal/setting/tanstack_general_settings/general_settings.js.map +1 -1
  137. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +142 -24
  138. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts.map +1 -1
  139. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts +120 -24
  140. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts.map +1 -1
  141. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +120 -24
  142. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts.map +1 -1
  143. package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts +20 -4
  144. package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts.map +1 -1
  145. package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +120 -24
  146. package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts.map +1 -1
  147. package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts +120 -24
  148. package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts.map +1 -1
  149. package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.js +12 -1
  150. package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.js.map +1 -1
  151. package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts +120 -24
  152. package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts.map +1 -1
  153. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +120 -24
  154. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts.map +1 -1
  155. package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts +120 -24
  156. package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts.map +1 -1
  157. package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +120 -24
  158. package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts.map +1 -1
  159. package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts +120 -24
  160. package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts.map +1 -1
  161. package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts +120 -24
  162. package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts.map +1 -1
  163. package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts +120 -24
  164. package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts.map +1 -1
  165. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts +120 -24
  166. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts.map +1 -1
  167. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts +120 -24
  168. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts.map +1 -1
  169. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts +120 -24
  170. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts.map +1 -1
  171. package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts +120 -24
  172. package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts.map +1 -1
  173. package/lib/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.d.ts +22 -0
  174. package/lib/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.d.ts.map +1 -1
  175. package/lib/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.js +15 -2
  176. package/lib/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.js.map +1 -1
  177. package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts +22 -0
  178. package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts.map +1 -1
  179. package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js +1 -1
  180. package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js.map +1 -1
  181. package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts.map +1 -1
  182. package/lib/component/panels/PeaksPanel/PeaksPanel.js +1 -9
  183. package/lib/component/panels/PeaksPanel/PeaksPanel.js.map +1 -1
  184. package/lib/component/panels/PeaksPanel/PeaksPreferences.js +1 -1
  185. package/lib/component/panels/PeaksPanel/PeaksPreferences.js.map +1 -1
  186. package/lib/component/panels/PeaksPanel/PeaksTable.d.ts.map +1 -1
  187. package/lib/component/panels/PeaksPanel/PeaksTable.js +9 -9
  188. package/lib/component/panels/PeaksPanel/PeaksTable.js.map +1 -1
  189. package/lib/component/panels/RangesPanel/RangesPanel.d.ts.map +1 -1
  190. package/lib/component/panels/RangesPanel/RangesPanel.js +1 -3
  191. package/lib/component/panels/RangesPanel/RangesPanel.js.map +1 -1
  192. package/lib/component/panels/RangesPanel/RangesTableRow.d.ts.map +1 -1
  193. package/lib/component/panels/RangesPanel/RangesTableRow.js +10 -12
  194. package/lib/component/panels/RangesPanel/RangesTableRow.js.map +1 -1
  195. package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.d.ts +1 -1
  196. package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.d.ts.map +1 -1
  197. package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
  198. package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js.map +1 -1
  199. package/lib/component/panels/SummaryPanel/SummaryPanel.d.ts.map +1 -1
  200. package/lib/component/panels/SummaryPanel/SummaryPanel.js +7 -0
  201. package/lib/component/panels/SummaryPanel/SummaryPanel.js.map +1 -1
  202. package/lib/component/panels/filtersPanel/FilterPanel.d.ts.map +1 -1
  203. package/lib/component/panels/filtersPanel/FilterPanel.js +5 -2
  204. package/lib/component/panels/filtersPanel/FilterPanel.js.map +1 -1
  205. package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js +1 -1
  206. package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js.map +1 -1
  207. package/lib/component/panels/filtersPanel/processings_sections_panel.d.ts +2 -0
  208. package/lib/component/panels/filtersPanel/processings_sections_panel.d.ts.map +1 -0
  209. package/lib/component/panels/filtersPanel/processings_sections_panel.js +134 -0
  210. package/lib/component/panels/filtersPanel/processings_sections_panel.js.map +1 -0
  211. package/lib/component/panels/hooks/use_processings_mutation.d.ts +10 -0
  212. package/lib/component/panels/hooks/use_processings_mutation.d.ts.map +1 -0
  213. package/lib/component/panels/hooks/use_processings_mutation.js +130 -0
  214. package/lib/component/panels/hooks/use_processings_mutation.js.map +1 -0
  215. package/lib/component/panels/informationPanel/InformationPanel.js +1 -1
  216. package/lib/component/panels/informationPanel/InformationPanel.js.map +1 -1
  217. package/lib/component/reducer/Reducer.d.ts.map +1 -1
  218. package/lib/component/reducer/Reducer.js +4 -0
  219. package/lib/component/reducer/Reducer.js.map +1 -1
  220. package/lib/component/reducer/actions/CorrelationsActions.js +2 -2
  221. package/lib/component/reducer/actions/CorrelationsActions.js.map +1 -1
  222. package/lib/component/reducer/actions/FiltersActions.d.ts +2 -0
  223. package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
  224. package/lib/component/reducer/actions/FiltersActions.js +1 -1
  225. package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
  226. package/lib/component/reducer/actions/MoleculeActions.d.ts +9 -0
  227. package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
  228. package/lib/component/reducer/actions/RangesActions.d.ts +11 -2
  229. package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
  230. package/lib/component/reducer/actions/RangesActions.js +36 -29
  231. package/lib/component/reducer/actions/RangesActions.js.map +1 -1
  232. package/lib/component/reducer/actions/SpectraActions.d.ts +8 -2
  233. package/lib/component/reducer/actions/SpectraActions.d.ts.map +1 -1
  234. package/lib/component/reducer/actions/SpectraActions.js +6 -1
  235. package/lib/component/reducer/actions/SpectraActions.js.map +1 -1
  236. package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
  237. package/lib/component/reducer/actions/ToolsActions.js +5 -17
  238. package/lib/component/reducer/actions/ToolsActions.js.map +1 -1
  239. package/lib/component/reducer/helper/getTraceSpectrumID.d.ts +5 -0
  240. package/lib/component/reducer/helper/getTraceSpectrumID.d.ts.map +1 -0
  241. package/lib/component/reducer/helper/getTraceSpectrumID.js +14 -0
  242. package/lib/component/reducer/helper/getTraceSpectrumID.js.map +1 -0
  243. package/lib/component/reducer/preferences/actions/setPreferences.d.ts +2 -2
  244. package/lib/component/reducer/preferences/actions/setPreferences.d.ts.map +1 -1
  245. package/lib/component/reducer/preferences/actions/setPreferences.js +8 -5
  246. package/lib/component/reducer/preferences/actions/setPreferences.js.map +1 -1
  247. package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
  248. package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
  249. package/lib/component/toolbar/ToolTypes.d.ts +21 -1
  250. package/lib/component/toolbar/ToolTypes.d.ts.map +1 -1
  251. package/lib/component/toolbar/ToolTypes.js +40 -0
  252. package/lib/component/toolbar/ToolTypes.js.map +1 -1
  253. package/lib/component/toolbar/nmr_toolbar.d.ts.map +1 -1
  254. package/lib/component/toolbar/nmr_toolbar.js +12 -36
  255. package/lib/component/toolbar/nmr_toolbar.js.map +1 -1
  256. package/lib/component/utility/CoreSlot.d.ts +27 -0
  257. package/lib/component/utility/CoreSlot.d.ts.map +1 -0
  258. package/lib/component/utility/CoreSlot.js +56 -0
  259. package/lib/component/utility/CoreSlot.js.map +1 -0
  260. package/lib/component/workspaces/workspaceDefaultProperties.d.ts.map +1 -1
  261. package/lib/component/workspaces/workspaceDefaultProperties.js +19 -2
  262. package/lib/component/workspaces/workspaceDefaultProperties.js.map +1 -1
  263. package/lib/data/data1d/Spectrum1D/initiateDatum1D.d.ts.map +1 -1
  264. package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +13 -5
  265. package/lib/data/data1d/Spectrum1D/initiateDatum1D.js.map +1 -1
  266. package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts.map +1 -1
  267. package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -0
  268. package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js.map +1 -1
  269. package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts.map +1 -1
  270. package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +35 -30
  271. package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js.map +1 -1
  272. package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.d.ts.map +1 -1
  273. package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.js +1 -0
  274. package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.js.map +1 -1
  275. package/lib/data/data2d/Spectrum2D/initiateDatum2D.d.ts.map +1 -1
  276. package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +12 -4
  277. package/lib/data/data2d/Spectrum2D/initiateDatum2D.js.map +1 -1
  278. package/lib/data/data2d/Spectrum2D/isSpectrum2D.d.ts +1 -1
  279. package/lib/data/data2d/Spectrum2D/isSpectrum2D.d.ts.map +1 -1
  280. package/lib/data/data2d/Spectrum2D/isSpectrum2D.js.map +1 -1
  281. package/lib/data/utilities/RangeUtilities.d.ts +1 -6
  282. package/lib/data/utilities/RangeUtilities.d.ts.map +1 -1
  283. package/lib/data/utilities/RangeUtilities.js +10 -27
  284. package/lib/data/utilities/RangeUtilities.js.map +1 -1
  285. package/lib/versionInfo.js +1 -1
  286. package/package.json +29 -27
  287. package/src/component/1d/HorizontalAxis1D.tsx +12 -2
  288. package/src/component/1d/SVGContent1D.tsx +2 -0
  289. package/src/component/1d/Viewer1D.tsx +2 -0
  290. package/src/component/1d/integral/IntegralResizable.tsx +6 -6
  291. package/src/component/1d/ranges/Range.tsx +6 -6
  292. package/src/component/1d/ranges/Signals.tsx +28 -0
  293. package/src/component/1d-2d/components/RangeIndicator.tsx +106 -0
  294. package/src/component/1d-2d/components/Signals1D.tsx +306 -0
  295. package/src/component/1d-2d/tools/BrushXY.tsx +8 -8
  296. package/src/component/1d-2d/tools/CrossLinePointer.tsx +75 -32
  297. package/src/component/1d-2d/tools/CursorToolIcon.tsx +110 -0
  298. package/src/component/2d/1d-tracer/Left1DChart.tsx +26 -1
  299. package/src/component/2d/1d-tracer/Ranges1D.tsx +38 -0
  300. package/src/component/2d/1d-tracer/Top1DChart.tsx +31 -2
  301. package/src/component/2d/DirectAxis2D.tsx +12 -3
  302. package/src/component/2d/IndirectAxis2D.tsx +9 -5
  303. package/src/component/2d/Viewer2D.tsx +5 -2
  304. package/src/component/2d/ft/FTContainer.tsx +1 -0
  305. package/src/component/AnchorSVG.tsx +369 -0
  306. package/src/component/EventsTrackers/BrushTracker.tsx +25 -5
  307. package/src/component/EventsTrackers/MouseTracker.tsx +21 -0
  308. package/src/component/context/KeyModifierContext.tsx +32 -8
  309. package/src/component/elements/D3Axis.tsx +31 -9
  310. package/src/component/elements/DraggableDialog.tsx +1 -2
  311. package/src/component/elements/Sections.tsx +4 -4
  312. package/src/component/elements/export/ExportOptionsModal.tsx +22 -31
  313. package/src/component/header/AutoPeakPickingOptionPanel.tsx +173 -102
  314. package/src/component/header/Header.tsx +2 -4
  315. package/src/component/header/RangesPickingOptionPanel.tsx +72 -59
  316. package/src/component/hooks/useAddMultipletSignal.tsx +32 -0
  317. package/src/component/hooks/useFilter.ts +2 -1
  318. package/src/component/hooks/useSaveSettings.tsx +4 -15
  319. package/src/component/hooks/useSpectrum.ts +7 -1
  320. package/src/component/hooks/useSpectrumWithDataSource.ts +16 -8
  321. package/src/component/hooks/use_ticks_config.ts +1 -7
  322. package/src/component/modal/PublicationStringModal.tsx +8 -14
  323. package/src/component/modal/SaveAsModal.tsx +41 -50
  324. package/src/component/modal/aboutUs/AboutUsModal.tsx +5 -4
  325. package/src/component/modal/editRange/forms/components/NewSignalTab.tsx +57 -57
  326. package/src/component/modal/setting/tanstack_general_settings/general_settings.tsx +23 -29
  327. package/src/component/modal/setting/tanstack_general_settings/tabs/axis_tab.tsx +76 -12
  328. package/src/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.ts +16 -2
  329. package/src/component/panels/MoleculesPanel/hooks/useAtomAssignment.tsx +1 -1
  330. package/src/component/panels/PeaksPanel/PeaksPanel.tsx +1 -8
  331. package/src/component/panels/PeaksPanel/PeaksPreferences.tsx +1 -1
  332. package/src/component/panels/PeaksPanel/PeaksTable.tsx +11 -9
  333. package/src/component/panels/RangesPanel/RangesPanel.tsx +1 -3
  334. package/src/component/panels/RangesPanel/RangesTableRow.tsx +10 -12
  335. package/src/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.tsx +2 -2
  336. package/src/component/panels/SummaryPanel/SummaryPanel.tsx +13 -11
  337. package/src/component/panels/filtersPanel/FilterPanel.tsx +10 -0
  338. package/src/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.tsx +1 -0
  339. package/src/component/panels/filtersPanel/processings_sections_panel.tsx +307 -0
  340. package/src/component/panels/hooks/use_processings_mutation.ts +171 -0
  341. package/src/component/panels/informationPanel/InformationPanel.tsx +1 -1
  342. package/src/component/reducer/Reducer.ts +4 -0
  343. package/src/component/reducer/actions/CorrelationsActions.ts +2 -2
  344. package/src/component/reducer/actions/FiltersActions.ts +1 -1
  345. package/src/component/reducer/actions/RangesActions.ts +53 -30
  346. package/src/component/reducer/actions/SpectraActions.ts +20 -1
  347. package/src/component/reducer/actions/ToolsActions.ts +5 -21
  348. package/src/component/reducer/helper/getTraceSpectrumID.tsx +25 -0
  349. package/src/component/reducer/preferences/actions/setPreferences.ts +18 -10
  350. package/src/component/reducer/preferences/preferencesReducer.ts +1 -1
  351. package/src/component/toolbar/ToolTypes.ts +92 -1
  352. package/src/component/toolbar/nmr_toolbar.tsx +15 -71
  353. package/src/component/utility/CoreSlot.tsx +126 -0
  354. package/src/component/workspaces/workspaceDefaultProperties.ts +19 -2
  355. package/src/data/data1d/Spectrum1D/initiateDatum1D.ts +14 -8
  356. package/src/data/data1d/Spectrum1D/peaks/autoPeakPicking.ts +1 -0
  357. package/src/data/data1d/Spectrum1D/peaks/optimizePeaks.ts +35 -30
  358. package/src/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.ts +1 -0
  359. package/src/data/data2d/Spectrum2D/initiateDatum2D.ts +12 -4
  360. package/src/data/data2d/Spectrum2D/isSpectrum2D.ts +1 -1
  361. package/src/data/utilities/RangeUtilities.ts +12 -36
  362. package/src/versionInfo.ts +1 -1
  363. package/lib/component/1d/integral/IntegralIndicator.d.ts +0 -9
  364. package/lib/component/1d/integral/IntegralIndicator.d.ts.map +0 -1
  365. package/lib/component/1d/integral/IntegralIndicator.js +0 -22
  366. package/lib/component/1d/integral/IntegralIndicator.js.map +0 -1
  367. package/lib/component/utility/renderCoreSlot.d.ts +0 -11
  368. package/lib/component/utility/renderCoreSlot.d.ts.map +0 -1
  369. package/lib/component/utility/renderCoreSlot.js +0 -13
  370. package/lib/component/utility/renderCoreSlot.js.map +0 -1
  371. package/src/component/1d/integral/IntegralIndicator.tsx +0 -43
  372. package/src/component/utility/renderCoreSlot.tsx +0 -21
@@ -1,51 +1,47 @@
1
- import { Button, Checkbox } from '@blueprintjs/core';
2
- import { yupResolver } from '@hookform/resolvers/yup';
3
- import { useForm } from 'react-hook-form';
4
- import * as Yup from 'yup';
1
+ import { Checkbox, Classes, FormGroup, NumericInput } from '@blueprintjs/core';
2
+ import styled from '@emotion/styled';
3
+ import { revalidateLogic } from '@tanstack/react-form';
4
+ import { AppForm, useForm } from 'react-science/ui';
5
+ import { z } from 'zod';
5
6
 
6
7
  import { useDispatch } from '../context/DispatchContext.js';
7
8
  import { useToaster } from '../context/ToasterContext.js';
8
- import Label from '../elements/Label.js';
9
- import { NumberInput2Controller } from '../elements/NumberInput2Controller.js';
10
9
  import {
11
10
  MIN_AREA_POINTS,
12
11
  useCheckPointsNumberInWindowArea,
13
12
  } from '../hooks/useCheckPointsNumberInWindowArea.js';
14
13
 
15
- import { headerLabelStyle } from './Header.js';
16
- import { HeaderWrapper } from './HeaderWrapper.js';
17
-
18
- interface AutoRangesOptions {
19
- minMaxRatio: number;
20
- lookNegative: boolean;
21
- }
22
-
23
- const validationSchema = Yup.object().shape({
24
- minMaxRatio: Yup.number().min(0).required(),
25
- lookNegative: Yup.boolean().required(),
14
+ const validationZodSchema = z.object({
15
+ minMaxRatio: z.coerce.number<string>().min(0),
16
+ lookNegative: z.boolean(),
26
17
  });
27
18
 
28
- const initialValues: AutoRangesOptions = {
29
- minMaxRatio: 0.05,
19
+ const defaultValues: AutoRangesOptionsInput = {
20
+ minMaxRatio: '0.05',
30
21
  lookNegative: false,
31
22
  };
32
23
 
24
+ const AppFormContainer = styled(AppForm)`
25
+ display: flex;
26
+ flex-direction: row;
27
+ gap: 10px;
28
+ align-items: center;
29
+
30
+ .${Classes.CHECKBOX}, .${Classes.FORM_GROUP} {
31
+ margin-bottom: 0;
32
+ }
33
+ `;
34
+
35
+ type AutoRangesOptionsInput = z.input<typeof validationZodSchema>;
36
+ type AutoRangesOptions = z.output<typeof validationZodSchema>;
37
+
33
38
  function RangesPickingOptionPanel() {
34
39
  const dispatch = useDispatch();
35
- const {
36
- handleSubmit,
37
- register,
38
- control,
39
- formState: { isValid },
40
- } = useForm<AutoRangesOptions>({
41
- defaultValues: initialValues,
42
- resolver: yupResolver(validationSchema),
43
- mode: 'onChange',
44
- });
40
+
45
41
  const hasEnoughPoints = useCheckPointsNumberInWindowArea();
46
42
  const toaster = useToaster();
47
43
 
48
- function handleRangesPicking(values: any) {
44
+ function handleRangesPicking(values: AutoRangesOptions) {
49
45
  if (hasEnoughPoints) {
50
46
  dispatch({
51
47
  type: 'AUTO_RANGES_DETECTION',
@@ -59,37 +55,54 @@ function RangesPickingOptionPanel() {
59
55
  }
60
56
  }
61
57
 
58
+ const form = useForm({
59
+ defaultValues,
60
+ validationLogic: revalidateLogic({ modeAfterSubmission: 'change' }),
61
+ validators: {
62
+ onDynamic: validationZodSchema,
63
+ },
64
+ onSubmit: ({ value }) => {
65
+ const parsedValues = validationZodSchema.parse(value);
66
+ handleRangesPicking(parsedValues);
67
+ },
68
+ });
69
+
62
70
  return (
63
- <HeaderWrapper>
64
- <Label title="Detect negative" style={headerLabelStyle}>
65
- <Checkbox
66
- style={{ margin: 0 }}
67
- {...register(`lookNegative`)}
68
- defaultChecked={false}
69
- />
70
- </Label>
71
- <Label title="Min/max ratio:" style={headerLabelStyle}>
72
- <NumberInput2Controller
73
- control={control}
74
- name="minMaxRatio"
75
- min={0}
76
- stepSize={0.01}
77
- majorStepSize={0.01}
78
- minorStepSize={0.01}
79
- style={{ width: '70px' }}
80
- debounceTime={500}
81
- />
82
- </Label>
71
+ <AppFormContainer form={form}>
72
+ <form.AppField name="lookNegative">
73
+ {(field) => (
74
+ <Checkbox
75
+ label="Detect negative"
76
+ checked={field.state.value}
77
+ onBlur={field.handleBlur}
78
+ onChange={({ target: { checked } }) => field.handleChange(checked)}
79
+ />
80
+ )}
81
+ </form.AppField>
82
+
83
+ <form.AppField name="minMaxRatio">
84
+ {(field) => (
85
+ <FormGroup label="Min/max ratio:" inline>
86
+ <NumericInput
87
+ value={field.state.value ?? ''}
88
+ onBlur={field.handleBlur}
89
+ min={0}
90
+ stepSize={0.01}
91
+ minorStepSize={0.01}
92
+ onValueChange={(_, valueAsString) => {
93
+ field.handleChange(valueAsString);
94
+ }}
95
+ />
96
+ </FormGroup>
97
+ )}
98
+ </form.AppField>
83
99
 
84
- <Button
85
- intent="success"
86
- onClick={() => handleSubmit(handleRangesPicking)()}
87
- style={{ margin: '0 10px' }}
88
- disabled={!isValid}
89
- >
90
- Auto ranges picking
91
- </Button>
92
- </HeaderWrapper>
100
+ <div>
101
+ <form.SubmitButton intent="success">
102
+ Auto ranges picking
103
+ </form.SubmitButton>
104
+ </div>
105
+ </AppFormContainer>
93
106
  );
94
107
  }
95
108
 
@@ -0,0 +1,32 @@
1
+ import type { Jcoupling, Range, Signal1D } from '@zakodium/nmr-types';
2
+
3
+ import { useDispatch } from '../context/DispatchContext.tsx';
4
+
5
+ export function useAddMultipletSignal() {
6
+ const dispatch = useDispatch();
7
+
8
+ return (options: { range: Range; spectrumId?: string; delta: number }) => {
9
+ const { range, delta, spectrumId } = options;
10
+ const updatedRange = structuredClone(range);
11
+ const signal: Signal1D = {
12
+ id: crypto.randomUUID(),
13
+ delta,
14
+ js: [
15
+ {
16
+ multiplicity: 'm',
17
+ } as Jcoupling,
18
+ ],
19
+ kind: 'signal',
20
+ multiplicity: 'm',
21
+ };
22
+ updatedRange.signals.push(signal);
23
+
24
+ dispatch({
25
+ type: 'UPDATE_RANGE',
26
+ payload: {
27
+ range: updatedRange,
28
+ spectrumId,
29
+ },
30
+ });
31
+ };
32
+ }
@@ -1,4 +1,5 @@
1
1
  import type { Filter1DEntry, Filter2DEntry } from '@zakodium/nmr-types';
2
+ import type { Spectrum } from '@zakodium/nmrium-core';
2
3
  import { useMemo } from 'react';
3
4
 
4
5
  import type { ExtractFilterEntry } from '../../data/types/common/ExtractFilterEntry.js';
@@ -6,7 +7,7 @@ import type { FilterEntry } from '../../data/types/common/FilterEntry.js';
6
7
 
7
8
  import useSpectrum from './useSpectrum.js';
8
9
 
9
- const emptyData = { filters: [] };
10
+ const emptyData: Pick<Spectrum, 'filters'> = { filters: [] };
10
11
  type FilterReturnType<T> = T extends Filter1DEntry['name']
11
12
  ? ExtractFilterEntry<T>
12
13
  : T extends Filter2DEntry['name']
@@ -2,11 +2,7 @@ import { Button, DialogBody, DialogFooter } from '@blueprintjs/core';
2
2
  import { revalidateLogic } from '@tanstack/react-form';
3
3
  import type { Workspace } from '@zakodium/nmrium-core';
4
4
  import { useRef } from 'react';
5
- import {
6
- Form,
7
- useForm as useReactScienceForm,
8
- useOnOff,
9
- } from 'react-science/ui';
5
+ import { AppForm, useForm, useOnOff } from 'react-science/ui';
10
6
  import { z } from 'zod/v4';
11
7
 
12
8
  import { usePreferences } from '../context/PreferencesContext.js';
@@ -30,7 +26,7 @@ export function useSaveSettings() {
30
26
 
31
27
  const { saveWorkspace, addNewWorkspace } = useWorkspaceAction();
32
28
 
33
- const form = useReactScienceForm({
29
+ const form = useForm({
34
30
  defaultValues: { workspaceName: '' },
35
31
  validationLogic: revalidateLogic({ modeAfterSubmission: 'change' }),
36
32
  validators: { onDynamic: schema },
@@ -67,14 +63,7 @@ export function useSaveSettings() {
67
63
  title="Save workspace"
68
64
  role="dialog"
69
65
  >
70
- <Form
71
- layout="stacked"
72
- noValidate
73
- onSubmit={(event) => {
74
- event.preventDefault();
75
- void form.handleSubmit();
76
- }}
77
- >
66
+ <AppForm form={form} layout="stacked">
78
67
  <DialogBody>
79
68
  <form.AppField name="workspaceName">
80
69
  {(field) => (
@@ -107,7 +96,7 @@ export function useSaveSettings() {
107
96
  </>
108
97
  }
109
98
  />
110
- </Form>
99
+ </AppForm>
111
100
  </StandardDialog>
112
101
  );
113
102
  },
@@ -1,8 +1,14 @@
1
+ import type { Spectrum } from '@zakodium/nmrium-core';
2
+
1
3
  import { useChartData } from '../context/ChartContext.js';
2
4
 
3
5
  import { useSpectrumWithDataSource } from './useSpectrumWithDataSource.js';
4
6
 
5
- export default function useSpectrum(defaultValue: any = null) {
7
+ export default function useSpectrum<Default>(
8
+ defaultValue: Default,
9
+ ): Spectrum | Default;
10
+ export default function useSpectrum(): Spectrum | undefined;
11
+ export default function useSpectrum<Default>(defaultValue?: Default) {
6
12
  const { data } = useChartData();
7
13
  return useSpectrumWithDataSource(data, defaultValue);
8
14
  }
@@ -5,30 +5,38 @@ import { useInsetOptions } from '../1d/inset/InsetProvider.js';
5
5
 
6
6
  import { useActiveSpectrum } from './useActiveSpectrum.js';
7
7
 
8
- function getSpectrum(
8
+ function getSpectrum<Default>(
9
9
  data: Spectrum[],
10
10
  spectrumKey: string,
11
- defaultValue?: any,
11
+ defaultValue: Default,
12
12
  ) {
13
13
  return data.find((datum) => datum.id === spectrumKey) || defaultValue;
14
14
  }
15
15
 
16
- export function useSpectrumWithDataSource(
17
- dataSource: any,
18
- defaultValue: any = null,
16
+ export function useSpectrumWithDataSource<Default = Spectrum>(
17
+ dataSource: Spectrum[],
18
+ defaultValue: Default | null = null,
19
19
  ) {
20
20
  const activeSpectrum = useActiveSpectrum();
21
21
  const inset = useInsetOptions();
22
22
 
23
- return useMemo<Spectrum>(() => {
23
+ return useMemo<Spectrum | Default | null>(() => {
24
24
  if (!dataSource) return defaultValue;
25
25
 
26
26
  if (inset) {
27
- return getSpectrum(dataSource, inset.spectrumKey, defaultValue);
27
+ return getSpectrum<Default | null>(
28
+ dataSource,
29
+ inset.spectrumKey,
30
+ defaultValue,
31
+ );
28
32
  }
29
33
 
30
34
  if (dataSource && activeSpectrum?.selected) {
31
- return getSpectrum(dataSource, activeSpectrum.id, defaultValue);
35
+ return getSpectrum<Default | null>(
36
+ dataSource,
37
+ activeSpectrum.id,
38
+ defaultValue,
39
+ );
32
40
  }
33
41
 
34
42
  return defaultValue;
@@ -5,11 +5,5 @@ export function useTicksConfig() {
5
5
  const { current } = usePreferences();
6
6
  const axis = current.axis ?? workspaceDefaultProperties.axis;
7
7
 
8
- const { textStyle } = axis.primaryTicks;
9
- const { enabled } = axis.secondaryTicks;
10
-
11
- return {
12
- textStyle,
13
- isSecondaryEnabled: enabled,
14
- };
8
+ return axis;
15
9
  }
@@ -5,10 +5,9 @@ import type {
5
5
  Spectrum1D,
6
6
  Spectrum,
7
7
  } from '@zakodium/nmrium-core';
8
- import type { FormEvent } from 'react';
9
8
  import {
9
+ AppForm,
10
10
  FieldGroupSVGTextStyleFields,
11
- Form,
12
11
  assert,
13
12
  svgTextStyleFieldsSchema,
14
13
  useForm,
@@ -92,7 +91,7 @@ interface InnerPublicationStringModalProps {
92
91
  onClose: () => void;
93
92
 
94
93
  acsExportOptions: ACSExportOptions;
95
- spectrum: Spectrum;
94
+ spectrum: Spectrum | undefined;
96
95
  publicationStringVisibility?: {
97
96
  isShown: boolean;
98
97
  toggle: () => void;
@@ -151,7 +150,7 @@ function InnerPublicationStringModal(props: InnerPublicationStringModalProps) {
151
150
  defaultValues,
152
151
  validators: { onChange: validationSchema },
153
152
  onSubmit: ({ value, formApi }) => {
154
- assert(spectrum && isSpectrum1D(spectrum));
153
+ assert(isSpectrum1D(spectrum));
155
154
  const nucleus = spectrum.info.nucleus;
156
155
 
157
156
  const parsedValues = validationSchema.parse(value);
@@ -189,15 +188,10 @@ function InnerPublicationStringModal(props: InnerPublicationStringModalProps) {
189
188
  },
190
189
  });
191
190
 
192
- if (!spectrum || !isSpectrum1D(spectrum)) return null;
193
-
194
- function onSubmit(event: FormEvent<HTMLFormElement>) {
195
- event.preventDefault();
196
- void form.handleSubmit(event);
197
- }
191
+ if (!isSpectrum1D(spectrum)) return null;
198
192
 
199
193
  return (
200
- <form.AppForm>
194
+ <>
201
195
  <StandardDialog
202
196
  isOpen
203
197
  title="Publication string"
@@ -207,7 +201,7 @@ function InnerPublicationStringModal(props: InnerPublicationStringModalProps) {
207
201
  onClose={onClose}
208
202
  style={{ minWidth: 600 }}
209
203
  >
210
- <Form noValidate onSubmit={onSubmit} layout="inline">
204
+ <AppForm form={form} layout="inline">
211
205
  <HelpForm>This configuration is at the nucleus level.</HelpForm>
212
206
  <StyledDialogBody>
213
207
  <form.AppField name="acs.signalKind">
@@ -265,7 +259,7 @@ function InnerPublicationStringModal(props: InnerPublicationStringModalProps) {
265
259
  </form.AppField>
266
260
  )}
267
261
  </DialogFooter>
268
- </Form>
262
+ </AppForm>
269
263
  </StandardDialog>
270
264
 
271
265
  <ClipboardFallbackModal
@@ -274,7 +268,7 @@ function InnerPublicationStringModal(props: InnerPublicationStringModalProps) {
274
268
  text={text}
275
269
  label="Preview publication string"
276
270
  />
277
- </form.AppForm>
271
+ </>
278
272
  );
279
273
  }
280
274
 
@@ -1,7 +1,7 @@
1
1
  import { DialogBody, DialogFooter } from '@blueprintjs/core';
2
2
  import { revalidateLogic } from '@tanstack/react-form';
3
3
  import { useMemo } from 'react';
4
- import { Button, Form, useForm } from 'react-science/ui';
4
+ import { AppForm, Button, useForm } from 'react-science/ui';
5
5
  import { z } from 'zod/v4';
6
6
 
7
7
  import { DataExportOptions } from '../../data/SpectraManager.js';
@@ -52,7 +52,7 @@ function InnerSaveAsModal(props: InnerSaveAsModalProps) {
52
52
  const { saveHandler } = useExport();
53
53
 
54
54
  const form = useForm({
55
- defaultValues: { ...INITIAL_VALUE, name: data[0]?.info?.name },
55
+ defaultValues: { ...INITIAL_VALUE, name: data[0]?.info?.name ?? '' },
56
56
  validators: { onDynamic: formSchema },
57
57
  validationLogic: revalidateLogic({ modeAfterSubmission: 'change' }),
58
58
  onSubmit: ({ value }) => {
@@ -86,54 +86,45 @@ function InnerSaveAsModal(props: InnerSaveAsModalProps) {
86
86
  onClose={onCloseDialog}
87
87
  style={{ width: 600 }}
88
88
  >
89
- <form.AppForm>
90
- <Form
91
- layout="inline"
92
- noValidate
93
- onSubmit={(event) => {
94
- event.preventDefault();
95
- void form.handleSubmit();
96
- }}
97
- >
98
- <DialogBody style={{ backgroundColor: 'white' }}>
99
- <form.Section title="General information">
100
- <form.AppField name="name">
101
- {(field) => <field.Input label="Name" required autoFocus />}
102
- </form.AppField>
103
- </form.Section>
104
- <form.Section title="Include">
105
- <form.AppField name="include.view">
106
- {(field) => <field.Checkbox label="View" />}
107
- </form.AppField>
108
-
109
- <form.AppField name="include.settings">
110
- {(field) => <field.Checkbox label="Workspace" />}
111
- </form.AppField>
112
-
113
- <form.AppField name="include.dataType">
114
- {(field) => (
115
- <field.RadioGroup inline label="Data" options={options} />
116
- )}
117
- </form.AppField>
118
- </form.Section>
119
- </DialogBody>
120
-
121
- <DialogFooter
122
- actions={
123
- <>
124
- <Button
125
- variant="outlined"
126
- intent="danger"
127
- onClick={() => onCloseDialog?.()}
128
- >
129
- Cancel
130
- </Button>
131
- <form.SubmitButton intent="success">Save</form.SubmitButton>
132
- </>
133
- }
134
- />
135
- </Form>
136
- </form.AppForm>
89
+ <AppForm form={form} layout="inline">
90
+ <DialogBody style={{ backgroundColor: 'white' }}>
91
+ <form.Section title="General information">
92
+ <form.AppField name="name">
93
+ {(field) => <field.Input label="Name" required autoFocus />}
94
+ </form.AppField>
95
+ </form.Section>
96
+ <form.Section title="Include">
97
+ <form.AppField name="include.view">
98
+ {(field) => <field.Checkbox label="View" />}
99
+ </form.AppField>
100
+
101
+ <form.AppField name="include.settings">
102
+ {(field) => <field.Checkbox label="Workspace" />}
103
+ </form.AppField>
104
+
105
+ <form.AppField name="include.dataType">
106
+ {(field) => (
107
+ <field.RadioGroup inline label="Data" options={options} />
108
+ )}
109
+ </form.AppField>
110
+ </form.Section>
111
+ </DialogBody>
112
+
113
+ <DialogFooter
114
+ actions={
115
+ <>
116
+ <Button
117
+ variant="outlined"
118
+ intent="danger"
119
+ onClick={() => onCloseDialog?.()}
120
+ >
121
+ Cancel
122
+ </Button>
123
+ <form.SubmitButton intent="success">Save</form.SubmitButton>
124
+ </>
125
+ }
126
+ />
127
+ </AppForm>
137
128
  </StandardDialog>
138
129
  );
139
130
  }
@@ -3,11 +3,10 @@ import { SvgLogoNmrium } from 'cheminfo-font';
3
3
  import { Toolbar, useOnOff } from 'react-science/ui';
4
4
 
5
5
  import versionInfo from '../../../versionInfo.js';
6
- import { useCore } from '../../context/CoreContext.js';
7
6
  import Logo from '../../elements/Logo.js';
8
7
  import { StandardDialog } from '../../elements/StandardDialog.tsx';
9
8
  import { StyledDialogBody } from '../../elements/StyledDialogBody.js';
10
- import { renderCoreSlot } from '../../utility/renderCoreSlot.js';
9
+ import { CoreSlot } from '../../utility/CoreSlot.tsx';
11
10
 
12
11
  import AboutUsZakodium from './AboutUsZakodium.js';
13
12
 
@@ -116,7 +115,6 @@ const modalContentFallback = (
116
115
 
117
116
  function AboutUsModal() {
118
117
  const [isOpenDialog, openDialog, closeDialog] = useOnOff(false);
119
- const core = useCore();
120
118
 
121
119
  return (
122
120
  <>
@@ -137,7 +135,10 @@ function AboutUsModal() {
137
135
  title="About NMRium"
138
136
  >
139
137
  <StyledDialogBody>
140
- {renderCoreSlot(core, 'topbar.about_us.modal', modalContentFallback)}
138
+ <CoreSlot
139
+ slot="topbar.about_us.modal"
140
+ fallback={modalContentFallback}
141
+ />
141
142
  </StyledDialogBody>
142
143
  </StandardDialog>
143
144
  </>