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
|
@@ -8,7 +8,10 @@ import type { NmrData2DFt } from 'cheminfo-types';
|
|
|
8
8
|
import { extent } from 'd3-array';
|
|
9
9
|
import type { Draft } from 'immer';
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
get1DDataXY,
|
|
13
|
+
isSpectrum1D,
|
|
14
|
+
} from '../../../data/data1d/Spectrum1D/index.js';
|
|
12
15
|
import {
|
|
13
16
|
isFid1DSpectrum,
|
|
14
17
|
isFt1DSpectrum,
|
|
@@ -23,7 +26,7 @@ import type { State } from '../Reducer.js';
|
|
|
23
26
|
import { rescaleToSameTop } from '../helper/Zoom1DManager.js';
|
|
24
27
|
import { addToBrushHistory } from '../helper/ZoomHistoryManager.js';
|
|
25
28
|
import { getActiveSpectra } from '../helper/getActiveSpectra.js';
|
|
26
|
-
import {
|
|
29
|
+
import { getSpectrum } from '../helper/getSpectrum.ts';
|
|
27
30
|
import type { ActionType } from '../types/ActionType.js';
|
|
28
31
|
|
|
29
32
|
type NumberExtent = [number, number];
|
|
@@ -66,19 +69,13 @@ function getActiveData(draft: Draft<State>): Spectrum1D[] {
|
|
|
66
69
|
let data = draft.data.filter(
|
|
67
70
|
(datum) =>
|
|
68
71
|
nucleusToString(datum.info.nucleus) === draft.view.spectra.activeTab &&
|
|
69
|
-
datum
|
|
72
|
+
isSpectrum1D(datum),
|
|
70
73
|
);
|
|
71
74
|
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
(datum) => datum.id === activeSpectrum?.id,
|
|
77
|
-
);
|
|
78
|
-
if (activeSpectrumIndex !== -1) {
|
|
79
|
-
const isFid = isFid1DSpectrum(data[activeSpectrumIndex]);
|
|
80
|
-
data = data.filter((datum) => datum.info.isFid === isFid);
|
|
81
|
-
}
|
|
75
|
+
const spectrum = getSpectrum(draft);
|
|
76
|
+
if (spectrum) {
|
|
77
|
+
const isFid = isFid1DSpectrum(spectrum);
|
|
78
|
+
data = data.filter((datum) => datum.info.isFid === isFid);
|
|
82
79
|
} else {
|
|
83
80
|
data = data.filter((datum) => isFt1DSpectrum(datum));
|
|
84
81
|
}
|
|
@@ -153,11 +150,9 @@ function get2DDomain(state: State) {
|
|
|
153
150
|
} = state;
|
|
154
151
|
|
|
155
152
|
const nucleus = activeTab.split(',');
|
|
156
|
-
const
|
|
157
|
-
const spectrum =
|
|
158
|
-
data.find((datum) => datum.id === activeSpectrum?.id) || null;
|
|
153
|
+
const spectrum = getSpectrum(state);
|
|
159
154
|
|
|
160
|
-
if (
|
|
155
|
+
if (isSpectrum2D(spectrum)) {
|
|
161
156
|
if (isFid2DData(spectrum.data)) {
|
|
162
157
|
const { minX, maxX, minY, maxY } = spectrum.data.re;
|
|
163
158
|
xArray = [minX, maxX];
|
|
@@ -188,6 +183,7 @@ function get2DDomain(state: State) {
|
|
|
188
183
|
}
|
|
189
184
|
}
|
|
190
185
|
}
|
|
186
|
+
|
|
191
187
|
const spectraIDs = new Set();
|
|
192
188
|
|
|
193
189
|
for (const n of nucleus) {
|
|
@@ -196,11 +192,9 @@ function get2DDomain(state: State) {
|
|
|
196
192
|
spectraIDs.add(spectra[0].id);
|
|
197
193
|
}
|
|
198
194
|
}
|
|
199
|
-
const filteredData = data
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
return datum as Spectrum1D;
|
|
203
|
-
});
|
|
195
|
+
const filteredData = data.filter(
|
|
196
|
+
(d) => spectraIDs.has(d.id) && isSpectrum1D(d),
|
|
197
|
+
) as Spectrum1D[];
|
|
204
198
|
|
|
205
199
|
try {
|
|
206
200
|
for (const d of filteredData) {
|
|
@@ -12,7 +12,7 @@ import type {
|
|
|
12
12
|
import type { Spectrum1D, Spectrum2D, Spectrum } from '@zakodium/nmrium-core';
|
|
13
13
|
import type { NmrData1D, NmrData2DFt } from 'cheminfo-types';
|
|
14
14
|
import type { Draft } from 'immer';
|
|
15
|
-
import { current } from 'immer';
|
|
15
|
+
import { current, isDraft } from 'immer';
|
|
16
16
|
import { xFindClosestIndex } from 'ml-spectra-processing';
|
|
17
17
|
import type { Filter1D, FilterDomainUpdateRules } from 'nmr-processing';
|
|
18
18
|
import {
|
|
@@ -321,38 +321,36 @@ function findSpectrum(
|
|
|
321
321
|
options: SpectrumOptions,
|
|
322
322
|
): { index: number; spectrum: Spectrum } | null {
|
|
323
323
|
const { target } = options;
|
|
324
|
-
const spectra =
|
|
324
|
+
const spectra = draft.data;
|
|
325
325
|
if (target === 'active') {
|
|
326
326
|
const activeSpectrum = getActiveSpectrum(draft);
|
|
327
|
-
|
|
328
327
|
if (!activeSpectrum) return null;
|
|
328
|
+
|
|
329
329
|
const { index } = activeSpectrum;
|
|
330
|
-
return { index, spectrum:
|
|
330
|
+
return { index, spectrum: spectra[index] };
|
|
331
331
|
}
|
|
332
332
|
|
|
333
333
|
if (target === 'current') {
|
|
334
334
|
const { spectrum } = options;
|
|
335
|
-
|
|
336
335
|
if (!spectrum) return null;
|
|
337
336
|
|
|
338
337
|
const index = spectra.findIndex((datum) => datum.id === spectrum.id);
|
|
339
|
-
return { index, spectrum
|
|
338
|
+
return { index, spectrum };
|
|
340
339
|
}
|
|
341
340
|
|
|
342
341
|
if (target === 'id') {
|
|
343
342
|
const { id } = options;
|
|
344
343
|
const index = spectra.findIndex((spectrum) => spectrum.id === id);
|
|
345
|
-
|
|
346
344
|
if (index === -1) return null;
|
|
347
345
|
|
|
348
|
-
return { index, spectrum:
|
|
346
|
+
return { index, spectrum: spectra[index] };
|
|
349
347
|
}
|
|
350
348
|
if (target === 'index') {
|
|
351
349
|
const { index } = options;
|
|
352
350
|
const spectrum = spectra?.[index];
|
|
353
351
|
if (spectrum) return null;
|
|
354
352
|
|
|
355
|
-
return { index, spectrum
|
|
353
|
+
return { index, spectrum };
|
|
356
354
|
}
|
|
357
355
|
|
|
358
356
|
return null;
|
|
@@ -441,8 +439,7 @@ function rollbackSpectrumByFilter(
|
|
|
441
439
|
let currentIsFid = false;
|
|
442
440
|
const toolData = draft.toolOptions.data;
|
|
443
441
|
if (currentSpectrum) {
|
|
444
|
-
const { index } = currentSpectrum;
|
|
445
|
-
let { spectrum } = currentSpectrum;
|
|
442
|
+
const { index, spectrum } = currentSpectrum;
|
|
446
443
|
previousIsFid = isFid1DSpectrum(spectrum) || isFid2DSpectrum(spectrum);
|
|
447
444
|
const filterIndex = spectrum.filters.findIndex((f) => f[searchBy] === key);
|
|
448
445
|
if (filterIndex === -1 || reset) {
|
|
@@ -458,16 +455,15 @@ function rollbackSpectrumByFilter(
|
|
|
458
455
|
reapplyFilters(spectrum, filters);
|
|
459
456
|
}
|
|
460
457
|
|
|
461
|
-
//
|
|
462
|
-
draft.tempData =
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
458
|
+
// If the filter doesn't exist, create a clone of the current data.
|
|
459
|
+
draft.tempData = current(draft).data.slice();
|
|
460
|
+
draft.tempData[index] = structuredClone(
|
|
461
|
+
isDraft(spectrum) ? current(spectrum) : spectrum,
|
|
462
|
+
);
|
|
466
463
|
|
|
467
464
|
if (tempRollback) {
|
|
468
465
|
reapplyFilters(spectrum);
|
|
469
466
|
}
|
|
470
|
-
draft.data[index] = spectrum;
|
|
471
467
|
}
|
|
472
468
|
|
|
473
469
|
if (filterIndex !== -1 && !reset) {
|
|
@@ -477,7 +473,7 @@ function rollbackSpectrumByFilter(
|
|
|
477
473
|
//set active filter
|
|
478
474
|
toolData.activeFilterID = spectrum.filters?.[filterIndex]?.id || null;
|
|
479
475
|
|
|
480
|
-
const filters
|
|
476
|
+
const filters = spectrum.filters.slice(0, filterIndex);
|
|
481
477
|
|
|
482
478
|
updateDomainOptions = getFilterDomain(spectrum, {
|
|
483
479
|
startIndex: Math.min(activeFilterIndex, filterIndex),
|
|
@@ -487,7 +483,9 @@ function rollbackSpectrumByFilter(
|
|
|
487
483
|
reapplyFilters(spectrum, filters);
|
|
488
484
|
|
|
489
485
|
draft.tempData = current(draft).data.slice();
|
|
490
|
-
draft.tempData[index] = structuredClone(
|
|
486
|
+
draft.tempData[index] = structuredClone(
|
|
487
|
+
isDraft(spectrum) ? current(spectrum) : spectrum,
|
|
488
|
+
);
|
|
491
489
|
|
|
492
490
|
// apply the current Filters
|
|
493
491
|
if (applyFilter) {
|
|
@@ -502,8 +500,6 @@ function rollbackSpectrumByFilter(
|
|
|
502
500
|
});
|
|
503
501
|
}
|
|
504
502
|
|
|
505
|
-
draft.data[index] = spectrum;
|
|
506
|
-
|
|
507
503
|
currentIsFid = isFid1DSpectrum(spectrum) || isFid2DSpectrum(spectrum);
|
|
508
504
|
|
|
509
505
|
// Update the X and Y domains when switching from FT to FID spectrum,
|
|
@@ -750,12 +746,10 @@ function afterRollback(draft: Draft<State>, filterKey: any) {
|
|
|
750
746
|
* getActiveFilterIndex return active filter index. Otherwise, its returns -1
|
|
751
747
|
*/
|
|
752
748
|
function getActiveFilterIndex(draft: Draft<State>) {
|
|
753
|
-
const
|
|
749
|
+
const spectrum = getSpectrum(draft);
|
|
754
750
|
const id = draft.toolOptions.data.activeFilterID;
|
|
755
|
-
if (id &&
|
|
756
|
-
|
|
757
|
-
const index = spectrum.filters.findIndex((filter) => filter.id === id);
|
|
758
|
-
return index;
|
|
751
|
+
if (id && spectrum) {
|
|
752
|
+
return spectrum.filters.findIndex((filter) => filter.id === id);
|
|
759
753
|
}
|
|
760
754
|
return -1;
|
|
761
755
|
}
|
|
@@ -799,17 +793,14 @@ function handleShiftSpectrumAlongXAxis(
|
|
|
799
793
|
action: ShiftSpectrumAction,
|
|
800
794
|
) {
|
|
801
795
|
const activeSpectrum = getActiveSpectrum(draft);
|
|
802
|
-
|
|
803
|
-
if (!activeSpectrum) {
|
|
804
|
-
return;
|
|
805
|
-
}
|
|
796
|
+
if (!activeSpectrum) return;
|
|
806
797
|
|
|
807
798
|
const activeFilterIndex = getActiveFilterIndex(draft);
|
|
808
799
|
|
|
809
800
|
//apply filter into the spectrum
|
|
810
801
|
const options = action.payload;
|
|
811
802
|
|
|
812
|
-
const index = activeSpectrum
|
|
803
|
+
const index = activeSpectrum.index;
|
|
813
804
|
const isOneDimensionSpectrum = isSpectrum1D(draft.data[index]);
|
|
814
805
|
const isOneDimensionShiftFilter = isOneDimensionShift(options);
|
|
815
806
|
|
|
@@ -1841,20 +1832,13 @@ function handleApplyExclusionZone(
|
|
|
1841
1832
|
) {
|
|
1842
1833
|
const { zones } = action.payload;
|
|
1843
1834
|
|
|
1844
|
-
const
|
|
1845
|
-
|
|
1846
|
-
if (!activeSpectrum) {
|
|
1847
|
-
return;
|
|
1848
|
-
}
|
|
1849
|
-
const datum = draft.data[activeSpectrum.index];
|
|
1835
|
+
const spectrum = getSpectrum(draft);
|
|
1836
|
+
if (!isSpectrum1D(spectrum)) return;
|
|
1850
1837
|
|
|
1851
|
-
if (!isSpectrum1D(datum)) {
|
|
1852
|
-
return;
|
|
1853
|
-
}
|
|
1854
1838
|
const activeFilterIndex = getActiveFilterIndex(draft);
|
|
1855
1839
|
|
|
1856
1840
|
Filters1DManager.applyFilters(
|
|
1857
|
-
|
|
1841
|
+
spectrum,
|
|
1858
1842
|
[
|
|
1859
1843
|
{
|
|
1860
1844
|
name: 'exclusionZones',
|
|
@@ -1879,8 +1863,8 @@ function handleAddExclusionZone(
|
|
|
1879
1863
|
let spectra: Spectrum1D[];
|
|
1880
1864
|
|
|
1881
1865
|
const activeSpectrum = getActiveSpectrum(draft);
|
|
1882
|
-
if (activeSpectrum
|
|
1883
|
-
const index = activeSpectrum
|
|
1866
|
+
if (activeSpectrum) {
|
|
1867
|
+
const index = activeSpectrum.index;
|
|
1884
1868
|
spectra = [draft.data[index]] as Spectrum1D[];
|
|
1885
1869
|
} else {
|
|
1886
1870
|
spectra = getSpectraByNucleus(
|
|
@@ -1916,12 +1900,11 @@ function handleDeleteExclusionZone(
|
|
|
1916
1900
|
) {
|
|
1917
1901
|
const { zone, spectrumId } = action.payload;
|
|
1918
1902
|
|
|
1919
|
-
//
|
|
1903
|
+
// If spectrum id exists, remove the selected exclusion zone in the spectrum.
|
|
1920
1904
|
if (spectrumId) {
|
|
1921
|
-
const
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
const spectrum = draft.data[spectrumIndex];
|
|
1905
|
+
const spectrum = getSpectrum(draft, spectrumId);
|
|
1906
|
+
if (!spectrum) return;
|
|
1907
|
+
|
|
1925
1908
|
const filter = spectrum.filters.find(
|
|
1926
1909
|
(_filter) => _filter.name === 'exclusionZones',
|
|
1927
1910
|
);
|
|
@@ -1954,20 +1937,13 @@ function handleSetOneDimensionPhaseCorrectionPivotPoint(
|
|
|
1954
1937
|
action: SetOneDimensionPhaseCorrectionPivotPoint,
|
|
1955
1938
|
) {
|
|
1956
1939
|
const { value: xValue } = action.payload;
|
|
1957
|
-
const activeSpectrum = getActiveSpectrum(draft);
|
|
1958
1940
|
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
}
|
|
1962
|
-
const datum = draft.data[activeSpectrum.index];
|
|
1963
|
-
|
|
1964
|
-
if (!isSpectrum1D(datum)) {
|
|
1965
|
-
return;
|
|
1966
|
-
}
|
|
1941
|
+
const spectrum = getSpectrum(draft);
|
|
1942
|
+
if (!isSpectrum1D(spectrum)) return;
|
|
1967
1943
|
|
|
1968
1944
|
const scaleX = getXScale(draft);
|
|
1969
1945
|
const value = scaleX.invert(xValue);
|
|
1970
|
-
const index = xFindClosestIndex(
|
|
1946
|
+
const index = xFindClosestIndex(spectrum.data.x, value);
|
|
1971
1947
|
draft.toolOptions.data.pivot = { value, index };
|
|
1972
1948
|
}
|
|
1973
1949
|
function handleSetTwoDimensionPhaseCorrectionPivotPoint(
|
|
@@ -7,7 +7,7 @@ import { scaleLinear } from 'd3-scale';
|
|
|
7
7
|
import { zoomIdentity } from 'd3-zoom';
|
|
8
8
|
import type { Draft } from 'immer';
|
|
9
9
|
|
|
10
|
-
import { isSpectrum1D } from '../../../data/data1d/Spectrum1D/
|
|
10
|
+
import { isSpectrum1D } from '../../../data/data1d/Spectrum1D/index.ts';
|
|
11
11
|
import { insetMargin } from '../../1d/inset/InsetProvider.js';
|
|
12
12
|
import type {
|
|
13
13
|
Inset,
|
|
@@ -28,8 +28,8 @@ import type { SpectraDirection, State } from '../Reducer.js';
|
|
|
28
28
|
import type { ZoomType } from '../helper/Zoom1DManager.js';
|
|
29
29
|
import { toScaleRatio, wheelZoom } from '../helper/Zoom1DManager.js';
|
|
30
30
|
import { preparePop } from '../helper/ZoomHistoryManager.js';
|
|
31
|
-
import { getActiveSpectrum } from '../helper/getActiveSpectrum.js';
|
|
32
31
|
import getRange from '../helper/getRange.js';
|
|
32
|
+
import { getSpectrum } from '../helper/getSpectrum.ts';
|
|
33
33
|
import type { ActionType } from '../types/ActionType.js';
|
|
34
34
|
|
|
35
35
|
import type { MoveOptions } from './DomainActions.js';
|
|
@@ -104,14 +104,10 @@ export type InsetsActions =
|
|
|
104
104
|
| ToggleInsetDisplayingPeaksModeAction;
|
|
105
105
|
|
|
106
106
|
function handleAddInset(draft: Draft<State>, action: AddInsetAction) {
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
if (!activeSpectrum) return;
|
|
110
|
-
|
|
111
|
-
const { index } = activeSpectrum;
|
|
112
|
-
const datum = draft.data[index];
|
|
107
|
+
const { startX, endX } = action.payload;
|
|
113
108
|
|
|
114
|
-
|
|
109
|
+
const spectrum = getSpectrum(draft);
|
|
110
|
+
if (!isSpectrum1D(spectrum)) return;
|
|
115
111
|
|
|
116
112
|
const {
|
|
117
113
|
yDomain,
|
|
@@ -121,9 +117,8 @@ function handleAddInset(draft: Draft<State>, action: AddInsetAction) {
|
|
|
121
117
|
width: baseWidth,
|
|
122
118
|
height: baseHeight,
|
|
123
119
|
} = draft;
|
|
124
|
-
const { id: spectrumKey } =
|
|
120
|
+
const { id: spectrumKey } = spectrum;
|
|
125
121
|
|
|
126
|
-
const { startX, endX } = action.payload;
|
|
127
122
|
const xDomain = getRange(draft, { startX, endX });
|
|
128
123
|
|
|
129
124
|
const width = Math.max(100, Math.abs(startX - endX));
|
|
@@ -154,22 +149,17 @@ function handleAddInset(draft: Draft<State>, action: AddInsetAction) {
|
|
|
154
149
|
draft.insets[nucleus] = [inset];
|
|
155
150
|
}
|
|
156
151
|
}
|
|
157
|
-
function handleDeleteInset(draft: Draft<State>, action: DeleteInsetAction) {
|
|
158
|
-
const activeSpectrum = getActiveSpectrum(draft);
|
|
159
152
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
const { index } = activeSpectrum;
|
|
163
|
-
const datum = draft.data[index];
|
|
153
|
+
function handleDeleteInset(draft: Draft<State>, action: DeleteInsetAction) {
|
|
154
|
+
const { insetKey } = action.payload;
|
|
164
155
|
|
|
165
|
-
if (!isSpectrum1D(datum)) return;
|
|
166
156
|
const {
|
|
167
157
|
view: {
|
|
168
158
|
spectra: { activeTab },
|
|
169
159
|
},
|
|
170
160
|
} = draft;
|
|
171
161
|
|
|
172
|
-
|
|
162
|
+
if (!activeTab) return;
|
|
173
163
|
|
|
174
164
|
draft.insets[activeTab] = draft.insets[activeTab].filter(
|
|
175
165
|
(inset) => inset.id !== insetKey,
|
|
@@ -20,7 +20,6 @@ import {
|
|
|
20
20
|
} from '../../../data/data1d/Spectrum1D/index.js';
|
|
21
21
|
import type { FilterType } from '../../utility/filterType.js';
|
|
22
22
|
import type { State } from '../Reducer.js';
|
|
23
|
-
import { getActiveSpectrum } from '../helper/getActiveSpectrum.js';
|
|
24
23
|
import getRange from '../helper/getRange.js';
|
|
25
24
|
import { getSpectrum } from '../helper/getSpectrum.js';
|
|
26
25
|
import { setIntegralsViewProperty } from '../helper/setIntegralsViewProperty.js';
|
|
@@ -70,21 +69,15 @@ function handleChangeIntegralSum(
|
|
|
70
69
|
action: ChangeIntegralSumAction,
|
|
71
70
|
) {
|
|
72
71
|
const { options } = action.payload;
|
|
73
|
-
const {
|
|
74
|
-
data,
|
|
75
|
-
view: {
|
|
76
|
-
spectra: { activeTab: nucleus },
|
|
77
|
-
},
|
|
78
|
-
} = draft;
|
|
79
72
|
|
|
80
|
-
const
|
|
73
|
+
const spectrum = getSpectrum(draft);
|
|
74
|
+
if (!isSpectrum1D(spectrum)) return;
|
|
81
75
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
76
|
+
setSumOptions(spectrum.integrals, {
|
|
77
|
+
options,
|
|
78
|
+
nucleus: spectrum.info.nucleus,
|
|
79
|
+
});
|
|
80
|
+
updateIntegralsRelativeValues(spectrum, true);
|
|
88
81
|
}
|
|
89
82
|
|
|
90
83
|
interface AddIntegralOptions {
|
|
@@ -92,19 +85,19 @@ interface AddIntegralOptions {
|
|
|
92
85
|
to: number;
|
|
93
86
|
}
|
|
94
87
|
|
|
95
|
-
function initiateIntegralSumOptions(
|
|
88
|
+
function initiateIntegralSumOptions(spectrum: Spectrum1D, options: SumParams) {
|
|
96
89
|
const { molecules, nucleus } = options;
|
|
97
|
-
|
|
90
|
+
spectrum.integrals.options = initSumOptions(spectrum.integrals.options, {
|
|
98
91
|
molecules,
|
|
99
92
|
nucleus,
|
|
100
93
|
});
|
|
101
94
|
}
|
|
102
95
|
|
|
103
|
-
function addIntegral(
|
|
96
|
+
function addIntegral(spectrum: Spectrum1D, options: AddIntegralOptions) {
|
|
104
97
|
const { from, to } = options;
|
|
105
|
-
const { x, re } =
|
|
98
|
+
const { x, re } = spectrum.data;
|
|
106
99
|
|
|
107
|
-
const shiftX = getShiftX(
|
|
100
|
+
const shiftX = getShiftX(spectrum);
|
|
108
101
|
const integration = xyIntegration({ x, y: re }, { from, to });
|
|
109
102
|
const integral: Integral = {
|
|
110
103
|
id: crypto.randomUUID(),
|
|
@@ -116,26 +109,24 @@ function addIntegral(datum: Spectrum1D, options: AddIntegralOptions) {
|
|
|
116
109
|
absolute: integration,
|
|
117
110
|
kind: 'signal',
|
|
118
111
|
};
|
|
119
|
-
|
|
112
|
+
spectrum.integrals.values.push(integral);
|
|
120
113
|
}
|
|
121
114
|
|
|
122
115
|
function handleAddIntegral(draft: Draft<State>, action: AddIntegralAction) {
|
|
123
116
|
const { startX, endX } = action.payload;
|
|
124
117
|
const {
|
|
125
|
-
data,
|
|
126
118
|
molecules,
|
|
127
119
|
view: {
|
|
128
120
|
spectra: { activeTab: nucleus },
|
|
129
121
|
},
|
|
130
122
|
} = draft;
|
|
131
123
|
|
|
132
|
-
const
|
|
133
|
-
if (
|
|
124
|
+
const spectrum = getSpectrum(draft);
|
|
125
|
+
if (isSpectrum1D(spectrum)) {
|
|
134
126
|
const [from, to] = getRange(draft, { startX, endX });
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
updateIntegralsRelativeValues(datum);
|
|
127
|
+
addIntegral(spectrum, { from, to });
|
|
128
|
+
initiateIntegralSumOptions(spectrum, { molecules, nucleus });
|
|
129
|
+
updateIntegralsRelativeValues(spectrum);
|
|
139
130
|
}
|
|
140
131
|
}
|
|
141
132
|
|
|
@@ -144,18 +135,18 @@ function handleDeleteIntegral(
|
|
|
144
135
|
action: DeleteIntegralAction,
|
|
145
136
|
) {
|
|
146
137
|
const { id: integralID, spectrumKey } = action?.payload || {};
|
|
147
|
-
const
|
|
138
|
+
const spectrum = getSpectrum(draft, spectrumKey);
|
|
148
139
|
|
|
149
|
-
if (!isSpectrum1D(
|
|
140
|
+
if (!isSpectrum1D(spectrum)) return;
|
|
150
141
|
|
|
151
142
|
if (!integralID) {
|
|
152
|
-
|
|
143
|
+
spectrum.integrals.values = [];
|
|
153
144
|
} else {
|
|
154
|
-
const peakIndex =
|
|
145
|
+
const peakIndex = spectrum.integrals.values.findIndex(
|
|
155
146
|
(p: any) => p.id === integralID,
|
|
156
147
|
);
|
|
157
|
-
|
|
158
|
-
updateIntegralsRelativeValues(
|
|
148
|
+
spectrum.integrals.values.splice(peakIndex, 1);
|
|
149
|
+
updateIntegralsRelativeValues(spectrum);
|
|
159
150
|
}
|
|
160
151
|
}
|
|
161
152
|
|
|
@@ -163,23 +154,20 @@ function handleChangeIntegral(
|
|
|
163
154
|
draft: Draft<State>,
|
|
164
155
|
action: ChangeIntegralAction,
|
|
165
156
|
) {
|
|
166
|
-
const state = original(draft) as State;
|
|
167
157
|
const { integral, spectrumKey } = action.payload;
|
|
168
158
|
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
if (!isSpectrum1D(datum) || !isSpectrum1D(originalDatum)) {
|
|
173
|
-
return;
|
|
174
|
-
}
|
|
159
|
+
const spectrum = getSpectrum(draft, spectrumKey);
|
|
160
|
+
if (!isSpectrum1D(spectrum)) return;
|
|
175
161
|
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
(i: any) => i.id === integral.id,
|
|
162
|
+
const integralIndex = spectrum.integrals.values.findIndex(
|
|
163
|
+
(i) => i.id === integral.id,
|
|
179
164
|
);
|
|
180
165
|
|
|
181
166
|
if (integralIndex !== -1) {
|
|
182
|
-
|
|
167
|
+
const {
|
|
168
|
+
data: { x, re },
|
|
169
|
+
} = original(spectrum) as Spectrum1D;
|
|
170
|
+
spectrum.integrals.values[integralIndex] = {
|
|
183
171
|
...integral,
|
|
184
172
|
originalFrom: integral.from,
|
|
185
173
|
originalTo: integral.to,
|
|
@@ -188,7 +176,7 @@ function handleChangeIntegral(
|
|
|
188
176
|
{ from: integral.from, to: integral.to },
|
|
189
177
|
),
|
|
190
178
|
};
|
|
191
|
-
updateIntegralsRelativeValues(
|
|
179
|
+
updateIntegralsRelativeValues(spectrum);
|
|
192
180
|
}
|
|
193
181
|
}
|
|
194
182
|
|
|
@@ -196,28 +184,29 @@ function handleChangeIntegralsRelativeValue(
|
|
|
196
184
|
draft: Draft<State>,
|
|
197
185
|
action: ChangeIntegralRelativeValueAction,
|
|
198
186
|
) {
|
|
199
|
-
const activeSpectrum = getActiveSpectrum(draft);
|
|
200
187
|
const { id, value } = action.payload;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
188
|
+
|
|
189
|
+
const spectrum = getSpectrum(draft);
|
|
190
|
+
if (!isSpectrum1D(spectrum)) return;
|
|
191
|
+
|
|
192
|
+
changeIntegralsRelative(spectrum, { id, value });
|
|
205
193
|
}
|
|
206
194
|
|
|
207
|
-
function handleChangeIntegralsSumFlag(draft:
|
|
208
|
-
const
|
|
209
|
-
if (
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}
|
|
195
|
+
function handleChangeIntegralsSumFlag(draft: Draft<State>) {
|
|
196
|
+
const spectrum = getSpectrum(draft);
|
|
197
|
+
if (!isSpectrum1D(spectrum)) return;
|
|
198
|
+
|
|
199
|
+
const integralOptions = spectrum.integrals.options;
|
|
200
|
+
integralOptions.isSumConstant = !integralOptions.isSumConstant;
|
|
214
201
|
}
|
|
215
202
|
|
|
216
203
|
function handleCutIntegral(draft: Draft<State>, action: CutIntegralAction) {
|
|
217
204
|
const { cutValue } = action.payload;
|
|
218
|
-
const spectrum = getSpectrum(draft) as Spectrum1D;
|
|
219
|
-
const integrals = spectrum.integrals.values;
|
|
220
205
|
|
|
206
|
+
const spectrum = getSpectrum(draft);
|
|
207
|
+
if (!isSpectrum1D(spectrum)) return;
|
|
208
|
+
|
|
209
|
+
const integrals = spectrum.integrals.values;
|
|
221
210
|
for (let i = 0; i < integrals.length; i++) {
|
|
222
211
|
const { to, from } = integrals[i];
|
|
223
212
|
if (cutValue > from && cutValue < to) {
|