nmrium 0.23.0 → 0.24.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 (588) hide show
  1. package/README.md +4 -0
  2. package/lib/component/1d/Chart1D.js +1 -1
  3. package/lib/component/1d/ExclusionZoneAnnotation.js +1 -1
  4. package/lib/component/1d/ExclusionZonesAnnotations.js +2 -2
  5. package/lib/component/1d/FooterBanner.js +7 -8
  6. package/lib/component/1d/Integral.js +2 -2
  7. package/lib/component/1d/IntegralResizable.js +1 -1
  8. package/lib/component/1d/IntegralsSeries.js +2 -2
  9. package/lib/component/1d/LinesSeries.js +1 -1
  10. package/lib/component/1d/PeakAnnotation.js +3 -3
  11. package/lib/component/1d/PeakAnnotations.js +1 -1
  12. package/lib/component/1d/Resizable.js +2 -2
  13. package/lib/component/1d/ResurrectedDatabaseRanges.js +1 -1
  14. package/lib/component/1d/SpectraTracker.js +3 -3
  15. package/lib/component/1d/Viewer1D.js +5 -5
  16. package/lib/component/1d/XAxis.js +1 -1
  17. package/lib/component/1d/YAxis.js +1 -1
  18. package/lib/component/1d/jCouplingGraph/JGraph.js +3 -4
  19. package/lib/component/1d/jCouplingGraph/JGraphVerticalAxis.js +1 -1
  20. package/lib/component/1d/jCouplingGraph/JsCoupling.js +1 -1
  21. package/lib/component/1d/jCouplingGraph/JsCouplingLinks.js +1 -1
  22. package/lib/component/1d/jCouplingGraph/JsCouplings.js +2 -2
  23. package/lib/component/1d/multiAnalysis/AnalysisRange.js +1 -1
  24. package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +2 -2
  25. package/lib/component/1d/multiplicityTree/MultiplicityTree.js +3 -3
  26. package/lib/component/1d/multiplicityTree/TempMultiplicityTree.js +1 -1
  27. package/lib/component/1d/multiplicityTree/TreeNodes.js +2 -2
  28. package/lib/component/1d/ranges/Range.js +2 -2
  29. package/lib/component/1d/ranges/RangeIntegral.js +1 -1
  30. package/lib/component/1d/ranges/Ranges.js +2 -2
  31. package/lib/component/1d/tool/BaseLineZones.js +1 -1
  32. package/lib/component/1d/tool/PeakPointer.js +1 -1
  33. package/lib/component/1d/tool/VerticalIndicator.js +1 -1
  34. package/lib/component/1d/tool/XLabelPointer.js +1 -1
  35. package/lib/component/2d/Chart2D.js +2 -2
  36. package/lib/component/2d/Contours.js +6 -6
  37. package/lib/component/2d/FooterBanner.js +3 -3
  38. package/lib/component/2d/Left1DChart.js +1 -1
  39. package/lib/component/2d/SignalDeltaLine.js +1 -1
  40. package/lib/component/2d/Top1DChart.js +1 -1
  41. package/lib/component/2d/Viewer2D.js +3 -3
  42. package/lib/component/2d/XAxis.js +1 -1
  43. package/lib/component/2d/YAxis.js +1 -1
  44. package/lib/component/2d/tools/XYLabelPointer.js +1 -1
  45. package/lib/component/2d/tools/slicing/HorizontalSliceChart.js +1 -1
  46. package/lib/component/2d/tools/slicing/SlicingView.js +1 -1
  47. package/lib/component/2d/tools/slicing/VerticalSliceChart.js +1 -1
  48. package/lib/component/2d/zones/IndicationLines.js +1 -1
  49. package/lib/component/2d/zones/Signal.js +2 -2
  50. package/lib/component/2d/zones/SignalCrosshair.js +1 -1
  51. package/lib/component/2d/zones/Zone.js +1 -1
  52. package/lib/component/2d/zones/Zones.js +2 -2
  53. package/lib/component/ErrorOverlay.js +1 -1
  54. package/lib/component/EventsTrackers/BrushTracker.js +1 -1
  55. package/lib/component/EventsTrackers/MouseTracker.js +1 -1
  56. package/lib/component/NMRium.d.ts +34 -33
  57. package/lib/component/NMRium.js +10 -10
  58. package/lib/component/assignment/index.js +1 -1
  59. package/lib/component/context/PreferencesContext.d.ts +84 -2
  60. package/lib/component/context/PreferencesContext.js +30 -5
  61. package/lib/component/elements/Button.js +1 -1
  62. package/lib/component/elements/ButtonToolTip.js +1 -1
  63. package/lib/component/elements/CheckBox.js +1 -1
  64. package/lib/component/elements/CloseButton.js +1 -1
  65. package/lib/component/elements/ColorInput.js +1 -1
  66. package/lib/component/elements/ContextMenu.js +1 -1
  67. package/lib/component/elements/DeleteButton.js +1 -1
  68. package/lib/component/elements/EditableColumn.js +1 -1
  69. package/lib/component/elements/Input.js +1 -1
  70. package/lib/component/elements/InputRange.js +1 -1
  71. package/lib/component/elements/IsotopesViewer.js +1 -1
  72. package/lib/component/elements/Label.js +1 -1
  73. package/lib/component/elements/Logo.js +1 -1
  74. package/lib/component/elements/MenuButton.js +3 -3
  75. package/lib/component/elements/MolecularFormulaInput.js +1 -1
  76. package/lib/component/elements/MoleculeSelection.js +1 -1
  77. package/lib/component/elements/NextPrev.js +2 -2
  78. package/lib/component/elements/NumberInput.js +1 -1
  79. package/lib/component/elements/ReactTable/Elements/ReactTableHeader.js +1 -1
  80. package/lib/component/elements/ReactTable/ReactTable.js +3 -3
  81. package/lib/component/elements/ReactTable/ReactTableExpandable.js +3 -3
  82. package/lib/component/elements/ReactTable/ReactTableFlexLayout.js +2 -2
  83. package/lib/component/elements/SaveButton.js +1 -1
  84. package/lib/component/elements/Select.js +1 -1
  85. package/lib/component/elements/Tab/DeleteButton.js +1 -1
  86. package/lib/component/elements/Tab/Tab.js +3 -3
  87. package/lib/component/elements/Tab/Tabs.js +2 -2
  88. package/lib/component/elements/Table/Table.js +1 -1
  89. package/lib/component/elements/Table/TableBody.js +1 -1
  90. package/lib/component/elements/Table/TableCell.js +1 -1
  91. package/lib/component/elements/Table/TableHead.js +1 -1
  92. package/lib/component/elements/Table/TableRow.js +1 -1
  93. package/lib/component/elements/ToggleButton.js +1 -1
  94. package/lib/component/elements/ToolTip/ToolTip.js +2 -2
  95. package/lib/component/elements/ToolbarMenu.js +3 -3
  96. package/lib/component/elements/accordion/Accordion.js +1 -1
  97. package/lib/component/elements/accordion/AccordionItem.js +2 -2
  98. package/lib/component/elements/dropDownButton/DropDownButton.d.ts +20 -1
  99. package/lib/component/elements/dropDownButton/DropDownButton.js +32 -34
  100. package/lib/component/elements/dropDownButton/DropDownList.d.ts +2 -9
  101. package/lib/component/elements/dropDownButton/DropDownList.js +39 -25
  102. package/lib/component/elements/formik/ErrorMessage.js +2 -2
  103. package/lib/component/elements/formik/FormikCheckBox.d.ts +1 -0
  104. package/lib/component/elements/formik/FormikCheckBox.js +2 -2
  105. package/lib/component/elements/formik/FormikColorInput.js +1 -1
  106. package/lib/component/elements/formik/FormikColorPicker.js +1 -1
  107. package/lib/component/elements/formik/FormikColumnFormatField.js +2 -2
  108. package/lib/component/elements/formik/FormikErrorsSummary.js +2 -2
  109. package/lib/component/elements/formik/FormikForm.js +1 -1
  110. package/lib/component/elements/formik/FormikInput.js +1 -1
  111. package/lib/component/elements/formik/FormikNumberInput.js +1 -1
  112. package/lib/component/elements/formik/FormikSelect.js +1 -1
  113. package/lib/component/elements/formik/FormikSlider.js +1 -1
  114. package/lib/component/elements/formik/FormikTextarea.js +1 -1
  115. package/lib/component/elements/formik/Input.js +1 -1
  116. package/lib/component/elements/formik/SelectBox.js +1 -1
  117. package/lib/component/elements/linearAxis/LinearVerticalAxis.js +3 -3
  118. package/lib/component/elements/popup/Alert/ProgressIndicator.js +1 -1
  119. package/lib/component/elements/popup/Alert/Provider.js +3 -3
  120. package/lib/component/elements/popup/Modal/ConfirmDialog.js +1 -1
  121. package/lib/component/elements/popup/Modal/Modal.js +1 -1
  122. package/lib/component/elements/popup/Modal/ModalContent.js +1 -1
  123. package/lib/component/elements/popup/Modal/Provider.js +3 -3
  124. package/lib/component/elements/popup/Transition.js +1 -1
  125. package/lib/component/elements/popup/Wrapper.js +1 -1
  126. package/lib/component/elements/toggle/ToggleButton.js +1 -1
  127. package/lib/component/elements/toggle/ToggleButtonGroup.js +1 -1
  128. package/lib/component/header/AutoPeakPickingOptionPanel.js +3 -3
  129. package/lib/component/header/BaseLineCorrectionPanel.js +1 -1
  130. package/lib/component/header/Header.js +28 -14
  131. package/lib/component/header/ManualPhaseCorrectionPanel.js +2 -2
  132. package/lib/component/header/RangesPickingOptionPanel.js +2 -2
  133. package/lib/component/header/ZeroFillingOptionsPanel.js +1 -1
  134. package/lib/component/header/Zones2DOptionPanel.js +1 -1
  135. package/lib/component/highlight/index.js +1 -1
  136. package/lib/component/hooks/useActiveSpectrumStyleOptions.js +1 -1
  137. package/lib/component/hooks/useCheckExperimentalFeature.js +5 -4
  138. package/lib/component/hooks/useCheckToolsVisibility.js +1 -1
  139. package/lib/component/hooks/useExport.js +15 -13
  140. package/lib/component/hooks/useTableSortBy.d.ts +2 -1
  141. package/lib/component/hooks/useTableSortBy.js +27 -16
  142. package/lib/component/loader/DefaultSpinnerComponent.js +1 -1
  143. package/lib/component/loader/DropZone.js +2 -2
  144. package/lib/component/loader/NoData.js +1 -3
  145. package/lib/component/loader/Spinner.js +1 -1
  146. package/lib/component/loader/SpinnerContext.js +1 -1
  147. package/lib/component/modal/AboutUsModal.js +4 -4
  148. package/lib/component/modal/AlignSpectraModal.js +1 -1
  149. package/lib/component/modal/CopyClipboardModal.js +2 -2
  150. package/lib/component/modal/ExportAsMatrixModal.js +1 -1
  151. package/lib/component/modal/ImportPublicationStringModal.js +13 -11
  152. package/lib/component/modal/LoadJCAMPModal.js +1 -1
  153. package/lib/component/modal/ModalStyle.js +1 -1
  154. package/lib/component/modal/MoleculeStructureEditorModal.js +1 -1
  155. package/lib/component/modal/MultipleSpectraFiltersModal/EquallySpacedFilter.js +1 -1
  156. package/lib/component/modal/MultipleSpectraFiltersModal/FromToFilter.js +1 -1
  157. package/lib/component/modal/MultipleSpectraFiltersModal/index.js +4 -4
  158. package/lib/component/modal/MultipletAnalysisModal.js +5 -5
  159. package/lib/component/modal/PredictSpectraModal.js +30 -23
  160. package/lib/component/modal/SaveAsModal.js +2 -2
  161. package/lib/component/modal/changeSum/ChangeSumModal.js +8 -7
  162. package/lib/component/modal/changeSum/SelectMolecule.js +1 -1
  163. package/lib/component/modal/editRange/EditRangeModal.d.ts +2 -1
  164. package/lib/component/modal/editRange/EditRangeModal.js +13 -9
  165. package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +33 -40
  166. package/lib/component/modal/editRange/forms/components/CouplingsTable.js +5 -5
  167. package/lib/component/modal/editRange/forms/components/DeltaInput.js +3 -3
  168. package/lib/component/modal/editRange/forms/components/SignalFormTab.js +1 -1
  169. package/lib/component/modal/editRange/forms/components/SignalsForm.js +5 -5
  170. package/lib/component/modal/editZone/EditPathLengthFormik.js +3 -3
  171. package/lib/component/modal/editZone/EditZoneModal.js +17 -15
  172. package/lib/component/modal/editZone/SignalFormTab.js +1 -1
  173. package/lib/component/modal/editZone/SignalsForm.js +2 -2
  174. package/lib/component/modal/setting/ControllersTabContent.js +1 -1
  175. package/lib/component/modal/setting/DisplayTabContent.d.ts +2 -2
  176. package/lib/component/modal/setting/DisplayTabContent.js +49 -15
  177. package/lib/component/modal/setting/FormattingTabContent.js +3 -3
  178. package/lib/component/modal/setting/GeneralSettings.js +61 -76
  179. package/lib/component/modal/setting/WorkspaceItem.d.ts +6 -0
  180. package/lib/component/modal/setting/WorkspaceItem.js +59 -0
  181. package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.js +1 -1
  182. package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +2 -2
  183. package/lib/component/panels/InformationPanel.js +4 -4
  184. package/lib/component/panels/IntegralsPanel/IntegralPanel.js +4 -4
  185. package/lib/component/panels/IntegralsPanel/IntegralTable.js +6 -6
  186. package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +5 -6
  187. package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +3 -3
  188. package/lib/component/panels/MoleculesPanel/MoleculePanel.js +5 -5
  189. package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +6 -6
  190. package/lib/component/panels/MultipleSpectraAnalysisPanel/ColumnHeader.js +1 -1
  191. package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleAnalysisCodeEditor.js +2 -2
  192. package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +16 -14
  193. package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +3 -3
  194. package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +5 -5
  195. package/lib/component/panels/Panels.js +46 -34
  196. package/lib/component/panels/PeaksPanel/PeaksPanel.js +2 -2
  197. package/lib/component/panels/PeaksPanel/PeaksPreferences.js +4 -5
  198. package/lib/component/panels/PeaksPanel/PeaksTable.js +4 -4
  199. package/lib/component/panels/RangesPanel/RangesHeader.js +16 -14
  200. package/lib/component/panels/RangesPanel/RangesPanel.js +3 -4
  201. package/lib/component/panels/RangesPanel/RangesPreferences.js +4 -5
  202. package/lib/component/panels/RangesPanel/RangesTable.js +3 -3
  203. package/lib/component/panels/RangesPanel/RangesTableRow.js +1 -1
  204. package/lib/component/panels/RangesPanel/TableColumns/AbsoluteColumn.js +1 -1
  205. package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.d.ts +2 -6
  206. package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.js +6 -66
  207. package/lib/component/panels/RangesPanel/TableColumns/CouplingColumn.js +1 -1
  208. package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -2
  209. package/lib/component/panels/RangesPanel/TableColumns/RangeColumn.js +1 -1
  210. package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +1 -1
  211. package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
  212. package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +2 -2
  213. package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.d.ts +7 -0
  214. package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +74 -0
  215. package/lib/component/panels/RangesPanel/hooks/useMapRanges.d.ts +7 -0
  216. package/lib/component/panels/RangesPanel/{useMapRanges.js → hooks/useMapRanges.js} +1 -1
  217. package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +12 -10
  218. package/lib/component/panels/SpectrumsPanel/SpectrumListItem.js +4 -4
  219. package/lib/component/panels/SpectrumsPanel/SpectrumListPanel.js +1 -1
  220. package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +13 -11
  221. package/lib/component/panels/SpectrumsPanel/base/ColorIndicator.js +3 -3
  222. package/lib/component/panels/SpectrumsPanel/base/ShowHideMarkersButton.js +1 -1
  223. package/lib/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -3
  224. package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.js +5 -5
  225. package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +1 -1
  226. package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.js +5 -5
  227. package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +1 -1
  228. package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +1 -1
  229. package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +3 -3
  230. package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +4 -4
  231. package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +1 -1
  232. package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -4
  233. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/Confirmation.js +1 -1
  234. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +3 -3
  235. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +3 -3
  236. package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +2 -2
  237. package/lib/component/panels/SummaryPanel/Overview.js +2 -2
  238. package/lib/component/panels/SummaryPanel/SetMolecularFormulaModal.js +1 -1
  239. package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js +2 -2
  240. package/lib/component/panels/SummaryPanel/SummaryPanel.js +4 -4
  241. package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +2 -2
  242. package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
  243. package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +1 -1
  244. package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +1 -1
  245. package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +3 -3
  246. package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +1 -1
  247. package/lib/component/panels/ZonesPanel/ZonesPanel.js +4 -7
  248. package/lib/component/panels/ZonesPanel/ZonesPreferences.js +4 -5
  249. package/lib/component/panels/ZonesPanel/ZonesTable.js +2 -2
  250. package/lib/component/panels/ZonesPanel/ZonesTableRow.js +1 -1
  251. package/lib/component/panels/databasePanel/DatabasePanel.js +3 -3
  252. package/lib/component/panels/databasePanel/DatabasePreferences.js +3 -4
  253. package/lib/component/panels/databasePanel/DatabaseTable.js +4 -4
  254. package/lib/component/panels/extra/placeholder/NoTableData.js +1 -1
  255. package/lib/component/panels/filtersPanel/FilterPanel.js +2 -2
  256. package/lib/component/panels/filtersPanel/FiltersTable.js +19 -15
  257. package/lib/component/panels/header/DefaultPanelHeader.js +2 -2
  258. package/lib/component/panels/header/PreferencesHeader.js +1 -1
  259. package/lib/component/panels/predictionPanel/PredictionOptions.js +5 -3
  260. package/lib/component/panels/predictionPanel/PredictionPanel.js +19 -17
  261. package/lib/component/reducer/Reducer.d.ts +7 -0
  262. package/lib/component/reducer/Reducer.js +7 -3
  263. package/lib/component/reducer/actions/FiltersActions.js +1 -1
  264. package/lib/component/reducer/actions/LoadActions.d.ts +2 -2
  265. package/lib/component/reducer/actions/LoadActions.js +20 -15
  266. package/lib/component/reducer/actions/MoleculeActions.js +5 -1
  267. package/lib/component/reducer/preferencesReducer.d.ts +183 -36
  268. package/lib/component/reducer/preferencesReducer.js +192 -83
  269. package/lib/component/reducer/types/Types.d.ts +6 -0
  270. package/lib/component/tool/BrushX.js +1 -1
  271. package/lib/component/tool/BrushXY.js +1 -1
  272. package/lib/component/tool/CrossLinePointer.js +1 -1
  273. package/lib/component/toolbar/BasicToolBar.js +23 -27
  274. package/lib/component/toolbar/FunctionToolBar.js +17 -18
  275. package/lib/component/toolbar/HistoryToolBar.js +1 -1
  276. package/lib/component/toolbar/ToolBar.js +2 -2
  277. package/lib/component/utility/FormatNumber.js +1 -1
  278. package/lib/component/workspaces/Workspace.d.ts +17 -0
  279. package/lib/component/workspaces/basic.js +29 -34
  280. package/lib/component/workspaces/exercise.d.ts +2 -0
  281. package/lib/component/workspaces/exercise.js +49 -0
  282. package/lib/component/workspaces/index.d.ts +3 -2
  283. package/lib/component/workspaces/index.js +3 -2
  284. package/lib/component/workspaces/prediction.d.ts +2 -0
  285. package/lib/component/workspaces/prediction.js +26 -0
  286. package/lib/component/workspaces/process1D.js +21 -32
  287. package/lib/data/PredictionManager.d.ts +2 -1
  288. package/lib/data/PredictionManager.js +20 -13
  289. package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +4 -1
  290. package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +2 -3
  291. package/lib/data/utilities/getAtom.js +1 -1
  292. package/lib/data/utilities/getColor.d.ts +1 -0
  293. package/lib/data/utilities/getColor.js +1 -1
  294. package/lib/types/PanelPreferencesType.d.ts +10 -0
  295. package/lib/types/PanelPreferencesType.js +1 -0
  296. package/lib/versionInfo.js +1 -1
  297. package/lib-cjs/component/1d/Chart1D.js +1 -1
  298. package/lib-cjs/component/1d/ExclusionZoneAnnotation.js +1 -1
  299. package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +7 -3
  300. package/lib-cjs/component/1d/FooterBanner.js +7 -8
  301. package/lib-cjs/component/1d/Integral.js +2 -2
  302. package/lib-cjs/component/1d/IntegralResizable.js +1 -1
  303. package/lib-cjs/component/1d/IntegralsSeries.js +2 -2
  304. package/lib-cjs/component/1d/Line.js +5 -1
  305. package/lib-cjs/component/1d/LinesSeries.js +1 -1
  306. package/lib-cjs/component/1d/PeakAnnotation.js +3 -3
  307. package/lib-cjs/component/1d/PeakAnnotations.js +1 -1
  308. package/lib-cjs/component/1d/Resizable.js +2 -2
  309. package/lib-cjs/component/1d/ResurrectedDatabaseRanges.js +1 -1
  310. package/lib-cjs/component/1d/SpectraTracker.js +3 -3
  311. package/lib-cjs/component/1d/Viewer1D.js +10 -6
  312. package/lib-cjs/component/1d/XAxis.js +6 -2
  313. package/lib-cjs/component/1d/YAxis.js +6 -2
  314. package/lib-cjs/component/1d/jCouplingGraph/JGraph.js +3 -4
  315. package/lib-cjs/component/1d/jCouplingGraph/JGraphVerticalAxis.js +1 -1
  316. package/lib-cjs/component/1d/jCouplingGraph/JsCoupling.js +1 -1
  317. package/lib-cjs/component/1d/jCouplingGraph/JsCouplingLinks.js +1 -1
  318. package/lib-cjs/component/1d/jCouplingGraph/JsCouplings.js +2 -2
  319. package/lib-cjs/component/1d/multiAnalysis/AnalysisRange.js +1 -1
  320. package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +2 -2
  321. package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +3 -3
  322. package/lib-cjs/component/1d/multiplicityTree/TempMultiplicityTree.js +1 -1
  323. package/lib-cjs/component/1d/multiplicityTree/TreeNodes.js +2 -2
  324. package/lib-cjs/component/1d/ranges/Range.js +2 -2
  325. package/lib-cjs/component/1d/ranges/RangeIntegral.js +1 -1
  326. package/lib-cjs/component/1d/ranges/Ranges.js +2 -2
  327. package/lib-cjs/component/1d/tool/BaseLineZones.js +1 -1
  328. package/lib-cjs/component/1d/tool/PeakPointer.js +1 -1
  329. package/lib-cjs/component/1d/tool/VerticalIndicator.js +1 -1
  330. package/lib-cjs/component/1d/tool/XLabelPointer.js +1 -1
  331. package/lib-cjs/component/2d/Chart2D.js +2 -2
  332. package/lib-cjs/component/2d/Contours.js +6 -6
  333. package/lib-cjs/component/2d/FooterBanner.js +3 -3
  334. package/lib-cjs/component/2d/Left1DChart.js +6 -2
  335. package/lib-cjs/component/2d/SignalDeltaLine.js +1 -1
  336. package/lib-cjs/component/2d/Top1DChart.js +6 -2
  337. package/lib-cjs/component/2d/Viewer2D.js +8 -4
  338. package/lib-cjs/component/2d/XAxis.js +6 -2
  339. package/lib-cjs/component/2d/YAxis.js +6 -2
  340. package/lib-cjs/component/2d/tools/XYLabelPointer.js +1 -1
  341. package/lib-cjs/component/2d/tools/slicing/HorizontalSliceChart.js +6 -2
  342. package/lib-cjs/component/2d/tools/slicing/SlicingView.js +1 -1
  343. package/lib-cjs/component/2d/tools/slicing/VerticalSliceChart.js +6 -2
  344. package/lib-cjs/component/2d/zones/IndicationLines.js +1 -1
  345. package/lib-cjs/component/2d/zones/Signal.js +2 -2
  346. package/lib-cjs/component/2d/zones/SignalCrosshair.js +1 -1
  347. package/lib-cjs/component/2d/zones/Zone.js +1 -1
  348. package/lib-cjs/component/2d/zones/Zones.js +2 -2
  349. package/lib-cjs/component/ErrorOverlay.js +1 -1
  350. package/lib-cjs/component/EventsTrackers/BrushTracker.js +1 -1
  351. package/lib-cjs/component/EventsTrackers/MouseTracker.js +1 -1
  352. package/lib-cjs/component/NMRium.js +14 -10
  353. package/lib-cjs/component/assignment/index.js +1 -1
  354. package/lib-cjs/component/context/PreferencesContext.js +33 -4
  355. package/lib-cjs/component/elements/Button.js +1 -1
  356. package/lib-cjs/component/elements/ButtonToolTip.js +1 -1
  357. package/lib-cjs/component/elements/CheckBox.js +1 -1
  358. package/lib-cjs/component/elements/CloseButton.js +1 -1
  359. package/lib-cjs/component/elements/ColorInput.js +1 -1
  360. package/lib-cjs/component/elements/ContextMenu.js +1 -1
  361. package/lib-cjs/component/elements/DeleteButton.js +1 -1
  362. package/lib-cjs/component/elements/EditableColumn.js +1 -1
  363. package/lib-cjs/component/elements/Input.js +1 -1
  364. package/lib-cjs/component/elements/InputRange.js +1 -1
  365. package/lib-cjs/component/elements/IsotopesViewer.js +1 -1
  366. package/lib-cjs/component/elements/Label.js +1 -1
  367. package/lib-cjs/component/elements/Logo.js +1 -1
  368. package/lib-cjs/component/elements/MenuButton.js +3 -3
  369. package/lib-cjs/component/elements/MolecularFormulaInput.js +1 -1
  370. package/lib-cjs/component/elements/MoleculeSelection.js +1 -1
  371. package/lib-cjs/component/elements/NextPrev.js +2 -2
  372. package/lib-cjs/component/elements/NumberInput.js +1 -1
  373. package/lib-cjs/component/elements/ReactTable/Elements/ReactTableHeader.js +1 -1
  374. package/lib-cjs/component/elements/ReactTable/ReactTable.js +8 -4
  375. package/lib-cjs/component/elements/ReactTable/ReactTableExpandable.js +3 -3
  376. package/lib-cjs/component/elements/ReactTable/ReactTableFlexLayout.js +2 -2
  377. package/lib-cjs/component/elements/SaveButton.js +1 -1
  378. package/lib-cjs/component/elements/Select.js +1 -1
  379. package/lib-cjs/component/elements/Tab/DeleteButton.js +1 -1
  380. package/lib-cjs/component/elements/Tab/Tab.js +3 -3
  381. package/lib-cjs/component/elements/Tab/Tabs.js +2 -2
  382. package/lib-cjs/component/elements/Table/Table.js +1 -1
  383. package/lib-cjs/component/elements/Table/TableBody.js +1 -1
  384. package/lib-cjs/component/elements/Table/TableCell.js +1 -1
  385. package/lib-cjs/component/elements/Table/TableHead.js +1 -1
  386. package/lib-cjs/component/elements/Table/TableRow.js +1 -1
  387. package/lib-cjs/component/elements/ToggleButton.js +1 -1
  388. package/lib-cjs/component/elements/ToolTip/ToolTip.js +2 -2
  389. package/lib-cjs/component/elements/ToolbarMenu.js +3 -3
  390. package/lib-cjs/component/elements/accordion/Accordion.js +1 -1
  391. package/lib-cjs/component/elements/accordion/AccordionItem.js +2 -2
  392. package/lib-cjs/component/elements/dropDownButton/DropDownButton.js +32 -34
  393. package/lib-cjs/component/elements/dropDownButton/DropDownList.js +39 -25
  394. package/lib-cjs/component/elements/formik/ErrorMessage.js +2 -2
  395. package/lib-cjs/component/elements/formik/FormikCheckBox.js +2 -2
  396. package/lib-cjs/component/elements/formik/FormikColorInput.js +1 -1
  397. package/lib-cjs/component/elements/formik/FormikColorPicker.js +1 -1
  398. package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +2 -2
  399. package/lib-cjs/component/elements/formik/FormikErrorsSummary.js +2 -2
  400. package/lib-cjs/component/elements/formik/FormikForm.js +1 -1
  401. package/lib-cjs/component/elements/formik/FormikInput.js +1 -1
  402. package/lib-cjs/component/elements/formik/FormikNumberInput.js +1 -1
  403. package/lib-cjs/component/elements/formik/FormikSelect.js +1 -1
  404. package/lib-cjs/component/elements/formik/FormikSlider.js +1 -1
  405. package/lib-cjs/component/elements/formik/FormikTextarea.js +1 -1
  406. package/lib-cjs/component/elements/formik/Input.js +1 -1
  407. package/lib-cjs/component/elements/formik/SelectBox.js +1 -1
  408. package/lib-cjs/component/elements/linearAxis/LinearVerticalAxis.js +3 -3
  409. package/lib-cjs/component/elements/popup/Alert/ProgressIndicator.js +1 -1
  410. package/lib-cjs/component/elements/popup/Alert/Provider.js +3 -3
  411. package/lib-cjs/component/elements/popup/Modal/ConfirmDialog.js +1 -1
  412. package/lib-cjs/component/elements/popup/Modal/Modal.js +1 -1
  413. package/lib-cjs/component/elements/popup/Modal/ModalContent.js +1 -1
  414. package/lib-cjs/component/elements/popup/Modal/Provider.js +3 -3
  415. package/lib-cjs/component/elements/popup/Transition.js +1 -1
  416. package/lib-cjs/component/elements/popup/Wrapper.js +1 -1
  417. package/lib-cjs/component/elements/toggle/ToggleButton.js +1 -1
  418. package/lib-cjs/component/elements/toggle/ToggleButtonGroup.js +1 -1
  419. package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +3 -3
  420. package/lib-cjs/component/header/BaseLineCorrectionPanel.js +6 -2
  421. package/lib-cjs/component/header/Header.js +27 -13
  422. package/lib-cjs/component/header/ManualPhaseCorrectionPanel.js +7 -3
  423. package/lib-cjs/component/header/RangesPickingOptionPanel.js +2 -2
  424. package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +1 -1
  425. package/lib-cjs/component/header/Zones2DOptionPanel.js +1 -1
  426. package/lib-cjs/component/highlight/index.js +1 -1
  427. package/lib-cjs/component/hooks/useActiveSpectrumStyleOptions.js +1 -1
  428. package/lib-cjs/component/hooks/useCheckExperimentalFeature.js +5 -4
  429. package/lib-cjs/component/hooks/useCheckToolsVisibility.js +1 -1
  430. package/lib-cjs/component/hooks/useExport.js +15 -13
  431. package/lib-cjs/component/hooks/useTableSortBy.js +27 -16
  432. package/lib-cjs/component/loader/DefaultSpinnerComponent.js +1 -1
  433. package/lib-cjs/component/loader/DropZone.js +2 -2
  434. package/lib-cjs/component/loader/NoData.js +1 -3
  435. package/lib-cjs/component/loader/Spinner.js +1 -1
  436. package/lib-cjs/component/loader/SpinnerContext.js +1 -1
  437. package/lib-cjs/component/modal/AboutUsModal.js +4 -4
  438. package/lib-cjs/component/modal/AlignSpectraModal.js +1 -1
  439. package/lib-cjs/component/modal/CopyClipboardModal.js +2 -2
  440. package/lib-cjs/component/modal/ExportAsMatrixModal.js +1 -1
  441. package/lib-cjs/component/modal/ImportPublicationStringModal.js +18 -12
  442. package/lib-cjs/component/modal/LoadJCAMPModal.js +1 -1
  443. package/lib-cjs/component/modal/ModalStyle.js +1 -1
  444. package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +1 -1
  445. package/lib-cjs/component/modal/MultipleSpectraFiltersModal/EquallySpacedFilter.js +1 -1
  446. package/lib-cjs/component/modal/MultipleSpectraFiltersModal/FromToFilter.js +1 -1
  447. package/lib-cjs/component/modal/MultipleSpectraFiltersModal/index.js +9 -5
  448. package/lib-cjs/component/modal/MultipletAnalysisModal.js +5 -5
  449. package/lib-cjs/component/modal/PredictSpectraModal.js +35 -24
  450. package/lib-cjs/component/modal/SaveAsModal.js +2 -2
  451. package/lib-cjs/component/modal/changeSum/ChangeSumModal.js +13 -8
  452. package/lib-cjs/component/modal/changeSum/SelectMolecule.js +1 -1
  453. package/lib-cjs/component/modal/editRange/EditRangeModal.js +13 -9
  454. package/lib-cjs/component/modal/editRange/forms/components/AddSignalFormTab.js +38 -41
  455. package/lib-cjs/component/modal/editRange/forms/components/CouplingsTable.js +5 -5
  456. package/lib-cjs/component/modal/editRange/forms/components/DeltaInput.js +3 -3
  457. package/lib-cjs/component/modal/editRange/forms/components/SignalFormTab.js +1 -1
  458. package/lib-cjs/component/modal/editRange/forms/components/SignalsForm.js +5 -5
  459. package/lib-cjs/component/modal/editRange/forms/validation/EditRangeValidation.js +5 -1
  460. package/lib-cjs/component/modal/editZone/EditPathLengthFormik.js +3 -3
  461. package/lib-cjs/component/modal/editZone/EditZoneModal.js +17 -15
  462. package/lib-cjs/component/modal/editZone/SignalFormTab.js +1 -1
  463. package/lib-cjs/component/modal/editZone/SignalsForm.js +2 -2
  464. package/lib-cjs/component/modal/editZone/validation/EditZoneValidation.js +5 -1
  465. package/lib-cjs/component/modal/setting/ControllersTabContent.js +1 -1
  466. package/lib-cjs/component/modal/setting/DisplayTabContent.js +48 -14
  467. package/lib-cjs/component/modal/setting/FormattingTabContent.js +3 -3
  468. package/lib-cjs/component/modal/setting/GeneralSettings.js +64 -75
  469. package/lib-cjs/component/modal/setting/WorkspaceItem.js +64 -0
  470. package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignment.js +1 -1
  471. package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +2 -2
  472. package/lib-cjs/component/panels/InformationPanel.js +4 -4
  473. package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +4 -4
  474. package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +6 -6
  475. package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +5 -6
  476. package/lib-cjs/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +3 -3
  477. package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +5 -5
  478. package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +6 -6
  479. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/ColumnHeader.js +1 -1
  480. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleAnalysisCodeEditor.js +2 -2
  481. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +16 -14
  482. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +8 -4
  483. package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +5 -5
  484. package/lib-cjs/component/panels/Panels.js +46 -34
  485. package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +2 -2
  486. package/lib-cjs/component/panels/PeaksPanel/PeaksPreferences.js +4 -5
  487. package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +9 -5
  488. package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +16 -14
  489. package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +3 -4
  490. package/lib-cjs/component/panels/RangesPanel/RangesPreferences.js +4 -5
  491. package/lib-cjs/component/panels/RangesPanel/RangesTable.js +3 -3
  492. package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +1 -1
  493. package/lib-cjs/component/panels/RangesPanel/TableColumns/AbsoluteColumn.js +1 -1
  494. package/lib-cjs/component/panels/RangesPanel/TableColumns/ActionsColumn.js +5 -65
  495. package/lib-cjs/component/panels/RangesPanel/TableColumns/CouplingColumn.js +1 -1
  496. package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -2
  497. package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeColumn.js +1 -1
  498. package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +1 -1
  499. package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
  500. package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +2 -2
  501. package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +80 -0
  502. package/lib-cjs/component/panels/RangesPanel/{useMapRanges.js → hooks/useMapRanges.js} +1 -1
  503. package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +12 -10
  504. package/lib-cjs/component/panels/SpectrumsPanel/SpectrumListItem.js +4 -4
  505. package/lib-cjs/component/panels/SpectrumsPanel/SpectrumListPanel.js +1 -1
  506. package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +13 -11
  507. package/lib-cjs/component/panels/SpectrumsPanel/base/ColorIndicator.js +3 -3
  508. package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideMarkersButton.js +1 -1
  509. package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -3
  510. package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.js +5 -5
  511. package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +1 -1
  512. package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.js +5 -5
  513. package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +1 -1
  514. package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +1 -1
  515. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +3 -3
  516. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +4 -4
  517. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +1 -1
  518. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -4
  519. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/Confirmation.js +1 -1
  520. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +8 -4
  521. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +3 -3
  522. package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +2 -2
  523. package/lib-cjs/component/panels/SummaryPanel/Overview.js +2 -2
  524. package/lib-cjs/component/panels/SummaryPanel/SetMolecularFormulaModal.js +1 -1
  525. package/lib-cjs/component/panels/SummaryPanel/SetShiftTolerancesModal.js +2 -2
  526. package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +4 -4
  527. package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +2 -2
  528. package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
  529. package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +1 -1
  530. package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +1 -1
  531. package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +3 -3
  532. package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +1 -1
  533. package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +4 -7
  534. package/lib-cjs/component/panels/ZonesPanel/ZonesPreferences.js +4 -5
  535. package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +2 -2
  536. package/lib-cjs/component/panels/ZonesPanel/ZonesTableRow.js +1 -1
  537. package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +3 -3
  538. package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +3 -4
  539. package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +4 -4
  540. package/lib-cjs/component/panels/extra/placeholder/NoTableData.js +1 -1
  541. package/lib-cjs/component/panels/filtersPanel/FilterPanel.js +2 -2
  542. package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +19 -15
  543. package/lib-cjs/component/panels/header/DefaultPanelHeader.js +2 -2
  544. package/lib-cjs/component/panels/header/PreferencesHeader.js +1 -1
  545. package/lib-cjs/component/panels/predictionPanel/PredictionOptions.js +10 -4
  546. package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +19 -17
  547. package/lib-cjs/component/reducer/IgnoreActions.js +5 -1
  548. package/lib-cjs/component/reducer/Reducer.js +14 -5
  549. package/lib-cjs/component/reducer/actions/FiltersActions.js +6 -2
  550. package/lib-cjs/component/reducer/actions/LoadActions.js +25 -16
  551. package/lib-cjs/component/reducer/actions/MoleculeActions.js +10 -2
  552. package/lib-cjs/component/reducer/actions/RangesActions.js +5 -1
  553. package/lib-cjs/component/reducer/actions/SpectraAnalysisAction.js +5 -1
  554. package/lib-cjs/component/reducer/actions/SpectrumsActions.js +5 -1
  555. package/lib-cjs/component/reducer/actions/ToolsActions.js +5 -1
  556. package/lib-cjs/component/reducer/actions/ZonesActions.js +5 -1
  557. package/lib-cjs/component/reducer/preferencesReducer.js +191 -81
  558. package/lib-cjs/component/tool/BrushX.js +1 -1
  559. package/lib-cjs/component/tool/BrushXY.js +1 -1
  560. package/lib-cjs/component/tool/CrossLinePointer.js +1 -1
  561. package/lib-cjs/component/toolbar/BasicToolBar.js +23 -27
  562. package/lib-cjs/component/toolbar/FunctionToolBar.js +22 -19
  563. package/lib-cjs/component/toolbar/HistoryToolBar.js +1 -1
  564. package/lib-cjs/component/toolbar/ToolBar.js +2 -2
  565. package/lib-cjs/component/toolbar/ToolTypes.js +5 -1
  566. package/lib-cjs/component/utility/FormatNumber.js +1 -1
  567. package/lib-cjs/component/workspaces/basic.js +29 -34
  568. package/lib-cjs/component/workspaces/exercise.js +52 -0
  569. package/lib-cjs/component/workspaces/index.js +3 -2
  570. package/lib-cjs/component/workspaces/prediction.js +29 -0
  571. package/lib-cjs/component/workspaces/process1D.js +21 -32
  572. package/lib-cjs/data/Filters.js +5 -1
  573. package/lib-cjs/data/FiltersManager.js +5 -1
  574. package/lib-cjs/data/PredictionManager.js +19 -12
  575. package/lib-cjs/data/SpectraManager.js +5 -1
  576. package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +9 -2
  577. package/lib-cjs/data/data1d/Spectrum1D/shift/getShiftX.js +5 -1
  578. package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +7 -4
  579. package/lib-cjs/data/data2d/Spectrum2D/shift/getShift.js +5 -1
  580. package/lib-cjs/data/utilities/getAtom.js +1 -1
  581. package/lib-cjs/data/utilities/getColor.js +2 -1
  582. package/lib-cjs/types/PanelPreferencesType.js +2 -0
  583. package/lib-cjs/versionInfo.js +1 -1
  584. package/package.json +21 -21
  585. package/lib/component/panels/RangesPanel/useMapRanges.d.ts +0 -6
  586. package/lib/component/workspaces/exercise1D.d.ts +0 -2
  587. package/lib/component/workspaces/exercise1D.js +0 -46
  588. package/lib-cjs/component/workspaces/exercise1D.js +0 -49
