nmrium 0.26.0 → 0.27.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 (425) hide show
  1. package/lib/component/1d/Chart1D.js +3 -2
  2. package/lib/component/1d/FooterBanner.js +1 -1
  3. package/lib/component/1d/Integral.d.ts +2 -1
  4. package/lib/component/1d/Integral.js +5 -12
  5. package/lib/component/1d/IntegralResizable.d.ts +2 -1
  6. package/lib/component/1d/IntegralResizable.js +10 -5
  7. package/lib/component/1d/IntegralsSeries.js +3 -3
  8. package/lib/component/1d/Line.d.ts +2 -2
  9. package/lib/component/1d/PeakAnnotation.js +5 -4
  10. package/lib/component/1d/database/DatabaseElements.d.ts +3 -0
  11. package/lib/component/1d/database/DatabaseElements.js +18 -0
  12. package/lib/component/1d/database/DatabaseSpectrum.d.ts +3 -0
  13. package/lib/component/1d/database/DatabaseSpectrum.js +58 -0
  14. package/lib/component/1d/{ResurrectedDatabaseRanges.d.ts → database/ResurrectedDatabaseRanges.d.ts} +0 -0
  15. package/lib/component/1d/{ResurrectedDatabaseRanges.js → database/ResurrectedDatabaseRanges.js} +9 -6
  16. package/lib/component/1d/jCouplingGraph/JGraph.js +4 -10
  17. package/lib/component/1d/multiAnalysis/AnalysisRange.js +10 -5
  18. package/lib/component/1d/ranges/Range.d.ts +2 -1
  19. package/lib/component/1d/ranges/Range.js +17 -9
  20. package/lib/component/1d/ranges/Ranges.js +6 -3
  21. package/lib/component/1d/tool/XLabelPointer.js +1 -1
  22. package/lib/component/2d/Chart2D.js +2 -1
  23. package/lib/component/2d/Contours.js +4 -1
  24. package/lib/component/2d/FooterBanner.js +1 -1
  25. package/lib/component/2d/tools/XYLabelPointer.js +1 -1
  26. package/lib/component/2d/tools/slicing/HorizontalSliceChart.d.ts +2 -2
  27. package/lib/component/2d/tools/slicing/SliceScale.d.ts +1 -1
  28. package/lib/component/2d/tools/slicing/VerticalSliceChart.d.ts +2 -2
  29. package/lib/component/EventsTrackers/KeysListenerTracker.js +10 -4
  30. package/lib/component/NMRium.d.ts +5 -1
  31. package/lib/component/NMRium.js +6 -3
  32. package/lib/component/SplitPaneWrapper.d.ts +4 -0
  33. package/lib/component/SplitPaneWrapper.js +8 -0
  34. package/lib/component/context/GlobalContext.d.ts +3 -0
  35. package/lib/component/context/GlobalContext.js +1 -1
  36. package/lib/component/context/PreferencesContext.d.ts +15 -12
  37. package/lib/component/context/PreferencesContext.js +1 -1
  38. package/lib/component/elements/Button.js +1 -1
  39. package/lib/component/elements/ColorInput.js +2 -2
  40. package/lib/component/elements/ContextMenu.d.ts +8 -3
  41. package/lib/component/elements/EditableColumn.d.ts +3 -2
  42. package/lib/component/elements/EditableColumn.js +27 -20
  43. package/lib/component/elements/Input.d.ts +9 -1
  44. package/lib/component/elements/Input.js +18 -5
  45. package/lib/component/elements/Select.d.ts +1 -0
  46. package/lib/component/elements/Select.js +21 -15
  47. package/lib/component/elements/ToggleButton.d.ts +2 -1
  48. package/lib/component/elements/ToggleButton.js +2 -2
  49. package/lib/component/elements/draggble/SVGDraggable.d.ts +17 -0
  50. package/lib/component/elements/draggble/SVGDraggable.js +33 -0
  51. package/lib/component/elements/{resizer → draggble}/useDraggable.d.ts +9 -6
  52. package/lib/component/elements/draggble/useDraggable.js +70 -0
  53. package/lib/component/elements/formik/FormikColorPicker.d.ts +1 -0
  54. package/lib/component/elements/formik/FormikColorPicker.js +10 -7
  55. package/lib/component/elements/formik/FormikColumnFormatField.d.ts +5 -4
  56. package/lib/component/elements/formik/FormikColumnFormatField.js +2 -2
  57. package/lib/component/elements/formik/FormikInput.d.ts +1 -0
  58. package/lib/component/elements/formik/FormikInput.js +6 -3
  59. package/lib/component/elements/formik/FormikSlider.d.ts +1 -0
  60. package/lib/component/elements/formik/FormikSlider.js +6 -3
  61. package/lib/component/elements/popup/Alert/Provider.js +1 -1
  62. package/lib/component/elements/resizer/DivResizer.js +17 -62
  63. package/lib/component/elements/resizer/Resizer.d.ts +3 -1
  64. package/lib/component/elements/resizer/SVGResizer.js +24 -53
  65. package/lib/component/elements/resizer/useResizer.d.ts +11 -0
  66. package/lib/component/elements/resizer/useResizer.js +65 -0
  67. package/lib/component/hooks/useExport.d.ts +1 -1
  68. package/lib/component/hooks/useFormatNumberByNucleus.d.ts +3 -0
  69. package/lib/component/{utility/FormatNumber.js → hooks/useFormatNumberByNucleus.js} +0 -9
  70. package/lib/component/hooks/usePanelPreferences.d.ts +7 -0
  71. package/lib/component/hooks/usePanelPreferences.js +54 -0
  72. package/lib/component/hooks/useXYReduce.d.ts +2 -2
  73. package/lib/component/loader/DefaultSpinnerComponent.d.ts +3 -1
  74. package/lib/component/loader/DefaultSpinnerComponent.js +2 -2
  75. package/lib/component/loader/SpinnerContext.d.ts +3 -3
  76. package/lib/component/loader/SpinnerContext.js +2 -2
  77. package/lib/component/modal/MoleculeStructureEditorModal.d.ts +3 -4
  78. package/lib/component/modal/MoleculeStructureEditorModal.js +22 -1
  79. package/lib/component/modal/editRange/EditRangeModal.js +6 -5
  80. package/lib/component/modal/editRange/forms/components/AddSignalFormTab.d.ts +2 -0
  81. package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +3 -6
  82. package/lib/component/modal/editRange/forms/components/SignalsForm.d.ts +3 -1
  83. package/lib/component/modal/editRange/forms/components/SignalsForm.js +12 -9
  84. package/lib/component/modal/setting/DatabasesTabContent.d.ts +6 -0
  85. package/lib/component/modal/setting/DatabasesTabContent.js +75 -0
  86. package/lib/component/modal/setting/DisplayTabContent.js +11 -7
  87. package/lib/component/modal/setting/FormattingTabContent.js +5 -5
  88. package/lib/component/modal/setting/GeneralSettings.js +2 -1
  89. package/lib/component/modal/setting/settingsValidation.d.ts +48 -0
  90. package/lib/component/modal/setting/settingsValidation.js +33 -27
  91. package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +10 -5
  92. package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts +0 -1
  93. package/lib/component/panels/IntegralsPanel/IntegralPanel.js +2 -5
  94. package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +2 -2
  95. package/lib/component/panels/IntegralsPanel/IntegralTable.js +10 -11
  96. package/lib/component/panels/IntegralsPanel/IntegralsPreferences.d.ts +1 -1
  97. package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +26 -74
  98. package/lib/component/panels/MoleculesPanel/MoleculeHeader.d.ts +8 -0
  99. package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +38 -0
  100. package/lib/component/panels/MoleculesPanel/MoleculePanel.js +12 -23
  101. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +10 -2
  102. package/lib/component/panels/MoleculesPanel/Utilities.d.ts +12 -1
  103. package/lib/component/panels/MoleculesPanel/Utilities.js +11 -0
  104. package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +1 -1
  105. package/lib/component/panels/Panels.js +2 -3
  106. package/lib/component/panels/PeaksPanel/PeaksPanel.js +3 -3
  107. package/lib/component/panels/PeaksPanel/PeaksPreferences.d.ts +1 -1
  108. package/lib/component/panels/PeaksPanel/PeaksPreferences.js +29 -82
  109. package/lib/component/panels/PeaksPanel/PeaksTable.d.ts +1 -5
  110. package/lib/component/panels/PeaksPanel/PeaksTable.js +18 -25
  111. package/lib/component/panels/RangesPanel/RangesHeader.d.ts +2 -1
  112. package/lib/component/panels/RangesPanel/RangesHeader.js +15 -9
  113. package/lib/component/panels/RangesPanel/RangesPanel.js +4 -10
  114. package/lib/component/panels/RangesPanel/RangesPreferences.d.ts +1 -1
  115. package/lib/component/panels/RangesPanel/RangesPreferences.js +55 -66
  116. package/lib/component/panels/RangesPanel/RangesTable.d.ts +11 -6
  117. package/lib/component/panels/RangesPanel/RangesTable.js +3 -7
  118. package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +5 -2
  119. package/lib/component/panels/RangesPanel/RangesTableRow.js +3 -3
  120. package/lib/component/panels/RangesPanel/TableColumns/AbsoluteColumn.js +2 -2
  121. package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.d.ts +2 -1
  122. package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.js +2 -2
  123. package/lib/component/panels/RangesPanel/TableColumns/CouplingColumn.d.ts +2 -1
  124. package/lib/component/panels/RangesPanel/TableColumns/CouplingColumn.js +5 -2
  125. package/lib/component/panels/RangesPanel/TableColumns/RangeColumn.js +2 -2
  126. package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +2 -2
  127. package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.d.ts +2 -2
  128. package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +3 -4
  129. package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.d.ts +13 -0
  130. package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js +14 -0
  131. package/lib/component/panels/RangesPanel/TableColumns/format.js +2 -2
  132. package/lib/component/panels/SpectrumsPanel/base/setting/PlotChart.d.ts +18 -0
  133. package/lib/component/panels/SpectrumsPanel/base/setting/PlotChart.js +18 -0
  134. package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.d.ts +1 -2
  135. package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.js +7 -68
  136. package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +1 -8
  137. package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.d.ts +1 -2
  138. package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.js +7 -68
  139. package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +8 -21
  140. package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +2 -2
  141. package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.d.ts +6 -0
  142. package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +51 -0
  143. package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +1 -1
  144. package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.d.ts +5 -1
  145. package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +3 -2
  146. package/lib/component/panels/ZonesPanel/ZonesPreferences.d.ts +1 -1
  147. package/lib/component/panels/ZonesPanel/ZonesPreferences.js +20 -84
  148. package/lib/component/panels/ZonesPanel/ZonesTable.js +4 -1
  149. package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +5 -1
  150. package/lib/component/panels/ZonesPanel/ZonesTableRow.js +2 -2
  151. package/lib/component/panels/databasePanel/DatabasePanel.js +73 -40
  152. package/lib/component/panels/databasePanel/DatabasePreferences.js +10 -42
  153. package/lib/component/panels/databasePanel/DatabaseTable.js +23 -11
  154. package/lib/component/panels/databasePanel/useDatabases.d.ts +5 -0
  155. package/lib/component/panels/databasePanel/useDatabases.js +10 -0
  156. package/lib/component/panels/extra/placeholder/NoTableData.d.ts +3 -1
  157. package/lib/component/panels/extra/placeholder/NoTableData.js +2 -2
  158. package/lib/component/panels/extra/preferences/ColumnsHelper.js +3 -3
  159. package/lib/component/panels/extra/preferences/NucleusPreferences.d.ts +13 -0
  160. package/lib/component/panels/extra/preferences/NucleusPreferences.js +22 -0
  161. package/lib/component/panels/extra/preferences/PreferencesContainer.d.ts +6 -0
  162. package/lib/component/panels/extra/preferences/PreferencesContainer.js +10 -0
  163. package/lib/component/panels/extra/preferences/PreferencesGroup.d.ts +7 -0
  164. package/lib/component/panels/extra/preferences/PreferencesGroup.js +21 -0
  165. package/lib/component/reducer/Reducer.d.ts +358 -45
  166. package/lib/component/reducer/Reducer.js +5 -1
  167. package/lib/component/reducer/actions/LoadActions.js +2 -2
  168. package/lib/component/reducer/actions/MoleculeActions.d.ts +4 -2
  169. package/lib/component/reducer/actions/MoleculeActions.js +15 -3
  170. package/lib/component/reducer/actions/PreferencesActions.js +1 -1
  171. package/lib/component/reducer/actions/ToolsActions.js +1 -1
  172. package/lib/component/reducer/preferences/actions/addWorkspace.d.ts +3 -0
  173. package/lib/component/reducer/preferences/actions/addWorkspace.js +19 -0
  174. package/lib/component/reducer/preferences/actions/initPreferences.d.ts +3 -0
  175. package/lib/component/reducer/preferences/actions/initPreferences.js +60 -0
  176. package/lib/component/reducer/preferences/actions/removeWorkspace.d.ts +3 -0
  177. package/lib/component/reducer/preferences/actions/removeWorkspace.js +20 -0
  178. package/lib/component/reducer/preferences/actions/resetPreferences.d.ts +3 -0
  179. package/lib/component/reducer/preferences/actions/resetPreferences.js +14 -0
  180. package/lib/component/reducer/preferences/actions/setPanelsPreferences.d.ts +3 -0
  181. package/lib/component/reducer/preferences/actions/setPanelsPreferences.js +13 -0
  182. package/lib/component/reducer/preferences/actions/setPreferences.d.ts +3 -0
  183. package/lib/component/reducer/preferences/actions/setPreferences.js +34 -0
  184. package/lib/component/reducer/preferences/actions/setWorkspace.d.ts +3 -0
  185. package/lib/component/reducer/preferences/actions/setWorkspace.js +8 -0
  186. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts +7 -0
  187. package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +55 -0
  188. package/lib/component/reducer/{preferencesReducer.d.ts → preferences/preferencesReducer.d.ts} +131 -7
  189. package/lib/component/reducer/preferences/preferencesReducer.js +80 -0
  190. package/lib/component/reducer/preferences/utilites/checkKeysExists.d.ts +1 -0
  191. package/lib/component/reducer/preferences/utilites/checkKeysExists.js +14 -0
  192. package/lib/component/reducer/preferences/utilites/filterObject.d.ts +1 -0
  193. package/lib/component/reducer/preferences/utilites/filterObject.js +7 -0
  194. package/lib/component/reducer/preferences/utilites/flatObject.d.ts +1 -0
  195. package/lib/component/reducer/preferences/utilites/flatObject.js +9 -0
  196. package/lib/component/reducer/preferences/utilites/getActiveWorkspace.d.ts +3 -0
  197. package/lib/component/reducer/preferences/utilites/getActiveWorkspace.js +3 -0
  198. package/lib/component/reducer/preferences/utilites/getPreferencesByWorkspace.d.ts +2 -0
  199. package/lib/component/reducer/preferences/utilites/getPreferencesByWorkspace.js +4 -0
  200. package/lib/component/reducer/preferences/utilites/mapNucleiFormatting.d.ts +5 -0
  201. package/lib/component/reducer/preferences/utilites/mapNucleiFormatting.js +8 -0
  202. package/lib/component/reducer/types/Types.d.ts +2 -0
  203. package/lib/component/reducer/types/Types.js +2 -0
  204. package/lib/component/tool/FloatMoleculeStructures/ActionsButton.d.ts +4 -0
  205. package/lib/component/tool/FloatMoleculeStructures/ActionsButton.js +7 -0
  206. package/lib/component/tool/FloatMoleculeStructures/DraggableStructure.d.ts +14 -0
  207. package/lib/component/tool/FloatMoleculeStructures/DraggableStructure.js +43 -0
  208. package/lib/component/tool/FloatMoleculeStructures/index.d.ts +15 -0
  209. package/lib/component/tool/FloatMoleculeStructures/index.js +28 -0
  210. package/lib/component/utility/Export.js +6 -0
  211. package/lib/component/utility/PathBuilder.js +2 -1
  212. package/lib/component/utility/formatNumber.d.ts +3 -0
  213. package/lib/component/utility/formatNumber.js +10 -0
  214. package/lib/component/utility/getUniqueNuclei.d.ts +1 -0
  215. package/lib/component/utility/getUniqueNuclei.js +10 -0
  216. package/lib/component/workspaces/Workspace.d.ts +72 -1
  217. package/lib/component/workspaces/basic.js +9 -1
  218. package/lib/component/workspaces/embedded.d.ts +2 -0
  219. package/lib/component/workspaces/embedded.js +32 -0
  220. package/lib/component/workspaces/exercise.js +2 -0
  221. package/lib/component/workspaces/index.d.ts +1 -0
  222. package/lib/component/workspaces/index.js +2 -1
  223. package/lib/component/workspaces/prediction.js +2 -0
  224. package/lib/component/workspaces/process1D.js +2 -0
  225. package/lib/data/data1d/Data1DManager.js +4 -0
  226. package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.d.ts +2 -0
  227. package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.js +10 -0
  228. package/lib/data/data1d/Spectrum1D/get1DDataXY.d.ts +2 -2
  229. package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +2 -1
  230. package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +1 -1
  231. package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +2 -1
  232. package/lib/data/data1d/database.d.ts +8 -13
  233. package/lib/data/data1d/database.js +14 -19
  234. package/lib/data/data1d/filter1d/absolute.d.ts +3 -2
  235. package/lib/data/data1d/filter1d/autoPhaseCorrection.d.ts +3 -2
  236. package/lib/data/data1d/filter1d/baselineCorrection.d.ts +3 -2
  237. package/lib/data/data1d/filter1d/centerMean.d.ts +3 -2
  238. package/lib/data/data1d/filter1d/digitalFilter.d.ts +3 -2
  239. package/lib/data/data1d/filter1d/equallySpaced.d.ts +3 -2
  240. package/lib/data/data1d/filter1d/exclusionZones.js +4 -4
  241. package/lib/data/data1d/filter1d/fft.d.ts +3 -2
  242. package/lib/data/data1d/filter1d/fft.js +2 -2
  243. package/lib/data/data1d/filter1d/fromTo.d.ts +3 -2
  244. package/lib/data/data1d/filter1d/lineBroadening.d.ts +3 -2
  245. package/lib/data/data1d/filter1d/lineBroadening.js +1 -1
  246. package/lib/data/data1d/filter1d/pareto.d.ts +3 -2
  247. package/lib/data/data1d/filter1d/pareto.js +2 -2
  248. package/lib/data/data1d/filter1d/phaseCorrection.d.ts +3 -2
  249. package/lib/data/data1d/filter1d/shiftX.d.ts +2 -1
  250. package/lib/data/data1d/filter1d/standardDeviation.d.ts +3 -2
  251. package/lib/data/data1d/filter1d/zeroFilling.d.ts +3 -2
  252. package/lib/data/data1d/filter1d/zeroFilling.js +1 -1
  253. package/lib/data/data2d/Data2DManager.js +4 -0
  254. package/lib/data/data2d/filter2d/shiftX.d.ts +4 -3
  255. package/lib/data/data2d/filter2d/shiftX.js +2 -2
  256. package/lib/data/data2d/filter2d/shiftY.d.ts +4 -3
  257. package/lib/data/data2d/filter2d/shiftY.js +2 -2
  258. package/lib/data/molecules/Molecule.d.ts +3 -3
  259. package/lib/data/molecules/Molecule.js +7 -1
  260. package/lib/data/molecules/MoleculeManager.d.ts +4 -1
  261. package/lib/data/molecules/MoleculeManager.js +33 -2
  262. package/lib/data/types/data1d/Data1D.d.ts +3 -3
  263. package/lib/data/types/data1d/Info1D.d.ts +1 -0
  264. package/lib/data/types/data2d/Signal2DAxisData.d.ts +1 -1
  265. package/lib/versionInfo.js +1 -1
  266. package/lib-cjs/component/1d/Chart1D.js +3 -2
  267. package/lib-cjs/component/1d/FooterBanner.js +2 -2
  268. package/lib-cjs/component/1d/Integral.js +5 -12
  269. package/lib-cjs/component/1d/IntegralResizable.js +10 -5
  270. package/lib-cjs/component/1d/IntegralsSeries.js +3 -3
  271. package/lib-cjs/component/1d/PeakAnnotation.js +5 -4
  272. package/lib-cjs/component/1d/database/DatabaseElements.js +23 -0
  273. package/lib-cjs/component/1d/database/DatabaseSpectrum.js +60 -0
  274. package/lib-cjs/component/1d/{ResurrectedDatabaseRanges.js → database/ResurrectedDatabaseRanges.js} +9 -6
  275. package/lib-cjs/component/1d/jCouplingGraph/JGraph.js +4 -10
  276. package/lib-cjs/component/1d/multiAnalysis/AnalysisRange.js +10 -5
  277. package/lib-cjs/component/1d/ranges/Range.js +17 -9
  278. package/lib-cjs/component/1d/ranges/Ranges.js +6 -3
  279. package/lib-cjs/component/1d/tool/XLabelPointer.js +2 -2
  280. package/lib-cjs/component/2d/Chart2D.js +2 -1
  281. package/lib-cjs/component/2d/Contours.js +4 -1
  282. package/lib-cjs/component/2d/FooterBanner.js +2 -2
  283. package/lib-cjs/component/2d/tools/XYLabelPointer.js +2 -2
  284. package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +10 -4
  285. package/lib-cjs/component/NMRium.js +5 -2
  286. package/lib-cjs/component/SplitPaneWrapper.js +12 -0
  287. package/lib-cjs/component/context/GlobalContext.js +1 -1
  288. package/lib-cjs/component/context/PreferencesContext.js +1 -1
  289. package/lib-cjs/component/elements/Button.js +1 -1
  290. package/lib-cjs/component/elements/ColorInput.js +2 -2
  291. package/lib-cjs/component/elements/EditableColumn.js +27 -20
  292. package/lib-cjs/component/elements/Input.js +18 -5
  293. package/lib-cjs/component/elements/Select.js +20 -14
  294. package/lib-cjs/component/elements/ToggleButton.js +2 -2
  295. package/lib-cjs/component/elements/draggble/SVGDraggable.js +39 -0
  296. package/lib-cjs/component/elements/draggble/useDraggable.js +73 -0
  297. package/lib-cjs/component/elements/formik/FormikColorPicker.js +10 -7
  298. package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +2 -2
  299. package/lib-cjs/component/elements/formik/FormikInput.js +6 -3
  300. package/lib-cjs/component/elements/formik/FormikSlider.js +6 -3
  301. package/lib-cjs/component/elements/popup/Alert/Provider.js +1 -1
  302. package/lib-cjs/component/elements/resizer/DivResizer.js +17 -62
  303. package/lib-cjs/component/elements/resizer/SVGResizer.js +24 -53
  304. package/lib-cjs/component/elements/resizer/useResizer.js +71 -0
  305. package/lib-cjs/component/{utility/FormatNumber.js → hooks/useFormatNumberByNucleus.js} +1 -11
  306. package/lib-cjs/component/hooks/usePanelPreferences.js +62 -0
  307. package/lib-cjs/component/loader/DefaultSpinnerComponent.js +2 -2
  308. package/lib-cjs/component/loader/SpinnerContext.js +2 -2
  309. package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +24 -1
  310. package/lib-cjs/component/modal/editRange/EditRangeModal.js +6 -5
  311. package/lib-cjs/component/modal/editRange/forms/components/AddSignalFormTab.js +3 -6
  312. package/lib-cjs/component/modal/editRange/forms/components/SignalsForm.js +12 -9
  313. package/lib-cjs/component/modal/setting/DatabasesTabContent.js +80 -0
  314. package/lib-cjs/component/modal/setting/DisplayTabContent.js +11 -7
  315. package/lib-cjs/component/modal/setting/FormattingTabContent.js +4 -4
  316. package/lib-cjs/component/modal/setting/GeneralSettings.js +2 -1
  317. package/lib-cjs/component/modal/setting/settingsValidation.js +33 -27
  318. package/lib-cjs/component/panels/AutomaticAssignment/useAutoAssignments.js +10 -5
  319. package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +2 -5
  320. package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +10 -11
  321. package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +24 -72
  322. package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +44 -0
  323. package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +12 -23
  324. package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +9 -1
  325. package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +11 -0
  326. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +2 -2
  327. package/lib-cjs/component/panels/Panels.js +2 -3
  328. package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +4 -4
  329. package/lib-cjs/component/panels/PeaksPanel/PeaksPreferences.js +27 -80
  330. package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +18 -48
  331. package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +15 -9
  332. package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +4 -10
  333. package/lib-cjs/component/panels/RangesPanel/RangesPreferences.js +53 -64
  334. package/lib-cjs/component/panels/RangesPanel/RangesTable.js +3 -7
  335. package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +3 -3
  336. package/lib-cjs/component/panels/RangesPanel/TableColumns/AbsoluteColumn.js +2 -5
  337. package/lib-cjs/component/panels/RangesPanel/TableColumns/ActionsColumn.js +2 -2
  338. package/lib-cjs/component/panels/RangesPanel/TableColumns/CouplingColumn.js +5 -2
  339. package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeColumn.js +2 -5
  340. package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +2 -2
  341. package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +3 -4
  342. package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js +16 -0
  343. package/lib-cjs/component/panels/RangesPanel/TableColumns/format.js +2 -2
  344. package/lib-cjs/component/panels/SpectrumsPanel/base/setting/PlotChart.js +21 -0
  345. package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.js +10 -68
  346. package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +1 -8
  347. package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.js +10 -68
  348. package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +8 -21
  349. package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +2 -2
  350. package/lib-cjs/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +55 -0
  351. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +1 -1
  352. package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +3 -2
  353. package/lib-cjs/component/panels/ZonesPanel/ZonesPreferences.js +18 -82
  354. package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +4 -1
  355. package/lib-cjs/component/panels/ZonesPanel/ZonesTableRow.js +2 -2
  356. package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +72 -39
  357. package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +10 -42
  358. package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +22 -10
  359. package/lib-cjs/component/panels/databasePanel/useDatabases.js +14 -0
  360. package/lib-cjs/component/panels/extra/placeholder/NoTableData.js +2 -2
  361. package/lib-cjs/component/panels/extra/preferences/ColumnsHelper.js +3 -3
  362. package/lib-cjs/component/panels/extra/preferences/NucleusPreferences.js +29 -0
  363. package/lib-cjs/component/panels/extra/preferences/PreferencesContainer.js +14 -0
  364. package/lib-cjs/component/panels/extra/preferences/PreferencesGroup.js +25 -0
  365. package/lib-cjs/component/reducer/Reducer.js +5 -1
  366. package/lib-cjs/component/reducer/actions/LoadActions.js +2 -2
  367. package/lib-cjs/component/reducer/actions/MoleculeActions.js +17 -3
  368. package/lib-cjs/component/reducer/actions/PreferencesActions.js +1 -1
  369. package/lib-cjs/component/reducer/actions/ToolsActions.js +1 -1
  370. package/lib-cjs/component/reducer/preferences/actions/addWorkspace.js +26 -0
  371. package/lib-cjs/component/reducer/preferences/actions/initPreferences.js +67 -0
  372. package/lib-cjs/component/reducer/preferences/actions/removeWorkspace.js +24 -0
  373. package/lib-cjs/component/reducer/preferences/actions/resetPreferences.js +18 -0
  374. package/lib-cjs/component/reducer/preferences/actions/setPanelsPreferences.js +17 -0
  375. package/lib-cjs/component/reducer/preferences/actions/setPreferences.js +38 -0
  376. package/lib-cjs/component/reducer/preferences/actions/setWorkspace.js +12 -0
  377. package/lib-cjs/component/reducer/preferences/panelsPreferencesDefaultValues.js +62 -0
  378. package/lib-cjs/component/reducer/preferences/preferencesReducer.js +87 -0
  379. package/lib-cjs/component/reducer/preferences/utilites/checkKeysExists.js +18 -0
  380. package/lib-cjs/component/reducer/preferences/utilites/filterObject.js +11 -0
  381. package/lib-cjs/component/reducer/preferences/utilites/flatObject.js +13 -0
  382. package/lib-cjs/component/reducer/preferences/utilites/getActiveWorkspace.js +7 -0
  383. package/lib-cjs/component/reducer/preferences/utilites/getPreferencesByWorkspace.js +11 -0
  384. package/lib-cjs/component/reducer/preferences/utilites/mapNucleiFormatting.js +12 -0
  385. package/lib-cjs/component/reducer/types/Types.js +5 -3
  386. package/lib-cjs/component/tool/FloatMoleculeStructures/ActionsButton.js +13 -0
  387. package/lib-cjs/component/tool/FloatMoleculeStructures/DraggableStructure.js +50 -0
  388. package/lib-cjs/component/tool/FloatMoleculeStructures/index.js +36 -0
  389. package/lib-cjs/component/utility/Export.js +6 -0
  390. package/lib-cjs/component/utility/PathBuilder.js +2 -1
  391. package/lib-cjs/component/utility/formatNumber.js +17 -0
  392. package/lib-cjs/component/utility/getUniqueNuclei.js +14 -0
  393. package/lib-cjs/component/workspaces/basic.js +9 -1
  394. package/lib-cjs/component/workspaces/embedded.js +35 -0
  395. package/lib-cjs/component/workspaces/exercise.js +2 -0
  396. package/lib-cjs/component/workspaces/index.js +2 -1
  397. package/lib-cjs/component/workspaces/prediction.js +2 -0
  398. package/lib-cjs/component/workspaces/process1D.js +2 -0
  399. package/lib-cjs/data/data1d/Data1DManager.js +4 -0
  400. package/lib-cjs/data/data1d/Spectrum1D/convertDataToFloat64Array.js +14 -0
  401. package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +2 -1
  402. package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +1 -1
  403. package/lib-cjs/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +2 -1
  404. package/lib-cjs/data/data1d/database.js +15 -21
  405. package/lib-cjs/data/data1d/filter1d/exclusionZones.js +4 -4
  406. package/lib-cjs/data/data1d/filter1d/fft.js +2 -2
  407. package/lib-cjs/data/data1d/filter1d/lineBroadening.js +1 -1
  408. package/lib-cjs/data/data1d/filter1d/pareto.js +2 -2
  409. package/lib-cjs/data/data1d/filter1d/shiftX.js +2 -2
  410. package/lib-cjs/data/data1d/filter1d/zeroFilling.js +1 -1
  411. package/lib-cjs/data/data2d/Data2DManager.js +4 -0
  412. package/lib-cjs/data/data2d/filter2d/shiftX.js +4 -4
  413. package/lib-cjs/data/data2d/filter2d/shiftY.js +4 -4
  414. package/lib-cjs/data/molecules/Molecule.js +7 -1
  415. package/lib-cjs/data/molecules/MoleculeManager.js +37 -3
  416. package/lib-cjs/versionInfo.js +1 -1
  417. package/package.json +42 -40
  418. package/lib/component/elements/resizer/useDraggable.js +0 -52
  419. package/lib/component/panels/extra/preferences/defaultValues.d.ts +0 -54
  420. package/lib/component/panels/extra/preferences/defaultValues.js +0 -54
  421. package/lib/component/reducer/preferencesReducer.js +0 -269
  422. package/lib/component/utility/FormatNumber.d.ts +0 -6
  423. package/lib-cjs/component/elements/resizer/useDraggable.js +0 -55
  424. package/lib-cjs/component/panels/extra/preferences/defaultValues.js +0 -61
  425. package/lib-cjs/component/reducer/preferencesReducer.js +0 -276
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PreferencesGroup = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const styles = {
6
+ groupContainer: {
7
+ padding: '5px',
8
+ borderRadius: '5px',
9
+ margin: '10px 0px',
10
+ backgroundColor: 'white',
11
+ },
12
+ header: {
13
+ borderBottom: '1px solid #e8e8e8',
14
+ paddingBottom: '5px',
15
+ fontWeight: 'bold',
16
+ color: '#4a4a4a',
17
+ marginBottom: '10px',
18
+ fontSize: '12px',
19
+ },
20
+ };
21
+ function PreferencesGroup({ children, header }) {
22
+ return ((0, jsx_runtime_1.jsxs)("div", { style: styles.groupContainer, children: [header &&
23
+ (typeof header === 'string' ? ((0, jsx_runtime_1.jsx)("p", { style: styles.header, children: header })) : (header(styles.header))), children] }));
24
+ }
25
+ exports.PreferencesGroup = PreferencesGroup;
@@ -315,11 +315,15 @@ function innerSpectrumReducer(draft, action) {
315
315
  case types.ADD_MOLECULE:
316
316
  return MoleculeActions.addMoleculeHandler(draft, action.molfile);
317
317
  case types.SET_MOLECULE:
318
- return MoleculeActions.setMoleculeHandler(draft, action.molfile, action.key);
318
+ return MoleculeActions.setMoleculeHandler(draft, action);
319
+ case types.CHANGE_MOLECULE_LABEL:
320
+ return MoleculeActions.changeMoleculeLabel(draft, action);
319
321
  case types.DELETE_MOLECULE:
320
322
  return MoleculeActions.deleteMoleculeHandler(draft, action);
321
323
  case types.PREDICT_SPECTRA:
322
324
  return MoleculeActions.predictSpectraFromMoleculeHandler(draft, action);
325
+ case types.FLOAT_MOLECULE_OVER_SPECTRUM:
326
+ return MoleculeActions.floatMoleculeOverSpectrum(draft, action);
323
327
  case types.SET_CORRELATIONS_MF:
324
328
  return CorrelationsActions.handleSetMF(draft, action.payload);
325
329
  case types.SET_CORRELATIONS_TOLERANCE:
@@ -100,9 +100,9 @@ function initiate(draft, action) {
100
100
  setData(state, action.payload);
101
101
  const preferences = action.payload?.preferences || {};
102
102
  (0, ToolsActions_1.setActiveTab)(state, { tab: preferences?.activeTab || '' });
103
- setPreferences(state, action.payload);
104
103
  state.width = draft.width;
105
104
  state.height = draft.height;
105
+ setPreferences(state, action.payload);
106
106
  state.isLoading = false;
107
107
  state.actionType = Types_1.INITIATE;
108
108
  return state;
@@ -134,9 +134,9 @@ function handleLoadJsonFile(draft, action) {
134
134
  setData(state, action.payload);
135
135
  const preferences = action.payload?.preferences || {};
136
136
  (0, ToolsActions_1.setActiveTab)(state, { tab: preferences?.activeTab || '' });
137
- setPreferences(state, preferences);
138
137
  state.width = draft.width;
139
138
  state.height = draft.height;
139
+ setPreferences(state, preferences);
140
140
  state.isLoading = false;
141
141
  state.actionType = Types_1.LOAD_JSON_FILE;
142
142
  return state;
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.predictSpectraFromMoleculeHandler = exports.deleteMoleculeHandler = exports.setMoleculeHandler = exports.addMoleculeHandler = void 0;
29
+ exports.changeMoleculeLabel = exports.floatMoleculeOverSpectrum = exports.predictSpectraFromMoleculeHandler = exports.deleteMoleculeHandler = exports.setMoleculeHandler = exports.addMoleculeHandler = void 0;
30
30
  const PredictionManager_1 = require("../../../data/PredictionManager");
31
31
  const SumManager_1 = require("../../../data/data1d/Spectrum1D/SumManager");
32
32
  const MoleculeManager = __importStar(require("../../../data/molecules/MoleculeManager"));
@@ -49,8 +49,9 @@ function addMoleculeHandler(draft, molfile) {
49
49
  }
50
50
  }
51
51
  exports.addMoleculeHandler = addMoleculeHandler;
52
- function setMoleculeHandler(draft, molfile, key) {
53
- MoleculeManager.setMolfile(draft.molecules, molfile, key);
52
+ function setMoleculeHandler(draft, action) {
53
+ const { key, label, molfile, isFloat } = action.payload;
54
+ MoleculeManager.setMolfile(draft.molecules, { key, label, molfile, isFloat });
54
55
  /**
55
56
  * update all spectra that its sum was based on this molecule with the new molecule
56
57
  */
@@ -100,3 +101,16 @@ function predictSpectraFromMoleculeHandler(draft, action) {
100
101
  draft.isLoading = false;
101
102
  }
102
103
  exports.predictSpectraFromMoleculeHandler = predictSpectraFromMoleculeHandler;
104
+ function floatMoleculeOverSpectrum(draft, action) {
105
+ const { key } = action.payload;
106
+ const moleculeIndex = draft.molecules.findIndex((molecule) => molecule.key === key);
107
+ draft.molecules[moleculeIndex].isFloat =
108
+ !draft.molecules[moleculeIndex].isFloat;
109
+ }
110
+ exports.floatMoleculeOverSpectrum = floatMoleculeOverSpectrum;
111
+ function changeMoleculeLabel(draft, action) {
112
+ const { key, label } = action.payload;
113
+ const moleculeIndex = draft.molecules.findIndex((molecule) => molecule.key === key);
114
+ draft.molecules[moleculeIndex].label = label;
115
+ }
116
+ exports.changeMoleculeLabel = changeMoleculeLabel;
@@ -38,7 +38,7 @@ function changeSpectrumVerticalAlignment(draft, options) {
38
38
  case 'stack': {
39
39
  draft.verticalAlign.align = 'stack';
40
40
  const visibleSpectra = dataPerNucleus.filter((datum) => datum.display.isVisible === true);
41
- draft.verticalAlign.verticalShift = Math.floor((draft.height - draft.margin.bottom) / (visibleSpectra.length + 2));
41
+ draft.verticalAlign.verticalShift = Math.abs(Math.floor((draft.height - draft.margin.bottom) / (visibleSpectra.length + 2)));
42
42
  break;
43
43
  }
44
44
  default:
@@ -425,7 +425,7 @@ exports.setTab = setTab;
425
425
  function setActiveTab(draft, options) {
426
426
  const { tab = null, refreshActiveTab = false, domainOptions = {}, } = options || {};
427
427
  const groupByNucleus = (0, GroupByInfoKey_1.default)('nucleus');
428
- const dataGroupByNucleus = groupByNucleus(draft.data);
428
+ const dataGroupByNucleus = groupByNucleus(draft.data, true);
429
429
  const tabs = Object.keys(dataGroupByNucleus);
430
430
  const currentTab = !tab || !tabs.includes(tab || '') ? tabs[0] : tab;
431
431
  setTab(draft, dataGroupByNucleus, currentTab, refreshActiveTab);
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.addWorkspace = void 0;
7
+ const generateID_1 = __importDefault(require("../../../../data/utilities/generateID"));
8
+ const LocalStorage_1 = require("../../../utility/LocalStorage");
9
+ function addWorkspace(draft, action) {
10
+ const { workspace: workspaceName, data: { display, controllers, formatting, databases }, } = action.payload;
11
+ const newWorkSpace = {
12
+ version: 1,
13
+ label: workspaceName,
14
+ display,
15
+ controllers,
16
+ formatting,
17
+ databases,
18
+ };
19
+ const newWorkspaceKey = (0, generateID_1.default)();
20
+ const localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
21
+ localData.workspaces[newWorkspaceKey] = newWorkSpace;
22
+ (0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(localData));
23
+ draft.workspaces[newWorkspaceKey] = newWorkSpace;
24
+ draft.workspace.current = newWorkspaceKey;
25
+ }
26
+ exports.addWorkspace = addWorkspace;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.initPreferences = void 0;
7
+ const merge_1 = __importDefault(require("lodash/merge"));
8
+ const LocalStorage_1 = require("../../../utility/LocalStorage");
9
+ const workspaces_1 = __importDefault(require("../../../workspaces"));
10
+ const checkKeysExists_1 = require("../utilites/checkKeysExists");
11
+ const filterObject_1 = require("../utilites/filterObject");
12
+ const getActiveWorkspace_1 = require("../utilites/getActiveWorkspace");
13
+ const getPreferencesByWorkspace_1 = require("../utilites/getPreferencesByWorkspace");
14
+ function initPreferences(draft, action) {
15
+ if (action.payload) {
16
+ const localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
17
+ const { dispatch, workspace, ...resProps } = action.payload;
18
+ /**
19
+ * set the current workspace what the user-defined in the setting if the workspace is not defined at the level of component, otherwise
20
+ * use the default workspace
21
+ *
22
+ */
23
+ draft.workspace =
24
+ !workspace && localData?.currentWorkspace
25
+ ? { current: localData.currentWorkspace, base: null }
26
+ : { current: workspace || 'default', base: workspace };
27
+ const workspacePreferences = (0, merge_1.default)({}, (0, getPreferencesByWorkspace_1.getPreferencesByWorkspace)(draft.workspace.current), resProps);
28
+ const currentWorkspacePreferences = (0, getActiveWorkspace_1.getActiveWorkspace)(draft);
29
+ /**
30
+ * Update the local storage general preferences
31
+ * 1- if local storage is empty.
32
+ * 2- if predefine workspaces.
33
+ * 3- b) if workspace not exists in the local storage
34
+ * c) if the local setting workspace version != current workspace version number
35
+ * d) if hard code workspace parameters != current workspace parameters
36
+ */
37
+ if ((workspaces_1.default[draft.workspace.current] &&
38
+ (!currentWorkspacePreferences ||
39
+ workspacePreferences?.version !==
40
+ currentWorkspacePreferences?.version ||
41
+ !(0, checkKeysExists_1.checkKeysExists)(workspacePreferences.display, currentWorkspacePreferences?.display))) ||
42
+ !localData) {
43
+ const { workspaces, version, workspace: { current }, } = draft || {};
44
+ const display = (0, filterObject_1.filterObject)(workspacePreferences.display);
45
+ const data = {
46
+ version,
47
+ ...(localData?.currentWorkspace && {
48
+ currentWorkspace: localData?.currentWorkspace,
49
+ }),
50
+ workspaces: {
51
+ ...workspaces,
52
+ [current]: {
53
+ ...workspacePreferences,
54
+ display,
55
+ },
56
+ },
57
+ };
58
+ draft.workspaces[current] = (0, merge_1.default)({}, currentWorkspacePreferences, workspacePreferences);
59
+ (0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(data));
60
+ }
61
+ else {
62
+ currentWorkspacePreferences.display = (0, merge_1.default)({}, workspacePreferences.display, currentWorkspacePreferences.display);
63
+ }
64
+ draft.dispatch = dispatch;
65
+ }
66
+ }
67
+ exports.initPreferences = initPreferences;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.removeWorkspace = void 0;
4
+ const immer_1 = require("immer");
5
+ const LocalStorage_1 = require("../../../utility/LocalStorage");
6
+ const filterObject_1 = require("../utilites/filterObject");
7
+ function removeWorkspace(draft, action) {
8
+ const { workspace } = action.payload;
9
+ if (workspace === draft.workspace.current) {
10
+ draft.workspace.current = 'default';
11
+ }
12
+ let localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
13
+ const storedWorkspaces = (0, immer_1.original)(draft)?.workspaces || {};
14
+ const workspaces = Object.keys(storedWorkspaces).reduce((acc, key) => {
15
+ if (key !== workspace) {
16
+ acc[key] = storedWorkspaces[key];
17
+ }
18
+ return acc;
19
+ }, {});
20
+ draft.workspaces = workspaces;
21
+ localData.workspaces = (0, filterObject_1.filterObject)(workspaces);
22
+ (0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(localData));
23
+ }
24
+ exports.removeWorkspace = removeWorkspace;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resetPreferences = void 0;
4
+ const LocalStorage_1 = require("../../../utility/LocalStorage");
5
+ const getActiveWorkspace_1 = require("../utilites/getActiveWorkspace");
6
+ const getPreferencesByWorkspace_1 = require("../utilites/getPreferencesByWorkspace");
7
+ function resetPreferences(draft) {
8
+ const currentWorkspacePreferences = (0, getActiveWorkspace_1.getActiveWorkspace)(draft);
9
+ let localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
10
+ const workSpaceDisplayPreferences = (0, getPreferencesByWorkspace_1.getPreferencesByWorkspace)(draft.workspace.current).display;
11
+ if (localData.workspaces[draft.workspace.current]) {
12
+ localData.workspaces[draft.workspace.current].display =
13
+ workSpaceDisplayPreferences;
14
+ (0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(localData));
15
+ }
16
+ currentWorkspacePreferences.display = workSpaceDisplayPreferences;
17
+ }
18
+ exports.resetPreferences = resetPreferences;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setPanelsPreferences = void 0;
4
+ const LocalStorage_1 = require("../../../utility/LocalStorage");
5
+ const getActiveWorkspace_1 = require("../utilites/getActiveWorkspace");
6
+ function setPanelsPreferences(draft, action) {
7
+ if (action.payload) {
8
+ const currentWorkspacePreferences = (0, getActiveWorkspace_1.getActiveWorkspace)(draft);
9
+ const { key, value } = action.payload;
10
+ let localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
11
+ localData.workspaces[draft.workspace.current].formatting.panels[key] =
12
+ value;
13
+ (0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(localData));
14
+ currentWorkspacePreferences.formatting.panels[key] = value;
15
+ }
16
+ }
17
+ exports.setPanelsPreferences = setPanelsPreferences;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setPreferences = void 0;
4
+ const LocalStorage_1 = require("../../../utility/LocalStorage");
5
+ const getActiveWorkspace_1 = require("../utilites/getActiveWorkspace");
6
+ const mapNucleiFormatting_1 = require("../utilites/mapNucleiFormatting");
7
+ function setPreferences(draft, action) {
8
+ if (action.payload) {
9
+ const currentWorkspacePreferences = (0, getActiveWorkspace_1.getActiveWorkspace)(draft);
10
+ let { controllers, formatting, display, databases } = action.payload;
11
+ formatting = (0, mapNucleiFormatting_1.mapNucleiFormatting)(formatting);
12
+ let localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
13
+ localData.currentWorkspace = draft.workspace.current;
14
+ localData.workspaces = {
15
+ ...localData.workspaces,
16
+ [draft.workspace.current]: {
17
+ ...localData.workspaces[draft.workspace.current],
18
+ controllers,
19
+ formatting,
20
+ display,
21
+ databases,
22
+ },
23
+ };
24
+ (0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(localData));
25
+ currentWorkspacePreferences.controllers = controllers;
26
+ currentWorkspacePreferences.formatting = formatting;
27
+ currentWorkspacePreferences.databases = databases;
28
+ currentWorkspacePreferences.display = {
29
+ ...currentWorkspacePreferences.display,
30
+ panels: display.panels,
31
+ general: {
32
+ ...(currentWorkspacePreferences.display.general || {}),
33
+ experimentalFeatures: display.general.experimentalFeatures,
34
+ },
35
+ };
36
+ }
37
+ }
38
+ exports.setPreferences = setPreferences;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setWorkspace = void 0;
4
+ const getPreferencesByWorkspace_1 = require("../utilites/getPreferencesByWorkspace");
5
+ function setWorkspace(draft, action) {
6
+ const workspaceKey = action.payload.workspace;
7
+ if (!draft.workspaces[workspaceKey]) {
8
+ draft.workspaces[workspaceKey] = (0, getPreferencesByWorkspace_1.getPreferencesByWorkspace)(workspaceKey);
9
+ }
10
+ draft.workspace.current = workspaceKey;
11
+ }
12
+ exports.setWorkspace = setWorkspace;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.databaseDefaultValues = exports.getZoneDefaultValues = exports.getRangeDefaultValues = exports.getIntegralDefaultValues = exports.getPeaksDefaultValues = void 0;
4
+ function getPreferences(data, nucleus) {
5
+ return { nuclei: { ...(nucleus ? { [nucleus]: data } : {}) } };
6
+ }
7
+ const getIntegralDefaultValues = (nucleus) => {
8
+ const preferences = {
9
+ absolute: { show: false, format: '0.00' },
10
+ relative: { show: true, format: '0.00' },
11
+ color: '#000000',
12
+ strokeWidth: 1,
13
+ };
14
+ return getPreferences(preferences, nucleus);
15
+ };
16
+ exports.getIntegralDefaultValues = getIntegralDefaultValues;
17
+ const getZoneDefaultValues = (nucleus) => ({
18
+ absolute: { show: false, format: '0.00' },
19
+ relative: { show: true, format: '0.00' },
20
+ ...getPreferences({ deltaPPM: { show: true, format: '0.00' } }, nucleus),
21
+ });
22
+ exports.getZoneDefaultValues = getZoneDefaultValues;
23
+ const getRangeDefaultValues = (nucleus) => {
24
+ const preferences = {
25
+ from: { show: false, format: '0.00' },
26
+ to: { show: false, format: '0.00' },
27
+ absolute: { show: false, format: '0.00' },
28
+ relative: { show: true, format: '0.00' },
29
+ deltaPPM: { show: true, format: '0.00' },
30
+ deltaHz: { show: false, format: '0.00' },
31
+ coupling: { show: true, format: '0.00' },
32
+ jGraphTolerance: nucleus === '1H' ? 0.2 : nucleus === '13C' ? 2 : 0,
33
+ showKind: true,
34
+ };
35
+ return getPreferences(preferences, nucleus);
36
+ };
37
+ exports.getRangeDefaultValues = getRangeDefaultValues;
38
+ const getPeaksDefaultValues = (nucleus) => {
39
+ const preferences = {
40
+ peakNumber: { show: true, format: '0' },
41
+ deltaPPM: { show: true, format: '0.00' },
42
+ deltaHz: { show: false, format: '0.00' },
43
+ peakWidth: { show: false, format: '0.00' },
44
+ intensity: { show: true, format: '0.00' },
45
+ };
46
+ return getPreferences(preferences, nucleus);
47
+ };
48
+ exports.getPeaksDefaultValues = getPeaksDefaultValues;
49
+ const databaseDefaultValues = {
50
+ previewJcamp: true,
51
+ showSmiles: true,
52
+ showSolvent: false,
53
+ showNames: true,
54
+ showRange: false,
55
+ showDelta: true,
56
+ showAssignment: false,
57
+ showCoupling: true,
58
+ showMultiplicity: true,
59
+ color: 'black',
60
+ marginBottom: 30,
61
+ };
62
+ exports.databaseDefaultValues = databaseDefaultValues;
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.initPreferencesState = exports.preferencesInitialState = exports.WORKSPACES = void 0;
7
+ const immer_1 = require("immer");
8
+ const LocalStorage_1 = require("../../utility/LocalStorage");
9
+ const workspaces_1 = __importDefault(require("../../workspaces"));
10
+ const addWorkspace_1 = require("./actions/addWorkspace");
11
+ const initPreferences_1 = require("./actions/initPreferences");
12
+ const removeWorkspace_1 = require("./actions/removeWorkspace");
13
+ const resetPreferences_1 = require("./actions/resetPreferences");
14
+ const setPanelsPreferences_1 = require("./actions/setPanelsPreferences");
15
+ const setPreferences_1 = require("./actions/setPreferences");
16
+ const setWorkspace_1 = require("./actions/setWorkspace");
17
+ const LOCAL_STORAGE_VERSION = 8;
18
+ exports.WORKSPACES = [
19
+ {
20
+ key: 'default',
21
+ label: workspaces_1.default.default.label,
22
+ },
23
+ {
24
+ key: 'process1D',
25
+ label: workspaces_1.default.process1D.label,
26
+ },
27
+ {
28
+ key: 'exercise',
29
+ label: workspaces_1.default.exercise.label,
30
+ },
31
+ {
32
+ key: 'prediction',
33
+ label: workspaces_1.default.prediction.label,
34
+ },
35
+ {
36
+ key: 'embedded',
37
+ label: workspaces_1.default.embedded.label,
38
+ },
39
+ ];
40
+ exports.preferencesInitialState = {
41
+ version: LOCAL_STORAGE_VERSION,
42
+ workspaces: {},
43
+ dispatch: () => null,
44
+ workspace: {
45
+ current: 'default',
46
+ base: null,
47
+ },
48
+ };
49
+ function initPreferencesState(state) {
50
+ const nmrLocalStorageVersion = (0, LocalStorage_1.getLocalStorage)('nmr-local-storage-version', false);
51
+ let localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
52
+ // remove old nmr-local-storage-version key
53
+ if (nmrLocalStorageVersion && localData?.version) {
54
+ (0, LocalStorage_1.removeData)('nmr-local-storage-version');
55
+ }
56
+ // if the local setting version != current settings version number
57
+ if (!localData?.version || localData?.version !== LOCAL_STORAGE_VERSION) {
58
+ (0, LocalStorage_1.removeData)('nmr-general-settings');
59
+ }
60
+ return {
61
+ ...state,
62
+ workspaces: localData?.workspaces || { default: workspaces_1.default.default },
63
+ };
64
+ }
65
+ exports.initPreferencesState = initPreferencesState;
66
+ function innerPreferencesReducer(draft, action) {
67
+ switch (action.type) {
68
+ case 'INIT_PREFERENCES':
69
+ return (0, initPreferences_1.initPreferences)(draft, action);
70
+ case 'SET_PREFERENCES':
71
+ return (0, setPreferences_1.setPreferences)(draft, action);
72
+ case 'SET_PANELS_PREFERENCES':
73
+ return (0, setPanelsPreferences_1.setPanelsPreferences)(draft, action);
74
+ case 'RESET_PREFERENCES':
75
+ return (0, resetPreferences_1.resetPreferences)(draft);
76
+ case 'SET_WORKSPACE':
77
+ return (0, setWorkspace_1.setWorkspace)(draft, action);
78
+ case 'ADD_WORKSPACE':
79
+ return (0, addWorkspace_1.addWorkspace)(draft, action);
80
+ case 'REMOVE_WORKSPACE':
81
+ return (0, removeWorkspace_1.removeWorkspace)(draft, action);
82
+ default:
83
+ return draft;
84
+ }
85
+ }
86
+ const preferencesReducer = (0, immer_1.produce)(innerPreferencesReducer);
87
+ exports.default = preferencesReducer;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkKeysExists = void 0;
4
+ const flatObject_1 = require("./flatObject");
5
+ function checkKeysExists(sourceObject, targetObject) {
6
+ const source = (0, flatObject_1.flatObject)(sourceObject);
7
+ const target = (0, flatObject_1.flatObject)(targetObject);
8
+ if (Object.keys(target).length === 0) {
9
+ return false;
10
+ }
11
+ for (const [key, value] of Object.entries(source)) {
12
+ if (!target[key] || target[key] !== value) {
13
+ return false;
14
+ }
15
+ }
16
+ return true;
17
+ }
18
+ exports.checkKeysExists = checkKeysExists;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.filterObject = void 0;
4
+ function filterObject(data) {
5
+ return JSON.parse(JSON.stringify(data), (key, value) => {
6
+ if (value?.hidden !== true) {
7
+ return value;
8
+ }
9
+ });
10
+ }
11
+ exports.filterObject = filterObject;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.flatObject = void 0;
4
+ function flatObject(data) {
5
+ let result = {};
6
+ JSON.parse(JSON.stringify(data), (key, value) => {
7
+ if (value?.hidden !== true && key) {
8
+ result[key] = result[key]++ || 1;
9
+ }
10
+ });
11
+ return result;
12
+ }
13
+ exports.flatObject = flatObject;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getActiveWorkspace = void 0;
4
+ function getActiveWorkspace(draft) {
5
+ return draft.workspaces[draft.workspace.current || 'default'];
6
+ }
7
+ exports.getActiveWorkspace = getActiveWorkspace;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getPreferencesByWorkspace = void 0;
7
+ const workspaces_1 = __importDefault(require("../../../workspaces"));
8
+ function getPreferencesByWorkspace(workspace) {
9
+ return workspaces_1.default?.[workspace] || {};
10
+ }
11
+ exports.getPreferencesByWorkspace = getPreferencesByWorkspace;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mapNucleiFormatting = void 0;
4
+ function mapNucleiFormatting(formatting) {
5
+ const { nuclei, ...res } = formatting;
6
+ const _nuclei = Object.keys(nuclei).reduce((nucleusFormatting, key) => {
7
+ nucleusFormatting[nuclei[key].name.trim().toLowerCase()] = nuclei[key];
8
+ return nucleusFormatting;
9
+ }, {});
10
+ return { nuclei: _nuclei, ...res };
11
+ }
12
+ exports.mapNucleiFormatting = mapNucleiFormatting;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.APPLY_MANUAL_PHASE_CORRECTION_FILTER = exports.CALCULATE_MANUAL_PHASE_CORRECTION_FILTER = exports.APPLY_FFT_FILTER = exports.APPLY_ZERO_FILLING_FILTER = exports.DELETE_SPECTRA_FILTER = exports.DELETE_FILTER = exports.ENABLE_FILTER = exports.RESET_DOMAIN = exports.BRUSH_END = exports.RESIZE_INTEGRAL = exports.CHANGE_SPECTRUM_DISPLAY_VIEW_MODE = exports.DELETE_SPECTRA = exports.SET_CORRELATIONS_TOLERANCE = exports.SET_CORRELATIONS_MF = exports.DELETE_CORRELATION = exports.SET_CORRELATIONS = exports.SET_CORRELATION = exports.DELETE_MOLECULE = exports.SET_MOLECULE = exports.ADD_MOLECULE = exports.SET_ZOOM = exports.TOGGLE_REAL_IMAGINARY_VISIBILITY = exports.DELETE_INTEGRAL = exports.ADD_INTEGRAL = exports.CHANGE_SPECTRUM_COLOR = exports.CHANGE_ACTIVE_SPECTRUM = exports.CHANGE_PEAKS_MARKERS_VISIBILITY = exports.CHANGE_VISIBILITY = exports.FULL_ZOOM_OUT = exports.CHANGE_SPECTRUM_TYPE = exports.CHANGE_SPECTRUM_SETTING = exports.SET_SELECTED_FILTER = exports.SET_SELECTED_TOOL = exports.SET_DIMENSIONS = exports.SET_WIDTH = exports.SET_ORIGINAL_DOMAIN = exports.SET_Y_DOMAIN = exports.SET_X_DOMAIN = exports.SHIFT_SPECTRUM = exports.DELETE_PEAK_NOTATION = exports.ADD_PEAKS = exports.ADD_PEAK = exports.LOAD_JDF_FILE = exports.LOAD_ZIP_FILE = exports.LOAD_MOL_FILE = exports.LOAD_NMREDATA_FILE = exports.LOAD_JCAMP_FILE = exports.LOAD_JSON_FILE = exports.SAVE_DATA_AS_JSON = exports.INITIATE = void 0;
4
- exports.PREDICT_SPECTRA = exports.SET_DIAID_ZONE = exports.UNLINK_ZONE = exports.SAVE_EDITED_ZONE = exports.CHANGE_ZONE_SIGNAL_KIND = exports.CHANGE_ZONE_SIGNAL_VALUE = exports.ALIGN_SPECTRA = exports.FILTER_SPECTRA_COLUMN = exports.SET_ANALYZE_SPECTRA_COLUMNS = exports.RESIZE_ANALYZE_SPECTRA_RANGE = exports.DELETE_ANALYZE_SPECTRA_RANGE = exports.ANALYZE_SPECTRA = exports.CHANGE_INTEGRAL_RELATIVE = exports.SET_DIAID_RANGE = exports.UNLINK_RANGE = exports.SAVE_EDITED_RANGE = exports.CHANGE_RANGE_SIGNAL_KIND = exports.CHANGE_RANGE_SIGNAL_VALUE = exports.CHANGE_RANGE_RELATIVE = exports.SET_FILTER_SNAPSHOT = exports.ADD_MISSING_PROJECTION = exports.SET_2D_SIGNAL_PATH_LENGTH = exports.DELETE_2D_SIGNAL = exports.DELETE_2D_ZONE = exports.ADD_2D_ZONE = exports.SET_2D_LEVEL = exports.ADD_RANGE = exports.CHANGE_RANGE_SUM = exports.RESIZE_RANGE = exports.APPLY_KEY_PREFERENCES = exports.SET_KEY_PREFERENCES = exports.APPLY_BASE_LINE_CORRECTION_FILTER = exports.DELETE_BASE_LINE_ZONE = exports.ADD_BASE_LINE_ZONE = exports.CHANGE_INTEGRAL_SUM = exports.SET_ACTIVE_TAB = exports.CHANGE_INTEGRAL_DATA = exports.SAVE_AS_SVG = exports.SET_SPECTRUMS_VERTICAL_ALIGN = exports.RESET_SELECTED_TOOL = exports.SET_LOADING_FLAG = exports.SET_SELECTED_OPTIONS_PANEL = exports.DELETE_1D_SIGNAL = exports.DELETE_RANGE = exports.AUTO_ZONES_DETECTION = exports.AUTO_RANGES_DETECTION = exports.AUTO_PEAK_PICKING = exports.SET_VERTICAL_INDICATOR_X_POSITION = exports.APPLY_ABSOLUTE_FILTER = exports.APPLY_AUTO_PHASE_CORRECTION_FILTER = void 0;
5
- exports.SET_AUTOMATIC_ASSIGNMENTS = exports.SHOW_J_GRAPH = exports.RESURRECTING_SPECTRUM_FROM_RANGES = exports.GENERATE_SPECTRUM_FROM_PUBLICATION_STRING = exports.AUTO_ZONES_SPECTRA_PICKING = exports.AUTO_RANGES_SPECTRA_PICKING = exports.SHOW_RANGES_INTEGRALS = exports.SHOW_MULTIPLICTY_TREES = exports.CHANGE_TEMP_RANGE = exports.CHANGE_ZONES_NOISE_FACTOR = exports.CHANGE_INTEGRALS_SUM_FLAG = exports.CHANGE_RANGES_SUM_FLAG = exports.DELETE_EXCLUSION_ZONE = exports.ADD_EXCLUSION_ZONE = exports.APPLY_MULTIPLE_SPECTRA_FILTER = exports.SET_MOUSE_OVER_DISPLAYER = exports.RESET_SPECTRA_SCALE = exports.SET_SPECTRA_SAME_TOP = void 0;
3
+ exports.APPLY_FFT_FILTER = exports.APPLY_ZERO_FILLING_FILTER = exports.DELETE_SPECTRA_FILTER = exports.DELETE_FILTER = exports.ENABLE_FILTER = exports.RESET_DOMAIN = exports.BRUSH_END = exports.RESIZE_INTEGRAL = exports.CHANGE_SPECTRUM_DISPLAY_VIEW_MODE = exports.DELETE_SPECTRA = exports.SET_CORRELATIONS_TOLERANCE = exports.SET_CORRELATIONS_MF = exports.DELETE_CORRELATION = exports.SET_CORRELATIONS = exports.SET_CORRELATION = exports.CHANGE_MOLECULE_LABEL = exports.FLOAT_MOLECULE_OVER_SPECTRUM = exports.DELETE_MOLECULE = exports.SET_MOLECULE = exports.ADD_MOLECULE = exports.SET_ZOOM = exports.TOGGLE_REAL_IMAGINARY_VISIBILITY = exports.DELETE_INTEGRAL = exports.ADD_INTEGRAL = exports.CHANGE_SPECTRUM_COLOR = exports.CHANGE_ACTIVE_SPECTRUM = exports.CHANGE_PEAKS_MARKERS_VISIBILITY = exports.CHANGE_VISIBILITY = exports.FULL_ZOOM_OUT = exports.CHANGE_SPECTRUM_TYPE = exports.CHANGE_SPECTRUM_SETTING = exports.SET_SELECTED_FILTER = exports.SET_SELECTED_TOOL = exports.SET_DIMENSIONS = exports.SET_WIDTH = exports.SET_ORIGINAL_DOMAIN = exports.SET_Y_DOMAIN = exports.SET_X_DOMAIN = exports.SHIFT_SPECTRUM = exports.DELETE_PEAK_NOTATION = exports.ADD_PEAKS = exports.ADD_PEAK = exports.LOAD_JDF_FILE = exports.LOAD_ZIP_FILE = exports.LOAD_MOL_FILE = exports.LOAD_NMREDATA_FILE = exports.LOAD_JCAMP_FILE = exports.LOAD_JSON_FILE = exports.SAVE_DATA_AS_JSON = exports.INITIATE = void 0;
4
+ exports.UNLINK_ZONE = exports.SAVE_EDITED_ZONE = exports.CHANGE_ZONE_SIGNAL_KIND = exports.CHANGE_ZONE_SIGNAL_VALUE = exports.ALIGN_SPECTRA = exports.FILTER_SPECTRA_COLUMN = exports.SET_ANALYZE_SPECTRA_COLUMNS = exports.RESIZE_ANALYZE_SPECTRA_RANGE = exports.DELETE_ANALYZE_SPECTRA_RANGE = exports.ANALYZE_SPECTRA = exports.CHANGE_INTEGRAL_RELATIVE = exports.SET_DIAID_RANGE = exports.UNLINK_RANGE = exports.SAVE_EDITED_RANGE = exports.CHANGE_RANGE_SIGNAL_KIND = exports.CHANGE_RANGE_SIGNAL_VALUE = exports.CHANGE_RANGE_RELATIVE = exports.SET_FILTER_SNAPSHOT = exports.ADD_MISSING_PROJECTION = exports.SET_2D_SIGNAL_PATH_LENGTH = exports.DELETE_2D_SIGNAL = exports.DELETE_2D_ZONE = exports.ADD_2D_ZONE = exports.SET_2D_LEVEL = exports.ADD_RANGE = exports.CHANGE_RANGE_SUM = exports.RESIZE_RANGE = exports.APPLY_KEY_PREFERENCES = exports.SET_KEY_PREFERENCES = exports.APPLY_BASE_LINE_CORRECTION_FILTER = exports.DELETE_BASE_LINE_ZONE = exports.ADD_BASE_LINE_ZONE = exports.CHANGE_INTEGRAL_SUM = exports.SET_ACTIVE_TAB = exports.CHANGE_INTEGRAL_DATA = exports.SAVE_AS_SVG = exports.SET_SPECTRUMS_VERTICAL_ALIGN = exports.RESET_SELECTED_TOOL = exports.SET_LOADING_FLAG = exports.SET_SELECTED_OPTIONS_PANEL = exports.DELETE_1D_SIGNAL = exports.DELETE_RANGE = exports.AUTO_ZONES_DETECTION = exports.AUTO_RANGES_DETECTION = exports.AUTO_PEAK_PICKING = exports.SET_VERTICAL_INDICATOR_X_POSITION = exports.APPLY_ABSOLUTE_FILTER = exports.APPLY_AUTO_PHASE_CORRECTION_FILTER = exports.APPLY_MANUAL_PHASE_CORRECTION_FILTER = exports.CALCULATE_MANUAL_PHASE_CORRECTION_FILTER = void 0;
5
+ exports.SET_AUTOMATIC_ASSIGNMENTS = exports.SHOW_J_GRAPH = exports.RESURRECTING_SPECTRUM_FROM_RANGES = exports.GENERATE_SPECTRUM_FROM_PUBLICATION_STRING = exports.AUTO_ZONES_SPECTRA_PICKING = exports.AUTO_RANGES_SPECTRA_PICKING = exports.SHOW_RANGES_INTEGRALS = exports.SHOW_MULTIPLICTY_TREES = exports.CHANGE_TEMP_RANGE = exports.CHANGE_ZONES_NOISE_FACTOR = exports.CHANGE_INTEGRALS_SUM_FLAG = exports.CHANGE_RANGES_SUM_FLAG = exports.DELETE_EXCLUSION_ZONE = exports.ADD_EXCLUSION_ZONE = exports.APPLY_MULTIPLE_SPECTRA_FILTER = exports.SET_MOUSE_OVER_DISPLAYER = exports.RESET_SPECTRA_SCALE = exports.SET_SPECTRA_SAME_TOP = exports.PREDICT_SPECTRA = exports.SET_DIAID_ZONE = void 0;
6
6
  exports.INITIATE = 'INITIATE';
7
7
  exports.SAVE_DATA_AS_JSON = 'SAVE_DATA_AS_JSON';
8
8
  exports.LOAD_JSON_FILE = 'LOAD_JSON_FILE';
@@ -36,6 +36,8 @@ exports.SET_ZOOM = 'SET_ZOOM';
36
36
  exports.ADD_MOLECULE = 'ADD_MOLECULE';
37
37
  exports.SET_MOLECULE = 'SET_MOLECULE';
38
38
  exports.DELETE_MOLECULE = 'DELETE_MOLECULE';
39
+ exports.FLOAT_MOLECULE_OVER_SPECTRUM = 'FLOAT_MOLECULE_OVER_SPECTRUM';
40
+ exports.CHANGE_MOLECULE_LABEL = 'CHANGE_MOLECULE_LABEL';
39
41
  exports.SET_CORRELATION = 'SET_CORRELATION';
40
42
  exports.SET_CORRELATIONS = 'SET_CORRELATIONS';
41
43
  exports.DELETE_CORRELATION = 'DELETE_CORRELATION';
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const bs_1 = require("react-icons/bs");
8
+ const fa_1 = require("react-icons/fa");
9
+ const Button_1 = __importDefault(require("../../elements/Button"));
10
+ function ActionsButton({ onFloatBtnClick }) {
11
+ return ((0, jsx_runtime_1.jsxs)("div", { "data-no-export": "true", style: { display: 'flex', zIndex: 0 }, children: [(0, jsx_runtime_1.jsx)(Button_1.default.Action, { style: { fontSize: '14px' }, fill: "clear", className: "handle", children: (0, jsx_runtime_1.jsx)(bs_1.BsArrowsMove, {}) }), (0, jsx_runtime_1.jsx)(Button_1.default.Danger, { style: { fontSize: '14px' }, fill: "clear", onClick: onFloatBtnClick, children: (0, jsx_runtime_1.jsx)(fa_1.FaTimes, {}) })] }));
12
+ }
13
+ exports.default = ActionsButton;