nmrium 3.1.0 → 3.2.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/BrushTracker1D.d.ts.map +1 -1
- package/lib/component/1d/BrushTracker1D.js +5 -2
- package/lib/component/1d/BrushTracker1D.js.map +1 -1
- package/lib/component/1d/FloatPublicationString.d.ts.map +1 -1
- package/lib/component/1d/FloatPublicationString.js +28 -24
- package/lib/component/1d/FloatPublicationString.js.map +1 -1
- package/lib/component/1d/plugin_chart_brush_tracker.d.ts.map +1 -1
- package/lib/component/1d/plugin_chart_brush_tracker.js +2 -1
- package/lib/component/1d/plugin_chart_brush_tracker.js.map +1 -1
- package/lib/component/1d/plugin_svg_chart.d.ts.map +1 -1
- package/lib/component/1d/plugin_svg_chart.js +15 -2
- package/lib/component/1d/plugin_svg_chart.js.map +1 -1
- package/lib/component/1d/ranges/FloatingRanges.js +2 -2
- package/lib/component/1d/ranges/FloatingRanges.js.map +1 -1
- package/lib/component/1d/ranges/Range.d.ts.map +1 -1
- package/lib/component/1d/ranges/Range.js +1 -1
- package/lib/component/1d/ranges/Range.js.map +1 -1
- package/lib/component/1d-2d/FieldEdition.d.ts +2 -1
- package/lib/component/1d-2d/FieldEdition.d.ts.map +1 -1
- package/lib/component/1d-2d/FieldEdition.js +3 -3
- package/lib/component/1d-2d/FieldEdition.js.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +3 -3
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js.map +1 -1
- package/lib/component/2d/1d-tracer/HorizontalSliceChart.d.ts.map +1 -1
- package/lib/component/2d/1d-tracer/HorizontalSliceChart.js +2 -1
- package/lib/component/2d/1d-tracer/HorizontalSliceChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.d.ts.map +1 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js +2 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js.map +1 -1
- package/lib/component/2d/BrushTracker2D.d.ts.map +1 -1
- package/lib/component/2d/BrushTracker2D.js +5 -1
- package/lib/component/2d/BrushTracker2D.js.map +1 -1
- package/lib/component/2d/SVGContent2D.d.ts.map +1 -1
- package/lib/component/2d/SVGContent2D.js +2 -1
- package/lib/component/2d/SVGContent2D.js.map +1 -1
- package/lib/component/2d/SignalDeltaLine.d.ts +3 -0
- package/lib/component/2d/SignalDeltaLine.d.ts.map +1 -1
- package/lib/component/2d/SignalDeltaLine.js +3 -4
- package/lib/component/2d/SignalDeltaLine.js.map +1 -1
- package/lib/component/2d/linked-signals/LinkedSignal.d.ts +7 -0
- package/lib/component/2d/linked-signals/LinkedSignal.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/LinkedSignal.js +42 -0
- package/lib/component/2d/linked-signals/LinkedSignal.js.map +1 -0
- package/lib/component/2d/linked-signals/LinkedSignalAssignmentLabel.d.ts +8 -0
- package/lib/component/2d/linked-signals/LinkedSignalAssignmentLabel.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/LinkedSignalAssignmentLabel.js +152 -0
- package/lib/component/2d/linked-signals/LinkedSignalAssignmentLabel.js.map +1 -0
- package/lib/component/2d/linked-signals/LinkedSignals.d.ts +2 -0
- package/lib/component/2d/linked-signals/LinkedSignals.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/LinkedSignals.js +32 -0
- package/lib/component/2d/linked-signals/LinkedSignals.js.map +1 -0
- package/lib/component/2d/linked-signals/SignalCrossingIndicator.d.ts +3 -0
- package/lib/component/2d/linked-signals/SignalCrossingIndicator.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/SignalCrossingIndicator.js +36 -0
- package/lib/component/2d/linked-signals/SignalCrossingIndicator.js.map +1 -0
- package/lib/component/2d/linked-signals/useClassifyCorrelation.d.ts +5 -0
- package/lib/component/2d/linked-signals/useClassifyCorrelation.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/useClassifyCorrelation.js +16 -0
- package/lib/component/2d/linked-signals/useClassifyCorrelation.js.map +1 -0
- package/lib/component/2d/linked-signals/useNearestSignalCrossing.d.ts +13 -0
- package/lib/component/2d/linked-signals/useNearestSignalCrossing.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/useNearestSignalCrossing.js +41 -0
- package/lib/component/2d/linked-signals/useNearestSignalCrossing.js.map +1 -0
- package/lib/component/2d/linked-signals/utilities/getCorrelationColor.d.ts +5 -0
- package/lib/component/2d/linked-signals/utilities/getCorrelationColor.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/utilities/getCorrelationColor.js +31 -0
- package/lib/component/2d/linked-signals/utilities/getCorrelationColor.js.map +1 -0
- package/lib/component/2d/linked-signals/utilities/getCouplingLength.d.ts +3 -0
- package/lib/component/2d/linked-signals/utilities/getCouplingLength.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/utilities/getCouplingLength.js +41 -0
- package/lib/component/2d/linked-signals/utilities/getCouplingLength.js.map +1 -0
- package/lib/component/2d/linked-signals/utilities/signalCrossings.d.ts +45 -0
- package/lib/component/2d/linked-signals/utilities/signalCrossings.d.ts.map +1 -0
- package/lib/component/2d/linked-signals/utilities/signalCrossings.js +73 -0
- package/lib/component/2d/linked-signals/utilities/signalCrossings.js.map +1 -0
- package/lib/component/2d/utilities/extractSpectrumSignals.d.ts +5 -0
- package/lib/component/2d/utilities/extractSpectrumSignals.d.ts.map +1 -1
- package/lib/component/2d/utilities/extractSpectrumSignals.js +15 -0
- package/lib/component/2d/utilities/extractSpectrumSignals.js.map +1 -1
- package/lib/component/2d/utilities/useAssignmentLabelLinkPath.d.ts +17 -0
- package/lib/component/2d/utilities/useAssignmentLabelLinkPath.d.ts.map +1 -0
- package/lib/component/2d/utilities/useAssignmentLabelLinkPath.js +99 -0
- package/lib/component/2d/utilities/useAssignmentLabelLinkPath.js.map +1 -0
- package/lib/component/2d/zones/SignalsGuideLines.d.ts.map +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.js +3 -2
- package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
- package/lib/component/2d/zones/Zone.d.ts.map +1 -1
- package/lib/component/2d/zones/Zone.js +47 -1
- package/lib/component/2d/zones/Zone.js.map +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.d.ts.map +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js +4 -148
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.js +101 -16
- 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/EventsTrackers/brush_tracker.types.d.ts +40 -0
- package/lib/component/EventsTrackers/brush_tracker.types.d.ts.map +1 -1
- package/lib/component/EventsTrackers/brush_tracker_drag_gesture.d.ts +42 -0
- package/lib/component/EventsTrackers/brush_tracker_drag_gesture.d.ts.map +1 -0
- package/lib/component/EventsTrackers/brush_tracker_drag_gesture.js +46 -0
- package/lib/component/EventsTrackers/brush_tracker_drag_gesture.js.map +1 -0
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.d.ts +1 -1
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.d.ts.map +1 -1
- package/lib/component/EventsTrackers/brush_tracker_events_listeners.js.map +1 -1
- package/lib/component/context/DispatchContext.d.ts +2 -1
- package/lib/component/context/DispatchContext.d.ts.map +1 -1
- package/lib/component/context/DispatchContext.js.map +1 -1
- package/lib/component/context/processings_mutations_context.api.d.ts.map +1 -1
- package/lib/component/context/processings_mutations_context.api.js +5 -2
- package/lib/component/context/processings_mutations_context.api.js.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.d.ts +1 -0
- package/lib/component/elements/ActionsButtonsPopover.d.ts.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.js +14 -6
- package/lib/component/elements/ActionsButtonsPopover.js.map +1 -1
- package/lib/component/elements/export/ExportContent.js +1 -1
- package/lib/component/elements/export/ExportContent.js.map +1 -1
- package/lib/component/elements/print/PrintContent.js +1 -1
- package/lib/component/elements/print/PrintContent.js.map +1 -1
- package/lib/component/elements/tanstack_table/elements/table_row.d.ts.map +1 -1
- package/lib/component/elements/tanstack_table/elements/table_row.js +2 -2
- package/lib/component/elements/tanstack_table/elements/table_row.js.map +1 -1
- package/lib/component/elements/tanstack_table/table.d.ts.map +1 -1
- package/lib/component/elements/tanstack_table/table.js +2 -1
- package/lib/component/elements/tanstack_table/table.js.map +1 -1
- package/lib/component/elements/tanstack_table/types.d.ts +2 -0
- package/lib/component/elements/tanstack_table/types.d.ts.map +1 -1
- package/lib/component/highlight/index.d.ts +2 -0
- package/lib/component/highlight/index.d.ts.map +1 -1
- package/lib/component/highlight/index.js.map +1 -1
- package/lib/component/hooks/usePanelPreferences.d.ts +2 -2
- package/lib/component/hooks/usePanelPreferences.d.ts.map +1 -1
- package/lib/component/hooks/usePanelPreferences.js +5 -1
- package/lib/component/hooks/usePanelPreferences.js.map +1 -1
- package/lib/component/hooks/useToolsFunctions.d.ts.map +1 -1
- package/lib/component/hooks/useToolsFunctions.js +8 -5
- package/lib/component/hooks/useToolsFunctions.js.map +1 -1
- package/lib/component/hooks/use_publication_strings.d.ts +3 -1
- package/lib/component/hooks/use_publication_strings.d.ts.map +1 -1
- package/lib/component/hooks/use_publication_strings.js +10 -6
- package/lib/component/hooks/use_publication_strings.js.map +1 -1
- package/lib/component/modal/PredictSpectraModal.d.ts.map +1 -1
- package/lib/component/modal/PredictSpectraModal.js +5 -2
- package/lib/component/modal/PredictSpectraModal.js.map +1 -1
- package/lib/component/modal/PredictionLimitModal.d.ts +10 -0
- package/lib/component/modal/PredictionLimitModal.d.ts.map +1 -0
- package/lib/component/modal/PredictionLimitModal.js +31 -0
- package/lib/component/modal/PredictionLimitModal.js.map +1 -0
- package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js +1 -1
- package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +24 -0
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts +24 -0
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +24 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts +2 -0
- package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.js +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.js +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.d.ts +11 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.js +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.d.ts +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.js +1 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts +12 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +2 -2
- package/lib/component/panels/IntegralsPanel/IntegralTable.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +5 -5
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.js +11 -9
- package/lib/component/panels/MoleculesPanel/MoleculeStructure.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js +7 -2
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.d.ts +3 -0
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js +31 -17
- package/lib/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.d.ts +18 -0
- package/lib/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.js +113 -0
- package/lib/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.js.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.d.ts +11 -0
- package/lib/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.d.ts.map +1 -0
- package/lib/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.js +28 -0
- package/lib/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.js.map +1 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraPanelHeader.js +1 -1
- package/lib/component/panels/SpectraPanel/SpectraPanelHeader.js.map +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +1 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js.map +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentLabelColumn.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentLabelColumn.js +40 -4
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentLabelColumn.js.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesPanel.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +17 -5
- package/lib/component/panels/ZonesPanel/ZonesPanel.js.map +1 -1
- package/lib/component/panels/accordionItems.d.ts.map +1 -1
- package/lib/component/panels/accordionItems.js +7 -0
- package/lib/component/panels/accordionItems.js.map +1 -1
- package/lib/component/panels/assignment-summary/AssignmentSummaryPanel.d.ts +2 -0
- package/lib/component/panels/assignment-summary/AssignmentSummaryPanel.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/AssignmentSummaryPanel.js +136 -0
- package/lib/component/panels/assignment-summary/AssignmentSummaryPanel.js.map +1 -0
- package/lib/component/panels/assignment-summary/AssignmentsExportModal.d.ts +10 -0
- package/lib/component/panels/assignment-summary/AssignmentsExportModal.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/AssignmentsExportModal.js +128 -0
- package/lib/component/panels/assignment-summary/AssignmentsExportModal.js.map +1 -0
- package/lib/component/panels/assignment-summary/MoleculeAssignmentTable.d.ts +11 -0
- package/lib/component/panels/assignment-summary/MoleculeAssignmentTable.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/MoleculeAssignmentTable.js +113 -0
- package/lib/component/panels/assignment-summary/MoleculeAssignmentTable.js.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentAtomCell.d.ts +8 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentAtomCell.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentAtomCell.js +16 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentAtomCell.js.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.d.ts +7 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.js +22 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.js.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.d.ts +7 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.js +5 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.js.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentLabelCell.d.ts +9 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentLabelCell.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentLabelCell.js +10 -0
- package/lib/component/panels/assignment-summary/table-cells/AssignmentLabelCell.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.d.ts +54 -0
- package/lib/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.js +161 -0
- package/lib/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/exportAssignments.d.ts +19 -0
- package/lib/component/panels/assignment-summary/utilities/exportAssignments.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/exportAssignments.js +74 -0
- package/lib/component/panels/assignment-summary/utilities/exportAssignments.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentACS.d.ts +7 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentACS.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentACS.js +28 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentACS.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentShifts.d.ts +12 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentShifts.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentShifts.js +14 -0
- package/lib/component/panels/assignment-summary/utilities/formatAssignmentShifts.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignedAtomCounts.d.ts +9 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignedAtomCounts.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignedAtomCounts.js +23 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignedAtomCounts.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignmentSignals.d.ts +7 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignmentSignals.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignmentSignals.js +41 -0
- package/lib/component/panels/assignment-summary/utilities/getAssignmentSignals.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.d.ts +18 -0
- package/lib/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.js +121 -0
- package/lib/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getSignalsByNucleus.d.ts +16 -0
- package/lib/component/panels/assignment-summary/utilities/getSignalsByNucleus.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/getSignalsByNucleus.js +53 -0
- package/lib/component/panels/assignment-summary/utilities/getSignalsByNucleus.js.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/types.d.ts +39 -0
- package/lib/component/panels/assignment-summary/utilities/types.d.ts.map +1 -0
- package/lib/component/panels/assignment-summary/utilities/types.js +2 -0
- package/lib/component/panels/assignment-summary/utilities/types.js.map +1 -0
- package/lib/component/panels/extra/utilities/MultiplicityUtilities.js +2 -2
- package/lib/component/panels/extra/utilities/MultiplicityUtilities.js.map +1 -1
- package/lib/component/panels/filtersPanel/processings/operator_edit_banner.d.ts +6 -0
- package/lib/component/panels/filtersPanel/processings/operator_edit_banner.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/processings/operator_edit_banner.js +2 -2
- package/lib/component/panels/filtersPanel/processings/operator_edit_banner.js.map +1 -1
- package/lib/component/panels/filtersPanel/processings/processing_item.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/processings/processing_item.js +1 -1
- package/lib/component/panels/filtersPanel/processings/processing_item.js.map +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.d.ts.map +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.js +4 -2
- package/lib/component/panels/predictionPanel/PredictionPanel.js.map +1 -1
- package/lib/component/reducer/Reducer.d.ts.map +1 -1
- package/lib/component/reducer/Reducer.js +14 -2
- package/lib/component/reducer/Reducer.js.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.js +5 -2
- package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
- package/lib/component/reducer/actions/LinkedSignalsActions.d.ts +29 -0
- package/lib/component/reducer/actions/LinkedSignalsActions.d.ts.map +1 -0
- package/lib/component/reducer/actions/LinkedSignalsActions.js +62 -0
- package/lib/component/reducer/actions/LinkedSignalsActions.js.map +1 -0
- package/lib/component/reducer/actions/MoleculeActions.d.ts +7 -28
- package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.js +78 -10
- package/lib/component/reducer/actions/MoleculeActions.js.map +1 -1
- package/lib/component/reducer/actions/RangesActions.d.ts +2 -8
- package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/RangesActions.js +3 -43
- package/lib/component/reducer/actions/RangesActions.js.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +10 -0
- package/lib/component/reducer/actions/ToolsActions.js.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.d.ts +16 -2
- package/lib/component/reducer/actions/ZonesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.js +57 -14
- package/lib/component/reducer/actions/ZonesActions.js.map +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +19 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts.map +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.js +19 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.js.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts +3 -2
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +4 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js.map +1 -1
- package/lib/component/toolbar/ToolTypes.d.ts.map +1 -1
- package/lib/component/toolbar/ToolTypes.js +15 -0
- package/lib/component/toolbar/ToolTypes.js.map +1 -1
- package/lib/component/toolbar/nmr_toolbar.d.ts.map +1 -1
- package/lib/component/toolbar/nmr_toolbar.js +15 -7
- package/lib/component/toolbar/nmr_toolbar.js.map +1 -1
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.d.ts.map +1 -1
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.js +62 -4
- package/lib/component/utility/core_slots/core_operator_chart_brush.commons.js.map +1 -1
- package/lib/component/utility/core_slots/core_operator_chart_svg.d.ts.map +1 -1
- package/lib/component/utility/core_slots/core_operator_chart_svg.js +2 -2
- package/lib/component/utility/core_slots/core_operator_chart_svg.js.map +1 -1
- package/lib/component/workspaces/assignment.d.ts.map +1 -1
- package/lib/component/workspaces/assignment.js +5 -3
- package/lib/component/workspaces/assignment.js.map +1 -1
- package/lib/component/workspaces/basic.d.ts.map +1 -1
- package/lib/component/workspaces/basic.js +7 -5
- package/lib/component/workspaces/basic.js.map +1 -1
- package/lib/component/workspaces/embedded.d.ts.map +1 -1
- package/lib/component/workspaces/embedded.js +1 -0
- package/lib/component/workspaces/embedded.js.map +1 -1
- package/lib/component/workspaces/prediction.d.ts.map +1 -1
- package/lib/component/workspaces/prediction.js +1 -0
- package/lib/component/workspaces/prediction.js.map +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.d.ts.map +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +2 -0
- package/lib/component/workspaces/workspaceDefaultProperties.js.map +1 -1
- package/lib/data/PredictionManager.d.ts +5 -0
- package/lib/data/PredictionManager.d.ts.map +1 -1
- package/lib/data/PredictionManager.js +11 -1
- package/lib/data/PredictionManager.js.map +1 -1
- package/lib/data/constants/Multiplets.js +2 -2
- package/lib/data/constants/Multiplets.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -0
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js +9 -10
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js.map +1 -1
- package/lib/data/molecules/Molecule.d.ts +1 -0
- package/lib/data/molecules/Molecule.d.ts.map +1 -1
- package/lib/data/molecules/Molecule.js +18 -3
- package/lib/data/molecules/Molecule.js.map +1 -1
- package/lib/data/molecules/MoleculeManager.d.ts +5 -2
- package/lib/data/molecules/MoleculeManager.d.ts.map +1 -1
- package/lib/data/molecules/MoleculeManager.js +10 -7
- package/lib/data/molecules/MoleculeManager.js.map +1 -1
- package/lib/utils/clipboard/clipboardHooks.d.ts +3 -1
- package/lib/utils/clipboard/clipboardHooks.d.ts.map +1 -1
- package/lib/utils/clipboard/clipboardHooks.js +15 -9
- package/lib/utils/clipboard/clipboardHooks.js.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/package.json +48 -48
- package/src/component/1d/BrushTracker1D.tsx +5 -2
- package/src/component/1d/FloatPublicationString.tsx +39 -33
- package/src/component/1d/plugin_chart_brush_tracker.tsx +2 -0
- package/src/component/1d/plugin_svg_chart.tsx +20 -1
- package/src/component/1d/ranges/FloatingRanges.tsx +2 -2
- package/src/component/1d/ranges/Range.tsx +1 -2
- package/src/component/1d-2d/FieldEdition.tsx +14 -4
- package/src/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.tsx +3 -3
- package/src/component/2d/1d-tracer/HorizontalSliceChart.tsx +6 -1
- package/src/component/2d/1d-tracer/VerticalSliceChart.tsx +6 -1
- package/src/component/2d/BrushTracker2D.tsx +7 -1
- package/src/component/2d/SVGContent2D.tsx +2 -0
- package/src/component/2d/SignalDeltaLine.tsx +8 -2
- package/src/component/2d/linked-signals/LinkedSignal.tsx +68 -0
- package/src/component/2d/linked-signals/LinkedSignalAssignmentLabel.tsx +248 -0
- package/src/component/2d/linked-signals/LinkedSignals.tsx +56 -0
- package/src/component/2d/linked-signals/SignalCrossingIndicator.tsx +63 -0
- package/src/component/2d/linked-signals/useClassifyCorrelation.ts +24 -0
- package/src/component/2d/linked-signals/useNearestSignalCrossing.ts +68 -0
- package/src/component/2d/linked-signals/utilities/getCorrelationColor.ts +46 -0
- package/src/component/2d/linked-signals/utilities/getCouplingLength.ts +58 -0
- package/src/component/2d/linked-signals/utilities/signalCrossings.ts +167 -0
- package/src/component/2d/utilities/extractSpectrumSignals.ts +22 -0
- package/src/component/2d/utilities/useAssignmentLabelLinkPath.ts +138 -0
- package/src/component/2d/zones/SignalsGuideLines.tsx +9 -2
- package/src/component/2d/zones/Zone.tsx +58 -1
- package/src/component/2d/zones/ZonesAssignmentsLabels.tsx +5 -198
- package/src/component/EventsTrackers/BrushTracker.tsx +135 -25
- package/src/component/EventsTrackers/KeysListenerTracker.tsx +6 -0
- package/src/component/EventsTrackers/brush_tracker.types.ts +43 -0
- package/src/component/EventsTrackers/brush_tracker_drag_gesture.ts +84 -0
- package/src/component/EventsTrackers/brush_tracker_events_listeners.ts +7 -1
- package/src/component/context/DispatchContext.tsx +2 -0
- package/src/component/context/processings_mutations_context.api.ts +6 -2
- package/src/component/elements/ActionsButtonsPopover.tsx +22 -3
- package/src/component/elements/export/ExportContent.tsx +1 -0
- package/src/component/elements/print/PrintContent.tsx +1 -0
- package/src/component/elements/tanstack_table/elements/table_row.tsx +5 -1
- package/src/component/elements/tanstack_table/table.tsx +2 -0
- package/src/component/elements/tanstack_table/types.ts +2 -0
- package/src/component/highlight/index.tsx +2 -0
- package/src/component/hooks/usePanelPreferences.ts +15 -5
- package/src/component/hooks/useToolsFunctions.ts +8 -4
- package/src/component/hooks/use_publication_strings.ts +19 -7
- package/src/component/modal/PredictSpectraModal.tsx +8 -2
- package/src/component/modal/PredictionLimitModal.tsx +88 -0
- package/src/component/modal/editRange/forms/validation/EditRangeValidation.ts +1 -1
- package/src/component/modal/setting/tanstack_general_settings/tabs/panels_tab.tsx +6 -0
- package/src/component/modal/setting/tanstack_general_settings/tabs/tools_tab.tsx +3 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.ts +1 -0
- package/src/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.ts +1 -0
- package/src/component/panels/IntegralsPanel/IntegralTable.tsx +2 -2
- package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +7 -5
- package/src/component/panels/MoleculesPanel/MoleculeStructure.tsx +14 -12
- package/src/component/panels/MoleculesPanel/hooks/useAtomAssignment.tsx +12 -2
- package/src/component/panels/MoleculesPanel/hooks/useExtractAtomAssignmentLabel.ts +57 -20
- package/src/component/panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.ts +191 -0
- package/src/component/panels/MoleculesPanel/utilities/sortAssignmentLabels.ts +29 -0
- package/src/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.tsx +2 -2
- package/src/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.tsx +2 -2
- package/src/component/panels/SpectraPanel/SpectraPanelHeader.tsx +1 -1
- package/src/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.tsx +3 -3
- package/src/component/panels/ZonesPanel/TableColumns/ZoneAssignmentLabelColumn.tsx +57 -4
- package/src/component/panels/ZonesPanel/ZonesPanel.tsx +19 -8
- package/src/component/panels/accordionItems.tsx +7 -0
- package/src/component/panels/assignment-summary/AssignmentSummaryPanel.tsx +263 -0
- package/src/component/panels/assignment-summary/AssignmentsExportModal.tsx +249 -0
- package/src/component/panels/assignment-summary/MoleculeAssignmentTable.tsx +223 -0
- package/src/component/panels/assignment-summary/table-cells/AssignmentAtomCell.tsx +36 -0
- package/src/component/panels/assignment-summary/table-cells/AssignmentChemicalShiftCell.tsx +57 -0
- package/src/component/panels/assignment-summary/table-cells/AssignmentCorrelationCell.tsx +23 -0
- package/src/component/panels/assignment-summary/table-cells/AssignmentLabelCell.tsx +16 -0
- package/src/component/panels/assignment-summary/utilities/atomGroupsToAssignmentRows.ts +254 -0
- package/src/component/panels/assignment-summary/utilities/exportAssignments.ts +135 -0
- package/src/component/panels/assignment-summary/utilities/formatAssignmentACS.ts +35 -0
- package/src/component/panels/assignment-summary/utilities/formatAssignmentShifts.ts +26 -0
- package/src/component/panels/assignment-summary/utilities/getAssignedAtomCounts.ts +32 -0
- package/src/component/panels/assignment-summary/utilities/getAssignmentSignals.ts +55 -0
- package/src/component/panels/assignment-summary/utilities/getLinkedCorrelationsByExperiment.ts +175 -0
- package/src/component/panels/assignment-summary/utilities/getSignalsByNucleus.ts +60 -0
- package/src/component/panels/assignment-summary/utilities/types.ts +47 -0
- package/src/component/panels/extra/utilities/MultiplicityUtilities.ts +2 -2
- package/src/component/panels/filtersPanel/processings/operator_edit_banner.tsx +8 -1
- package/src/component/panels/filtersPanel/processings/processing_item.tsx +2 -1
- package/src/component/panels/predictionPanel/PredictionPanel.tsx +6 -2
- package/src/component/reducer/Reducer.ts +23 -5
- package/src/component/reducer/actions/FiltersActions.ts +6 -2
- package/src/component/reducer/actions/LinkedSignalsActions.ts +128 -0
- package/src/component/reducer/actions/MoleculeActions.ts +139 -11
- package/src/component/reducer/actions/RangesActions.ts +3 -85
- package/src/component/reducer/actions/ToolsActions.ts +13 -0
- package/src/component/reducer/actions/ZonesActions.ts +95 -13
- package/src/component/reducer/helper/ZoomHistoryManager.ts +41 -1
- package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +7 -0
- package/src/component/toolbar/ToolTypes.ts +15 -0
- package/src/component/toolbar/nmr_toolbar.tsx +17 -21
- package/src/component/utility/core_slots/core_operator_chart_brush.commons.ts +99 -3
- package/src/component/utility/core_slots/core_operator_chart_svg.tsx +4 -0
- package/src/component/workspaces/assignment.ts +5 -3
- package/src/component/workspaces/basic.ts +7 -5
- package/src/component/workspaces/embedded.ts +1 -0
- package/src/component/workspaces/prediction.ts +1 -0
- package/src/component/workspaces/workspaceDefaultProperties.ts +2 -0
- package/src/data/PredictionManager.ts +11 -1
- package/src/data/constants/Multiplets.ts +2 -2
- package/src/data/data2d/Spectrum2D/initiateDatum2D.ts +1 -0
- package/src/data/data2d/Spectrum2D/zones/detectZonesManual.ts +1 -1
- package/src/data/data2d/Spectrum2D/zones/getDetectionZones.ts +7 -8
- package/src/data/molecules/Molecule.ts +22 -6
- package/src/data/molecules/MoleculeManager.ts +11 -9
- package/src/utils/clipboard/clipboardHooks.ts +19 -16
- package/src/versionInfo.ts +1 -1
- package/lib/utils/clipboard/clipboard.d.ts +0 -15
- package/lib/utils/clipboard/clipboard.d.ts.map +0 -1
- package/lib/utils/clipboard/clipboard.js +0 -19
- package/lib/utils/clipboard/clipboard.js.map +0 -1
- package/src/utils/clipboard/clipboard.ts +0 -36
|
@@ -26,6 +26,7 @@ import * as DomainActions from './actions/DomainActions.js';
|
|
|
26
26
|
import * as FiltersActions from './actions/FiltersActions.js';
|
|
27
27
|
import * as InsetActions from './actions/InsetActions.js';
|
|
28
28
|
import * as IntegralsActions from './actions/IntegralsActions.js';
|
|
29
|
+
import * as LinkedSignalsActions from './actions/LinkedSignalsActions.js';
|
|
29
30
|
import { LoadActions } from './actions/LoadAction.js';
|
|
30
31
|
import * as MoleculeActions from './actions/MoleculeActions.js';
|
|
31
32
|
import * as PeaksActions from './actions/PeaksActions.js';
|
|
@@ -120,6 +121,7 @@ export function getDefaultViewState(): ViewState {
|
|
|
120
121
|
units1D: {},
|
|
121
122
|
units2D: {},
|
|
122
123
|
insets: {},
|
|
124
|
+
slicingScaleRatio: 1,
|
|
123
125
|
};
|
|
124
126
|
}
|
|
125
127
|
export const getInitialState = (): State => ({
|
|
@@ -711,6 +713,11 @@ function innerSpectrumReducer(draft: Draft<State>, action: Action) {
|
|
|
711
713
|
return MoleculeActions.handleAddMolecules(draft, action);
|
|
712
714
|
case 'SET_MOLECULE':
|
|
713
715
|
return MoleculeActions.handleSetMolecule(draft, action);
|
|
716
|
+
case 'CHANGE_ASSIGNMENT_LABEL_BY_DIAIDS':
|
|
717
|
+
return MoleculeActions.handleChangeAssignmentLabelsByDiaIds(
|
|
718
|
+
draft,
|
|
719
|
+
action,
|
|
720
|
+
);
|
|
714
721
|
case 'CHANGE_MOLECULE_LABEL':
|
|
715
722
|
return MoleculeActions.handleChangeMoleculeLabel(draft, action);
|
|
716
723
|
case 'DELETE_MOLECULE':
|
|
@@ -782,11 +789,6 @@ function innerSpectrumReducer(draft: Draft<State>, action: Action) {
|
|
|
782
789
|
draft,
|
|
783
790
|
action,
|
|
784
791
|
);
|
|
785
|
-
case 'CHANGE_ASSIGNMENT_LABEL_BY_DIAIDS':
|
|
786
|
-
return RangesActions.handleChangeRangesAssignmentLabelsByDiaIds(
|
|
787
|
-
draft,
|
|
788
|
-
action,
|
|
789
|
-
);
|
|
790
792
|
case 'CHANGE_SIGNAL_DELTA':
|
|
791
793
|
return RangesActions.handleChangeSignalDelta(draft, action);
|
|
792
794
|
|
|
@@ -801,6 +803,20 @@ function innerSpectrumReducer(draft: Draft<State>, action: Action) {
|
|
|
801
803
|
return ZonesActions.handleChangeZonesFactor(draft, action);
|
|
802
804
|
case 'ADD_2D_ZONE':
|
|
803
805
|
return ZonesActions.handleAdd2dZone(draft, action);
|
|
806
|
+
case 'ADD_2D_SIGNAL_LINK':
|
|
807
|
+
return LinkedSignalsActions.handleAdd2DSignalLink(draft, action);
|
|
808
|
+
case 'DELETE_2D_SIGNAL_LINK':
|
|
809
|
+
return LinkedSignalsActions.handleDelete2DSignalLink(draft, action);
|
|
810
|
+
case 'CHANGE_LINKED_SIGNAL_ASSIGNMENT_LABEL':
|
|
811
|
+
return LinkedSignalsActions.handleChangeLinkedSignalAssignment(
|
|
812
|
+
draft,
|
|
813
|
+
action,
|
|
814
|
+
);
|
|
815
|
+
case 'SET_LINKED_SIGNAL_ASSIGNMENT_LABEL_COORDINATION':
|
|
816
|
+
return LinkedSignalsActions.handleSetLinkedSignalLabelCoordination(
|
|
817
|
+
draft,
|
|
818
|
+
action,
|
|
819
|
+
);
|
|
804
820
|
case 'DELETE_2D_ZONE':
|
|
805
821
|
return ZonesActions.handleDeleteZone(draft, action);
|
|
806
822
|
case 'DELETE_2D_SIGNAL':
|
|
@@ -815,6 +831,8 @@ function innerSpectrumReducer(draft: Draft<State>, action: Action) {
|
|
|
815
831
|
return ZonesActions.handleUnlinkZone(draft, action);
|
|
816
832
|
case 'ASSIGN_ZONE':
|
|
817
833
|
return ZonesActions.handleAssignZone(draft, action);
|
|
834
|
+
case 'AUTO_LINK_2D_SIGNALS':
|
|
835
|
+
return ZonesActions.handleAutoLink2DSignals(draft, action);
|
|
818
836
|
case 'AUTO_ZONES_SPECTRA_PICKING':
|
|
819
837
|
return ZonesActions.handleAutoSpectraZonesDetection(draft);
|
|
820
838
|
case 'TOGGLE_ZONES_VIEW_PROPERTY':
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
getDefaultTwoDimensionsPhaseCorrectionTraceOptions,
|
|
53
53
|
getInitialState,
|
|
54
54
|
} from '../Reducer.js';
|
|
55
|
-
import {
|
|
55
|
+
import { restoreLastZoomUnlessDomainChanged } from '../helper/ZoomHistoryManager.js';
|
|
56
56
|
import { findStrongestPeak } from '../helper/findStrongestPeak.js';
|
|
57
57
|
import { getActiveSpectrum } from '../helper/getActiveSpectrum.js';
|
|
58
58
|
import getRange from '../helper/getRange.js';
|
|
@@ -1658,6 +1658,10 @@ export function handleEnableFilter(
|
|
|
1658
1658
|
const { id, enabled } = action.payload;
|
|
1659
1659
|
const datum = draft.data[activeSpectrum.index];
|
|
1660
1660
|
|
|
1661
|
+
// `enableFilter` reprocesses the spectrum in place, so capture the current
|
|
1662
|
+
// FID/FT state before to detect a FID <-> FT transition.
|
|
1663
|
+
const wasFt = datum.info.isFt;
|
|
1664
|
+
|
|
1661
1665
|
//apply filter into the spectrum
|
|
1662
1666
|
if (isSpectrum1D(datum)) {
|
|
1663
1667
|
Filters1DManager.enableFilter(datum, { id, enabled });
|
|
@@ -1674,7 +1678,7 @@ export function handleEnableFilter(
|
|
|
1674
1678
|
resetSelectedTool(draft);
|
|
1675
1679
|
setDomain(draft);
|
|
1676
1680
|
setMode(draft);
|
|
1677
|
-
|
|
1681
|
+
restoreLastZoomUnlessDomainChanged(draft, wasFt);
|
|
1678
1682
|
}
|
|
1679
1683
|
|
|
1680
1684
|
function deleteFilter(datum: Spectrum, id?: string) {
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { Spectrum2D } from '@zakodium/nmr-types';
|
|
2
|
+
import { isSpectrum2DFt } from '@zakodium/nmrium-core';
|
|
3
|
+
import type { Draft } from 'immer';
|
|
4
|
+
|
|
5
|
+
import type { State } from '../Reducer.js';
|
|
6
|
+
import { getSpectrum } from '../helper/getSpectrum.js';
|
|
7
|
+
import type { ActionType } from '../types/ActionType.js';
|
|
8
|
+
|
|
9
|
+
type LinkedSignal = Spectrum2D['linkedSignals'][number];
|
|
10
|
+
|
|
11
|
+
type Add2DSignalLinkAction = ActionType<
|
|
12
|
+
'ADD_2D_SIGNAL_LINK',
|
|
13
|
+
Pick<LinkedSignal, 'xSignalId' | 'ySignalId' | 'assignment'>
|
|
14
|
+
>;
|
|
15
|
+
type Delete2DSignalLinkAction = ActionType<
|
|
16
|
+
'DELETE_2D_SIGNAL_LINK',
|
|
17
|
+
{ id: string }
|
|
18
|
+
>;
|
|
19
|
+
type ChangeLinkedSignalAssignmentAction = ActionType<
|
|
20
|
+
'CHANGE_LINKED_SIGNAL_ASSIGNMENT_LABEL',
|
|
21
|
+
{ id: string; value: string; isAutoAssignment?: boolean }
|
|
22
|
+
>;
|
|
23
|
+
type SetLinkedSignalLabelCoordinationAction = ActionType<
|
|
24
|
+
'SET_LINKED_SIGNAL_ASSIGNMENT_LABEL_COORDINATION',
|
|
25
|
+
{ spectrumId: string; id: string; coordination: { x: number; y: number } }
|
|
26
|
+
>;
|
|
27
|
+
|
|
28
|
+
export type LinkedSignalsActions =
|
|
29
|
+
| Add2DSignalLinkAction
|
|
30
|
+
| Delete2DSignalLinkAction
|
|
31
|
+
| ChangeLinkedSignalAssignmentAction
|
|
32
|
+
| SetLinkedSignalLabelCoordinationAction;
|
|
33
|
+
|
|
34
|
+
function getLinkedSignal(draft: Draft<State>, id: string) {
|
|
35
|
+
const spectrum = getSpectrum(draft);
|
|
36
|
+
|
|
37
|
+
if (!isSpectrum2DFt(spectrum)) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const link = spectrum.linkedSignals?.find(
|
|
42
|
+
(link) => `${link.xSignalId}:${link.ySignalId}` === id,
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
if (!link) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return { spectrum, link };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function handleAdd2DSignalLink(
|
|
53
|
+
draft: Draft<State>,
|
|
54
|
+
action: Add2DSignalLinkAction,
|
|
55
|
+
) {
|
|
56
|
+
const spectrum = getSpectrum(draft);
|
|
57
|
+
const { xSignalId, ySignalId, assignment } = action.payload;
|
|
58
|
+
|
|
59
|
+
if (!xSignalId || !ySignalId || !isSpectrum2DFt(spectrum)) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const isLined = spectrum.linkedSignals.some(
|
|
64
|
+
(link) => link.xSignalId === xSignalId && link.ySignalId === ySignalId,
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
if (isLined) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
spectrum.linkedSignals.push({
|
|
72
|
+
xSignalId,
|
|
73
|
+
ySignalId,
|
|
74
|
+
assignment,
|
|
75
|
+
isAutoAssignment: true,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function handleChangeLinkedSignalAssignment(
|
|
80
|
+
draft: Draft<State>,
|
|
81
|
+
action: ChangeLinkedSignalAssignmentAction,
|
|
82
|
+
) {
|
|
83
|
+
const { isAutoAssignment = false, value, id } = action.payload;
|
|
84
|
+
const linkedSignal = getLinkedSignal(draft, id);
|
|
85
|
+
if (!linkedSignal) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const { link } = linkedSignal;
|
|
89
|
+
link.assignment = value;
|
|
90
|
+
link.isAutoAssignment = isAutoAssignment;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function handleDelete2DSignalLink(
|
|
94
|
+
draft: Draft<State>,
|
|
95
|
+
action: Delete2DSignalLinkAction,
|
|
96
|
+
) {
|
|
97
|
+
const { id } = action.payload;
|
|
98
|
+
const linkedSignal = getLinkedSignal(draft, id);
|
|
99
|
+
|
|
100
|
+
if (!linkedSignal) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const { spectrum } = linkedSignal;
|
|
105
|
+
spectrum.linkedSignals = spectrum.linkedSignals.filter(
|
|
106
|
+
(signal) => `${signal.xSignalId}:${signal.ySignalId}` !== id,
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
delete draft.view.assignmentsLabelsCoordinates?.[spectrum.id]?.[id];
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function handleSetLinkedSignalLabelCoordination(
|
|
113
|
+
draft: Draft<State>,
|
|
114
|
+
action: SetLinkedSignalLabelCoordinationAction,
|
|
115
|
+
) {
|
|
116
|
+
const { spectrumId, id, coordination } = action.payload;
|
|
117
|
+
|
|
118
|
+
if (!draft.view.assignmentsLabelsCoordinates) {
|
|
119
|
+
draft.view.assignmentsLabelsCoordinates = {};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const coordinates = draft.view.assignmentsLabelsCoordinates;
|
|
123
|
+
if (!coordinates[spectrumId]) {
|
|
124
|
+
coordinates[spectrumId] = {};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
coordinates[spectrumId][id] = coordination;
|
|
128
|
+
}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
1
|
+
import type { Range, Zone } from '@zakodium/nmr-types';
|
|
2
|
+
import type {
|
|
3
|
+
MoleculeView,
|
|
4
|
+
Spectrum2D,
|
|
5
|
+
StateMolecule,
|
|
6
|
+
} from '@zakodium/nmrium-core';
|
|
7
|
+
import {
|
|
8
|
+
isSpectrum1D,
|
|
9
|
+
isSpectrum2D,
|
|
10
|
+
isSpectrum2DFt,
|
|
11
|
+
} from '@zakodium/nmrium-core';
|
|
3
12
|
import type { Logger } from 'cheminfo-types';
|
|
4
13
|
import type { FifoLogger } from 'fifo-logger';
|
|
5
14
|
import type { Draft } from 'immer';
|
|
@@ -12,7 +21,10 @@ import type {
|
|
|
12
21
|
PredictedSpectraResult,
|
|
13
22
|
PredictionOptions,
|
|
14
23
|
} from '../../../data/PredictionManager.js';
|
|
15
|
-
import {
|
|
24
|
+
import {
|
|
25
|
+
generateSpectra,
|
|
26
|
+
isEmpty2DPrediction,
|
|
27
|
+
} from '../../../data/PredictionManager.js';
|
|
16
28
|
import { changeSpectraRelativeSum } from '../../../data/data1d/Spectrum1D/SumManager.js';
|
|
17
29
|
import { initializeContoursLevels } from '../../../data/data2d/Spectrum2D/contours.ts';
|
|
18
30
|
import type { MoleculeBoundingRect } from '../../../data/molecules/Molecule.js';
|
|
@@ -20,6 +32,7 @@ import { DRAGGABLE_STRUCTURE_INITIAL_BOUNDING_REACT } from '../../../data/molecu
|
|
|
20
32
|
import * as MoleculeManager from '../../../data/molecules/MoleculeManager.js';
|
|
21
33
|
import { generateColor } from '../../../data/utilities/generateColor.js';
|
|
22
34
|
import { convertPixelToPercent } from '../../hooks/useSVGUnitConverter.js';
|
|
35
|
+
import type { SignalAssignmentUpdate } from '../../panels/MoleculesPanel/hooks/useSignalAssignmentUpdates.js';
|
|
23
36
|
import { extractFromAtom } from '../../panels/MoleculesPanel/utilities/extractFromAtom.js';
|
|
24
37
|
import nucleusToString from '../../utility/nucleusToString.js';
|
|
25
38
|
import type { State } from '../Reducer.js';
|
|
@@ -95,6 +108,12 @@ type ChangeMoleculeLabelAction = ActionType<
|
|
|
95
108
|
'CHANGE_MOLECULE_LABEL',
|
|
96
109
|
{ id: string; label: string }
|
|
97
110
|
>;
|
|
111
|
+
type ChangeAssignmentLabelsByDiaIdsAction = ActionType<
|
|
112
|
+
'CHANGE_ASSIGNMENT_LABEL_BY_DIAIDS',
|
|
113
|
+
{
|
|
114
|
+
assignments: SignalAssignmentUpdate[];
|
|
115
|
+
}
|
|
116
|
+
>;
|
|
98
117
|
|
|
99
118
|
export type MoleculeActions =
|
|
100
119
|
| AddMoleculeAction
|
|
@@ -106,6 +125,7 @@ export type MoleculeActions =
|
|
|
106
125
|
| ChangeFloatMoleculePositionAction
|
|
107
126
|
| ChangeMoleculeLabelAction
|
|
108
127
|
| ChangeMoleculeAnnotationAction
|
|
128
|
+
| ChangeAssignmentLabelsByDiaIdsAction
|
|
109
129
|
| ToggleMoleculeLabelAction;
|
|
110
130
|
|
|
111
131
|
export function addMolecule(draft: Draft<State>, props: AddMoleculeProps) {
|
|
@@ -186,6 +206,103 @@ export function handleSetMolecule(
|
|
|
186
206
|
setMolecule(draft, action.payload);
|
|
187
207
|
}
|
|
188
208
|
|
|
209
|
+
interface UpdateRangeSignalsAssignmentParams {
|
|
210
|
+
ranges: Range[];
|
|
211
|
+
signalId?: string;
|
|
212
|
+
assignment: string;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
function updateRangeSignalsAssignment(
|
|
216
|
+
options: UpdateRangeSignalsAssignmentParams,
|
|
217
|
+
) {
|
|
218
|
+
const { ranges, signalId, assignment } = options;
|
|
219
|
+
if (signalId === undefined) return;
|
|
220
|
+
|
|
221
|
+
for (const range of ranges) {
|
|
222
|
+
const signal = range.signals.find((item) => item.id === signalId);
|
|
223
|
+
if (signal?.isAutoAssignment) {
|
|
224
|
+
signal.assignment = assignment;
|
|
225
|
+
break;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
interface UpdateZoneAssignmentsParams {
|
|
231
|
+
zones: Zone[];
|
|
232
|
+
signalId?: string;
|
|
233
|
+
assignment: string;
|
|
234
|
+
}
|
|
235
|
+
function updateZoneAssignments(options: UpdateZoneAssignmentsParams) {
|
|
236
|
+
const { zones, signalId, assignment } = options;
|
|
237
|
+
if (signalId === undefined) return;
|
|
238
|
+
|
|
239
|
+
for (const zone of zones) {
|
|
240
|
+
const signal = zone.signals.find((item) => item.id === signalId);
|
|
241
|
+
if (signal?.isAutoAssignment) {
|
|
242
|
+
signal.assignment = assignment;
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
interface UpdateLinkedSignalAssignmentParams extends Pick<
|
|
249
|
+
Spectrum2D,
|
|
250
|
+
'linkedSignals'
|
|
251
|
+
> {
|
|
252
|
+
linkedSignalId?: string;
|
|
253
|
+
assignment: string;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
function updateLinkedSignalAssignment(
|
|
257
|
+
options: UpdateLinkedSignalAssignmentParams,
|
|
258
|
+
) {
|
|
259
|
+
const { linkedSignals, linkedSignalId, assignment } = options;
|
|
260
|
+
if (linkedSignalId === undefined) return;
|
|
261
|
+
|
|
262
|
+
const link = linkedSignals.find(
|
|
263
|
+
(item) => `${item.xSignalId}:${item.ySignalId}` === linkedSignalId,
|
|
264
|
+
);
|
|
265
|
+
if (!link?.isAutoAssignment) return;
|
|
266
|
+
|
|
267
|
+
link.assignment = assignment;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export function handleChangeAssignmentLabelsByDiaIds(
|
|
271
|
+
draft: Draft<State>,
|
|
272
|
+
action: ChangeAssignmentLabelsByDiaIdsAction,
|
|
273
|
+
) {
|
|
274
|
+
for (const spectrum of draft.data) {
|
|
275
|
+
const assignments = action.payload.assignments.filter(
|
|
276
|
+
(update) => update.spectrumId === spectrum.id,
|
|
277
|
+
);
|
|
278
|
+
|
|
279
|
+
if (isSpectrum1D(spectrum)) {
|
|
280
|
+
for (const { signalId, assignment } of assignments) {
|
|
281
|
+
if (signalId === undefined) continue;
|
|
282
|
+
|
|
283
|
+
updateRangeSignalsAssignment({
|
|
284
|
+
ranges: spectrum.ranges.values,
|
|
285
|
+
signalId,
|
|
286
|
+
assignment,
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
} else if (isSpectrum2DFt(spectrum)) {
|
|
290
|
+
for (const { signalId, linkedSignalId, assignment } of assignments) {
|
|
291
|
+
updateZoneAssignments({
|
|
292
|
+
zones: spectrum.zones.values,
|
|
293
|
+
signalId,
|
|
294
|
+
assignment,
|
|
295
|
+
});
|
|
296
|
+
updateLinkedSignalAssignment({
|
|
297
|
+
linkedSignals: spectrum.linkedSignals,
|
|
298
|
+
linkedSignalId,
|
|
299
|
+
assignment,
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
189
306
|
function clearDiaIDs(
|
|
190
307
|
obj: Partial<{ diaIDs?: string[]; nbAtoms?: number }>,
|
|
191
308
|
options: {
|
|
@@ -302,8 +419,9 @@ export function handlePredictSpectraFromMolecule(
|
|
|
302
419
|
molecule,
|
|
303
420
|
action: predictionAction = 'save',
|
|
304
421
|
} = action.payload;
|
|
305
|
-
checkPredictions(predictedSpectra, options, molecule
|
|
422
|
+
checkPredictions(predictedSpectra, options, molecule, logger);
|
|
306
423
|
const color = generateColor({ usedColors: draft.usedColors['1d'] });
|
|
424
|
+
|
|
307
425
|
const spectraIds: string[] = [];
|
|
308
426
|
for (const spectrum of generateSpectra(
|
|
309
427
|
predictedSpectra,
|
|
@@ -334,8 +452,7 @@ export function handlePredictSpectraFromMolecule(
|
|
|
334
452
|
});
|
|
335
453
|
}
|
|
336
454
|
|
|
337
|
-
if (id) {
|
|
338
|
-
//save a set of the predicted spectra Ids by molecule ID in the view object in case we predict the spectra again we remove the old ones
|
|
455
|
+
if (id && spectraIds.length > 0) {
|
|
339
456
|
setPredictedSpectraReference(draft, id, spectraIds);
|
|
340
457
|
}
|
|
341
458
|
draft.usedColors['1d'] = draft.usedColors['1d'].filter(
|
|
@@ -350,7 +467,7 @@ export function handlePredictSpectraFromMolecule(
|
|
|
350
467
|
function checkPredictions(
|
|
351
468
|
predictedSpectra: PredictedSpectraResult,
|
|
352
469
|
inputOptions: PredictionOptions,
|
|
353
|
-
molfile:
|
|
470
|
+
{ molfile, label }: StateMolecule,
|
|
354
471
|
logger: Logger,
|
|
355
472
|
) {
|
|
356
473
|
const { spectra } = inputOptions;
|
|
@@ -359,7 +476,20 @@ function checkPredictions(
|
|
|
359
476
|
const { atoms } = getAtoms(molecule);
|
|
360
477
|
for (const entry of Object.entries(spectra)) {
|
|
361
478
|
const [experiment, required] = entry as [Experiment, boolean];
|
|
362
|
-
|
|
479
|
+
|
|
480
|
+
if (!required) continue;
|
|
481
|
+
|
|
482
|
+
const prediction = predictedSpectra[experiment];
|
|
483
|
+
if (prediction) {
|
|
484
|
+
if ('nuclei' in prediction && isEmpty2DPrediction(prediction)) {
|
|
485
|
+
const forMolecule = label ? ` for ${label}` : '';
|
|
486
|
+
logger.warn(
|
|
487
|
+
`${experiment.toUpperCase()} prediction${forMolecule} is empty: no spectrum was simulated.`,
|
|
488
|
+
);
|
|
489
|
+
}
|
|
490
|
+
continue;
|
|
491
|
+
}
|
|
492
|
+
|
|
363
493
|
let message = '';
|
|
364
494
|
switch (experiment) {
|
|
365
495
|
case 'proton': {
|
|
@@ -382,9 +512,7 @@ function checkPredictions(
|
|
|
382
512
|
break;
|
|
383
513
|
case 'hsqc':
|
|
384
514
|
case 'hmbc':
|
|
385
|
-
|
|
386
|
-
missing2DPrediction.push(experiment);
|
|
387
|
-
}
|
|
515
|
+
missing2DPrediction.push(experiment);
|
|
388
516
|
break;
|
|
389
517
|
default:
|
|
390
518
|
break;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Range, Signal1D, SignalKind
|
|
1
|
+
import type { Range, Signal1D, SignalKind } from '@zakodium/nmr-types';
|
|
2
2
|
import type {
|
|
3
3
|
BoundingBox,
|
|
4
4
|
RangesViewState,
|
|
@@ -100,14 +100,6 @@ type Assign1DSignalAction = ActionType<
|
|
|
100
100
|
spectrumId?: string;
|
|
101
101
|
} & Required<Pick<Signal1D, 'diaIDs' | 'nbAtoms' | 'assignment'>>
|
|
102
102
|
>;
|
|
103
|
-
type ChangeRangesAssignmentsLabelsByDiaIdsAction = ActionType<
|
|
104
|
-
'CHANGE_ASSIGNMENT_LABEL_BY_DIAIDS',
|
|
105
|
-
{
|
|
106
|
-
diaIDs: string[];
|
|
107
|
-
assignment?: string;
|
|
108
|
-
previousAssignment?: string;
|
|
109
|
-
}
|
|
110
|
-
>;
|
|
111
103
|
type ResizeRangeAction = ActionType<
|
|
112
104
|
'RESIZE_RANGE',
|
|
113
105
|
{
|
|
@@ -205,7 +197,6 @@ export type RangesActions =
|
|
|
205
197
|
| DeleteRangePeakAction
|
|
206
198
|
| Change1DSignalAssignmentLabelAction
|
|
207
199
|
| ChangeRangesViewFloatingBoxBoundingAction
|
|
208
|
-
| ChangeRangesAssignmentsLabelsByDiaIdsAction
|
|
209
200
|
| ChangeSignalDeltaAction
|
|
210
201
|
| ActionType<
|
|
211
202
|
| 'AUTO_RANGES_SPECTRA_PICKING'
|
|
@@ -499,87 +490,15 @@ function handleAssign1DSignal(
|
|
|
499
490
|
|
|
500
491
|
if (!signal) return;
|
|
501
492
|
|
|
502
|
-
if (assignment && !signal.assignment) {
|
|
493
|
+
if (assignment && (signal.isAutoAssignment || !signal.assignment)) {
|
|
503
494
|
signal.assignment = assignment;
|
|
504
|
-
signal.isAutoAssignment = true;
|
|
505
495
|
}
|
|
496
|
+
signal.isAutoAssignment = true;
|
|
506
497
|
|
|
507
498
|
signal.diaIDs = diaIDs;
|
|
508
499
|
signal.nbAtoms = nbAtoms + (signal.nbAtoms || 0);
|
|
509
500
|
}
|
|
510
|
-
function hasDiaId(
|
|
511
|
-
diaIds: string[] | undefined,
|
|
512
|
-
uniqueDiaIds: Set<string>,
|
|
513
|
-
): boolean {
|
|
514
|
-
return diaIds?.some((id) => uniqueDiaIds.has(id)) ?? false;
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
function updateRangeSignalsAssignment(
|
|
518
|
-
ranges: Range[],
|
|
519
|
-
previousAssignment: string | undefined,
|
|
520
|
-
assignment: string | undefined,
|
|
521
|
-
uniqueDiaIds: Set<string>,
|
|
522
|
-
): void {
|
|
523
|
-
for (const range of ranges) {
|
|
524
|
-
const { signals = [] } = range;
|
|
525
|
-
for (const signal of signals) {
|
|
526
|
-
if (
|
|
527
|
-
previousAssignment === signal.assignment &&
|
|
528
|
-
hasDiaId(signal.diaIDs, uniqueDiaIds) &&
|
|
529
|
-
signal.isAutoAssignment
|
|
530
|
-
) {
|
|
531
|
-
signal.assignment = assignment;
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
function updateZoneAssignments(
|
|
538
|
-
zones: Zone[],
|
|
539
|
-
previousAssignment: string | undefined,
|
|
540
|
-
assignment: string | undefined,
|
|
541
|
-
uniqueDiaIds: Set<string>,
|
|
542
|
-
): void {
|
|
543
|
-
for (const zone of zones) {
|
|
544
|
-
for (const signal of zone.signals) {
|
|
545
|
-
if (
|
|
546
|
-
previousAssignment === signal.assignment &&
|
|
547
|
-
(hasDiaId(signal.x.diaIDs, uniqueDiaIds) ||
|
|
548
|
-
hasDiaId(signal.y.diaIDs, uniqueDiaIds)) &&
|
|
549
|
-
signal.isAutoAssignment
|
|
550
|
-
) {
|
|
551
|
-
signal.assignment = assignment;
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
501
|
|
|
557
|
-
//action
|
|
558
|
-
function handleChangeRangesAssignmentLabelsByDiaIds(
|
|
559
|
-
draft: Draft<State>,
|
|
560
|
-
action: ChangeRangesAssignmentsLabelsByDiaIdsAction,
|
|
561
|
-
) {
|
|
562
|
-
const { diaIDs, assignment, previousAssignment } = action.payload;
|
|
563
|
-
const uniqueDiaIds = new Set(diaIDs);
|
|
564
|
-
|
|
565
|
-
for (const spectrum of draft.data) {
|
|
566
|
-
if (isSpectrum1D(spectrum)) {
|
|
567
|
-
updateRangeSignalsAssignment(
|
|
568
|
-
spectrum.ranges.values,
|
|
569
|
-
previousAssignment,
|
|
570
|
-
assignment,
|
|
571
|
-
uniqueDiaIds,
|
|
572
|
-
);
|
|
573
|
-
} else {
|
|
574
|
-
updateZoneAssignments(
|
|
575
|
-
spectrum.zones.values,
|
|
576
|
-
previousAssignment,
|
|
577
|
-
assignment,
|
|
578
|
-
uniqueDiaIds,
|
|
579
|
-
);
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
502
|
//action
|
|
584
503
|
function handleResizeRange(draft: Draft<State>, action: ResizeRangeAction) {
|
|
585
504
|
const { range, spectrumKey } = action.payload;
|
|
@@ -854,7 +773,6 @@ export {
|
|
|
854
773
|
handleChangeRangeSignalKind,
|
|
855
774
|
handleChangeRangeSignalValue,
|
|
856
775
|
handleChangeRangeSum,
|
|
857
|
-
handleChangeRangesAssignmentLabelsByDiaIds,
|
|
858
776
|
handleChangeRangesSumFlag,
|
|
859
777
|
handleChangeRangesViewFloatingBoxBounding,
|
|
860
778
|
handleChangeSignalDelta,
|
|
@@ -104,6 +104,7 @@ function resetTool(draft: Draft<State>, options: ResetToolOptions = {}) {
|
|
|
104
104
|
toolId,
|
|
105
105
|
tempRollback,
|
|
106
106
|
} = options;
|
|
107
|
+
|
|
107
108
|
// reset temp range
|
|
108
109
|
if (resetFiltersOptionPanel) {
|
|
109
110
|
draft.toolOptions.selectedOptionPanel = null;
|
|
@@ -141,6 +142,12 @@ interface ActivateToolOptions {
|
|
|
141
142
|
tempRollback?: boolean;
|
|
142
143
|
}
|
|
143
144
|
|
|
145
|
+
function initializeToolState(draft: Draft<State>, toolId: Tool) {
|
|
146
|
+
if (toolId === 'slicing') {
|
|
147
|
+
draft.view.slicingScaleRatio = 1;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
144
151
|
//utility
|
|
145
152
|
export function activateTool(
|
|
146
153
|
draft: Draft<State>,
|
|
@@ -167,6 +174,7 @@ export function activateTool(
|
|
|
167
174
|
draft.toolOptions.data.activeFilterID = null;
|
|
168
175
|
} else {
|
|
169
176
|
draft.toolOptions.selectedTool = toolId;
|
|
177
|
+
initializeToolState(draft, toolId);
|
|
170
178
|
if (Tools[toolId]?.hasOptionPanel) {
|
|
171
179
|
draft.toolOptions.selectedOptionPanel = toolId;
|
|
172
180
|
}
|
|
@@ -292,6 +300,11 @@ export function handleZoom(draft: Draft<State>, action: ZoomAction) {
|
|
|
292
300
|
|
|
293
301
|
switch (displayerMode) {
|
|
294
302
|
case '2D': {
|
|
303
|
+
if (selectedTool === 'slicing') {
|
|
304
|
+
draft.view.slicingScaleRatio *= scaleRatio;
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
|
|
295
308
|
if (trackID === 'MAIN') {
|
|
296
309
|
// change the vertical scale for traces in 2D phase correction
|
|
297
310
|
if (selectedTool === 'phaseCorrectionTwoDimensions') {
|