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
|
@@ -7,9 +7,9 @@ interface MultipletDefinition {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export const multiplets: MultipletDefinition[] = MultiplicityPatterns.map(
|
|
10
|
-
({ label, value, acs, multiplicity }) => ({
|
|
10
|
+
({ label, value, acs = value, multiplicity }) => ({
|
|
11
11
|
label,
|
|
12
|
-
value: acs
|
|
12
|
+
value: acs,
|
|
13
13
|
multiplicity,
|
|
14
14
|
}),
|
|
15
15
|
);
|
|
@@ -50,6 +50,7 @@ export function initiateDatum2D(
|
|
|
50
50
|
id: spectrum.id || crypto.randomUUID(),
|
|
51
51
|
display: initiateDisplay(spectrum, { usedColors, colors }),
|
|
52
52
|
info: initiateInfo(spectrum),
|
|
53
|
+
linkedSignals: spectrum.linkedSignals ?? [],
|
|
53
54
|
};
|
|
54
55
|
|
|
55
56
|
// Now, processings can happen before loading in component
|
|
@@ -26,7 +26,7 @@ export function detectZonesManual(
|
|
|
26
26
|
});
|
|
27
27
|
let { fromX, fromY, toX, toY } = options.selectedZone;
|
|
28
28
|
if (fromX > toX) [fromX, toX] = [toX, fromX];
|
|
29
|
-
if (
|
|
29
|
+
if (fromY > toY) [fromY, toY] = [toY, fromY];
|
|
30
30
|
zones[0] = {
|
|
31
31
|
...zones[0],
|
|
32
32
|
x: { from: fromX, to: toX },
|
|
@@ -70,20 +70,19 @@ function getSubMatrix(
|
|
|
70
70
|
if (yIndexFrom > yIndexTo) [yIndexFrom, yIndexTo] = [yIndexTo, yIndexFrom];
|
|
71
71
|
|
|
72
72
|
const z: NmrData2DContent['z'] = [];
|
|
73
|
-
let maxZ =
|
|
74
|
-
let minZ =
|
|
73
|
+
let maxZ = -Infinity;
|
|
74
|
+
let minZ = Infinity;
|
|
75
75
|
|
|
76
76
|
const nbXPoints = xIndexTo - xIndexFrom + 1;
|
|
77
77
|
|
|
78
|
-
for (let j = yIndexFrom; j
|
|
78
|
+
for (let j = yIndexFrom; j <= yIndexTo; j++) {
|
|
79
79
|
const row = new Float64Array(nbXPoints);
|
|
80
80
|
let xIndex = xIndexFrom;
|
|
81
81
|
for (let i = 0; i < nbXPoints; i++) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
if (
|
|
86
|
-
if (minZ > rowValue) minZ = rowValue;
|
|
82
|
+
const value = data.z[j][xIndex++];
|
|
83
|
+
row[i] = value;
|
|
84
|
+
if (maxZ < value) maxZ = value;
|
|
85
|
+
if (minZ > value) minZ = value;
|
|
87
86
|
}
|
|
88
87
|
z.push(row);
|
|
89
88
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MoleculeView, StateMolecule } from '@zakodium/nmrium-core';
|
|
2
|
+
import { expandChemicalGroups } from 'expand-chemical-groups';
|
|
2
3
|
import { Molecule } from 'openchemlib';
|
|
3
4
|
|
|
4
5
|
import getAtomsFromMF from '../utilities/getAtomsFromMF.js';
|
|
@@ -36,17 +37,32 @@ type InitializeMoleculeOptions = { text: string } & Omit<
|
|
|
36
37
|
'molfile'
|
|
37
38
|
>;
|
|
38
39
|
|
|
40
|
+
export const parseErrorMessage =
|
|
41
|
+
'Failed to parse SMILES, molfile or chemical groups. Please paste a valid format';
|
|
42
|
+
|
|
43
|
+
function parseMoleculeText(text: string): Molecule {
|
|
44
|
+
const moleculeText = text.trim();
|
|
45
|
+
if (!moleculeText) {
|
|
46
|
+
throw new Error(parseErrorMessage);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const molecule = Molecule.fromText(text);
|
|
50
|
+
if (molecule && molecule.getAllAtoms() > 0) {
|
|
51
|
+
return molecule;
|
|
52
|
+
}
|
|
53
|
+
// fallback to expanding chemical groups if `fromText` parsing fails
|
|
54
|
+
// for example HAlaGlyOH, BocAlaOH ...etc.
|
|
55
|
+
return expandChemicalGroups(moleculeText);
|
|
56
|
+
}
|
|
57
|
+
|
|
39
58
|
export function initMolecule(
|
|
40
59
|
options: InitializeMoleculeOptions,
|
|
41
60
|
): StateMoleculeExtended {
|
|
42
61
|
const { id = crypto.randomUUID(), label = 'p#', text, selector } = options;
|
|
62
|
+
const molecule = parseMoleculeText(text);
|
|
43
63
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if (!molecule) {
|
|
47
|
-
throw new Error(
|
|
48
|
-
'Failed to parse SMILES or molfile. Please paste a valid format',
|
|
49
|
-
);
|
|
64
|
+
if (molecule.getAllAtoms() === 0) {
|
|
65
|
+
throw new Error(parseErrorMessage);
|
|
50
66
|
}
|
|
51
67
|
const molfile = molecule.toMolfileV3();
|
|
52
68
|
const mfInfo = molecule.getMolecularFormula();
|
|
@@ -3,7 +3,9 @@ import { readSDF } from '@zakodium/nmrium-core-plugins';
|
|
|
3
3
|
import { Molecule } from 'openchemlib';
|
|
4
4
|
|
|
5
5
|
import type { StateMoleculeExtended } from './Molecule.js';
|
|
6
|
-
import { initMolecule } from './Molecule.js';
|
|
6
|
+
import { initMolecule, parseErrorMessage } from './Molecule.js';
|
|
7
|
+
|
|
8
|
+
export { parseErrorMessage } from './Molecule.js';
|
|
7
9
|
|
|
8
10
|
//TODO: Move molecule initialization to nmrium-core and log an error if the molecule cannot be parsed.
|
|
9
11
|
export function fromJSON(
|
|
@@ -105,9 +107,6 @@ function getLabelNumber(reserveNumbers: number[]): number {
|
|
|
105
107
|
return 1;
|
|
106
108
|
}
|
|
107
109
|
|
|
108
|
-
export const parseErrorMessage =
|
|
109
|
-
'Failed to parse SMILES or molfile. Please paste a valid format';
|
|
110
|
-
|
|
111
110
|
function validateMolecules(molecules: StateMolecule[]) {
|
|
112
111
|
if (!molecules?.length) {
|
|
113
112
|
throw new Error(parseErrorMessage);
|
|
@@ -132,10 +131,8 @@ function validateMolecules(molecules: StateMolecule[]) {
|
|
|
132
131
|
}
|
|
133
132
|
|
|
134
133
|
/**
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* @param text - text containing one or several molecules in SMILES, molfile or SDF format
|
|
138
|
-
* @returns
|
|
134
|
+
* Read SDF records and validate their structures.
|
|
135
|
+
* @param text - SDF content
|
|
139
136
|
*/
|
|
140
137
|
|
|
141
138
|
function parseSDF(text: string) {
|
|
@@ -148,12 +145,17 @@ function parseSDF(text: string) {
|
|
|
148
145
|
}
|
|
149
146
|
}
|
|
150
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Parse SDF records or a single molfile, SMILES or chemical-group.
|
|
150
|
+
* @param text - Pasted structure text
|
|
151
|
+
*/
|
|
151
152
|
export function getMolecules(text?: string) {
|
|
152
153
|
if (!text?.trim()) {
|
|
153
154
|
throw new Error(parseErrorMessage);
|
|
154
155
|
}
|
|
155
156
|
|
|
156
|
-
|
|
157
|
+
// identifies an SDF file by checking for the presence of the '$$$$' separator
|
|
158
|
+
const isSDF = text.includes('$$$$');
|
|
157
159
|
|
|
158
160
|
return isSDF ? parseSDF(text) : [initMolecule({ text })];
|
|
159
161
|
}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { useCallback, useMemo, useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
newClipboardItem,
|
|
5
|
-
read,
|
|
6
|
-
readText,
|
|
7
|
-
write,
|
|
8
|
-
writeText,
|
|
9
|
-
} from './clipboard.js';
|
|
10
3
|
import type { ClipboardMode } from './types.js';
|
|
11
4
|
|
|
12
5
|
interface UseClipboardReturn {
|
|
@@ -35,7 +28,9 @@ interface UseClipboardReturn {
|
|
|
35
28
|
*/
|
|
36
29
|
/**
|
|
37
30
|
* use write but no need do to manually ClipboardItems transform
|
|
38
|
-
*
|
|
31
|
+
* 'text/html' is always written with a 'text/plain' version derived from it,
|
|
32
|
+
* so the copy pastes into a plain-text field as well as a rich-text editor.
|
|
33
|
+
* Fallback on 'writeText' mode with text state (the plain text for HTML)
|
|
39
34
|
* @param data
|
|
40
35
|
* @param type a mime type default to 'text/plain'
|
|
41
36
|
*/
|
|
@@ -120,7 +115,7 @@ export function useClipboard(): UseClipboardReturn {
|
|
|
120
115
|
*/
|
|
121
116
|
async read(): Promise<ClipboardItems | null> {
|
|
122
117
|
try {
|
|
123
|
-
return await read();
|
|
118
|
+
return await navigator.clipboard.read();
|
|
124
119
|
} catch {
|
|
125
120
|
setShouldFallback('read');
|
|
126
121
|
return null;
|
|
@@ -131,7 +126,7 @@ export function useClipboard(): UseClipboardReturn {
|
|
|
131
126
|
*/
|
|
132
127
|
async readText(): Promise<string | null> {
|
|
133
128
|
try {
|
|
134
|
-
return await readText();
|
|
129
|
+
return await navigator.clipboard.readText();
|
|
135
130
|
} catch {
|
|
136
131
|
setShouldFallback('readText');
|
|
137
132
|
return null;
|
|
@@ -139,7 +134,7 @@ export function useClipboard(): UseClipboardReturn {
|
|
|
139
134
|
},
|
|
140
135
|
async write(data: ClipboardItems): Promise<void> {
|
|
141
136
|
try {
|
|
142
|
-
return await write(data);
|
|
137
|
+
return await navigator.clipboard.write(data);
|
|
143
138
|
} catch {
|
|
144
139
|
const blobs = await Promise.all(
|
|
145
140
|
data.map((ci) => ci.getType(ci.types[0])),
|
|
@@ -149,19 +144,23 @@ export function useClipboard(): UseClipboardReturn {
|
|
|
149
144
|
}
|
|
150
145
|
},
|
|
151
146
|
async rawWriteWithType(data: string, type = 'text/plain') {
|
|
147
|
+
const text = type === 'text/html' ? htmlToText(data) : data;
|
|
152
148
|
try {
|
|
153
|
-
const
|
|
149
|
+
const blobs: Record<string, Blob> = {
|
|
154
150
|
[type]: new Blob([data], { type }),
|
|
155
|
-
}
|
|
156
|
-
|
|
151
|
+
};
|
|
152
|
+
if (type === 'text/html') {
|
|
153
|
+
blobs['text/plain'] = new Blob([text], { type: 'text/plain' });
|
|
154
|
+
}
|
|
155
|
+
return await navigator.clipboard.write([new ClipboardItem(blobs)]);
|
|
157
156
|
} catch {
|
|
158
|
-
setText(
|
|
157
|
+
setText(text);
|
|
159
158
|
setShouldFallback('writeText');
|
|
160
159
|
}
|
|
161
160
|
},
|
|
162
161
|
async writeText(data: string) {
|
|
163
162
|
try {
|
|
164
|
-
return await writeText(data);
|
|
163
|
+
return await navigator.clipboard.writeText(data);
|
|
165
164
|
} catch {
|
|
166
165
|
setText(data);
|
|
167
166
|
setShouldFallback('writeText');
|
|
@@ -179,3 +178,7 @@ export function useClipboard(): UseClipboardReturn {
|
|
|
179
178
|
cleanShouldFallback,
|
|
180
179
|
};
|
|
181
180
|
}
|
|
181
|
+
|
|
182
|
+
function htmlToText(html: string): string {
|
|
183
|
+
return new DOMParser().parseFromString(html, 'text/html').body.textContent;
|
|
184
|
+
}
|
package/src/versionInfo.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default { version: 'v3.
|
|
1
|
+
export default { version: 'v3.2.0' };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { ClipboardItemDataType } from 'clipboard-polyfill';
|
|
2
|
-
export declare function readText(): Promise<string>;
|
|
3
|
-
export declare function read(): Promise<ClipboardItems>;
|
|
4
|
-
export declare function writeText(data: string): Promise<void>;
|
|
5
|
-
interface ClipboardItemInterface {
|
|
6
|
-
readonly presentationStyle?: PresentationStyle;
|
|
7
|
-
readonly lastModified?: number;
|
|
8
|
-
readonly delayed?: boolean;
|
|
9
|
-
readonly types: readonly string[];
|
|
10
|
-
getType(type: string): Promise<Blob>;
|
|
11
|
-
}
|
|
12
|
-
export declare function write(data: ClipboardItemInterface[]): Promise<void>;
|
|
13
|
-
export declare function newClipboardItem(items: Record<string, ClipboardItemDataType>, options?: ClipboardItemOptions): Promise<ClipboardItem>;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=clipboard.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../src/utils/clipboard/clipboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,wBAAgB,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAE1C;AAED,wBAAgB,IAAI,IAAI,OAAO,CAAC,cAAc,CAAC,CAK9C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAErD;AAED,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAC/C,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC;AACD,wBAAgB,KAAK,CAAC,IAAI,EAAE,sBAAsB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnE;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,EAC5C,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,aAAa,CAAC,CAIxB"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export function readText() {
|
|
2
|
-
return import('clipboard-polyfill').then((c) => c.readText());
|
|
3
|
-
}
|
|
4
|
-
export function read() {
|
|
5
|
-
return import('clipboard-polyfill').then((c) => {
|
|
6
|
-
const readItems = c.read();
|
|
7
|
-
return readItems;
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
export function writeText(data) {
|
|
11
|
-
return import('clipboard-polyfill').then((c) => c.writeText(data));
|
|
12
|
-
}
|
|
13
|
-
export function write(data) {
|
|
14
|
-
return import('clipboard-polyfill').then((c) => c.write(data));
|
|
15
|
-
}
|
|
16
|
-
export function newClipboardItem(items, options) {
|
|
17
|
-
return import('clipboard-polyfill').then((c) => new c.ClipboardItem(items, options));
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=clipboard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard.js","sourceRoot":"","sources":["../../../src/utils/clipboard/clipboard.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,QAAQ;IACtB,OAAO,MAAM,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,IAAI;IAClB,OAAO,MAAM,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;QAC7C,MAAM,SAAS,GAAG,CAAC,CAAC,IAAI,EAA6B,CAAC;QACtD,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,MAAM,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;AACrE,CAAC;AASD,MAAM,UAAU,KAAK,CAAC,IAA8B;IAClD,OAAO,MAAM,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,KAA4C,EAC5C,OAA8B;IAE9B,OAAO,MAAM,CAAC,oBAAoB,CAAC,CAAC,IAAI,CACtC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAK,CAAC,CAAC,aAAsC,CAAC,KAAK,EAAE,OAAO,CAAC,CACrE,CAAC;AACJ,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { ClipboardItemDataType } from 'clipboard-polyfill';
|
|
2
|
-
|
|
3
|
-
export function readText(): Promise<string> {
|
|
4
|
-
return import('clipboard-polyfill').then((c) => c.readText());
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export function read(): Promise<ClipboardItems> {
|
|
8
|
-
return import('clipboard-polyfill').then((c) => {
|
|
9
|
-
const readItems = c.read() as Promise<ClipboardItems>;
|
|
10
|
-
return readItems;
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function writeText(data: string): Promise<void> {
|
|
15
|
-
return import('clipboard-polyfill').then((c) => c.writeText(data));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface ClipboardItemInterface {
|
|
19
|
-
readonly presentationStyle?: PresentationStyle;
|
|
20
|
-
readonly lastModified?: number;
|
|
21
|
-
readonly delayed?: boolean;
|
|
22
|
-
readonly types: readonly string[];
|
|
23
|
-
getType(type: string): Promise<Blob>;
|
|
24
|
-
}
|
|
25
|
-
export function write(data: ClipboardItemInterface[]): Promise<void> {
|
|
26
|
-
return import('clipboard-polyfill').then((c) => c.write(data));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function newClipboardItem(
|
|
30
|
-
items: Record<string, ClipboardItemDataType>,
|
|
31
|
-
options?: ClipboardItemOptions,
|
|
32
|
-
): Promise<ClipboardItem> {
|
|
33
|
-
return import('clipboard-polyfill').then(
|
|
34
|
-
(c) => new (c.ClipboardItem as typeof ClipboardItem)(items, options), // Type assertion
|
|
35
|
-
);
|
|
36
|
-
}
|