nmrium 0.34.0 → 0.35.0-pre.1683280699
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/LinesSeries.js +4 -5
- package/lib/component/1d/jCouplingGraph/JsCouplings.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/LevelNode.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts +5 -7
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +142 -160
- package/lib/component/1d/multiplicityTree/StringNode.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/buildTreeNode.d.ts +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.d.ts +4 -4
- package/lib/component/1d/ranges/AssignmentActionsButtons.d.ts +11 -0
- package/lib/component/1d/ranges/AssignmentActionsButtons.js +11 -0
- package/lib/component/1d/ranges/Range.d.ts +3 -10
- package/lib/component/1d/ranges/Range.js +32 -45
- package/lib/component/1d/ranges/Ranges.js +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts +1 -2
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.d.ts +1 -2
- package/lib/component/2d/1d-tracer/Left1DChart.d.ts +2 -2
- package/lib/component/2d/1d-tracer/Top1DChart.d.ts +2 -2
- package/lib/component/2d/Chart2D.d.ts +2 -2
- package/lib/component/2d/ft/Contours.js +13 -13
- package/lib/component/2d/ft/FTContainer.d.ts +2 -2
- package/lib/component/2d/zones/Signal.d.ts +1 -1
- package/lib/component/2d/zones/Signal.js +1 -2
- package/lib/component/2d/zones/SignalCrosshair.d.ts +1 -1
- package/lib/component/2d/zones/SignalCrosshair.js +0 -1
- package/lib/component/2d/zones/Zone.d.ts +2 -2
- package/lib/component/NMRium.d.ts +2 -5
- package/lib/component/NMRium.js +10 -2
- package/lib/component/assignment/AssignmentsReducer.d.ts +1 -2
- package/lib/component/assignment/actions/removeAssignment.js +2 -2
- package/lib/component/context/PreferencesContext.d.ts +10 -21
- package/lib/component/context/PreferencesContext.js +4 -7
- package/lib/component/elements/Button.d.ts +4 -2
- package/lib/component/elements/Button.js +26 -15
- package/lib/component/elements/Input.js +38 -46
- package/lib/component/elements/NumberInput.d.ts +4 -12
- package/lib/component/elements/NumberInput.js +10 -40
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.d.ts +2 -4
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +3 -2
- package/lib/component/elements/ReactTable/ReactTable.d.ts +7 -6
- package/lib/component/elements/ReactTable/ReactTable.js +3 -12
- package/lib/component/elements/ReactTable/Style.js +0 -8
- package/lib/component/elements/formik/FormikNumberInput.d.ts +1 -1
- package/lib/component/elements/formik/FormikNumberInput.js +13 -3
- package/lib/component/header/ApodizationOptionsPanel.js +2 -12
- package/lib/component/header/AutoPeakPickingOptionPanel.js +11 -15
- package/lib/component/header/BaseLineCorrectionPanel.js +2 -12
- package/lib/component/header/Header.js +2 -2
- package/lib/component/header/PhaseCorrectionPanel.d.ts +2 -0
- package/lib/component/header/{ManualPhaseCorrectionPanel.js → PhaseCorrectionPanel.js} +23 -22
- package/lib/component/header/RangesPickingOptionPanel.js +17 -28
- package/lib/component/header/ZeroFillingOptionsPanel.js +1 -2
- package/lib/component/header/Zones2DOptionPanel.js +16 -23
- package/lib/component/highlight/index.d.ts +2 -2
- package/lib/component/hooks/useCheckToolsVisibility.d.ts +1 -2
- package/lib/component/hooks/useDatumWithSpectraStatistics.d.ts +2 -3
- package/lib/component/hooks/useFilter.d.ts +1 -1
- package/lib/component/hooks/useSpectraPerNucleus.d.ts +2 -3
- package/lib/component/hooks/useSpectrum.d.ts +2 -3
- package/lib/component/modal/EditPeakShapeModal.d.ts +2 -2
- package/lib/component/modal/ExportAsJcampModal.d.ts +8 -0
- package/lib/component/modal/ExportAsJcampModal.js +62 -0
- package/lib/component/modal/MultipletAnalysisModal.d.ts +2 -2
- package/lib/component/modal/changeSum/ChangeSumModal.d.ts +1 -1
- package/lib/component/modal/editRange/EditRangeModal.js +1 -1
- package/lib/component/modal/editRange/forms/components/SignalsForm.d.ts +1 -1
- package/lib/component/modal/editZone/EditPathLengthFormik.js +11 -14
- package/lib/component/modal/editZone/EditZoneModal.js +1 -1
- package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js +1 -1
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.js +1 -1
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.d.ts +2 -2
- package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +3 -3
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +8 -5
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +1 -1
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +2 -3
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
- package/lib/component/panels/PanelNoData.d.ts +6 -0
- package/lib/component/panels/PanelNoData.js +24 -0
- package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts +2 -2
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +4 -4
- package/lib/component/panels/RangesPanel/RangesPanel.js +12 -7
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +4 -5
- package/lib/component/panels/RangesPanel/RangesTable.js +4 -14
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +5 -4
- package/lib/component/panels/RangesPanel/RangesTableRow.js +15 -11
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.d.ts +6 -5
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +37 -33
- package/lib/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.d.ts +4 -0
- package/lib/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.js +8 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.d.ts +2 -3
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +6 -11
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.d.ts +1 -1
- package/lib/component/panels/RangesPanel/hooks/useMapRanges.d.ts +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectraTable.d.ts +3 -4
- package/lib/component/panels/SpectrumsPanel/SpectraTable.js +65 -17
- package/lib/component/panels/SpectrumsPanel/base/ColorIndicator.d.ts +1 -2
- package/lib/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.d.ts +3 -4
- package/lib/component/panels/SpectrumsPanel/base/SpectrumName.d.ts +2 -3
- package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +0 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.d.ts +2 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +11 -8
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts +1 -1
- package/lib/component/panels/SummaryPanel/utilities/Utilities.d.ts +4 -5
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +1 -1
- package/lib/component/panels/ZonesPanel/ZonesTable.d.ts +1 -2
- package/lib/component/panels/ZonesPanel/ZonesTable.js +3 -13
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +3 -3
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js +3 -2
- package/lib/component/panels/databasePanel/DatabasePanel.js +77 -7
- package/lib/component/panels/databasePanel/DatabasePreferences.js +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.d.ts +2 -1
- package/lib/component/panels/databasePanel/DatabaseTable.js +17 -9
- package/lib/component/panels/filtersPanel/FiltersTable.js +16 -30
- package/lib/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib/component/panels/header/PreferencesHeader.js +1 -1
- package/lib/component/reducer/IgnoreActions.js +0 -1
- package/lib/component/reducer/Reducer.d.ts +4 -960
- package/lib/component/reducer/Reducer.js +3 -7
- package/lib/component/reducer/actions/AssignmentsActions.js +2 -4
- package/lib/component/reducer/actions/DatabaseActions.js +1 -1
- package/lib/component/reducer/actions/DomainActions.d.ts +5 -6
- package/lib/component/reducer/actions/DomainActions.js +17 -11
- package/lib/component/reducer/actions/FiltersActions.d.ts +14 -19
- package/lib/component/reducer/actions/FiltersActions.js +257 -152
- package/lib/component/reducer/actions/LoadActions.d.ts +2 -3
- package/lib/component/reducer/actions/LoadActions.js +1 -1
- package/lib/component/reducer/actions/PeaksActions.d.ts +1 -1
- package/lib/component/reducer/actions/PeaksActions.js +6 -2
- package/lib/component/reducer/actions/PreferencesActions.js +3 -0
- package/lib/component/reducer/actions/RangesActions.d.ts +1 -1
- package/lib/component/reducer/actions/RangesActions.js +19 -11
- package/lib/component/reducer/actions/SpectrumsActions.js +15 -13
- package/lib/component/reducer/actions/ToolsActions.d.ts +6 -2
- package/lib/component/reducer/actions/ToolsActions.js +41 -38
- package/lib/component/reducer/actions/ZonesActions.d.ts +1 -1
- package/lib/component/reducer/actions/ZonesActions.js +7 -3
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.js +6 -3
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +3 -4843
- package/lib/component/reducer/preferences/preferencesReducer.js +1 -4
- package/lib/component/reducer/types/Types.d.ts +0 -2
- package/lib/component/reducer/types/Types.js +0 -2
- package/lib/component/toolbar/BasicToolBar.js +3 -3
- package/lib/component/toolbar/FunctionToolBar.js +2 -2
- package/lib/component/toolbar/ToolTypes.d.ts +1 -2
- package/lib/component/toolbar/ToolTypes.js +13 -13
- package/lib/component/utility/getSpectraByNucleus.d.ts +2 -3
- package/lib/component/utility/getSpectraObjectPaths.d.ts +2 -3
- package/lib/component/workspaces/Workspace.d.ts +1 -0
- package/lib/component/workspaces/assignment.js +1 -1
- package/lib/component/workspaces/basic.js +1 -1
- package/lib/component/workspaces/embedded.js +1 -1
- package/lib/component/workspaces/exercise.js +1 -1
- package/lib/component/workspaces/prediction.js +1 -1
- package/lib/component/workspaces/process1D.js +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib/data/Filters.d.ts +0 -4
- package/lib/data/Filters.js +0 -4
- package/lib/data/FiltersManager.d.ts +17 -5
- package/lib/data/FiltersManager.js +21 -14
- package/lib/data/PredictionManager.d.ts +2 -3
- package/lib/data/SpectraManager.d.ts +11 -0
- package/lib/data/SpectraManager.js +47 -5
- package/lib/data/data1d/Spectrum1D/SumManager.d.ts +1 -2
- package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/generateJGraphData.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/generateSpectrumFromPublicationString.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/get1DDataXY.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/getShiftX.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/getShiftX.js +3 -3
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +2 -2
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +16 -17
- package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +7 -7
- package/lib/data/data1d/Spectrum1D/integrals/checkIntegralKind.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +3 -3
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.d.ts +3 -4
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.js +3 -3
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.js +3 -3
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.d.ts +2 -0
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.js +10 -0
- package/lib/data/data1d/Spectrum1D/isSpectrum1D.d.ts +2 -3
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +5 -5
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +3 -3
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/lookupPeak.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +7 -7
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts +3 -3
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +5 -5
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.js +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/addRange.d.ts +8 -9
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +13 -7
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.js +13 -7
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.d.ts +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +9 -9
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeSignal.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeSignal.js +6 -5
- package/lib/data/data1d/Spectrum1D/ranges/checkRangeKind.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRange.d.ts +3 -2
- package/lib/data/data1d/Spectrum1D/ranges/detectRange.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.d.ts +10 -9
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +6 -6
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.d.ts +1 -0
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.js +1 -0
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +7 -7
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +7 -7
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +7 -7
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +2 -2
- package/lib/data/data1d/filter1d/apodization.d.ts +8 -6
- package/lib/data/data1d/filter1d/apodization.js +4 -0
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +6 -4
- package/lib/data/data1d/filter1d/baselineCorrection.js +4 -0
- package/lib/data/data1d/filter1d/digitalFilter.d.ts +7 -6
- package/lib/data/data1d/filter1d/digitalFilter.js +15 -11
- package/lib/data/data1d/filter1d/equallySpaced.d.ts +5 -5
- package/lib/data/data1d/filter1d/equallySpaced.js +10 -10
- package/lib/data/data1d/filter1d/exclusionZones.d.ts +7 -5
- package/lib/data/data1d/filter1d/exclusionZones.js +13 -9
- package/lib/data/data1d/filter1d/fft.d.ts +6 -4
- package/lib/data/data1d/filter1d/fft.js +27 -23
- package/lib/data/data1d/filter1d/phaseCorrection.d.ts +6 -5
- package/lib/data/data1d/filter1d/phaseCorrection.js +22 -17
- package/lib/data/data1d/filter1d/shiftX.d.ts +5 -3
- package/lib/data/data1d/filter1d/shiftX.js +7 -3
- package/lib/data/data1d/filter1d/signalProcessing.d.ts +7 -5
- package/lib/data/data1d/filter1d/signalProcessing.js +15 -11
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.d.ts +2 -2
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +6 -6
- package/lib/data/data1d/filter1d/zeroFilling.d.ts +7 -6
- package/lib/data/data1d/filter1d/zeroFilling.js +15 -11
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +4 -5
- package/lib/data/data2d/Spectrum2D/contours.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/contours.js +5 -4
- package/lib/data/data2d/Spectrum2D/get2DColor.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/get2DSpectrumErrorValue.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/get2DSpectrumErrorValue.js +2 -2
- package/lib/data/data2d/Spectrum2D/getMissingProjection.d.ts +2 -3
- package/lib/data/data2d/Spectrum2D/getShift.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/getShift.js +3 -3
- package/lib/data/data2d/Spectrum2D/getSlice.d.ts +4 -4
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/isSpectrum2D.d.ts +2 -3
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js +4 -4
- package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +4 -10
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js +4 -4
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +6 -12
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.js +2 -2
- package/lib/data/data2d/Spectrum2D/zones/isZoneExists.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/isZoneExists.js +3 -3
- package/lib/data/data2d/Spectrum2D/zones/mapZones.d.ts +6 -12
- package/lib/data/data2d/Spectrum2D/zones/mapZones.js +1 -0
- package/lib/data/data2d/Spectrum2D/zones/updateZones.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/updateZones.js +2 -2
- package/lib/data/data2d/filter2d/shiftX.d.ts +6 -4
- package/lib/data/data2d/filter2d/shiftX.js +10 -6
- package/lib/data/data2d/filter2d/shiftY.d.ts +5 -3
- package/lib/data/data2d/filter2d/shiftY.js +5 -1
- package/lib/data/getDefaultMatrixFilters.d.ts +1 -1
- package/lib/data/molecules/MoleculeManager.d.ts +1 -1
- package/lib/data/molecules/MoleculeManager.js +2 -2
- package/lib/data/parseMeta/linkMetaWithSpectra.d.ts +2 -3
- package/lib/data/types/common/Info.d.ts +1 -0
- package/lib/data/types/data1d/ComplexData1D.d.ts +1 -1
- package/lib/data/types/data1d/RangeDetectionResult.d.ts +1 -1
- package/lib/data/types/data1d/index.d.ts +0 -11
- package/lib/data/types/data2d/index.d.ts +0 -7
- package/lib/data/utilities/FindUtilities.d.ts +7 -9
- package/lib/data/utilities/RangeUtilities.d.ts +7 -2
- package/lib/data/utilities/RangeUtilities.js +9 -16
- package/lib/data/utilities/ZoneUtilities.d.ts +1 -1
- package/lib/data/utilities/ZoneUtilities.js +6 -6
- package/lib/data/utilities/calculateSanPlot.d.ts +2 -3
- package/lib/data/utilities/convertSpectraListToObject.d.ts +2 -3
- package/lib/data/utilities/generateColor.d.ts +1 -1
- package/lib/types/NMRiumDataReturn.d.ts +2 -3
- package/lib/types/NMRiumToolBarPreferences.d.ts +1 -1
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/LinesSeries.js +4 -5
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +144 -160
- package/lib-cjs/component/1d/ranges/AssignmentActionsButtons.js +18 -0
- package/lib-cjs/component/1d/ranges/Range.js +31 -44
- package/lib-cjs/component/1d/ranges/Ranges.js +1 -1
- package/lib-cjs/component/2d/ft/Contours.js +13 -13
- package/lib-cjs/component/2d/zones/Signal.js +1 -2
- package/lib-cjs/component/2d/zones/SignalCrosshair.js +0 -1
- package/lib-cjs/component/NMRium.js +10 -2
- package/lib-cjs/component/assignment/actions/removeAssignment.js +2 -2
- package/lib-cjs/component/context/PreferencesContext.js +4 -7
- package/lib-cjs/component/elements/Button.js +26 -15
- package/lib-cjs/component/elements/Input.js +37 -45
- package/lib-cjs/component/elements/NumberInput.js +8 -38
- package/lib-cjs/component/elements/ReactTable/Elements/ReactTableRow.js +3 -2
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +3 -12
- package/lib-cjs/component/elements/ReactTable/Style.js +0 -8
- package/lib-cjs/component/elements/formik/FormikNumberInput.js +13 -3
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +1 -11
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +33 -14
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +1 -11
- package/lib-cjs/component/header/Header.js +2 -2
- package/lib-cjs/component/header/{ManualPhaseCorrectionPanel.js → PhaseCorrectionPanel.js} +24 -23
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +38 -26
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +0 -1
- package/lib-cjs/component/header/Zones2DOptionPanel.js +37 -21
- package/lib-cjs/component/modal/ExportAsJcampModal.js +67 -0
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +1 -1
- package/lib-cjs/component/modal/editZone/EditPathLengthFormik.js +11 -14
- package/lib-cjs/component/modal/editZone/EditZoneModal.js +1 -1
- package/lib-cjs/component/modal/setting/settings-tabs/ToolsTabContent.js +1 -1
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignment.js +1 -1
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +3 -3
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +8 -5
- package/lib-cjs/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -1
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +1 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
- package/lib-cjs/component/panels/PanelNoData.js +28 -0
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +4 -4
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +12 -7
- package/lib-cjs/component/panels/RangesPanel/RangesTable.js +4 -14
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +15 -10
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +36 -32
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.js +12 -0
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +6 -11
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +63 -15
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +0 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +11 -8
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +2 -12
- package/lib-cjs/component/panels/ZonesPanel/ZonesTableRow.js +3 -2
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +76 -6
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +1 -1
- package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +15 -7
- package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +16 -30
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib-cjs/component/panels/header/PreferencesHeader.js +1 -1
- package/lib-cjs/component/reducer/IgnoreActions.js +0 -1
- package/lib-cjs/component/reducer/Reducer.js +3 -7
- package/lib-cjs/component/reducer/actions/AssignmentsActions.js +2 -4
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +1 -1
- package/lib-cjs/component/reducer/actions/DomainActions.js +17 -11
- package/lib-cjs/component/reducer/actions/FiltersActions.js +257 -153
- package/lib-cjs/component/reducer/actions/LoadActions.js +1 -1
- package/lib-cjs/component/reducer/actions/PeaksActions.js +6 -2
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +3 -0
- package/lib-cjs/component/reducer/actions/RangesActions.js +19 -11
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +13 -11
- package/lib-cjs/component/reducer/actions/ToolsActions.js +38 -35
- package/lib-cjs/component/reducer/actions/ZonesActions.js +7 -3
- package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +6 -3
- package/lib-cjs/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib-cjs/component/reducer/preferences/preferencesReducer.js +1 -4
- package/lib-cjs/component/reducer/types/Types.js +2 -4
- package/lib-cjs/component/toolbar/BasicToolBar.js +3 -3
- package/lib-cjs/component/toolbar/FunctionToolBar.js +2 -2
- package/lib-cjs/component/toolbar/ToolTypes.js +13 -13
- package/lib-cjs/component/workspaces/assignment.js +1 -1
- package/lib-cjs/component/workspaces/basic.js +1 -1
- package/lib-cjs/component/workspaces/embedded.js +1 -1
- package/lib-cjs/component/workspaces/exercise.js +1 -1
- package/lib-cjs/component/workspaces/prediction.js +1 -1
- package/lib-cjs/component/workspaces/process1D.js +1 -1
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib-cjs/data/Filters.js +1 -5
- package/lib-cjs/data/FiltersManager.js +22 -14
- package/lib-cjs/data/SpectraManager.js +48 -5
- package/lib-cjs/data/data1d/Spectrum1D/get1DDataXY.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/getShiftX.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +16 -17
- package/lib-cjs/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +7 -7
- package/lib-cjs/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/integrals/mapIntegrals.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegrals.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/isRangeAssigned.js +14 -0
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +5 -5
- package/lib-cjs/data/data1d/Spectrum1D/peaks/initiatePeaks.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +7 -7
- package/lib-cjs/data/data1d/Spectrum1D/peaks/optimizePeaks.js +5 -5
- package/lib-cjs/data/data1d/Spectrum1D/peaks/updatePeaks.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +13 -7
- package/lib-cjs/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRange.js +13 -7
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +9 -9
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeSignal.js +6 -5
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRange.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRanges.js +6 -6
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectSignal.js +1 -0
- package/lib-cjs/data/data1d/Spectrum1D/ranges/initiateRanges.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +7 -7
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRanges.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +2 -2
- package/lib-cjs/data/data1d/filter1d/apodization.js +5 -1
- package/lib-cjs/data/data1d/filter1d/baselineCorrection.js +5 -1
- package/lib-cjs/data/data1d/filter1d/digitalFilter.js +16 -12
- package/lib-cjs/data/data1d/filter1d/equallySpaced.js +10 -10
- package/lib-cjs/data/data1d/filter1d/exclusionZones.js +14 -10
- package/lib-cjs/data/data1d/filter1d/fft.js +27 -23
- package/lib-cjs/data/data1d/filter1d/phaseCorrection.js +23 -18
- package/lib-cjs/data/data1d/filter1d/shiftX.js +8 -4
- package/lib-cjs/data/data1d/filter1d/signalProcessing.js +16 -12
- package/lib-cjs/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +6 -6
- package/lib-cjs/data/data1d/filter1d/zeroFilling.js +16 -12
- package/lib-cjs/data/data2d/Spectrum2D/contours.js +5 -4
- package/lib-cjs/data/data2d/Spectrum2D/get2DSpectrumErrorValue.js +2 -2
- package/lib-cjs/data/data2d/Spectrum2D/getShift.js +3 -3
- package/lib-cjs/data/data2d/Spectrum2D/zones/changeZoneSignal.js +4 -4
- package/lib-cjs/data/data2d/Spectrum2D/zones/getDetectionZones.js +4 -4
- package/lib-cjs/data/data2d/Spectrum2D/zones/initiateZones.js +2 -2
- package/lib-cjs/data/data2d/Spectrum2D/zones/isZoneExists.js +3 -3
- package/lib-cjs/data/data2d/Spectrum2D/zones/mapZones.js +1 -0
- package/lib-cjs/data/data2d/Spectrum2D/zones/updateZones.js +2 -2
- package/lib-cjs/data/data2d/filter2d/shiftX.js +11 -7
- package/lib-cjs/data/data2d/filter2d/shiftY.js +6 -2
- package/lib-cjs/data/molecules/MoleculeManager.js +2 -2
- package/lib-cjs/data/utilities/RangeUtilities.js +9 -16
- package/lib-cjs/data/utilities/ZoneUtilities.js +6 -6
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +37 -36
- package/lib/component/header/ManualPhaseCorrectionPanel.d.ts +0 -2
- package/lib/data/data1d/filter1d/centerMean.d.ts +0 -13
- package/lib/data/data1d/filter1d/centerMean.js +0 -37
- package/lib/data/data1d/filter1d/fromTo.d.ts +0 -13
- package/lib/data/data1d/filter1d/fromTo.js +0 -31
- package/lib/data/data1d/filter1d/pareto.d.ts +0 -13
- package/lib/data/data1d/filter1d/pareto.js +0 -29
- package/lib/data/data1d/filter1d/standardDeviation.d.ts +0 -13
- package/lib/data/data1d/filter1d/standardDeviation.js +0 -37
- package/lib/data/types/data1d/Data1D.d.ts +0 -5
- package/lib/data/types/data1d/Data1D.js +0 -1
- package/lib/data/types/data1d/Datum1D.d.ts +0 -23
- package/lib/data/types/data1d/Datum1D.js +0 -1
- package/lib/data/types/data1d/Display1D.d.ts +0 -5
- package/lib/data/types/data1d/Display1D.js +0 -1
- package/lib/data/types/data1d/Info1D.d.ts +0 -8
- package/lib/data/types/data1d/Info1D.js +0 -1
- package/lib/data/types/data1d/Integral.d.ts +0 -10
- package/lib/data/types/data1d/Integral.js +0 -1
- package/lib/data/types/data1d/Integrals.d.ts +0 -6
- package/lib/data/types/data1d/Integrals.js +0 -1
- package/lib/data/types/data1d/Peak.d.ts +0 -5
- package/lib/data/types/data1d/Peak.js +0 -1
- package/lib/data/types/data1d/Peaks.d.ts +0 -5
- package/lib/data/types/data1d/Peaks.js +0 -1
- package/lib/data/types/data1d/Range.d.ts +0 -11
- package/lib/data/types/data1d/Range.js +0 -1
- package/lib/data/types/data1d/Ranges.d.ts +0 -6
- package/lib/data/types/data1d/Ranges.js +0 -1
- package/lib/data/types/data1d/Signal1D.d.ts +0 -5
- package/lib/data/types/data1d/Signal1D.js +0 -1
- package/lib/data/types/data1d/SumOptions.d.ts +0 -7
- package/lib/data/types/data1d/SumOptions.js +0 -1
- package/lib/data/types/data2d/Data2D.d.ts +0 -20
- package/lib/data/types/data2d/Data2D.js +0 -1
- package/lib/data/types/data2d/Datum2D.d.ts +0 -19
- package/lib/data/types/data2d/Datum2D.js +0 -1
- package/lib/data/types/data2d/Display2D.d.ts +0 -11
- package/lib/data/types/data2d/Display2D.js +0 -1
- package/lib/data/types/data2d/Info2D.d.ts +0 -5
- package/lib/data/types/data2d/Info2D.js +0 -1
- package/lib/data/types/data2d/Signal2D.d.ts +0 -7
- package/lib/data/types/data2d/Signal2D.js +0 -1
- package/lib/data/types/data2d/Signal2DAxisData.d.ts +0 -4
- package/lib/data/types/data2d/Signal2DAxisData.js +0 -1
- package/lib/data/types/data2d/Zone.d.ts +0 -9
- package/lib/data/types/data2d/Zone.js +0 -1
- package/lib/data/types/data2d/Zone2DAxisData.d.ts +0 -6
- package/lib/data/types/data2d/Zone2DAxisData.js +0 -1
- package/lib/data/types/data2d/Zones.d.ts +0 -7
- package/lib/data/types/data2d/Zones.js +0 -1
- package/lib-cjs/data/data1d/filter1d/centerMean.js +0 -43
- package/lib-cjs/data/data1d/filter1d/fromTo.js +0 -37
- package/lib-cjs/data/data1d/filter1d/pareto.js +0 -35
- package/lib-cjs/data/data1d/filter1d/standardDeviation.js +0 -43
- package/lib-cjs/data/types/data1d/Data1D.js +0 -2
- package/lib-cjs/data/types/data1d/Datum1D.js +0 -2
- package/lib-cjs/data/types/data1d/Display1D.js +0 -2
- package/lib-cjs/data/types/data1d/Info1D.js +0 -2
- package/lib-cjs/data/types/data1d/Integral.js +0 -2
- package/lib-cjs/data/types/data1d/Integrals.js +0 -2
- package/lib-cjs/data/types/data1d/Peak.js +0 -2
- package/lib-cjs/data/types/data1d/Peaks.js +0 -2
- package/lib-cjs/data/types/data1d/Range.js +0 -2
- package/lib-cjs/data/types/data1d/Ranges.js +0 -2
- package/lib-cjs/data/types/data1d/Signal1D.js +0 -2
- package/lib-cjs/data/types/data1d/SumOptions.js +0 -2
- package/lib-cjs/data/types/data2d/Data2D.js +0 -2
- package/lib-cjs/data/types/data2d/Datum2D.js +0 -2
- package/lib-cjs/data/types/data2d/Display2D.js +0 -2
- package/lib-cjs/data/types/data2d/Info2D.js +0 -2
- package/lib-cjs/data/types/data2d/Signal2D.js +0 -2
- package/lib-cjs/data/types/data2d/Signal2DAxisData.js +0 -2
- package/lib-cjs/data/types/data2d/Zone.js +0 -2
- package/lib-cjs/data/types/data2d/Zone2DAxisData.js +0 -2
- package/lib-cjs/data/types/data2d/Zones.js +0 -2
|
@@ -85,7 +85,8 @@ function handleOptimizePeaks(draft, action) {
|
|
|
85
85
|
datum.peaks.values = newPeaks;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
function handleAutoPeakPicking(draft,
|
|
88
|
+
function handleAutoPeakPicking(draft, action) {
|
|
89
|
+
const { maxNumberOfPeaks, minMaxRatio, noiseFactor, direction } = action.payload;
|
|
89
90
|
const activeSpectrum = getActiveSpectrum(draft);
|
|
90
91
|
if (activeSpectrum?.id) {
|
|
91
92
|
draft.toolOptions.selectedTool = options.zoom.id;
|
|
@@ -96,7 +97,10 @@ function handleAutoPeakPicking(draft, autOptions) {
|
|
|
96
97
|
const windowFromIndex = xFindClosestIndex(datum.data.x, from);
|
|
97
98
|
const windowToIndex = xFindClosestIndex(datum.data.x, to);
|
|
98
99
|
const peaks = autoPeakPicking(draft.data[index], {
|
|
99
|
-
|
|
100
|
+
maxNumberOfPeaks,
|
|
101
|
+
minMaxRatio,
|
|
102
|
+
noiseFactor,
|
|
103
|
+
direction,
|
|
100
104
|
windowFromIndex,
|
|
101
105
|
windowToIndex,
|
|
102
106
|
});
|
|
@@ -21,6 +21,9 @@ function changeSpectrumVerticalAlignment(draft, options) {
|
|
|
21
21
|
else if (dataPerNucleus.length > 1) {
|
|
22
22
|
draft.view.verticalAlign[nucleus] = 'stack';
|
|
23
23
|
}
|
|
24
|
+
else {
|
|
25
|
+
draft.view.verticalAlign[nucleus] = 'bottom';
|
|
26
|
+
}
|
|
24
27
|
}
|
|
25
28
|
else {
|
|
26
29
|
draft.view.verticalAlign[nucleus] = verticalAlign;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Draft } from 'immer';
|
|
2
2
|
import { State } from '../Reducer';
|
|
3
|
-
declare function handleAutoRangesDetection(draft: Draft<State>,
|
|
3
|
+
declare function handleAutoRangesDetection(draft: Draft<State>, action: any): void;
|
|
4
4
|
declare function handleAutoSpectraRangesDetection(draft: Draft<State>): void;
|
|
5
5
|
declare function handleDeleteRange(draft: Draft<State>, action: any): void;
|
|
6
6
|
declare function handleChangeRangeSignalKind(draft: Draft<State>, action: any): void;
|
|
@@ -14,7 +14,7 @@ import getRange from '../helper/getRange';
|
|
|
14
14
|
import { handleUpdateCorrelations } from './CorrelationsActions';
|
|
15
15
|
import { setDomain, setIntegralsYDomain } from './DomainActions';
|
|
16
16
|
import { resetSelectedTool } from './ToolsActions';
|
|
17
|
-
function handleAutoRangesDetection(draft,
|
|
17
|
+
function handleAutoRangesDetection(draft, action) {
|
|
18
18
|
const { data, xDomain, molecules, view: { spectra: { activeTab: nucleus }, ranges, }, } = draft;
|
|
19
19
|
const activeSpectrum = getActiveSpectrum(draft);
|
|
20
20
|
if (activeSpectrum?.id) {
|
|
@@ -31,14 +31,19 @@ function handleAutoRangesDetection(draft, options) {
|
|
|
31
31
|
const [from, to] = xDomain;
|
|
32
32
|
const windowFromIndex = xFindClosestIndex(datum.data.x, from);
|
|
33
33
|
const windowToIndex = xFindClosestIndex(datum.data.x, to);
|
|
34
|
+
// minMaxRatio default 0.05, lookNegative default false,
|
|
35
|
+
const { minMaxRatio, lookNegative } = action.payload;
|
|
34
36
|
const detectionOptions = {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
peakPicking: {
|
|
38
|
+
factorStd: 8,
|
|
39
|
+
integrationSum: 100,
|
|
40
|
+
compile: true,
|
|
41
|
+
frequencyCluster: 16,
|
|
42
|
+
clean: true,
|
|
43
|
+
keepPeaks: true,
|
|
44
|
+
minMaxRatio,
|
|
45
|
+
lookNegative,
|
|
46
|
+
},
|
|
42
47
|
};
|
|
43
48
|
detectRanges(datum, {
|
|
44
49
|
...detectionOptions,
|
|
@@ -143,7 +148,10 @@ function handleDeleteSignal(draft, action) {
|
|
|
143
148
|
const rangeIndex = datum1D.ranges.values.findIndex((_range) => _range.id === range.id);
|
|
144
149
|
const signalIndex = range.signals.findIndex((_signal) => _signal.id === signal.id);
|
|
145
150
|
// remove assignments for the signal range object in global state
|
|
146
|
-
const _range = unlink(cloneDeep(range),
|
|
151
|
+
const _range = unlink(cloneDeep(range), {
|
|
152
|
+
unlinkType: 'signal',
|
|
153
|
+
signalIndex,
|
|
154
|
+
});
|
|
147
155
|
if (unlinkSignalInAssignmentData === true) {
|
|
148
156
|
unlinkInAssignmentData(assignmentData, [{ signals: [signal] }]);
|
|
149
157
|
}
|
|
@@ -169,10 +177,10 @@ function handleUnlinkRange(draft, action) {
|
|
|
169
177
|
let newRange = {};
|
|
170
178
|
let id = rangeData.id;
|
|
171
179
|
if (rangeData && signalIndex === -1) {
|
|
172
|
-
newRange = unlink(range, 'range');
|
|
180
|
+
newRange = unlink(range, { unlinkType: 'range' });
|
|
173
181
|
}
|
|
174
182
|
else {
|
|
175
|
-
newRange = unlink(range, 'signal',
|
|
183
|
+
newRange = unlink(range, { unlinkType: 'signal', signalIndex });
|
|
176
184
|
id = rangeData.signals[signalIndex].id;
|
|
177
185
|
}
|
|
178
186
|
// remove assignments in assignment hook data
|
|
@@ -15,8 +15,8 @@ import { getActiveSpectra } from '../helper/getActiveSpectra';
|
|
|
15
15
|
import { getActiveSpectraAsObject, isActiveSpectrum, } from '../helper/getActiveSpectraAsObject';
|
|
16
16
|
import { getActiveSpectrum } from '../helper/getActiveSpectrum';
|
|
17
17
|
import { setDomain, setMode } from './DomainActions';
|
|
18
|
-
import {
|
|
19
|
-
import { setTab, setActiveTab, setMargin } from './ToolsActions';
|
|
18
|
+
import { rollbackSpectrumByFilter } from './FiltersActions';
|
|
19
|
+
import { setTab, setActiveTab, setMargin, resetSelectedTool, } from './ToolsActions';
|
|
20
20
|
function checkIsVisible2D(datum) {
|
|
21
21
|
if (!datum.display.isPositiveVisible && !datum.display.isNegativeVisible) {
|
|
22
22
|
return false;
|
|
@@ -161,24 +161,26 @@ function handleChangeActiveSpectrum(draft, action) {
|
|
|
161
161
|
spectra &&
|
|
162
162
|
spectra?.length > 0 &&
|
|
163
163
|
spectraIds?.length > 0;
|
|
164
|
-
if (options[toolOptions.selectedTool].isFilter) {
|
|
165
|
-
toolOptions.selectedTool = options.zoom.id;
|
|
166
|
-
toolOptions.data.baselineCorrection = { zones: [], options: {} };
|
|
167
|
-
toolOptions.selectedOptionPanel = null;
|
|
168
|
-
draft.tempData = null;
|
|
169
|
-
}
|
|
170
164
|
/**
|
|
171
|
-
* if the active spectrum not is FID then
|
|
172
|
-
* if the new active spectrum different than the previous active spectrum fid then refresh the domain
|
|
165
|
+
* if the active spectrum not is FID then do not refresh the domain and the mode when the first time you activate spectrum
|
|
166
|
+
* if the new active spectrum different than the previous active spectrum fid then refresh the domain and the mode.
|
|
173
167
|
*/
|
|
174
168
|
if (toolOptions.data.activeFilterID) {
|
|
175
|
-
|
|
169
|
+
const previousActiveSpectrum = spectra?.length === 1 ? spectra[0] : null;
|
|
170
|
+
rollbackSpectrumByFilter(draft, {
|
|
171
|
+
activeSpectrum: previousActiveSpectrum,
|
|
172
|
+
reset: true,
|
|
173
|
+
});
|
|
176
174
|
}
|
|
177
175
|
else if (refreshDomain) {
|
|
178
176
|
setDomain(draft);
|
|
179
177
|
setMargin(draft);
|
|
180
178
|
setMode(draft);
|
|
181
179
|
}
|
|
180
|
+
if (options[toolOptions.selectedTool].isFilter &&
|
|
181
|
+
!toolOptions.data.activeFilterID) {
|
|
182
|
+
resetSelectedTool(draft);
|
|
183
|
+
}
|
|
182
184
|
}
|
|
183
185
|
function changeSpectrumSetting(draft, { id, display }) {
|
|
184
186
|
const index = draft.data.findIndex((d) => d.id === id);
|
|
@@ -245,8 +247,8 @@ function addMissingProjectionHandler(draft, action) {
|
|
|
245
247
|
const activeSpectrum = getActiveSpectrum(draft);
|
|
246
248
|
if (activeSpectrum?.id) {
|
|
247
249
|
const { index } = activeSpectrum;
|
|
248
|
-
const
|
|
249
|
-
const { info, data } =
|
|
250
|
+
const Spectrum2D = state.data[index];
|
|
251
|
+
const { info, data } = Spectrum2D;
|
|
250
252
|
for (let n of nucleus) {
|
|
251
253
|
const datum1D = getMissingProjection(info.isFid ? data.re : data.rr, n, info, draft.usedColors);
|
|
252
254
|
draft.data.push(datum1D);
|
|
@@ -2,8 +2,12 @@ import { Draft } from 'immer';
|
|
|
2
2
|
import { State } from '../Reducer';
|
|
3
3
|
import { SetDomainOptions } from './DomainActions';
|
|
4
4
|
declare function resetSelectedTool(draft: Draft<State>, filterOnly?: boolean): void;
|
|
5
|
+
interface ActivateToolOptions {
|
|
6
|
+
toolId: string;
|
|
7
|
+
reset?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare function activateTool(draft: any, options: ActivateToolOptions): void;
|
|
5
10
|
declare function setSelectedTool(draft: Draft<State>, action: any): void;
|
|
6
|
-
declare function setSelectedOptionPanel(draft: Draft<State>, selectedOptionPanel: any): void;
|
|
7
11
|
declare function setSpectrumsVerticalAlign(draft: Draft<State>): void;
|
|
8
12
|
declare function handleChangeSpectrumDisplayMode(draft: Draft<State>): void;
|
|
9
13
|
declare function handleAddBaseLineZone(draft: Draft<State>, { from, to }: {
|
|
@@ -31,4 +35,4 @@ declare function levelChangeHandler(draft: Draft<State>, { deltaY, shiftKey }: {
|
|
|
31
35
|
}): void;
|
|
32
36
|
declare function setSpectraSameTopHandler(draft: Draft<State>): void;
|
|
33
37
|
declare function resetSpectraScale(draft: Draft<State>): void;
|
|
34
|
-
export { resetSelectedTool, setSelectedTool,
|
|
38
|
+
export { resetSelectedTool, setSelectedTool, activateTool, setSpectrumsVerticalAlign, handleChangeSpectrumDisplayMode, handleAddBaseLineZone, handleDeleteBaseLineZone, handleToggleRealImaginaryVisibility, handleBrushEnd, setVerticalIndicatorXPosition, handleZoom, zoomOut, handelSetActiveTab, levelChangeHandler, setActiveTab, setTab, setSpectraSameTopHandler, resetSpectraScale, setMargin, };
|
|
@@ -5,7 +5,7 @@ import { contoursManager } from '../../../data/data2d/Spectrum2D/contours';
|
|
|
5
5
|
import { getYScale, getXScale } from '../../1d/utilities/scale';
|
|
6
6
|
import { LAYOUT } from '../../2d/utilities/DimensionLayout';
|
|
7
7
|
import { get2DYScale } from '../../2d/utilities/scale';
|
|
8
|
-
import { options } from '../../toolbar/ToolTypes';
|
|
8
|
+
import { options as Tools } from '../../toolbar/ToolTypes';
|
|
9
9
|
import groupByInfoKey from '../../utility/GroupByInfoKey';
|
|
10
10
|
import { getSpectraByNucleus } from '../../utility/getSpectraByNucleus';
|
|
11
11
|
import { rangeStateInit } from '../Reducer';
|
|
@@ -16,36 +16,35 @@ import { getActiveSpectra } from '../helper/getActiveSpectra';
|
|
|
16
16
|
import { getActiveSpectrum } from '../helper/getActiveSpectrum';
|
|
17
17
|
import { getVerticalAlign } from '../helper/getVerticalAlign';
|
|
18
18
|
import { setDomain, setIntegralsYDomain, setMode, } from './DomainActions';
|
|
19
|
-
import { calculateBaseLineCorrection,
|
|
19
|
+
import { calculateBaseLineCorrection, rollbackSpectrumByFilter, rollbackSpectrum, } from './FiltersActions';
|
|
20
20
|
import { changeSpectrumVerticalAlignment } from './PreferencesActions';
|
|
21
|
-
function resetTool(draft,
|
|
21
|
+
function resetTool(draft, options = {}) {
|
|
22
|
+
const { resetToDefaultTool = true, resetFiltersOptionPanel = true, defaultToolId = Tools.zoom.id, resetSpectrum = false, } = options;
|
|
22
23
|
// reset temp range
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
draft.toolOptions.selectedTool = options.zoom.id;
|
|
24
|
+
if (resetFiltersOptionPanel) {
|
|
25
|
+
draft.toolOptions.selectedOptionPanel = null;
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
resetSpectrumByFilter(draft);
|
|
27
|
+
if (resetToDefaultTool) {
|
|
28
|
+
draft.toolOptions.selectedTool = defaultToolId;
|
|
30
29
|
}
|
|
31
|
-
if (draft.tempData)
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
if ((draft.toolOptions.data.activeFilterID || draft.tempData) &&
|
|
31
|
+
resetSpectrum) {
|
|
32
|
+
rollbackSpectrumByFilter(draft, { reset: true });
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
function resetSelectedTool(draft, filterOnly = false) {
|
|
37
36
|
if ((draft.toolOptions.selectedTool &&
|
|
38
|
-
|
|
37
|
+
Tools[draft.toolOptions.selectedTool].isFilter) ||
|
|
39
38
|
!filterOnly) {
|
|
40
|
-
resetTool(draft);
|
|
39
|
+
resetTool(draft, { resetSpectrum: true });
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
|
-
function
|
|
44
|
-
const {
|
|
42
|
+
function activateTool(draft, options) {
|
|
43
|
+
const { toolId, reset = false } = options;
|
|
45
44
|
if (draft?.data.length > 0) {
|
|
46
|
-
if (
|
|
45
|
+
if (toolId) {
|
|
47
46
|
// start Range edit mode
|
|
48
|
-
if (
|
|
47
|
+
if (toolId === Tools.editRange.id) {
|
|
49
48
|
const activeSpectrum = getActiveSpectrum(draft);
|
|
50
49
|
if (activeSpectrum) {
|
|
51
50
|
const range = draft.view.ranges.find((r) => r.spectrumID === activeSpectrum?.id);
|
|
@@ -61,25 +60,26 @@ function setSelectedTool(draft, action) {
|
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
62
|
}
|
|
64
|
-
if (
|
|
65
|
-
resetTool(draft, false);
|
|
63
|
+
if (toolId !== draft.toolOptions.selectedTool) {
|
|
64
|
+
resetTool(draft, { resetToDefaultTool: false });
|
|
66
65
|
}
|
|
67
|
-
draft.toolOptions.selectedTool =
|
|
68
|
-
if (
|
|
69
|
-
|
|
66
|
+
draft.toolOptions.selectedTool = toolId;
|
|
67
|
+
if (Tools[toolId]?.hasOptionPanel) {
|
|
68
|
+
draft.toolOptions.selectedOptionPanel = toolId;
|
|
70
69
|
}
|
|
71
|
-
if (
|
|
72
|
-
|
|
70
|
+
if (Tools?.[toolId]?.isFilter) {
|
|
71
|
+
rollbackSpectrum(draft, { filterKey: toolId, reset });
|
|
73
72
|
}
|
|
74
73
|
}
|
|
75
74
|
else {
|
|
76
|
-
resetTool(draft, false);
|
|
75
|
+
resetTool(draft, { resetToDefaultTool: false });
|
|
77
76
|
}
|
|
78
77
|
setMargin(draft);
|
|
79
78
|
}
|
|
80
79
|
}
|
|
81
|
-
function
|
|
82
|
-
|
|
80
|
+
function setSelectedTool(draft, action) {
|
|
81
|
+
const { selectedTool } = action.payload;
|
|
82
|
+
activateTool(draft, { toolId: selectedTool });
|
|
83
83
|
}
|
|
84
84
|
function setSpectrumsVerticalAlign(draft) {
|
|
85
85
|
const currentVerticalAlign = getVerticalAlign(draft);
|
|
@@ -207,7 +207,7 @@ function handleZoom(draft, action) {
|
|
|
207
207
|
}
|
|
208
208
|
else if (activeSpectra && activeSpectra?.length > 0) {
|
|
209
209
|
// rescale the active spectra integrals;
|
|
210
|
-
if (selectedTool ===
|
|
210
|
+
if (selectedTool === Tools.integral.id && event.shiftKey) {
|
|
211
211
|
for (const activeSpectrum of activeSpectra) {
|
|
212
212
|
//check if the integrals is visible
|
|
213
213
|
const { showRangesIntegrals } = rangeState.find((r) => r.spectrumID === activeSpectrum?.id) ||
|
|
@@ -239,11 +239,12 @@ function handleZoom(draft, action) {
|
|
|
239
239
|
function zoomOut(draft, action) {
|
|
240
240
|
if (draft?.data.length > 0) {
|
|
241
241
|
const { zoomType, trackID } = action;
|
|
242
|
-
const
|
|
242
|
+
const { xDomain, yDomain } = draft.originDomain;
|
|
243
|
+
const zoomHistory = zoomHistoryManager(draft.zoom.history, draft.view.spectra.activeTab, { xDomain, yDomain });
|
|
243
244
|
if (draft.displayerMode === DISPLAYER_MODE.DM_1D) {
|
|
244
245
|
switch (zoomType) {
|
|
245
246
|
case ZoomType.HORIZONTAL: {
|
|
246
|
-
draft.xDomain =
|
|
247
|
+
draft.xDomain = xDomain;
|
|
247
248
|
zoomHistory.clear();
|
|
248
249
|
break;
|
|
249
250
|
}
|
|
@@ -252,14 +253,16 @@ function zoomOut(draft, action) {
|
|
|
252
253
|
break;
|
|
253
254
|
case ZoomType.STEP_HORIZONTAL: {
|
|
254
255
|
const zoomValue = zoomHistory.pop();
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
256
|
+
if (zoomValue) {
|
|
257
|
+
draft.xDomain = zoomValue.xDomain;
|
|
258
|
+
}
|
|
259
|
+
else {
|
|
260
|
+
setZoom(draft, { scale: 0.8 });
|
|
261
|
+
}
|
|
259
262
|
break;
|
|
260
263
|
}
|
|
261
264
|
default: {
|
|
262
|
-
draft.xDomain =
|
|
265
|
+
draft.xDomain = xDomain;
|
|
263
266
|
setZoom(draft, { scale: 0.8 });
|
|
264
267
|
break;
|
|
265
268
|
}
|
|
@@ -296,7 +299,7 @@ function setMargin(draft) {
|
|
|
296
299
|
const activeSpectrum = getActiveSpectrum(draft);
|
|
297
300
|
const spectrum = (activeSpectrum?.id && draft.data[activeSpectrum.index]) || null;
|
|
298
301
|
if (draft.displayerMode === DISPLAYER_MODE.DM_2D &&
|
|
299
|
-
(draft.toolOptions.selectedTool ===
|
|
302
|
+
(draft.toolOptions.selectedTool === Tools.slicing.id ||
|
|
300
303
|
spectrum?.info.isFid)) {
|
|
301
304
|
draft.margin = MARGIN['2D'];
|
|
302
305
|
}
|
|
@@ -431,4 +434,4 @@ function resetSpectraScale(draft) {
|
|
|
431
434
|
draft.yDomain = draft.originDomain.yDomain;
|
|
432
435
|
setZoom(draft, { scale: 0.8 });
|
|
433
436
|
}
|
|
434
|
-
export { resetSelectedTool, setSelectedTool,
|
|
437
|
+
export { resetSelectedTool, setSelectedTool, activateTool, setSpectrumsVerticalAlign, handleChangeSpectrumDisplayMode, handleAddBaseLineZone, handleDeleteBaseLineZone, handleToggleRealImaginaryVisibility, handleBrushEnd, setVerticalIndicatorXPosition, handleZoom, zoomOut, handelSetActiveTab, levelChangeHandler, setActiveTab, setTab, setSpectraSameTopHandler, resetSpectraScale, setMargin, };
|
|
@@ -2,7 +2,7 @@ import { Draft } from 'immer';
|
|
|
2
2
|
import { State } from '../Reducer';
|
|
3
3
|
declare function changeZonesFactorHandler(draft: Draft<State>, action: any): void;
|
|
4
4
|
declare function add2dZoneHandler(draft: Draft<State>, action: any): void;
|
|
5
|
-
declare function handleAutoZonesDetection(draft: Draft<State>,
|
|
5
|
+
declare function handleAutoZonesDetection(draft: Draft<State>, action: any): void;
|
|
6
6
|
declare function handleAutoSpectraZonesDetection(draft: Draft<State>): void;
|
|
7
7
|
declare function changeZoneSignalDelta(draft: Draft<State>, action: any): void;
|
|
8
8
|
declare function handleChangeZoneSignalKind(draft: Draft<State>, action: any): void;
|
|
@@ -12,7 +12,7 @@ import { getActiveSpectrum } from '../helper/getActiveSpectrum';
|
|
|
12
12
|
import { handleUpdateCorrelations } from './CorrelationsActions';
|
|
13
13
|
import { setDomain } from './DomainActions';
|
|
14
14
|
function changeZonesFactorHandler(draft, action) {
|
|
15
|
-
draft.toolOptions.data.zonesNoiseFactor = action.payload;
|
|
15
|
+
draft.toolOptions.data.zonesNoiseFactor = action.payload.thresholdFactor;
|
|
16
16
|
}
|
|
17
17
|
function add2dZoneHandler(draft, action) {
|
|
18
18
|
const activeSpectrum = getActiveSpectrum(draft);
|
|
@@ -29,13 +29,17 @@ function add2dZoneHandler(draft, action) {
|
|
|
29
29
|
handleOnChangeZonesData(draft);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
function handleAutoZonesDetection(draft,
|
|
32
|
+
function handleAutoZonesDetection(draft, action) {
|
|
33
33
|
const activeSpectrum = getActiveSpectrum(draft);
|
|
34
34
|
if (activeSpectrum?.id) {
|
|
35
35
|
const { index } = activeSpectrum;
|
|
36
|
+
const { thresholdFactor } = action.payload;
|
|
36
37
|
const [fromX, toX] = draft.xDomain;
|
|
37
38
|
const [fromY, toY] = draft.yDomain;
|
|
38
|
-
detectionOptions
|
|
39
|
+
const detectionOptions = {
|
|
40
|
+
selectedZone: { fromX, toX, fromY, toY },
|
|
41
|
+
thresholdFactor,
|
|
42
|
+
};
|
|
39
43
|
const datum = draft.data[index];
|
|
40
44
|
const zones = detectZones(original(datum), detectionOptions);
|
|
41
45
|
datum.zones.values = datum.zones.values.concat(zones);
|
|
@@ -12,5 +12,5 @@ interface ZoomHistoryManager {
|
|
|
12
12
|
getLast: () => HistoryItem;
|
|
13
13
|
clear: () => void;
|
|
14
14
|
}
|
|
15
|
-
export default function zoomHistoryManager(zoomHistory: ZoomHistory, nucleus: string): ZoomHistoryManager;
|
|
15
|
+
export default function zoomHistoryManager(zoomHistory: ZoomHistory, nucleus: string, baseZoom?: HistoryItem): ZoomHistoryManager;
|
|
16
16
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export default function zoomHistoryManager(zoomHistory, nucleus) {
|
|
1
|
+
export default function zoomHistoryManager(zoomHistory, nucleus, baseZoom) {
|
|
2
2
|
if (!zoomHistory[nucleus] && !Array.isArray(zoomHistory[nucleus])) {
|
|
3
3
|
zoomHistory[nucleus] = [];
|
|
4
4
|
}
|
|
5
5
|
const push = preparePush(zoomHistory[nucleus]);
|
|
6
|
-
const pop = preparePop(zoomHistory[nucleus]);
|
|
6
|
+
const pop = preparePop(zoomHistory[nucleus], baseZoom);
|
|
7
7
|
const getLast = prepareGetLast(zoomHistory[nucleus]);
|
|
8
8
|
const clear = () => (zoomHistory[nucleus] = []);
|
|
9
9
|
return { historyStack: zoomHistory[nucleus], push, pop, getLast, clear };
|
|
@@ -13,9 +13,12 @@ function preparePush(historyStack) {
|
|
|
13
13
|
historyStack.push(val);
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
function preparePop(historyStack) {
|
|
16
|
+
function preparePop(historyStack, baseZoom) {
|
|
17
17
|
return () => {
|
|
18
18
|
const val = historyStack.pop();
|
|
19
|
+
if (val && historyStack.length === 0) {
|
|
20
|
+
return baseZoom || null;
|
|
21
|
+
}
|
|
19
22
|
return val ? historyStack[historyStack.length - 1] : null;
|
|
20
23
|
};
|
|
21
24
|
}
|