@@ -3,161 +3,271 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.preferencesInitialState = exports.SET_PANELS_PREFERENCES = exports.RESET_PREFERENCES = exports.SET_PREFERENCES = exports.INIT_PREFERENCES = void 0;
6
+ exports.initPreferencesState = exports.preferencesInitialState = exports.WORKSPACES = void 0;
7
7
  const immer_1 = require("immer");
8
8
  const merge_1 = __importDefault(require("lodash/merge"));
9
+ const generateID_1 = __importDefault(require("../../data/utilities/generateID"));
9
10
  const LocalStorage_1 = require("../utility/LocalStorage");
10
11
  const workspaces_1 = __importDefault(require("../workspaces"));
11
- exports.INIT_PREFERENCES = 'INIT_PREFERENCES';
12
- exports.SET_PREFERENCES = 'SET_PREFERENCES';
13
- exports.RESET_PREFERENCES = 'RESET_PREFERENCES';
14
- exports.SET_PANELS_PREFERENCES = 'SET_PANELS_PREFERENCES';
15
- const LOCAL_STORAGE_VERSION = 3;
12
+ const LOCAL_STORAGE_VERSION = 5;
13
+ exports.WORKSPACES = [
14
+ {
15
+ key: 'default',
16
+ label: workspaces_1.default.default.label,
17
+ },
18
+ {
19
+ key: 'process1D',
20
+ label: workspaces_1.default.process1D.label,
21
+ },
22
+ {
23
+ key: 'exercise',
24
+ label: workspaces_1.default.exercise.label,
25
+ },
26
+ {
27
+ key: 'prediction',
28
+ label: workspaces_1.default.prediction.label,
29
+ },
30
+ ];
16
31
  function getPreferencesByWorkspace(workspace) {
17
32
  switch (workspace) {
18
- case 'exercise1D':
19
- return workspaces_1.default.exercise1D;
33
+ case 'exercise':
34
+ return workspaces_1.default.exercise;
20
35
  case 'process1D':
21
36
  return workspaces_1.default.process1D;
37
+ case 'prediction':
38
+ return workspaces_1.default.prediction;
39
+ case 'default':
40
+ return workspaces_1.default.default;
22
41
  default:
23
- return workspaces_1.default.basic;
42
+ return {};
24
43
  }
25
44
  }
