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
|
@@ -19,6 +19,7 @@ export interface TreeNodes {
|
|
|
19
19
|
multiplicity?: string;
|
|
20
20
|
nodes: TreeNode[];
|
|
21
21
|
diaIDs?: string[];
|
|
22
|
+
assignment?: string;
|
|
22
23
|
min: number;
|
|
23
24
|
max: number;
|
|
24
25
|
}
|
|
@@ -78,7 +79,14 @@ export function generateTreeNodes(range: Range, spectrumData: Spectrum1D) {
|
|
|
78
79
|
for (const signal of signals || []) {
|
|
79
80
|
nodes = [];
|
|
80
81
|
|
|
81
|
-
const {
|
|
82
|
+
const {
|
|
83
|
+
multiplicity,
|
|
84
|
+
js,
|
|
85
|
+
delta,
|
|
86
|
+
id: signalKey,
|
|
87
|
+
diaIDs,
|
|
88
|
+
assignment,
|
|
89
|
+
} = signal;
|
|
82
90
|
const minMax = { min: delta, max: delta };
|
|
83
91
|
|
|
84
92
|
nodes.push({
|
|
@@ -104,6 +112,7 @@ export function generateTreeNodes(range: Range, spectrumData: Spectrum1D) {
|
|
|
104
112
|
rangeKey,
|
|
105
113
|
signalKey,
|
|
106
114
|
diaIDs,
|
|
115
|
+
assignment,
|
|
107
116
|
multiplicity,
|
|
108
117
|
nodes,
|
|
109
118
|
...minMax,
|
|
@@ -62,8 +62,10 @@ function usePeaksPosition() {
|
|
|
62
62
|
return { marginTop, isDragActive, onPointerDown };
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
interface PeakAnnotationsSpreadModeProps
|
|
66
|
-
|
|
65
|
+
interface PeakAnnotationsSpreadModeProps extends Omit<
|
|
66
|
+
PeaksAnnotationsProps,
|
|
67
|
+
'xDomain'
|
|
68
|
+
> {
|
|
67
69
|
height: number;
|
|
68
70
|
margin: Margin;
|
|
69
71
|
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
KeyboardEvent,
|
|
4
|
+
MouseEvent,
|
|
5
|
+
PropsWithChildren,
|
|
6
|
+
ReactNode,
|
|
7
|
+
} from 'react';
|
|
3
8
|
import {
|
|
4
9
|
createContext,
|
|
5
10
|
useCallback,
|
|
@@ -60,7 +65,7 @@ function usePeaksEditionManager() {
|
|
|
60
65
|
return context;
|
|
61
66
|
}
|
|
62
67
|
|
|
63
|
-
function stopPropagation(e:
|
|
68
|
+
function stopPropagation(e: MouseEvent) {
|
|
64
69
|
e.stopPropagation();
|
|
65
70
|
}
|
|
66
71
|
|
|
@@ -124,6 +129,7 @@ export function PeakEditionProvider({ children }: Required<PropsWithChildren>) {
|
|
|
124
129
|
onContextMenu={() => setPeak(null)}
|
|
125
130
|
style={{ position: 'relative' }}
|
|
126
131
|
>
|
|
132
|
+
{children}
|
|
127
133
|
{peak && (
|
|
128
134
|
<div
|
|
129
135
|
style={{
|
|
@@ -139,7 +145,6 @@ export function PeakEditionProvider({ children }: Required<PropsWithChildren>) {
|
|
|
139
145
|
/>
|
|
140
146
|
</div>
|
|
141
147
|
)}
|
|
142
|
-
{children}
|
|
143
148
|
</div>
|
|
144
149
|
</PeaksEditionContext.Provider>
|
|
145
150
|
);
|
|
@@ -170,7 +170,11 @@ const MemoizedPeaksPanel = memo(InnerPeaks);
|
|
|
170
170
|
|
|
171
171
|
const emptyData = { peaks: {}, ranges: {}, info: {}, display: {} };
|
|
172
172
|
|
|
173
|
-
|
|
173
|
+
interface PeaksProps {
|
|
174
|
+
peaksSource: PeaksSource;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export default function Peaks(props: PeaksProps) {
|
|
174
178
|
const { peaksSource } = props;
|
|
175
179
|
const {
|
|
176
180
|
view: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Range } from '@zakodium/nmr-types';
|
|
1
|
+
import type { Range, Signal1D } from '@zakodium/nmr-types';
|
|
2
2
|
import { useRef } from 'react';
|
|
3
3
|
|
|
4
4
|
import { FieldEdition } from '../../1d-2d/FieldEdition.js';
|
|
@@ -11,20 +11,22 @@ const marginTop = 15;
|
|
|
11
11
|
|
|
12
12
|
interface AssignmentLabelProps {
|
|
13
13
|
range: Range;
|
|
14
|
+
signal: Signal1D;
|
|
14
15
|
width: number;
|
|
15
16
|
stackIndex: number;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
export function AssignmentLabel(props: AssignmentLabelProps) {
|
|
19
|
-
const { range, width, stackIndex } = props;
|
|
20
|
-
const { id
|
|
20
|
+
const { range, width, stackIndex, signal } = props;
|
|
21
|
+
const { id } = range;
|
|
22
|
+
const { assignment } = signal;
|
|
21
23
|
const { showAssignmentsLabels } = useActiveSpectrumRangesViewState();
|
|
22
24
|
const dispatch = useDispatch();
|
|
23
25
|
const textRef = useRef<SVGTextElement>(null);
|
|
24
26
|
const { margin } = useChartData();
|
|
25
27
|
const { isNewAssignment, dismissNewLabel } = useTriggerNewAssignmentLabel(id);
|
|
26
28
|
|
|
27
|
-
if ((!
|
|
29
|
+
if ((!assignment || !showAssignmentsLabels) && !isNewAssignment) {
|
|
28
30
|
return null;
|
|
29
31
|
}
|
|
30
32
|
|
|
@@ -32,10 +34,11 @@ export function AssignmentLabel(props: AssignmentLabelProps) {
|
|
|
32
34
|
dismissNewLabel();
|
|
33
35
|
|
|
34
36
|
dispatch({
|
|
35
|
-
type: '
|
|
37
|
+
type: 'CHANGE_1D_SIGNAL_ASSIGNMENT_LABEL',
|
|
36
38
|
payload: {
|
|
37
39
|
value,
|
|
38
40
|
rangeId: id,
|
|
41
|
+
signalId: signal.id,
|
|
39
42
|
},
|
|
40
43
|
});
|
|
41
44
|
}
|
|
@@ -10,8 +10,8 @@ const fontSize = 12;
|
|
|
10
10
|
const marginTop = 45;
|
|
11
11
|
|
|
12
12
|
function getDiaIds(range: Range) {
|
|
13
|
-
const {
|
|
14
|
-
const ids =
|
|
13
|
+
const { signals } = range;
|
|
14
|
+
const ids = [];
|
|
15
15
|
for (const signal of signals) {
|
|
16
16
|
if (signal?.diaIDs) {
|
|
17
17
|
ids.push(...signal.diaIDs);
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { Range as RangeType } from '@zakodium/nmr-types';
|
|
2
2
|
import { useRef } from 'react';
|
|
3
|
-
import { LuLink, LuUnlink } from 'react-icons/lu';
|
|
4
|
-
import { PiTextTBold, PiTextTSlashBold } from 'react-icons/pi';
|
|
5
3
|
|
|
6
4
|
import {
|
|
7
5
|
isSpectrum1D,
|
|
@@ -17,55 +15,48 @@ import { filterAssignedIDs } from '../../assignment/utilities/filterAssignedIDs.
|
|
|
17
15
|
import { useChartData } from '../../context/ChartContext.js';
|
|
18
16
|
import { useDispatch } from '../../context/DispatchContext.js';
|
|
19
17
|
import { useLogger } from '../../context/LoggerContext.js';
|
|
20
|
-
import { useShareData } from '../../context/ShareDataContext.js';
|
|
21
|
-
import type { ActionsButtonsPopoverProps } from '../../elements/ActionsButtonsPopover.js';
|
|
22
18
|
import { ActionsButtonsPopover } from '../../elements/ActionsButtonsPopover.js';
|
|
23
19
|
import { useDialogData } from '../../elements/DialogManager.js';
|
|
24
20
|
import { ResizerWithScale } from '../../elements/ResizerWithScale.js';
|
|
21
|
+
import type { Position } from '../../elements/resizer/SVGResizer.tsx';
|
|
25
22
|
import { useHighlight } from '../../highlight/index.js';
|
|
26
23
|
import { useActiveSpectrumRangesViewState } from '../../hooks/useActiveSpectrumRangesViewState.js';
|
|
27
24
|
import { useHighlightColor } from '../../hooks/useHighlightColor.js';
|
|
28
25
|
import { useResizerStatus } from '../../hooks/useResizerStatus.js';
|
|
29
26
|
import useSpectrum from '../../hooks/useSpectrum.js';
|
|
30
27
|
import { EditRangeModal } from '../../modal/editRange/EditRangeModal.js';
|
|
28
|
+
import type { StackOverlappingLabelsMapReturnType } from '../../utility/stackOverlappingLabels.ts';
|
|
31
29
|
import { useIsInset } from '../inset/InsetProvider.js';
|
|
32
30
|
import { IntegralIndicator } from '../integral/IntegralIndicator.js';
|
|
33
31
|
import { useScaleX } from '../utilities/scale.js';
|
|
34
32
|
|
|
35
|
-
import { AssignmentLabel } from './AssignmentLabel.
|
|
33
|
+
import { AssignmentLabel } from './AssignmentLabel.tsx';
|
|
36
34
|
import { Atoms } from './Atoms.js';
|
|
35
|
+
import { useAssignmentsPopoverActionsButtons } from './useAssignmentsPopoverActionsButtons.tsx';
|
|
37
36
|
|
|
38
37
|
interface RangeProps {
|
|
39
38
|
selectedTool: string;
|
|
40
39
|
range: RangeType;
|
|
41
|
-
assignmentLabelStackIndex: number;
|
|
42
40
|
relativeFormat: string;
|
|
41
|
+
signalsStackIndexes: StackOverlappingLabelsMapReturnType;
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
const minWidth = 10;
|
|
46
45
|
|
|
47
46
|
function Range(options: RangeProps) {
|
|
48
|
-
const { range, selectedTool, relativeFormat,
|
|
49
|
-
|
|
50
|
-
const {
|
|
51
|
-
id,
|
|
52
|
-
integration,
|
|
53
|
-
signals,
|
|
54
|
-
from,
|
|
55
|
-
to,
|
|
56
|
-
diaIDs: rangeDiaIDs,
|
|
57
|
-
assignment,
|
|
58
|
-
} = range;
|
|
47
|
+
const { range, selectedTool, relativeFormat, signalsStackIndexes } = options;
|
|
48
|
+
const { id, integration, signals, from, to } = range;
|
|
59
49
|
const isInset = useIsInset();
|
|
60
50
|
const spectrum = useSpectrum();
|
|
61
51
|
const isAssignBtnTrigged = useRef(false);
|
|
62
52
|
const { margin } = useChartData();
|
|
53
|
+
const signal = signals?.[0];
|
|
63
54
|
|
|
64
55
|
const highlightColor = useHighlightColor();
|
|
65
56
|
const assignmentData = useAssignmentContext();
|
|
66
|
-
const
|
|
57
|
+
const signalAssignment = useAssignment(signal?.id || '');
|
|
67
58
|
const highlightRange = useHighlight(
|
|
68
|
-
[id].concat(
|
|
59
|
+
[id].concat(signalAssignment.assignedDiaIds?.x || []).concat(
|
|
69
60
|
filterAssignedIDs(
|
|
70
61
|
assignmentData.data,
|
|
71
62
|
signals.map((_signal) => _signal.id),
|
|
@@ -86,7 +77,7 @@ function Range(options: RangeProps) {
|
|
|
86
77
|
|
|
87
78
|
const isBlockedByEditing = selectedTool && isDialogOpen(EditRangeModal);
|
|
88
79
|
|
|
89
|
-
function handleOnStopResizing(position:
|
|
80
|
+
function handleOnStopResizing(position: Position) {
|
|
90
81
|
if (!spectrum || !isSpectrum1D(spectrum)) return;
|
|
91
82
|
const from = scaleX().invert(position.x2);
|
|
92
83
|
const to = scaleX().invert(position.x1);
|
|
@@ -105,80 +96,53 @@ function Range(options: RangeProps) {
|
|
|
105
96
|
}
|
|
106
97
|
|
|
107
98
|
function mouseEnterHandler() {
|
|
108
|
-
|
|
99
|
+
signalAssignment.highlight('x');
|
|
109
100
|
highlightRange.show();
|
|
110
101
|
}
|
|
111
102
|
|
|
112
103
|
function mouseLeaveHandler() {
|
|
113
|
-
|
|
104
|
+
signalAssignment.clearHighlight();
|
|
114
105
|
highlightRange.hide();
|
|
115
106
|
}
|
|
116
107
|
|
|
117
108
|
function assignHandler() {
|
|
118
109
|
if (!isBlockedByEditing) {
|
|
119
110
|
isAssignBtnTrigged.current = true;
|
|
120
|
-
|
|
111
|
+
signalAssignment.activate('x');
|
|
121
112
|
}
|
|
122
113
|
}
|
|
123
114
|
|
|
124
|
-
function unAssignHandler(
|
|
115
|
+
function unAssignHandler() {
|
|
125
116
|
dispatch({
|
|
126
|
-
type: '
|
|
117
|
+
type: 'UNASSIGN_1D_SIGNAL',
|
|
127
118
|
payload: {
|
|
128
119
|
rangeKey: range.id,
|
|
129
|
-
signalIndex,
|
|
120
|
+
signalIndex: 0,
|
|
130
121
|
},
|
|
131
122
|
});
|
|
132
123
|
}
|
|
133
|
-
const isAssignmentActive =
|
|
124
|
+
const isAssignmentActive = signalAssignment.isActive;
|
|
134
125
|
const opacity = getOpacityBasedOnSignalKind(range);
|
|
135
126
|
|
|
136
127
|
const isHighlighted =
|
|
137
128
|
isBlockedByEditing || highlightRange.isActive || isAssignmentActive;
|
|
138
129
|
|
|
139
|
-
const
|
|
130
|
+
const isSignalAssigned = isRangeAssigned(range);
|
|
140
131
|
const isResizingActive = useResizerStatus('rangePicking');
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
icon: <LuLink />,
|
|
156
|
-
onClick: assignHandler,
|
|
157
|
-
intent: 'success',
|
|
158
|
-
title: 'Assign range',
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
icon: <LuUnlink />,
|
|
162
|
-
onClick: () => unAssignHandler(),
|
|
163
|
-
intent: 'danger',
|
|
164
|
-
title: 'Unassign range',
|
|
165
|
-
visible: !!(isAssignmentActive || rangeDiaIDs),
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
icon: <PiTextTBold />,
|
|
169
|
-
onClick: () => addNewAssignmentLabel(range.id),
|
|
170
|
-
intent: 'success',
|
|
171
|
-
title: 'Add assignment label',
|
|
172
|
-
visible: !assignment,
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
icon: <PiTextTSlashBold />,
|
|
176
|
-
onClick: removeAssignmentLabel,
|
|
177
|
-
intent: 'danger',
|
|
178
|
-
title: 'Remove assignment label',
|
|
179
|
-
visible: !!assignment,
|
|
180
|
-
},
|
|
181
|
-
];
|
|
132
|
+
const hasOnlyOneSignal = signals.length === 1;
|
|
133
|
+
const isAssigned =
|
|
134
|
+
hasOnlyOneSignal && signal.diaIDs ? signal.diaIDs.length > 0 : false;
|
|
135
|
+
|
|
136
|
+
const actionsButtons = useAssignmentsPopoverActionsButtons({
|
|
137
|
+
isToggleMultiplicityTreeButtonVisible: !hasOnlyOneSignal,
|
|
138
|
+
isAssignButtonVisible: hasOnlyOneSignal,
|
|
139
|
+
isUnAssignButtonVisible: isAssignmentActive || isSignalAssigned,
|
|
140
|
+
isAssignLabelButtonVisible: hasOnlyOneSignal && !signal.assignment,
|
|
141
|
+
isUnAssignLabelButtonVisible: hasOnlyOneSignal && !!signal.assignment,
|
|
142
|
+
onAssign: assignHandler,
|
|
143
|
+
onUnAssign: unAssignHandler,
|
|
144
|
+
rangeId: range.id,
|
|
145
|
+
});
|
|
182
146
|
|
|
183
147
|
const isOpen = isAssignBtnTrigged.current ? isAssignmentActive : undefined;
|
|
184
148
|
|
|
@@ -236,12 +200,16 @@ function Range(options: RangeProps) {
|
|
|
236
200
|
fill={isHighlighted || isActive ? '#ff6f0057' : 'transparent'}
|
|
237
201
|
data-no-export="true"
|
|
238
202
|
/>
|
|
203
|
+
{range.signals.map((signal) => (
|
|
204
|
+
<AssignmentLabel
|
|
205
|
+
key={signal.id}
|
|
206
|
+
stackIndex={signalsStackIndexes?.[signal.id] || 0}
|
|
207
|
+
range={range}
|
|
208
|
+
width={rangeWidth}
|
|
209
|
+
signal={signal}
|
|
210
|
+
/>
|
|
211
|
+
))}
|
|
239
212
|
|
|
240
|
-
<AssignmentLabel
|
|
241
|
-
stackIndex={assignmentLabelStackIndex}
|
|
242
|
-
range={range}
|
|
243
|
-
width={rangeWidth}
|
|
244
|
-
/>
|
|
245
213
|
<Atoms range={range} x={rangeWidth / 2} />
|
|
246
214
|
|
|
247
215
|
{showIntegralsValues && (
|
|
@@ -7,7 +7,6 @@ import { memo } from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { useChartData } from '../../context/ChartContext.js';
|
|
9
9
|
import { useScaleChecked } from '../../context/ScaleContext.js';
|
|
10
|
-
import { ShareDataProvider } from '../../context/ShareDataContext.js';
|
|
11
10
|
import { usePanelPreferences } from '../../hooks/usePanelPreferences.js';
|
|
12
11
|
import useSpectrum from '../../hooks/useSpectrum.js';
|
|
13
12
|
import { useTextMetrics } from '../../hooks/useTextMetrics.ts';
|
|
@@ -26,6 +25,8 @@ const labelSize = 14;
|
|
|
26
25
|
type ProcessedRange = RangeType & {
|
|
27
26
|
labelWidth: number;
|
|
28
27
|
startPosition: number;
|
|
28
|
+
signalId: string;
|
|
29
|
+
assignment: string;
|
|
29
30
|
};
|
|
30
31
|
|
|
31
32
|
function useStackRangesAssignmentsLabels(ranges: RangeType[]) {
|
|
@@ -35,23 +36,32 @@ function useStackRangesAssignmentsLabels(ranges: RangeType[]) {
|
|
|
35
36
|
|
|
36
37
|
if (ranges.length === 0) return null;
|
|
37
38
|
|
|
38
|
-
const processedRanges: ProcessedRange[] =
|
|
39
|
-
const { from, assignment = '' } = range;
|
|
40
|
-
const labelWidth = getTextWidth(assignment);
|
|
39
|
+
const processedRanges: ProcessedRange[] = [];
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
for (const range of ranges) {
|
|
42
|
+
const { from, signals } = range;
|
|
43
|
+
|
|
44
|
+
const startPosition = scaleX()(from);
|
|
45
|
+
for (const signal of signals) {
|
|
46
|
+
const { id, assignment = '' } = signal;
|
|
47
|
+
const labelWidth = getTextWidth(assignment);
|
|
49
48
|
|
|
49
|
+
processedRanges.push({
|
|
50
|
+
...range,
|
|
51
|
+
labelWidth,
|
|
52
|
+
startPosition,
|
|
53
|
+
signalId: id,
|
|
54
|
+
assignment,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
processedRanges.sort((a, b) => b.startPosition - a.startPosition);
|
|
50
60
|
return stackOverlappingLabelsMap(processedRanges, {
|
|
51
61
|
startPositionKey: 'startPosition',
|
|
52
62
|
labelWidthKey: 'labelWidth',
|
|
53
63
|
padding: 0,
|
|
54
|
-
idKey: '
|
|
64
|
+
idKey: 'signalId',
|
|
55
65
|
});
|
|
56
66
|
}
|
|
57
67
|
|
|
@@ -63,23 +73,18 @@ function RangesInner({
|
|
|
63
73
|
const assignmentLabelsStackIndexes = useStackRangesAssignmentsLabels(
|
|
64
74
|
ranges.values,
|
|
65
75
|
);
|
|
66
|
-
|
|
67
76
|
return (
|
|
68
|
-
<
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
/>
|
|
80
|
-
))}
|
|
81
|
-
</g>
|
|
82
|
-
</ShareDataProvider>
|
|
77
|
+
<g>
|
|
78
|
+
{ranges.values.map((range) => (
|
|
79
|
+
<Range
|
|
80
|
+
key={range.id}
|
|
81
|
+
range={range}
|
|
82
|
+
selectedTool={selectedTool}
|
|
83
|
+
relativeFormat={relativeFormat}
|
|
84
|
+
signalsStackIndexes={assignmentLabelsStackIndexes || {}}
|
|
85
|
+
/>
|
|
86
|
+
))}
|
|
87
|
+
</g>
|
|
83
88
|
);
|
|
84
89
|
}
|
|
85
90
|
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { FaSitemap } from 'react-icons/fa';
|
|
2
|
+
import { LuLink, LuUnlink } from 'react-icons/lu';
|
|
3
|
+
import { PiTextTBold, PiTextTSlashBold } from 'react-icons/pi';
|
|
4
|
+
|
|
5
|
+
import { useDispatch } from '../../context/DispatchContext.tsx';
|
|
6
|
+
import { useShareData } from '../../context/ShareDataContext.tsx';
|
|
7
|
+
import type { ActionsButtonsPopoverProps } from '../../elements/ActionsButtonsPopover.tsx';
|
|
8
|
+
import { useActiveSpectrumRangesViewState } from '../../hooks/useActiveSpectrumRangesViewState.ts';
|
|
9
|
+
import { booleanToString } from '../../utility/booleanToString.ts';
|
|
10
|
+
|
|
11
|
+
interface UseAssignmentsPopoverActionsButtonsOptions {
|
|
12
|
+
isAssignButtonVisible?: boolean;
|
|
13
|
+
isUnAssignButtonVisible?: boolean;
|
|
14
|
+
isAssignLabelButtonVisible?: boolean;
|
|
15
|
+
isUnAssignLabelButtonVisible?: boolean;
|
|
16
|
+
isToggleMultiplicityTreeButtonVisible?: boolean;
|
|
17
|
+
onAssign: () => void;
|
|
18
|
+
onUnAssign: () => void;
|
|
19
|
+
rangeId: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function useAssignmentsPopoverActionsButtons(
|
|
23
|
+
options: UseAssignmentsPopoverActionsButtonsOptions,
|
|
24
|
+
): ActionsButtonsPopoverProps['buttons'] {
|
|
25
|
+
const {
|
|
26
|
+
rangeId,
|
|
27
|
+
onAssign,
|
|
28
|
+
onUnAssign,
|
|
29
|
+
isAssignButtonVisible,
|
|
30
|
+
isUnAssignButtonVisible,
|
|
31
|
+
isAssignLabelButtonVisible,
|
|
32
|
+
isUnAssignLabelButtonVisible,
|
|
33
|
+
isToggleMultiplicityTreeButtonVisible = false,
|
|
34
|
+
} = options;
|
|
35
|
+
const dispatch = useDispatch();
|
|
36
|
+
const { setData: addNewAssignmentLabel } = useShareData();
|
|
37
|
+
const { showMultiplicityTrees } = useActiveSpectrumRangesViewState();
|
|
38
|
+
function removeAssignmentLabel() {
|
|
39
|
+
dispatch({
|
|
40
|
+
type: 'CHANGE_1D_SIGNAL_ASSIGNMENT_LABEL',
|
|
41
|
+
payload: {
|
|
42
|
+
value: '',
|
|
43
|
+
rangeId,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function handleShowJGraph() {
|
|
49
|
+
dispatch({
|
|
50
|
+
type: 'TOGGLE_RANGES_VIEW_PROPERTY',
|
|
51
|
+
payload: { key: 'showMultiplicityTrees' },
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const actionsButtons: ActionsButtonsPopoverProps['buttons'] = [
|
|
56
|
+
{
|
|
57
|
+
icon: <FaSitemap />,
|
|
58
|
+
title: `${booleanToString(!showMultiplicityTrees)} J Graph`,
|
|
59
|
+
onClick: handleShowJGraph,
|
|
60
|
+
visible: isToggleMultiplicityTreeButtonVisible && !showMultiplicityTrees,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
icon: <LuLink />,
|
|
64
|
+
onClick: onAssign,
|
|
65
|
+
intent: 'success',
|
|
66
|
+
title: 'Assign multiplet',
|
|
67
|
+
visible: isAssignButtonVisible,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
icon: <LuUnlink />,
|
|
71
|
+
onClick: onUnAssign,
|
|
72
|
+
intent: 'danger',
|
|
73
|
+
title: 'Unassign multiplet',
|
|
74
|
+
visible: isUnAssignButtonVisible,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
icon: <PiTextTBold />,
|
|
78
|
+
onClick: () => addNewAssignmentLabel(rangeId),
|
|
79
|
+
intent: 'success',
|
|
80
|
+
title: 'Add assignment label',
|
|
81
|
+
visible: isAssignLabelButtonVisible,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
icon: <PiTextTSlashBold />,
|
|
85
|
+
onClick: removeAssignmentLabel,
|
|
86
|
+
intent: 'danger',
|
|
87
|
+
title: 'Remove assignment label',
|
|
88
|
+
visible: isUnAssignLabelButtonVisible,
|
|
89
|
+
},
|
|
90
|
+
];
|
|
91
|
+
|
|
92
|
+
return actionsButtons;
|
|
93
|
+
}
|
|
@@ -4,6 +4,7 @@ import { useChartData } from '../../context/ChartContext.js';
|
|
|
4
4
|
import { useDispatch } from '../../context/DispatchContext.js';
|
|
5
5
|
import { useScaleChecked } from '../../context/ScaleContext.js';
|
|
6
6
|
import { ResizerWithScale } from '../../elements/ResizerWithScale.js';
|
|
7
|
+
import type { Position } from '../../elements/resizer/SVGResizer.tsx';
|
|
7
8
|
import { useHighlight } from '../../highlight/index.js';
|
|
8
9
|
import { useResizerStatus } from '../../hooks/useResizerStatus.js';
|
|
9
10
|
import { useIsInset } from '../inset/InsetProvider.js';
|
|
@@ -44,7 +45,7 @@ function BaseLineZone(props: BaselineCorrectionZone) {
|
|
|
44
45
|
const { scaleX } = useScaleChecked();
|
|
45
46
|
const dispatch = useDispatch();
|
|
46
47
|
|
|
47
|
-
function handleOnStopResizing(position:
|
|
48
|
+
function handleOnStopResizing(position: Position) {
|
|
48
49
|
dispatch({
|
|
49
50
|
type: 'RESIZE_BASE_LINE_ZONE',
|
|
50
51
|
payload: {
|
|
@@ -9,8 +9,7 @@ interface GroupDataProps<T> {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
interface ResolveIntersectionProps<T>
|
|
12
|
-
extends GroupDataProps<T>,
|
|
13
|
-
ResolveGroupIntersectionProps {
|
|
12
|
+
extends GroupDataProps<T>, ResolveGroupIntersectionProps {
|
|
14
13
|
width?: number;
|
|
15
14
|
margin?: number;
|
|
16
15
|
}
|
|
@@ -51,8 +50,8 @@ function groupData<T>(data: T[], options: Required<GroupDataProps<T>>) {
|
|
|
51
50
|
return groups;
|
|
52
51
|
}
|
|
53
52
|
|
|
54
|
-
function resolveGroupsIntersection(
|
|
55
|
-
groups:
|
|
53
|
+
function resolveGroupsIntersection<T>(
|
|
54
|
+
groups: Array<ResolveData<T>>,
|
|
56
55
|
options: ResolveGroupIntersectionProps,
|
|
57
56
|
) {
|
|
58
57
|
const { maxIteration = 3, groupMargin = 0 } = options;
|
|
@@ -2,7 +2,7 @@ import type { PopoverProps } from '@blueprintjs/core';
|
|
|
2
2
|
import { Popover } from '@blueprintjs/core';
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
4
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
5
|
-
import type { ReactNode } from 'react';
|
|
5
|
+
import type { MouseEvent, ReactNode } from 'react';
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
import { useForm } from 'react-hook-form';
|
|
8
8
|
import * as Yup from 'yup';
|
|
@@ -34,7 +34,7 @@ const validationSchema = (inputType: 'number' | 'text') =>
|
|
|
34
34
|
value: (inputType === 'number' ? Yup.number() : Yup.string()).required(),
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
function stopPropagation(e:
|
|
37
|
+
function stopPropagation(e: MouseEvent) {
|
|
38
38
|
e.stopPropagation();
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -19,7 +19,7 @@ interface usePathOptions extends BaseProps {
|
|
|
19
19
|
width?: number;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
function usePath(data:
|
|
22
|
+
function usePath(data: NmrData1D, props: usePathOptions) {
|
|
23
23
|
const { reverse, width = 100, horizontalMargin = 10 } = props;
|
|
24
24
|
const { mode } = useChartData();
|
|
25
25
|
const scaleX = useScale2DY(reverse);
|
|
@@ -37,7 +37,7 @@ function usePath(data: any, props: usePathOptions) {
|
|
|
37
37
|
|
|
38
38
|
const pathBuilder = new PathBuilder();
|
|
39
39
|
|
|
40
|
-
pathBuilder.moveTo(scaleY(y.at(-1)), scaleX(x.at(-1)));
|
|
40
|
+
pathBuilder.moveTo(scaleY(y.at(-1) as number), scaleX(x.at(-1) as number));
|
|
41
41
|
|
|
42
42
|
for (let i = x.length - 2; i >= 0; i--) {
|
|
43
43
|
pathBuilder.lineTo(scaleY(y[i]), scaleX(x[i]));
|
|
@@ -8,7 +8,7 @@ export function PhaseTraces() {
|
|
|
8
8
|
const { width, height, margin, displayerKey } = useChartData();
|
|
9
9
|
const activeSpectrum = useActiveSpectrum();
|
|
10
10
|
|
|
11
|
-
if (!activeSpectrum
|
|
11
|
+
if (!activeSpectrum || !width || !height) return null;
|
|
12
12
|
|
|
13
13
|
const clipWidth = width - margin.left - margin.right;
|
|
14
14
|
const clipHeight = height - margin.top - margin.bottom;
|