nmrium 0.36.0 → 0.38.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 (411) hide show
  1. package/lib/component/1d/FooterBanner.js +1 -1
  2. package/lib/component/1d/Viewer1D.js +26 -21
  3. package/lib/component/1d/integral/Integral.d.ts +2 -6
  4. package/lib/component/1d/integral/IntegralResizable.d.ts +2 -6
  5. package/lib/component/1d/integral/IntegralResizable.js +2 -3
  6. package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
  7. package/lib/component/1d/multiplicityTree/MultiplicityTree.js +7 -9
  8. package/lib/component/1d/peaks/PeakAnnotation.js +1 -2
  9. package/lib/component/1d/ranges/Range.js +9 -8
  10. package/lib/component/1d/ranges/Ranges.js +5 -7
  11. package/lib/component/1d/tool/BaseLineZones.js +1 -2
  12. package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +4 -5
  13. package/lib/component/1d-2d/components/FloatMoleculeStructures/index.js +13 -17
  14. package/lib/component/2d/1d-tracer/Left1DChart.js +1 -1
  15. package/lib/component/2d/1d-tracer/VerticalSliceChart.js +1 -1
  16. package/lib/component/2d/Chart2D.js +1 -1
  17. package/lib/component/2d/Viewer2D.js +10 -9
  18. package/lib/component/2d/fid/FidCanvas.js +4 -6
  19. package/lib/component/2d/ft/Contours.js +1 -7
  20. package/lib/component/2d/utilities/DimensionLayout.d.ts +9 -24
  21. package/lib/component/2d/utilities/scale.d.ts +2 -1
  22. package/lib/component/2d/utilities/scale.js +1 -1
  23. package/lib/component/2d/zones/Zones.js +1 -1
  24. package/lib/component/EventsTrackers/KeysListenerTracker.js +28 -21
  25. package/lib/component/NMRium.d.ts +2 -0
  26. package/lib/component/NMRium.js +22 -15
  27. package/lib/component/assignment/AssignmentsReducer.d.ts +1 -1
  28. package/lib/component/context/DispatchContext.d.ts +23 -3
  29. package/lib/component/context/DispatchContext.js +1 -1
  30. package/lib/component/context/LoggerContext.js +1 -1
  31. package/lib/component/elements/Button.js +7 -9
  32. package/lib/component/elements/IsotopesViewer.js +1 -1
  33. package/lib/component/elements/ReactTable/ReactTable.js +1 -2
  34. package/lib/component/elements/RemoveAssignmentsButton.d.ts +4 -0
  35. package/lib/component/{panels/RangesPanel/TableColumns → elements}/RemoveAssignmentsButton.js +14 -1
  36. package/lib/component/elements/formik/FormikCheckBox.js +1 -1
  37. package/lib/component/elements/formik/FormikColorInput.js +1 -1
  38. package/lib/component/elements/formik/FormikColorPicker.js +1 -1
  39. package/lib/component/elements/formik/FormikColumnFormatField.js +1 -1
  40. package/lib/component/elements/formik/FormikInput.js +1 -1
  41. package/lib/component/elements/formik/FormikSelect.js +2 -2
  42. package/lib/component/elements/formik/FormikSlider.js +1 -1
  43. package/lib/component/elements/formik/FormikTextarea.js +2 -2
  44. package/lib/component/header/ApodizationOptionsPanel.js +4 -5
  45. package/lib/component/header/AutoPeakPickingOptionPanel.js +1 -2
  46. package/lib/component/header/BaseLineCorrectionPanel.js +4 -5
  47. package/lib/component/header/Header.js +5 -7
  48. package/lib/component/header/PhaseCorrectionPanel.js +7 -8
  49. package/lib/component/header/RangesPickingOptionPanel.js +1 -2
  50. package/lib/component/header/ZeroFillingOptionsPanel.js +3 -11
  51. package/lib/component/header/Zones2DOptionPanel.js +5 -6
  52. package/lib/component/hooks/useExport.js +1 -0
  53. package/lib/component/hooks/useToolsFunctions.js +8 -10
  54. package/lib/component/loader/DropZone.js +4 -5
  55. package/lib/component/loader/NoData.js +1 -1
  56. package/lib/component/modal/AboutPredictionModal.d.ts +2 -0
  57. package/lib/component/modal/AboutPredictionModal.js +49 -0
  58. package/lib/component/modal/AlignSpectraModal.js +1 -2
  59. package/lib/component/modal/EditPeakShapeModal.js +1 -2
  60. package/lib/component/modal/ImportPublicationStringModal.js +1 -2
  61. package/lib/component/modal/LoadJCAMPModal.js +2 -3
  62. package/lib/component/modal/MoleculeStructureEditorModal.js +24 -19
  63. package/lib/component/modal/PredictSpectraModal.js +24 -21
  64. package/lib/component/modal/changeSum/SelectMolecule.js +1 -1
  65. package/lib/component/modal/editRange/EditRangeModal.js +3 -4
  66. package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +2 -2
  67. package/lib/component/modal/editRange/forms/components/CouplingsTable.js +1 -1
  68. package/lib/component/modal/metaImportation/MetaImportationModal.js +2 -3
  69. package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js +4 -4
  70. package/lib/component/modal/setting/settings-tabs/FormattingTabContent.js +2 -2
  71. package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.js +2 -2
  72. package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +1 -2
  73. package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +7 -6
  74. package/lib/component/panels/InformationPanel.js +6 -6
  75. package/lib/component/panels/IntegralsPanel/IntegralPanel.js +11 -20
  76. package/lib/component/panels/IntegralsPanel/IntegralTable.js +27 -23
  77. package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +8 -5
  78. package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +1 -1
  79. package/lib/component/panels/MatrixGenerationPanel/FiltersOptions.js +4 -4
  80. package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -2
  81. package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +1 -2
  82. package/lib/component/panels/MoleculesPanel/MoleculePanel.js +10 -13
  83. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +1 -0
  84. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +7 -7
  85. package/lib/component/panels/MoleculesPanel/Utilities.d.ts +4 -1
  86. package/lib/component/panels/MoleculesPanel/Utilities.js +2 -2
  87. package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +8 -9
  88. package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +3 -4
  89. package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +1 -2
  90. package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
  91. package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js +2 -2
  92. package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +1 -1
  93. package/lib/component/panels/Panels.js +1 -1
  94. package/lib/component/panels/PeaksPanel/PeaksPanel.js +4 -5
  95. package/lib/component/panels/PeaksPanel/PeaksTable.js +4 -5
  96. package/lib/component/panels/RangesPanel/RangesHeader.js +12 -15
  97. package/lib/component/panels/RangesPanel/RangesPanel.js +24 -29
  98. package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +0 -1
  99. package/lib/component/panels/RangesPanel/RangesTableRow.js +0 -11
  100. package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -3
  101. package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -3
  102. package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +2 -3
  103. package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -2
  104. package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.d.ts +1 -1
  105. package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +16 -14
  106. package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +16 -16
  107. package/lib/component/panels/SpectrumsPanel/SpectraPreferences.js +2 -2
  108. package/lib/component/panels/SpectrumsPanel/SpectraTable.js +7 -5
  109. package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +4 -5
  110. package/lib/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -7
  111. package/lib/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +1 -1
  112. package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +4 -2
  113. package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -2
  114. package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -8
  115. package/lib/component/panels/SummaryPanel/SummaryPanel.js +39 -34
  116. package/lib/component/panels/SummaryPanel/utilities/Utilities.js +1 -1
  117. package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.d.ts +2 -21
  118. package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +22 -20
  119. package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.d.ts +4 -5
  120. package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +12 -16
  121. package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.d.ts +3 -7
  122. package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +2 -2
  123. package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.d.ts +2 -2
  124. package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +6 -7
  125. package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.d.ts +4 -5
  126. package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +27 -19
  127. package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.d.ts +3 -7
  128. package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +2 -2
  129. package/lib/component/panels/ZonesPanel/ZonesPanel.js +15 -18
  130. package/lib/component/panels/ZonesPanel/ZonesTable.js +2 -51
  131. package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +3 -3
  132. package/lib/component/panels/ZonesPanel/ZonesTableRow.js +2 -22
  133. package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts +16 -0
  134. package/lib/component/panels/ZonesPanel/hooks/useMapZones.js +52 -0
  135. package/lib/component/panels/databasePanel/DatabasePanel.js +9 -7
  136. package/lib/component/panels/filtersPanel/FilterPanel.js +1 -2
  137. package/lib/component/panels/filtersPanel/FiltersTable.js +8 -9
  138. package/lib/component/panels/header/DefaultPanelHeader.js +1 -1
  139. package/lib/component/panels/header/SpectraAutomaticPickingButton.js +2 -3
  140. package/lib/component/panels/predictionPanel/PredictionPanel.js +10 -6
  141. package/lib/component/reducer/IgnoreActions.d.ts +2 -1
  142. package/lib/component/reducer/IgnoreActions.js +35 -32
  143. package/lib/component/reducer/Reducer.d.ts +8 -5
  144. package/lib/component/reducer/Reducer.js +199 -221
  145. package/lib/component/reducer/actions/AssignmentsActions.d.ts +7 -6
  146. package/lib/component/reducer/actions/AssignmentsActions.js +2 -2
  147. package/lib/component/reducer/actions/CorrelationsActions.d.ts +21 -13
  148. package/lib/component/reducer/actions/CorrelationsActions.js +25 -20
  149. package/lib/component/reducer/actions/DatabaseActions.d.ts +15 -2
  150. package/lib/component/reducer/actions/DatabaseActions.js +5 -2
  151. package/lib/component/reducer/actions/DimensionsActions.d.ts +8 -3
  152. package/lib/component/reducer/actions/DimensionsActions.js +3 -5
  153. package/lib/component/reducer/actions/DomainActions.d.ts +11 -5
  154. package/lib/component/reducer/actions/DomainActions.js +13 -19
  155. package/lib/component/reducer/actions/FiltersActions.d.ts +70 -23
  156. package/lib/component/reducer/actions/FiltersActions.js +250 -255
  157. package/lib/component/reducer/actions/GlobalActions.d.ts +7 -2
  158. package/lib/component/reducer/actions/GlobalActions.js +3 -3
  159. package/lib/component/reducer/actions/IntegralsActions.d.ts +28 -7
  160. package/lib/component/reducer/actions/IntegralsActions.js +16 -15
  161. package/lib/component/reducer/actions/LoadActions.d.ts +23 -5
  162. package/lib/component/reducer/actions/LoadActions.js +65 -57
  163. package/lib/component/reducer/actions/MoleculeActions.d.ts +38 -9
  164. package/lib/component/reducer/actions/MoleculeActions.js +53 -20
  165. package/lib/component/reducer/actions/PeaksActions.d.ts +39 -8
  166. package/lib/component/reducer/actions/PeaksActions.js +19 -11
  167. package/lib/component/reducer/actions/PreferencesActions.d.ts +8 -3
  168. package/lib/component/reducer/actions/PreferencesActions.js +22 -7
  169. package/lib/component/reducer/actions/RangesActions.d.ts +85 -18
  170. package/lib/component/reducer/actions/RangesActions.js +80 -65
  171. package/lib/component/reducer/actions/SpectraAnalysisAction.d.ts +7 -1
  172. package/lib/component/reducer/actions/SpectrumsActions.d.ts +57 -24
  173. package/lib/component/reducer/actions/SpectrumsActions.js +69 -60
  174. package/lib/component/reducer/actions/ToolsActions.d.ts +59 -21
  175. package/lib/component/reducer/actions/ToolsActions.js +54 -32
  176. package/lib/component/reducer/actions/ZonesActions.d.ts +79 -15
  177. package/lib/component/reducer/actions/ZonesActions.js +68 -49
  178. package/lib/component/reducer/helper/Zoom1DManager.d.ts +6 -5
  179. package/lib/component/reducer/helper/Zoom1DManager.js +1 -1
  180. package/lib/component/reducer/helper/ZoomHistoryManager.js +2 -2
  181. package/lib/component/reducer/helper/get2DRange.d.ts +7 -1
  182. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
  183. package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
  184. package/lib/component/reducer/types/ActionType.d.ts +6 -0
  185. package/lib/component/reducer/types/ActionType.js +1 -0
  186. package/lib/component/toolbar/BasicToolBar.js +6 -9
  187. package/lib/component/toolbar/FunctionToolBar.js +4 -9
  188. package/lib/component/toolbar/ToolBar.js +1 -1
  189. package/lib/component/toolbar/ToolTypes.d.ts +2 -2
  190. package/lib/component/utility/Events.d.ts +4 -4
  191. package/lib/component/utility/Events.js +2 -2
  192. package/lib/component/utility/GroupByInfoKey.js +1 -1
  193. package/lib/component/utility/getSpectraObjectPaths.js +1 -1
  194. package/lib/component/workspaces/Workspace.d.ts +2 -1
  195. package/lib/component/workspaces/exercise.js +31 -0
  196. package/lib/component/workspaces/workspaceDefaultProperties.js +1 -0
  197. package/lib/data/PredictionManager.d.ts +5 -8
  198. package/lib/data/PredictionManager.js +3 -3
  199. package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +1 -1
  200. package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
  201. package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.d.ts +2 -3
  202. package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +5 -4
  203. package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.d.ts +5 -3
  204. package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +1 -35
  205. package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +2 -35
  206. package/lib/data/data1d/filter1d/baselineCorrection.d.ts +7 -10
  207. package/lib/data/data1d/multipleSpectraAnalysis.d.ts +1 -1
  208. package/lib/data/data2d/Processing2D.d.ts +3 -3
  209. package/lib/data/data2d/Spectrum2D/contours.d.ts +1 -4
  210. package/lib/data/data2d/Spectrum2D/contours.js +0 -1
  211. package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
  212. package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.d.ts +5 -1
  213. package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js +6 -8
  214. package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +2 -0
  215. package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +2 -0
  216. package/lib/data/data2d/Spectrum2D/zones/mapZones.d.ts +2 -0
  217. package/lib/data/matrixGeneration.js +4 -2
  218. package/lib/data/molecules/Molecule.d.ts +3 -3
  219. package/lib/data/molecules/MoleculeManager.d.ts +5 -5
  220. package/lib/data/molecules/MoleculeManager.js +1 -1
  221. package/lib/data/utilities/ZoneUtilities.js +0 -1
  222. package/lib/data/utilities/generateColor.js +1 -1
  223. package/lib/data/utilities/isNumber.d.ts +1 -0
  224. package/lib/data/utilities/isNumber.js +3 -0
  225. package/lib/types/NMRiumGeneralPreferences.d.ts +1 -0
  226. package/lib/versionInfo.js +1 -1
  227. package/lib-cjs/component/1d/FooterBanner.js +1 -1
  228. package/lib-cjs/component/1d/Viewer1D.js +25 -20
  229. package/lib-cjs/component/1d/integral/IntegralResizable.js +2 -3
  230. package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
  231. package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +7 -9
  232. package/lib-cjs/component/1d/peaks/PeakAnnotation.js +1 -2
  233. package/lib-cjs/component/1d/ranges/Range.js +9 -8
  234. package/lib-cjs/component/1d/ranges/Ranges.js +5 -7
  235. package/lib-cjs/component/1d/tool/BaseLineZones.js +1 -2
  236. package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +4 -5
  237. package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/index.js +13 -17
  238. package/lib-cjs/component/2d/1d-tracer/Left1DChart.js +1 -1
  239. package/lib-cjs/component/2d/1d-tracer/VerticalSliceChart.js +1 -1
  240. package/lib-cjs/component/2d/Chart2D.js +1 -1
  241. package/lib-cjs/component/2d/Viewer2D.js +10 -9
  242. package/lib-cjs/component/2d/fid/FidCanvas.js +4 -6
  243. package/lib-cjs/component/2d/ft/Contours.js +1 -7
  244. package/lib-cjs/component/2d/utilities/scale.js +1 -1
  245. package/lib-cjs/component/2d/zones/Zones.js +1 -1
  246. package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +28 -21
  247. package/lib-cjs/component/NMRium.js +19 -12
  248. package/lib-cjs/component/context/DispatchContext.js +1 -1
  249. package/lib-cjs/component/context/LoggerContext.js +1 -1
  250. package/lib-cjs/component/elements/Button.js +7 -9
  251. package/lib-cjs/component/elements/IsotopesViewer.js +1 -1
  252. package/lib-cjs/component/elements/ReactTable/ReactTable.js +1 -2
  253. package/lib-cjs/component/{panels/RangesPanel/TableColumns → elements}/RemoveAssignmentsButton.js +15 -2
  254. package/lib-cjs/component/elements/Tab/Tabs.js +1 -1
  255. package/lib-cjs/component/elements/formik/FormikCheckBox.js +1 -1
  256. package/lib-cjs/component/elements/formik/FormikColorInput.js +1 -1
  257. package/lib-cjs/component/elements/formik/FormikColorPicker.js +1 -1
  258. package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +1 -1
  259. package/lib-cjs/component/elements/formik/FormikInput.js +1 -1
  260. package/lib-cjs/component/elements/formik/FormikSelect.js +2 -2
  261. package/lib-cjs/component/elements/formik/FormikSlider.js +1 -1
  262. package/lib-cjs/component/elements/formik/FormikTextarea.js +2 -2
  263. package/lib-cjs/component/header/ApodizationOptionsPanel.js +3 -4
  264. package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +1 -2
  265. package/lib-cjs/component/header/BaseLineCorrectionPanel.js +4 -5
  266. package/lib-cjs/component/header/Header.js +5 -7
  267. package/lib-cjs/component/header/PhaseCorrectionPanel.js +7 -8
  268. package/lib-cjs/component/header/RangesPickingOptionPanel.js +1 -2
  269. package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +3 -11
  270. package/lib-cjs/component/header/Zones2DOptionPanel.js +5 -6
  271. package/lib-cjs/component/highlight/index.js +1 -1
  272. package/lib-cjs/component/hooks/useExport.js +1 -0
  273. package/lib-cjs/component/hooks/useTableSortBy.js +1 -1
  274. package/lib-cjs/component/hooks/useToolsFunctions.js +8 -10
  275. package/lib-cjs/component/hooks/useXYReduce.js +1 -1
  276. package/lib-cjs/component/loader/DropZone.js +4 -5
  277. package/lib-cjs/component/loader/NoData.js +1 -1
  278. package/lib-cjs/component/modal/AboutPredictionModal.js +54 -0
  279. package/lib-cjs/component/modal/AlignSpectraModal.js +1 -2
  280. package/lib-cjs/component/modal/EditPeakShapeModal.js +1 -2
  281. package/lib-cjs/component/modal/ImportPublicationStringModal.js +1 -2
  282. package/lib-cjs/component/modal/LoadJCAMPModal.js +2 -3
  283. package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +24 -19
  284. package/lib-cjs/component/modal/PredictSpectraModal.js +24 -21
  285. package/lib-cjs/component/modal/changeSum/SelectMolecule.js +1 -1
  286. package/lib-cjs/component/modal/editRange/EditRangeModal.js +3 -4
  287. package/lib-cjs/component/modal/editRange/forms/components/AddSignalFormTab.js +2 -2
  288. package/lib-cjs/component/modal/editRange/forms/components/CouplingsTable.js +1 -1
  289. package/lib-cjs/component/modal/metaImportation/MetaImportationModal.js +2 -3
  290. package/lib-cjs/component/modal/setting/settings-tabs/DatabasesTabContent.js +4 -4
  291. package/lib-cjs/component/modal/setting/settings-tabs/FormattingTabContent.js +2 -2
  292. package/lib-cjs/component/modal/setting/settings-tabs/InfoBlockTabContent.js +2 -2
  293. package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +1 -2
  294. package/lib-cjs/component/panels/AutomaticAssignment/useAutoAssignments.js +7 -6
  295. package/lib-cjs/component/panels/InformationPanel.js +6 -6
  296. package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +11 -20
  297. package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +27 -23
  298. package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +7 -4
  299. package/lib-cjs/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +1 -1
  300. package/lib-cjs/component/panels/MatrixGenerationPanel/FiltersOptions.js +4 -4
  301. package/lib-cjs/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -2
  302. package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +1 -2
  303. package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +10 -13
  304. package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +7 -7
  305. package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +2 -2
  306. package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +8 -9
  307. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +3 -4
  308. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +1 -2
  309. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
  310. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js +2 -2
  311. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +1 -1
  312. package/lib-cjs/component/panels/Panels.js +1 -1
  313. package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +4 -5
  314. package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +4 -5
  315. package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +12 -15
  316. package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +24 -29
  317. package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +0 -12
  318. package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -3
  319. package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -3
  320. package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +2 -3
  321. package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -2
  322. package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +16 -14
  323. package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +16 -16
  324. package/lib-cjs/component/panels/SpectrumsPanel/SpectraPreferences.js +2 -2
  325. package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +7 -5
  326. package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +4 -5
  327. package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -7
  328. package/lib-cjs/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +1 -1
  329. package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +4 -2
  330. package/lib-cjs/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -2
  331. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -8
  332. package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +39 -34
  333. package/lib-cjs/component/panels/SummaryPanel/utilities/Utilities.js +1 -1
  334. package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +22 -20
  335. package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +12 -19
  336. package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +2 -2
  337. package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +6 -7
  338. package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +27 -22
  339. package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +2 -2
  340. package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +15 -18
  341. package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +2 -51
  342. package/lib-cjs/component/panels/ZonesPanel/ZonesTableRow.js +1 -21
  343. package/lib-cjs/component/panels/ZonesPanel/hooks/useMapZones.js +56 -0
  344. package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +8 -6
  345. package/lib-cjs/component/panels/filtersPanel/FilterPanel.js +1 -2
  346. package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +8 -9
  347. package/lib-cjs/component/panels/header/DefaultPanelHeader.js +1 -1
  348. package/lib-cjs/component/panels/header/SpectraAutomaticPickingButton.js +2 -3
  349. package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +10 -6
  350. package/lib-cjs/component/reducer/IgnoreActions.js +35 -55
  351. package/lib-cjs/component/reducer/Reducer.js +199 -221
  352. package/lib-cjs/component/reducer/actions/AssignmentsActions.js +3 -3
  353. package/lib-cjs/component/reducer/actions/CorrelationsActions.js +23 -18
  354. package/lib-cjs/component/reducer/actions/DatabaseActions.js +4 -1
  355. package/lib-cjs/component/reducer/actions/DimensionsActions.js +3 -6
  356. package/lib-cjs/component/reducer/actions/DomainActions.js +15 -23
  357. package/lib-cjs/component/reducer/actions/FiltersActions.js +267 -272
  358. package/lib-cjs/component/reducer/actions/GlobalActions.js +4 -4
  359. package/lib-cjs/component/reducer/actions/IntegralsActions.js +19 -18
  360. package/lib-cjs/component/reducer/actions/LoadActions.js +68 -60
  361. package/lib-cjs/component/reducer/actions/MoleculeActions.js +56 -23
  362. package/lib-cjs/component/reducer/actions/PeaksActions.js +23 -15
  363. package/lib-cjs/component/reducer/actions/PreferencesActions.js +24 -9
  364. package/lib-cjs/component/reducer/actions/RangesActions.js +81 -64
  365. package/lib-cjs/component/reducer/actions/SpectrumsActions.js +77 -67
  366. package/lib-cjs/component/reducer/actions/ToolsActions.js +54 -31
  367. package/lib-cjs/component/reducer/actions/ZonesActions.js +73 -52
  368. package/lib-cjs/component/reducer/core/Constants.js +1 -1
  369. package/lib-cjs/component/reducer/helper/Zoom1DManager.js +2 -2
  370. package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +2 -2
  371. package/lib-cjs/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
  372. package/lib-cjs/component/reducer/types/ActionType.js +2 -0
  373. package/lib-cjs/component/toolbar/BasicToolBar.js +6 -9
  374. package/lib-cjs/component/toolbar/FunctionToolBar.js +4 -9
  375. package/lib-cjs/component/toolbar/ToolBar.js +1 -1
  376. package/lib-cjs/component/utility/GroupByInfoKey.js +1 -1
  377. package/lib-cjs/component/utility/getSpectraObjectPaths.js +1 -1
  378. package/lib-cjs/component/workspaces/exercise.js +31 -0
  379. package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +1 -0
  380. package/lib-cjs/data/PredictionManager.js +3 -3
  381. package/lib-cjs/data/SpectraManager.js +1 -1
  382. package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +1 -1
  383. package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
  384. package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +5 -4
  385. package/lib-cjs/data/data1d/multipleSpectraAnalysis.js +2 -2
  386. package/lib-cjs/data/data2d/Spectrum2D/contours.js +0 -1
  387. package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
  388. package/lib-cjs/data/data2d/Spectrum2D/zones/changeZoneSignal.js +6 -8
  389. package/lib-cjs/data/matrixGeneration.js +4 -2
  390. package/lib-cjs/data/molecules/MoleculeManager.js +1 -1
  391. package/lib-cjs/data/utilities/ZoneUtilities.js +0 -1
  392. package/lib-cjs/data/utilities/generateColor.js +1 -1
  393. package/lib-cjs/data/utilities/isNumber.js +7 -0
  394. package/lib-cjs/versionInfo.js +1 -1
  395. package/package.json +35 -34
  396. package/lib/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.d.ts +0 -3
  397. package/lib/component/reducer/actions/HistoryActions.d.ts +0 -4
  398. package/lib/component/reducer/actions/HistoryActions.js +0 -40
  399. package/lib/component/reducer/types/HistoryTypes.d.ts +0 -4
  400. package/lib/component/reducer/types/HistoryTypes.js +0 -4
  401. package/lib/component/reducer/types/Types.d.ts +0 -132
  402. package/lib/component/reducer/types/Types.js +0 -126
  403. package/lib/component/toolbar/HistoryToolBar.d.ts +0 -8
  404. package/lib/component/toolbar/HistoryToolBar.js +0 -30
  405. package/lib/data/utilities/isMolFileEmpty.d.ts +0 -1
  406. package/lib/data/utilities/isMolFileEmpty.js +0 -6
  407. package/lib-cjs/component/reducer/actions/HistoryActions.js +0 -45
  408. package/lib-cjs/component/reducer/types/HistoryTypes.js +0 -7
  409. package/lib-cjs/component/reducer/types/Types.js +0 -131
  410. package/lib-cjs/component/toolbar/HistoryToolBar.js +0 -35
  411. package/lib-cjs/data/utilities/isMolFileEmpty.js +0 -10