45
+ function getActiveWorkspace(draft) {
46
+ return draft.workspaces[draft.workspace.current || 'default'];
47
+ }
26
48
  exports.preferencesInitialState = {
27
- basePreferences: {},
28
- display: workspaces_1.default.basic.display,
29
- controllers: {
30
- dimmedSpectraTransparency: 0.1,
31
- },
32
- formatting: {
33
- nucleus: [
34
- { key: '1H', name: '1H', ppm: '0.00', hz: '0.00' },
35
- { key: '13C', name: '13C', ppm: '0.00', hz: '0.00' },
36
- { key: '15N', name: '15N', ppm: '0.00', hz: '0.00' },
37
- { key: '19F', name: '19F', ppm: '0.00', hz: '0.00' },
38
- { key: '29Si', name: '29Si', ppm: '0.00', hz: '0.00' },
39
- { key: '31P', name: '31P', ppm: '0.00', hz: '0.00' },
40
- ],
41
- nucleusByKey: {},
42
- panels: {},
49
+ version: LOCAL_STORAGE_VERSION,
50
+ workspaces: {},
51
+ dispatch: () => null,
52
+ workspace: {
53
+ current: 'default',
54
+ base: null,
43
55
  },
44
- dispatch: null,
45
- workspace: 'default',
46
56
  };
47
- function getTruthyObjectValues(data) {
57
+ function filterObject(data) {
48
58
  return JSON.parse(JSON.stringify(data), (key, value) => {
49
- if (value) {
59
+ if (value?.hidden !== true) {
50
60
  return value;
51
61
  }
52
62
  });
53
63
  }
64
+ function FlatObject(data) {
65
+ let result = {};
66
+ JSON.parse(JSON.stringify(data), (key, value) => {
67
+ if (value?.hidden !== true && key) {
68
+ result[key] = result[key]++ || 1;
69
+ }
70
+ });
71
+ return result;
72
+ }
73
+ function checkKeysExists(sourceObject, targetObject) {
74
+ const source = FlatObject(sourceObject);
75
+ const target = FlatObject(targetObject);
76
+ if (Object.keys(target).length === 0) {
77
+ return false;
78
+ }
79
+ for (const [key, value] of Object.entries(source)) {
80
+ if (!target[key] || target[key] !== value) {
81
+ return false;
82
+ }
83
+ }
84
+ return true;
85
+ }
54
86
  function mapNucleus(draft) {
55
- if (draft.formatting.nucleus && Array.isArray(draft.formatting.nucleus)) {
56
- draft.formatting.nucleusByKey = draft.formatting.nucleus.reduce((acc, item) => {
57
- acc[item.name.toLowerCase()] = item;
58
- return { ...acc };
59
- }, {});
87
+ const currentWorkspacePreferences = getActiveWorkspace(draft);
88
+ if (currentWorkspacePreferences.formatting.nucleus &&
89
+ Array.isArray(currentWorkspacePreferences.formatting.nucleus)) {
90
+ currentWorkspacePreferences.formatting.nucleusByKey =
91
+ currentWorkspacePreferences.formatting.nucleus.reduce((acc, item) => {
92
+ acc[item.name.toLowerCase()] = item;
93
+ return { ...acc };
94
+ }, {});
60
95
  }
61
96
  }
62
- function handleInit(draft, action) {
97
+ function initPreferencesState(state) {
63
98
  const nmrLocalStorageVersion = (0, LocalStorage_1.getLocalStorage)('nmr-local-storage-version', false);
64
99
  let localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
65
100
  // remove old nmr-local-storage-version key
66
101
  if (nmrLocalStorageVersion && localData?.version) {
67
102
  (0, LocalStorage_1.removeData)('nmr-local-storage-version');
68
103
  }
104
+ // if the local setting version != current settings version number
69
105
  if (!localData?.version || localData?.version !== LOCAL_STORAGE_VERSION) {
70
106
  (0, LocalStorage_1.removeData)('nmr-general-settings');
71
107
  }
108
+ return {
109
+ ...state,
110
+ workspaces: localData?.workspaces || { default: workspaces_1.default.default },
111
+ };
112
+ }
113
+ exports.initPreferencesState = initPreferencesState;
114
+ function handleInit(draft, action) {
72
115
  if (action.payload) {
116
+ const localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
73
117
  const { dispatch, workspace, ...resProps } = action.payload;
74
- draft.workspace = workspace;
75
- const workspacePreferences = getPreferencesByWorkspace(workspace);
76
- if (!localData ||
77
- !localData?.workspaces[workspace] ||
78
- workspacePreferences.version !== localData?.workspaces[workspace]?.version) {
79
- localData = localData || {};
80
- localData = {
81
- version: LOCAL_STORAGE_VERSION,
118
+ /**
119
+ * set the current workspace what the user-defined in the setting if the workspace is not defined at the level of component, otherwise
120
+ * use the default workspace
121
+ *
122
+ */
123
+ draft.workspace =
124
+ !workspace && localData?.currentWorkspace
125
+ ? { current: localData.currentWorkspace, base: null }
126
+ : { current: workspace || 'default', base: workspace };
127
+ const workspacePreferences = (0, merge_1.default)({}, getPreferencesByWorkspace(draft.workspace.current), resProps);
128
+ const currentWorkspacePreferences = getActiveWorkspace(draft);
129
+ /**
130
+ * Update the local storage general preferences
131
+ * 1- if local storage is empty.
132
+ * 2- if predefine workspaces.
133
+ * 3- b) if workspace not exists in the local storage
134
+ * c) if the local setting workspace version != current workspace version number
135
+ * d) if hard code workspace parameters != current workspace parameters
136
+ */
137
+ if ((workspaces_1.default[draft.workspace.current] &&
138
+ (!currentWorkspacePreferences ||
139
+ workspacePreferences?.version !==
140
+ currentWorkspacePreferences?.version ||
141
+ !checkKeysExists(workspacePreferences.display, currentWorkspacePreferences?.display))) ||
142
+ !localData) {
143
+ const { workspaces, version } = draft || {};
144
+ const display = filterObject(workspacePreferences.display);
145
+ const data = {
146
+ version,
82
147
  workspaces: {
83
- ...localData.workspaces,
84
- [workspace]: {
148
+ ...workspaces,
149
+ [draft.workspace.current]: {
85
150
  ...workspacePreferences,
86
- controllers: draft.controllers,
87
- formatting: draft.formatting,
151
+ display,
88
152
  },
89
153
  },
90
154
  };
91
- (0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(localData));
155
+ draft.workspaces[draft.workspace.current] = (0, merge_1.default)({}, currentWorkspacePreferences, workspacePreferences);
156
+ (0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(data));
92
157
  }
93
- draft.basePreferences = (0, merge_1.default)({}, workspacePreferences, resProps);
94
- const hiddenModeFeatures = getTruthyObjectValues(draft.basePreferences.display);
95
- let hiddenLocalStorageFeatures = {};
96
- draft.dispatch = dispatch;
97
- const localStorageModePreferences = localData?.workspaces[workspace] || null;
98
- if (localStorageModePreferences) {
99
- Object.entries(localStorageModePreferences).forEach(([k, v]) => {
100
- if (k === 'display') {
101
- hiddenLocalStorageFeatures = getTruthyObjectValues(v);
102
- }
103
- else if (!['dispatch', 'basePreferences'].includes(k)) {
104
- draft[k] = (0, merge_1.default)({}, resProps[k] ? resProps[k] : {}, v);
105
- }
106
- });
107
- mapNucleus(draft);
158
+ else {
159
+ currentWorkspacePreferences.display = (0, merge_1.default)({}, workspacePreferences.display, currentWorkspacePreferences.display);
108
160
  }
109
- draft.display = (0, merge_1.default)({}, getPreferencesByWorkspace('default').display, hiddenModeFeatures, hiddenLocalStorageFeatures);
161
+ draft.dispatch = dispatch;
110
162
  }
111
163
  }
112
164
  function handleSetPreferences(draft, action) {
113
165
  if (action.payload) {
166
+ const currentWorkspacePreferences = getActiveWorkspace(draft);
114
167
  const { controllers, formatting, display } = action.payload;
115
168
  let localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
169
+ localData.currentWorkspace = draft.workspace.current;
116
170
  localData.workspaces = {
117
171
  ...localData.workspaces,
118
- [draft.workspace]: {
119
- ...localData.workspaces[draft.workspace],
172
+ [draft.workspace.current]: {
173
+ ...localData.workspaces[draft.workspace.current],
120
174
  controllers,
121
175
  formatting,
122
176
  display,
123
177
  },
124
178
  };
125
179
  (0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(localData));
126
- draft.controllers = controllers;
127
- draft.formatting = formatting;
128
- draft.display.panels = display.panels;
129
- draft.display.general.hideExperimentalFeatures =
130
- display.general.hideExperimentalFeatures;
180
+ currentWorkspacePreferences.controllers = controllers;
181
+ currentWorkspacePreferences.formatting = formatting;
182
+ currentWorkspacePreferences.display = {
183
+ ...currentWorkspacePreferences.display,
184
+ panels: display.panels,
185
+ general: {
186
+ ...(currentWorkspacePreferences.display.general || {}),
187
+ experimentalFeatures: display.general.experimentalFeatures,
188
+ },
189
+ };
131
190
  mapNucleus(draft);
132
191
  }
133
192
  }
134
193
  function handleSetPanelsPreferences(draft, action) {
135
194
  if (action.payload) {
195
+ const currentWorkspacePreferences = getActiveWorkspace(draft);
136
196
  const { key, value } = action.payload;
137
197
  let localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
138
- localData.workspaces[draft.workspace].formatting.panels[key] = value;
198
+ localData.workspaces[draft.workspace.current].formatting.panels[key] =
199
+ value;
139
200
  (0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(localData));
140
- draft.formatting.panels[key] = value;
201
+ currentWorkspacePreferences.formatting.panels[key] = value;
141
202
  }
142
203
  }
143
204
  function handleResetPreferences(draft) {
205
+ const currentWorkspacePreferences = getActiveWorkspace(draft);
144
206
  let localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
145
- const hiddenFeatures = getTruthyObjectValues(draft.basePreferences.display);
146
- const workSpaceDisplayPreferences = (0, merge_1.default)({}, getPreferencesByWorkspace(draft.workspace).display, hiddenFeatures);
147
- localData.workspaces[draft.workspace].display = workSpaceDisplayPreferences;
148
- draft.display = workSpaceDisplayPreferences;
207
+ const workSpaceDisplayPreferences = getPreferencesByWorkspace(draft.workspace.current).display;
208
+ if (localData.workspaces[draft.workspace.current]) {
209
+ localData.workspaces[draft.workspace.current].display =
210
+ workSpaceDisplayPreferences;
211
+ (0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(localData));
212
+ }
213
+ currentWorkspacePreferences.display = workSpaceDisplayPreferences;
214
+ }
215
+ function handleSetWorkspace(draft, action) {
216
+ const workspaceKey = action.payload.workspace;
217
+ if (!draft.workspaces[workspaceKey]) {
218
+ draft.workspaces[workspaceKey] = getPreferencesByWorkspace(workspaceKey);
219
+ }
220
+ draft.workspace.current = workspaceKey;
221
+ }
222
+ function handleAddWorkspace(draft, action) {
223
+ const { workspace: workspaceName, data: { display, controllers, formatting }, } = action.payload;
224
+ const newWorkSpace = {
225
+ version: 1,
226
+ label: workspaceName,
227
+ display,
228
+ controllers,
229
+ formatting,
230
+ };
231
+ const newWorkspaceKey = (0, generateID_1.default)();
232
+ const localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
233
+ localData.workspaces[newWorkspaceKey] = newWorkSpace;
234
+ (0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(localData));
235
+ draft.workspaces[newWorkspaceKey] = newWorkSpace;
236
+ draft.workspace.current = newWorkspaceKey;
237
+ }
238
+ function handleRemoveWorkspace(draft, action) {
239
+ const { workspace } = action.payload;
240
+ if (workspace === draft.workspace.current) {
241
+ draft.workspace.current = 'default';
242
+ }
243
+ let localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
244
+ const storedWorkspaces = (0, immer_1.original)(draft)?.workspaces || {};
245
+ const workspaces = Object.keys(storedWorkspaces).reduce((acc, key) => {
246
+ if (key !== workspace) {
247
+ acc[key] = storedWorkspaces[key];
248
+ }
249
+ return acc;
250
+ }, {});
251
+ draft.workspaces = workspaces;
252
+ localData.workspaces = filterObject(workspaces);
149
253
  (0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(localData));
150
254
  }
151
255
  function innerPreferencesReducer(draft, action) {
152
256
  switch (action.type) {
153
- case exports.INIT_PREFERENCES:
257
+ case 'INIT_PREFERENCES':
154
258
  return handleInit(draft, action);
155
- case exports.SET_PREFERENCES:
259
+ case 'SET_PREFERENCES':
156
260
  return handleSetPreferences(draft, action);
157
- case exports.SET_PANELS_PREFERENCES:
261
+ case 'SET_PANELS_PREFERENCES':
158
262
  return handleSetPanelsPreferences(draft, action);
159
- case exports.RESET_PREFERENCES:
263
+ case 'RESET_PREFERENCES':
160
264
  return handleResetPreferences(draft);
265
+ case 'SET_WORKSPACE':
266
+ return handleSetWorkspace(draft, action);
267
+ case 'ADD_WORKSPACE':
268
+ return handleAddWorkspace(draft, action);
269
+ case 'REMOVE_WORKSPACE':
270
+ return handleRemoveWorkspace(draft, action);
161
271
  default:
162
272
  return draft;
163
273
  }
@@ -33,6 +33,6 @@ function BrushX() {
33
33
  ...styles.container,
34
34
  transform: `translate(${startX}px, 0px) scaleX(${scale})`,
35
35
  willChange: 'transform',
36
- }, children: (0, jsx_runtime_1.jsxs)("svg", { width: width, height: height, children: [(0, jsx_runtime_1.jsx)("line", { x1: "0", y1: "0", x2: "0", y2: height, strokeWidth: "8", stroke: "red" }, void 0), (0, jsx_runtime_1.jsx)("line", { x1: width, y1: "0", x2: width, y2: height, strokeWidth: "8", stroke: "red" }, void 0), (0, jsx_runtime_1.jsx)("rect", { x: "0", y: "0", width: width, height: height, fill: "gray", opacity: "0.2" }, void 0)] }, void 0) }, void 0));
36
+ }, children: (0, jsx_runtime_1.jsxs)("svg", { width: width, height: height, children: [(0, jsx_runtime_1.jsx)("line", { x1: "0", y1: "0", x2: "0", y2: height, strokeWidth: "8", stroke: "red" }), (0, jsx_runtime_1.jsx)("line", { x1: width, y1: "0", x2: width, y2: height, strokeWidth: "8", stroke: "red" }), (0, jsx_runtime_1.jsx)("rect", { x: "0", y: "0", width: width, height: height, fill: "gray", opacity: "0.2" })] }) }));
37
37
  }
38
38
  exports.default = BrushX;
@@ -85,6 +85,6 @@ function BrushXY({ brushType = exports.BRUSH_TYPE.XY, dimensionBorder = defaultD
85
85
  ...styles.container,
86
86
  transform: `translate(${startX}px, ${startY}px) scale(${scaleX},${scaleY})`,
87
87
  willChange: 'transform',
88
- }, children: (0, jsx_runtime_1.jsx)("svg", { width: width, height: height, children: (0, jsx_runtime_1.jsx)("rect", { x: "0", y: "0", width: width, height: height, fill: "gray", opacity: "0.2" }, void 0) }, void 0) }, void 0));
88
+ }, children: (0, jsx_runtime_1.jsx)("svg", { width: width, height: height, children: (0, jsx_runtime_1.jsx)("rect", { x: "0", y: "0", width: width, height: height, fill: "gray", opacity: "0.2" }) }) }));
89
89
  }
