nmrium 0.34.0 → 0.35.0-pre.1683281080
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
|
@@ -13,7 +13,7 @@ import { setPreferences } from './actions/setPreferences';
|
|
|
13
13
|
import { setVerticalSplitterPosition } from './actions/setVerticalSplitterPosition';
|
|
14
14
|
import { setWorkspace } from './actions/setWorkspace';
|
|
15
15
|
import { mapWorkspaces } from './utilities/mapWorkspaces';
|
|
16
|
-
const LOCAL_STORAGE_VERSION =
|
|
16
|
+
const LOCAL_STORAGE_VERSION = 16;
|
|
17
17
|
export const WORKSPACES_KEYS = {
|
|
18
18
|
componentKey: `nmrium-component-workspace`,
|
|
19
19
|
nmriumKey: `nmrium-file-workspace`,
|
|
@@ -66,9 +66,6 @@ export function initPreferencesState(state) {
|
|
|
66
66
|
removeData('nmr-general-settings');
|
|
67
67
|
const data = {
|
|
68
68
|
version: LOCAL_STORAGE_VERSION,
|
|
69
|
-
...(localData?.currentWorkspace && {
|
|
70
|
-
currentWorkspace: localData?.currentWorkspace,
|
|
71
|
-
}),
|
|
72
69
|
workspaces: {},
|
|
73
70
|
};
|
|
74
71
|
storeData('nmr-general-settings', JSON.stringify(data));
|
|
@@ -58,7 +58,6 @@ export declare const CALCULATE_ZERO_FILLING_FILTER = "CALCULATE_ZERO_FILLING_FIL
|
|
|
58
58
|
export declare const APPLY_MANUAL_PHASE_CORRECTION_FILTER = "APPLY_MANUAL_PHASE_CORRECTION_FILTER";
|
|
59
59
|
export declare const APPLY_AUTO_PHASE_CORRECTION_FILTER = "APPLY_AUTO_PHASE_CORRECTION_FILTER";
|
|
60
60
|
export declare const APPLY_ABSOLUTE_FILTER = "APPLY_ABSOLUTE_FILTER";
|
|
61
|
-
export declare const DISABLE_FILTER_LIVE_PREVIEW = "DISABLE_FILTER_LIVE_PREVIEW`";
|
|
62
61
|
export declare const SET_VERTICAL_INDICATOR_X_POSITION = "SET_VERTICAL_INDICATOR_X_POSITION";
|
|
63
62
|
export declare const AUTO_PEAK_PICKING = "AUTO_PEAK_PICKING";
|
|
64
63
|
export declare const OPTIMIZE_PEAKS = "OPTIMIZE_PEAKS";
|
|
@@ -66,7 +65,6 @@ export declare const AUTO_RANGES_DETECTION = "AUTO_RANGES_DETECTION";
|
|
|
66
65
|
export declare const AUTO_ZONES_DETECTION = "AUTO_ZONES_DETECTION";
|
|
67
66
|
export declare const DELETE_RANGE = "DELETE_RANGE";
|
|
68
67
|
export declare const DELETE_1D_SIGNAL = "DELETE_1D_SIGNAL";
|
|
69
|
-
export declare const SET_SELECTED_OPTIONS_PANEL = "SET_SELECTED_OPTIONS_PANEL";
|
|
70
68
|
export declare const SET_LOADING_FLAG = "SET_LOADING_FLAG";
|
|
71
69
|
export declare const RESET_SELECTED_TOOL = "RESET_SELECTED_TOOL";
|
|
72
70
|
export declare const SET_SPECTRUMS_VERTICAL_ALIGN = "SET_SPECTRUMS_VERTICAL_AlIGN";
|
|
@@ -52,7 +52,6 @@ export const CALCULATE_ZERO_FILLING_FILTER = 'CALCULATE_ZERO_FILLING_FILTER`';
|
|
|
52
52
|
export const APPLY_MANUAL_PHASE_CORRECTION_FILTER = 'APPLY_MANUAL_PHASE_CORRECTION_FILTER';
|
|
53
53
|
export const APPLY_AUTO_PHASE_CORRECTION_FILTER = 'APPLY_AUTO_PHASE_CORRECTION_FILTER';
|
|
54
54
|
export const APPLY_ABSOLUTE_FILTER = 'APPLY_ABSOLUTE_FILTER';
|
|
55
|
-
export const DISABLE_FILTER_LIVE_PREVIEW = 'DISABLE_FILTER_LIVE_PREVIEW`';
|
|
56
55
|
export const SET_VERTICAL_INDICATOR_X_POSITION = 'SET_VERTICAL_INDICATOR_X_POSITION';
|
|
57
56
|
export const AUTO_PEAK_PICKING = 'AUTO_PEAK_PICKING';
|
|
58
57
|
export const OPTIMIZE_PEAKS = 'OPTIMIZE_PEAKS';
|
|
@@ -60,7 +59,6 @@ export const AUTO_RANGES_DETECTION = 'AUTO_RANGES_DETECTION';
|
|
|
60
59
|
export const AUTO_ZONES_DETECTION = 'AUTO_ZONES_DETECTION';
|
|
61
60
|
export const DELETE_RANGE = 'DELETE_RANGE';
|
|
62
61
|
export const DELETE_1D_SIGNAL = 'DELETE_1D_SIGNAL';
|
|
63
|
-
export const SET_SELECTED_OPTIONS_PANEL = 'SET_SELECTED_OPTIONS_PANEL';
|
|
64
62
|
export const SET_LOADING_FLAG = 'SET_LOADING_FLAG';
|
|
65
63
|
export const RESET_SELECTED_TOOL = 'RESET_SELECTED_TOOL';
|
|
66
64
|
export const SET_SPECTRUMS_VERTICAL_ALIGN = 'SET_SPECTRUMS_VERTICAL_AlIGN';
|
|
@@ -152,10 +152,10 @@ function BasicToolBarInner({ verticalAlign, ftCounter, fidCounter, }) {
|
|
|
152
152
|
}, items: importMenu })), isButtonVisible('exportAs') && (_jsx(ToolbarMenu, { component: _jsx(FaFileExport, {}), toolTip: "Export As", onClick: (element) => {
|
|
153
153
|
exportHandler(element);
|
|
154
154
|
return null;
|
|
155
|
-
}, items: exportMenu })), isButtonVisible('spectraStackAlignments') && ftCounter > 1 && (_jsx(Toolbar.Item, { id: "spectra-alignment", className: "cheminfo", title: "Spectra alignment ( Press s )", onClick: changeDisplayViewModeHandler, children: verticalAlign === 'stack' ? (_jsx(SvgNmrOverlay3Aligned, {})) : (_jsx(SvgNmrOverlay3, {})) })), isButtonVisible('realImaginary') && (_jsx(Toolbar.Item, { id: "display", title: isRealSpectrumShown ? 'Display
|
|
155
|
+
}, items: exportMenu })), isButtonVisible('spectraStackAlignments') && ftCounter > 1 && (_jsx(Toolbar.Item, { id: "spectra-alignment", className: "cheminfo", title: "Spectra alignment ( Press s )", onClick: changeDisplayViewModeHandler, children: verticalAlign === 'stack' ? (_jsx(SvgNmrOverlay3Aligned, {})) : (_jsx(SvgNmrOverlay3, {})) })), isButtonVisible('realImaginary') && (_jsx(Toolbar.Item, { id: "display", title: isRealSpectrumShown ? 'Display real ' : 'Display imaginary', onClick: changeSpectrumViewHandler, className: "cheminfo", children: _jsx(SvgNmrRealImag, {}) })), isButtonVisible('spectraCenterAlignments') &&
|
|
156
156
|
(ftCounter > 0 || fidCounter > 0) && (_jsx(Toolbar.Item, { id: "baseline-position", title: verticalAlign === 'bottom'
|
|
157
|
-
? 'Baseline
|
|
158
|
-
: 'Baseline
|
|
157
|
+
? 'Baseline center ( Press c )'
|
|
158
|
+
: 'Baseline bottom ( Press c )', onClick: alignSpectrumsVerticallyHandler, className: "cheminfo", children: _jsx("div", { style: { fontSize: 24 }, children: verticalAlign === 'bottom' ? (_jsx(SvgNmrAlignCenter, {})) : (_jsx(SvgNmrAlignBottom, {})) }) }))] }));
|
|
159
159
|
}
|
|
160
160
|
const MemoizedBasicToolBar = memo(BasicToolBarInner);
|
|
161
161
|
export default function BasicToolBar() {
|
|
@@ -34,8 +34,8 @@ function FunctionToolBarInner({ defaultValue, ftCounter, }) {
|
|
|
34
34
|
return (_jsxs(_Fragment, { children: [_jsxs(ToggleButtonGroup, { value: option, onChange: handleChange, children: [isButtonVisible('zoom') && (_jsx(ToggleButton, { value: options.zoom.id, id: options.zoom.id, title: `${options.zoom.label} ( Press z )`, children: _jsx(FaSearchPlus, {}) }, options.zoom.id)), isButtonVisible('zoomOut') && (_jsx(Toolbar.Item, { id: "zoom-out", onClick: handleFullZoomOut, title: "Horizontal zoom out ( Press f ), Horizontal and Vertical zoom out, double click ( Press ff )", children: _jsx(FaExpand, {}) })), isButtonVisible('peakPicking') && (_jsx(ToggleButton, { value: options.peakPicking.id, title: `${options.peakPicking.label} ( Press p )`, id: options.peakPicking.id, children: _jsx(SvgNmrPeakPicking, {}) }, options.peakPicking.id)), isButtonVisible('integral') && (_jsx(ToggleButton, { value: options.integral.id, id: options.integral.id, title: `${options.integral.label} ( Press i )`, children: _jsx(SvgNmrIntegrate, {}) }, options.integral.id)), isButtonVisible('zonePicking') && (_jsx(ToggleButton, { value: options.zonePicking.id, id: options.zonePicking.id, title: `${options.zonePicking.label} ( Press r )`, children: _jsx(FaDiceFour, {}) }, options.zonePicking.id)), isButtonVisible('slicing') && (_jsx(ToggleButton, { value: options.slicing.id, id: options.slicing.id, title: `${options.slicing.label}`, children: _jsx("p", { children: "Slic" }) }, options.slicing.id)), isButtonVisible('rangePicking') && (_jsx(ToggleButton, { value: options.rangePicking.id, title: `${options.rangePicking.label} ( Press r )`, id: options.rangePicking.id, children: _jsx(SvgNmrRangePicking, {}) }, options.rangePicking.id)), isButtonVisible('multipleSpectraAnalysis', {
|
|
35
35
|
checkSpectrumType: false,
|
|
36
36
|
}) &&
|
|
37
|
-
ftCounter > 1 && (_jsx(ToggleButton, { value: options.multipleSpectraAnalysis.id, id: options.multipleSpectraAnalysis.id, title: options.multipleSpectraAnalysis.label, children: _jsx(SvgNmrMultipleAnalysis, {}) }, options.multipleSpectraAnalysis.id)), isButtonVisible('apodization') && (_jsx(ToggleButton, { value: options.apodization.id, id: options.apodization.id, title: options.apodization.label
|
|
38
|
-
ftCounter > 0 && (_jsx(ToggleButton, { value: options.exclusionZones.id, title: `${options.exclusionZones.label} ( Press e )`, id: options.exclusionZones.id, children: _jsx("div", { style: { fontSize: 18 }, children: _jsx(SvgNmrMultipleAnalysis, {}) }) }, options.exclusionZones.id))] }), isButtonVisible('
|
|
37
|
+
ftCounter > 1 && (_jsx(ToggleButton, { value: options.multipleSpectraAnalysis.id, id: options.multipleSpectraAnalysis.id, title: options.multipleSpectraAnalysis.label, children: _jsx(SvgNmrMultipleAnalysis, {}) }, options.multipleSpectraAnalysis.id)), isButtonVisible('apodization') && (_jsx(ToggleButton, { value: options.apodization.id, id: options.apodization.id, title: `${options.apodization.label} (Press a)`, children: _jsx(SvgNmrApodization, {}) }, options.apodization.id)), isButtonVisible('zeroFilling') && (_jsx(ToggleButton, { value: options.zeroFilling.id, id: options.zeroFilling.id, title: options.zeroFilling.label, children: _jsx(SvgNmrZeroFilling, {}) }, options.zeroFilling.id)), isButtonVisible('phaseCorrection') && (_jsx(ToggleButton, { value: options.phaseCorrection.id, id: options.phaseCorrection.id, title: `${options.phaseCorrection.label} ( Press a )`, children: _jsx(SvgNmrPhaseCorrection, {}) }, options.phaseCorrection.id)), isButtonVisible('baselineCorrection') && (_jsx(ToggleButton, { value: options.baselineCorrection.id, id: options.baselineCorrection.id, title: `${options.baselineCorrection.label} ( Press b )`, children: _jsx(SvgNmrBaselineCorrection, {}) }, options.baselineCorrection.id)), isButtonVisible('exclusionZones', { checkSpectrumType: false }) &&
|
|
38
|
+
ftCounter > 0 && (_jsx(ToggleButton, { value: options.exclusionZones.id, title: `${options.exclusionZones.label} ( Press e )`, id: options.exclusionZones.id, children: _jsx("div", { style: { fontSize: 18 }, children: _jsx(SvgNmrMultipleAnalysis, {}) }) }, options.exclusionZones.id))] }), isButtonVisible('fft') && (_jsx(Toolbar.Item, { id: options.fft.id, className: "cheminfo", title: options.fft.label, onClick: handleOnFFTFilter, children: _jsx(SvgNmrFourierTransform, {}) }))] }));
|
|
39
39
|
}
|
|
40
40
|
const MemoizedFunctionToolBar = memo(FunctionToolBarInner);
|
|
41
41
|
export default function FunctionToolBar({ defaultValue = options.zoom.id, }) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Info1D } from '
|
|
2
|
-
import { Info2D } from '../../data/types/data2d';
|
|
1
|
+
import { Info1D, Info2D } from 'nmr-load-save';
|
|
3
2
|
import { NMRiumToolBarPreferences } from '../../types/NMRiumToolBarPreferences';
|
|
4
3
|
import { DISPLAYER_MODE } from '../reducer/core/Constants';
|
|
5
4
|
type InfoKey = keyof Info1D | keyof Info2D;
|
|
@@ -10,7 +10,7 @@ export const options = {
|
|
|
10
10
|
},
|
|
11
11
|
peakPicking: {
|
|
12
12
|
id: 'peakPicking',
|
|
13
|
-
label: 'Peaks
|
|
13
|
+
label: 'Peaks picking',
|
|
14
14
|
hasOptionPanel: true,
|
|
15
15
|
isFilter: false,
|
|
16
16
|
mode: DISPLAYER_MODE.DM_1D,
|
|
@@ -24,7 +24,7 @@ export const options = {
|
|
|
24
24
|
},
|
|
25
25
|
integral: {
|
|
26
26
|
id: 'integral',
|
|
27
|
-
label: '
|
|
27
|
+
label: 'Integral Tool',
|
|
28
28
|
hasOptionPanel: false,
|
|
29
29
|
isFilter: false,
|
|
30
30
|
mode: DISPLAYER_MODE.DM_1D,
|
|
@@ -38,7 +38,7 @@ export const options = {
|
|
|
38
38
|
},
|
|
39
39
|
zonePicking: {
|
|
40
40
|
id: 'zonePicking',
|
|
41
|
-
label: 'Zone
|
|
41
|
+
label: 'Zone tool',
|
|
42
42
|
hasOptionPanel: true,
|
|
43
43
|
isFilter: false,
|
|
44
44
|
mode: DISPLAYER_MODE.DM_2D,
|
|
@@ -52,7 +52,7 @@ export const options = {
|
|
|
52
52
|
},
|
|
53
53
|
slicing: {
|
|
54
54
|
id: 'slicing',
|
|
55
|
-
label: 'Slicing
|
|
55
|
+
label: 'Slicing tool',
|
|
56
56
|
hasOptionPanel: false,
|
|
57
57
|
isFilter: false,
|
|
58
58
|
mode: DISPLAYER_MODE.DM_2D,
|
|
@@ -80,7 +80,7 @@ export const options = {
|
|
|
80
80
|
},
|
|
81
81
|
equalizer: {
|
|
82
82
|
id: 'equalizer',
|
|
83
|
-
label: 'Equalizer
|
|
83
|
+
label: 'Equalizer tool',
|
|
84
84
|
hasOptionPanel: false,
|
|
85
85
|
isFilter: false,
|
|
86
86
|
mode: DISPLAYER_MODE.DM_1D,
|
|
@@ -201,7 +201,7 @@ export const options = {
|
|
|
201
201
|
},
|
|
202
202
|
multipleSpectraAnalysis: {
|
|
203
203
|
id: 'multipleSpectraAnalysis',
|
|
204
|
-
label: 'Multiple
|
|
204
|
+
label: 'Multiple spectra analysis',
|
|
205
205
|
hasOptionPanel: false,
|
|
206
206
|
isFilter: false,
|
|
207
207
|
mode: DISPLAYER_MODE.DM_1D,
|
|
@@ -218,7 +218,7 @@ export const options = {
|
|
|
218
218
|
},
|
|
219
219
|
exclusionZones: {
|
|
220
220
|
id: 'exclusionZones',
|
|
221
|
-
label: 'Exclusion
|
|
221
|
+
label: 'Exclusion zones',
|
|
222
222
|
hasOptionPanel: false,
|
|
223
223
|
isFilter: false,
|
|
224
224
|
mode: DISPLAYER_MODE.DM_1D,
|
|
@@ -235,7 +235,7 @@ export const options = {
|
|
|
235
235
|
},
|
|
236
236
|
matrixGenerationExclusionZones: {
|
|
237
237
|
id: 'matrixGenerationExclusionZones',
|
|
238
|
-
label: 'Matrix
|
|
238
|
+
label: 'Matrix generations exclusion zones',
|
|
239
239
|
hasOptionPanel: false,
|
|
240
240
|
isFilter: false,
|
|
241
241
|
mode: DISPLAYER_MODE.DM_1D,
|
|
@@ -252,7 +252,7 @@ export const options = {
|
|
|
252
252
|
},
|
|
253
253
|
databaseRangesSelection: {
|
|
254
254
|
id: 'databaseRangesSelection',
|
|
255
|
-
label: 'Filter
|
|
255
|
+
label: 'Filter database',
|
|
256
256
|
hasOptionPanel: false,
|
|
257
257
|
isFilter: false,
|
|
258
258
|
mode: DISPLAYER_MODE.DM_1D,
|
|
@@ -266,12 +266,12 @@ export const options = {
|
|
|
266
266
|
},
|
|
267
267
|
exportAs: {
|
|
268
268
|
id: 'exportAs',
|
|
269
|
-
label: '
|
|
269
|
+
label: 'Export as',
|
|
270
270
|
hasOptionPanel: false,
|
|
271
271
|
isFilter: false,
|
|
272
272
|
isToggle: false,
|
|
273
273
|
},
|
|
274
|
-
|
|
274
|
+
fft: {
|
|
275
275
|
id: 'fft',
|
|
276
276
|
label: 'Fourier transform',
|
|
277
277
|
hasOptionPanel: false,
|
|
@@ -290,14 +290,14 @@ export const options = {
|
|
|
290
290
|
},
|
|
291
291
|
import: {
|
|
292
292
|
id: 'import',
|
|
293
|
-
label: '
|
|
293
|
+
label: 'Import',
|
|
294
294
|
hasOptionPanel: false,
|
|
295
295
|
isFilter: false,
|
|
296
296
|
isToggle: false,
|
|
297
297
|
},
|
|
298
298
|
realImaginary: {
|
|
299
299
|
id: 'realImaginary',
|
|
300
|
-
label: '
|
|
300
|
+
label: 'Real / Imaginary',
|
|
301
301
|
hasOptionPanel: false,
|
|
302
302
|
isFilter: false,
|
|
303
303
|
mode: DISPLAYER_MODE.DM_1D,
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare function getSpectraByNucleus(nucleus: string, data: (Datum1D | Datum2D)[]): (Datum1D | Datum2D)[];
|
|
1
|
+
import { Spectrum } from 'nmr-load-save';
|
|
2
|
+
export declare function getSpectraByNucleus(nucleus: string, data: Spectrum[]): Spectrum[];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare function getSpectraObjectPaths(spectra: (Datum1D | Datum2D)[]): {
|
|
1
|
+
import { Spectrum } from 'nmr-load-save';
|
|
2
|
+
export declare function getSpectraObjectPaths(spectra: Spectrum[]): {
|
|
4
3
|
datalist: string[];
|
|
5
4
|
paths: {};
|
|
6
5
|
};
|
|
@@ -91,6 +91,7 @@ export interface DatabasePanelPreferences {
|
|
|
91
91
|
showMultiplicity: boolean;
|
|
92
92
|
color: string;
|
|
93
93
|
marginBottom: number;
|
|
94
|
+
allowSaveAsNMRium: boolean;
|
|
94
95
|
}
|
|
95
96
|
type PredefinedLegend = 'intensity' | 'name';
|
|
96
97
|
export type JpathLegendField = Omit<JpathTableColumn, 'label'>;
|
package/lib/data/Filters.d.ts
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
export * as apodization from './data1d/filter1d/apodization';
|
|
2
2
|
export * as baselineCorrection from './data1d/filter1d/baselineCorrection';
|
|
3
|
-
export * as centerMean from './data1d/filter1d/centerMean';
|
|
4
3
|
export * as digitalFilter from './data1d/filter1d/digitalFilter';
|
|
5
4
|
export * as equallySpaced from './data1d/filter1d/equallySpaced';
|
|
6
5
|
export * as exclusionZones from './data1d/filter1d/exclusionZones';
|
|
7
6
|
export * as fft from './data1d/filter1d/fft';
|
|
8
|
-
export * as fromTo from './data1d/filter1d/fromTo';
|
|
9
|
-
export * as pareto from './data1d/filter1d/pareto';
|
|
10
7
|
export * as phaseCorrection from './data1d/filter1d/phaseCorrection';
|
|
11
8
|
export * as shiftX from './data1d/filter1d/shiftX';
|
|
12
|
-
export * as standardDeviation from './data1d/filter1d/standardDeviation';
|
|
13
9
|
export * as signalProcessing from './data1d/filter1d/signalProcessing';
|
|
14
10
|
export * as zeroFilling from './data1d/filter1d/zeroFilling';
|
|
15
11
|
export * as shift2DX from './data2d/filter2d/shiftX';
|
package/lib/data/Filters.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
export * as apodization from './data1d/filter1d/apodization';
|
|
2
2
|
export * as baselineCorrection from './data1d/filter1d/baselineCorrection';
|
|
3
|
-
export * as centerMean from './data1d/filter1d/centerMean';
|
|
4
3
|
export * as digitalFilter from './data1d/filter1d/digitalFilter';
|
|
5
4
|
export * as equallySpaced from './data1d/filter1d/equallySpaced';
|
|
6
5
|
export * as exclusionZones from './data1d/filter1d/exclusionZones';
|
|
7
6
|
export * as fft from './data1d/filter1d/fft';
|
|
8
|
-
export * as fromTo from './data1d/filter1d/fromTo';
|
|
9
|
-
export * as pareto from './data1d/filter1d/pareto';
|
|
10
7
|
export * as phaseCorrection from './data1d/filter1d/phaseCorrection';
|
|
11
8
|
export * as shiftX from './data1d/filter1d/shiftX';
|
|
12
|
-
export * as standardDeviation from './data1d/filter1d/standardDeviation';
|
|
13
9
|
export * as signalProcessing from './data1d/filter1d/signalProcessing';
|
|
14
10
|
export * as zeroFilling from './data1d/filter1d/zeroFilling';
|
|
15
11
|
export * as shift2DX from './data2d/filter2d/shiftX';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { Spectrum } from 'nmr-load-save';
|
|
2
|
+
export interface FilterDomainUpdateRules {
|
|
3
|
+
updateYDomain: boolean;
|
|
4
|
+
updateXDomain: boolean;
|
|
5
|
+
}
|
|
3
6
|
export interface BaseFilter {
|
|
4
7
|
name: string;
|
|
5
8
|
value: any;
|
|
@@ -10,9 +13,18 @@ export interface BaseFilter {
|
|
|
10
13
|
export interface Filter extends Required<BaseFilter> {
|
|
11
14
|
id: string;
|
|
12
15
|
}
|
|
13
|
-
|
|
16
|
+
interface ApplyFilterOptions {
|
|
17
|
+
forceReapply?: boolean;
|
|
18
|
+
filterIndex?: number | -1;
|
|
19
|
+
}
|
|
20
|
+
declare function applyFilter(datum: Spectrum, filters?: BaseFilter[], options?: ApplyFilterOptions): void;
|
|
21
|
+
declare function lookupForFilter(datum: any, filterName: any): any;
|
|
14
22
|
declare function reapplyFilters(datum: any, filters?: any): void;
|
|
15
23
|
declare function enableFilter(datum: any, id: any, checked: any, filters?: null): void;
|
|
16
24
|
declare function deleteFilter(datum: any, id?: string): void;
|
|
17
|
-
|
|
18
|
-
|
|
25
|
+
interface AddFilterOptions {
|
|
26
|
+
filterIndex?: number;
|
|
27
|
+
isDeleteAllow?: boolean;
|
|
28
|
+
}
|
|
29
|
+
declare function addFilter(datum: any, filterOptions: any, options?: AddFilterOptions): void;
|
|
30
|
+
export { applyFilter, reapplyFilters, enableFilter, addFilter, deleteFilter, lookupForFilter, };
|
|
@@ -25,7 +25,8 @@ function updateData(datum) {
|
|
|
25
25
|
updateZones(datum);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
function applyFilter(datum, filters = [],
|
|
28
|
+
function applyFilter(datum, filters = [], options = {}) {
|
|
29
|
+
const { forceReapply = false, filterIndex } = options;
|
|
29
30
|
let isReduced = false;
|
|
30
31
|
for (let filter of filters) {
|
|
31
32
|
const filterOption = {
|
|
@@ -34,6 +35,7 @@ function applyFilter(datum, filters = [], forceReapply = false) {
|
|
|
34
35
|
value: filter.value,
|
|
35
36
|
};
|
|
36
37
|
const previousFilter = lookupForFilter(datum, filter.name);
|
|
38
|
+
const isDeleteAllow = 'isDeleteAllow' in filter ? filter.isDeleteAllow : true;
|
|
37
39
|
if (previousFilter) {
|
|
38
40
|
// eslint-disable-next-line unicorn/no-array-reduce
|
|
39
41
|
const reduceResult = Filters[filter.name].reduce(previousFilter.value, filterOption.value);
|
|
@@ -46,15 +48,11 @@ function applyFilter(datum, filters = [], forceReapply = false) {
|
|
|
46
48
|
}
|
|
47
49
|
}
|
|
48
50
|
else {
|
|
49
|
-
addFilter(datum, filterOption,
|
|
50
|
-
? filter.isDeleteAllow
|
|
51
|
-
: true);
|
|
51
|
+
addFilter(datum, filterOption, { isDeleteAllow, filterIndex });
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
else {
|
|
55
|
-
addFilter(datum, filterOption,
|
|
56
|
-
? filter.isDeleteAllow
|
|
57
|
-
: true);
|
|
55
|
+
addFilter(datum, filterOption, { isDeleteAllow, filterIndex });
|
|
58
56
|
}
|
|
59
57
|
}
|
|
60
58
|
if (forceReapply) {
|
|
@@ -145,16 +143,25 @@ function deleteFilter(datum, id) {
|
|
|
145
143
|
}
|
|
146
144
|
updateData(datum);
|
|
147
145
|
}
|
|
148
|
-
function addFilter(datum,
|
|
146
|
+
function addFilter(datum, filterOptions, options = {}) {
|
|
147
|
+
const { filterIndex, isDeleteAllow = true } = options;
|
|
149
148
|
const id = v4();
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
datum.filters.push({
|
|
153
|
-
...filter,
|
|
149
|
+
const filter = {
|
|
150
|
+
...filterOptions,
|
|
154
151
|
id,
|
|
155
152
|
flag: true,
|
|
156
153
|
isDeleteAllow,
|
|
157
|
-
}
|
|
154
|
+
};
|
|
155
|
+
if (typeof filterIndex === 'number' && filterIndex !== -1) {
|
|
156
|
+
datum.filters = [
|
|
157
|
+
...datum.filters.slice(0, filterIndex + 1),
|
|
158
|
+
filter,
|
|
159
|
+
...datum.filters.slice(filterIndex + 1),
|
|
160
|
+
];
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
datum.filters.push(filter);
|
|
164
|
+
}
|
|
158
165
|
}
|
|
159
166
|
function replaceFilter(datum, filterID, value) {
|
|
160
167
|
// datum.filters = datum.filters.slice(0);
|
|
@@ -165,4 +172,4 @@ function replaceFilter(datum, filterID, value) {
|
|
|
165
172
|
value,
|
|
166
173
|
};
|
|
167
174
|
}
|
|
168
|
-
export { applyFilter, reapplyFilters, enableFilter, addFilter, deleteFilter };
|
|
175
|
+
export { applyFilter, reapplyFilters, enableFilter, addFilter, deleteFilter, lookupForFilter, };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Datum2D } from './types/data2d';
|
|
1
|
+
import { Spectrum } from 'nmr-load-save';
|
|
3
2
|
export interface PredictionOptions {
|
|
4
3
|
name: string;
|
|
5
4
|
frequency: number;
|
|
@@ -35,4 +34,4 @@ export declare const FREQUENCIES: Array<{
|
|
|
35
34
|
label: string;
|
|
36
35
|
}>;
|
|
37
36
|
export declare function predictSpectra(molfile: string): Promise<any>;
|
|
38
|
-
export declare function generateSpectra(data: Record<string, any>, inputOptions: PredictionOptions, color: string):
|
|
37
|
+
export declare function generateSpectra(data: Record<string, any>, inputOptions: PredictionOptions, color: string): Spectrum[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Spectrum } from 'nmr-load-save';
|
|
1
2
|
import { State } from '../component/reducer/Reducer';
|
|
2
3
|
import { Workspace } from '../component/workspaces/Workspace';
|
|
3
4
|
export declare enum DataExportOptions {
|
|
@@ -22,4 +23,14 @@ export declare function addJcamp(output: any, jcamp: any, options: any, usedColo
|
|
|
22
23
|
export declare function toJSON(state: Partial<State>, preferencesState: Partial<{
|
|
23
24
|
current: Workspace;
|
|
24
25
|
}>, options?: ExportOptions): any;
|
|
26
|
+
export declare const DataExportStage: {
|
|
27
|
+
readonly Original: "ORIGINAL";
|
|
28
|
+
readonly Processed: "PROCESSED";
|
|
29
|
+
};
|
|
30
|
+
export type DataExportStageStrings = (typeof DataExportStage)[keyof typeof DataExportStage];
|
|
31
|
+
export interface ExportAsJcampOptions {
|
|
32
|
+
onlyReal?: boolean;
|
|
33
|
+
dataExportStage?: DataExportStageStrings;
|
|
34
|
+
}
|
|
35
|
+
export declare function exportAsJcamp(spectrum: Spectrum, options?: ExportAsJcampOptions): void;
|
|
25
36
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { saveAs } from 'file-saver';
|
|
2
|
+
import { processJcamp, serializeNmriumState, CURRENT_EXPORT_VERSION, spectrum1DToJcamp, } from 'nmr-load-save';
|
|
3
|
+
import { isSpectrum1D, initiateDatum1D } from './data1d/Spectrum1D';
|
|
4
|
+
import { initiateDatum2D } from './data2d/Spectrum2D';
|
|
4
5
|
import * as Molecule from './molecules/Molecule';
|
|
5
6
|
export var DataExportOptions;
|
|
6
7
|
(function (DataExportOptions) {
|
|
@@ -11,10 +12,10 @@ export var DataExportOptions;
|
|
|
11
12
|
function getData(datum, usedColors) {
|
|
12
13
|
const dimension = datum.info.dimension;
|
|
13
14
|
if (dimension === 1) {
|
|
14
|
-
return
|
|
15
|
+
return initiateDatum1D(datum, { usedColors });
|
|
15
16
|
}
|
|
16
17
|
else if (dimension === 2) {
|
|
17
|
-
return
|
|
18
|
+
return initiateDatum2D(datum, { usedColors });
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
export function addJcamp(output, jcamp, options, usedColors) {
|
|
@@ -74,3 +75,44 @@ export function toJSON(state, preferencesState, options = {}) {
|
|
|
74
75
|
});
|
|
75
76
|
}
|
|
76
77
|
}
|
|
78
|
+
export const DataExportStage = {
|
|
79
|
+
Original: 'ORIGINAL',
|
|
80
|
+
Processed: 'PROCESSED',
|
|
81
|
+
};
|
|
82
|
+
export function exportAsJcamp(spectrum, options = {}) {
|
|
83
|
+
let jcamp = null;
|
|
84
|
+
if (isSpectrum1D(spectrum)) {
|
|
85
|
+
const { dataExportStage = 'PROCESSED', onlyReal } = options;
|
|
86
|
+
const { originalData, originalInfo, data, info, filters } = spectrum;
|
|
87
|
+
if (onlyReal && info.isFid) {
|
|
88
|
+
throw new Error('FID data should be complex');
|
|
89
|
+
}
|
|
90
|
+
if (!originalData || !originalInfo) {
|
|
91
|
+
throw new Error('original data should exists');
|
|
92
|
+
}
|
|
93
|
+
if (dataExportStage === 'PROCESSED') {
|
|
94
|
+
jcamp = spectrum1DToJcamp({
|
|
95
|
+
...spectrum,
|
|
96
|
+
data,
|
|
97
|
+
info,
|
|
98
|
+
filters,
|
|
99
|
+
}, { onlyReal });
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
jcamp = spectrum1DToJcamp({
|
|
103
|
+
...spectrum,
|
|
104
|
+
data: originalData,
|
|
105
|
+
info: originalInfo,
|
|
106
|
+
filters: [],
|
|
107
|
+
}, { onlyReal });
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
throw new Error('convert 2D spectrum to JCAMP is not supported');
|
|
112
|
+
}
|
|
113
|
+
if (!jcamp) {
|
|
114
|
+
throw new Error('convert spectrum to JCAMP failed');
|
|
115
|
+
}
|
|
116
|
+
const blob = new Blob([jcamp], { type: 'text/plain' });
|
|
117
|
+
saveAs(blob, `${spectrum.info.name}.jdx`);
|
|
118
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Draft } from 'immer';
|
|
2
|
+
import { Integrals, Ranges, SumOptions } from 'nmr-load-save';
|
|
2
3
|
import { State } from '../../../component/reducer/Reducer';
|
|
3
4
|
import { StateMoleculeExtended } from '../../molecules/Molecule';
|
|
4
|
-
import { Integrals, Ranges } from '../../types/data1d';
|
|
5
|
-
import { SumOptions } from '../../types/data1d/SumOptions';
|
|
6
5
|
export interface SumParams {
|
|
7
6
|
nucleus: string;
|
|
8
7
|
molecules: StateMoleculeExtended[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Data1D } from '
|
|
1
|
+
import { Data1D } from 'nmr-load-save';
|
|
2
2
|
export declare function convertDataToFloat64Array(data: Data1D): Data1D;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
+
import { Spectrum1D } from 'nmr-load-save';
|
|
1
2
|
import { UsedColors } from '../../../types/UsedColors';
|
|
2
|
-
|
|
3
|
-
export declare function generateSpectrumFromPublicationString(publicationString: string, usedColors: UsedColors): Datum1D;
|
|
3
|
+
export declare function generateSpectrumFromPublicationString(publicationString: string, usedColors: UsedColors): Spectrum1D;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Datum1D } from '../../types/data1d';
|
|
2
1
|
/**
|
|
3
2
|
* @typedef {Object} datum
|
|
4
3
|
* @property {number[]} x - The X points series
|
|
5
4
|
* @property {number[]} y - The Y points series
|
|
6
5
|
*/
|
|
6
|
+
import { Spectrum1D } from 'nmr-load-save';
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
9
9
|
* @param spectrum 1d spectrum
|
|
10
10
|
* @returns {datum} datum object includes x and y series
|
|
11
11
|
*/
|
|
12
|
-
export declare function get1DDataXY(spectrum:
|
|
12
|
+
export declare function get1DDataXY(spectrum: Spectrum1D): {
|
|
13
13
|
x: Float64Array;
|
|
14
14
|
y: Float64Array;
|
|
15
15
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function getShiftX(
|
|
1
|
+
import { Spectrum1D } from 'nmr-load-save';
|
|
2
|
+
export declare function getShiftX(spectrum: Spectrum1D): number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as FiltersTypes from '../../Filters';
|
|
2
|
-
export function getShiftX(
|
|
3
|
-
const filter =
|
|
4
|
-
|
|
2
|
+
export function getShiftX(spectrum) {
|
|
3
|
+
const filter = spectrum?.filters &&
|
|
4
|
+
spectrum?.filters.find((filter) => filter.name === FiltersTypes.shiftX.id);
|
|
5
5
|
return filter?.flag ? filter.value.shift : 0;
|
|
6
6
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function getSpectrumErrorValue(
|
|
1
|
+
import { Spectrum1D } from 'nmr-load-save';
|
|
2
|
+
export declare function getSpectrumErrorValue(spectrum: Spectrum1D): number;
|