nmrium 0.37.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 (371) 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 -1
  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.js +15 -7
  26. package/lib/component/assignment/AssignmentsReducer.d.ts +1 -1
  27. package/lib/component/context/DispatchContext.d.ts +23 -3
  28. package/lib/component/context/DispatchContext.js +1 -1
  29. package/lib/component/context/LoggerContext.js +1 -1
  30. package/lib/component/elements/Button.js +7 -9
  31. package/lib/component/elements/IsotopesViewer.js +1 -1
  32. package/lib/component/elements/ReactTable/ReactTable.js +1 -2
  33. package/lib/component/elements/formik/FormikCheckBox.js +1 -1
  34. package/lib/component/elements/formik/FormikColorInput.js +1 -1
  35. package/lib/component/elements/formik/FormikColorPicker.js +1 -1
  36. package/lib/component/elements/formik/FormikColumnFormatField.js +1 -1
  37. package/lib/component/elements/formik/FormikInput.js +1 -1
  38. package/lib/component/elements/formik/FormikSelect.js +2 -2
  39. package/lib/component/elements/formik/FormikSlider.js +1 -1
  40. package/lib/component/elements/formik/FormikTextarea.js +2 -2
  41. package/lib/component/header/ApodizationOptionsPanel.js +4 -5
  42. package/lib/component/header/AutoPeakPickingOptionPanel.js +1 -2
  43. package/lib/component/header/BaseLineCorrectionPanel.js +4 -5
  44. package/lib/component/header/Header.js +4 -6
  45. package/lib/component/header/PhaseCorrectionPanel.js +7 -8
  46. package/lib/component/header/RangesPickingOptionPanel.js +1 -2
  47. package/lib/component/header/ZeroFillingOptionsPanel.js +3 -11
  48. package/lib/component/header/Zones2DOptionPanel.js +5 -6
  49. package/lib/component/hooks/useExport.js +1 -0
  50. package/lib/component/hooks/useToolsFunctions.js +8 -10
  51. package/lib/component/loader/DropZone.js +4 -5
  52. package/lib/component/loader/NoData.js +1 -1
  53. package/lib/component/modal/AlignSpectraModal.js +1 -2
  54. package/lib/component/modal/EditPeakShapeModal.js +1 -2
  55. package/lib/component/modal/ImportPublicationStringModal.js +1 -2
  56. package/lib/component/modal/LoadJCAMPModal.js +2 -3
  57. package/lib/component/modal/MoleculeStructureEditorModal.js +24 -19
  58. package/lib/component/modal/PredictSpectraModal.js +24 -21
  59. package/lib/component/modal/changeSum/SelectMolecule.js +1 -1
  60. package/lib/component/modal/editRange/EditRangeModal.js +3 -4
  61. package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +2 -2
  62. package/lib/component/modal/editRange/forms/components/CouplingsTable.js +1 -1
  63. package/lib/component/modal/metaImportation/MetaImportationModal.js +2 -3
  64. package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js +4 -4
  65. package/lib/component/modal/setting/settings-tabs/FormattingTabContent.js +2 -2
  66. package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.js +2 -2
  67. package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +1 -2
  68. package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +7 -6
  69. package/lib/component/panels/InformationPanel.js +6 -6
  70. package/lib/component/panels/IntegralsPanel/IntegralPanel.js +11 -20
  71. package/lib/component/panels/IntegralsPanel/IntegralTable.js +10 -10
  72. package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +1 -1
  73. package/lib/component/panels/MatrixGenerationPanel/FiltersOptions.js +4 -4
  74. package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -2
  75. package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +1 -2
  76. package/lib/component/panels/MoleculesPanel/MoleculePanel.js +10 -13
  77. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +4 -5
  78. package/lib/component/panels/MoleculesPanel/Utilities.d.ts +4 -1
  79. package/lib/component/panels/MoleculesPanel/Utilities.js +2 -2
  80. package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +8 -9
  81. package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +3 -4
  82. package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +1 -2
  83. package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
  84. package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js +2 -2
  85. package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +1 -1
  86. package/lib/component/panels/Panels.js +1 -1
  87. package/lib/component/panels/PeaksPanel/PeaksPanel.js +4 -5
  88. package/lib/component/panels/PeaksPanel/PeaksTable.js +4 -5
  89. package/lib/component/panels/RangesPanel/RangesHeader.js +12 -15
  90. package/lib/component/panels/RangesPanel/RangesPanel.js +24 -29
  91. package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +1 -1
  92. package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -3
  93. package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -2
  94. package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.d.ts +1 -1
  95. package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +16 -14
  96. package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +16 -16
  97. package/lib/component/panels/SpectrumsPanel/SpectraTable.js +7 -5
  98. package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +4 -5
  99. package/lib/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -7
  100. package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +4 -2
  101. package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -2
  102. package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -8
  103. package/lib/component/panels/SummaryPanel/SummaryPanel.js +39 -34
  104. package/lib/component/panels/SummaryPanel/utilities/Utilities.js +1 -1
  105. package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.d.ts +2 -13
  106. package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +22 -20
  107. package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.d.ts +2 -2
  108. package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
  109. package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.d.ts +2 -2
  110. package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.d.ts +2 -2
  111. package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +6 -7
  112. package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.d.ts +2 -2
  113. package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +1 -1
  114. package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.d.ts +2 -2
  115. package/lib/component/panels/ZonesPanel/ZonesPanel.js +15 -18
  116. package/lib/component/panels/ZonesPanel/ZonesTable.js +2 -51
  117. package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +3 -3
  118. package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts +16 -0
  119. package/lib/component/panels/ZonesPanel/hooks/useMapZones.js +52 -0
  120. package/lib/component/panels/databasePanel/DatabasePanel.js +9 -7
  121. package/lib/component/panels/filtersPanel/FilterPanel.js +1 -2
  122. package/lib/component/panels/filtersPanel/FiltersTable.js +8 -9
  123. package/lib/component/panels/header/DefaultPanelHeader.js +1 -1
  124. package/lib/component/panels/header/SpectraAutomaticPickingButton.js +2 -3
  125. package/lib/component/panels/predictionPanel/PredictionPanel.js +4 -5
  126. package/lib/component/reducer/IgnoreActions.d.ts +2 -1
  127. package/lib/component/reducer/IgnoreActions.js +35 -32
  128. package/lib/component/reducer/Reducer.d.ts +8 -5
  129. package/lib/component/reducer/Reducer.js +199 -221
  130. package/lib/component/reducer/actions/AssignmentsActions.d.ts +7 -6
  131. package/lib/component/reducer/actions/AssignmentsActions.js +2 -2
  132. package/lib/component/reducer/actions/CorrelationsActions.d.ts +21 -13
  133. package/lib/component/reducer/actions/CorrelationsActions.js +25 -20
  134. package/lib/component/reducer/actions/DatabaseActions.d.ts +15 -2
  135. package/lib/component/reducer/actions/DatabaseActions.js +5 -2
  136. package/lib/component/reducer/actions/DimensionsActions.d.ts +8 -3
  137. package/lib/component/reducer/actions/DimensionsActions.js +3 -5
  138. package/lib/component/reducer/actions/DomainActions.d.ts +11 -5
  139. package/lib/component/reducer/actions/DomainActions.js +13 -19
  140. package/lib/component/reducer/actions/FiltersActions.d.ts +70 -23
  141. package/lib/component/reducer/actions/FiltersActions.js +250 -255
  142. package/lib/component/reducer/actions/GlobalActions.d.ts +7 -2
  143. package/lib/component/reducer/actions/GlobalActions.js +3 -3
  144. package/lib/component/reducer/actions/IntegralsActions.d.ts +28 -7
  145. package/lib/component/reducer/actions/IntegralsActions.js +16 -15
  146. package/lib/component/reducer/actions/LoadActions.d.ts +23 -5
  147. package/lib/component/reducer/actions/LoadActions.js +52 -52
  148. package/lib/component/reducer/actions/MoleculeActions.d.ts +38 -9
  149. package/lib/component/reducer/actions/MoleculeActions.js +27 -18
  150. package/lib/component/reducer/actions/PeaksActions.d.ts +39 -8
  151. package/lib/component/reducer/actions/PeaksActions.js +19 -11
  152. package/lib/component/reducer/actions/PreferencesActions.d.ts +8 -3
  153. package/lib/component/reducer/actions/PreferencesActions.js +5 -3
  154. package/lib/component/reducer/actions/RangesActions.d.ts +85 -18
  155. package/lib/component/reducer/actions/RangesActions.js +80 -65
  156. package/lib/component/reducer/actions/SpectraAnalysisAction.d.ts +7 -1
  157. package/lib/component/reducer/actions/SpectrumsActions.d.ts +57 -24
  158. package/lib/component/reducer/actions/SpectrumsActions.js +69 -60
  159. package/lib/component/reducer/actions/ToolsActions.d.ts +59 -21
  160. package/lib/component/reducer/actions/ToolsActions.js +54 -32
  161. package/lib/component/reducer/actions/ZonesActions.d.ts +79 -15
  162. package/lib/component/reducer/actions/ZonesActions.js +68 -49
  163. package/lib/component/reducer/helper/Zoom1DManager.d.ts +6 -5
  164. package/lib/component/reducer/helper/Zoom1DManager.js +1 -1
  165. package/lib/component/reducer/helper/ZoomHistoryManager.js +2 -2
  166. package/lib/component/reducer/helper/get2DRange.d.ts +7 -1
  167. package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
  168. package/lib/component/reducer/types/ActionType.d.ts +6 -0
  169. package/lib/component/reducer/types/ActionType.js +1 -0
  170. package/lib/component/toolbar/BasicToolBar.js +6 -9
  171. package/lib/component/toolbar/FunctionToolBar.js +4 -9
  172. package/lib/component/toolbar/ToolBar.js +1 -1
  173. package/lib/component/toolbar/ToolTypes.d.ts +2 -2
  174. package/lib/component/utility/Events.d.ts +4 -4
  175. package/lib/component/utility/Events.js +2 -2
  176. package/lib/component/utility/GroupByInfoKey.js +1 -1
  177. package/lib/component/utility/getSpectraObjectPaths.js +1 -1
  178. package/lib/data/PredictionManager.d.ts +5 -8
  179. package/lib/data/PredictionManager.js +3 -3
  180. package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +1 -1
  181. package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
  182. package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.d.ts +2 -3
  183. package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +5 -4
  184. package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.d.ts +5 -3
  185. package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +1 -35
  186. package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +2 -35
  187. package/lib/data/data1d/filter1d/baselineCorrection.d.ts +7 -10
  188. package/lib/data/data1d/multipleSpectraAnalysis.d.ts +1 -1
  189. package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
  190. package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.d.ts +5 -1
  191. package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js +6 -8
  192. package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +2 -0
  193. package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +2 -0
  194. package/lib/data/data2d/Spectrum2D/zones/mapZones.d.ts +2 -0
  195. package/lib/data/matrixGeneration.js +4 -2
  196. package/lib/data/molecules/Molecule.d.ts +3 -3
  197. package/lib/data/molecules/MoleculeManager.d.ts +5 -5
  198. package/lib/data/molecules/MoleculeManager.js +1 -1
  199. package/lib/data/utilities/generateColor.js +1 -1
  200. package/lib/data/utilities/isNumber.d.ts +1 -0
  201. package/lib/data/utilities/isNumber.js +3 -0
  202. package/lib/versionInfo.js +1 -1
  203. package/lib-cjs/component/1d/FooterBanner.js +1 -1
  204. package/lib-cjs/component/1d/Viewer1D.js +25 -20
  205. package/lib-cjs/component/1d/integral/IntegralResizable.js +2 -3
  206. package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
  207. package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +7 -9
  208. package/lib-cjs/component/1d/peaks/PeakAnnotation.js +1 -2
  209. package/lib-cjs/component/1d/ranges/Range.js +9 -8
  210. package/lib-cjs/component/1d/ranges/Ranges.js +5 -7
  211. package/lib-cjs/component/1d/tool/BaseLineZones.js +1 -2
  212. package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +4 -5
  213. package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/index.js +13 -17
  214. package/lib-cjs/component/2d/1d-tracer/Left1DChart.js +1 -1
  215. package/lib-cjs/component/2d/1d-tracer/VerticalSliceChart.js +1 -1
  216. package/lib-cjs/component/2d/Chart2D.js +1 -1
  217. package/lib-cjs/component/2d/Viewer2D.js +10 -9
  218. package/lib-cjs/component/2d/fid/FidCanvas.js +4 -6
  219. package/lib-cjs/component/2d/ft/Contours.js +1 -1
  220. package/lib-cjs/component/2d/utilities/scale.js +1 -1
  221. package/lib-cjs/component/2d/zones/Zones.js +1 -1
  222. package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +28 -21
  223. package/lib-cjs/component/NMRium.js +15 -7
  224. package/lib-cjs/component/context/DispatchContext.js +1 -1
  225. package/lib-cjs/component/context/LoggerContext.js +1 -1
  226. package/lib-cjs/component/elements/Button.js +7 -9
  227. package/lib-cjs/component/elements/IsotopesViewer.js +1 -1
  228. package/lib-cjs/component/elements/ReactTable/ReactTable.js +1 -2
  229. package/lib-cjs/component/elements/Tab/Tabs.js +1 -1
  230. package/lib-cjs/component/elements/formik/FormikCheckBox.js +1 -1
  231. package/lib-cjs/component/elements/formik/FormikColorInput.js +1 -1
  232. package/lib-cjs/component/elements/formik/FormikColorPicker.js +1 -1
  233. package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +1 -1
  234. package/lib-cjs/component/elements/formik/FormikInput.js +1 -1
  235. package/lib-cjs/component/elements/formik/FormikSelect.js +2 -2
  236. package/lib-cjs/component/elements/formik/FormikSlider.js +1 -1
  237. package/lib-cjs/component/elements/formik/FormikTextarea.js +2 -2
  238. package/lib-cjs/component/header/ApodizationOptionsPanel.js +3 -4
  239. package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +1 -2
  240. package/lib-cjs/component/header/BaseLineCorrectionPanel.js +4 -5
  241. package/lib-cjs/component/header/Header.js +4 -6
  242. package/lib-cjs/component/header/PhaseCorrectionPanel.js +7 -8
  243. package/lib-cjs/component/header/RangesPickingOptionPanel.js +1 -2
  244. package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +3 -11
  245. package/lib-cjs/component/header/Zones2DOptionPanel.js +5 -6
  246. package/lib-cjs/component/highlight/index.js +1 -1
  247. package/lib-cjs/component/hooks/useExport.js +1 -0
  248. package/lib-cjs/component/hooks/useTableSortBy.js +1 -1
  249. package/lib-cjs/component/hooks/useToolsFunctions.js +8 -10
  250. package/lib-cjs/component/hooks/useXYReduce.js +1 -1
  251. package/lib-cjs/component/loader/DropZone.js +4 -5
  252. package/lib-cjs/component/loader/NoData.js +1 -1
  253. package/lib-cjs/component/modal/AlignSpectraModal.js +1 -2
  254. package/lib-cjs/component/modal/EditPeakShapeModal.js +1 -2
  255. package/lib-cjs/component/modal/ImportPublicationStringModal.js +1 -2
  256. package/lib-cjs/component/modal/LoadJCAMPModal.js +2 -3
  257. package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +24 -19
  258. package/lib-cjs/component/modal/PredictSpectraModal.js +24 -21
  259. package/lib-cjs/component/modal/changeSum/SelectMolecule.js +1 -1
  260. package/lib-cjs/component/modal/editRange/EditRangeModal.js +3 -4
  261. package/lib-cjs/component/modal/editRange/forms/components/AddSignalFormTab.js +2 -2
  262. package/lib-cjs/component/modal/editRange/forms/components/CouplingsTable.js +1 -1
  263. package/lib-cjs/component/modal/metaImportation/MetaImportationModal.js +2 -3
  264. package/lib-cjs/component/modal/setting/settings-tabs/DatabasesTabContent.js +4 -4
  265. package/lib-cjs/component/modal/setting/settings-tabs/FormattingTabContent.js +2 -2
  266. package/lib-cjs/component/modal/setting/settings-tabs/InfoBlockTabContent.js +2 -2
  267. package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +1 -2
  268. package/lib-cjs/component/panels/AutomaticAssignment/useAutoAssignments.js +7 -6
  269. package/lib-cjs/component/panels/InformationPanel.js +6 -6
  270. package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +11 -20
  271. package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +10 -10
  272. package/lib-cjs/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +1 -1
  273. package/lib-cjs/component/panels/MatrixGenerationPanel/FiltersOptions.js +4 -4
  274. package/lib-cjs/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -2
  275. package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +1 -2
  276. package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +10 -13
  277. package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +4 -5
  278. package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +2 -2
  279. package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +8 -9
  280. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +3 -4
  281. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +1 -2
  282. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
  283. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js +2 -2
  284. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +1 -1
  285. package/lib-cjs/component/panels/Panels.js +1 -1
  286. package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +4 -5
  287. package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +4 -5
  288. package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +12 -15
  289. package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +24 -29
  290. package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +1 -1
  291. package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -3
  292. package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -2
  293. package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +16 -14
  294. package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +16 -16
  295. package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +7 -5
  296. package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +4 -5
  297. package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -7
  298. package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +4 -2
  299. package/lib-cjs/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -2
  300. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -8
  301. package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +39 -34
  302. package/lib-cjs/component/panels/SummaryPanel/utilities/Utilities.js +1 -1
  303. package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +22 -20
  304. package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
  305. package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +6 -7
  306. package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +1 -1
  307. package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +15 -18
  308. package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +2 -51
  309. package/lib-cjs/component/panels/ZonesPanel/hooks/useMapZones.js +56 -0
  310. package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +8 -6
  311. package/lib-cjs/component/panels/filtersPanel/FilterPanel.js +1 -2
  312. package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +8 -9
  313. package/lib-cjs/component/panels/header/DefaultPanelHeader.js +1 -1
  314. package/lib-cjs/component/panels/header/SpectraAutomaticPickingButton.js +2 -3
  315. package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +4 -5
  316. package/lib-cjs/component/reducer/IgnoreActions.js +35 -55
  317. package/lib-cjs/component/reducer/Reducer.js +199 -221
  318. package/lib-cjs/component/reducer/actions/AssignmentsActions.js +3 -3
  319. package/lib-cjs/component/reducer/actions/CorrelationsActions.js +23 -18
  320. package/lib-cjs/component/reducer/actions/DatabaseActions.js +4 -1
  321. package/lib-cjs/component/reducer/actions/DimensionsActions.js +3 -6
  322. package/lib-cjs/component/reducer/actions/DomainActions.js +15 -23
  323. package/lib-cjs/component/reducer/actions/FiltersActions.js +267 -272
  324. package/lib-cjs/component/reducer/actions/GlobalActions.js +4 -4
  325. package/lib-cjs/component/reducer/actions/IntegralsActions.js +19 -18
  326. package/lib-cjs/component/reducer/actions/LoadActions.js +55 -55
  327. package/lib-cjs/component/reducer/actions/MoleculeActions.js +31 -22
  328. package/lib-cjs/component/reducer/actions/PeaksActions.js +23 -15
  329. package/lib-cjs/component/reducer/actions/PreferencesActions.js +7 -5
  330. package/lib-cjs/component/reducer/actions/RangesActions.js +81 -64
  331. package/lib-cjs/component/reducer/actions/SpectrumsActions.js +77 -67
  332. package/lib-cjs/component/reducer/actions/ToolsActions.js +54 -31
  333. package/lib-cjs/component/reducer/actions/ZonesActions.js +73 -52
  334. package/lib-cjs/component/reducer/core/Constants.js +1 -1
  335. package/lib-cjs/component/reducer/helper/Zoom1DManager.js +2 -2
  336. package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +2 -2
  337. package/lib-cjs/component/reducer/types/ActionType.js +2 -0
  338. package/lib-cjs/component/toolbar/BasicToolBar.js +6 -9
  339. package/lib-cjs/component/toolbar/FunctionToolBar.js +4 -9
  340. package/lib-cjs/component/toolbar/ToolBar.js +1 -1
  341. package/lib-cjs/component/utility/GroupByInfoKey.js +1 -1
  342. package/lib-cjs/component/utility/getSpectraObjectPaths.js +1 -1
  343. package/lib-cjs/data/PredictionManager.js +3 -3
  344. package/lib-cjs/data/SpectraManager.js +1 -1
  345. package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +1 -1
  346. package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
  347. package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +5 -4
  348. package/lib-cjs/data/data1d/multipleSpectraAnalysis.js +2 -2
  349. package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
  350. package/lib-cjs/data/data2d/Spectrum2D/zones/changeZoneSignal.js +6 -8
  351. package/lib-cjs/data/matrixGeneration.js +4 -2
  352. package/lib-cjs/data/molecules/MoleculeManager.js +1 -1
  353. package/lib-cjs/data/utilities/generateColor.js +1 -1
  354. package/lib-cjs/data/utilities/isNumber.js +7 -0
  355. package/lib-cjs/versionInfo.js +1 -1
  356. package/package.json +24 -23
  357. package/lib/component/reducer/actions/HistoryActions.d.ts +0 -4
  358. package/lib/component/reducer/actions/HistoryActions.js +0 -40
  359. package/lib/component/reducer/types/HistoryTypes.d.ts +0 -4
  360. package/lib/component/reducer/types/HistoryTypes.js +0 -4
  361. package/lib/component/reducer/types/Types.d.ts +0 -132
  362. package/lib/component/reducer/types/Types.js +0 -126
  363. package/lib/component/toolbar/HistoryToolBar.d.ts +0 -8
  364. package/lib/component/toolbar/HistoryToolBar.js +0 -30
  365. package/lib/data/utilities/isMolFileEmpty.d.ts +0 -1
  366. package/lib/data/utilities/isMolFileEmpty.js +0 -6
  367. package/lib-cjs/component/reducer/actions/HistoryActions.js +0 -45
  368. package/lib-cjs/component/reducer/types/HistoryTypes.js +0 -7
  369. package/lib-cjs/component/reducer/types/Types.js +0 -131
  370. package/lib-cjs/component/toolbar/HistoryToolBar.js +0 -35
  371. package/lib-cjs/data/utilities/isMolFileEmpty.js +0 -10