90
90
  exports.default = BrushXY;
@@ -52,6 +52,6 @@ function CrossLinePointer() {
52
52
  overflow: 'visible',
53
53
  width: 2 * width,
54
54
  height: 2 * height,
55
- }, children: (0, jsx_runtime_1.jsxs)("svg", { width: 2 * width, height: 2 * height, children: [(0, jsx_runtime_1.jsx)("line", { style: styles.line, x1: width, y1: "0", x2: width, y2: height * 2 }, "vertical_line"), (0, jsx_runtime_1.jsx)("line", { style: styles.line, x1: "0", y1: height, x2: width * 2, y2: height }, "horizontal_line")] }, void 0) }, "crossLine"));
55
+ }, children: (0, jsx_runtime_1.jsxs)("svg", { width: 2 * width, height: 2 * height, children: [(0, jsx_runtime_1.jsx)("line", { style: styles.line, x1: width, y1: "0", x2: width, y2: height * 2 }, "vertical_line"), (0, jsx_runtime_1.jsx)("line", { style: styles.line, x1: "0", y1: height, x2: width * 2, y2: height }, "horizontal_line")] }) }, "crossLine"));
56
56
  }
57
57
  exports.default = CrossLinePointer;
@@ -6,17 +6,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const jsx_runtime_1 = require("react/jsx-runtime");
7
7
  const analysis_ui_components_1 = require("analysis-ui-components");
