nmrium 2.2.0 → 2.4.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 (414) hide show
  1. package/lib/component/1d/PredictionErrorsNotations.js +3 -3
  2. package/lib/component/1d/PredictionErrorsNotations.js.map +1 -1
  3. package/lib/component/1d/peaks/PeakEditionManager.d.ts +1 -1
  4. package/lib/component/1d/peaks/Peaks.d.ts.map +1 -1
  5. package/lib/component/1d/peaks/Peaks.js +2 -1
  6. package/lib/component/1d/peaks/Peaks.js.map +1 -1
  7. package/lib/component/1d/peaks/usePeakShapesPath.d.ts.map +1 -1
  8. package/lib/component/1d/peaks/usePeakShapesPath.js.map +1 -1
  9. package/lib/component/1d/ranges/AssignmentLabel.js +1 -1
  10. package/lib/component/1d/ranges/AssignmentLabel.js.map +1 -1
  11. package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.d.ts +9 -0
  12. package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.d.ts.map +1 -0
  13. package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.js +138 -0
  14. package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.js.map +1 -0
  15. package/lib/component/1d/ranges/FloatingRanges.d.ts.map +1 -0
  16. package/lib/component/1d/ranges/FloatingRanges.js +362 -0
  17. package/lib/component/1d/ranges/FloatingRanges.js.map +1 -0
  18. package/lib/component/1d/ranges/Ranges.js +2 -2
  19. package/lib/component/1d/ranges/Ranges.js.map +1 -1
  20. package/lib/component/1d-2d/FieldEdition.d.ts +2 -2
  21. package/lib/component/1d-2d/FieldEdition.d.ts.map +1 -1
  22. package/lib/component/1d-2d/FieldEdition.js +2 -2
  23. package/lib/component/1d-2d/FieldEdition.js.map +1 -1
  24. package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +7 -7
  25. package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js.map +1 -1
  26. package/lib/component/1d-2d/tools/BrushXY.js +6 -6
  27. package/lib/component/1d-2d/tools/BrushXY.js.map +1 -1
  28. package/lib/component/2d/1d-tracer/Left1DChart.d.ts.map +1 -1
  29. package/lib/component/2d/1d-tracer/Left1DChart.js +6 -2
  30. package/lib/component/2d/1d-tracer/Left1DChart.js.map +1 -1
  31. package/lib/component/2d/1d-tracer/Ranges1D.d.ts +9 -0
  32. package/lib/component/2d/1d-tracer/Ranges1D.d.ts.map +1 -0
  33. package/lib/component/2d/1d-tracer/Ranges1D.js +76 -0
  34. package/lib/component/2d/1d-tracer/Ranges1D.js.map +1 -0
  35. package/lib/component/2d/1d-tracer/Signals1D.d.ts +11 -0
  36. package/lib/component/2d/1d-tracer/Signals1D.d.ts.map +1 -0
  37. package/lib/component/2d/1d-tracer/Signals1D.js +90 -0
  38. package/lib/component/2d/1d-tracer/Signals1D.js.map +1 -0
  39. package/lib/component/2d/1d-tracer/Top1DChart.d.ts.map +1 -1
  40. package/lib/component/2d/1d-tracer/Top1DChart.js +6 -2
  41. package/lib/component/2d/1d-tracer/Top1DChart.js.map +1 -1
  42. package/lib/component/2d/ft/FTContainer.d.ts.map +1 -1
  43. package/lib/component/2d/ft/FTContainer.js.map +1 -1
  44. package/lib/component/2d/zones/SignalsGuideLines.js +1 -1
  45. package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
  46. package/lib/component/2d/zones/ZonesAssignmentsLabels.js +1 -1
  47. package/lib/component/2d/zones/ZonesAssignmentsLabels.js.map +1 -1
  48. package/lib/component/AnchorSVG.d.ts +37 -0
  49. package/lib/component/AnchorSVG.d.ts.map +1 -0
  50. package/lib/component/AnchorSVG.js +137 -0
  51. package/lib/component/AnchorSVG.js.map +1 -0
  52. package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
  53. package/lib/component/EventsTrackers/BrushTracker.js +4 -0
  54. package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
  55. package/lib/component/SVGTable.d.ts +5 -3
  56. package/lib/component/SVGTable.d.ts.map +1 -1
  57. package/lib/component/SVGTable.js +16 -16
  58. package/lib/component/SVGTable.js.map +1 -1
  59. package/lib/component/context/KeyModifierContext.d.ts +1 -0
  60. package/lib/component/context/KeyModifierContext.d.ts.map +1 -1
  61. package/lib/component/context/KeyModifierContext.js +4 -0
  62. package/lib/component/context/KeyModifierContext.js.map +1 -1
  63. package/lib/component/context/LoggerContext.d.ts.map +1 -1
  64. package/lib/component/context/LoggerContext.js.map +1 -1
  65. package/lib/component/context/SortSpectraContext.d.ts.map +1 -1
  66. package/lib/component/context/SortSpectraContext.js.map +1 -1
  67. package/lib/component/elements/ActionsButtonsPopover.d.ts +2 -2
  68. package/lib/component/elements/ActionsButtonsPopover.d.ts.map +1 -1
  69. package/lib/component/elements/ActionsButtonsPopover.js +6 -9
  70. package/lib/component/elements/ActionsButtonsPopover.js.map +1 -1
  71. package/lib/component/elements/Button.d.ts.map +1 -1
  72. package/lib/component/elements/Button.js.map +1 -1
  73. package/lib/component/elements/DraggableDialog.d.ts.map +1 -1
  74. package/lib/component/elements/DraggableDialog.js +1 -2
  75. package/lib/component/elements/DraggableDialog.js.map +1 -1
  76. package/lib/component/elements/Sections.d.ts +3 -3
  77. package/lib/component/elements/Sections.d.ts.map +1 -1
  78. package/lib/component/elements/Sections.js +1 -1
  79. package/lib/component/elements/Sections.js.map +1 -1
  80. package/lib/component/elements/TabTitle.d.ts.map +1 -1
  81. package/lib/component/elements/TabTitle.js +2 -2
  82. package/lib/component/elements/TabTitle.js.map +1 -1
  83. package/lib/component/elements/ToolbarPopoverItem.d.ts +1 -0
  84. package/lib/component/elements/ToolbarPopoverItem.d.ts.map +1 -1
  85. package/lib/component/elements/ToolbarPopoverItem.js +10 -3
  86. package/lib/component/elements/ToolbarPopoverItem.js.map +1 -1
  87. package/lib/component/elements/dropDownButton/DropDownButton.d.ts.map +1 -1
  88. package/lib/component/elements/dropDownButton/DropDownButton.js +2 -2
  89. package/lib/component/elements/dropDownButton/DropDownButton.js.map +1 -1
  90. package/lib/component/elements/export/ExportOptionsModal.d.ts +1 -1
  91. package/lib/component/elements/export/ExportOptionsModal.d.ts.map +1 -1
  92. package/lib/component/elements/export/ExportOptionsModal.js +28 -110
  93. package/lib/component/elements/export/ExportOptionsModal.js.map +1 -1
  94. package/lib/component/elements/export/units.d.ts +0 -28
  95. package/lib/component/elements/export/units.d.ts.map +1 -1
  96. package/lib/component/elements/export/units.js +0 -5
  97. package/lib/component/elements/export/units.js.map +1 -1
  98. package/lib/component/elements/export/utilities/getExportOptions.d.ts.map +1 -1
  99. package/lib/component/elements/export/utilities/getExportOptions.js.map +1 -1
  100. package/lib/component/elements/print/pageSize.d.ts +1 -1
  101. package/lib/component/elements/print/pageSize.d.ts.map +1 -1
  102. package/lib/component/header/Header.d.ts.map +1 -1
  103. package/lib/component/header/Header.js +2 -4
  104. package/lib/component/header/Header.js.map +1 -1
  105. package/lib/component/hooks/useExport.d.ts.map +1 -1
  106. package/lib/component/hooks/useExport.js.map +1 -1
  107. package/lib/component/hooks/usePanelPreferences.d.ts +3 -3
  108. package/lib/component/hooks/usePanelPreferences.d.ts.map +1 -1
  109. package/lib/component/hooks/useSaveSettings.d.ts.map +1 -1
  110. package/lib/component/hooks/useSaveSettings.js +3 -6
  111. package/lib/component/hooks/useSaveSettings.js.map +1 -1
  112. package/lib/component/hooks/useTextMetrics.d.ts.map +1 -1
  113. package/lib/component/hooks/useTextMetrics.js +1 -0
  114. package/lib/component/hooks/useTextMetrics.js.map +1 -1
  115. package/lib/component/main/NMRiumViewer.js +1 -1
  116. package/lib/component/main/NMRiumViewer.js.map +1 -1
  117. package/lib/component/modal/EditPeakShapeModal.js +2 -2
  118. package/lib/component/modal/EditPeakShapeModal.js.map +1 -1
  119. package/lib/component/modal/PublicationStringModal.d.ts.map +1 -1
  120. package/lib/component/modal/PublicationStringModal.js +2 -6
  121. package/lib/component/modal/PublicationStringModal.js.map +1 -1
  122. package/lib/component/modal/SaveAsModal.d.ts +2 -2
  123. package/lib/component/modal/SaveAsModal.d.ts.map +1 -1
  124. package/lib/component/modal/SaveAsModal.js +40 -35
  125. package/lib/component/modal/SaveAsModal.js.map +1 -1
  126. package/lib/component/modal/aboutUs/AboutUsModal.d.ts.map +1 -1
  127. package/lib/component/modal/aboutUs/AboutUsModal.js +2 -4
  128. package/lib/component/modal/aboutUs/AboutUsModal.js.map +1 -1
  129. package/lib/component/modal/editRange/EditRangeModal.js +4 -3
  130. package/lib/component/modal/editRange/EditRangeModal.js.map +1 -1
  131. package/lib/component/modal/editRange/forms/components/NewSignalTab.d.ts.map +1 -1
  132. package/lib/component/modal/editRange/forms/components/NewSignalTab.js +39 -37
  133. package/lib/component/modal/editRange/forms/components/NewSignalTab.js.map +1 -1
  134. package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +29 -29
  135. package/lib/component/modal/setting/tanstack_general_settings/errors/context.js +3 -3
  136. package/lib/component/modal/setting/tanstack_general_settings/errors/context.js.map +1 -1
  137. package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts +29 -29
  138. package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.js +2 -2
  139. package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.js.map +1 -1
  140. package/lib/component/modal/setting/tanstack_general_settings/general_settings.d.ts.map +1 -1
  141. package/lib/component/modal/setting/tanstack_general_settings/general_settings.js +9 -12
  142. package/lib/component/modal/setting/tanstack_general_settings/general_settings.js.map +1 -1
  143. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +29 -29
  144. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.js +2 -2
  145. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.js.map +1 -1
  146. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts +24 -24
  147. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +29 -29
  148. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.js +2 -2
  149. package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.js.map +1 -1
  150. package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts +4 -4
  151. package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +29 -29
  152. package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.js +2 -2
  153. package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.js.map +1 -1
  154. package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts +24 -24
  155. package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts +24 -24
  156. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +24 -24
  157. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.d.ts +14 -14
  158. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js +2 -2
  159. package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js.map +1 -1
  160. package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts +24 -24
  161. package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +24 -24
  162. package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts +24 -24
  163. package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts +24 -24
  164. package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts +24 -24
  165. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts +24 -24
  166. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts +24 -24
  167. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts.map +1 -1
  168. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.js +3 -2
  169. package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.js.map +1 -1
  170. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts +24 -24
  171. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts.map +1 -1
  172. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.js +3 -2
  173. package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.js.map +1 -1
  174. package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts +24 -24
  175. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
  176. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +30 -3
  177. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
  178. package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts.map +1 -1
  179. package/lib/component/panels/PeaksPanel/PeaksPanel.js +1 -9
  180. package/lib/component/panels/PeaksPanel/PeaksPanel.js.map +1 -1
  181. package/lib/component/panels/PeaksPanel/PeaksPreferences.js +18 -18
  182. package/lib/component/panels/PeaksPanel/PeaksPreferences.js.map +1 -1
  183. package/lib/component/panels/PeaksPanel/PeaksTable.d.ts.map +1 -1
  184. package/lib/component/panels/PeaksPanel/PeaksTable.js +17 -17
  185. package/lib/component/panels/PeaksPanel/PeaksTable.js.map +1 -1
  186. package/lib/component/panels/RangesPanel/RangesHeader.d.ts.map +1 -1
  187. package/lib/component/panels/RangesPanel/RangesHeader.js.map +1 -1
  188. package/lib/component/panels/RangesPanel/RangesPreferences.js +22 -22
  189. package/lib/component/panels/RangesPanel/RangesPreferences.js.map +1 -1
  190. package/lib/component/panels/RangesPanel/RangesTable.d.ts +2 -2
  191. package/lib/component/panels/RangesPanel/RangesTable.d.ts.map +1 -1
  192. package/lib/component/panels/RangesPanel/RangesTable.js +5 -4
  193. package/lib/component/panels/RangesPanel/RangesTable.js.map +1 -1
  194. package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +2 -2
  195. package/lib/component/panels/RangesPanel/RangesTableRow.js +2 -2
  196. package/lib/component/panels/RangesPanel/RangesTableRow.js.map +1 -1
  197. package/lib/component/panels/SpectraPanel/SpectraTable.d.ts.map +1 -1
  198. package/lib/component/panels/SpectraPanel/SpectraTable.js +5 -1
  199. package/lib/component/panels/SpectraPanel/SpectraTable.js.map +1 -1
  200. package/lib/component/panels/SpectraPanel/base/RenderAsHTML.d.ts.map +1 -1
  201. package/lib/component/panels/SpectraPanel/base/RenderAsHTML.js +7 -4
  202. package/lib/component/panels/SpectraPanel/base/RenderAsHTML.js.map +1 -1
  203. package/lib/component/panels/SpectraPanel/base/SpectrumName.d.ts.map +1 -1
  204. package/lib/component/panels/SpectraPanel/base/SpectrumName.js +5 -1
  205. package/lib/component/panels/SpectraPanel/base/SpectrumName.js.map +1 -1
  206. package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.d.ts.map +1 -1
  207. package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.js +2 -2
  208. package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.js.map +1 -1
  209. package/lib/component/panels/SummaryPanel/SummaryPanel.d.ts.map +1 -1
  210. package/lib/component/panels/SummaryPanel/SummaryPanel.js +7 -0
  211. package/lib/component/panels/SummaryPanel/SummaryPanel.js.map +1 -1
  212. package/lib/component/panels/filtersPanel/FilterPanel.d.ts.map +1 -1
  213. package/lib/component/panels/filtersPanel/FilterPanel.js +5 -2
  214. package/lib/component/panels/filtersPanel/FilterPanel.js.map +1 -1
  215. package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js +1 -1
  216. package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js.map +1 -1
  217. package/lib/component/panels/filtersPanel/processings_sections_panel.d.ts +2 -0
  218. package/lib/component/panels/filtersPanel/processings_sections_panel.d.ts.map +1 -0
  219. package/lib/component/panels/filtersPanel/processings_sections_panel.js +144 -0
  220. package/lib/component/panels/filtersPanel/processings_sections_panel.js.map +1 -0
  221. package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts +3 -2
  222. package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts.map +1 -1
  223. package/lib/component/panels/hooks/useMoleculeAnnotationCore.js +14 -8
  224. package/lib/component/panels/hooks/useMoleculeAnnotationCore.js.map +1 -1
  225. package/lib/component/panels/informationPanel/MixedValuesBadge.d.ts.map +1 -1
  226. package/lib/component/panels/informationPanel/MixedValuesBadge.js +2 -2
  227. package/lib/component/panels/informationPanel/MixedValuesBadge.js.map +1 -1
  228. package/lib/component/panels/informationPanel/SpectraPicker.d.ts.map +1 -1
  229. package/lib/component/panels/informationPanel/SpectraPicker.js +2 -2
  230. package/lib/component/panels/informationPanel/SpectraPicker.js.map +1 -1
  231. package/lib/component/reducer/Reducer.d.ts.map +1 -1
  232. package/lib/component/reducer/Reducer.js +2 -0
  233. package/lib/component/reducer/Reducer.js.map +1 -1
  234. package/lib/component/reducer/actions/CorrelationsActions.js +1 -1
  235. package/lib/component/reducer/actions/CorrelationsActions.js.map +1 -1
  236. package/lib/component/reducer/actions/DomainActions.d.ts.map +1 -1
  237. package/lib/component/reducer/actions/DomainActions.js.map +1 -1
  238. package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
  239. package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
  240. package/lib/component/reducer/actions/LoadAction.d.ts.map +1 -1
  241. package/lib/component/reducer/actions/LoadAction.js.map +1 -1
  242. package/lib/component/reducer/actions/MoleculeActions.d.ts +9 -0
  243. package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
  244. package/lib/component/reducer/actions/RangesActions.d.ts +11 -2
  245. package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
  246. package/lib/component/reducer/actions/RangesActions.js +23 -5
  247. package/lib/component/reducer/actions/RangesActions.js.map +1 -1
  248. package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
  249. package/lib/component/reducer/actions/ToolsActions.js +5 -17
  250. package/lib/component/reducer/actions/ToolsActions.js.map +1 -1
  251. package/lib/component/reducer/helper/getTraceSpectrumID.d.ts +5 -0
  252. package/lib/component/reducer/helper/getTraceSpectrumID.d.ts.map +1 -0
  253. package/lib/component/reducer/helper/getTraceSpectrumID.js +14 -0
  254. package/lib/component/reducer/helper/getTraceSpectrumID.js.map +1 -0
  255. package/lib/component/reducer/helper/setRangesViewProperty.d.ts.map +1 -1
  256. package/lib/component/reducer/helper/setRangesViewProperty.js.map +1 -1
  257. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts.map +1 -1
  258. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +35 -26
  259. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js.map +1 -1
  260. package/lib/component/reducer/preferences/preferencesReducer.d.ts +2 -2
  261. package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
  262. package/lib/component/reducer/preferences/utilities/initWorkspace.d.ts +2 -2
  263. package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts +2 -2
  264. package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts.map +1 -1
  265. package/lib/component/toolbar/ToolTypes.d.ts +2 -2
  266. package/lib/component/toolbar/nmr_toolbar.d.ts.map +1 -1
  267. package/lib/component/toolbar/nmr_toolbar.js +3 -1
  268. package/lib/component/toolbar/nmr_toolbar.js.map +1 -1
  269. package/lib/component/utility/CoreSlot.d.ts +27 -0
  270. package/lib/component/utility/CoreSlot.d.ts.map +1 -0
  271. package/lib/component/utility/CoreSlot.js +56 -0
  272. package/lib/component/utility/CoreSlot.js.map +1 -0
  273. package/lib/component/utility/export.d.ts.map +1 -1
  274. package/lib/component/utility/export.js +1 -0
  275. package/lib/component/utility/export.js.map +1 -1
  276. package/lib/data/PredictionManager.js.map +1 -1
  277. package/lib/data/constants/signalsKinds.d.ts +1 -2
  278. package/lib/data/constants/signalsKinds.d.ts.map +1 -1
  279. package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts.map +1 -1
  280. package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -0
  281. package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js.map +1 -1
  282. package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts.map +1 -1
  283. package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +35 -30
  284. package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js.map +1 -1
  285. package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.d.ts.map +1 -1
  286. package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.js +1 -0
  287. package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.js.map +1 -1
  288. package/lib/data/data1d/multipleSpectraAnalysis.d.ts +2 -2
  289. package/lib/data/matrixGeneration.d.ts.map +1 -1
  290. package/lib/data/matrixGeneration.js.map +1 -1
  291. package/lib/versionInfo.js +1 -1
  292. package/package.json +37 -37
  293. package/src/component/1d/PredictionErrorsNotations.tsx +5 -4
  294. package/src/component/1d/peaks/Peaks.tsx +5 -2
  295. package/src/component/1d/peaks/usePeakShapesPath.ts +0 -1
  296. package/src/component/1d/ranges/AssignmentLabel.tsx +1 -1
  297. package/src/component/1d/ranges/FloatingRangeTablePreferencesModal.tsx +238 -0
  298. package/src/component/1d/ranges/FloatingRanges.tsx +529 -0
  299. package/src/component/1d/ranges/Ranges.tsx +2 -2
  300. package/src/component/1d-2d/FieldEdition.tsx +4 -4
  301. package/src/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.tsx +8 -8
  302. package/src/component/1d-2d/tools/BrushXY.tsx +8 -8
  303. package/src/component/2d/1d-tracer/Left1DChart.tsx +24 -1
  304. package/src/component/2d/1d-tracer/Ranges1D.tsx +134 -0
  305. package/src/component/2d/1d-tracer/Signals1D.tsx +145 -0
  306. package/src/component/2d/1d-tracer/Top1DChart.tsx +29 -2
  307. package/src/component/2d/ft/FTContainer.tsx +1 -0
  308. package/src/component/2d/zones/SignalsGuideLines.tsx +1 -1
  309. package/src/component/2d/zones/ZonesAssignmentsLabels.tsx +1 -1
  310. package/src/component/AnchorSVG.tsx +370 -0
  311. package/src/component/EventsTrackers/BrushTracker.tsx +7 -2
  312. package/src/component/SVGTable.tsx +35 -33
  313. package/src/component/context/KeyModifierContext.tsx +6 -2
  314. package/src/component/context/LoggerContext.tsx +1 -7
  315. package/src/component/context/SortSpectraContext.tsx +1 -3
  316. package/src/component/elements/ActionsButtonsPopover.tsx +12 -14
  317. package/src/component/elements/Button.tsx +1 -6
  318. package/src/component/elements/DraggableDialog.tsx +1 -2
  319. package/src/component/elements/Sections.tsx +9 -7
  320. package/src/component/elements/TabTitle.tsx +7 -5
  321. package/src/component/elements/ToolbarPopoverItem.tsx +13 -2
  322. package/src/component/elements/dropDownButton/DropDownButton.tsx +7 -5
  323. package/src/component/elements/export/ExportOptionsModal.tsx +51 -280
  324. package/src/component/elements/export/units.ts +0 -6
  325. package/src/component/elements/export/utilities/getExportOptions.ts +1 -0
  326. package/src/component/elements/print/pageSize.ts +1 -1
  327. package/src/component/header/Header.tsx +2 -4
  328. package/src/component/hooks/useExport.tsx +1 -3
  329. package/src/component/hooks/usePanelPreferences.ts +4 -4
  330. package/src/component/hooks/useSaveSettings.tsx +4 -15
  331. package/src/component/hooks/useTextMetrics.ts +1 -0
  332. package/src/component/main/NMRiumViewer.tsx +1 -1
  333. package/src/component/modal/EditPeakShapeModal.tsx +2 -2
  334. package/src/component/modal/PublicationStringModal.tsx +5 -11
  335. package/src/component/modal/SaveAsModal.tsx +80 -82
  336. package/src/component/modal/aboutUs/AboutUsModal.tsx +5 -4
  337. package/src/component/modal/editRange/EditRangeModal.tsx +6 -4
  338. package/src/component/modal/editRange/forms/components/NewSignalTab.tsx +58 -58
  339. package/src/component/modal/setting/WorkspaceItem.tsx +2 -2
  340. package/src/component/modal/setting/tanstack_general_settings/errors/context.tsx +3 -3
  341. package/src/component/modal/setting/tanstack_general_settings/errors/renderer.tsx +2 -2
  342. package/src/component/modal/setting/tanstack_general_settings/general_settings.tsx +23 -29
  343. package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.tsx +2 -2
  344. package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.tsx +2 -2
  345. package/src/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.tsx +2 -2
  346. package/src/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.tsx +2 -2
  347. package/src/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.tsx +3 -2
  348. package/src/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.tsx +3 -2
  349. package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +41 -8
  350. package/src/component/panels/PeaksPanel/PeaksPanel.tsx +1 -8
  351. package/src/component/panels/PeaksPanel/PeaksPreferences.tsx +18 -18
  352. package/src/component/panels/PeaksPanel/PeaksTable.tsx +19 -17
  353. package/src/component/panels/RangesPanel/RangesHeader.tsx +1 -2
  354. package/src/component/panels/RangesPanel/RangesPanel.tsx +2 -2
  355. package/src/component/panels/RangesPanel/RangesPreferences.tsx +22 -22
  356. package/src/component/panels/RangesPanel/RangesTable.tsx +19 -17
  357. package/src/component/panels/RangesPanel/RangesTableRow.tsx +25 -25
  358. package/src/component/panels/SpectraPanel/SpectraTable.tsx +12 -1
  359. package/src/component/panels/SpectraPanel/base/RenderAsHTML.tsx +22 -4
  360. package/src/component/panels/SpectraPanel/base/SpectrumName.tsx +15 -6
  361. package/src/component/panels/SpectraPanel/base/setting/SpectrumSetting.tsx +3 -2
  362. package/src/component/panels/SummaryPanel/SummaryPanel.tsx +14 -16
  363. package/src/component/panels/filtersPanel/FilterPanel.tsx +10 -0
  364. package/src/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.tsx +1 -0
  365. package/src/component/panels/filtersPanel/processings_sections_panel.tsx +324 -0
  366. package/src/component/panels/hooks/useMoleculeAnnotationCore.ts +17 -9
  367. package/src/component/panels/informationPanel/MixedValuesBadge.tsx +3 -2
  368. package/src/component/panels/informationPanel/SpectraPicker.tsx +12 -4
  369. package/src/component/panels/multipleAnalysisPanel/AnalysisChart.tsx +2 -2
  370. package/src/component/reducer/Reducer.ts +2 -0
  371. package/src/component/reducer/actions/CorrelationsActions.ts +1 -1
  372. package/src/component/reducer/actions/DomainActions.ts +1 -4
  373. package/src/component/reducer/actions/FiltersActions.ts +1 -2
  374. package/src/component/reducer/actions/LoadAction.ts +1 -3
  375. package/src/component/reducer/actions/RangesActions.ts +39 -5
  376. package/src/component/reducer/actions/ToolsActions.ts +5 -21
  377. package/src/component/reducer/helper/getTraceSpectrumID.tsx +25 -0
  378. package/src/component/reducer/helper/setRangesViewProperty.ts +1 -2
  379. package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +32 -19
  380. package/src/component/reducer/preferences/preferencesReducer.ts +2 -2
  381. package/src/component/reducer/preferences/utilities/initWorkspace.ts +2 -2
  382. package/src/component/reducer/preferences/utilities/mapWorkspaces.ts +2 -2
  383. package/src/component/toolbar/ToolTypes.ts +2 -2
  384. package/src/component/toolbar/nmr_toolbar.tsx +3 -2
  385. package/src/component/utility/CoreSlot.tsx +126 -0
  386. package/src/component/utility/export.ts +1 -0
  387. package/src/data/PredictionManager.ts +4 -6
  388. package/src/data/constants/signalsKinds.ts +1 -1
  389. package/src/data/data1d/Spectrum1D/peaks/autoPeakPicking.ts +1 -0
  390. package/src/data/data1d/Spectrum1D/peaks/optimizePeaks.ts +35 -30
  391. package/src/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.ts +1 -0
  392. package/src/data/data1d/multipleSpectraAnalysis.ts +2 -2
  393. package/src/data/matrixGeneration.ts +1 -5
  394. package/src/versionInfo.ts +1 -1
  395. package/lib/component/1d/FloatingRanges.d.ts.map +0 -1
  396. package/lib/component/1d/FloatingRanges.js +0 -263
  397. package/lib/component/1d/FloatingRanges.js.map +0 -1
  398. package/lib/component/elements/export/utilities/exportOptionValidationSchema.d.ts +0 -17
  399. package/lib/component/elements/export/utilities/exportOptionValidationSchema.d.ts.map +0 -1
  400. package/lib/component/elements/export/utilities/exportOptionValidationSchema.js +0 -79
  401. package/lib/component/elements/export/utilities/exportOptionValidationSchema.js.map +0 -1
  402. package/lib/component/elements/export/utilities/getModes.d.ts +0 -4
  403. package/lib/component/elements/export/utilities/getModes.d.ts.map +0 -1
  404. package/lib/component/elements/export/utilities/getModes.js +0 -11
  405. package/lib/component/elements/export/utilities/getModes.js.map +0 -1
  406. package/lib/component/utility/renderCoreSlot.d.ts +0 -11
  407. package/lib/component/utility/renderCoreSlot.d.ts.map +0 -1
  408. package/lib/component/utility/renderCoreSlot.js +0 -13
  409. package/lib/component/utility/renderCoreSlot.js.map +0 -1
  410. package/src/component/1d/FloatingRanges.tsx +0 -378
  411. package/src/component/elements/export/utilities/exportOptionValidationSchema.ts +0 -106
  412. package/src/component/elements/export/utilities/getModes.ts +0 -14
  413. package/src/component/utility/renderCoreSlot.tsx +0 -21
  414. /package/lib/component/1d/{FloatingRanges.d.ts → ranges/FloatingRanges.d.ts} +0 -0
