nmrium 0.30.0 → 0.32.0
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 +3 -1
- package/lib/component/1d/FooterBanner.js +20 -11
- package/lib/component/1d/IntegralsSeries.js +3 -1
- package/lib/component/1d/LinesSeries.js +3 -1
- package/lib/component/1d/SpectraTracker.js +1 -1
- package/lib/component/1d/Viewer1D.js +3 -1
- package/lib/component/1d/jCouplingGraph/JGraph.js +5 -1
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +3 -1
- package/lib/component/1d/peaks/PeakAnnotations.js +3 -1
- package/lib/component/1d/peaks/PeaksShapes.js +4 -2
- package/lib/component/1d/peaks/usePeakShapesPath.js +7 -3
- package/lib/component/1d/ranges/Ranges.js +8 -2
- package/lib/component/1d/tool/PeakPointer.js +3 -1
- package/lib/component/1d/tool/XLabelPointer.js +3 -1
- package/lib/component/2d/Contours.js +4 -2
- package/lib/component/2d/FooterBanner.js +3 -1
- package/lib/component/2d/Left1DChart.js +1 -1
- package/lib/component/2d/Top1DChart.js +1 -1
- package/lib/component/2d/Viewer2D.js +4 -4
- package/lib/component/2d/XAxis.js +2 -2
- package/lib/component/2d/YAxis.js +2 -2
- package/lib/component/2d/tools/XYLabelPointer.js +3 -1
- package/lib/component/2d/tools/slicing/SlicingView.js +3 -1
- package/lib/component/2d/zones/IndicationLines.js +1 -1
- package/lib/component/2d/zones/Zones.js +14 -19
- package/lib/component/EventsTrackers/BrushTracker.js +30 -21
- package/lib/component/NMRium.d.ts +2 -0
- package/lib/component/NMRium.js +14 -3
- package/lib/component/SplitPaneWrapper.js +1 -1
- package/lib/component/elements/EditableColumn.d.ts +3 -1
- package/lib/component/elements/EditableColumn.js +18 -3
- package/lib/component/elements/popup/Modal/Provider.d.ts +3 -3
- package/lib/component/elements/popup/Modal/Provider.js +8 -11
- package/lib/component/header/ZeroFillingOptionsPanel.js +3 -1
- package/lib/component/hooks/useActiveSpectrumStyleOptions.js +3 -3
- package/lib/component/hooks/useDatumWithSpectraStatistics.js +3 -1
- package/lib/component/hooks/useExport.d.ts +0 -1
- package/lib/component/hooks/useExport.js +1 -17
- package/lib/component/hooks/useIntegralPath.js +5 -2
- package/lib/component/hooks/useNucleus.js +4 -4
- package/lib/component/hooks/useSpectraPerNucleus.js +1 -1
- package/lib/component/hooks/useSpectrum.js +3 -1
- package/lib/component/loader/DropZone.js +15 -147
- package/lib/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib/component/modal/editRange/EditRangeModal.js +1 -1
- package/lib/component/modal/setting/GeneralTabContent.js +1 -1
- package/lib/component/modal/setting/ToolsTabContent.js +4 -0
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +1 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.js +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.d.ts +2 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +10 -9
- package/lib/component/panels/RangesPanel/RangesPanel.js +7 -3
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +3 -1
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +3 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +3 -26
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +1 -1
- package/lib/component/panels/SummaryPanel/utilities/useInView.js +3 -1
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +19 -10
- package/lib/component/panels/databasePanel/DatabasePanel.js +1 -1
- package/lib/component/reducer/IgnoreActions.js +1 -0
- package/lib/component/reducer/Reducer.d.ts +110 -96
- package/lib/component/reducer/Reducer.js +45 -41
- package/lib/component/reducer/actions/DomainActions.d.ts +1 -1
- package/lib/component/reducer/actions/DomainActions.js +12 -9
- package/lib/component/reducer/actions/FiltersActions.d.ts +1 -1
- package/lib/component/reducer/actions/FiltersActions.js +227 -232
- package/lib/component/reducer/actions/IntegralsActions.js +14 -8
- package/lib/component/reducer/actions/LoadActions.d.ts +2 -5
- package/lib/component/reducer/actions/LoadActions.js +19 -34
- package/lib/component/reducer/actions/MoleculeActions.d.ts +2 -1
- package/lib/component/reducer/actions/MoleculeActions.js +22 -6
- package/lib/component/reducer/actions/PeaksActions.js +19 -12
- package/lib/component/reducer/actions/PreferencesActions.js +9 -10
- package/lib/component/reducer/actions/RangesActions.d.ts +4 -4
- package/lib/component/reducer/actions/RangesActions.js +89 -29
- package/lib/component/reducer/actions/SpectraAnalysisAction.js +5 -5
- package/lib/component/reducer/actions/SpectrumsActions.js +14 -10
- package/lib/component/reducer/actions/ToolsActions.d.ts +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +44 -27
- package/lib/component/reducer/actions/ZonesActions.d.ts +4 -1
- package/lib/component/reducer/actions/ZonesActions.js +69 -17
- package/lib/component/reducer/helper/Zoom1DManager.js +2 -1
- package/lib/component/reducer/helper/getActiveSpectrum.d.ts +3 -0
- package/lib/component/reducer/helper/getActiveSpectrum.js +4 -0
- package/lib/component/reducer/helper/getActiveSpectrumOrFail.d.ts +3 -0
- package/lib/component/reducer/helper/getActiveSpectrumOrFail.js +6 -0
- package/lib/component/reducer/helper/getSpectrum.js +3 -2
- package/lib/component/reducer/helper/getStrongestPeak.js +2 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +2 -2
- package/lib/component/reducer/types/Types.d.ts +5 -0
- package/lib/component/reducer/types/Types.js +5 -0
- package/lib/component/tool/FloatMoleculeStructures/DraggableStructure.d.ts +6 -0
- package/lib/component/tool/FloatMoleculeStructures/DraggableStructure.js +10 -3
- package/lib/component/tool/FloatMoleculeStructures/index.js +14 -8
- package/lib/component/toolbar/BasicToolBar.js +12 -13
- package/lib/component/toolbar/FunctionToolBar.js +3 -1
- package/lib/component/utility/Export.js +7 -1
- package/lib/component/utility/assert.d.ts +1 -0
- package/lib/component/utility/assert.js +5 -0
- package/lib/component/workspaces/Workspace.d.ts +1 -1
- package/lib/component/workspaces/exercise.js +9 -3
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib/data/Filters.d.ts +1 -2
- package/lib/data/Filters.js +1 -2
- package/lib/data/SpectraManager.d.ts +0 -4
- package/lib/data/SpectraManager.js +2 -87
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -0
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +1 -0
- package/lib/data/data1d/filter1d/fft.js +11 -0
- package/lib/data/data1d/filter1d/phaseCorrection.js +11 -5
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.d.ts +2 -0
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +35 -0
- package/lib/data/data2d/Processing2D.js +3 -2
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.d.ts +1 -1
- package/lib/data/molecules/Molecule.d.ts +5 -0
- package/lib/data/utilities/calculateSanPlot.d.ts +8 -0
- package/lib/data/utilities/calculateSanPlot.js +31 -0
- package/lib/types/NMRiumGeneralPreferences.d.ts +2 -2
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/ApodizationLine.js +3 -1
- package/lib-cjs/component/1d/FooterBanner.js +19 -10
- package/lib-cjs/component/1d/IntegralsSeries.js +3 -1
- package/lib-cjs/component/1d/LinesSeries.js +3 -1
- package/lib-cjs/component/1d/SpectraTracker.js +1 -1
- package/lib-cjs/component/1d/Viewer1D.js +3 -1
- package/lib-cjs/component/1d/jCouplingGraph/JGraph.js +5 -1
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +3 -1
- package/lib-cjs/component/1d/peaks/PeakAnnotations.js +3 -1
- package/lib-cjs/component/1d/peaks/PeaksShapes.js +4 -2
- package/lib-cjs/component/1d/peaks/usePeakShapesPath.js +7 -3
- package/lib-cjs/component/1d/ranges/Ranges.js +7 -1
- package/lib-cjs/component/1d/tool/PeakPointer.js +3 -1
- package/lib-cjs/component/1d/tool/XLabelPointer.js +3 -1
- package/lib-cjs/component/2d/Contours.js +4 -2
- package/lib-cjs/component/2d/FooterBanner.js +3 -1
- package/lib-cjs/component/2d/Left1DChart.js +1 -1
- package/lib-cjs/component/2d/Top1DChart.js +1 -1
- package/lib-cjs/component/2d/Viewer2D.js +4 -4
- package/lib-cjs/component/2d/XAxis.js +2 -2
- package/lib-cjs/component/2d/YAxis.js +2 -2
- package/lib-cjs/component/2d/tools/XYLabelPointer.js +3 -1
- package/lib-cjs/component/2d/tools/slicing/SlicingView.js +3 -1
- package/lib-cjs/component/2d/zones/IndicationLines.js +1 -1
- package/lib-cjs/component/2d/zones/Zones.js +13 -18
- package/lib-cjs/component/EventsTrackers/BrushTracker.js +30 -21
- package/lib-cjs/component/NMRium.js +14 -3
- package/lib-cjs/component/SplitPaneWrapper.js +1 -1
- package/lib-cjs/component/elements/EditableColumn.js +18 -3
- package/lib-cjs/component/elements/popup/Modal/Provider.js +8 -11
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +3 -1
- package/lib-cjs/component/hooks/useActiveSpectrumStyleOptions.js +3 -3
- package/lib-cjs/component/hooks/useDatumWithSpectraStatistics.js +3 -1
- package/lib-cjs/component/hooks/useExport.js +0 -16
- package/lib-cjs/component/hooks/useIntegralPath.js +5 -2
- package/lib-cjs/component/hooks/useNucleus.js +4 -4
- package/lib-cjs/component/hooks/useSpectraPerNucleus.js +1 -1
- package/lib-cjs/component/hooks/useSpectrum.js +3 -1
- package/lib-cjs/component/loader/DropZone.js +14 -149
- package/lib-cjs/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +1 -1
- package/lib-cjs/component/modal/setting/GeneralTabContent.js +1 -1
- package/lib-cjs/component/modal/setting/ToolsTabContent.js +4 -0
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +1 -1
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +1 -1
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +1 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +1 -1
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +10 -9
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +7 -3
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +3 -1
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +3 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -25
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/utilities/useInView.js +3 -1
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +18 -9
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +1 -1
- package/lib-cjs/component/reducer/IgnoreActions.js +1 -0
- package/lib-cjs/component/reducer/Reducer.js +48 -43
- package/lib-cjs/component/reducer/actions/DomainActions.js +12 -9
- package/lib-cjs/component/reducer/actions/FiltersActions.js +228 -233
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +14 -8
- package/lib-cjs/component/reducer/actions/LoadActions.js +18 -36
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +23 -6
- package/lib-cjs/component/reducer/actions/PeaksActions.js +19 -12
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +9 -10
- package/lib-cjs/component/reducer/actions/RangesActions.js +89 -29
- package/lib-cjs/component/reducer/actions/SpectraAnalysisAction.js +5 -5
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +14 -10
- package/lib-cjs/component/reducer/actions/ToolsActions.js +44 -27
- package/lib-cjs/component/reducer/actions/ZonesActions.js +72 -17
- package/lib-cjs/component/reducer/helper/Zoom1DManager.js +2 -1
- package/lib-cjs/component/reducer/helper/getActiveSpectrum.js +8 -0
- package/lib-cjs/component/reducer/helper/getActiveSpectrumOrFail.js +10 -0
- package/lib-cjs/component/reducer/helper/getSpectrum.js +3 -2
- package/lib-cjs/component/reducer/helper/getStrongestPeak.js +2 -1
- package/lib-cjs/component/reducer/types/Types.js +8 -3
- package/lib-cjs/component/tool/FloatMoleculeStructures/DraggableStructure.js +10 -3
- package/lib-cjs/component/tool/FloatMoleculeStructures/index.js +14 -8
- package/lib-cjs/component/toolbar/BasicToolBar.js +11 -12
- package/lib-cjs/component/toolbar/FunctionToolBar.js +3 -1
- package/lib-cjs/component/utility/Export.js +7 -1
- package/lib-cjs/component/utility/assert.js +9 -0
- package/lib-cjs/component/workspaces/exercise.js +9 -3
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib-cjs/data/Filters.js +1 -3
- package/lib-cjs/data/SpectraManager.js +3 -92
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -0
- package/lib-cjs/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +1 -0
- package/lib-cjs/data/data1d/filter1d/fft.js +11 -0
- package/lib-cjs/data/data1d/filter1d/phaseCorrection.js +10 -4
- package/lib-cjs/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +39 -0
- package/lib-cjs/data/data2d/Processing2D.js +3 -2
- package/lib-cjs/data/utilities/calculateSanPlot.js +35 -0
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +26 -25
- package/lib/component/utility/nmredataToNmrium.d.ts +0 -4
- package/lib/component/utility/nmredataToNmrium.js +0 -66
- package/lib/component/utility/nmriumToNmredata.d.ts +0 -2
- package/lib/component/utility/nmriumToNmredata.js +0 -80
- package/lib/component/utility/util/nmredata/addRanges.d.ts +0 -1
- package/lib/component/utility/util/nmredata/addRanges.js +0 -52
- package/lib/component/utility/util/nmredata/addSource.d.ts +0 -6
- package/lib/component/utility/util/nmredata/addSource.js +0 -54
- package/lib/component/utility/util/nmredata/addZones.d.ts +0 -1
- package/lib/component/utility/util/nmredata/addZones.js +0 -41
- package/lib/component/utility/util/nmredata/flat2DSignals.d.ts +0 -1
- package/lib/component/utility/util/nmredata/flat2DSignals.js +0 -7
- package/lib/component/utility/util/nmredata/get1DSignals.d.ts +0 -10
- package/lib/component/utility/util/nmredata/get1DSignals.js +0 -96
- package/lib/component/utility/util/nmredata/get2DSignals.d.ts +0 -8
- package/lib/component/utility/util/nmredata/get2DSignals.js +0 -59
- package/lib/component/utility/util/nmredata/getCouplingObserved.d.ts +0 -1
- package/lib/component/utility/util/nmredata/getCouplingObserved.js +0 -11
- package/lib/component/utility/util/nmredata/getLabels.d.ts +0 -9
- package/lib/component/utility/util/nmredata/getLabels.js +0 -66
- package/lib/component/utility/util/nmredata/getToFix.d.ts +0 -1
- package/lib/component/utility/util/nmredata/getToFix.js +0 -19
- package/lib/data/data1d/filter1d/absolute.d.ts +0 -13
- package/lib/data/data1d/filter1d/absolute.js +0 -26
- package/lib/data/migration/MigrationManager.d.ts +0 -2
- package/lib/data/migration/MigrationManager.js +0 -19
- package/lib/data/migration/changeKeys.d.ts +0 -1
- package/lib/data/migration/changeKeys.js +0 -9
- package/lib/data/migration/migrateToVersion1.d.ts +0 -11
- package/lib/data/migration/migrateToVersion1.js +0 -32
- package/lib/data/migration/migrateToVersion2.d.ts +0 -1
- package/lib/data/migration/migrateToVersion2.js +0 -111
- package/lib/data/migration/migrateToVersion3.d.ts +0 -1
- package/lib/data/migration/migrateToVersion3.js +0 -55
- package/lib-cjs/component/utility/nmredataToNmrium.js +0 -73
- package/lib-cjs/component/utility/nmriumToNmredata.js +0 -87
- package/lib-cjs/component/utility/util/nmredata/addRanges.js +0 -56
- package/lib-cjs/component/utility/util/nmredata/addSource.js +0 -61
- package/lib-cjs/component/utility/util/nmredata/addZones.js +0 -45
- package/lib-cjs/component/utility/util/nmredata/flat2DSignals.js +0 -11
- package/lib-cjs/component/utility/util/nmredata/get1DSignals.js +0 -100
- package/lib-cjs/component/utility/util/nmredata/get2DSignals.js +0 -63
- package/lib-cjs/component/utility/util/nmredata/getCouplingObserved.js +0 -15
- package/lib-cjs/component/utility/util/nmredata/getLabels.js +0 -70
- package/lib-cjs/component/utility/util/nmredata/getToFix.js +0 -23
- package/lib-cjs/data/data1d/filter1d/absolute.js +0 -32
- package/lib-cjs/data/migration/MigrationManager.js +0 -26
- package/lib-cjs/data/migration/changeKeys.js +0 -13
- package/lib-cjs/data/migration/migrateToVersion1.js +0 -35
- package/lib-cjs/data/migration/migrateToVersion2.js +0 -114
- package/lib-cjs/data/migration/migrateToVersion3.js +0 -58
|
@@ -9,6 +9,7 @@ import { FaFileExport, FaUnlink, FaSitemap, FaChartBar, FaPlus, } from 'react-ic
|
|
|
9
9
|
import { ImLink } from 'react-icons/im';
|
|
10
10
|
import { useAssignmentData } from '../../assignment/AssignmentsContext';
|
|
11
11
|
import { useDispatch } from '../../context/DispatchContext';
|
|
12
|
+
import ActiveButton from '../../elements/ActiveButton';
|
|
12
13
|
import Button from '../../elements/ButtonToolTip';
|
|
13
14
|
import ToggleButton from '../../elements/ToggleButton';
|
|
14
15
|
import { useAlert } from '../../elements/popup/Alert';
|
|
@@ -39,7 +40,7 @@ const style = css `
|
|
|
39
40
|
margin-right: 2px;
|
|
40
41
|
}
|
|
41
42
|
`;
|
|
42
|
-
function RangesHeader({ ranges, info, onUnlink, onFilterActivated, onSettingClick, isFilterActive, filterCounter, showMultiplicityTrees, showJGraph, showRangesIntegrals, activeTab, }) {
|
|
43
|
+
function RangesHeader({ id, ranges, info, onUnlink, onFilterActivated, onSettingClick, isFilterActive, filterCounter, showMultiplicityTrees, showJGraph, showRangesIntegrals, activeTab, }) {
|
|
43
44
|
const dispatch = useDispatch();
|
|
44
45
|
const modal = useModal();
|
|
45
46
|
const alert = useAlert();
|
|
@@ -82,14 +83,14 @@ function RangesHeader({ ranges, info, onUnlink, onFilterActivated, onSettingClic
|
|
|
82
83
|
});
|
|
83
84
|
}, [assignmentData, dispatch, modal]);
|
|
84
85
|
const handleSetShowMultiplicityTrees = useCallback(() => {
|
|
85
|
-
dispatch({ type: SHOW_MULTIPLICTY_TREES });
|
|
86
|
-
}, [dispatch]);
|
|
86
|
+
dispatch({ type: SHOW_MULTIPLICTY_TREES, payload: { id } });
|
|
87
|
+
}, [dispatch, id]);
|
|
87
88
|
const handleShowIntegrals = useCallback(() => {
|
|
88
|
-
dispatch({ type: SHOW_RANGES_INTEGRALS });
|
|
89
|
-
}, [dispatch]);
|
|
89
|
+
dispatch({ type: SHOW_RANGES_INTEGRALS, payload: { id } });
|
|
90
|
+
}, [dispatch, id]);
|
|
90
91
|
const handleShowJGraph = useCallback(() => {
|
|
91
|
-
dispatch({ type: SHOW_J_GRAPH });
|
|
92
|
-
}, [dispatch]);
|
|
92
|
+
dispatch({ type: SHOW_J_GRAPH, payload: { id } });
|
|
93
|
+
}, [dispatch, id]);
|
|
93
94
|
const saveToClipboardHandler = useCallback((value) => {
|
|
94
95
|
void (async () => {
|
|
95
96
|
const success = await copyHTMLToClipboard(value);
|
|
@@ -136,8 +137,8 @@ function RangesHeader({ ranges, info, onUnlink, onFilterActivated, onSettingClic
|
|
|
136
137
|
}, [dispatch, editRange]);
|
|
137
138
|
return (_jsx("div", { css: style, children: _jsxs(DefaultPanelHeader, { counter: ranges?.values?.length, onDelete: handleDeleteAll, deleteToolTip: "Delete All Ranges", onFilter: onFilterActivated, filterToolTip: isFilterActive ? 'Show all ranges' : 'Hide ranges out of view', filterIsActive: isFilterActive, counterFiltered: filterCounter, showSettingButton: true, onSettingClick: onSettingClick, children: [_jsx(Button, { popupTitle: "Preview publication string", popupPlacement: "right", onClick: saveAsHTMLHandler, className: "btn preview-publication-icon", children: _jsx(FaFileExport, {}) }), _jsx(Button, { popupTitle: currentSum
|
|
138
139
|
? `Change Ranges Sum (${Number(currentSum).toFixed(2)})`
|
|
139
|
-
: 'Change Ranges Sum', popupPlacement: "right", onClick: showChangeRangesSumModal, className: "btn icon", children: _jsx(SvgNmrSum, {}) }), _jsx(Button, { popupTitle: "Remove all Assignments", popupPlacement: "right", onClick: handleOnRemoveAssignments, disabled: !ranges || !ranges.values || ranges.values.length === 0, className: "btn icon", children: _jsx(FaUnlink, {}) }), _jsx(
|
|
140
|
+
: 'Change Ranges Sum', popupPlacement: "right", onClick: showChangeRangesSumModal, className: "btn icon", children: _jsx(SvgNmrSum, {}) }), _jsx(Button, { popupTitle: "Remove all Assignments", popupPlacement: "right", onClick: handleOnRemoveAssignments, disabled: !ranges || !ranges.values || ranges.values.length === 0, className: "btn icon", children: _jsx(FaUnlink, {}) }), _jsx(ActiveButton, { popupTitle: showMultiplicityTrees
|
|
140
141
|
? 'Hide Multiplicity Trees in Spectrum'
|
|
141
|
-
: 'Show Multiplicity Trees in Spectrum', popupPlacement: "right", onClick: handleSetShowMultiplicityTrees, disabled: !ranges || !ranges.values || ranges.values.length === 0, children: _jsx(FaSitemap, { style: { pointerEvents: 'none', fontSize: '12px' } }) }), _jsx(
|
|
142
|
+
: 'Show Multiplicity Trees in Spectrum', popupPlacement: "right", onClick: handleSetShowMultiplicityTrees, value: showMultiplicityTrees, disabled: !ranges || !ranges.values || ranges.values.length === 0, children: _jsx(FaSitemap, { style: { pointerEvents: 'none', fontSize: '12px' } }) }), _jsx(ActiveButton, { popupTitle: showJGraph ? 'Hide J Graph' : 'Show J Graph', popupPlacement: "right", onClick: handleShowJGraph, value: showJGraph, disabled: !ranges || !ranges.values || ranges.values.length === 0, children: _jsx(FaChartBar, { style: { pointerEvents: 'none', fontSize: '12px' } }) }), _jsx(ActiveButton, { popupTitle: showRangesIntegrals ? 'Hide integrals' : 'Show integrals', popupPlacement: "right", onClick: handleShowIntegrals, value: showRangesIntegrals, disabled: !ranges || !ranges.values || ranges.values.length === 0, children: _jsx(SvgNmrIntegrate, { style: { pointerEvents: 'none', fontSize: '12px' } }) }), _jsx(ToggleButton, { className: "icon", popupTitle: "fix integral values", popupPlacement: "right", onClick: changeSumConstantFlagHandler, children: _jsx(ImLink, {}) }), _jsx(Button, { popupTitle: "Add range", popupPlacement: "right", onClick: addRangeHandler, className: "btn icon", children: _jsx(FaPlus, {}) })] }) }));
|
|
142
143
|
}
|
|
143
144
|
export default RangesHeader;
|
|
@@ -9,6 +9,7 @@ import { useDispatch } from '../../context/DispatchContext';
|
|
|
9
9
|
import { useAlert } from '../../elements/popup/Alert';
|
|
10
10
|
import { usePanelPreferences } from '../../hooks/usePanelPreferences';
|
|
11
11
|
import useSpectrum from '../../hooks/useSpectrum';
|
|
12
|
+
import { rangeStateInit } from '../../reducer/Reducer';
|
|
12
13
|
import { UNLINK_RANGE } from '../../reducer/types/Types';
|
|
13
14
|
import { copyTextToClipboard } from '../../utility/Export';
|
|
14
15
|
import { tablePanelStyle } from '../extra/BasicPanelStyle';
|
|
@@ -17,7 +18,7 @@ import PreferencesHeader from '../header/PreferencesHeader';
|
|
|
17
18
|
import RangesHeader from './RangesHeader';
|
|
18
19
|
import RangesPreferences from './RangesPreferences';
|
|
19
20
|
import RangesTable from './RangesTable';
|
|
20
|
-
function RangesTablePanelInner({ ranges, data, info, xDomain, preferences, activeTab, molecules, showMultiplicityTrees, showJGraph, showRangesIntegrals, }) {
|
|
21
|
+
function RangesTablePanelInner({ id, ranges, data, info, xDomain, preferences, activeTab, molecules, showMultiplicityTrees, showJGraph, showRangesIntegrals, }) {
|
|
21
22
|
const [isFilterActive, setFilterIsActive] = useState(false);
|
|
22
23
|
const assignmentData = useAssignmentData();
|
|
23
24
|
const dispatch = useDispatch();
|
|
@@ -107,6 +108,7 @@ function RangesTablePanelInner({ ranges, data, info, xDomain, preferences, activ
|
|
|
107
108
|
}
|
|
108
109
|
`,
|
|
109
110
|
], children: [!isFlipped && (_jsx(RangesHeader, { ...{
|
|
111
|
+
id,
|
|
110
112
|
ranges,
|
|
111
113
|
info,
|
|
112
114
|
activeTab,
|
|
@@ -120,10 +122,12 @@ function RangesTablePanelInner({ ranges, data, info, xDomain, preferences, activ
|
|
|
120
122
|
const MemoizedRangesTablePanel = memo(RangesTablePanelInner);
|
|
121
123
|
const emptyData = { ranges: {}, data: {}, info: {} };
|
|
122
124
|
export default function RangesTablePanel() {
|
|
123
|
-
const {
|
|
124
|
-
const {
|
|
125
|
+
const { ranges, data, info, id } = useSpectrum(emptyData);
|
|
126
|
+
const { displayerKey, xDomain, view: { spectra: { activeTab }, }, molecules, toolOptions: { selectedTool }, view: { ranges: rangeState }, } = useChartData();
|
|
127
|
+
const { showMultiplicityTrees, showRangesIntegrals, showJGraph } = useMemo(() => rangeState.find((r) => r.spectrumID === id) || rangeStateInit, [id, rangeState]);
|
|
125
128
|
const rangesPreferences = usePanelPreferences('ranges', activeTab);
|
|
126
129
|
return (_jsx(MemoizedRangesTablePanel, { ...{
|
|
130
|
+
id,
|
|
127
131
|
ranges,
|
|
128
132
|
data,
|
|
129
133
|
info,
|
|
@@ -7,6 +7,7 @@ import { useDispatch } from '../../context/DispatchContext';
|
|
|
7
7
|
import Button from '../../elements/ButtonToolTip';
|
|
8
8
|
import { useAlert } from '../../elements/popup/Alert';
|
|
9
9
|
import { useModal } from '../../elements/popup/Modal';
|
|
10
|
+
import { useActiveSpectrum } from '../../reducer/Reducer';
|
|
10
11
|
import { DISPLAYER_MODE } from '../../reducer/core/Constants';
|
|
11
12
|
import { ADD_MISSING_PROJECTION, CHANGE_VISIBILITY, DELETE_SPECTRA, RESET_SPECTRA_SCALE, SET_SPECTRA_SAME_TOP, } from '../../reducer/types/Types';
|
|
12
13
|
import DefaultPanelHeader from '../header/DefaultPanelHeader';
|
|
@@ -69,7 +70,8 @@ function SpectraPanelHeaderInner({ data, activeSpectrum, activeTab, displayerMod
|
|
|
69
70
|
}
|
|
70
71
|
const MemoizedSpectraPanelHeader = memo(SpectraPanelHeaderInner);
|
|
71
72
|
export default function SpectrumsTabs({ spectrums }) {
|
|
72
|
-
const { data,
|
|
73
|
+
const { data, view: { spectra: { activeTab }, }, displayerMode, } = useChartData();
|
|
74
|
+
const activeSpectrum = useActiveSpectrum();
|
|
73
75
|
return (_jsx(MemoizedSpectraPanelHeader, { ...{
|
|
74
76
|
data,
|
|
75
77
|
activeSpectrum,
|
|
@@ -7,6 +7,7 @@ import ContextMenu from '../../elements/ContextMenu';
|
|
|
7
7
|
import Tab from '../../elements/Tab/Tab';
|
|
8
8
|
import Tabs from '../../elements/Tab/Tabs';
|
|
9
9
|
import { useAlert } from '../../elements/popup/Alert';
|
|
10
|
+
import { useActiveSpectrum } from '../../reducer/Reducer';
|
|
10
11
|
import { CHANGE_PEAKS_MARKERS_VISIBILITY, SET_ACTIVE_TAB, CHANGE_VISIBILITY, CHANGE_ACTIVE_SPECTRUM, DELETE_SPECTRA, } from '../../reducer/types/Types';
|
|
11
12
|
import { copyTextToClipboard } from '../../utility/Export';
|
|
12
13
|
import groupByInfoKey from '../../utility/GroupByInfoKey';
|
|
@@ -128,6 +129,7 @@ function SpectrumsTabsInner({ data, activeSpectrum, activeTab, onTabChange, }) {
|
|
|
128
129
|
}
|
|
129
130
|
const MemoizedSpectra = memo(SpectrumsTabsInner);
|
|
130
131
|
export default function SpectrumsTabs({ onTabChange }) {
|
|
131
|
-
const { data,
|
|
132
|
+
const { data, view: { spectra: { activeTab }, }, } = useChartData();
|
|
133
|
+
const activeSpectrum = useActiveSpectrum();
|
|
132
134
|
return (_jsx(MemoizedSpectra, { ...{ data, activeSpectrum, activeTab, onTabChange } }));
|
|
133
135
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { xyReduce } from 'ml-spectra-processing';
|
|
2
|
+
import { calculateSanPlot } from '../../../../../data/utilities/calculateSanPlot';
|
|
2
3
|
export function processSnapPlot(dimension, data, yLogBase) {
|
|
3
|
-
const
|
|
4
|
-
? prepare1DData(data)
|
|
5
|
-
: prepare2DData(data);
|
|
6
|
-
const sanResult = xNoiseSanPlot(input);
|
|
4
|
+
const sanResult = calculateSanPlot(dimension, data);
|
|
7
5
|
const sanPlot = {};
|
|
8
6
|
const lines = {};
|
|
9
7
|
for (let plotKey in sanResult.sanplot) {
|
|
@@ -17,27 +15,6 @@ export function processSnapPlot(dimension, data, yLogBase) {
|
|
|
17
15
|
}
|
|
18
16
|
return { sanPlot, lines };
|
|
19
17
|
}
|
|
20
|
-
function prepare1DData(data) {
|
|
21
|
-
const length = data.re.length;
|
|
22
|
-
const jump = Math.floor(length / 307200) || 1;
|
|
23
|
-
const array = new Float64Array((length / jump) >> 0);
|
|
24
|
-
let index = 0;
|
|
25
|
-
for (let i = 0; i < array.length; i += jump) {
|
|
26
|
-
array[index++] = data.re[i];
|
|
27
|
-
}
|
|
28
|
-
return array;
|
|
29
|
-
}
|
|
30
|
-
function prepare2DData(data) {
|
|
31
|
-
let cols = data.z[0].length;
|
|
32
|
-
let rows = data.z.length;
|
|
33
|
-
let jump = Math.floor((cols * rows) / 204800) || 1;
|
|
34
|
-
const array = new Float64Array(((cols * rows) / jump) >> 0);
|
|
35
|
-
let index = 0;
|
|
36
|
-
for (let i = 0; i < array.length; i += jump) {
|
|
37
|
-
array[index++] = data.z[(i / rows) >> 0][i % rows];
|
|
38
|
-
}
|
|
39
|
-
return array;
|
|
40
|
-
}
|
|
41
18
|
function getLine(value, data, options) {
|
|
42
19
|
const { log10, abs } = Math;
|
|
43
20
|
const { yLogBase } = options;
|
|
@@ -53,7 +53,7 @@ const panelStyle = css `
|
|
|
53
53
|
}
|
|
54
54
|
`;
|
|
55
55
|
function SummaryPanel() {
|
|
56
|
-
const { molecules, correlations: correlationsData, data: spectraData, xDomain, yDomain, displayerMode, activeTab, } = useChartData();
|
|
56
|
+
const { molecules, correlations: correlationsData, data: spectraData, xDomain, yDomain, displayerMode, view: { spectra: { activeTab }, }, } = useChartData();
|
|
57
57
|
const dispatch = useDispatch();
|
|
58
58
|
const modal = useModal();
|
|
59
59
|
const assignmentData = useAssignmentData();
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import { useChartData } from '../../../context/ChartContext';
|
|
3
|
+
import { useActiveSpectrum } from '../../../reducer/Reducer';
|
|
3
4
|
import { isInView } from './Utilities';
|
|
4
5
|
function useInView({ correlation }) {
|
|
5
|
-
const { data: spectraData, xDomain, yDomain, displayerMode, activeTab,
|
|
6
|
+
const { data: spectraData, xDomain, yDomain, displayerMode, view: { spectra: { activeTab }, }, } = useChartData();
|
|
7
|
+
const activeSpectrum = useActiveSpectrum();
|
|
6
8
|
return useMemo(() => isInView(spectraData, activeTab, activeSpectrum, xDomain, yDomain, displayerMode, correlation), [
|
|
7
9
|
activeSpectrum,
|
|
8
10
|
activeTab,
|
|
@@ -6,12 +6,12 @@ import { FaUnlink } from 'react-icons/fa';
|
|
|
6
6
|
import { useAssignmentData } from '../../assignment/AssignmentsContext';
|
|
7
7
|
import { useChartData } from '../../context/ChartContext';
|
|
8
8
|
import { useDispatch } from '../../context/DispatchContext';
|
|
9
|
-
import
|
|
9
|
+
import ActiveButton from '../../elements/ActiveButton';
|
|
10
10
|
import ToolTip from '../../elements/ToolTip/ToolTip';
|
|
11
11
|
import { useModal } from '../../elements/popup/Modal';
|
|
12
12
|
import useSpectrum from '../../hooks/useSpectrum';
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
13
|
+
import { zoneStateInit } from '../../reducer/Reducer';
|
|
14
|
+
import { DELETE_2D_ZONE, SHOW_ZONES, SHOW_ZONES_PEAKS, SHOW_ZONES_SIGNALS, UNLINK_ZONE, } from '../../reducer/types/Types';
|
|
15
15
|
import { tablePanelStyle } from '../extra/BasicPanelStyle';
|
|
16
16
|
import NoTableData from '../extra/placeholder/NoTableData';
|
|
17
17
|
import DefaultPanelHeader from '../header/DefaultPanelHeader';
|
|
@@ -39,7 +39,7 @@ const style = css `
|
|
|
39
39
|
align-items: center;
|
|
40
40
|
}
|
|
41
41
|
`;
|
|
42
|
-
function ZonesPanelInner({ zones, activeTab, xDomain, yDomain, experiment }) {
|
|
42
|
+
function ZonesPanelInner({ zones, activeTab, xDomain, yDomain, experiment, showZones, showSignals, showPeaks, id, }) {
|
|
43
43
|
const [filterIsActive, setFilterIsActive] = useState(false);
|
|
44
44
|
const assignmentData = useAssignmentData();
|
|
45
45
|
const dispatch = useDispatch();
|
|
@@ -122,9 +122,15 @@ function ZonesPanelInner({ zones, activeTab, xDomain, yDomain, experiment }) {
|
|
|
122
122
|
settingRef.current.saveSetting();
|
|
123
123
|
setFlipStatus(false);
|
|
124
124
|
}, []);
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
}
|
|
125
|
+
const handleSetShowZones = () => {
|
|
126
|
+
dispatch({ type: SHOW_ZONES, payload: { id } });
|
|
127
|
+
};
|
|
128
|
+
const handleSetShowSignals = () => {
|
|
129
|
+
dispatch({ type: SHOW_ZONES_SIGNALS, payload: { id } });
|
|
130
|
+
};
|
|
131
|
+
const handleSetShowPeaks = () => {
|
|
132
|
+
dispatch({ type: SHOW_ZONES_PEAKS, payload: { id } });
|
|
133
|
+
};
|
|
128
134
|
return (_jsxs("div", { css: [
|
|
129
135
|
tablePanelStyle,
|
|
130
136
|
style,
|
|
@@ -134,21 +140,24 @@ function ZonesPanelInner({ zones, activeTab, xDomain, yDomain, experiment }) {
|
|
|
134
140
|
position: relative;
|
|
135
141
|
}
|
|
136
142
|
`,
|
|
137
|
-
], children: [!isFlipped && (_jsxs(DefaultPanelHeader, { counter: zones.values ? zones.values.length : 0, onDelete: handleDeleteAll, deleteToolTip: "Delete All Zones", onFilter: handleOnFilter, filterToolTip: filterIsActive ? 'Show all zones' : 'Hide zones out of view', filterIsActive: filterIsActive, counterFiltered: tableData?.length, showSettingButton: true, onSettingClick: settingsPanelHandler, children: [_jsx(ToolTip, { title: `Remove all Assignments`, popupPlacement: "right", children: _jsx("button", { className: "remove-assignments-btn", type: "button", onClick: handleOnRemoveAssignments, disabled: !zones.values || zones.values.length === 0, children: _jsx(FaUnlink, {}) }) }), _jsx(
|
|
143
|
+
], children: [!isFlipped && (_jsxs(DefaultPanelHeader, { counter: zones.values ? zones.values.length : 0, onDelete: handleDeleteAll, deleteToolTip: "Delete All Zones", onFilter: handleOnFilter, filterToolTip: filterIsActive ? 'Show all zones' : 'Hide zones out of view', filterIsActive: filterIsActive, counterFiltered: tableData?.length, showSettingButton: true, onSettingClick: settingsPanelHandler, children: [_jsx(ToolTip, { title: `Remove all Assignments`, popupPlacement: "right", children: _jsx("button", { className: "remove-assignments-btn", type: "button", onClick: handleOnRemoveAssignments, disabled: !zones.values || zones.values.length === 0, children: _jsx(FaUnlink, {}) }) }), _jsx(ActiveButton, { popupTitle: "show/hide zones", popupPlacement: "right", value: showZones, onClick: handleSetShowZones, children: _jsx("span", { style: { fontSize: '12px', pointerEvents: 'none' }, children: "z" }) }), _jsx(ActiveButton, { popupTitle: "show/hide signals", popupPlacement: "right", value: showSignals, onClick: handleSetShowSignals, children: _jsx("span", { style: { fontSize: '12px', pointerEvents: 'none' }, children: "s" }) }), _jsx(ActiveButton, { popupTitle: "show/hide peaks", popupPlacement: "right", value: showPeaks, onClick: handleSetShowPeaks, children: _jsx("span", { style: { fontSize: '12px', pointerEvents: 'none' }, children: "p" }) })] })), isFlipped && (_jsx(PreferencesHeader, { onSave: saveSettingHandler, onClose: settingsPanelHandler })), _jsx("div", { className: "inner-container", children: !isFlipped ? (_jsx("div", { className: "table-container", children: tableData && tableData.length > 0 ? (_jsx(ZonesTable, { tableData: tableData, onUnlink: unlinkZoneHandler, nuclei: activeTab && activeTab.split(',').length === 2
|
|
138
144
|
? activeTab.split(',')
|
|
139
145
|
: ['?', '?'], experiment: experiment })) : (_jsx(NoTableData, {})) })) : (_jsx(ZonesPreferences, { ref: settingRef })) })] }));
|
|
140
146
|
}
|
|
141
147
|
const MemoizedZonesPanel = memo(ZonesPanelInner);
|
|
142
148
|
const emptyData = { zones: {}, info: {} };
|
|
143
149
|
export default function ZonesPanel() {
|
|
144
|
-
const { displayerKey, xDomain, yDomain, activeTab } = useChartData();
|
|
145
|
-
const { zones, info } = useSpectrum(emptyData);
|
|
150
|
+
const { displayerKey, xDomain, yDomain, view: { zones: zoneState, spectra: { activeTab }, }, } = useChartData();
|
|
151
|
+
const { zones, info, id } = useSpectrum(emptyData);
|
|
152
|
+
const zoneProps = zoneState.find((r) => r.spectrumID === id) || zoneStateInit;
|
|
146
153
|
return (_jsx(MemoizedZonesPanel, { ...{
|
|
154
|
+
id,
|
|
147
155
|
xDomain,
|
|
148
156
|
yDomain,
|
|
149
157
|
activeTab,
|
|
150
158
|
displayerKey,
|
|
151
159
|
zones,
|
|
152
160
|
experiment: info.experiment,
|
|
161
|
+
...zoneProps,
|
|
153
162
|
} }));
|
|
154
163
|
}
|
|
@@ -256,7 +256,7 @@ function DatabasePanelInner({ nucleus, selectedTool, databases, defaultDatabase,
|
|
|
256
256
|
}
|
|
257
257
|
const MemoizedDatabasePanel = memo(DatabasePanelInner);
|
|
258
258
|
export default function PeaksPanel() {
|
|
259
|
-
const { activeTab, toolOptions: { selectedTool }, } = useChartData();
|
|
259
|
+
const { view: { spectra: { activeTab }, }, toolOptions: { selectedTool }, } = useChartData();
|
|
260
260
|
const { current } = usePreferences();
|
|
261
261
|
const { data, defaultDatabase } = current.databases;
|
|
262
262
|
const databases = DATA_BASES.concat(data.filter((datum) => datum.enabled));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { CorrelationData } from 'nmr-correlation';
|
|
3
2
|
import { SpectraAnalysis } from '../../data/data1d/MultipleAnalysis';
|
|
4
3
|
import { ApodizationOptions } from '../../data/data1d/filter1d/apodization';
|
|
@@ -12,6 +11,74 @@ export interface ActiveSpectrum {
|
|
|
12
11
|
id: string;
|
|
13
12
|
index: number;
|
|
14
13
|
}
|
|
14
|
+
interface ToolStateBase {
|
|
15
|
+
spectrumID: string;
|
|
16
|
+
}
|
|
17
|
+
interface RangeToolState extends ToolStateBase {
|
|
18
|
+
/**
|
|
19
|
+
* boolean indicator to hide/show multiplicity tree
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
showMultiplicityTrees: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* boolean indicator to hide/show J graph for spectrum signals
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
showJGraph: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* boolean indicator to hide/show integrals for the spectrum ranges
|
|
30
|
+
* @default true
|
|
31
|
+
*/
|
|
32
|
+
showRangesIntegrals: boolean;
|
|
33
|
+
}
|
|
34
|
+
interface ZoneToolState extends ToolStateBase {
|
|
35
|
+
/**
|
|
36
|
+
* boolean indicator to hide/show zones
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
showZones: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* boolean indicator to hide/show signals for spectrum zones
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
showSignals: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* boolean indicator to hide/show peaks for spectrum zones
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
showPeaks: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface ViewState {
|
|
52
|
+
/**
|
|
53
|
+
* Floatings molecules
|
|
54
|
+
* @default []
|
|
55
|
+
*/
|
|
56
|
+
floatingMolecules: Array<FloatingMolecules>;
|
|
57
|
+
ranges: Array<RangeToolState>;
|
|
58
|
+
zones: Array<ZoneToolState>;
|
|
59
|
+
spectra: {
|
|
60
|
+
/**
|
|
61
|
+
* active spectrum id per nucleus
|
|
62
|
+
* @default {}
|
|
63
|
+
*/
|
|
64
|
+
activeSpectra: Record<string, ActiveSpectrum | null>;
|
|
65
|
+
/**
|
|
66
|
+
* current select tab (nucleus)
|
|
67
|
+
* @default null
|
|
68
|
+
*/
|
|
69
|
+
activeTab: string;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
export declare const rangeStateInit: {
|
|
73
|
+
showMultiplicityTrees: boolean;
|
|
74
|
+
showRangesIntegrals: boolean;
|
|
75
|
+
showJGraph: boolean;
|
|
76
|
+
};
|
|
77
|
+
export declare const zoneStateInit: {
|
|
78
|
+
showZones: boolean;
|
|
79
|
+
showSignals: boolean;
|
|
80
|
+
showPeaks: boolean;
|
|
81
|
+
};
|
|
15
82
|
export interface Margin {
|
|
16
83
|
top: number;
|
|
17
84
|
right: number;
|
|
@@ -85,11 +152,6 @@ export interface State {
|
|
|
85
152
|
* @default {}
|
|
86
153
|
*/
|
|
87
154
|
integralsYDomains: Record<string, Array<number>>;
|
|
88
|
-
/**
|
|
89
|
-
* current select tab (nucleus)
|
|
90
|
-
* @default null
|
|
91
|
-
*/
|
|
92
|
-
activeTab: string;
|
|
93
155
|
/**
|
|
94
156
|
* plot chart area width
|
|
95
157
|
* @default 0
|
|
@@ -105,11 +167,6 @@ export interface State {
|
|
|
105
167
|
* @default {top: 10,right: 20,bottom: 70,left: 0}
|
|
106
168
|
*/
|
|
107
169
|
margin: Margin;
|
|
108
|
-
/**
|
|
109
|
-
* current active spectrum
|
|
110
|
-
* @default null
|
|
111
|
-
*/
|
|
112
|
-
activeSpectrum: ActiveSpectrum | null;
|
|
113
170
|
/**
|
|
114
171
|
* Scale direction
|
|
115
172
|
* @default 'RTL'
|
|
@@ -122,11 +179,9 @@ export interface State {
|
|
|
122
179
|
molecules: Array<StateMoleculeExtended>;
|
|
123
180
|
/**
|
|
124
181
|
* View related information
|
|
125
|
-
* @default { floatingMolecules: [] };
|
|
182
|
+
* @default { floatingMolecules: [], ranges: [], zones: [] };
|
|
126
183
|
*/
|
|
127
|
-
view:
|
|
128
|
-
floatingMolecules: Array<FloatingMolecules>;
|
|
129
|
-
};
|
|
184
|
+
view: ViewState;
|
|
130
185
|
/**
|
|
131
186
|
* options to control spectra vertical alignment
|
|
132
187
|
* @default {align: 'bottom',value: DEFAULT_YAXIS_SHIFT_VALUE}
|
|
@@ -156,11 +211,6 @@ export interface State {
|
|
|
156
211
|
* @default '1D'
|
|
157
212
|
*/
|
|
158
213
|
displayerMode: DISPLAYER_MODE;
|
|
159
|
-
/**
|
|
160
|
-
* active spectrum per nucleus
|
|
161
|
-
* @default {}
|
|
162
|
-
*/
|
|
163
|
-
tabActiveSpectrum: Record<string, ActiveSpectrum | null>;
|
|
164
214
|
/**
|
|
165
215
|
* Multiple spectra analysis data
|
|
166
216
|
*/
|
|
@@ -231,21 +281,6 @@ export interface State {
|
|
|
231
281
|
* @default null
|
|
232
282
|
*/
|
|
233
283
|
activeFilterID: string | null;
|
|
234
|
-
/**
|
|
235
|
-
* boolean indicator to hide/show multiplicity tree
|
|
236
|
-
* @default false
|
|
237
|
-
*/
|
|
238
|
-
showMultiplicityTrees: boolean;
|
|
239
|
-
/**
|
|
240
|
-
* boolean indicator to hide/show integrals for the spectrum ranges
|
|
241
|
-
* @default false
|
|
242
|
-
*/
|
|
243
|
-
showRangesIntegrals: boolean;
|
|
244
|
-
/**
|
|
245
|
-
* boolean indicator to hide/show J graph for spectrum signals
|
|
246
|
-
* @default false
|
|
247
|
-
*/
|
|
248
|
-
showJGraph: boolean;
|
|
249
284
|
/**
|
|
250
285
|
* prediction Index
|
|
251
286
|
* @default 0
|
|
@@ -263,6 +298,7 @@ export interface State {
|
|
|
263
298
|
};
|
|
264
299
|
usedColors: UsedColors;
|
|
265
300
|
}
|
|
301
|
+
export declare function useActiveSpectrum(): ActiveSpectrum | null;
|
|
266
302
|
export declare function initState(state: State): State;
|
|
267
303
|
export declare function dispatchMiddleware(dispatch: any): (action: any) => void;
|
|
268
304
|
export declare const spectrumReducer: (base: {
|
|
@@ -272,29 +308,7 @@ export declare const spectrumReducer: (base: {
|
|
|
272
308
|
readonly source: {
|
|
273
309
|
readonly jcampURL: string;
|
|
274
310
|
readonly jcampSpectrumIndex: number;
|
|
275
|
-
readonly file:
|
|
276
|
-
readonly lastModified: number;
|
|
277
|
-
readonly name: string;
|
|
278
|
-
readonly webkitRelativePath: string;
|
|
279
|
-
readonly size: number;
|
|
280
|
-
readonly type: string;
|
|
281
|
-
readonly arrayBuffer: {
|
|
282
|
-
(): Promise<ArrayBuffer>;
|
|
283
|
-
(): Promise<ArrayBuffer>;
|
|
284
|
-
};
|
|
285
|
-
readonly slice: {
|
|
286
|
-
(start?: number | undefined, end?: number | undefined, contentType?: string | undefined): Blob;
|
|
287
|
-
(start?: number | undefined, end?: number | undefined, contentType?: string | undefined): Blob;
|
|
288
|
-
};
|
|
289
|
-
readonly stream: {
|
|
290
|
-
(): ReadableStream<Uint8Array>;
|
|
291
|
-
(): NodeJS.ReadableStream;
|
|
292
|
-
};
|
|
293
|
-
readonly text: {
|
|
294
|
-
(): Promise<string>;
|
|
295
|
-
(): Promise<string>;
|
|
296
|
-
};
|
|
297
|
-
};
|
|
311
|
+
readonly file: File;
|
|
298
312
|
};
|
|
299
313
|
readonly display: {
|
|
300
314
|
readonly name: string;
|
|
@@ -700,6 +714,7 @@ export declare const spectrumReducer: (base: {
|
|
|
700
714
|
readonly id: string;
|
|
701
715
|
readonly originDelta?: number | undefined;
|
|
702
716
|
readonly peaks?: readonly {
|
|
717
|
+
readonly id?: string | undefined;
|
|
703
718
|
readonly kind?: string | undefined;
|
|
704
719
|
readonly shape?: {
|
|
705
720
|
readonly kind: "gaussian";
|
|
@@ -771,29 +786,7 @@ export declare const spectrumReducer: (base: {
|
|
|
771
786
|
readonly source: {
|
|
772
787
|
readonly jcampURL: string;
|
|
773
788
|
readonly jcampSpectrumIndex: number;
|
|
774
|
-
readonly file:
|
|
775
|
-
readonly lastModified: number;
|
|
776
|
-
readonly name: string;
|
|
777
|
-
readonly webkitRelativePath: string;
|
|
778
|
-
readonly size: number;
|
|
779
|
-
readonly type: string;
|
|
780
|
-
readonly arrayBuffer: {
|
|
781
|
-
(): Promise<ArrayBuffer>;
|
|
782
|
-
(): Promise<ArrayBuffer>;
|
|
783
|
-
};
|
|
784
|
-
readonly slice: {
|
|
785
|
-
(start?: number | undefined, end?: number | undefined, contentType?: string | undefined): Blob;
|
|
786
|
-
(start?: number | undefined, end?: number | undefined, contentType?: string | undefined): Blob;
|
|
787
|
-
};
|
|
788
|
-
readonly stream: {
|
|
789
|
-
(): ReadableStream<Uint8Array>;
|
|
790
|
-
(): NodeJS.ReadableStream;
|
|
791
|
-
};
|
|
792
|
-
readonly text: {
|
|
793
|
-
(): Promise<string>;
|
|
794
|
-
(): Promise<string>;
|
|
795
|
-
};
|
|
796
|
-
};
|
|
789
|
+
readonly file: File;
|
|
797
790
|
};
|
|
798
791
|
readonly display: {
|
|
799
792
|
readonly name: string;
|
|
@@ -883,7 +876,16 @@ export declare const spectrumReducer: (base: {
|
|
|
883
876
|
readonly to: number;
|
|
884
877
|
} | undefined;
|
|
885
878
|
} | undefined;
|
|
886
|
-
readonly peaks?: readonly
|
|
879
|
+
readonly peaks?: readonly {
|
|
880
|
+
readonly id?: string | undefined;
|
|
881
|
+
readonly x: number;
|
|
882
|
+
readonly y: number;
|
|
883
|
+
readonly z: number;
|
|
884
|
+
readonly maxX: number;
|
|
885
|
+
readonly minX: number;
|
|
886
|
+
readonly maxY: number;
|
|
887
|
+
readonly minY: number;
|
|
888
|
+
}[] | undefined;
|
|
887
889
|
readonly kind?: string | undefined;
|
|
888
890
|
}[];
|
|
889
891
|
readonly kind: string;
|
|
@@ -931,7 +933,6 @@ export declare const spectrumReducer: (base: {
|
|
|
931
933
|
readonly integralsYDomains: {
|
|
932
934
|
readonly [x: string]: readonly number[];
|
|
933
935
|
};
|
|
934
|
-
readonly activeTab: string;
|
|
935
936
|
readonly width: number;
|
|
936
937
|
readonly height: number;
|
|
937
938
|
readonly margin: {
|
|
@@ -940,10 +941,6 @@ export declare const spectrumReducer: (base: {
|
|
|
940
941
|
readonly bottom: number;
|
|
941
942
|
readonly left: number;
|
|
942
943
|
};
|
|
943
|
-
readonly activeSpectrum: {
|
|
944
|
-
readonly id: string;
|
|
945
|
-
readonly index: number;
|
|
946
|
-
} | null;
|
|
947
944
|
readonly mode: 'RTL' | 'LTR';
|
|
948
945
|
readonly molecules: readonly {
|
|
949
946
|
readonly mf: string;
|
|
@@ -961,7 +958,32 @@ export declare const spectrumReducer: (base: {
|
|
|
961
958
|
readonly floatingMolecules: readonly {
|
|
962
959
|
readonly id: string;
|
|
963
960
|
readonly visible: boolean;
|
|
961
|
+
readonly position: {
|
|
962
|
+
readonly x: number;
|
|
963
|
+
readonly y: number;
|
|
964
|
+
};
|
|
965
|
+
}[];
|
|
966
|
+
readonly ranges: readonly {
|
|
967
|
+
readonly showMultiplicityTrees: boolean;
|
|
968
|
+
readonly showJGraph: boolean;
|
|
969
|
+
readonly showRangesIntegrals: boolean;
|
|
970
|
+
readonly spectrumID: string;
|
|
964
971
|
}[];
|
|
972
|
+
readonly zones: readonly {
|
|
973
|
+
readonly showZones: boolean;
|
|
974
|
+
readonly showSignals: boolean;
|
|
975
|
+
readonly showPeaks: boolean;
|
|
976
|
+
readonly spectrumID: string;
|
|
977
|
+
}[];
|
|
978
|
+
readonly spectra: {
|
|
979
|
+
readonly activeSpectra: {
|
|
980
|
+
readonly [x: string]: {
|
|
981
|
+
readonly id: string;
|
|
982
|
+
readonly index: number;
|
|
983
|
+
} | null;
|
|
984
|
+
};
|
|
985
|
+
readonly activeTab: string;
|
|
986
|
+
};
|
|
965
987
|
};
|
|
966
988
|
readonly verticalAlign: {
|
|
967
989
|
readonly align: VerticalAlignment;
|
|
@@ -977,12 +999,6 @@ export declare const spectrumReducer: (base: {
|
|
|
977
999
|
readonly isLoading: boolean;
|
|
978
1000
|
readonly keysPreferences: any;
|
|
979
1001
|
readonly displayerMode: DISPLAYER_MODE;
|
|
980
|
-
readonly tabActiveSpectrum: {
|
|
981
|
-
readonly [x: string]: {
|
|
982
|
-
readonly id: string;
|
|
983
|
-
readonly index: number;
|
|
984
|
-
} | null;
|
|
985
|
-
};
|
|
986
1002
|
readonly spectraAnalysis: {
|
|
987
1003
|
readonly [x: string]: {
|
|
988
1004
|
readonly options: {
|
|
@@ -1051,9 +1067,6 @@ export declare const spectrumReducer: (base: {
|
|
|
1051
1067
|
};
|
|
1052
1068
|
readonly zonesNoiseFactor: number;
|
|
1053
1069
|
readonly activeFilterID: string | null;
|
|
1054
|
-
readonly showMultiplicityTrees: boolean;
|
|
1055
|
-
readonly showRangesIntegrals: boolean;
|
|
1056
|
-
readonly showJGraph: boolean;
|
|
1057
1070
|
readonly predictionIndex: number;
|
|
1058
1071
|
readonly peaksOptions: {
|
|
1059
1072
|
readonly showPeaksShapes: boolean;
|
|
@@ -1066,3 +1079,4 @@ export declare const spectrumReducer: (base: {
|
|
|
1066
1079
|
readonly '2d': readonly string[];
|
|
1067
1080
|
};
|
|
1068
1081
|
}, action: any) => import("immer/dist/internal").WritableDraft<State>;
|
|
1082
|
+
export {};
|