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,5 +1,8 @@
|
|
|
1
1
|
import type {
|
|
2
|
+
IncludeData,
|
|
2
3
|
NMRiumCore,
|
|
4
|
+
NmriumState,
|
|
5
|
+
SerializedNmriumState,
|
|
3
6
|
Spectrum,
|
|
4
7
|
StateMolecule,
|
|
5
8
|
Workspace,
|
|
@@ -10,17 +13,61 @@ import {
|
|
|
10
13
|
spectrum1DToJCAMPDX,
|
|
11
14
|
} from '@zakodium/nmrium-core-plugins';
|
|
12
15
|
import { BlobWriter, TextReader, ZipWriter } from '@zip.js/zip.js';
|
|
13
|
-
import saveAs from 'file-saver';
|
|
14
16
|
import * as OCL from 'openchemlib';
|
|
15
17
|
import { assert } from 'react-science/ui';
|
|
16
18
|
|
|
17
19
|
import type { State } from '../component/reducer/Reducer.js';
|
|
20
|
+
import { saveAs } from '../component/utility/save_as.ts';
|
|
18
21
|
|
|
19
22
|
import { initiateDatum1D, isSpectrum1D } from './data1d/Spectrum1D/index.js';
|
|
20
23
|
import { initiateDatum2D } from './data2d/Spectrum2D/index.js';
|
|
21
24
|
import * as Molecule from './molecules/Molecule.js';
|
|
22
25
|
|
|
23
|
-
|
|
26
|
+
export const DataExportOptions = {
|
|
27
|
+
/**
|
|
28
|
+
* Export the data as it is in the state, including all the raw data arrays.
|
|
29
|
+
*/
|
|
30
|
+
RAW_DATA: 'RAW_DATA',
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Export the data as it is in the state, excluding all the raw data arrays.
|
|
34
|
+
* They are replaced by empty arrays.
|
|
35
|
+
* When the nmrium file will be imported, the data will be fetched from the original source.
|
|
36
|
+
*
|
|
37
|
+
* @see State.sources
|
|
38
|
+
*/
|
|
39
|
+
DATA_SOURCE: 'DATA_SOURCE',
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Export only metadata, without any data.
|
|
43
|
+
*/
|
|
44
|
+
NO_DATA: 'NO_DATA',
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Export the state with all the data included, and without any external references.
|
|
48
|
+
* The final file will be a zip, containing all the data, including the original files.
|
|
49
|
+
* External data source will also be embedded in the archive.
|
|
50
|
+
*
|
|
51
|
+
* @experimental
|
|
52
|
+
*/
|
|
53
|
+
SELF_CONTAINED: 'SELF_CONTAINED',
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Export the state with data included and with external references.
|
|
57
|
+
* Original files will be included in the final archive.
|
|
58
|
+
* External data source will not be embedded in the archive.
|
|
59
|
+
*
|
|
60
|
+
* When the nmrium file will be imported,
|
|
61
|
+
* the data will be fetched from the original source and merged with data embedded in the archive.
|
|
62
|
+
*
|
|
63
|
+
* @experimental
|
|
64
|
+
*/
|
|
65
|
+
SELF_CONTAINED_EXTERNAL_DATASOURCE: 'SELF_CONTAINED_EXTERNAL_DATASOURCE',
|
|
66
|
+
} as const;
|
|
67
|
+
|
|
68
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
69
|
+
export type DataExportOptions =
|
|
70
|
+
(typeof DataExportOptions)[keyof typeof DataExportOptions];
|
|
24
71
|
|
|
25
72
|
type ExportTarget = 'nmrium' | 'onChange';
|
|
26
73
|
|
|
@@ -28,6 +75,7 @@ export interface ExportOptions {
|
|
|
28
75
|
dataType?: DataExportOptions;
|
|
29
76
|
view?: boolean;
|
|
30
77
|
settings?: boolean;
|
|
78
|
+
/** @default true */
|
|
31
79
|
serialize?: boolean;
|
|
32
80
|
exportTarget?: ExportTarget;
|
|
33
81
|
}
|
|
@@ -73,17 +121,23 @@ export function addJcamp(
|
|
|
73
121
|
* @param {object} state
|
|
74
122
|
* @param preferencesState
|
|
75
123
|
* @param options
|
|
124
|
+
*
|
|
125
|
+
* @returns a state serialized or not depending on the options.
|
|
126
|
+
* If serialize options is true it returns SerializedNmriumState else NmriumState
|
|
76
127
|
*/
|
|
77
128
|
export function toJSON(
|
|
78
129
|
core: NMRiumCore,
|
|
79
|
-
state:
|
|
80
|
-
|
|
130
|
+
state: Pick<
|
|
131
|
+
State,
|
|
132
|
+
'data' | 'sources' | 'molecules' | 'correlations' | 'actionType' | 'view'
|
|
133
|
+
>,
|
|
134
|
+
preferencesState: {
|
|
81
135
|
current: Workspace;
|
|
82
|
-
}
|
|
136
|
+
},
|
|
83
137
|
options: ExportOptions = {},
|
|
84
|
-
) {
|
|
138
|
+
): NmriumState | SerializedNmriumState {
|
|
85
139
|
const {
|
|
86
|
-
|
|
140
|
+
sources,
|
|
87
141
|
data = [],
|
|
88
142
|
molecules: mols = [],
|
|
89
143
|
correlations = {},
|
|
@@ -91,7 +145,7 @@ export function toJSON(
|
|
|
91
145
|
} = state;
|
|
92
146
|
|
|
93
147
|
const {
|
|
94
|
-
dataType = '
|
|
148
|
+
dataType = 'RAW_DATA',
|
|
95
149
|
view = false,
|
|
96
150
|
settings = false,
|
|
97
151
|
serialize = true,
|
|
@@ -102,28 +156,27 @@ export function toJSON(
|
|
|
102
156
|
Molecule.toJSON(mol),
|
|
103
157
|
);
|
|
104
158
|
|
|
105
|
-
const nmriumState:
|
|
159
|
+
const nmriumState: NmriumState = {
|
|
106
160
|
version: CURRENT_EXPORT_VERSION,
|
|
107
161
|
data: {
|
|
108
162
|
...(exportTarget === 'onChange' ? { actionType } : {}),
|
|
109
|
-
source
|
|
163
|
+
sources: Object.entries(sources ?? {}).map(([id, source]) => ({
|
|
164
|
+
...source,
|
|
165
|
+
id,
|
|
166
|
+
})),
|
|
110
167
|
spectra: data,
|
|
111
168
|
molecules,
|
|
112
169
|
correlations,
|
|
113
170
|
},
|
|
114
171
|
view: state.view,
|
|
115
172
|
settings: preferencesState.current,
|
|
173
|
+
plugins: core.serializePlugins(),
|
|
116
174
|
};
|
|
117
175
|
|
|
118
176
|
if (!serialize) {
|
|
119
177
|
return nmriumState;
|
|
120
178
|
} else {
|
|
121
|
-
const includeData =
|
|
122
|
-
dataType === 'ROW_DATA'
|
|
123
|
-
? 'rawData'
|
|
124
|
-
: dataType === 'NO_DATA'
|
|
125
|
-
? 'noData'
|
|
126
|
-
: 'dataSource';
|
|
179
|
+
const includeData = dataTypeToIncludeData(dataType);
|
|
127
180
|
|
|
128
181
|
return core.serializeNmriumState(nmriumState, {
|
|
129
182
|
includeData,
|
|
@@ -133,6 +186,23 @@ export function toJSON(
|
|
|
133
186
|
}
|
|
134
187
|
}
|
|
135
188
|
|
|
189
|
+
function dataTypeToIncludeData(dataType: DataExportOptions): IncludeData {
|
|
190
|
+
switch (dataType) {
|
|
191
|
+
case 'RAW_DATA':
|
|
192
|
+
return 'rawData';
|
|
193
|
+
case 'NO_DATA':
|
|
194
|
+
return 'noData';
|
|
195
|
+
case 'DATA_SOURCE':
|
|
196
|
+
return 'dataSource';
|
|
197
|
+
case 'SELF_CONTAINED':
|
|
198
|
+
return 'selfContained';
|
|
199
|
+
case 'SELF_CONTAINED_EXTERNAL_DATASOURCE':
|
|
200
|
+
return 'selfContainedExternalDatasource';
|
|
201
|
+
default:
|
|
202
|
+
throw new Error(`Unknown dataType ${dataType as string}`);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
136
206
|
export type DataExportStage =
|
|
137
207
|
| 'originalFid'
|
|
138
208
|
| 'originalFtReal'
|
|
@@ -174,7 +244,8 @@ export function exportAsJcamp(
|
|
|
174
244
|
}
|
|
175
245
|
|
|
176
246
|
const blob = new Blob([jcamp], { type: 'text/plain' });
|
|
177
|
-
|
|
247
|
+
const name = spectrum.info.name || 'experiment';
|
|
248
|
+
saveAs({ blob, name, extension: '.jdx' });
|
|
178
249
|
}
|
|
179
250
|
|
|
180
251
|
interface ExportForCTOptions {
|
|
@@ -202,7 +273,7 @@ export async function exportForCT(options: ExportForCTOptions) {
|
|
|
202
273
|
if (!jcamp) {
|
|
203
274
|
throw new Error('Failed to convert the 1D spectrum to JCAMP');
|
|
204
275
|
}
|
|
205
|
-
const name = spectrum.info.name;
|
|
276
|
+
const name = spectrum.info.name || 'experiment';
|
|
206
277
|
const zip = new ZipWriter(new BlobWriter());
|
|
207
278
|
|
|
208
279
|
//add jcamp file
|
|
@@ -219,5 +290,5 @@ export async function exportForCT(options: ExportForCTOptions) {
|
|
|
219
290
|
await zip.add(`${molFileName}.mol`, new TextReader(ctMolfile));
|
|
220
291
|
|
|
221
292
|
const blob = await zip.close();
|
|
222
|
-
saveAs(blob,
|
|
293
|
+
saveAs({ blob, name, extension: '.zip' });
|
|
223
294
|
}
|
|
@@ -1,26 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const KINDS: SignalKind[] = [
|
|
5
|
-
'undefined',
|
|
6
|
-
'signal',
|
|
7
|
-
'reference',
|
|
8
|
-
'solvent',
|
|
9
|
-
'standard',
|
|
10
|
-
'p1',
|
|
11
|
-
'p2',
|
|
12
|
-
'p3',
|
|
13
|
-
];
|
|
1
|
+
import type { SignalKind } from '@zakodium/nmr-types';
|
|
2
|
+
import { signalKindLabelMapping } from 'nmr-processing';
|
|
14
3
|
|
|
15
4
|
interface SignalKindItem {
|
|
16
5
|
value: SignalKind;
|
|
17
6
|
label: string;
|
|
18
7
|
}
|
|
19
8
|
|
|
20
|
-
export const SIGNAL_KINDS: SignalKindItem[] =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}));
|
|
24
|
-
|
|
25
|
-
export const SIGNAL_INCLUDED_KINDS: SignalKind[] = ['signal'];
|
|
26
|
-
export const DATUM_KIND = { signal: 'signal', mixed: 'mixed' } as const;
|
|
9
|
+
export const SIGNAL_KINDS: SignalKindItem[] = Object.entries(
|
|
10
|
+
signalKindLabelMapping,
|
|
11
|
+
).map(([kind, label]) => ({ value: kind as SignalKind, label }));
|
|
@@ -80,7 +80,7 @@ function createLinks(ranges: Range[], jGraphTolerance = 0) {
|
|
|
80
80
|
const couplings = getCouplings(ranges);
|
|
81
81
|
couplings.sort((a, b) => a.coupling - b.coupling);
|
|
82
82
|
|
|
83
|
-
if (
|
|
83
|
+
if (couplings.length === 0) return [];
|
|
84
84
|
|
|
85
85
|
const links: CouplingLink[] = [initLink(couplings[0])];
|
|
86
86
|
|
|
@@ -28,22 +28,22 @@ export function initiateDatum1D(
|
|
|
28
28
|
const { usedColors, colors, molecules = [] } = options;
|
|
29
29
|
|
|
30
30
|
const { integrals, ranges, ...restSpectrum } = spectrum;
|
|
31
|
-
const spectrumObj: Spectrum1D = {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
31
|
+
const spectrumObj: Spectrum1D = {
|
|
32
|
+
...restSpectrum,
|
|
33
|
+
id: spectrum.id || crypto.randomUUID(),
|
|
34
|
+
display: {
|
|
35
|
+
isVisible: true,
|
|
36
|
+
isRealSpectrumVisible: true,
|
|
37
|
+
...spectrum.display,
|
|
38
|
+
...get1DColor(spectrum, { usedColors, colors }),
|
|
39
|
+
},
|
|
40
|
+
info: {
|
|
41
|
+
nucleus: '1H', // 1H, 13C, 19F, ...
|
|
42
|
+
isFid: false,
|
|
43
|
+
isComplex: false, // if isComplex is true that mean it contains real/ imaginary x set, if not hid re/im button .
|
|
44
|
+
dimension: 1,
|
|
45
|
+
...spectrum.info,
|
|
46
|
+
},
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
spectrumObj.originalInfo = spectrumObj.info;
|
|
@@ -2,6 +2,8 @@ import type { Range } from '@zakodium/nmr-types';
|
|
|
2
2
|
import type { Spectrum1D } from '@zakodium/nmrium-core';
|
|
3
3
|
import { xyAutoRangesPicking } from 'nmr-processing';
|
|
4
4
|
|
|
5
|
+
import { isProton } from '../../../utilities/isProton.ts';
|
|
6
|
+
|
|
5
7
|
const defaultPeakPickingOptions = {
|
|
6
8
|
minMaxRatio: 1,
|
|
7
9
|
shape: { kind: 'lorentzian' },
|
|
@@ -34,14 +36,15 @@ export default function autoRangesDetection(
|
|
|
34
36
|
frequency: originFrequency,
|
|
35
37
|
};
|
|
36
38
|
|
|
39
|
+
const isProtonic = isProton(nucleus);
|
|
37
40
|
const rangesOptions = {
|
|
38
41
|
nucleus,
|
|
39
|
-
clean: 0.
|
|
42
|
+
clean: 0.5,
|
|
40
43
|
keepPeaks: true,
|
|
41
|
-
compile:
|
|
44
|
+
compile: isProtonic,
|
|
42
45
|
frequency: originFrequency,
|
|
43
|
-
joinOverlapRanges:
|
|
44
|
-
frequencyCluster:
|
|
46
|
+
joinOverlapRanges: isProtonic,
|
|
47
|
+
frequencyCluster: isProtonic ? 13 : 0,
|
|
45
48
|
...rangePicking,
|
|
46
49
|
};
|
|
47
50
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Spectrum1D } from '@zakodium/nmrium-core';
|
|
2
2
|
import { mapRanges, updateRangesRelativeValues } from 'nmr-processing';
|
|
3
3
|
|
|
4
|
+
import { isProton } from '../../../utilities/isProton.ts';
|
|
4
5
|
import type { SumParams } from '../SumManager.js';
|
|
5
6
|
import { initSumOptions } from '../SumManager.js';
|
|
6
7
|
|
|
@@ -32,11 +33,17 @@ export function detectRanges(
|
|
|
32
33
|
) {
|
|
33
34
|
const { molecules, nucleus, ...detectOptions } = options;
|
|
34
35
|
detectOptions.impurities = { solvent: spectrum.info.solvent || '' };
|
|
35
|
-
|
|
36
|
+
|
|
36
37
|
spectrum.ranges.options = initSumOptions(spectrum.ranges.options, {
|
|
37
38
|
molecules,
|
|
38
39
|
nucleus,
|
|
39
40
|
});
|
|
41
|
+
|
|
42
|
+
if (isProton(nucleus)) {
|
|
43
|
+
detectOptions.rangePicking.integrationSum = spectrum.ranges.options.sum;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const ranges = autoRangesDetection(spectrum, detectOptions);
|
|
40
47
|
spectrum.ranges.values = spectrum.ranges.values.concat(
|
|
41
48
|
mapRanges(ranges, spectrum),
|
|
42
49
|
);
|
|
@@ -56,8 +56,7 @@ function getDefaultContoursLevel(spectrum: Spectrum2D, quadrant = 'rr') {
|
|
|
56
56
|
//@ts-expect-error will be included in nexts versions
|
|
57
57
|
const { noise = calculateSanPlot('2D', quadrantData) } = info;
|
|
58
58
|
|
|
59
|
-
const { positive, negative } = noise;
|
|
60
|
-
|
|
59
|
+
const { positive = 0, negative = 0 } = noise;
|
|
61
60
|
const max = Math.max(
|
|
62
61
|
Math.abs(quadrantData.minZ),
|
|
63
62
|
Math.abs(quadrantData.maxZ),
|
|
@@ -220,9 +219,9 @@ function getContours(options: ContoursCalcOptions) {
|
|
|
220
219
|
const ys = getRange(data.minY, data.maxY, data.z.length);
|
|
221
220
|
const conrec = new Conrec(data.z, { xs, ys, swapAxes: false });
|
|
222
221
|
const max = Math.max(Math.abs(data.minZ), Math.abs(data.maxZ));
|
|
222
|
+
|
|
223
223
|
const minLevel = calculateValueOfLevel(boundary[0], max);
|
|
224
224
|
const maxLevel = calculateValueOfLevel(boundary[1], max);
|
|
225
|
-
|
|
226
225
|
const diffRange = boundary[1] - boundary[0];
|
|
227
226
|
|
|
228
227
|
let _range = getRange(minLevel, maxLevel, Math.min(nbLevels, diffRange), 2);
|
|
@@ -60,13 +60,12 @@ export function initiateDatum2D(
|
|
|
60
60
|
options: InitiateDatum2DOptions = {},
|
|
61
61
|
): Spectrum2D {
|
|
62
62
|
const { usedColors, colors } = options;
|
|
63
|
-
const datum: any = {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
datum.info = initiateInfo(spectrum);
|
|
63
|
+
const datum: any = {
|
|
64
|
+
...spectrum,
|
|
65
|
+
id: spectrum.id || crypto.randomUUID(),
|
|
66
|
+
display: initiateDisplay(spectrum, { usedColors, colors }),
|
|
67
|
+
info: initiateInfo(spectrum),
|
|
68
|
+
};
|
|
70
69
|
|
|
71
70
|
datum.originalInfo = datum.info;
|
|
72
71
|
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
+
import type { MoleculeView, StateMolecule } from '@zakodium/nmrium-core';
|
|
1
2
|
import { Molecule } from 'openchemlib';
|
|
2
3
|
|
|
3
4
|
import getAtomsFromMF from '../utilities/getAtomsFromMF.js';
|
|
4
5
|
|
|
5
|
-
export interface
|
|
6
|
-
id
|
|
7
|
-
|
|
8
|
-
label?: string;
|
|
9
|
-
}
|
|
10
|
-
export interface StateMoleculeExtended extends Required<StateMolecule> {
|
|
6
|
+
export interface StateMoleculeExtended
|
|
7
|
+
extends Required<Pick<StateMolecule, 'id' | 'molfile' | 'label'>>,
|
|
8
|
+
Omit<StateMolecule, 'id' | 'molfile' | 'label'> {
|
|
11
9
|
mf: string;
|
|
12
10
|
em: number;
|
|
13
11
|
mw: number;
|
|
@@ -31,22 +29,7 @@ export const DRAGGABLE_STRUCTURE_INITIAL_BOUNDING_REACT: MoleculeBoundingRect =
|
|
|
31
29
|
};
|
|
32
30
|
|
|
33
31
|
export type MoleculesView = Record<string, MoleculeView>;
|
|
34
|
-
|
|
35
|
-
floating: {
|
|
36
|
-
/**
|
|
37
|
-
* If the floating molecule is shown.
|
|
38
|
-
*/
|
|
39
|
-
visible: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Floating molecule position.
|
|
42
|
-
*/
|
|
43
|
-
bounding: MoleculeBoundingRect;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* Show/Hide atoms numbers on the molecule.
|
|
47
|
-
*/
|
|
48
|
-
showAtomNumber: boolean;
|
|
49
|
-
}
|
|
32
|
+
|
|
50
33
|
export function initMolecule(
|
|
51
34
|
options: Partial<StateMolecule> = {},
|
|
52
35
|
): StateMoleculeExtended {
|
|
@@ -61,6 +44,7 @@ export function initMolecule(
|
|
|
61
44
|
id,
|
|
62
45
|
molfile,
|
|
63
46
|
label,
|
|
47
|
+
selector: options.selector,
|
|
64
48
|
mf: mfInfo.formula,
|
|
65
49
|
em: mfInfo.absoluteWeight,
|
|
66
50
|
mw: mfInfo.relativeWeight,
|
|
@@ -70,10 +54,12 @@ export function initMolecule(
|
|
|
70
54
|
}
|
|
71
55
|
|
|
72
56
|
export function toJSON(molecule: StateMoleculeExtended): StateMolecule {
|
|
73
|
-
const { molfile, label, id } = molecule;
|
|
57
|
+
const { molfile, label, id, selector } = molecule;
|
|
58
|
+
|
|
74
59
|
return {
|
|
75
60
|
molfile,
|
|
76
61
|
label,
|
|
77
62
|
id,
|
|
63
|
+
selector,
|
|
78
64
|
};
|
|
79
65
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { StateMolecule } from '@zakodium/nmrium-core';
|
|
1
2
|
import { readSDF, readSMILES } from '@zakodium/nmrium-core-plugins';
|
|
2
3
|
import { Molecule } from 'openchemlib';
|
|
3
4
|
|
|
4
|
-
import type {
|
|
5
|
+
import type { StateMoleculeExtended } from './Molecule.js';
|
|
5
6
|
import { initMolecule } from './Molecule.js';
|
|
6
7
|
|
|
7
8
|
//TODO: Move molecule initialization to nmrium-core and log an error if the molecule cannot be parsed.
|
|
@@ -21,13 +22,14 @@ export function fromJSON(
|
|
|
21
22
|
continue;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
const moleculeOverride = {
|
|
26
|
+
...mol,
|
|
27
|
+
molfile: molecule.toMolfileV3(),
|
|
28
|
+
label: mol.label || `P${getLabelNumber(reservedNumbers)}`,
|
|
29
|
+
id: mol.id,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
molecules.push(initMolecule(moleculeOverride));
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
return molecules;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { Range, Signal1D } from '@zakodium/nmr-types';
|
|
2
2
|
import omit from 'lodash/omit.js';
|
|
3
3
|
|
|
4
|
-
import { DATUM_KIND } from '../constants/signalsKinds.js';
|
|
5
|
-
|
|
6
4
|
function resetDiaIDs(range: Range) {
|
|
7
5
|
const deletedKeys = ['diaIDs', 'nbAtoms'];
|
|
8
6
|
range = omit(range, deletedKeys) as Range;
|
|
@@ -50,6 +48,16 @@ export function unlink(range: Range, options: UnlinkOptions = {}): Range {
|
|
|
50
48
|
return range;
|
|
51
49
|
}
|
|
52
50
|
|
|
53
|
-
export function
|
|
54
|
-
|
|
51
|
+
export function getOpacityBasedOnSignalKind(input: Range | Signal1D) {
|
|
52
|
+
const isSignal =
|
|
53
|
+
'signals' in input ? isSignalRange(input) : isSignalKind(input);
|
|
54
|
+
return isSignal ? 1 : 0.3;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function isSignalKind(signal: Signal1D) {
|
|
58
|
+
return signal.kind === 'signal';
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function isSignalRange(range: Range) {
|
|
62
|
+
return range.signals.every(isSignalKind);
|
|
55
63
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { Zone } from '@zakodium/nmr-types';
|
|
2
2
|
|
|
3
|
-
import { DATUM_KIND } from '../constants/signalsKinds.js';
|
|
4
|
-
|
|
5
3
|
function getNbAtoms(zone: Zone, axis: 'x' | 'y') {
|
|
6
4
|
let sum = 0;
|
|
7
5
|
if (zone.signals) {
|
|
@@ -30,7 +28,7 @@ function resetDiaIDs(zone: Zone, axis: 'x' | 'y') {
|
|
|
30
28
|
}
|
|
31
29
|
|
|
32
30
|
export function checkZoneKind(zone: Zone): boolean {
|
|
33
|
-
return zone.kind ===
|
|
31
|
+
return zone.kind === 'signal';
|
|
34
32
|
}
|
|
35
33
|
|
|
36
34
|
export function unlink(
|
package/src/index.tsx
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FocusStyleManager } from '@blueprintjs/core';
|
|
2
1
|
import { createRoot } from 'react-dom/client';
|
|
3
2
|
import { HashRouter, Route, Routes } from 'react-router-dom';
|
|
4
3
|
|
|
@@ -15,8 +14,6 @@ import '@blueprintjs/select/lib/css/blueprint-select.css';
|
|
|
15
14
|
|
|
16
15
|
import './demo/index.css';
|
|
17
16
|
|
|
18
|
-
FocusStyleManager.alwaysShowFocus();
|
|
19
|
-
|
|
20
17
|
const rootElement = document.querySelector('#root');
|
|
21
18
|
if (!rootElement) {
|
|
22
19
|
throw new Error('#root element not found');
|
package/src/versionInfo.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default { version: 'v1.
|
|
1
|
+
export default { version: 'v1.8.0' };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { Spectrum } from '@zakodium/nmrium-core';
|
|
2
|
-
import type { DiaIDAndInfo } from 'openchemlib-utils';
|
|
3
|
-
import type { AssignmentContext, Axis } from '../../assignment/AssignmentsContext.js';
|
|
4
|
-
interface TargetAssignment {
|
|
5
|
-
key: string;
|
|
6
|
-
index: number;
|
|
7
|
-
}
|
|
8
|
-
interface RangeTargetAssignKey extends TargetAssignment {
|
|
9
|
-
target: 'range';
|
|
10
|
-
}
|
|
11
|
-
interface ZoneTargetAssignKey extends TargetAssignment {
|
|
12
|
-
target: 'zone';
|
|
13
|
-
}
|
|
14
|
-
interface SignalTargetAssignKey extends TargetAssignment {
|
|
15
|
-
target: 'signal';
|
|
16
|
-
}
|
|
17
|
-
export type TargetAssignKeys = [RangeTargetAssignKey | ZoneTargetAssignKey] | [RangeTargetAssignKey | ZoneTargetAssignKey, SignalTargetAssignKey];
|
|
18
|
-
export interface AtomData {
|
|
19
|
-
oclIDs: string[];
|
|
20
|
-
nbAtoms: number;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Returns the OCL id(s) and number of atoms of an atom when hovering over
|
|
24
|
-
* or clicking on it. This is depending on an optional given axis.
|
|
25
|
-
* In case of an heavy atom with bonded hydrogens the OCL id(s)
|
|
26
|
-
* and number of these hydrogens are added as well.
|
|
27
|
-
*
|
|
28
|
-
* @param {DiaIDAndInfo} diaIDAndInfo - atom returned by OCLnmr component
|
|
29
|
-
* @param {string} activeTab - active tab
|
|
30
|
-
* @param {Axis} axis - current axis
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
export declare function extractFromAtom(diaIDAndInfo: DiaIDAndInfo | undefined, activeTab: string, axis?: Axis | null): AtomData;
|
|
34
|
-
export declare function getAssignIds(spectrum: Spectrum, id: string): TargetAssignKeys | null;
|
|
35
|
-
export declare function getHighlightsOnHover(assignments: AssignmentContext, oclIDs: any, spectrum: any): string[];
|
|
36
|
-
export declare function getCurrentDiaIDsToHighlight(assignmentData: AssignmentContext): string[];
|
|
37
|
-
/** */
|
|
38
|
-
export declare function getUniqueDiaIDs(diaIDs: string[], atomInformation: AtomData): {
|
|
39
|
-
diaIDs: string[];
|
|
40
|
-
nbAtoms: number;
|
|
41
|
-
};
|
|
42
|
-
export {};
|
|
43
|
-
//# sourceMappingURL=Utilities.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Utilities.d.ts","sourceRoot":"","sources":["../../../../src/component/panels/MoleculesPanel/Utilities.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,KAAK,EACV,iBAAiB,EACjB,IAAI,EACL,MAAM,wCAAwC,CAAC;AAGhD,UAAU,gBAAgB;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,oBAAqB,SAAQ,gBAAgB;IACrD,MAAM,EAAE,OAAO,CAAC;CACjB;AACD,UAAU,mBAAoB,SAAQ,gBAAgB;IACpD,MAAM,EAAE,MAAM,CAAC;CAChB;AACD,UAAU,qBAAsB,SAAQ,gBAAgB;IACtD,MAAM,EAAE,QAAQ,CAAC;CAClB;AACD,MAAM,MAAM,gBAAgB,GACxB,CAAC,oBAAoB,GAAG,mBAAmB,CAAC,GAC5C,CAAC,oBAAoB,GAAG,mBAAmB,EAAE,qBAAqB,CAAC,CAAC;AAExE,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AASD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,YAAY,GAAG,SAAS,EACtC,SAAS,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GACjB,QAAQ,CAkCV;AAUD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,MAAM,GACT,gBAAgB,GAAG,IAAI,CAwBzB;AAED,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,iBAAiB,EAC9B,MAAM,EAAE,GAAG,EACX,QAAQ,EAAE,GAAG,YAsBd;AAED,wBAAgB,2BAA2B,CAAC,cAAc,EAAE,iBAAiB,YAU5E;AACD,MAAM;AACN,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,eAAe,EAAE,QAAQ;;;EAiB1E"}
|