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
|
@@ -8,7 +8,6 @@ import type {
|
|
|
8
8
|
StateMolecule,
|
|
9
9
|
} from '@zakodium/nmrium-core';
|
|
10
10
|
import dlv from 'dlv';
|
|
11
|
-
import saveAs from 'file-saver';
|
|
12
11
|
import type { CSSProperties } from 'react';
|
|
13
12
|
import { useCallback, useMemo, useState } from 'react';
|
|
14
13
|
import { FaCopy, FaFileExport, FaRegTrashAlt } from 'react-icons/fa';
|
|
@@ -29,6 +28,7 @@ import type { Column } from '../../elements/ReactTable/ReactTable.js';
|
|
|
29
28
|
import ReactTable from '../../elements/ReactTable/ReactTable.js';
|
|
30
29
|
import { usePanelPreferences } from '../../hooks/usePanelPreferences.js';
|
|
31
30
|
import ExportAsJcampModal from '../../modal/ExportAsJcampModal.js';
|
|
31
|
+
import { saveAs } from '../../utility/save_as.ts';
|
|
32
32
|
|
|
33
33
|
import { RenderAsHTML } from './base/RenderAsHTML.js';
|
|
34
34
|
import type { OnChangeVisibilityEvent } from './base/ShowHideSpectrumButton.js';
|
|
@@ -250,7 +250,8 @@ export function SpectraTable(props: SpectraTableProps) {
|
|
|
250
250
|
case SpectraContextMenuOptionsKeys.ExportAsText: {
|
|
251
251
|
const data = convertSpectrumToText(spectrum);
|
|
252
252
|
const blob = new Blob([data], { type: 'text/plain' });
|
|
253
|
-
|
|
253
|
+
const name = spectrum?.info?.name || 'experiment';
|
|
254
|
+
saveAs({ blob, name, extension: '.tsv' });
|
|
254
255
|
break;
|
|
255
256
|
}
|
|
256
257
|
case SpectraContextMenuOptionsKeys.CopyAsText: {
|
|
@@ -56,7 +56,7 @@ function findSignalMatch1D(
|
|
|
56
56
|
xDomain0: number,
|
|
57
57
|
xDomain1: number,
|
|
58
58
|
) {
|
|
59
|
-
if (spectrum
|
|
59
|
+
if (spectrum.info.dimension === 2) {
|
|
60
60
|
const signal = findSignal2D(spectrum, link.signal.id);
|
|
61
61
|
if (signal) {
|
|
62
62
|
const otherAxis = link.axis === 'x' ? 'y' : 'x';
|
|
@@ -78,7 +78,7 @@ function findSignalMatch2D(
|
|
|
78
78
|
yDomain0: number,
|
|
79
79
|
yDomain1: number,
|
|
80
80
|
): boolean {
|
|
81
|
-
if (spectrum
|
|
81
|
+
if (spectrum.info.dimension === 2) {
|
|
82
82
|
const signal = findSignal2D(spectrum, link.signal.id);
|
|
83
83
|
if (signal?.x.delta && signal?.y.delta) {
|
|
84
84
|
return (
|
|
@@ -8,7 +8,7 @@ import type { ZoneData } from '../hooks/useMapZones.js';
|
|
|
8
8
|
import SignalAssignmentsColumn from './SignalAssignmentsColumn.js';
|
|
9
9
|
|
|
10
10
|
export function useSignalHighlight(rowData: ZoneData) {
|
|
11
|
-
const signalKey =
|
|
11
|
+
const signalKey = rowData.tableMetaInfo.id;
|
|
12
12
|
const signalAssignment = useAssignment(signalKey);
|
|
13
13
|
|
|
14
14
|
const highlightSignalX = useHighlight(
|
|
@@ -27,12 +27,8 @@ function SignalDeltaColumn({ rowData, nucleus }: SignalDeltaColumnProps) {
|
|
|
27
27
|
const { handleOnMouseEnter, handleOnMouseLeave } =
|
|
28
28
|
useSignalHighlight(rowData);
|
|
29
29
|
|
|
30
|
-
// TODO: fix type of tableMetaInfo.
|
|
31
|
-
// @ts-expect-error Type is wrong.
|
|
32
30
|
const signalDeltaX = rowData.tableMetaInfo.signal.x.delta ?? null;
|
|
33
|
-
// @ts-expect-error Type is wrong.
|
|
34
31
|
const signalDeltaY = rowData.tableMetaInfo.signal.y.delta ?? null;
|
|
35
|
-
// @ts-expect-error Type is wrong.
|
|
36
32
|
const id = rowData.tableMetaInfo.signal.id;
|
|
37
33
|
|
|
38
34
|
function saveXHandler(event: any) {
|
|
@@ -12,14 +12,14 @@ function useZoneHighlight(rowData: ZoneData) {
|
|
|
12
12
|
const assignedDiaIds = zoneAssignment.assignedDiaIds;
|
|
13
13
|
|
|
14
14
|
const highlightZoneX = useHighlight(
|
|
15
|
-
[buildID(id, 'X')].concat(assignedDiaIds
|
|
15
|
+
[buildID(id, 'X')].concat(assignedDiaIds.x ?? []),
|
|
16
16
|
{
|
|
17
17
|
type: 'ZONE',
|
|
18
18
|
},
|
|
19
19
|
);
|
|
20
20
|
|
|
21
21
|
const highlightZoneY = useHighlight(
|
|
22
|
-
[buildID(id, 'Y')].concat(assignedDiaIds
|
|
22
|
+
[buildID(id, 'Y')].concat(assignedDiaIds.y ?? []),
|
|
23
23
|
{
|
|
24
24
|
type: 'ZONE',
|
|
25
25
|
},
|
|
@@ -44,7 +44,7 @@ function useZoneHighlight(rowData: ZoneData) {
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
function isHighlighted(axis: Axis) {
|
|
47
|
-
return axis === 'x' ? highlightZoneX.isActive : highlightZoneY
|
|
47
|
+
return axis === 'x' ? highlightZoneX.isActive : highlightZoneY.isActive;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
return {
|
|
@@ -84,7 +84,7 @@ function ZoneAssignmentColumn({
|
|
|
84
84
|
handleOnMouseLeave,
|
|
85
85
|
isHighlighted,
|
|
86
86
|
} = useZoneHighlight(rowData);
|
|
87
|
-
const diaIDs = rowData
|
|
87
|
+
const diaIDs = rowData[axis].diaIDs ?? []; // diaIds at the level of zone
|
|
88
88
|
const isAssignmentActive =
|
|
89
89
|
zoneAssignment.isActive && zoneAssignment.activated?.axis === axis;
|
|
90
90
|
const flag =
|
|
@@ -93,9 +93,9 @@ function ZoneAssignmentColumn({
|
|
|
93
93
|
zoneAssignment.highlighted?.axis === axis) ||
|
|
94
94
|
isHighlighted(axis);
|
|
95
95
|
|
|
96
|
-
let totalNumberOfAtoms = rowData
|
|
97
|
-
for (const signal of rowData
|
|
98
|
-
totalNumberOfAtoms += signal
|
|
96
|
+
let totalNumberOfAtoms = rowData[axis].nbAtoms ?? 0;
|
|
97
|
+
for (const signal of rowData.signals) {
|
|
98
|
+
totalNumberOfAtoms += signal[axis].nbAtoms ?? 0;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
function handleClick(event: React.MouseEvent<HTMLTableCellElement>) {
|
|
@@ -109,13 +109,13 @@ function ZoneAssignmentColumn({
|
|
|
109
109
|
onMouseEnter={() => handleOnMouseEnter(axis)}
|
|
110
110
|
onMouseLeave={() => handleOnMouseLeave(axis)}
|
|
111
111
|
onClick={handleClick}
|
|
112
|
-
hideRemoveAssignmentButton={
|
|
112
|
+
hideRemoveAssignmentButton={diaIDs.length === 0}
|
|
113
113
|
onRemove={(e) => onUnlink(e, true, axis)}
|
|
114
114
|
>
|
|
115
115
|
{(totalNumberOfAtoms > 0 || isAssignmentActive) && (
|
|
116
116
|
<>
|
|
117
117
|
{totalNumberOfAtoms} {' ( '}
|
|
118
|
-
<span style={getStyle(flag, false)}>{diaIDs
|
|
118
|
+
<span style={getStyle(flag, false)}>{diaIDs.length}</span>
|
|
119
119
|
{' ) '}
|
|
120
120
|
</>
|
|
121
121
|
)}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Zone } from '@zakodium/nmr-types';
|
|
1
2
|
import type { Spectrum2D, ZonesViewState } from '@zakodium/nmrium-core';
|
|
2
3
|
import { memo, useCallback, useMemo, useRef, useState } from 'react';
|
|
3
4
|
import { FaUnlink } from 'react-icons/fa';
|
|
@@ -15,6 +16,7 @@ import DefaultPanelHeader from '../header/DefaultPanelHeader.js';
|
|
|
15
16
|
import PreferencesHeader from '../header/PreferencesHeader.js';
|
|
16
17
|
|
|
17
18
|
import ZonesPreferences from './ZonesPreferences.js';
|
|
19
|
+
import type { ZonesTableDataElement } from './ZonesTable.js';
|
|
18
20
|
import ZonesTable from './ZonesTable.js';
|
|
19
21
|
|
|
20
22
|
interface MemoizedZonesPanelProps extends ZonesViewState {
|
|
@@ -46,8 +48,13 @@ const MemoizedZonesPanel = memo(function ZonesPanelInner(
|
|
|
46
48
|
const [isFlipped, setFlipStatus] = useState(false);
|
|
47
49
|
const settingRef = useRef<SettingsRef | null>(null);
|
|
48
50
|
|
|
49
|
-
const tableData = useMemo(() => {
|
|
50
|
-
const isInView = (
|
|
51
|
+
const tableData = useMemo<ZonesTableDataElement[]>(() => {
|
|
52
|
+
const isInView = (
|
|
53
|
+
xFrom: number,
|
|
54
|
+
xTo: number,
|
|
55
|
+
yFrom: number,
|
|
56
|
+
yTo: number,
|
|
57
|
+
) => {
|
|
51
58
|
const factor = 10000;
|
|
52
59
|
xFrom = xFrom * factor;
|
|
53
60
|
xTo = xTo * factor;
|
|
@@ -61,8 +68,8 @@ const MemoizedZonesPanel = memo(function ZonesPanelInner(
|
|
|
61
68
|
);
|
|
62
69
|
};
|
|
63
70
|
|
|
64
|
-
const getFilteredZones = (zones:
|
|
65
|
-
return zones.filter((zone
|
|
71
|
+
const getFilteredZones = (zones: Zone[]) => {
|
|
72
|
+
return zones.filter((zone) => {
|
|
66
73
|
return isInView(zone.x.from, zone.x.to, zone.y.from, zone.y.to);
|
|
67
74
|
});
|
|
68
75
|
};
|
|
@@ -71,7 +78,7 @@ const MemoizedZonesPanel = memo(function ZonesPanelInner(
|
|
|
71
78
|
? getFilteredZones(zones.values)
|
|
72
79
|
: zones.values;
|
|
73
80
|
|
|
74
|
-
return _zones.map((zone:
|
|
81
|
+
return _zones.map((zone): ZonesTableDataElement => {
|
|
75
82
|
return {
|
|
76
83
|
...zone,
|
|
77
84
|
tableMetaInfo: {
|
|
@@ -84,6 +91,8 @@ const MemoizedZonesPanel = memo(function ZonesPanelInner(
|
|
|
84
91
|
},
|
|
85
92
|
};
|
|
86
93
|
});
|
|
94
|
+
} else {
|
|
95
|
+
return [];
|
|
87
96
|
}
|
|
88
97
|
}, [zones, filterIsActive, xDomain, yDomain]);
|
|
89
98
|
|
|
@@ -93,6 +102,7 @@ const MemoizedZonesPanel = memo(function ZonesPanelInner(
|
|
|
93
102
|
|
|
94
103
|
const unlinkZoneHandler = useCallback(
|
|
95
104
|
(
|
|
105
|
+
// TODO: this must be a bug, `zoneData.id` will fail with `undefined`.
|
|
96
106
|
zoneData?: any,
|
|
97
107
|
isOnZoneLevel = undefined,
|
|
98
108
|
signalIndex = -1,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
|
-
import type { Info2D } from '@zakodium/nmr-types';
|
|
2
|
+
import type { Info2D, Zone } from '@zakodium/nmr-types';
|
|
3
3
|
import type {
|
|
4
4
|
Zones1DNucleusPreferences,
|
|
5
5
|
Zones2DNucleusPreferences,
|
|
@@ -70,14 +70,12 @@ const Table = styled.table`
|
|
|
70
70
|
}
|
|
71
71
|
`;
|
|
72
72
|
|
|
73
|
+
export interface ZonesTableDataElement extends Zone {
|
|
74
|
+
tableMetaInfo: { isConstantlyHighlighted: boolean };
|
|
75
|
+
}
|
|
76
|
+
|
|
73
77
|
interface ZonesTableProps {
|
|
74
|
-
tableData:
|
|
75
|
-
signals: any[];
|
|
76
|
-
tableMetaInfo: any;
|
|
77
|
-
rowIndex: number;
|
|
78
|
-
signalIndex: number;
|
|
79
|
-
id: number;
|
|
80
|
-
}>;
|
|
78
|
+
tableData: ZonesTableDataElement[];
|
|
81
79
|
onUnlink: (
|
|
82
80
|
zoneData: any,
|
|
83
81
|
isOnZoneLevel: any,
|
|
@@ -89,7 +87,8 @@ interface ZonesTableProps {
|
|
|
89
87
|
}
|
|
90
88
|
const ZoneEditionDialog = withDialog(EditZoneModal, { force: true });
|
|
91
89
|
|
|
92
|
-
function ZonesTable(
|
|
90
|
+
function ZonesTable(props: ZonesTableProps) {
|
|
91
|
+
const { tableData, onUnlink, nucleus, info } = props;
|
|
93
92
|
const { experiment, isFid } = info;
|
|
94
93
|
|
|
95
94
|
const nuclei = nucleus.split(',');
|
|
@@ -119,7 +118,7 @@ function ZonesTable({ tableData, onUnlink, nucleus, info }: ZonesTableProps) {
|
|
|
119
118
|
return <NoDataForFid />;
|
|
120
119
|
}
|
|
121
120
|
|
|
122
|
-
if (
|
|
121
|
+
if (data.length === 0) {
|
|
123
122
|
return <EmptyText text="No data" />;
|
|
124
123
|
}
|
|
125
124
|
|
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import type { Zone } from '@zakodium/nmr-types';
|
|
1
|
+
import type { Signal2D, Zone } from '@zakodium/nmr-types';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
|
|
4
|
+
import type { ZonesTableDataElement } from '../ZonesTable.js';
|
|
5
|
+
|
|
4
6
|
export interface ZoneData extends Zone {
|
|
5
7
|
tableMetaInfo: {
|
|
6
|
-
id:
|
|
8
|
+
id: string;
|
|
7
9
|
signalIndex: number;
|
|
8
|
-
rowSpan:
|
|
9
|
-
signal:
|
|
10
|
-
|
|
11
|
-
kind: any;
|
|
12
|
-
};
|
|
10
|
+
rowSpan: number | null;
|
|
11
|
+
signal: Signal2D;
|
|
12
|
+
hide: boolean;
|
|
13
13
|
experiment: string;
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export function useMapZones(
|
|
18
|
-
data:
|
|
18
|
+
data: ZonesTableDataElement[],
|
|
19
19
|
info: { experiment: string; nuclei: string[] },
|
|
20
20
|
): ZoneData[] {
|
|
21
21
|
return useMemo(() => {
|
|
22
22
|
const zonesData: ZoneData[] = [];
|
|
23
23
|
if (!data) return [];
|
|
24
24
|
|
|
25
|
-
for (const
|
|
25
|
+
for (const zone of data) {
|
|
26
26
|
if (zone.signals.length === 1) {
|
|
27
27
|
zonesData.push({
|
|
28
28
|
...zone,
|
|
29
29
|
tableMetaInfo: {
|
|
30
30
|
...zone.tableMetaInfo,
|
|
31
31
|
signal: zone.signals[0],
|
|
32
|
-
rowIndex: i,
|
|
33
32
|
signalIndex: 0,
|
|
33
|
+
rowSpan: null,
|
|
34
|
+
hide: false,
|
|
34
35
|
id: zone.signals[0].id,
|
|
35
36
|
...info,
|
|
36
37
|
},
|
|
@@ -55,7 +56,6 @@ export function useMapZones(
|
|
|
55
56
|
signal,
|
|
56
57
|
rowSpan,
|
|
57
58
|
hide,
|
|
58
|
-
rowIndex: i,
|
|
59
59
|
signalIndex: j,
|
|
60
60
|
id: signal.id,
|
|
61
61
|
experiment: info.experiment,
|
|
@@ -31,8 +31,9 @@ import { useFormatNumberByNucleus } from '../../hooks/useFormatNumberByNucleus.j
|
|
|
31
31
|
import useSpectraByActiveNucleus from '../../hooks/useSpectraPerNucleus.js';
|
|
32
32
|
import { options } from '../../toolbar/ToolTypes.js';
|
|
33
33
|
import Events from '../../utility/Events.js';
|
|
34
|
-
import {
|
|
34
|
+
import { exportAsJsonBlob } from '../../utility/export.js';
|
|
35
35
|
import nucleusToString from '../../utility/nucleusToString.js';
|
|
36
|
+
import { saveAs } from '../../utility/save_as.ts';
|
|
36
37
|
import { PanelNoData } from '../PanelNoData.js';
|
|
37
38
|
import { TablePanel } from '../extra/BasicPanelStyle.js';
|
|
38
39
|
import type { SettingsRef } from '../extra/utilities/settingImperativeHandle.js';
|
|
@@ -46,13 +47,13 @@ import DatabaseTable from './DatabaseTable.js';
|
|
|
46
47
|
export type Databases = Array<LocalDatabase | Database>;
|
|
47
48
|
|
|
48
49
|
function getMolfile(options: {
|
|
49
|
-
|
|
50
|
+
ocl?: { idCode?: string; coordinates?: string };
|
|
50
51
|
smiles?: string;
|
|
51
52
|
}) {
|
|
52
|
-
const {
|
|
53
|
+
const { ocl, smiles } = options;
|
|
53
54
|
|
|
54
|
-
if (
|
|
55
|
-
const { idCode, coordinates } =
|
|
55
|
+
if (ocl?.idCode && ocl?.coordinates) {
|
|
56
|
+
const { idCode, coordinates } = ocl;
|
|
56
57
|
return Molecule.fromIDCode(idCode, coordinates).toMolfileV3();
|
|
57
58
|
}
|
|
58
59
|
|
|
@@ -289,10 +290,10 @@ function DatabasePanelInner({
|
|
|
289
290
|
index,
|
|
290
291
|
baseURL,
|
|
291
292
|
jcampURL: jcampRelativeURL,
|
|
292
|
-
|
|
293
|
+
ocl,
|
|
293
294
|
smiles,
|
|
294
295
|
} = rowData;
|
|
295
|
-
const molfile = getMolfile({
|
|
296
|
+
const molfile = getMolfile({ ocl, smiles });
|
|
296
297
|
const databaseEntry = result.data[index];
|
|
297
298
|
|
|
298
299
|
if (jcampRelativeURL) {
|
|
@@ -303,7 +304,7 @@ function DatabasePanelInner({
|
|
|
303
304
|
});
|
|
304
305
|
|
|
305
306
|
try {
|
|
306
|
-
const { data } = await core.readFromWebSource({
|
|
307
|
+
const [{ data }] = await core.readFromWebSource({
|
|
307
308
|
entries: [{ baseURL: url.origin, relativePath: url.pathname }],
|
|
308
309
|
});
|
|
309
310
|
const spectrum = data?.spectra?.[0] || null;
|
|
@@ -519,10 +520,11 @@ async function saveJcampAsJson(
|
|
|
519
520
|
const { index, baseURL, jcampURL, names, ocl = {}, smiles } = rowData;
|
|
520
521
|
const { ranges } = filteredData.data[index];
|
|
521
522
|
const url = new URL(jcampURL, baseURL);
|
|
522
|
-
const
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
}
|
|
523
|
+
const [
|
|
524
|
+
{ data: { spectra, sources } = { sources: [], spectra: [] }, version },
|
|
525
|
+
] = await core.readFromWebSource({
|
|
526
|
+
entries: [{ baseURL: url.origin, relativePath: url.pathname }],
|
|
527
|
+
});
|
|
526
528
|
|
|
527
529
|
let molfile = '';
|
|
528
530
|
let molecule: Molecule | null = null;
|
|
@@ -560,7 +562,7 @@ async function saveJcampAsJson(
|
|
|
560
562
|
{
|
|
561
563
|
version,
|
|
562
564
|
data: {
|
|
563
|
-
|
|
565
|
+
sources,
|
|
564
566
|
spectra: spectraData,
|
|
565
567
|
...(molfile && { molecules: [{ molfile }] }),
|
|
566
568
|
},
|
|
@@ -568,5 +570,7 @@ async function saveJcampAsJson(
|
|
|
568
570
|
{ includeData: 'dataSource' },
|
|
569
571
|
);
|
|
570
572
|
|
|
571
|
-
|
|
573
|
+
const name = names?.[0] || 'experiment';
|
|
574
|
+
const blob = await exportAsJsonBlob(exportedData, name, 2);
|
|
575
|
+
saveAs({ blob, name, extension: '.nmrium' });
|
|
572
576
|
}
|
|
@@ -77,8 +77,6 @@ export function usePhaseCorrectionTwoDimensions(filter: Filter2DEntry | null) {
|
|
|
77
77
|
(phaseOptions as any)[direction] = { ph0, ph1 };
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
// TODO: change this to not use an effect
|
|
81
|
-
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
82
80
|
setValue(phaseOptions);
|
|
83
81
|
valueRef.current = phaseOptions;
|
|
84
82
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { MoleculeView } from '@zakodium/nmrium-core';
|
|
2
|
+
|
|
3
|
+
import { useDispatch } from '../../context/DispatchContext.tsx';
|
|
4
|
+
|
|
5
|
+
type Annotation = MoleculeView['atomAnnotation'];
|
|
6
|
+
|
|
7
|
+
export function useMoleculeAnnotationCore(
|
|
8
|
+
id: string,
|
|
9
|
+
moleculeView: MoleculeView,
|
|
10
|
+
) {
|
|
11
|
+
const dispatch = useDispatch();
|
|
12
|
+
const { atomAnnotation: baseAtomAnnotation } = moleculeView || {};
|
|
13
|
+
function isAnnotation(annotation: Annotation) {
|
|
14
|
+
return baseAtomAnnotation === annotation;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function handleChangeAtomAnnotation(annotation: Annotation) {
|
|
18
|
+
const atomAnnotation =
|
|
19
|
+
baseAtomAnnotation === annotation ? 'none' : annotation;
|
|
20
|
+
dispatch({
|
|
21
|
+
type: 'CHANGE_MOLECULE_ANNOTATION',
|
|
22
|
+
payload: { id, atomAnnotation },
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function handleToggleMoleculeLabel() {
|
|
26
|
+
dispatch({
|
|
27
|
+
type: 'TOGGLE_MOLECULE_LABEL',
|
|
28
|
+
payload: { id },
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
handleToggleMoleculeLabel,
|
|
33
|
+
isAnnotation,
|
|
34
|
+
handleChangeAtomAnnotation,
|
|
35
|
+
};
|
|
36
|
+
}
|
package/src/component/panels/multipleAnalysisPanel/preferences/MultipleAnalysisCodeEditor.tsx
CHANGED
|
@@ -23,8 +23,6 @@ function MultipleAnalysisCodeEditor({ data }: MultipleAnalysisCodeEditorProps) {
|
|
|
23
23
|
useEffect(() => {
|
|
24
24
|
const evalResult = evaluate(code, data);
|
|
25
25
|
if (evalResult instanceof Error) {
|
|
26
|
-
// TODO: change this to not use an effect.
|
|
27
|
-
// eslint-disable-next-line react-hooks/set-state-in-effect
|
|
28
26
|
setResult(evalResult.message);
|
|
29
27
|
} else {
|
|
30
28
|
setValue('code', code);
|
|
@@ -29,8 +29,9 @@ const ignoreActions = new Set<Partial<Action['type']>>([
|
|
|
29
29
|
'TOGGLE_REAL_IMAGINARY_VISIBILITY',
|
|
30
30
|
'FLOAT_MOLECULE_OVER_SPECTRUM',
|
|
31
31
|
'TOGGLE_SPECTRA_LEGEND',
|
|
32
|
-
'
|
|
32
|
+
'CHANGE_MOLECULE_ANNOTATION',
|
|
33
33
|
'SET_2D_LEVEL',
|
|
34
|
+
'TOGGLE_MOLECULE_LABEL',
|
|
34
35
|
]);
|
|
35
36
|
|
|
36
37
|
function checkActionType(type: Action['type']): boolean {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BaselineCorrectionZone } from '@zakodium/nmr-types';
|
|
2
2
|
import type { Spectrum, ViewState } from '@zakodium/nmrium-core';
|
|
3
3
|
import type { Source } from 'file-collection';
|
|
4
|
+
import { FileCollection } from 'file-collection';
|
|
4
5
|
import type { Draft } from 'immer';
|
|
5
6
|
import { original, produce } from 'immer';
|
|
6
7
|
import type { CorrelationData } from 'nmr-correlation';
|
|
@@ -22,7 +23,7 @@ import * as DomainActions from './actions/DomainActions.js';
|
|
|
22
23
|
import * as FiltersActions from './actions/FiltersActions.js';
|
|
23
24
|
import * as InsetActions from './actions/InsetActions.js';
|
|
24
25
|
import * as IntegralsActions from './actions/IntegralsActions.js';
|
|
25
|
-
import
|
|
26
|
+
import { LoadActions } from './actions/LoadAction.js';
|
|
26
27
|
import * as MoleculeActions from './actions/MoleculeActions.js';
|
|
27
28
|
import * as PeaksActions from './actions/PeaksActions.js';
|
|
28
29
|
import * as PreferencesActions from './actions/PreferencesActions.js';
|
|
@@ -113,6 +114,8 @@ export function getDefaultViewState(): ViewState {
|
|
|
113
114
|
}
|
|
114
115
|
export const getInitialState = (): State => ({
|
|
115
116
|
actionType: 'INITIALIZE_NMRIUM',
|
|
117
|
+
sources: {},
|
|
118
|
+
aggregator: new FileCollection(),
|
|
116
119
|
data: [],
|
|
117
120
|
tempData: null,
|
|
118
121
|
xDomain: [],
|
|
@@ -187,10 +190,24 @@ export interface State {
|
|
|
187
190
|
* base on the action type we can decide to trigger or not the callback function (onDataChange)
|
|
188
191
|
*/
|
|
189
192
|
actionType: Action['type'];
|
|
193
|
+
|
|
190
194
|
/**
|
|
191
195
|
* web source of data
|
|
196
|
+
* Record key is an identifier of the source (stored in spectra)
|
|
197
|
+
*
|
|
198
|
+
* Is needed until we remove the support of the old nmrium format
|
|
199
|
+
*/
|
|
200
|
+
sources: Record<string, Source>;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Aggregation of file collections used to load the data
|
|
204
|
+
* - external data sources (web-source, import jdx from url, ...)
|
|
205
|
+
* - multiples files open / drag and drop
|
|
206
|
+
*
|
|
207
|
+
* Each of them is separated in an uuid folder
|
|
192
208
|
*/
|
|
193
|
-
|
|
209
|
+
aggregator: FileCollection;
|
|
210
|
+
|
|
194
211
|
/**
|
|
195
212
|
* spectra list (1d and 2d)
|
|
196
213
|
*/
|
|
@@ -658,10 +675,12 @@ function innerSpectrumReducer(draft: Draft<State>, action: Action) {
|
|
|
658
675
|
return MoleculeActions.handlePredictSpectraFromMolecule(draft, action);
|
|
659
676
|
case 'FLOAT_MOLECULE_OVER_SPECTRUM':
|
|
660
677
|
return MoleculeActions.handleFloatMoleculeOverSpectrum(draft, action);
|
|
661
|
-
case '
|
|
662
|
-
return MoleculeActions.
|
|
678
|
+
case 'CHANGE_MOLECULE_ANNOTATION':
|
|
679
|
+
return MoleculeActions.handleChangeMoleculeAnnotation(draft, action);
|
|
663
680
|
case 'CHANGE_FLOAT_MOLECULE_POSITION':
|
|
664
681
|
return MoleculeActions.handleChangeFloatMoleculePosition(draft, action);
|
|
682
|
+
case 'TOGGLE_MOLECULE_LABEL':
|
|
683
|
+
return MoleculeActions.handleToggleMoleculeLabel(draft, action);
|
|
665
684
|
|
|
666
685
|
case 'SET_CORRELATIONS_MF':
|
|
667
686
|
return CorrelationsActions.handleSetMF(draft, action);
|
|
@@ -719,6 +738,11 @@ function innerSpectrumReducer(draft: Draft<State>, action: Action) {
|
|
|
719
738
|
draft,
|
|
720
739
|
action,
|
|
721
740
|
);
|
|
741
|
+
case 'CHANGE_ASSIGNMENT_LABEL_BY_DIAIDS':
|
|
742
|
+
return RangesActions.handleChangeRangesAssignmentLabelsByDiaIds(
|
|
743
|
+
draft,
|
|
744
|
+
action,
|
|
745
|
+
);
|
|
722
746
|
|
|
723
747
|
case 'SET_KEY_PREFERENCES':
|
|
724
748
|
return PreferencesActions.handleSetKeyPreferences(draft, action);
|
|
@@ -59,6 +59,7 @@ function handleResurrectSpectrum(
|
|
|
59
59
|
ranges,
|
|
60
60
|
signals,
|
|
61
61
|
solvent,
|
|
62
|
+
meta = {},
|
|
62
63
|
names = [],
|
|
63
64
|
id: spectrumID,
|
|
64
65
|
} = databaseEntry;
|
|
@@ -114,6 +115,8 @@ function handleResurrectSpectrum(
|
|
|
114
115
|
|
|
115
116
|
if (!resurrectedSpectrum) return;
|
|
116
117
|
|
|
118
|
+
resurrectedSpectrum.customInfo = meta;
|
|
119
|
+
|
|
117
120
|
draft.data.push(resurrectedSpectrum);
|
|
118
121
|
|
|
119
122
|
setDomain(draft, { isYDomainShared: false });
|
|
@@ -106,7 +106,7 @@ function addIntegral(datum: Spectrum1D, options: AddIntegralOptions) {
|
|
|
106
106
|
|
|
107
107
|
const shiftX = getShiftX(datum);
|
|
108
108
|
const integration = xyIntegration({ x, y: re }, { from, to });
|
|
109
|
-
const integral = {
|
|
109
|
+
const integral: Integral = {
|
|
110
110
|
id: crypto.randomUUID(),
|
|
111
111
|
originalFrom: from - shiftX,
|
|
112
112
|
originalTo: to - shiftX,
|