@@ -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) {
@@ -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();
@@ -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
  }
@@ -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.37.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.37.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,18 +58,18 @@
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
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
71
  "filelist-utils": "^1.9.0",
72
- "formik": "^2.2.9",
72
+ "formik": "^2.4.1",
73
73
  "immer": "^10.0.2",
74
74
  "jszip": "^3.10.1",
75
75
  "lodash": "^4.17.21",
@@ -85,8 +85,8 @@
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,16 +95,16 @@
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.1",
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",
@@ -113,36 +113,37 @@
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
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.2.4",
121
+ "@types/node": "^20.2.5",
122
122
  "@types/papaparse": "^5.3.7",
123
- "@types/react": "^18.2.7",
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.1",
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.41.0",
131
- "eslint-config-zakodium": "^7.2.0",
130
+ "eslint": "^8.42.0",
131
+ "eslint-config-cheminfo-react": "^9.1.0",
132
+ "eslint-config-cheminfo-typescript": "^11.3.1",
132
133
  "modern-normalize": "^2.0.0",
133
134
  "postcss-styled-syntax": "^0.4.0",
134
135
  "prettier": "^2.8.8",
135
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.2",
139
+ "react-router-dom": "^6.12.0",
139
140
  "rimraf": "^5.0.1",
140
141
  "rollup-plugin-analyzer": "^4.0.0",
