nmrium 1.9.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 +16 -10
- 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/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/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/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 +14 -10
- 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/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.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.js +1 -1
- 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/useWatchForm.d.ts.map +1 -1
- package/lib/component/useWatchForm.js.map +1 -1
- 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/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/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/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 +10 -4
- 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 +24 -22
- 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 +25 -14
- 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/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/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/panels/IntegralsPanel/IntegralTable.tsx +4 -2
- package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +17 -13
- 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/extra/preferences/NucleusPreferences.tsx +2 -2
- package/src/component/panels/informationPanel/InformationEditionModal.tsx +4 -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 +1 -1
- 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/useWatchForm.tsx +2 -1
- package/src/component/utility/stackOverlappingLabels.ts +4 -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/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/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 +14 -8
- 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
|
@@ -76,7 +76,7 @@ export function BrushTracker2D({ children }: Required<PropsWithChildren>) {
|
|
|
76
76
|
general: { invertScroll },
|
|
77
77
|
},
|
|
78
78
|
} = usePreferences();
|
|
79
|
-
function handleBrush(brushData:
|
|
79
|
+
function handleBrush(brushData: BrushTrackerData) {
|
|
80
80
|
const { startX, endX, startY, endY } = convertToPPM(brushData);
|
|
81
81
|
|
|
82
82
|
if (brushData.mouseButton === 'secondary') {
|
|
@@ -92,73 +92,68 @@ export function BrushTracker2D({ children }: Required<PropsWithChildren>) {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
const handleBrushEnd = useCallback<OnBrush>(
|
|
95
|
-
(brushData) => {
|
|
95
|
+
(brushData: BrushTrackerData) => {
|
|
96
96
|
const brushDataInPPM = convertToPPM(brushData);
|
|
97
97
|
|
|
98
98
|
//reset the brush start
|
|
99
99
|
brushStartRef.current = null;
|
|
100
100
|
|
|
101
|
-
const modifierKey = getModifiersKey(brushData
|
|
101
|
+
const modifierKey = getModifiersKey(brushData);
|
|
102
102
|
let executeDefaultAction = false;
|
|
103
|
+
const trackID = getLayoutID(DIMENSION, brushData);
|
|
103
104
|
|
|
104
|
-
if (brushData.mouseButton
|
|
105
|
-
const trackID = getLayoutID(DIMENSION, brushData);
|
|
106
|
-
if (trackID) {
|
|
107
|
-
switch (modifierKey) {
|
|
108
|
-
case primaryKeyIdentifier: {
|
|
109
|
-
switch (selectedTool) {
|
|
110
|
-
case options.zoom.id: {
|
|
111
|
-
executeDefaultAction = true;
|
|
112
|
-
break;
|
|
113
|
-
}
|
|
114
|
-
case options.zonePicking.id: {
|
|
115
|
-
dispatch({ type: 'ADD_2D_ZONE', payload: brushData });
|
|
105
|
+
if (brushData.mouseButton !== 'main' || !trackID) return;
|
|
116
106
|
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
default:
|
|
120
|
-
break;
|
|
121
|
-
}
|
|
107
|
+
const isPrimaryKeyIdentifier = modifierKey === primaryKeyIdentifier;
|
|
122
108
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
109
|
+
if (trackID === 'MAIN' && isPrimaryKeyIdentifier) {
|
|
110
|
+
switch (selectedTool) {
|
|
111
|
+
case options.zoom.id: {
|
|
112
|
+
executeDefaultAction = true;
|
|
113
|
+
break;
|
|
129
114
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
(selectedTool === 'zoom' && !brushData.shiftKey);
|
|
115
|
+
case options.zonePicking.id: {
|
|
116
|
+
dispatch({ type: 'ADD_2D_ZONE', payload: brushData });
|
|
133
117
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
default:
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
} else {
|
|
124
|
+
executeDefaultAction = true;
|
|
125
|
+
}
|
|
140
126
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
height,
|
|
145
|
-
...brushDetectionOptions,
|
|
146
|
-
}).type,
|
|
147
|
-
LEFT: 'Y',
|
|
148
|
-
TOP: 'X',
|
|
149
|
-
};
|
|
127
|
+
const isNotDistanceMeasurementTool =
|
|
128
|
+
selectedTool !== 'zoom' ||
|
|
129
|
+
(selectedTool === 'zoom' && !brushData.shiftKey);
|
|
150
130
|
|
|
151
|
-
|
|
131
|
+
if (
|
|
132
|
+
executeDefaultAction &&
|
|
133
|
+
selectedTool != null &&
|
|
134
|
+
isNotDistanceMeasurementTool
|
|
135
|
+
) {
|
|
136
|
+
const trackID = getLayoutID(DIMENSION, brushData);
|
|
152
137
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
138
|
+
const axisMap: Record<Layout, BrushAxis> = {
|
|
139
|
+
MAIN: detectBrushing(brushData, {
|
|
140
|
+
width,
|
|
141
|
+
height,
|
|
142
|
+
...brushDetectionOptions,
|
|
143
|
+
}).type,
|
|
144
|
+
LEFT: 'Y',
|
|
145
|
+
TOP: 'X',
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const axis: BrushAxis | null = trackID && axisMap[trackID];
|
|
149
|
+
|
|
150
|
+
return dispatch({
|
|
151
|
+
type: 'BRUSH_END',
|
|
152
|
+
payload: {
|
|
153
|
+
...brushDataInPPM,
|
|
154
|
+
axis,
|
|
155
|
+
},
|
|
156
|
+
});
|
|
162
157
|
}
|
|
163
158
|
},
|
|
164
159
|
[
|
|
@@ -175,7 +170,7 @@ export function BrushTracker2D({ children }: Required<PropsWithChildren>) {
|
|
|
175
170
|
|
|
176
171
|
const handleOnDoubleClick: OnDoubleClick = useCallback(
|
|
177
172
|
(event) => {
|
|
178
|
-
const keyModifiers = getModifiersKey(event
|
|
173
|
+
const keyModifiers = getModifiersKey(event);
|
|
179
174
|
|
|
180
175
|
if (primaryKeyIdentifier === keyModifiers && !isClickDebounced) return;
|
|
181
176
|
|
|
@@ -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,12 +56,10 @@ export function useTracesSpectra() {
|
|
|
43
56
|
} = useChartData();
|
|
44
57
|
|
|
45
58
|
return useMemo(() => {
|
|
46
|
-
if (!activeTab) return
|
|
59
|
+
if (!activeTab) return { ...defaultEmptyTraces };
|
|
47
60
|
|
|
48
61
|
const nuclei = activeTab.split(',');
|
|
49
62
|
|
|
50
|
-
if (nuclei.length !== 2) return [];
|
|
51
|
-
|
|
52
63
|
return getTracesSpectra({ nuclei, spectra, activeSpectra });
|
|
53
64
|
}, [activeTab, spectra, activeSpectra]);
|
|
54
65
|
}
|
|
@@ -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 || '');
|