8
8
  const cheminfo_font_1 = require("cheminfo-font");
9
- const get_1 = __importDefault(require("lodash/get"));
10
9
  const react_1 = require("react");
11
10
  const fa_1 = require("react-icons/fa");
12
11
  const ChartContext_1 = require("../context/ChartContext");
13
12
  const DispatchContext_1 = require("../context/DispatchContext");
14
13
  const LoaderContext_1 = require("../context/LoaderContext");
15
- const PreferencesContext_1 = require("../context/PreferencesContext");
16
14
  const ToolbarMenu_1 = __importDefault(require("../elements/ToolbarMenu"));
17
15
  const Alert_1 = require("../elements/popup/Alert");
18
16
  const Modal_1 = require("../elements/popup/Modal");
19
17
  const useCheckExperimentalFeature_1 = __importDefault(require("../hooks/useCheckExperimentalFeature"));
18
+ const useCheckToolsVisibility_1 = require("../hooks/useCheckToolsVisibility");
20
19
  const useDatumWithSpectraStatistics_1 = __importDefault(require("../hooks/useDatumWithSpectraStatistics"));
21
20
  const useExport_1 = __importDefault(require("../hooks/useExport"));
22
21
  const useToolsFunctions_1 = __importDefault(require("../hooks/useToolsFunctions"));
