nmrium 0.25.0 → 0.28.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.
- package/lib/component/1d/Chart1D.js +3 -2
- package/lib/component/1d/ExclusionZonesAnnotations.js +1 -1
- package/lib/component/1d/FooterBanner.js +1 -1
- package/lib/component/1d/Integral.d.ts +2 -1
- package/lib/component/1d/Integral.js +5 -12
- package/lib/component/1d/IntegralResizable.d.ts +2 -1
- package/lib/component/1d/IntegralResizable.js +10 -5
- package/lib/component/1d/IntegralsSeries.js +5 -9
- package/lib/component/1d/Line.d.ts +2 -2
- package/lib/component/1d/PeakAnnotation.js +7 -6
- package/lib/component/1d/PeakAnnotations.js +2 -4
- package/lib/component/1d/SpectraTracker.js +2 -2
- package/lib/component/1d/Viewer1D.js +1 -1
- package/lib/component/1d/database/DatabaseElements.d.ts +3 -0
- package/lib/component/1d/database/DatabaseElements.js +18 -0
- package/lib/component/1d/database/DatabaseSpectrum.d.ts +3 -0
- package/lib/component/1d/database/DatabaseSpectrum.js +60 -0
- package/lib/component/1d/{ResurrectedDatabaseRanges.d.ts → database/ResurrectedDatabaseRanges.d.ts} +0 -0
- package/lib/component/1d/{ResurrectedDatabaseRanges.js → database/ResurrectedDatabaseRanges.js} +9 -6
- package/lib/component/1d/jCouplingGraph/JGraph.js +4 -10
- package/lib/component/1d/multiAnalysis/AnalysisRange.js +10 -5
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +5 -5
- package/lib/component/1d/ranges/Range.d.ts +2 -2
- package/lib/component/1d/ranges/Range.js +23 -15
- package/lib/component/1d/ranges/Ranges.js +6 -4
- package/lib/component/1d/tool/BaseLineZones.js +3 -6
- package/lib/component/1d/tool/VerticalIndicator.js +1 -1
- package/lib/component/1d/tool/XLabelPointer.js +1 -1
- package/lib/component/2d/Chart2D.js +2 -1
- package/lib/component/2d/Contours.js +5 -6
- package/lib/component/2d/FooterBanner.js +1 -1
- package/lib/component/2d/SignalDeltaLine.js +1 -1
- package/lib/component/2d/Viewer2D.js +1 -1
- package/lib/component/2d/YAxis.js +2 -2
- package/lib/component/2d/tools/XYLabelPointer.js +1 -1
- package/lib/component/2d/tools/slicing/HorizontalSliceChart.d.ts +2 -2
- package/lib/component/2d/tools/slicing/SliceScale.d.ts +1 -1
- package/lib/component/2d/tools/slicing/VerticalSliceChart.d.ts +2 -2
- package/lib/component/2d/zones/IndicationLines.js +2 -3
- package/lib/component/2d/zones/Signal.js +8 -8
- package/lib/component/2d/zones/Zone.js +3 -3
- package/lib/component/EventsTrackers/KeysListenerTracker.js +70 -46
- package/lib/component/NMRium.d.ts +15 -46
- package/lib/component/NMRium.js +20 -9
- package/lib/component/SplitPaneWrapper.d.ts +4 -0
- package/lib/component/SplitPaneWrapper.js +8 -0
- package/lib/component/assignment/AssignmentsContext.d.ts +35 -0
- package/lib/component/assignment/AssignmentsContext.js +83 -0
- package/lib/component/assignment/AssignmentsReducer.d.ts +32 -0
- package/lib/component/assignment/AssignmentsReducer.js +39 -0
- package/lib/component/assignment/actions/initAssignment.d.ts +5 -0
- package/lib/component/assignment/actions/initAssignment.js +62 -0
- package/lib/component/assignment/actions/removeAssignment.d.ts +16 -0
- package/lib/component/assignment/actions/removeAssignment.js +24 -0
- package/lib/component/assignment/actions/setActiveAssignment.d.ts +10 -0
- package/lib/component/assignment/actions/setActiveAssignment.js +8 -0
- package/lib/component/assignment/actions/toggleAssignment.d.ts +7 -0
- package/lib/component/assignment/actions/toggleAssignment.js +44 -0
- package/lib/component/assignment/index.d.ts +0 -18
- package/lib/component/assignment/index.js +12 -266
- package/lib/component/assignment/utilities/filterForIDsWithAssignment.d.ts +2 -0
- package/lib/component/assignment/utilities/filterForIDsWithAssignment.js +3 -0
- package/lib/component/context/GlobalContext.d.ts +3 -0
- package/lib/component/context/GlobalContext.js +1 -1
- package/lib/component/context/PreferencesContext.d.ts +15 -52
- package/lib/component/context/PreferencesContext.js +1 -1
- package/lib/component/elements/Button.js +4 -3
- package/lib/component/elements/ColorInput.js +2 -2
- package/lib/component/elements/ContextMenu.d.ts +8 -3
- package/lib/component/elements/EditableColumn.d.ts +3 -2
- package/lib/component/elements/EditableColumn.js +27 -20
- package/lib/component/elements/Input.d.ts +9 -1
- package/lib/component/elements/Input.js +18 -5
- package/lib/component/elements/Logo.js +1 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.d.ts +5 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +39 -10
- package/lib/component/elements/ReactTable/ReactTable.d.ts +3 -1
- package/lib/component/elements/ReactTable/ReactTable.js +7 -2
- package/lib/component/elements/ReactTable/Style.d.ts +1 -3
- package/lib/component/elements/ReactTable/Style.js +1 -7
- package/lib/component/elements/Select.d.ts +1 -0
- package/lib/component/elements/Select.js +21 -15
- package/lib/component/elements/Tab/Tabs.js +2 -1
- package/lib/component/elements/ToggleButton.d.ts +2 -1
- package/lib/component/elements/ToggleButton.js +4 -4
- package/lib/component/elements/accordion/Accordion.js +2 -6
- package/lib/component/elements/draggble/SVGDraggable.d.ts +17 -0
- package/lib/component/elements/draggble/SVGDraggable.js +33 -0
- package/lib/component/elements/{resizer → draggble}/useDraggable.d.ts +9 -6
- package/lib/component/elements/draggble/useDraggable.js +70 -0
- package/lib/component/elements/formik/FormikColorPicker.d.ts +1 -0
- package/lib/component/elements/formik/FormikColorPicker.js +10 -7
- package/lib/component/elements/formik/FormikColumnFormatField.d.ts +5 -4
- package/lib/component/elements/formik/FormikColumnFormatField.js +2 -2
- package/lib/component/elements/formik/FormikInput.d.ts +1 -0
- package/lib/component/elements/formik/FormikInput.js +6 -3
- package/lib/component/elements/formik/FormikSlider.d.ts +1 -0
- package/lib/component/elements/formik/FormikSlider.js +6 -3
- package/lib/component/elements/formik/Input.js +1 -1
- package/lib/component/elements/popup/Alert/Provider.js +1 -1
- package/lib/component/elements/popup/Modal/Modal.js +1 -1
- package/lib/component/elements/popup/Modal/ModalContent.js +1 -1
- package/lib/component/elements/resizer/DivResizer.js +17 -62
- package/lib/component/elements/resizer/Resizer.d.ts +3 -1
- package/lib/component/elements/resizer/SVGResizer.js +24 -53
- package/lib/component/elements/resizer/useResizer.d.ts +11 -0
- package/lib/component/elements/resizer/useResizer.js +65 -0
- package/lib/component/elements/toggle/ToggleButtonGroup.js +2 -2
- package/lib/component/header/BaseLineCorrectionPanel.js +8 -5
- package/lib/component/header/Header.js +2 -2
- package/lib/component/header/ZeroFillingOptionsPanel.js +1 -1
- package/lib/component/hooks/useActiveSpectrumStyleOptions.js +1 -1
- package/lib/component/hooks/useCheckToolsVisibility.d.ts +2 -1
- package/lib/component/hooks/useCheckToolsVisibility.js +2 -1
- package/lib/component/hooks/useExport.d.ts +1 -1
- package/lib/component/hooks/useExport.js +2 -2
- package/lib/component/hooks/useFormatNumberByNucleus.d.ts +3 -0
- package/lib/component/{utility/FormatNumber.js → hooks/useFormatNumberByNucleus.js} +4 -14
- package/lib/component/hooks/usePanelPreferences.d.ts +7 -0
- package/lib/component/hooks/usePanelPreferences.js +54 -0
- package/lib/component/hooks/useXYReduce.d.ts +2 -2
- package/lib/component/loader/DefaultSpinnerComponent.d.ts +3 -1
- package/lib/component/loader/DefaultSpinnerComponent.js +2 -2
- package/lib/component/loader/DropZone.js +8 -2
- package/lib/component/loader/NoData.d.ts +3 -2
- package/lib/component/loader/NoData.js +31 -30
- package/lib/component/loader/SpinnerContext.d.ts +3 -3
- package/lib/component/loader/SpinnerContext.js +2 -2
- package/lib/component/modal/MoleculeStructureEditorModal.d.ts +3 -4
- package/lib/component/modal/MoleculeStructureEditorModal.js +24 -3
- package/lib/component/modal/editRange/EditRangeModal.d.ts +3 -3
- package/lib/component/modal/editRange/EditRangeModal.js +52 -56
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.d.ts +2 -0
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +11 -27
- package/lib/component/modal/editRange/forms/components/CouplingsTable.js +12 -50
- package/lib/component/modal/editRange/forms/components/SignalFormInfo.d.ts +2 -0
- package/lib/component/modal/editRange/forms/components/SignalFormInfo.js +34 -0
- package/lib/component/modal/editRange/forms/components/SignalFormTab.d.ts +1 -1
- package/lib/component/modal/editRange/forms/components/SignalFormTab.js +11 -14
- package/lib/component/modal/editRange/forms/components/SignalsForm.d.ts +5 -2
- package/lib/component/modal/editRange/forms/components/SignalsForm.js +29 -37
- package/lib/component/modal/editZone/SignalsForm.js +1 -1
- package/lib/component/modal/setting/DatabasesTabContent.d.ts +7 -0
- package/lib/component/modal/setting/DatabasesTabContent.js +73 -0
- package/lib/component/modal/setting/DisplayTabContent.js +11 -7
- package/lib/component/modal/setting/FormattingTabContent.js +20 -14
- package/lib/component/modal/setting/GeneralSettings.js +3 -1
- package/lib/component/modal/setting/settingsValidation.d.ts +164 -0
- package/lib/component/modal/setting/settingsValidation.js +48 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.js +6 -4
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts +4 -3
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +13 -6
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.d.ts +10 -0
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +65 -0
- package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts +0 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +14 -19
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +2 -2
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +10 -11
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +26 -74
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.d.ts +8 -0
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +38 -0
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +17 -35
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +11 -3
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +31 -11
- package/lib/component/panels/MoleculesPanel/Utilities.js +61 -68
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.d.ts +2 -2
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +55 -60
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleAnalysisCodeEditor.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +1 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +3 -3
- package/lib/component/panels/Panels.js +3 -4
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +4 -4
- package/lib/component/panels/PeaksPanel/PeaksPreferences.d.ts +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPreferences.js +29 -82
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts +1 -5
- package/lib/component/panels/PeaksPanel/PeaksTable.js +18 -25
- package/lib/component/panels/RangesPanel/RangesHeader.d.ts +2 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +28 -13
- package/lib/component/panels/RangesPanel/RangesPanel.js +23 -29
- package/lib/component/panels/RangesPanel/RangesPreferences.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesPreferences.js +55 -66
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +11 -6
- package/lib/component/panels/RangesPanel/RangesTable.js +3 -7
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +5 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.js +15 -14
- package/lib/component/panels/RangesPanel/TableColumns/AbsoluteColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.d.ts +2 -1
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/CouplingColumn.d.ts +2 -1
- package/lib/component/panels/RangesPanel/TableColumns/CouplingColumn.js +5 -2
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.d.ts +16 -9
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/RangeColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.d.ts +2 -3
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.d.ts +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +3 -4
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.d.ts +13 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js +14 -0
- package/lib/component/panels/RangesPanel/TableColumns/format.d.ts +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/format.js +2 -2
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.d.ts +4 -4
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +49 -31
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +5 -18
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +3 -3
- package/lib/component/panels/SpectrumsPanel/base/ShowHideMarkersButton.js +1 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/PlotChart.d.ts +18 -0
- package/lib/component/panels/SpectrumsPanel/base/setting/PlotChart.js +18 -0
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.d.ts +1 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.js +7 -68
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +1 -8
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.d.ts +1 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.js +7 -68
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +8 -21
- package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +2 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.d.ts +6 -0
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +51 -0
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +3 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +2 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +3 -3
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +7 -9
- package/lib/component/panels/SummaryPanel/utilities/Utilities.js +6 -8
- package/lib/component/panels/SummaryPanel/utilities/{IsInView.d.ts → useInView.d.ts} +2 -2
- package/lib/component/panels/SummaryPanel/utilities/{IsInView.js → useInView.js} +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.d.ts +5 -7
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.d.ts +4 -8
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.d.ts +5 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +3 -2
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.d.ts +5 -9
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +4 -4
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.d.ts +4 -8
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +14 -14
- package/lib/component/panels/ZonesPanel/ZonesPreferences.d.ts +1 -1
- package/lib/component/panels/ZonesPanel/ZonesPreferences.js +20 -84
- package/lib/component/panels/ZonesPanel/ZonesTable.js +4 -1
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +7 -2
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js +22 -22
- package/lib/component/panels/databasePanel/DatabasePanel.d.ts +4 -0
- package/lib/component/panels/databasePanel/DatabasePanel.js +129 -42
- package/lib/component/panels/databasePanel/DatabasePreferences.js +10 -42
- package/lib/component/panels/databasePanel/DatabaseStructureSearchModal.d.ts +7 -0
- package/lib/component/panels/databasePanel/DatabaseStructureSearchModal.js +8 -0
- package/lib/component/panels/databasePanel/DatabaseTable.js +37 -20
- package/lib/component/panels/extra/placeholder/NoTableData.d.ts +3 -1
- package/lib/component/panels/extra/placeholder/NoTableData.js +2 -2
- package/lib/component/panels/extra/preferences/ColumnsHelper.js +5 -7
- package/lib/component/panels/extra/preferences/NucleusPreferences.d.ts +13 -0
- package/lib/component/panels/extra/preferences/NucleusPreferences.js +22 -0
- package/lib/component/panels/extra/preferences/PreferencesContainer.d.ts +6 -0
- package/lib/component/panels/extra/preferences/PreferencesContainer.js +10 -0
- package/lib/component/panels/extra/preferences/PreferencesGroup.d.ts +7 -0
- package/lib/component/panels/extra/preferences/PreferencesGroup.js +21 -0
- package/lib/component/panels/header/DefaultPanelHeader.js +1 -3
- package/lib/component/panels/header/SpectraAutomaticPickingButton.d.ts +2 -0
- package/lib/component/panels/header/SpectraAutomaticPickingButton.js +30 -0
- package/lib/component/reducer/Reducer.d.ts +352 -95
- package/lib/component/reducer/Reducer.js +22 -10
- package/lib/component/reducer/actions/AssignmentsActions.d.ts +9 -0
- package/lib/component/reducer/actions/AssignmentsActions.js +18 -0
- package/lib/component/reducer/actions/DatabaseActions.d.ts +3 -2
- package/lib/component/reducer/actions/DatabaseActions.js +21 -3
- package/lib/component/reducer/actions/DomainActions.js +1 -1
- package/lib/component/reducer/actions/FiltersActions.d.ts +2 -1
- package/lib/component/reducer/actions/FiltersActions.js +25 -4
- package/lib/component/reducer/actions/LoadActions.d.ts +1 -1
- package/lib/component/reducer/actions/LoadActions.js +11 -6
- package/lib/component/reducer/actions/MoleculeActions.d.ts +4 -2
- package/lib/component/reducer/actions/MoleculeActions.js +15 -3
- package/lib/component/reducer/actions/PreferencesActions.js +32 -20
- package/lib/component/reducer/actions/RangesActions.d.ts +2 -2
- package/lib/component/reducer/actions/RangesActions.js +45 -11
- package/lib/component/reducer/actions/SpectrumsActions.js +6 -9
- package/lib/component/reducer/actions/ToolsActions.js +67 -54
- package/lib/component/reducer/helper/getSpectrum.d.ts +5 -0
- package/lib/component/reducer/helper/getSpectrum.js +14 -0
- package/lib/component/reducer/preferences/actions/addWorkspace.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/addWorkspace.js +19 -0
- package/lib/component/reducer/preferences/actions/initPreferences.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/initPreferences.js +60 -0
- package/lib/component/reducer/preferences/actions/removeWorkspace.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/removeWorkspace.js +20 -0
- package/lib/component/reducer/preferences/actions/resetPreferences.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/resetPreferences.js +14 -0
- package/lib/component/reducer/preferences/actions/setPanelsPreferences.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/setPanelsPreferences.js +13 -0
- package/lib/component/reducer/preferences/actions/setPreferences.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/setPreferences.js +34 -0
- package/lib/component/reducer/preferences/actions/setWorkspace.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/setWorkspace.js +8 -0
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts +7 -0
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +55 -0
- package/lib/component/reducer/{preferencesReducer.d.ts → preferences/preferencesReducer.d.ts} +147 -17
- package/lib/component/reducer/preferences/preferencesReducer.js +80 -0
- package/lib/component/reducer/preferences/utilites/checkKeysExists.d.ts +1 -0
- package/lib/component/reducer/preferences/utilites/checkKeysExists.js +14 -0
- package/lib/component/reducer/preferences/utilites/filterObject.d.ts +1 -0
- package/lib/component/reducer/preferences/utilites/filterObject.js +7 -0
- package/lib/component/reducer/preferences/utilites/flatObject.d.ts +1 -0
- package/lib/component/reducer/preferences/utilites/flatObject.js +9 -0
- package/lib/component/reducer/preferences/utilites/getActiveWorkspace.d.ts +3 -0
- package/lib/component/reducer/preferences/utilites/getActiveWorkspace.js +3 -0
- package/lib/component/reducer/preferences/utilites/getPreferencesByWorkspace.d.ts +2 -0
- package/lib/component/reducer/preferences/utilites/getPreferencesByWorkspace.js +4 -0
- package/lib/component/reducer/preferences/utilites/mapNucleiFormatting.d.ts +5 -0
- package/lib/component/reducer/preferences/utilites/mapNucleiFormatting.js +8 -0
- package/lib/component/reducer/types/Types.d.ts +6 -1
- package/lib/component/reducer/types/Types.js +6 -1
- package/lib/component/tool/BrushX.js +1 -1
- package/lib/component/tool/BrushXY.js +1 -1
- package/lib/component/tool/CrossLinePointer.js +1 -1
- package/lib/component/tool/FloatMoleculeStructures/ActionsButton.d.ts +4 -0
- package/lib/component/tool/FloatMoleculeStructures/ActionsButton.js +7 -0
- package/lib/component/tool/FloatMoleculeStructures/DraggableStructure.d.ts +14 -0
- package/lib/component/tool/FloatMoleculeStructures/DraggableStructure.js +44 -0
- package/lib/component/tool/FloatMoleculeStructures/index.d.ts +15 -0
- package/lib/component/tool/FloatMoleculeStructures/index.js +28 -0
- package/lib/component/toolbar/BasicToolBar.js +0 -1
- package/lib/component/toolbar/FunctionToolBar.js +9 -13
- package/lib/component/toolbar/ToolTypes.d.ts +1 -1
- package/lib/component/toolbar/ToolTypes.js +3 -3
- package/lib/component/utility/Export.d.ts +7 -1
- package/lib/component/utility/Export.js +9 -3
- package/lib/component/utility/PathBuilder.js +2 -1
- package/lib/component/utility/formatNumber.d.ts +3 -0
- package/lib/component/utility/formatNumber.js +12 -0
- package/lib/component/utility/getUniqueNuclei.d.ts +1 -0
- package/lib/component/utility/getUniqueNuclei.js +10 -0
- package/lib/component/utility/isGoogleDocument.d.ts +1 -0
- package/lib/component/utility/isGoogleDocument.js +3 -0
- package/lib/component/utility/nmredataToNmrium.js +1 -2
- package/lib/component/utility/nmriumToNmredata.d.ts +2 -2
- package/lib/component/utility/nmriumToNmredata.js +2 -2
- package/lib/component/utility/util/nmredata/addSource.js +2 -2
- package/lib/component/workspaces/Workspace.d.ts +79 -5
- package/lib/component/workspaces/basic.js +25 -11
- package/lib/component/workspaces/embedded.d.ts +2 -0
- package/lib/component/workspaces/embedded.js +32 -0
- package/lib/component/workspaces/exercise.js +4 -2
- package/lib/component/workspaces/index.d.ts +1 -0
- package/lib/component/workspaces/index.js +2 -1
- package/lib/component/workspaces/prediction.js +2 -0
- package/lib/component/workspaces/process1D.js +3 -1
- package/lib/data/FiltersManager.js +1 -1
- package/lib/data/PredictionManager.js +7 -9
- package/lib/data/SpectraManager.d.ts +4 -12
- package/lib/data/SpectraManager.js +37 -38
- package/lib/data/data1d/Data1DManager.d.ts +1 -1
- package/lib/data/data1d/Data1DManager.js +14 -2
- package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.d.ts +2 -0
- package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.js +10 -0
- package/lib/data/data1d/Spectrum1D/generateJGraphData.js +8 -10
- package/lib/data/data1d/Spectrum1D/get1DDataXY.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/getReferenceShift.js +1 -1
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +2 -1
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.js +5 -7
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/addRange.d.ts +36 -2
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +38 -15
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +2 -1
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +1 -1
- package/lib/data/data1d/Spectrum1D/toJSON.d.ts +2 -0
- package/lib/data/data1d/Spectrum1D/toJSON.js +1 -0
- package/lib/data/data1d/database.d.ts +11 -15
- package/lib/data/data1d/database.js +67 -22
- package/lib/data/data1d/filter1d/absolute.d.ts +3 -2
- package/lib/data/data1d/filter1d/autoPhaseCorrection.d.ts +3 -2
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +3 -2
- package/lib/data/data1d/filter1d/centerMean.d.ts +3 -2
- package/lib/data/data1d/filter1d/digitalFilter.d.ts +3 -2
- package/lib/data/data1d/filter1d/equallySpaced.d.ts +3 -2
- package/lib/data/data1d/filter1d/exclusionZones.d.ts +1 -4
- package/lib/data/data1d/filter1d/exclusionZones.js +4 -4
- package/lib/data/data1d/filter1d/fft.d.ts +3 -2
- package/lib/data/data1d/filter1d/fft.js +2 -2
- package/lib/data/data1d/filter1d/fromTo.d.ts +3 -2
- package/lib/data/data1d/filter1d/lineBroadening.d.ts +3 -2
- package/lib/data/data1d/filter1d/lineBroadening.js +2 -2
- package/lib/data/data1d/filter1d/pareto.d.ts +3 -2
- package/lib/data/data1d/filter1d/pareto.js +2 -2
- package/lib/data/data1d/filter1d/phaseCorrection.d.ts +3 -2
- package/lib/data/data1d/filter1d/shiftX.d.ts +2 -1
- package/lib/data/data1d/filter1d/standardDeviation.d.ts +3 -2
- package/lib/data/data1d/filter1d/zeroFilling.d.ts +3 -2
- package/lib/data/data1d/filter1d/zeroFilling.js +1 -1
- package/lib/data/data2d/Data2DManager.d.ts +1 -1
- package/lib/data/data2d/Data2DManager.js +6 -1
- package/lib/data/data2d/Processing2D.js +1 -1
- package/lib/data/data2d/Spectrum2D/toJSON.d.ts +2 -0
- package/lib/data/data2d/Spectrum2D/toJSON.js +1 -0
- package/lib/data/data2d/filter2d/shiftX.d.ts +4 -3
- package/lib/data/data2d/filter2d/shiftX.js +2 -2
- package/lib/data/data2d/filter2d/shiftY.d.ts +4 -3
- package/lib/data/data2d/filter2d/shiftY.js +2 -2
- package/lib/data/molecules/Molecule.d.ts +6 -7
- package/lib/data/molecules/Molecule.js +9 -1
- package/lib/data/molecules/MoleculeManager.d.ts +4 -1
- package/lib/data/molecules/MoleculeManager.js +33 -2
- package/lib/data/types/common/Source.d.ts +1 -0
- package/lib/data/types/data1d/Data1D.d.ts +3 -3
- package/lib/data/types/data1d/Info1D.d.ts +1 -0
- package/lib/data/types/data2d/Signal2DAxisData.d.ts +1 -1
- package/lib/data/utilities/FindUtilities.js +1 -3
- package/lib/data/utilities/RangeUtilities.js +5 -6
- package/lib/data/utilities/ZoneUtilities.js +1 -1
- package/lib/data/utilities/getSum.js +1 -3
- package/lib/data/utilities/isMolFileEmpty.d.ts +1 -0
- package/lib/data/utilities/isMolFileEmpty.js +6 -0
- package/lib/types/NMRiumDataReturn.d.ts +15 -0
- package/lib/types/NMRiumDataReturn.js +1 -0
- package/lib/types/NMRiumGeneralPreferences.d.ts +10 -0
- package/lib/types/NMRiumGeneralPreferences.js +1 -0
- package/lib/types/NMRiumPanelPreferences.d.ts +16 -0
- package/lib/types/NMRiumPanelPreferences.js +1 -0
- package/lib/types/NMRiumToolBarPreferences.d.ts +20 -0
- package/lib/types/NMRiumToolBarPreferences.js +1 -0
- package/lib/types/Preferences.d.ts +5 -0
- package/lib/types/Preferences.js +1 -0
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/Chart1D.js +3 -2
- package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +1 -1
- package/lib-cjs/component/1d/FooterBanner.js +2 -2
- package/lib-cjs/component/1d/Integral.js +5 -12
- package/lib-cjs/component/1d/IntegralResizable.js +10 -5
- package/lib-cjs/component/1d/IntegralsSeries.js +5 -9
- package/lib-cjs/component/1d/PeakAnnotation.js +7 -6
- package/lib-cjs/component/1d/PeakAnnotations.js +2 -4
- package/lib-cjs/component/1d/SpectraTracker.js +2 -2
- package/lib-cjs/component/1d/Viewer1D.js +1 -1
- package/lib-cjs/component/1d/database/DatabaseElements.js +23 -0
- package/lib-cjs/component/1d/database/DatabaseSpectrum.js +65 -0
- package/lib-cjs/component/1d/{ResurrectedDatabaseRanges.js → database/ResurrectedDatabaseRanges.js} +9 -6
- package/lib-cjs/component/1d/jCouplingGraph/JGraph.js +4 -10
- package/lib-cjs/component/1d/multiAnalysis/AnalysisRange.js +10 -5
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +6 -6
- package/lib-cjs/component/1d/ranges/Range.js +25 -17
- package/lib-cjs/component/1d/ranges/Ranges.js +6 -4
- package/lib-cjs/component/1d/tool/BaseLineZones.js +3 -6
- package/lib-cjs/component/1d/tool/VerticalIndicator.js +1 -1
- package/lib-cjs/component/1d/tool/XLabelPointer.js +2 -2
- package/lib-cjs/component/2d/Chart2D.js +2 -1
- package/lib-cjs/component/2d/Contours.js +5 -6
- package/lib-cjs/component/2d/FooterBanner.js +2 -2
- package/lib-cjs/component/2d/SignalDeltaLine.js +1 -1
- package/lib-cjs/component/2d/Viewer2D.js +1 -1
- package/lib-cjs/component/2d/YAxis.js +1 -1
- package/lib-cjs/component/2d/tools/XYLabelPointer.js +2 -2
- package/lib-cjs/component/2d/zones/IndicationLines.js +2 -3
- package/lib-cjs/component/2d/zones/Signal.js +9 -9
- package/lib-cjs/component/2d/zones/Zone.js +4 -4
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +71 -47
- package/lib-cjs/component/NMRium.js +18 -7
- package/lib-cjs/component/SplitPaneWrapper.js +12 -0
- package/lib-cjs/component/assignment/AssignmentsContext.js +88 -0
- package/lib-cjs/component/assignment/AssignmentsReducer.js +45 -0
- package/lib-cjs/component/assignment/actions/initAssignment.js +65 -0
- package/lib-cjs/component/assignment/actions/removeAssignment.js +29 -0
- package/lib-cjs/component/assignment/actions/setActiveAssignment.js +11 -0
- package/lib-cjs/component/assignment/actions/toggleAssignment.js +47 -0
- package/lib-cjs/component/assignment/index.js +15 -269
- package/lib-cjs/component/assignment/utilities/filterForIDsWithAssignment.js +7 -0
- package/lib-cjs/component/context/GlobalContext.js +1 -1
- package/lib-cjs/component/context/PreferencesContext.js +1 -1
- package/lib-cjs/component/elements/Button.js +4 -3
- package/lib-cjs/component/elements/ColorInput.js +2 -2
- package/lib-cjs/component/elements/EditableColumn.js +27 -20
- package/lib-cjs/component/elements/Input.js +18 -5
- package/lib-cjs/component/elements/Logo.js +1 -1
- package/lib-cjs/component/elements/ReactTable/Elements/ReactTableRow.js +43 -14
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +7 -2
- package/lib-cjs/component/elements/ReactTable/Style.js +1 -9
- package/lib-cjs/component/elements/Select.js +20 -14
- package/lib-cjs/component/elements/Tab/Tabs.js +2 -1
- package/lib-cjs/component/elements/ToggleButton.js +4 -4
- package/lib-cjs/component/elements/accordion/Accordion.js +2 -6
- package/lib-cjs/component/elements/draggble/SVGDraggable.js +39 -0
- package/lib-cjs/component/elements/draggble/useDraggable.js +73 -0
- package/lib-cjs/component/elements/formik/FormikColorPicker.js +10 -7
- package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +2 -2
- package/lib-cjs/component/elements/formik/FormikInput.js +6 -3
- package/lib-cjs/component/elements/formik/FormikSlider.js +6 -3
- package/lib-cjs/component/elements/formik/Input.js +1 -1
- package/lib-cjs/component/elements/popup/Alert/Provider.js +1 -1
- package/lib-cjs/component/elements/popup/Modal/Modal.js +1 -1
- package/lib-cjs/component/elements/popup/Modal/ModalContent.js +1 -1
- package/lib-cjs/component/elements/resizer/DivResizer.js +17 -62
- package/lib-cjs/component/elements/resizer/SVGResizer.js +24 -53
- package/lib-cjs/component/elements/resizer/useResizer.js +71 -0
- package/lib-cjs/component/elements/toggle/ToggleButtonGroup.js +2 -2
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +7 -4
- package/lib-cjs/component/header/Header.js +2 -2
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +1 -1
- package/lib-cjs/component/hooks/useActiveSpectrumStyleOptions.js +1 -1
- package/lib-cjs/component/hooks/useCheckToolsVisibility.js +2 -1
- package/lib-cjs/component/hooks/useExport.js +2 -2
- package/lib-cjs/component/{utility/FormatNumber.js → hooks/useFormatNumberByNucleus.js} +4 -15
- package/lib-cjs/component/hooks/usePanelPreferences.js +62 -0
- package/lib-cjs/component/loader/DefaultSpinnerComponent.js +2 -2
- package/lib-cjs/component/loader/DropZone.js +8 -2
- package/lib-cjs/component/loader/NoData.js +31 -30
- package/lib-cjs/component/loader/SpinnerContext.js +2 -2
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +26 -3
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +50 -54
- package/lib-cjs/component/modal/editRange/forms/components/AddSignalFormTab.js +11 -27
- package/lib-cjs/component/modal/editRange/forms/components/CouplingsTable.js +12 -50
- package/lib-cjs/component/modal/editRange/forms/components/SignalFormInfo.js +38 -0
- package/lib-cjs/component/modal/editRange/forms/components/SignalFormTab.js +13 -16
- package/lib-cjs/component/modal/editRange/forms/components/SignalsForm.js +29 -37
- package/lib-cjs/component/modal/editZone/SignalsForm.js +1 -1
- package/lib-cjs/component/modal/setting/DatabasesTabContent.js +78 -0
- package/lib-cjs/component/modal/setting/DisplayTabContent.js +11 -7
- package/lib-cjs/component/modal/setting/FormattingTabContent.js +19 -13
- package/lib-cjs/component/modal/setting/GeneralSettings.js +3 -1
- package/lib-cjs/component/modal/setting/settingsValidation.js +74 -0
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignment.js +6 -4
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +13 -6
- package/lib-cjs/component/panels/AutomaticAssignment/useAutoAssignments.js +72 -0
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +13 -18
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +10 -11
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +24 -72
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +44 -0
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +17 -35
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +11 -3
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +61 -68
- package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +55 -60
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +1 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +2 -2
- package/lib-cjs/component/panels/Panels.js +3 -4
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +5 -5
- package/lib-cjs/component/panels/PeaksPanel/PeaksPreferences.js +27 -80
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +18 -48
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +27 -12
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +23 -29
- package/lib-cjs/component/panels/RangesPanel/RangesPreferences.js +53 -64
- package/lib-cjs/component/panels/RangesPanel/RangesTable.js +3 -7
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +18 -17
- package/lib-cjs/component/panels/RangesPanel/TableColumns/AbsoluteColumn.js +2 -5
- package/lib-cjs/component/panels/RangesPanel/TableColumns/ActionsColumn.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/TableColumns/CouplingColumn.js +5 -2
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeColumn.js +2 -5
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +3 -4
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js +16 -0
- package/lib-cjs/component/panels/RangesPanel/TableColumns/format.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +49 -31
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +3 -16
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideMarkersButton.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/PlotChart.js +21 -0
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.js +10 -68
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +1 -8
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.js +10 -68
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +8 -21
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +2 -2
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +55 -0
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +3 -3
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +3 -3
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +8 -10
- package/lib-cjs/component/panels/SummaryPanel/utilities/Utilities.js +6 -8
- package/lib-cjs/component/panels/SummaryPanel/utilities/{IsInView.js → useInView.js} +2 -2
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +3 -3
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +2 -2
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +3 -2
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +4 -4
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +14 -14
- package/lib-cjs/component/panels/ZonesPanel/ZonesPreferences.js +18 -82
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +4 -1
- package/lib-cjs/component/panels/ZonesPanel/ZonesTableRow.js +23 -23
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +128 -41
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +10 -42
- package/lib-cjs/component/panels/databasePanel/DatabaseStructureSearchModal.js +15 -0
- package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +36 -19
- package/lib-cjs/component/panels/extra/placeholder/NoTableData.js +2 -2
- package/lib-cjs/component/panels/extra/preferences/ColumnsHelper.js +5 -7
- package/lib-cjs/component/panels/extra/preferences/NucleusPreferences.js +29 -0
- package/lib-cjs/component/panels/extra/preferences/PreferencesContainer.js +14 -0
- package/lib-cjs/component/panels/extra/preferences/PreferencesGroup.js +25 -0
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +1 -3
- package/lib-cjs/component/panels/header/SpectraAutomaticPickingButton.js +37 -0
- package/lib-cjs/component/reducer/Reducer.js +22 -10
- package/lib-cjs/component/reducer/actions/AssignmentsActions.js +21 -0
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +22 -3
- package/lib-cjs/component/reducer/actions/DomainActions.js +1 -1
- package/lib-cjs/component/reducer/actions/FiltersActions.js +26 -4
- package/lib-cjs/component/reducer/actions/LoadActions.js +10 -5
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +17 -3
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +30 -18
- package/lib-cjs/component/reducer/actions/RangesActions.js +46 -12
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +4 -7
- package/lib-cjs/component/reducer/actions/ToolsActions.js +64 -74
- package/lib-cjs/component/reducer/helper/getSpectrum.js +18 -0
- package/lib-cjs/component/reducer/preferences/actions/addWorkspace.js +26 -0
- package/lib-cjs/component/reducer/preferences/actions/initPreferences.js +67 -0
- package/lib-cjs/component/reducer/preferences/actions/removeWorkspace.js +24 -0
- package/lib-cjs/component/reducer/preferences/actions/resetPreferences.js +18 -0
- package/lib-cjs/component/reducer/preferences/actions/setPanelsPreferences.js +17 -0
- package/lib-cjs/component/reducer/preferences/actions/setPreferences.js +38 -0
- package/lib-cjs/component/reducer/preferences/actions/setWorkspace.js +12 -0
- package/lib-cjs/component/reducer/preferences/panelsPreferencesDefaultValues.js +62 -0
- package/lib-cjs/component/reducer/preferences/preferencesReducer.js +87 -0
- package/lib-cjs/component/reducer/preferences/utilites/checkKeysExists.js +18 -0
- package/lib-cjs/component/reducer/preferences/utilites/filterObject.js +11 -0
- package/lib-cjs/component/reducer/preferences/utilites/flatObject.js +13 -0
- package/lib-cjs/component/reducer/preferences/utilites/getActiveWorkspace.js +7 -0
- package/lib-cjs/component/reducer/preferences/utilites/getPreferencesByWorkspace.js +11 -0
- package/lib-cjs/component/reducer/preferences/utilites/mapNucleiFormatting.js +12 -0
- package/lib-cjs/component/reducer/types/Types.js +9 -4
- package/lib-cjs/component/tool/BrushX.js +1 -1
- package/lib-cjs/component/tool/BrushXY.js +1 -1
- package/lib-cjs/component/tool/CrossLinePointer.js +1 -1
- package/lib-cjs/component/tool/FloatMoleculeStructures/ActionsButton.js +13 -0
- package/lib-cjs/component/tool/FloatMoleculeStructures/DraggableStructure.js +51 -0
- package/lib-cjs/component/tool/FloatMoleculeStructures/index.js +36 -0
- package/lib-cjs/component/toolbar/BasicToolBar.js +0 -1
- package/lib-cjs/component/toolbar/FunctionToolBar.js +9 -13
- package/lib-cjs/component/toolbar/ToolTypes.js +3 -3
- package/lib-cjs/component/utility/Export.js +10 -3
- package/lib-cjs/component/utility/PathBuilder.js +2 -1
- package/lib-cjs/component/utility/formatNumber.js +19 -0
- package/lib-cjs/component/utility/getUniqueNuclei.js +14 -0
- package/lib-cjs/component/utility/isGoogleDocument.js +7 -0
- package/lib-cjs/component/utility/nmredataToNmrium.js +1 -2
- package/lib-cjs/component/utility/util/nmredata/addSource.js +2 -2
- package/lib-cjs/component/workspaces/basic.js +25 -11
- package/lib-cjs/component/workspaces/embedded.js +35 -0
- package/lib-cjs/component/workspaces/exercise.js +4 -2
- package/lib-cjs/component/workspaces/index.js +2 -1
- package/lib-cjs/component/workspaces/prediction.js +2 -0
- package/lib-cjs/component/workspaces/process1D.js +3 -1
- package/lib-cjs/data/FiltersManager.js +1 -1
- package/lib-cjs/data/PredictionManager.js +7 -9
- package/lib-cjs/data/SpectraManager.js +37 -38
- package/lib-cjs/data/data1d/Data1DManager.js +14 -2
- package/lib-cjs/data/data1d/Spectrum1D/convertDataToFloat64Array.js +14 -0
- package/lib-cjs/data/data1d/Spectrum1D/generateJGraphData.js +8 -10
- package/lib-cjs/data/data1d/Spectrum1D/getReferenceShift.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +2 -1
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateRelatives.js +5 -7
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +40 -16
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectSignal.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +2 -1
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/toJSON.js +1 -0
- package/lib-cjs/data/data1d/database.js +67 -23
- package/lib-cjs/data/data1d/filter1d/exclusionZones.js +4 -4
- package/lib-cjs/data/data1d/filter1d/fft.js +2 -2
- package/lib-cjs/data/data1d/filter1d/lineBroadening.js +2 -2
- package/lib-cjs/data/data1d/filter1d/pareto.js +2 -2
- package/lib-cjs/data/data1d/filter1d/shiftX.js +2 -2
- package/lib-cjs/data/data1d/filter1d/zeroFilling.js +1 -1
- package/lib-cjs/data/data2d/Data2DManager.js +6 -1
- package/lib-cjs/data/data2d/Processing2D.js +1 -1
- package/lib-cjs/data/data2d/Spectrum2D/toJSON.js +1 -0
- package/lib-cjs/data/data2d/filter2d/shiftX.js +4 -4
- package/lib-cjs/data/data2d/filter2d/shiftY.js +4 -4
- package/lib-cjs/data/molecules/Molecule.js +9 -1
- package/lib-cjs/data/molecules/MoleculeManager.js +37 -3
- package/lib-cjs/data/utilities/FindUtilities.js +1 -3
- package/lib-cjs/data/utilities/RangeUtilities.js +8 -6
- package/lib-cjs/data/utilities/ZoneUtilities.js +1 -1
- package/lib-cjs/data/utilities/getSum.js +1 -3
- package/lib-cjs/data/utilities/isMolFileEmpty.js +10 -0
- package/lib-cjs/types/NMRiumDataReturn.js +2 -0
- package/lib-cjs/types/NMRiumGeneralPreferences.js +2 -0
- package/lib-cjs/types/NMRiumPanelPreferences.js +2 -0
- package/lib-cjs/types/NMRiumToolBarPreferences.js +2 -0
- package/lib-cjs/types/Preferences.js +2 -0
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +53 -51
- package/lib/component/1d/multiplicityTree/TempMultiplicityTree.d.ts +0 -2
- package/lib/component/1d/multiplicityTree/TempMultiplicityTree.js +0 -14
- package/lib/component/elements/resizer/useDraggable.js +0 -52
- package/lib/component/panels/extra/preferences/defaultValues.d.ts +0 -54
- package/lib/component/panels/extra/preferences/defaultValues.js +0 -54
- package/lib/component/reducer/preferencesReducer.js +0 -272
- package/lib/component/utility/FormatNumber.d.ts +0 -6
- package/lib-cjs/component/1d/multiplicityTree/TempMultiplicityTree.js +0 -20
- package/lib-cjs/component/elements/resizer/useDraggable.js +0 -55
- package/lib-cjs/component/panels/extra/preferences/defaultValues.js +0 -61
- package/lib-cjs/component/reducer/preferencesReducer.js +0 -279
|
@@ -7,6 +7,7 @@ import generateID from '../../data/utilities/generateID';
|
|
|
7
7
|
import { DefaultTolerance } from '../panels/SummaryPanel/CorrelationTable/Constants';
|
|
8
8
|
import { options } from '../toolbar/ToolTypes';
|
|
9
9
|
import { nmredataToNmrium } from '../utility/nmredataToNmrium';
|
|
10
|
+
import * as AssignmentsActions from './actions/AssignmentsActions';
|
|
10
11
|
import * as CorrelationsActions from './actions/CorrelationsActions';
|
|
11
12
|
import * as DatabaseActions from './actions/DatabaseActions';
|
|
12
13
|
import { setWidth, handleSetDimensions } from './actions/DimensionsActions';
|
|
@@ -82,11 +83,13 @@ export const getInitialState = () => ({
|
|
|
82
83
|
selectedTool: options.zoom.id,
|
|
83
84
|
selectedOptionPanel: null,
|
|
84
85
|
data: {
|
|
85
|
-
|
|
86
|
+
baselineCorrection: {
|
|
87
|
+
options: {},
|
|
88
|
+
zones: [],
|
|
89
|
+
},
|
|
86
90
|
pivot: { value: 0, index: 0 },
|
|
87
91
|
zonesNoiseFactor: 1,
|
|
88
92
|
activeFilterID: null,
|
|
89
|
-
tempRange: null,
|
|
90
93
|
showMultiplicityTrees: false,
|
|
91
94
|
showRangesIntegrals: true,
|
|
92
95
|
showJGraph: false,
|
|
@@ -165,7 +168,7 @@ export function dispatchMiddleware(dispatch) {
|
|
|
165
168
|
};
|
|
166
169
|
}
|
|
167
170
|
function innerSpectrumReducer(draft, action) {
|
|
168
|
-
if (![types.LOAD_JSON_FILE, types.LOAD_NMREDATA_FILE].includes(action.type)) {
|
|
171
|
+
if (![types.LOAD_JSON_FILE, types.LOAD_NMREDATA_FILE, types.INITIATE].includes(action.type)) {
|
|
169
172
|
draft.actionType = action.type;
|
|
170
173
|
}
|
|
171
174
|
switch (action.type) {
|
|
@@ -251,6 +254,10 @@ function innerSpectrumReducer(draft, action) {
|
|
|
251
254
|
return FiltersActions.handleAddExclusionZone(draft, action);
|
|
252
255
|
case types.DELETE_EXCLUSION_ZONE:
|
|
253
256
|
return FiltersActions.handleDeleteExclusionZone(draft, action);
|
|
257
|
+
case types.APPLY_BASE_LINE_CORRECTION_FILTER:
|
|
258
|
+
return FiltersActions.handleBaseLineCorrectionFilter(draft, action);
|
|
259
|
+
case types.CALCULATE_BASE_LINE_CORRECTION_FILTER:
|
|
260
|
+
return FiltersActions.calculateBaseLineCorrection(draft, action);
|
|
254
261
|
case types.CHANGE_VISIBILITY:
|
|
255
262
|
return SpectrumsActions.handleSpectrumVisibility(draft, action);
|
|
256
263
|
case types.CHANGE_PEAKS_MARKERS_VISIBILITY:
|
|
@@ -282,11 +289,15 @@ function innerSpectrumReducer(draft, action) {
|
|
|
282
289
|
case types.ADD_MOLECULE:
|
|
283
290
|
return MoleculeActions.addMoleculeHandler(draft, action.molfile);
|
|
284
291
|
case types.SET_MOLECULE:
|
|
285
|
-
return MoleculeActions.setMoleculeHandler(draft, action
|
|
292
|
+
return MoleculeActions.setMoleculeHandler(draft, action);
|
|
293
|
+
case types.CHANGE_MOLECULE_LABEL:
|
|
294
|
+
return MoleculeActions.changeMoleculeLabel(draft, action);
|
|
286
295
|
case types.DELETE_MOLECULE:
|
|
287
296
|
return MoleculeActions.deleteMoleculeHandler(draft, action);
|
|
288
297
|
case types.PREDICT_SPECTRA:
|
|
289
298
|
return MoleculeActions.predictSpectraFromMoleculeHandler(draft, action);
|
|
299
|
+
case types.FLOAT_MOLECULE_OVER_SPECTRUM:
|
|
300
|
+
return MoleculeActions.floatMoleculeOverSpectrum(draft, action);
|
|
290
301
|
case types.SET_CORRELATIONS_MF:
|
|
291
302
|
return CorrelationsActions.handleSetMF(draft, action.payload);
|
|
292
303
|
case types.SET_CORRELATIONS_TOLERANCE:
|
|
@@ -335,8 +346,8 @@ function innerSpectrumReducer(draft, action) {
|
|
|
335
346
|
return RangesActions.handleUnlinkRange(draft, action);
|
|
336
347
|
case types.SET_DIAID_RANGE:
|
|
337
348
|
return RangesActions.handleSetDiaIDRange(draft, action);
|
|
338
|
-
case types.
|
|
339
|
-
return RangesActions.
|
|
349
|
+
case types.UPDATE_RANGE:
|
|
350
|
+
return RangesActions.handleUpdateRange(draft, action);
|
|
340
351
|
case types.SHOW_MULTIPLICTY_TREES:
|
|
341
352
|
return RangesActions.handleShowMultiplicityTrees(draft);
|
|
342
353
|
case types.SHOW_RANGES_INTEGRALS:
|
|
@@ -351,8 +362,6 @@ function innerSpectrumReducer(draft, action) {
|
|
|
351
362
|
return ToolsActions.handleAddBaseLineZone(draft, action.zone);
|
|
352
363
|
case types.DELETE_BASE_LINE_ZONE:
|
|
353
364
|
return ToolsActions.handleDeleteBaseLineZone(draft, action.id);
|
|
354
|
-
case types.APPLY_BASE_LINE_CORRECTION_FILTER:
|
|
355
|
-
return FiltersActions.handleBaseLineCorrectionFilter(draft, action);
|
|
356
365
|
case types.SET_KEY_PREFERENCES:
|
|
357
366
|
return setKeyPreferencesHandler(draft, action.keyCode);
|
|
358
367
|
case types.APPLY_KEY_PREFERENCES:
|
|
@@ -392,7 +401,11 @@ function innerSpectrumReducer(draft, action) {
|
|
|
392
401
|
case types.FILTER_SPECTRA_COLUMN:
|
|
393
402
|
return SpectraAnalysisActions.handleFilterColumn(draft, action);
|
|
394
403
|
case types.RESURRECTING_SPECTRUM_FROM_RANGES:
|
|
395
|
-
return DatabaseActions.
|
|
404
|
+
return DatabaseActions.handleResurrectSpectrumFromRanges(draft, action);
|
|
405
|
+
case types.RESURRECTING_SPECTRUM_FROM_JCAMP:
|
|
406
|
+
return DatabaseActions.handleResurrectSpectrumFromJcamp(draft, action);
|
|
407
|
+
case types.SET_AUTOMATIC_ASSIGNMENTS:
|
|
408
|
+
return AssignmentsActions.setAutomaticAssignmentsHandler(draft, action);
|
|
396
409
|
case UNDO:
|
|
397
410
|
return handleHistoryUndo(draft);
|
|
398
411
|
case REDO:
|
|
@@ -402,7 +415,6 @@ function innerSpectrumReducer(draft, action) {
|
|
|
402
415
|
case types.SET_MOUSE_OVER_DISPLAYER:
|
|
403
416
|
return GlobalActions.setIsOverDisplayer(draft, action);
|
|
404
417
|
default:
|
|
405
|
-
return;
|
|
406
418
|
}
|
|
407
419
|
}
|
|
408
420
|
export const spectrumReducer = produce(innerSpectrumReducer);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Draft } from 'immer';
|
|
2
|
+
import { SpectraData1D, SpectraData2D } from 'nmr-processing';
|
|
3
|
+
import { State } from '../Reducer';
|
|
4
|
+
declare function setAutomaticAssignmentsHandler(draft: Draft<State>, action: {
|
|
5
|
+
payload: {
|
|
6
|
+
assignments: (SpectraData1D | SpectraData2D)[];
|
|
7
|
+
};
|
|
8
|
+
}): void;
|
|
9
|
+
export { setAutomaticAssignmentsHandler };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function setAutomaticAssignmentsHandler(draft, action) {
|
|
2
|
+
const assignments = action.payload.assignments;
|
|
3
|
+
for (let datum of assignments) {
|
|
4
|
+
const index = draft.data.findIndex((spectrum) => spectrum.id === datum.id);
|
|
5
|
+
if (index !== -1) {
|
|
6
|
+
const dimension = draft.data[index].info.dimension;
|
|
7
|
+
if (dimension === 1) {
|
|
8
|
+
draft.data[index].ranges.values = datum
|
|
9
|
+
.ranges;
|
|
10
|
+
}
|
|
11
|
+
else if (dimension === 2) {
|
|
12
|
+
draft.data[index].zones.values = datum
|
|
13
|
+
.zones;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export { setAutomaticAssignmentsHandler };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Draft } from 'immer';
|
|
2
2
|
import { State } from '../Reducer';
|
|
3
|
-
declare function
|
|
4
|
-
|
|
3
|
+
declare function handleResurrectSpectrumFromJcamp(draft: Draft<State>, action: any): void;
|
|
4
|
+
declare function handleResurrectSpectrumFromRanges(draft: Draft<State>, action: any): void;
|
|
5
|
+
export { handleResurrectSpectrumFromRanges, handleResurrectSpectrumFromJcamp };
|
|
@@ -1,11 +1,29 @@
|
|
|
1
|
+
import { addJcamp } from '../../../data/SpectraManager';
|
|
2
|
+
import { mapRanges } from '../../../data/data1d/Spectrum1D';
|
|
1
3
|
import { generateSpectrumFromRanges } from '../../../data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges';
|
|
2
4
|
import { setZoom } from '../helper/Zoom1DManager';
|
|
3
|
-
import { setDomain } from './DomainActions';
|
|
4
|
-
function
|
|
5
|
+
import { setDomain, setIntegralsYDomain } from './DomainActions';
|
|
6
|
+
function handleResurrectSpectrumFromJcamp(draft, action) {
|
|
7
|
+
const { ranges, file, jcampURL } = action.payload;
|
|
8
|
+
let spectra = [];
|
|
9
|
+
addJcamp(spectra, file, {
|
|
10
|
+
source: {
|
|
11
|
+
jcampURL,
|
|
12
|
+
},
|
|
13
|
+
}, draft.usedColors);
|
|
14
|
+
const spectrum = spectra[0];
|
|
15
|
+
spectrum.ranges.values = mapRanges(ranges, spectrum);
|
|
16
|
+
draft.data.push(spectrum);
|
|
17
|
+
setDomain(draft);
|
|
18
|
+
setIntegralsYDomain(draft, [spectrum]);
|
|
19
|
+
setZoom(draft, { scale: 0.8, spectrumID: spectrum.id });
|
|
20
|
+
}
|
|
21
|
+
function handleResurrectSpectrumFromRanges(draft, action) {
|
|
5
22
|
const { ranges, info } = action.payload;
|
|
6
23
|
const datum = generateSpectrumFromRanges(ranges, info, draft.usedColors);
|
|
7
24
|
draft.data.push(datum);
|
|
8
25
|
setDomain(draft, { yDomain: { isShared: false } });
|
|
26
|
+
setIntegralsYDomain(draft, [datum]);
|
|
9
27
|
setZoom(draft, { scale: 0.8, spectrumID: datum.id });
|
|
10
28
|
}
|
|
11
|
-
export {
|
|
29
|
+
export { handleResurrectSpectrumFromRanges, handleResurrectSpectrumFromJcamp };
|
|
@@ -6,6 +6,7 @@ declare function applyFFTFilter(draft: Draft<State>): void;
|
|
|
6
6
|
declare function applyManualPhaseCorrectionFilter(draft: Draft<State>, filterOptions: any): void;
|
|
7
7
|
declare function applyAbsoluteFilter(draft: Draft<State>): void;
|
|
8
8
|
declare function applyAutoPhaseCorrectionFilter(draft: Draft<State>): void;
|
|
9
|
+
declare function calculateBaseLineCorrection(draft: Draft<State>, action?: any): void;
|
|
9
10
|
declare function calculateManualPhaseCorrection(draft: Draft<State>, filterOptions: any): void;
|
|
10
11
|
declare function enableFilter(draft: Draft<State>, filterID: any, checked: any): void;
|
|
11
12
|
declare function deleteFilter(draft: Draft<State>, actions: any): void;
|
|
@@ -31,4 +32,4 @@ declare function filterSnapshotHandler(draft: Draft<State>, action: any): void;
|
|
|
31
32
|
declare function handleMultipleSpectraFilter(draft: Draft<State>, action: any): void;
|
|
32
33
|
declare function handleAddExclusionZone(draft: Draft<State>, action: any): void;
|
|
33
34
|
declare function handleDeleteExclusionZone(draft: Draft<State>, action: any): void;
|
|
34
|
-
export { shiftSpectrumAlongXAxis, applyZeroFillingFilter, applyFFTFilter, applyManualPhaseCorrectionFilter, applyAutoPhaseCorrectionFilter, applyAbsoluteFilter, calculateManualPhaseCorrection, handleMultipleSpectraFilter, enableFilter, deleteFilter, deleteSpectraFilter, handleBaseLineCorrectionFilter, filterSnapshotHandler, resetSpectrumByFilter, handleAddExclusionZone, handleDeleteExclusionZone, };
|
|
35
|
+
export { shiftSpectrumAlongXAxis, applyZeroFillingFilter, applyFFTFilter, applyManualPhaseCorrectionFilter, applyAutoPhaseCorrectionFilter, applyAbsoluteFilter, calculateManualPhaseCorrection, calculateBaseLineCorrection, handleMultipleSpectraFilter, enableFilter, deleteFilter, deleteSpectraFilter, handleBaseLineCorrectionFilter, filterSnapshotHandler, resetSpectrumByFilter, handleAddExclusionZone, handleDeleteExclusionZone, };
|
|
@@ -3,6 +3,7 @@ import * as Filters from '../../../data/Filters';
|
|
|
3
3
|
import * as FiltersManager from '../../../data/FiltersManager';
|
|
4
4
|
import { updateXShift } from '../../../data/data1d/Spectrum1D';
|
|
5
5
|
import { apply as autoPhaseCorrection } from '../../../data/data1d/filter1d/autoPhaseCorrection';
|
|
6
|
+
import { apply as baselineCorrection } from '../../../data/data1d/filter1d/baselineCorrection';
|
|
6
7
|
import { apply as phaseCorrection } from '../../../data/data1d/filter1d/phaseCorrection';
|
|
7
8
|
import { updateShift as update2dShift } from '../../../data/data2d/Spectrum2D';
|
|
8
9
|
import generateID from '../../../data/utilities/generateID';
|
|
@@ -89,12 +90,32 @@ function applyAutoPhaseCorrectionFilter(draft) {
|
|
|
89
90
|
setDomain(draft);
|
|
90
91
|
}
|
|
91
92
|
}
|
|
93
|
+
function calculateBaseLineCorrection(draft, action) {
|
|
94
|
+
if (draft.activeSpectrum) {
|
|
95
|
+
const { index } = draft.activeSpectrum;
|
|
96
|
+
const { data: { x, re, im }, info, } = draft.data[index];
|
|
97
|
+
// save the baseline options temporary
|
|
98
|
+
draft.toolOptions.data.baselineCorrection = {
|
|
99
|
+
...draft.toolOptions.data.baselineCorrection,
|
|
100
|
+
...(action?.options ? { options: action.options } : {}),
|
|
101
|
+
};
|
|
102
|
+
const { zones, options } = draft.toolOptions.data.baselineCorrection;
|
|
103
|
+
let _data = { data: { x, re, im }, info };
|
|
104
|
+
baselineCorrection(_data, {
|
|
105
|
+
zones,
|
|
106
|
+
...options,
|
|
107
|
+
});
|
|
108
|
+
const { im: newIm, re: newRe } = _data.data;
|
|
109
|
+
draft.tempData[index].data.im = newIm;
|
|
110
|
+
draft.tempData[index].data.re = newRe;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
92
113
|
function calculateManualPhaseCorrection(draft, filterOptions) {
|
|
93
114
|
if (draft.activeSpectrum) {
|
|
94
115
|
const { index } = draft.activeSpectrum;
|
|
95
116
|
const { data: { x, re, im }, info, } = draft.data[index];
|
|
96
117
|
const { ph0, ph1 } = filterOptions;
|
|
97
|
-
let _data = { data: { x
|
|
118
|
+
let _data = { data: { x, re, im }, info };
|
|
98
119
|
phaseCorrection(_data, { ph0, ph1 });
|
|
99
120
|
const { im: newIm, re: newRe } = _data.data;
|
|
100
121
|
draft.tempData[index].data.im = newIm;
|
|
@@ -165,16 +186,16 @@ function deleteSpectraFilter(draft, actions) {
|
|
|
165
186
|
function handleBaseLineCorrectionFilter(draft, action) {
|
|
166
187
|
if (draft.activeSpectrum?.id) {
|
|
167
188
|
const { index } = draft.activeSpectrum;
|
|
189
|
+
const { zones } = draft.toolOptions.data.baselineCorrection;
|
|
168
190
|
FiltersManager.applyFilter(draft.data[index], [
|
|
169
191
|
{
|
|
170
192
|
name: Filters.baselineCorrection.id,
|
|
171
193
|
options: {
|
|
172
|
-
zones
|
|
194
|
+
zones,
|
|
173
195
|
...action.options,
|
|
174
196
|
},
|
|
175
197
|
},
|
|
176
198
|
]);
|
|
177
|
-
draft.toolOptions.data.baseLineZones = [];
|
|
178
199
|
const xDomainSnapshot = draft.xDomain.slice();
|
|
179
200
|
resetSelectedTool(draft);
|
|
180
201
|
setDomain(draft);
|
|
@@ -306,4 +327,4 @@ function handleDeleteExclusionZone(draft, action) {
|
|
|
306
327
|
}
|
|
307
328
|
}
|
|
308
329
|
}
|
|
309
|
-
export { shiftSpectrumAlongXAxis, applyZeroFillingFilter, applyFFTFilter, applyManualPhaseCorrectionFilter, applyAutoPhaseCorrectionFilter, applyAbsoluteFilter, calculateManualPhaseCorrection, handleMultipleSpectraFilter, enableFilter, deleteFilter, deleteSpectraFilter, handleBaseLineCorrectionFilter, filterSnapshotHandler, resetSpectrumByFilter, handleAddExclusionZone, handleDeleteExclusionZone, };
|
|
330
|
+
export { shiftSpectrumAlongXAxis, applyZeroFillingFilter, applyFFTFilter, applyManualPhaseCorrectionFilter, applyAutoPhaseCorrectionFilter, applyAbsoluteFilter, calculateManualPhaseCorrection, calculateBaseLineCorrection, handleMultipleSpectraFilter, enableFilter, deleteFilter, deleteSpectraFilter, handleBaseLineCorrectionFilter, filterSnapshotHandler, resetSpectrumByFilter, handleAddExclusionZone, handleDeleteExclusionZone, };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Draft } from 'immer';
|
|
2
2
|
import { State } from '../Reducer';
|
|
3
3
|
declare function setIsLoading(draft: Draft<State>, isLoading: boolean): void;
|
|
4
|
-
declare function initiate(draft: Draft<State>, action: any):
|
|
4
|
+
declare function initiate(draft: Draft<State>, action: any): State;
|
|
5
5
|
declare function loadJDFFile(draft: Draft<State>, actions: any): void;
|
|
6
6
|
declare function loadJcampFile(draft: Draft<State>, actions: any): void;
|
|
7
7
|
declare function handleLoadJsonFile(draft: Draft<State>, action: any): State;
|
|
@@ -3,7 +3,7 @@ import { addJcamps, addJDFs } from '../../../data/SpectraManager';
|
|
|
3
3
|
import * as MoleculeManager from '../../../data/molecules/MoleculeManager';
|
|
4
4
|
import { DefaultTolerance } from '../../panels/SummaryPanel/CorrelationTable/Constants';
|
|
5
5
|
import { getInitialState } from '../Reducer';
|
|
6
|
-
import { LOAD_JSON_FILE, LOAD_NMREDATA_FILE } from '../types/Types';
|
|
6
|
+
import { INITIATE, LOAD_JSON_FILE, LOAD_NMREDATA_FILE } from '../types/Types';
|
|
7
7
|
import { changeSpectrumVerticalAlignment } from './PreferencesActions';
|
|
8
8
|
import { setActiveTab } from './ToolsActions';
|
|
9
9
|
function setIsLoading(draft, isLoading) {
|
|
@@ -69,11 +69,16 @@ function setPreferences(draft, data) {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
function initiate(draft, action) {
|
|
72
|
-
|
|
72
|
+
const state = getInitialState();
|
|
73
|
+
setData(state, action.payload);
|
|
73
74
|
const preferences = action.payload?.preferences || {};
|
|
74
|
-
setActiveTab(
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
setActiveTab(state, { tab: preferences?.activeTab || '' });
|
|
76
|
+
state.width = draft.width;
|
|
77
|
+
state.height = draft.height;
|
|
78
|
+
setPreferences(state, action.payload);
|
|
79
|
+
state.isLoading = false;
|
|
80
|
+
state.actionType = INITIATE;
|
|
81
|
+
return state;
|
|
77
82
|
}
|
|
78
83
|
function loadJDFFile(draft, actions) {
|
|
79
84
|
const { files } = actions;
|
|
@@ -99,9 +104,9 @@ function handleLoadJsonFile(draft, action) {
|
|
|
99
104
|
setData(state, action.payload);
|
|
100
105
|
const preferences = action.payload?.preferences || {};
|
|
101
106
|
setActiveTab(state, { tab: preferences?.activeTab || '' });
|
|
102
|
-
setPreferences(state, preferences);
|
|
103
107
|
state.width = draft.width;
|
|
104
108
|
state.height = draft.height;
|
|
109
|
+
setPreferences(state, preferences);
|
|
105
110
|
state.isLoading = false;
|
|
106
111
|
state.actionType = LOAD_JSON_FILE;
|
|
107
112
|
return state;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Draft } from 'immer';
|
|
2
2
|
import { State } from '../Reducer';
|
|
3
3
|
declare function addMoleculeHandler(draft: Draft<State>, molfile: any): void;
|
|
4
|
-
declare function setMoleculeHandler(draft: Draft<State>,
|
|
4
|
+
declare function setMoleculeHandler(draft: Draft<State>, action: any): void;
|
|
5
5
|
declare function deleteMoleculeHandler(draft: Draft<State>, action: any): void;
|
|
6
6
|
declare function predictSpectraFromMoleculeHandler(draft: Draft<State>, action: any): void;
|
|
7
|
-
|
|
7
|
+
declare function floatMoleculeOverSpectrum(draft: Draft<State>, action: any): void;
|
|
8
|
+
declare function changeMoleculeLabel(draft: Draft<State>, action: any): void;
|
|
9
|
+
export { addMoleculeHandler, setMoleculeHandler, deleteMoleculeHandler, predictSpectraFromMoleculeHandler, floatMoleculeOverSpectrum, changeMoleculeLabel, };
|
|
@@ -19,8 +19,9 @@ function addMoleculeHandler(draft, molfile) {
|
|
|
19
19
|
changeSpectraRelativeSum(draft, molecule.key, molecule);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
function setMoleculeHandler(draft,
|
|
23
|
-
|
|
22
|
+
function setMoleculeHandler(draft, action) {
|
|
23
|
+
const { key, label, molfile, isFloat } = action.payload;
|
|
24
|
+
MoleculeManager.setMolfile(draft.molecules, { key, label, molfile, isFloat });
|
|
24
25
|
/**
|
|
25
26
|
* update all spectra that its sum was based on this molecule with the new molecule
|
|
26
27
|
*/
|
|
@@ -67,4 +68,15 @@ function predictSpectraFromMoleculeHandler(draft, action) {
|
|
|
67
68
|
setActiveTab(draft);
|
|
68
69
|
draft.isLoading = false;
|
|
69
70
|
}
|
|
70
|
-
|
|
71
|
+
function floatMoleculeOverSpectrum(draft, action) {
|
|
72
|
+
const { key } = action.payload;
|
|
73
|
+
const moleculeIndex = draft.molecules.findIndex((molecule) => molecule.key === key);
|
|
74
|
+
draft.molecules[moleculeIndex].isFloat =
|
|
75
|
+
!draft.molecules[moleculeIndex].isFloat;
|
|
76
|
+
}
|
|
77
|
+
function changeMoleculeLabel(draft, action) {
|
|
78
|
+
const { key, label } = action.payload;
|
|
79
|
+
const moleculeIndex = draft.molecules.findIndex((molecule) => molecule.key === key);
|
|
80
|
+
draft.molecules[moleculeIndex].label = label;
|
|
81
|
+
}
|
|
82
|
+
export { addMoleculeHandler, setMoleculeHandler, deleteMoleculeHandler, predictSpectraFromMoleculeHandler, floatMoleculeOverSpectrum, changeMoleculeLabel, };
|
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
import cloneDeep from 'lodash/cloneDeep';
|
|
2
|
-
import
|
|
2
|
+
import groupByInfoKey from '../../utility/GroupByInfoKey';
|
|
3
3
|
import nucleusToString from '../../utility/nucleusToString';
|
|
4
4
|
import { DEFAULT_YAXIS_SHIFT_VALUE, DISPLAYER_MODE } from '../core/Constants';
|
|
5
5
|
import { setDomain } from './DomainActions';
|
|
6
6
|
function changeSpectrumVerticalAlignment(draft, options) {
|
|
7
|
+
function stack(spectra = []) {
|
|
8
|
+
if (spectra.length > 1) {
|
|
9
|
+
draft.verticalAlign.align = 'stack';
|
|
10
|
+
const visibleSpectra = spectra.filter((datum) => datum.display.isVisible);
|
|
11
|
+
draft.verticalAlign.verticalShift = Math.abs(Math.floor((draft.height - draft.margin.bottom) / (visibleSpectra.length + 2)));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function center() {
|
|
15
|
+
const YAxisShift = draft.height / 2;
|
|
16
|
+
draft.verticalAlign.align = 'center';
|
|
17
|
+
draft.verticalAlign.verticalShift = YAxisShift;
|
|
18
|
+
}
|
|
19
|
+
function bottom() {
|
|
20
|
+
draft.verticalAlign.align = 'bottom';
|
|
21
|
+
draft.verticalAlign.verticalShift = DEFAULT_YAXIS_SHIFT_VALUE;
|
|
22
|
+
}
|
|
7
23
|
if (draft.data && draft.data.length > 0) {
|
|
8
24
|
let dataPerNucleus = [];
|
|
9
25
|
if (['auto-check', 'stack'].includes(options.align || '')) {
|
|
@@ -12,38 +28,34 @@ function changeSpectrumVerticalAlignment(draft, options) {
|
|
|
12
28
|
: draft.activeTab && datum.info.dimension === 1);
|
|
13
29
|
}
|
|
14
30
|
switch (options.align) {
|
|
15
|
-
case 'auto-check':
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (
|
|
19
|
-
(
|
|
20
|
-
dataPerNucleus[0]?.info.isFid &&
|
|
21
|
-
!dataPerNucleus.some((d) => d.info.isFid === false))) {
|
|
22
|
-
const YAxisShift = draft.height / 2;
|
|
23
|
-
draft.verticalAlign.align = 'center';
|
|
24
|
-
draft.verticalAlign.verticalShift = YAxisShift;
|
|
31
|
+
case 'auto-check': {
|
|
32
|
+
const isFid = dataPerNucleus[0]?.info.isFid &&
|
|
33
|
+
!dataPerNucleus.some((d) => !d.info.isFid);
|
|
34
|
+
if (isFid) {
|
|
35
|
+
center();
|
|
25
36
|
}
|
|
26
|
-
else {
|
|
27
|
-
|
|
28
|
-
draft.verticalAlign.verticalShift = DEFAULT_YAXIS_SHIFT_VALUE;
|
|
37
|
+
else if (dataPerNucleus.length > 1) {
|
|
38
|
+
stack(dataPerNucleus);
|
|
29
39
|
}
|
|
30
40
|
break;
|
|
31
41
|
}
|
|
42
|
+
case 'bottom': {
|
|
43
|
+
return bottom();
|
|
44
|
+
}
|
|
45
|
+
case 'center': {
|
|
46
|
+
return center();
|
|
47
|
+
}
|
|
32
48
|
case 'stack': {
|
|
33
|
-
|
|
34
|
-
const visibleSpectra = dataPerNucleus.filter((datum) => datum.display.isVisible === true);
|
|
35
|
-
draft.verticalAlign.verticalShift = Math.floor((draft.height - draft.margin.bottom) / (visibleSpectra.length + 2));
|
|
36
|
-
break;
|
|
49
|
+
return stack(dataPerNucleus);
|
|
37
50
|
}
|
|
38
51
|
default:
|
|
39
|
-
return;
|
|
40
52
|
}
|
|
41
53
|
}
|
|
42
54
|
}
|
|
43
55
|
function setKeyPreferencesHandler(draft, keyCode) {
|
|
44
56
|
const { activeTab, data, activeSpectrum, zoom, xDomain, xDomains, yDomain, yDomains, originDomain, margin, displayerMode, tabActiveSpectrum, } = draft;
|
|
45
57
|
if (activeTab) {
|
|
46
|
-
const groupByNucleus =
|
|
58
|
+
const groupByNucleus = groupByInfoKey('nucleus');
|
|
47
59
|
const spectrumsGroupsList = groupByNucleus(data);
|
|
48
60
|
const level = displayerMode === DISPLAYER_MODE.DM_2D
|
|
49
61
|
? spectrumsGroupsList[activeTab].reduce((acc, datum) => {
|
|
@@ -14,8 +14,8 @@ declare function handleAddRange(draft: Draft<State>, action: any): void;
|
|
|
14
14
|
declare function handleChangeRangeRelativeValue(draft: any, action: any): void;
|
|
15
15
|
declare function handleChangeRangeSignalValue(draft: any, action: any): void;
|
|
16
16
|
declare function handleChangeRangesSumFlag(draft: any, action: any): void;
|
|
17
|
-
declare function
|
|
17
|
+
declare function handleUpdateRange(draft: Draft<State>, action: any): void;
|
|
18
18
|
declare function handleShowMultiplicityTrees(draft: Draft<State>): void;
|
|
19
19
|
declare function handleShowRangesIntegrals(draft: Draft<State>): void;
|
|
20
20
|
declare function handleShowJGraph(draft: Draft<State>): void;
|
|
21
|
-
export { handleAutoRangesDetection, handleDeleteRange, handleDeleteSignal, handleChangeRangeSum, handleAddRange, handleResizeRange, handleChangeRangeRelativeValue, handleChangeRangeSignalValue, handleChangeRangeSignalKind, handleSaveEditedRange, handleUnlinkRange, handleSetDiaIDRange, handleChangeRangesSumFlag,
|
|
21
|
+
export { handleAutoRangesDetection, handleDeleteRange, handleDeleteSignal, handleChangeRangeSum, handleAddRange, handleResizeRange, handleChangeRangeRelativeValue, handleChangeRangeSignalValue, handleChangeRangeSignalKind, handleSaveEditedRange, handleUnlinkRange, handleSetDiaIDRange, handleChangeRangesSumFlag, handleUpdateRange, handleShowMultiplicityTrees, handleShowRangesIntegrals, handleAutoSpectraRangesDetection, handleShowJGraph, };
|
|
@@ -7,9 +7,11 @@ import { DatumKind, SignalKindsToInclude, } from '../../../data/constants/Signal
|
|
|
7
7
|
import { addRange, changeRangeSignal, detectRanges, updateRangesRelativeValues, changeRange, changeRangeRelativeValue, updateXShift, } from '../../../data/data1d/Spectrum1D';
|
|
8
8
|
import { setSumOptions } from '../../../data/data1d/Spectrum1D/SumManager';
|
|
9
9
|
import { unlink, unlinkInAssignmentData, } from '../../../data/utilities/RangeUtilities';
|
|
10
|
+
import generateID from '../../../data/utilities/generateID';
|
|
10
11
|
import getRange from '../helper/getRange';
|
|
11
12
|
import { handleUpdateCorrelations } from './CorrelationsActions';
|
|
12
13
|
import { setDomain, setIntegralsYDomain } from './DomainActions';
|
|
14
|
+
import { resetSelectedTool } from './ToolsActions';
|
|
13
15
|
function handleAutoRangesDetection(draft, options) {
|
|
14
16
|
const { activeSpectrum, data, xDomain, molecules, activeTab: nucleus, } = draft;
|
|
15
17
|
if (activeSpectrum?.id) {
|
|
@@ -62,7 +64,8 @@ function getRangeIndex(draft, spectrumIndex, rangeID) {
|
|
|
62
64
|
function handleDeleteRange(draft, action) {
|
|
63
65
|
if (draft.activeSpectrum?.id) {
|
|
64
66
|
const { index } = draft.activeSpectrum;
|
|
65
|
-
const {
|
|
67
|
+
const { data, resetSelectTool = false } = action.payload;
|
|
68
|
+
const { id = null, assignmentData } = data;
|
|
66
69
|
const datum = draft.data[index];
|
|
67
70
|
if (id) {
|
|
68
71
|
const rangeIndex = getRangeIndex(draft, index, id);
|
|
@@ -75,6 +78,9 @@ function handleDeleteRange(draft, action) {
|
|
|
75
78
|
}
|
|
76
79
|
updateRangesRelativeValues(datum);
|
|
77
80
|
handleOnChangeRangesData(draft);
|
|
81
|
+
if (resetSelectTool) {
|
|
82
|
+
resetSelectedTool(draft);
|
|
83
|
+
}
|
|
78
84
|
}
|
|
79
85
|
}
|
|
80
86
|
function handleChangeRangeSignalKind(draft, action) {
|
|
@@ -99,8 +105,6 @@ function handleSaveEditedRange(draft, action) {
|
|
|
99
105
|
if (state.activeSpectrum?.id) {
|
|
100
106
|
const { index } = state.activeSpectrum;
|
|
101
107
|
const { editedRowData, assignmentData } = action.payload;
|
|
102
|
-
// reset temp range
|
|
103
|
-
draft.toolOptions.data.tempRange = null;
|
|
104
108
|
// remove assignments in global state
|
|
105
109
|
const _editedRowData = unlink(editedRowData);
|
|
106
110
|
delete _editedRowData.tableMetaInfo;
|
|
@@ -109,9 +113,13 @@ function handleSaveEditedRange(draft, action) {
|
|
|
109
113
|
// for now: clear all assignments for this range because signals or levels to store might have changed
|
|
110
114
|
unlinkInAssignmentData(assignmentData, [_editedRowData]);
|
|
111
115
|
const rangeIndex = getRangeIndex(state, index, _editedRowData.id);
|
|
112
|
-
|
|
116
|
+
if (_editedRowData.id === 'new') {
|
|
117
|
+
_editedRowData.id = generateID();
|
|
118
|
+
}
|
|
119
|
+
draft.data[index].ranges.values.splice(rangeIndex, 1, _editedRowData);
|
|
113
120
|
updateRangesRelativeValues(draft.data[index]);
|
|
114
121
|
handleOnChangeRangesData(draft);
|
|
122
|
+
resetSelectedTool(draft);
|
|
115
123
|
}
|
|
116
124
|
}
|
|
117
125
|
function handleDeleteSignal(draft, action) {
|
|
@@ -202,18 +210,36 @@ function handleChangeRangeSum(draft, options) {
|
|
|
202
210
|
updateRangesRelativeValues(datum, true);
|
|
203
211
|
}
|
|
204
212
|
}
|
|
205
|
-
function
|
|
206
|
-
const { startX, endX } =
|
|
207
|
-
const { activeSpectrum, activeTab: nucleus, molecules } = draft;
|
|
213
|
+
function addNewRange(draft, props) {
|
|
214
|
+
const { startX, endX, id } = props;
|
|
208
215
|
const range = getRange(draft, { startX, endX });
|
|
216
|
+
const { activeSpectrum, activeTab: nucleus, molecules } = draft;
|
|
209
217
|
if (activeSpectrum?.id) {
|
|
210
218
|
const { index } = activeSpectrum;
|
|
211
219
|
const [from, to] = range;
|
|
212
|
-
addRange(draft.data[index], {
|
|
220
|
+
addRange(draft.data[index], {
|
|
221
|
+
from,
|
|
222
|
+
to,
|
|
223
|
+
id,
|
|
224
|
+
nucleus,
|
|
225
|
+
molecules,
|
|
226
|
+
});
|
|
213
227
|
handleOnChangeRangesData(draft);
|
|
214
228
|
setIntegralsYDomain(draft, draft.data[index]);
|
|
215
229
|
}
|
|
216
230
|
}
|
|
231
|
+
function handleAddRange(draft, action) {
|
|
232
|
+
const { startX, endX, id } = action.payload;
|
|
233
|
+
if (id === 'new') {
|
|
234
|
+
const { width } = draft;
|
|
235
|
+
const startX = width / 3;
|
|
236
|
+
const endX = startX + 10;
|
|
237
|
+
addNewRange(draft, { startX, endX, id: 'new' });
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
addNewRange(draft, { startX, endX });
|
|
241
|
+
}
|
|
242
|
+
}
|
|
217
243
|
function handleChangeRangeRelativeValue(draft, action) {
|
|
218
244
|
const data = action.payload.data;
|
|
219
245
|
if (draft.activeSpectrum?.id) {
|
|
@@ -248,8 +274,16 @@ function handleChangeRangesSumFlag(draft, action) {
|
|
|
248
274
|
draft.data[index].ranges.options.isSumConstant = !flag;
|
|
249
275
|
}
|
|
250
276
|
}
|
|
251
|
-
function
|
|
252
|
-
|
|
277
|
+
function handleUpdateRange(draft, action) {
|
|
278
|
+
const { range, resetSelectTool = false } = action.payload;
|
|
279
|
+
if (draft.activeSpectrum?.id && range.id) {
|
|
280
|
+
const datum = draft.data[draft.activeSpectrum?.index];
|
|
281
|
+
const index = datum.ranges.values.findIndex((_range) => _range.id === range.id);
|
|
282
|
+
datum.ranges.values[index] = range;
|
|
283
|
+
}
|
|
284
|
+
if (resetSelectTool) {
|
|
285
|
+
resetSelectedTool(draft);
|
|
286
|
+
}
|
|
253
287
|
}
|
|
254
288
|
function handleShowMultiplicityTrees(draft) {
|
|
255
289
|
draft.toolOptions.data.showMultiplicityTrees =
|
|
@@ -262,4 +296,4 @@ function handleShowRangesIntegrals(draft) {
|
|
|
262
296
|
function handleShowJGraph(draft) {
|
|
263
297
|
draft.toolOptions.data.showJGraph = !draft.toolOptions.data.showJGraph;
|
|
264
298
|
}
|
|
265
|
-
export { handleAutoRangesDetection, handleDeleteRange, handleDeleteSignal, handleChangeRangeSum, handleAddRange, handleResizeRange, handleChangeRangeRelativeValue, handleChangeRangeSignalValue, handleChangeRangeSignalKind, handleSaveEditedRange, handleUnlinkRange, handleSetDiaIDRange, handleChangeRangesSumFlag,
|
|
299
|
+
export { handleAutoRangesDetection, handleDeleteRange, handleDeleteSignal, handleChangeRangeSum, handleAddRange, handleResizeRange, handleChangeRangeRelativeValue, handleChangeRangeSignalValue, handleChangeRangeSignalKind, handleSaveEditedRange, handleUnlinkRange, handleSetDiaIDRange, handleChangeRangesSumFlag, handleUpdateRange, handleShowMultiplicityTrees, handleShowRangesIntegrals, handleAutoSpectraRangesDetection, handleShowJGraph, };
|
|
@@ -4,14 +4,13 @@ import { applyFilter } from '../../../data/FiltersManager';
|
|
|
4
4
|
import { generateSpectrumFromPublicationString, getReferenceShift, } from '../../../data/data1d/Spectrum1D';
|
|
5
5
|
import { getMissingProjection } from '../../../data/data2d/Spectrum2D';
|
|
6
6
|
import { options } from '../../toolbar/ToolTypes';
|
|
7
|
-
import
|
|
7
|
+
import groupByInfoKey from '../../utility/GroupByInfoKey';
|
|
8
8
|
import { setZoom } from '../helper/Zoom1DManager';
|
|
9
9
|
import { setDomain, setMode } from './DomainActions';
|
|
10
10
|
import { resetSpectrumByFilter } from './FiltersActions';
|
|
11
11
|
import { setTab, setActiveTab } from './ToolsActions';
|
|
12
12
|
function checkIsVisible2D(datum) {
|
|
13
|
-
if (datum.display.isPositiveVisible
|
|
14
|
-
datum.display.isNegativeVisible === false) {
|
|
13
|
+
if (!datum.display.isPositiveVisible && !datum.display.isNegativeVisible) {
|
|
15
14
|
return false;
|
|
16
15
|
}
|
|
17
16
|
return true;
|
|
@@ -75,10 +74,8 @@ function handleChangeActiveSpectrum(draft, activeSpectrum) {
|
|
|
75
74
|
newActiveSpectrum.display.isVisible = true;
|
|
76
75
|
if (oldIndex !== -1) {
|
|
77
76
|
refreshDomain =
|
|
78
|
-
draft.data[oldIndex].info.isFid
|
|
79
|
-
newActiveSpectrum.info.isFid
|
|
80
|
-
? false
|
|
81
|
-
: true;
|
|
77
|
+
draft.data[oldIndex].info.isFid !==
|
|
78
|
+
newActiveSpectrum.info.isFid;
|
|
82
79
|
}
|
|
83
80
|
else {
|
|
84
81
|
refreshDomain = newActiveSpectrum.info.isFid || false;
|
|
@@ -101,7 +98,7 @@ function handleChangeActiveSpectrum(draft, activeSpectrum) {
|
|
|
101
98
|
}
|
|
102
99
|
if (options[draft.toolOptions.selectedTool].isFilter) {
|
|
103
100
|
draft.toolOptions.selectedTool = options.zoom.id;
|
|
104
|
-
draft.toolOptions.data.
|
|
101
|
+
draft.toolOptions.data.baselineCorrection = { zones: [], options: {} };
|
|
105
102
|
draft.toolOptions.selectedOptionPanel = null;
|
|
106
103
|
draft.tempData = null;
|
|
107
104
|
}
|
|
@@ -151,7 +148,7 @@ function addMissingProjectionHandler(draft, action) {
|
|
|
151
148
|
const datum1D = getMissingProjection(state.data[index], n, draft.usedColors);
|
|
152
149
|
draft.data.push(datum1D);
|
|
153
150
|
}
|
|
154
|
-
const groupByNucleus =
|
|
151
|
+
const groupByNucleus = groupByInfoKey('nucleus');
|
|
155
152
|
const dataGroupByNucleus = groupByNucleus(draft.data);
|
|
156
153
|
setTab(draft, dataGroupByNucleus, draft.activeTab, true);
|
|
157
154
|
setDomain(draft);
|