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
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nmrium",
|
|
3
3
|
"description": "React component to display and process nuclear magnetic resonance (NMR) spectra.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.8.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -68,11 +68,11 @@
|
|
|
68
68
|
"@emotion/react": "^11.14.0",
|
|
69
69
|
"@emotion/styled": "^11.14.1",
|
|
70
70
|
"@hookform/resolvers": "^5.2.2",
|
|
71
|
-
"@zakodium/nmr-types": "^0.
|
|
72
|
-
"@zakodium/nmrium-core": "^0.
|
|
73
|
-
"@zakodium/nmrium-core-plugins": "^0.
|
|
71
|
+
"@zakodium/nmr-types": "^0.4.3",
|
|
72
|
+
"@zakodium/nmrium-core": "^0.4.10",
|
|
73
|
+
"@zakodium/nmrium-core-plugins": "^0.6.11",
|
|
74
74
|
"@zakodium/pdnd-esm": "^1.0.2",
|
|
75
|
-
"@zip.js/zip.js": "^2.8.
|
|
75
|
+
"@zip.js/zip.js": "^2.8.10",
|
|
76
76
|
"cheminfo-font": "^1.13.1",
|
|
77
77
|
"cheminfo-types": "^1.8.1",
|
|
78
78
|
"clipboard-polyfill": "^4.1.1",
|
|
@@ -82,45 +82,45 @@
|
|
|
82
82
|
"dlv": "^1.1.3",
|
|
83
83
|
"eventemitter3": "^5.0.1",
|
|
84
84
|
"fifo-logger": "^2.0.1",
|
|
85
|
-
"file-collection": "^
|
|
85
|
+
"file-collection": "^6.2.1",
|
|
86
86
|
"file-saver": "^2.0.5",
|
|
87
|
-
"immer": "^10.
|
|
87
|
+
"immer": "^10.2.0",
|
|
88
88
|
"lodash": "^4.17.21",
|
|
89
89
|
"mf-parser": "^3.6.0",
|
|
90
90
|
"ml-array-mean": "^1.1.6",
|
|
91
91
|
"ml-array-median": "^1.1.6",
|
|
92
92
|
"ml-conrec": "^5.0.3",
|
|
93
|
-
"ml-gsd": "^13.1.
|
|
93
|
+
"ml-gsd": "^13.1.1",
|
|
94
94
|
"ml-signal-processing": "^2.1.0",
|
|
95
95
|
"ml-spectra-processing": "^14.18.0",
|
|
96
96
|
"ml-tree-similarity": "^2.2.0",
|
|
97
97
|
"nmr-correlation": "2.3.3",
|
|
98
|
-
"nmr-processing": "^
|
|
98
|
+
"nmr-processing": "^21.1.3",
|
|
99
99
|
"numeral": "^2.0.6",
|
|
100
|
-
"openchemlib": "^9.
|
|
101
|
-
"openchemlib-utils": "^8.
|
|
100
|
+
"openchemlib": "^9.18.1",
|
|
101
|
+
"openchemlib-utils": "^8.8.1",
|
|
102
102
|
"papaparse": "^5.5.3",
|
|
103
103
|
"react-d3-utils": "^3.1.2",
|
|
104
104
|
"react-dropzone": "^14.3.8",
|
|
105
105
|
"react-error-boundary": "^6.0.0",
|
|
106
|
-
"react-hook-form": "^7.
|
|
106
|
+
"react-hook-form": "^7.66.1",
|
|
107
107
|
"react-icons": "^5.5.0",
|
|
108
108
|
"react-inspector": "^9.0.0",
|
|
109
109
|
"react-mf": "^3.1.1",
|
|
110
|
-
"react-ocl": "^8.
|
|
110
|
+
"react-ocl": "^8.4.0",
|
|
111
111
|
"react-ocl-nmr": "^4.1.1",
|
|
112
112
|
"react-plot": "^3.1.1",
|
|
113
113
|
"react-rnd": "^10.5.2",
|
|
114
|
-
"react-science": "^19.3.
|
|
114
|
+
"react-science": "^19.3.1",
|
|
115
115
|
"react-table": "^7.8.0",
|
|
116
116
|
"smart-array-filter": "^5.0.0",
|
|
117
117
|
"yup": "^1.7.1"
|
|
118
118
|
},
|
|
119
119
|
"devDependencies": {
|
|
120
|
-
"@blueprintjs/core": "^6.3.
|
|
121
|
-
"@blueprintjs/icons": "^6.1
|
|
122
|
-
"@blueprintjs/select": "^6.0.
|
|
123
|
-
"@playwright/test": "^1.56.
|
|
120
|
+
"@blueprintjs/core": "^6.3.4",
|
|
121
|
+
"@blueprintjs/icons": "^6.3.1",
|
|
122
|
+
"@blueprintjs/select": "^6.0.8",
|
|
123
|
+
"@playwright/test": "^1.56.1",
|
|
124
124
|
"@simbathesailor/use-what-changed": "^2.0.0",
|
|
125
125
|
"@types/d3-array": "^3.2.2",
|
|
126
126
|
"@types/d3-scale": "^4.0.9",
|
|
@@ -128,21 +128,21 @@
|
|
|
128
128
|
"@types/dlv": "^1.1.5",
|
|
129
129
|
"@types/file-saver": "^2.0.7",
|
|
130
130
|
"@types/lodash": "^4.17.20",
|
|
131
|
-
"@types/node": "^24.
|
|
131
|
+
"@types/node": "^24.10.1",
|
|
132
132
|
"@types/numeral": "^2.0.5",
|
|
133
|
-
"@types/papaparse": "^5.
|
|
133
|
+
"@types/papaparse": "^5.5.0",
|
|
134
134
|
"@types/react": "^18.3.13",
|
|
135
135
|
"@types/react-dom": "^18.3.1",
|
|
136
136
|
"@types/react-table": "^7.7.20",
|
|
137
|
-
"@vitejs/plugin-react": "^5.
|
|
138
|
-
"@vitest/coverage-v8": "^
|
|
137
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
138
|
+
"@vitest/coverage-v8": "^4.0.10",
|
|
139
139
|
"@zakodium/tsconfig": "^1.0.2",
|
|
140
140
|
"cross-env": "^10.1.0",
|
|
141
|
-
"cspell": "^9.2
|
|
142
|
-
"eslint": "^9.
|
|
143
|
-
"eslint-config-cheminfo-react": "^
|
|
144
|
-
"eslint-config-cheminfo-typescript": "^
|
|
145
|
-
"knip": "^5.
|
|
141
|
+
"cspell": "^9.3.2",
|
|
142
|
+
"eslint": "^9.39.1",
|
|
143
|
+
"eslint-config-cheminfo-react": "^19.0.0",
|
|
144
|
+
"eslint-config-cheminfo-typescript": "^21.0.1",
|
|
145
|
+
"knip": "^5.70.0",
|
|
146
146
|
"modern-normalize": "^3.0.1",
|
|
147
147
|
"postcss": "^8.5.6",
|
|
148
148
|
"postcss-styled-syntax": "^0.7.1",
|
|
@@ -150,17 +150,17 @@
|
|
|
150
150
|
"rc-menu": "^9.16.1",
|
|
151
151
|
"react": "^18.3.1",
|
|
152
152
|
"react-dom": "^18.3.1",
|
|
153
|
-
"react-router-dom": "^7.9.
|
|
154
|
-
"rimraf": "^6.0
|
|
153
|
+
"react-router-dom": "^7.9.6",
|
|
154
|
+
"rimraf": "^6.1.0",
|
|
155
155
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
156
156
|
"serve": "^14.2.5",
|
|
157
157
|
"stylelint": "^16.25.0",
|
|
158
158
|
"stylelint-config-standard": "^39.0.1",
|
|
159
159
|
"typescript": "~5.9.3",
|
|
160
|
-
"vite": "^7.
|
|
161
|
-
"vitest": "^
|
|
160
|
+
"vite": "^7.2.2",
|
|
161
|
+
"vitest": "^4.0.10"
|
|
162
162
|
},
|
|
163
163
|
"volta": {
|
|
164
|
-
"node": "24.
|
|
164
|
+
"node": "24.11.0"
|
|
165
165
|
}
|
|
166
166
|
}
|
|
@@ -8,7 +8,7 @@ import { FaTimes } from 'react-icons/fa';
|
|
|
8
8
|
import { Rnd } from 'react-rnd';
|
|
9
9
|
|
|
10
10
|
import { isSpectrum1D } from '../../data/data1d/Spectrum1D/index.js';
|
|
11
|
-
import {
|
|
11
|
+
import { isSignalRange } from '../../data/utilities/RangeUtilities.js';
|
|
12
12
|
import type { SVGTableColumn } from '../SVGTable.js';
|
|
13
13
|
import { SVGTable } from '../SVGTable.js';
|
|
14
14
|
import { useChartData } from '../context/ChartContext.js';
|
|
@@ -55,7 +55,7 @@ function useMapRanges(ranges: Ranges['values']) {
|
|
|
55
55
|
const preferences = usePanelPreferences('ranges', activeTab);
|
|
56
56
|
for (const range of ranges) {
|
|
57
57
|
const { id, from, to, integration, signals = [] } = range;
|
|
58
|
-
const relativeFlag =
|
|
58
|
+
const relativeFlag = isSignalRange(range);
|
|
59
59
|
const formattedValue = formatNumber(
|
|
60
60
|
integration,
|
|
61
61
|
preferences.relative.format,
|
|
@@ -158,13 +158,13 @@ function InnerSVGRangesTable(props: RangesTableProps) {
|
|
|
158
158
|
const SVGRangesTable = memo(InnerSVGRangesTable);
|
|
159
159
|
|
|
160
160
|
interface DraggablePublicationStringProps {
|
|
161
|
-
ranges: Ranges['values'];
|
|
161
|
+
ranges: Ranges['values'] | undefined;
|
|
162
162
|
bonding: BoundingBox;
|
|
163
163
|
spectrumKey: string;
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
function DraggableRanges(props: DraggablePublicationStringProps) {
|
|
167
|
-
const { ranges, bonding: externalBounding, spectrumKey } = props;
|
|
167
|
+
const { ranges = [], bonding: externalBounding, spectrumKey } = props;
|
|
168
168
|
const dispatch = useDispatch();
|
|
169
169
|
const { viewerRef } = useGlobal();
|
|
170
170
|
const [bounding, setBounding] = useState<BoundingBox>(externalBounding);
|
|
@@ -276,7 +276,7 @@ function DraggableRanges(props: DraggablePublicationStringProps) {
|
|
|
276
276
|
onClick: handleRemove,
|
|
277
277
|
},
|
|
278
278
|
];
|
|
279
|
-
if (!viewerRef ||
|
|
279
|
+
if (!viewerRef || ranges.length === 0) return null;
|
|
280
280
|
|
|
281
281
|
const { x: xInPercent, y: yInPercent } = bounding;
|
|
282
282
|
|
|
@@ -47,7 +47,7 @@ function DatabaseSpectrum() {
|
|
|
47
47
|
try {
|
|
48
48
|
setLoading(true);
|
|
49
49
|
const url = new URL(jcampRelativeURL, baseURL);
|
|
50
|
-
const { data } = await core.readFromWebSource({
|
|
50
|
+
const [{ data }] = await core.readFromWebSource({
|
|
51
51
|
entries: [{ relativePath: url.pathname, baseURL: url.origin }],
|
|
52
52
|
});
|
|
53
53
|
setLoading(false);
|
|
@@ -14,6 +14,7 @@ import { useScaleChecked } from '../../context/ScaleContext.js';
|
|
|
14
14
|
import type { ActionsButtonsPopoverProps } from '../../elements/ActionsButtonsPopover.js';
|
|
15
15
|
import { ActionsButtonsPopover } from '../../elements/ActionsButtonsPopover.js';
|
|
16
16
|
import { useHighlight } from '../../highlight/index.js';
|
|
17
|
+
import { useActiveSpectrum } from '../../hooks/useActiveSpectrum.ts';
|
|
17
18
|
import useSpectrum from '../../hooks/useSpectrum.js';
|
|
18
19
|
import { useIsInset } from '../inset/InsetProvider.js';
|
|
19
20
|
|
|
@@ -79,11 +80,11 @@ function Tree(props: TreeProps) {
|
|
|
79
80
|
} = props;
|
|
80
81
|
const { from, to } = range;
|
|
81
82
|
const { width } = useChartData();
|
|
82
|
-
const { scaleX } = useScaleChecked();
|
|
83
|
+
const { scaleX, shiftY } = useScaleChecked();
|
|
83
84
|
const dispatch = useDispatch();
|
|
84
85
|
const isInset = useIsInset();
|
|
85
86
|
const isAssignBtnTrigged = useRef(false);
|
|
86
|
-
|
|
87
|
+
const activeSpectrum = useActiveSpectrum();
|
|
87
88
|
const assignment = useAssignment(signalKey);
|
|
88
89
|
const highlight = useHighlight(extractID(signalKey, assignment), {
|
|
89
90
|
type: 'SIGNAL',
|
|
@@ -172,6 +173,7 @@ function Tree(props: TreeProps) {
|
|
|
172
173
|
}}
|
|
173
174
|
>
|
|
174
175
|
<Group
|
|
176
|
+
transform={`translate(0,-${(activeSpectrum?.index || 0) * shiftY})`}
|
|
175
177
|
isActive={isAssignmentActive}
|
|
176
178
|
isHighlighted={isHighlighted}
|
|
177
179
|
onMouseEnter={() => {
|
|
@@ -166,7 +166,7 @@ function PeakAnnotation({
|
|
|
166
166
|
format,
|
|
167
167
|
isOverlap = false,
|
|
168
168
|
}: PeakAnnotationProps) {
|
|
169
|
-
const { id, parentKeys, x, y } = peak;
|
|
169
|
+
const { id, parentKeys, x, y, opacity } = peak;
|
|
170
170
|
const sign = Math.sign(y);
|
|
171
171
|
const highlight = useHighlight([id], {
|
|
172
172
|
type: getHighlightSource(peaksSource),
|
|
@@ -188,6 +188,7 @@ function PeakAnnotation({
|
|
|
188
188
|
transform={`translate(${sx}, ${sy})`}
|
|
189
189
|
onMouseEnter={() => highlight.show()}
|
|
190
190
|
onMouseLeave={() => highlight.hide()}
|
|
191
|
+
opacity={opacity}
|
|
191
192
|
>
|
|
192
193
|
<line
|
|
193
194
|
x1="0"
|
|
@@ -144,7 +144,13 @@ function PeakAnnotationsSpreadMode(props: PeakAnnotationsSpreadModeProps) {
|
|
|
144
144
|
transform={`translate(${group.meta.groupStartX},0)`}
|
|
145
145
|
>
|
|
146
146
|
{group.group.map((item, index) => {
|
|
147
|
-
const {
|
|
147
|
+
const {
|
|
148
|
+
id,
|
|
149
|
+
x: value,
|
|
150
|
+
xInPixel,
|
|
151
|
+
parentKeys,
|
|
152
|
+
opacity,
|
|
153
|
+
} = item;
|
|
148
154
|
const startX = index * (notationWidth + notationMargin);
|
|
149
155
|
const x = xInPixel - group.meta.groupStartX;
|
|
150
156
|
return (
|
|
@@ -163,6 +169,7 @@ function PeakAnnotationsSpreadMode(props: PeakAnnotationsSpreadModeProps) {
|
|
|
163
169
|
}}
|
|
164
170
|
peaksSource={peaksSource}
|
|
165
171
|
spectrumKey={spectrumKey}
|
|
172
|
+
opacity={opacity}
|
|
166
173
|
/>
|
|
167
174
|
);
|
|
168
175
|
})}
|
|
@@ -181,6 +188,7 @@ interface PeakAnnotationProps {
|
|
|
181
188
|
x: number;
|
|
182
189
|
format: string;
|
|
183
190
|
color: string;
|
|
191
|
+
opacity: number;
|
|
184
192
|
id: string;
|
|
185
193
|
value: number;
|
|
186
194
|
peakEditionFieldPosition: { x: number; y: number };
|
|
@@ -200,6 +208,7 @@ function PeakAnnotation(props: PeakAnnotationProps) {
|
|
|
200
208
|
peaksSource,
|
|
201
209
|
parentKeys,
|
|
202
210
|
spectrumKey,
|
|
211
|
+
opacity,
|
|
203
212
|
} = props;
|
|
204
213
|
const highlight = useHighlight([id], {
|
|
205
214
|
type: getHighlightSource(peaksSource),
|
|
@@ -212,6 +221,7 @@ function PeakAnnotation(props: PeakAnnotationProps) {
|
|
|
212
221
|
<g
|
|
213
222
|
onMouseEnter={() => highlight.show()}
|
|
214
223
|
onMouseLeave={() => highlight.hide()}
|
|
224
|
+
opacity={opacity}
|
|
215
225
|
>
|
|
216
226
|
<PeakEditionListener {...{ ...peakEditionFieldPosition, id, value }}>
|
|
217
227
|
<text
|
|
@@ -2,6 +2,7 @@ import type { NMRPeak1D, Peak1D, Range } from '@zakodium/nmr-types';
|
|
|
2
2
|
import type { Spectrum1D } from '@zakodium/nmrium-core';
|
|
3
3
|
import { memo, useMemo } from 'react';
|
|
4
4
|
|
|
5
|
+
import { getOpacityBasedOnSignalKind } from '../../../data/utilities/RangeUtilities.ts';
|
|
5
6
|
import { useChartData } from '../../context/ChartContext.js';
|
|
6
7
|
import { useScaleChecked } from '../../context/ScaleContext.tsx';
|
|
7
8
|
import { useActiveSpectrumPeaksViewState } from '../../hooks/useActiveSpectrumPeaksViewState.js';
|
|
@@ -18,6 +19,7 @@ interface Peak1DWithParentKeys extends Peak1D {
|
|
|
18
19
|
}
|
|
19
20
|
interface NMRPeak1DWithParentKeys extends NMRPeak1D {
|
|
20
21
|
parentKeys?: string[];
|
|
22
|
+
opacity: number;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
interface SpreadPeak1D extends Peak1DWithParentKeys {
|
|
@@ -29,7 +31,9 @@ interface SpreadNMRPeak1D extends NMRPeak1DWithParentKeys {
|
|
|
29
31
|
yInPixel: number;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
|
-
export type Peak = Required<SpreadPeak1D | SpreadNMRPeak1D
|
|
34
|
+
export type Peak = Required<SpreadPeak1D | SpreadNMRPeak1D> & {
|
|
35
|
+
opacity: number;
|
|
36
|
+
};
|
|
33
37
|
type PeaksMode = 'spread' | 'single';
|
|
34
38
|
export type PeaksSource = 'peaks' | 'ranges';
|
|
35
39
|
|
|
@@ -61,9 +65,11 @@ export function getHighlightExtraId(
|
|
|
61
65
|
function flatRangesPeaks(ranges: Range[]) {
|
|
62
66
|
const results: NMRPeak1DWithParentKeys[] = [];
|
|
63
67
|
for (const { signals = [], id: rangeID } of ranges) {
|
|
64
|
-
for (const
|
|
68
|
+
for (const signal of signals) {
|
|
69
|
+
const { peaks = [], id: signalID } = signal;
|
|
70
|
+
const opacity = getOpacityBasedOnSignalKind(signal);
|
|
65
71
|
for (const peak of peaks) {
|
|
66
|
-
results.push({ ...peak, parentKeys: [rangeID, signalID] });
|
|
72
|
+
results.push({ ...peak, parentKeys: [rangeID, signalID], opacity });
|
|
67
73
|
}
|
|
68
74
|
}
|
|
69
75
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Range } from '@zakodium/nmr-types';
|
|
2
|
+
import type { MoleculesView } from '@zakodium/nmrium-core';
|
|
2
3
|
|
|
3
4
|
import { useChartData } from '../../context/ChartContext.js';
|
|
4
5
|
import { useTopicMolecule } from '../../context/TopicMoleculeContext.js';
|
|
@@ -19,24 +20,48 @@ function getDiaIds(range: Range) {
|
|
|
19
20
|
return ids;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
function useAtoms(range: Range) {
|
|
23
|
+
function useAtoms(range: Range, moleculesView: MoleculesView) {
|
|
23
24
|
const topicMolecule = useTopicMolecule();
|
|
24
25
|
const diaIDs = getDiaIds(range);
|
|
25
|
-
const atomsList: Array<{ id: string; atoms: number
|
|
26
|
+
const atomsList: Array<{ id: string; atoms: Array<string | number> }> = [];
|
|
26
27
|
|
|
27
28
|
for (const [id, topicMoleculeObject] of Object.entries(topicMolecule)) {
|
|
28
|
-
const atoms: number
|
|
29
|
+
const atoms: Array<string | number> = [];
|
|
29
30
|
const diaIDsObject = topicMoleculeObject.getDiaIDsObject();
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
|
|
32
|
+
if (!diaIDsObject || !(id in moleculesView)) continue;
|
|
33
|
+
|
|
34
|
+
const { atomAnnotation } = moleculesView[id];
|
|
35
|
+
for (const id of diaIDs) {
|
|
36
|
+
if (!(id in diaIDsObject)) continue;
|
|
37
|
+
|
|
38
|
+
const {
|
|
39
|
+
existingAtoms = [],
|
|
40
|
+
customLabels = [],
|
|
41
|
+
heavyAtomsCustomLabels = [],
|
|
42
|
+
} = diaIDsObject[id];
|
|
43
|
+
|
|
44
|
+
if (atomAnnotation === 'atom-numbers') {
|
|
45
|
+
atoms.push(...existingAtoms);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (atomAnnotation === 'custom-labels') {
|
|
49
|
+
const labels =
|
|
50
|
+
customLabels.length > 0 ? customLabels : heavyAtomsCustomLabels;
|
|
51
|
+
atoms.push(...labels);
|
|
36
52
|
}
|
|
37
53
|
}
|
|
54
|
+
|
|
38
55
|
if (atoms.length > 0) {
|
|
39
|
-
atoms.sort((a, b) =>
|
|
56
|
+
atoms.sort((a, b) => {
|
|
57
|
+
if (typeof a === 'number' && typeof b === 'number') {
|
|
58
|
+
return a - b;
|
|
59
|
+
}
|
|
60
|
+
if (typeof a === 'string' && typeof b === 'string') {
|
|
61
|
+
return a.localeCompare(b);
|
|
62
|
+
}
|
|
63
|
+
return 0;
|
|
64
|
+
});
|
|
40
65
|
atomsList.push({
|
|
41
66
|
id,
|
|
42
67
|
atoms: Array.from(new Set(atoms)),
|
|
@@ -56,9 +81,7 @@ export function Atoms(props: AtomsProps) {
|
|
|
56
81
|
const {
|
|
57
82
|
view: { molecules },
|
|
58
83
|
} = useChartData();
|
|
59
|
-
const atomsList = useAtoms(range)
|
|
60
|
-
(atomsList) => molecules?.[atomsList.id]?.showAtomNumber,
|
|
61
|
-
);
|
|
84
|
+
const atomsList = useAtoms(range, molecules);
|
|
62
85
|
|
|
63
86
|
return (
|
|
64
87
|
<SVGGroup
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
resizeRange,
|
|
9
9
|
} from '../../../data/data1d/Spectrum1D/index.js';
|
|
10
10
|
import { isRangeAssigned } from '../../../data/data1d/Spectrum1D/isRangeAssigned.js';
|
|
11
|
-
import {
|
|
11
|
+
import { getOpacityBasedOnSignalKind } from '../../../data/utilities/RangeUtilities.js';
|
|
12
12
|
import {
|
|
13
13
|
useAssignment,
|
|
14
14
|
useAssignmentContext,
|
|
@@ -131,7 +131,8 @@ function Range(options: RangeProps) {
|
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
const isAssignmentActive = assignmentRange.isActive;
|
|
134
|
-
const
|
|
134
|
+
const opacity = getOpacityBasedOnSignalKind(range);
|
|
135
|
+
|
|
135
136
|
const isHighlighted =
|
|
136
137
|
isBlockedByEditing || highlightRange.isActive || isAssignmentActive;
|
|
137
138
|
|
|
@@ -248,7 +249,7 @@ function Range(options: RangeProps) {
|
|
|
248
249
|
value={integration}
|
|
249
250
|
format={relativeFormat}
|
|
250
251
|
width={rangeWidth}
|
|
251
|
-
opacity={
|
|
252
|
+
opacity={opacity}
|
|
252
253
|
/>
|
|
253
254
|
)}
|
|
254
255
|
</g>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Spectrum1D } from '@zakodium/nmrium-core';
|
|
2
2
|
import { xyIntegral, xyMaxY } from 'ml-spectra-processing';
|
|
3
3
|
|
|
4
|
+
import { getOpacityBasedOnSignalKind } from '../../../data/utilities/RangeUtilities.ts';
|
|
4
5
|
import { useChartData } from '../../context/ChartContext.js';
|
|
5
6
|
import { useActiveSpectrumRangesViewState } from '../../hooks/useActiveSpectrumRangesViewState.js';
|
|
6
7
|
import useIntegralPath from '../../hooks/useIntegralPath.js';
|
|
@@ -13,6 +14,7 @@ interface IntegralData {
|
|
|
13
14
|
id: string;
|
|
14
15
|
from: number;
|
|
15
16
|
to: number;
|
|
17
|
+
opacity: number;
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
interface IntegralProps extends IntegralData {
|
|
@@ -20,7 +22,7 @@ interface IntegralProps extends IntegralData {
|
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
function Integral(props: IntegralProps) {
|
|
23
|
-
const { x, y, max, from, to } = props;
|
|
25
|
+
const { x, y, max, from, to, opacity } = props;
|
|
24
26
|
const { integralsScaleRatio } = useActiveSpectrumRangesViewState();
|
|
25
27
|
const path = useIntegralPath({
|
|
26
28
|
x,
|
|
@@ -37,6 +39,7 @@ function Integral(props: IntegralProps) {
|
|
|
37
39
|
stroke="black"
|
|
38
40
|
strokeWidth="1"
|
|
39
41
|
fill="none"
|
|
42
|
+
opacity={opacity}
|
|
40
43
|
d={path}
|
|
41
44
|
/>
|
|
42
45
|
);
|
|
@@ -90,6 +93,7 @@ function useIntegrals() {
|
|
|
90
93
|
} = spectrum;
|
|
91
94
|
for (const range of ranges?.values || []) {
|
|
92
95
|
const { from, to, id } = range;
|
|
96
|
+
const opacity = getOpacityBasedOnSignalKind(range);
|
|
93
97
|
const integral = xyIntegral(
|
|
94
98
|
{ x, y: re },
|
|
95
99
|
{
|
|
@@ -98,7 +102,7 @@ function useIntegrals() {
|
|
|
98
102
|
reverse: true,
|
|
99
103
|
},
|
|
100
104
|
);
|
|
101
|
-
values.push({ ...integral, id } as IntegralData);
|
|
105
|
+
values.push({ ...integral, id, opacity } as IntegralData);
|
|
102
106
|
const value = xyMaxY(integral);
|
|
103
107
|
if (value > max) max = value;
|
|
104
108
|
}
|
|
@@ -1,33 +1,26 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
|
+
import type { MoleculeView } from '@zakodium/nmrium-core';
|
|
2
3
|
import { useEffect, useState } from 'react';
|
|
3
4
|
import { ResponsiveChart } from 'react-d3-utils';
|
|
4
5
|
import { BsArrowsMove } from 'react-icons/bs';
|
|
5
|
-
import { FaTimes } from 'react-icons/fa';
|
|
6
|
-
import
|
|
7
|
-
import { MolfileSvgRenderer } from 'react-ocl';
|
|
8
|
-
import OCLnmr from 'react-ocl-nmr';
|
|
6
|
+
import { FaRegBookmark, FaTimes } from 'react-icons/fa';
|
|
7
|
+
import { MdFormatColorText, MdNumbers } from 'react-icons/md';
|
|
9
8
|
import { Rnd } from 'react-rnd';
|
|
10
9
|
|
|
11
10
|
import type {
|
|
12
11
|
MoleculeBoundingRect,
|
|
13
|
-
MoleculeView,
|
|
14
12
|
StateMoleculeExtended,
|
|
15
13
|
} from '../../../../data/molecules/Molecule.js';
|
|
16
14
|
import { useDispatch } from '../../../context/DispatchContext.js';
|
|
17
15
|
import { useGlobal } from '../../../context/GlobalContext.js';
|
|
18
16
|
import type { ActionsButtonsPopoverProps } from '../../../elements/ActionsButtonsPopover.js';
|
|
19
17
|
import { ActionsButtonsPopover } from '../../../elements/ActionsButtonsPopover.js';
|
|
20
|
-
import { useHighlightColor } from '../../../hooks/useHighlightColor.js';
|
|
21
18
|
import { useSVGUnitConverter } from '../../../hooks/useSVGUnitConverter.js';
|
|
22
19
|
import { useCheckExportStatus } from '../../../hooks/useViewportSize.js';
|
|
23
20
|
import { useMoleculeEditor } from '../../../modal/MoleculeStructureEditorModal.js';
|
|
24
|
-
import
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
width: number;
|
|
28
|
-
height: number;
|
|
29
|
-
renderAsSVG?: boolean;
|
|
30
|
-
}
|
|
21
|
+
import { MoleculeStructure } from '../../../panels/MoleculesPanel/MoleculeStructure.tsx';
|
|
22
|
+
import { useMoleculeAnnotationCore } from '../../../panels/hooks/useMoleculeAnnotationCore.ts';
|
|
23
|
+
import { booleanToString } from '../../../utility/booleanToString.ts';
|
|
31
24
|
|
|
32
25
|
interface DraggableStructureProps {
|
|
33
26
|
moleculeView: MoleculeView;
|
|
@@ -103,6 +96,12 @@ export function DraggableStructure(props: DraggableStructureProps) {
|
|
|
103
96
|
return { x: pixelToPercent(x, 'x'), y: pixelToPercent(y, 'y') };
|
|
104
97
|
}
|
|
105
98
|
|
|
99
|
+
const {
|
|
100
|
+
handleChangeAtomAnnotation,
|
|
101
|
+
isAnnotation,
|
|
102
|
+
handleToggleMoleculeLabel,
|
|
103
|
+
} = useMoleculeAnnotationCore(molecule.id, moleculeView);
|
|
104
|
+
|
|
106
105
|
if (!viewerRef) return null;
|
|
107
106
|
|
|
108
107
|
const actionsButtons: ActionsButtonsPopoverProps['buttons'] = [
|
|
@@ -119,8 +118,31 @@ export function DraggableStructure(props: DraggableStructureProps) {
|
|
|
119
118
|
title: 'Hide molecule',
|
|
120
119
|
onClick: floatMoleculeHandler,
|
|
121
120
|
},
|
|
121
|
+
{
|
|
122
|
+
elementType: 'separator',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
icon: <MdFormatColorText />,
|
|
126
|
+
title: `${booleanToString(!moleculeView.showLabel)} molecule label`,
|
|
127
|
+
onClick: handleToggleMoleculeLabel,
|
|
128
|
+
active: moleculeView.showLabel,
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
elementType: 'separator',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
icon: <MdNumbers />,
|
|
135
|
+
title: `${booleanToString(!isAnnotation('atom-numbers'))} atom number`,
|
|
136
|
+
onClick: () => handleChangeAtomAnnotation('atom-numbers'),
|
|
137
|
+
active: isAnnotation('atom-numbers'),
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
icon: <FaRegBookmark />,
|
|
141
|
+
title: `${booleanToString(!isAnnotation('custom-labels'))} custom labels`,
|
|
142
|
+
onClick: () => handleChangeAtomAnnotation('custom-labels'),
|
|
143
|
+
active: isAnnotation('custom-labels'),
|
|
144
|
+
},
|
|
122
145
|
];
|
|
123
|
-
|
|
124
146
|
const { x: xInPercent, y: yInPercent, width, height } = bounding;
|
|
125
147
|
|
|
126
148
|
const x = percentToPixel(xInPercent, 'x');
|
|
@@ -129,7 +151,7 @@ export function DraggableStructure(props: DraggableStructureProps) {
|
|
|
129
151
|
if (isExportProcessStart) {
|
|
130
152
|
return (
|
|
131
153
|
<g transform={`translate(${x} ${y})`}>
|
|
132
|
-
<
|
|
154
|
+
<MoleculeStructure renderAsSVG {...{ width, height }} {...props} />
|
|
133
155
|
</g>
|
|
134
156
|
);
|
|
135
157
|
}
|
|
@@ -176,7 +198,7 @@ export function DraggableStructure(props: DraggableStructureProps) {
|
|
|
176
198
|
>
|
|
177
199
|
<ResponsiveChart>
|
|
178
200
|
{({ width, height }) => {
|
|
179
|
-
return <
|
|
201
|
+
return <MoleculeStructure {...{ width, height }} {...props} />;
|
|
180
202
|
}}
|
|
181
203
|
</ResponsiveChart>
|
|
182
204
|
</div>
|
|
@@ -186,65 +208,3 @@ export function DraggableStructure(props: DraggableStructureProps) {
|
|
|
186
208
|
</ReactRnd>
|
|
187
209
|
);
|
|
188
210
|
}
|
|
189
|
-
|
|
190
|
-
function DraggableMolecule(props: DraggableMoleculeProps) {
|
|
191
|
-
const {
|
|
192
|
-
molecule,
|
|
193
|
-
index,
|
|
194
|
-
moleculeView,
|
|
195
|
-
width,
|
|
196
|
-
height,
|
|
197
|
-
renderAsSVG = false,
|
|
198
|
-
} = props;
|
|
199
|
-
const {
|
|
200
|
-
currentDiaIDsToHighlight,
|
|
201
|
-
handleOnAtomHover,
|
|
202
|
-
handleOnClickAtom,
|
|
203
|
-
assignedDiaIDsMerged,
|
|
204
|
-
} = useAtomAssignment();
|
|
205
|
-
const highlightColor = useHighlightColor();
|
|
206
|
-
const dispatch = useDispatch();
|
|
207
|
-
|
|
208
|
-
const atomHighlightColor =
|
|
209
|
-
currentDiaIDsToHighlight?.length > 0 ? '#ff000080' : highlightColor;
|
|
210
|
-
const baseProps: MolfileSvgRendererProps = {
|
|
211
|
-
id: `molSVG${index || ''}`,
|
|
212
|
-
height,
|
|
213
|
-
width,
|
|
214
|
-
label: molecule.label,
|
|
215
|
-
labelFontSize: 15,
|
|
216
|
-
labelColor: 'rgb(0,0,0)',
|
|
217
|
-
molfile: molecule.molfile,
|
|
218
|
-
atomHighlightColor,
|
|
219
|
-
atomHighlightOpacity: 1,
|
|
220
|
-
showAtomNumber: moleculeView.showAtomNumber,
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
if (renderAsSVG) {
|
|
224
|
-
return <MolfileSvgRenderer {...baseProps} />;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
return (
|
|
228
|
-
<OCLnmr
|
|
229
|
-
{...baseProps}
|
|
230
|
-
setSelectedAtom={handleOnClickAtom}
|
|
231
|
-
highlights={
|
|
232
|
-
currentDiaIDsToHighlight?.length > 0
|
|
233
|
-
? currentDiaIDsToHighlight
|
|
234
|
-
: assignedDiaIDsMerged
|
|
235
|
-
}
|
|
236
|
-
atomHighlightStrategy="prefer-editor-props"
|
|
237
|
-
setHoverAtom={handleOnAtomHover}
|
|
238
|
-
setMolfile={(molfile) => {
|
|
239
|
-
dispatch({
|
|
240
|
-
type: 'SET_MOLECULE',
|
|
241
|
-
payload: {
|
|
242
|
-
molfile,
|
|
243
|
-
id: molecule.id,
|
|
244
|
-
label: molecule.label,
|
|
245
|
-
},
|
|
246
|
-
});
|
|
247
|
-
}}
|
|
248
|
-
/>
|
|
249
|
-
);
|
|
250
|
-
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { Ranges, Zones } from '@zakodium/nmr-types';
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
MoleculeView,
|
|
4
|
+
Spectrum1D,
|
|
5
|
+
Spectrum2D,
|
|
6
|
+
} from '@zakodium/nmrium-core';
|
|
3
7
|
import { memo } from 'react';
|
|
4
8
|
import { assert } from 'react-science/ui';
|
|
5
9
|
|
|
6
10
|
import type {
|
|
7
|
-
MoleculeView,
|
|
8
11
|
MoleculesView,
|
|
9
12
|
StateMoleculeExtended,
|
|
10
13
|
} from '../../../../data/molecules/Molecule.js';
|