nmrium 0.42.0 → 0.43.1-pre.1692874523
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 +1 -1
- package/lib/component/1d/Chart1D.js +3 -2
- package/lib/component/1d/ExclusionZonesAnnotations.js +1 -2
- package/lib/component/1d/Line.js +1 -1
- package/lib/component/1d/Viewer1D.js +15 -3
- package/lib/component/1d/integral/IntegralResizable.js +4 -3
- package/lib/component/1d/multiAnalysis/AnalysisRange.js +3 -1
- package/lib/component/1d/peaks/PeakAnnotations.js +20 -25
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.d.ts +2 -0
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js +59 -0
- package/lib/component/1d/peaks/PeakEditionManager.d.ts +18 -0
- package/lib/component/1d/peaks/PeakEditionManager.js +98 -0
- package/lib/component/1d/peaks/Peaks.d.ts +1 -0
- package/lib/component/1d/peaks/Peaks.js +22 -0
- package/lib/component/1d/ranges/Range.js +3 -1
- package/lib/component/1d/tool/BaseLineZones.d.ts +1 -1
- package/lib/component/1d/tool/BaseLineZones.js +11 -31
- package/lib/component/1d/utilities/intersectionResolver.d.ts +25 -0
- package/lib/component/1d/utilities/intersectionResolver.js +71 -0
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts +2 -2
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +17 -16
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.d.ts +2 -2
- package/lib/component/2d/SlicingView.js +1 -1
- package/lib/component/2d/Viewer2D.js +1 -3
- package/lib/component/2d/ft/Contours.js +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.d.ts +5 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.js +48 -8
- package/lib/component/assignment/index.d.ts +6 -1
- package/lib/component/assignment/index.js +5 -1
- package/lib/component/context/DispatchContext.d.ts +3 -2
- package/lib/component/context/KeyModifierContext.d.ts +13 -0
- package/lib/component/context/KeyModifierContext.js +39 -0
- package/lib/component/context/PreferencesContext.d.ts +39 -39
- package/lib/component/elements/Button.js +2 -0
- package/lib/component/elements/CounterLabel.d.ts +7 -0
- package/lib/component/elements/CounterLabel.js +12 -0
- package/lib/component/elements/EditableColumn.js +12 -6
- package/lib/component/elements/Input.d.ts +3 -12
- package/lib/component/elements/Input.js +24 -76
- package/lib/component/elements/Message.js +0 -1
- package/lib/component/elements/NumberInput.d.ts +1 -0
- package/lib/component/elements/NumberInput.js +10 -3
- package/lib/component/elements/PreferencesButton.d.ts +4 -0
- package/lib/component/elements/PreferencesButton.js +6 -0
- package/lib/component/elements/formik/FormikInput.d.ts +2 -2
- package/lib/component/elements/formik/FormikInput.js +3 -6
- package/lib/component/elements/formik/FormikOnChange.js +1 -1
- package/lib/component/elements/popup/Modal/ConfirmDialog.js +1 -1
- package/lib/component/header/ApodizationOptionsPanel.js +23 -14
- package/lib/component/header/BaseLineCorrectionPanel.js +31 -10
- package/lib/component/header/Header.d.ts +10 -3
- package/lib/component/header/Header.js +6 -6
- package/lib/component/header/ZeroFillingOptionsPanel.js +37 -31
- package/lib/component/highlight/index.d.ts +1 -0
- package/lib/component/highlight/index.js +1 -0
- package/lib/component/hooks/useActiveSpectrumPeaksViewState.js +1 -0
- package/lib/component/hooks/useCheckToolsVisibility.js +7 -3
- package/lib/component/hooks/useResizerStatus.d.ts +2 -0
- package/lib/component/hooks/useResizerStatus.js +7 -0
- package/lib/component/hooks/useSpectrum.js +1 -1
- package/lib/component/main/ErrorOverlay.js +20 -0
- package/lib/component/main/InnerNMRium.d.ts +7 -0
- package/lib/component/main/InnerNMRium.js +52 -0
- package/lib/component/main/InnerNMRiumContents.d.ts +14 -0
- package/lib/component/main/InnerNMRiumContents.js +88 -0
- package/lib/component/main/NMRium.d.ts +23 -0
- package/lib/component/main/NMRium.js +13 -0
- package/lib/component/main/NMRiumStateProvider.d.ts +9 -0
- package/lib/component/main/NMRiumStateProvider.js +74 -0
- package/lib/component/{SplitPaneWrapper.js → main/SplitPaneWrapper.js} +1 -1
- package/lib/component/main/StateError.d.ts +4 -0
- package/lib/component/main/StateError.js +16 -0
- package/lib/component/main/index.d.ts +3 -0
- package/lib/component/main/index.js +3 -0
- package/lib/component/main/types.d.ts +18 -0
- package/lib/component/main/types.js +2 -0
- package/lib/component/modal/AlignSpectraModal.js +78 -29
- package/lib/component/modal/MoleculeStructureEditorModal.d.ts +5 -1
- package/lib/component/modal/MoleculeStructureEditorModal.js +12 -15
- package/lib/component/modal/MultipletAnalysisModal.js +1 -1
- package/lib/component/modal/PredictSpectraModal.js +1 -1
- package/lib/component/modal/{AboutUsModal.js → aboutUs/AboutUsModal.js} +4 -3
- package/lib/component/modal/aboutUs/AboutUsZakodium.d.ts +1 -0
- package/lib/component/modal/aboutUs/AboutUsZakodium.js +33 -0
- package/lib/component/modal/changeSum/ChangeSumModal.d.ts +5 -16
- package/lib/component/modal/changeSum/ChangeSumModal.js +6 -115
- package/lib/component/modal/changeSum/ChangeSumModalContents.d.ts +18 -0
- package/lib/component/modal/changeSum/ChangeSumModalContents.js +94 -0
- package/lib/component/modal/metaImportation/MetaImportationModal.js +1 -1
- package/lib/component/modal/setting/GeneralSettings.js +2 -2
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.d.ts +1 -1
- package/lib/component/modal/setting/settings-tabs/GeneralTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/ImportationFiltersTabContent.js +1 -1
- package/lib/component/modal/setting/settingsValidation.js +5 -1
- package/lib/component/panels/InformationPanel.js +9 -100
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +6 -11
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +2 -2
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +2 -4
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +3 -9
- package/lib/component/panels/MoleculesPanel/Utilities.js +14 -10
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.d.ts +13 -9
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +8 -9
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +5 -5
- package/lib/component/panels/Panels.js +6 -7
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +11 -5
- package/lib/component/panels/PeaksPanel/PeaksTable.js +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +6 -10
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +1 -2
- package/lib/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +2 -2
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +6 -6
- package/lib/component/panels/SummaryPanel/utilities/Utilities.d.ts +2 -3
- package/lib/component/panels/SummaryPanel/utilities/Utilities.js +2 -3
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +8 -9
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +3 -2
- package/lib/component/panels/ZonesPanel/ZonesPreferences.js +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.d.ts +18 -1
- package/lib/component/panels/databasePanel/DatabasePanel.js +3 -40
- package/lib/component/panels/databasePanel/DatabaseSearchOptions.d.ts +18 -0
- package/lib/component/panels/databasePanel/DatabaseSearchOptions.js +53 -0
- package/lib/component/panels/header/DefaultPanelHeader.d.ts +3 -4
- package/lib/component/panels/header/DefaultPanelHeader.js +11 -13
- package/lib/component/panels/predictionPanel/PredictionPanel.js +3 -3
- package/lib/component/panels/predictionPanel/PredictionSimpleOptions.js +0 -1
- package/lib/component/panels/spectrumSimulation/SpectrumSimulation.js +1 -1
- package/lib/component/panels/spectrumSimulation/SpectrumSimulationSimpleOptions.js +1 -2
- package/lib/component/reducer/IgnoreActions.js +1 -1
- package/lib/component/reducer/Reducer.d.ts +3 -8
- package/lib/component/reducer/Reducer.js +34 -8
- package/lib/component/reducer/actions/DomainActions.js +2 -3
- package/lib/component/reducer/actions/FiltersActions.d.ts +32 -11
- package/lib/component/reducer/actions/FiltersActions.js +96 -28
- package/lib/component/reducer/actions/IntegralsActions.d.ts +6 -2
- package/lib/component/reducer/actions/IntegralsActions.js +44 -20
- package/lib/component/reducer/actions/MoleculeActions.js +4 -4
- package/lib/component/reducer/actions/PeaksActions.d.ts +6 -4
- package/lib/component/reducer/actions/PeaksActions.js +19 -1
- package/lib/component/reducer/actions/PreferencesActions.js +1 -2
- package/lib/component/reducer/actions/RangesActions.d.ts +6 -2
- package/lib/component/reducer/actions/RangesActions.js +31 -3
- package/lib/component/reducer/actions/ToolsActions.js +10 -10
- package/lib/component/reducer/core/Constants.d.ts +0 -4
- package/lib/component/reducer/core/Constants.js +0 -5
- package/lib/component/reducer/helper/ZoomHistoryManager.js +1 -2
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/getPreferencesByWorkspace.d.ts +1 -1
- package/lib/component/toolbar/FunctionToolBar.js +13 -3
- package/lib/component/toolbar/ToolTypes.d.ts +3 -2
- package/lib/component/toolbar/ToolTypes.js +57 -22
- package/lib/component/utility/export.js +7 -4
- package/lib/component/utility/filterType.d.ts +3 -0
- package/lib/component/utility/filterType.js +1 -0
- package/lib/component/workspaces/basic.js +2 -0
- package/lib/component/workspaces/embedded.js +2 -0
- package/lib/component/workspaces/exercise.js +2 -0
- package/lib/component/workspaces/prediction.js +9 -0
- package/lib/component/workspaces/process1D.js +2 -0
- package/lib/component/workspaces/workspaceDefaultProperties.js +2 -0
- package/lib/data/PredictionManager.d.ts +3 -3
- package/lib/data/PredictionManager.js +10 -10
- package/lib/data/constants/References.d.ts +5 -3
- package/lib/data/data1d/Spectrum1D/getReferenceShift.d.ts +10 -1
- package/lib/data/data1d/Spectrum1D/ranges/addRange.d.ts +1 -2
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +2 -8
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.js +1 -1
- package/lib/data/molecules/Molecule.js +2 -2
- package/lib/data/utilities/checkModifierKeyActivated.d.ts +1 -1
- package/lib/data/utilities/checkModifierKeyActivated.js +8 -13
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/ApodizationLine.js +1 -1
- package/lib-cjs/component/1d/Chart1D.js +3 -2
- package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +1 -2
- package/lib-cjs/component/1d/Line.js +1 -1
- package/lib-cjs/component/1d/Viewer1D.js +15 -3
- package/lib-cjs/component/1d/integral/IntegralResizable.js +4 -3
- package/lib-cjs/component/1d/multiAnalysis/AnalysisRange.js +3 -1
- package/lib-cjs/component/1d/peaks/PeakAnnotations.js +19 -24
- package/lib-cjs/component/1d/peaks/PeakAnnotationsSpreadMode.js +64 -0
- package/lib-cjs/component/1d/peaks/PeakEditionManager.js +129 -0
- package/lib-cjs/component/1d/peaks/Peaks.js +29 -0
- package/lib-cjs/component/1d/ranges/Range.js +3 -1
- package/lib-cjs/component/1d/tool/BaseLineZones.js +11 -34
- package/lib-cjs/component/1d/utilities/intersectionResolver.js +75 -0
- package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +17 -16
- package/lib-cjs/component/2d/SlicingView.js +1 -1
- package/lib-cjs/component/2d/Viewer2D.js +1 -3
- package/lib-cjs/component/2d/ft/Contours.js +1 -1
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +47 -7
- package/lib-cjs/component/assignment/index.js +5 -1
- package/lib-cjs/component/context/KeyModifierContext.js +44 -0
- package/lib-cjs/component/elements/Button.js +2 -0
- package/lib-cjs/component/elements/CounterLabel.js +16 -0
- package/lib-cjs/component/elements/EditableColumn.js +12 -6
- package/lib-cjs/component/elements/Input.js +23 -75
- package/lib-cjs/component/elements/Message.js +0 -1
- package/lib-cjs/component/elements/NumberInput.js +12 -2
- package/lib-cjs/component/elements/PreferencesButton.js +13 -0
- package/lib-cjs/component/elements/formik/FormikInput.js +3 -6
- package/lib-cjs/component/elements/formik/FormikOnChange.js +1 -1
- package/lib-cjs/component/elements/popup/Modal/ConfirmDialog.js +1 -1
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +23 -14
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +30 -9
- package/lib-cjs/component/header/Header.js +6 -6
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +35 -29
- package/lib-cjs/component/highlight/index.js +1 -0
- package/lib-cjs/component/hooks/useActiveSpectrumPeaksViewState.js +1 -0
- package/lib-cjs/component/hooks/useCheckToolsVisibility.js +7 -3
- package/lib-cjs/component/hooks/useResizerStatus.js +11 -0
- package/lib-cjs/component/hooks/useSpectrum.js +1 -1
- package/lib-cjs/component/main/ErrorOverlay.js +26 -0
- package/lib-cjs/component/main/InnerNMRium.js +82 -0
- package/lib-cjs/component/main/InnerNMRiumContents.js +95 -0
- package/lib-cjs/component/main/NMRium.js +19 -0
- package/lib-cjs/component/main/NMRiumStateProvider.js +80 -0
- package/lib-cjs/component/{SplitPaneWrapper.js → main/SplitPaneWrapper.js} +1 -1
- package/lib-cjs/component/main/StateError.js +20 -0
- package/lib-cjs/component/main/index.js +21 -0
- package/lib-cjs/component/main/types.js +3 -0
- package/lib-cjs/component/modal/AlignSpectraModal.js +100 -28
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +11 -17
- package/lib-cjs/component/modal/MultipletAnalysisModal.js +1 -1
- package/lib-cjs/component/modal/PredictSpectraModal.js +1 -1
- package/lib-cjs/component/modal/{AboutUsModal.js → aboutUs/AboutUsModal.js} +4 -3
- package/lib-cjs/component/modal/aboutUs/AboutUsZakodium.js +39 -0
- package/lib-cjs/component/modal/changeSum/ChangeSumModal.js +6 -141
- package/lib-cjs/component/modal/changeSum/ChangeSumModalContents.js +124 -0
- package/lib-cjs/component/modal/metaImportation/MetaImportationModal.js +1 -1
- package/lib-cjs/component/modal/setting/GeneralSettings.js +2 -2
- package/lib-cjs/component/modal/setting/settings-tabs/GeneralTabContent.js +1 -1
- package/lib-cjs/component/modal/setting/settings-tabs/ImportationFiltersTabContent.js +1 -1
- package/lib-cjs/component/modal/setting/settingsValidation.js +4 -0
- package/lib-cjs/component/panels/InformationPanel.js +7 -98
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +29 -11
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +1 -1
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +2 -2
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +2 -4
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +14 -10
- package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +8 -9
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +4 -4
- package/lib-cjs/component/panels/Panels.js +6 -7
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +32 -3
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +29 -10
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +1 -2
- package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +29 -6
- package/lib-cjs/component/panels/SummaryPanel/utilities/Utilities.js +4 -5
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +7 -8
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +26 -2
- package/lib-cjs/component/panels/ZonesPanel/ZonesPreferences.js +1 -1
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +3 -40
- package/lib-cjs/component/panels/databasePanel/DatabaseSearchOptions.js +60 -0
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +12 -12
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +3 -3
- package/lib-cjs/component/panels/predictionPanel/PredictionSimpleOptions.js +0 -1
- package/lib-cjs/component/panels/spectrumSimulation/SpectrumSimulation.js +1 -1
- package/lib-cjs/component/panels/spectrumSimulation/SpectrumSimulationSimpleOptions.js +1 -2
- package/lib-cjs/component/reducer/IgnoreActions.js +1 -1
- package/lib-cjs/component/reducer/Reducer.js +33 -7
- package/lib-cjs/component/reducer/actions/DomainActions.js +2 -3
- package/lib-cjs/component/reducer/actions/FiltersActions.js +98 -28
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +45 -20
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +3 -3
- package/lib-cjs/component/reducer/actions/PeaksActions.js +20 -1
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +1 -2
- package/lib-cjs/component/reducer/actions/RangesActions.js +31 -2
- package/lib-cjs/component/reducer/actions/ToolsActions.js +9 -9
- package/lib-cjs/component/reducer/core/Constants.js +1 -6
- package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +1 -2
- package/lib-cjs/component/toolbar/FunctionToolBar.js +13 -3
- package/lib-cjs/component/toolbar/ToolTypes.js +57 -22
- package/lib-cjs/component/utility/export.js +7 -4
- package/lib-cjs/component/utility/filterType.js +2 -0
- package/lib-cjs/component/workspaces/basic.js +2 -0
- package/lib-cjs/component/workspaces/embedded.js +2 -0
- package/lib-cjs/component/workspaces/exercise.js +2 -0
- package/lib-cjs/component/workspaces/prediction.js +9 -0
- package/lib-cjs/component/workspaces/process1D.js +2 -0
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +2 -0
- package/lib-cjs/data/PredictionManager.js +9 -9
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +1 -7
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectSignal.js +1 -1
- package/lib-cjs/data/molecules/Molecule.js +2 -2
- package/lib-cjs/data/utilities/checkModifierKeyActivated.js +8 -13
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +26 -25
- package/lib/component/1d/peaks/PeakAnnotation.d.ts +0 -12
- package/lib/component/1d/peaks/PeakAnnotation.js +0 -116
- package/lib/component/ErrorOverlay.js +0 -27
- package/lib/component/NMRium.d.ts +0 -42
- package/lib/component/NMRium.js +0 -237
- package/lib/component/reducer/actions/GlobalActions.d.ts +0 -9
- package/lib/component/reducer/actions/GlobalActions.js +0 -4
- package/lib-cjs/component/1d/peaks/PeakAnnotation.js +0 -118
- package/lib-cjs/component/ErrorOverlay.js +0 -30
- package/lib-cjs/component/NMRium.js +0 -267
- package/lib-cjs/component/reducer/actions/GlobalActions.js +0 -7
- /package/lib/component/{ErrorOverlay.d.ts → main/ErrorOverlay.d.ts} +0 -0
- /package/lib/component/{SplitPaneWrapper.d.ts → main/SplitPaneWrapper.d.ts} +0 -0
- /package/lib/component/modal/{AboutUsModal.d.ts → aboutUs/AboutUsModal.d.ts} +0 -0
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.handleShowJGraph = exports.handleAutoSpectraRangesDetection = exports.handleShowRangesIntegrals = exports.handleShowMultiplicityTrees = exports.handleUpdateRange = exports.handleChangeRangesSumFlag = exports.handleSetDiaIDRange = exports.unlinkRange = exports.handleUnlinkRange = exports.handleSaveEditedRange = exports.handleChangeRangeSignalKind = exports.handleChangeRangeSignalValue = exports.handleChangeRangeRelativeValue = exports.handleResizeRange = exports.handleAddRange = exports.handleChangeRangeSum = exports.handleDeleteSignal = exports.deleteSignal1D = exports.handleDeleteRange = exports.handleAutoRangesDetection = void 0;
|
|
6
|
+
exports.handleShowJGraph = exports.handleAutoSpectraRangesDetection = exports.handleShowRangesIntegrals = exports.handleShowMultiplicityTrees = exports.handleUpdateRange = exports.handleChangeRangesSumFlag = exports.handleSetDiaIDRange = exports.unlinkRange = exports.handleUnlinkRange = exports.handleSaveEditedRange = exports.handleChangeRangeSignalKind = exports.handleChangeRangeSignalValue = exports.handleChangeRangeRelativeValue = exports.handleResizeRange = exports.handleAddRange = exports.handleChangeRangeSum = exports.handleDeleteSignal = exports.deleteSignal1D = exports.handleDeleteRange = exports.handleAutoRangesDetection = exports.handleCutRange = void 0;
|
|
7
7
|
const uuid_1 = require("@lukeed/uuid");
|
|
8
8
|
const immer_1 = require("immer");
|
|
9
9
|
const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
@@ -16,6 +16,7 @@ const RangeUtilities_1 = require("../../../data/utilities/RangeUtilities");
|
|
|
16
16
|
const Reducer_1 = require("../Reducer");
|
|
17
17
|
const getActiveSpectrum_1 = require("../helper/getActiveSpectrum");
|
|
18
18
|
const getRange_1 = __importDefault(require("../helper/getRange"));
|
|
19
|
+
const getSpectrum_1 = require("../helper/getSpectrum");
|
|
19
20
|
const CorrelationsActions_1 = require("./CorrelationsActions");
|
|
20
21
|
const DomainActions_1 = require("./DomainActions");
|
|
21
22
|
const ToolsActions_1 = require("./ToolsActions");
|
|
@@ -266,6 +267,13 @@ function handleChangeRangeSum(draft, action) {
|
|
|
266
267
|
}
|
|
267
268
|
}
|
|
268
269
|
exports.handleChangeRangeSum = handleChangeRangeSum;
|
|
270
|
+
function initiateRangeSumOptions(datum, options) {
|
|
271
|
+
const { nucleus, molecules } = options;
|
|
272
|
+
datum.ranges.options = (0, SumManager_1.initSumOptions)(datum.ranges.options, {
|
|
273
|
+
molecules,
|
|
274
|
+
nucleus,
|
|
275
|
+
});
|
|
276
|
+
}
|
|
269
277
|
//action
|
|
270
278
|
function handleAddRange(draft, action) {
|
|
271
279
|
const { startX, endX } = action.payload;
|
|
@@ -275,12 +283,16 @@ function handleAddRange(draft, action) {
|
|
|
275
283
|
if (activeSpectrum?.id) {
|
|
276
284
|
const { index } = activeSpectrum;
|
|
277
285
|
const [from, to] = range;
|
|
278
|
-
|
|
286
|
+
const datum = data[index];
|
|
287
|
+
(0, Spectrum1D_1.addRange)(datum, {
|
|
279
288
|
from,
|
|
280
289
|
to,
|
|
290
|
+
});
|
|
291
|
+
initiateRangeSumOptions(datum, {
|
|
281
292
|
nucleus,
|
|
282
293
|
molecules,
|
|
283
294
|
});
|
|
295
|
+
(0, Spectrum1D_1.updateRangesRelativeValues)(datum);
|
|
284
296
|
(0, CorrelationsActions_1.handleUpdateCorrelations)(draft);
|
|
285
297
|
(0, DomainActions_1.setIntegralsYDomain)(draft, data[index]);
|
|
286
298
|
}
|
|
@@ -384,3 +396,20 @@ function handleShowJGraph(draft, action) {
|
|
|
384
396
|
}
|
|
385
397
|
}
|
|
386
398
|
exports.handleShowJGraph = handleShowJGraph;
|
|
399
|
+
function handleCutRange(draft, action) {
|
|
400
|
+
const { cutValue } = action.payload;
|
|
401
|
+
const spectrum = (0, getSpectrum_1.getSpectrum)(draft);
|
|
402
|
+
const ranges = spectrum.ranges.values;
|
|
403
|
+
for (let i = 0; i < ranges.length; i++) {
|
|
404
|
+
const { to, from } = ranges[i];
|
|
405
|
+
if (cutValue > from && cutValue < to) {
|
|
406
|
+
ranges.splice(i, 1);
|
|
407
|
+
(0, Spectrum1D_1.addRange)(spectrum, { from, to: cutValue });
|
|
408
|
+
(0, Spectrum1D_1.addRange)(spectrum, { from: cutValue, to });
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
(0, Spectrum1D_1.updateRangesRelativeValues)(spectrum);
|
|
412
|
+
(0, DomainActions_1.setIntegralsYDomain)(draft, spectrum);
|
|
413
|
+
(0, CorrelationsActions_1.handleUpdateCorrelations)(draft);
|
|
414
|
+
}
|
|
415
|
+
exports.handleCutRange = handleCutRange;
|
|
@@ -182,7 +182,7 @@ function handleToggleRealImaginaryVisibility(draft) {
|
|
|
182
182
|
}
|
|
183
183
|
exports.handleToggleRealImaginaryVisibility = handleToggleRealImaginaryVisibility;
|
|
184
184
|
function handleBrushEnd(draft, action) {
|
|
185
|
-
const is2D = draft.displayerMode ===
|
|
185
|
+
const is2D = draft.displayerMode === '2D';
|
|
186
186
|
const { height, margin, yDomain, yDomains, width, xDomains, xDomain, mode } = draft;
|
|
187
187
|
const xScale = (0, scale_1.getXScale)({ width, xDomains, xDomain, mode, margin });
|
|
188
188
|
const verticalAlign = (0, getVerticalAlign_1.getVerticalAlign)(draft);
|
|
@@ -215,7 +215,7 @@ function handleZoom(draft, action) {
|
|
|
215
215
|
const { event, trackID, selectedTool } = action.payload;
|
|
216
216
|
const { view: { ranges: rangeState }, displayerMode, yDomains, integralsYDomains, } = draft;
|
|
217
217
|
const activeSpectra = (0, getActiveSpectra_1.getActiveSpectra)(draft);
|
|
218
|
-
if (displayerMode ===
|
|
218
|
+
if (displayerMode === '2D') {
|
|
219
219
|
const index = trackID === DimensionLayout_1.LAYOUT.TOP_1D ? 0 : trackID === DimensionLayout_1.LAYOUT.LEFT_1D ? 1 : null;
|
|
220
220
|
if (index !== null) {
|
|
221
221
|
const id = getSpectrumID(draft, index);
|
|
@@ -262,7 +262,7 @@ function zoomOut(draft, action) {
|
|
|
262
262
|
const { zoomType, trackID } = action?.payload || {};
|
|
263
263
|
const { xDomain, yDomain } = draft.originDomain;
|
|
264
264
|
const zoomHistory = (0, ZoomHistoryManager_1.default)(draft.zoom.history, draft.view.spectra.activeTab, { xDomain, yDomain });
|
|
265
|
-
if (draft.displayerMode ===
|
|
265
|
+
if (draft.displayerMode === '1D') {
|
|
266
266
|
switch (zoomType) {
|
|
267
267
|
case Zoom1DManager_1.ZOOM_TYPES.HORIZONTAL: {
|
|
268
268
|
draft.xDomain = xDomain;
|
|
@@ -322,12 +322,12 @@ function hasAcceptedSpectrum(draft, index) {
|
|
|
322
322
|
function setMargin(draft) {
|
|
323
323
|
const activeSpectrum = (0, getActiveSpectrum_1.getActiveSpectrum)(draft);
|
|
324
324
|
const spectrum = (activeSpectrum?.id && draft.data[activeSpectrum.index]) || null;
|
|
325
|
-
if (draft.displayerMode ===
|
|
325
|
+
if (draft.displayerMode === '2D' &&
|
|
326
326
|
(draft.toolOptions.selectedTool === ToolTypes_1.options.slicing.id ||
|
|
327
327
|
spectrum?.info.isFid)) {
|
|
328
328
|
draft.margin = Constants_1.MARGIN['2D'];
|
|
329
329
|
}
|
|
330
|
-
else if (draft.displayerMode ===
|
|
330
|
+
else if (draft.displayerMode === '2D') {
|
|
331
331
|
const top = hasAcceptedSpectrum(draft, 0)
|
|
332
332
|
? Constants_1.MARGIN['2D'].top
|
|
333
333
|
: Constants_1.MARGIN['1D'].top;
|
|
@@ -336,7 +336,7 @@ function setMargin(draft) {
|
|
|
336
336
|
: Constants_1.MARGIN['1D'].left;
|
|
337
337
|
draft.margin = { ...Constants_1.MARGIN['2D'], top, left };
|
|
338
338
|
}
|
|
339
|
-
else if (draft.displayerMode ===
|
|
339
|
+
else if (draft.displayerMode === '1D') {
|
|
340
340
|
draft.margin = Constants_1.MARGIN['1D'];
|
|
341
341
|
}
|
|
342
342
|
}
|
|
@@ -345,8 +345,8 @@ exports.setMargin = setMargin;
|
|
|
345
345
|
function setDisplayerMode(draft, data) {
|
|
346
346
|
draft.displayerMode =
|
|
347
347
|
data && data.some((d) => d.info.dimension === 2)
|
|
348
|
-
?
|
|
349
|
-
:
|
|
348
|
+
? '2D'
|
|
349
|
+
: '1D';
|
|
350
350
|
}
|
|
351
351
|
//utility
|
|
352
352
|
function setTabActiveSpectrum(draft, dataGroupByTab) {
|
|
@@ -463,7 +463,7 @@ function levelChangeHandler(draft, action) {
|
|
|
463
463
|
}
|
|
464
464
|
exports.levelChangeHandler = levelChangeHandler;
|
|
465
465
|
function setSpectraSameTopHandler(draft) {
|
|
466
|
-
if (draft.displayerMode ===
|
|
466
|
+
if (draft.displayerMode === '1D') {
|
|
467
467
|
draft.originDomain.shareYDomain = false;
|
|
468
468
|
(0, Zoom1DManager_1.setZoom)(draft, { scale: 0.8 });
|
|
469
469
|
}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MARGIN =
|
|
4
|
-
var DISPLAYER_MODE;
|
|
5
|
-
(function (DISPLAYER_MODE) {
|
|
6
|
-
DISPLAYER_MODE["DM_1D"] = "1D";
|
|
7
|
-
DISPLAYER_MODE["DM_2D"] = "2D";
|
|
8
|
-
})(DISPLAYER_MODE || (exports.DISPLAYER_MODE = DISPLAYER_MODE = {}));
|
|
3
|
+
exports.MARGIN = void 0;
|
|
9
4
|
exports.MARGIN = {
|
|
10
5
|
'2D': { top: 100, right: 50, bottom: 70, left: 100 },
|
|
11
6
|
'1D': {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addToBrushHistory = void 0;
|
|
4
|
-
const Constants_1 = require("../core/Constants");
|
|
5
4
|
function zoomHistoryManager(zoomHistory, nucleus, baseZoom) {
|
|
6
5
|
if (!zoomHistory[nucleus] && !Array.isArray(zoomHistory[nucleus])) {
|
|
7
6
|
zoomHistory[nucleus] = [];
|
|
@@ -42,7 +41,7 @@ function addToBrushHistory(draft, options) {
|
|
|
42
41
|
draft.zoom.history,
|
|
43
42
|
// eslint-disable-next-line unicorn/consistent-destructuring
|
|
44
43
|
draft.view.spectra.activeTab);
|
|
45
|
-
if (displayerMode ===
|
|
44
|
+
if (displayerMode === '2D') {
|
|
46
45
|
switch (trackID) {
|
|
47
46
|
case 'CENTER_2D':
|
|
48
47
|
draft.xDomain = xDomain;
|
|
@@ -33,11 +33,21 @@ function FunctionToolBarInner({ defaultValue, ftCounter, }) {
|
|
|
33
33
|
type: 'APPLY_FFT_FILTER',
|
|
34
34
|
});
|
|
35
35
|
}, [dispatch]);
|
|
36
|
-
|
|
36
|
+
const handleFFtDimension1Filter = (0, react_1.useCallback)(() => {
|
|
37
|
+
dispatch({
|
|
38
|
+
type: 'APPLY_FFT_DIMENSION_1_FILTER',
|
|
39
|
+
});
|
|
40
|
+
}, [dispatch]);
|
|
41
|
+
const handleFFtDimension2Filter = (0, react_1.useCallback)(() => {
|
|
42
|
+
dispatch({
|
|
43
|
+
type: 'APPLY_FFT_DIMENSION_2_FILTER',
|
|
44
|
+
});
|
|
45
|
+
}, [dispatch]);
|
|
46
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(ToggleButtonGroup_1.default, { value: option, onChange: handleChange, children: [isButtonVisible('zoom') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zoom.id, id: ToolTypes_1.options.zoom.id, title: `${ToolTypes_1.options.zoom.label}`, children: (0, jsx_runtime_1.jsx)(fa_1.FaSearchPlus, {}) }, ToolTypes_1.options.zoom.id)), isButtonVisible('zoomOut') && ((0, jsx_runtime_1.jsx)(ui_1.Toolbar.Item, { id: "zoom-out", onClick: handleFullZoomOut, title: "Horizontal zoom out ( Press f ), Horizontal and Vertical zoom out, double click ( Press ff )", children: (0, jsx_runtime_1.jsx)(fa_1.FaExpand, {}) })), isButtonVisible('peakPicking') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.peakPicking.id, title: `${ToolTypes_1.options.peakPicking.label} ( Press p )`, id: ToolTypes_1.options.peakPicking.id, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrPeakPicking, {}) }, ToolTypes_1.options.peakPicking.id)), isButtonVisible('integral') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.integral.id, id: ToolTypes_1.options.integral.id, title: `${ToolTypes_1.options.integral.label} ( Press i )`, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrIntegrate, {}) }, ToolTypes_1.options.integral.id)), isButtonVisible('zonePicking') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zonePicking.id, id: ToolTypes_1.options.zonePicking.id, title: `${ToolTypes_1.options.zonePicking.label} ( Press r )`, children: (0, jsx_runtime_1.jsx)(fa_1.FaDiceFour, {}) }, ToolTypes_1.options.zonePicking.id)), isButtonVisible('slicing') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.slicing.id, id: ToolTypes_1.options.slicing.id, title: `${ToolTypes_1.options.slicing.label}`, children: (0, jsx_runtime_1.jsx)("p", { children: "Slic" }) }, ToolTypes_1.options.slicing.id)), isButtonVisible('rangePicking') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.rangePicking.id, title: `${ToolTypes_1.options.rangePicking.label} ( Press r )`, id: ToolTypes_1.options.rangePicking.id, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrRangePicking, {}) }, ToolTypes_1.options.rangePicking.id)), isButtonVisible('multipleSpectraAnalysis', {
|
|
37
47
|
checkSpectrumType: false,
|
|
38
48
|
}) &&
|
|
39
|
-
ftCounter > 1 && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.multipleSpectraAnalysis.id, id: ToolTypes_1.options.multipleSpectraAnalysis.id, title: ToolTypes_1.options.multipleSpectraAnalysis.label, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrMultipleAnalysis, {}) }, ToolTypes_1.options.multipleSpectraAnalysis.id)), isButtonVisible('apodization') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.apodization.id, id: ToolTypes_1.options.apodization.id, title: `${ToolTypes_1.options.apodization.label} (Press a)`, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrApodization, {}) }, ToolTypes_1.options.apodization.id)), isButtonVisible('zeroFilling') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zeroFilling.id, id: ToolTypes_1.options.zeroFilling.id, title: ToolTypes_1.options.zeroFilling.label
|
|
40
|
-
ftCounter > 0 && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.exclusionZones.id, title: `${ToolTypes_1.options.exclusionZones.label} ( Press e )`, id: ToolTypes_1.options.exclusionZones.id, children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 18 }, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrMultipleAnalysis, {}) }) }, ToolTypes_1.options.exclusionZones.id))] }), isButtonVisible('fft') && ((0, jsx_runtime_1.jsx)(ui_1.Toolbar.Item, { id: ToolTypes_1.options.fft.id, className: "cheminfo", title: ToolTypes_1.options.fft.label
|
|
49
|
+
ftCounter > 1 && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.multipleSpectraAnalysis.id, id: ToolTypes_1.options.multipleSpectraAnalysis.id, title: ToolTypes_1.options.multipleSpectraAnalysis.label, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrMultipleAnalysis, {}) }, ToolTypes_1.options.multipleSpectraAnalysis.id)), isButtonVisible('apodization') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.apodization.id, id: ToolTypes_1.options.apodization.id, title: `${ToolTypes_1.options.apodization.label} (Press a)`, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrApodization, {}) }, ToolTypes_1.options.apodization.id)), isButtonVisible('zeroFilling') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zeroFilling.id, id: ToolTypes_1.options.zeroFilling.id, title: `${ToolTypes_1.options.zeroFilling.label} ( Press z )`, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrZeroFilling, {}) }, ToolTypes_1.options.zeroFilling.id)), isButtonVisible('phaseCorrection') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.phaseCorrection.id, id: ToolTypes_1.options.phaseCorrection.id, title: `${ToolTypes_1.options.phaseCorrection.label} ( Press a )`, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrPhaseCorrection, {}) }, ToolTypes_1.options.phaseCorrection.id)), isButtonVisible('baselineCorrection') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.baselineCorrection.id, id: ToolTypes_1.options.baselineCorrection.id, title: `${ToolTypes_1.options.baselineCorrection.label} ( Press b )`, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrBaselineCorrection, {}) }, ToolTypes_1.options.baselineCorrection.id)), isButtonVisible('exclusionZones', { checkSpectrumType: false }) &&
|
|
50
|
+
ftCounter > 0 && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.exclusionZones.id, title: `${ToolTypes_1.options.exclusionZones.label} ( Press e )`, id: ToolTypes_1.options.exclusionZones.id, children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 18 }, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrMultipleAnalysis, {}) }) }, ToolTypes_1.options.exclusionZones.id))] }), isButtonVisible('fft') && ((0, jsx_runtime_1.jsx)(ui_1.Toolbar.Item, { id: ToolTypes_1.options.fft.id, className: "cheminfo", title: `${ToolTypes_1.options.fft.label} ( Press t )`, onClick: handleOnFFTFilter, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrFourierTransform, {}) })), isButtonVisible('fftDimension1') && ((0, jsx_runtime_1.jsx)(ui_1.Toolbar.Item, { id: ToolTypes_1.options.fftDimension1.id, className: "cheminfo", title: ToolTypes_1.options.fftDimension1.label, onClick: handleFFtDimension1Filter, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrFourierTransform, {}) })), isButtonVisible('fftDimension2') && ((0, jsx_runtime_1.jsx)(ui_1.Toolbar.Item, { id: ToolTypes_1.options.fftDimension2.id, className: "cheminfo", title: ToolTypes_1.options.fftDimension2.label, onClick: handleFFtDimension2Filter, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrFourierTransform, {}) }))] }));
|
|
41
51
|
}
|
|
42
52
|
const MemoizedFunctionToolBar = (0, react_1.memo)(FunctionToolBarInner);
|
|
43
53
|
function FunctionToolBar({ defaultValue = ToolTypes_1.options.zoom.id, }) {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.options = void 0;
|
|
4
4
|
const nmr_processing_1 = require("nmr-processing");
|
|
5
|
-
const Constants_1 = require("../reducer/core/Constants");
|
|
6
5
|
exports.options = {
|
|
7
6
|
zoom: {
|
|
8
7
|
id: 'zoom',
|
|
@@ -16,7 +15,7 @@ exports.options = {
|
|
|
16
15
|
label: 'Peaks picking',
|
|
17
16
|
hasOptionPanel: true,
|
|
18
17
|
isFilter: false,
|
|
19
|
-
mode:
|
|
18
|
+
mode: '1D',
|
|
20
19
|
spectraOptions: [
|
|
21
20
|
{
|
|
22
21
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -30,7 +29,7 @@ exports.options = {
|
|
|
30
29
|
label: 'Integral Tool',
|
|
31
30
|
hasOptionPanel: false,
|
|
32
31
|
isFilter: false,
|
|
33
|
-
mode:
|
|
32
|
+
mode: '1D',
|
|
34
33
|
spectraOptions: [
|
|
35
34
|
{
|
|
36
35
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -44,7 +43,7 @@ exports.options = {
|
|
|
44
43
|
label: 'Zone tool',
|
|
45
44
|
hasOptionPanel: true,
|
|
46
45
|
isFilter: false,
|
|
47
|
-
mode:
|
|
46
|
+
mode: '2D',
|
|
48
47
|
spectraOptions: [
|
|
49
48
|
{
|
|
50
49
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -58,7 +57,7 @@ exports.options = {
|
|
|
58
57
|
label: 'Slicing tool',
|
|
59
58
|
hasOptionPanel: false,
|
|
60
59
|
isFilter: false,
|
|
61
|
-
mode:
|
|
60
|
+
mode: '2D',
|
|
62
61
|
spectraOptions: [
|
|
63
62
|
{
|
|
64
63
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -72,7 +71,7 @@ exports.options = {
|
|
|
72
71
|
label: 'Move spectrum horizontally',
|
|
73
72
|
hasOptionPanel: false,
|
|
74
73
|
isFilter: false,
|
|
75
|
-
mode:
|
|
74
|
+
mode: '1D',
|
|
76
75
|
spectraOptions: [
|
|
77
76
|
{
|
|
78
77
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -86,7 +85,7 @@ exports.options = {
|
|
|
86
85
|
label: 'Equalizer tool',
|
|
87
86
|
hasOptionPanel: false,
|
|
88
87
|
isFilter: false,
|
|
89
|
-
mode:
|
|
88
|
+
mode: '1D',
|
|
90
89
|
spectraOptions: [
|
|
91
90
|
{
|
|
92
91
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -100,7 +99,7 @@ exports.options = {
|
|
|
100
99
|
label: 'Range picking and multiplet analysis',
|
|
101
100
|
hasOptionPanel: true,
|
|
102
101
|
isFilter: false,
|
|
103
|
-
mode:
|
|
102
|
+
mode: '1D',
|
|
104
103
|
spectraOptions: [
|
|
105
104
|
{
|
|
106
105
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -114,7 +113,7 @@ exports.options = {
|
|
|
114
113
|
label: nmr_processing_1.Filters.apodization.name,
|
|
115
114
|
hasOptionPanel: true,
|
|
116
115
|
isFilter: true,
|
|
117
|
-
mode:
|
|
116
|
+
mode: '1D',
|
|
118
117
|
spectraOptions: [
|
|
119
118
|
{
|
|
120
119
|
info: [
|
|
@@ -131,7 +130,7 @@ exports.options = {
|
|
|
131
130
|
label: nmr_processing_1.Filters.zeroFilling.name,
|
|
132
131
|
hasOptionPanel: true,
|
|
133
132
|
isFilter: true,
|
|
134
|
-
mode:
|
|
133
|
+
mode: '1D',
|
|
135
134
|
spectraOptions: [
|
|
136
135
|
{
|
|
137
136
|
info: [
|
|
@@ -148,7 +147,7 @@ exports.options = {
|
|
|
148
147
|
label: nmr_processing_1.Filters.phaseCorrection.name,
|
|
149
148
|
hasOptionPanel: true,
|
|
150
149
|
isFilter: true,
|
|
151
|
-
mode:
|
|
150
|
+
mode: '1D',
|
|
152
151
|
spectraOptions: [
|
|
153
152
|
{
|
|
154
153
|
info: [
|
|
@@ -165,7 +164,7 @@ exports.options = {
|
|
|
165
164
|
label: nmr_processing_1.Filters.baselineCorrection.name,
|
|
166
165
|
hasOptionPanel: true,
|
|
167
166
|
isFilter: true,
|
|
168
|
-
mode:
|
|
167
|
+
mode: '1D',
|
|
169
168
|
spectraOptions: [
|
|
170
169
|
{
|
|
171
170
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -179,7 +178,7 @@ exports.options = {
|
|
|
179
178
|
label: 'range general selector',
|
|
180
179
|
hasOptionPanel: false,
|
|
181
180
|
isFilter: false,
|
|
182
|
-
mode:
|
|
181
|
+
mode: '1D',
|
|
183
182
|
spectraOptions: [
|
|
184
183
|
{
|
|
185
184
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -193,7 +192,7 @@ exports.options = {
|
|
|
193
192
|
label: 'edit range',
|
|
194
193
|
hasOptionPanel: false,
|
|
195
194
|
isFilter: false,
|
|
196
|
-
mode:
|
|
195
|
+
mode: '1D',
|
|
197
196
|
spectraOptions: [
|
|
198
197
|
{
|
|
199
198
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -207,7 +206,7 @@ exports.options = {
|
|
|
207
206
|
label: 'Multiple spectra analysis',
|
|
208
207
|
hasOptionPanel: false,
|
|
209
208
|
isFilter: false,
|
|
210
|
-
mode:
|
|
209
|
+
mode: '1D',
|
|
211
210
|
spectraOptions: [
|
|
212
211
|
{
|
|
213
212
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -224,7 +223,7 @@ exports.options = {
|
|
|
224
223
|
label: 'Exclusion zones',
|
|
225
224
|
hasOptionPanel: false,
|
|
226
225
|
isFilter: false,
|
|
227
|
-
mode:
|
|
226
|
+
mode: '1D',
|
|
228
227
|
spectraOptions: [
|
|
229
228
|
{
|
|
230
229
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -241,7 +240,7 @@ exports.options = {
|
|
|
241
240
|
label: 'Matrix generations exclusion zones',
|
|
242
241
|
hasOptionPanel: false,
|
|
243
242
|
isFilter: false,
|
|
244
|
-
mode:
|
|
243
|
+
mode: '1D',
|
|
245
244
|
spectraOptions: [
|
|
246
245
|
{
|
|
247
246
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -258,7 +257,7 @@ exports.options = {
|
|
|
258
257
|
label: 'Filter database',
|
|
259
258
|
hasOptionPanel: false,
|
|
260
259
|
isFilter: false,
|
|
261
|
-
mode:
|
|
260
|
+
mode: '1D',
|
|
262
261
|
spectraOptions: [
|
|
263
262
|
{
|
|
264
263
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -279,7 +278,7 @@ exports.options = {
|
|
|
279
278
|
label: 'Fourier transform',
|
|
280
279
|
hasOptionPanel: false,
|
|
281
280
|
isFilter: true,
|
|
282
|
-
mode:
|
|
281
|
+
mode: '1D',
|
|
283
282
|
spectraOptions: [
|
|
284
283
|
{
|
|
285
284
|
info: [
|
|
@@ -291,6 +290,42 @@ exports.options = {
|
|
|
291
290
|
],
|
|
292
291
|
isToggle: false,
|
|
293
292
|
},
|
|
293
|
+
fftDimension1: {
|
|
294
|
+
id: 'fftDimension1',
|
|
295
|
+
label: 'Fourier transform dimension 1',
|
|
296
|
+
hasOptionPanel: false,
|
|
297
|
+
isFilter: true,
|
|
298
|
+
mode: '2D',
|
|
299
|
+
spectraOptions: [
|
|
300
|
+
{
|
|
301
|
+
info: [
|
|
302
|
+
{ key: 'isFid', value: true },
|
|
303
|
+
{ key: 'isComplex', value: true },
|
|
304
|
+
],
|
|
305
|
+
active: true,
|
|
306
|
+
},
|
|
307
|
+
],
|
|
308
|
+
isToggle: false,
|
|
309
|
+
isExperimental: true,
|
|
310
|
+
},
|
|
311
|
+
fftDimension2: {
|
|
312
|
+
id: 'fftDimension2',
|
|
313
|
+
label: 'Fourier transform dimension 2',
|
|
314
|
+
hasOptionPanel: false,
|
|
315
|
+
isFilter: true,
|
|
316
|
+
mode: '2D',
|
|
317
|
+
spectraOptions: [
|
|
318
|
+
{
|
|
319
|
+
info: [
|
|
320
|
+
{ key: 'isFid', value: true },
|
|
321
|
+
{ key: 'isComplex', value: true },
|
|
322
|
+
],
|
|
323
|
+
active: true,
|
|
324
|
+
},
|
|
325
|
+
],
|
|
326
|
+
isToggle: false,
|
|
327
|
+
isExperimental: true,
|
|
328
|
+
},
|
|
294
329
|
import: {
|
|
295
330
|
id: 'import',
|
|
296
331
|
label: 'Import',
|
|
@@ -303,7 +338,7 @@ exports.options = {
|
|
|
303
338
|
label: 'Real / Imaginary',
|
|
304
339
|
hasOptionPanel: false,
|
|
305
340
|
isFilter: false,
|
|
306
|
-
mode:
|
|
341
|
+
mode: '1D',
|
|
307
342
|
spectraOptions: [
|
|
308
343
|
{
|
|
309
344
|
info: [{ key: 'isComplex', value: true }],
|
|
@@ -317,7 +352,7 @@ exports.options = {
|
|
|
317
352
|
label: 'Align spectrum',
|
|
318
353
|
hasOptionPanel: false,
|
|
319
354
|
isFilter: false,
|
|
320
|
-
mode:
|
|
355
|
+
mode: '1D',
|
|
321
356
|
isToggle: false,
|
|
322
357
|
},
|
|
323
358
|
spectraStackAlignments: {
|
|
@@ -325,7 +360,7 @@ exports.options = {
|
|
|
325
360
|
label: 'Stack spectra',
|
|
326
361
|
hasOptionPanel: false,
|
|
327
362
|
isFilter: false,
|
|
328
|
-
mode:
|
|
363
|
+
mode: '1D',
|
|
329
364
|
spectraOptions: [
|
|
330
365
|
{
|
|
331
366
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -201,14 +201,17 @@ function getBlob(rootRef, elementID) {
|
|
|
201
201
|
return { blob, width, height };
|
|
202
202
|
}
|
|
203
203
|
exports.getBlob = getBlob;
|
|
204
|
+
function getMatrix(element) {
|
|
205
|
+
const transform = window
|
|
206
|
+
.getComputedStyle(element)
|
|
207
|
+
.getPropertyValue('transform');
|
|
208
|
+
return new DOMMatrix(transform);
|
|
209
|
+
}
|
|
204
210
|
function getMoleculesElement(rootRef) {
|
|
205
211
|
const nmriumViewer = rootRef.getRootNode().querySelector(`#nmrium-viewer`);
|
|
206
212
|
const floatingMoleculesGroup = document.createElement('g');
|
|
207
213
|
for (const element of nmriumViewer.querySelectorAll('.draggable-molecule')) {
|
|
208
|
-
const
|
|
209
|
-
.getComputedStyle(element)
|
|
210
|
-
.getPropertyValue('transform');
|
|
211
|
-
const matrix = new DOMMatrix(transform);
|
|
214
|
+
const matrix = getMatrix(element);
|
|
212
215
|
const actionHeaderElement = element.querySelector('.float-molecule-actions');
|
|
213
216
|
const molElement = element
|
|
214
217
|
.cloneNode(true)
|
|
@@ -4,6 +4,13 @@ exports.prediction = void 0;
|
|
|
4
4
|
exports.prediction = {
|
|
5
5
|
version: 1,
|
|
6
6
|
label: 'Prediction',
|
|
7
|
+
general: {
|
|
8
|
+
dimmedSpectraOpacity: 0.5,
|
|
9
|
+
verticalSplitterPosition: '440px',
|
|
10
|
+
verticalSplitterCloseThreshold: 600,
|
|
11
|
+
spectraRendering: 'auto',
|
|
12
|
+
loggingLevel: 'info',
|
|
13
|
+
},
|
|
7
14
|
display: {
|
|
8
15
|
panels: {
|
|
9
16
|
spectraPanel: { display: true },
|
|
@@ -31,6 +38,8 @@ exports.prediction = {
|
|
|
31
38
|
zoomOut: true,
|
|
32
39
|
zoom: true,
|
|
33
40
|
autoRangeAndZonePicking: true,
|
|
41
|
+
fftDimension1: true,
|
|
42
|
+
fftDimension2: true,
|
|
34
43
|
},
|
|
35
44
|
},
|
|
36
45
|
formatting: {
|
|
@@ -49,16 +49,16 @@ exports.FREQUENCIES = [
|
|
|
49
49
|
{ value: 1000, label: '1000 MHz' },
|
|
50
50
|
{ value: 1200, label: '1200 MHz' },
|
|
51
51
|
];
|
|
52
|
-
|
|
53
|
-
async function predictSpectra(molfile) {
|
|
52
|
+
async function predictSpectra(molfile, options) {
|
|
54
53
|
const molecule = full_1.default.Molecule.fromMolfile(molfile);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
}
|
|
54
|
+
const predictOptions = {};
|
|
55
|
+
for (const key in options) {
|
|
56
|
+
if (!options[key])
|
|
57
|
+
continue;
|
|
58
|
+
const experiment = key === 'proton' ? 'H' : key === 'carbon' ? 'C' : key;
|
|
59
|
+
predictOptions[experiment] = {};
|
|
60
|
+
}
|
|
61
|
+
return (0, nmr_processing_1.predict)(molecule, { predictOptions });
|
|
62
62
|
}
|
|
63
63
|
exports.predictSpectra = predictSpectra;
|
|
64
64
|
function generateName(name, options) {
|
|
@@ -8,7 +8,6 @@ const uuid_1 = require("@lukeed/uuid");
|
|
|
8
8
|
const ml_spectra_processing_1 = require("ml-spectra-processing");
|
|
9
9
|
const nmr_processing_1 = require("nmr-processing");
|
|
10
10
|
const SignalsKinds_1 = require("../../../constants/SignalsKinds");
|
|
11
|
-
const SumManager_1 = require("../SumManager");
|
|
12
11
|
const detectSignal_1 = __importDefault(require("./detectSignal"));
|
|
13
12
|
function createRangeObj({ from, to, absolute, signal, }) {
|
|
14
13
|
return {
|
|
@@ -23,7 +22,7 @@ function createRangeObj({ from, to, absolute, signal, }) {
|
|
|
23
22
|
}
|
|
24
23
|
exports.createRangeObj = createRangeObj;
|
|
25
24
|
function addRange(spectrum, options) {
|
|
26
|
-
const { from, to
|
|
25
|
+
const { from, to } = options;
|
|
27
26
|
const { x, re } = spectrum.data;
|
|
28
27
|
const absolute = (0, ml_spectra_processing_1.xyIntegration)({ x, y: re }, { from, to, reverse: true });
|
|
29
28
|
// detectSignal use the advance multiplet-analysis that can crash if too many points
|
|
@@ -43,12 +42,7 @@ function addRange(spectrum, options) {
|
|
|
43
42
|
}
|
|
44
43
|
try {
|
|
45
44
|
if (range) {
|
|
46
|
-
spectrum.ranges.options = (0, SumManager_1.initSumOptions)(spectrum.ranges.options, {
|
|
47
|
-
molecules,
|
|
48
|
-
nucleus,
|
|
49
|
-
});
|
|
50
45
|
spectrum.ranges.values = spectrum.ranges.values.concat((0, nmr_processing_1.mapRanges)([range], spectrum));
|
|
51
|
-
(0, nmr_processing_1.updateRangesRelativeValues)(spectrum);
|
|
52
46
|
}
|
|
53
47
|
}
|
|
54
48
|
catch (error) {
|
|
@@ -20,7 +20,7 @@ function detectSignal(data, options) {
|
|
|
20
20
|
};
|
|
21
21
|
const result = (0, multiplet_analysis_1.analyseMultiplet)(dataRoi, {
|
|
22
22
|
frequency,
|
|
23
|
-
minimalResolution: 0.
|
|
23
|
+
minimalResolution: 0.1,
|
|
24
24
|
maxTestedJ: 17,
|
|
25
25
|
checkSymmetryFirst: true,
|
|
26
26
|
takeBestPartMultiplet: true,
|
|
@@ -10,8 +10,8 @@ const getAtomsFromMF_1 = __importDefault(require("../utilities/getAtomsFromMF"))
|
|
|
10
10
|
exports.DRAGGABLE_STRUCTURE_INITIAL_BOUNDING_REACT = {
|
|
11
11
|
x: 100,
|
|
12
12
|
y: 50,
|
|
13
|
-
width:
|
|
14
|
-
height:
|
|
13
|
+
width: 190,
|
|
14
|
+
height: 200,
|
|
15
15
|
};
|
|
16
16
|
function initMolecule(options = {}) {
|
|
17
17
|
const id = options.id || (0, uuid_1.v4)();
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const modifiersKeys = [
|
|
4
|
+
'Alt',
|
|
5
|
+
'AltGraph',
|
|
6
|
+
'Control',
|
|
7
|
+
'Meta',
|
|
8
|
+
'Shift',
|
|
9
|
+
];
|
|
3
10
|
function checkModifierKeyActivated(event) {
|
|
4
|
-
|
|
5
|
-
'Alt',
|
|
6
|
-
'AltGraph',
|
|
7
|
-
'Control',
|
|
8
|
-
'Meta',
|
|
9
|
-
'Shift',
|
|
10
|
-
];
|
|
11
|
-
for (const key of modifiersKeys) {
|
|
12
|
-
if (event.getModifierState(key)) {
|
|
13
|
-
return true;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return false;
|
|
11
|
+
return modifiersKeys.some((key) => event.getModifierState(key));
|
|
17
12
|
}
|
|
18
13
|
exports.default = checkModifierKeyActivated;
|
package/lib-cjs/versionInfo.js
CHANGED