@@ -27,59 +26,59 @@ const Types_1 = require("../reducer/types/Types");
27
26
  const IMPORT_MENU = [
28
27
  {
29
28
  id: 'importFile',
30
- icon: (0, jsx_runtime_1.jsx)(fa_1.FaFile, {}, void 0),
29
+ icon: (0, jsx_runtime_1.jsx)(fa_1.FaFile, {}),
31
30
  label: 'Import from file system (Press Ctrl + O)',
32
31
  },
33
32
  {
34
33
  id: 'importJDX',
35
- icon: (0, jsx_runtime_1.jsx)(fa_1.FaFile, {}, void 0),
34
+ icon: (0, jsx_runtime_1.jsx)(fa_1.FaFile, {}),
36
35
  label: 'Add JCAMP-DX from URL',
37
36
  },
38
37
  {
39
38
  id: 'importPublicationString',
40
- icon: (0, jsx_runtime_1.jsx)(fa_1.FaFile, {}, void 0),
39
+ icon: (0, jsx_runtime_1.jsx)(fa_1.FaFile, {}),
41
40
  label: 'Import from publication string',
42
41
  },
43
42
  ];
44
43
  const EXPORT_MENU = [
45
44
  {
46
45
  id: 'svg',
47
- icon: (0, jsx_runtime_1.jsx)(fa_1.FaDownload, {}, void 0),
46
+ icon: (0, jsx_runtime_1.jsx)(fa_1.FaDownload, {}),
48
47
  label: 'Export as SVG',
49
48
  },
50
49
  {
51
50
  id: 'png',
52
- icon: (0, jsx_runtime_1.jsx)(fa_1.FaFileImage, {}, void 0),
51
+ icon: (0, jsx_runtime_1.jsx)(fa_1.FaFileImage, {}),
53
52
  label: 'Export as PNG',
54
53
  },
55
54
  {
56
55
  id: 'json',
57
- icon: (0, jsx_runtime_1.jsx)(fa_1.FaFileDownload, {}, void 0),
56
+ icon: (0, jsx_runtime_1.jsx)(fa_1.FaFileDownload, {}),
58
57
  label: 'Save data ( Press Ctrl + S )',
59
58
  },
60
59
  {
61
60
  id: 'advance_save',
62
- icon: (0, jsx_runtime_1.jsx)(fa_1.FaFileDownload, {}, void 0),
61
+ icon: (0, jsx_runtime_1.jsx)(fa_1.FaFileDownload, {}),
63
62
  label: 'Save data as ( Press Ctrl + Shift + S )',
64
63
  },
65
64
  {
66
65
  id: 'nmre',
67
- icon: (0, jsx_runtime_1.jsx)(fa_1.FaFileDownload, {}, void 0),
66
+ icon: (0, jsx_runtime_1.jsx)(fa_1.FaFileDownload, {}),
68
67
  label: 'Save NMRE data',
69
68
  },
70
69
  {
71
70
  id: 'copy',
72
- icon: (0, jsx_runtime_1.jsx)(fa_1.FaCopy, {}, void 0),
71
+ icon: (0, jsx_runtime_1.jsx)(fa_1.FaCopy, {}),
73
72
  label: 'Copy image to Clipboard ( Press Ctrl + C )',
74
73
  },
75
74
  ];
