nmrium 1.8.0 → 1.10.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/ApodizationLine.js +1 -1
- package/lib/component/1d/ApodizationLine.js.map +1 -1
- package/lib/component/1d/BrushTracker1D.d.ts.map +1 -1
- package/lib/component/1d/BrushTracker1D.js.map +1 -1
- package/lib/component/1d/FooterBanner.js.map +1 -1
- package/lib/component/1d/LinesSeries.js +2 -2
- package/lib/component/1d/LinesSeries.js.map +1 -1
- package/lib/component/1d/SVGContent1D.d.ts.map +1 -1
- package/lib/component/1d/SVGContent1D.js +2 -1
- package/lib/component/1d/SVGContent1D.js.map +1 -1
- package/lib/component/1d/SimilarityTree.d.ts.map +1 -1
- package/lib/component/1d/SimilarityTree.js.map +1 -1
- package/lib/component/1d/inset/InsetProvider.d.ts.map +1 -1
- package/lib/component/1d/inset/InsetProvider.js.map +1 -1
- package/lib/component/1d/integral/IntegralResizable.d.ts.map +1 -1
- package/lib/component/1d/integral/IntegralResizable.js.map +1 -1
- package/lib/component/1d/matrix/Boxplot.js.map +1 -1
- package/lib/component/1d/multiAnalysis/AnalysisRange.d.ts.map +1 -1
- package/lib/component/1d/multiAnalysis/AnalysisRange.js.map +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts.map +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +13 -20
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js.map +1 -1
- package/lib/component/1d/multiplicityTree/generateTreeNodes.d.ts +1 -0
- package/lib/component/1d/multiplicityTree/generateTreeNodes.d.ts.map +1 -1
- package/lib/component/1d/multiplicityTree/generateTreeNodes.js +2 -1
- package/lib/component/1d/multiplicityTree/generateTreeNodes.js.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.d.ts.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js.map +1 -1
- package/lib/component/1d/peaks/PeakEditionManager.d.ts.map +1 -1
- package/lib/component/1d/peaks/PeakEditionManager.js +2 -2
- package/lib/component/1d/peaks/PeakEditionManager.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.map +1 -1
- package/lib/component/1d/ranges/AssignmentLabel.d.ts +2 -1
- package/lib/component/1d/ranges/AssignmentLabel.d.ts.map +1 -1
- package/lib/component/1d/ranges/AssignmentLabel.js +6 -4
- package/lib/component/1d/ranges/AssignmentLabel.js.map +1 -1
- package/lib/component/1d/ranges/Atoms.js +2 -2
- package/lib/component/1d/ranges/Atoms.js.map +1 -1
- package/lib/component/1d/ranges/Range.d.ts +2 -1
- package/lib/component/1d/ranges/Range.d.ts.map +1 -1
- package/lib/component/1d/ranges/Range.js +28 -56
- package/lib/component/1d/ranges/Range.js.map +1 -1
- package/lib/component/1d/ranges/Ranges.d.ts.map +1 -1
- package/lib/component/1d/ranges/Ranges.js +19 -13
- package/lib/component/1d/ranges/Ranges.js.map +1 -1
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.d.ts +14 -0
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.d.ts.map +1 -0
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.js +67 -0
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.js.map +1 -0
- package/lib/component/1d/tool/BaseLineZones.d.ts.map +1 -1
- package/lib/component/1d/tool/BaseLineZones.js.map +1 -1
- package/lib/component/1d/utilities/intersectionResolver.d.ts.map +1 -1
- package/lib/component/1d/utilities/intersectionResolver.js.map +1 -1
- package/lib/component/1d-2d/FieldEdition.d.ts.map +1 -1
- package/lib/component/1d-2d/FieldEdition.js.map +1 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/phase-correction-traces/PhaseTraces.js +1 -1
- package/lib/component/2d/1d-tracer/phase-correction-traces/PhaseTraces.js.map +1 -1
- package/lib/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.js +1 -1
- package/lib/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.js.map +1 -1
- package/lib/component/2d/BrushTracker2D.d.ts.map +1 -1
- package/lib/component/2d/BrushTracker2D.js +41 -46
- package/lib/component/2d/BrushTracker2D.js.map +1 -1
- package/lib/component/2d/FooterBanner.d.ts +2 -2
- package/lib/component/2d/FooterBanner.d.ts.map +1 -1
- package/lib/component/2d/FooterBanner.js +63 -97
- package/lib/component/2d/FooterBanner.js.map +1 -1
- package/lib/component/2d/SVGContent2D.d.ts +2 -2
- package/lib/component/2d/SVGContent2D.d.ts.map +1 -1
- package/lib/component/2d/SVGContent2D.js.map +1 -1
- package/lib/component/2d/SlicingView.js +1 -1
- package/lib/component/2d/SlicingView.js.map +1 -1
- package/lib/component/2d/Viewer2D.js +1 -1
- package/lib/component/2d/Viewer2D.js.map +1 -1
- package/lib/component/2d/ft/FTContainer.d.ts +2 -2
- package/lib/component/2d/ft/FTContainer.d.ts.map +1 -1
- package/lib/component/2d/ft/FTContainer.js +1 -1
- package/lib/component/2d/ft/FTContainer.js.map +1 -1
- package/lib/component/2d/tools/XYLabelPointer.d.ts +2 -2
- package/lib/component/2d/tools/XYLabelPointer.d.ts.map +1 -1
- package/lib/component/2d/tools/XYLabelPointer.js +10 -9
- package/lib/component/2d/tools/XYLabelPointer.js.map +1 -1
- package/lib/component/2d/useTracesSpectra.d.ts +3 -2
- package/lib/component/2d/useTracesSpectra.d.ts.map +1 -1
- package/lib/component/2d/useTracesSpectra.js +17 -9
- package/lib/component/2d/useTracesSpectra.js.map +1 -1
- package/lib/component/2d/utilities/extractSpectrumSignals.js +2 -2
- package/lib/component/2d/utilities/extractSpectrumSignals.js.map +1 -1
- package/lib/component/2d/zones/Signal.js.map +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.d.ts.map +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.js +15 -13
- package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts +5 -6
- package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.js +2 -0
- package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.js +6 -0
- package/lib/component/EventsTrackers/KeysListenerTracker.js.map +1 -1
- package/lib/component/assignment/utilities/getAssignments.js +1 -2
- package/lib/component/assignment/utilities/getAssignments.js.map +1 -1
- package/lib/component/context/KeyModifierContext.d.ts +3 -2
- package/lib/component/context/KeyModifierContext.d.ts.map +1 -1
- package/lib/component/context/KeyModifierContext.js +7 -4
- package/lib/component/context/KeyModifierContext.js.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.d.ts.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.js +17 -3
- package/lib/component/elements/ActionsButtonsPopover.js.map +1 -1
- package/lib/component/elements/AssignmentsCell.d.ts.map +1 -1
- package/lib/component/elements/AssignmentsCell.js.map +1 -1
- package/lib/component/elements/Button.d.ts.map +1 -1
- package/lib/component/elements/Button.js.map +1 -1
- package/lib/component/elements/CheckController.d.ts.map +1 -1
- package/lib/component/elements/CheckController.js.map +1 -1
- package/lib/component/elements/ContextMenuBluePrint.d.ts.map +1 -1
- package/lib/component/elements/ContextMenuBluePrint.js.map +1 -1
- package/lib/component/elements/D3Axis.d.ts.map +1 -1
- package/lib/component/elements/DraggableDialog.d.ts.map +1 -1
- package/lib/component/elements/DraggableDialog.js.map +1 -1
- package/lib/component/elements/Input.d.ts.map +1 -1
- package/lib/component/elements/Input.js.map +1 -1
- package/lib/component/elements/Input2.d.ts.map +1 -1
- package/lib/component/elements/Input2.js.map +1 -1
- package/lib/component/elements/Input2Controller.d.ts.map +1 -1
- package/lib/component/elements/Input2Controller.js.map +1 -1
- package/lib/component/elements/Label.d.ts.map +1 -1
- package/lib/component/elements/Label.js.map +1 -1
- package/lib/component/elements/NumberInput2.d.ts.map +1 -1
- package/lib/component/elements/NumberInput2.js.map +1 -1
- package/lib/component/elements/NumberInput2Controller.d.ts.map +1 -1
- package/lib/component/elements/NumberInput2Controller.js.map +1 -1
- package/lib/component/elements/ReactTable/ReactTable.d.ts.map +1 -1
- package/lib/component/elements/ReactTable/ReactTable.js.map +1 -1
- package/lib/component/elements/ReadOnly.d.ts.map +1 -1
- package/lib/component/elements/ReadOnly.js.map +1 -1
- package/lib/component/elements/Sections.js.map +1 -1
- package/lib/component/elements/Select.d.ts.map +1 -1
- package/lib/component/elements/Select.js.map +1 -1
- package/lib/component/elements/ToolbarPopoverItem.d.ts.map +1 -1
- package/lib/component/elements/export/ExportContent.d.ts.map +1 -1
- package/lib/component/elements/export/ExportContent.js.map +1 -1
- package/lib/component/elements/print/PrintContent.d.ts.map +1 -1
- package/lib/component/elements/print/PrintContent.js.map +1 -1
- package/lib/component/hooks/useActiveSpectrumIntegralsViewState.d.ts.map +1 -1
- package/lib/component/hooks/useActiveSpectrumIntegralsViewState.js +2 -4
- package/lib/component/hooks/useActiveSpectrumIntegralsViewState.js.map +1 -1
- package/lib/component/hooks/useActiveSpectrumPeaksViewState.d.ts.map +1 -1
- package/lib/component/hooks/useActiveSpectrumPeaksViewState.js +2 -4
- package/lib/component/hooks/useActiveSpectrumPeaksViewState.js.map +1 -1
- package/lib/component/hooks/useActiveSpectrumRangesViewState.d.ts.map +1 -1
- package/lib/component/hooks/useActiveSpectrumRangesViewState.js +2 -4
- package/lib/component/hooks/useActiveSpectrumRangesViewState.js.map +1 -1
- package/lib/component/hooks/useActiveSpectrumStyleOptions.js +2 -2
- package/lib/component/hooks/useActiveSpectrumStyleOptions.js.map +1 -1
- package/lib/component/hooks/useActiveSpectrumZonesViewState.d.ts.map +1 -1
- package/lib/component/hooks/useActiveSpectrumZonesViewState.js +2 -4
- package/lib/component/hooks/useActiveSpectrumZonesViewState.js.map +1 -1
- package/lib/component/hooks/useExport.js +1 -1
- package/lib/component/hooks/useExport.js.map +1 -1
- package/lib/component/hooks/useSaveSettings.d.ts.map +1 -1
- package/lib/component/hooks/useSaveSettings.js +28 -47
- package/lib/component/hooks/useSaveSettings.js.map +1 -1
- package/lib/component/hooks/useSetActiveSpectrumAction.d.ts +2 -1
- package/lib/component/hooks/useSetActiveSpectrumAction.d.ts.map +1 -1
- package/lib/component/hooks/useSetActiveSpectrumAction.js +2 -2
- package/lib/component/hooks/useSetActiveSpectrumAction.js.map +1 -1
- package/lib/component/hooks/useSpectrumWithDataSource.js +1 -1
- package/lib/component/hooks/useSpectrumWithDataSource.js.map +1 -1
- package/lib/component/hooks/useWorkspaceAction.d.ts +1 -1
- package/lib/component/hooks/useWorkspaceAction.d.ts.map +1 -1
- package/lib/component/hooks/useWorkspaceAction.js +3 -0
- package/lib/component/hooks/useWorkspaceAction.js.map +1 -1
- package/lib/component/modal/ImportPublicationStringModal.d.ts.map +1 -1
- package/lib/component/modal/ImportPublicationStringModal.js.map +1 -1
- package/lib/component/modal/MultipletAnalysisModal.js +1 -1
- package/lib/component/modal/changeSum/ChangeSumModal.d.ts.map +1 -1
- package/lib/component/modal/changeSum/ChangeSumModal.js.map +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.d.ts.map +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.js.map +1 -1
- package/lib/component/modal/setting/GeneralSettings.d.ts.map +1 -1
- package/lib/component/modal/setting/GeneralSettings.js +5 -1
- package/lib/component/modal/setting/GeneralSettings.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +16 -14
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js +27 -18
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.js +0 -3
- package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesPanel.js +1 -1
- package/lib/component/panels/RangesPanel/RangesPanel.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.js +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.js +5 -20
- package/lib/component/panels/RangesPanel/RangesTableRow.js.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.js.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.d.ts +9 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.d.ts.map +1 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.js +19 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.js.map +1 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +2 -2
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +6 -6
- package/lib/component/panels/SummaryPanel/SummaryPanel.js.map +1 -1
- package/lib/component/panels/accordionItems.d.ts.map +1 -1
- package/lib/component/panels/accordionItems.js.map +1 -1
- package/lib/component/panels/databasePanel/DatabaseInfo.d.ts +5 -0
- package/lib/component/panels/databasePanel/DatabaseInfo.d.ts.map +1 -0
- package/lib/component/panels/databasePanel/DatabaseInfo.js +29 -0
- package/lib/component/panels/databasePanel/DatabaseInfo.js.map +1 -0
- package/lib/component/panels/databasePanel/DatabaseTable.d.ts.map +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.js +21 -3
- package/lib/component/panels/databasePanel/DatabaseTable.js.map +1 -1
- package/lib/component/panels/extra/preferences/NucleusPreferences.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/InformationEditionModal.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/InformationEditionModal.js +1 -1
- package/lib/component/panels/informationPanel/InformationEditionModal.js.map +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.d.ts.map +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.js +13 -9
- package/lib/component/panels/predictionPanel/PredictionPanel.js.map +1 -1
- package/lib/component/reducer/Reducer.js +7 -7
- package/lib/component/reducer/Reducer.js.map +1 -1
- package/lib/component/reducer/actions/AssignmentsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/AssignmentsActions.js +9 -9
- package/lib/component/reducer/actions/AssignmentsActions.js.map +1 -1
- package/lib/component/reducer/actions/CorrelationsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/CorrelationsActions.js +21 -21
- package/lib/component/reducer/actions/CorrelationsActions.js.map +1 -1
- package/lib/component/reducer/actions/DatabaseActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/DatabaseActions.js +5 -3
- package/lib/component/reducer/actions/DatabaseActions.js.map +1 -1
- package/lib/component/reducer/actions/DomainActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/DomainActions.js +10 -18
- package/lib/component/reducer/actions/DomainActions.js.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.js +28 -44
- package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
- package/lib/component/reducer/actions/InsetActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/InsetActions.js +9 -18
- package/lib/component/reducer/actions/InsetActions.js.map +1 -1
- package/lib/component/reducer/actions/IntegralsActions.d.ts +1 -1
- package/lib/component/reducer/actions/IntegralsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/IntegralsActions.js +43 -48
- package/lib/component/reducer/actions/IntegralsActions.js.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts +2 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.js +64 -10
- package/lib/component/reducer/actions/MoleculeActions.js.map +1 -1
- package/lib/component/reducer/actions/PeaksActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/PeaksActions.js +110 -121
- package/lib/component/reducer/actions/PeaksActions.js.map +1 -1
- package/lib/component/reducer/actions/PreferencesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/PreferencesActions.js +2 -1
- package/lib/component/reducer/actions/PreferencesActions.js.map +1 -1
- package/lib/component/reducer/actions/RangesActions.d.ts +18 -18
- package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/RangesActions.js +148 -171
- package/lib/component/reducer/actions/RangesActions.js.map +1 -1
- package/lib/component/reducer/actions/SpectraActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/SpectraActions.js +29 -31
- package/lib/component/reducer/actions/SpectraActions.js.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +10 -11
- package/lib/component/reducer/actions/ToolsActions.js.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.d.ts +8 -9
- package/lib/component/reducer/actions/ZonesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.js +123 -151
- package/lib/component/reducer/actions/ZonesActions.js.map +1 -1
- package/lib/component/reducer/helper/get2DRange.d.ts +3 -1
- package/lib/component/reducer/helper/get2DRange.d.ts.map +1 -1
- package/lib/component/reducer/helper/get2DRange.js.map +1 -1
- package/lib/component/reducer/helper/getSpectrum.js +1 -1
- package/lib/component/reducer/helper/getSpectrum.js.map +1 -1
- package/lib/component/reducer/helper/setIntegralsViewProperty.js +1 -1
- package/lib/component/reducer/helper/setIntegralsViewProperty.js.map +1 -1
- package/lib/component/reducer/helper/setRangesViewProperty.js +1 -1
- package/lib/component/reducer/helper/setRangesViewProperty.js.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js.map +1 -1
- package/lib/component/toolbar/ToolBar.d.ts.map +1 -1
- package/lib/component/toolbar/ToolBar.js +5 -1
- package/lib/component/toolbar/ToolBar.js.map +1 -1
- package/lib/component/toolbar/ToolTypes.js +1 -1
- package/lib/component/toolbar/ToolTypes.js.map +1 -1
- package/lib/component/useWatchForm.d.ts.map +1 -1
- package/lib/component/useWatchForm.js.map +1 -1
- package/lib/component/utility/filterDatabaseInfoEntry.d.ts +3 -0
- package/lib/component/utility/filterDatabaseInfoEntry.d.ts.map +1 -0
- package/lib/component/utility/filterDatabaseInfoEntry.js +9 -0
- package/lib/component/utility/filterDatabaseInfoEntry.js.map +1 -0
- package/lib/component/utility/stackOverlappingLabels.d.ts +1 -1
- package/lib/component/utility/stackOverlappingLabels.d.ts.map +1 -1
- package/lib/component/utility/stackOverlappingLabels.js.map +1 -1
- package/lib/component/workspaces/prediction.js +1 -1
- package/lib/component/workspaces/prediction.js.map +1 -1
- package/lib/component/workspaces/simulation.js +1 -1
- package/lib/component/workspaces/simulation.js.map +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js.map +1 -1
- package/lib/data/SpectraManager.d.ts.map +1 -1
- package/lib/data/SpectraManager.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.js +0 -3
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts +8 -1
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +1 -2
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeSignal.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeSignal.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.d.ts +4 -14
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.js +2 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.d.ts +3 -5
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js +3 -5
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts +2 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZones.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +7 -63
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js +9 -14
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.d.ts +2 -10
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js +23 -43
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +1 -54
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.js.map +1 -1
- package/lib/data/molecules/Molecule.d.ts.map +1 -1
- package/lib/data/molecules/Molecule.js.map +1 -1
- package/lib/data/molecules/MoleculeManager.d.ts +2 -1
- package/lib/data/molecules/MoleculeManager.d.ts.map +1 -1
- package/lib/data/molecules/MoleculeManager.js +30 -3
- package/lib/data/molecules/MoleculeManager.js.map +1 -1
- package/lib/data/types/data1d/RangeDetectionResult.d.ts.map +1 -1
- package/lib/data/utilities/FindUtilities.d.ts.map +1 -1
- package/lib/data/utilities/FindUtilities.js +11 -11
- package/lib/data/utilities/FindUtilities.js.map +1 -1
- package/lib/utils/clipboard/clipboardComponents.d.ts.map +1 -1
- package/lib/utils/clipboard/clipboardComponents.js.map +1 -1
- package/lib/utils/clipboard/clipboardHooks.d.ts +2 -2
- package/lib/utils/clipboard/clipboardHooks.d.ts.map +1 -1
- package/lib/utils/clipboard/clipboardHooks.js +8 -2
- package/lib/utils/clipboard/clipboardHooks.js.map +1 -1
- package/lib/versionInfo.d.ts.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/lib/versionInfo.js.map +1 -1
- package/package.json +28 -25
- package/src/component/1d/ApodizationLine.tsx +1 -1
- package/src/component/1d/BrushTracker1D.tsx +10 -10
- package/src/component/1d/FooterBanner.tsx +2 -2
- package/src/component/1d/LinesSeries.tsx +2 -2
- package/src/component/1d/SVGContent1D.tsx +6 -2
- package/src/component/1d/SimilarityTree.tsx +3 -2
- package/src/component/1d/inset/InsetProvider.tsx +4 -2
- package/src/component/1d/integral/IntegralResizable.tsx +2 -1
- package/src/component/1d/matrix/Boxplot.tsx +3 -3
- package/src/component/1d/multiAnalysis/AnalysisRange.tsx +2 -1
- package/src/component/1d/multiplicityTree/MultiplicityTree.tsx +24 -23
- package/src/component/1d/multiplicityTree/generateTreeNodes.ts +10 -1
- package/src/component/1d/peaks/PeakAnnotationsSpreadMode.tsx +4 -2
- package/src/component/1d/peaks/PeakEditionManager.tsx +8 -3
- package/src/component/1d/peaks/Peaks.tsx +5 -1
- package/src/component/1d/ranges/AssignmentLabel.tsx +8 -5
- package/src/component/1d/ranges/Atoms.tsx +2 -2
- package/src/component/1d/ranges/Range.tsx +42 -74
- package/src/component/1d/ranges/Ranges.tsx +33 -28
- package/src/component/1d/ranges/useAssignmentsPopoverActionsButtons.tsx +93 -0
- package/src/component/1d/tool/BaseLineZones.tsx +2 -1
- package/src/component/1d/utilities/intersectionResolver.ts +3 -4
- package/src/component/1d-2d/FieldEdition.tsx +2 -2
- package/src/component/2d/1d-tracer/VerticalSliceChart.tsx +2 -2
- package/src/component/2d/1d-tracer/phase-correction-traces/PhaseTraces.tsx +1 -1
- package/src/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.tsx +1 -1
- package/src/component/2d/BrushTracker2D.tsx +50 -55
- package/src/component/2d/FooterBanner.tsx +80 -105
- package/src/component/2d/SVGContent2D.tsx +2 -3
- package/src/component/2d/SlicingView.tsx +1 -1
- package/src/component/2d/Viewer2D.tsx +2 -2
- package/src/component/2d/ft/FTContainer.tsx +4 -5
- package/src/component/2d/tools/XYLabelPointer.tsx +12 -11
- package/src/component/2d/useTracesSpectra.ts +26 -13
- package/src/component/2d/utilities/extractSpectrumSignals.ts +2 -2
- package/src/component/2d/zones/Signal.tsx +1 -1
- package/src/component/2d/zones/SignalsGuideLines.tsx +21 -19
- package/src/component/2d/zones/ZonesAssignmentsLabels.tsx +4 -4
- package/src/component/EventsTrackers/BrushTracker.tsx +24 -17
- package/src/component/EventsTrackers/KeysListenerTracker.tsx +6 -0
- package/src/component/assignment/utilities/getAssignments.ts +1 -2
- package/src/component/context/KeyModifierContext.tsx +13 -5
- package/src/component/elements/ActionsButtonsPopover.tsx +25 -8
- package/src/component/elements/AssignmentsCell.tsx +1 -2
- package/src/component/elements/Button.tsx +3 -2
- package/src/component/elements/CheckController.tsx +2 -1
- package/src/component/elements/ContextMenuBluePrint.tsx +2 -1
- package/src/component/elements/D3Axis.tsx +3 -3
- package/src/component/elements/DraggableDialog.tsx +2 -1
- package/src/component/elements/Input.tsx +4 -2
- package/src/component/elements/Input2.tsx +1 -2
- package/src/component/elements/Input2Controller.tsx +2 -1
- package/src/component/elements/Label.tsx +2 -1
- package/src/component/elements/NumberInput2.tsx +4 -2
- package/src/component/elements/NumberInput2Controller.tsx +3 -1
- package/src/component/elements/ReactTable/ReactTable.tsx +1 -3
- package/src/component/elements/ReadOnly.tsx +4 -2
- package/src/component/elements/Sections.tsx +5 -4
- package/src/component/elements/Select.tsx +4 -2
- package/src/component/elements/ToolbarPopoverItem.tsx +3 -3
- package/src/component/elements/export/ExportContent.tsx +1 -2
- package/src/component/elements/print/PrintContent.tsx +1 -2
- package/src/component/hooks/useActiveSpectrumIntegralsViewState.ts +2 -6
- package/src/component/hooks/useActiveSpectrumPeaksViewState.ts +2 -6
- package/src/component/hooks/useActiveSpectrumRangesViewState.ts +2 -6
- package/src/component/hooks/useActiveSpectrumStyleOptions.ts +2 -2
- package/src/component/hooks/useActiveSpectrumZonesViewState.ts +2 -6
- package/src/component/hooks/useExport.tsx +1 -1
- package/src/component/hooks/useSaveSettings.tsx +68 -81
- package/src/component/hooks/useSetActiveSpectrumAction.ts +3 -2
- package/src/component/hooks/useSpectrumWithDataSource.ts +1 -1
- package/src/component/hooks/useWorkspaceAction.ts +5 -0
- package/src/component/modal/ImportPublicationStringModal.tsx +1 -2
- package/src/component/modal/MultipletAnalysisModal.tsx +1 -1
- package/src/component/modal/changeSum/ChangeSumModal.tsx +4 -2
- package/src/component/modal/metaImportation/MetaImportationModal.tsx +1 -2
- package/src/component/modal/setting/GeneralSettings.tsx +7 -2
- package/src/component/modal/setting/settings-tabs/ToolsTabContent.tsx +1 -1
- package/src/component/panels/IntegralsPanel/IntegralTable.tsx +4 -2
- package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +24 -18
- package/src/component/panels/MoleculesPanel/hooks/useAtomAssignment.tsx +32 -16
- package/src/component/panels/MoleculesPanel/utilities/getAssignIds.ts +0 -4
- package/src/component/panels/RangesPanel/RangesPanel.tsx +1 -1
- package/src/component/panels/RangesPanel/RangesTable.tsx +3 -8
- package/src/component/panels/RangesPanel/RangesTableRow.tsx +14 -47
- package/src/component/panels/RangesPanel/TableColumns/ActionsColumn.tsx +1 -2
- package/src/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.tsx +40 -0
- package/src/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.tsx +1 -2
- package/src/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.tsx +2 -2
- package/src/component/panels/SummaryPanel/SummaryPanel.tsx +6 -6
- package/src/component/panels/accordionItems.tsx +4 -2
- package/src/component/panels/databasePanel/DatabaseInfo.tsx +43 -0
- package/src/component/panels/databasePanel/DatabaseTable.tsx +33 -1
- package/src/component/panels/extra/preferences/NucleusPreferences.tsx +2 -2
- package/src/component/panels/informationPanel/InformationEditionModal.tsx +6 -2
- package/src/component/panels/predictionPanel/PredictionPanel.tsx +17 -9
- package/src/component/reducer/Reducer.ts +8 -8
- package/src/component/reducer/actions/AssignmentsActions.ts +8 -13
- package/src/component/reducer/actions/CorrelationsActions.ts +21 -22
- package/src/component/reducer/actions/DatabaseActions.ts +5 -3
- package/src/component/reducer/actions/DomainActions.ts +16 -22
- package/src/component/reducer/actions/FiltersActions.ts +34 -58
- package/src/component/reducer/actions/InsetActions.ts +9 -19
- package/src/component/reducer/actions/IntegralsActions.ts +48 -59
- package/src/component/reducer/actions/MoleculeActions.ts +94 -14
- package/src/component/reducer/actions/PeaksActions.ts +112 -136
- package/src/component/reducer/actions/PreferencesActions.ts +4 -3
- package/src/component/reducer/actions/RangesActions.ts +196 -244
- package/src/component/reducer/actions/SpectraActions.ts +40 -45
- package/src/component/reducer/actions/ToolsActions.ts +9 -13
- package/src/component/reducer/actions/ZonesActions.ts +158 -218
- package/src/component/reducer/helper/get2DRange.ts +4 -1
- package/src/component/reducer/helper/getSpectrum.ts +1 -1
- package/src/component/reducer/helper/setIntegralsViewProperty.ts +1 -1
- package/src/component/reducer/helper/setRangesViewProperty.ts +1 -1
- package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +1 -1
- package/src/component/toolbar/ToolBar.tsx +6 -1
- package/src/component/toolbar/ToolTypes.ts +1 -1
- package/src/component/useWatchForm.tsx +2 -1
- package/src/component/utility/filterDatabaseInfoEntry.ts +10 -0
- package/src/component/utility/stackOverlappingLabels.ts +4 -1
- package/src/component/workspaces/prediction.ts +1 -1
- package/src/component/workspaces/simulation.ts +1 -1
- package/src/component/workspaces/workspaceDefaultProperties.ts +1 -1
- package/src/data/SpectraManager.ts +0 -2
- package/src/data/data1d/Spectrum1D/isRangeAssigned.ts +0 -4
- package/src/data/data1d/Spectrum1D/ranges/autoRangesDetection.ts +15 -5
- package/src/data/data1d/Spectrum1D/ranges/changeRangeSignal.ts +5 -5
- package/src/data/data1d/Spectrum1D/ranges/detectRanges.ts +5 -14
- package/src/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.ts +2 -1
- package/src/data/data2d/Spectrum2D/initiateDatum2D.ts +2 -2
- package/src/data/data2d/Spectrum2D/zones/changeZoneSignal.ts +3 -5
- package/src/data/data2d/Spectrum2D/zones/detectZones.ts +3 -2
- package/src/data/data2d/Spectrum2D/zones/detectZonesManual.ts +19 -16
- package/src/data/data2d/Spectrum2D/zones/getDetectionZones.ts +35 -56
- package/src/data/data2d/Spectrum2D/zones/initiateZones.ts +1 -1
- package/src/data/molecules/Molecule.ts +2 -1
- package/src/data/molecules/MoleculeManager.ts +40 -4
- package/src/data/types/data1d/RangeDetectionResult.ts +4 -2
- package/src/data/utilities/FindUtilities.ts +9 -8
- package/src/utils/clipboard/clipboardComponents.tsx +2 -1
- package/src/utils/clipboard/clipboardHooks.ts +12 -6
- package/src/versionInfo.ts +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentColumn.d.ts +0 -8
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentColumn.d.ts.map +0 -1
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentColumn.js +0 -17
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentColumn.js.map +0 -1
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.d.ts +0 -17
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.d.ts.map +0 -1
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +0 -40
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js.map +0 -1
- package/src/component/panels/RangesPanel/TableColumns/RangeAssignmentColumn.tsx +0 -36
- package/src/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.tsx +0 -89
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Spectrum1D } from '@zakodium/nmrium-core';
|
|
2
1
|
import { xFindClosestIndex } from 'ml-spectra-processing';
|
|
3
2
|
import { Fragment, useMemo } from 'react';
|
|
4
3
|
import { MF } from 'react-mf';
|
|
@@ -16,13 +15,14 @@ import { useActiveSpectrum } from '../hooks/useActiveSpectrum.js';
|
|
|
16
15
|
import { useFormatNumberByNucleus } from '../hooks/useFormatNumberByNucleus.js';
|
|
17
16
|
import { options } from '../toolbar/ToolTypes.js';
|
|
18
17
|
|
|
18
|
+
import type { Spectrum1DTraces } from './useTracesSpectra.ts';
|
|
19
19
|
import type { Get2DDimensionLayoutReturn } from './utilities/DimensionLayout.js';
|
|
20
20
|
import { LAYOUT, getLayoutID } from './utilities/DimensionLayout.js';
|
|
21
21
|
import { get1DYScale, get2DXScale, get2DYScale } from './utilities/scale.js';
|
|
22
22
|
|
|
23
23
|
interface FooterBannerProps {
|
|
24
24
|
layout: Get2DDimensionLayoutReturn;
|
|
25
|
-
data1D:
|
|
25
|
+
data1D: Spectrum1DTraces;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export default function FooterBanner(props: FooterBannerProps) {
|
|
@@ -54,156 +54,131 @@ export default function FooterBanner(props: FooterBannerProps) {
|
|
|
54
54
|
|
|
55
55
|
const nuclei = activeTab.split(',');
|
|
56
56
|
const [formatX, formatY] = useFormatNumberByNucleus(nuclei);
|
|
57
|
+
const hasTraces = data1D.x || data1D.y;
|
|
57
58
|
|
|
58
59
|
const scaleX = useMemo(() => {
|
|
59
|
-
if (
|
|
60
|
-
return
|
|
60
|
+
if (selectedTool === options.slicing.id || !trackID) {
|
|
61
|
+
return null;
|
|
61
62
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
case LAYOUT.main: {
|
|
66
|
-
return get2DXScale({ width, margin, xDomain, mode });
|
|
67
|
-
}
|
|
68
|
-
case LAYOUT.left: {
|
|
69
|
-
return get2DYScale({ height, margin, yDomain });
|
|
70
|
-
}
|
|
71
|
-
default:
|
|
72
|
-
return null;
|
|
73
|
-
}
|
|
63
|
+
|
|
64
|
+
if (!hasTraces || trackID === 'MAIN' || trackID === 'TOP') {
|
|
65
|
+
return get2DXScale({ width, margin, xDomain, mode });
|
|
74
66
|
}
|
|
75
|
-
|
|
67
|
+
|
|
68
|
+
return get2DYScale({ height, margin, yDomain });
|
|
76
69
|
}, [
|
|
77
|
-
|
|
78
|
-
height,
|
|
79
|
-
margin,
|
|
70
|
+
hasTraces,
|
|
80
71
|
selectedTool,
|
|
81
|
-
trackID,
|
|
82
72
|
width,
|
|
73
|
+
margin,
|
|
83
74
|
xDomain,
|
|
84
|
-
yDomain,
|
|
85
75
|
mode,
|
|
76
|
+
trackID,
|
|
77
|
+
height,
|
|
78
|
+
yDomain,
|
|
86
79
|
]);
|
|
87
80
|
|
|
88
81
|
const scaleY = useMemo(() => {
|
|
89
|
-
if (
|
|
82
|
+
if (selectedTool === options.slicing.id || !trackID) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (!hasTraces || trackID === 'MAIN') {
|
|
90
87
|
return get2DYScale({ height, margin, yDomain });
|
|
91
88
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return get2DYScale({ height, margin, yDomain });
|
|
96
|
-
}
|
|
97
|
-
case LAYOUT.top: {
|
|
98
|
-
return data1D[0]
|
|
99
|
-
? get1DYScale(yDomains[data1D[0].id], margin.top)
|
|
100
|
-
: null;
|
|
101
|
-
}
|
|
102
|
-
case LAYOUT.left: {
|
|
103
|
-
return data1D[1]
|
|
104
|
-
? get1DYScale(yDomains[data1D[1].id], margin.left)
|
|
105
|
-
: null;
|
|
106
|
-
}
|
|
107
|
-
default:
|
|
108
|
-
return null;
|
|
109
|
-
}
|
|
89
|
+
|
|
90
|
+
if (trackID === 'TOP') {
|
|
91
|
+
return data1D.x ? get1DYScale(yDomains[data1D.x.id], margin.top) : null;
|
|
110
92
|
}
|
|
111
|
-
return null;
|
|
112
|
-
}, [data1D, height, margin, selectedTool, trackID, yDomain, yDomains]);
|
|
113
93
|
|
|
94
|
+
return data1D.y ? get1DYScale(yDomains[data1D.y.id], margin.left) : null;
|
|
95
|
+
}, [
|
|
96
|
+
data1D.x,
|
|
97
|
+
data1D.y,
|
|
98
|
+
hasTraces,
|
|
99
|
+
height,
|
|
100
|
+
margin,
|
|
101
|
+
selectedTool,
|
|
102
|
+
trackID,
|
|
103
|
+
yDomain,
|
|
104
|
+
yDomains,
|
|
105
|
+
]);
|
|
114
106
|
if (
|
|
115
107
|
!activeSpectrum ||
|
|
116
108
|
!position ||
|
|
117
109
|
position.y < 10 ||
|
|
118
110
|
position.x < 10 ||
|
|
119
111
|
position.x > width - margin.right ||
|
|
120
|
-
position.y > height - margin.bottom
|
|
121
|
-
!data1D
|
|
112
|
+
position.y > height - margin.bottom
|
|
122
113
|
) {
|
|
123
114
|
return <FooterContainer />;
|
|
124
115
|
}
|
|
125
|
-
const getRealYValue = (coordinate:
|
|
126
|
-
let
|
|
116
|
+
const getRealYValue = (coordinate: number) => {
|
|
117
|
+
let axis: 'x' | 'y' | null = null;
|
|
127
118
|
if (trackID === LAYOUT.top) {
|
|
128
|
-
|
|
119
|
+
axis = 'x';
|
|
129
120
|
} else if (trackID === LAYOUT.left) {
|
|
130
|
-
|
|
121
|
+
axis = 'y';
|
|
131
122
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
return
|
|
123
|
+
const spectrum = axis && data1D[axis];
|
|
124
|
+
|
|
125
|
+
if (!scaleX || !spectrum) {
|
|
126
|
+
return 1;
|
|
136
127
|
}
|
|
137
|
-
|
|
128
|
+
|
|
129
|
+
const datum = get1DDataXY(spectrum);
|
|
130
|
+
const xIndex = xFindClosestIndex(datum.x, scaleX.invert(coordinate));
|
|
131
|
+
return datum.y[xIndex];
|
|
138
132
|
};
|
|
139
133
|
|
|
140
134
|
const getXValue = (x: number | null = null) => {
|
|
141
|
-
if (scaleX
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
return scaleX.invert(x || position.x);
|
|
146
|
-
}
|
|
147
|
-
case LAYOUT.left: {
|
|
148
|
-
return scaleX.invert(x || position.y);
|
|
149
|
-
}
|
|
150
|
-
default:
|
|
151
|
-
return 0;
|
|
152
|
-
}
|
|
135
|
+
if (!scaleX || !trackID) return 0;
|
|
136
|
+
|
|
137
|
+
if (trackID === 'MAIN') {
|
|
138
|
+
return scaleX.invert(x || position.y);
|
|
153
139
|
}
|
|
154
|
-
return
|
|
140
|
+
// return if the trackID = "MAIN" | "TOP"
|
|
141
|
+
return scaleX.invert(x || position.x);
|
|
155
142
|
};
|
|
156
143
|
|
|
157
144
|
const getYValue = () => {
|
|
158
|
-
if (scaleY
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
return scaleY.invert(position.y);
|
|
163
|
-
}
|
|
164
|
-
case LAYOUT.left: {
|
|
165
|
-
return scaleY.invert(position.x);
|
|
166
|
-
}
|
|
167
|
-
default:
|
|
168
|
-
return 0;
|
|
169
|
-
}
|
|
145
|
+
if (!scaleY || !trackID) return 0;
|
|
146
|
+
|
|
147
|
+
if (trackID === 'LEFT') {
|
|
148
|
+
return scaleY.invert(position.x);
|
|
170
149
|
}
|
|
171
|
-
|
|
150
|
+
|
|
151
|
+
return scaleY.invert(position.y);
|
|
172
152
|
};
|
|
173
153
|
|
|
174
154
|
const getRation = () => {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
case LAYOUT.left: {
|
|
183
|
-
return (
|
|
184
|
-
(getRealYValue(startY) / (getRealYValue(endY) || Number.MIN_VALUE)) *
|
|
185
|
-
100
|
|
186
|
-
).toFixed(2);
|
|
187
|
-
}
|
|
188
|
-
default:
|
|
189
|
-
return 0;
|
|
155
|
+
if (!trackID || trackID === 'MAIN') return 0;
|
|
156
|
+
|
|
157
|
+
if (trackID === 'TOP') {
|
|
158
|
+
return (
|
|
159
|
+
(getRealYValue(startX) / (getRealYValue(endX) || Number.MIN_VALUE)) *
|
|
160
|
+
100
|
|
161
|
+
).toFixed(2);
|
|
190
162
|
}
|
|
163
|
+
|
|
164
|
+
// tracKId = "LEFT"
|
|
165
|
+
return (
|
|
166
|
+
(getRealYValue(startY) / (getRealYValue(endY) || Number.MIN_VALUE)) *
|
|
167
|
+
100
|
|
168
|
+
).toFixed(2);
|
|
191
169
|
};
|
|
192
170
|
|
|
193
171
|
const getDeltaX = () => {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
case LAYOUT.left: {
|
|
199
|
-
return (getXValue(startY) - getXValue(endY)).toPrecision(6);
|
|
200
|
-
}
|
|
201
|
-
default:
|
|
202
|
-
return 0;
|
|
172
|
+
if (!trackID || trackID === 'MAIN') return 0;
|
|
173
|
+
|
|
174
|
+
if (trackID === 'TOP') {
|
|
175
|
+
return (getXValue(startX) - getXValue(endX)).toPrecision(6);
|
|
203
176
|
}
|
|
177
|
+
|
|
178
|
+
return (getXValue(startY) - getXValue(endY)).toPrecision(6);
|
|
204
179
|
};
|
|
205
180
|
|
|
206
|
-
const getLabel = (label2d:
|
|
181
|
+
const getLabel = (label2d: string, label1d: string, nucleus: string) => {
|
|
207
182
|
return trackID === LAYOUT.main ? (
|
|
208
183
|
<Fragment>
|
|
209
184
|
{label2d} ( <MF mf={nucleus} /> )
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { Spectrum1D } from '@zakodium/nmrium-core';
|
|
2
|
-
|
|
3
1
|
import { ClipPathContainer } from '../1d-2d/components/ClipPathContainer.js';
|
|
4
2
|
import SpectrumInfoBlock from '../1d-2d/components/SpectrumInfoBlock.js';
|
|
5
3
|
import { ShareDataProvider } from '../context/ShareDataContext.js';
|
|
@@ -8,12 +6,13 @@ import XAxis from './XAxis.js';
|
|
|
8
6
|
import YAxis from './YAxis.js';
|
|
9
7
|
import { FidContainer } from './fid/FidContainer.js';
|
|
10
8
|
import { FTContainer } from './ft/FTContainer.js';
|
|
9
|
+
import type { Spectrum1DTraces } from './useTracesSpectra.ts';
|
|
11
10
|
import { SignalsGuideLines } from './zones/SignalsGuideLines.js';
|
|
12
11
|
import Zones from './zones/Zones.js';
|
|
13
12
|
import ZonesAssignmentsLabels from './zones/ZonesAssignmentsLabels.js';
|
|
14
13
|
|
|
15
14
|
interface Chart2DProps {
|
|
16
|
-
spectra
|
|
15
|
+
spectra: Spectrum1DTraces;
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
export function SVGContent2D({ spectra }: Chart2DProps) {
|
|
@@ -65,7 +65,7 @@ function Viewer2D(props: Viewer2DProps) {
|
|
|
65
65
|
<XYLabelPointer data1D={spectrumData} layout={DIMENSION} />
|
|
66
66
|
|
|
67
67
|
<>
|
|
68
|
-
{spectrumData
|
|
68
|
+
{spectrumData.x && (
|
|
69
69
|
<BrushXY
|
|
70
70
|
axis="X"
|
|
71
71
|
dimensionBorder={DIMENSION.TOP}
|
|
@@ -73,7 +73,7 @@ function Viewer2D(props: Viewer2DProps) {
|
|
|
73
73
|
margin={{ ...margin, top: 0, bottom: 0 }}
|
|
74
74
|
/>
|
|
75
75
|
)}
|
|
76
|
-
{spectrumData
|
|
76
|
+
{spectrumData.y && (
|
|
77
77
|
<BrushXY
|
|
78
78
|
axis="Y"
|
|
79
79
|
dimensionBorder={DIMENSION.LEFT}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import type { Spectrum1D } from '@zakodium/nmrium-core';
|
|
2
|
-
|
|
3
1
|
import { isFt2DSpectrum } from '../../../data/data2d/Spectrum2D/isSpectrum2D.js';
|
|
4
2
|
import { ClipPathContainer } from '../../1d-2d/components/ClipPathContainer.js';
|
|
5
3
|
import useSpectrum from '../../hooks/useSpectrum.js';
|
|
6
4
|
import Left1DChart from '../1d-tracer/Left1DChart.js';
|
|
7
5
|
import Top1DChart from '../1d-tracer/Top1DChart.js';
|
|
6
|
+
import type { Spectrum1DTraces } from '../useTracesSpectra.ts';
|
|
8
7
|
|
|
9
8
|
import Contours from './Contours.js';
|
|
10
9
|
|
|
11
10
|
interface FTContainerProps {
|
|
12
|
-
spectra
|
|
11
|
+
spectra: Spectrum1DTraces;
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
export function FTContainer(props: FTContainerProps) {
|
|
@@ -23,8 +22,8 @@ export function FTContainer(props: FTContainerProps) {
|
|
|
23
22
|
|
|
24
23
|
return (
|
|
25
24
|
<>
|
|
26
|
-
{spectra
|
|
27
|
-
{spectra
|
|
25
|
+
{spectra.x && <Top1DChart data={spectra.x} />}
|
|
26
|
+
{spectra.y && <Left1DChart data={spectra.y} />}
|
|
28
27
|
<ClipPathContainer>
|
|
29
28
|
<Contours />
|
|
30
29
|
</ClipPathContainer>
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Spectrum1D } from '@zakodium/nmrium-core';
|
|
2
1
|
import type { CSSProperties } from 'react';
|
|
3
2
|
import { useMemo } from 'react';
|
|
4
3
|
|
|
@@ -7,6 +6,7 @@ import { useMouseTracker } from '../../EventsTrackers/MouseTracker.js';
|
|
|
7
6
|
import { useChartData } from '../../context/ChartContext.js';
|
|
8
7
|
import { useActiveSpectrum } from '../../hooks/useActiveSpectrum.js';
|
|
9
8
|
import { useFormatNumberByNucleus } from '../../hooks/useFormatNumberByNucleus.js';
|
|
9
|
+
import type { Spectrum1DTraces } from '../useTracesSpectra.ts';
|
|
10
10
|
import type { Get2DDimensionLayoutReturn } from '../utilities/DimensionLayout.js';
|
|
11
11
|
import { LAYOUT, getLayoutID } from '../utilities/DimensionLayout.js';
|
|
12
12
|
import { get1DYScale, useScale2DX, useScale2DY } from '../utilities/scale.js';
|
|
@@ -24,7 +24,7 @@ const style: CSSProperties = {
|
|
|
24
24
|
|
|
25
25
|
interface XYLabelPointerProps {
|
|
26
26
|
layout: Get2DDimensionLayoutReturn;
|
|
27
|
-
data1D:
|
|
27
|
+
data1D: Spectrum1DTraces;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export default function XYLabelPointer(props: XYLabelPointerProps) {
|
|
@@ -53,9 +53,10 @@ export default function XYLabelPointer(props: XYLabelPointerProps) {
|
|
|
53
53
|
const [formatX, formatY] = useFormatNumberByNucleus(nuclei);
|
|
54
54
|
const scale2DX = useScale2DX();
|
|
55
55
|
const scale2DY = useScale2DY();
|
|
56
|
+
const hasTraces = data1D.x || data1D.y;
|
|
56
57
|
|
|
57
58
|
const scaleX = useMemo(() => {
|
|
58
|
-
if (!activeSpectrum ||
|
|
59
|
+
if (!activeSpectrum || !hasTraces) {
|
|
59
60
|
return scale2DX;
|
|
60
61
|
}
|
|
61
62
|
|
|
@@ -70,10 +71,10 @@ export default function XYLabelPointer(props: XYLabelPointerProps) {
|
|
|
70
71
|
default:
|
|
71
72
|
return null;
|
|
72
73
|
}
|
|
73
|
-
}, [activeSpectrum,
|
|
74
|
+
}, [activeSpectrum, hasTraces, scale2DX, scale2DY, trackID]);
|
|
74
75
|
|
|
75
76
|
const scaleY = useMemo(() => {
|
|
76
|
-
if (!activeSpectrum ||
|
|
77
|
+
if (!activeSpectrum || !hasTraces) {
|
|
77
78
|
return scale2DY;
|
|
78
79
|
}
|
|
79
80
|
switch (trackID) {
|
|
@@ -81,13 +82,11 @@ export default function XYLabelPointer(props: XYLabelPointerProps) {
|
|
|
81
82
|
return scale2DY;
|
|
82
83
|
}
|
|
83
84
|
case LAYOUT.top: {
|
|
84
|
-
return data1D[
|
|
85
|
-
? get1DYScale(yDomains[data1D[0].id], margin.top)
|
|
86
|
-
: null;
|
|
85
|
+
return data1D.x ? get1DYScale(yDomains[data1D.x.id], margin.top) : null;
|
|
87
86
|
}
|
|
88
87
|
case LAYOUT.left: {
|
|
89
|
-
return data1D
|
|
90
|
-
? get1DYScale(yDomains[data1D
|
|
88
|
+
return data1D.y
|
|
89
|
+
? get1DYScale(yDomains[data1D.y.id], margin.left)
|
|
91
90
|
: null;
|
|
92
91
|
}
|
|
93
92
|
default:
|
|
@@ -95,7 +94,9 @@ export default function XYLabelPointer(props: XYLabelPointerProps) {
|
|
|
95
94
|
}
|
|
96
95
|
}, [
|
|
97
96
|
activeSpectrum,
|
|
98
|
-
data1D,
|
|
97
|
+
data1D.x,
|
|
98
|
+
data1D.y,
|
|
99
|
+
hasTraces,
|
|
99
100
|
margin.left,
|
|
100
101
|
margin.top,
|
|
101
102
|
scale2DY,
|
|
@@ -5,6 +5,7 @@ import type {
|
|
|
5
5
|
} from '@zakodium/nmrium-core';
|
|
6
6
|
import { useMemo } from 'react';
|
|
7
7
|
|
|
8
|
+
import { isFt1DSpectrum } from '../../data/data1d/Spectrum1D/isSpectrum1D.ts';
|
|
8
9
|
import { useChartData } from '../context/ChartContext.js';
|
|
9
10
|
|
|
10
11
|
export interface GetTracesSpectraOptions {
|
|
@@ -13,23 +14,35 @@ export interface GetTracesSpectraOptions {
|
|
|
13
14
|
spectra: Spectrum[];
|
|
14
15
|
}
|
|
15
16
|
|
|
17
|
+
export type Spectrum1DTraces = Record<'x' | 'y', Spectrum1D | null>;
|
|
18
|
+
|
|
19
|
+
const defaultEmptyTraces = { x: null, y: null };
|
|
20
|
+
|
|
16
21
|
export function getTracesSpectra(options: GetTracesSpectraOptions) {
|
|
17
22
|
const { nuclei, activeSpectra, spectra } = options;
|
|
18
23
|
|
|
19
|
-
|
|
24
|
+
if (nuclei.length !== 2) {
|
|
25
|
+
throw new Error(
|
|
26
|
+
'Invalid function call: this function should only run in a 2D nucleus context.',
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const traces: Spectrum1DTraces = { ...defaultEmptyTraces };
|
|
31
|
+
let index = 0;
|
|
20
32
|
for (const nucleus of nuclei) {
|
|
21
33
|
const traceSpectra = activeSpectra[nucleus];
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
datum.id === id && !datum.info.isFid && datum.info.dimension === 1,
|
|
27
|
-
) as Spectrum1D;
|
|
28
|
-
|
|
29
|
-
if (spectrum) {
|
|
30
|
-
traces.push(spectrum);
|
|
31
|
-
}
|
|
34
|
+
|
|
35
|
+
if (traceSpectra?.length !== 1) {
|
|
36
|
+
index++;
|
|
37
|
+
continue;
|
|
32
38
|
}
|
|
39
|
+
|
|
40
|
+
const id = traceSpectra[0].id;
|
|
41
|
+
const spectrum = spectra.find((datum) => datum.id === id);
|
|
42
|
+
const key = index === 0 ? 'x' : 'y';
|
|
43
|
+
traces[key] = isFt1DSpectrum(spectrum) ? spectrum : null;
|
|
44
|
+
|
|
45
|
+
index++;
|
|
33
46
|
}
|
|
34
47
|
return traces;
|
|
35
48
|
}
|
|
@@ -43,9 +56,9 @@ export function useTracesSpectra() {
|
|
|
43
56
|
} = useChartData();
|
|
44
57
|
|
|
45
58
|
return useMemo(() => {
|
|
46
|
-
|
|
59
|
+
if (!activeTab) return { ...defaultEmptyTraces };
|
|
47
60
|
|
|
48
|
-
|
|
61
|
+
const nuclei = activeTab.split(',');
|
|
49
62
|
|
|
50
63
|
return getTracesSpectra({ nuclei, spectra, activeSpectra });
|
|
51
64
|
}, [activeTab, spectra, activeSpectra]);
|
|
@@ -36,14 +36,14 @@ export function extractSpectrumSignals<T extends object = object>(
|
|
|
36
36
|
|
|
37
37
|
if (!isInRange) continue;
|
|
38
38
|
|
|
39
|
-
const {
|
|
39
|
+
const { signals = [] } = range;
|
|
40
40
|
let index = 0;
|
|
41
41
|
for (const signal of signals) {
|
|
42
42
|
const { kind } = signal;
|
|
43
43
|
if (kind && signalKindsToInclude.has(kind)) {
|
|
44
44
|
result.push({
|
|
45
45
|
...signal,
|
|
46
|
-
assignment: index === 0 ? assignment : '',
|
|
46
|
+
assignment: index === 0 ? signal.assignment : '',
|
|
47
47
|
...include?.(range),
|
|
48
48
|
} as ExtractedSignal<T>);
|
|
49
49
|
index++;
|
|
@@ -15,7 +15,7 @@ function Signal({ signal }: SignalProps) {
|
|
|
15
15
|
const scaleX = useScale2DX();
|
|
16
16
|
const scaleY = useScale2DY();
|
|
17
17
|
|
|
18
|
-
const buildIDs = useCallback((id:
|
|
18
|
+
const buildIDs = useCallback((id: string) => {
|
|
19
19
|
return [id].concat(buildID(id, 'X'), buildID(id, 'Y'));
|
|
20
20
|
}, []);
|
|
21
21
|
const assignment = useAssignment(signal?.id || '');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
|
-
import type { Range } from '@zakodium/nmr-types';
|
|
2
|
+
import type { Range, Signal1D } from '@zakodium/nmr-types';
|
|
3
3
|
import type { Spectrum1D } from '@zakodium/nmrium-core';
|
|
4
4
|
import { useRef } from 'react';
|
|
5
5
|
import { LuLink, LuUnlink } from 'react-icons/lu';
|
|
@@ -157,10 +157,10 @@ interface UseRangeAssignmentOptions {
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
function useRangeAssignment(options: UseRangeAssignmentOptions) {
|
|
160
|
-
const { rangeId, signalsIds, spectrumId } = options;
|
|
160
|
+
const { rangeId, signalsIds, spectrumId, signalId } = options;
|
|
161
161
|
|
|
162
162
|
const assignmentData = useAssignmentContext();
|
|
163
|
-
const assignmentContext = useAssignment(
|
|
163
|
+
const assignmentContext = useAssignment(signalId, spectrumId);
|
|
164
164
|
const highlightId = [rangeId]
|
|
165
165
|
.concat(assignmentContext.assignedDiaIds?.x || [])
|
|
166
166
|
.concat(filterAssignedIDs(assignmentData.data, signalsIds));
|
|
@@ -177,13 +177,15 @@ function isRangeSignalAssigned(
|
|
|
177
177
|
options: Pick<IndicationLineProps, 'range' | 'nbAtoms' | 'diaIDs'>,
|
|
178
178
|
) {
|
|
179
179
|
const { range, ...otherProps } = options;
|
|
180
|
-
if (isAssigned(range)) {
|
|
181
|
-
return true;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
180
|
return isAssigned(otherProps);
|
|
185
181
|
}
|
|
186
182
|
|
|
183
|
+
function hasDiaIds(signals: Signal1D[]) {
|
|
184
|
+
return signals.some(
|
|
185
|
+
(signal) => Array.isArray(signal?.diaIDs) && signal.diaIDs.length > 0,
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
187
189
|
function IndicationLine(props: IndicationLineProps) {
|
|
188
190
|
const isAssignBtnTrigged = useRef(false);
|
|
189
191
|
const {
|
|
@@ -197,7 +199,7 @@ function IndicationLine(props: IndicationLineProps) {
|
|
|
197
199
|
nbAtoms,
|
|
198
200
|
id: signalId,
|
|
199
201
|
} = props;
|
|
200
|
-
const { id: rangeId,
|
|
202
|
+
const { id: rangeId, signals } = range;
|
|
201
203
|
const highlightColor = useHighlightColor();
|
|
202
204
|
const isSignalAssigned = isRangeSignalAssigned({ range, diaIDs, nbAtoms });
|
|
203
205
|
|
|
@@ -213,7 +215,7 @@ function IndicationLine(props: IndicationLineProps) {
|
|
|
213
215
|
signalId,
|
|
214
216
|
});
|
|
215
217
|
|
|
216
|
-
const hasDiaIDs =
|
|
218
|
+
const hasDiaIDs = hasDiaIds(signals);
|
|
217
219
|
const isAssignmentActive = assignmentContext.isActive;
|
|
218
220
|
const isHighlighted = highlightContext.isActive || isAssignmentActive;
|
|
219
221
|
|
|
@@ -237,11 +239,12 @@ function IndicationLine(props: IndicationLineProps) {
|
|
|
237
239
|
|
|
238
240
|
function removeAssignmentLabel() {
|
|
239
241
|
dispatch({
|
|
240
|
-
type: '
|
|
242
|
+
type: 'CHANGE_1D_SIGNAL_ASSIGNMENT_LABEL',
|
|
241
243
|
payload: {
|
|
242
244
|
value: '',
|
|
243
245
|
rangeId,
|
|
244
246
|
spectrumId,
|
|
247
|
+
signalId,
|
|
245
248
|
},
|
|
246
249
|
});
|
|
247
250
|
}
|
|
@@ -263,7 +266,7 @@ function IndicationLine(props: IndicationLineProps) {
|
|
|
263
266
|
|
|
264
267
|
function unAssignHandler() {
|
|
265
268
|
dispatch({
|
|
266
|
-
type: '
|
|
269
|
+
type: 'UNASSIGN_1D_SIGNAL',
|
|
267
270
|
payload: {
|
|
268
271
|
rangeKey: rangeId,
|
|
269
272
|
spectrumId,
|
|
@@ -341,6 +344,7 @@ function IndicationLine(props: IndicationLineProps) {
|
|
|
341
344
|
axis={axis}
|
|
342
345
|
rangeId={rangeId}
|
|
343
346
|
spectrumId={spectrumId}
|
|
347
|
+
signalId={signalId}
|
|
344
348
|
/>
|
|
345
349
|
</g>
|
|
346
350
|
</ActionsButtonsPopover>
|
|
@@ -353,11 +357,12 @@ interface AssignmentLabelProps {
|
|
|
353
357
|
x: number;
|
|
354
358
|
y: number;
|
|
355
359
|
rangeId: string;
|
|
360
|
+
signalId: string;
|
|
356
361
|
spectrumId: string;
|
|
357
362
|
}
|
|
358
363
|
|
|
359
364
|
function AssignmentLabel(props: AssignmentLabelProps) {
|
|
360
|
-
const { axis, assignment, x, y, rangeId, spectrumId } = props;
|
|
365
|
+
const { axis, assignment, x, y, rangeId, signalId, spectrumId } = props;
|
|
361
366
|
const { isNewAssignment, dismissNewLabel } = useTriggerNewAssignmentLabel(
|
|
362
367
|
getAxisRangeId({ axis, rangeId }),
|
|
363
368
|
);
|
|
@@ -366,11 +371,12 @@ function AssignmentLabel(props: AssignmentLabelProps) {
|
|
|
366
371
|
function handleChange(value: string) {
|
|
367
372
|
dismissNewLabel();
|
|
368
373
|
dispatch({
|
|
369
|
-
type: '
|
|
374
|
+
type: 'CHANGE_1D_SIGNAL_ASSIGNMENT_LABEL',
|
|
370
375
|
payload: {
|
|
371
376
|
value,
|
|
372
377
|
rangeId,
|
|
373
378
|
spectrumId,
|
|
379
|
+
signalId,
|
|
374
380
|
},
|
|
375
381
|
});
|
|
376
382
|
}
|
|
@@ -413,12 +419,8 @@ export function SignalsGuideLines() {
|
|
|
413
419
|
|
|
414
420
|
return (
|
|
415
421
|
<ShareDataProvider>
|
|
416
|
-
{spectrumData
|
|
417
|
-
|
|
418
|
-
)}
|
|
419
|
-
{spectrumData[0] && (
|
|
420
|
-
<IndicationLines axis="y" spectrum={spectrumData[1]} />
|
|
421
|
-
)}
|
|
422
|
+
{spectrumData.x && <IndicationLines axis="x" spectrum={spectrumData.x} />}
|
|
423
|
+
{spectrumData.y && <IndicationLines axis="y" spectrum={spectrumData.y} />}
|
|
422
424
|
</ShareDataProvider>
|
|
423
425
|
);
|
|
424
426
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
2
|
import type { Signal1D, Zone, Zones as ZonesType } from '@zakodium/nmr-types';
|
|
3
|
-
import type { Spectrum2D } from '@zakodium/nmrium-core';
|
|
3
|
+
import type { Spectrum1D, Spectrum2D } from '@zakodium/nmrium-core';
|
|
4
4
|
import { useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
5
5
|
import { PiTextTSlash } from 'react-icons/pi';
|
|
6
6
|
|
|
@@ -40,7 +40,7 @@ interface TargetBoundary {
|
|
|
40
40
|
y2: number;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
function getDistance(x1:
|
|
43
|
+
function getDistance(x1: number, y1: number, x2: number, y2: number) {
|
|
44
44
|
const deltaX = x2 - x1;
|
|
45
45
|
const deltaY = y2 - y1;
|
|
46
46
|
return Math.hypot(deltaX, deltaY);
|
|
@@ -249,7 +249,7 @@ function findClosestAssignment(signals: Signal1D[], target: number) {
|
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
function getAssignmentLabel(
|
|
252
|
-
spectrum:
|
|
252
|
+
spectrum: Spectrum1D | null,
|
|
253
253
|
options: { from: number; to: number; center: number },
|
|
254
254
|
) {
|
|
255
255
|
if (!spectrum) return null;
|
|
@@ -264,7 +264,7 @@ function getDefaultAssignmentLabel(options: GetDefaultAssignmentOptions) {
|
|
|
264
264
|
const { signals, x, y } = zone;
|
|
265
265
|
if (signals.length === 0) return '';
|
|
266
266
|
|
|
267
|
-
const
|
|
267
|
+
const { x: topSpectrum, y: leftSpectrum } = getTracesSpectra({
|
|
268
268
|
activeSpectra,
|
|
269
269
|
nuclei,
|
|
270
270
|
spectra,
|