@@ -15,7 +15,6 @@ const ToggleButtonGroup_1 = __importDefault(require("../elements/toggle/ToggleBu
15
15
  const useCheckToolsVisibility_1 = require("../hooks/useCheckToolsVisibility");
16
16
  const useDatumWithSpectraStatistics_1 = __importDefault(require("../hooks/useDatumWithSpectraStatistics"));
17
17
  const useToolsFunctions_1 = __importDefault(require("../hooks/useToolsFunctions"));
18
- const Types_1 = require("../reducer/types/Types");
19
18
  const ToolTypes_1 = require("./ToolTypes");
20
19
  function FunctionToolBarInner({ defaultValue, ftCounter, }) {
21
20
  const [option, setOption] = (0, react_1.useState)('');
@@ -31,10 +30,8 @@ function FunctionToolBarInner({ defaultValue, ftCounter, }) {
31
30
  }, [defaultValue]);
32
31
  const handleOnFFTFilter = (0, react_1.useCallback)(() => {
33
32
  dispatch({
34
- type: Types_1.APPLY_FFT_FILTER,
35
- value: '',
33
+ type: 'APPLY_FFT_FILTER',
36
34
  });
37
- dispatch({ type: Types_1.SET_SELECTED_FILTER, selectedFilter: null });
38
35
  }, [dispatch]);
39
36
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(ToggleButtonGroup_1.default, { value: option, onChange: handleChange, children: [isButtonVisible('zoom') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zoom.id, id: ToolTypes_1.options.zoom.id, title: `${ToolTypes_1.options.zoom.label} ( Press z )`, children: (0, jsx_runtime_1.jsx)(fa_1.FaSearchPlus, {}) }, ToolTypes_1.options.zoom.id)), isButtonVisible('zoomOut') && ((0, jsx_runtime_1.jsx)(ui_1.Toolbar.Item, { id: "zoom-out", onClick: handleFullZoomOut, title: "Horizontal zoom out ( Press f ), Horizontal and Vertical zoom out, double click ( Press ff )", children: (0, jsx_runtime_1.jsx)(fa_1.FaExpand, {}) })), isButtonVisible('peakPicking') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.peakPicking.id, title: `${ToolTypes_1.options.peakPicking.label} ( Press p )`, id: ToolTypes_1.options.peakPicking.id, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrPeakPicking, {}) }, ToolTypes_1.options.peakPicking.id)), isButtonVisible('integral') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.integral.id, id: ToolTypes_1.options.integral.id, title: `${ToolTypes_1.options.integral.label} ( Press i )`, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrIntegrate, {}) }, ToolTypes_1.options.integral.id)), isButtonVisible('zonePicking') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zonePicking.id, id: ToolTypes_1.options.zonePicking.id, title: `${ToolTypes_1.options.zonePicking.label} ( Press r )`, children: (0, jsx_runtime_1.jsx)(fa_1.FaDiceFour, {}) }, ToolTypes_1.options.zonePicking.id)), isButtonVisible('slicing') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.slicing.id, id: ToolTypes_1.options.slicing.id, title: `${ToolTypes_1.options.slicing.label}`, children: (0, jsx_runtime_1.jsx)("p", { children: "Slic" }) }, ToolTypes_1.options.slicing.id)), isButtonVisible('rangePicking') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.rangePicking.id, title: `${ToolTypes_1.options.rangePicking.label} ( Press r )`, id: ToolTypes_1.options.rangePicking.id, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrRangePicking, {}) }, ToolTypes_1.options.rangePicking.id)), isButtonVisible('multipleSpectraAnalysis', {
40
37
  checkSpectrumType: false,
@@ -46,10 +43,8 @@ const MemoizedFunctionToolBar = (0, react_1.memo)(FunctionToolBarInner);
46
43
  function FunctionToolBar({ defaultValue = ToolTypes_1.options.zoom.id, }) {
47
44
  const { displayerMode } = (0, ChartContext_1.useChartData)();
48
45
  const data = (0, useDatumWithSpectraStatistics_1.default)();
49
- return ((0, jsx_runtime_1.jsx)(MemoizedFunctionToolBar, { ...{
50
- ...data,
51
- displayerMode,
52
- defaultValue,
53
- } }));
46
+ return ((0, jsx_runtime_1.jsx)(MemoizedFunctionToolBar, { ...data,
47
+ displayerMode,
48
+ defaultValue }));
54
49
  }
55
50
  exports.default = FunctionToolBar;
@@ -15,6 +15,6 @@ function ToolBarInner({ selectedTool }) {
15
15
  const MemoizedToolBar = (0, react_1.memo)(ToolBarInner);
16
16
  function ToolBar() {
17
17
  const { toolOptions: { selectedTool }, } = (0, ChartContext_1.useChartData)();
18
- return (0, jsx_runtime_1.jsx)(MemoizedToolBar, { ...{ selectedTool } });
18
+ return (0, jsx_runtime_1.jsx)(MemoizedToolBar, { selectedTool });
19
19
  }
20
20
  exports.default = ToolBar;
@@ -5,7 +5,7 @@ function getNucleusSum(input) {
5
5
  let output = 0;
6
6
  for (const i of nucleus) {
7
7
  const additions = nucleus.length === 2 ? 100 : 0;
8
- output += Number(i.replace(/\D/g, '')) + additions;
8
+ output += Number(i.replaceAll(/\D/g, '')) + additions;
9
9
  }
10
10
  return output;
11
11
  }
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getSpectraObjectPaths = void 0;
4
4
  function getSpectraObjectPaths(spectra) {
5
- const keys = ['display', 'meta', 'info', 'metaInfo'];
5
+ const keys = ['display', 'meta', 'info', 'customInfo'];
6
6
  const paths = {};
7
7
  for (const spectrum of spectra) {
8
8
  for (const key of keys) {
@@ -7,6 +7,7 @@ exports.exercise = {
7
7
  display: {
8
8
  general: {
9
9
  hideGeneralSettings: true,
10
+ hideLogs: true,
10
11
  },
11
12
  panels: {
12
13
  spectraPanel: { display: true, open: true },
@@ -26,4 +27,34 @@ exports.exercise = {
26
27
  spectraStackAlignments: true,
27
28
  },
28
29
  },
30
+ general: {
31
+ dimmedSpectraOpacity: 0.1,
32
+ verticalSplitterPosition: '440px',
33
+ verticalSplitterCloseThreshold: 600,
34
+ spectraRendering: 'auto',
35
+ loggingLevel: 'info',
36
+ },
37
+ formatting: {
38
+ nuclei: {},
39
+ panels: {
40
+ integrals: {
41
+ nuclei: {
42
+ '1H': {
43
+ relative: { show: true, format: '0.00' },
44
+ absolute: { show: false, format: '0.00' },
45
+ color: 'black',
46
+ strokeWidth: 1,
47
+ showKind: false,
48
+ },
49
+ '13C': {
50
+ relative: { show: true, format: '0.00' },
51
+ absolute: { show: false, format: '0.00' },
52
+ color: 'black',
53
+ strokeWidth: 1,
54
+ showKind: false,
55
+ },
56
+ },
57
+ },
58
+ },
59
+ },
29
60
  };
@@ -31,6 +31,7 @@ exports.workspaceDefaultProperties = {
31
31
  hideGeneralSettings: false,
32
32
  experimentalFeatures: { display: false },
33
33
  hidePanelOnLoad: false,
34
+ hideLogs: false,
34
35
  },
35
36
  panels: {
36
37
  spectraPanel: { display: false, open: false },
@@ -55,11 +55,11 @@ async function predictSpectra(molfile) {
55
55
  });
56
56
  }
57
57
  exports.predictSpectra = predictSpectra;
58
- function generateSpectra(data, inputOptions, color) {
58
+ function generateSpectra(predictedSpectra, inputOptions, color) {
59
59
  const spectra = [];
60
- for (const experiment in data) {
60
+ for (const experiment in predictedSpectra) {
61
61
  if (inputOptions.spectra[experiment]) {
62
- const spectrum = data[experiment];
62
+ const spectrum = predictedSpectra[experiment];
63
63
  switch (experiment) {
64
64
  case 'proton':
65
65
  case 'carbon': {
@@ -34,7 +34,7 @@ var DataExportOptions;
34
34
  DataExportOptions["ROW_DATA"] = "ROW_DATA";
35
35
  DataExportOptions["DATA_SOURCE"] = "DATA_SOURCE";
36
36
  DataExportOptions["NO_DATA"] = "NO_DATA";
37
- })(DataExportOptions = exports.DataExportOptions || (exports.DataExportOptions = {}));
37
+ })(DataExportOptions || (exports.DataExportOptions = DataExportOptions = {}));
38
38
  function getData(datum, usedColors) {
39
39
  const dimension = datum.info.dimension;
40
40
  if (dimension === 1) {
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getSpectrumErrorValue = void 0;
4
4
  function getSpectrumErrorValue(spectrum) {
5
5
  const { x } = spectrum.data;
6
- return (x[x.length - 1] - x[0]) / 10000;
6
+ return (x.at(-1) - x[0]) / 10000;
7
7
  }
8
8
  exports.getSpectrumErrorValue = getSpectrumErrorValue;
@@ -51,7 +51,7 @@ function initiateDatum1D(spectrum, options = {}) {
51
51
  };
52
52
  spectrumObj.originalInfo = spectrumObj.info;
53
53
  spectrumObj.meta = { ...spectrum.meta };
54
- spectrumObj.metaInfo = { ...spectrum.metaInfo };
54
+ spectrumObj.customInfo = { ...spectrum.customInfo };
55
55
  spectrumObj.data = (0, convertDataToFloat64Array_1.convertDataToFloat64Array)(spectrum.data);
56
56
  spectrumObj.originalData = spectrumObj.data;
57
57
  spectrumObj.filters = Object.assign([], spectrum.filters); //array of object {name: "FilterName", options: FilterOptions = {value | object} }
@@ -6,12 +6,13 @@ exports.changeRangeRelativeValue = void 0;
6
6
  * @param {Spectrum1D} spectrum spectrum 1d
7
7
  * @param {RangeProps} newRange
8
8
  */
9
- function changeRangeRelativeValue(spectrum, newRange) {
10
- const index = spectrum.ranges.values.findIndex((range) => range.id === newRange.id);
9
+ function changeRangeRelativeValue(spectrum, data) {
10
+ const { id, value } = data;
11
+ const index = spectrum.ranges.values.findIndex((range) => range.id === id);
11
12
  if (index !== -1 && spectrum.ranges.options.sum) {
12
13
  const { absolute, integration } = spectrum.ranges.values[index];
13
- const ratio = absolute / newRange.value;
14
- const sum = (newRange.value / integration) * spectrum.ranges.options.sum;
14
+ const ratio = absolute / value;
15
+ const sum = (value / integration) * spectrum.ranges.options.sum;
15
16
  spectrum.ranges.options = {
16
17
  ...spectrum.ranges.options,
17
18
  mf: undefined,
@@ -12,14 +12,14 @@ var COLUMNS_TYPES;
12
12
  (function (COLUMNS_TYPES) {
13
13
  COLUMNS_TYPES["NORMAL"] = "NORMAL";
14
14
  COLUMNS_TYPES["FORMULA"] = "FORMULA";
15
- })(COLUMNS_TYPES = exports.COLUMNS_TYPES || (exports.COLUMNS_TYPES = {}));
15
+ })(COLUMNS_TYPES || (exports.COLUMNS_TYPES = COLUMNS_TYPES = {}));
16
16
  var COLUMNS_VALUES_KEYS;
17
17
  (function (COLUMNS_VALUES_KEYS) {
18
18
  COLUMNS_VALUES_KEYS["RELATIVE"] = "relative";
19
19
  COLUMNS_VALUES_KEYS["ABSOLUTE"] = "absolute";
20
20
  COLUMNS_VALUES_KEYS["MIN"] = "min";
21
21
  COLUMNS_VALUES_KEYS["MAX"] = "max";
22
- })(COLUMNS_VALUES_KEYS = exports.COLUMNS_VALUES_KEYS || (exports.COLUMNS_VALUES_KEYS = {}));
22
+ })(COLUMNS_VALUES_KEYS || (exports.COLUMNS_VALUES_KEYS = COLUMNS_VALUES_KEYS = {}));
23
23
  function addColumnKey(spectraAnalysis, nucleus, columnProps, columnKey) {
24
24
  const spectraAnalysisOptions = spectraAnalysis[nucleus].analysisOptions;
25
25
  const key = columnKey || (0, generateChar_1.default)(spectraAnalysisOptions.columnIndex).toUpperCase();
@@ -122,7 +122,6 @@ function getContours(zoomLevel, options) {
122
122
  const { negative = false, timeout = 2000, nbLevels, data } = options;
123
123
  const xs = getRange(data.minX, data.maxX, data.z[0].length);
124
124
  const ys = getRange(data.minY, data.maxY, data.z.length);
125
- // @ts-expect-error refactor Conrect class to accept Float32Array Array instead of an array of number
126
125
  const conrec = new ml_conrec_1.Conrec(data.z, { xs, ys, swapAxes: false });
127
126
  const sanResult = (0, calculateSanPlot_1.calculateSanPlot)('2D', data);
128
127
  const median = sanResult.positive;
@@ -52,7 +52,7 @@ function initiateDatum2D(spectrum, usedColors = {}) {
52
52
  };
53
53
  datum.originalInfo = datum.info;
54
54
  datum.meta = { ...spectrum.meta };
55
- datum.metaInfo = { ...spectrum.metaInfo };
55
+ datum.customInfo = { ...spectrum.customInfo };
56
56
  datum.data = getData(datum, spectrum);
57
57
  datum.originalData = datum.data;
58
58
  datum.filters = Object.assign([], spectrum.filters);
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.changeZoneSignal = void 0;
4
+ const isNumber_1 = require("../../../utilities/isNumber");
4
5
  /**
5
6
  *
6
7
  * @param {number} zoneID
@@ -9,19 +10,16 @@ exports.changeZoneSignal = void 0;
9
10
  * @param {number} signal.y
10
11
  * @param {string} signal.id
11
12
  */
12
- function changeZoneSignal(spectrum, zoneID, newSignal) {
13
+ function changeZoneSignal(spectrum, zoneID, signal) {
13
14
  const zoneIndex = spectrum.zones.values.findIndex((zone) => zone.id === zoneID);
15
+ const { id, deltaX, deltaY } = signal;
14
16
  if (zoneIndex !== -1) {
15
- const signalIndex = spectrum.zones.values[zoneIndex].signals.findIndex((s) => s.id === newSignal.id);
17
+ const signalIndex = spectrum.zones.values[zoneIndex].signals.findIndex((s) => s.id === id);
16
18
  const zone = spectrum.zones.values[zoneIndex];
17
19
  if (signalIndex !== -1) {
18
20
  const originalSignal = zone.signals[signalIndex];
19
- const xShift = newSignal?.x || newSignal?.x === 0
20
- ? newSignal.x - originalSignal.x.delta
21
- : 0;
22
- const yShift = newSignal?.y || newSignal?.y === 0
23
- ? newSignal.y - originalSignal.y?.delta
24
- : 0;
21
+ const xShift = (0, isNumber_1.isNumber)(deltaX) ? deltaX - originalSignal.x.delta : 0;
22
+ const yShift = (0, isNumber_1.isNumber)(deltaY) ? deltaY - originalSignal.y?.delta : 0;
25
23
  return { xShift, yShift };
26
24
  }
27
25
  }
@@ -7,7 +7,7 @@ exports.getMatrixFilters = exports.normalCase = void 0;
7
7
  const set_1 = __importDefault(require("lodash/set"));
8
8
  const FilterXYSchema_json_1 = __importDefault(require("ml-signal-processing/FilterXYSchema.json"));
9
9
  function normalCase(str) {
10
- const result = str.replace(/(?<upper>[A-Z])/g, ' $<upper>').trim();
10
+ const result = str.replaceAll(/(?<upper>[A-Z])/g, ' $<upper>').trim();
11
11
  return result.charAt(0).toUpperCase() + result.slice(1);
12
12
  }
13
13
  exports.normalCase = normalCase;
@@ -107,7 +107,9 @@ function generateFilterOptions(properties) {
107
107
  (0, set_1.default)(options, key, []);
108
108
  break;
109
109
  case 'select':
110
- (0, set_1.default)(options, key, field.default ? field.default.replace(/'|"/g, '') : field.choices[0]);
110
+ (0, set_1.default)(options, key, field.default
111
+ ? field.default.replaceAll(/'|"/g, '')
112
+ : field.choices[0]);
111
113
  break;
112
114
  case 'string':
113
115
  (0, set_1.default)(options, key, undefined);
@@ -71,7 +71,7 @@ exports.extractNumber = extractNumber;
71
71
  function extractLabelsNumbers(molecules) {
72
72
  const values = [];
73
73
  for (const molecule of molecules) {
74
- const value = extractNumber(molecule.label);
74
+ const value = extractNumber(molecule?.label || '');
75
75
  if (value) {
76
76
  values.push(Number(value));
77
77
  }
@@ -55,7 +55,6 @@ function unlink(zone, isOnZoneLevel, signalIndex, axis) {
55
55
  delete zone.signals[signalIndex][axis].diaIDs;
56
56
  delete zone.signals[signalIndex][axis].nbAtoms;
57
57
  }
58
- setNbAtoms(zone, axis);
59
58
  }
60
59
  else if (axis !== undefined) {
61
60
  resetDiaIDs(zone, axis);
@@ -57,7 +57,7 @@ function generateColor(isRandom = false, usedColors = [], opacity = 100) {
57
57
  }
58
58
  else {
59
59
  const lum = -0.25;
60
- let hex = String(`#${Math.random().toString(16).slice(2, 8).toUpperCase()}`).replace(/[^\da-f]/gi, '');
60
+ let hex = String(`#${Math.random().toString(16).slice(2, 8).toUpperCase()}`).replaceAll(/[^\da-f]/gi, '');
61
61
  if (hex.length < 6) {
62
62
  hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
63
63
  }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isNumber = void 0;
4
+ function isNumber(value) {
5
+ return typeof value === 'number' && Number(value).toString() !== 'NaN';
6
+ }
7
+ exports.isNumber = isNumber;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = { version: 'v0.36.0' };
3
+ exports.default = { version: 'v0.38.0' };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nmrium",
3
3
  "description": "React component to display and process nuclear magnetic resonance (NMR) spectra.",
4
- "version": "0.36.0",
4
+ "version": "0.38.0",
5
5
  "license": "MIT",
6
6
  "main": "lib-cjs/component/NMRium.js",
7
7
  "module": "lib/component/NMRium.js",
@@ -58,35 +58,35 @@
58
58
  "react-dom": ">=18.0.0"
59
59
  },
60
60
  "dependencies": {
61
- "@emotion/react": "^11.11.0",
61
+ "@emotion/react": "^11.11.1",
62
62
  "@lukeed/uuid": "^2.0.1",
63
- "cheminfo-font": "^1.9.0",
63
+ "cheminfo-font": "^1.10.0",
64
64
  "cheminfo-types": "^1.7.1",
65
65
  "clipboard-polyfill": "^4.0.0",
66
66
  "convert-to-jcamp": "^5.4.6",
67
- "d3": "^7.8.4",
67
+ "d3": "^7.8.5",
68
68
  "eventemitter3": "^5.0.1",
69
69
  "fifo-logger": "^0.6.1",
70
70
  "file-saver": "^2.0.5",
71
- "filelist-utils": "^1.8.1",
72
- "formik": "^2.2.9",
73
- "immer": "^10.0.1",
71
+ "filelist-utils": "^1.9.0",
72
+ "formik": "^2.4.1",
73
+ "immer": "^10.0.2",
74
74
  "jszip": "^3.10.1",
75
75
  "lodash": "^4.17.21",
76
- "ml-airpls": "^1.0.0",
76
+ "ml-airpls": "^1.0.2",
77
77
  "ml-array-max": "^1.2.4",
78
78
  "ml-array-mean": "^1.1.6",
79
79
  "ml-array-median": "^1.1.6",
80
80
  "ml-array-xy-equally-spaced": "^1.2.1",
81
- "ml-baseline-correction-regression": "^1.0.0",
82
- "ml-conrec": "^4.0.0",
81
+ "ml-baseline-correction-regression": "^1.0.2",
82
+ "ml-conrec": "^5.0.2",
83
83
  "ml-gsd": "^12.1.3",
84
84
  "ml-spectra-processing": "^12.4.0",
85
85
  "ml-stat": "^1.3.3",
86
86
  "multiplet-analysis": "^2.1.1",
87
87
  "nmr-correlation": "^2.3.3",
88
- "nmr-load-save": "^0.11.5",
89
- "nmr-processing": "^9.5.0",
88
+ "nmr-load-save": "^0.12.1",
89
+ "nmr-processing": "^9.5.1",
90
90
  "nmredata": "^0.9.2",
91
91
  "numeral": "^2.0.6",
92
92
  "openchemlib": "^8.3.0",
@@ -95,54 +95,55 @@
95
95
  "re-resizable": "^6.9.9",
96
96
  "react-d3-utils": "^1.0.0",
97
97
  "react-dropzone": "^14.2.3",
98
- "react-error-boundary": "^4.0.4",
99
- "react-icons": "^4.8.0",
100
- "react-inspector": "^6.0.1",
98
+ "react-error-boundary": "^4.0.9",
99
+ "react-icons": "^4.9.0",
100
+ "react-inspector": "^6.0.2",
101
101
  "react-mf": "^2.0.2",
102
102
  "react-ocl": "^5.0.0",
103
103
  "react-ocl-nmr": "^2.0.0",
104
104
  "react-plot": "^1.4.2",
105
105
  "react-rnd": "^10.4.1",
106
- "react-science": "^0.22.0",
107
- "react-slider": "^2.0.4",
106
+ "react-science": "^0.22.2",
107
+ "react-slider": "^2.0.5",
108
108
  "react-table": "^7.8.0",
109
109
  "react-transition-group": "^4.4.5",
110
110
  "react-use": "^17.4.0",
111
111
  "smart-array-filter": "^4.0.2",
112
- "yup": "^1.1.1"
112
+ "yup": "^1.2.0"
113
113
  },
114
114
  "devDependencies": {
115
115
  "@babel/plugin-transform-modules-commonjs": "^7.21.5",
116
- "@babel/preset-react": "^7.18.6",
116
+ "@babel/preset-react": "^7.22.3",
117
117
  "@babel/preset-typescript": "^7.21.5",
118
- "@playwright/test": "^1.33.0",
118
+ "@playwright/test": "^1.34.3",
119
119
  "@simbathesailor/use-what-changed": "^2.0.0",
120
120
  "@types/d3": "^7.4.0",
121
- "@types/node": "^20.1.0",
121
+ "@types/node": "^20.2.5",
122
122
  "@types/papaparse": "^5.3.7",
123
- "@types/react": "^18.2.6",
123
+ "@types/react": "^18.2.9",
124
124
  "@types/react-dom": "^18.2.4",
125
125
  "@types/react-table": "^7.7.14",
126
- "@vitejs/plugin-react-swc": "^3.3.1",
127
- "@vitest/coverage-c8": "^0.31.0",
126
+ "@vitejs/plugin-react-swc": "^3.3.2",
127
+ "@vitest/coverage-v8": "^0.32.0",
128
128
  "cross-env": "^7.0.3",
129
129
  "cspell": "^6.31.1",
130
- "eslint": "^8.40.0",
131
- "eslint-config-zakodium": "^7.2.0",
132
- "modern-normalize": "^1.1.0",
130
+ "eslint": "^8.42.0",
131
+ "eslint-config-cheminfo-react": "^9.1.0",
132
+ "eslint-config-cheminfo-typescript": "^11.3.1",
133
+ "modern-normalize": "^2.0.0",
133
134
  "postcss-styled-syntax": "^0.4.0",
134
135
  "prettier": "^2.8.8",
135
- "rc-menu": "^9.8.4",
136
+ "rc-menu": "^9.9.2",
136
137
  "react": "^18.2.0",
137
138
  "react-dom": "^18.2.0",
138
- "react-router-dom": "^6.11.1",
139
- "rimraf": "^5.0.0",
139
+ "react-router-dom": "^6.12.0",
140
+ "rimraf": "^5.0.1",
140
141
  "rollup-plugin-analyzer": "^4.0.0",
141
142
  "serve": "^14.2.0",
142
- "stylelint": "^15.6.1",
143
+ "stylelint": "^15.7.0",
143
144
  "stylelint-config-standard": "^33.0.0",
144
- "typescript": "~5.0.4",
145
- "vite": "^4.3.5",
146
- "vitest": "^0.31.0"
145
+ "typescript": "~5.1.3",
146
+ "vite": "^4.3.9",
147
+ "vitest": "^0.32.0"
147
148
  }
148
149
  }
@@ -1,3 +0,0 @@
1
- export declare function RemoveAssignmentsButton({ onClick }: {
2
- onClick: any;
3
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +0,0 @@
1
- declare function handleHistoryUndo(draft: any): void;
2
- declare function handleHistoryRedo(draft: any): void;
3
- declare function handleHistoryReset(draft: any, action: any): void;
4
- export { handleHistoryUndo, handleHistoryRedo, handleHistoryReset };
@@ -1,40 +0,0 @@
1
- import { setDomain, getDomain } from './DomainActions';
2
- function handleHistoryUndo(draft) {
3
- const { past, present, future } = draft.history;
4
- const previous = past[past.length - 1];
5
- const newPast = past.slice(0, -1);
6
- const newfuture = [present, ...future];
7
- const hasRedo = newfuture.length > 0;
8
- const hasUndo = past.length > 0;
9
- const domain = getDomain(draft.data);
10
- const history = {
11
- past: newPast,
12
- present: previous,
13
- future: newfuture,
14
- hasRedo,
15
- hasUndo,
16
- };
17
- draft.xDomain = domain.xDomain;
18
- draft.yDomain = domain.yDomain;
19
- draft.originDomain = domain;
20
- draft.history = history;
21
- }
22
- function handleHistoryRedo(draft) {
23
- const { history, data } = draft;
24
- const newPresent = history.future.shift();
25
- history.past.push(history.present);
26
- history.present = newPresent;
27
- history.hasUndo = true;
28
- history.hasRedo = history.future.length > 0;
29
- setDomain(data);
30
- }
31
- function handleHistoryReset(draft, action) {
32
- draft.history = {
33
- past: [],
34
- present: action,
35
- future: [],
36
- hasRedo: false,
37
- hasUndo: false,
38
- };
39
- }
40
- export { handleHistoryUndo, handleHistoryRedo, handleHistoryReset };
@@ -1,4 +0,0 @@
1
- export declare const UNDO = "undo";
2
- export declare const REDO = "redo";
3
- export declare const SET = "set";
4
- export declare const RESET = "reset";
@@ -1,4 +0,0 @@
1
- export const UNDO = 'undo';
2
- export const REDO = 'redo';
3
- export const SET = 'set';
4
- export const RESET = 'reset';