76
75
  function BasicToolBarInner({ info, verticalAlign, displayerMode, ftCounter, fidCounter, activeSpectrum, }) {
77
76
  const dispatch = (0, DispatchContext_1.useDispatch)();
78
- const preferences = (0, PreferencesContext_1.usePreferences)();
79
77
  const alert = (0, Alert_1.useAlert)();
80
78
  const modal = (0, Modal_1.useModal)();
81
79
  const openLoader = (0, LoaderContext_1.useLoader)();
82
80
  const isExperimentalFeature = (0, useCheckExperimentalFeature_1.default)();
81
+ const isButtonVisible = (0, useCheckToolsVisibility_1.useCheckToolsVisibility)();
83
82
  const importMenu = (0, react_1.useMemo)(() => {
84
83
  return isExperimentalFeature
85
84
  ? IMPORT_MENU
@@ -101,14 +100,11 @@ function BasicToolBarInner({ info, verticalAlign, displayerMode, ftCounter, fidC
101
100
  dispatch({ type: Types_1.SET_LOADING_FLAG, isLoading: true });
102
101
  }, [dispatch, modal]);
103
102
  const importJCAMPFile = (0, react_1.useCallback)(() => {
104
- modal.show((0, jsx_runtime_1.jsx)(LoadJCAMPModal_1.default, { onLoadClick: LoadJacmpHandler, onClose: () => modal.close(), startLoading: startLoadingHandler }, void 0), {});
103
+ modal.show((0, jsx_runtime_1.jsx)(LoadJCAMPModal_1.default, { onLoadClick: LoadJacmpHandler, onClose: () => modal.close(), startLoading: startLoadingHandler }), {});
105
104
  }, [LoadJacmpHandler, modal, startLoadingHandler]);
106
105
  const openImportPublicationStringModal = (0, react_1.useCallback)(() => {
107
- modal.show((0, jsx_runtime_1.jsx)(ImportPublicationStringModal_1.default, { onClose: () => modal.close() }, void 0), {});
106
+ modal.show((0, jsx_runtime_1.jsx)(ImportPublicationStringModal_1.default, { onClose: () => modal.close() }), {});
108
107
  }, [modal]);
109
- const isButtonVisible = (0, react_1.useCallback)((key) => {
110
- return !(0, get_1.default)(preferences, `display.toolBarButtons.${key}`);
111
- }, [preferences]);
112
108
  const importHandler = (0, react_1.useCallback)(({ id }) => {
113
109
  switch (id) {
114
110
  case 'importFile':
@@ -155,22 +151,22 @@ function BasicToolBarInner({ info, verticalAlign, displayerMode, ftCounter, fidC
155
151
  saveAsNMREHandler,
156
152
  saveToClipboardHandler,
157
153
  ]);
158
- return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [isButtonVisible('hideImport') && ((0, jsx_runtime_1.jsx)(ToolbarMenu_1.default, { component: (0, jsx_runtime_1.jsx)(fa_1.FaFileImport, {}, void 0), toolTip: "Import", onClick: (element) => {
154
+ return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [isButtonVisible('import') && ((0, jsx_runtime_1.jsx)(ToolbarMenu_1.default, { component: (0, jsx_runtime_1.jsx)(fa_1.FaFileImport, {}), toolTip: "Import", onClick: (element) => {
159
155
  importHandler(element);
160
156
  return null;
161
- }, items: importMenu }, void 0)), isButtonVisible('hideExportAs') && ((0, jsx_runtime_1.jsx)(ToolbarMenu_1.default, { component: (0, jsx_runtime_1.jsx)(fa_1.FaFileExport, {}, void 0), toolTip: "Export As", onClick: (element) => {
157
+ }, items: importMenu })), isButtonVisible('exportAs') && ((0, jsx_runtime_1.jsx)(ToolbarMenu_1.default, { component: (0, jsx_runtime_1.jsx)(fa_1.FaFileExport, {}), toolTip: "Export As", onClick: (element) => {
162
158
  exportHandler(element);
163
159
  return null;
164
- }, items: EXPORT_MENU }, void 0)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
165
- isButtonVisible('hideSpectraStackAlignments') &&
160
+ }, items: EXPORT_MENU })), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
161
+ isButtonVisible('spectraStackAlignments') &&
166
162
  ftCounter > 1 &&
167
- (info?.isFt || !activeSpectrum) && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "spectra-alignment", className: "cheminfo", title: "Spectra alignment ( Press s )", onClick: changeDisplayViewModeHandler, children: verticalAlign.align === 'stack' ? ((0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrOverlay3Aligned, {}, void 0)) : ((0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrOverlay3, {}, void 0)) }, void 0)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
168
- isButtonVisible('hideRealImaginary') &&
169
- info.isComplex && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "display", title: isRealSpectrumShown ? 'Display Real ' : 'Display Imaginary', onClick: changeSpectrumViewHandler, className: "cheminfo", children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrRealImag, {}, void 0) }, void 0)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
170
- isButtonVisible('hideSpectraCenterAlignments') &&
163
+ (info?.isFt || !activeSpectrum) && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "spectra-alignment", className: "cheminfo", title: "Spectra alignment ( Press s )", onClick: changeDisplayViewModeHandler, children: verticalAlign.align === 'stack' ? ((0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrOverlay3Aligned, {})) : ((0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrOverlay3, {})) })), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
164
+ isButtonVisible('realImaginary') &&
165
+ info.isComplex && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "display", title: isRealSpectrumShown ? 'Display Real ' : 'Display Imaginary', onClick: changeSpectrumViewHandler, className: "cheminfo", children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrRealImag, {}) })), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
166
+ isButtonVisible('spectraCenterAlignments') &&
171
167
  (ftCounter > 0 || fidCounter > 0) && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "baseline-position", title: verticalAlign.align === 'bottom'
172
168
  ? 'Baseline Center ( Press c )'
173
- : 'Baseline Bottom ( Press c )', onClick: alignSpectrumsVerticallyHandler, className: "cheminfo", children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 24 }, children: verticalAlign.align === 'bottom' ? ((0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrAlignCenter, {}, void 0)) : ((0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrAlignBottom, {}, void 0)) }, void 0) }, void 0))] }, void 0));
169
+ : 'Baseline Bottom ( Press c )', onClick: alignSpectrumsVerticallyHandler, className: "cheminfo", children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 24 }, children: verticalAlign.align === 'bottom' ? ((0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrAlignCenter, {})) : ((0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrAlignBottom, {})) }) }))] }));
174
170
  }
175
171
  const MemoizedBasicToolBar = (0, react_1.memo)(BasicToolBarInner);
176
172
  function BasicToolBar() {
@@ -184,6 +180,6 @@ function BasicToolBar() {
184
180
  verticalAlign,
185
181
  displayerMode,
186
182
  activeTab,
187
- } }, void 0));
183
+ } }));
188
184
  }
189
185
  exports.default = BasicToolBar;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -57,33 +61,32 @@ function FunctionToolBarInner({ defaultValue, activeSpectrum, info, datum, displ
57
61
  });
58
62
  dispatch({ type: Types_1.SET_SELECTED_FILTER, selectedFilter: null });
59
63
  }, [dispatch]);
