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
|
@@ -89,10 +89,28 @@ type SaveEditedZoneAction = ActionType<
|
|
|
89
89
|
}
|
|
90
90
|
>;
|
|
91
91
|
|
|
92
|
+
type AxisLink = Required<Pick<Signal2D['x'], 'diaIDs' | 'nbAtoms'>>;
|
|
93
|
+
|
|
94
|
+
interface AutoLinkAssignment {
|
|
95
|
+
signalId: string;
|
|
96
|
+
x?: AxisLink;
|
|
97
|
+
y?: AxisLink;
|
|
98
|
+
assignment: string;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
type AutoLink2DSignalsAction = ActionType<
|
|
102
|
+
'AUTO_LINK_2D_SIGNALS',
|
|
103
|
+
{
|
|
104
|
+
zoneId: string;
|
|
105
|
+
assignments: AutoLinkAssignment[];
|
|
106
|
+
}
|
|
107
|
+
>;
|
|
108
|
+
|
|
92
109
|
interface UnlinkZoneProps {
|
|
93
110
|
zoneKey?: string;
|
|
94
111
|
signalIndex?: number;
|
|
95
112
|
axis?: Axis;
|
|
113
|
+
assignment?: string;
|
|
96
114
|
}
|
|
97
115
|
|
|
98
116
|
type UnlinkZoneAction = ActionType<'UNLINK_ZONE', UnlinkZoneProps>;
|
|
@@ -106,7 +124,12 @@ type ToggleZonesViewAction = ActionType<
|
|
|
106
124
|
|
|
107
125
|
type ChangeZoneAssignmentLabelAction = ActionType<
|
|
108
126
|
'CHANGE_ZONE_ASSIGNMENT_LABEL',
|
|
109
|
-
{
|
|
127
|
+
{
|
|
128
|
+
zoneID: string;
|
|
129
|
+
signalID: string;
|
|
130
|
+
value: string;
|
|
131
|
+
isAutoAssignment?: boolean;
|
|
132
|
+
}
|
|
110
133
|
>;
|
|
111
134
|
type SetZoneAssignmentLabelCoordinationAction = ActionType<
|
|
112
135
|
'SET_ZONE_ASSIGNMENT_LABEL_COORDINATION',
|
|
@@ -123,6 +146,7 @@ export type ZonesActions =
|
|
|
123
146
|
| DeleteSignal2DAction
|
|
124
147
|
| SetSignalPathLengthAction
|
|
125
148
|
| AssignZoneAction
|
|
149
|
+
| AutoLink2DSignalsAction
|
|
126
150
|
| SaveEditedZoneAction
|
|
127
151
|
| UnlinkZoneAction
|
|
128
152
|
| ToggleZonesViewAction
|
|
@@ -360,25 +384,44 @@ function handleSetSignalPathLength(
|
|
|
360
384
|
handleUpdateCorrelations(draft);
|
|
361
385
|
}
|
|
362
386
|
|
|
387
|
+
function clearAutoAssignmentWithoutLinks(zone: Zone) {
|
|
388
|
+
for (const signal of zone.signals) {
|
|
389
|
+
if (!signal.x.diaIDs?.length && !signal.y.diaIDs?.length) {
|
|
390
|
+
signal.isAutoAssignment = false;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
363
395
|
//action
|
|
364
396
|
function unlinkZone(draft: Draft<State>, props: UnlinkZoneProps) {
|
|
365
|
-
const { zoneKey, signalIndex = -1, axis } = props;
|
|
397
|
+
const { zoneKey, signalIndex = -1, axis, assignment } = props;
|
|
366
398
|
|
|
367
399
|
const spectrum = getSpectrum(draft);
|
|
368
400
|
if (!isSpectrum2D(spectrum)) return;
|
|
369
401
|
|
|
370
402
|
const zones = spectrum.zones.values;
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
const newZones = zones.map((zone) => {
|
|
378
|
-
return unlink(zone);
|
|
403
|
+
|
|
404
|
+
if (!zoneKey) {
|
|
405
|
+
spectrum.zones.values = zones.map((zone) => {
|
|
406
|
+
const unlinkedZone = unlink(zone);
|
|
407
|
+
clearAutoAssignmentWithoutLinks(unlinkedZone);
|
|
408
|
+
return unlinkedZone;
|
|
379
409
|
});
|
|
380
|
-
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
const zoneIndex = getZoneIndex(spectrum, zoneKey);
|
|
414
|
+
if (zoneIndex === -1) return;
|
|
415
|
+
|
|
416
|
+
const unlinkedZone = unlink(zones[zoneIndex], signalIndex, axis);
|
|
417
|
+
zones[zoneIndex] = unlinkedZone;
|
|
418
|
+
|
|
419
|
+
const signal = unlinkedZone.signals[signalIndex];
|
|
420
|
+
if (axis && signal?.isAutoAssignment && assignment !== undefined) {
|
|
421
|
+
signal.assignment = assignment;
|
|
381
422
|
}
|
|
423
|
+
|
|
424
|
+
clearAutoAssignmentWithoutLinks(unlinkedZone);
|
|
382
425
|
}
|
|
383
426
|
//action
|
|
384
427
|
function handleUnlinkZone(draft: Draft<State>, action: UnlinkZoneAction) {
|
|
@@ -397,11 +440,47 @@ function handleAssignZone(draft: Draft<State>, action: AssignZoneAction) {
|
|
|
397
440
|
const [{ index: zoneIndex }, { index: signalIndex }] = keys;
|
|
398
441
|
const zone = spectrum.zones.values[zoneIndex];
|
|
399
442
|
|
|
400
|
-
const
|
|
443
|
+
const signal = zone.signals[signalIndex];
|
|
444
|
+
signal.isAutoAssignment = true;
|
|
445
|
+
|
|
446
|
+
const signalByAxis = signal[axis];
|
|
401
447
|
signalByAxis.diaIDs = diaIDs;
|
|
402
448
|
signalByAxis.nbAtoms = nbAtoms + (signalByAxis?.nbAtoms || 0);
|
|
403
449
|
}
|
|
404
450
|
|
|
451
|
+
function handleAutoLink2DSignals(
|
|
452
|
+
draft: Draft<State>,
|
|
453
|
+
action: AutoLink2DSignalsAction,
|
|
454
|
+
) {
|
|
455
|
+
const spectrum = getSpectrum(draft);
|
|
456
|
+
if (!isSpectrum2D(spectrum)) return;
|
|
457
|
+
|
|
458
|
+
const zoneIndex = getZoneIndex(spectrum, action.payload.zoneId);
|
|
459
|
+
|
|
460
|
+
if (zoneIndex === -1) return;
|
|
461
|
+
|
|
462
|
+
const zone = spectrum.zones.values[zoneIndex];
|
|
463
|
+
|
|
464
|
+
for (const { signalId, x, y, assignment } of action.payload.assignments) {
|
|
465
|
+
const signal = zone.signals.find((signal) => signal.id === signalId);
|
|
466
|
+
if (!signal) continue;
|
|
467
|
+
|
|
468
|
+
if (x) {
|
|
469
|
+
signal.x.diaIDs = [...x.diaIDs];
|
|
470
|
+
signal.x.nbAtoms = x.nbAtoms;
|
|
471
|
+
}
|
|
472
|
+
if (y) {
|
|
473
|
+
signal.y.diaIDs = [...y.diaIDs];
|
|
474
|
+
signal.y.nbAtoms = y.nbAtoms;
|
|
475
|
+
}
|
|
476
|
+
signal.assignment = assignment;
|
|
477
|
+
signal.isAutoAssignment = true;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
initializeZoneViewObject(draft, spectrum.id);
|
|
481
|
+
draft.view.zones[spectrum.id].showAssignmentsLabels = true;
|
|
482
|
+
}
|
|
483
|
+
|
|
405
484
|
//action
|
|
406
485
|
function handleSaveEditedZone(
|
|
407
486
|
draft: Draft<State>,
|
|
@@ -466,7 +545,7 @@ function handleChangeZoneAssignmentLabel(
|
|
|
466
545
|
draft: Draft<State>,
|
|
467
546
|
action: ChangeZoneAssignmentLabelAction,
|
|
468
547
|
) {
|
|
469
|
-
const { zoneID, signalID, value } = action.payload;
|
|
548
|
+
const { zoneID, signalID, value, isAutoAssignment = false } = action.payload;
|
|
470
549
|
|
|
471
550
|
const spectrum = getSpectrum(draft);
|
|
472
551
|
if (!isSpectrum2D(spectrum)) return;
|
|
@@ -491,10 +570,12 @@ function handleChangeZoneAssignmentLabel(
|
|
|
491
570
|
}
|
|
492
571
|
|
|
493
572
|
signal.assignment = value;
|
|
573
|
+
signal.isAutoAssignment = isAutoAssignment;
|
|
494
574
|
|
|
495
575
|
if (!value) {
|
|
496
576
|
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
|
497
577
|
delete zoneView.assignmentsLabelsCoordinates[zoneID];
|
|
578
|
+
signal.isAutoAssignment = false;
|
|
498
579
|
}
|
|
499
580
|
}
|
|
500
581
|
|
|
@@ -519,6 +600,7 @@ export {
|
|
|
519
600
|
handleAdd2dZone,
|
|
520
601
|
handleAlign2DSpectrum,
|
|
521
602
|
handleAssignZone,
|
|
603
|
+
handleAutoLink2DSignals,
|
|
522
604
|
handleAutoSpectraZonesDetection,
|
|
523
605
|
handleAutoZonesDetection,
|
|
524
606
|
handleChangeZoneAssignmentLabel,
|
|
@@ -3,6 +3,8 @@ import type { Draft } from 'immer';
|
|
|
3
3
|
import type { BrushAxis } from '../../EventsTrackers/brush_tracker.types.ts';
|
|
4
4
|
import type { State } from '../Reducer.js';
|
|
5
5
|
|
|
6
|
+
import { getSpectrum } from './getSpectrum.js';
|
|
7
|
+
|
|
6
8
|
interface HistoryItem {
|
|
7
9
|
xDomain: number[];
|
|
8
10
|
yDomain: number[];
|
|
@@ -117,11 +119,31 @@ export function addToBrushHistory(
|
|
|
117
119
|
}
|
|
118
120
|
}
|
|
119
121
|
|
|
120
|
-
|
|
122
|
+
interface RestoreLastZoomDomainOptions {
|
|
123
|
+
/**
|
|
124
|
+
* Set to true when the displayed spectrum switched between FID and FT.
|
|
125
|
+
* A FID <-> FT transition regenerates the x axis, so any zoom domain stored
|
|
126
|
+
* for the previous state is expressed in a different scale and must be
|
|
127
|
+
* discarded instead of restored (otherwise the previous zoom is applied to
|
|
128
|
+
* the new axis, e.g. FFT keeps the FID zoom range and only flips the scale).
|
|
129
|
+
*/
|
|
130
|
+
isFtStateChanged?: boolean;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function restoreLastZoomDomain(
|
|
134
|
+
draft: Draft<State>,
|
|
135
|
+
options: RestoreLastZoomDomainOptions = {},
|
|
136
|
+
) {
|
|
121
137
|
const zoomHistory = zoomHistoryManager(
|
|
122
138
|
draft.zoom.history,
|
|
123
139
|
draft.view.spectra.activeTab,
|
|
124
140
|
);
|
|
141
|
+
|
|
142
|
+
if (options.isFtStateChanged) {
|
|
143
|
+
zoomHistory.clear();
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
|
|
125
147
|
const zoomValue = zoomHistory.getLast();
|
|
126
148
|
|
|
127
149
|
if (!zoomValue) {
|
|
@@ -133,3 +155,21 @@ export function restoreLastZoomDomain(draft: Draft<State>) {
|
|
|
133
155
|
|
|
134
156
|
return true;
|
|
135
157
|
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Restore the last zoom domain, unless the active spectrum switched between FID
|
|
161
|
+
* and FT since `previousIsFt` was captured. This is the shared criterion for
|
|
162
|
+
* every action that re-processes a spectrum (processings panel, legacy filter
|
|
163
|
+
* panel, FFT): a FID <-> FT transition regenerates the x axis, so the stored
|
|
164
|
+
* zoom is stale and the freshly computed full domain must be kept instead.
|
|
165
|
+
*/
|
|
166
|
+
export function restoreLastZoomUnlessDomainChanged(
|
|
167
|
+
draft: Draft<State>,
|
|
168
|
+
previousIsFt: boolean,
|
|
169
|
+
) {
|
|
170
|
+
const currentIsFt = getSpectrum(draft)?.info.isFt ?? previousIsFt;
|
|
171
|
+
|
|
172
|
+
return restoreLastZoomDomain(draft, {
|
|
173
|
+
isFtStateChanged: previousIsFt !== currentIsFt,
|
|
174
|
+
});
|
|
175
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type {
|
|
2
|
+
AssignmentSummaryPreferences,
|
|
2
3
|
BaseNucleus1DPreferences,
|
|
3
4
|
BaseNucleus2DPreferences,
|
|
4
5
|
FloatingRangesTablePreferences,
|
|
@@ -200,6 +201,11 @@ const databaseDefaultValues: PanelsPreferences['database'] = {
|
|
|
200
201
|
minHeight: 100,
|
|
201
202
|
},
|
|
202
203
|
};
|
|
204
|
+
|
|
205
|
+
const assignmentSummaryDefaultValues: AssignmentSummaryPreferences = {
|
|
206
|
+
showAtomNumbers: false,
|
|
207
|
+
};
|
|
208
|
+
|
|
203
209
|
const getMultipleSpectraAnalysisDefaultValues = (
|
|
204
210
|
nucleus?: string,
|
|
205
211
|
): PanelsPreferences['multipleSpectraAnalysis'] => {
|
|
@@ -241,6 +247,7 @@ const getMatrixGenerationDefaultValues = (
|
|
|
241
247
|
};
|
|
242
248
|
|
|
243
249
|
export {
|
|
250
|
+
assignmentSummaryDefaultValues,
|
|
244
251
|
databaseDefaultValues,
|
|
245
252
|
getIntegralDefaultValues,
|
|
246
253
|
getMatrixGenerationDefaultOptions,
|
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
FaICursor,
|
|
27
27
|
} from 'react-icons/fa';
|
|
28
28
|
import { GrShift } from 'react-icons/gr';
|
|
29
|
+
import { LuLink } from 'react-icons/lu';
|
|
29
30
|
import { PiKnifeBold, PiSelectionPlusDuotone } from 'react-icons/pi';
|
|
30
31
|
import { TbZoom } from 'react-icons/tb';
|
|
31
32
|
|
|
@@ -159,6 +160,20 @@ export const options: RecordOptions = {
|
|
|
159
160
|
],
|
|
160
161
|
isToggle: true,
|
|
161
162
|
},
|
|
163
|
+
signalLinking: {
|
|
164
|
+
id: 'signalLinking',
|
|
165
|
+
label: 'Link signals',
|
|
166
|
+
icon: LuLink,
|
|
167
|
+
hasOptionPanel: false,
|
|
168
|
+
isFilter: false,
|
|
169
|
+
mode: '2D',
|
|
170
|
+
spectraFilter: [
|
|
171
|
+
{
|
|
172
|
+
info: [{ key: 'isFt', value: true }],
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
isToggle: true,
|
|
176
|
+
},
|
|
162
177
|
slicing: {
|
|
163
178
|
id: 'slicing',
|
|
164
179
|
label: 'Slicing tool',
|
|
@@ -42,12 +42,12 @@ interface BaseToolItem extends Pick<ToolbarItemProps, 'disabled'> {
|
|
|
42
42
|
}
|
|
43
43
|
interface ToolItem extends BaseToolItem {
|
|
44
44
|
onClick?: () => void;
|
|
45
|
-
tooltip:
|
|
45
|
+
tooltip: TooltipItem;
|
|
46
46
|
}
|
|
47
47
|
interface PopoverToolItem extends BaseToolItem {
|
|
48
48
|
onClick: (data?: any) => void;
|
|
49
49
|
menuItems: ToolbarPopoverMenuItem[];
|
|
50
|
-
tooltip:
|
|
50
|
+
tooltip: TooltipItem;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
function isPopoverToolItem(
|
|
@@ -254,12 +254,20 @@ export default function NMRToolbar() {
|
|
|
254
254
|
link: 'https://docs.nmrium.org/30_2d-spectra/zones',
|
|
255
255
|
},
|
|
256
256
|
},
|
|
257
|
+
{
|
|
258
|
+
id: 'signalLinking',
|
|
259
|
+
tooltip: {
|
|
260
|
+
title: options.signalLinking.label,
|
|
261
|
+
shortcuts: ['l'],
|
|
262
|
+
description: `${!invert ? 'SHIFT + click' : 'Click'} a highlighted crossing of the two 1D traces to add a link to the active 2D spectrum.`,
|
|
263
|
+
},
|
|
264
|
+
},
|
|
257
265
|
{
|
|
258
266
|
id: 'slicing',
|
|
259
267
|
tooltip: {
|
|
260
268
|
title: options.slicing.label,
|
|
261
269
|
description:
|
|
262
|
-
'Display the horizontal and vertical slices of the selected 2D spectrum at the level of the pointer.',
|
|
270
|
+
'Display the horizontal and vertical slices of the selected 2D spectrum at the level of the pointer. Scroll over the spectrum to adjust the cut intensity in both directions.',
|
|
263
271
|
link: 'https://docs.nmrium.org/30_2d-spectra/slicing',
|
|
264
272
|
},
|
|
265
273
|
},
|
|
@@ -378,23 +386,23 @@ export default function NMRToolbar() {
|
|
|
378
386
|
},
|
|
379
387
|
{
|
|
380
388
|
id: 'fftDimension1',
|
|
381
|
-
tooltip: options.fftDimension1.label,
|
|
389
|
+
tooltip: { title: options.fftDimension1.label },
|
|
382
390
|
onClick: handleFFtDimension1Filter,
|
|
383
391
|
},
|
|
384
392
|
{
|
|
385
393
|
id: 'fftDimension2',
|
|
386
|
-
tooltip: options.fftDimension2.label,
|
|
394
|
+
tooltip: { title: options.fftDimension2.label },
|
|
387
395
|
onClick: handleFFtDimension2Filter,
|
|
388
396
|
},
|
|
389
397
|
{
|
|
390
398
|
id: 'import',
|
|
391
|
-
tooltip: options.import.label,
|
|
399
|
+
tooltip: { title: options.import.label },
|
|
392
400
|
menuItems: importMenu,
|
|
393
401
|
onClick: importHandler,
|
|
394
402
|
},
|
|
395
403
|
{
|
|
396
404
|
id: 'exportAs',
|
|
397
|
-
tooltip: options.exportAs.label,
|
|
405
|
+
tooltip: { title: options.exportAs.label },
|
|
398
406
|
menuItems: exportMenu,
|
|
399
407
|
onClick: exportHandler,
|
|
400
408
|
},
|
|
@@ -489,13 +497,7 @@ export default function NMRToolbar() {
|
|
|
489
497
|
<ToolbarPopoverItem
|
|
490
498
|
key={id}
|
|
491
499
|
options={menuItems}
|
|
492
|
-
tooltip={
|
|
493
|
-
typeof tooltip === 'string' ? (
|
|
494
|
-
tooltip
|
|
495
|
-
) : (
|
|
496
|
-
<TooltipHelpContent {...tooltip} />
|
|
497
|
-
)
|
|
498
|
-
}
|
|
500
|
+
tooltip={<TooltipHelpContent {...tooltip} />}
|
|
499
501
|
tooltipProps={{
|
|
500
502
|
minimal: true,
|
|
501
503
|
}}
|
|
@@ -514,13 +516,7 @@ export default function NMRToolbar() {
|
|
|
514
516
|
<Toolbar.Item
|
|
515
517
|
key={id}
|
|
516
518
|
onClick={onClick || (() => handleChange(id))}
|
|
517
|
-
tooltip={
|
|
518
|
-
typeof tooltip === 'string' ? (
|
|
519
|
-
tooltip
|
|
520
|
-
) : (
|
|
521
|
-
<TooltipHelpContent {...tooltip} />
|
|
522
|
-
)
|
|
523
|
-
}
|
|
519
|
+
tooltip={<TooltipHelpContent {...tooltip} />}
|
|
524
520
|
tooltipProps={{
|
|
525
521
|
minimal: true,
|
|
526
522
|
}}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
BrushTrackerEvents,
|
|
3
|
+
BrushTrackerEventsDragEvent,
|
|
3
4
|
BrushTrackerEventsOnClickEvent,
|
|
4
5
|
BrushTrackerEventsTrackerEvent,
|
|
5
6
|
BrushTrackerEventsZoomEvent,
|
|
@@ -11,6 +12,7 @@ import { useEventCallback } from 'usehooks-ts';
|
|
|
11
12
|
import type {
|
|
12
13
|
BrushTrackerData,
|
|
13
14
|
ClickOptions,
|
|
15
|
+
DragTrackerEvent,
|
|
14
16
|
ZoomOptions,
|
|
15
17
|
} from '../../EventsTrackers/brush_tracker.types.ts';
|
|
16
18
|
import type {
|
|
@@ -18,6 +20,10 @@ import type {
|
|
|
18
20
|
BrushTrackerEventEmitterSupportedEvents,
|
|
19
21
|
} from '../../EventsTrackers/brush_tracker_events_listeners.ts';
|
|
20
22
|
import { useBrushTrackerEventEmitter } from '../../EventsTrackers/brush_tracker_events_listeners.ts';
|
|
23
|
+
import {
|
|
24
|
+
getModifiers,
|
|
25
|
+
useMapKeyModifiers,
|
|
26
|
+
} from '../../context/KeyModifierContext.tsx';
|
|
21
27
|
|
|
22
28
|
/**
|
|
23
29
|
* Hook to forward to `ProcessingOperatorUI.ChartBrushTracker`.
|
|
@@ -25,6 +31,7 @@ import { useBrushTrackerEventEmitter } from '../../EventsTrackers/brush_tracker_
|
|
|
25
31
|
*/
|
|
26
32
|
export function useBrushTrackerEvent(events: BrushTrackerEvents) {
|
|
27
33
|
const emitter = useBrushTrackerEventEmitter();
|
|
34
|
+
const isPrimaryKeyActivated = useMapKeyModifiers();
|
|
28
35
|
|
|
29
36
|
//
|
|
30
37
|
// Integration mapping to core events listening stabilized
|
|
@@ -46,15 +53,37 @@ export function useBrushTrackerEvent(events: BrushTrackerEvents) {
|
|
|
46
53
|
events.onZoom?.(event);
|
|
47
54
|
});
|
|
48
55
|
const onClickStable = useEventCallback((options: ClickOptions) => {
|
|
49
|
-
const event = clickOptionsToCoreClickEvent(
|
|
56
|
+
const event = clickOptionsToCoreClickEvent(
|
|
57
|
+
options,
|
|
58
|
+
isPrimaryKeyActivated(getModifiers(options)),
|
|
59
|
+
);
|
|
50
60
|
|
|
51
61
|
events.onClick?.(event);
|
|
52
62
|
});
|
|
53
63
|
const onDoubleClickStable = useEventCallback((options: ClickOptions) => {
|
|
54
|
-
const event = clickOptionsToCoreClickEvent(
|
|
64
|
+
const event = clickOptionsToCoreClickEvent(
|
|
65
|
+
options,
|
|
66
|
+
isPrimaryKeyActivated(getModifiers(options)),
|
|
67
|
+
);
|
|
55
68
|
|
|
56
69
|
events.onDoubleClick?.(event);
|
|
57
70
|
});
|
|
71
|
+
const onDragStable = useEventCallback((data: DragTrackerEvent) => {
|
|
72
|
+
const event = dragTrackerEventToCoreDragEvent(
|
|
73
|
+
data,
|
|
74
|
+
isPrimaryKeyActivated(getModifiers(getDragEventModifiers(data))),
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
events.onDrag?.(event);
|
|
78
|
+
});
|
|
79
|
+
const onDragEndStable = useEventCallback((data: DragTrackerEvent) => {
|
|
80
|
+
const event = dragTrackerEventToCoreDragEvent(
|
|
81
|
+
data,
|
|
82
|
+
isPrimaryKeyActivated(getModifiers(getDragEventModifiers(data))),
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
events.onDragEnd?.(event);
|
|
86
|
+
});
|
|
58
87
|
|
|
59
88
|
//
|
|
60
89
|
// Use stable version if the event is defined.
|
|
@@ -66,6 +95,8 @@ export function useBrushTrackerEvent(events: BrushTrackerEvents) {
|
|
|
66
95
|
const onZoom = events.onZoom && onZoomStable;
|
|
67
96
|
const onClick = events.onClick && onClickStable;
|
|
68
97
|
const onDoubleClick = events.onDoubleClick && onDoubleClickStable;
|
|
98
|
+
const onDrag = events.onDrag && onDragStable;
|
|
99
|
+
const onDragEnd = events.onDragEnd && onDragEndStable;
|
|
69
100
|
|
|
70
101
|
//
|
|
71
102
|
// Forward the events listeners
|
|
@@ -76,6 +107,8 @@ export function useBrushTrackerEvent(events: BrushTrackerEvents) {
|
|
|
76
107
|
useRegisterListener(emitter, 'zoom', onZoom);
|
|
77
108
|
useRegisterListener(emitter, 'click', onClick);
|
|
78
109
|
useRegisterListener(emitter, 'click-double', onDoubleClick);
|
|
110
|
+
useRegisterListener(emitter, 'drag', onDrag);
|
|
111
|
+
useRegisterListener(emitter, 'drag-end', onDragEnd);
|
|
79
112
|
}
|
|
80
113
|
|
|
81
114
|
function useRegisterListener(
|
|
@@ -131,8 +164,71 @@ function zoomOptionsToCoreZoomEvent(
|
|
|
131
164
|
|
|
132
165
|
function clickOptionsToCoreClickEvent(
|
|
133
166
|
event: ClickOptions,
|
|
167
|
+
isPrimaryKeyActivated: boolean,
|
|
134
168
|
): BrushTrackerEventsOnClickEvent {
|
|
135
169
|
const { x, y, ...domEvent } = event;
|
|
136
170
|
|
|
137
|
-
return {
|
|
171
|
+
return {
|
|
172
|
+
// Claiming the event flags the emitted tracker event (NOT the native
|
|
173
|
+
// domEvent, whose stopPropagation would not be honored by the veto
|
|
174
|
+
// check), so the host `useWrappedEvents` skips its default behavior
|
|
175
|
+
// for this event (like the double-click zoom-out).
|
|
176
|
+
stopPropagation: () => claimTrackerEvent(event),
|
|
177
|
+
domEvent,
|
|
178
|
+
position: { x, y },
|
|
179
|
+
isPrimaryKeyActivated,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Flag a tracker event as propagation-stopped.
|
|
185
|
+
*
|
|
186
|
+
* The emitted click events are spreads of the React synthetic event, so
|
|
187
|
+
* they carry an own `isPropagationStopped` flag but no `stopPropagation`
|
|
188
|
+
* method: it lives on the synthetic event prototype and is lost in the
|
|
189
|
+
* spread. The claim reassigns the flag on the tracker event itself,
|
|
190
|
+
* which is the flag checked by the host `useWrappedEvents` after
|
|
191
|
+
* emitting to its listeners.
|
|
192
|
+
*/
|
|
193
|
+
function claimTrackerEvent(event: ClickOptions) {
|
|
194
|
+
event.isPropagationStopped = () => true;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function dragTrackerEventToCoreDragEvent(
|
|
198
|
+
event: DragTrackerEvent,
|
|
199
|
+
isPrimaryKeyActivated: boolean,
|
|
200
|
+
): BrushTrackerEventsDragEvent {
|
|
201
|
+
const {
|
|
202
|
+
x,
|
|
203
|
+
y,
|
|
204
|
+
startX,
|
|
205
|
+
startY,
|
|
206
|
+
domEvent,
|
|
207
|
+
mouseButton,
|
|
208
|
+
ctrlKey,
|
|
209
|
+
altKey,
|
|
210
|
+
shiftKey,
|
|
211
|
+
} = event;
|
|
212
|
+
|
|
213
|
+
return {
|
|
214
|
+
// Claiming the gesture delegates to the tracker event (NOT the native
|
|
215
|
+
// domEvent, whose stopPropagation is a no-op for the veto), so the
|
|
216
|
+
// brush suppression is honored by the host `BrushTracker`.
|
|
217
|
+
stopPropagation: () => event.stopPropagation(),
|
|
218
|
+
mouseButton,
|
|
219
|
+
modifiersKey: { ctrlKey, altKey, shiftKey, metaKey: domEvent.metaKey },
|
|
220
|
+
position: { x, y },
|
|
221
|
+
positionStart: { x: startX, y: startY },
|
|
222
|
+
isPrimaryKeyActivated,
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Modifier keys of a drag tracker event, in the shape expected by the
|
|
228
|
+
* `KeyModifierContext` helpers (`metaKey` comes from the native event).
|
|
229
|
+
*/
|
|
230
|
+
function getDragEventModifiers(event: DragTrackerEvent) {
|
|
231
|
+
const { shiftKey, altKey, ctrlKey, domEvent } = event;
|
|
232
|
+
|
|
233
|
+
return { shiftKey, altKey, ctrlKey, metaKey: domEvent.metaKey };
|
|
138
234
|
}
|
|
@@ -17,6 +17,8 @@ export function CoreOperatorChartSVG(props: CoreOperatorChartSVGProps) {
|
|
|
17
17
|
core,
|
|
18
18
|
spectrum,
|
|
19
19
|
operation,
|
|
20
|
+
onChange,
|
|
21
|
+
isLivePreview,
|
|
20
22
|
height,
|
|
21
23
|
width,
|
|
22
24
|
margin,
|
|
@@ -34,6 +36,8 @@ export function CoreOperatorChartSVG(props: CoreOperatorChartSVGProps) {
|
|
|
34
36
|
core={core}
|
|
35
37
|
spectrum={spectrum}
|
|
36
38
|
operation={operation}
|
|
39
|
+
onChange={onChange}
|
|
40
|
+
isLivePreview={isLivePreview}
|
|
37
41
|
height={height}
|
|
38
42
|
width={width}
|
|
39
43
|
margin={margin}
|
|
@@ -6,10 +6,11 @@ export const assignment: InnerWorkspace = {
|
|
|
6
6
|
display: {
|
|
7
7
|
panels: {
|
|
8
8
|
spectraPanel: { display: true, visible: true, open: true },
|
|
9
|
-
informationPanel: { display:
|
|
10
|
-
rangesPanel: { display: true, visible: true, open: false },
|
|
11
|
-
structuresPanel: { display: true, visible: true, open: false },
|
|
9
|
+
informationPanel: { display: false, visible: true, open: false },
|
|
12
10
|
processingsPanel: { display: true, visible: true, open: false },
|
|
11
|
+
rangesPanel: { display: true, visible: true, open: true },
|
|
12
|
+
assignmentSummaryPanel: { display: true, visible: true, open: false },
|
|
13
|
+
structuresPanel: { display: true, visible: true, open: false },
|
|
13
14
|
zonesPanel: { display: true, visible: true, open: false },
|
|
14
15
|
},
|
|
15
16
|
toolBarButtons: {
|
|
@@ -21,6 +22,7 @@ export const assignment: InnerWorkspace = {
|
|
|
21
22
|
spectraCenterAlignments: true,
|
|
22
23
|
realImaginary: true,
|
|
23
24
|
zonePicking: true,
|
|
25
|
+
signalLinking: true,
|
|
24
26
|
rangePicking: true,
|
|
25
27
|
slicing: true,
|
|
26
28
|
apodization: true,
|
|
@@ -6,12 +6,13 @@ export const basic: InnerWorkspace = {
|
|
|
6
6
|
display: {
|
|
7
7
|
panels: {
|
|
8
8
|
spectraPanel: { display: true, visible: true, open: true },
|
|
9
|
-
informationPanel: { display: true, visible: true, open: false },
|
|
10
|
-
peaksPanel: { display: true, visible: true, open: false },
|
|
11
|
-
integralsPanel: { display: true, visible: true, open: false },
|
|
12
|
-
rangesPanel: { display: true, visible: true, open: false },
|
|
13
|
-
structuresPanel: { display: true, visible: true, open: false },
|
|
14
9
|
processingsPanel: { display: true, visible: true, open: false },
|
|
10
|
+
rangesPanel: { display: true, visible: true, open: true },
|
|
11
|
+
assignmentSummaryPanel: { display: true, visible: true, open: false },
|
|
12
|
+
structuresPanel: { display: true, visible: true, open: false },
|
|
13
|
+
informationPanel: { display: false, visible: true, open: false },
|
|
14
|
+
peaksPanel: { display: false, visible: true, open: false },
|
|
15
|
+
integralsPanel: { display: false, visible: true, open: false },
|
|
15
16
|
zonesPanel: { display: true, visible: true, open: false },
|
|
16
17
|
},
|
|
17
18
|
toolBarButtons: {
|
|
@@ -25,6 +26,7 @@ export const basic: InnerWorkspace = {
|
|
|
25
26
|
peakPicking: true,
|
|
26
27
|
integral: true,
|
|
27
28
|
zonePicking: true,
|
|
29
|
+
signalLinking: true,
|
|
28
30
|
rangePicking: true,
|
|
29
31
|
slicing: true,
|
|
30
32
|
apodization: true,
|
|
@@ -38,6 +38,7 @@ export const workspaceDefaultProperties: RequiredWorkspacePreferences = {
|
|
|
38
38
|
peaksPanel: { display: false, visible: false, open: false },
|
|
39
39
|
predictionPanel: { display: false, visible: false, open: false },
|
|
40
40
|
summaryPanel: { display: false, visible: false, open: false },
|
|
41
|
+
assignmentSummaryPanel: { display: false, visible: false, open: false },
|
|
41
42
|
simulationPanel: { display: false, visible: false, open: false },
|
|
42
43
|
matrixGenerationPanel: { display: false, visible: false, open: false },
|
|
43
44
|
} satisfies Required<RequiredWorkspacePreferences['display']['panels']>,
|
|
@@ -59,6 +60,7 @@ export const workspaceDefaultProperties: RequiredWorkspacePreferences = {
|
|
|
59
60
|
apodization: false,
|
|
60
61
|
zeroFilling: false,
|
|
61
62
|
zonePicking: false,
|
|
63
|
+
signalLinking: false,
|
|
62
64
|
zoomOut: false,
|
|
63
65
|
zoom: false,
|
|
64
66
|
peakPicking: false,
|
|
@@ -40,6 +40,14 @@ export type PredictedSpectraResult = Partial<
|
|
|
40
40
|
Record<Experiment, PredictionBase1D | PredictionBase2D>
|
|
41
41
|
>;
|
|
42
42
|
|
|
43
|
+
/**
|
|
44
|
+
* A 2D prediction without signals cannot produce a meaningful 2D spectrum:
|
|
45
|
+
* `signals2DToZ` would build an all-zero matrix.
|
|
46
|
+
*/
|
|
47
|
+
export function isEmpty2DPrediction(spectrum: PredictionBase2D): boolean {
|
|
48
|
+
return spectrum.signals.length === 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
43
51
|
export interface PredictionOptions {
|
|
44
52
|
name: string;
|
|
45
53
|
frequency: number;
|
|
@@ -151,8 +159,10 @@ export function generateSpectra(
|
|
|
151
159
|
case 'cosy':
|
|
152
160
|
case 'hsqc':
|
|
153
161
|
case 'hmbc': {
|
|
162
|
+
const prediction = spectrum as PredictionBase2D;
|
|
163
|
+
if (isEmpty2DPrediction(prediction)) break;
|
|
154
164
|
const datum = generated2DSpectrum({
|
|
155
|
-
spectrum:
|
|
165
|
+
spectrum: prediction,
|
|
156
166
|
options,
|
|
157
167
|
experiment,
|
|
158
168
|
color,
|