141
142
  "serve": "^14.2.0",
142
- "stylelint": "^15.6.2",
143
+ "stylelint": "^15.7.0",
143
144
  "stylelint-config-standard": "^33.0.0",
144
- "typescript": "~5.0.4",
145
- "vite": "^4.3.8",
146
- "vitest": "^0.31.1"
145
+ "typescript": "~5.1.3",
146
+ "vite": "^4.3.9",
147
+ "vitest": "^0.32.0"
147
148
  }
148
149
  }
@@ -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';
@@ -1,132 +0,0 @@
1
- export type ActionType<Action, Payload = void> = Payload extends void ? {
2
- type: Action;
3
- } : {
4
- type: Action;
5
- payload: Payload;
6
- };
7
- export declare const INITIATE = "INITIATE";
8
- export declare const LOAD_DROP_FILES = "LOAD_DROP_FILES";
9
- export declare const ADD_PEAK = "ADD_PEAK";
10
- export declare const ADD_PEAKS = "ADD_PEAKS";
11
- export declare const CHANGE_PEAK_SHAPE = "CHANGE_PEAK_SHAPE";
12
- export declare const DELETE_PEAK_NOTATION = "DELETE_PEAK_NOTATION";
13
- export declare const SHIFT_SPECTRUM = "SHIFT_SPECTRUM";
14
- export declare const SET_X_DOMAIN = "SET_X_DOMAIN";
15
- export declare const SET_Y_DOMAIN = "SET_Y_DOMAIN";
16
- export declare const SET_ORIGINAL_DOMAIN = "SET_ORIGINAL_DOMAIN";
17
- export declare const SET_WIDTH = "SET_WIDTH";
18
- export declare const SET_DIMENSIONS = "SET_DIMENSIONS";
19
- export declare const SET_SELECTED_TOOL = "SET_SELECTED_TOOL";
20
- export declare const SET_SELECTED_FILTER = "SET_SELECTED_FILTER";
21
- export declare const CHANGE_SPECTRUM_SETTING = "CHANGE_SPECTRUM_SETTING";
22
- export declare const CHANGE_SPECTRUM_TYPE = "CHANGE_SPECTRUM_TYPE";
23
- export declare const FULL_ZOOM_OUT = "FULL_ZOOM_OUT";
24
- export declare const CHANGE_VISIBILITY = "CHANGE_VISIBILITY";
25
- export declare const CHANGE_ACTIVE_SPECTRUM = "CHANGE_ACTIVE_SPECTRUM";
26
- export declare const CHANGE_SPECTRUM_COLOR = "CHANGE_SPECTRUM_COLOR";
27
- export declare const ADD_INTEGRAL = "ADD_INTEGRAL";
28
- export declare const DELETE_INTEGRAL = "DELETE_INTEGRAL";
29
- export declare const TOGGLE_REAL_IMAGINARY_VISIBILITY = "TOGGLE_REAL_IMAGINARY_VISIBILITY";
30
- export declare const SET_ZOOM = "SET_ZOOM";
31
- export declare const ADD_MOLECULE = "ADD_MOLECULE";
32
- export declare const SET_MOLECULE = "SET_MOLECULE";
33
- export declare const DELETE_MOLECULE = "DELETE_MOLECULE";
34
- export declare const FLOAT_MOLECULE_OVER_SPECTRUM = "FLOAT_MOLECULE_OVER_SPECTRUM";
35
- export declare const TOGGLE_MOLECULE_ATOM_NUMBER = "TOGGLE_MOLECULE_ATOM_NUMBER";
36
- export declare const CHANGE_FLOAT_MOLECULE_POSITION = "CHANGE_FLOAT_MOLECULE_POSITION";
37
- export declare const CHANGE_MOLECULE_LABEL = "CHANGE_MOLECULE_LABEL";
38
- export declare const SET_CORRELATION = "SET_CORRELATION";
39
- export declare const SET_CORRELATIONS = "SET_CORRELATIONS";
40
- export declare const DELETE_CORRELATION = "DELETE_CORRELATION";
41
- export declare const SET_CORRELATIONS_MF = "SET_CORRELATIONS_MF";
42
- export declare const SET_CORRELATIONS_TOLERANCE = "SET_CORRELATIONS_TOLERANCE";
43
- export declare const DELETE_SPECTRA = "DELETE_SPECTRA";
44
- export declare const CHANGE_SPECTRUM_DISPLAY_VIEW_MODE = "CHANGE_SPECTRUM_DISPLAY_VIEW_MODE";
45
- export declare const RESIZE_INTEGRAL = "RESIZE_INTEGRAL";
46
- export declare const BRUSH_END = "BRUSH_END";
47
- export declare const RESET_DOMAIN = "RESET_X_DOMAIN";
48
- export declare const ENABLE_FILTER = "ENABLE_FILTER";
49
- export declare const DELETE_FILTER = "DELETE_FILTER";
50
- export declare const DELETE_SPECTRA_FILTER = "DELETE_SPECTRA_FILTER";
51
- export declare const APPLY_ZERO_FILLING_FILTER = "APPLY_ZERO_FILLING_FILTER";
52
- export declare const APPLY_APODIZATION_FILTER = "APPLY_APODIZATION_FILTER";
53
- export declare const APPLY_FFT_FILTER = "APPLY_FFT_FILTER";
54
- export declare const CALCULATE_MANUAL_PHASE_CORRECTION_FILTER = "CALCULATE_MANUAL_PHASE_CORRECTION_FILTER";
55
- export declare const CALCULATE_BASE_LINE_CORRECTION_FILTER = "CALCULATE_BASE_LINE_CORRECTION_FILTER";
56
- export declare const CALCULATE_APODIZATION_FILTER = "CALCULATE_APODIZATION_FILTER`";
57
- export declare const CALCULATE_ZERO_FILLING_FILTER = "CALCULATE_ZERO_FILLING_FILTER`";
58
- export declare const APPLY_MANUAL_PHASE_CORRECTION_FILTER = "APPLY_MANUAL_PHASE_CORRECTION_FILTER";
59
- export declare const APPLY_AUTO_PHASE_CORRECTION_FILTER = "APPLY_AUTO_PHASE_CORRECTION_FILTER";
60
- export declare const APPLY_ABSOLUTE_FILTER = "APPLY_ABSOLUTE_FILTER";
61
- export declare const SET_VERTICAL_INDICATOR_X_POSITION = "SET_VERTICAL_INDICATOR_X_POSITION";
62
- export declare const AUTO_PEAK_PICKING = "AUTO_PEAK_PICKING";
63
- export declare const OPTIMIZE_PEAKS = "OPTIMIZE_PEAKS";
64
- export declare const AUTO_RANGES_DETECTION = "AUTO_RANGES_DETECTION";
65
- export declare const AUTO_ZONES_DETECTION = "AUTO_ZONES_DETECTION";
66
- export declare const DELETE_RANGE = "DELETE_RANGE";
67
- export declare const DELETE_1D_SIGNAL = "DELETE_1D_SIGNAL";
68
- export declare const SET_LOADING_FLAG = "SET_LOADING_FLAG";
69
- export declare const RESET_SELECTED_TOOL = "RESET_SELECTED_TOOL";
70
- export declare const SET_SPECTRUMS_VERTICAL_ALIGN = "SET_SPECTRUMS_VERTICAL_AlIGN";
71
- export declare const SAVE_AS_SVG = "SAVE_AS_SVG";
72
- export declare const CHANGE_INTEGRAL_DATA = "CHANGE_INTEGRAL_DATA";
73
- export declare const SET_ACTIVE_TAB = "SET_ACTIVE_TAB";
74
- export declare const CHANGE_INTEGRAL_SUM = "CHANGE_INTEGRAL_SUM";
75
- export declare const ADD_BASE_LINE_ZONE = "ADD_BASE_LINE_ZONE";
76
- export declare const DELETE_BASE_LINE_ZONE = "DELETE_BASE_LINE_ZONE";
77
- export declare const APPLY_BASE_LINE_CORRECTION_FILTER = "APPLY_BASE_LINE_CORRECTION_FILTER";
78
- export declare const SET_KEY_PREFERENCES = "SET_KEY_PREFERENCES";
79
- export declare const APPLY_KEY_PREFERENCES = "APPLY_KEY_PREFERENCES";
80
- export declare const RESIZE_RANGE = "RESIZE_RANGE";
81
- export declare const CHANGE_RANGE_SUM = "CHANGE_RANGE_SUM";
82
- export declare const ADD_RANGE = "ADD_RANGE";
83
- export declare const SET_2D_LEVEL = "SET_2D_LEVEL";
84
- export declare const ADD_2D_ZONE = "ADD_2D_ZONE";
85
- export declare const DELETE_2D_ZONE = "DELETE_2D_ZONE";
86
- export declare const DELETE_2D_SIGNAL = "DELETE_2D_SIGNAL";
87
- export declare const SET_2D_SIGNAL_PATH_LENGTH = "SET_2D_SIGNAL_PATH_LENGTH";
88
- export declare const ADD_MISSING_PROJECTION = "ADD_MISSING_PROJECTION";
89
- export declare const SET_FILTER_SNAPSHOT = "SET_FILTER_SNAPSHOT";
90
- export declare const CHANGE_RANGE_RELATIVE = "CHANGE_RANGE_RELATIVE";
91
- export declare const CHANGE_RANGE_SIGNAL_VALUE = "CHANGE_RANGE_SIGNAL_VALUE";
92
- export declare const CHANGE_RANGE_SIGNAL_KIND = "CHANGE_RANGE_SIGNAL_KIND";
93
- export declare const SAVE_EDITED_RANGE = "SAVE_EDITED_RANGE";
94
- export declare const UNLINK_RANGE = "UNLINK_RANGE";
95
- export declare const SET_DIAID_RANGE = "SET_DIAID_RANGE";
96
- export declare const CHANGE_INTEGRAL_RELATIVE = "CHANGE_INTEGRAL_RELATIVE";
97
- export declare const ALIGN_SPECTRA = "ALIGN_SPECTRA";
98
- export declare const CHANGE_ZONE_SIGNAL_VALUE = "CHANGE_ZONE_SIGNAL_VALUE";
99
- export declare const CHANGE_ZONE_SIGNAL_KIND = "CHANGE_ZONE_SIGNAL_KIND";
100
- export declare const SAVE_EDITED_ZONE = "SAVE_EDITED_ZONE";
101
- export declare const UNLINK_ZONE = "UNLINK_ZONE";
102
- export declare const SET_DIAID_ZONE = "SET_DIAID_ZONE";
103
- export declare const PREDICT_SPECTRA = "PREDICT_SPECTRA";
104
- export declare const SET_SPECTRA_SAME_TOP = "SET_SPECTRA_SAME_TOP";
105
- export declare const RESET_SPECTRA_SCALE = "RESET_SPECTRA_SCALE";
106
- export declare const SET_MOUSE_OVER_DISPLAYER = "SET_MOUSE_OVER_DISPLAYER";
107
- export declare const APPLY_MULTIPLE_SPECTRA_FILTER = "APPLY_MULTIPLE_SPECTRA_FILTER";
108
- export declare const ADD_EXCLUSION_ZONE = "ADD_EXCLUSION_ZONE";
109
- export declare const DELETE_EXCLUSION_ZONE = "DELETE_EXCLUSION_ZONE";
110
- export declare const CHANGE_RANGES_SUM_FLAG = "CHANGE_RANGES_SUM_FLAG";
111
- export declare const CHANGE_INTEGRALS_SUM_FLAG = "CHANGE_INTEGRALS_SUM_FLAG";
112
- export declare const CHANGE_ZONES_NOISE_FACTOR = "CHANGE_ZONES_NOISE_FACTOR";
113
- export declare const UPDATE_RANGE = "UPDATE_RANGE";
114
- export declare const SHOW_MULTIPLICITY_TREES = "SHOW_MULTIPLICITY_TREES";
115
- export declare const SHOW_RANGES_INTEGRALS = "SHOW_RANGES_INTEGRALS";
116
- export declare const AUTO_RANGES_SPECTRA_PICKING = "AUTO_RANGES_SPECTRA_PICKING";
117
- export declare const AUTO_ZONES_SPECTRA_PICKING = "AUTO_ZONES_SPECTRA_PICKING";
118
- export declare const SHOW_ZONES = "SHOW_ZONES";
119
- export declare const SHOW_ZONES_SIGNALS = "SHOW_ZONES_SIGNALS";
120
- export declare const SHOW_ZONES_PEAKS = "SHOW_ZONES_PEAKS";
121
- export declare const GENERATE_SPECTRUM_FROM_PUBLICATION_STRING = "GENERATE_SPECTRUM_FROM_PUBLICATION_STRING";
122
- export declare const RESURRECTING_SPECTRUM_FROM_RANGES = "RESURRECTING_SPECTRUM_FROM_RANGES";
123
- export declare const RESURRECTING_SPECTRUM_FROM_JCAMP = "RESURRECTING_SPECTRUM_FROM_JCAMP";
124
- export declare const SHOW_J_GRAPH = "SHOW_J_GRAPH";
125
- export declare const SET_AUTOMATIC_ASSIGNMENTS = "SET_AUTOMATIC_ASSIGNMENTS";
126
- export declare const TOGGLE_PEAKS_VIEW_PROPERTY = "TOGGLE_PEAKS_VIEW_PROPERTY";
127
- export declare const ORDER_MULTIPLE_SPECTRA_ANALYSIS = "ORDER_MULTIPLE_SPECTRA_ANALYSIS";
128
- export declare const APPLY_SIGNAL_PROCESSING_FILTER = "APPLY_SIGNAL_PROCESSING_FILTER";
129
- export declare const IMPORT_SPECTRA_META_INFO = "IMPORT_SPECTRA_META_INFO";
130
- export declare const TOGGLE_SPECTRA_LEGEND = "TOGGLE_SPECTRA_LEGEND";
131
- export declare const RECOLOR_SPECTRA_COLOR = "RECOLOR_SPECTRA_COLOR";
132
- export declare const ORDER_SPECTRA = "ORDER_SPECTRA";