nmrium 1.8.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/component/1d/ApodizationLine.js +1 -1
- package/lib/component/1d/ApodizationLine.js.map +1 -1
- package/lib/component/1d/BrushTracker1D.d.ts.map +1 -1
- package/lib/component/1d/BrushTracker1D.js.map +1 -1
- package/lib/component/1d/FooterBanner.js.map +1 -1
- package/lib/component/1d/LinesSeries.js +2 -2
- package/lib/component/1d/LinesSeries.js.map +1 -1
- package/lib/component/1d/SVGContent1D.d.ts.map +1 -1
- package/lib/component/1d/SVGContent1D.js +2 -1
- package/lib/component/1d/SVGContent1D.js.map +1 -1
- package/lib/component/1d/SimilarityTree.d.ts.map +1 -1
- package/lib/component/1d/SimilarityTree.js.map +1 -1
- package/lib/component/1d/inset/InsetProvider.d.ts.map +1 -1
- package/lib/component/1d/inset/InsetProvider.js.map +1 -1
- package/lib/component/1d/integral/IntegralResizable.d.ts.map +1 -1
- package/lib/component/1d/integral/IntegralResizable.js.map +1 -1
- package/lib/component/1d/matrix/Boxplot.js.map +1 -1
- package/lib/component/1d/multiAnalysis/AnalysisRange.d.ts.map +1 -1
- package/lib/component/1d/multiAnalysis/AnalysisRange.js.map +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts.map +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +13 -20
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js.map +1 -1
- package/lib/component/1d/multiplicityTree/generateTreeNodes.d.ts +1 -0
- package/lib/component/1d/multiplicityTree/generateTreeNodes.d.ts.map +1 -1
- package/lib/component/1d/multiplicityTree/generateTreeNodes.js +2 -1
- package/lib/component/1d/multiplicityTree/generateTreeNodes.js.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.d.ts.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js.map +1 -1
- package/lib/component/1d/peaks/PeakEditionManager.d.ts.map +1 -1
- package/lib/component/1d/peaks/PeakEditionManager.js +2 -2
- package/lib/component/1d/peaks/PeakEditionManager.js.map +1 -1
- package/lib/component/1d/peaks/Peaks.d.ts +4 -1
- package/lib/component/1d/peaks/Peaks.d.ts.map +1 -1
- package/lib/component/1d/peaks/Peaks.js.map +1 -1
- package/lib/component/1d/ranges/AssignmentLabel.d.ts +2 -1
- package/lib/component/1d/ranges/AssignmentLabel.d.ts.map +1 -1
- package/lib/component/1d/ranges/AssignmentLabel.js +6 -4
- package/lib/component/1d/ranges/AssignmentLabel.js.map +1 -1
- package/lib/component/1d/ranges/Atoms.js +2 -2
- package/lib/component/1d/ranges/Atoms.js.map +1 -1
- package/lib/component/1d/ranges/Range.d.ts +2 -1
- package/lib/component/1d/ranges/Range.d.ts.map +1 -1
- package/lib/component/1d/ranges/Range.js +28 -56
- package/lib/component/1d/ranges/Range.js.map +1 -1
- package/lib/component/1d/ranges/Ranges.d.ts.map +1 -1
- package/lib/component/1d/ranges/Ranges.js +19 -13
- package/lib/component/1d/ranges/Ranges.js.map +1 -1
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.d.ts +14 -0
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.d.ts.map +1 -0
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.js +67 -0
- package/lib/component/1d/ranges/useAssignmentsPopoverActionsButtons.js.map +1 -0
- package/lib/component/1d/tool/BaseLineZones.d.ts.map +1 -1
- package/lib/component/1d/tool/BaseLineZones.js.map +1 -1
- package/lib/component/1d/utilities/intersectionResolver.d.ts.map +1 -1
- package/lib/component/1d/utilities/intersectionResolver.js.map +1 -1
- package/lib/component/1d-2d/FieldEdition.d.ts.map +1 -1
- package/lib/component/1d-2d/FieldEdition.js.map +1 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/phase-correction-traces/PhaseTraces.js +1 -1
- package/lib/component/2d/1d-tracer/phase-correction-traces/PhaseTraces.js.map +1 -1
- package/lib/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.js +1 -1
- package/lib/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.js.map +1 -1
- package/lib/component/2d/BrushTracker2D.d.ts.map +1 -1
- package/lib/component/2d/BrushTracker2D.js +41 -46
- package/lib/component/2d/BrushTracker2D.js.map +1 -1
- package/lib/component/2d/FooterBanner.d.ts +2 -2
- package/lib/component/2d/FooterBanner.d.ts.map +1 -1
- package/lib/component/2d/FooterBanner.js +63 -97
- package/lib/component/2d/FooterBanner.js.map +1 -1
- package/lib/component/2d/SVGContent2D.d.ts +2 -2
- package/lib/component/2d/SVGContent2D.d.ts.map +1 -1
- package/lib/component/2d/SVGContent2D.js.map +1 -1
- package/lib/component/2d/SlicingView.js +1 -1
- package/lib/component/2d/SlicingView.js.map +1 -1
- package/lib/component/2d/Viewer2D.js +1 -1
- package/lib/component/2d/Viewer2D.js.map +1 -1
- package/lib/component/2d/ft/FTContainer.d.ts +2 -2
- package/lib/component/2d/ft/FTContainer.d.ts.map +1 -1
- package/lib/component/2d/ft/FTContainer.js +1 -1
- package/lib/component/2d/ft/FTContainer.js.map +1 -1
- package/lib/component/2d/tools/XYLabelPointer.d.ts +2 -2
- package/lib/component/2d/tools/XYLabelPointer.d.ts.map +1 -1
- package/lib/component/2d/tools/XYLabelPointer.js +10 -9
- package/lib/component/2d/tools/XYLabelPointer.js.map +1 -1
- package/lib/component/2d/useTracesSpectra.d.ts +3 -2
- package/lib/component/2d/useTracesSpectra.d.ts.map +1 -1
- package/lib/component/2d/useTracesSpectra.js +17 -9
- package/lib/component/2d/useTracesSpectra.js.map +1 -1
- package/lib/component/2d/utilities/extractSpectrumSignals.js +2 -2
- package/lib/component/2d/utilities/extractSpectrumSignals.js.map +1 -1
- package/lib/component/2d/zones/Signal.js.map +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.d.ts.map +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.js +15 -13
- package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts +5 -6
- package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.js +2 -0
- package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.js +6 -0
- package/lib/component/EventsTrackers/KeysListenerTracker.js.map +1 -1
- package/lib/component/assignment/utilities/getAssignments.js +1 -2
- package/lib/component/assignment/utilities/getAssignments.js.map +1 -1
- package/lib/component/context/KeyModifierContext.d.ts +3 -2
- package/lib/component/context/KeyModifierContext.d.ts.map +1 -1
- package/lib/component/context/KeyModifierContext.js +7 -4
- package/lib/component/context/KeyModifierContext.js.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.d.ts.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.js +17 -3
- package/lib/component/elements/ActionsButtonsPopover.js.map +1 -1
- package/lib/component/elements/AssignmentsCell.d.ts.map +1 -1
- package/lib/component/elements/AssignmentsCell.js.map +1 -1
- package/lib/component/elements/Button.d.ts.map +1 -1
- package/lib/component/elements/Button.js.map +1 -1
- package/lib/component/elements/CheckController.d.ts.map +1 -1
- package/lib/component/elements/CheckController.js.map +1 -1
- package/lib/component/elements/ContextMenuBluePrint.d.ts.map +1 -1
- package/lib/component/elements/ContextMenuBluePrint.js.map +1 -1
- package/lib/component/elements/D3Axis.d.ts.map +1 -1
- package/lib/component/elements/DraggableDialog.d.ts.map +1 -1
- package/lib/component/elements/DraggableDialog.js.map +1 -1
- package/lib/component/elements/Input.d.ts.map +1 -1
- package/lib/component/elements/Input.js.map +1 -1
- package/lib/component/elements/Input2.d.ts.map +1 -1
- package/lib/component/elements/Input2.js.map +1 -1
- package/lib/component/elements/Input2Controller.d.ts.map +1 -1
- package/lib/component/elements/Input2Controller.js.map +1 -1
- package/lib/component/elements/Label.d.ts.map +1 -1
- package/lib/component/elements/Label.js.map +1 -1
- package/lib/component/elements/NumberInput2.d.ts.map +1 -1
- package/lib/component/elements/NumberInput2.js.map +1 -1
- package/lib/component/elements/NumberInput2Controller.d.ts.map +1 -1
- package/lib/component/elements/NumberInput2Controller.js.map +1 -1
- package/lib/component/elements/ReactTable/ReactTable.d.ts.map +1 -1
- package/lib/component/elements/ReactTable/ReactTable.js.map +1 -1
- package/lib/component/elements/ReadOnly.d.ts.map +1 -1
- package/lib/component/elements/ReadOnly.js.map +1 -1
- package/lib/component/elements/Sections.js.map +1 -1
- package/lib/component/elements/Select.d.ts.map +1 -1
- package/lib/component/elements/Select.js.map +1 -1
- package/lib/component/elements/ToolbarPopoverItem.d.ts.map +1 -1
- package/lib/component/elements/export/ExportContent.d.ts.map +1 -1
- package/lib/component/elements/export/ExportContent.js.map +1 -1
- package/lib/component/elements/print/PrintContent.d.ts.map +1 -1
- package/lib/component/elements/print/PrintContent.js.map +1 -1
- package/lib/component/hooks/useActiveSpectrumIntegralsViewState.d.ts.map +1 -1
- package/lib/component/hooks/useActiveSpectrumIntegralsViewState.js +2 -4
- package/lib/component/hooks/useActiveSpectrumIntegralsViewState.js.map +1 -1
- package/lib/component/hooks/useActiveSpectrumPeaksViewState.d.ts.map +1 -1
- package/lib/component/hooks/useActiveSpectrumPeaksViewState.js +2 -4
- package/lib/component/hooks/useActiveSpectrumPeaksViewState.js.map +1 -1
- package/lib/component/hooks/useActiveSpectrumRangesViewState.d.ts.map +1 -1
- package/lib/component/hooks/useActiveSpectrumRangesViewState.js +2 -4
- package/lib/component/hooks/useActiveSpectrumRangesViewState.js.map +1 -1
- package/lib/component/hooks/useActiveSpectrumStyleOptions.js +2 -2
- package/lib/component/hooks/useActiveSpectrumStyleOptions.js.map +1 -1
- package/lib/component/hooks/useActiveSpectrumZonesViewState.d.ts.map +1 -1
- package/lib/component/hooks/useActiveSpectrumZonesViewState.js +2 -4
- package/lib/component/hooks/useActiveSpectrumZonesViewState.js.map +1 -1
- package/lib/component/hooks/useExport.js +1 -1
- package/lib/component/hooks/useExport.js.map +1 -1
- package/lib/component/hooks/useSaveSettings.d.ts.map +1 -1
- package/lib/component/hooks/useSaveSettings.js +28 -47
- package/lib/component/hooks/useSaveSettings.js.map +1 -1
- package/lib/component/hooks/useSetActiveSpectrumAction.d.ts +2 -1
- package/lib/component/hooks/useSetActiveSpectrumAction.d.ts.map +1 -1
- package/lib/component/hooks/useSetActiveSpectrumAction.js +2 -2
- package/lib/component/hooks/useSetActiveSpectrumAction.js.map +1 -1
- package/lib/component/hooks/useSpectrumWithDataSource.js +1 -1
- package/lib/component/hooks/useSpectrumWithDataSource.js.map +1 -1
- package/lib/component/hooks/useWorkspaceAction.d.ts +1 -1
- package/lib/component/hooks/useWorkspaceAction.d.ts.map +1 -1
- package/lib/component/hooks/useWorkspaceAction.js +3 -0
- package/lib/component/hooks/useWorkspaceAction.js.map +1 -1
- package/lib/component/modal/ImportPublicationStringModal.d.ts.map +1 -1
- package/lib/component/modal/ImportPublicationStringModal.js.map +1 -1
- package/lib/component/modal/MultipletAnalysisModal.js +1 -1
- package/lib/component/modal/changeSum/ChangeSumModal.d.ts.map +1 -1
- package/lib/component/modal/changeSum/ChangeSumModal.js.map +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.d.ts.map +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.js.map +1 -1
- package/lib/component/modal/setting/GeneralSettings.d.ts.map +1 -1
- package/lib/component/modal/setting/GeneralSettings.js +5 -1
- package/lib/component/modal/setting/GeneralSettings.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +16 -14
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js +27 -18
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.js +0 -3
- package/lib/component/panels/MoleculesPanel/utilities/getAssignIds.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesPanel.js +1 -1
- package/lib/component/panels/RangesPanel/RangesPanel.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.js +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.js +5 -20
- package/lib/component/panels/RangesPanel/RangesTableRow.js.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.js.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.d.ts +9 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.d.ts.map +1 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.js +19 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.js.map +1 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +2 -2
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +6 -6
- package/lib/component/panels/SummaryPanel/SummaryPanel.js.map +1 -1
- package/lib/component/panels/accordionItems.d.ts.map +1 -1
- package/lib/component/panels/accordionItems.js.map +1 -1
- package/lib/component/panels/databasePanel/DatabaseInfo.d.ts +5 -0
- package/lib/component/panels/databasePanel/DatabaseInfo.d.ts.map +1 -0
- package/lib/component/panels/databasePanel/DatabaseInfo.js +29 -0
- package/lib/component/panels/databasePanel/DatabaseInfo.js.map +1 -0
- package/lib/component/panels/databasePanel/DatabaseTable.d.ts.map +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.js +21 -3
- package/lib/component/panels/databasePanel/DatabaseTable.js.map +1 -1
- package/lib/component/panels/extra/preferences/NucleusPreferences.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/InformationEditionModal.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/InformationEditionModal.js +1 -1
- package/lib/component/panels/informationPanel/InformationEditionModal.js.map +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.d.ts.map +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.js +13 -9
- package/lib/component/panels/predictionPanel/PredictionPanel.js.map +1 -1
- package/lib/component/reducer/Reducer.js +7 -7
- package/lib/component/reducer/Reducer.js.map +1 -1
- package/lib/component/reducer/actions/AssignmentsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/AssignmentsActions.js +9 -9
- package/lib/component/reducer/actions/AssignmentsActions.js.map +1 -1
- package/lib/component/reducer/actions/CorrelationsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/CorrelationsActions.js +21 -21
- package/lib/component/reducer/actions/CorrelationsActions.js.map +1 -1
- package/lib/component/reducer/actions/DatabaseActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/DatabaseActions.js +5 -3
- package/lib/component/reducer/actions/DatabaseActions.js.map +1 -1
- package/lib/component/reducer/actions/DomainActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/DomainActions.js +10 -18
- package/lib/component/reducer/actions/DomainActions.js.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.js +28 -44
- package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
- package/lib/component/reducer/actions/InsetActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/InsetActions.js +9 -18
- package/lib/component/reducer/actions/InsetActions.js.map +1 -1
- package/lib/component/reducer/actions/IntegralsActions.d.ts +1 -1
- package/lib/component/reducer/actions/IntegralsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/IntegralsActions.js +43 -48
- package/lib/component/reducer/actions/IntegralsActions.js.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts +2 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.js +64 -10
- package/lib/component/reducer/actions/MoleculeActions.js.map +1 -1
- package/lib/component/reducer/actions/PeaksActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/PeaksActions.js +110 -121
- package/lib/component/reducer/actions/PeaksActions.js.map +1 -1
- package/lib/component/reducer/actions/PreferencesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/PreferencesActions.js +2 -1
- package/lib/component/reducer/actions/PreferencesActions.js.map +1 -1
- package/lib/component/reducer/actions/RangesActions.d.ts +18 -18
- package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/RangesActions.js +148 -171
- package/lib/component/reducer/actions/RangesActions.js.map +1 -1
- package/lib/component/reducer/actions/SpectraActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/SpectraActions.js +29 -31
- package/lib/component/reducer/actions/SpectraActions.js.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +10 -11
- package/lib/component/reducer/actions/ToolsActions.js.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.d.ts +8 -9
- package/lib/component/reducer/actions/ZonesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.js +123 -151
- package/lib/component/reducer/actions/ZonesActions.js.map +1 -1
- package/lib/component/reducer/helper/get2DRange.d.ts +3 -1
- package/lib/component/reducer/helper/get2DRange.d.ts.map +1 -1
- package/lib/component/reducer/helper/get2DRange.js.map +1 -1
- package/lib/component/reducer/helper/getSpectrum.js +1 -1
- package/lib/component/reducer/helper/getSpectrum.js.map +1 -1
- package/lib/component/reducer/helper/setIntegralsViewProperty.js +1 -1
- package/lib/component/reducer/helper/setIntegralsViewProperty.js.map +1 -1
- package/lib/component/reducer/helper/setRangesViewProperty.js +1 -1
- package/lib/component/reducer/helper/setRangesViewProperty.js.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js.map +1 -1
- package/lib/component/toolbar/ToolBar.d.ts.map +1 -1
- package/lib/component/toolbar/ToolBar.js +5 -1
- package/lib/component/toolbar/ToolBar.js.map +1 -1
- package/lib/component/toolbar/ToolTypes.js +1 -1
- package/lib/component/toolbar/ToolTypes.js.map +1 -1
- package/lib/component/useWatchForm.d.ts.map +1 -1
- package/lib/component/useWatchForm.js.map +1 -1
- package/lib/component/utility/filterDatabaseInfoEntry.d.ts +3 -0
- package/lib/component/utility/filterDatabaseInfoEntry.d.ts.map +1 -0
- package/lib/component/utility/filterDatabaseInfoEntry.js +9 -0
- package/lib/component/utility/filterDatabaseInfoEntry.js.map +1 -0
- package/lib/component/utility/stackOverlappingLabels.d.ts +1 -1
- package/lib/component/utility/stackOverlappingLabels.d.ts.map +1 -1
- package/lib/component/utility/stackOverlappingLabels.js.map +1 -1
- package/lib/component/workspaces/prediction.js +1 -1
- package/lib/component/workspaces/prediction.js.map +1 -1
- package/lib/component/workspaces/simulation.js +1 -1
- package/lib/component/workspaces/simulation.js.map +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js.map +1 -1
- package/lib/data/SpectraManager.d.ts.map +1 -1
- package/lib/data/SpectraManager.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.js +0 -3
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts +8 -1
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +1 -2
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeSignal.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeSignal.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.d.ts +4 -14
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.js +2 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.d.ts +3 -5
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js +3 -5
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts +2 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZones.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +7 -63
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js +9 -14
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.d.ts +2 -10
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js +23 -43
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +1 -54
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.js.map +1 -1
- package/lib/data/molecules/Molecule.d.ts.map +1 -1
- package/lib/data/molecules/Molecule.js.map +1 -1
- package/lib/data/molecules/MoleculeManager.d.ts +2 -1
- package/lib/data/molecules/MoleculeManager.d.ts.map +1 -1
- package/lib/data/molecules/MoleculeManager.js +30 -3
- package/lib/data/molecules/MoleculeManager.js.map +1 -1
- package/lib/data/types/data1d/RangeDetectionResult.d.ts.map +1 -1
- package/lib/data/utilities/FindUtilities.d.ts.map +1 -1
- package/lib/data/utilities/FindUtilities.js +11 -11
- package/lib/data/utilities/FindUtilities.js.map +1 -1
- package/lib/utils/clipboard/clipboardComponents.d.ts.map +1 -1
- package/lib/utils/clipboard/clipboardComponents.js.map +1 -1
- package/lib/utils/clipboard/clipboardHooks.d.ts +2 -2
- package/lib/utils/clipboard/clipboardHooks.d.ts.map +1 -1
- package/lib/utils/clipboard/clipboardHooks.js +8 -2
- package/lib/utils/clipboard/clipboardHooks.js.map +1 -1
- package/lib/versionInfo.d.ts.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/lib/versionInfo.js.map +1 -1
- package/package.json +28 -25
- package/src/component/1d/ApodizationLine.tsx +1 -1
- package/src/component/1d/BrushTracker1D.tsx +10 -10
- package/src/component/1d/FooterBanner.tsx +2 -2
- package/src/component/1d/LinesSeries.tsx +2 -2
- package/src/component/1d/SVGContent1D.tsx +6 -2
- package/src/component/1d/SimilarityTree.tsx +3 -2
- package/src/component/1d/inset/InsetProvider.tsx +4 -2
- package/src/component/1d/integral/IntegralResizable.tsx +2 -1
- package/src/component/1d/matrix/Boxplot.tsx +3 -3
- package/src/component/1d/multiAnalysis/AnalysisRange.tsx +2 -1
- package/src/component/1d/multiplicityTree/MultiplicityTree.tsx +24 -23
- package/src/component/1d/multiplicityTree/generateTreeNodes.ts +10 -1
- package/src/component/1d/peaks/PeakAnnotationsSpreadMode.tsx +4 -2
- package/src/component/1d/peaks/PeakEditionManager.tsx +8 -3
- package/src/component/1d/peaks/Peaks.tsx +5 -1
- package/src/component/1d/ranges/AssignmentLabel.tsx +8 -5
- package/src/component/1d/ranges/Atoms.tsx +2 -2
- package/src/component/1d/ranges/Range.tsx +42 -74
- package/src/component/1d/ranges/Ranges.tsx +33 -28
- package/src/component/1d/ranges/useAssignmentsPopoverActionsButtons.tsx +93 -0
- package/src/component/1d/tool/BaseLineZones.tsx +2 -1
- package/src/component/1d/utilities/intersectionResolver.ts +3 -4
- package/src/component/1d-2d/FieldEdition.tsx +2 -2
- package/src/component/2d/1d-tracer/VerticalSliceChart.tsx +2 -2
- package/src/component/2d/1d-tracer/phase-correction-traces/PhaseTraces.tsx +1 -1
- package/src/component/2d/1d-tracer/phase-correction-traces/SpectrumPhaseTrace.tsx +1 -1
- package/src/component/2d/BrushTracker2D.tsx +50 -55
- package/src/component/2d/FooterBanner.tsx +80 -105
- package/src/component/2d/SVGContent2D.tsx +2 -3
- package/src/component/2d/SlicingView.tsx +1 -1
- package/src/component/2d/Viewer2D.tsx +2 -2
- package/src/component/2d/ft/FTContainer.tsx +4 -5
- package/src/component/2d/tools/XYLabelPointer.tsx +12 -11
- package/src/component/2d/useTracesSpectra.ts +26 -13
- package/src/component/2d/utilities/extractSpectrumSignals.ts +2 -2
- package/src/component/2d/zones/Signal.tsx +1 -1
- package/src/component/2d/zones/SignalsGuideLines.tsx +21 -19
- package/src/component/2d/zones/ZonesAssignmentsLabels.tsx +4 -4
- package/src/component/EventsTrackers/BrushTracker.tsx +24 -17
- package/src/component/EventsTrackers/KeysListenerTracker.tsx +6 -0
- package/src/component/assignment/utilities/getAssignments.ts +1 -2
- package/src/component/context/KeyModifierContext.tsx +13 -5
- package/src/component/elements/ActionsButtonsPopover.tsx +25 -8
- package/src/component/elements/AssignmentsCell.tsx +1 -2
- package/src/component/elements/Button.tsx +3 -2
- package/src/component/elements/CheckController.tsx +2 -1
- package/src/component/elements/ContextMenuBluePrint.tsx +2 -1
- package/src/component/elements/D3Axis.tsx +3 -3
- package/src/component/elements/DraggableDialog.tsx +2 -1
- package/src/component/elements/Input.tsx +4 -2
- package/src/component/elements/Input2.tsx +1 -2
- package/src/component/elements/Input2Controller.tsx +2 -1
- package/src/component/elements/Label.tsx +2 -1
- package/src/component/elements/NumberInput2.tsx +4 -2
- package/src/component/elements/NumberInput2Controller.tsx +3 -1
- package/src/component/elements/ReactTable/ReactTable.tsx +1 -3
- package/src/component/elements/ReadOnly.tsx +4 -2
- package/src/component/elements/Sections.tsx +5 -4
- package/src/component/elements/Select.tsx +4 -2
- package/src/component/elements/ToolbarPopoverItem.tsx +3 -3
- package/src/component/elements/export/ExportContent.tsx +1 -2
- package/src/component/elements/print/PrintContent.tsx +1 -2
- package/src/component/hooks/useActiveSpectrumIntegralsViewState.ts +2 -6
- package/src/component/hooks/useActiveSpectrumPeaksViewState.ts +2 -6
- package/src/component/hooks/useActiveSpectrumRangesViewState.ts +2 -6
- package/src/component/hooks/useActiveSpectrumStyleOptions.ts +2 -2
- package/src/component/hooks/useActiveSpectrumZonesViewState.ts +2 -6
- package/src/component/hooks/useExport.tsx +1 -1
- package/src/component/hooks/useSaveSettings.tsx +68 -81
- package/src/component/hooks/useSetActiveSpectrumAction.ts +3 -2
- package/src/component/hooks/useSpectrumWithDataSource.ts +1 -1
- package/src/component/hooks/useWorkspaceAction.ts +5 -0
- package/src/component/modal/ImportPublicationStringModal.tsx +1 -2
- package/src/component/modal/MultipletAnalysisModal.tsx +1 -1
- package/src/component/modal/changeSum/ChangeSumModal.tsx +4 -2
- package/src/component/modal/metaImportation/MetaImportationModal.tsx +1 -2
- package/src/component/modal/setting/GeneralSettings.tsx +7 -2
- package/src/component/modal/setting/settings-tabs/ToolsTabContent.tsx +1 -1
- package/src/component/panels/IntegralsPanel/IntegralTable.tsx +4 -2
- package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +24 -18
- package/src/component/panels/MoleculesPanel/hooks/useAtomAssignment.tsx +32 -16
- package/src/component/panels/MoleculesPanel/utilities/getAssignIds.ts +0 -4
- package/src/component/panels/RangesPanel/RangesPanel.tsx +1 -1
- package/src/component/panels/RangesPanel/RangesTable.tsx +3 -8
- package/src/component/panels/RangesPanel/RangesTableRow.tsx +14 -47
- package/src/component/panels/RangesPanel/TableColumns/ActionsColumn.tsx +1 -2
- package/src/component/panels/RangesPanel/TableColumns/SignalAssignmentColumn.tsx +40 -0
- package/src/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.tsx +1 -2
- package/src/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.tsx +2 -2
- package/src/component/panels/SummaryPanel/SummaryPanel.tsx +6 -6
- package/src/component/panels/accordionItems.tsx +4 -2
- package/src/component/panels/databasePanel/DatabaseInfo.tsx +43 -0
- package/src/component/panels/databasePanel/DatabaseTable.tsx +33 -1
- package/src/component/panels/extra/preferences/NucleusPreferences.tsx +2 -2
- package/src/component/panels/informationPanel/InformationEditionModal.tsx +6 -2
- package/src/component/panels/predictionPanel/PredictionPanel.tsx +17 -9
- package/src/component/reducer/Reducer.ts +8 -8
- package/src/component/reducer/actions/AssignmentsActions.ts +8 -13
- package/src/component/reducer/actions/CorrelationsActions.ts +21 -22
- package/src/component/reducer/actions/DatabaseActions.ts +5 -3
- package/src/component/reducer/actions/DomainActions.ts +16 -22
- package/src/component/reducer/actions/FiltersActions.ts +34 -58
- package/src/component/reducer/actions/InsetActions.ts +9 -19
- package/src/component/reducer/actions/IntegralsActions.ts +48 -59
- package/src/component/reducer/actions/MoleculeActions.ts +94 -14
- package/src/component/reducer/actions/PeaksActions.ts +112 -136
- package/src/component/reducer/actions/PreferencesActions.ts +4 -3
- package/src/component/reducer/actions/RangesActions.ts +196 -244
- package/src/component/reducer/actions/SpectraActions.ts +40 -45
- package/src/component/reducer/actions/ToolsActions.ts +9 -13
- package/src/component/reducer/actions/ZonesActions.ts +158 -218
- package/src/component/reducer/helper/get2DRange.ts +4 -1
- package/src/component/reducer/helper/getSpectrum.ts +1 -1
- package/src/component/reducer/helper/setIntegralsViewProperty.ts +1 -1
- package/src/component/reducer/helper/setRangesViewProperty.ts +1 -1
- package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +1 -1
- package/src/component/toolbar/ToolBar.tsx +6 -1
- package/src/component/toolbar/ToolTypes.ts +1 -1
- package/src/component/useWatchForm.tsx +2 -1
- package/src/component/utility/filterDatabaseInfoEntry.ts +10 -0
- package/src/component/utility/stackOverlappingLabels.ts +4 -1
- package/src/component/workspaces/prediction.ts +1 -1
- package/src/component/workspaces/simulation.ts +1 -1
- package/src/component/workspaces/workspaceDefaultProperties.ts +1 -1
- package/src/data/SpectraManager.ts +0 -2
- package/src/data/data1d/Spectrum1D/isRangeAssigned.ts +0 -4
- package/src/data/data1d/Spectrum1D/ranges/autoRangesDetection.ts +15 -5
- package/src/data/data1d/Spectrum1D/ranges/changeRangeSignal.ts +5 -5
- package/src/data/data1d/Spectrum1D/ranges/detectRanges.ts +5 -14
- package/src/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.ts +2 -1
- package/src/data/data2d/Spectrum2D/initiateDatum2D.ts +2 -2
- package/src/data/data2d/Spectrum2D/zones/changeZoneSignal.ts +3 -5
- package/src/data/data2d/Spectrum2D/zones/detectZones.ts +3 -2
- package/src/data/data2d/Spectrum2D/zones/detectZonesManual.ts +19 -16
- package/src/data/data2d/Spectrum2D/zones/getDetectionZones.ts +35 -56
- package/src/data/data2d/Spectrum2D/zones/initiateZones.ts +1 -1
- package/src/data/molecules/Molecule.ts +2 -1
- package/src/data/molecules/MoleculeManager.ts +40 -4
- package/src/data/types/data1d/RangeDetectionResult.ts +4 -2
- package/src/data/utilities/FindUtilities.ts +9 -8
- package/src/utils/clipboard/clipboardComponents.tsx +2 -1
- package/src/utils/clipboard/clipboardHooks.ts +12 -6
- package/src/versionInfo.ts +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentColumn.d.ts +0 -8
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentColumn.d.ts.map +0 -1
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentColumn.js +0 -17
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentColumn.js.map +0 -1
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.d.ts +0 -17
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.d.ts.map +0 -1
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +0 -40
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js.map +0 -1
- package/src/component/panels/RangesPanel/TableColumns/RangeAssignmentColumn.tsx +0 -36
- package/src/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.tsx +0 -89
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
Signal2D,
|
|
4
|
-
SignalKind,
|
|
5
|
-
Zone,
|
|
6
|
-
} from '@zakodium/nmr-types';
|
|
7
|
-
import type {
|
|
8
|
-
Spectrum2D,
|
|
9
|
-
Spectrum,
|
|
10
|
-
ZonesViewState,
|
|
11
|
-
} from '@zakodium/nmrium-core';
|
|
1
|
+
import type { Filter2DEntry, SignalKind, Zone } from '@zakodium/nmr-types';
|
|
2
|
+
import type { Spectrum2D, ZonesViewState } from '@zakodium/nmrium-core';
|
|
12
3
|
import type { FromTo, NmrData2DFt } from 'cheminfo-types';
|
|
13
4
|
import type { Draft } from 'immer';
|
|
14
|
-
import { original } from 'immer';
|
|
15
5
|
import lodashCloneDeep from 'lodash/cloneDeep.js';
|
|
16
6
|
import { setPathLength } from 'nmr-correlation';
|
|
17
7
|
import { Filters2DManager } from 'nmr-processing';
|
|
@@ -22,7 +12,6 @@ import {
|
|
|
22
12
|
detectZonesManual,
|
|
23
13
|
isSpectrum2D,
|
|
24
14
|
} from '../../../data/data2d/Spectrum2D/index.js';
|
|
25
|
-
import type { DetectionZonesOptions } from '../../../data/data2d/Spectrum2D/zones/getDetectionZones.js';
|
|
26
15
|
import { unlink } from '../../../data/utilities/ZoneUtilities.js';
|
|
27
16
|
import type { Axis } from '../../assignment/AssignmentsContext.js';
|
|
28
17
|
import { defaultZonesViewState } from '../../hooks/useActiveSpectrumZonesViewState.js';
|
|
@@ -33,6 +22,7 @@ import type { State } from '../Reducer.js';
|
|
|
33
22
|
import type { ZoneBoundary } from '../helper/get2DRange.js';
|
|
34
23
|
import get2DRange from '../helper/get2DRange.js';
|
|
35
24
|
import { getActiveSpectrum } from '../helper/getActiveSpectrum.js';
|
|
25
|
+
import { getSpectrum } from '../helper/getSpectrum.ts';
|
|
36
26
|
import type { ActionType } from '../types/ActionType.js';
|
|
37
27
|
|
|
38
28
|
import { handleUpdateCorrelations } from './CorrelationsActions.js';
|
|
@@ -40,9 +30,9 @@ import { setDomain } from './DomainActions.js';
|
|
|
40
30
|
import { rollbackSpectrumByFilter } from './FiltersActions.ts';
|
|
41
31
|
|
|
42
32
|
interface DeleteSignal2DProps {
|
|
43
|
-
|
|
33
|
+
spectrumId: string;
|
|
44
34
|
zone: Zone;
|
|
45
|
-
|
|
35
|
+
signalId: string;
|
|
46
36
|
}
|
|
47
37
|
|
|
48
38
|
type ChangeZonesFactorAction = ActionType<
|
|
@@ -69,9 +59,9 @@ type DeleteSignal2DAction = ActionType<'DELETE_2D_SIGNAL', DeleteSignal2DProps>;
|
|
|
69
59
|
type SetSignalPathLengthAction = ActionType<
|
|
70
60
|
'SET_2D_SIGNAL_PATH_LENGTH',
|
|
71
61
|
{
|
|
72
|
-
|
|
62
|
+
spectrumId: string;
|
|
73
63
|
zone: Zone;
|
|
74
|
-
|
|
64
|
+
signalId: string;
|
|
75
65
|
pathLength: number | FromTo | undefined;
|
|
76
66
|
}
|
|
77
67
|
>;
|
|
@@ -80,7 +70,7 @@ type AssignZoneAction = ActionType<
|
|
|
80
70
|
'ASSIGN_ZONE',
|
|
81
71
|
{
|
|
82
72
|
keys: TargetAssignKeys;
|
|
83
|
-
axis
|
|
73
|
+
axis: Axis;
|
|
84
74
|
} & Required<Pick<Zone['x'], 'diaIDs' | 'nbAtoms'>>
|
|
85
75
|
>;
|
|
86
76
|
type SaveEditedZoneAction = ActionType<
|
|
@@ -143,24 +133,20 @@ function handleChangeZonesFactor(
|
|
|
143
133
|
|
|
144
134
|
//action
|
|
145
135
|
function handleAdd2dZone(draft: Draft<State>, action: Add2dZoneAction) {
|
|
146
|
-
const
|
|
136
|
+
const spectrum = getSpectrum(draft);
|
|
137
|
+
if (!isSpectrum2D(spectrum)) return;
|
|
147
138
|
|
|
148
|
-
|
|
149
|
-
const { index } = activeSpectrum;
|
|
150
|
-
const drawnZone = get2DRange(draft, action.payload);
|
|
151
|
-
const datum = draft.data[index] as Spectrum2D;
|
|
139
|
+
const drawnZone = get2DRange(draft, action.payload);
|
|
152
140
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
});
|
|
141
|
+
const zones = detectZonesManual(spectrum, {
|
|
142
|
+
selectedZone: drawnZone,
|
|
143
|
+
thresholdFactor: draft.toolOptions.data.zonesNoiseFactor,
|
|
144
|
+
maxPercentCutOff: draft.toolOptions.data.zonesMinMaxRatio,
|
|
145
|
+
});
|
|
159
146
|
|
|
160
|
-
|
|
147
|
+
spectrum.zones.values.push(...zones);
|
|
161
148
|
|
|
162
|
-
|
|
163
|
-
}
|
|
149
|
+
handleUpdateCorrelations(draft);
|
|
164
150
|
}
|
|
165
151
|
|
|
166
152
|
//action
|
|
@@ -168,44 +154,37 @@ function handleAutoZonesDetection(
|
|
|
168
154
|
draft: Draft<State>,
|
|
169
155
|
action: AutoZonesDetectionAction,
|
|
170
156
|
) {
|
|
171
|
-
const
|
|
157
|
+
const {
|
|
158
|
+
zonesNoiseFactor: thresholdFactor,
|
|
159
|
+
zonesMinMaxRatio: maxPercentCutOff,
|
|
160
|
+
} = action.payload;
|
|
172
161
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
};
|
|
186
|
-
const datum = draft.data[index] as Spectrum2D;
|
|
187
|
-
const zones = detectZones(original(datum), detectionOptions);
|
|
188
|
-
datum.zones.values = datum.zones.values.concat(zones);
|
|
189
|
-
handleUpdateCorrelations(draft);
|
|
190
|
-
}
|
|
162
|
+
const spectrum = getSpectrum(draft);
|
|
163
|
+
if (!isSpectrum2D(spectrum)) return;
|
|
164
|
+
|
|
165
|
+
const [fromX, toX] = draft.xDomain;
|
|
166
|
+
const [fromY, toY] = draft.yDomain;
|
|
167
|
+
const zones = detectZones(spectrum, {
|
|
168
|
+
selectedZone: { fromX, toX, fromY, toY },
|
|
169
|
+
thresholdFactor,
|
|
170
|
+
maxPercentCutOff,
|
|
171
|
+
});
|
|
172
|
+
spectrum.zones.values = spectrum.zones.values.concat(zones);
|
|
173
|
+
handleUpdateCorrelations(draft);
|
|
191
174
|
}
|
|
192
175
|
|
|
193
176
|
//action
|
|
194
177
|
function handleAutoSpectraZonesDetection(draft: Draft<State>) {
|
|
195
178
|
for (const datum of draft.data) {
|
|
196
179
|
const { info, data } = datum;
|
|
197
|
-
if (
|
|
180
|
+
if (isSpectrum2D(datum) && info.isFt) {
|
|
198
181
|
const { minX, maxX, minY, maxY } = (data as NmrData2DFt).rr;
|
|
199
|
-
const
|
|
182
|
+
const zones = detectZones(datum, {
|
|
200
183
|
selectedZone: { fromX: minX, toX: maxX, fromY: minY, toY: maxY },
|
|
201
184
|
thresholdFactor: 1,
|
|
202
185
|
maxPercentCutOff: 0.03,
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
const zones = detectZones(original(datum), detectionOptions);
|
|
206
|
-
(datum as Spectrum2D).zones.values = (
|
|
207
|
-
datum as Spectrum2D
|
|
208
|
-
).zones.values.concat(zones);
|
|
186
|
+
});
|
|
187
|
+
datum.zones.values = datum.zones.values.concat(zones);
|
|
209
188
|
|
|
210
189
|
handleUpdateCorrelations(draft);
|
|
211
190
|
}
|
|
@@ -219,50 +198,42 @@ function handleChangeZoneSignalDelta(
|
|
|
219
198
|
) {
|
|
220
199
|
const { zoneId, signal } = action.payload;
|
|
221
200
|
|
|
222
|
-
const
|
|
201
|
+
const spectrum = getSpectrum(draft);
|
|
202
|
+
if (!isSpectrum2D(spectrum)) return;
|
|
223
203
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
filters.push({
|
|
241
|
-
name: 'shift2DY',
|
|
242
|
-
value: { shift: yShift },
|
|
243
|
-
enabled: true,
|
|
244
|
-
});
|
|
245
|
-
}
|
|
204
|
+
const { xShift, yShift } = changeZoneSignal(spectrum, zoneId, signal);
|
|
205
|
+
const filters: Filter2DEntry[] = [];
|
|
206
|
+
if (xShift !== 0) {
|
|
207
|
+
filters.push({
|
|
208
|
+
name: 'shift2DX',
|
|
209
|
+
value: { shift: xShift },
|
|
210
|
+
enabled: true,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
if (yShift !== 0) {
|
|
214
|
+
filters.push({
|
|
215
|
+
name: 'shift2DY',
|
|
216
|
+
value: { shift: yShift },
|
|
217
|
+
enabled: true,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
246
220
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
221
|
+
for (const filter of filters) {
|
|
222
|
+
rollbackSpectrumByFilter(draft, {
|
|
223
|
+
key: filter.name,
|
|
224
|
+
searchBy: 'name',
|
|
225
|
+
applyFilter: false,
|
|
226
|
+
});
|
|
227
|
+
}
|
|
254
228
|
|
|
255
|
-
|
|
229
|
+
Filters2DManager.applyFilters(spectrum, filters);
|
|
256
230
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
}
|
|
231
|
+
setDomain(draft);
|
|
232
|
+
handleUpdateCorrelations(draft);
|
|
260
233
|
}
|
|
261
234
|
|
|
262
|
-
function getZoneIndex(
|
|
263
|
-
return
|
|
264
|
-
(zone) => zone.id === zoneId,
|
|
265
|
-
);
|
|
235
|
+
function getZoneIndex(spectrum: Spectrum2D, zoneId: string) {
|
|
236
|
+
return spectrum.zones.values.findIndex((zone) => zone.id === zoneId);
|
|
266
237
|
}
|
|
267
238
|
|
|
268
239
|
//action
|
|
@@ -270,66 +241,59 @@ function handleChangeZoneSignalKind(
|
|
|
270
241
|
draft: Draft<State>,
|
|
271
242
|
action: ChangeZoneSignalKindAction,
|
|
272
243
|
) {
|
|
273
|
-
const
|
|
274
|
-
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
_zone.kind = kind;
|
|
284
|
-
handleUpdateCorrelations(draft);
|
|
285
|
-
}
|
|
244
|
+
const { zoneData, kind } = action.payload;
|
|
245
|
+
|
|
246
|
+
const spectrum = getSpectrum(draft);
|
|
247
|
+
if (!isSpectrum2D(spectrum)) return;
|
|
248
|
+
|
|
249
|
+
const zoneIndex = getZoneIndex(spectrum, zoneData.id);
|
|
250
|
+
const _zone = spectrum.zones.values[zoneIndex];
|
|
251
|
+
_zone.signals[zoneData.tableMetaInfo.signalIndex].kind = kind;
|
|
252
|
+
_zone.kind = kind;
|
|
253
|
+
handleUpdateCorrelations(draft);
|
|
286
254
|
}
|
|
287
255
|
|
|
288
256
|
//action
|
|
289
257
|
function handleDeleteZone(draft: Draft<State>, action: DeleteZoneAction) {
|
|
290
|
-
const
|
|
291
|
-
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
const
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
} else {
|
|
301
|
-
(draft.data[index] as Spectrum2D).zones.values = [];
|
|
302
|
-
}
|
|
303
|
-
handleUpdateCorrelations(draft);
|
|
258
|
+
const { id } = action.payload;
|
|
259
|
+
|
|
260
|
+
const spectrum = getSpectrum(draft);
|
|
261
|
+
if (!isSpectrum2D(spectrum)) return;
|
|
262
|
+
|
|
263
|
+
if (id) {
|
|
264
|
+
const zoneIndex = getZoneIndex(spectrum, id);
|
|
265
|
+
spectrum.zones.values.splice(zoneIndex, 1);
|
|
266
|
+
} else {
|
|
267
|
+
spectrum.zones.values = [];
|
|
304
268
|
}
|
|
269
|
+
|
|
270
|
+
handleUpdateCorrelations(draft);
|
|
305
271
|
}
|
|
306
272
|
|
|
307
273
|
function deleteSignal2D(draft: Draft<State>, options: DeleteSignal2DProps) {
|
|
308
|
-
const {
|
|
309
|
-
|
|
310
|
-
if (spectrum && zone) {
|
|
311
|
-
const datum2D = draft.data.find(
|
|
312
|
-
(datum) => datum.id === spectrum.id,
|
|
313
|
-
) as Spectrum2D;
|
|
314
|
-
const zoneIndex = datum2D.zones.values.findIndex(
|
|
315
|
-
(_zone) => _zone.id === zone.id,
|
|
316
|
-
);
|
|
317
|
-
const signalIndex = zone.signals.findIndex(
|
|
318
|
-
(_signal) => _signal.id === signal.id,
|
|
319
|
-
);
|
|
320
|
-
// remove assignments for the signal in zone object and global state
|
|
321
|
-
|
|
322
|
-
const _zone = unlink(lodashCloneDeep(zone), false, signalIndex, undefined);
|
|
323
|
-
|
|
324
|
-
_zone.signals.splice(signalIndex, 1);
|
|
325
|
-
datum2D.zones.values[zoneIndex] = _zone;
|
|
326
|
-
// if no signals are existing in a zone anymore then delete this zone
|
|
327
|
-
if (_zone.signals.length === 0) {
|
|
328
|
-
datum2D.zones.values.splice(zoneIndex, 1);
|
|
329
|
-
}
|
|
274
|
+
const { spectrumId, zone, signalId } = options;
|
|
330
275
|
|
|
331
|
-
|
|
276
|
+
const spectrum = getSpectrum(draft, spectrumId);
|
|
277
|
+
if (!isSpectrum2D(spectrum)) return;
|
|
278
|
+
|
|
279
|
+
const zoneIndex = spectrum.zones.values.findIndex(
|
|
280
|
+
(_zone) => _zone.id === zone.id,
|
|
281
|
+
);
|
|
282
|
+
const signalIndex = zone.signals.findIndex(
|
|
283
|
+
(_signal) => _signal.id === signalId,
|
|
284
|
+
);
|
|
285
|
+
|
|
286
|
+
// Remove assignments for the signal in the zone object and global state.
|
|
287
|
+
const _zone = unlink(lodashCloneDeep(zone), false, signalIndex, undefined);
|
|
288
|
+
|
|
289
|
+
_zone.signals.splice(signalIndex, 1);
|
|
290
|
+
spectrum.zones.values[zoneIndex] = _zone;
|
|
291
|
+
// if no signals are existing in a zone anymore then delete this zone
|
|
292
|
+
if (_zone.signals.length === 0) {
|
|
293
|
+
spectrum.zones.values.splice(zoneIndex, 1);
|
|
332
294
|
}
|
|
295
|
+
|
|
296
|
+
handleUpdateCorrelations(draft);
|
|
333
297
|
}
|
|
334
298
|
|
|
335
299
|
//action
|
|
@@ -342,46 +306,38 @@ function handleSetSignalPathLength(
|
|
|
342
306
|
draft: Draft<State>,
|
|
343
307
|
action: SetSignalPathLengthAction,
|
|
344
308
|
) {
|
|
345
|
-
const {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
}
|
|
309
|
+
const { spectrumId, zone, signalId, pathLength } = action.payload;
|
|
310
|
+
|
|
311
|
+
const spectrum = getSpectrum(draft, spectrumId);
|
|
312
|
+
if (!isSpectrum2D(spectrum)) return;
|
|
313
|
+
|
|
314
|
+
const zoneIndex = spectrum.zones.values.findIndex(
|
|
315
|
+
(_zone) => _zone.id === zone.id,
|
|
316
|
+
);
|
|
317
|
+
const signalIndex = zone.signals.findIndex(
|
|
318
|
+
(_signal) => _signal.id === signalId,
|
|
319
|
+
);
|
|
320
|
+
const _zone = unlink(lodashCloneDeep(zone), false, signalIndex, undefined);
|
|
321
|
+
_zone.signals[signalIndex].j = {
|
|
322
|
+
..._zone.signals[signalIndex].j,
|
|
323
|
+
pathLength,
|
|
324
|
+
};
|
|
325
|
+
spectrum.zones.values[zoneIndex] = _zone;
|
|
326
|
+
|
|
327
|
+
handleUpdateCorrelations(draft);
|
|
365
328
|
}
|
|
366
329
|
|
|
367
330
|
//action
|
|
368
331
|
function unlinkZone(draft: Draft<State>, props: UnlinkZoneProps) {
|
|
369
|
-
const
|
|
370
|
-
|
|
371
|
-
const activeSpectrum = getActiveSpectrum(state);
|
|
372
|
-
|
|
373
|
-
if (!activeSpectrum) return;
|
|
374
|
-
const { index } = activeSpectrum;
|
|
375
|
-
const spectrum = draft.data[index];
|
|
332
|
+
const { zoneKey, isOnZoneLevel, signalIndex = -1, axis } = props;
|
|
376
333
|
|
|
334
|
+
const spectrum = getSpectrum(draft);
|
|
377
335
|
if (!isSpectrum2D(spectrum)) return;
|
|
378
336
|
|
|
379
|
-
const { zoneKey, isOnZoneLevel, signalIndex = -1, axis } = props;
|
|
380
337
|
const zones = spectrum.zones.values;
|
|
381
|
-
|
|
382
338
|
if (zoneKey) {
|
|
383
339
|
// remove assignments in global state
|
|
384
|
-
const zoneIndex = getZoneIndex(
|
|
340
|
+
const zoneIndex = getZoneIndex(spectrum, zoneKey);
|
|
385
341
|
const zone = zones[zoneIndex];
|
|
386
342
|
zones[zoneIndex] = unlink(zone, isOnZoneLevel, signalIndex, axis);
|
|
387
343
|
} else {
|
|
@@ -398,16 +354,9 @@ function handleUnlinkZone(draft: Draft<State>, action: UnlinkZoneAction) {
|
|
|
398
354
|
|
|
399
355
|
//action
|
|
400
356
|
function handleAssignZone(draft: Draft<State>, action: AssignZoneAction) {
|
|
401
|
-
const state = original(draft) as State;
|
|
402
|
-
|
|
403
|
-
const activeSpectrum = getActiveSpectrum(state);
|
|
404
357
|
const { keys, diaIDs, axis, nbAtoms } = action.payload;
|
|
405
358
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
const { index } = activeSpectrum;
|
|
409
|
-
const spectrum = draft.data[index];
|
|
410
|
-
|
|
359
|
+
const spectrum = getSpectrum(draft);
|
|
411
360
|
if (!isSpectrum2D(spectrum)) return;
|
|
412
361
|
|
|
413
362
|
const [{ index: zoneIndex }] = keys;
|
|
@@ -431,31 +380,27 @@ function handleSaveEditedZone(
|
|
|
431
380
|
draft: Draft<State>,
|
|
432
381
|
action: SaveEditedZoneAction,
|
|
433
382
|
) {
|
|
434
|
-
const
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
if (activeSpectrum?.id) {
|
|
439
|
-
const { index } = activeSpectrum;
|
|
440
|
-
const {
|
|
441
|
-
zone: { tableMetaInfo, ...editedZone },
|
|
442
|
-
} = action.payload;
|
|
443
|
-
|
|
444
|
-
const zoneIndex = getZoneIndex(state, index, editedZone.id);
|
|
445
|
-
(draft.data[index] as Spectrum2D).zones.values[zoneIndex] = editedZone;
|
|
446
|
-
|
|
447
|
-
if (editedZone.signals) {
|
|
448
|
-
for (const signal of editedZone.signals) {
|
|
449
|
-
setPathLength(
|
|
450
|
-
draft.correlations.values,
|
|
451
|
-
signal.id,
|
|
452
|
-
signal.j?.pathLength as FromTo,
|
|
453
|
-
);
|
|
454
|
-
}
|
|
455
|
-
}
|
|
383
|
+
const {
|
|
384
|
+
zone: { tableMetaInfo, ...editedZone },
|
|
385
|
+
} = action.payload;
|
|
456
386
|
|
|
457
|
-
|
|
387
|
+
const spectrum = getSpectrum(draft);
|
|
388
|
+
if (!isSpectrum2D(spectrum)) return;
|
|
389
|
+
|
|
390
|
+
const zoneIndex = getZoneIndex(spectrum, editedZone.id);
|
|
391
|
+
spectrum.zones.values[zoneIndex] = editedZone;
|
|
392
|
+
|
|
393
|
+
if (editedZone.signals) {
|
|
394
|
+
for (const signal of editedZone.signals) {
|
|
395
|
+
setPathLength(
|
|
396
|
+
draft.correlations.values,
|
|
397
|
+
signal.id,
|
|
398
|
+
signal.j?.pathLength as FromTo,
|
|
399
|
+
);
|
|
400
|
+
}
|
|
458
401
|
}
|
|
402
|
+
|
|
403
|
+
handleUpdateCorrelations(draft);
|
|
459
404
|
}
|
|
460
405
|
|
|
461
406
|
function initializeZoneViewObject(draft: Draft<State>, spectrumID: string) {
|
|
@@ -473,7 +418,7 @@ function togglePeaksViewProperty(
|
|
|
473
418
|
) {
|
|
474
419
|
const activeSpectrum = getActiveSpectrum(draft);
|
|
475
420
|
|
|
476
|
-
if (!activeSpectrum
|
|
421
|
+
if (!activeSpectrum) return;
|
|
477
422
|
|
|
478
423
|
initializeZoneViewObject(draft, activeSpectrum.id);
|
|
479
424
|
|
|
@@ -495,15 +440,11 @@ function handleChangeZoneAssignmentLabel(
|
|
|
495
440
|
action: ChangeZoneAssignmentLabelAction,
|
|
496
441
|
) {
|
|
497
442
|
const { zoneID, value } = action.payload;
|
|
498
|
-
const activeSpectrum = getActiveSpectrum(draft);
|
|
499
|
-
|
|
500
|
-
if (!activeSpectrum?.id) return;
|
|
501
|
-
|
|
502
|
-
const { index } = activeSpectrum;
|
|
503
|
-
const spectrum = draft.data[index];
|
|
504
443
|
|
|
444
|
+
const spectrum = getSpectrum(draft);
|
|
505
445
|
if (!isSpectrum2D(spectrum)) return;
|
|
506
|
-
|
|
446
|
+
|
|
447
|
+
initializeZoneViewObject(draft, spectrum.id);
|
|
507
448
|
|
|
508
449
|
const zoneView = draft.view.zones[spectrum.id];
|
|
509
450
|
|
|
@@ -527,8 +468,8 @@ function handleSetZoneAssignmentLabelCoordination(
|
|
|
527
468
|
action: SetZoneAssignmentLabelCoordinationAction,
|
|
528
469
|
) {
|
|
529
470
|
const { zoneID, coordination } = action.payload;
|
|
530
|
-
const activeSpectrum = getActiveSpectrum(draft);
|
|
531
471
|
|
|
472
|
+
const activeSpectrum = getActiveSpectrum(draft);
|
|
532
473
|
if (!activeSpectrum) return;
|
|
533
474
|
|
|
534
475
|
initializeZoneViewObject(draft, activeSpectrum.id);
|
|
@@ -555,5 +496,4 @@ export {
|
|
|
555
496
|
handleSetZoneAssignmentLabelCoordination,
|
|
556
497
|
handleToggleZonesViewProperty,
|
|
557
498
|
handleUnlinkZone,
|
|
558
|
-
unlinkZone,
|
|
559
499
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import type { Draft } from 'immer';
|
|
2
|
+
|
|
1
3
|
import { get2DXScale, get2DYScale } from '../../2d/utilities/scale.js';
|
|
4
|
+
import type { State } from '../Reducer.ts';
|
|
2
5
|
|
|
3
6
|
export interface ZoneBoundary {
|
|
4
7
|
startX: number;
|
|
@@ -7,7 +10,7 @@ export interface ZoneBoundary {
|
|
|
7
10
|
endY: number;
|
|
8
11
|
}
|
|
9
12
|
|
|
10
|
-
export default function get2DRange(draft:
|
|
13
|
+
export default function get2DRange(draft: Draft<State>, options: ZoneBoundary) {
|
|
11
14
|
const { startX, startY, endX, endY } = options;
|
|
12
15
|
const scaleX = get2DXScale(draft);
|
|
13
16
|
const scaleY = get2DYScale(draft);
|
|
@@ -22,7 +22,7 @@ export function getSpectrum(
|
|
|
22
22
|
): GetSpectrumReturn {
|
|
23
23
|
const activeSpectrum = getActiveSpectrum(state);
|
|
24
24
|
|
|
25
|
-
if (value === undefined && activeSpectrum
|
|
25
|
+
if (value === undefined && activeSpectrum) {
|
|
26
26
|
const index = activeSpectrum.index;
|
|
27
27
|
return state.data[index];
|
|
28
28
|
}
|
|
@@ -41,7 +41,7 @@ export function setRangesViewProperty<T extends keyof RangesViewState>(
|
|
|
41
41
|
if (!spectrumKey) {
|
|
42
42
|
const activeSpectrum = getActiveSpectrum(draft);
|
|
43
43
|
|
|
44
|
-
if (!activeSpectrum
|
|
44
|
+
if (!activeSpectrum) return;
|
|
45
45
|
|
|
46
46
|
spectrumKey = activeSpectrum.id;
|
|
47
47
|
}
|
|
@@ -296,7 +296,12 @@ export default function ToolBar() {
|
|
|
296
296
|
},
|
|
297
297
|
{
|
|
298
298
|
id: 'multipleSpectraAnalysis',
|
|
299
|
-
tooltip:
|
|
299
|
+
tooltip: {
|
|
300
|
+
title: options.multipleSpectraAnalysis.label,
|
|
301
|
+
shortcuts: ['m'],
|
|
302
|
+
description:
|
|
303
|
+
'Integrate multiple spectra at once and adjust integration zones by dragging their edges.',
|
|
304
|
+
},
|
|
300
305
|
icon: <SvgNmrMultipleAnalysis />,
|
|
301
306
|
checkOptions: { checkSpectrumType: false },
|
|
302
307
|
isVisible: ftCounter > 0,
|
|
@@ -227,7 +227,7 @@ export const options: RecordOptions = {
|
|
|
227
227
|
},
|
|
228
228
|
multipleSpectraAnalysis: {
|
|
229
229
|
id: 'multipleSpectraAnalysis',
|
|
230
|
-
label: 'Multiple spectra
|
|
230
|
+
label: 'Multiple spectra integration',
|
|
231
231
|
hasOptionPanel: false,
|
|
232
232
|
isFilter: false,
|
|
233
233
|
mode: '1D',
|
|
@@ -3,7 +3,8 @@ import type { DeepPartial, FieldValues, UseFormReturn } from 'react-hook-form';
|
|
|
3
3
|
import { useWatch } from 'react-hook-form';
|
|
4
4
|
|
|
5
5
|
interface UseWatchFormProps<F extends FieldValues = FieldValues>
|
|
6
|
-
extends
|
|
6
|
+
extends
|
|
7
|
+
Pick<UseFormReturn<F>, 'control'>,
|
|
7
8
|
Partial<Pick<UseFormReturn<F>, 'reset'>> {
|
|
8
9
|
initialValues?: F;
|
|
9
10
|
onChange?: (values: DeepPartial<F>) => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getJPathsAsObject } from 'get-jpaths';
|
|
2
|
+
import type { DatabaseNMREntry } from 'nmr-processing';
|
|
3
|
+
|
|
4
|
+
export function filterDatabaseInfoEntry(input: DatabaseNMREntry) {
|
|
5
|
+
return getJPathsAsObject(input, {
|
|
6
|
+
maxArrayElements: 5,
|
|
7
|
+
maxDepth: 10,
|
|
8
|
+
includeJPathRegexps: [/^(smiles|names|meta)\./],
|
|
9
|
+
});
|
|
10
|
+
}
|
|
@@ -6,7 +6,10 @@ interface StackOverlappingLabelsOptions<T> {
|
|
|
6
6
|
padding?: number;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
type StackOverlappingLabelsMapReturnType = Record<
|
|
9
|
+
export type StackOverlappingLabelsMapReturnType = Record<
|
|
10
|
+
string | number,
|
|
11
|
+
number
|
|
12
|
+
>;
|
|
10
13
|
|
|
11
14
|
type StackOverlappingLabelsArrayItemReturnType<T> = T & {
|
|
12
15
|
stackIndex: number;
|