nmrium 1.6.1 → 1.8.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/FloatingRanges.js +4 -4
- package/lib/component/1d/FloatingRanges.js.map +1 -1
- package/lib/component/1d/database/DatabaseSpectrum.js +1 -1
- package/lib/component/1d/database/DatabaseSpectrum.js.map +1 -1
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js.map +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts.map +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +4 -2
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotations.d.ts.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotations.js +2 -2
- package/lib/component/1d/peaks/PeakAnnotations.js.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.d.ts.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js +4 -4
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js.map +1 -1
- package/lib/component/1d/peaks/Peaks.d.ts +4 -1
- package/lib/component/1d/peaks/Peaks.d.ts.map +1 -1
- package/lib/component/1d/peaks/Peaks.js +5 -2
- package/lib/component/1d/peaks/Peaks.js.map +1 -1
- package/lib/component/1d/ranges/Atoms.d.ts.map +1 -1
- package/lib/component/1d/ranges/Atoms.js +24 -9
- package/lib/component/1d/ranges/Atoms.js.map +1 -1
- package/lib/component/1d/ranges/Range.d.ts.map +1 -1
- package/lib/component/1d/ranges/Range.js +3 -3
- package/lib/component/1d/ranges/Range.js.map +1 -1
- package/lib/component/1d/ranges/RangesIntegrals.d.ts.map +1 -1
- package/lib/component/1d/ranges/RangesIntegrals.js +5 -3
- package/lib/component/1d/ranges/RangesIntegrals.js.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts +2 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +32 -41
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/FloatMolecules.d.ts.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/FloatMolecules.js.map +1 -1
- package/lib/component/2d/FooterBanner.js +2 -2
- package/lib/component/2d/FooterBanner.js.map +1 -1
- package/lib/component/2d/YAxis.d.ts +0 -1
- package/lib/component/2d/YAxis.d.ts.map +1 -1
- package/lib/component/2d/YAxis.js +11 -4
- package/lib/component/2d/YAxis.js.map +1 -1
- package/lib/component/2d/useTracesSpectra.d.ts.map +1 -1
- package/lib/component/2d/useTracesSpectra.js +2 -0
- package/lib/component/2d/useTracesSpectra.js.map +1 -1
- package/lib/component/2d/utilities/extractSpectrumSignals.d.ts +2 -9
- package/lib/component/2d/utilities/extractSpectrumSignals.d.ts.map +1 -1
- package/lib/component/2d/utilities/extractSpectrumSignals.js +4 -5
- package/lib/component/2d/utilities/extractSpectrumSignals.js.map +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.d.ts.map +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.js +7 -10
- package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.d.ts.map +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js.map +1 -1
- package/lib/component/context/DispatchContext.d.ts +2 -2
- package/lib/component/context/DispatchContext.d.ts.map +1 -1
- package/lib/component/context/LoggerContext.d.ts.map +1 -1
- package/lib/component/context/LoggerContext.js +8 -9
- package/lib/component/context/LoggerContext.js.map +1 -1
- package/lib/component/context/PreferencesContext.d.ts +7 -3
- package/lib/component/context/PreferencesContext.d.ts.map +1 -1
- package/lib/component/context/PreferencesContext.js +1 -2
- package/lib/component/context/PreferencesContext.js.map +1 -1
- package/lib/component/elements/D3Axis.d.ts.map +1 -1
- package/lib/component/elements/D3Axis.js +1 -1
- package/lib/component/elements/D3Axis.js.map +1 -1
- package/lib/component/elements/Sections.js +1 -1
- package/lib/component/elements/Sections.js.map +1 -1
- package/lib/component/hooks/useActiveSpectrumRangesViewState.d.ts.map +1 -1
- package/lib/component/hooks/useActiveSpectrumRangesViewState.js +2 -2
- package/lib/component/hooks/useActiveSpectrumRangesViewState.js.map +1 -1
- package/lib/component/hooks/useExport.d.ts.map +1 -1
- package/lib/component/hooks/useExport.js +24 -6
- package/lib/component/hooks/useExport.js.map +1 -1
- package/lib/component/loader/Spinner.js +1 -1
- package/lib/component/loader/Spinner.js.map +1 -1
- package/lib/component/loader/useLoadFiles.d.ts.map +1 -1
- package/lib/component/loader/useLoadFiles.js +60 -25
- package/lib/component/loader/useLoadFiles.js.map +1 -1
- package/lib/component/main/InnerNMRium.d.ts.map +1 -1
- package/lib/component/main/InnerNMRium.js +4 -2
- package/lib/component/main/InnerNMRium.js.map +1 -1
- package/lib/component/main/NMRiumStateProvider.d.ts.map +1 -1
- package/lib/component/main/NMRiumStateProvider.js +17 -6
- package/lib/component/main/NMRiumStateProvider.js.map +1 -1
- package/lib/component/modal/LoadJCAMPModal.d.ts.map +1 -1
- package/lib/component/modal/LoadJCAMPModal.js +7 -3
- package/lib/component/modal/LoadJCAMPModal.js.map +1 -1
- package/lib/component/modal/MoleculeStructureEditorModal.d.ts.map +1 -1
- package/lib/component/modal/MoleculeStructureEditorModal.js +7 -3
- package/lib/component/modal/MoleculeStructureEditorModal.js.map +1 -1
- package/lib/component/modal/MultipletAnalysisModal.js +0 -2
- package/lib/component/modal/MultipletAnalysisModal.js.map +1 -1
- package/lib/component/modal/SaveAsModal.d.ts.map +1 -1
- package/lib/component/modal/SaveAsModal.js +10 -3
- package/lib/component/modal/SaveAsModal.js.map +1 -1
- package/lib/component/modal/changeSum/ChangeSumModalContents.d.ts.map +1 -1
- package/lib/component/modal/changeSum/ChangeSumModalContents.js +0 -2
- package/lib/component/modal/changeSum/ChangeSumModalContents.js.map +1 -1
- package/lib/component/modal/changeSum/SelectMolecule.d.ts.map +1 -1
- package/lib/component/modal/changeSum/SelectMolecule.js +0 -2
- package/lib/component/modal/changeSum/SelectMolecule.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.d.ts +2 -2
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.d.ts.map +1 -1
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js +1 -2
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/ToolsTabContent.d.ts.map +1 -1
- package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js +16 -0
- package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js.map +1 -1
- package/lib/component/modal/setting/settingsValidation.js +2 -2
- package/lib/component/modal/setting/settingsValidation.js.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +2 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +4 -3
- package/lib/component/panels/IntegralsPanel/IntegralTable.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeOptionsPanel.d.ts +6 -0
- package/lib/component/panels/MoleculesPanel/MoleculeOptionsPanel.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/MoleculeOptionsPanel.js +87 -0
- package/lib/component/panels/MoleculesPanel/MoleculeOptionsPanel.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/MoleculePanel.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +18 -28
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +32 -25
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.d.ts +13 -0
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.js +66 -0
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/{useAtomAssignment.d.ts → hooks/useAtomAssignment.d.ts} +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/{useAtomAssignment.js → hooks/useAtomAssignment.js} +50 -19
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.d.ts +12 -0
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js +58 -0
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/AtomData.d.ts +5 -0
- package/lib/component/panels/MoleculesPanel/utilities/AtomData.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/AtomData.js +2 -0
- package/lib/component/panels/MoleculesPanel/utilities/AtomData.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/extractFromAtom.d.ts +16 -0
- package/lib/component/panels/MoleculesPanel/utilities/extractFromAtom.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/extractFromAtom.js +47 -0
- package/lib/component/panels/MoleculesPanel/utilities/extractFromAtom.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.d.ts +18 -0
- package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.js +31 -0
- package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/getCurrentDiaIDsToHighlight.d.ts +3 -0
- package/lib/component/panels/MoleculesPanel/utilities/getCurrentDiaIDsToHighlight.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/getCurrentDiaIDsToHighlight.js +12 -0
- package/lib/component/panels/MoleculesPanel/utilities/getCurrentDiaIDsToHighlight.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.d.ts +4 -0
- package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.js +25 -0
- package/lib/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/getUniqueDiaIDs.d.ts +6 -0
- package/lib/component/panels/MoleculesPanel/utilities/getUniqueDiaIDs.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/getUniqueDiaIDs.js +18 -0
- package/lib/component/panels/MoleculesPanel/utilities/getUniqueDiaIDs.js.map +1 -0
- package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +24 -26
- package/lib/component/panels/PeaksPanel/PeaksPanel.js.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.js +3 -2
- package/lib/component/panels/PeaksPanel/PeaksTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +3 -2
- package/lib/component/panels/RangesPanel/RangesHeader.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.js +2 -1
- package/lib/component/panels/RangesPanel/RangesTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.js +3 -2
- package/lib/component/panels/SpectraPanel/SpectraTable.js.map +1 -1
- package/lib/component/panels/SummaryPanel/utilities/Utilities.js +2 -2
- package/lib/component/panels/SummaryPanel/utilities/Utilities.js.map +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js.map +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +0 -4
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js.map +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +8 -8
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesPanel.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +6 -1
- package/lib/component/panels/ZonesPanel/ZonesPanel.js.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesTable.d.ts +8 -9
- package/lib/component/panels/ZonesPanel/ZonesTable.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesTable.js +3 -2
- package/lib/component/panels/ZonesPanel/ZonesTable.js.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js +0 -2
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js.map +1 -1
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts +7 -7
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.js +3 -3
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.js.map +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.d.ts.map +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.js +13 -10
- package/lib/component/panels/databasePanel/DatabasePanel.js.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.js +0 -2
- package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.js.map +1 -1
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts +9 -0
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts.map +1 -0
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.js +27 -0
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.js.map +1 -0
- package/lib/component/panels/multipleAnalysisPanel/preferences/MultipleAnalysisCodeEditor.d.ts.map +1 -1
- package/lib/component/panels/multipleAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +0 -2
- package/lib/component/panels/multipleAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js.map +1 -1
- package/lib/component/reducer/IgnoreActions.d.ts.map +1 -1
- package/lib/component/reducer/IgnoreActions.js +2 -1
- package/lib/component/reducer/IgnoreActions.js.map +1 -1
- package/lib/component/reducer/Reducer.d.ts +13 -1
- package/lib/component/reducer/Reducer.d.ts.map +1 -1
- package/lib/component/reducer/Reducer.js +10 -3
- package/lib/component/reducer/Reducer.js.map +1 -1
- package/lib/component/reducer/actions/DatabaseActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/DatabaseActions.js +2 -1
- package/lib/component/reducer/actions/DatabaseActions.js.map +1 -1
- package/lib/component/reducer/actions/IntegralsActions.js.map +1 -1
- package/lib/component/reducer/actions/{LoadActions.d.ts → LoadAction.d.ts} +16 -5
- package/lib/component/reducer/actions/LoadAction.d.ts.map +1 -0
- package/lib/component/reducer/actions/{LoadActions.js → LoadAction.js} +60 -16
- package/lib/component/reducer/actions/LoadAction.js.map +1 -0
- package/lib/component/reducer/actions/MoleculeActions.d.ts +22 -6
- package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.js +43 -29
- package/lib/component/reducer/actions/MoleculeActions.js.map +1 -1
- package/lib/component/reducer/actions/RangesActions.d.ts +12 -6
- package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/RangesActions.js +37 -16
- package/lib/component/reducer/actions/RangesActions.js.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.d.ts +3 -3
- package/lib/component/reducer/actions/ZonesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.js +9 -4
- package/lib/component/reducer/actions/ZonesActions.js.map +1 -1
- package/lib/component/reducer/preferences/actions/changeDefaultMoleculeSettings.d.ts +4 -0
- package/lib/component/reducer/preferences/actions/changeDefaultMoleculeSettings.d.ts.map +1 -0
- package/lib/component/reducer/preferences/actions/changeDefaultMoleculeSettings.js +7 -0
- package/lib/component/reducer/preferences/actions/changeDefaultMoleculeSettings.js.map +1 -0
- package/lib/component/reducer/preferences/actions/initPreferences.d.ts.map +1 -1
- package/lib/component/reducer/preferences/actions/initPreferences.js +1 -2
- package/lib/component/reducer/preferences/actions/initPreferences.js.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +2 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js.map +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +9 -8
- package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.js +3 -1
- package/lib/component/reducer/preferences/preferencesReducer.js.map +1 -1
- package/lib/component/toolbar/ToolTypes.d.ts.map +1 -1
- package/lib/component/toolbar/ToolTypes.js +1 -0
- package/lib/component/toolbar/ToolTypes.js.map +1 -1
- package/lib/component/utility/export.d.ts +3 -3
- package/lib/component/utility/export.d.ts.map +1 -1
- package/lib/component/utility/export.js +13 -21
- package/lib/component/utility/export.js.map +1 -1
- package/lib/component/utility/getClosePeak.js +1 -1
- package/lib/component/utility/getClosePeak.js.map +1 -1
- package/lib/component/utility/save_as.d.ts +9 -0
- package/lib/component/utility/save_as.d.ts.map +1 -0
- package/lib/component/utility/save_as.js +7 -0
- package/lib/component/utility/save_as.js.map +1 -0
- package/lib/component/workspaces/assignment.d.ts.map +1 -1
- package/lib/component/workspaces/assignment.js +7 -0
- package/lib/component/workspaces/assignment.js.map +1 -1
- package/lib/component/workspaces/basic.d.ts.map +1 -1
- package/lib/component/workspaces/basic.js +5 -0
- package/lib/component/workspaces/basic.js.map +1 -1
- package/lib/component/workspaces/embedded.d.ts.map +1 -1
- package/lib/component/workspaces/embedded.js +5 -0
- package/lib/component/workspaces/embedded.js.map +1 -1
- package/lib/component/workspaces/exercise.d.ts.map +1 -1
- package/lib/component/workspaces/exercise.js +5 -0
- package/lib/component/workspaces/exercise.js.map +1 -1
- package/lib/component/workspaces/prediction.d.ts.map +1 -1
- package/lib/component/workspaces/prediction.js +5 -0
- package/lib/component/workspaces/prediction.js.map +1 -1
- package/lib/component/workspaces/process1D.d.ts.map +1 -1
- package/lib/component/workspaces/process1D.js +6 -0
- package/lib/component/workspaces/process1D.js.map +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.d.ts.map +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +18 -0
- package/lib/component/workspaces/workspaceDefaultProperties.js.map +1 -1
- package/lib/data/PredictionManager.d.ts.map +1 -1
- package/lib/data/PredictionManager.js +13 -9
- package/lib/data/PredictionManager.js.map +1 -1
- package/lib/data/SpectraManager.d.ts +45 -4
- package/lib/data/SpectraManager.d.ts.map +1 -1
- package/lib/data/SpectraManager.js +69 -12
- package/lib/data/SpectraManager.js.map +1 -1
- package/lib/data/constants/signalsKinds.d.ts +1 -6
- package/lib/data/constants/signalsKinds.d.ts.map +1 -1
- package/lib/data/constants/signalsKinds.js +2 -17
- package/lib/data/constants/signalsKinds.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/generateJGraphData.js +1 -1
- package/lib/data/data1d/Spectrum1D/generateJGraphData.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +16 -14
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +1 -10
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +6 -4
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +5 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignals.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignals.js +1 -1
- package/lib/data/data2d/Spectrum2D/contours.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/contours.js +1 -1
- package/lib/data/data2d/Spectrum2D/contours.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +6 -4
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts.map +1 -1
- package/lib/data/molecules/Molecule.d.ts +2 -22
- package/lib/data/molecules/Molecule.d.ts.map +1 -1
- package/lib/data/molecules/Molecule.js +3 -1
- package/lib/data/molecules/Molecule.js.map +1 -1
- package/lib/data/molecules/MoleculeManager.d.ts +3 -2
- package/lib/data/molecules/MoleculeManager.d.ts.map +1 -1
- package/lib/data/molecules/MoleculeManager.js +4 -2
- package/lib/data/molecules/MoleculeManager.js.map +1 -1
- package/lib/data/utilities/RangeUtilities.d.ts +3 -2
- package/lib/data/utilities/RangeUtilities.d.ts.map +1 -1
- package/lib/data/utilities/RangeUtilities.js +9 -3
- package/lib/data/utilities/RangeUtilities.js.map +1 -1
- package/lib/data/utilities/ZoneUtilities.d.ts.map +1 -1
- package/lib/data/utilities/ZoneUtilities.js +1 -2
- package/lib/data/utilities/ZoneUtilities.js.map +1 -1
- package/lib/data/utilities/isProton.d.ts +2 -0
- package/lib/data/utilities/isProton.d.ts.map +1 -0
- package/lib/data/utilities/isProton.js +4 -0
- package/lib/data/utilities/isProton.js.map +1 -0
- package/lib/versionInfo.js +1 -1
- package/package.json +32 -32
- package/src/component/1d/FloatingRanges.tsx +5 -5
- package/src/component/1d/database/DatabaseSpectrum.tsx +1 -1
- package/src/component/1d/multiAnalysis/MultiAnalysisRanges.tsx +1 -1
- package/src/component/1d/multiplicityTree/MultiplicityTree.tsx +4 -2
- package/src/component/1d/peaks/PeakAnnotations.tsx +2 -1
- package/src/component/1d/peaks/PeakAnnotationsSpreadMode.tsx +11 -1
- package/src/component/1d/peaks/Peaks.tsx +9 -3
- package/src/component/1d/ranges/Atoms.tsx +36 -13
- package/src/component/1d/ranges/Range.tsx +4 -3
- package/src/component/1d/ranges/RangesIntegrals.tsx +6 -2
- package/src/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.tsx +38 -78
- package/src/component/1d-2d/components/FloatMoleculeStructures/FloatMolecules.tsx +5 -2
- package/src/component/2d/FooterBanner.tsx +2 -2
- package/src/component/2d/YAxis.tsx +31 -13
- package/src/component/2d/useTracesSpectra.ts +3 -0
- package/src/component/2d/utilities/extractSpectrumSignals.ts +6 -16
- package/src/component/2d/zones/SignalsGuideLines.tsx +11 -9
- package/src/component/2d/zones/ZonesAssignmentsLabels.tsx +2 -3
- package/src/component/context/DispatchContext.tsx +2 -2
- package/src/component/context/LoggerContext.tsx +8 -11
- package/src/component/context/PreferencesContext.tsx +8 -5
- package/src/component/elements/D3Axis.tsx +1 -2
- package/src/component/elements/Sections.tsx +1 -1
- package/src/component/hooks/useActiveSpectrumRangesViewState.ts +2 -2
- package/src/component/hooks/useExport.tsx +38 -6
- package/src/component/loader/Spinner.tsx +1 -1
- package/src/component/loader/useLoadFiles.ts +79 -30
- package/src/component/main/InnerNMRium.tsx +6 -2
- package/src/component/main/NMRiumStateProvider.tsx +18 -7
- package/src/component/modal/LoadJCAMPModal.tsx +10 -5
- package/src/component/modal/MoleculeStructureEditorModal.tsx +11 -3
- package/src/component/modal/MultipletAnalysisModal.tsx +0 -2
- package/src/component/modal/SaveAsModal.tsx +35 -6
- package/src/component/modal/changeSum/ChangeSumModalContents.tsx +0 -2
- package/src/component/modal/changeSum/SelectMolecule.tsx +0 -2
- package/src/component/modal/setting/settings-tabs/DatabasesTabContent.tsx +1 -3
- package/src/component/modal/setting/settings-tabs/ToolsTabContent.tsx +16 -0
- package/src/component/modal/setting/settingsValidation.ts +2 -2
- package/src/component/panels/IntegralsPanel/IntegralPanel.tsx +2 -6
- package/src/component/panels/IntegralsPanel/IntegralTable.tsx +4 -3
- package/src/component/panels/MoleculesPanel/MoleculeOptionsPanel.tsx +160 -0
- package/src/component/panels/MoleculesPanel/MoleculePanel.tsx +77 -102
- package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +54 -35
- package/src/component/panels/MoleculesPanel/MoleculeStructure.tsx +117 -0
- package/src/component/panels/MoleculesPanel/{useAtomAssignment.tsx → hooks/useAtomAssignment.tsx} +71 -30
- package/src/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.ts +74 -0
- package/src/component/panels/MoleculesPanel/utilities/AtomData.ts +4 -0
- package/src/component/panels/MoleculesPanel/utilities/extractFromAtom.ts +63 -0
- package/src/component/panels/MoleculesPanel/utilities/getAssignIds.ts +59 -0
- package/src/component/panels/MoleculesPanel/utilities/getCurrentDiaIDsToHighlight.ts +12 -0
- package/src/component/panels/MoleculesPanel/utilities/getHighlightsOnHover.ts +36 -0
- package/src/component/panels/MoleculesPanel/utilities/getUniqueDiaIDs.ts +20 -0
- package/src/component/panels/PeaksPanel/PeaksPanel.tsx +25 -35
- package/src/component/panels/PeaksPanel/PeaksTable.tsx +3 -2
- package/src/component/panels/RangesPanel/RangesHeader.tsx +3 -2
- package/src/component/panels/RangesPanel/RangesTable.tsx +10 -8
- package/src/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.tsx +3 -3
- package/src/component/panels/RangesPanel/TableColumns/RelativeColumn.tsx +2 -2
- package/src/component/panels/SpectraPanel/SpectraTable.tsx +3 -2
- package/src/component/panels/SummaryPanel/utilities/Utilities.ts +2 -2
- package/src/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.tsx +1 -1
- package/src/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.tsx +0 -4
- package/src/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.tsx +9 -9
- package/src/component/panels/ZonesPanel/ZonesPanel.tsx +15 -5
- package/src/component/panels/ZonesPanel/ZonesTable.tsx +9 -10
- package/src/component/panels/ZonesPanel/ZonesTableRow.tsx +0 -2
- package/src/component/panels/ZonesPanel/hooks/useMapZones.ts +11 -11
- package/src/component/panels/databasePanel/DatabasePanel.tsx +18 -14
- package/src/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.tsx +0 -2
- package/src/component/panels/hooks/useMoleculeAnnotationCore.ts +36 -0
- package/src/component/panels/multipleAnalysisPanel/preferences/MultipleAnalysisCodeEditor.tsx +0 -2
- package/src/component/reducer/IgnoreActions.ts +2 -1
- package/src/component/reducer/Reducer.ts +28 -4
- package/src/component/reducer/actions/DatabaseActions.ts +3 -0
- package/src/component/reducer/actions/IntegralsActions.ts +1 -1
- package/src/component/reducer/actions/{LoadActions.ts → LoadAction.ts} +87 -25
- package/src/component/reducer/actions/MoleculeActions.ts +91 -44
- package/src/component/reducer/actions/RangesActions.ts +66 -30
- package/src/component/reducer/actions/ZonesActions.ts +18 -10
- package/src/component/reducer/preferences/actions/changeDefaultMoleculeSettings.ts +16 -0
- package/src/component/reducer/preferences/actions/initPreferences.ts +0 -3
- package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +2 -1
- package/src/component/reducer/preferences/preferencesReducer.ts +20 -11
- package/src/component/toolbar/ToolTypes.ts +1 -0
- package/src/component/utility/export.ts +15 -20
- package/src/component/utility/getClosePeak.ts +1 -1
- package/src/component/utility/save_as.ts +16 -0
- package/src/component/workspaces/assignment.ts +7 -0
- package/src/component/workspaces/basic.ts +5 -0
- package/src/component/workspaces/embedded.ts +5 -0
- package/src/component/workspaces/exercise.ts +5 -0
- package/src/component/workspaces/prediction.ts +5 -0
- package/src/component/workspaces/process1D.ts +6 -0
- package/src/component/workspaces/workspaceDefaultProperties.ts +18 -0
- package/src/data/PredictionManager.ts +21 -14
- package/src/data/SpectraManager.ts +90 -19
- package/src/data/constants/signalsKinds.ts +5 -20
- package/src/data/data1d/Spectrum1D/generateJGraphData.ts +1 -1
- package/src/data/data1d/Spectrum1D/initiateDatum1D.ts +16 -16
- package/src/data/data1d/Spectrum1D/isRangeAssigned.ts +1 -0
- package/src/data/data1d/Spectrum1D/ranges/autoRangesDetection.ts +7 -4
- package/src/data/data1d/Spectrum1D/ranges/detectRanges.ts +8 -1
- package/src/data/data1d/Spectrum1D/ranges/detectSignals.ts +1 -1
- package/src/data/data2d/Spectrum2D/contours.ts +2 -3
- package/src/data/data2d/Spectrum2D/initiateDatum2D.ts +6 -7
- package/src/data/molecules/Molecule.ts +9 -23
- package/src/data/molecules/MoleculeManager.ts +10 -8
- package/src/data/utilities/RangeUtilities.ts +12 -4
- package/src/data/utilities/ZoneUtilities.ts +1 -3
- package/src/data/utilities/isProton.ts +3 -0
- package/src/index.tsx +0 -3
- package/src/versionInfo.ts +1 -1
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +0 -43
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts.map +0 -1
- package/lib/component/panels/MoleculesPanel/Utilities.js +0 -126
- package/lib/component/panels/MoleculesPanel/Utilities.js.map +0 -1
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.d.ts.map +0 -1
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js.map +0 -1
- package/lib/component/reducer/actions/LoadActions.d.ts.map +0 -1
- package/lib/component/reducer/actions/LoadActions.js.map +0 -1
- package/lib/component/utility/isHomoNuclear.d.ts +0 -2
- package/lib/component/utility/isHomoNuclear.d.ts.map +0 -1
- package/lib/component/utility/isHomoNuclear.js +0 -11
- package/lib/component/utility/isHomoNuclear.js.map +0 -1
- package/lib/data/types/common/SignalKind.d.ts +0 -2
- package/lib/data/types/common/SignalKind.d.ts.map +0 -1
- package/lib/data/types/common/SignalKind.js +0 -2
- package/lib/data/types/common/SignalKind.js.map +0 -1
- package/lib/utils/stringCapitalize.d.ts +0 -2
- package/lib/utils/stringCapitalize.d.ts.map +0 -1
- package/lib/utils/stringCapitalize.js +0 -4
- package/lib/utils/stringCapitalize.js.map +0 -1
- package/src/component/panels/MoleculesPanel/Utilities.ts +0 -186
- package/src/component/utility/isHomoNuclear.ts +0 -11
- package/src/data/types/common/SignalKind.ts +0 -10
- package/src/utils/stringCapitalize.ts +0 -3
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
Filter2DEntry,
|
|
3
|
+
Signal2D,
|
|
4
|
+
SignalKind,
|
|
5
|
+
Zone,
|
|
6
|
+
} from '@zakodium/nmr-types';
|
|
2
7
|
import type {
|
|
3
8
|
Spectrum2D,
|
|
4
9
|
Spectrum,
|
|
@@ -11,10 +16,6 @@ import lodashCloneDeep from 'lodash/cloneDeep.js';
|
|
|
11
16
|
import { setPathLength } from 'nmr-correlation';
|
|
12
17
|
import { Filters2DManager } from 'nmr-processing';
|
|
13
18
|
|
|
14
|
-
import {
|
|
15
|
-
DATUM_KIND,
|
|
16
|
-
SIGNAL_INCLUDED_KINDS,
|
|
17
|
-
} from '../../../data/constants/signalsKinds.js';
|
|
18
19
|
import {
|
|
19
20
|
changeZoneSignal,
|
|
20
21
|
detectZones,
|
|
@@ -25,7 +26,7 @@ import type { DetectionZonesOptions } from '../../../data/data2d/Spectrum2D/zone
|
|
|
25
26
|
import { unlink } from '../../../data/utilities/ZoneUtilities.js';
|
|
26
27
|
import type { Axis } from '../../assignment/AssignmentsContext.js';
|
|
27
28
|
import { defaultZonesViewState } from '../../hooks/useActiveSpectrumZonesViewState.js';
|
|
28
|
-
import type { TargetAssignKeys } from '../../panels/MoleculesPanel/
|
|
29
|
+
import type { TargetAssignKeys } from '../../panels/MoleculesPanel/utilities/getAssignIds.ts';
|
|
29
30
|
import type { ZoneData } from '../../panels/ZonesPanel/hooks/useMapZones.js';
|
|
30
31
|
import type { FilterType } from '../../utility/filterType.js';
|
|
31
32
|
import type { State } from '../Reducer.js';
|
|
@@ -36,6 +37,7 @@ import type { ActionType } from '../types/ActionType.js';
|
|
|
36
37
|
|
|
37
38
|
import { handleUpdateCorrelations } from './CorrelationsActions.js';
|
|
38
39
|
import { setDomain } from './DomainActions.js';
|
|
40
|
+
import { rollbackSpectrumByFilter } from './FiltersActions.ts';
|
|
39
41
|
|
|
40
42
|
interface DeleteSignal2DProps {
|
|
41
43
|
spectrum: Spectrum;
|
|
@@ -60,7 +62,7 @@ type ChangeZoneSignalDeltaAction = ActionType<
|
|
|
60
62
|
>;
|
|
61
63
|
type ChangeZoneSignalKindAction = ActionType<
|
|
62
64
|
'CHANGE_ZONE_SIGNAL_KIND',
|
|
63
|
-
{ zoneData: ZoneData; kind:
|
|
65
|
+
{ zoneData: ZoneData; kind: SignalKind }
|
|
64
66
|
>;
|
|
65
67
|
type DeleteZoneAction = ActionType<'DELETE_2D_ZONE', { id?: string }>;
|
|
66
68
|
type DeleteSignal2DAction = ActionType<'DELETE_2D_SIGNAL', DeleteSignal2DProps>;
|
|
@@ -242,6 +244,14 @@ function handleChangeZoneSignalDelta(
|
|
|
242
244
|
});
|
|
243
245
|
}
|
|
244
246
|
|
|
247
|
+
for (const filter of filters) {
|
|
248
|
+
rollbackSpectrumByFilter(draft, {
|
|
249
|
+
key: filter.name,
|
|
250
|
+
searchBy: 'name',
|
|
251
|
+
applyFilter: false,
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
|
|
245
255
|
Filters2DManager.applyFilters(draft.data[index] as Spectrum2D, filters);
|
|
246
256
|
|
|
247
257
|
setDomain(draft);
|
|
@@ -270,9 +280,7 @@ function handleChangeZoneSignalKind(
|
|
|
270
280
|
const zoneIndex = getZoneIndex(state, index, zoneData.id);
|
|
271
281
|
const _zone = (draft.data[index] as Spectrum2D).zones.values[zoneIndex];
|
|
272
282
|
_zone.signals[zoneData.tableMetaInfo.signalIndex].kind = kind;
|
|
273
|
-
_zone.kind =
|
|
274
|
-
? DATUM_KIND.signal
|
|
275
|
-
: DATUM_KIND.mixed;
|
|
283
|
+
_zone.kind = kind;
|
|
276
284
|
handleUpdateCorrelations(draft);
|
|
277
285
|
}
|
|
278
286
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Draft } from 'immer';
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
ChangeDefaultMoleculeSettingsAction,
|
|
5
|
+
PreferencesState,
|
|
6
|
+
} from '../preferencesReducer.js';
|
|
7
|
+
import { getActiveWorkspace } from '../utilities/getActiveWorkspace.js';
|
|
8
|
+
|
|
9
|
+
export function changeDefaultMoleculeSettings(
|
|
10
|
+
draft: Draft<PreferencesState>,
|
|
11
|
+
action: ChangeDefaultMoleculeSettingsAction,
|
|
12
|
+
) {
|
|
13
|
+
const currentWorkspacePreferences = getActiveWorkspace(draft);
|
|
14
|
+
const settings = action.payload;
|
|
15
|
+
currentWorkspacePreferences.defaultMoleculeSettings = settings;
|
|
16
|
+
}
|
|
@@ -16,7 +16,6 @@ function getWorkspace(
|
|
|
16
16
|
export function initPreferences(draft: Draft<PreferencesState>, action: any) {
|
|
17
17
|
if (action.payload) {
|
|
18
18
|
const {
|
|
19
|
-
dispatch,
|
|
20
19
|
workspace,
|
|
21
20
|
customWorkspaces: cw,
|
|
22
21
|
preferences,
|
|
@@ -77,7 +76,5 @@ export function initPreferences(draft: Draft<PreferencesState>, action: any) {
|
|
|
77
76
|
),
|
|
78
77
|
};
|
|
79
78
|
}
|
|
80
|
-
|
|
81
|
-
draft.dispatch = dispatch;
|
|
82
79
|
}
|
|
83
80
|
}
|
|
@@ -9,6 +9,7 @@ import type {
|
|
|
9
9
|
Zones2DNucleusPreferences,
|
|
10
10
|
} from '@zakodium/nmrium-core';
|
|
11
11
|
|
|
12
|
+
import { isProton } from '../../../data/utilities/isProton.ts';
|
|
12
13
|
import { is2DNucleus } from '../../utility/nucleusToString.js';
|
|
13
14
|
|
|
14
15
|
function getPreferences<T>(data: T, nucleus?: string) {
|
|
@@ -130,7 +131,7 @@ const getRangeDefaultValues = (
|
|
|
130
131
|
deltaPPM: { show: true, format: '0.00' },
|
|
131
132
|
deltaHz: { show: false, format: '0.00' },
|
|
132
133
|
coupling: { show: true, format: '0.00' },
|
|
133
|
-
jGraphTolerance: nucleus
|
|
134
|
+
jGraphTolerance: isProton(nucleus || '') ? 0.2 : nucleus === '13C' ? 2 : 0, //J Graph tolerance for: 1H: 0.2Hz 13C: 2Hz
|
|
134
135
|
showKind: true,
|
|
135
136
|
showMultiplicity: true,
|
|
136
137
|
showAssignment: true,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
ACSExportOptions,
|
|
3
|
+
CustomWorkspaces,
|
|
3
4
|
ExportPreferences,
|
|
4
5
|
ExportSettings,
|
|
6
|
+
MoleculeView,
|
|
5
7
|
MultipleSpectraAnalysisPreferences,
|
|
6
8
|
NMRiumPanelPreferences,
|
|
7
9
|
PanelPreferencesType,
|
|
@@ -29,6 +31,7 @@ import {
|
|
|
29
31
|
setSpectraAnalysisPanelsPreferences,
|
|
30
32
|
} from './actions/analyzeSpectra.js';
|
|
31
33
|
import { applyGeneralPreferences } from './actions/applyGeneralPreferences.js';
|
|
34
|
+
import { changeDefaultMoleculeSettings } from './actions/changeDefaultMoleculeSettings.ts';
|
|
32
35
|
import { changeExportAcsSettings } from './actions/changeExportAcsSettings.ts';
|
|
33
36
|
import { changeExportSettings } from './actions/changeExportSettings.js';
|
|
34
37
|
import { changeInformationBlockPosition } from './actions/changeInformationBlockPosition.js';
|
|
@@ -70,10 +73,11 @@ export interface Settings {
|
|
|
70
73
|
type InitPreferencesAction = ActionType<
|
|
71
74
|
'INIT_PREFERENCES',
|
|
72
75
|
{
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
preferences: NMRiumPreferences | undefined;
|
|
77
|
+
display?: NMRiumPreferences;
|
|
78
|
+
workspace: NMRiumWorkspace | undefined;
|
|
79
|
+
customWorkspaces: CustomWorkspaces | undefined;
|
|
80
|
+
currentWorkspace: Settings['currentWorkspace'] | undefined;
|
|
77
81
|
}
|
|
78
82
|
>;
|
|
79
83
|
|
|
@@ -168,7 +172,12 @@ export type TogglePanelAction = ActionType<
|
|
|
168
172
|
}
|
|
169
173
|
>;
|
|
170
174
|
|
|
171
|
-
type
|
|
175
|
+
export type ChangeDefaultMoleculeSettingsAction = ActionType<
|
|
176
|
+
'CHANGE_DEFAULT_MOLECULE_SETTINGS',
|
|
177
|
+
MoleculeView
|
|
178
|
+
>;
|
|
179
|
+
|
|
180
|
+
export type PreferencesActions =
|
|
172
181
|
| InitPreferencesAction
|
|
173
182
|
| SetPreferencesAction
|
|
174
183
|
| SetPanelsPreferencesAction
|
|
@@ -188,7 +197,8 @@ type PreferencesActions =
|
|
|
188
197
|
| ChangeExportSettingsAction
|
|
189
198
|
| ChangePeaksLabelPositionAction
|
|
190
199
|
| TogglePanelAction
|
|
191
|
-
| ChangeExportACSSettingsAction
|
|
200
|
+
| ChangeExportACSSettingsAction
|
|
201
|
+
| ChangeDefaultMoleculeSettingsAction;
|
|
192
202
|
|
|
193
203
|
export type WorkspaceWithSource = Workspace & { source: WorkSpaceSource };
|
|
194
204
|
type WorkspacesWithSource = Record<string, WorkspaceWithSource>;
|
|
@@ -198,7 +208,6 @@ export interface PreferencesState {
|
|
|
198
208
|
// TODO: A lot of places set this to Required<WorkspacePreferences>, which is a subset of this type
|
|
199
209
|
workspaces: WorkspacesWithSource;
|
|
200
210
|
originalWorkspaces: WorkspacesWithSource;
|
|
201
|
-
dispatch: (action?: PreferencesActions) => void;
|
|
202
211
|
workspace: {
|
|
203
212
|
current: NMRiumWorkspace;
|
|
204
213
|
base: NMRiumWorkspace | null;
|
|
@@ -209,7 +218,6 @@ export const preferencesInitialState: PreferencesState = {
|
|
|
209
218
|
version: CURRENT_EXPORT_VERSION,
|
|
210
219
|
workspaces: {},
|
|
211
220
|
originalWorkspaces: {},
|
|
212
|
-
dispatch: () => null,
|
|
213
221
|
workspace: {
|
|
214
222
|
current: 'default',
|
|
215
223
|
base: null,
|
|
@@ -314,13 +322,14 @@ function innerPreferencesReducer(
|
|
|
314
322
|
return togglePanel(draft, action);
|
|
315
323
|
case 'CHANGE_EXPORT_ACS_SETTINGS':
|
|
316
324
|
return changeExportAcsSettings(draft, action);
|
|
325
|
+
case 'CHANGE_DEFAULT_MOLECULE_SETTINGS':
|
|
326
|
+
return changeDefaultMoleculeSettings(draft, action);
|
|
317
327
|
|
|
318
328
|
default:
|
|
319
329
|
return draft;
|
|
320
330
|
}
|
|
321
331
|
}
|
|
322
|
-
const preferencesReducer: Reducer<PreferencesState,
|
|
323
|
-
innerPreferencesReducer
|
|
324
|
-
);
|
|
332
|
+
const preferencesReducer: Reducer<PreferencesState, PreferencesActions> =
|
|
333
|
+
produce(innerPreferencesReducer);
|
|
325
334
|
|
|
326
335
|
export default preferencesReducer;
|
|
@@ -6,7 +6,8 @@ import type {
|
|
|
6
6
|
} from '@zakodium/nmrium-core';
|
|
7
7
|
import { BlobWriter, TextReader, ZipWriter } from '@zip.js/zip.js';
|
|
8
8
|
import dlv from 'dlv';
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
import { saveAs } from './save_as.ts';
|
|
10
11
|
|
|
11
12
|
export const browserNotSupportedErrorToast: ToastProps = {
|
|
12
13
|
message:
|
|
@@ -21,7 +22,7 @@ export const browserNotSupportedErrorToast: ToastProps = {
|
|
|
21
22
|
* @param spaceIndent
|
|
22
23
|
* @param isCompressed
|
|
23
24
|
*/
|
|
24
|
-
async function
|
|
25
|
+
async function exportAsJsonBlob(
|
|
25
26
|
data: any,
|
|
26
27
|
fileName = 'experiment',
|
|
27
28
|
spaceIndent = 0,
|
|
@@ -34,25 +35,18 @@ async function exportAsJSON(
|
|
|
34
35
|
spaceIndent,
|
|
35
36
|
);
|
|
36
37
|
if (!isCompressed) {
|
|
37
|
-
|
|
38
|
-
saveAs(blob, `${fileName}.nmrium`);
|
|
38
|
+
return new Blob([fileData], { type: 'text/plain' });
|
|
39
39
|
} else {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const blob = await zip.close();
|
|
44
|
-
saveAs(blob, `${fileName}.nmrium`);
|
|
45
|
-
} catch (error) {
|
|
46
|
-
// TODO: handle error.
|
|
47
|
-
reportError(error);
|
|
48
|
-
}
|
|
40
|
+
const zip = new ZipWriter(new BlobWriter());
|
|
41
|
+
await zip.add(`${fileName}.nmrium`, new TextReader(fileData));
|
|
42
|
+
return await zip.close();
|
|
49
43
|
}
|
|
50
44
|
}
|
|
51
45
|
|
|
52
46
|
function exportAsMatrix(
|
|
53
47
|
data: any,
|
|
54
48
|
spectraColumns: SpectraTableColumn[],
|
|
55
|
-
|
|
49
|
+
name: string,
|
|
56
50
|
) {
|
|
57
51
|
//columns labels
|
|
58
52
|
const columnsLabels: string[] = [];
|
|
@@ -88,7 +82,7 @@ function exportAsMatrix(
|
|
|
88
82
|
}
|
|
89
83
|
|
|
90
84
|
const blob = new Blob([matrix], { type: 'text/tab-separated-values' });
|
|
91
|
-
saveAs(blob,
|
|
85
|
+
saveAs({ blob, name, extension: '.tsv' });
|
|
92
86
|
}
|
|
93
87
|
|
|
94
88
|
interface ExportDimensions {
|
|
@@ -103,9 +97,10 @@ interface ExportAsSVGOptions extends ExportDimensions {
|
|
|
103
97
|
}
|
|
104
98
|
|
|
105
99
|
function exportAsSVG(targetElementID: string, options: ExportAsSVGOptions) {
|
|
106
|
-
const { fileName, rootElement } = options;
|
|
100
|
+
const { fileName: name = 'experiment', rootElement } = options;
|
|
107
101
|
const { blob } = getBlob(targetElementID, { rootElement });
|
|
108
|
-
|
|
102
|
+
|
|
103
|
+
saveAs({ blob, name, extension: '.svg' });
|
|
109
104
|
}
|
|
110
105
|
|
|
111
106
|
interface ExportAsPNGOptions {
|
|
@@ -249,7 +244,7 @@ async function exportAsPng(
|
|
|
249
244
|
targetElementID: string,
|
|
250
245
|
options: ExportAsPNGOptions,
|
|
251
246
|
) {
|
|
252
|
-
const { rootElement, fileName = 'experiment' } = options;
|
|
247
|
+
const { rootElement, fileName: name = 'experiment' } = options;
|
|
253
248
|
const { blob, width, height } = getBlob(targetElementID, { rootElement });
|
|
254
249
|
|
|
255
250
|
const { canvas } = await createCanvas(blob, {
|
|
@@ -259,7 +254,7 @@ async function exportAsPng(
|
|
|
259
254
|
});
|
|
260
255
|
|
|
261
256
|
const pngBlob = await canvas.convertToBlob({ type: 'image/png' });
|
|
262
|
-
saveAs(pngBlob,
|
|
257
|
+
saveAs({ blob: pngBlob, name, extension: '.png' });
|
|
263
258
|
}
|
|
264
259
|
|
|
265
260
|
function createImageFromBlob(blob: Blob): Promise<HTMLImageElement> {
|
|
@@ -427,7 +422,7 @@ function getBlob(targetElementID: string, options: GetBlobOptions): BlobObject {
|
|
|
427
422
|
|
|
428
423
|
export {
|
|
429
424
|
copyPNGToClipboard,
|
|
430
|
-
|
|
425
|
+
exportAsJsonBlob,
|
|
431
426
|
exportAsMatrix,
|
|
432
427
|
exportAsPng,
|
|
433
428
|
exportAsSVG,
|
|
@@ -22,7 +22,7 @@ export function getClosePeak(
|
|
|
22
22
|
const minIndex = datum.x.findIndex((number) => number >= from);
|
|
23
23
|
|
|
24
24
|
const yDataRange = datum.y.slice(minIndex, maxIndex);
|
|
25
|
-
if (
|
|
25
|
+
if (yDataRange.length === 0) return null;
|
|
26
26
|
|
|
27
27
|
const y = maxAbsoluteValue(yDataRange);
|
|
28
28
|
const xIndex = minIndex + yDataRange.indexOf(y);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// eslint-disable-next-line no-restricted-imports
|
|
2
|
+
import fileSaver from 'file-saver';
|
|
3
|
+
|
|
4
|
+
type Extension = `.${string}`;
|
|
5
|
+
|
|
6
|
+
interface SaveAsOptions {
|
|
7
|
+
blob: Blob;
|
|
8
|
+
name: string;
|
|
9
|
+
extension: Extension;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function saveAs(options: SaveAsOptions) {
|
|
13
|
+
const { blob, name, extension } = options;
|
|
14
|
+
|
|
15
|
+
fileSaver(blob, `${name}${extension}`);
|
|
16
|
+
}
|
|
@@ -29,6 +29,13 @@ export const assignment: InnerWorkspace = {
|
|
|
29
29
|
phaseCorrection: true,
|
|
30
30
|
baselineCorrection: true,
|
|
31
31
|
autoRangeAndZonePicking: true,
|
|
32
|
+
fftDimension1: true,
|
|
33
|
+
fftDimension2: true,
|
|
34
|
+
apodizationDimension1: true,
|
|
35
|
+
apodizationDimension2: true,
|
|
36
|
+
phaseCorrectionTwoDimensions: true,
|
|
37
|
+
zeroFillingDimension1: true,
|
|
38
|
+
zeroFillingDimension2: true,
|
|
32
39
|
inset: true,
|
|
33
40
|
},
|
|
34
41
|
},
|
|
@@ -35,6 +35,11 @@ export const basic: InnerWorkspace = {
|
|
|
35
35
|
autoRangeAndZonePicking: true,
|
|
36
36
|
fftDimension1: true,
|
|
37
37
|
fftDimension2: true,
|
|
38
|
+
apodizationDimension1: true,
|
|
39
|
+
apodizationDimension2: true,
|
|
40
|
+
phaseCorrectionTwoDimensions: true,
|
|
41
|
+
zeroFillingDimension1: true,
|
|
42
|
+
zeroFillingDimension2: true,
|
|
38
43
|
inset: true,
|
|
39
44
|
},
|
|
40
45
|
},
|
|
@@ -46,6 +46,11 @@ export const embedded: InnerWorkspace = {
|
|
|
46
46
|
autoRangeAndZonePicking: true,
|
|
47
47
|
fftDimension1: true,
|
|
48
48
|
fftDimension2: true,
|
|
49
|
+
apodizationDimension1: true,
|
|
50
|
+
apodizationDimension2: true,
|
|
51
|
+
phaseCorrectionTwoDimensions: true,
|
|
52
|
+
zeroFillingDimension1: true,
|
|
53
|
+
zeroFillingDimension2: true,
|
|
49
54
|
inset: true,
|
|
50
55
|
},
|
|
51
56
|
},
|
|
@@ -26,6 +26,11 @@ export const exercise: InnerWorkspace = {
|
|
|
26
26
|
spectraStackAlignments: true,
|
|
27
27
|
fftDimension1: true,
|
|
28
28
|
fftDimension2: true,
|
|
29
|
+
apodizationDimension1: true,
|
|
30
|
+
apodizationDimension2: true,
|
|
31
|
+
phaseCorrectionTwoDimensions: true,
|
|
32
|
+
zeroFillingDimension1: true,
|
|
33
|
+
zeroFillingDimension2: true,
|
|
29
34
|
inset: true,
|
|
30
35
|
},
|
|
31
36
|
},
|
|
@@ -46,6 +46,11 @@ export const prediction: InnerWorkspace = {
|
|
|
46
46
|
autoRangeAndZonePicking: true,
|
|
47
47
|
fftDimension1: true,
|
|
48
48
|
fftDimension2: true,
|
|
49
|
+
apodizationDimension1: true,
|
|
50
|
+
apodizationDimension2: true,
|
|
51
|
+
phaseCorrectionTwoDimensions: true,
|
|
52
|
+
zeroFillingDimension1: true,
|
|
53
|
+
zeroFillingDimension2: true,
|
|
49
54
|
inset: true,
|
|
50
55
|
},
|
|
51
56
|
},
|
|
@@ -23,9 +23,15 @@ export const process1D: InnerWorkspace = {
|
|
|
23
23
|
spectraCenterAlignments: true,
|
|
24
24
|
peakPicking: true,
|
|
25
25
|
apodization: true,
|
|
26
|
+
apodizationDimension1: true,
|
|
27
|
+
apodizationDimension2: true,
|
|
26
28
|
zeroFilling: true,
|
|
29
|
+
zeroFillingDimension1: true,
|
|
30
|
+
zeroFillingDimension2: true,
|
|
31
|
+
zonePicking: true,
|
|
27
32
|
fft: true,
|
|
28
33
|
phaseCorrection: true,
|
|
34
|
+
phaseCorrectionTwoDimensions: true,
|
|
29
35
|
baselineCorrection: true,
|
|
30
36
|
exclusionZones: true,
|
|
31
37
|
multipleSpectraAnalysis: true,
|
|
@@ -60,6 +60,11 @@ export const workspaceDefaultProperties: Required<WorkspacePreferences> = {
|
|
|
60
60
|
fftDimension1: false,
|
|
61
61
|
fftDimension2: false,
|
|
62
62
|
inset: false,
|
|
63
|
+
apodizationDimension1: false,
|
|
64
|
+
apodizationDimension2: false,
|
|
65
|
+
zeroFillingDimension1: false,
|
|
66
|
+
zeroFillingDimension2: false,
|
|
67
|
+
phaseCorrectionTwoDimensions: false,
|
|
63
68
|
},
|
|
64
69
|
},
|
|
65
70
|
|
|
@@ -271,4 +276,17 @@ export const workspaceDefaultProperties: Required<WorkspacePreferences> = {
|
|
|
271
276
|
deltaFormat: '0.00',
|
|
272
277
|
},
|
|
273
278
|
},
|
|
279
|
+
defaultMoleculeSettings: {
|
|
280
|
+
showLabel: false,
|
|
281
|
+
atomAnnotation: 'custom-labels',
|
|
282
|
+
floating: {
|
|
283
|
+
visible: true,
|
|
284
|
+
bounding: {
|
|
285
|
+
x: 10,
|
|
286
|
+
y: 10,
|
|
287
|
+
width: 130,
|
|
288
|
+
height: 120,
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
},
|
|
274
292
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { Signal2D, Zone } from '@zakodium/nmr-types';
|
|
1
|
+
import type { Peak2D, Signal2D, Zone } from '@zakodium/nmr-types';
|
|
2
2
|
import type { Spectrum } from '@zakodium/nmrium-core';
|
|
3
3
|
import type { Logger } from 'cheminfo-types';
|
|
4
4
|
import { xMinMaxValues } from 'ml-spectra-processing';
|
|
5
5
|
import type {
|
|
6
|
+
NMRZone,
|
|
6
7
|
Predicted,
|
|
7
8
|
Prediction1D,
|
|
8
9
|
Prediction2D,
|
|
@@ -20,7 +21,6 @@ import {
|
|
|
20
21
|
} from 'nmr-processing';
|
|
21
22
|
import { Molecule } from 'openchemlib';
|
|
22
23
|
|
|
23
|
-
import { DATUM_KIND } from './constants/signalsKinds.js';
|
|
24
24
|
import {
|
|
25
25
|
initiateDatum1D,
|
|
26
26
|
mapRanges,
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
} from './data1d/Spectrum1D/index.js';
|
|
29
29
|
import { initiateDatum2D } from './data2d/Spectrum2D/index.js';
|
|
30
30
|
import { adjustAlpha } from './utilities/generateColor.js';
|
|
31
|
+
import { isProton } from './utilities/isProton.ts';
|
|
31
32
|
|
|
32
33
|
export type Experiment = 'proton' | 'carbon' | 'cosy' | 'hsqc' | 'hmbc';
|
|
33
34
|
type SpectraPredictionOptions = Record<Experiment, boolean>;
|
|
@@ -143,7 +144,7 @@ export function generateSpectra(
|
|
|
143
144
|
case 'hsqc':
|
|
144
145
|
case 'hmbc': {
|
|
145
146
|
const datum = generated2DSpectrum({
|
|
146
|
-
spectrum,
|
|
147
|
+
spectrum: spectrum as PredictionBase2D,
|
|
147
148
|
options,
|
|
148
149
|
experiment,
|
|
149
150
|
color,
|
|
@@ -195,7 +196,7 @@ function checkFromTo(
|
|
|
195
196
|
} else {
|
|
196
197
|
const { signals, nuclei } = predictedSpectra[experiment] as Prediction2D;
|
|
197
198
|
for (const nucleus of nuclei) {
|
|
198
|
-
const axis = nucleus
|
|
199
|
+
const axis = isProton(nucleus) ? 'x' : 'y';
|
|
199
200
|
const { from, to } = (inputOptions['1d'] as any)[nucleus];
|
|
200
201
|
const fromTo = getNewFromTo({
|
|
201
202
|
deltas: signals.map((s) => s[axis].delta),
|
|
@@ -234,7 +235,7 @@ function getNewFromTo(params: {
|
|
|
234
235
|
const { min, max } = xMinMaxValues(deltas);
|
|
235
236
|
const signalsOutOfRange = from > min || to < max;
|
|
236
237
|
if (autoExtendRange && signalsOutOfRange) {
|
|
237
|
-
const spread = nucleus
|
|
238
|
+
const spread = isProton(nucleus) ? 0.2 : 2;
|
|
238
239
|
if (from > min) from = min - spread;
|
|
239
240
|
if (to < max) to = max + spread;
|
|
240
241
|
}
|
|
@@ -307,31 +308,37 @@ function generated1DSpectrum(params: {
|
|
|
307
308
|
return datum;
|
|
308
309
|
}
|
|
309
310
|
|
|
310
|
-
function mapZones(zones:
|
|
311
|
-
return zones.map((zone:
|
|
311
|
+
function mapZones(zones: NMRZone[]): Zone[] {
|
|
312
|
+
return zones.map((zone): Zone => {
|
|
312
313
|
const { signals, ...resZone } = zone;
|
|
313
|
-
const newSignals = signals.map((signal: Signal2D
|
|
314
|
-
const { x, y, id, ...resSignal } = signal;
|
|
314
|
+
const newSignals = signals.map((signal): Signal2D => {
|
|
315
|
+
const { x, y, id, peaks, kind, ...resSignal } = signal;
|
|
315
316
|
return {
|
|
317
|
+
...resSignal,
|
|
316
318
|
id: id || crypto.randomUUID(),
|
|
317
|
-
kind: 'signal',
|
|
319
|
+
kind: kind || 'signal',
|
|
318
320
|
x: { ...x, originalDelta: x.delta || 0 },
|
|
319
321
|
y: { ...y, originalDelta: y.delta || 0 },
|
|
320
|
-
|
|
322
|
+
peaks: peaks?.map(
|
|
323
|
+
(peak): Peak2D => ({
|
|
324
|
+
...peak,
|
|
325
|
+
id: peak.id || crypto.randomUUID(),
|
|
326
|
+
}),
|
|
327
|
+
),
|
|
321
328
|
};
|
|
322
329
|
});
|
|
323
330
|
return {
|
|
324
|
-
id: crypto.randomUUID(),
|
|
325
331
|
...resZone,
|
|
332
|
+
id: crypto.randomUUID(),
|
|
326
333
|
signals: newSignals,
|
|
327
|
-
kind:
|
|
334
|
+
kind: 'signal',
|
|
328
335
|
};
|
|
329
336
|
});
|
|
330
337
|
}
|
|
331
338
|
|
|
332
339
|
function generated2DSpectrum(params: {
|
|
333
340
|
options: PredictionOptions;
|
|
334
|
-
spectrum:
|
|
341
|
+
spectrum: PredictionBase2D;
|
|
335
342
|
experiment: string;
|
|
336
343
|
color: string;
|
|
337
344
|
}) {
|