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
|
@@ -2,8 +2,8 @@ import { original } from 'immer';
|
|
|
2
2
|
import lodashCloneDeep from 'lodash/cloneDeep';
|
|
3
3
|
import { buildCorrelationData, setCorrelation, } from 'nmr-correlation';
|
|
4
4
|
import { findRange, findSignal1D, findSignal2D, findSpectrum, findZone, } from '../../../data/utilities/FindUtilities';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { deleteSignal1D } from './RangesActions';
|
|
6
|
+
import { deleteSignal2D } from './ZonesActions';
|
|
7
7
|
function handleUpdateCorrelations(draft) {
|
|
8
8
|
const { data: spectra, correlations } = draft;
|
|
9
9
|
draft.correlations = buildCorrelationData(spectra, {
|
|
@@ -11,10 +11,11 @@ function handleUpdateCorrelations(draft) {
|
|
|
11
11
|
values: lodashCloneDeep(correlations.values),
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
//action
|
|
15
|
+
function handleSetMF(draft, action) {
|
|
15
16
|
const state = original(draft);
|
|
16
17
|
const { data: spectra, correlations } = state;
|
|
17
|
-
const { mf } = payload;
|
|
18
|
+
const { mf } = action.payload;
|
|
18
19
|
// update of correlation data is needed only if the following is true
|
|
19
20
|
if (correlations.options.mf === '' || correlations.options.mf !== mf) {
|
|
20
21
|
draft.correlations = buildCorrelationData(spectra, {
|
|
@@ -24,20 +25,22 @@ function handleSetMF(draft, payload) {
|
|
|
24
25
|
});
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
+
//action
|
|
29
|
+
function handleSetTolerance(draft, action) {
|
|
28
30
|
const state = original(draft);
|
|
29
31
|
const { data: spectra, correlations } = state;
|
|
30
|
-
const { tolerance } = payload;
|
|
32
|
+
const { tolerance } = action.payload;
|
|
31
33
|
draft.correlations = buildCorrelationData(spectra, {
|
|
32
34
|
...correlations.options,
|
|
33
35
|
tolerance,
|
|
34
36
|
values: lodashCloneDeep(correlations.values),
|
|
35
37
|
});
|
|
36
38
|
}
|
|
37
|
-
|
|
39
|
+
//action
|
|
40
|
+
function handleSetCorrelation(draft, action) {
|
|
38
41
|
const state = original(draft);
|
|
39
42
|
const { correlations } = state;
|
|
40
|
-
const { id, correlation, options } = payload;
|
|
43
|
+
const { id, correlation, options } = action.payload;
|
|
41
44
|
draft.correlations = setCorrelation(correlations, id, correlation);
|
|
42
45
|
if (options) {
|
|
43
46
|
draft.correlations = {
|
|
@@ -47,8 +50,9 @@ function handleSetCorrelation(draft, payload) {
|
|
|
47
50
|
}
|
|
48
51
|
handleUpdateCorrelations(draft);
|
|
49
52
|
}
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
//action
|
|
54
|
+
function handleSetCorrelations(draft, action) {
|
|
55
|
+
const { correlations, options } = action.payload;
|
|
52
56
|
const state = original(draft);
|
|
53
57
|
let correlationsData = lodashCloneDeep(state.correlations);
|
|
54
58
|
for (const correlation of correlations) {
|
|
@@ -63,8 +67,9 @@ function handleSetCorrelations(draft, payload) {
|
|
|
63
67
|
}
|
|
64
68
|
handleUpdateCorrelations(draft);
|
|
65
69
|
}
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
//action
|
|
71
|
+
function handleDeleteCorrelation(draft, action) {
|
|
72
|
+
const { correlation, assignmentData } = action.payload;
|
|
68
73
|
// delete all signals linked to the correlation
|
|
69
74
|
for (const link of correlation.links) {
|
|
70
75
|
const spectrum = findSpectrum(draft.data, link.experimentID, false);
|
|
@@ -72,26 +77,26 @@ function handleDeleteCorrelation(draft, payload) {
|
|
|
72
77
|
if (spectrum.info.dimension === 1) {
|
|
73
78
|
const range = findRange(spectrum, link.signal.id);
|
|
74
79
|
const signal = findSignal1D(spectrum, link.signal.id);
|
|
75
|
-
|
|
76
|
-
|
|
80
|
+
if (range && signal) {
|
|
81
|
+
deleteSignal1D(draft, {
|
|
77
82
|
spectrum,
|
|
78
83
|
range,
|
|
79
84
|
signal,
|
|
80
85
|
assignmentData,
|
|
81
|
-
}
|
|
82
|
-
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
83
88
|
}
|
|
84
89
|
else if (spectrum.info.dimension === 2) {
|
|
85
90
|
const zone = findZone(spectrum, link.signal.id);
|
|
86
91
|
const signal = findSignal2D(spectrum, link.signal.id);
|
|
87
|
-
|
|
88
|
-
|
|
92
|
+
if (zone && signal) {
|
|
93
|
+
deleteSignal2D(draft, {
|
|
89
94
|
spectrum,
|
|
90
95
|
zone,
|
|
91
96
|
signal,
|
|
92
97
|
assignmentData,
|
|
93
|
-
}
|
|
94
|
-
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
95
100
|
}
|
|
96
101
|
}
|
|
97
102
|
}
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { Draft } from 'immer';
|
|
2
|
+
import { Spectrum1D } from 'nmr-load-save';
|
|
3
|
+
import { NMRRange } from 'nmr-processing';
|
|
4
|
+
import { ResurrectSpectrumInfo } from '../../../data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges';
|
|
2
5
|
import { State } from '../Reducer';
|
|
3
|
-
|
|
4
|
-
|
|
6
|
+
import { ActionType } from '../types/ActionType';
|
|
7
|
+
type ResurrectSpectrumFromJcampAction = ActionType<'RESURRECTING_SPECTRUM_FROM_JCAMP', {
|
|
8
|
+
ranges: NMRRange[];
|
|
9
|
+
spectrum: Spectrum1D;
|
|
10
|
+
}>;
|
|
11
|
+
type ResurrectSpectrumFromRangesAction = ActionType<'RESURRECTING_SPECTRUM_FROM_RANGES', {
|
|
12
|
+
ranges: NMRRange[];
|
|
13
|
+
info: ResurrectSpectrumInfo;
|
|
14
|
+
}>;
|
|
15
|
+
export type DatabaseActions = ResurrectSpectrumFromJcampAction | ResurrectSpectrumFromRangesAction;
|
|
16
|
+
declare function handleResurrectSpectrumFromJcamp(draft: Draft<State>, action: ResurrectSpectrumFromJcampAction): void;
|
|
17
|
+
declare function handleResurrectSpectrumFromRanges(draft: Draft<State>, action: ResurrectSpectrumFromRangesAction): void;
|
|
5
18
|
export { handleResurrectSpectrumFromRanges, handleResurrectSpectrumFromJcamp };
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { get1DColor, mapRanges } from '../../../data/data1d/Spectrum1D';
|
|
2
|
-
import { generateSpectrumFromRanges } from '../../../data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges';
|
|
2
|
+
import { generateSpectrumFromRanges, } from '../../../data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges';
|
|
3
3
|
import { setZoom } from '../helper/Zoom1DManager';
|
|
4
4
|
import { setDomain, setIntegralsYDomain } from './DomainActions';
|
|
5
5
|
function handleResurrectSpectrumFromJcamp(draft, action) {
|
|
6
6
|
let { ranges, spectrum } = action.payload;
|
|
7
7
|
spectrum = {
|
|
8
8
|
...spectrum,
|
|
9
|
-
ranges: {
|
|
9
|
+
ranges: {
|
|
10
|
+
...spectrum.ranges,
|
|
11
|
+
values: mapRanges(ranges, spectrum),
|
|
12
|
+
},
|
|
10
13
|
display: {
|
|
11
14
|
...spectrum.display,
|
|
12
15
|
...get1DColor(spectrum.display, draft.usedColors),
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { Draft } from 'immer';
|
|
2
2
|
import { State } from '../Reducer';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { ActionType } from '../types/ActionType';
|
|
4
|
+
type SetDimensionsAction = ActionType<'SET_DIMENSIONS', {
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
}>;
|
|
8
|
+
export type DimensionsActions = SetDimensionsAction;
|
|
9
|
+
declare function handleSetDimensions(draft: Draft<State>, action: SetDimensionsAction): void;
|
|
10
|
+
export { handleSetDimensions };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
function handleSetDimensions(draft, width, height) {
|
|
1
|
+
function handleSetDimensions(draft, action) {
|
|
2
|
+
const { width, height } = action.payload;
|
|
5
3
|
draft.width = width;
|
|
6
4
|
draft.height = height;
|
|
7
5
|
}
|
|
8
|
-
export {
|
|
6
|
+
export { handleSetDimensions };
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { Draft } from 'immer';
|
|
2
2
|
import { Spectrum1D } from 'nmr-load-save';
|
|
3
3
|
import { State } from '../Reducer';
|
|
4
|
+
import { ActionType } from '../types/ActionType';
|
|
5
|
+
type SetXDomainAction = ActionType<'SET_X_DOMAIN', {
|
|
6
|
+
xDomain: [number, number];
|
|
7
|
+
}>;
|
|
8
|
+
type SetYDomainAction = ActionType<'SET_Y_DOMAIN', {
|
|
9
|
+
yDomain: [number, number];
|
|
10
|
+
}>;
|
|
11
|
+
export type DomainActions = SetXDomainAction | SetYDomainAction;
|
|
4
12
|
declare function getDomain(draft: Draft<State>): {
|
|
5
13
|
xDomain: [number, number] | [undefined, undefined];
|
|
6
14
|
yDomain: [number, number] | [undefined, undefined];
|
|
@@ -14,9 +22,7 @@ export interface SetDomainOptions {
|
|
|
14
22
|
}
|
|
15
23
|
declare function setDomain(draft: Draft<State>, options?: SetDomainOptions): void;
|
|
16
24
|
declare function setIntegralsYDomain(draft: Draft<State>, data: Spectrum1D[] | Spectrum1D): void;
|
|
17
|
-
declare function setOriginalDomain(draft: Draft<State>, originDomain: any): void;
|
|
18
|
-
declare function setXDomain(draft: Draft<State>, xDomain: any): void;
|
|
19
|
-
declare function setYDomain(draft: Draft<State>, yDomain: any): void;
|
|
20
|
-
declare function handelResetDomain(draft: Draft<State>): void;
|
|
21
25
|
declare function setMode(draft: Draft<State>): void;
|
|
22
|
-
|
|
26
|
+
declare function handleSetXDomain(draft: Draft<State>, action: SetXDomainAction): void;
|
|
27
|
+
declare function handleSetYDomain(draft: Draft<State>, action: SetYDomainAction): void;
|
|
28
|
+
export { getDomain, setDomain, setMode, setIntegralsYDomain, handleSetXDomain, handleSetYDomain, };
|
|
@@ -32,7 +32,7 @@ function getDomain(draft) {
|
|
|
32
32
|
const { display, data, id } = d;
|
|
33
33
|
const { y } = get1DDataXY(d);
|
|
34
34
|
const _extent = extent(y);
|
|
35
|
-
const domain = [data.x[0], data.x
|
|
35
|
+
const domain = [data.x[0], data.x.at(-1)];
|
|
36
36
|
yDomains[id] = _extent;
|
|
37
37
|
xDomains[id] = domain;
|
|
38
38
|
if (display.isVisible) {
|
|
@@ -101,7 +101,7 @@ function get2DDomain(state) {
|
|
|
101
101
|
try {
|
|
102
102
|
for (const d of filteredData) {
|
|
103
103
|
const { x, re } = d.data;
|
|
104
|
-
const domain = [x[0], x
|
|
104
|
+
const domain = [x[0], x.at(-1)];
|
|
105
105
|
xDomains[d.id] = domain;
|
|
106
106
|
const _extent = extent(re);
|
|
107
107
|
yDomains[d.id] = _extent;
|
|
@@ -176,25 +176,19 @@ function setIntegralsYDomain(draft, data) {
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
function setOriginalDomain(draft, originDomain) {
|
|
180
|
-
draft.originDomain = originDomain;
|
|
181
|
-
}
|
|
182
|
-
function setXDomain(draft, xDomain) {
|
|
183
|
-
draft.xDomain = xDomain;
|
|
184
|
-
}
|
|
185
|
-
function setYDomain(draft, yDomain) {
|
|
186
|
-
draft.yDomain = yDomain;
|
|
187
|
-
}
|
|
188
|
-
function handelResetDomain(draft) {
|
|
189
|
-
const { xDomain, yDomain, xDomains, yDomains } = draft.originDomain;
|
|
190
|
-
draft.xDomain = xDomain;
|
|
191
|
-
draft.yDomain = yDomain;
|
|
192
|
-
draft.xDomains = xDomains;
|
|
193
|
-
draft.yDomains = yDomains;
|
|
194
|
-
}
|
|
195
179
|
function setMode(draft) {
|
|
196
180
|
const datum_ = draft.data.find((datum) => draft.xDomains[datum.id] &&
|
|
197
181
|
nucleusToString(datum.info.nucleus) === draft.view.spectra.activeTab);
|
|
198
182
|
draft.mode = datum_?.info.isFid ? 'LTR' : 'RTL';
|
|
199
183
|
}
|
|
200
|
-
|
|
184
|
+
//action
|
|
185
|
+
function handleSetXDomain(draft, action) {
|
|
186
|
+
const xDomain = action.payload.xDomain;
|
|
187
|
+
draft.xDomain = xDomain;
|
|
188
|
+
}
|
|
189
|
+
//action
|
|
190
|
+
function handleSetYDomain(draft, action) {
|
|
191
|
+
const yDomain = action.payload.yDomain;
|
|
192
|
+
draft.yDomain = yDomain;
|
|
193
|
+
}
|
|
194
|
+
export { getDomain, setDomain, setMode, setIntegralsYDomain, handleSetXDomain, handleSetYDomain, };
|
|
@@ -1,37 +1,84 @@
|
|
|
1
1
|
import { Draft } from 'immer';
|
|
2
|
+
import { ApodizationOptions } from '../../../data/data1d/filter1d/apodization';
|
|
3
|
+
import { BaselineCorrectionOptions } from '../../../data/data1d/filter1d/baselineCorrection';
|
|
4
|
+
import { ExclusionZone } from '../../../data/types/data1d/ExclusionZone';
|
|
5
|
+
import { MatrixOptions } from '../../../data/types/data1d/MatrixOptions';
|
|
2
6
|
import { ActiveSpectrum, State } from '../Reducer';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
import { ActionType } from '../types/ActionType';
|
|
8
|
+
type ShiftSpectrumAlongXAxisAction = ActionType<'SHIFT_SPECTRUM', {
|
|
9
|
+
shift: number;
|
|
10
|
+
}>;
|
|
11
|
+
type ApodizationFilterAction = ActionType<'APPLY_APODIZATION_FILTER' | 'CALCULATE_APODIZATION_FILTER', ApodizationOptions>;
|
|
12
|
+
type ZeroFillingFilterAction = ActionType<'APPLY_ZERO_FILLING_FILTER' | 'CALCULATE_ZERO_FILLING_FILTER', {
|
|
13
|
+
nbPoints: number;
|
|
14
|
+
}>;
|
|
15
|
+
type ManualPhaseCorrectionFilterAction = ActionType<'APPLY_MANUAL_PHASE_CORRECTION_FILTER' | 'CALCULATE_MANUAL_PHASE_CORRECTION_FILTER', {
|
|
16
|
+
ph0: number;
|
|
17
|
+
ph1: number;
|
|
18
|
+
}>;
|
|
19
|
+
type BaselineCorrectionFilterProps = Omit<BaselineCorrectionOptions, 'zones'> & {
|
|
20
|
+
livePreview: boolean;
|
|
21
|
+
};
|
|
22
|
+
type BaselineCorrectionFilterAction = ActionType<'APPLY_BASE_LINE_CORRECTION_FILTER' | 'CALCULATE_BASE_LINE_CORRECTION_FILTER', BaselineCorrectionFilterProps>;
|
|
23
|
+
type EnableFilterAction = ActionType<'ENABLE_FILTER', {
|
|
24
|
+
id: string;
|
|
25
|
+
enabled: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
type DeleteFilterAction = ActionType<'DELETE_FILTER', {
|
|
28
|
+
id?: string;
|
|
29
|
+
}>;
|
|
30
|
+
type DeleteSpectraFilterAction = ActionType<'DELETE_SPECTRA_FILTER', {
|
|
31
|
+
filterName: string;
|
|
32
|
+
}>;
|
|
33
|
+
type SetFilterSnapshotAction = ActionType<'SET_FILTER_SNAPSHOT', {
|
|
34
|
+
name: string;
|
|
35
|
+
id: string;
|
|
36
|
+
}>;
|
|
37
|
+
type AddExclusionZoneAction = ActionType<'ADD_EXCLUSION_ZONE', {
|
|
38
|
+
startX: number;
|
|
39
|
+
endX: number;
|
|
40
|
+
}>;
|
|
41
|
+
type DeleteExclusionZoneAction = ActionType<'DELETE_EXCLUSION_ZONE', {
|
|
42
|
+
zone: ExclusionZone;
|
|
43
|
+
spectrumId?: string;
|
|
44
|
+
}>;
|
|
45
|
+
type ApplySignalProcessingAction = ActionType<'APPLY_SIGNAL_PROCESSING_FILTER', {
|
|
46
|
+
options: MatrixOptions;
|
|
47
|
+
}>;
|
|
48
|
+
export type FiltersActions = ShiftSpectrumAlongXAxisAction | ApodizationFilterAction | ZeroFillingFilterAction | ManualPhaseCorrectionFilterAction | BaselineCorrectionFilterAction | EnableFilterAction | DeleteFilterAction | DeleteSpectraFilterAction | SetFilterSnapshotAction | AddExclusionZoneAction | DeleteExclusionZoneAction | ApplySignalProcessingAction | ActionType<'APPLY_FFT_FILTER' | 'APPLY_AUTO_PHASE_CORRECTION_FILTER' | 'APPLY_ABSOLUTE_FILTER'>;
|
|
49
|
+
interface RollbackSpectrumByFilterOptions {
|
|
19
50
|
applyFilter?: boolean;
|
|
20
51
|
reset?: boolean;
|
|
21
52
|
searchBy?: 'id' | 'name';
|
|
22
53
|
key?: string | null;
|
|
23
54
|
activeSpectrum?: ActiveSpectrum | null;
|
|
24
55
|
triggerSource?: 'Apply' | 'none';
|
|
25
|
-
}
|
|
26
|
-
declare function
|
|
27
|
-
declare function handleMultipleSpectraFilter(draft: Draft<State>, action: any): void;
|
|
28
|
-
declare function handleSignalProcessingFilter(draft: Draft<State>, action: any): void;
|
|
29
|
-
declare function handleAddExclusionZone(draft: Draft<State>, action: any): void;
|
|
30
|
-
declare function handleDeleteExclusionZone(draft: Draft<State>, action: any): void;
|
|
56
|
+
}
|
|
57
|
+
declare function rollbackSpectrumByFilter(draft: Draft<State>, options?: RollbackSpectrumByFilterOptions): void;
|
|
31
58
|
interface RollbackSpectrumOptions {
|
|
32
59
|
updateFilterViewOptions?: boolean;
|
|
33
60
|
filterKey: string;
|
|
34
61
|
reset?: boolean;
|
|
35
62
|
}
|
|
36
63
|
declare function rollbackSpectrum(draft: Draft<State>, options: RollbackSpectrumOptions): void;
|
|
37
|
-
|
|
64
|
+
declare function handleShiftSpectrumAlongXAxis(draft: Draft<State>, action: ShiftSpectrumAlongXAxisAction): void;
|
|
65
|
+
declare function handleApplyZeroFillingFilter(draft: Draft<State>, action: ZeroFillingFilterAction): void;
|
|
66
|
+
declare function handleCalculateZeroFillingFilter(draft: Draft<State>, action: ZeroFillingFilterAction): void;
|
|
67
|
+
declare function handleCalculateApodizationFilter(draft: Draft<State>, action: ApodizationFilterAction): void;
|
|
68
|
+
declare function handleApplyApodizationFilter(draft: Draft<State>, action: ApodizationFilterAction): void;
|
|
69
|
+
declare function handleApplyFFTFilter(draft: Draft<State>): void;
|
|
70
|
+
declare function handleApplyManualPhaseCorrectionFilter(draft: Draft<State>, action: ManualPhaseCorrectionFilterAction): void;
|
|
71
|
+
declare function handleCalculateManualPhaseCorrection(draft: Draft<State>, action: ManualPhaseCorrectionFilterAction): void;
|
|
72
|
+
declare function handleApplyAbsoluteFilter(draft: Draft<State>): void;
|
|
73
|
+
declare function handleApplyAutoPhaseCorrectionFilter(draft: Draft<State>): void;
|
|
74
|
+
declare function handleBaseLineCorrectionFilter(draft: Draft<State>, action: BaselineCorrectionFilterAction): void;
|
|
75
|
+
declare function calculateBaseLineCorrection(draft: Draft<State>, baseLineOptions?: BaselineCorrectionFilterProps): void;
|
|
76
|
+
declare function handleCalculateBaseLineCorrection(draft: Draft<State>, action: BaselineCorrectionFilterAction): void;
|
|
77
|
+
declare function handleEnableFilter(draft: Draft<State>, action: EnableFilterAction): void;
|
|
78
|
+
declare function handleDeleteFilter(draft: Draft<State>, action: DeleteFilterAction): void;
|
|
79
|
+
declare function handleDeleteSpectraFilter(draft: Draft<State>, action: DeleteSpectraFilterAction): void;
|
|
80
|
+
declare function handleSetFilterSnapshotHandler(draft: Draft<State>, action: SetFilterSnapshotAction): void;
|
|
81
|
+
declare function handleSignalProcessingFilter(draft: Draft<State>, action: ApplySignalProcessingAction): void;
|
|
82
|
+
declare function handleAddExclusionZone(draft: Draft<State>, action: AddExclusionZoneAction): void;
|
|
83
|
+
declare function handleDeleteExclusionZone(draft: Draft<State>, action: DeleteExclusionZoneAction): void;
|
|
84
|
+
export { handleShiftSpectrumAlongXAxis, handleApplyZeroFillingFilter, handleApplyApodizationFilter, handleApplyFFTFilter, handleApplyManualPhaseCorrectionFilter, handleApplyAutoPhaseCorrectionFilter, handleApplyAbsoluteFilter, handleCalculateManualPhaseCorrection, calculateBaseLineCorrection, handleCalculateBaseLineCorrection, handleCalculateApodizationFilter, handleCalculateZeroFillingFilter, handleEnableFilter, handleDeleteFilter, handleDeleteSpectraFilter, handleBaseLineCorrectionFilter, handleSetFilterSnapshotHandler, handleAddExclusionZone, handleDeleteExclusionZone, handleSignalProcessingFilter, rollbackSpectrum, rollbackSpectrumByFilter, };
|