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
|
@@ -28,11 +28,21 @@ function FunctionToolBarInner({ defaultValue, ftCounter, }) {
|
|
|
28
28
|
type: 'APPLY_FFT_FILTER',
|
|
29
29
|
});
|
|
30
30
|
}, [dispatch]);
|
|
31
|
-
|
|
31
|
+
const handleFFtDimension1Filter = useCallback(() => {
|
|
32
|
+
dispatch({
|
|
33
|
+
type: 'APPLY_FFT_DIMENSION_1_FILTER',
|
|
34
|
+
});
|
|
35
|
+
}, [dispatch]);
|
|
36
|
+
const handleFFtDimension2Filter = useCallback(() => {
|
|
37
|
+
dispatch({
|
|
38
|
+
type: 'APPLY_FFT_DIMENSION_2_FILTER',
|
|
39
|
+
});
|
|
40
|
+
}, [dispatch]);
|
|
41
|
+
return (_jsxs(_Fragment, { children: [_jsxs(ToggleButtonGroup, { value: option, onChange: handleChange, children: [isButtonVisible('zoom') && (_jsx(ToggleButton, { value: options.zoom.id, id: options.zoom.id, title: `${options.zoom.label}`, children: _jsx(FaSearchPlus, {}) }, options.zoom.id)), isButtonVisible('zoomOut') && (_jsx(Toolbar.Item, { id: "zoom-out", onClick: handleFullZoomOut, title: "Horizontal zoom out ( Press f ), Horizontal and Vertical zoom out, double click ( Press ff )", children: _jsx(FaExpand, {}) })), isButtonVisible('peakPicking') && (_jsx(ToggleButton, { value: options.peakPicking.id, title: `${options.peakPicking.label} ( Press p )`, id: options.peakPicking.id, children: _jsx(SvgNmrPeakPicking, {}) }, options.peakPicking.id)), isButtonVisible('integral') && (_jsx(ToggleButton, { value: options.integral.id, id: options.integral.id, title: `${options.integral.label} ( Press i )`, children: _jsx(SvgNmrIntegrate, {}) }, options.integral.id)), isButtonVisible('zonePicking') && (_jsx(ToggleButton, { value: options.zonePicking.id, id: options.zonePicking.id, title: `${options.zonePicking.label} ( Press r )`, children: _jsx(FaDiceFour, {}) }, options.zonePicking.id)), isButtonVisible('slicing') && (_jsx(ToggleButton, { value: options.slicing.id, id: options.slicing.id, title: `${options.slicing.label}`, children: _jsx("p", { children: "Slic" }) }, options.slicing.id)), isButtonVisible('rangePicking') && (_jsx(ToggleButton, { value: options.rangePicking.id, title: `${options.rangePicking.label} ( Press r )`, id: options.rangePicking.id, children: _jsx(SvgNmrRangePicking, {}) }, options.rangePicking.id)), isButtonVisible('multipleSpectraAnalysis', {
|
|
32
42
|
checkSpectrumType: false,
|
|
33
43
|
}) &&
|
|
34
|
-
ftCounter > 1 && (_jsx(ToggleButton, { value: options.multipleSpectraAnalysis.id, id: options.multipleSpectraAnalysis.id, title: options.multipleSpectraAnalysis.label, children: _jsx(SvgNmrMultipleAnalysis, {}) }, options.multipleSpectraAnalysis.id)), isButtonVisible('apodization') && (_jsx(ToggleButton, { value: options.apodization.id, id: options.apodization.id, title: `${options.apodization.label} (Press a)`, children: _jsx(SvgNmrApodization, {}) }, options.apodization.id)), isButtonVisible('zeroFilling') && (_jsx(ToggleButton, { value: options.zeroFilling.id, id: options.zeroFilling.id, title: options.zeroFilling.label
|
|
35
|
-
ftCounter > 0 && (_jsx(ToggleButton, { value: options.exclusionZones.id, title: `${options.exclusionZones.label} ( Press e )`, id: options.exclusionZones.id, children: _jsx("div", { style: { fontSize: 18 }, children: _jsx(SvgNmrMultipleAnalysis, {}) }) }, options.exclusionZones.id))] }), isButtonVisible('fft') && (_jsx(Toolbar.Item, { id: options.fft.id, className: "cheminfo", title: options.fft.label
|
|
44
|
+
ftCounter > 1 && (_jsx(ToggleButton, { value: options.multipleSpectraAnalysis.id, id: options.multipleSpectraAnalysis.id, title: options.multipleSpectraAnalysis.label, children: _jsx(SvgNmrMultipleAnalysis, {}) }, options.multipleSpectraAnalysis.id)), isButtonVisible('apodization') && (_jsx(ToggleButton, { value: options.apodization.id, id: options.apodization.id, title: `${options.apodization.label} (Press a)`, children: _jsx(SvgNmrApodization, {}) }, options.apodization.id)), isButtonVisible('zeroFilling') && (_jsx(ToggleButton, { value: options.zeroFilling.id, id: options.zeroFilling.id, title: `${options.zeroFilling.label} ( Press z )`, children: _jsx(SvgNmrZeroFilling, {}) }, options.zeroFilling.id)), isButtonVisible('phaseCorrection') && (_jsx(ToggleButton, { value: options.phaseCorrection.id, id: options.phaseCorrection.id, title: `${options.phaseCorrection.label} ( Press a )`, children: _jsx(SvgNmrPhaseCorrection, {}) }, options.phaseCorrection.id)), isButtonVisible('baselineCorrection') && (_jsx(ToggleButton, { value: options.baselineCorrection.id, id: options.baselineCorrection.id, title: `${options.baselineCorrection.label} ( Press b )`, children: _jsx(SvgNmrBaselineCorrection, {}) }, options.baselineCorrection.id)), isButtonVisible('exclusionZones', { checkSpectrumType: false }) &&
|
|
45
|
+
ftCounter > 0 && (_jsx(ToggleButton, { value: options.exclusionZones.id, title: `${options.exclusionZones.label} ( Press e )`, id: options.exclusionZones.id, children: _jsx("div", { style: { fontSize: 18 }, children: _jsx(SvgNmrMultipleAnalysis, {}) }) }, options.exclusionZones.id))] }), isButtonVisible('fft') && (_jsx(Toolbar.Item, { id: options.fft.id, className: "cheminfo", title: `${options.fft.label} ( Press t )`, onClick: handleOnFFTFilter, children: _jsx(SvgNmrFourierTransform, {}) })), isButtonVisible('fftDimension1') && (_jsx(Toolbar.Item, { id: options.fftDimension1.id, className: "cheminfo", title: options.fftDimension1.label, onClick: handleFFtDimension1Filter, children: _jsx(SvgNmrFourierTransform, {}) })), isButtonVisible('fftDimension2') && (_jsx(Toolbar.Item, { id: options.fftDimension2.id, className: "cheminfo", title: options.fftDimension2.label, onClick: handleFFtDimension2Filter, children: _jsx(SvgNmrFourierTransform, {}) }))] }));
|
|
36
46
|
}
|
|
37
47
|
const MemoizedFunctionToolBar = memo(FunctionToolBarInner);
|
|
38
48
|
export default function FunctionToolBar({ defaultValue = options.zoom.id, }) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { NMRiumToolBarPreferences } from 'nmr-load-save';
|
|
2
2
|
import type { Info1D, Info2D } from 'nmr-processing';
|
|
3
|
-
import {
|
|
3
|
+
import { DisplayerMode } from '../reducer/Reducer';
|
|
4
4
|
type InfoKey = keyof Info1D | keyof Info2D;
|
|
5
5
|
export interface ToolOptionItem {
|
|
6
6
|
id: string;
|
|
7
7
|
label: string;
|
|
8
|
-
mode?:
|
|
8
|
+
mode?: DisplayerMode;
|
|
9
9
|
spectraOptions?: Array<{
|
|
10
10
|
info?: Array<{
|
|
11
11
|
key: InfoKey;
|
|
@@ -18,6 +18,7 @@ export interface ToolOptionItem {
|
|
|
18
18
|
isToggle: boolean;
|
|
19
19
|
hasOptionPanel: boolean;
|
|
20
20
|
isFilter: boolean;
|
|
21
|
+
isExperimental?: true;
|
|
21
22
|
}
|
|
22
23
|
export type Tool = keyof NMRiumToolBarPreferences | 'HMove' | 'equalizer' | 'generalSelector' | 'editRange' | 'databaseRangesSelection' | 'matrixGenerationExclusionZones';
|
|
23
24
|
type RecordOptions = Record<Tool, ToolOptionItem>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Filters } from 'nmr-processing';
|
|
2
|
-
import { DISPLAYER_MODE } from '../reducer/core/Constants';
|
|
3
2
|
export const options = {
|
|
4
3
|
zoom: {
|
|
5
4
|
id: 'zoom',
|
|
@@ -13,7 +12,7 @@ export const options = {
|
|
|
13
12
|
label: 'Peaks picking',
|
|
14
13
|
hasOptionPanel: true,
|
|
15
14
|
isFilter: false,
|
|
16
|
-
mode:
|
|
15
|
+
mode: '1D',
|
|
17
16
|
spectraOptions: [
|
|
18
17
|
{
|
|
19
18
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -27,7 +26,7 @@ export const options = {
|
|
|
27
26
|
label: 'Integral Tool',
|
|
28
27
|
hasOptionPanel: false,
|
|
29
28
|
isFilter: false,
|
|
30
|
-
mode:
|
|
29
|
+
mode: '1D',
|
|
31
30
|
spectraOptions: [
|
|
32
31
|
{
|
|
33
32
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -41,7 +40,7 @@ export const options = {
|
|
|
41
40
|
label: 'Zone tool',
|
|
42
41
|
hasOptionPanel: true,
|
|
43
42
|
isFilter: false,
|
|
44
|
-
mode:
|
|
43
|
+
mode: '2D',
|
|
45
44
|
spectraOptions: [
|
|
46
45
|
{
|
|
47
46
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -55,7 +54,7 @@ export const options = {
|
|
|
55
54
|
label: 'Slicing tool',
|
|
56
55
|
hasOptionPanel: false,
|
|
57
56
|
isFilter: false,
|
|
58
|
-
mode:
|
|
57
|
+
mode: '2D',
|
|
59
58
|
spectraOptions: [
|
|
60
59
|
{
|
|
61
60
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -69,7 +68,7 @@ export const options = {
|
|
|
69
68
|
label: 'Move spectrum horizontally',
|
|
70
69
|
hasOptionPanel: false,
|
|
71
70
|
isFilter: false,
|
|
72
|
-
mode:
|
|
71
|
+
mode: '1D',
|
|
73
72
|
spectraOptions: [
|
|
74
73
|
{
|
|
75
74
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -83,7 +82,7 @@ export const options = {
|
|
|
83
82
|
label: 'Equalizer tool',
|
|
84
83
|
hasOptionPanel: false,
|
|
85
84
|
isFilter: false,
|
|
86
|
-
mode:
|
|
85
|
+
mode: '1D',
|
|
87
86
|
spectraOptions: [
|
|
88
87
|
{
|
|
89
88
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -97,7 +96,7 @@ export const options = {
|
|
|
97
96
|
label: 'Range picking and multiplet analysis',
|
|
98
97
|
hasOptionPanel: true,
|
|
99
98
|
isFilter: false,
|
|
100
|
-
mode:
|
|
99
|
+
mode: '1D',
|
|
101
100
|
spectraOptions: [
|
|
102
101
|
{
|
|
103
102
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -111,7 +110,7 @@ export const options = {
|
|
|
111
110
|
label: Filters.apodization.name,
|
|
112
111
|
hasOptionPanel: true,
|
|
113
112
|
isFilter: true,
|
|
114
|
-
mode:
|
|
113
|
+
mode: '1D',
|
|
115
114
|
spectraOptions: [
|
|
116
115
|
{
|
|
117
116
|
info: [
|
|
@@ -128,7 +127,7 @@ export const options = {
|
|
|
128
127
|
label: Filters.zeroFilling.name,
|
|
129
128
|
hasOptionPanel: true,
|
|
130
129
|
isFilter: true,
|
|
131
|
-
mode:
|
|
130
|
+
mode: '1D',
|
|
132
131
|
spectraOptions: [
|
|
133
132
|
{
|
|
134
133
|
info: [
|
|
@@ -145,7 +144,7 @@ export const options = {
|
|
|
145
144
|
label: Filters.phaseCorrection.name,
|
|
146
145
|
hasOptionPanel: true,
|
|
147
146
|
isFilter: true,
|
|
148
|
-
mode:
|
|
147
|
+
mode: '1D',
|
|
149
148
|
spectraOptions: [
|
|
150
149
|
{
|
|
151
150
|
info: [
|
|
@@ -162,7 +161,7 @@ export const options = {
|
|
|
162
161
|
label: Filters.baselineCorrection.name,
|
|
163
162
|
hasOptionPanel: true,
|
|
164
163
|
isFilter: true,
|
|
165
|
-
mode:
|
|
164
|
+
mode: '1D',
|
|
166
165
|
spectraOptions: [
|
|
167
166
|
{
|
|
168
167
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -176,7 +175,7 @@ export const options = {
|
|
|
176
175
|
label: 'range general selector',
|
|
177
176
|
hasOptionPanel: false,
|
|
178
177
|
isFilter: false,
|
|
179
|
-
mode:
|
|
178
|
+
mode: '1D',
|
|
180
179
|
spectraOptions: [
|
|
181
180
|
{
|
|
182
181
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -190,7 +189,7 @@ export const options = {
|
|
|
190
189
|
label: 'edit range',
|
|
191
190
|
hasOptionPanel: false,
|
|
192
191
|
isFilter: false,
|
|
193
|
-
mode:
|
|
192
|
+
mode: '1D',
|
|
194
193
|
spectraOptions: [
|
|
195
194
|
{
|
|
196
195
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -204,7 +203,7 @@ export const options = {
|
|
|
204
203
|
label: 'Multiple spectra analysis',
|
|
205
204
|
hasOptionPanel: false,
|
|
206
205
|
isFilter: false,
|
|
207
|
-
mode:
|
|
206
|
+
mode: '1D',
|
|
208
207
|
spectraOptions: [
|
|
209
208
|
{
|
|
210
209
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -221,7 +220,7 @@ export const options = {
|
|
|
221
220
|
label: 'Exclusion zones',
|
|
222
221
|
hasOptionPanel: false,
|
|
223
222
|
isFilter: false,
|
|
224
|
-
mode:
|
|
223
|
+
mode: '1D',
|
|
225
224
|
spectraOptions: [
|
|
226
225
|
{
|
|
227
226
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -238,7 +237,7 @@ export const options = {
|
|
|
238
237
|
label: 'Matrix generations exclusion zones',
|
|
239
238
|
hasOptionPanel: false,
|
|
240
239
|
isFilter: false,
|
|
241
|
-
mode:
|
|
240
|
+
mode: '1D',
|
|
242
241
|
spectraOptions: [
|
|
243
242
|
{
|
|
244
243
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -255,7 +254,7 @@ export const options = {
|
|
|
255
254
|
label: 'Filter database',
|
|
256
255
|
hasOptionPanel: false,
|
|
257
256
|
isFilter: false,
|
|
258
|
-
mode:
|
|
257
|
+
mode: '1D',
|
|
259
258
|
spectraOptions: [
|
|
260
259
|
{
|
|
261
260
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -276,7 +275,7 @@ export const options = {
|
|
|
276
275
|
label: 'Fourier transform',
|
|
277
276
|
hasOptionPanel: false,
|
|
278
277
|
isFilter: true,
|
|
279
|
-
mode:
|
|
278
|
+
mode: '1D',
|
|
280
279
|
spectraOptions: [
|
|
281
280
|
{
|
|
282
281
|
info: [
|
|
@@ -288,6 +287,42 @@ export const options = {
|
|
|
288
287
|
],
|
|
289
288
|
isToggle: false,
|
|
290
289
|
},
|
|
290
|
+
fftDimension1: {
|
|
291
|
+
id: 'fftDimension1',
|
|
292
|
+
label: 'Fourier transform dimension 1',
|
|
293
|
+
hasOptionPanel: false,
|
|
294
|
+
isFilter: true,
|
|
295
|
+
mode: '2D',
|
|
296
|
+
spectraOptions: [
|
|
297
|
+
{
|
|
298
|
+
info: [
|
|
299
|
+
{ key: 'isFid', value: true },
|
|
300
|
+
{ key: 'isComplex', value: true },
|
|
301
|
+
],
|
|
302
|
+
active: true,
|
|
303
|
+
},
|
|
304
|
+
],
|
|
305
|
+
isToggle: false,
|
|
306
|
+
isExperimental: true,
|
|
307
|
+
},
|
|
308
|
+
fftDimension2: {
|
|
309
|
+
id: 'fftDimension2',
|
|
310
|
+
label: 'Fourier transform dimension 2',
|
|
311
|
+
hasOptionPanel: false,
|
|
312
|
+
isFilter: true,
|
|
313
|
+
mode: '2D',
|
|
314
|
+
spectraOptions: [
|
|
315
|
+
{
|
|
316
|
+
info: [
|
|
317
|
+
{ key: 'isFid', value: true },
|
|
318
|
+
{ key: 'isComplex', value: true },
|
|
319
|
+
],
|
|
320
|
+
active: true,
|
|
321
|
+
},
|
|
322
|
+
],
|
|
323
|
+
isToggle: false,
|
|
324
|
+
isExperimental: true,
|
|
325
|
+
},
|
|
291
326
|
import: {
|
|
292
327
|
id: 'import',
|
|
293
328
|
label: 'Import',
|
|
@@ -300,7 +335,7 @@ export const options = {
|
|
|
300
335
|
label: 'Real / Imaginary',
|
|
301
336
|
hasOptionPanel: false,
|
|
302
337
|
isFilter: false,
|
|
303
|
-
mode:
|
|
338
|
+
mode: '1D',
|
|
304
339
|
spectraOptions: [
|
|
305
340
|
{
|
|
306
341
|
info: [{ key: 'isComplex', value: true }],
|
|
@@ -314,7 +349,7 @@ export const options = {
|
|
|
314
349
|
label: 'Align spectrum',
|
|
315
350
|
hasOptionPanel: false,
|
|
316
351
|
isFilter: false,
|
|
317
|
-
mode:
|
|
352
|
+
mode: '1D',
|
|
318
353
|
isToggle: false,
|
|
319
354
|
},
|
|
320
355
|
spectraStackAlignments: {
|
|
@@ -322,7 +357,7 @@ export const options = {
|
|
|
322
357
|
label: 'Stack spectra',
|
|
323
358
|
hasOptionPanel: false,
|
|
324
359
|
isFilter: false,
|
|
325
|
-
mode:
|
|
360
|
+
mode: '1D',
|
|
326
361
|
spectraOptions: [
|
|
327
362
|
{
|
|
328
363
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -187,14 +187,17 @@ function getBlob(rootRef, elementID) {
|
|
|
187
187
|
const blob = new Blob([svg], { type: 'image/svg+xml' });
|
|
188
188
|
return { blob, width, height };
|
|
189
189
|
}
|
|
190
|
+
function getMatrix(element) {
|
|
191
|
+
const transform = window
|
|
192
|
+
.getComputedStyle(element)
|
|
193
|
+
.getPropertyValue('transform');
|
|
194
|
+
return new DOMMatrix(transform);
|
|
195
|
+
}
|
|
190
196
|
function getMoleculesElement(rootRef) {
|
|
191
197
|
const nmriumViewer = rootRef.getRootNode().querySelector(`#nmrium-viewer`);
|
|
192
198
|
const floatingMoleculesGroup = document.createElement('g');
|
|
193
199
|
for (const element of nmriumViewer.querySelectorAll('.draggable-molecule')) {
|
|
194
|
-
const
|
|
195
|
-
.getComputedStyle(element)
|
|
196
|
-
.getPropertyValue('transform');
|
|
197
|
-
const matrix = new DOMMatrix(transform);
|
|
200
|
+
const matrix = getMatrix(element);
|
|
198
201
|
const actionHeaderElement = element.querySelector('.float-molecule-actions');
|
|
199
202
|
const molElement = element
|
|
200
203
|
.cloneNode(true)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
export const prediction = {
|
|
2
2
|
version: 1,
|
|
3
3
|
label: 'Prediction',
|
|
4
|
+
general: {
|
|
5
|
+
dimmedSpectraOpacity: 0.5,
|
|
6
|
+
verticalSplitterPosition: '440px',
|
|
7
|
+
verticalSplitterCloseThreshold: 600,
|
|
8
|
+
spectraRendering: 'auto',
|
|
9
|
+
loggingLevel: 'info',
|
|
10
|
+
},
|
|
4
11
|
display: {
|
|
5
12
|
panels: {
|
|
6
13
|
spectraPanel: { display: true },
|
|
@@ -28,6 +35,8 @@ export const prediction = {
|
|
|
28
35
|
zoomOut: true,
|
|
29
36
|
zoom: true,
|
|
30
37
|
autoRangeAndZonePicking: true,
|
|
38
|
+
fftDimension1: true,
|
|
39
|
+
fftDimension2: true,
|
|
31
40
|
},
|
|
32
41
|
},
|
|
33
42
|
formatting: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Logger } from 'cheminfo-types';
|
|
2
2
|
import { Spectrum } from 'nmr-load-save';
|
|
3
|
-
import {
|
|
3
|
+
import { Predicted, PredictionBase1D, PredictionBase2D } from 'nmr-processing';
|
|
4
4
|
export type Experiment = 'proton' | 'carbon' | 'cosy' | 'hsqc' | 'hmbc';
|
|
5
5
|
export type SpectraPredictionOptions = Record<Experiment, boolean>;
|
|
6
|
-
export type PredictedSpectraResult = Partial<Record<Experiment,
|
|
6
|
+
export type PredictedSpectraResult = Partial<Record<Experiment, PredictionBase1D | PredictionBase2D>>;
|
|
7
7
|
export interface PredictionOptions {
|
|
8
8
|
name: string;
|
|
9
9
|
frequency: number;
|
|
@@ -34,5 +34,5 @@ export declare const FREQUENCIES: Array<{
|
|
|
34
34
|
value: number;
|
|
35
35
|
label: string;
|
|
36
36
|
}>;
|
|
37
|
-
export declare function predictSpectra(molfile: string): Promise<
|
|
37
|
+
export declare function predictSpectra(molfile: string, options: any): Promise<Predicted>;
|
|
38
38
|
export declare function generateSpectra(predictedSpectra: PredictedSpectraResult, inputOptions: PredictionOptions, color: string, logger: Logger): Spectrum[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { v4 } from '@lukeed/uuid';
|
|
2
2
|
import { xMinMaxValues } from 'ml-spectra-processing';
|
|
3
|
-
import {
|
|
3
|
+
import { predict, signalsToXY, signals2DToZ, getFrequency, signalsToRanges, } from 'nmr-processing';
|
|
4
4
|
import OCL from 'openchemlib/full';
|
|
5
5
|
import { DatumKind } from './constants/SignalsKinds';
|
|
6
6
|
import { initiateDatum1D, mapRanges, updateIntegralsRelativeValues, } from './data1d/Spectrum1D';
|
|
@@ -42,16 +42,16 @@ export const FREQUENCIES = [
|
|
|
42
42
|
{ value: 1000, label: '1000 MHz' },
|
|
43
43
|
{ value: 1200, label: '1200 MHz' },
|
|
44
44
|
];
|
|
45
|
-
|
|
46
|
-
export async function predictSpectra(molfile) {
|
|
45
|
+
export async function predictSpectra(molfile, options) {
|
|
47
46
|
const molecule = OCL.Molecule.fromMolfile(molfile);
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
}
|
|
47
|
+
const predictOptions = {};
|
|
48
|
+
for (const key in options) {
|
|
49
|
+
if (!options[key])
|
|
50
|
+
continue;
|
|
51
|
+
const experiment = key === 'proton' ? 'H' : key === 'carbon' ? 'C' : key;
|
|
52
|
+
predictOptions[experiment] = {};
|
|
53
|
+
}
|
|
54
|
+
return predict(molecule, { predictOptions });
|
|
55
55
|
}
|
|
56
56
|
function generateName(name, options) {
|
|
57
57
|
const { frequency, experiment } = options;
|
|
@@ -4,9 +4,11 @@ interface ReferenceInfo {
|
|
|
4
4
|
nbPeaks: number;
|
|
5
5
|
delta: number;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
8
|
-
export declare
|
|
7
|
+
export type OneHReferences = 'tms' | 'tsp' | 'glucose';
|
|
8
|
+
export declare const REFERENCES: Record<'1H', Record<OneHReferences, ReferenceInfo>> | Record<'13C', any>;
|
|
9
|
+
export interface GetRangeOptions {
|
|
9
10
|
nucleus?: string;
|
|
10
11
|
reference?: string;
|
|
11
|
-
}
|
|
12
|
+
}
|
|
13
|
+
export declare function getRange(options?: GetRangeOptions): ReferenceInfo;
|
|
12
14
|
export {};
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
export interface CalibrateOptions {
|
|
2
|
+
from: number;
|
|
3
|
+
to: number;
|
|
4
|
+
nbPeaks: number;
|
|
5
|
+
targetX: number;
|
|
6
|
+
}
|
|
7
|
+
export interface GetReferenceShiftOptions extends CalibrateOptions {
|
|
8
|
+
reference?: string;
|
|
9
|
+
}
|
|
1
10
|
/**
|
|
2
11
|
*
|
|
3
12
|
* @param {*} datum1D
|
|
@@ -9,4 +18,4 @@
|
|
|
9
18
|
* @param {number} [options.targetX]
|
|
10
19
|
* @param {string} [options.reference]
|
|
11
20
|
*/
|
|
12
|
-
export declare function getReferenceShift(datum1D: any, options:
|
|
21
|
+
export declare function getReferenceShift(datum1D: any, options: GetReferenceShiftOptions): number;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Spectrum1D } from 'nmr-load-save';
|
|
2
2
|
import { Signal1D } from 'nmr-processing';
|
|
3
|
-
import { SumParams } from '../SumManager';
|
|
4
3
|
interface RangeOptions {
|
|
5
4
|
from: number;
|
|
6
5
|
to: number;
|
|
@@ -37,5 +36,5 @@ export declare function createRangeObj({ from, to, absolute, signal, }: RangeOpt
|
|
|
37
36
|
kind: string;
|
|
38
37
|
integration: number;
|
|
39
38
|
};
|
|
40
|
-
export declare function addRange(spectrum: Spectrum1D, options: RangeOptions
|
|
39
|
+
export declare function addRange(spectrum: Spectrum1D, options: RangeOptions): void;
|
|
41
40
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { v4 } from '@lukeed/uuid';
|
|
2
2
|
import { xyIntegration } from 'ml-spectra-processing';
|
|
3
|
-
import {
|
|
3
|
+
import { mapRanges } from 'nmr-processing';
|
|
4
4
|
import { DatumKind } from '../../../constants/SignalsKinds';
|
|
5
|
-
import { initSumOptions } from '../SumManager';
|
|
6
5
|
import detectSignal from './detectSignal';
|
|
7
6
|
export function createRangeObj({ from, to, absolute, signal, }) {
|
|
8
7
|
return {
|
|
@@ -16,7 +15,7 @@ export function createRangeObj({ from, to, absolute, signal, }) {
|
|
|
16
15
|
};
|
|
17
16
|
}
|
|
18
17
|
export function addRange(spectrum, options) {
|
|
19
|
-
const { from, to
|
|
18
|
+
const { from, to } = options;
|
|
20
19
|
const { x, re } = spectrum.data;
|
|
21
20
|
const absolute = xyIntegration({ x, y: re }, { from, to, reverse: true });
|
|
22
21
|
// detectSignal use the advance multiplet-analysis that can crash if too many points
|
|
@@ -36,12 +35,7 @@ export function addRange(spectrum, options) {
|
|
|
36
35
|
}
|
|
37
36
|
try {
|
|
38
37
|
if (range) {
|
|
39
|
-
spectrum.ranges.options = initSumOptions(spectrum.ranges.options, {
|
|
40
|
-
molecules,
|
|
41
|
-
nucleus,
|
|
42
|
-
});
|
|
43
38
|
spectrum.ranges.values = spectrum.ranges.values.concat(mapRanges([range], spectrum));
|
|
44
|
-
updateRangesRelativeValues(spectrum);
|
|
45
39
|
}
|
|
46
40
|
}
|
|
47
41
|
catch (error) {
|
|
@@ -4,8 +4,8 @@ import getAtomsFromMF from '../utilities/getAtomsFromMF';
|
|
|
4
4
|
export const DRAGGABLE_STRUCTURE_INITIAL_BOUNDING_REACT = {
|
|
5
5
|
x: 100,
|
|
6
6
|
y: 50,
|
|
7
|
-
width:
|
|
8
|
-
height:
|
|
7
|
+
width: 190,
|
|
8
|
+
height: 200,
|
|
9
9
|
};
|
|
10
10
|
export function initMolecule(options = {}) {
|
|
11
11
|
const id = options.id || v4();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { KeyboardEvent, MouseEvent } from 'react';
|
|
2
|
-
export default function checkModifierKeyActivated(event: KeyboardEvent | MouseEvent): boolean;
|
|
2
|
+
export default function checkModifierKeyActivated<E = HTMLDivElement>(event: KeyboardEvent<E> | MouseEvent<E>): boolean;
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
+
const modifiersKeys = [
|
|
2
|
+
'Alt',
|
|
3
|
+
'AltGraph',
|
|
4
|
+
'Control',
|
|
5
|
+
'Meta',
|
|
6
|
+
'Shift',
|
|
7
|
+
];
|
|
1
8
|
export default function checkModifierKeyActivated(event) {
|
|
2
|
-
|
|
3
|
-
'Alt',
|
|
4
|
-
'AltGraph',
|
|
5
|
-
'Control',
|
|
6
|
-
'Meta',
|
|
7
|
-
'Shift',
|
|
8
|
-
];
|
|
9
|
-
for (const key of modifiersKeys) {
|
|
10
|
-
if (event.getModifierState(key)) {
|
|
11
|
-
return true;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return false;
|
|
9
|
+
return modifiersKeys.some((key) => event.getModifierState(key));
|
|
15
10
|
}
|
package/lib/versionInfo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default { version: 'v0.
|
|
1
|
+
export default { version: 'v0.43.1-pre.1692874523' };
|
|
@@ -97,6 +97,6 @@ function ApodizationLine() {
|
|
|
97
97
|
return '';
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
|
-
return ((0, jsx_runtime_1.jsx)("path", { "data-
|
|
100
|
+
return ((0, jsx_runtime_1.jsx)("path", { "data-testid": "apodization-line", stroke: "green", fill: "none", strokeWidth: "2", d: paths() }));
|
|
101
101
|
}
|
|
102
102
|
exports.default = ApodizationLine;
|
|
@@ -15,12 +15,13 @@ const DatabaseElements_1 = __importDefault(require("./database/DatabaseElements"
|
|
|
15
15
|
const IntegralsSeries_1 = __importDefault(require("./integral/IntegralsSeries"));
|
|
16
16
|
const JGraph_1 = __importDefault(require("./jCouplingGraph/JGraph"));
|
|
17
17
|
const MultiAnalysisRanges_1 = __importDefault(require("./multiAnalysis/MultiAnalysisRanges"));
|
|
18
|
-
const
|
|
18
|
+
const PeakEditionManager_1 = require("./peaks/PeakEditionManager");
|
|
19
|
+
const Peaks_1 = require("./peaks/Peaks");
|
|
19
20
|
const PeaksShapes_1 = __importDefault(require("./peaks/PeaksShapes"));
|
|
20
21
|
const Ranges_1 = __importDefault(require("./ranges/Ranges"));
|
|
21
22
|
const BaseLineZones_1 = __importDefault(require("./tool/BaseLineZones"));
|
|
22
23
|
function Chart1D({ mode, width, height, margin, displayerKey }) {
|
|
23
24
|
const { current: { general: { spectraRendering }, }, } = (0, PreferencesContext_1.usePreferences)();
|
|
24
|
-
return ((0, jsx_runtime_1.jsxs)("svg", { viewBox: `0 0 ${width} ${height}`, width: width, height: height, id: "nmrSVG", shapeRendering: spectraRendering, children: [(0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsx)("clipPath", { id: `${displayerKey}clip-chart-1d`, children: (0, jsx_runtime_1.jsx)("rect", { width: `${width - margin.left - margin.right}`, height: `${height}`, x: `${margin.left}`, y: `${0}` }) }) }), (0, jsx_runtime_1.jsx)(LinesSeries_1.default, {}), (0, jsx_runtime_1.jsx)(ApodizationLine_1.default, {}), (0, jsx_runtime_1.jsx)(IntegralsSeries_1.default, {}), (0, jsx_runtime_1.jsx)(
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(PeakEditionManager_1.PeakEditionProvider, { children: (0, jsx_runtime_1.jsxs)("svg", { viewBox: `0 0 ${width} ${height}`, width: width, height: height, id: "nmrSVG", shapeRendering: spectraRendering, children: [(0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsx)("clipPath", { id: `${displayerKey}clip-chart-1d`, children: (0, jsx_runtime_1.jsx)("rect", { width: `${width - margin.left - margin.right}`, height: `${height}`, x: `${margin.left}`, y: `${0}` }) }) }), (0, jsx_runtime_1.jsx)(LinesSeries_1.default, {}), (0, jsx_runtime_1.jsx)(ApodizationLine_1.default, {}), (0, jsx_runtime_1.jsx)(IntegralsSeries_1.default, {}), (0, jsx_runtime_1.jsx)(Peaks_1.Peaks, {}), (0, jsx_runtime_1.jsx)(Ranges_1.default, {}), (0, jsx_runtime_1.jsx)(JGraph_1.default, {}), (0, jsx_runtime_1.jsx)(MultiAnalysisRanges_1.default, {}), (0, jsx_runtime_1.jsx)(BaseLineZones_1.default, {}), (0, jsx_runtime_1.jsx)(ExclusionZonesAnnotations_1.default, {}), (0, jsx_runtime_1.jsx)(DatabaseElements_1.default, {}), (0, jsx_runtime_1.jsx)(PeaksShapes_1.default, {}), (0, jsx_runtime_1.jsx)(SpectraLegends_1.default, {}), (0, jsx_runtime_1.jsx)(SpectrumInfoBlock_1.default, {}), (0, jsx_runtime_1.jsx)("g", { className: "container", style: { pointerEvents: 'none' }, children: (0, jsx_runtime_1.jsx)(XAxis_1.default, { showGrid: true, mode: mode }) })] }) }));
|
|
25
26
|
}
|
|
26
27
|
exports.default = Chart1D;
|
|
@@ -9,7 +9,6 @@ const react_1 = require("react");
|
|
|
9
9
|
const ChartContext_1 = require("../context/ChartContext");
|
|
10
10
|
const ScaleContext_1 = require("../context/ScaleContext");
|
|
11
11
|
const useSpectraPerNucleus_1 = __importDefault(require("../hooks/useSpectraPerNucleus"));
|
|
12
|
-
const Constants_1 = require("../reducer/core/Constants");
|
|
13
12
|
const ExclusionZoneAnnotation_1 = __importDefault(require("./ExclusionZoneAnnotation"));
|
|
14
13
|
function ExclusionZonesAnnotationsInner({ displayerKey, xDomains, spectra, shiftY, }) {
|
|
15
14
|
return ((0, jsx_runtime_1.jsx)("g", { className: "spectrum-exclusion-zones-group", clipPath: `url(#${displayerKey}clip-chart-1d)`, children: spectra
|
|
@@ -25,7 +24,7 @@ function ExclusionZonesAnnotations() {
|
|
|
25
24
|
const { displayerKey, xDomains, displayerMode } = (0, ChartContext_1.useChartData)();
|
|
26
25
|
const { shiftY } = (0, ScaleContext_1.useScale)();
|
|
27
26
|
const spectra = (0, useSpectraPerNucleus_1.default)();
|
|
28
|
-
if (displayerMode !==
|
|
27
|
+
if (displayerMode !== '1D')
|
|
29
28
|
return null;
|
|
30
29
|
return ((0, jsx_runtime_1.jsx)(MemoizedPeakAnnotations, { spectra: spectra, displayerKey: displayerKey, xDomains: xDomains, shiftY: shiftY }));
|
|
31
30
|
}
|
|
@@ -54,6 +54,6 @@ function Line({ data, id, display, index }) {
|
|
|
54
54
|
}
|
|
55
55
|
}, [scaleX, scaleY, id, data, xyReduce]);
|
|
56
56
|
const { color: stroke, opacity: strokeOpacity } = (0, parseColor_1.parseColor)(display?.color || 'black');
|
|
57
|
-
return ((0, jsx_runtime_1.jsx)("path", { className: "line", "data-
|
|
57
|
+
return ((0, jsx_runtime_1.jsx)("path", { className: "line", "data-testid": "spectrum-line", stroke: stroke, fill: "none", strokeOpacity: opacity === 1 ? strokeOpacity : opacity, d: paths, transform: `translate(0,-${shiftY * index})` }, id));
|
|
58
58
|
}
|
|
59
59
|
exports.default = Line;
|