60
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(ToggleButtonGroup_1.default, { value: option, onChange: handleChange, children: [isButtonVisible('hideZoomTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zoom.id, id: "zoomIn", title: `${ToolTypes_1.options.zoom.label} ( Press z )`, children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 14 }, children: (0, jsx_runtime_1.jsx)(fa_1.FaSearchPlus, {}, void 0) }, void 0) }, ToolTypes_1.options.zoom.id)), isButtonVisible('hideZoomOutTool') && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "zoom-out", onClick: handleFullZoomOut, title: "Horizontal zoom out ( Press f ), Horizontal and Vertical zoom out, double click ( Press ff )", children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 14 }, children: (0, jsx_runtime_1.jsx)(fa_1.FaExpand, {}, void 0) }, void 0) }, void 0)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
61
- isButtonVisible('hidePeakTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.peakPicking.id, title: `${ToolTypes_1.options.peakPicking.label} ( Press p )`, isVisible: activeSpectrum && !info?.isFid ? true : false, id: "peakPicking", children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrPeakPicking, {}, void 0) }, ToolTypes_1.options.peakPicking.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
62
- isButtonVisible('hideIntegralTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.integral.id, isVisible: activeSpectrum && !info?.isFid ? true : false, id: "integralPicking", title: `${ToolTypes_1.options.integral.label} ( Press i )`, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrIntegrate, {}, void 0) }, ToolTypes_1.options.integral.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_2D &&
63
- isButtonVisible('hideZonePickingTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zone2D.id, id: "zone2d", isVisible: activeSpectrum && !info?.isFid ? true : false, title: `${ToolTypes_1.options.zone2D.label} ( Press r )`, children: (0, jsx_runtime_1.jsx)(fa_1.FaDiceFour, {}, void 0) }, ToolTypes_1.options.zone2D.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_2D &&
64
- isButtonVisible('hideSlicingTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.slicingTool.id, isVisible: activeSpectrum && !info?.isFid ? true : false, id: "slic", title: `${ToolTypes_1.options.slicingTool.label}`, children: (0, jsx_runtime_1.jsx)("p", { children: "Slic" }, void 0) }, ToolTypes_1.options.slicingTool.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
65
- isButtonVisible('hideAutoRangesTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.rangesPicking.id, isVisible: activeSpectrum && !info?.isFid ? true : false, title: `${ToolTypes_1.options.rangesPicking.label} ( Press r )`, id: "ranges-pick", children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrRangePicking, {}, void 0) }, ToolTypes_1.options.rangesPicking.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
66
- isButtonVisible('hideMultipleSpectraAnalysisTool') &&
64
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(ToggleButtonGroup_1.default, { value: option, onChange: handleChange, children: [isButtonVisible('zoomTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zoom.id, id: "zoomIn", title: `${ToolTypes_1.options.zoom.label} ( Press z )`, children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 14 }, children: (0, jsx_runtime_1.jsx)(fa_1.FaSearchPlus, {}) }) }, ToolTypes_1.options.zoom.id)), isButtonVisible('zoomOutTool') && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "zoom-out", onClick: handleFullZoomOut, title: "Horizontal zoom out ( Press f ), Horizontal and Vertical zoom out, double click ( Press ff )", children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 14 }, children: (0, jsx_runtime_1.jsx)(fa_1.FaExpand, {}) }) })), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D && isButtonVisible('peakTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.peakPicking.id, title: `${ToolTypes_1.options.peakPicking.label} ( Press p )`, isVisible: activeSpectrum && !info?.isFid ? true : false, id: "peakPicking", children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrPeakPicking, {}) }, ToolTypes_1.options.peakPicking.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
65
+ isButtonVisible('integralTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.integral.id, isVisible: activeSpectrum && !info?.isFid ? true : false, id: "integralPicking", title: `${ToolTypes_1.options.integral.label} ( Press i )`, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrIntegrate, {}) }, ToolTypes_1.options.integral.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_2D &&
66
+ isButtonVisible('zonePickingTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zone2D.id, id: "zone2d", isVisible: activeSpectrum && !info?.isFid ? true : false, title: `${ToolTypes_1.options.zone2D.label} ( Press r )`, children: (0, jsx_runtime_1.jsx)(fa_1.FaDiceFour, {}) }, ToolTypes_1.options.zone2D.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_2D &&
67
+ isButtonVisible('slicingTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.slicingTool.id, isVisible: activeSpectrum && !info?.isFid ? true : false, id: "slic", title: `${ToolTypes_1.options.slicingTool.label}`, children: (0, jsx_runtime_1.jsx)("p", { children: "Slic" }) }, ToolTypes_1.options.slicingTool.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
68
+ isButtonVisible('autoRangesTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.rangesPicking.id, isVisible: activeSpectrum && !info?.isFid ? true : false, title: `${ToolTypes_1.options.rangesPicking.label} ( Press r )`, id: "ranges-pick", children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrRangePicking, {}) }, ToolTypes_1.options.rangesPicking.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
69
+ isButtonVisible('multipleSpectraAnalysisTool') &&
67
70
  ftCounter > 1 &&
68
- mode === 'RTL' && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.multipleSpectraAnalysis.id, id: "multipleSpectraAnalysis", title: ToolTypes_1.options.multipleSpectraAnalysis.label, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrMultipleAnalysis, {}, void 0) }, ToolTypes_1.options.multipleSpectraAnalysis.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
69
- isButtonVisible('hideZeroFillingTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zeroFilling.id, isVisible: Filters.zeroFilling.isApplicable({ info }), id: "zeroFilling", title: ToolTypes_1.options.zeroFilling.label, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrZeroFilling, {}, void 0) }, ToolTypes_1.options.zeroFilling.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
70
- isButtonVisible('hidePhaseCorrectionTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.phaseCorrection.id, id: "phaseCorrection", title: `${ToolTypes_1.options.phaseCorrection.label} ( Press a )`, isVisible: activeSpectrum &&
71
+ mode === 'RTL' && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.multipleSpectraAnalysis.id, id: "multipleSpectraAnalysis", title: ToolTypes_1.options.multipleSpectraAnalysis.label, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrMultipleAnalysis, {}) }, ToolTypes_1.options.multipleSpectraAnalysis.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
72
+ isButtonVisible('zeroFillingTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zeroFilling.id, isVisible: Filters.zeroFilling.isApplicable({ info }), id: "zeroFilling", title: ToolTypes_1.options.zeroFilling.label, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrZeroFilling, {}) }, ToolTypes_1.options.zeroFilling.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
73
+ isButtonVisible('phaseCorrectionTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.phaseCorrection.id, id: "phaseCorrection", title: `${ToolTypes_1.options.phaseCorrection.label} ( Press a )`, isVisible: activeSpectrum &&
71
74
  info &&
72
75
  Filters.phaseCorrection.isApplicable({ info }) &&
73
76
  datum.im
74
77
  ? true
75
- : false, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrPhaseCorrection, {}, void 0) }, ToolTypes_1.options.phaseCorrection.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
76
- isButtonVisible('hideBaseLineCorrectionTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.baseLineCorrection.id, id: "baseLineCorrection", title: `${ToolTypes_1.options.baseLineCorrection.label} ( Press b )`, isVisible: activeSpectrum &&
78
+ : false, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrPhaseCorrection, {}) }, ToolTypes_1.options.phaseCorrection.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
79
+ isButtonVisible('baseLineCorrectionTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.baseLineCorrection.id, id: "baseLineCorrection", title: `${ToolTypes_1.options.baseLineCorrection.label} ( Press b )`, isVisible: activeSpectrum &&
77
80
  info &&
78
81
  Filters.baselineCorrection.isApplicable({ info })
79
82
  ? true
80
- : false, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrBaselineCorrection, {}, void 0) }, ToolTypes_1.options.baseLineCorrection.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
81
- isButtonVisible('hideExclusionZonesTool') &&
83
+ : false, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrBaselineCorrection, {}) }, ToolTypes_1.options.baseLineCorrection.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
84
+ isButtonVisible('exclusionZonesTool') &&
82
85
  !info?.isFid &&
83
- ftCounter > 0 && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.exclusionZones.id, title: `${ToolTypes_1.options.exclusionZones.label} ( Press e )`, id: "exclusionZones", children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 18 }, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrMultipleAnalysis, {}, void 0) }, void 0) }, ToolTypes_1.options.exclusionZones.id))] }, void 0), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
84
- isButtonVisible('hideFFTTool') &&
86
+ ftCounter > 0 && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.exclusionZones.id, title: `${ToolTypes_1.options.exclusionZones.label} ( Press e )`, id: "exclusionZones", children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 18 }, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrMultipleAnalysis, {}) }) }, ToolTypes_1.options.exclusionZones.id))] }), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
87
+ isButtonVisible('FFTTool') &&
85
88
  info &&
86
- Filters.fft.isApplicable({ info }) && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "fft-filter", className: "cheminfo", title: "FFT Filter", onClick: handleOnFFTFilter, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrFourierTransform, {}, void 0) }, void 0))] }, void 0));
89
+ Filters.fft.isApplicable({ info }) && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "fft-filter", className: "cheminfo", title: "FFT Filter", onClick: handleOnFFTFilter, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrFourierTransform, {}) }))] }));
87
90
  }
88
91
  const MemoizedFunctionToolBar = (0, react_1.memo)(FunctionToolBarInner);
89
92
  function FunctionToolBar({ defaultValue = ToolTypes_1.options.zoom.id, }) {
@@ -96,6 +99,6 @@ function FunctionToolBar({ defaultValue = ToolTypes_1.options.zoom.id, }) {
96
99
  activeTab,
97
100
  defaultValue,
98
101
  mode,
99
- } }, void 0));
102
+ } }));
100
103
  }
101
104
  exports.default = FunctionToolBar;
@@ -30,6 +30,6 @@ function HistoryToolBar({ isUndoButtonVisible = true, isRedoButtonVisible = true
30
30
  const { history } = (0, ChartContext_1.useChartData)();
31
31
  const dispatch = (0, DispatchContext_1.useDispatch)();
32
32
  const handle = (0, react_1.useCallback)((type) => dispatch({ type }), [dispatch]);
33
- return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [isUndoButtonVisible && ((0, jsx_runtime_1.jsx)("button", { style: styles.button, type: "button", onClick: () => handle(HistoryTypes_1.REDO), disabled: !history.hasRedo, children: (0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: "Redo", popupPlacement: "right", children: (0, jsx_runtime_1.jsx)(fa_1.FaRedo, {}, void 0) }, void 0) }, void 0)), isRedoButtonVisible && ((0, jsx_runtime_1.jsx)("button", { type: "button", style: styles.button, onClick: () => handle(HistoryTypes_1.UNDO), disabled: !history.hasUndo, children: (0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: "Undo", popupPlacement: "right", children: (0, jsx_runtime_1.jsx)(fa_1.FaUndo, {}, void 0) }, void 0) }, void 0))] }, void 0));
33
+ return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [isUndoButtonVisible && ((0, jsx_runtime_1.jsx)("button", { style: styles.button, type: "button", onClick: () => handle(HistoryTypes_1.REDO), disabled: !history.hasRedo, children: (0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: "Redo", popupPlacement: "right", children: (0, jsx_runtime_1.jsx)(fa_1.FaRedo, {}) }) })), isRedoButtonVisible && ((0, jsx_runtime_1.jsx)("button", { type: "button", style: styles.button, onClick: () => handle(HistoryTypes_1.UNDO), disabled: !history.hasUndo, children: (0, jsx_runtime_1.jsx)(ToolTip_1.default, { title: "Undo", popupPlacement: "right", children: (0, jsx_runtime_1.jsx)(fa_1.FaUndo, {}) }) }))] }));
34
34
  }
35
35
  exports.default = (0, react_1.memo)(HistoryToolBar);