nmrium 0.39.0 → 0.41.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/FooterBanner.js +5 -4
- package/lib/component/1d/Viewer1D.js +121 -104
- package/lib/component/1d/database/ResurrectedDatabaseRanges.js +1 -1
- package/lib/component/1d/jCouplingGraph/JGraphContext.d.ts +1 -1
- package/lib/component/1d/jCouplingGraph/JsCouplingLinks.js +1 -1
- package/lib/component/1d/multiplicityTree/TreeColors.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/TreeColors.js +1 -6
- package/lib/component/1d/multiplicityTree/TreeNodes.d.ts +1 -1
- package/lib/component/1d/tool/BaseLineZones.d.ts +1 -1
- package/lib/component/1d/tool/BaseLineZones.js +7 -4
- package/lib/component/1d/tool/PeakPointer.js +1 -1
- package/lib/component/1d/utilities/scale.js +1 -3
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.d.ts +1 -1
- package/lib/component/1d-2d/tools/BrushXY.js +10 -7
- package/lib/component/1d-2d/tools/CrossLinePointer.js +1 -1
- package/lib/component/2d/FooterBanner.js +3 -2
- package/lib/component/2d/Viewer2D.js +51 -29
- package/lib/component/2d/XAxis.js +1 -1
- package/lib/component/2d/YAxis.js +1 -1
- package/lib/component/2d/utilities/SliceScale.d.ts +2 -2
- package/lib/component/2d/utilities/scale.d.ts +5 -5
- package/lib/component/2d/zones/Signal.js +1 -2
- package/lib/component/EventsTrackers/BrushTracker.d.ts +4 -1
- package/lib/component/EventsTrackers/BrushTracker.js +21 -6
- package/lib/component/NMRium.d.ts +2 -2
- package/lib/component/NMRium.js +39 -26
- package/lib/component/assignment/AssignmentsReducer.d.ts +1 -1
- package/lib/component/assignment/actions/setActiveAssignment.js +1 -1
- package/lib/component/context/LoggerContext.js +11 -6
- package/lib/component/elements/InputRange.js +1 -1
- package/lib/component/elements/MenuButton.d.ts +1 -1
- package/lib/component/elements/MoleculeSelection.d.ts +1 -1
- package/lib/component/elements/ReactTable/ReactTable.d.ts +1 -1
- package/lib/component/elements/Tab/DeleteButton.d.ts +1 -1
- package/lib/component/elements/ToolbarMenu.d.ts +1 -1
- package/lib/component/elements/accordion/Accordion.d.ts +1 -1
- package/lib/component/elements/draggable/SVGDraggable.d.ts +1 -1
- package/lib/component/elements/draggable/useDraggable.d.ts +1 -1
- package/lib/component/elements/dropDownButton/DropDownButton.d.ts +1 -1
- package/lib/component/elements/dropDownButton/DropDownList.js +3 -1
- package/lib/component/elements/formik/SelectBox.d.ts +1 -1
- package/lib/component/elements/popup/Alert/AlertBlock.d.ts +8 -0
- package/lib/component/elements/popup/Alert/AlertBlock.js +30 -0
- package/lib/component/elements/popup/Alert/Context.d.ts +26 -2
- package/lib/component/elements/popup/Alert/Context.js +6 -2
- package/lib/component/elements/popup/Alert/Provider.d.ts +4 -3
- package/lib/component/elements/popup/Alert/Provider.js +5 -23
- package/lib/component/elements/popup/Modal/ConfirmDialog.d.ts +1 -1
- package/lib/component/elements/popup/Modal/ConfirmDialog.js +2 -1
- package/lib/component/elements/popup/Modal/Provider.js +3 -1
- package/lib/component/elements/popup/options.d.ts +22 -19
- package/lib/component/elements/resizer/Resizer.d.ts +2 -2
- package/lib/component/elements/toggle/ToggleButton.d.ts +2 -2
- package/lib/component/elements/toggle/ToggleButton.js +1 -1
- package/lib/component/header/Header.js +2 -2
- package/lib/component/header/ZeroFillingOptionsPanel.js +3 -8
- package/lib/component/highlight/index.d.ts +1 -1
- package/lib/component/hooks/useCheckToolsVisibility.js +2 -2
- package/lib/component/hooks/useExport.js +2 -1
- package/lib/component/hooks/useFormatNumberByNucleus.d.ts +1 -1
- package/lib/component/hooks/usePanelPreferences.js +2 -2
- package/lib/component/hooks/useXScale.d.ts +1 -1
- package/lib/component/hooks/useXYReduce.d.ts +2 -2
- package/lib/component/modal/AboutSpectrumSimulationModal.d.ts +2 -0
- package/lib/component/modal/AboutSpectrumSimulationModal.js +49 -0
- package/lib/component/modal/AboutUsModal.js +4 -2
- package/lib/component/modal/AlignSpectraModal.js +11 -1
- package/lib/component/modal/LogsHistoryModal.d.ts +6 -0
- package/lib/component/{header/LogsHistory.js → modal/LogsHistoryModal.js} +6 -4
- package/lib/component/modal/MultipletAnalysisModal.js +2 -1
- package/lib/component/modal/PredictSpectraModal.d.ts +1 -2
- package/lib/component/modal/PredictSpectraModal.js +25 -28
- package/lib/component/modal/changeSum/ChangeSumModal.js +1 -1
- package/lib/component/modal/editRange/forms/components/SignalsForm.js +1 -1
- package/lib/component/modal/editZone/SignalsForm.js +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.js +1 -1
- package/lib/component/modal/setting/GeneralSettings.js +28 -27
- package/lib/component/modal/setting/settings-tabs/DisplayTabContent.js +4 -0
- package/lib/component/modal/setting/settings-tabs/FormattingTabContent.js +1 -1
- package/lib/component/modal/setting/settingsValidation.js +2 -2
- package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +4 -7
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +19 -19
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +3 -5
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +9 -13
- package/lib/component/panels/Panels.js +13 -0
- package/lib/component/panels/PeaksPanel/PeaksTable.js +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +9 -15
- package/lib/component/panels/RangesPanel/RangesPanel.js +7 -10
- package/lib/component/panels/SpectrumsPanel/SpectraTable.js +8 -11
- package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +3 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -2
- package/lib/component/panels/SummaryPanel/utilities/Utilities.d.ts +2 -1
- package/lib/component/panels/SummaryPanel/utilities/Utilities.js +1 -1
- package/lib/component/panels/ZonesPanel/ZonesTable.d.ts +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.d.ts +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.js +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.js +1 -1
- package/lib/component/panels/extra/utilities/MultiplicityUtilities.js +2 -2
- package/lib/component/panels/extra/utilities/UseToggleStatus.js +1 -1
- package/lib/component/panels/filtersPanel/FiltersTable.js +2 -2
- package/lib/component/panels/predictionPanel/PredictionOptionsPanel.js +2 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.js +3 -2
- package/lib/component/panels/predictionPanel/PredictionSimpleOptions.js +2 -2
- package/lib/component/panels/spectrumSimulation/SpectrumSimulation.d.ts +1 -0
- package/lib/component/panels/spectrumSimulation/SpectrumSimulation.js +88 -0
- package/lib/component/panels/spectrumSimulation/SpectrumSimulationPreferences.d.ts +11 -0
- package/lib/component/panels/spectrumSimulation/SpectrumSimulationPreferences.js +37 -0
- package/lib/component/panels/spectrumSimulation/SpectrumSimulationSimpleOptions.d.ts +4 -0
- package/lib/component/panels/spectrumSimulation/SpectrumSimulationSimpleOptions.js +25 -0
- package/lib/component/panels/spectrumSimulation/SpinSystemTable.d.ts +5 -0
- package/lib/component/panels/spectrumSimulation/SpinSystemTable.js +60 -0
- package/lib/component/reducer/Reducer.d.ts +13 -12
- package/lib/component/reducer/Reducer.js +251 -239
- package/lib/component/reducer/actions/AssignmentsActions.d.ts +1 -1
- package/lib/component/reducer/actions/AssignmentsActions.js +1 -1
- package/lib/component/reducer/actions/DatabaseActions.js +2 -1
- package/lib/component/reducer/actions/DomainActions.d.ts +7 -2
- package/lib/component/reducer/actions/DomainActions.js +30 -1
- package/lib/component/reducer/actions/FiltersActions.js +4 -4
- package/lib/component/reducer/actions/LoadActions.js +1 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts +2 -0
- package/lib/component/reducer/actions/MoleculeActions.js +51 -2
- package/lib/component/reducer/actions/SpectrumsActions.d.ts +8 -2
- package/lib/component/reducer/actions/SpectrumsActions.js +43 -4
- package/lib/component/reducer/actions/ToolsActions.js +2 -2
- package/lib/component/reducer/actions/ZonesActions.js +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +4 -6
- package/lib/component/reducer/preferences/actions/setActiveWorkspace.js +1 -1
- package/lib/component/reducer/preferences/actions/setPreferences.js +3 -4
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.js +5 -1
- package/lib/component/reducer/preferences/utilities/flatObject.js +1 -1
- package/lib/component/toolbar/ToolTypes.d.ts +4 -4
- package/lib/component/utility/export.d.ts +5 -4
- package/lib/component/utility/export.js +33 -61
- package/lib/component/utility/getSpectraObjectPaths.js +1 -1
- package/lib/component/utility/getUniqueNuclei.js +1 -1
- package/lib/component/utility/jpathToArray.js +1 -1
- package/lib/component/workspaces/index.d.ts +1 -0
- package/lib/component/workspaces/index.js +2 -0
- package/lib/component/workspaces/simulation.d.ts +2 -0
- package/lib/component/workspaces/simulation.js +68 -0
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -0
- package/lib/data/PredictionManager.d.ts +8 -7
- package/lib/data/PredictionManager.js +95 -22
- package/lib/data/SpectraManager.js +1 -1
- package/lib/data/constants/DefaultPathLengths.d.ts +1 -3
- package/lib/data/constants/SignalsKinds.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/generateJGraphData.js +3 -3
- package/lib/data/data1d/Spectrum1D/getReferenceShift.js +5 -4
- package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +12 -13
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +10 -9
- package/lib/data/data1d/database.d.ts +5 -5
- package/lib/data/data1d/database.js +3 -3
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +1 -1
- package/lib/data/data1d/multipleSpectraAnalysis.js +1 -1
- package/lib/data/data1d/spectrumSimulation.d.ts +14 -0
- package/lib/data/data1d/spectrumSimulation.js +53 -0
- package/lib/data/data2d/Spectrum2D/contours.d.ts +8 -4
- package/lib/data/data2d/Spectrum2D/contours.js +7 -1
- package/lib/data/data2d/Spectrum2D/getMissingProjection.js +6 -6
- package/lib/data/data2d/Spectrum2D/getShift.js +1 -1
- package/lib/data/data2d/Spectrum2D/getSlice.js +4 -4
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js +5 -5
- package/lib/data/getDefaultMatrixFilters.d.ts +2 -2
- package/lib/data/matrixGeneration.js +1 -1
- package/lib/data/molecules/MoleculeManager.d.ts +1 -1
- package/lib/data/molecules/MoleculeManager.js +7 -7
- package/lib/data/parseMeta/linkMetaWithSpectra.js +2 -1
- package/lib/data/types/data1d/MatrixOptions.d.ts +2 -2
- package/lib/data/utilities/FindUtilities.js +4 -4
- package/lib/data/utilities/RangeUtilities.d.ts +1 -1
- package/lib/data/utilities/ZoneUtilities.d.ts +1 -1
- package/lib/data/utilities/calculateSanPlot.js +3 -3
- package/lib/data/utilities/generateNumbersPowerOfX.js +1 -1
- package/lib/utils/clipboard/clipboard.d.ts +12 -0
- package/lib/utils/clipboard/clipboard.js +15 -0
- package/lib/utils/clipboard/clipboardComponents.d.ts +45 -0
- package/lib/utils/clipboard/clipboardComponents.js +150 -0
- package/lib/utils/clipboard/clipboardHooks.d.ts +94 -0
- package/lib/utils/clipboard/clipboardHooks.js +142 -0
- package/lib/utils/clipboard/types.d.ts +1 -0
- package/lib/utils/clipboard/types.js +1 -0
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/FooterBanner.js +5 -4
- package/lib-cjs/component/1d/Viewer1D.js +120 -103
- package/lib-cjs/component/1d/database/ResurrectedDatabaseRanges.js +1 -1
- package/lib-cjs/component/1d/jCouplingGraph/JsCouplingLinks.js +1 -1
- package/lib-cjs/component/1d/multiplicityTree/TreeColors.js +1 -6
- package/lib-cjs/component/1d/tool/BaseLineZones.js +6 -3
- package/lib-cjs/component/1d/tool/PeakPointer.js +1 -1
- package/lib-cjs/component/1d/utilities/scale.js +1 -3
- package/lib-cjs/component/1d-2d/tools/BrushXY.js +10 -7
- package/lib-cjs/component/1d-2d/tools/CrossLinePointer.js +1 -1
- package/lib-cjs/component/2d/FooterBanner.js +3 -2
- package/lib-cjs/component/2d/Viewer2D.js +50 -28
- package/lib-cjs/component/2d/XAxis.js +1 -1
- package/lib-cjs/component/2d/YAxis.js +1 -1
- package/lib-cjs/component/2d/zones/Signal.js +1 -2
- package/lib-cjs/component/EventsTrackers/BrushTracker.js +21 -6
- package/lib-cjs/component/NMRium.js +37 -24
- package/lib-cjs/component/assignment/actions/setActiveAssignment.js +1 -1
- package/lib-cjs/component/context/LoggerContext.js +10 -5
- package/lib-cjs/component/elements/InputRange.js +1 -1
- package/lib-cjs/component/elements/dropDownButton/DropDownList.js +3 -1
- package/lib-cjs/component/elements/popup/Alert/AlertBlock.js +36 -0
- package/lib-cjs/component/elements/popup/Alert/Context.js +6 -2
- package/lib-cjs/component/elements/popup/Alert/Provider.js +4 -22
- package/lib-cjs/component/elements/popup/Modal/ConfirmDialog.js +2 -1
- package/lib-cjs/component/elements/popup/Modal/Provider.js +3 -1
- package/lib-cjs/component/header/Header.js +2 -2
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +3 -8
- package/lib-cjs/component/hooks/useCheckToolsVisibility.js +2 -2
- package/lib-cjs/component/hooks/useExport.js +2 -1
- package/lib-cjs/component/hooks/usePanelPreferences.js +1 -1
- package/lib-cjs/component/modal/AboutSpectrumSimulationModal.js +54 -0
- package/lib-cjs/component/modal/AboutUsModal.js +4 -2
- package/lib-cjs/component/modal/AlignSpectraModal.js +11 -1
- package/lib-cjs/component/{header/LogsHistory.js → modal/LogsHistoryModal.js} +8 -6
- package/lib-cjs/component/modal/MultipletAnalysisModal.js +2 -1
- package/lib-cjs/component/modal/PredictSpectraModal.js +24 -27
- package/lib-cjs/component/modal/changeSum/ChangeSumModal.js +1 -1
- package/lib-cjs/component/modal/editRange/forms/components/SignalsForm.js +1 -1
- package/lib-cjs/component/modal/editZone/SignalsForm.js +1 -1
- package/lib-cjs/component/modal/metaImportation/MetaImportationModal.js +1 -1
- package/lib-cjs/component/modal/setting/GeneralSettings.js +28 -27
- package/lib-cjs/component/modal/setting/settings-tabs/DisplayTabContent.js +4 -0
- package/lib-cjs/component/modal/setting/settings-tabs/FormattingTabContent.js +1 -1
- package/lib-cjs/component/modal/setting/settingsValidation.js +2 -2
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +4 -7
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +18 -18
- package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +3 -5
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +9 -13
- package/lib-cjs/component/panels/Panels.js +13 -0
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +9 -15
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +7 -10
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +8 -11
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +3 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/utilities/Utilities.js +1 -1
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +1 -1
- package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +1 -1
- package/lib-cjs/component/panels/extra/utilities/MultiplicityUtilities.js +2 -2
- package/lib-cjs/component/panels/extra/utilities/UseToggleStatus.js +1 -1
- package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +2 -2
- package/lib-cjs/component/panels/predictionPanel/PredictionOptionsPanel.js +2 -1
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +3 -2
- package/lib-cjs/component/panels/predictionPanel/PredictionSimpleOptions.js +1 -1
- package/lib-cjs/component/panels/spectrumSimulation/SpectrumSimulation.js +94 -0
- package/lib-cjs/component/panels/spectrumSimulation/SpectrumSimulationPreferences.js +42 -0
- package/lib-cjs/component/panels/spectrumSimulation/SpectrumSimulationSimpleOptions.js +31 -0
- package/lib-cjs/component/panels/spectrumSimulation/SpinSystemTable.js +67 -0
- package/lib-cjs/component/reducer/Reducer.js +251 -239
- package/lib-cjs/component/reducer/actions/AssignmentsActions.js +1 -1
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +2 -1
- package/lib-cjs/component/reducer/actions/DomainActions.js +31 -1
- package/lib-cjs/component/reducer/actions/FiltersActions.js +4 -4
- package/lib-cjs/component/reducer/actions/LoadActions.js +1 -1
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +54 -2
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +43 -3
- package/lib-cjs/component/reducer/actions/ToolsActions.js +2 -2
- package/lib-cjs/component/reducer/actions/ZonesActions.js +1 -1
- package/lib-cjs/component/reducer/preferences/actions/setActiveWorkspace.js +1 -1
- package/lib-cjs/component/reducer/preferences/actions/setPreferences.js +3 -4
- package/lib-cjs/component/reducer/preferences/preferencesReducer.js +5 -1
- package/lib-cjs/component/reducer/preferences/utilities/flatObject.js +1 -1
- package/lib-cjs/component/utility/export.js +33 -63
- package/lib-cjs/component/utility/getSpectraObjectPaths.js +1 -1
- package/lib-cjs/component/utility/getUniqueNuclei.js +1 -1
- package/lib-cjs/component/utility/jpathToArray.js +1 -1
- package/lib-cjs/component/workspaces/index.js +2 -0
- package/lib-cjs/component/workspaces/simulation.js +71 -0
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +1 -0
- package/lib-cjs/data/PredictionManager.js +96 -22
- package/lib-cjs/data/SpectraManager.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/generateJGraphData.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/getReferenceShift.js +5 -4
- package/lib-cjs/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +12 -13
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +10 -9
- package/lib-cjs/data/data1d/database.js +3 -3
- package/lib-cjs/data/data1d/multipleSpectraAnalysis.js +1 -1
- package/lib-cjs/data/data1d/spectrumSimulation.js +58 -0
- package/lib-cjs/data/data2d/Spectrum2D/contours.js +7 -1
- package/lib-cjs/data/data2d/Spectrum2D/getMissingProjection.js +6 -6
- package/lib-cjs/data/data2d/Spectrum2D/getShift.js +1 -1
- package/lib-cjs/data/data2d/Spectrum2D/getSlice.js +4 -4
- package/lib-cjs/data/data2d/Spectrum2D/zones/getDetectionZones.js +5 -5
- package/lib-cjs/data/matrixGeneration.js +1 -1
- package/lib-cjs/data/molecules/MoleculeManager.js +7 -7
- package/lib-cjs/data/parseMeta/linkMetaWithSpectra.js +2 -1
- package/lib-cjs/data/utilities/FindUtilities.js +4 -4
- package/lib-cjs/data/utilities/calculateSanPlot.js +3 -3
- package/lib-cjs/data/utilities/generateNumbersPowerOfX.js +1 -1
- package/lib-cjs/utils/clipboard/clipboard.js +23 -0
- package/lib-cjs/utils/clipboard/clipboardComponents.js +158 -0
- package/lib-cjs/utils/clipboard/clipboardHooks.js +147 -0
- package/lib-cjs/utils/clipboard/types.js +2 -0
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +26 -25
- package/lib/component/header/LogsHistory.d.ts +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const PredictionManager_1 = require("../../../data/PredictionManager");
|
|
8
|
+
const spectrumSimulation_1 = require("../../../data/data1d/spectrumSimulation");
|
|
9
|
+
const Label_1 = __importDefault(require("../../elements/Label"));
|
|
10
|
+
const Select_1 = __importDefault(require("../../elements/Select"));
|
|
11
|
+
const FormikNumberInput_1 = __importDefault(require("../../elements/formik/FormikNumberInput"));
|
|
12
|
+
const FormikSelect_1 = __importDefault(require("../../elements/formik/FormikSelect"));
|
|
13
|
+
const SPIN_SYSTEMS = (0, spectrumSimulation_1.getSpinSystems)().map((key) => ({
|
|
14
|
+
label: key,
|
|
15
|
+
value: key,
|
|
16
|
+
}));
|
|
17
|
+
const labelStyle = {
|
|
18
|
+
label: { fontSize: '10px' },
|
|
19
|
+
wrapper: { display: 'flex', alignItems: 'center', height: '100%' },
|
|
20
|
+
container: { padding: '0 5px', height: '100%' },
|
|
21
|
+
};
|
|
22
|
+
const selectStyles = { width: '100%', minWidth: '75px', fontSize: '10px' };
|
|
23
|
+
function SpectrumSimulationSimpleOptions({ onSpinSystemChange, spinSystem, }) {
|
|
24
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
25
|
+
display: 'flex',
|
|
26
|
+
justifyContent: 'flex-end',
|
|
27
|
+
flex: '1',
|
|
28
|
+
padding: '0 10px',
|
|
29
|
+
}, children: [(0, jsx_runtime_1.jsx)(Label_1.default, { title: "Spin system", style: labelStyle, children: (0, jsx_runtime_1.jsx)(Select_1.default, { items: SPIN_SYSTEMS, style: selectStyles, onChange: onSpinSystemChange, value: spinSystem }) }), (0, jsx_runtime_1.jsx)(Label_1.default, { title: "Frequency", style: labelStyle, children: (0, jsx_runtime_1.jsx)(FormikSelect_1.default, { items: PredictionManager_1.FREQUENCIES, style: selectStyles, name: "options.frequency" }) }), (0, jsx_runtime_1.jsxs)(Label_1.default, { title: "Line Width", style: labelStyle, children: [(0, jsx_runtime_1.jsx)(FormikNumberInput_1.default, { name: "options.lineWidth", type: "number", style: { margin: 0, width: '40px' } }), (0, jsx_runtime_1.jsx)("span", { style: { padding: '0 5px' }, children: "Hz" })] })] }));
|
|
30
|
+
}
|
|
31
|
+
exports.default = SpectrumSimulationSimpleOptions;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.SpinSystemTable = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const formik_1 = require("formik");
|
|
9
|
+
const react_1 = require("react");
|
|
10
|
+
const ReactTable_1 = __importDefault(require("../../elements/ReactTable/ReactTable"));
|
|
11
|
+
const addCustomColumn_1 = __importDefault(require("../../elements/ReactTable/utility/addCustomColumn"));
|
|
12
|
+
const FormikInput_1 = __importDefault(require("../../elements/formik/FormikInput"));
|
|
13
|
+
const cellStyle = {
|
|
14
|
+
padding: '1px',
|
|
15
|
+
border: 'none',
|
|
16
|
+
borderWidth: 0,
|
|
17
|
+
};
|
|
18
|
+
const inputStyle = {
|
|
19
|
+
input: {
|
|
20
|
+
padding: '5px',
|
|
21
|
+
},
|
|
22
|
+
inputWrapper: {
|
|
23
|
+
borderRadius: 0,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
function SpinSystemTable(props) {
|
|
27
|
+
const { spinSystem } = props;
|
|
28
|
+
const { values: { data }, } = (0, formik_1.useFormikContext)();
|
|
29
|
+
const tableColumns = (0, react_1.useMemo)(() => {
|
|
30
|
+
const columns = [
|
|
31
|
+
{
|
|
32
|
+
id: 'rowLabel',
|
|
33
|
+
Header: '',
|
|
34
|
+
accessor: (_, index) => spinSystem.at(index),
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
Header: 'Delta',
|
|
38
|
+
style: cellStyle,
|
|
39
|
+
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: `data.${row.index}.0`, style: inputStyle, value: row.original[0] || 0, type: "number" })),
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
let i = 0;
|
|
43
|
+
for (const label of spinSystem.slice(0, -1)) {
|
|
44
|
+
const columnIndex = i + 1;
|
|
45
|
+
(0, addCustomColumn_1.default)(columns, {
|
|
46
|
+
id: label,
|
|
47
|
+
index: i,
|
|
48
|
+
style: cellStyle,
|
|
49
|
+
Cell: function cellRender({ row }) {
|
|
50
|
+
const val = row.original?.[columnIndex] ?? null;
|
|
51
|
+
if (val !== null) {
|
|
52
|
+
return ((0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: `data.${row.index}.${columnIndex}`, style: inputStyle, type: "number" }));
|
|
53
|
+
}
|
|
54
|
+
return (0, jsx_runtime_1.jsx)("div", {});
|
|
55
|
+
},
|
|
56
|
+
Header: () => ((0, jsx_runtime_1.jsxs)("span", { children: ["J", (0, jsx_runtime_1.jsxs)("sub", { children: [label, "-"] }), "(Hz)"] })),
|
|
57
|
+
});
|
|
58
|
+
i++;
|
|
59
|
+
}
|
|
60
|
+
return columns;
|
|
61
|
+
}, [spinSystem]);
|
|
62
|
+
if (!spinSystem) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
return (0, jsx_runtime_1.jsx)(ReactTable_1.default, { columns: tableColumns, data: data });
|
|
66
|
+
}
|
|
67
|
+
exports.SpinSystemTable = SpinSystemTable;
|
|
@@ -73,6 +73,7 @@ function getDefaultViewState() {
|
|
|
73
73
|
},
|
|
74
74
|
verticalAlign: {},
|
|
75
75
|
predictions: {},
|
|
76
|
+
currentSimulatedSpectrumKey: null,
|
|
76
77
|
};
|
|
77
78
|
}
|
|
78
79
|
exports.getDefaultViewState = getDefaultViewState;
|
|
@@ -155,245 +156,256 @@ function innerSpectrumReducer(draft, action) {
|
|
|
155
156
|
if (!['LOAD_DROP_FILES', 'INITIATE'].includes(action.type)) {
|
|
156
157
|
draft.actionType = action.type;
|
|
157
158
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
159
|
+
try {
|
|
160
|
+
switch (action.type) {
|
|
161
|
+
case 'INITIATE':
|
|
162
|
+
return LoadActions.handleInitiate(draft, action);
|
|
163
|
+
case 'LOAD_DROP_FILES':
|
|
164
|
+
return LoadActions.handleLoadDropFiles(draft, action);
|
|
165
|
+
case 'SET_LOADING_FLAG':
|
|
166
|
+
return LoadActions.handleSetIsLoading(draft, action);
|
|
167
|
+
case 'ADD_PEAK':
|
|
168
|
+
return PeaksActions.handleAddPeak(draft, action);
|
|
169
|
+
case 'ADD_PEAKS':
|
|
170
|
+
return PeaksActions.handleAddPeaks(draft, action);
|
|
171
|
+
case 'DELETE_PEAK':
|
|
172
|
+
return PeaksActions.handleDeletePeak(draft, action);
|
|
173
|
+
case 'AUTO_PEAK_PICKING':
|
|
174
|
+
return PeaksActions.handleAutoPeakPicking(draft, action);
|
|
175
|
+
case 'OPTIMIZE_PEAKS':
|
|
176
|
+
return PeaksActions.handleOptimizePeaks(draft, action);
|
|
177
|
+
case 'CHANGE_PEAK_SHAPE':
|
|
178
|
+
return PeaksActions.handleChangePeakShape(draft, action);
|
|
179
|
+
case 'TOGGLE_PEAKS_VIEW_PROPERTY':
|
|
180
|
+
return PeaksActions.handleTogglePeaksViewProperty(draft, action);
|
|
181
|
+
case 'ADD_INTEGRAL':
|
|
182
|
+
return IntegralsActions.handleAddIntegral(draft, action);
|
|
183
|
+
case 'DELETE_INTEGRAL':
|
|
184
|
+
return IntegralsActions.handleDeleteIntegral(draft, action);
|
|
185
|
+
case 'RESIZE_INTEGRAL':
|
|
186
|
+
case 'CHANGE_INTEGRAL':
|
|
187
|
+
return IntegralsActions.handleChangeIntegral(draft, action);
|
|
188
|
+
case 'CHANGE_INTEGRAL_SUM':
|
|
189
|
+
return IntegralsActions.handleChangeIntegralSum(draft, action);
|
|
190
|
+
case 'CHANGE_INTEGRALS_SUM_FLAG':
|
|
191
|
+
return IntegralsActions.handleChangeIntegralsSumFlag(draft);
|
|
192
|
+
case 'CHANGE_INTEGRAL_RELATIVE':
|
|
193
|
+
return IntegralsActions.handleChangeIntegralsRelativeValue(draft, action);
|
|
194
|
+
case 'SET_X_DOMAIN':
|
|
195
|
+
return DomainActions.handleSetXDomain(draft, action);
|
|
196
|
+
case 'SET_Y_DOMAIN':
|
|
197
|
+
return DomainActions.handleSetYDomain(draft, action);
|
|
198
|
+
case 'MOVE':
|
|
199
|
+
return DomainActions.handleMoveOverXAxis(draft, action);
|
|
200
|
+
case 'SET_DIMENSIONS':
|
|
201
|
+
return DimensionsActions.handleSetDimensions(draft, action);
|
|
202
|
+
case 'SHIFT_SPECTRUM':
|
|
203
|
+
return FiltersActions.handleShiftSpectrumAlongXAxis(draft, action);
|
|
204
|
+
case 'APPLY_APODIZATION_FILTER':
|
|
205
|
+
return FiltersActions.handleApplyApodizationFilter(draft, action);
|
|
206
|
+
case 'CALCULATE_APODIZATION_FILTER':
|
|
207
|
+
return FiltersActions.handleCalculateApodizationFilter(draft, action);
|
|
208
|
+
case 'APPLY_ZERO_FILLING_FILTER':
|
|
209
|
+
return FiltersActions.handleApplyZeroFillingFilter(draft, action);
|
|
210
|
+
case 'CALCULATE_ZERO_FILLING_FILTER':
|
|
211
|
+
return FiltersActions.handleCalculateZeroFillingFilter(draft, action);
|
|
212
|
+
case 'APPLY_FFT_FILTER':
|
|
213
|
+
return FiltersActions.handleApplyFFTFilter(draft);
|
|
214
|
+
case 'APPLY_MANUAL_PHASE_CORRECTION_FILTER':
|
|
215
|
+
return FiltersActions.handleApplyManualPhaseCorrectionFilter(draft, action);
|
|
216
|
+
case 'CALCULATE_MANUAL_PHASE_CORRECTION_FILTER':
|
|
217
|
+
return FiltersActions.handleCalculateManualPhaseCorrection(draft, action);
|
|
218
|
+
case 'APPLY_AUTO_PHASE_CORRECTION_FILTER':
|
|
219
|
+
return FiltersActions.handleApplyAutoPhaseCorrectionFilter(draft);
|
|
220
|
+
case 'APPLY_ABSOLUTE_FILTER':
|
|
221
|
+
return FiltersActions.handleApplyAbsoluteFilter(draft);
|
|
222
|
+
case 'APPLY_BASE_LINE_CORRECTION_FILTER':
|
|
223
|
+
return FiltersActions.handleBaseLineCorrectionFilter(draft, action);
|
|
224
|
+
case 'CALCULATE_BASE_LINE_CORRECTION_FILTER':
|
|
225
|
+
return FiltersActions.handleCalculateBaseLineCorrection(draft, action);
|
|
226
|
+
case 'ENABLE_FILTER':
|
|
227
|
+
return FiltersActions.handleEnableFilter(draft, action);
|
|
228
|
+
case 'DELETE_FILTER':
|
|
229
|
+
return FiltersActions.handleDeleteFilter(draft, action);
|
|
230
|
+
case 'DELETE_SPECTRA_FILTER':
|
|
231
|
+
return FiltersActions.handleDeleteSpectraFilter(draft, action);
|
|
232
|
+
case 'SET_FILTER_SNAPSHOT':
|
|
233
|
+
return FiltersActions.handleSetFilterSnapshotHandler(draft, action);
|
|
234
|
+
case 'APPLY_SIGNAL_PROCESSING_FILTER':
|
|
235
|
+
return FiltersActions.handleSignalProcessingFilter(draft, action);
|
|
236
|
+
case 'ADD_EXCLUSION_ZONE':
|
|
237
|
+
return FiltersActions.handleAddExclusionZone(draft, action);
|
|
238
|
+
case 'DELETE_EXCLUSION_ZONE':
|
|
239
|
+
return FiltersActions.handleDeleteExclusionZone(draft, action);
|
|
240
|
+
case 'CHANGE_SPECTRUM_VISIBILITY':
|
|
241
|
+
return SpectrumsActions.handleChangeSpectrumVisibilityById(draft, action);
|
|
242
|
+
case 'CHANGE_SPECTRA_VISIBILITY_BY_NUCLEUS':
|
|
243
|
+
return SpectrumsActions.handleChangeSpectraVisibilityByNucleus(draft, action);
|
|
244
|
+
case 'CHANGE_ACTIVE_SPECTRUM':
|
|
245
|
+
return SpectrumsActions.handleChangeActiveSpectrum(draft, action);
|
|
246
|
+
case 'CHANGE_SPECTRUM_SETTING':
|
|
247
|
+
return SpectrumsActions.handleChangeSpectrumSetting(draft, action);
|
|
248
|
+
case 'ALIGN_SPECTRA':
|
|
249
|
+
return SpectrumsActions.handleAlignSpectraHandler(draft, action);
|
|
250
|
+
case 'DELETE_SPECTRA':
|
|
251
|
+
return SpectrumsActions.handleDeleteSpectra(draft, action);
|
|
252
|
+
case 'ADD_MISSING_PROJECTION':
|
|
253
|
+
return SpectrumsActions.handleAddMissingProjectionHandler(draft, action);
|
|
254
|
+
case 'GENERATE_SPECTRUM_FROM_PUBLICATION_STRING':
|
|
255
|
+
return SpectrumsActions.handleGenerateSpectrumFromPublicationStringHandler(draft, action);
|
|
256
|
+
case 'IMPORT_SPECTRA_META_INFO':
|
|
257
|
+
return SpectrumsActions.handleImportSpectraMetaInfo(draft, action);
|
|
258
|
+
case 'TOGGLE_SPECTRA_LEGEND':
|
|
259
|
+
return SpectrumsActions.handleToggleSpectraLegend(draft);
|
|
260
|
+
case 'RECOLOR_SPECTRA_COLOR':
|
|
261
|
+
return SpectrumsActions.handleRecolorSpectraBasedOnDistinctValue(draft, action);
|
|
262
|
+
case 'ORDER_SPECTRA':
|
|
263
|
+
return SpectrumsActions.handleOrderSpectra(draft, action);
|
|
264
|
+
case 'SIMULATE_SPECTRUM':
|
|
265
|
+
return SpectrumsActions.handleSimulateSpectrum(draft, action);
|
|
266
|
+
case 'SET_SELECTED_TOOL':
|
|
267
|
+
return ToolsActions.setSelectedTool(draft, action);
|
|
268
|
+
case 'RESET_SELECTED_TOOL':
|
|
269
|
+
return ToolsActions.handleResetSelectedTool(draft);
|
|
270
|
+
case 'FULL_ZOOM_OUT':
|
|
271
|
+
return ToolsActions.zoomOut(draft, action);
|
|
272
|
+
case 'TOGGLE_REAL_IMAGINARY_VISIBILITY':
|
|
273
|
+
return ToolsActions.handleToggleRealImaginaryVisibility(draft);
|
|
274
|
+
case 'SET_ZOOM':
|
|
275
|
+
return ToolsActions.handleZoom(draft, action);
|
|
276
|
+
case 'SET_SPECTRA_SAME_TOP':
|
|
277
|
+
return ToolsActions.setSpectraSameTopHandler(draft);
|
|
278
|
+
case 'RESET_SPECTRA_SCALE':
|
|
279
|
+
return ToolsActions.resetSpectraScale(draft);
|
|
280
|
+
case 'CHANGE_SPECTRUM_DISPLAY_VIEW_MODE':
|
|
281
|
+
return ToolsActions.handleChangeSpectrumDisplayMode(draft);
|
|
282
|
+
case 'BRUSH_END':
|
|
283
|
+
return ToolsActions.handleBrushEnd(draft, action);
|
|
284
|
+
case 'SET_VERTICAL_INDICATOR_X_POSITION':
|
|
285
|
+
return ToolsActions.setVerticalIndicatorXPosition(draft, action);
|
|
286
|
+
case 'SET_SPECTRUMS_VERTICAL_ALIGN':
|
|
287
|
+
return ToolsActions.setSpectrumsVerticalAlign(draft);
|
|
288
|
+
case 'SET_ACTIVE_TAB':
|
|
289
|
+
return ToolsActions.handelSetActiveTab(draft, action);
|
|
290
|
+
case 'ADD_BASE_LINE_ZONE':
|
|
291
|
+
return ToolsActions.handleAddBaseLineZone(draft, action);
|
|
292
|
+
case 'DELETE_BASE_LINE_ZONE':
|
|
293
|
+
return ToolsActions.handleDeleteBaseLineZone(draft, action);
|
|
294
|
+
case 'SET_2D_LEVEL':
|
|
295
|
+
return ToolsActions.levelChangeHandler(draft, action);
|
|
296
|
+
case 'ADD_MOLECULE':
|
|
297
|
+
return MoleculeActions.handleAddMolecule(draft, action);
|
|
298
|
+
case 'SET_MOLECULE':
|
|
299
|
+
return MoleculeActions.handleSetMolecule(draft, action);
|
|
300
|
+
case 'CHANGE_MOLECULE_LABEL':
|
|
301
|
+
return MoleculeActions.handleChangeMoleculeLabel(draft, action);
|
|
302
|
+
case 'DELETE_MOLECULE':
|
|
303
|
+
return MoleculeActions.handleDeleteMolecule(draft, action);
|
|
304
|
+
case 'PREDICT_SPECTRA':
|
|
305
|
+
return MoleculeActions.handlePredictSpectraFromMolecule(draft, action);
|
|
306
|
+
case 'FLOAT_MOLECULE_OVER_SPECTRUM':
|
|
307
|
+
return MoleculeActions.handleFloatMoleculeOverSpectrum(draft, action);
|
|
308
|
+
case 'TOGGLE_MOLECULE_ATOM_NUMBER':
|
|
309
|
+
return MoleculeActions.handleToggleMoleculeAtomsNumbers(draft, action);
|
|
310
|
+
case 'CHANGE_FLOAT_MOLECULE_POSITION':
|
|
311
|
+
return MoleculeActions.handleChangeFloatMoleculePosition(draft, action);
|
|
312
|
+
case 'SET_CORRELATIONS_MF':
|
|
313
|
+
return CorrelationsActions.handleSetMF(draft, action);
|
|
314
|
+
case 'SET_CORRELATIONS_TOLERANCE':
|
|
315
|
+
return CorrelationsActions.handleSetTolerance(draft, action);
|
|
316
|
+
case 'SET_CORRELATION':
|
|
317
|
+
return CorrelationsActions.handleSetCorrelation(draft, action);
|
|
318
|
+
case 'SET_CORRELATIONS':
|
|
319
|
+
return CorrelationsActions.handleSetCorrelations(draft, action);
|
|
320
|
+
case 'DELETE_CORRELATION':
|
|
321
|
+
return CorrelationsActions.handleDeleteCorrelation(draft, action);
|
|
322
|
+
case 'AUTO_RANGES_DETECTION':
|
|
323
|
+
return RangesActions.handleAutoRangesDetection(draft, action);
|
|
324
|
+
case 'ADD_RANGE':
|
|
325
|
+
return RangesActions.handleAddRange(draft, action);
|
|
326
|
+
case 'DELETE_RANGE':
|
|
327
|
+
return RangesActions.handleDeleteRange(draft, action);
|
|
328
|
+
case 'DELETE_1D_SIGNAL':
|
|
329
|
+
return RangesActions.handleDeleteSignal(draft, action);
|
|
330
|
+
case 'RESIZE_RANGE':
|
|
331
|
+
return RangesActions.handleResizeRange(draft, action);
|
|
332
|
+
case 'CHANGE_RANGE_SUM':
|
|
333
|
+
return RangesActions.handleChangeRangeSum(draft, action);
|
|
334
|
+
case 'CHANGE_RANGES_SUM_FLAG':
|
|
335
|
+
return RangesActions.handleChangeRangesSumFlag(draft);
|
|
336
|
+
case 'CHANGE_RANGE_RELATIVE':
|
|
337
|
+
return RangesActions.handleChangeRangeRelativeValue(draft, action);
|
|
338
|
+
case 'CHANGE_RANGE_SIGNAL_VALUE':
|
|
339
|
+
return RangesActions.handleChangeRangeSignalValue(draft, action);
|
|
340
|
+
case 'CHANGE_RANGE_SIGNAL_KIND':
|
|
341
|
+
return RangesActions.handleChangeRangeSignalKind(draft, action);
|
|
342
|
+
case 'SAVE_EDITED_RANGE':
|
|
343
|
+
return RangesActions.handleSaveEditedRange(draft, action);
|
|
344
|
+
case 'UNLINK_RANGE':
|
|
345
|
+
return RangesActions.handleUnlinkRange(draft, action);
|
|
346
|
+
case 'SET_DIAID_RANGE':
|
|
347
|
+
return RangesActions.handleSetDiaIDRange(draft, action);
|
|
348
|
+
case 'UPDATE_RANGE':
|
|
349
|
+
return RangesActions.handleUpdateRange(draft, action);
|
|
350
|
+
case 'SHOW_MULTIPLICITY_TREES':
|
|
351
|
+
return RangesActions.handleShowMultiplicityTrees(draft, action);
|
|
352
|
+
case 'SHOW_RANGES_INTEGRALS':
|
|
353
|
+
return RangesActions.handleShowRangesIntegrals(draft, action);
|
|
354
|
+
case 'AUTO_RANGES_SPECTRA_PICKING':
|
|
355
|
+
return RangesActions.handleAutoSpectraRangesDetection(draft);
|
|
356
|
+
case 'SHOW_J_GRAPH':
|
|
357
|
+
return RangesActions.handleShowJGraph(draft, action);
|
|
358
|
+
case 'SET_KEY_PREFERENCES':
|
|
359
|
+
return PreferencesActions.handleSetKeyPreferences(draft, action);
|
|
360
|
+
case 'APPLY_KEY_PREFERENCES':
|
|
361
|
+
return PreferencesActions.handleApplyKeyPreferences(draft, action);
|
|
362
|
+
case 'AUTO_ZONES_DETECTION':
|
|
363
|
+
return ZonesActions.handleAutoZonesDetection(draft, action);
|
|
364
|
+
case 'CHANGE_ZONES_NOISE_FACTOR':
|
|
365
|
+
return ZonesActions.handleChangeZonesFactor(draft, action);
|
|
366
|
+
case 'ADD_2D_ZONE':
|
|
367
|
+
return ZonesActions.handleAdd2dZone(draft, action);
|
|
368
|
+
case 'DELETE_2D_ZONE':
|
|
369
|
+
return ZonesActions.handleDeleteZone(draft, action);
|
|
370
|
+
case 'DELETE_2D_SIGNAL':
|
|
371
|
+
return ZonesActions.handleDeleteSignal(draft, action);
|
|
372
|
+
case 'SET_2D_SIGNAL_PATH_LENGTH':
|
|
373
|
+
return ZonesActions.handleSetSignalPathLength(draft, action);
|
|
374
|
+
case 'CHANGE_ZONE_SIGNAL_VALUE':
|
|
375
|
+
return ZonesActions.handleChangeZoneSignalDelta(draft, action);
|
|
376
|
+
case 'CHANGE_ZONE_SIGNAL_KIND':
|
|
377
|
+
return ZonesActions.handleChangeZoneSignalKind(draft, action);
|
|
378
|
+
case 'UNLINK_ZONE':
|
|
379
|
+
return ZonesActions.handleUnlinkZone(draft, action);
|
|
380
|
+
case 'SET_ZONE_DIAID':
|
|
381
|
+
return ZonesActions.handleSetDiaIDZone(draft, action);
|
|
382
|
+
case 'AUTO_ZONES_SPECTRA_PICKING':
|
|
383
|
+
return ZonesActions.handleAutoSpectraZonesDetection(draft);
|
|
384
|
+
case 'SHOW_ZONES':
|
|
385
|
+
return ZonesActions.handleShowZones(draft, action);
|
|
386
|
+
case 'SHOW_ZONES_SIGNALS':
|
|
387
|
+
return ZonesActions.handleShowSignals(draft, action);
|
|
388
|
+
case 'SHOW_ZONES_PEAKS':
|
|
389
|
+
return ZonesActions.handleShowPeaks(draft, action);
|
|
390
|
+
case 'SAVE_EDITED_ZONE':
|
|
391
|
+
return ZonesActions.handleSaveEditedZone(draft, action);
|
|
392
|
+
case 'ORDER_MULTIPLE_SPECTRA_ANALYSIS':
|
|
393
|
+
return SpectraAnalysisActions.handleOrderSpectra(draft, action);
|
|
394
|
+
case 'RESURRECTING_SPECTRUM_FROM_RANGES':
|
|
395
|
+
return DatabaseActions.handleResurrectSpectrumFromRanges(draft, action);
|
|
396
|
+
case 'RESURRECTING_SPECTRUM_FROM_JCAMP':
|
|
397
|
+
return DatabaseActions.handleResurrectSpectrumFromJcamp(draft, action);
|
|
398
|
+
case 'SET_AUTOMATIC_ASSIGNMENTS':
|
|
399
|
+
return AssignmentsActions.handleSetAutomaticAssignments(draft, action);
|
|
400
|
+
case 'SET_MOUSE_OVER_DISPLAYER':
|
|
401
|
+
return GlobalActions.handleSetIsOverDisplayer(draft, action);
|
|
402
|
+
default:
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
catch (error) {
|
|
406
|
+
draft.errorAction = error;
|
|
407
|
+
error.data = { action };
|
|
408
|
+
reportError(error);
|
|
397
409
|
}
|
|
398
410
|
}
|
|
399
411
|
exports.spectrumReducer = (0, immer_1.produce)(innerSpectrumReducer);
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.handleSetAutomaticAssignments = void 0;
|
|
4
4
|
function handleSetAutomaticAssignments(draft, action) {
|
|
5
5
|
const assignments = action.payload.assignments;
|
|
6
|
-
for (
|
|
6
|
+
for (const datum of assignments) {
|
|
7
7
|
const index = draft.data.findIndex((spectrum) => spectrum.id === datum.id);
|
|
8
8
|
if (index !== -1) {
|
|
9
9
|
const dimension = draft.data[index].info.dimension;
|