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
|
@@ -75,6 +75,7 @@ export interface ActionsButtonsPopoverProps
|
|
|
75
75
|
anchorTo?: AnchorTo;
|
|
76
76
|
autoFlip?: boolean;
|
|
77
77
|
anchorPlacement?: AnchorPlacement;
|
|
78
|
+
closeOnAction?: boolean;
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
function ActionButton(props: ButtonProps) {
|
|
@@ -163,6 +164,9 @@ export function ActionsButtonsPopover(props: ActionsButtonsPopoverProps) {
|
|
|
163
164
|
autoFlip = false,
|
|
164
165
|
disabled,
|
|
165
166
|
anchorPlacement = 'end',
|
|
167
|
+
closeOnAction = false,
|
|
168
|
+
isOpen: externalIsOpen,
|
|
169
|
+
onInteraction: onPopoverInteraction,
|
|
166
170
|
...otherProps
|
|
167
171
|
} = props;
|
|
168
172
|
|
|
@@ -170,6 +174,7 @@ export function ActionsButtonsPopover(props: ActionsButtonsPopoverProps) {
|
|
|
170
174
|
x: 0,
|
|
171
175
|
y: 0,
|
|
172
176
|
});
|
|
177
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
173
178
|
const Wrapper = targetTagName as any;
|
|
174
179
|
|
|
175
180
|
const { visibleButtons, shouldDisablePopover } = filterButtons(buttons);
|
|
@@ -192,6 +197,11 @@ export function ActionsButtonsPopover(props: ActionsButtonsPopoverProps) {
|
|
|
192
197
|
lazy
|
|
193
198
|
arrow={false}
|
|
194
199
|
animation="minimal"
|
|
200
|
+
isOpen={closeOnAction ? isOpen : externalIsOpen}
|
|
201
|
+
onInteraction={(nextOpenState, event) => {
|
|
202
|
+
onPopoverInteraction?.(nextOpenState, event);
|
|
203
|
+
if (closeOnAction) setIsOpen(nextOpenState);
|
|
204
|
+
}}
|
|
195
205
|
placement={placement}
|
|
196
206
|
popoverClassName="actions-buttons-popover"
|
|
197
207
|
interactionKind="hover"
|
|
@@ -218,7 +228,11 @@ export function ActionsButtonsPopover(props: ActionsButtonsPopoverProps) {
|
|
|
218
228
|
}}
|
|
219
229
|
content={
|
|
220
230
|
<Container style={contentStyle} flexDirection={direction} gap={space}>
|
|
221
|
-
<ActionButtons
|
|
231
|
+
<ActionButtons
|
|
232
|
+
buttons={visibleButtons}
|
|
233
|
+
direction={direction}
|
|
234
|
+
onAction={closeOnAction ? () => setIsOpen(false) : undefined}
|
|
235
|
+
/>
|
|
222
236
|
</Container>
|
|
223
237
|
}
|
|
224
238
|
{...otherProps}
|
|
@@ -228,10 +242,11 @@ export function ActionsButtonsPopover(props: ActionsButtonsPopoverProps) {
|
|
|
228
242
|
interface ActionButtonsProps {
|
|
229
243
|
buttons: ActionButtonProps[];
|
|
230
244
|
direction: Direction;
|
|
245
|
+
onAction?: () => void;
|
|
231
246
|
}
|
|
232
247
|
|
|
233
248
|
function ActionButtons(props: ActionButtonsProps) {
|
|
234
|
-
const { buttons, direction } = props;
|
|
249
|
+
const { buttons, direction, onAction } = props;
|
|
235
250
|
|
|
236
251
|
return buttons.map((button, index) => {
|
|
237
252
|
if (isSeparator(button)) {
|
|
@@ -244,7 +259,7 @@ function ActionButtons(props: ActionButtonsProps) {
|
|
|
244
259
|
return <VerticalSeparator key={index} />;
|
|
245
260
|
}
|
|
246
261
|
|
|
247
|
-
const { title = '', visible, ...otherProps } = button;
|
|
262
|
+
const { title = '', visible, onClick, ...otherProps } = button;
|
|
248
263
|
|
|
249
264
|
return (
|
|
250
265
|
<ActionButton
|
|
@@ -252,6 +267,10 @@ function ActionButtons(props: ActionButtonsProps) {
|
|
|
252
267
|
key={index}
|
|
253
268
|
tooltipProps={{ content: title, compact: true }}
|
|
254
269
|
{...otherProps}
|
|
270
|
+
onClick={(event) => {
|
|
271
|
+
onClick?.(event);
|
|
272
|
+
onAction?.();
|
|
273
|
+
}}
|
|
255
274
|
/>
|
|
256
275
|
);
|
|
257
276
|
});
|
|
@@ -103,6 +103,7 @@ export default function TableRow<TData extends TanStackRowData>(
|
|
|
103
103
|
table,
|
|
104
104
|
highlightedSource = 'UNKNOWN',
|
|
105
105
|
getHighlightExtra,
|
|
106
|
+
getHighlightIDs,
|
|
106
107
|
onContextMenuSelect,
|
|
107
108
|
contextMenu,
|
|
108
109
|
onClick,
|
|
@@ -121,7 +122,10 @@ export default function TableRow<TData extends TanStackRowData>(
|
|
|
121
122
|
}) as HighlightEventSource,
|
|
122
123
|
[highlightedSource, row.original, getHighlightExtra],
|
|
123
124
|
);
|
|
124
|
-
const highlight = useHighlight(
|
|
125
|
+
const highlight = useHighlight(
|
|
126
|
+
getHighlightIDs?.(row.original) ?? getIDs(row),
|
|
127
|
+
data,
|
|
128
|
+
);
|
|
125
129
|
|
|
126
130
|
useEffect(() => {
|
|
127
131
|
return () => {
|
|
@@ -118,6 +118,7 @@ function TanStackTableInner<TData extends TanStackRowData>(
|
|
|
118
118
|
columns,
|
|
119
119
|
highlightedSource,
|
|
120
120
|
getHighlightExtra,
|
|
121
|
+
getHighlightIDs,
|
|
121
122
|
contextMenu = [],
|
|
122
123
|
onContextMenuSelect,
|
|
123
124
|
onScroll,
|
|
@@ -265,6 +266,7 @@ function TanStackTableInner<TData extends TanStackRowData>(
|
|
|
265
266
|
const highlightSourceProps = {
|
|
266
267
|
highlightedSource,
|
|
267
268
|
getHighlightExtra,
|
|
269
|
+
getHighlightIDs,
|
|
268
270
|
} as TanStackTableHighlightSourceProps<TData>;
|
|
269
271
|
|
|
270
272
|
return (
|
|
@@ -44,6 +44,8 @@ export type TanStackTableHeaderGroup<TData extends TanStackRowData> =
|
|
|
44
44
|
HeaderGroup<TanStackTableFeatures, TData>;
|
|
45
45
|
|
|
46
46
|
export type TanStackTableHighlightSourceProps<TData extends TanStackRowData> = {
|
|
47
|
+
getHighlightIDs?: (row: TData) => string[];
|
|
48
|
+
} & {
|
|
47
49
|
[K in HighlightEventSourceType]: HighlightEventSourceExtra<K> extends never
|
|
48
50
|
? { highlightedSource?: K; getHighlightExtra?: never }
|
|
49
51
|
: {
|
|
@@ -11,6 +11,7 @@ import { useMemo } from 'react';
|
|
|
11
11
|
import { getDefaultPredictionOptions } from '../../data/PredictionManager.js';
|
|
12
12
|
import { usePreferences } from '../context/PreferencesContext.js';
|
|
13
13
|
import {
|
|
14
|
+
assignmentSummaryDefaultValues,
|
|
14
15
|
databaseDefaultValues,
|
|
15
16
|
getIntegralDefaultValues,
|
|
16
17
|
getMatrixGenerationDefaultValues,
|
|
@@ -31,7 +32,8 @@ type Panel =
|
|
|
31
32
|
| 'database'
|
|
32
33
|
| 'multipleSpectraAnalysis'
|
|
33
34
|
| 'matrixGeneration'
|
|
34
|
-
| 'prediction'
|
|
35
|
+
| 'prediction'
|
|
36
|
+
| 'assignmentSummary';
|
|
35
37
|
|
|
36
38
|
function getDefaultPreferences(panelKey: Panel, nucleus?: string) {
|
|
37
39
|
switch (panelKey) {
|
|
@@ -53,6 +55,8 @@ function getDefaultPreferences(panelKey: Panel, nucleus?: string) {
|
|
|
53
55
|
return getDefaultPredictionOptions();
|
|
54
56
|
case 'matrixGeneration':
|
|
55
57
|
return getMatrixGenerationDefaultValues(nucleus);
|
|
58
|
+
case 'assignmentSummary':
|
|
59
|
+
return assignmentSummaryDefaultValues;
|
|
56
60
|
|
|
57
61
|
default:
|
|
58
62
|
return {};
|
|
@@ -62,7 +66,11 @@ function getDefaultPreferences(panelKey: Panel, nucleus?: string) {
|
|
|
62
66
|
function joinWithNucleusPreferences(
|
|
63
67
|
data: PanelsPreferences[Exclude<
|
|
64
68
|
Panel,
|
|
65
|
-
|
|
69
|
+
| 'assignmentSummary'
|
|
70
|
+
| 'database'
|
|
71
|
+
| 'matrixGeneration'
|
|
72
|
+
| 'multipleSpectraAnalysis'
|
|
73
|
+
| 'prediction'
|
|
66
74
|
>],
|
|
67
75
|
nucleus: string,
|
|
68
76
|
returnOnlyNucleusPreferences = false,
|
|
@@ -110,6 +118,8 @@ function getPanelPreferences(
|
|
|
110
118
|
case 'database':
|
|
111
119
|
case 'prediction':
|
|
112
120
|
return panelPreferences;
|
|
121
|
+
case 'assignmentSummary':
|
|
122
|
+
return { ...assignmentSummaryDefaultValues, ...panelPreferences };
|
|
113
123
|
default:
|
|
114
124
|
return nucleus
|
|
115
125
|
? joinWithNucleusPreferences(
|
|
@@ -129,9 +139,9 @@ export function usePanelPreferences<T extends Panel>(
|
|
|
129
139
|
: T extends 'multipleSpectraAnalysis'
|
|
130
140
|
? MultipleSpectraAnalysisPreferences
|
|
131
141
|
: WorkspacePanelPreferences[T];
|
|
132
|
-
export function usePanelPreferences<
|
|
133
|
-
|
|
134
|
-
): WorkspacePanelPreferences[T];
|
|
142
|
+
export function usePanelPreferences<
|
|
143
|
+
T extends 'database' | 'prediction' | 'assignmentSummary',
|
|
144
|
+
>(panelKey: T): WorkspacePanelPreferences[T];
|
|
135
145
|
|
|
136
146
|
export function usePanelPreferences<T extends Panel>(
|
|
137
147
|
panelKey: T,
|
|
@@ -2,7 +2,6 @@ import type { NMRiumPanelPreferences } from '@zakodium/nmrium-core';
|
|
|
2
2
|
import lodashDebounce from 'lodash/debounce.js';
|
|
3
3
|
import lodashMap from 'lodash/map.js';
|
|
4
4
|
import { useCallback, useRef, useState } from 'react';
|
|
5
|
-
import { useAccordionControls } from 'react-science/ui';
|
|
6
5
|
|
|
7
6
|
import { useChartData } from '../context/ChartContext.js';
|
|
8
7
|
import { useDispatch } from '../context/DispatchContext.js';
|
|
@@ -15,7 +14,6 @@ export default function useToolsFunctions() {
|
|
|
15
14
|
const dispatch = useDispatch();
|
|
16
15
|
const toaster = useToaster();
|
|
17
16
|
|
|
18
|
-
const { open: openAccordionPanel } = useAccordionControls();
|
|
19
17
|
const [isRealSpectrumShown, setIsRealSpectrumShown] = useState(false);
|
|
20
18
|
|
|
21
19
|
const debounceClickEventsRef = useRef<{ clicks: any[] }>({ clicks: [] });
|
|
@@ -23,6 +21,7 @@ export default function useToolsFunctions() {
|
|
|
23
21
|
current: {
|
|
24
22
|
general: { invert },
|
|
25
23
|
},
|
|
24
|
+
dispatch: dispatchPreferences,
|
|
26
25
|
} = usePreferences();
|
|
27
26
|
const {
|
|
28
27
|
toolOptions: { selectedTool: previousSelectedTool },
|
|
@@ -53,7 +52,12 @@ export default function useToolsFunctions() {
|
|
|
53
52
|
: toolPanelLookup?.[selectedTool];
|
|
54
53
|
|
|
55
54
|
if (panelKey) {
|
|
56
|
-
|
|
55
|
+
// A panel hidden from the stack is not registered in the accordion,
|
|
56
|
+
// so it must be displayed through the preferences to open it.
|
|
57
|
+
dispatchPreferences({
|
|
58
|
+
type: 'TOGGLE_PANEL',
|
|
59
|
+
payload: { id: panelKey, options: { display: true, open: true } },
|
|
60
|
+
});
|
|
57
61
|
}
|
|
58
62
|
|
|
59
63
|
dispatch({
|
|
@@ -61,7 +65,7 @@ export default function useToolsFunctions() {
|
|
|
61
65
|
payload: { selectedTool: selectedTool || options.zoom.id },
|
|
62
66
|
});
|
|
63
67
|
},
|
|
64
|
-
[dispatch,
|
|
68
|
+
[dispatch, dispatchPreferences, invert, previousSelectedTool, toaster],
|
|
65
69
|
);
|
|
66
70
|
|
|
67
71
|
const handleFullZoomOut = useCallback(() => {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
ACSExportOptions,
|
|
3
|
+
Spectrum1D,
|
|
4
|
+
Spectrum,
|
|
5
|
+
} from '@zakodium/nmrium-core';
|
|
2
6
|
import { assertSpectrum1D, isSpectrum1D } from '@zakodium/nmrium-core';
|
|
3
7
|
import type { RangesToACSOptions } from 'nmr-processing';
|
|
4
8
|
import { rangesToACS } from 'nmr-processing';
|
|
@@ -39,8 +43,7 @@ export function buildPublicationString(options: BuildPublicationStringOptions) {
|
|
|
39
43
|
info,
|
|
40
44
|
ranges: { values },
|
|
41
45
|
} = spectrum;
|
|
42
|
-
const {
|
|
43
|
-
const { signalKind, format, couplingFormat, ...otherOptions } = acs;
|
|
46
|
+
const { signalKind } = acs;
|
|
44
47
|
|
|
45
48
|
const ranges =
|
|
46
49
|
signalKind === 'all'
|
|
@@ -49,7 +52,16 @@ export function buildPublicationString(options: BuildPublicationStringOptions) {
|
|
|
49
52
|
range.signals?.some((signal) => signal.kind === 'signal'),
|
|
50
53
|
);
|
|
51
54
|
|
|
52
|
-
|
|
55
|
+
return rangesToACS(ranges, getRangesToACSOptions(info, acs));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function getRangesToACSOptions(
|
|
59
|
+
info: Pick<Spectrum1D['info'], 'nucleus' | 'originFrequency'>,
|
|
60
|
+
acs: ACSExportOptions,
|
|
61
|
+
): RangesToACSOptions {
|
|
62
|
+
const { originFrequency, nucleus } = info;
|
|
63
|
+
const { signalKind, format, couplingFormat, ...otherOptions } = acs;
|
|
64
|
+
const options: RangesToACSOptions = {
|
|
53
65
|
nucleus,
|
|
54
66
|
observedFrequency: originFrequency,
|
|
55
67
|
...otherOptions,
|
|
@@ -57,9 +69,9 @@ export function buildPublicationString(options: BuildPublicationStringOptions) {
|
|
|
57
69
|
};
|
|
58
70
|
|
|
59
71
|
if (format !== 'D') {
|
|
60
|
-
|
|
61
|
-
|
|
72
|
+
options.format = format;
|
|
73
|
+
options.couplingFormat = couplingFormat;
|
|
62
74
|
}
|
|
63
75
|
|
|
64
|
-
return
|
|
76
|
+
return options;
|
|
65
77
|
}
|
|
@@ -20,6 +20,8 @@ import type { SettingsRef } from '../panels/extra/utilities/settingImperativeHan
|
|
|
20
20
|
import PredictionPreferences from '../panels/predictionPanel/PredictionOptionsPanel.js';
|
|
21
21
|
import { useStateWithLocalStorage } from '../utility/LocalStorage.js';
|
|
22
22
|
|
|
23
|
+
import { usePredictionErrorHandler } from './PredictionLimitModal.tsx';
|
|
24
|
+
|
|
23
25
|
const DialogBody = styled(StyledDialogBody)`
|
|
24
26
|
.inner-content {
|
|
25
27
|
flex: 1;
|
|
@@ -62,6 +64,8 @@ export default function PredictSpectraModal({
|
|
|
62
64
|
const refForm = useRef<SettingsRef | null>(null);
|
|
63
65
|
const dispatch = useDispatch();
|
|
64
66
|
const toaster = useToaster();
|
|
67
|
+
const { handlePredictionError, predictionLimitModal } =
|
|
68
|
+
usePredictionErrorHandler();
|
|
65
69
|
const [predictionPreferences, setPredictionPreferences] =
|
|
66
70
|
useStateWithLocalStorage('nmrium-prediction-preferences');
|
|
67
71
|
|
|
@@ -116,8 +120,8 @@ export default function PredictSpectraModal({
|
|
|
116
120
|
molecule,
|
|
117
121
|
},
|
|
118
122
|
});
|
|
119
|
-
} catch (error:
|
|
120
|
-
|
|
123
|
+
} catch (error: unknown) {
|
|
124
|
+
handlePredictionError(error);
|
|
121
125
|
} finally {
|
|
122
126
|
hideLoading();
|
|
123
127
|
}
|
|
@@ -133,6 +137,7 @@ export default function PredictSpectraModal({
|
|
|
133
137
|
toaster,
|
|
134
138
|
dispatch,
|
|
135
139
|
logger,
|
|
140
|
+
handlePredictionError,
|
|
136
141
|
],
|
|
137
142
|
);
|
|
138
143
|
|
|
@@ -179,6 +184,7 @@ export default function PredictSpectraModal({
|
|
|
179
184
|
</Button.Done>
|
|
180
185
|
</DialogFooter>
|
|
181
186
|
</StandardDialog>
|
|
187
|
+
{predictionLimitModal}
|
|
182
188
|
</>
|
|
183
189
|
);
|
|
184
190
|
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { AnchorButton, DialogBody, DialogFooter } from '@blueprintjs/core';
|
|
2
|
+
import { isPredictionRateLimitError } from 'nmr-processing';
|
|
3
|
+
import { useCallback } from 'react';
|
|
4
|
+
import { Button, useOnOff } from 'react-science/ui';
|
|
5
|
+
|
|
6
|
+
import { useToaster } from '../context/ToasterContext.js';
|
|
7
|
+
import { StandardDialog } from '../elements/StandardDialog.tsx';
|
|
8
|
+
|
|
9
|
+
const LICENSE_URL = 'https://www.nmrium.com/pricing/academic';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Report a failed prediction: a dialog inviting to get a license when the
|
|
13
|
+
* free quota of the prediction service is exhausted, a toast otherwise.
|
|
14
|
+
* @returns the error handler and the dialog element to render.
|
|
15
|
+
*/
|
|
16
|
+
export function usePredictionErrorHandler() {
|
|
17
|
+
const toaster = useToaster();
|
|
18
|
+
const [isOpen, open, close] = useOnOff(false);
|
|
19
|
+
|
|
20
|
+
const handlePredictionError = useCallback(
|
|
21
|
+
(error: unknown) => {
|
|
22
|
+
if (isPredictionRateLimitError(error)) {
|
|
23
|
+
open();
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
toaster.show({ message: (error as Error)?.message, intent: 'danger' });
|
|
27
|
+
},
|
|
28
|
+
[open, toaster],
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
const predictionLimitModal = (
|
|
32
|
+
<PredictionLimitModal isOpen={isOpen} onClose={close} />
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
return { handlePredictionError, predictionLimitModal };
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface PredictionLimitModalProps {
|
|
39
|
+
isOpen: boolean;
|
|
40
|
+
onClose: () => void;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function PredictionLimitModal(props: PredictionLimitModalProps) {
|
|
44
|
+
const { isOpen, onClose } = props;
|
|
45
|
+
return (
|
|
46
|
+
<StandardDialog
|
|
47
|
+
isOpen={isOpen}
|
|
48
|
+
onClose={onClose}
|
|
49
|
+
canOutsideClickClose
|
|
50
|
+
title="Free prediction limit reached"
|
|
51
|
+
style={{ width: 500 }}
|
|
52
|
+
>
|
|
53
|
+
<DialogBody>
|
|
54
|
+
<p>
|
|
55
|
+
Spectra are predicted by a web service that we offer for free, with a
|
|
56
|
+
limited number of predictions per day from each network. This limit
|
|
57
|
+
has been reached, so no new prediction is possible for now.
|
|
58
|
+
</p>
|
|
59
|
+
<p>
|
|
60
|
+
With an{' '}
|
|
61
|
+
<a href={LICENSE_URL} target="_blank" rel="noreferrer">
|
|
62
|
+
NMRium license
|
|
63
|
+
</a>
|
|
64
|
+
, your organization predicts spectra without this limit, and you
|
|
65
|
+
support the development of NMRium.
|
|
66
|
+
</p>
|
|
67
|
+
</DialogBody>
|
|
68
|
+
<DialogFooter
|
|
69
|
+
actions={
|
|
70
|
+
<>
|
|
71
|
+
<Button variant="outlined" onClick={onClose}>
|
|
72
|
+
Close
|
|
73
|
+
</Button>
|
|
74
|
+
<AnchorButton
|
|
75
|
+
intent="primary"
|
|
76
|
+
href={LICENSE_URL}
|
|
77
|
+
target="_blank"
|
|
78
|
+
rel="noreferrer"
|
|
79
|
+
onClick={onClose}
|
|
80
|
+
>
|
|
81
|
+
Get a license
|
|
82
|
+
</AnchorButton>
|
|
83
|
+
</>
|
|
84
|
+
}
|
|
85
|
+
/>
|
|
86
|
+
</StandardDialog>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
@@ -34,7 +34,7 @@ const editRangeFormValidation = Yup.object().shape({
|
|
|
34
34
|
)
|
|
35
35
|
.min(1, 'There must be at least one coupling in a signal')
|
|
36
36
|
.test(
|
|
37
|
-
'
|
|
37
|
+
'isMultiplicityValid',
|
|
38
38
|
'Massive multiplicity requires exactly one coupling',
|
|
39
39
|
function test(js, context) {
|
|
40
40
|
const multiplicity: string =
|
|
@@ -124,11 +124,17 @@ const ChemicalSettings = withFieldGroup({
|
|
|
124
124
|
<Select label="Chemical structures" items={displayPanelsStatus} />
|
|
125
125
|
)}
|
|
126
126
|
</AppField>
|
|
127
|
+
<AppField name="assignmentSummaryPanel">
|
|
128
|
+
{({ Select }) => (
|
|
129
|
+
<Select label="Assignment summary" items={displayPanelsStatus} />
|
|
130
|
+
)}
|
|
131
|
+
</AppField>
|
|
127
132
|
<AppField name="summaryPanel">
|
|
128
133
|
{({ Select }) => (
|
|
129
134
|
<Select label="Summary" items={displayPanelsStatus} />
|
|
130
135
|
)}
|
|
131
136
|
</AppField>
|
|
137
|
+
|
|
132
138
|
<AppField name="databasePanel">
|
|
133
139
|
{({ Select }) => (
|
|
134
140
|
<Select label="Databases" items={displayPanelsStatus} />
|
|
@@ -128,6 +128,9 @@ const Spectra2DManipulationTools = withFieldGroup({
|
|
|
128
128
|
|
|
129
129
|
return (
|
|
130
130
|
<Section title="2D Spectra">
|
|
131
|
+
<AppField name="signalLinking">
|
|
132
|
+
{({ Checkbox }) => <Checkbox label="Link signals" />}
|
|
133
|
+
</AppField>
|
|
131
134
|
<AppField name="zeroFillingDimension1">
|
|
132
135
|
{({ Checkbox }) => <Checkbox label="Zero filling direct" />}
|
|
133
136
|
</AppField>
|
package/src/component/modal/setting/tanstack_general_settings/validation/panels_tab_validation.ts
CHANGED
|
@@ -75,6 +75,7 @@ export const displayPanelsValidation = z
|
|
|
75
75
|
processingsPanel: panelCodec,
|
|
76
76
|
zonesPanel: panelCodec,
|
|
77
77
|
summaryPanel: panelCodec,
|
|
78
|
+
assignmentSummaryPanel: panelCodec,
|
|
78
79
|
multipleSpectraAnalysisPanel: panelCodec,
|
|
79
80
|
databasePanel: panelCodec,
|
|
80
81
|
predictionPanel: panelCodec,
|
package/src/component/modal/setting/tanstack_general_settings/validation/tools_tab_validation.ts
CHANGED
|
@@ -12,6 +12,7 @@ export const toolbarButtonsValidation = z
|
|
|
12
12
|
peakPicking: z.boolean().optional(),
|
|
13
13
|
integral: z.boolean().optional(),
|
|
14
14
|
zonePicking: z.boolean().optional(),
|
|
15
|
+
signalLinking: z.boolean().optional(),
|
|
15
16
|
slicing: z.boolean().optional(),
|
|
16
17
|
rangePicking: z.boolean().optional(),
|
|
17
18
|
zeroFilling: z.boolean().optional(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Info1D, Integral, SignalKind } from '@zakodium/nmr-types';
|
|
2
2
|
import dlv from 'dlv';
|
|
3
|
-
import {
|
|
3
|
+
import { isIntegralSignalKind } from 'nmr-processing';
|
|
4
4
|
import { memo, useCallback, useMemo } from 'react';
|
|
5
5
|
import { FaRegTrashAlt } from 'react-icons/fa';
|
|
6
6
|
|
|
@@ -119,7 +119,7 @@ function IntegralTable(props: IntegralTableProps) {
|
|
|
119
119
|
getValue() || 0,
|
|
120
120
|
integralsPreferences.relative.format,
|
|
121
121
|
);
|
|
122
|
-
const flag =
|
|
122
|
+
const flag = isIntegralSignalKind(row.original);
|
|
123
123
|
const integral = flag ? value : `[ ${value} ]`;
|
|
124
124
|
|
|
125
125
|
return (
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
FaDownload,
|
|
9
9
|
FaFileExport,
|
|
10
10
|
FaFileImage,
|
|
11
|
+
FaHashtag,
|
|
11
12
|
FaMinusSquare,
|
|
12
13
|
FaPaste,
|
|
13
14
|
FaPlus,
|
|
@@ -17,7 +18,7 @@ import {
|
|
|
17
18
|
} from 'react-icons/fa';
|
|
18
19
|
import { FaMaximize, FaMinimize } from 'react-icons/fa6';
|
|
19
20
|
import { IoOpenOutline } from 'react-icons/io5';
|
|
20
|
-
import { MdFlashAuto,
|
|
21
|
+
import { MdFlashAuto, MdOutlineLabelOff } from 'react-icons/md';
|
|
21
22
|
import { PanelHeader, Toolbar, TooltipHelpContent } from 'react-science/ui';
|
|
22
23
|
|
|
23
24
|
import type {
|
|
@@ -251,7 +252,7 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
251
252
|
}
|
|
252
253
|
|
|
253
254
|
/**
|
|
254
|
-
* The
|
|
255
|
+
* The molecule pasted could be SMILES, molfile, SDF or chemical groups
|
|
255
256
|
* @param text - text from clipboard
|
|
256
257
|
* @returns
|
|
257
258
|
*/
|
|
@@ -430,9 +431,10 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
430
431
|
/>
|
|
431
432
|
)}
|
|
432
433
|
<Toolbar.Item
|
|
433
|
-
tooltip="Paste SMILES or
|
|
434
|
+
tooltip="Paste SMILES, molfile or chemical groups"
|
|
434
435
|
icon={<FaPaste />}
|
|
435
436
|
onClick={handlePasteMoleculeAction}
|
|
437
|
+
data-testid="paste-molecule-action"
|
|
436
438
|
/>
|
|
437
439
|
{renderSource === 'moleculePanel' && (
|
|
438
440
|
<Toolbar.Item
|
|
@@ -456,7 +458,7 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
456
458
|
|
|
457
459
|
<Toolbar.Item
|
|
458
460
|
tooltip={`${booleanToString(!isActiveAnnotation('atom-numbers'))} atom number`}
|
|
459
|
-
icon={<
|
|
461
|
+
icon={<FaHashtag />}
|
|
460
462
|
onClick={() => toggleAtomAnnotation('atom-numbers')}
|
|
461
463
|
active={isActiveAnnotation('atom-numbers')}
|
|
462
464
|
disabled={!hasMolecules}
|
|
@@ -502,7 +504,7 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
502
504
|
onDismiss={cleanShouldFallback}
|
|
503
505
|
onReadText={handlePasteMolecule}
|
|
504
506
|
text={text}
|
|
505
|
-
label="Enter here a molfile or
|
|
507
|
+
label="Enter here a molfile, SMILES or chemical groups (e.g. HAlaGlyOH)"
|
|
506
508
|
/>
|
|
507
509
|
</PanelHeader>
|
|
508
510
|
);
|
|
@@ -15,6 +15,7 @@ import { useHighlightColor } from '../../hooks/useHighlightColor.js';
|
|
|
15
15
|
|
|
16
16
|
import useAtomAssignment from './hooks/useAtomAssignment.js';
|
|
17
17
|
import { useExtractAtomAssignmentLabel } from './hooks/useExtractAtomAssignmentLabel.js';
|
|
18
|
+
import { useSignalAssignmentUpdates } from './hooks/useSignalAssignmentUpdates.js';
|
|
18
19
|
|
|
19
20
|
interface MoleculeStructureProps extends Pick<OCLnmrProps, 'width' | 'height'> {
|
|
20
21
|
moleculeView: MoleculeView;
|
|
@@ -67,8 +68,8 @@ export function MoleculeStructure(props: MoleculeStructureProps) {
|
|
|
67
68
|
const highlightColor = useHighlightColor();
|
|
68
69
|
const dispatch = useDispatch();
|
|
69
70
|
const { current } = usePreferences();
|
|
70
|
-
const { onAtomHover,
|
|
71
|
-
|
|
71
|
+
const { onAtomHover, getLastHoverAtom } = useExtractAtomAssignmentLabel();
|
|
72
|
+
const getSignalAssignmentUpdates = useSignalAssignmentUpdates();
|
|
72
73
|
//TODO Temporary workaround to prevent other focused elements from being triggered by the space key
|
|
73
74
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
74
75
|
const hasCustomLabelChanged = useCustomLabelChange();
|
|
@@ -120,25 +121,26 @@ export function MoleculeStructure(props: MoleculeStructureProps) {
|
|
|
120
121
|
}}
|
|
121
122
|
setMolfile={(molfile) => {
|
|
122
123
|
const diaObject = getLastHoverAtom();
|
|
123
|
-
const
|
|
124
|
+
const isCustomLabelChanged = hasCustomLabelChanged(
|
|
125
|
+
molfile,
|
|
126
|
+
molecule.id,
|
|
127
|
+
);
|
|
124
128
|
|
|
125
|
-
if (
|
|
129
|
+
if (isCustomLabelChanged) {
|
|
126
130
|
dispatch({
|
|
127
131
|
type: 'CHANGE_MOLECULE_ANNOTATION',
|
|
128
132
|
payload: { id: molecule.id, atomAnnotation: 'custom-labels' },
|
|
129
133
|
});
|
|
130
134
|
}
|
|
131
135
|
|
|
132
|
-
if (
|
|
136
|
+
if (isCustomLabelChanged && diaObject) {
|
|
137
|
+
const assignments = getSignalAssignmentUpdates(diaObject, {
|
|
138
|
+
id: molecule.id,
|
|
139
|
+
molfile,
|
|
140
|
+
});
|
|
133
141
|
dispatch({
|
|
134
142
|
type: 'CHANGE_ASSIGNMENT_LABEL_BY_DIAIDS',
|
|
135
|
-
payload: {
|
|
136
|
-
diaIDs: [diaObject.idCode].concat(
|
|
137
|
-
diaObject.attachedHydrogensIDCodes,
|
|
138
|
-
),
|
|
139
|
-
assignment: assignmentObj.assignment,
|
|
140
|
-
previousAssignment: assignmentObj.previousAssignment,
|
|
141
|
-
},
|
|
143
|
+
payload: { assignments },
|
|
142
144
|
});
|
|
143
145
|
}
|
|
144
146
|
|