nmrium 0.36.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/component/1d/FooterBanner.js +1 -1
- package/lib/component/1d/Viewer1D.js +26 -21
- package/lib/component/1d/integral/Integral.d.ts +2 -6
- package/lib/component/1d/integral/IntegralResizable.d.ts +2 -6
- package/lib/component/1d/integral/IntegralResizable.js +2 -3
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +7 -9
- package/lib/component/1d/peaks/PeakAnnotation.js +1 -2
- package/lib/component/1d/ranges/Range.js +9 -8
- package/lib/component/1d/ranges/Ranges.js +5 -7
- package/lib/component/1d/tool/BaseLineZones.js +1 -2
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +4 -5
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.js +13 -17
- package/lib/component/2d/1d-tracer/Left1DChart.js +1 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js +1 -1
- package/lib/component/2d/Chart2D.js +1 -1
- package/lib/component/2d/Viewer2D.js +10 -9
- package/lib/component/2d/fid/FidCanvas.js +4 -6
- package/lib/component/2d/ft/Contours.js +1 -7
- package/lib/component/2d/utilities/DimensionLayout.d.ts +9 -24
- package/lib/component/2d/utilities/scale.d.ts +2 -1
- package/lib/component/2d/utilities/scale.js +1 -1
- package/lib/component/2d/zones/Zones.js +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.js +28 -21
- package/lib/component/NMRium.d.ts +2 -0
- package/lib/component/NMRium.js +22 -15
- package/lib/component/assignment/AssignmentsReducer.d.ts +1 -1
- package/lib/component/context/DispatchContext.d.ts +23 -3
- package/lib/component/context/DispatchContext.js +1 -1
- package/lib/component/context/LoggerContext.js +1 -1
- package/lib/component/elements/Button.js +7 -9
- package/lib/component/elements/IsotopesViewer.js +1 -1
- package/lib/component/elements/ReactTable/ReactTable.js +1 -2
- package/lib/component/elements/RemoveAssignmentsButton.d.ts +4 -0
- package/lib/component/{panels/RangesPanel/TableColumns → elements}/RemoveAssignmentsButton.js +14 -1
- package/lib/component/elements/formik/FormikCheckBox.js +1 -1
- package/lib/component/elements/formik/FormikColorInput.js +1 -1
- package/lib/component/elements/formik/FormikColorPicker.js +1 -1
- package/lib/component/elements/formik/FormikColumnFormatField.js +1 -1
- package/lib/component/elements/formik/FormikInput.js +1 -1
- package/lib/component/elements/formik/FormikSelect.js +2 -2
- package/lib/component/elements/formik/FormikSlider.js +1 -1
- package/lib/component/elements/formik/FormikTextarea.js +2 -2
- package/lib/component/header/ApodizationOptionsPanel.js +4 -5
- package/lib/component/header/AutoPeakPickingOptionPanel.js +1 -2
- package/lib/component/header/BaseLineCorrectionPanel.js +4 -5
- package/lib/component/header/Header.js +5 -7
- package/lib/component/header/PhaseCorrectionPanel.js +7 -8
- package/lib/component/header/RangesPickingOptionPanel.js +1 -2
- package/lib/component/header/ZeroFillingOptionsPanel.js +3 -11
- package/lib/component/header/Zones2DOptionPanel.js +5 -6
- package/lib/component/hooks/useExport.js +1 -0
- package/lib/component/hooks/useToolsFunctions.js +8 -10
- package/lib/component/loader/DropZone.js +4 -5
- package/lib/component/loader/NoData.js +1 -1
- package/lib/component/modal/AboutPredictionModal.d.ts +2 -0
- package/lib/component/modal/AboutPredictionModal.js +49 -0
- package/lib/component/modal/AlignSpectraModal.js +1 -2
- package/lib/component/modal/EditPeakShapeModal.js +1 -2
- package/lib/component/modal/ImportPublicationStringModal.js +1 -2
- package/lib/component/modal/LoadJCAMPModal.js +2 -3
- package/lib/component/modal/MoleculeStructureEditorModal.js +24 -19
- package/lib/component/modal/PredictSpectraModal.js +24 -21
- package/lib/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib/component/modal/editRange/EditRangeModal.js +3 -4
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +2 -2
- package/lib/component/modal/editRange/forms/components/CouplingsTable.js +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.js +2 -3
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js +4 -4
- package/lib/component/modal/setting/settings-tabs/FormattingTabContent.js +2 -2
- package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.js +2 -2
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +1 -2
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +7 -6
- package/lib/component/panels/InformationPanel.js +6 -6
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +11 -20
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +27 -23
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +8 -5
- package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +1 -1
- package/lib/component/panels/MatrixGenerationPanel/FiltersOptions.js +4 -4
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -2
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +1 -2
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +10 -13
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +1 -0
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +7 -7
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +4 -1
- package/lib/component/panels/MoleculesPanel/Utilities.js +2 -2
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +8 -9
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +3 -4
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +1 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +1 -1
- package/lib/component/panels/Panels.js +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +4 -5
- package/lib/component/panels/PeaksPanel/PeaksTable.js +4 -5
- package/lib/component/panels/RangesPanel/RangesHeader.js +12 -15
- package/lib/component/panels/RangesPanel/RangesPanel.js +24 -29
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +0 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.js +0 -11
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -3
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -3
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +2 -3
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -2
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.d.ts +1 -1
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +16 -14
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +16 -16
- package/lib/component/panels/SpectrumsPanel/SpectraPreferences.js +2 -2
- package/lib/component/panels/SpectrumsPanel/SpectraTable.js +7 -5
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +4 -5
- package/lib/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -7
- package/lib/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +1 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +4 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -8
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +39 -34
- package/lib/component/panels/SummaryPanel/utilities/Utilities.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.d.ts +2 -21
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +22 -20
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.d.ts +4 -5
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +12 -16
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.d.ts +3 -7
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.d.ts +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +6 -7
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.d.ts +4 -5
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +27 -19
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.d.ts +3 -7
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +2 -2
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +15 -18
- package/lib/component/panels/ZonesPanel/ZonesTable.js +2 -51
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +3 -3
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js +2 -22
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts +16 -0
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.js +52 -0
- package/lib/component/panels/databasePanel/DatabasePanel.js +9 -7
- package/lib/component/panels/filtersPanel/FilterPanel.js +1 -2
- package/lib/component/panels/filtersPanel/FiltersTable.js +8 -9
- package/lib/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib/component/panels/header/SpectraAutomaticPickingButton.js +2 -3
- package/lib/component/panels/predictionPanel/PredictionPanel.js +10 -6
- package/lib/component/reducer/IgnoreActions.d.ts +2 -1
- package/lib/component/reducer/IgnoreActions.js +35 -32
- package/lib/component/reducer/Reducer.d.ts +8 -5
- package/lib/component/reducer/Reducer.js +199 -221
- package/lib/component/reducer/actions/AssignmentsActions.d.ts +7 -6
- package/lib/component/reducer/actions/AssignmentsActions.js +2 -2
- package/lib/component/reducer/actions/CorrelationsActions.d.ts +21 -13
- package/lib/component/reducer/actions/CorrelationsActions.js +25 -20
- package/lib/component/reducer/actions/DatabaseActions.d.ts +15 -2
- package/lib/component/reducer/actions/DatabaseActions.js +5 -2
- package/lib/component/reducer/actions/DimensionsActions.d.ts +8 -3
- package/lib/component/reducer/actions/DimensionsActions.js +3 -5
- package/lib/component/reducer/actions/DomainActions.d.ts +11 -5
- package/lib/component/reducer/actions/DomainActions.js +13 -19
- package/lib/component/reducer/actions/FiltersActions.d.ts +70 -23
- package/lib/component/reducer/actions/FiltersActions.js +250 -255
- package/lib/component/reducer/actions/GlobalActions.d.ts +7 -2
- package/lib/component/reducer/actions/GlobalActions.js +3 -3
- package/lib/component/reducer/actions/IntegralsActions.d.ts +28 -7
- package/lib/component/reducer/actions/IntegralsActions.js +16 -15
- package/lib/component/reducer/actions/LoadActions.d.ts +23 -5
- package/lib/component/reducer/actions/LoadActions.js +65 -57
- package/lib/component/reducer/actions/MoleculeActions.d.ts +38 -9
- package/lib/component/reducer/actions/MoleculeActions.js +53 -20
- package/lib/component/reducer/actions/PeaksActions.d.ts +39 -8
- package/lib/component/reducer/actions/PeaksActions.js +19 -11
- package/lib/component/reducer/actions/PreferencesActions.d.ts +8 -3
- package/lib/component/reducer/actions/PreferencesActions.js +22 -7
- package/lib/component/reducer/actions/RangesActions.d.ts +85 -18
- package/lib/component/reducer/actions/RangesActions.js +80 -65
- package/lib/component/reducer/actions/SpectraAnalysisAction.d.ts +7 -1
- package/lib/component/reducer/actions/SpectrumsActions.d.ts +57 -24
- package/lib/component/reducer/actions/SpectrumsActions.js +69 -60
- package/lib/component/reducer/actions/ToolsActions.d.ts +59 -21
- package/lib/component/reducer/actions/ToolsActions.js +54 -32
- package/lib/component/reducer/actions/ZonesActions.d.ts +79 -15
- package/lib/component/reducer/actions/ZonesActions.js +68 -49
- package/lib/component/reducer/helper/Zoom1DManager.d.ts +6 -5
- package/lib/component/reducer/helper/Zoom1DManager.js +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.js +2 -2
- package/lib/component/reducer/helper/get2DRange.d.ts +7 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
- package/lib/component/reducer/types/ActionType.d.ts +6 -0
- package/lib/component/reducer/types/ActionType.js +1 -0
- package/lib/component/toolbar/BasicToolBar.js +6 -9
- package/lib/component/toolbar/FunctionToolBar.js +4 -9
- package/lib/component/toolbar/ToolBar.js +1 -1
- package/lib/component/toolbar/ToolTypes.d.ts +2 -2
- package/lib/component/utility/Events.d.ts +4 -4
- package/lib/component/utility/Events.js +2 -2
- package/lib/component/utility/GroupByInfoKey.js +1 -1
- package/lib/component/utility/getSpectraObjectPaths.js +1 -1
- package/lib/component/workspaces/Workspace.d.ts +2 -1
- package/lib/component/workspaces/exercise.js +31 -0
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -0
- package/lib/data/PredictionManager.d.ts +5 -8
- package/lib/data/PredictionManager.js +3 -3
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +1 -1
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.d.ts +2 -3
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +5 -4
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.d.ts +5 -3
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +1 -35
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +2 -35
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +7 -10
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +1 -1
- package/lib/data/data2d/Processing2D.d.ts +3 -3
- package/lib/data/data2d/Spectrum2D/contours.d.ts +1 -4
- package/lib/data/data2d/Spectrum2D/contours.js +0 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.d.ts +5 -1
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js +6 -8
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +2 -0
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +2 -0
- package/lib/data/data2d/Spectrum2D/zones/mapZones.d.ts +2 -0
- package/lib/data/matrixGeneration.js +4 -2
- package/lib/data/molecules/Molecule.d.ts +3 -3
- package/lib/data/molecules/MoleculeManager.d.ts +5 -5
- package/lib/data/molecules/MoleculeManager.js +1 -1
- package/lib/data/utilities/ZoneUtilities.js +0 -1
- package/lib/data/utilities/generateColor.js +1 -1
- package/lib/data/utilities/isNumber.d.ts +1 -0
- package/lib/data/utilities/isNumber.js +3 -0
- package/lib/types/NMRiumGeneralPreferences.d.ts +1 -0
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/FooterBanner.js +1 -1
- package/lib-cjs/component/1d/Viewer1D.js +25 -20
- package/lib-cjs/component/1d/integral/IntegralResizable.js +2 -3
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +7 -9
- package/lib-cjs/component/1d/peaks/PeakAnnotation.js +1 -2
- package/lib-cjs/component/1d/ranges/Range.js +9 -8
- package/lib-cjs/component/1d/ranges/Ranges.js +5 -7
- package/lib-cjs/component/1d/tool/BaseLineZones.js +1 -2
- package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +4 -5
- package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/index.js +13 -17
- package/lib-cjs/component/2d/1d-tracer/Left1DChart.js +1 -1
- package/lib-cjs/component/2d/1d-tracer/VerticalSliceChart.js +1 -1
- package/lib-cjs/component/2d/Chart2D.js +1 -1
- package/lib-cjs/component/2d/Viewer2D.js +10 -9
- package/lib-cjs/component/2d/fid/FidCanvas.js +4 -6
- package/lib-cjs/component/2d/ft/Contours.js +1 -7
- package/lib-cjs/component/2d/utilities/scale.js +1 -1
- package/lib-cjs/component/2d/zones/Zones.js +1 -1
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +28 -21
- package/lib-cjs/component/NMRium.js +19 -12
- package/lib-cjs/component/context/DispatchContext.js +1 -1
- package/lib-cjs/component/context/LoggerContext.js +1 -1
- package/lib-cjs/component/elements/Button.js +7 -9
- package/lib-cjs/component/elements/IsotopesViewer.js +1 -1
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +1 -2
- package/lib-cjs/component/{panels/RangesPanel/TableColumns → elements}/RemoveAssignmentsButton.js +15 -2
- package/lib-cjs/component/elements/Tab/Tabs.js +1 -1
- package/lib-cjs/component/elements/formik/FormikCheckBox.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColorInput.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColorPicker.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +1 -1
- package/lib-cjs/component/elements/formik/FormikInput.js +1 -1
- package/lib-cjs/component/elements/formik/FormikSelect.js +2 -2
- package/lib-cjs/component/elements/formik/FormikSlider.js +1 -1
- package/lib-cjs/component/elements/formik/FormikTextarea.js +2 -2
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +3 -4
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +1 -2
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +4 -5
- package/lib-cjs/component/header/Header.js +5 -7
- package/lib-cjs/component/header/PhaseCorrectionPanel.js +7 -8
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +1 -2
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +3 -11
- package/lib-cjs/component/header/Zones2DOptionPanel.js +5 -6
- package/lib-cjs/component/highlight/index.js +1 -1
- package/lib-cjs/component/hooks/useExport.js +1 -0
- package/lib-cjs/component/hooks/useTableSortBy.js +1 -1
- package/lib-cjs/component/hooks/useToolsFunctions.js +8 -10
- package/lib-cjs/component/hooks/useXYReduce.js +1 -1
- package/lib-cjs/component/loader/DropZone.js +4 -5
- package/lib-cjs/component/loader/NoData.js +1 -1
- package/lib-cjs/component/modal/AboutPredictionModal.js +54 -0
- package/lib-cjs/component/modal/AlignSpectraModal.js +1 -2
- package/lib-cjs/component/modal/EditPeakShapeModal.js +1 -2
- package/lib-cjs/component/modal/ImportPublicationStringModal.js +1 -2
- package/lib-cjs/component/modal/LoadJCAMPModal.js +2 -3
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +24 -19
- package/lib-cjs/component/modal/PredictSpectraModal.js +24 -21
- package/lib-cjs/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +3 -4
- package/lib-cjs/component/modal/editRange/forms/components/AddSignalFormTab.js +2 -2
- package/lib-cjs/component/modal/editRange/forms/components/CouplingsTable.js +1 -1
- package/lib-cjs/component/modal/metaImportation/MetaImportationModal.js +2 -3
- package/lib-cjs/component/modal/setting/settings-tabs/DatabasesTabContent.js +4 -4
- package/lib-cjs/component/modal/setting/settings-tabs/FormattingTabContent.js +2 -2
- package/lib-cjs/component/modal/setting/settings-tabs/InfoBlockTabContent.js +2 -2
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +1 -2
- package/lib-cjs/component/panels/AutomaticAssignment/useAutoAssignments.js +7 -6
- package/lib-cjs/component/panels/InformationPanel.js +6 -6
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +11 -20
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +27 -23
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +7 -4
- package/lib-cjs/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +1 -1
- package/lib-cjs/component/panels/MatrixGenerationPanel/FiltersOptions.js +4 -4
- package/lib-cjs/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -2
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +1 -2
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +10 -13
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +7 -7
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +2 -2
- package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +8 -9
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +3 -4
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +1 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +1 -1
- package/lib-cjs/component/panels/Panels.js +1 -1
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +4 -5
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +4 -5
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +12 -15
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +24 -29
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +0 -12
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +2 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -2
- package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +16 -14
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +16 -16
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPreferences.js +2 -2
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +7 -5
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +4 -5
- package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -7
- package/lib-cjs/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +4 -2
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -8
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +39 -34
- package/lib-cjs/component/panels/SummaryPanel/utilities/Utilities.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +22 -20
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +12 -19
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +2 -2
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +6 -7
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +27 -22
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +2 -2
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +15 -18
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +2 -51
- package/lib-cjs/component/panels/ZonesPanel/ZonesTableRow.js +1 -21
- package/lib-cjs/component/panels/ZonesPanel/hooks/useMapZones.js +56 -0
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +8 -6
- package/lib-cjs/component/panels/filtersPanel/FilterPanel.js +1 -2
- package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +8 -9
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib-cjs/component/panels/header/SpectraAutomaticPickingButton.js +2 -3
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +10 -6
- package/lib-cjs/component/reducer/IgnoreActions.js +35 -55
- package/lib-cjs/component/reducer/Reducer.js +199 -221
- package/lib-cjs/component/reducer/actions/AssignmentsActions.js +3 -3
- package/lib-cjs/component/reducer/actions/CorrelationsActions.js +23 -18
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +4 -1
- package/lib-cjs/component/reducer/actions/DimensionsActions.js +3 -6
- package/lib-cjs/component/reducer/actions/DomainActions.js +15 -23
- package/lib-cjs/component/reducer/actions/FiltersActions.js +267 -272
- package/lib-cjs/component/reducer/actions/GlobalActions.js +4 -4
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +19 -18
- package/lib-cjs/component/reducer/actions/LoadActions.js +68 -60
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +56 -23
- package/lib-cjs/component/reducer/actions/PeaksActions.js +23 -15
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +24 -9
- package/lib-cjs/component/reducer/actions/RangesActions.js +81 -64
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +77 -67
- package/lib-cjs/component/reducer/actions/ToolsActions.js +54 -31
- package/lib-cjs/component/reducer/actions/ZonesActions.js +73 -52
- package/lib-cjs/component/reducer/core/Constants.js +1 -1
- package/lib-cjs/component/reducer/helper/Zoom1DManager.js +2 -2
- package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +2 -2
- package/lib-cjs/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib-cjs/component/reducer/types/ActionType.js +2 -0
- package/lib-cjs/component/toolbar/BasicToolBar.js +6 -9
- package/lib-cjs/component/toolbar/FunctionToolBar.js +4 -9
- package/lib-cjs/component/toolbar/ToolBar.js +1 -1
- package/lib-cjs/component/utility/GroupByInfoKey.js +1 -1
- package/lib-cjs/component/utility/getSpectraObjectPaths.js +1 -1
- package/lib-cjs/component/workspaces/exercise.js +31 -0
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +1 -0
- package/lib-cjs/data/PredictionManager.js +3 -3
- package/lib-cjs/data/SpectraManager.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +5 -4
- package/lib-cjs/data/data1d/multipleSpectraAnalysis.js +2 -2
- package/lib-cjs/data/data2d/Spectrum2D/contours.js +0 -1
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib-cjs/data/data2d/Spectrum2D/zones/changeZoneSignal.js +6 -8
- package/lib-cjs/data/matrixGeneration.js +4 -2
- package/lib-cjs/data/molecules/MoleculeManager.js +1 -1
- package/lib-cjs/data/utilities/ZoneUtilities.js +0 -1
- package/lib-cjs/data/utilities/generateColor.js +1 -1
- package/lib-cjs/data/utilities/isNumber.js +7 -0
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +35 -34
- package/lib/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.d.ts +0 -3
- package/lib/component/reducer/actions/HistoryActions.d.ts +0 -4
- package/lib/component/reducer/actions/HistoryActions.js +0 -40
- package/lib/component/reducer/types/HistoryTypes.d.ts +0 -4
- package/lib/component/reducer/types/HistoryTypes.js +0 -4
- package/lib/component/reducer/types/Types.d.ts +0 -132
- package/lib/component/reducer/types/Types.js +0 -126
- package/lib/component/toolbar/HistoryToolBar.d.ts +0 -8
- package/lib/component/toolbar/HistoryToolBar.js +0 -30
- package/lib/data/utilities/isMolFileEmpty.d.ts +0 -1
- package/lib/data/utilities/isMolFileEmpty.js +0 -6
- package/lib-cjs/component/reducer/actions/HistoryActions.js +0 -45
- package/lib-cjs/component/reducer/types/HistoryTypes.js +0 -7
- package/lib-cjs/component/reducer/types/Types.js +0 -131
- package/lib-cjs/component/toolbar/HistoryToolBar.js +0 -35
- package/lib-cjs/data/utilities/isMolFileEmpty.js +0 -10
|
@@ -3,28 +3,24 @@ import { produce } from 'immer';
|
|
|
3
3
|
import { buildCorrelationData } from 'nmr-correlation';
|
|
4
4
|
import { predictSpectra } from '../../data/PredictionManager';
|
|
5
5
|
import { DefaultTolerance } from '../panels/SummaryPanel/CorrelationTable/Constants';
|
|
6
|
-
import { options } from '../toolbar/ToolTypes';
|
|
7
6
|
import * as AssignmentsActions from './actions/AssignmentsActions';
|
|
8
7
|
import * as CorrelationsActions from './actions/CorrelationsActions';
|
|
9
8
|
import * as DatabaseActions from './actions/DatabaseActions';
|
|
10
|
-
import
|
|
9
|
+
import * as DimensionsActions from './actions/DimensionsActions';
|
|
11
10
|
import * as DomainActions from './actions/DomainActions';
|
|
12
11
|
import * as FiltersActions from './actions/FiltersActions';
|
|
13
12
|
import * as GlobalActions from './actions/GlobalActions';
|
|
14
|
-
import { handleHistoryUndo, handleHistoryRedo, handleHistoryReset, } from './actions/HistoryActions';
|
|
15
13
|
import * as IntegralsActions from './actions/IntegralsActions';
|
|
16
14
|
import * as LoadActions from './actions/LoadActions';
|
|
17
15
|
import * as MoleculeActions from './actions/MoleculeActions';
|
|
18
16
|
import * as PeaksActions from './actions/PeaksActions';
|
|
19
|
-
import
|
|
17
|
+
import * as PreferencesActions from './actions/PreferencesActions';
|
|
20
18
|
import * as RangesActions from './actions/RangesActions';
|
|
21
19
|
import * as SpectraAnalysisActions from './actions/SpectraAnalysisAction';
|
|
22
20
|
import * as SpectrumsActions from './actions/SpectrumsActions';
|
|
23
21
|
import * as ToolsActions from './actions/ToolsActions';
|
|
24
22
|
import * as ZonesActions from './actions/ZonesActions';
|
|
25
23
|
import { DISPLAYER_MODE } from './core/Constants';
|
|
26
|
-
import { UNDO, REDO, RESET } from './types/HistoryTypes';
|
|
27
|
-
import * as types from './types/Types';
|
|
28
24
|
export const rangeStateInit = {
|
|
29
25
|
showMultiplicityTrees: false,
|
|
30
26
|
showRangesIntegrals: true,
|
|
@@ -54,7 +50,7 @@ export function getDefaultViewState() {
|
|
|
54
50
|
};
|
|
55
51
|
}
|
|
56
52
|
export const getInitialState = () => ({
|
|
57
|
-
actionType: '',
|
|
53
|
+
actionType: 'INITIALIZE_NMRIUM',
|
|
58
54
|
data: [],
|
|
59
55
|
tempData: null,
|
|
60
56
|
xDomain: [],
|
|
@@ -97,7 +93,7 @@ export const getInitialState = () => ({
|
|
|
97
93
|
},
|
|
98
94
|
overDisplayer: false,
|
|
99
95
|
toolOptions: {
|
|
100
|
-
selectedTool:
|
|
96
|
+
selectedTool: 'zoom',
|
|
101
97
|
selectedOptionPanel: null,
|
|
102
98
|
data: {
|
|
103
99
|
baselineCorrection: {
|
|
@@ -127,19 +123,17 @@ export function initState(state) {
|
|
|
127
123
|
};
|
|
128
124
|
}
|
|
129
125
|
export function dispatchMiddleware(dispatch) {
|
|
130
|
-
let usedColors = { '1d': [], '2d': [] };
|
|
131
126
|
return (action) => {
|
|
132
127
|
switch (action.type) {
|
|
133
|
-
case
|
|
134
|
-
case
|
|
135
|
-
action.payload.usedColors = usedColors;
|
|
128
|
+
case 'INITIATE':
|
|
129
|
+
case 'LOAD_DROP_FILES': {
|
|
136
130
|
dispatch(action);
|
|
137
131
|
break;
|
|
138
132
|
}
|
|
139
|
-
case
|
|
140
|
-
const {
|
|
141
|
-
void predictSpectra(molfile).then((
|
|
142
|
-
action.payload = {
|
|
133
|
+
case 'PREDICT_SPECTRA': {
|
|
134
|
+
const { molfile, options } = action.payload;
|
|
135
|
+
void predictSpectra(molfile).then((predictedSpectra) => {
|
|
136
|
+
action.payload = { predictedSpectra, options, molfile };
|
|
143
137
|
dispatch(action);
|
|
144
138
|
}, () => {
|
|
145
139
|
dispatch(action);
|
|
@@ -147,269 +141,253 @@ export function dispatchMiddleware(dispatch) {
|
|
|
147
141
|
break;
|
|
148
142
|
}
|
|
149
143
|
default:
|
|
150
|
-
action.usedColors = usedColors;
|
|
151
144
|
dispatch(action);
|
|
152
145
|
break;
|
|
153
146
|
}
|
|
154
147
|
};
|
|
155
148
|
}
|
|
156
149
|
function innerSpectrumReducer(draft, action) {
|
|
157
|
-
if (![
|
|
150
|
+
if (!['LOAD_DROP_FILES', 'INITIATE'].includes(action.type)) {
|
|
158
151
|
draft.actionType = action.type;
|
|
159
152
|
}
|
|
160
153
|
switch (action.type) {
|
|
161
|
-
case
|
|
162
|
-
return LoadActions.
|
|
163
|
-
case
|
|
164
|
-
return LoadActions.
|
|
165
|
-
case
|
|
166
|
-
return LoadActions.
|
|
167
|
-
case
|
|
168
|
-
return PeaksActions.
|
|
169
|
-
case
|
|
170
|
-
return PeaksActions.
|
|
171
|
-
case
|
|
172
|
-
return PeaksActions.
|
|
173
|
-
case
|
|
154
|
+
case 'INITIATE':
|
|
155
|
+
return LoadActions.handleInitiate(draft, action);
|
|
156
|
+
case 'LOAD_DROP_FILES':
|
|
157
|
+
return LoadActions.handleLoadDropFiles(draft, action);
|
|
158
|
+
case 'SET_LOADING_FLAG':
|
|
159
|
+
return LoadActions.handleSetIsLoading(draft, action);
|
|
160
|
+
case 'ADD_PEAK':
|
|
161
|
+
return PeaksActions.handleAddPeak(draft, action);
|
|
162
|
+
case 'ADD_PEAKS':
|
|
163
|
+
return PeaksActions.handleAddPeaks(draft, action);
|
|
164
|
+
case 'DELETE_PEAK':
|
|
165
|
+
return PeaksActions.handleDeletePeak(draft, action);
|
|
166
|
+
case 'AUTO_PEAK_PICKING':
|
|
174
167
|
return PeaksActions.handleAutoPeakPicking(draft, action);
|
|
175
|
-
case
|
|
168
|
+
case 'OPTIMIZE_PEAKS':
|
|
176
169
|
return PeaksActions.handleOptimizePeaks(draft, action);
|
|
177
|
-
case
|
|
178
|
-
return PeaksActions.
|
|
179
|
-
case
|
|
170
|
+
case 'CHANGE_PEAK_SHAPE':
|
|
171
|
+
return PeaksActions.handleChangePeakShape(draft, action);
|
|
172
|
+
case 'TOGGLE_PEAKS_VIEW_PROPERTY':
|
|
180
173
|
return PeaksActions.handleTogglePeaksViewProperty(draft, action);
|
|
181
|
-
case
|
|
182
|
-
return IntegralsActions.
|
|
183
|
-
case
|
|
184
|
-
return IntegralsActions.
|
|
185
|
-
case
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
case types.CHANGE_INTEGRAL_RELATIVE:
|
|
174
|
+
case 'ADD_INTEGRAL':
|
|
175
|
+
return IntegralsActions.handleAddIntegral(draft, action);
|
|
176
|
+
case 'DELETE_INTEGRAL':
|
|
177
|
+
return IntegralsActions.handleDeleteIntegral(draft, action);
|
|
178
|
+
case 'RESIZE_INTEGRAL':
|
|
179
|
+
case 'CHANGE_INTEGRAL':
|
|
180
|
+
return IntegralsActions.handleChangeIntegral(draft, action);
|
|
181
|
+
case 'CHANGE_INTEGRAL_SUM':
|
|
182
|
+
return IntegralsActions.handleChangeIntegralSum(draft, action);
|
|
183
|
+
case 'CHANGE_INTEGRALS_SUM_FLAG':
|
|
184
|
+
return IntegralsActions.handleChangeIntegralsSumFlag(draft);
|
|
185
|
+
case 'CHANGE_INTEGRAL_RELATIVE':
|
|
194
186
|
return IntegralsActions.handleChangeIntegralsRelativeValue(draft, action);
|
|
195
|
-
case
|
|
196
|
-
return DomainActions.
|
|
197
|
-
case
|
|
198
|
-
return DomainActions.
|
|
199
|
-
case
|
|
200
|
-
return
|
|
201
|
-
case
|
|
202
|
-
return
|
|
203
|
-
case
|
|
204
|
-
return
|
|
205
|
-
case
|
|
206
|
-
return
|
|
207
|
-
case
|
|
208
|
-
return
|
|
209
|
-
case
|
|
210
|
-
return
|
|
211
|
-
case
|
|
212
|
-
return FiltersActions.
|
|
213
|
-
case
|
|
214
|
-
return FiltersActions.
|
|
215
|
-
case
|
|
216
|
-
return FiltersActions.
|
|
217
|
-
case
|
|
218
|
-
return FiltersActions.
|
|
219
|
-
case
|
|
220
|
-
return FiltersActions.
|
|
221
|
-
case
|
|
222
|
-
return FiltersActions.
|
|
223
|
-
case
|
|
224
|
-
return FiltersActions.
|
|
225
|
-
case
|
|
226
|
-
return FiltersActions.
|
|
227
|
-
case
|
|
228
|
-
return FiltersActions.
|
|
229
|
-
case
|
|
230
|
-
return FiltersActions.
|
|
231
|
-
case
|
|
232
|
-
return FiltersActions.
|
|
233
|
-
case
|
|
234
|
-
return FiltersActions.deleteFilter(draft, action);
|
|
235
|
-
case types.DELETE_SPECTRA_FILTER:
|
|
236
|
-
return FiltersActions.deleteSpectraFilter(draft, action);
|
|
237
|
-
case types.SET_FILTER_SNAPSHOT:
|
|
238
|
-
return FiltersActions.filterSnapshotHandler(draft, action);
|
|
239
|
-
case types.APPLY_MULTIPLE_SPECTRA_FILTER:
|
|
240
|
-
return FiltersActions.handleMultipleSpectraFilter(draft, action);
|
|
241
|
-
case types.APPLY_SIGNAL_PROCESSING_FILTER:
|
|
187
|
+
case 'SET_X_DOMAIN':
|
|
188
|
+
return DomainActions.handleSetXDomain(draft, action);
|
|
189
|
+
case 'SET_Y_DOMAIN':
|
|
190
|
+
return DomainActions.handleSetYDomain(draft, action);
|
|
191
|
+
case 'SET_DIMENSIONS':
|
|
192
|
+
return DimensionsActions.handleSetDimensions(draft, action);
|
|
193
|
+
case 'SHIFT_SPECTRUM':
|
|
194
|
+
return FiltersActions.handleShiftSpectrumAlongXAxis(draft, action);
|
|
195
|
+
case 'APPLY_APODIZATION_FILTER':
|
|
196
|
+
return FiltersActions.handleApplyApodizationFilter(draft, action);
|
|
197
|
+
case 'CALCULATE_APODIZATION_FILTER':
|
|
198
|
+
return FiltersActions.handleCalculateApodizationFilter(draft, action);
|
|
199
|
+
case 'APPLY_ZERO_FILLING_FILTER':
|
|
200
|
+
return FiltersActions.handleApplyZeroFillingFilter(draft, action);
|
|
201
|
+
case 'CALCULATE_ZERO_FILLING_FILTER':
|
|
202
|
+
return FiltersActions.handleCalculateZeroFillingFilter(draft, action);
|
|
203
|
+
case 'APPLY_FFT_FILTER':
|
|
204
|
+
return FiltersActions.handleApplyFFTFilter(draft);
|
|
205
|
+
case 'APPLY_MANUAL_PHASE_CORRECTION_FILTER':
|
|
206
|
+
return FiltersActions.handleApplyManualPhaseCorrectionFilter(draft, action);
|
|
207
|
+
case 'CALCULATE_MANUAL_PHASE_CORRECTION_FILTER':
|
|
208
|
+
return FiltersActions.handleCalculateManualPhaseCorrection(draft, action);
|
|
209
|
+
case 'APPLY_AUTO_PHASE_CORRECTION_FILTER':
|
|
210
|
+
return FiltersActions.handleApplyAutoPhaseCorrectionFilter(draft);
|
|
211
|
+
case 'APPLY_ABSOLUTE_FILTER':
|
|
212
|
+
return FiltersActions.handleApplyAbsoluteFilter(draft);
|
|
213
|
+
case 'APPLY_BASE_LINE_CORRECTION_FILTER':
|
|
214
|
+
return FiltersActions.handleBaseLineCorrectionFilter(draft, action);
|
|
215
|
+
case 'CALCULATE_BASE_LINE_CORRECTION_FILTER':
|
|
216
|
+
return FiltersActions.handleCalculateBaseLineCorrection(draft, action);
|
|
217
|
+
case 'ENABLE_FILTER':
|
|
218
|
+
return FiltersActions.handleEnableFilter(draft, action);
|
|
219
|
+
case 'DELETE_FILTER':
|
|
220
|
+
return FiltersActions.handleDeleteFilter(draft, action);
|
|
221
|
+
case 'DELETE_SPECTRA_FILTER':
|
|
222
|
+
return FiltersActions.handleDeleteSpectraFilter(draft, action);
|
|
223
|
+
case 'SET_FILTER_SNAPSHOT':
|
|
224
|
+
return FiltersActions.handleSetFilterSnapshotHandler(draft, action);
|
|
225
|
+
case 'APPLY_SIGNAL_PROCESSING_FILTER':
|
|
242
226
|
return FiltersActions.handleSignalProcessingFilter(draft, action);
|
|
243
|
-
case
|
|
227
|
+
case 'ADD_EXCLUSION_ZONE':
|
|
244
228
|
return FiltersActions.handleAddExclusionZone(draft, action);
|
|
245
|
-
case
|
|
229
|
+
case 'DELETE_EXCLUSION_ZONE':
|
|
246
230
|
return FiltersActions.handleDeleteExclusionZone(draft, action);
|
|
247
|
-
case
|
|
248
|
-
return
|
|
249
|
-
case
|
|
250
|
-
return
|
|
251
|
-
case
|
|
252
|
-
return SpectrumsActions.handleSpectrumVisibility(draft, action);
|
|
253
|
-
case types.CHANGE_ACTIVE_SPECTRUM:
|
|
231
|
+
case 'CHANGE_SPECTRUM_VISIBILITY':
|
|
232
|
+
return SpectrumsActions.handleChangeSpectrumVisibilityById(draft, action);
|
|
233
|
+
case 'CHANGE_SPECTRA_VISIBILITY_BY_NUCLEUS':
|
|
234
|
+
return SpectrumsActions.handleChangeSpectraVisibilityByNucleus(draft, action);
|
|
235
|
+
case 'CHANGE_ACTIVE_SPECTRUM':
|
|
254
236
|
return SpectrumsActions.handleChangeActiveSpectrum(draft, action);
|
|
255
|
-
case
|
|
256
|
-
return SpectrumsActions.
|
|
257
|
-
case
|
|
258
|
-
return SpectrumsActions.
|
|
259
|
-
case
|
|
260
|
-
return SpectrumsActions.alignSpectraHandler(draft, action);
|
|
261
|
-
case types.DELETE_SPECTRA:
|
|
237
|
+
case 'CHANGE_SPECTRUM_SETTING':
|
|
238
|
+
return SpectrumsActions.handleChangeSpectrumSetting(draft, action);
|
|
239
|
+
case 'ALIGN_SPECTRA':
|
|
240
|
+
return SpectrumsActions.handleAlignSpectraHandler(draft, action);
|
|
241
|
+
case 'DELETE_SPECTRA':
|
|
262
242
|
return SpectrumsActions.handleDeleteSpectra(draft, action);
|
|
263
|
-
case
|
|
264
|
-
return SpectrumsActions.
|
|
265
|
-
case
|
|
266
|
-
return SpectrumsActions.
|
|
267
|
-
case
|
|
268
|
-
return SpectrumsActions.
|
|
269
|
-
case
|
|
243
|
+
case 'ADD_MISSING_PROJECTION':
|
|
244
|
+
return SpectrumsActions.handleAddMissingProjectionHandler(draft, action);
|
|
245
|
+
case 'GENERATE_SPECTRUM_FROM_PUBLICATION_STRING':
|
|
246
|
+
return SpectrumsActions.handleGenerateSpectrumFromPublicationStringHandler(draft, action);
|
|
247
|
+
case 'IMPORT_SPECTRA_META_INFO':
|
|
248
|
+
return SpectrumsActions.handleImportSpectraMetaInfo(draft, action);
|
|
249
|
+
case 'TOGGLE_SPECTRA_LEGEND':
|
|
270
250
|
return SpectrumsActions.handleToggleSpectraLegend(draft);
|
|
271
|
-
case
|
|
251
|
+
case 'RECOLOR_SPECTRA_COLOR':
|
|
272
252
|
return SpectrumsActions.handleRecolorSpectraBasedOnDistinctValue(draft, action);
|
|
273
|
-
case
|
|
253
|
+
case 'ORDER_SPECTRA':
|
|
274
254
|
return SpectrumsActions.handleOrderSpectra(draft, action);
|
|
275
|
-
case
|
|
255
|
+
case 'SET_SELECTED_TOOL':
|
|
256
|
+
return ToolsActions.setSelectedTool(draft, action);
|
|
257
|
+
case 'RESET_SELECTED_TOOL':
|
|
258
|
+
return ToolsActions.handleResetSelectedTool(draft);
|
|
259
|
+
case 'FULL_ZOOM_OUT':
|
|
260
|
+
return ToolsActions.zoomOut(draft, action);
|
|
261
|
+
case 'TOGGLE_REAL_IMAGINARY_VISIBILITY':
|
|
276
262
|
return ToolsActions.handleToggleRealImaginaryVisibility(draft);
|
|
277
|
-
case
|
|
263
|
+
case 'SET_ZOOM':
|
|
278
264
|
return ToolsActions.handleZoom(draft, action);
|
|
279
|
-
case
|
|
265
|
+
case 'SET_SPECTRA_SAME_TOP':
|
|
280
266
|
return ToolsActions.setSpectraSameTopHandler(draft);
|
|
281
|
-
case
|
|
267
|
+
case 'RESET_SPECTRA_SCALE':
|
|
282
268
|
return ToolsActions.resetSpectraScale(draft);
|
|
283
|
-
case
|
|
269
|
+
case 'CHANGE_SPECTRUM_DISPLAY_VIEW_MODE':
|
|
284
270
|
return ToolsActions.handleChangeSpectrumDisplayMode(draft);
|
|
285
|
-
case
|
|
286
|
-
return MoleculeActions.addMoleculeHandler(draft, action.molfile);
|
|
287
|
-
case types.SET_MOLECULE:
|
|
288
|
-
return MoleculeActions.setMoleculeHandler(draft, action);
|
|
289
|
-
case types.CHANGE_MOLECULE_LABEL:
|
|
290
|
-
return MoleculeActions.changeMoleculeLabel(draft, action);
|
|
291
|
-
case types.DELETE_MOLECULE:
|
|
292
|
-
return MoleculeActions.deleteMoleculeHandler(draft, action);
|
|
293
|
-
case types.PREDICT_SPECTRA:
|
|
294
|
-
return MoleculeActions.predictSpectraFromMoleculeHandler(draft, action);
|
|
295
|
-
case types.FLOAT_MOLECULE_OVER_SPECTRUM:
|
|
296
|
-
return MoleculeActions.floatMoleculeOverSpectrum(draft, action);
|
|
297
|
-
case types.TOGGLE_MOLECULE_ATOM_NUMBER:
|
|
298
|
-
return MoleculeActions.toggleMoleculeAtomsNumbers(draft, action);
|
|
299
|
-
case types.CHANGE_FLOAT_MOLECULE_POSITION:
|
|
300
|
-
return MoleculeActions.changeFloatMoleculePosition(draft, action);
|
|
301
|
-
case types.SET_CORRELATIONS_MF:
|
|
302
|
-
return CorrelationsActions.handleSetMF(draft, action.payload);
|
|
303
|
-
case types.SET_CORRELATIONS_TOLERANCE:
|
|
304
|
-
return CorrelationsActions.handleSetTolerance(draft, action.payload);
|
|
305
|
-
case types.SET_CORRELATION:
|
|
306
|
-
return CorrelationsActions.handleSetCorrelation(draft, action.payload);
|
|
307
|
-
case types.SET_CORRELATIONS:
|
|
308
|
-
return CorrelationsActions.handleSetCorrelations(draft, action.payload);
|
|
309
|
-
case types.DELETE_CORRELATION:
|
|
310
|
-
return CorrelationsActions.handleDeleteCorrelation(draft, action.payload);
|
|
311
|
-
case types.BRUSH_END:
|
|
271
|
+
case 'BRUSH_END':
|
|
312
272
|
return ToolsActions.handleBrushEnd(draft, action);
|
|
313
|
-
case
|
|
314
|
-
return ToolsActions.setVerticalIndicatorXPosition(draft, action
|
|
315
|
-
case
|
|
273
|
+
case 'SET_VERTICAL_INDICATOR_X_POSITION':
|
|
274
|
+
return ToolsActions.setVerticalIndicatorXPosition(draft, action);
|
|
275
|
+
case 'SET_SPECTRUMS_VERTICAL_ALIGN':
|
|
316
276
|
return ToolsActions.setSpectrumsVerticalAlign(draft);
|
|
317
|
-
case
|
|
318
|
-
return
|
|
319
|
-
case
|
|
320
|
-
return
|
|
321
|
-
case
|
|
277
|
+
case 'SET_ACTIVE_TAB':
|
|
278
|
+
return ToolsActions.handelSetActiveTab(draft, action);
|
|
279
|
+
case 'ADD_BASE_LINE_ZONE':
|
|
280
|
+
return ToolsActions.handleAddBaseLineZone(draft, action);
|
|
281
|
+
case 'DELETE_BASE_LINE_ZONE':
|
|
282
|
+
return ToolsActions.handleDeleteBaseLineZone(draft, action);
|
|
283
|
+
case 'SET_2D_LEVEL':
|
|
284
|
+
return ToolsActions.levelChangeHandler(draft, action);
|
|
285
|
+
case 'ADD_MOLECULE':
|
|
286
|
+
return MoleculeActions.handleAddMolecule(draft, action);
|
|
287
|
+
case 'SET_MOLECULE':
|
|
288
|
+
return MoleculeActions.handleSetMolecule(draft, action);
|
|
289
|
+
case 'CHANGE_MOLECULE_LABEL':
|
|
290
|
+
return MoleculeActions.handleChangeMoleculeLabel(draft, action);
|
|
291
|
+
case 'DELETE_MOLECULE':
|
|
292
|
+
return MoleculeActions.handleDeleteMolecule(draft, action);
|
|
293
|
+
case 'PREDICT_SPECTRA':
|
|
294
|
+
return MoleculeActions.handlePredictSpectraFromMolecule(draft, action);
|
|
295
|
+
case 'FLOAT_MOLECULE_OVER_SPECTRUM':
|
|
296
|
+
return MoleculeActions.handleFloatMoleculeOverSpectrum(draft, action);
|
|
297
|
+
case 'TOGGLE_MOLECULE_ATOM_NUMBER':
|
|
298
|
+
return MoleculeActions.handleToggleMoleculeAtomsNumbers(draft, action);
|
|
299
|
+
case 'CHANGE_FLOAT_MOLECULE_POSITION':
|
|
300
|
+
return MoleculeActions.handleChangeFloatMoleculePosition(draft, action);
|
|
301
|
+
case 'SET_CORRELATIONS_MF':
|
|
302
|
+
return CorrelationsActions.handleSetMF(draft, action);
|
|
303
|
+
case 'SET_CORRELATIONS_TOLERANCE':
|
|
304
|
+
return CorrelationsActions.handleSetTolerance(draft, action);
|
|
305
|
+
case 'SET_CORRELATION':
|
|
306
|
+
return CorrelationsActions.handleSetCorrelation(draft, action);
|
|
307
|
+
case 'SET_CORRELATIONS':
|
|
308
|
+
return CorrelationsActions.handleSetCorrelations(draft, action);
|
|
309
|
+
case 'DELETE_CORRELATION':
|
|
310
|
+
return CorrelationsActions.handleDeleteCorrelation(draft, action);
|
|
311
|
+
case 'AUTO_RANGES_DETECTION':
|
|
322
312
|
return RangesActions.handleAutoRangesDetection(draft, action);
|
|
323
|
-
case
|
|
313
|
+
case 'ADD_RANGE':
|
|
324
314
|
return RangesActions.handleAddRange(draft, action);
|
|
325
|
-
case
|
|
315
|
+
case 'DELETE_RANGE':
|
|
326
316
|
return RangesActions.handleDeleteRange(draft, action);
|
|
327
|
-
case
|
|
317
|
+
case 'DELETE_1D_SIGNAL':
|
|
328
318
|
return RangesActions.handleDeleteSignal(draft, action);
|
|
329
|
-
case
|
|
319
|
+
case 'RESIZE_RANGE':
|
|
330
320
|
return RangesActions.handleResizeRange(draft, action);
|
|
331
|
-
case
|
|
332
|
-
return RangesActions.handleChangeRangeSum(draft, action
|
|
333
|
-
case
|
|
334
|
-
return RangesActions.handleChangeRangesSumFlag(draft
|
|
335
|
-
case
|
|
321
|
+
case 'CHANGE_RANGE_SUM':
|
|
322
|
+
return RangesActions.handleChangeRangeSum(draft, action);
|
|
323
|
+
case 'CHANGE_RANGES_SUM_FLAG':
|
|
324
|
+
return RangesActions.handleChangeRangesSumFlag(draft);
|
|
325
|
+
case 'CHANGE_RANGE_RELATIVE':
|
|
336
326
|
return RangesActions.handleChangeRangeRelativeValue(draft, action);
|
|
337
|
-
case
|
|
327
|
+
case 'CHANGE_RANGE_SIGNAL_VALUE':
|
|
338
328
|
return RangesActions.handleChangeRangeSignalValue(draft, action);
|
|
339
|
-
case
|
|
329
|
+
case 'CHANGE_RANGE_SIGNAL_KIND':
|
|
340
330
|
return RangesActions.handleChangeRangeSignalKind(draft, action);
|
|
341
|
-
case
|
|
331
|
+
case 'SAVE_EDITED_RANGE':
|
|
342
332
|
return RangesActions.handleSaveEditedRange(draft, action);
|
|
343
|
-
case
|
|
333
|
+
case 'UNLINK_RANGE':
|
|
344
334
|
return RangesActions.handleUnlinkRange(draft, action);
|
|
345
|
-
case
|
|
335
|
+
case 'SET_DIAID_RANGE':
|
|
346
336
|
return RangesActions.handleSetDiaIDRange(draft, action);
|
|
347
|
-
case
|
|
337
|
+
case 'UPDATE_RANGE':
|
|
348
338
|
return RangesActions.handleUpdateRange(draft, action);
|
|
349
|
-
case
|
|
339
|
+
case 'SHOW_MULTIPLICITY_TREES':
|
|
350
340
|
return RangesActions.handleShowMultiplicityTrees(draft, action);
|
|
351
|
-
case
|
|
341
|
+
case 'SHOW_RANGES_INTEGRALS':
|
|
352
342
|
return RangesActions.handleShowRangesIntegrals(draft, action);
|
|
353
|
-
case
|
|
343
|
+
case 'AUTO_RANGES_SPECTRA_PICKING':
|
|
354
344
|
return RangesActions.handleAutoSpectraRangesDetection(draft);
|
|
355
|
-
case
|
|
345
|
+
case 'SHOW_J_GRAPH':
|
|
356
346
|
return RangesActions.handleShowJGraph(draft, action);
|
|
357
|
-
case
|
|
358
|
-
return
|
|
359
|
-
case
|
|
360
|
-
return
|
|
361
|
-
case
|
|
362
|
-
return
|
|
363
|
-
case
|
|
364
|
-
return
|
|
365
|
-
case
|
|
366
|
-
return
|
|
367
|
-
case
|
|
368
|
-
return ToolsActions.levelChangeHandler(draft, action);
|
|
369
|
-
case types.ADD_2D_ZONE:
|
|
370
|
-
return ZonesActions.add2dZoneHandler(draft, action);
|
|
371
|
-
case types.DELETE_2D_ZONE:
|
|
347
|
+
case 'SET_KEY_PREFERENCES':
|
|
348
|
+
return PreferencesActions.handleSetKeyPreferences(draft, action);
|
|
349
|
+
case 'APPLY_KEY_PREFERENCES':
|
|
350
|
+
return PreferencesActions.handleApplyKeyPreferences(draft, action);
|
|
351
|
+
case 'AUTO_ZONES_DETECTION':
|
|
352
|
+
return ZonesActions.handleAutoZonesDetection(draft, action);
|
|
353
|
+
case 'CHANGE_ZONES_NOISE_FACTOR':
|
|
354
|
+
return ZonesActions.handleChangeZonesFactor(draft, action);
|
|
355
|
+
case 'ADD_2D_ZONE':
|
|
356
|
+
return ZonesActions.handleAdd2dZone(draft, action);
|
|
357
|
+
case 'DELETE_2D_ZONE':
|
|
372
358
|
return ZonesActions.handleDeleteZone(draft, action);
|
|
373
|
-
case
|
|
359
|
+
case 'DELETE_2D_SIGNAL':
|
|
374
360
|
return ZonesActions.handleDeleteSignal(draft, action);
|
|
375
|
-
case
|
|
361
|
+
case 'SET_2D_SIGNAL_PATH_LENGTH':
|
|
376
362
|
return ZonesActions.handleSetSignalPathLength(draft, action);
|
|
377
|
-
case
|
|
378
|
-
return
|
|
379
|
-
case
|
|
380
|
-
return ZonesActions.changeZoneSignalDelta(draft, action);
|
|
381
|
-
case types.CHANGE_ZONE_SIGNAL_KIND:
|
|
363
|
+
case 'CHANGE_ZONE_SIGNAL_VALUE':
|
|
364
|
+
return ZonesActions.handleChangeZoneSignalDelta(draft, action);
|
|
365
|
+
case 'CHANGE_ZONE_SIGNAL_KIND':
|
|
382
366
|
return ZonesActions.handleChangeZoneSignalKind(draft, action);
|
|
383
|
-
case
|
|
367
|
+
case 'UNLINK_ZONE':
|
|
384
368
|
return ZonesActions.handleUnlinkZone(draft, action);
|
|
385
|
-
case
|
|
369
|
+
case 'SET_ZONE_DIAID':
|
|
386
370
|
return ZonesActions.handleSetDiaIDZone(draft, action);
|
|
387
|
-
case
|
|
371
|
+
case 'AUTO_ZONES_SPECTRA_PICKING':
|
|
388
372
|
return ZonesActions.handleAutoSpectraZonesDetection(draft);
|
|
389
|
-
case
|
|
373
|
+
case 'SHOW_ZONES':
|
|
390
374
|
return ZonesActions.handleShowZones(draft, action);
|
|
391
|
-
case
|
|
375
|
+
case 'SHOW_ZONES_SIGNALS':
|
|
392
376
|
return ZonesActions.handleShowSignals(draft, action);
|
|
393
|
-
case
|
|
377
|
+
case 'SHOW_ZONES_PEAKS':
|
|
394
378
|
return ZonesActions.handleShowPeaks(draft, action);
|
|
395
|
-
case
|
|
379
|
+
case 'SAVE_EDITED_ZONE':
|
|
396
380
|
return ZonesActions.handleSaveEditedZone(draft, action);
|
|
397
|
-
case
|
|
381
|
+
case 'ORDER_MULTIPLE_SPECTRA_ANALYSIS':
|
|
398
382
|
return SpectraAnalysisActions.handleOrderSpectra(draft, action);
|
|
399
|
-
case
|
|
383
|
+
case 'RESURRECTING_SPECTRUM_FROM_RANGES':
|
|
400
384
|
return DatabaseActions.handleResurrectSpectrumFromRanges(draft, action);
|
|
401
|
-
case
|
|
385
|
+
case 'RESURRECTING_SPECTRUM_FROM_JCAMP':
|
|
402
386
|
return DatabaseActions.handleResurrectSpectrumFromJcamp(draft, action);
|
|
403
|
-
case
|
|
404
|
-
return AssignmentsActions.
|
|
405
|
-
case
|
|
406
|
-
return
|
|
407
|
-
case REDO:
|
|
408
|
-
return handleHistoryRedo(draft);
|
|
409
|
-
case RESET:
|
|
410
|
-
return handleHistoryReset(draft, action);
|
|
411
|
-
case types.SET_MOUSE_OVER_DISPLAYER:
|
|
412
|
-
return GlobalActions.setIsOverDisplayer(draft, action);
|
|
387
|
+
case 'SET_AUTOMATIC_ASSIGNMENTS':
|
|
388
|
+
return AssignmentsActions.handleSetAutomaticAssignments(draft, action);
|
|
389
|
+
case 'SET_MOUSE_OVER_DISPLAYER':
|
|
390
|
+
return GlobalActions.handleSetIsOverDisplayer(draft, action);
|
|
413
391
|
default:
|
|
414
392
|
}
|
|
415
393
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Draft } from 'immer';
|
|
2
2
|
import { SpectraData1D, SpectraData2D } from 'nmr-processing';
|
|
3
3
|
import { State } from '../Reducer';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
import { ActionType } from '../types/ActionType';
|
|
5
|
+
type SetAutomaticAssignmentsAction = ActionType<'SET_AUTOMATIC_ASSIGNMENTS', {
|
|
6
|
+
assignments: (SpectraData1D | SpectraData2D)[];
|
|
7
|
+
}>;
|
|
8
|
+
export type AssignmentsActions = SetAutomaticAssignmentsAction;
|
|
9
|
+
declare function handleSetAutomaticAssignments(draft: Draft<State>, action: SetAutomaticAssignmentsAction): void;
|
|
10
|
+
export { handleSetAutomaticAssignments };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function handleSetAutomaticAssignments(draft, action) {
|
|
2
2
|
const assignments = action.payload.assignments;
|
|
3
3
|
for (let datum of assignments) {
|
|
4
4
|
const index = draft.data.findIndex((spectrum) => spectrum.id === datum.id);
|
|
@@ -13,4 +13,4 @@ function setAutomaticAssignmentsHandler(draft, action) {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
export {
|
|
16
|
+
export { handleSetAutomaticAssignments };
|
|
@@ -1,24 +1,32 @@
|
|
|
1
1
|
import { Draft } from 'immer';
|
|
2
2
|
import { Tolerance, Options as CorrelationOptions, Correlation, Values as CorrelationValues } from 'nmr-correlation';
|
|
3
|
+
import { AssignmentContext } from '../../assignment/AssignmentsContext';
|
|
3
4
|
import { State } from '../Reducer';
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
import { ActionType } from '../types/ActionType';
|
|
6
|
+
type SetMFAction = ActionType<'SET_CORRELATIONS_MF', {
|
|
6
7
|
mf: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
8
|
+
}>;
|
|
9
|
+
type SetToleranceAction = ActionType<'SET_CORRELATIONS_TOLERANCE', {
|
|
9
10
|
tolerance: Tolerance;
|
|
10
|
-
}
|
|
11
|
-
|
|
11
|
+
}>;
|
|
12
|
+
type SetCorrelationAction = ActionType<'SET_CORRELATION', {
|
|
12
13
|
id: string;
|
|
13
14
|
correlation: Correlation;
|
|
14
|
-
options
|
|
15
|
-
}
|
|
16
|
-
|
|
15
|
+
options?: CorrelationOptions;
|
|
16
|
+
}>;
|
|
17
|
+
type SetCorrelationsAction = ActionType<'SET_CORRELATIONS', {
|
|
17
18
|
correlations: CorrelationValues;
|
|
18
19
|
options: CorrelationOptions;
|
|
19
|
-
}
|
|
20
|
-
|
|
20
|
+
}>;
|
|
21
|
+
type DeleteCorrelationAction = ActionType<'DELETE_CORRELATION', {
|
|
21
22
|
correlation: Correlation;
|
|
22
|
-
assignmentData:
|
|
23
|
-
}
|
|
23
|
+
assignmentData: AssignmentContext;
|
|
24
|
+
}>;
|
|
25
|
+
export type CorrelationsActions = SetMFAction | SetToleranceAction | SetCorrelationAction | SetCorrelationsAction | DeleteCorrelationAction;
|
|
26
|
+
declare function handleUpdateCorrelations(draft: Draft<State>): void;
|
|
27
|
+
declare function handleSetMF(draft: Draft<State>, action: SetMFAction): void;
|
|
28
|
+
declare function handleSetTolerance(draft: Draft<State>, action: SetToleranceAction): void;
|
|
29
|
+
declare function handleSetCorrelation(draft: Draft<State>, action: SetCorrelationAction): void;
|
|
30
|
+
declare function handleSetCorrelations(draft: Draft<State>, action: SetCorrelationsAction): void;
|
|
31
|
+
declare function handleDeleteCorrelation(draft: Draft<State>, action: DeleteCorrelationAction): void;
|
|
24
32
|
export { handleDeleteCorrelation, handleSetCorrelation, handleSetCorrelations, handleSetMF, handleSetTolerance, handleUpdateCorrelations, };
|