@@ -1,8 +1,10 @@
1
- import type { ElementDropTargetEventBasePayload } from '@atlaskit/pragmatic-drag-and-drop/dist/types/adapter/element-adapter.js';
2
- import type { ElementDragPayload } from '@atlaskit/pragmatic-drag-and-drop/dist/types/internal-types.js';
3
- import type { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
4
1
  import { Colors, Icon, Tag } from '@blueprintjs/core';
5
2
  import styled from '@emotion/styled';
3
+ import type {
4
+ Edge,
5
+ ElementDragPayload,
6
+ ElementDropTargetEventBasePayload,
7
+ } from '@zakodium/pdnd-esm';
6
8
  import {
7
9
  attachClosestEdge,
8
10
  combine,
@@ -205,7 +207,7 @@ const InnerHeader = styled.div`
205
207
  `;
206
208
 
207
209
  interface BaseSectionProps {
208
- title: string;
210
+ title: ReactNode;
209
211
  serial?: number;
210
212
  rightElement?: ReactNode | ((isOpen: boolean) => ReactNode);
211
213
  leftElement?: ReactNode | ((isOpen: boolean) => ReactNode);
@@ -214,14 +216,14 @@ interface BaseSectionProps {
214
216
  }
215
217
 
216
218
  interface SectionItemProps extends BaseSectionProps {
217
- id?: string;
219
+ id: string;
218
220
  index?: number;
219
221
  onClick?: (id: any, event?: MouseEvent<HTMLDivElement>) => void;
220
222
  children?: ReactNode | ((options: { isOpen?: boolean }) => ReactNode);
221
223
  isOpen: boolean;
222
224
  sticky?: boolean;
223
225
  onReorder?: (sourceId: number, targetId: number) => void;
224
- dragLabel?: string;
226
+ dragLabel?: ReactNode;
225
227
  }
226
228
 
227
229
  interface SectionProps {
@@ -269,7 +271,7 @@ function SectionItem(props: SectionItemProps) {
269
271
  const {
270
272
  title,
271
273
  dragLabel = title,
272
- id = title,
274
+ id,
273
275
  onClick,
274
276
  serial,
275
277
  rightElement,
@@ -1,5 +1,5 @@
1
1
  import type { ButtonProps } from '@blueprintjs/core';
2
- import { Button, Popover } from '@blueprintjs/core';
2
+ import { Button, PopoverNext } from '@blueprintjs/core';
3
3
  import styled from '@emotion/styled';
4
4
  import type { MouseEvent, ReactNode } from 'react';
5
5
 
@@ -17,10 +17,12 @@ export function TabTitle(props: TabTitleProps) {
17
17
  }
18
18
 
19
19
  return (
20
- <Popover
21
- minimal
20
+ <PopoverNext
21
+ lazy
22
+ arrow={false}
23
+ animation="minimal"
22
24
  popoverClassName="popover-tab"
23
- position="top-left"
25
+ placement="top-start"
24
26
  interactionKind="hover"
25
27
  enforceFocus={false}
26
28
  disabled={typeof onDelete !== 'function'}
@@ -35,7 +37,7 @@ export function TabTitle(props: TabTitleProps) {
35
37
  }
36
38
  >
37
39
  {children}
38
- </Popover>
40
+ </PopoverNext>
39
41
  );
40
42
  }
41
43
 
@@ -29,6 +29,7 @@ interface CustomToolbarPopoverItemProps<T = object>
29
29
  itemProps?: Omit<ToolbarItemProps, 'onClick' | 'disabled'>;
30
30
  options: Array<ToolbarPopoverMenuItem<T> | ToolbarPopoverMenuDivider>;
31
31
  onClick?: (data?: T) => void;
32
+ stopParentClick?: boolean;
32
33
  }
33
34
 
34
35
  export function ToolbarPopoverItem<T = object>(
@@ -36,7 +37,7 @@ export function ToolbarPopoverItem<T = object>(
36
37
  ) {
37
38
  const {
38
39
  options,
39
- onClick: onClickHandler,
40
+ onClick: onParentClick,
40
41
  icon,
41
42
  tooltip,
42
43
  tooltipProps,
@@ -44,6 +45,7 @@ export function ToolbarPopoverItem<T = object>(
44
45
  id,
45
46
  itemProps,
46
47
  disabled,
48
+ stopParentClick = false,
47
49
  ...otherPopoverItemProps
48
50
  } = props;
49
51
 
@@ -68,6 +70,7 @@ export function ToolbarPopoverItem<T = object>(
68
70
  tooltipProps,
69
71
  disabled,
70
72
  menuItemType,
73
+ onClick,
71
74
  ...otherOptions
72
75
  } = option;
73
76
  return (
@@ -102,7 +105,15 @@ export function ToolbarPopoverItem<T = object>(
102
105
  text={text}
103
106
  {...otherOptions}
104
107
  disabled={disabled}
105
- onClick={() => !disabled && onClickHandler?.(data)}
108
+ onClick={(e) => {
109
+ if (disabled) return;
110
+
111
+ onClick?.(e);
112
+
113
+ if (!stopParentClick) {
114
+ onParentClick?.(data);
115
+ }
116
+ }}
106
117
  />
107
118
  </span>
108
119
  )}
@@ -1,4 +1,4 @@
1
- import { Button, Popover } from '@blueprintjs/core';
1
+ import { Button, PopoverNext } from '@blueprintjs/core';
2
2
  import styled from '@emotion/styled';
3
3
  import type { CSSProperties, ReactNode } from 'react';
4
4
  import { useEffect, useState } from 'react';
@@ -59,12 +59,14 @@ function DropDownButton<T extends DropDownListItem>(
59
59
  }
60
60
 
61
61
  return (
62
- <Popover
62
+ <PopoverNext
63
+ lazy
63
64
  isOpen={open}
64
65
  onClose={() => setOpen(false)}
65
66
  className={className}
66
- minimal
67
- position="bottom"
67
+ arrow={false}
68
+ animation="minimal"
69
+ placement="bottom"
68
70
  content={
69
71
  <DropDownList
70
72
  data={data}
@@ -80,7 +82,7 @@ function DropDownButton<T extends DropDownListItem>(
80
82
  >
81
83
  {!item ? <FaEllipsisH /> : formatSelectedValue(item)}
82
84
  </PopoverButton>
83
- </Popover>
85
+ </PopoverNext>
84
86
  );
85
87
  }
86
88
 
@@ -1,45 +1,19 @@
1
- import {
2
- Button,
3
- DialogFooter,
4
- Radio,
5
- RadioGroup,
6
- SegmentedControl,
7
- Tag,
8
- } from '@blueprintjs/core';
9
- import { yupResolver } from '@hookform/resolvers/yup';
10
- import type {
11
- AdvanceExportSettings,
12
- BasicExportSettings,
13
- ExportSettings,
14
- } from '@zakodium/nmrium-core';
15
- import { useEffect, useState } from 'react';
16
- import { Controller, useForm } from 'react-hook-form';
1
+ import { DialogFooter } from '@blueprintjs/core';
2
+ import { useMemo } from 'react';
3
+ import { AppForm, Button, useForm } from 'react-science/ui';
4
+ import { z } from 'zod/v4';
17
5
 
18
- import ActionButtons from '../ActionButtons.js';
19
- import { CheckController } from '../CheckController.js';
20
- import type { LabelStyle } from '../Label.js';
21
- import Label from '../Label.js';
22
- import { NumberInput2Controller } from '../NumberInput2Controller.js';
23
- import { Select2Controller } from '../Select2Controller.js';
6
+ import { ExportFields } from '../../modal/setting/tanstack_general_settings/tabs/export_tab.fields.tsx';
7
+ import { exportSettingsValidation } from '../../modal/setting/tanstack_general_settings/validation/export_tab_validation.ts';
24
8
  import { StandardDialog } from '../StandardDialog.tsx';
25
- import { StyledDialogBody } from '../StyledDialogBody.js';
26
- import type { SizeItem } from '../print/pageSize.js';
27
- import { getSizesList } from '../print/pageSize.js';
9
+ import { StyledDialogBody } from '../StyledDialogBody.tsx';
28
10
 
29
11
  import type { BaseExportProps } from './ExportContent.js';
30
- import { units } from './units.js';
31
- import { useExportConfigurer } from './useExportConfigurer.js';
32
- import { exportOptionValidationSchema } from './utilities/exportOptionValidationSchema.js';
33
- import {
34
- getExportDefaultOptions,
35
- getExportDefaultOptionsByMode,
36
- } from './utilities/getExportOptions.js';
37
- import type { Mode } from './utilities/getModes.js';
38
- import { MODES } from './utilities/getModes.js';
12
+ import { getExportDefaultOptions } from './utilities/getExportOptions.ts';
39
13
 
40
14
  interface InnerExportOptionsModalProps extends BaseExportProps {
41
15
  onCloseDialog: () => void;
42
- confirmButtonText?: string;
16
+ confirmButtonText: string;
43
17
  }
44
18
  interface ExportOptionsModalProps extends InnerExportOptionsModalProps {
45
19
  isOpen: boolean;
@@ -53,101 +27,36 @@ export function ExportOptionsModal(props: ExportOptionsModalProps) {
53
27
  return <InnerExportOptionsModal {...otherProps} />;
54
28
  }
55
29
 
56
- const labelStyle: LabelStyle = {
57
- label: {
58
- color: '#232323',
59
- width: '80px',
60
- },
61
- wrapper: {
62
- display: 'flex',
63
- justifyContent: 'flex-start',
64
- },
65
- container: { margin: '5px 0' },
66
- };
30
+ const validator = z.object({
31
+ values: exportSettingsValidation,
32
+ });
67
33
 
68
34
  function InnerExportOptionsModal(props: InnerExportOptionsModalProps) {
69
35
  const {
70
36
  onCloseDialog,
71
- onExportOptionsChange,
72
37
  confirmButtonText,
73
38
  defaultExportOptions,
39
+ onExportOptionsChange,
74
40
  } = props;
75
- const defaultValues = getExportDefaultOptions(defaultExportOptions);
76
-
77
- const [mode, setMode] = useState<Mode>(defaultValues.mode);
78
41
 
79
- const methods = useForm<ExportSettings>({
80
- defaultValues,
81
- resolver: yupResolver(exportOptionValidationSchema as any),
42
+ const values = useMemo(() => {
43
+ return exportSettingsValidation.encode(
44
+ getExportDefaultOptions(defaultExportOptions),
45
+ );
46
+ }, [defaultExportOptions]);
47
+
48
+ const form = useForm({
49
+ defaultValues: {
50
+ values,
51
+ },
52
+ validators: {
53
+ onDynamic: validator,
54
+ },
55
+ onSubmit: ({ value: { values } }) => {
56
+ const parsedValues = exportSettingsValidation.parse(values);
57
+ onExportOptionsChange(parsedValues);
58
+ },
82
59
  });
83
- const {
84
- handleSubmit,
85
- control,
86
- watch,
87
- setValue,
88
- formState: { isValid, errors },
89
- reset,
90
- setFocus,
91
- } = methods;
92
-
93
- const watchSettings = watch();
94
- const {
95
- unit,
96
- dpi = 0,
97
- layout,
98
- } = watchSettings as AdvanceExportSettings & BasicExportSettings;
99
- const {
100
- widthInPixel,
101
- heightInPixel,
102
- isAspectRatioEnabled,
103
- changeDPI,
104
- enableAspectRatio,
105
- changeSize,
106
- changeUnit,
107
- } = useExportConfigurer(watchSettings);
108
-
109
- let sizesList: SizeItem[] = [];
110
-
111
- if (layout) {
112
- sizesList = getSizesList(layout);
113
- }
114
-
115
- function handleChangeMode(mode: any) {
116
- const options = defaultValues;
117
- setMode(mode);
118
- if (options.mode === mode) {
119
- reset(defaultValues);
120
- } else {
121
- reset(getExportDefaultOptionsByMode(mode));
122
- }
123
- }
124
-
125
- useEffect(() => {
126
- const handleRenderComplete = () => {
127
- setTimeout(() => {
128
- if (mode === 'advance') {
129
- setFocus('width');
130
- } else {
131
- setFocus('dpi');
132
- }
133
- }, 0);
134
- };
135
-
136
- const handleKeyDown = (event: globalThis.KeyboardEvent) => {
137
- if (event.key === 'Enter') {
138
- void handleSubmit(onExportOptionsChange)();
139
- }
140
- };
141
-
142
- globalThis.addEventListener('keydown', handleKeyDown);
143
-
144
- const animationFrameId = requestAnimationFrame(handleRenderComplete);
145
-
146
- return () => {
147
- cancelAnimationFrame(animationFrameId);
148
- globalThis.removeEventListener('keydown', handleKeyDown);
149
- };
150
- }, [handleSubmit, mode, onExportOptionsChange, setFocus]);
151
60
 
152
61
  return (
153
62
  <StandardDialog
@@ -158,165 +67,27 @@ function InnerExportOptionsModal(props: InnerExportOptionsModalProps) {
158
67
  canEscapeKeyClose
159
68
  autoFocus
160
69
  >
161
- <StyledDialogBody>
162
- <div
163
- style={{
164
- display: 'flex',
165
- justifyContent: 'center',
166
- marginBottom: '15px',
167
- }}
168
- >
169
- <SegmentedControl
170
- defaultValue="list"
171
- inline
172
- options={MODES}
173
- value={mode}
174
- onValueChange={handleChangeMode}
175
- />
176
- </div>
177
-
178
- <Label style={labelStyle} title="Description:">
179
- <Tag
180
- intent={
181
- !isValid && Object.keys(errors).length > 0 ? 'danger' : 'none'
182
- }
183
- >{`${widthInPixel} px x ${heightInPixel} px @ ${dpi}DPI`}</Tag>
184
- </Label>
185
- {mode === 'basic' && (
186
- <>
187
- <Label style={labelStyle} title="Size">
188
- <Select2Controller
189
- control={control}
190
- name="size"
191
- items={sizesList}
192
- />
193
- </Label>
194
- <Label style={labelStyle} title="Layout">
195
- <Controller
196
- name="layout"
197
- control={control}
198
- render={({ field }) => {
199
- const { value, ref, ...otherFieldProps } = field;
200
- return (
201
- <RadioGroup
202
- inline
203
- selectedValue={value}
204
- {...otherFieldProps}
205
- >
206
- <Radio label="Portrait" value="portrait" />
207
- <Radio label="Landscape" value="landscape" />
208
- </RadioGroup>
209
- );
210
- }}
211
- />
212
- </Label>
213
- </>
214
- )}
215
- {mode === 'advance' && (
216
- <>
217
- <Label style={labelStyle} title="Size">
218
- <div style={{ display: 'flex', flexDirection: 'row' }}>
219
- <NumberInput2Controller
220
- name="width"
221
- control={control}
222
- style={{ width: 100 }}
223
- rightElement={<Tag>{unit}</Tag>}
224
- controllerProps={{ rules: { required: true } }}
225
- transformValue={(value) => {
226
- const newHeight = changeSize(value, 'height', 'width');
227
- setValue('height', newHeight);
228
- return value;
229
- }}
230
- debounceTime={250}
231
- placeholder="width"
232
- />
233
- <div style={{ padding: '0px 5px' }}>
234
- <Button
235
- icon="link"
236
- variant="minimal"
237
- active={isAspectRatioEnabled}
238
- onClick={() => {
239
- enableAspectRatio((prevFlag) => !prevFlag);
240
- }}
241
- />
242
- </div>
243
- <NumberInput2Controller
244
- name="height"
245
- control={control}
246
- style={{ width: 100 }}
247
- rightElement={<Tag>{unit}</Tag>}
248
- controllerProps={{ rules: { required: true } }}
249
- transformValue={(value) => {
250
- const newWidth = changeSize(value, 'width', 'height');
251
- setValue('width', newWidth);
252
- return value;
253
- }}
254
- debounceTime={250}
255
- placeholder="height"
256
- />
257
- </div>
258
- </Label>
259
- <Label style={labelStyle} title="Units">
260
- <Select2Controller
261
- control={control}
262
- name="unit"
263
- itemTextKey="name"
264
- itemValueKey="unit"
265
- items={units}
266
- onItemSelect={({ unit }) => {
267
- const newSize = changeUnit({ unit });
268
- setValue('width', newSize.width);
269
- setValue('height', newSize.height);
270
- }}
271
- />
272
- </Label>
273
- </>
274
- )}
275
- <Label style={labelStyle} title="DPI">
276
- <NumberInput2Controller
277
- name="dpi"
278
- control={control}
279
- style={{ width: 100 }}
280
- controllerProps={{ rules: { required: true } }}
281
- transformValue={(value) => {
282
- if (unit === 'px') {
283
- const convertedValue = changeDPI(value);
284
- setValue('width', convertedValue.width);
285
- setValue('height', convertedValue.height);
286
- }
287
-
288
- return value;
289
- }}
290
- debounceTime={250}
291
- placeholder="DPI"
292
- />
293
- </Label>
294
- </StyledDialogBody>
295
- <DialogFooter>
296
- <div
297
- style={{
298
- display: 'flex',
299
- justifyContent: 'space-between',
300
- alignItems: 'baseline',
301
- }}
302
- >
303
- <CheckController
304
- control={control}
305
- name="useDefaultSettings"
306
- style={{ fontSize: '12px' }}
307
- label="Don't show options dialog next time and use those settings"
308
- />
309
-
310
- <ActionButtons
311
- style={{ flexDirection: 'row-reverse', margin: 0 }}
312
- onDone={() => {
313
- void handleSubmit(onExportOptionsChange)();
314
- }}
315
- doneLabel={confirmButtonText}
316
- onCancel={() => onCloseDialog?.()}
317
- />
318
- </div>
319
- </DialogFooter>
70
+ <AppForm form={form} layout="inline">
71
+ <StyledDialogBody>
72
+ <ExportFields form={form} fields="values" />
73
+ </StyledDialogBody>
74
+ <DialogFooter
75
+ actions={
76
+ <>
77
+ <Button
78
+ variant="outlined"
79
+ intent="danger"
80
+ onClick={() => onCloseDialog?.()}
81
+ >
82
+ Cancel
83
+ </Button>
84
+ <form.SubmitButton intent="success">
85
+ {confirmButtonText}
86
+ </form.SubmitButton>
87
+ </>
88
+ }
89
+ />
90
+ </AppForm>
320
91
  </StandardDialog>
321
92
  );
322
93
  }
@@ -1,13 +1,7 @@
1
1
  import type { Unit } from '@zakodium/nmrium-core';
2
- import { units as baseUnits } from '@zakodium/nmrium-core';
3
2
 
4
3
  import { roundNumber } from '../../utility/roundNumber.js';
5
4
 
6
- export const units = baseUnits.map((unit) => ({
7
- ...unit,
8
- name: unit.name[0].toUpperCase() + unit.name.slice(1),
9
- }));
10
-
11
5
  const conversionFactors: Record<Unit, number> = {
12
6
  in: 1, // inches
13
7
  ft: 12, // 1 foot = 12 inches
@@ -50,6 +50,7 @@ export function getExportDefaultOptions(options?: ExportSettings) {
50
50
 
51
51
  return options || INITIAL_ADVANCE_EXPORT_OPTIONS;
52
52
  }
53
+
53
54
  export function getExportDefaultOptionsByMode(mode: 'basic' | 'advance') {
54
55
  if (mode === 'basic') {
55
56
  return INITIAL_BASIC_EXPORT_OPTIONS;
@@ -70,7 +70,7 @@ export const pageSizes: PageSize[] = [
70
70
  },
71
71
  ];
72
72
 
73
- export interface SizeItem {
73
+ interface SizeItem {
74
74
  label: string;
75
75
  value: PageSizeName;
76
76
  }
@@ -10,7 +10,6 @@ import { Toolbar, useFullscreen } from 'react-science/ui';
10
10
 
11
11
  import { docsBaseUrl } from '../../constants.js';
12
12
  import { useChartData } from '../context/ChartContext.js';
13
- import { useCore } from '../context/CoreContext.js';
14
13
  import {
15
14
  usePreferences,
16
15
  useWorkspacesList,
@@ -28,7 +27,7 @@ import AboutUsModal from '../modal/aboutUs/AboutUsModal.js';
28
27
  import WorkspaceItem from '../modal/setting/WorkspaceItem.js';
29
28
  import { GeneralSettingsToolbarItem } from '../modal/setting/general_settings.js';
30
29
  import { options } from '../toolbar/ToolTypes.js';
31
- import { renderCoreSlot } from '../utility/renderCoreSlot.js';
30
+ import { CoreSlot } from '../utility/CoreSlot.tsx';
32
31
 
33
32
  import { AutoPeakPickingOptionPanel } from './AutoPeakPickingOptionPanel.js';
34
33
  import { HeaderWrapper } from './HeaderWrapper.js';
@@ -63,7 +62,6 @@ interface HeaderInnerProps {
63
62
 
64
63
  function HeaderInner(props: HeaderInnerProps) {
65
64
  const { selectedOptionPanel, height } = props;
66
- const core = useCore();
67
65
 
68
66
  const {
69
67
  current: {
@@ -149,7 +147,7 @@ function HeaderInner(props: HeaderInnerProps) {
149
147
  }}
150
148
  >
151
149
  <PluginTopBarRight>
152
- {renderCoreSlot(core, 'topbar.right')}
150
+ <CoreSlot slot="topbar.right" />
153
151
  </PluginTopBarRight>
154
152
 
155
153
  {!hideWorkspaces && (
@@ -13,9 +13,7 @@ import { saveAs } from '../utility/save_as.js';
13
13
  import { useCreateNmriumZip } from './useCreateNmriumZip.ts';
14
14
 
15
15
  type DataType =
16
- | 'NO_DATA'
17
- | 'SELF_CONTAINED'
18
- | 'SELF_CONTAINED_EXTERNAL_DATASOURCE';
16
+ 'NO_DATA' | 'SELF_CONTAINED' | 'SELF_CONTAINED_EXTERNAL_DATASOURCE';
19
17
 
20
18
  export interface SaveIncludeOptions {
21
19
  settings: boolean;
@@ -2,8 +2,8 @@ import type {
2
2
  MatrixGenerationOptions,
3
3
  MultipleSpectraAnalysisPreferences,
4
4
  PanelsPreferences,
5
- WorkSpacePanelPreferences,
6
5
  Workspace,
6
+ WorkspacePanelPreferences,
7
7
  } from '@zakodium/nmrium-core';
8
8
  import has from 'lodash/has.js';
9
9
  import { useMemo } from 'react';
@@ -128,15 +128,15 @@ export function usePanelPreferences<T extends Panel>(
128
128
  ? MatrixGenerationOptions
129
129
  : T extends 'multipleSpectraAnalysis'
130
130
  ? MultipleSpectraAnalysisPreferences
131
- : WorkSpacePanelPreferences[T];
131
+ : WorkspacePanelPreferences[T];
132
132
  export function usePanelPreferences<T extends 'database' | 'prediction'>(
133
133
  panelKey: T,
134
- ): WorkSpacePanelPreferences[T];
134
+ ): WorkspacePanelPreferences[T];
135
135
 
136
136
  export function usePanelPreferences<T extends Panel>(
137
137
  panelKey: T,
138
138
  nucleus?: string,
139
- ): WorkSpacePanelPreferences[T] {
139
+ ): WorkspacePanelPreferences[T] {
140
140
  const { current } = usePreferences();
141
141
  return useMemo(() => {
142
142
  return getPanelPreferences(current, panelKey, nucleus);
@@ -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
  },