nmrium 0.38.1 → 0.38.2
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/ApodizationLine.js +27 -4
- package/lib/component/1d/ExclusionZoneAnnotation.js +1 -1
- package/lib/component/1d/ExclusionZonesAnnotations.js +1 -1
- package/lib/component/1d/FooterBanner.js +5 -5
- package/lib/component/1d/SpectraLegends.js +2 -3
- package/lib/component/1d/Viewer1D.js +1 -1
- package/lib/component/1d/integral/Integral.d.ts +1 -1
- package/lib/component/1d/integral/IntegralResizable.d.ts +1 -1
- package/lib/component/1d/jCouplingGraph/JsCouplings.d.ts +1 -1
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +2 -2
- package/lib/component/1d/multiplicityTree/LevelNode.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts +1 -1
- 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 +2 -1
- package/lib/component/1d/ranges/Range.d.ts +1 -1
- package/lib/component/1d/tool/PeakPointer.js +6 -6
- package/lib/component/1d/tool/XLabelPointer.js +5 -5
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.d.ts +1 -1
- package/lib/component/1d-2d/tools/BrushX.js +2 -3
- package/lib/component/1d-2d/tools/BrushXY.js +2 -3
- package/lib/component/1d-2d/tools/CrossLinePointer.js +4 -5
- package/lib/component/2d/Chart2D.js +4 -4
- package/lib/component/2d/FooterBanner.js +5 -5
- package/lib/component/2d/Viewer2D.js +1 -1
- package/lib/component/2d/tools/XYLabelPointer.js +5 -5
- package/lib/component/2d/zones/Signal.d.ts +1 -1
- package/lib/component/2d/zones/SignalCrosshair.d.ts +1 -1
- package/lib/component/2d/zones/Zone.d.ts +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts +20 -12
- package/lib/component/EventsTrackers/BrushTracker.js +35 -22
- package/lib/component/EventsTrackers/MouseTracker.d.ts +6 -2
- package/lib/component/EventsTrackers/MouseTracker.js +4 -1
- package/lib/component/NMRium.d.ts +4 -5
- package/lib/component/NMRium.js +11 -14
- package/lib/component/assignment/AssignmentsReducer.d.ts +2 -2
- package/lib/component/context/PreferencesContext.d.ts +6 -6
- package/lib/component/elements/Button.d.ts +13 -11
- package/lib/component/elements/Button.js +16 -25
- package/lib/component/elements/ColorInput.d.ts +0 -1
- package/lib/component/elements/ColorInput.js +2 -2
- package/lib/component/elements/EditableColumn.js +5 -2
- package/lib/component/elements/Input.js +2 -4
- package/lib/component/elements/Label.d.ts +1 -0
- package/lib/component/elements/Label.js +2 -2
- package/lib/component/elements/MolecularFormulaInput.d.ts +2 -2
- package/lib/component/elements/MolecularFormulaInput.js +15 -18
- package/lib/component/elements/NextPrev.d.ts +5 -3
- package/lib/component/elements/NextPrev.js +26 -8
- package/lib/component/elements/NumberInput.js +2 -2
- package/lib/component/elements/ReactTable/ReactTable.js +4 -4
- package/lib/component/elements/formik/FormikCheckBox.d.ts +2 -1
- package/lib/component/elements/formik/FormikCheckBox.js +2 -2
- package/lib/component/elements/formik/FormikColumnFormatField.d.ts +4 -0
- package/lib/component/elements/formik/FormikColumnFormatField.js +19 -16
- package/lib/component/elements/formik/FormikInput.js +10 -6
- package/lib/component/elements/formik/FormikSelect.js +1 -1
- package/lib/component/header/ApodizationOptionsPanel.js +4 -3
- package/lib/component/header/AutoPeakPickingOptionPanel.js +16 -7
- package/lib/component/header/BaseLineCorrectionPanel.js +5 -2
- package/lib/component/header/PhaseCorrectionPanel.js +5 -2
- package/lib/component/header/RangesPickingOptionPanel.js +15 -7
- package/lib/component/header/ZeroFillingOptionsPanel.js +1 -1
- package/lib/component/highlight/index.d.ts +1 -1
- package/lib/component/hooks/useActiveSpectra.d.ts +1 -1
- package/lib/component/hooks/useActiveSpectrum.d.ts +1 -1
- package/lib/component/hooks/useActiveSpectrumPeaksViewState.d.ts +1 -1
- package/lib/component/hooks/useCheckPointsNumberInWindowArea.d.ts +2 -0
- package/lib/component/hooks/useCheckPointsNumberInWindowArea.js +17 -0
- package/lib/component/hooks/useCheckToolsVisibility.d.ts +2 -2
- package/lib/component/hooks/useDatumWithSpectraStatistics.d.ts +3 -2
- package/lib/component/hooks/useExport.js +1 -1
- package/lib/component/hooks/useFilter.d.ts +2 -1
- package/lib/component/hooks/usePanelPreferences.d.ts +3 -3
- package/lib/component/hooks/usePanelPreferences.js +4 -0
- package/lib/component/hooks/useSaveSettings.d.ts +1 -1
- package/lib/component/hooks/useSaveSettings.js +1 -1
- package/lib/component/hooks/useVerticalAlign.d.ts +1 -1
- package/lib/component/loader/DropZone.js +1 -2
- package/lib/component/modal/EditPeakShapeModal.d.ts +2 -2
- package/lib/component/modal/LoadJCAMPModal.d.ts +3 -3
- package/lib/component/modal/LoadJCAMPModal.js +35 -66
- package/lib/component/modal/ModalStyle.js +0 -10
- package/lib/component/modal/MoleculeStructureEditorModal.d.ts +2 -1
- package/lib/component/modal/MoleculeStructureEditorModal.js +12 -6
- package/lib/component/modal/MultipletAnalysisModal.d.ts +2 -2
- package/lib/component/modal/PredictSpectraModal.d.ts +4 -2
- package/lib/component/modal/PredictSpectraModal.js +43 -105
- package/lib/component/modal/SaveAsModal.d.ts +2 -0
- package/lib/component/modal/SaveAsModal.js +21 -14
- package/lib/component/modal/changeSum/ChangeSumModal.js +25 -38
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.d.ts +1 -1
- package/lib/component/modal/editRange/forms/components/DeltaInput.js +2 -0
- package/lib/component/modal/editRange/forms/components/SignalsForm.d.ts +2 -2
- package/lib/component/modal/metaImportation/MetaImportationModal.js +15 -5
- package/lib/component/modal/setting/GeneralSettings.js +1 -6
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +7 -15
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +2 -2
- package/lib/component/panels/MoleculesPanel/MoleculePanel.d.ts +1 -11
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +20 -25
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +6 -11
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +71 -81
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/Utilities.js +3 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisColumnHeader.js +6 -6
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/index.js +2 -2
- package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +39 -53
- package/lib/component/panels/RangesPanel/RangesPreferences.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesPreferences.js +7 -22
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +2 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +2 -2
- 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/SpectraTable.js +5 -1
- package/lib/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +10 -4
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.d.ts +2 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts +1 -1
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.d.ts +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.js +5 -24
- package/lib/component/panels/databasePanel/DatabasePreferences.js +2 -2
- package/lib/component/panels/header/DefaultPanelHeader.d.ts +2 -3
- package/lib/component/panels/header/DefaultPanelHeader.js +18 -26
- package/lib/component/panels/header/PanelHeader.d.ts +7 -0
- package/lib/component/panels/header/PanelHeader.js +12 -0
- package/lib/component/panels/predictionPanel/PredictionOptionsPanel.d.ts +9 -0
- package/lib/component/panels/predictionPanel/PredictionOptionsPanel.js +94 -0
- package/lib/component/panels/predictionPanel/PredictionPanel.d.ts +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.js +107 -37
- package/lib/component/panels/predictionPanel/PredictionPreferences.d.ts +3 -0
- package/lib/component/panels/predictionPanel/PredictionPreferences.js +24 -0
- package/lib/component/panels/predictionPanel/PredictionSimpleOptions.d.ts +2 -0
- package/lib/component/panels/predictionPanel/PredictionSimpleOptions.js +44 -0
- package/lib/component/reducer/Reducer.d.ts +5 -87
- package/lib/component/reducer/Reducer.js +1 -29
- package/lib/component/reducer/actions/FiltersActions.d.ts +1 -2
- package/lib/component/reducer/actions/FiltersActions.js +47 -52
- package/lib/component/reducer/actions/HistoryActions.d.ts +4 -0
- package/lib/component/reducer/actions/HistoryActions.js +40 -0
- package/lib/component/reducer/actions/IntegralsActions.d.ts +1 -1
- package/lib/component/reducer/actions/LoadActions.d.ts +1 -2
- package/lib/component/reducer/actions/LoadActions.js +1 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts +7 -4
- package/lib/component/reducer/actions/MoleculeActions.js +57 -28
- package/lib/component/reducer/actions/PeaksActions.d.ts +1 -2
- package/lib/component/reducer/actions/PeaksActions.js +3 -3
- package/lib/component/reducer/actions/RangesActions.d.ts +4 -5
- package/lib/component/reducer/actions/RangesActions.js +5 -27
- package/lib/component/reducer/actions/SpectrumsActions.js +2 -2
- package/lib/component/reducer/actions/ToolsActions.d.ts +2 -2
- package/lib/component/reducer/actions/ZonesActions.d.ts +2 -1
- package/lib/component/reducer/actions/ZonesActions.js +1 -2
- package/lib/component/reducer/helper/getActiveSpectra.d.ts +1 -1
- package/lib/component/reducer/helper/getActiveSpectrum.d.ts +1 -1
- package/lib/component/reducer/helper/getVerticalAlign.d.ts +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/getActiveWorkspace.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/getPreferencesByWorkspace.d.ts +2 -3
- package/lib/component/reducer/preferences/utilities/initWorkspace.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts +1 -1
- package/lib/component/toolbar/BasicToolBar.js +6 -11
- package/lib/component/toolbar/ToolTypes.d.ts +2 -2
- package/lib/component/toolbar/ToolTypes.js +1 -1
- package/lib/component/workspaces/assignment.d.ts +1 -1
- package/lib/component/workspaces/basic.d.ts +1 -1
- package/lib/component/workspaces/embedded.d.ts +1 -1
- package/lib/component/workspaces/exercise.d.ts +1 -1
- package/lib/component/workspaces/index.d.ts +6 -6
- package/lib/component/workspaces/prediction.d.ts +1 -1
- package/lib/component/workspaces/prediction.js +193 -0
- package/lib/component/workspaces/process1D.d.ts +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.d.ts +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib/data/PredictionManager.js +16 -2
- package/lib/data/SpectraManager.d.ts +1 -2
- package/lib/data/constants/DefaultApodizationOptions.d.ts +2 -0
- package/lib/data/constants/DefaultApodizationOptions.js +5 -0
- package/lib/data/data1d/Spectrum1D/SumManager.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/generateJGraphData.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/index.d.ts +1 -5
- package/lib/data/data1d/Spectrum1D/index.js +1 -5
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +3 -3
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -2
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +3 -2
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/lookupPeak.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +1 -2
- package/lib/data/data1d/Spectrum1D/ranges/addRange.d.ts +7 -7
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +5 -24
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/checkRangeKind.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRange.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +1 -2
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +37 -2
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js +1 -1
- package/lib/data/data1d/database.js +2 -4
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +3 -30
- package/lib/data/data1d/multipleSpectraAnalysis.js +4 -15
- package/lib/data/data2d/Spectrum2D/getMissingProjection.d.ts +3 -2
- package/lib/data/data2d/Spectrum2D/getShift.js +1 -1
- package/lib/data/data2d/Spectrum2D/getSlice.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +3 -2
- package/lib/data/data2d/Spectrum2D/zones/isZoneExists.d.ts +2 -1
- package/lib/data/data2d/Spectrum2D/zones/mapZones.d.ts +3 -2
- package/lib/data/getDefaultMatrixFilters.d.ts +1 -1
- package/lib/data/types/data1d/ComplexData1D.d.ts +2 -2
- package/lib/data/types/data1d/RangeDetectionResult.d.ts +1 -1
- package/lib/data/utilities/FindUtilities.d.ts +2 -1
- package/lib/data/utilities/RangeUtilities.d.ts +1 -1
- package/lib/data/utilities/ZoneUtilities.d.ts +1 -1
- package/lib/data/utilities/calculateSanPlot.d.ts +2 -2
- package/lib/types/NMRiumDataReturn.d.ts +1 -3
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/ApodizationLine.js +28 -5
- package/lib-cjs/component/1d/ExclusionZoneAnnotation.js +3 -26
- package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +5 -28
- package/lib-cjs/component/1d/FooterBanner.js +2 -2
- package/lib-cjs/component/1d/SpectraLegends.js +1 -2
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +2 -2
- package/lib-cjs/component/1d/tool/PeakPointer.js +3 -3
- package/lib-cjs/component/1d/tool/XLabelPointer.js +2 -2
- package/lib-cjs/component/1d-2d/tools/BrushX.js +1 -2
- package/lib-cjs/component/1d-2d/tools/BrushXY.js +1 -2
- package/lib-cjs/component/1d-2d/tools/CrossLinePointer.js +2 -3
- package/lib-cjs/component/2d/Chart2D.js +4 -4
- package/lib-cjs/component/2d/FooterBanner.js +2 -2
- package/lib-cjs/component/2d/tools/XYLabelPointer.js +2 -2
- package/lib-cjs/component/EventsTrackers/BrushTracker.js +36 -22
- package/lib-cjs/component/EventsTrackers/MouseTracker.js +4 -1
- package/lib-cjs/component/NMRium.js +8 -11
- package/lib-cjs/component/elements/Button.js +16 -25
- package/lib-cjs/component/elements/ColorInput.js +2 -2
- package/lib-cjs/component/elements/EditableColumn.js +5 -2
- package/lib-cjs/component/elements/Input.js +2 -4
- package/lib-cjs/component/elements/Label.js +2 -2
- package/lib-cjs/component/elements/MolecularFormulaInput.js +14 -16
- package/lib-cjs/component/elements/NextPrev.js +26 -8
- package/lib-cjs/component/elements/NumberInput.js +2 -2
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +4 -4
- package/lib-cjs/component/elements/formik/FormikCheckBox.js +2 -2
- package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +20 -16
- package/lib-cjs/component/elements/formik/FormikInput.js +10 -6
- package/lib-cjs/component/elements/formik/FormikSelect.js +1 -1
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +6 -5
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +15 -6
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +6 -3
- package/lib-cjs/component/header/PhaseCorrectionPanel.js +6 -26
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +15 -7
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +2 -25
- package/lib-cjs/component/hooks/useCheckPointsNumberInWindowArea.js +24 -0
- package/lib-cjs/component/hooks/useExport.js +1 -1
- package/lib-cjs/component/hooks/usePanelPreferences.js +4 -0
- package/lib-cjs/component/hooks/useSaveSettings.js +1 -1
- package/lib-cjs/component/loader/DropZone.js +1 -2
- package/lib-cjs/component/modal/LoadJCAMPModal.js +60 -67
- package/lib-cjs/component/modal/ModalStyle.js +0 -10
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +12 -6
- package/lib-cjs/component/modal/PredictSpectraModal.js +43 -126
- package/lib-cjs/component/modal/SaveAsModal.js +22 -14
- package/lib-cjs/component/modal/changeSum/ChangeSumModal.js +24 -37
- package/lib-cjs/component/modal/editRange/forms/components/DeltaInput.js +2 -0
- package/lib-cjs/component/modal/metaImportation/MetaImportationModal.js +15 -5
- package/lib-cjs/component/modal/setting/GeneralSettings.js +1 -6
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +6 -14
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +2 -2
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +19 -24
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +76 -86
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +3 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisColumnHeader.js +6 -6
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/index.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +38 -52
- package/lib-cjs/component/panels/RangesPanel/RangesPreferences.js +5 -20
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +5 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +10 -4
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +1 -1
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +5 -24
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +25 -2
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +18 -26
- package/lib-cjs/component/panels/header/PanelHeader.js +15 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionOptionsPanel.js +122 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +107 -37
- package/lib-cjs/component/panels/predictionPanel/PredictionPreferences.js +29 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionSimpleOptions.js +72 -0
- package/lib-cjs/component/reducer/Reducer.js +2 -31
- package/lib-cjs/component/reducer/actions/FiltersActions.js +66 -94
- package/lib-cjs/component/reducer/actions/HistoryActions.js +45 -0
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +58 -32
- package/lib-cjs/component/reducer/actions/PeaksActions.js +3 -3
- package/lib-cjs/component/reducer/actions/RangesActions.js +7 -52
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +4 -27
- package/lib-cjs/component/reducer/actions/ZonesActions.js +4 -28
- package/lib-cjs/component/toolbar/BasicToolBar.js +5 -10
- package/lib-cjs/component/toolbar/ToolTypes.js +9 -32
- package/lib-cjs/component/workspaces/prediction.js +193 -0
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +21 -44
- package/lib-cjs/data/PredictionManager.js +16 -2
- package/lib-cjs/data/constants/DefaultApodizationOptions.js +8 -0
- package/lib-cjs/data/data1d/Spectrum1D/index.js +7 -11
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +9 -32
- package/lib-cjs/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/initiatePeaks.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/optimizePeaks.js +1 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +7 -26
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRange.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRange.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRanges.js +3 -4
- package/lib-cjs/data/data1d/Spectrum1D/ranges/initiateRanges.js +2 -2
- package/lib-cjs/data/data1d/database.js +2 -4
- package/lib-cjs/data/data1d/multipleSpectraAnalysis.js +5 -16
- package/lib-cjs/data/data2d/Spectrum2D/getShift.js +3 -26
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +2 -25
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +25 -25
- package/lib/component/panels/predictionPanel/PredictionOptions.d.ts +0 -7
- package/lib/component/panels/predictionPanel/PredictionOptions.js +0 -74
- package/lib/component/workspaces/Workspace.d.ts +0 -188
- package/lib/component/workspaces/Workspace.js +0 -1
- package/lib/data/Filters.d.ts +0 -12
- package/lib/data/Filters.js +0 -12
- package/lib/data/FiltersManager.d.ts +0 -30
- package/lib/data/FiltersManager.js +0 -175
- package/lib/data/data1d/Spectrum1D/getShiftX.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/getShiftX.js +0 -6
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +0 -4
- package/lib/data/data1d/Spectrum1D/integrals/checkIntegralKind.d.ts +0 -7
- package/lib/data/data1d/Spectrum1D/integrals/checkIntegralKind.js +0 -9
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.d.ts +0 -12
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.js +0 -36
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.js +0 -6
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +0 -5
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.js +0 -26
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.d.ts +0 -3
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +0 -45
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.js +0 -7
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +0 -4
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +0 -78
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.js +0 -9
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +0 -5
- package/lib/data/data1d/filter1d/apodization.d.ts +0 -27
- package/lib/data/data1d/filter1d/apodization.js +0 -81
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +0 -33
- package/lib/data/data1d/filter1d/baselineCorrection.js +0 -51
- package/lib/data/data1d/filter1d/digitalFilter.d.ts +0 -20
- package/lib/data/data1d/filter1d/digitalFilter.js +0 -44
- package/lib/data/data1d/filter1d/equallySpaced.d.ts +0 -33
- package/lib/data/data1d/filter1d/equallySpaced.js +0 -52
- package/lib/data/data1d/filter1d/exclusionZones.d.ts +0 -15
- package/lib/data/data1d/filter1d/exclusionZones.js +0 -32
- package/lib/data/data1d/filter1d/fft.d.ts +0 -18
- package/lib/data/data1d/filter1d/fft.js +0 -90
- package/lib/data/data1d/filter1d/phaseCorrection.d.ts +0 -26
- package/lib/data/data1d/filter1d/phaseCorrection.js +0 -64
- package/lib/data/data1d/filter1d/shiftX.d.ts +0 -20
- package/lib/data/data1d/filter1d/shiftX.js +0 -26
- package/lib/data/data1d/filter1d/signalProcessing.d.ts +0 -26
- package/lib/data/data1d/filter1d/signalProcessing.js +0 -65
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.d.ts +0 -2
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +0 -35
- package/lib/data/data1d/filter1d/zeroFilling.d.ts +0 -22
- package/lib/data/data1d/filter1d/zeroFilling.js +0 -60
- package/lib/data/data2d/filter2d/shiftX.d.ts +0 -18
- package/lib/data/data2d/filter2d/shiftX.js +0 -27
- package/lib/data/data2d/filter2d/shiftY.d.ts +0 -18
- package/lib/data/data2d/filter2d/shiftY.js +0 -27
- package/lib/data/types/view-state/PeaksViewState.d.ts +0 -17
- package/lib/data/types/view-state/PeaksViewState.js +0 -1
- package/lib/types/NMRiumGeneralPreferences.d.ts +0 -7
- package/lib/types/NMRiumGeneralPreferences.js +0 -1
- package/lib/types/NMRiumPanelPreferences.d.ts +0 -17
- package/lib/types/NMRiumPanelPreferences.js +0 -1
- package/lib/types/NMRiumToolBarPreferences.d.ts +0 -22
- package/lib/types/NMRiumToolBarPreferences.js +0 -1
- package/lib/types/PanelPreferencesType.d.ts +0 -4
- package/lib/types/PanelPreferencesType.js +0 -1
- package/lib-cjs/component/panels/predictionPanel/PredictionOptions.js +0 -102
- package/lib-cjs/component/workspaces/Workspace.js +0 -2
- package/lib-cjs/data/Filters.js +0 -38
- package/lib-cjs/data/FiltersManager.js +0 -206
- package/lib-cjs/data/data1d/Spectrum1D/getShiftX.js +0 -33
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +0 -8
- package/lib-cjs/data/data1d/Spectrum1D/integrals/checkIntegralKind.js +0 -13
- package/lib-cjs/data/data1d/Spectrum1D/integrals/mapIntegrals.js +0 -40
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegrals.js +0 -10
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +0 -9
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateRelatives.js +0 -30
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +0 -49
- package/lib-cjs/data/data1d/Spectrum1D/peaks/updatePeaks.js +0 -11
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +0 -82
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRanges.js +0 -13
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +0 -9
- package/lib-cjs/data/data1d/filter1d/apodization.js +0 -88
- package/lib-cjs/data/data1d/filter1d/baselineCorrection.js +0 -60
- package/lib-cjs/data/data1d/filter1d/digitalFilter.js +0 -50
- package/lib-cjs/data/data1d/filter1d/equallySpaced.js +0 -61
- package/lib-cjs/data/data1d/filter1d/exclusionZones.js +0 -38
- package/lib-cjs/data/data1d/filter1d/fft.js +0 -96
- package/lib-cjs/data/data1d/filter1d/phaseCorrection.js +0 -70
- package/lib-cjs/data/data1d/filter1d/shiftX.js +0 -32
- package/lib-cjs/data/data1d/filter1d/signalProcessing.js +0 -95
- package/lib-cjs/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +0 -39
- package/lib-cjs/data/data1d/filter1d/zeroFilling.js +0 -66
- package/lib-cjs/data/data2d/filter2d/shiftX.js +0 -33
- package/lib-cjs/data/data2d/filter2d/shiftY.js +0 -33
- package/lib-cjs/data/types/view-state/PeaksViewState.js +0 -2
- package/lib-cjs/types/NMRiumGeneralPreferences.js +0 -2
- package/lib-cjs/types/NMRiumPanelPreferences.js +0 -2
- package/lib-cjs/types/NMRiumToolBarPreferences.js +0 -2
- package/lib-cjs/types/PanelPreferencesType.js +0 -2
|
@@ -2,8 +2,7 @@ import { v4 } from '@lukeed/uuid';
|
|
|
2
2
|
import { original } from 'immer';
|
|
3
3
|
import cloneDeep from 'lodash/cloneDeep';
|
|
4
4
|
import { xFindClosestIndex } from 'ml-spectra-processing';
|
|
5
|
-
import
|
|
6
|
-
import * as FiltersManager from '../../../data/FiltersManager';
|
|
5
|
+
import { Filters, FiltersManager } from 'nmr-processing';
|
|
7
6
|
import { DatumKind, SignalKindsToInclude, } from '../../../data/constants/SignalsKinds';
|
|
8
7
|
import { addRange, changeRangeSignal, detectRanges, updateRangesRelativeValues, changeRange, changeRangeRelativeValue, } from '../../../data/data1d/Spectrum1D';
|
|
9
8
|
import { setSumOptions, } from '../../../data/data1d/Spectrum1D/SumManager';
|
|
@@ -249,26 +248,18 @@ function handleChangeRangeSum(draft, action) {
|
|
|
249
248
|
updateRangesRelativeValues(datum, true);
|
|
250
249
|
}
|
|
251
250
|
}
|
|
252
|
-
|
|
253
|
-
|
|
251
|
+
//action
|
|
252
|
+
function handleAddRange(draft, action) {
|
|
253
|
+
const { startX, endX } = action.payload;
|
|
254
254
|
const range = getRange(draft, { startX, endX });
|
|
255
|
-
const { data, view: { spectra: { activeTab: nucleus },
|
|
255
|
+
const { data, view: { spectra: { activeTab: nucleus }, }, molecules, } = draft;
|
|
256
256
|
const activeSpectrum = getActiveSpectrum(draft);
|
|
257
257
|
if (activeSpectrum?.id) {
|
|
258
258
|
const { index } = activeSpectrum;
|
|
259
259
|
const [from, to] = range;
|
|
260
|
-
// add range intial state
|
|
261
|
-
const rangeState = ranges.find((r) => r.spectrumID === activeSpectrum.id);
|
|
262
|
-
if (!rangeState) {
|
|
263
|
-
ranges.push({
|
|
264
|
-
spectrumID: activeSpectrum.id,
|
|
265
|
-
...rangeStateInit,
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
260
|
addRange(data[index], {
|
|
269
261
|
from,
|
|
270
262
|
to,
|
|
271
|
-
id,
|
|
272
263
|
nucleus,
|
|
273
264
|
molecules,
|
|
274
265
|
});
|
|
@@ -277,19 +268,6 @@ function addNewRange(draft, props) {
|
|
|
277
268
|
}
|
|
278
269
|
}
|
|
279
270
|
//action
|
|
280
|
-
function handleAddRange(draft, action) {
|
|
281
|
-
let { startX, endX } = action?.payload || {};
|
|
282
|
-
if (startX && endX) {
|
|
283
|
-
addNewRange(draft, { startX, endX });
|
|
284
|
-
}
|
|
285
|
-
else {
|
|
286
|
-
const { width } = draft;
|
|
287
|
-
startX = width / 3;
|
|
288
|
-
endX = startX + 10;
|
|
289
|
-
addNewRange(draft, { startX, endX, id: 'new' });
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
//action
|
|
293
271
|
function handleChangeRangeRelativeValue(draft, action) {
|
|
294
272
|
const data = action.payload;
|
|
295
273
|
const activeSpectrum = getActiveSpectrum(draft);
|
|
@@ -2,8 +2,7 @@ import { original } from 'immer';
|
|
|
2
2
|
import lodashGet from 'lodash/get';
|
|
3
3
|
import omitBy from 'lodash/omitBy';
|
|
4
4
|
import lodashSet from 'lodash/set';
|
|
5
|
-
import
|
|
6
|
-
import { applyFilter } from '../../../data/FiltersManager';
|
|
5
|
+
import { Filters, FiltersManager } from 'nmr-processing';
|
|
7
6
|
import { generateSpectrumFromPublicationString, getReferenceShift, isSpectrum1D, get1DColor, } from '../../../data/data1d/Spectrum1D';
|
|
8
7
|
import { getMissingProjection, isSpectrum2D, get2DColor, } from '../../../data/data2d/Spectrum2D';
|
|
9
8
|
import { contoursManager } from '../../../data/data2d/Spectrum2D/contours';
|
|
@@ -17,6 +16,7 @@ import { getActiveSpectrum } from '../helper/getActiveSpectrum';
|
|
|
17
16
|
import { setDomain, setMode } from './DomainActions';
|
|
18
17
|
import { rollbackSpectrumByFilter } from './FiltersActions';
|
|
19
18
|
import { setTab, setActiveTab, setMargin, resetSelectedTool, } from './ToolsActions';
|
|
19
|
+
const { applyFilter } = FiltersManager;
|
|
20
20
|
function checkIsVisible2D(datum) {
|
|
21
21
|
if (!datum.display.isPositiveVisible && !datum.display.isNegativeVisible) {
|
|
22
22
|
return false;
|
|
@@ -11,10 +11,10 @@ interface BrushBoundary {
|
|
|
11
11
|
startY: number;
|
|
12
12
|
endX: number;
|
|
13
13
|
endY: number;
|
|
14
|
-
trackID?: Layout;
|
|
14
|
+
trackID?: Layout | null;
|
|
15
15
|
}
|
|
16
16
|
interface SetActiveTabOptions {
|
|
17
|
-
tab?:
|
|
17
|
+
tab?: Nucleus | null;
|
|
18
18
|
refreshActiveTab?: boolean;
|
|
19
19
|
domainOptions?: SetDomainOptions;
|
|
20
20
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FromTo } from 'cheminfo-types';
|
|
2
2
|
import { Draft } from 'immer';
|
|
3
|
-
import {
|
|
3
|
+
import type { Spectrum, Spectrum2D } from 'nmr-load-save';
|
|
4
|
+
import type { Signal2D, Zone } from 'nmr-processing';
|
|
4
5
|
import { AssignmentContext, Axis } from '../../assignment/AssignmentsContext';
|
|
5
6
|
import { ZoneData } from '../../panels/ZonesPanel/hooks/useMapZones';
|
|
6
7
|
import { State } from '../Reducer';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { original } from 'immer';
|
|
2
2
|
import lodashCloneDeep from 'lodash/cloneDeep';
|
|
3
3
|
import { setPathLength } from 'nmr-correlation';
|
|
4
|
-
import
|
|
5
|
-
import * as FiltersManager from '../../../data/FiltersManager';
|
|
4
|
+
import { Filters, FiltersManager } from 'nmr-processing';
|
|
6
5
|
import { DatumKind, SignalKindsToInclude, } from '../../../data/constants/SignalsKinds';
|
|
7
6
|
import { changeZoneSignal, detectZones, detectZonesManual, } from '../../../data/data2d/Spectrum2D';
|
|
8
7
|
import { unlink, unlinkInAssignmentData, } from '../../../data/utilities/ZoneUtilities';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Draft } from 'immer';
|
|
2
2
|
import { State } from '../Reducer';
|
|
3
|
-
export declare function getActiveSpectra(state: Draft<State> | State): import("
|
|
3
|
+
export declare function getActiveSpectra(state: Draft<State> | State): import("nmr-load-save").ActiveSpectrum[] | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Draft } from 'immer';
|
|
2
2
|
import { State } from '../Reducer';
|
|
3
|
-
export declare function getActiveSpectrum(state: Draft<State> | State): import("
|
|
3
|
+
export declare function getActiveSpectrum(state: Draft<State> | State): import("nmr-load-save").ActiveSpectrum | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Draft } from 'immer';
|
|
2
2
|
import { State, VerticalAlignment } from '../Reducer';
|
|
3
|
-
export declare function getVerticalAlign(state: State | Draft<State>, defaultAlign?: VerticalAlignment):
|
|
3
|
+
export declare function getVerticalAlign(state: State | Draft<State>, defaultAlign?: VerticalAlignment): any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PanelsPreferences } from '
|
|
1
|
+
import { PanelsPreferences } from 'nmr-load-save';
|
|
2
2
|
declare const getSpectraDefaultValues: (nucleus?: string) => PanelsPreferences['spectra'];
|
|
3
3
|
declare const getIntegralDefaultValues: (nucleus?: string) => PanelsPreferences['integrals'];
|
|
4
4
|
declare const getZoneDefaultValues: (nucleus?: string) => PanelsPreferences['zones'];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { MultipleSpectraAnalysisPreferences, Workspace, WorkSpaceSource } from 'nmr-load-save';
|
|
1
2
|
import { Reducer } from 'react';
|
|
2
3
|
import { SplitPaneSize } from 'react-science/ui';
|
|
3
4
|
import { MatrixOptions } from '../../../data/types/data1d/MatrixOptions';
|
|
4
5
|
import { NMRiumWorkspace, NMRiumPreferences } from '../../NMRium';
|
|
5
|
-
import { MultipleSpectraAnalysisPreferences, Workspace, WorkSpaceSource } from '../../workspaces/Workspace';
|
|
6
6
|
import { ActionType } from '../types/ActionType';
|
|
7
7
|
export declare const WORKSPACES_KEYS: {
|
|
8
8
|
componentKey: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Draft } from 'immer';
|
|
2
|
-
import { Workspace } from '
|
|
2
|
+
import { Workspace } from 'nmr-load-save';
|
|
3
3
|
import { PreferencesState } from '../preferencesReducer';
|
|
4
4
|
export declare function getActiveWorkspace(draft: Draft<PreferencesState>): Required<Workspace>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
+
import { CustomWorkspaces } from 'nmr-load-save';
|
|
1
2
|
import { NMRiumWorkspace } from '../../../NMRium';
|
|
2
|
-
|
|
3
|
-
import { WorkspaceWithSource } from '../preferencesReducer';
|
|
4
|
-
export declare function getPreferencesByWorkspace(workspace: NMRiumWorkspace, originalWorkspaces: CustomWorkspaces): WorkspaceWithSource;
|
|
3
|
+
export declare function getPreferencesByWorkspace(workspace: NMRiumWorkspace, originalWorkspaces: CustomWorkspaces): Required<import("nmr-load-save").WorkspacePreferences> & import("nmr-load-save/lib/types/WorkSpace").WorkspaceMeta & import("nmr-load-save").WorkspacePreferences;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Formatting } from '
|
|
1
|
+
import { Formatting } from 'nmr-load-save';
|
|
2
2
|
export declare function mapNucleiFormatting(formatting: Formatting): Formatting;
|
|
@@ -2,9 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { SvgNmrRealImag, SvgNmrOverlay3, SvgNmrOverlay3Aligned, SvgNmrAlignBottom, SvgNmrAlignCenter, } from 'cheminfo-font';
|
|
3
3
|
import { Fragment, useCallback, memo } from 'react';
|
|
4
4
|
import { FaDownload, FaFileDownload, FaFileImage, FaCopy, FaFileExport, FaFile, FaFileImport, } from 'react-icons/fa';
|
|
5
|
-
import { Toolbar } from 'react-science/ui';
|
|
5
|
+
import { Toolbar, useOnOff } from 'react-science/ui';
|
|
6
6
|
import { useChartData } from '../context/ChartContext';
|
|
7
|
-
import { useDispatch } from '../context/DispatchContext';
|
|
8
7
|
import { useLoader } from '../context/LoaderContext';
|
|
9
8
|
import ToolbarMenu from '../elements/ToolbarMenu';
|
|
10
9
|
import { useModal } from '../elements/popup/Modal';
|
|
@@ -15,7 +14,7 @@ import useExport from '../hooks/useExport';
|
|
|
15
14
|
import useToolsFunctions from '../hooks/useToolsFunctions';
|
|
16
15
|
import { useVerticalAlign } from '../hooks/useVerticalAlign';
|
|
17
16
|
import ImportPublicationStringModal from '../modal/ImportPublicationStringModal';
|
|
18
|
-
import LoadJCAMPModal from '../modal/LoadJCAMPModal';
|
|
17
|
+
import { LoadJCAMPModal } from '../modal/LoadJCAMPModal';
|
|
19
18
|
import { useMetaInformationImportationModal } from '../modal/metaImportation/index';
|
|
20
19
|
const IMPORT_MENU = [
|
|
21
20
|
{
|
|
@@ -72,12 +71,12 @@ const EXPORT_MENU = [
|
|
|
72
71
|
},
|
|
73
72
|
];
|
|
74
73
|
function BasicToolBarInner({ verticalAlign, ftCounter, fidCounter, }) {
|
|
75
|
-
const dispatch = useDispatch();
|
|
76
74
|
const modal = useModal();
|
|
77
75
|
const openLoader = useLoader();
|
|
78
76
|
const openMetaInformationModal = useMetaInformationImportationModal();
|
|
79
77
|
const isExperimentalFeature = useCheckExperimentalFeature();
|
|
80
78
|
const isButtonVisible = useCheckToolsVisibility();
|
|
79
|
+
const [isLoadModalOpened, openLoadModal, closeLoadModal] = useOnOff(false);
|
|
81
80
|
const importMenu = isExperimentalFeature
|
|
82
81
|
? IMPORT_MENU
|
|
83
82
|
: IMPORT_MENU.filter((item) => item.id !== 'importPublicationString');
|
|
@@ -86,13 +85,9 @@ function BasicToolBarInner({ verticalAlign, ftCounter, fidCounter, }) {
|
|
|
86
85
|
: EXPORT_MENU.filter((item) => item.id !== 'nmre');
|
|
87
86
|
const { isRealSpectrumShown, changeSpectrumViewHandler, changeDisplayViewModeHandler, alignSpectrumsVerticallyHandler, } = useToolsFunctions();
|
|
88
87
|
const { saveAsSVGHandler, saveAsPNGHandler, saveAsJSONHandler, saveToClipboardHandler, saveAsHandler, } = useExport();
|
|
89
|
-
const startLoadingHandler = useCallback(() => {
|
|
90
|
-
modal.close();
|
|
91
|
-
dispatch({ type: 'SET_LOADING_FLAG', payload: { isLoading: true } });
|
|
92
|
-
}, [dispatch, modal]);
|
|
93
88
|
const importJCAMPFile = useCallback(() => {
|
|
94
|
-
|
|
95
|
-
}, [
|
|
89
|
+
openLoadModal();
|
|
90
|
+
}, [openLoadModal]);
|
|
96
91
|
const openImportPublicationStringModal = useCallback(() => {
|
|
97
92
|
modal.show(_jsx(ImportPublicationStringModal, { onClose: () => modal.close() }), {});
|
|
98
93
|
}, [modal]);
|
|
@@ -145,7 +140,7 @@ function BasicToolBarInner({ verticalAlign, ftCounter, fidCounter, }) {
|
|
|
145
140
|
saveAsHandler,
|
|
146
141
|
saveToClipboardHandler,
|
|
147
142
|
]);
|
|
148
|
-
return (_jsxs(Fragment, { children: [isButtonVisible('import') && (_jsx(ToolbarMenu, { component: _jsx(FaFileImport, {}), toolTip: "Import", onClick: (element) => {
|
|
143
|
+
return (_jsxs(Fragment, { children: [_jsx(LoadJCAMPModal, { isOpen: isLoadModalOpened, onCloseDialog: closeLoadModal }), isButtonVisible('import') && (_jsx(ToolbarMenu, { component: _jsx(FaFileImport, {}), toolTip: "Import", onClick: (element) => {
|
|
149
144
|
importHandler(element);
|
|
150
145
|
return null;
|
|
151
146
|
}, items: importMenu })), isButtonVisible('exportAs') && (_jsx(ToolbarMenu, { component: _jsx(FaFileExport, {}), toolTip: "Export As", onClick: (element) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { NMRiumToolBarPreferences } from 'nmr-load-save';
|
|
2
|
+
import type { Info1D, Info2D } from 'nmr-processing';
|
|
3
3
|
import { DISPLAYER_MODE } from '../reducer/core/Constants';
|
|
4
4
|
type InfoKey = keyof Info1D | keyof Info2D;
|
|
5
5
|
export interface ToolOptionItem {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { InnerWorkspace } from '
|
|
1
|
+
import { InnerWorkspace } from 'nmr-load-save';
|
|
2
2
|
export declare const assignment: InnerWorkspace;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { InnerWorkspace } from '
|
|
1
|
+
import { InnerWorkspace } from 'nmr-load-save';
|
|
2
2
|
export declare const basic: InnerWorkspace;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { InnerWorkspace } from '
|
|
1
|
+
import { InnerWorkspace } from 'nmr-load-save';
|
|
2
2
|
export declare const embedded: InnerWorkspace;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { InnerWorkspace } from '
|
|
1
|
+
import { InnerWorkspace } from 'nmr-load-save';
|
|
2
2
|
export declare const exercise: InnerWorkspace;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
exercise: import("
|
|
3
|
-
default: import("
|
|
4
|
-
process1D: import("
|
|
5
|
-
prediction: import("
|
|
6
|
-
assignment: import("
|
|
7
|
-
embedded: import("
|
|
2
|
+
exercise: import("nmr-load-save").InnerWorkspace;
|
|
3
|
+
default: import("nmr-load-save").InnerWorkspace;
|
|
4
|
+
process1D: import("nmr-load-save").InnerWorkspace;
|
|
5
|
+
prediction: import("nmr-load-save").InnerWorkspace;
|
|
6
|
+
assignment: import("nmr-load-save").InnerWorkspace;
|
|
7
|
+
embedded: import("nmr-load-save").InnerWorkspace;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { InnerWorkspace } from '
|
|
1
|
+
import { InnerWorkspace } from 'nmr-load-save';
|
|
2
2
|
export declare const prediction: InnerWorkspace;
|
|
@@ -30,4 +30,197 @@ export const prediction = {
|
|
|
30
30
|
autoRangeAndZonePicking: true,
|
|
31
31
|
},
|
|
32
32
|
},
|
|
33
|
+
formatting: {
|
|
34
|
+
nuclei: {},
|
|
35
|
+
panels: {
|
|
36
|
+
spectra: {
|
|
37
|
+
nuclei: {
|
|
38
|
+
'1H,1H': {
|
|
39
|
+
columns: [
|
|
40
|
+
{
|
|
41
|
+
name: 'visible',
|
|
42
|
+
label: '',
|
|
43
|
+
description: 'Show/Hide Spectrum',
|
|
44
|
+
visible: true,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'name',
|
|
48
|
+
label: 'Spectrum Name',
|
|
49
|
+
description: 'Spectrum Name',
|
|
50
|
+
jpath: ['info', 'name'],
|
|
51
|
+
visible: true,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
label: 'Frequency',
|
|
55
|
+
description: 'frequency',
|
|
56
|
+
jpath: ['info', 'baseFrequency'],
|
|
57
|
+
visible: true,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'solvent',
|
|
61
|
+
label: 'Solvent',
|
|
62
|
+
description: 'Solvent',
|
|
63
|
+
jpath: ['info', 'solvent'],
|
|
64
|
+
visible: false,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
jpath: ['info', 'pulseSequence'],
|
|
68
|
+
label: 'Pulse',
|
|
69
|
+
visible: true,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
jpath: ['info', 'experiment'],
|
|
73
|
+
label: 'Experiment',
|
|
74
|
+
visible: true,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'color',
|
|
78
|
+
label: '',
|
|
79
|
+
description: 'Spectrum Color',
|
|
80
|
+
visible: true,
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
'1H,13C': {
|
|
85
|
+
columns: [
|
|
86
|
+
{
|
|
87
|
+
name: 'visible',
|
|
88
|
+
label: '',
|
|
89
|
+
description: 'Show/Hide Spectrum',
|
|
90
|
+
visible: true,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: 'name',
|
|
94
|
+
label: 'Spectrum Name',
|
|
95
|
+
description: 'Spectrum Name',
|
|
96
|
+
jpath: ['info', 'name'],
|
|
97
|
+
visible: true,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
label: 'Frequency',
|
|
101
|
+
description: 'frequency',
|
|
102
|
+
jpath: ['info', 'baseFrequency'],
|
|
103
|
+
visible: true,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: 'solvent',
|
|
107
|
+
label: 'Solvent',
|
|
108
|
+
description: 'Solvent',
|
|
109
|
+
jpath: ['info', 'solvent'],
|
|
110
|
+
visible: false,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
jpath: ['info', 'pulseSequence'],
|
|
114
|
+
label: 'Pulse',
|
|
115
|
+
visible: true,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
jpath: ['info', 'experiment'],
|
|
119
|
+
label: 'Experiment',
|
|
120
|
+
visible: true,
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: 'color',
|
|
124
|
+
label: '',
|
|
125
|
+
description: 'Spectrum Color',
|
|
126
|
+
visible: true,
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
'1H': {
|
|
131
|
+
columns: [
|
|
132
|
+
{
|
|
133
|
+
name: 'visible',
|
|
134
|
+
label: '',
|
|
135
|
+
description: 'Show/Hide Spectrum',
|
|
136
|
+
visible: true,
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: 'name',
|
|
140
|
+
label: 'Spectrum Name',
|
|
141
|
+
description: 'Spectrum Name',
|
|
142
|
+
jpath: ['info', 'name'],
|
|
143
|
+
visible: true,
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
label: 'Frequency',
|
|
147
|
+
description: 'frequency',
|
|
148
|
+
jpath: ['info', 'baseFrequency'],
|
|
149
|
+
visible: true,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'solvent',
|
|
153
|
+
label: 'Solvent',
|
|
154
|
+
description: 'Solvent',
|
|
155
|
+
jpath: ['info', 'solvent'],
|
|
156
|
+
visible: false,
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
jpath: ['info', 'pulseSequence'],
|
|
160
|
+
label: 'Pulse',
|
|
161
|
+
visible: true,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
jpath: ['info', 'experiment'],
|
|
165
|
+
label: 'Experiment',
|
|
166
|
+
visible: true,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: 'color',
|
|
170
|
+
label: '',
|
|
171
|
+
description: 'Spectrum Color',
|
|
172
|
+
visible: true,
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
},
|
|
176
|
+
'13C': {
|
|
177
|
+
columns: [
|
|
178
|
+
{
|
|
179
|
+
name: 'visible',
|
|
180
|
+
label: '',
|
|
181
|
+
description: 'Show/Hide Spectrum',
|
|
182
|
+
visible: true,
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: 'name',
|
|
186
|
+
label: 'Spectrum Name',
|
|
187
|
+
description: 'Spectrum Name',
|
|
188
|
+
jpath: ['info', 'name'],
|
|
189
|
+
visible: true,
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
label: 'Frequency',
|
|
193
|
+
description: 'frequency',
|
|
194
|
+
jpath: ['info', 'baseFrequency'],
|
|
195
|
+
visible: true,
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: 'solvent',
|
|
199
|
+
label: 'Solvent',
|
|
200
|
+
description: 'Solvent',
|
|
201
|
+
jpath: ['info', 'solvent'],
|
|
202
|
+
visible: false,
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
jpath: ['info', 'pulseSequence'],
|
|
206
|
+
label: 'Pulse',
|
|
207
|
+
visible: true,
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
jpath: ['info', 'experiment'],
|
|
211
|
+
label: 'Experiment',
|
|
212
|
+
visible: true,
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
name: 'color',
|
|
216
|
+
label: '',
|
|
217
|
+
description: 'Spectrum Color',
|
|
218
|
+
visible: true,
|
|
219
|
+
},
|
|
220
|
+
],
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
},
|
|
33
226
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { InnerWorkspace } from '
|
|
1
|
+
import { InnerWorkspace } from 'nmr-load-save';
|
|
2
2
|
export declare const process1D: InnerWorkspace;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { WorkspacePreferences } from '
|
|
1
|
+
import { WorkspacePreferences } from 'nmr-load-save';
|
|
2
2
|
export declare const workspaceDefaultProperties: Required<WorkspacePreferences>;
|
|
@@ -48,6 +48,13 @@ export async function predictSpectra(molfile) {
|
|
|
48
48
|
},
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
+
function generateName(name, options) {
|
|
52
|
+
const { frequency, experiment } = options;
|
|
53
|
+
const freq = Array.isArray(frequency)
|
|
54
|
+
? frequency.map((f) => `${f}MHz`).join('_')
|
|
55
|
+
: `${frequency}MHz`;
|
|
56
|
+
return name || `${experiment.toUpperCase()}_${freq}_${v4()}`;
|
|
57
|
+
}
|
|
51
58
|
export function generateSpectra(predictedSpectra, inputOptions, color) {
|
|
52
59
|
const spectra = [];
|
|
53
60
|
for (const experiment in predictedSpectra) {
|
|
@@ -88,6 +95,7 @@ function generated1DSpectrum(params) {
|
|
|
88
95
|
const { spectrum, inputOptions, experiment, color } = params;
|
|
89
96
|
const { signals, ranges, nucleus } = spectrum;
|
|
90
97
|
const { name, '1d': { nbPoints }, frequency: freq, } = inputOptions;
|
|
98
|
+
const SpectrumName = generateName(name, { frequency: freq, experiment });
|
|
91
99
|
const frequency = calculateFrequency(nucleus, freq);
|
|
92
100
|
const { x, y } = signalsToXY(signals, {
|
|
93
101
|
...inputOptions['1d'][nucleus],
|
|
@@ -97,7 +105,6 @@ function generated1DSpectrum(params) {
|
|
|
97
105
|
const datum = initiateDatum1D({
|
|
98
106
|
data: { x, im: null, re: y },
|
|
99
107
|
display: {
|
|
100
|
-
name,
|
|
101
108
|
color,
|
|
102
109
|
},
|
|
103
110
|
info: {
|
|
@@ -108,6 +115,8 @@ function generated1DSpectrum(params) {
|
|
|
108
115
|
solvent: '',
|
|
109
116
|
experiment,
|
|
110
117
|
isFt: true,
|
|
118
|
+
name: SpectrumName,
|
|
119
|
+
title: SpectrumName,
|
|
111
120
|
},
|
|
112
121
|
}, {});
|
|
113
122
|
datum.ranges.values = mapRanges(ranges, datum);
|
|
@@ -152,6 +161,10 @@ function generated2DSpectrum(params) {
|
|
|
152
161
|
width,
|
|
153
162
|
factor: 3,
|
|
154
163
|
});
|
|
164
|
+
const SpectrumName = generateName(inputOptions.name, {
|
|
165
|
+
frequency,
|
|
166
|
+
experiment,
|
|
167
|
+
});
|
|
155
168
|
const datum = initiateDatum2D({
|
|
156
169
|
data: { rr: { ...minMaxContent, noise: 0.01 } },
|
|
157
170
|
display: {
|
|
@@ -159,7 +172,8 @@ function generated2DSpectrum(params) {
|
|
|
159
172
|
negativeColor: adjustAlpha(color, 40),
|
|
160
173
|
},
|
|
161
174
|
info: {
|
|
162
|
-
name:
|
|
175
|
+
name: SpectrumName,
|
|
176
|
+
title: SpectrumName,
|
|
163
177
|
nucleus: nuclei,
|
|
164
178
|
originFrequency: frequency,
|
|
165
179
|
baseFrequency: frequency,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Spectrum } from 'nmr-load-save';
|
|
1
|
+
import { Spectrum, Workspace } from 'nmr-load-save';
|
|
2
2
|
import { State } from '../component/reducer/Reducer';
|
|
3
|
-
import { Workspace } from '../component/workspaces/Workspace';
|
|
4
3
|
export declare enum DataExportOptions {
|
|
5
4
|
ROW_DATA = "ROW_DATA",
|
|
6
5
|
DATA_SOURCE = "DATA_SOURCE",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Draft } from 'immer';
|
|
2
|
-
import { Integrals, Ranges, SumOptions } from 'nmr-
|
|
2
|
+
import { Integrals, Ranges, SumOptions } from 'nmr-processing';
|
|
3
3
|
import { State } from '../../../component/reducer/Reducer';
|
|
4
4
|
import { StateMoleculeExtended } from '../../molecules/Molecule';
|
|
5
5
|
export interface SumParams {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function convertDataToFloat64Array(data:
|
|
1
|
+
import { NmrData1D } from 'cheminfo-types';
|
|
2
|
+
export declare function convertDataToFloat64Array(data: NmrData1D): NmrData1D;
|