nmrium 2.2.0 → 2.4.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/PredictionErrorsNotations.js +3 -3
- package/lib/component/1d/PredictionErrorsNotations.js.map +1 -1
- package/lib/component/1d/peaks/PeakEditionManager.d.ts +1 -1
- package/lib/component/1d/peaks/Peaks.d.ts.map +1 -1
- package/lib/component/1d/peaks/Peaks.js +2 -1
- package/lib/component/1d/peaks/Peaks.js.map +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.d.ts.map +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.js.map +1 -1
- package/lib/component/1d/ranges/AssignmentLabel.js +1 -1
- package/lib/component/1d/ranges/AssignmentLabel.js.map +1 -1
- package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.d.ts +9 -0
- package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.d.ts.map +1 -0
- package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.js +138 -0
- package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.js.map +1 -0
- package/lib/component/1d/ranges/FloatingRanges.d.ts.map +1 -0
- package/lib/component/1d/ranges/FloatingRanges.js +362 -0
- package/lib/component/1d/ranges/FloatingRanges.js.map +1 -0
- package/lib/component/1d/ranges/Ranges.js +2 -2
- package/lib/component/1d/ranges/Ranges.js.map +1 -1
- package/lib/component/1d-2d/FieldEdition.d.ts +2 -2
- package/lib/component/1d-2d/FieldEdition.d.ts.map +1 -1
- package/lib/component/1d-2d/FieldEdition.js +2 -2
- package/lib/component/1d-2d/FieldEdition.js.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +7 -7
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js.map +1 -1
- package/lib/component/1d-2d/tools/BrushXY.js +6 -6
- package/lib/component/1d-2d/tools/BrushXY.js.map +1 -1
- package/lib/component/2d/1d-tracer/Left1DChart.d.ts.map +1 -1
- package/lib/component/2d/1d-tracer/Left1DChart.js +6 -2
- package/lib/component/2d/1d-tracer/Left1DChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/Ranges1D.d.ts +9 -0
- package/lib/component/2d/1d-tracer/Ranges1D.d.ts.map +1 -0
- package/lib/component/2d/1d-tracer/Ranges1D.js +76 -0
- package/lib/component/2d/1d-tracer/Ranges1D.js.map +1 -0
- package/lib/component/2d/1d-tracer/Signals1D.d.ts +11 -0
- package/lib/component/2d/1d-tracer/Signals1D.d.ts.map +1 -0
- package/lib/component/2d/1d-tracer/Signals1D.js +90 -0
- package/lib/component/2d/1d-tracer/Signals1D.js.map +1 -0
- package/lib/component/2d/1d-tracer/Top1DChart.d.ts.map +1 -1
- package/lib/component/2d/1d-tracer/Top1DChart.js +6 -2
- package/lib/component/2d/1d-tracer/Top1DChart.js.map +1 -1
- package/lib/component/2d/ft/FTContainer.d.ts.map +1 -1
- package/lib/component/2d/ft/FTContainer.js.map +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.js +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js.map +1 -1
- package/lib/component/AnchorSVG.d.ts +37 -0
- package/lib/component/AnchorSVG.d.ts.map +1 -0
- package/lib/component/AnchorSVG.js +137 -0
- package/lib/component/AnchorSVG.js.map +1 -0
- package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.js +4 -0
- package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
- package/lib/component/SVGTable.d.ts +5 -3
- package/lib/component/SVGTable.d.ts.map +1 -1
- package/lib/component/SVGTable.js +16 -16
- package/lib/component/SVGTable.js.map +1 -1
- package/lib/component/context/KeyModifierContext.d.ts +1 -0
- package/lib/component/context/KeyModifierContext.d.ts.map +1 -1
- package/lib/component/context/KeyModifierContext.js +4 -0
- package/lib/component/context/KeyModifierContext.js.map +1 -1
- package/lib/component/context/LoggerContext.d.ts.map +1 -1
- package/lib/component/context/LoggerContext.js.map +1 -1
- package/lib/component/context/SortSpectraContext.d.ts.map +1 -1
- package/lib/component/context/SortSpectraContext.js.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.d.ts +2 -2
- package/lib/component/elements/ActionsButtonsPopover.d.ts.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.js +6 -9
- package/lib/component/elements/ActionsButtonsPopover.js.map +1 -1
- package/lib/component/elements/Button.d.ts.map +1 -1
- package/lib/component/elements/Button.js.map +1 -1
- package/lib/component/elements/DraggableDialog.d.ts.map +1 -1
- package/lib/component/elements/DraggableDialog.js +1 -2
- package/lib/component/elements/DraggableDialog.js.map +1 -1
- package/lib/component/elements/Sections.d.ts +3 -3
- package/lib/component/elements/Sections.d.ts.map +1 -1
- package/lib/component/elements/Sections.js +1 -1
- package/lib/component/elements/Sections.js.map +1 -1
- package/lib/component/elements/TabTitle.d.ts.map +1 -1
- package/lib/component/elements/TabTitle.js +2 -2
- package/lib/component/elements/TabTitle.js.map +1 -1
- package/lib/component/elements/ToolbarPopoverItem.d.ts +1 -0
- package/lib/component/elements/ToolbarPopoverItem.d.ts.map +1 -1
- package/lib/component/elements/ToolbarPopoverItem.js +10 -3
- package/lib/component/elements/ToolbarPopoverItem.js.map +1 -1
- package/lib/component/elements/dropDownButton/DropDownButton.d.ts.map +1 -1
- package/lib/component/elements/dropDownButton/DropDownButton.js +2 -2
- package/lib/component/elements/dropDownButton/DropDownButton.js.map +1 -1
- package/lib/component/elements/export/ExportOptionsModal.d.ts +1 -1
- package/lib/component/elements/export/ExportOptionsModal.d.ts.map +1 -1
- package/lib/component/elements/export/ExportOptionsModal.js +28 -110
- package/lib/component/elements/export/ExportOptionsModal.js.map +1 -1
- package/lib/component/elements/export/units.d.ts +0 -28
- package/lib/component/elements/export/units.d.ts.map +1 -1
- package/lib/component/elements/export/units.js +0 -5
- package/lib/component/elements/export/units.js.map +1 -1
- package/lib/component/elements/export/utilities/getExportOptions.d.ts.map +1 -1
- package/lib/component/elements/export/utilities/getExportOptions.js.map +1 -1
- package/lib/component/elements/print/pageSize.d.ts +1 -1
- package/lib/component/elements/print/pageSize.d.ts.map +1 -1
- package/lib/component/header/Header.d.ts.map +1 -1
- package/lib/component/header/Header.js +2 -4
- package/lib/component/header/Header.js.map +1 -1
- package/lib/component/hooks/useExport.d.ts.map +1 -1
- package/lib/component/hooks/useExport.js.map +1 -1
- package/lib/component/hooks/usePanelPreferences.d.ts +3 -3
- package/lib/component/hooks/usePanelPreferences.d.ts.map +1 -1
- package/lib/component/hooks/useSaveSettings.d.ts.map +1 -1
- package/lib/component/hooks/useSaveSettings.js +3 -6
- package/lib/component/hooks/useSaveSettings.js.map +1 -1
- package/lib/component/hooks/useTextMetrics.d.ts.map +1 -1
- package/lib/component/hooks/useTextMetrics.js +1 -0
- package/lib/component/hooks/useTextMetrics.js.map +1 -1
- package/lib/component/main/NMRiumViewer.js +1 -1
- package/lib/component/main/NMRiumViewer.js.map +1 -1
- package/lib/component/modal/EditPeakShapeModal.js +2 -2
- package/lib/component/modal/EditPeakShapeModal.js.map +1 -1
- package/lib/component/modal/PublicationStringModal.d.ts.map +1 -1
- package/lib/component/modal/PublicationStringModal.js +2 -6
- package/lib/component/modal/PublicationStringModal.js.map +1 -1
- package/lib/component/modal/SaveAsModal.d.ts +2 -2
- package/lib/component/modal/SaveAsModal.d.ts.map +1 -1
- package/lib/component/modal/SaveAsModal.js +40 -35
- package/lib/component/modal/SaveAsModal.js.map +1 -1
- package/lib/component/modal/aboutUs/AboutUsModal.d.ts.map +1 -1
- package/lib/component/modal/aboutUs/AboutUsModal.js +2 -4
- package/lib/component/modal/aboutUs/AboutUsModal.js.map +1 -1
- package/lib/component/modal/editRange/EditRangeModal.js +4 -3
- package/lib/component/modal/editRange/EditRangeModal.js.map +1 -1
- package/lib/component/modal/editRange/forms/components/NewSignalTab.d.ts.map +1 -1
- package/lib/component/modal/editRange/forms/components/NewSignalTab.js +39 -37
- package/lib/component/modal/editRange/forms/components/NewSignalTab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +29 -29
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.js +3 -3
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts +29 -29
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings.js +9 -12
- package/lib/component/modal/setting/tanstack_general_settings/general_settings.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +29 -29
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +29 -29
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts +4 -4
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +29 -29
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.d.ts +14 -14
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts +24 -24
- 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/spectra_label_tab.js +3 -2
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts +24 -24
- 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/title_block_tab.js +3 -2
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts +24 -24
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +30 -3
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +1 -9
- package/lib/component/panels/PeaksPanel/PeaksPanel.js.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPreferences.js +18 -18
- package/lib/component/panels/PeaksPanel/PeaksPreferences.js.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.js +17 -17
- package/lib/component/panels/PeaksPanel/PeaksTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesPreferences.js +22 -22
- package/lib/component/panels/RangesPanel/RangesPreferences.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +2 -2
- package/lib/component/panels/RangesPanel/RangesTable.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.js +5 -4
- package/lib/component/panels/RangesPanel/RangesTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +2 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.js +2 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.js.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.js +5 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.js.map +1 -1
- package/lib/component/panels/SpectraPanel/base/RenderAsHTML.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/base/RenderAsHTML.js +7 -4
- package/lib/component/panels/SpectraPanel/base/RenderAsHTML.js.map +1 -1
- package/lib/component/panels/SpectraPanel/base/SpectrumName.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/base/SpectrumName.js +5 -1
- package/lib/component/panels/SpectraPanel/base/SpectrumName.js.map +1 -1
- package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.js +2 -2
- package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.js.map +1 -1
- package/lib/component/panels/SummaryPanel/SummaryPanel.d.ts.map +1 -1
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +7 -0
- package/lib/component/panels/SummaryPanel/SummaryPanel.js.map +1 -1
- package/lib/component/panels/filtersPanel/FilterPanel.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/FilterPanel.js +5 -2
- package/lib/component/panels/filtersPanel/FilterPanel.js.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js +1 -1
- package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js.map +1 -1
- package/lib/component/panels/filtersPanel/processings_sections_panel.d.ts +2 -0
- package/lib/component/panels/filtersPanel/processings_sections_panel.d.ts.map +1 -0
- package/lib/component/panels/filtersPanel/processings_sections_panel.js +144 -0
- package/lib/component/panels/filtersPanel/processings_sections_panel.js.map +1 -0
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts +3 -2
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts.map +1 -1
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.js +14 -8
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.js.map +1 -1
- package/lib/component/panels/informationPanel/MixedValuesBadge.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/MixedValuesBadge.js +2 -2
- package/lib/component/panels/informationPanel/MixedValuesBadge.js.map +1 -1
- package/lib/component/panels/informationPanel/SpectraPicker.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/SpectraPicker.js +2 -2
- package/lib/component/panels/informationPanel/SpectraPicker.js.map +1 -1
- package/lib/component/reducer/Reducer.d.ts.map +1 -1
- package/lib/component/reducer/Reducer.js +2 -0
- package/lib/component/reducer/Reducer.js.map +1 -1
- package/lib/component/reducer/actions/CorrelationsActions.js +1 -1
- package/lib/component/reducer/actions/CorrelationsActions.js.map +1 -1
- package/lib/component/reducer/actions/DomainActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/DomainActions.js.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
- package/lib/component/reducer/actions/LoadAction.d.ts.map +1 -1
- package/lib/component/reducer/actions/LoadAction.js.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts +9 -0
- package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/RangesActions.d.ts +11 -2
- package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/RangesActions.js +23 -5
- 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 +5 -17
- package/lib/component/reducer/actions/ToolsActions.js.map +1 -1
- package/lib/component/reducer/helper/getTraceSpectrumID.d.ts +5 -0
- package/lib/component/reducer/helper/getTraceSpectrumID.d.ts.map +1 -0
- package/lib/component/reducer/helper/getTraceSpectrumID.js +14 -0
- package/lib/component/reducer/helper/getTraceSpectrumID.js.map +1 -0
- package/lib/component/reducer/helper/setRangesViewProperty.d.ts.map +1 -1
- package/lib/component/reducer/helper/setRangesViewProperty.js.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +35 -26
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js.map +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +2 -2
- package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
- package/lib/component/reducer/preferences/utilities/initWorkspace.d.ts +2 -2
- package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts +2 -2
- package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts.map +1 -1
- package/lib/component/toolbar/ToolTypes.d.ts +2 -2
- package/lib/component/toolbar/nmr_toolbar.d.ts.map +1 -1
- package/lib/component/toolbar/nmr_toolbar.js +3 -1
- package/lib/component/toolbar/nmr_toolbar.js.map +1 -1
- package/lib/component/utility/CoreSlot.d.ts +27 -0
- package/lib/component/utility/CoreSlot.d.ts.map +1 -0
- package/lib/component/utility/CoreSlot.js +56 -0
- package/lib/component/utility/CoreSlot.js.map +1 -0
- package/lib/component/utility/export.d.ts.map +1 -1
- package/lib/component/utility/export.js +1 -0
- package/lib/component/utility/export.js.map +1 -1
- package/lib/data/PredictionManager.js.map +1 -1
- package/lib/data/constants/signalsKinds.d.ts +1 -2
- package/lib/data/constants/signalsKinds.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -0
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +35 -30
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.js +1 -0
- package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.js.map +1 -1
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +2 -2
- package/lib/data/matrixGeneration.d.ts.map +1 -1
- package/lib/data/matrixGeneration.js.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/package.json +37 -37
- package/src/component/1d/PredictionErrorsNotations.tsx +5 -4
- package/src/component/1d/peaks/Peaks.tsx +5 -2
- package/src/component/1d/peaks/usePeakShapesPath.ts +0 -1
- package/src/component/1d/ranges/AssignmentLabel.tsx +1 -1
- package/src/component/1d/ranges/FloatingRangeTablePreferencesModal.tsx +238 -0
- package/src/component/1d/ranges/FloatingRanges.tsx +529 -0
- package/src/component/1d/ranges/Ranges.tsx +2 -2
- package/src/component/1d-2d/FieldEdition.tsx +4 -4
- package/src/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.tsx +8 -8
- package/src/component/1d-2d/tools/BrushXY.tsx +8 -8
- package/src/component/2d/1d-tracer/Left1DChart.tsx +24 -1
- package/src/component/2d/1d-tracer/Ranges1D.tsx +134 -0
- package/src/component/2d/1d-tracer/Signals1D.tsx +145 -0
- package/src/component/2d/1d-tracer/Top1DChart.tsx +29 -2
- package/src/component/2d/ft/FTContainer.tsx +1 -0
- package/src/component/2d/zones/SignalsGuideLines.tsx +1 -1
- package/src/component/2d/zones/ZonesAssignmentsLabels.tsx +1 -1
- package/src/component/AnchorSVG.tsx +370 -0
- package/src/component/EventsTrackers/BrushTracker.tsx +7 -2
- package/src/component/SVGTable.tsx +35 -33
- package/src/component/context/KeyModifierContext.tsx +6 -2
- package/src/component/context/LoggerContext.tsx +1 -7
- package/src/component/context/SortSpectraContext.tsx +1 -3
- package/src/component/elements/ActionsButtonsPopover.tsx +12 -14
- package/src/component/elements/Button.tsx +1 -6
- package/src/component/elements/DraggableDialog.tsx +1 -2
- package/src/component/elements/Sections.tsx +9 -7
- package/src/component/elements/TabTitle.tsx +7 -5
- package/src/component/elements/ToolbarPopoverItem.tsx +13 -2
- package/src/component/elements/dropDownButton/DropDownButton.tsx +7 -5
- package/src/component/elements/export/ExportOptionsModal.tsx +51 -280
- package/src/component/elements/export/units.ts +0 -6
- package/src/component/elements/export/utilities/getExportOptions.ts +1 -0
- package/src/component/elements/print/pageSize.ts +1 -1
- package/src/component/header/Header.tsx +2 -4
- package/src/component/hooks/useExport.tsx +1 -3
- package/src/component/hooks/usePanelPreferences.ts +4 -4
- package/src/component/hooks/useSaveSettings.tsx +4 -15
- package/src/component/hooks/useTextMetrics.ts +1 -0
- package/src/component/main/NMRiumViewer.tsx +1 -1
- package/src/component/modal/EditPeakShapeModal.tsx +2 -2
- package/src/component/modal/PublicationStringModal.tsx +5 -11
- package/src/component/modal/SaveAsModal.tsx +80 -82
- package/src/component/modal/aboutUs/AboutUsModal.tsx +5 -4
- package/src/component/modal/editRange/EditRangeModal.tsx +6 -4
- package/src/component/modal/editRange/forms/components/NewSignalTab.tsx +58 -58
- package/src/component/modal/setting/WorkspaceItem.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/errors/context.tsx +3 -3
- package/src/component/modal/setting/tanstack_general_settings/errors/renderer.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/general_settings.tsx +23 -29
- package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.tsx +3 -2
- package/src/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.tsx +3 -2
- package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +41 -8
- package/src/component/panels/PeaksPanel/PeaksPanel.tsx +1 -8
- package/src/component/panels/PeaksPanel/PeaksPreferences.tsx +18 -18
- package/src/component/panels/PeaksPanel/PeaksTable.tsx +19 -17
- package/src/component/panels/RangesPanel/RangesHeader.tsx +1 -2
- package/src/component/panels/RangesPanel/RangesPanel.tsx +2 -2
- package/src/component/panels/RangesPanel/RangesPreferences.tsx +22 -22
- package/src/component/panels/RangesPanel/RangesTable.tsx +19 -17
- package/src/component/panels/RangesPanel/RangesTableRow.tsx +25 -25
- package/src/component/panels/SpectraPanel/SpectraTable.tsx +12 -1
- package/src/component/panels/SpectraPanel/base/RenderAsHTML.tsx +22 -4
- package/src/component/panels/SpectraPanel/base/SpectrumName.tsx +15 -6
- package/src/component/panels/SpectraPanel/base/setting/SpectrumSetting.tsx +3 -2
- package/src/component/panels/SummaryPanel/SummaryPanel.tsx +14 -16
- package/src/component/panels/filtersPanel/FilterPanel.tsx +10 -0
- package/src/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.tsx +1 -0
- package/src/component/panels/filtersPanel/processings_sections_panel.tsx +324 -0
- package/src/component/panels/hooks/useMoleculeAnnotationCore.ts +17 -9
- package/src/component/panels/informationPanel/MixedValuesBadge.tsx +3 -2
- package/src/component/panels/informationPanel/SpectraPicker.tsx +12 -4
- package/src/component/panels/multipleAnalysisPanel/AnalysisChart.tsx +2 -2
- package/src/component/reducer/Reducer.ts +2 -0
- package/src/component/reducer/actions/CorrelationsActions.ts +1 -1
- package/src/component/reducer/actions/DomainActions.ts +1 -4
- package/src/component/reducer/actions/FiltersActions.ts +1 -2
- package/src/component/reducer/actions/LoadAction.ts +1 -3
- package/src/component/reducer/actions/RangesActions.ts +39 -5
- package/src/component/reducer/actions/ToolsActions.ts +5 -21
- package/src/component/reducer/helper/getTraceSpectrumID.tsx +25 -0
- package/src/component/reducer/helper/setRangesViewProperty.ts +1 -2
- package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +32 -19
- package/src/component/reducer/preferences/preferencesReducer.ts +2 -2
- package/src/component/reducer/preferences/utilities/initWorkspace.ts +2 -2
- package/src/component/reducer/preferences/utilities/mapWorkspaces.ts +2 -2
- package/src/component/toolbar/ToolTypes.ts +2 -2
- package/src/component/toolbar/nmr_toolbar.tsx +3 -2
- package/src/component/utility/CoreSlot.tsx +126 -0
- package/src/component/utility/export.ts +1 -0
- package/src/data/PredictionManager.ts +4 -6
- package/src/data/constants/signalsKinds.ts +1 -1
- package/src/data/data1d/Spectrum1D/peaks/autoPeakPicking.ts +1 -0
- package/src/data/data1d/Spectrum1D/peaks/optimizePeaks.ts +35 -30
- package/src/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.ts +1 -0
- package/src/data/data1d/multipleSpectraAnalysis.ts +2 -2
- package/src/data/matrixGeneration.ts +1 -5
- package/src/versionInfo.ts +1 -1
- package/lib/component/1d/FloatingRanges.d.ts.map +0 -1
- package/lib/component/1d/FloatingRanges.js +0 -263
- package/lib/component/1d/FloatingRanges.js.map +0 -1
- package/lib/component/elements/export/utilities/exportOptionValidationSchema.d.ts +0 -17
- package/lib/component/elements/export/utilities/exportOptionValidationSchema.d.ts.map +0 -1
- package/lib/component/elements/export/utilities/exportOptionValidationSchema.js +0 -79
- package/lib/component/elements/export/utilities/exportOptionValidationSchema.js.map +0 -1
- package/lib/component/elements/export/utilities/getModes.d.ts +0 -4
- package/lib/component/elements/export/utilities/getModes.d.ts.map +0 -1
- package/lib/component/elements/export/utilities/getModes.js +0 -11
- package/lib/component/elements/export/utilities/getModes.js.map +0 -1
- package/lib/component/utility/renderCoreSlot.d.ts +0 -11
- package/lib/component/utility/renderCoreSlot.d.ts.map +0 -1
- package/lib/component/utility/renderCoreSlot.js +0 -13
- package/lib/component/utility/renderCoreSlot.js.map +0 -1
- package/src/component/1d/FloatingRanges.tsx +0 -378
- package/src/component/elements/export/utilities/exportOptionValidationSchema.ts +0 -106
- package/src/component/elements/export/utilities/getModes.ts +0 -14
- package/src/component/utility/renderCoreSlot.tsx +0 -21
- /package/lib/component/1d/{FloatingRanges.d.ts → ranges/FloatingRanges.d.ts} +0 -0
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import { Classes, Switch } from '@blueprintjs/core';
|
|
2
|
+
import styled from '@emotion/styled';
|
|
3
|
+
import type {
|
|
4
|
+
ProcessingOperatorId,
|
|
5
|
+
Spectrum,
|
|
6
|
+
SpectrumProcessingOperation,
|
|
7
|
+
} from '@zakodium/nmrium-core';
|
|
8
|
+
import { cast } from '@zakodium/utils';
|
|
9
|
+
import type { Filter1D, Filter2D } from 'nmr-processing';
|
|
10
|
+
import type { Dispatch, SetStateAction } from 'react';
|
|
11
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
12
|
+
import { ObjectInspector } from 'react-inspector';
|
|
13
|
+
import { Button } from 'react-science/ui';
|
|
14
|
+
|
|
15
|
+
import { useChartData } from '../../context/ChartContext.tsx';
|
|
16
|
+
import { useCore } from '../../context/CoreContext.tsx';
|
|
17
|
+
import type { AlertButton } from '../../elements/Alert.tsx';
|
|
18
|
+
import { useAlert } from '../../elements/Alert.tsx';
|
|
19
|
+
import { EmptyText } from '../../elements/EmptyText.tsx';
|
|
20
|
+
import { Sections } from '../../elements/Sections.tsx';
|
|
21
|
+
import useSpectrum from '../../hooks/useSpectrum.ts';
|
|
22
|
+
import type { Tool } from '../../toolbar/ToolTypes.ts';
|
|
23
|
+
import {
|
|
24
|
+
CoreOperatorExpanded,
|
|
25
|
+
CoreOperatorName,
|
|
26
|
+
} from '../../utility/CoreSlot.tsx';
|
|
27
|
+
import DefaultPanelHeader from '../header/DefaultPanelHeader.tsx';
|
|
28
|
+
|
|
29
|
+
const mapToolsToProcessing: Partial<Record<Tool, ProcessingOperatorId>> = {
|
|
30
|
+
apodization: '@zakodium/nmrium-core-plugins#apodization1D',
|
|
31
|
+
zeroFilling: '@zakodium/nmrium-core-plugins#zeroFilling1D',
|
|
32
|
+
fft: '@zakodium/nmrium-core-plugins#fft1D',
|
|
33
|
+
phaseCorrection: '@zakodium/nmrium-core-plugins#phaseCorrection1D',
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
type FilterName = Filter1D['name'] | Filter2D['name'];
|
|
37
|
+
const mapFiltersToProcessings: Partial<
|
|
38
|
+
Record<FilterName, ProcessingOperatorId>
|
|
39
|
+
> = {
|
|
40
|
+
apodization: '@zakodium/nmrium-core-plugins#apodization1D',
|
|
41
|
+
digitalFilter: '@zakodium/nmrium-core-plugins#digitalFilter1D',
|
|
42
|
+
fft: '@zakodium/nmrium-core-plugins#fft1D',
|
|
43
|
+
phaseCorrection: '@zakodium/nmrium-core-plugins#phaseCorrection1D',
|
|
44
|
+
shiftX: '@zakodium/nmrium-core-plugins#shiftX1D',
|
|
45
|
+
zeroFilling: '@zakodium/nmrium-core-plugins#zeroFilling1D',
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const unremoveableProcessings = new Set<ProcessingOperatorId>([
|
|
49
|
+
'@zakodium/nmrium-core-plugins#digitalFilter1D',
|
|
50
|
+
'@zakodium/nmrium-core-plugins#digitalFilter2D',
|
|
51
|
+
]);
|
|
52
|
+
|
|
53
|
+
export function ProcessingsSectionsPanel() {
|
|
54
|
+
const core = useCore();
|
|
55
|
+
const { showAlert } = useAlert();
|
|
56
|
+
const spectrum: Spectrum | undefined = useSpectrum();
|
|
57
|
+
const { toolOptions } = useChartData();
|
|
58
|
+
|
|
59
|
+
cast<FilterName>(toolOptions.data.activeFilterID);
|
|
60
|
+
const selectedToolProcessing = mapToolsToProcessing[toolOptions.selectedTool];
|
|
61
|
+
const activeProcessing =
|
|
62
|
+
mapFiltersToProcessings[toolOptions.data.activeFilterID];
|
|
63
|
+
const [openedOperation, setOpenedOperation] = useState<string>();
|
|
64
|
+
|
|
65
|
+
const [processings, setProcessings] = useState(
|
|
66
|
+
() => spectrum?.processings ?? [],
|
|
67
|
+
);
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
setProcessings(spectrum?.processings ?? []);
|
|
70
|
+
}, [spectrum?.processings]);
|
|
71
|
+
|
|
72
|
+
const selectedProcessing = useMemo<{
|
|
73
|
+
operatorId?: ProcessingOperatorId;
|
|
74
|
+
operationId?: string;
|
|
75
|
+
}>(() => {
|
|
76
|
+
if (selectedToolProcessing) return { operatorId: selectedToolProcessing };
|
|
77
|
+
if (
|
|
78
|
+
activeProcessing &&
|
|
79
|
+
spectrum?.processings?.some((p) => p.operatorId === activeProcessing)
|
|
80
|
+
) {
|
|
81
|
+
return { operatorId: activeProcessing };
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return { operationId: openedOperation };
|
|
85
|
+
}, [
|
|
86
|
+
activeProcessing,
|
|
87
|
+
openedOperation,
|
|
88
|
+
selectedToolProcessing,
|
|
89
|
+
spectrum?.processings,
|
|
90
|
+
]);
|
|
91
|
+
|
|
92
|
+
function handleDeleteFilter() {
|
|
93
|
+
const buttons: AlertButton[] = [
|
|
94
|
+
{
|
|
95
|
+
text: 'Yes',
|
|
96
|
+
intent: 'danger',
|
|
97
|
+
onClick: () => setProcessings([]),
|
|
98
|
+
},
|
|
99
|
+
{ text: 'No' },
|
|
100
|
+
];
|
|
101
|
+
|
|
102
|
+
showAlert({
|
|
103
|
+
message:
|
|
104
|
+
'You are about to delete all processing steps, Are you sure?. Experimental, not implemented yet',
|
|
105
|
+
buttons,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function toggleSection(operationId: string) {
|
|
110
|
+
setOpenedOperation(
|
|
111
|
+
openedOperation === operationId ? undefined : operationId,
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function onReorder(sourceIndex: number, targetIndex: number) {
|
|
116
|
+
const newProcessings = [...processings];
|
|
117
|
+
[newProcessings[sourceIndex], newProcessings[targetIndex]] = [
|
|
118
|
+
newProcessings[targetIndex],
|
|
119
|
+
newProcessings[sourceIndex],
|
|
120
|
+
];
|
|
121
|
+
setProcessings(newProcessings);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (!spectrum) return null;
|
|
125
|
+
|
|
126
|
+
return (
|
|
127
|
+
<>
|
|
128
|
+
<DefaultPanelHeader
|
|
129
|
+
deleteTooltip="Delete all filters"
|
|
130
|
+
onDelete={handleDeleteFilter}
|
|
131
|
+
total={processings?.length}
|
|
132
|
+
hideCounter
|
|
133
|
+
/>
|
|
134
|
+
|
|
135
|
+
{processings.length === 0 && <EmptyText text="No Processings" />}
|
|
136
|
+
{processings.length > 0 && (
|
|
137
|
+
<Sections isOverflow renderActiveSectionContentOnly>
|
|
138
|
+
{processings?.map((operation, index) => {
|
|
139
|
+
const operatorUI = core.slotOperator(operation.operatorId);
|
|
140
|
+
const isOpen =
|
|
141
|
+
selectedProcessing.operatorId === operation.operatorId ||
|
|
142
|
+
selectedProcessing.operationId === operation.uid;
|
|
143
|
+
const isEditable = operatorUI?.isEditable;
|
|
144
|
+
|
|
145
|
+
return (
|
|
146
|
+
<Sections.Item
|
|
147
|
+
key={operation.uid}
|
|
148
|
+
id={operation.uid}
|
|
149
|
+
title={
|
|
150
|
+
<CoreOperatorName
|
|
151
|
+
id={operation.operatorId}
|
|
152
|
+
fallback={operation.operatorId.split('#', 2).at(-1)}
|
|
153
|
+
/>
|
|
154
|
+
}
|
|
155
|
+
isOpen={isOpen}
|
|
156
|
+
index={index}
|
|
157
|
+
serial={index + 1}
|
|
158
|
+
sticky
|
|
159
|
+
onReorder={onReorder}
|
|
160
|
+
onClick={() => toggleSection(operation.uid)}
|
|
161
|
+
rightElement={
|
|
162
|
+
<ProcessingItemExtra
|
|
163
|
+
isOpen={isOpen}
|
|
164
|
+
isEditable={isEditable}
|
|
165
|
+
setOpenedOperation={setOpenedOperation}
|
|
166
|
+
setProcessings={setProcessings}
|
|
167
|
+
operation={operation}
|
|
168
|
+
/>
|
|
169
|
+
}
|
|
170
|
+
>
|
|
171
|
+
<Sections.Body style={{ paddingBottom: '120px' }}>
|
|
172
|
+
<CoreOperatorExpanded
|
|
173
|
+
id={operation.operatorId}
|
|
174
|
+
fallback={<OperationFallback operation={operation} />}
|
|
175
|
+
operation={operation}
|
|
176
|
+
core={core}
|
|
177
|
+
onChange={(operation) => {
|
|
178
|
+
const newProcessings = processings.map((p) =>
|
|
179
|
+
p.uid === operation.uid
|
|
180
|
+
? { ...operation, options: undefined }
|
|
181
|
+
: p,
|
|
182
|
+
);
|
|
183
|
+
setProcessings(newProcessings);
|
|
184
|
+
setOpenedOperation(undefined);
|
|
185
|
+
}}
|
|
186
|
+
>
|
|
187
|
+
{(children) => (
|
|
188
|
+
<LiveEditBanner>
|
|
189
|
+
<Switch
|
|
190
|
+
label="Live preview"
|
|
191
|
+
innerLabelChecked="On"
|
|
192
|
+
innerLabel="Off"
|
|
193
|
+
checked
|
|
194
|
+
/>
|
|
195
|
+
<Switch
|
|
196
|
+
label="Processed"
|
|
197
|
+
innerLabelChecked="On"
|
|
198
|
+
innerLabel="Off"
|
|
199
|
+
checked
|
|
200
|
+
/>
|
|
201
|
+
<Spacer />
|
|
202
|
+
{children}
|
|
203
|
+
<Button
|
|
204
|
+
variant="minimal"
|
|
205
|
+
intent="danger"
|
|
206
|
+
onClick={() => setOpenedOperation(undefined)}
|
|
207
|
+
size="small"
|
|
208
|
+
>
|
|
209
|
+
Cancel
|
|
210
|
+
</Button>
|
|
211
|
+
</LiveEditBanner>
|
|
212
|
+
)}
|
|
213
|
+
</CoreOperatorExpanded>
|
|
214
|
+
</Sections.Body>
|
|
215
|
+
</Sections.Item>
|
|
216
|
+
);
|
|
217
|
+
})}
|
|
218
|
+
</Sections>
|
|
219
|
+
)}
|
|
220
|
+
</>
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
interface ProcessingItemExtraProps {
|
|
225
|
+
operation: SpectrumProcessingOperation<unknown, unknown>;
|
|
226
|
+
isOpen: boolean;
|
|
227
|
+
isEditable: boolean | undefined;
|
|
228
|
+
setOpenedOperation: Dispatch<SetStateAction<string | undefined>>;
|
|
229
|
+
setProcessings: Dispatch<
|
|
230
|
+
SetStateAction<Array<SpectrumProcessingOperation<unknown, unknown>>>
|
|
231
|
+
>;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
function ProcessingItemExtra(props: ProcessingItemExtraProps) {
|
|
235
|
+
const { operation, isOpen, isEditable, setOpenedOperation, setProcessings } =
|
|
236
|
+
props;
|
|
237
|
+
|
|
238
|
+
return (
|
|
239
|
+
<CompactControls>
|
|
240
|
+
{isEditable && (
|
|
241
|
+
<Button
|
|
242
|
+
intent="success"
|
|
243
|
+
tooltipProps={{ content: 'Edit filter' }}
|
|
244
|
+
variant="minimal"
|
|
245
|
+
onClick={() => setOpenedOperation(operation.uid)}
|
|
246
|
+
icon="annotation"
|
|
247
|
+
disabled={isOpen}
|
|
248
|
+
/>
|
|
249
|
+
)}
|
|
250
|
+
|
|
251
|
+
<Button
|
|
252
|
+
intent="danger"
|
|
253
|
+
tooltipProps={{ content: 'Delete filter' }}
|
|
254
|
+
variant="minimal"
|
|
255
|
+
onClick={() =>
|
|
256
|
+
setProcessings((processings) =>
|
|
257
|
+
processings.filter((p) => p.uid !== operation.uid),
|
|
258
|
+
)
|
|
259
|
+
}
|
|
260
|
+
disabled={unremoveableProcessings.has(operation.operatorId)}
|
|
261
|
+
icon="trash"
|
|
262
|
+
/>
|
|
263
|
+
|
|
264
|
+
<Switch
|
|
265
|
+
innerLabelChecked="On"
|
|
266
|
+
innerLabel="Off"
|
|
267
|
+
checked={operation.enabled || false}
|
|
268
|
+
onChange={() => {
|
|
269
|
+
setProcessings((processings) =>
|
|
270
|
+
processings.map((p) =>
|
|
271
|
+
p.uid === operation.uid
|
|
272
|
+
? { ...operation, enabled: !operation.enabled }
|
|
273
|
+
: p,
|
|
274
|
+
),
|
|
275
|
+
);
|
|
276
|
+
}}
|
|
277
|
+
/>
|
|
278
|
+
</CompactControls>
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
interface OperationFallbackProps {
|
|
283
|
+
operation: SpectrumProcessingOperation<unknown, unknown>;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
function OperationFallback(props: OperationFallbackProps) {
|
|
287
|
+
const { operation } = props;
|
|
288
|
+
const { settings, options } = operation;
|
|
289
|
+
|
|
290
|
+
if (settings === null) {
|
|
291
|
+
return <EmptyText text=" No options available" />;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
return <ObjectInspector data={{ settings, options }} />;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
const CompactControls = styled.div`
|
|
298
|
+
display: flex;
|
|
299
|
+
align-items: center;
|
|
300
|
+
|
|
301
|
+
.${Classes.CONTROL} {
|
|
302
|
+
margin-bottom: 0;
|
|
303
|
+
}
|
|
304
|
+
`;
|
|
305
|
+
|
|
306
|
+
const LiveEditBanner = styled.div`
|
|
307
|
+
background-color: white;
|
|
308
|
+
box-shadow: rgb(0 0 0 / 16%) 0 1px 4px;
|
|
309
|
+
margin-left: -10px;
|
|
310
|
+
margin-right: -10px;
|
|
311
|
+
transform: translateY(-10px);
|
|
312
|
+
padding: 5px;
|
|
313
|
+
display: flex;
|
|
314
|
+
align-items: center;
|
|
315
|
+
gap: 5px;
|
|
316
|
+
|
|
317
|
+
.${Classes.CONTROL} {
|
|
318
|
+
margin-bottom: 0;
|
|
319
|
+
}
|
|
320
|
+
`;
|
|
321
|
+
|
|
322
|
+
const Spacer = styled.span`
|
|
323
|
+
flex: 1;
|
|
324
|
+
`;
|
|
@@ -9,19 +9,26 @@ export function useMoleculeAnnotationCore(
|
|
|
9
9
|
moleculeView: MoleculeView,
|
|
10
10
|
) {
|
|
11
11
|
const dispatch = useDispatch();
|
|
12
|
-
const { atomAnnotation:
|
|
13
|
-
function
|
|
14
|
-
return
|
|
12
|
+
const { atomAnnotation: activeAnnotation } = moleculeView || {};
|
|
13
|
+
function isActiveAnnotation(annotation: Annotation) {
|
|
14
|
+
return activeAnnotation === annotation;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
function setAtomAnnotation(annotation: Annotation) {
|
|
18
|
+
if (activeAnnotation === annotation) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
|
|
20
22
|
dispatch({
|
|
21
23
|
type: 'CHANGE_MOLECULE_ANNOTATION',
|
|
22
|
-
payload: { id, atomAnnotation },
|
|
24
|
+
payload: { id, atomAnnotation: annotation },
|
|
23
25
|
});
|
|
24
26
|
}
|
|
27
|
+
|
|
28
|
+
function toggleAtomAnnotation(annotation: Annotation) {
|
|
29
|
+
setAtomAnnotation(activeAnnotation === annotation ? 'none' : annotation);
|
|
30
|
+
}
|
|
31
|
+
|
|
25
32
|
function handleToggleMoleculeLabel() {
|
|
26
33
|
dispatch({
|
|
27
34
|
type: 'TOGGLE_MOLECULE_LABEL',
|
|
@@ -30,7 +37,8 @@ export function useMoleculeAnnotationCore(
|
|
|
30
37
|
}
|
|
31
38
|
return {
|
|
32
39
|
handleToggleMoleculeLabel,
|
|
33
|
-
|
|
34
|
-
|
|
40
|
+
isActiveAnnotation,
|
|
41
|
+
setAtomAnnotation,
|
|
42
|
+
toggleAtomAnnotation,
|
|
35
43
|
};
|
|
36
44
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Icon,
|
|
1
|
+
import { Icon, PopoverNext } from '@blueprintjs/core';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
|
|
4
4
|
const MixedBadge = styled.div`
|
|
@@ -52,7 +52,8 @@ export function MixedValuesBadge({ values }: MixedValuesBadgeProps) {
|
|
|
52
52
|
if (!values) return null;
|
|
53
53
|
|
|
54
54
|
return (
|
|
55
|
-
<
|
|
55
|
+
<PopoverNext
|
|
56
|
+
lazy
|
|
56
57
|
placement="bottom"
|
|
57
58
|
interactionKind="hover"
|
|
58
59
|
renderTarget={({ ref, ...targetProps }) => (
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Button,
|
|
3
|
+
Checkbox,
|
|
4
|
+
Icon,
|
|
5
|
+
InputGroup,
|
|
6
|
+
PopoverNext,
|
|
7
|
+
} from '@blueprintjs/core';
|
|
2
8
|
import styled from '@emotion/styled';
|
|
3
9
|
import { useState } from 'react';
|
|
4
10
|
|
|
@@ -232,11 +238,13 @@ export function SpectraPicker({
|
|
|
232
238
|
: `${selectedTotal} / ${total}`;
|
|
233
239
|
|
|
234
240
|
return (
|
|
235
|
-
<
|
|
241
|
+
<PopoverNext
|
|
242
|
+
lazy
|
|
236
243
|
isOpen={disabled ? false : open}
|
|
237
244
|
onInteraction={setOpen}
|
|
238
245
|
placement="bottom-start"
|
|
239
|
-
|
|
246
|
+
arrow={false}
|
|
247
|
+
animation="minimal"
|
|
240
248
|
content={
|
|
241
249
|
<SpectraPickerContent
|
|
242
250
|
selected={selected}
|
|
@@ -255,6 +263,6 @@ export function SpectraPicker({
|
|
|
255
263
|
</span>
|
|
256
264
|
<Icon icon="caret-down" size={12} />
|
|
257
265
|
</SpectraTrigger>
|
|
258
|
-
</
|
|
266
|
+
</PopoverNext>
|
|
259
267
|
);
|
|
260
268
|
}
|
|
@@ -3,7 +3,7 @@ import { css } from '@emotion/react';
|
|
|
3
3
|
import type {
|
|
4
4
|
JpathTableColumn,
|
|
5
5
|
Spectrum,
|
|
6
|
-
|
|
6
|
+
WorkspacePanelPreferences,
|
|
7
7
|
} from '@zakodium/nmrium-core';
|
|
8
8
|
import dlv from 'dlv';
|
|
9
9
|
import type { ChangeEvent } from 'react';
|
|
@@ -82,7 +82,7 @@ function getPlotDataAsString(
|
|
|
82
82
|
options: {
|
|
83
83
|
plotOptions: PlotOptions;
|
|
84
84
|
spectra: Spectrum[];
|
|
85
|
-
spectraPanelPreferences:
|
|
85
|
+
spectraPanelPreferences: WorkspacePanelPreferences['spectra'];
|
|
86
86
|
},
|
|
87
87
|
) {
|
|
88
88
|
const { plotOptions, spectra, spectraPanelPreferences } = options;
|
|
@@ -741,6 +741,8 @@ function innerSpectrumReducer(draft: Draft<State>, action: Action) {
|
|
|
741
741
|
draft,
|
|
742
742
|
action,
|
|
743
743
|
);
|
|
744
|
+
case 'CHANGE_SIGNAL_DELTA':
|
|
745
|
+
return RangesActions.handleChangeSignalDelta(draft, action);
|
|
744
746
|
|
|
745
747
|
case 'SET_KEY_PREFERENCES':
|
|
746
748
|
return PreferencesActions.handleSetKeyPreferences(draft, action);
|
|
@@ -58,7 +58,7 @@ export type CorrelationsActions =
|
|
|
58
58
|
| DeleteCorrelationAction;
|
|
59
59
|
|
|
60
60
|
function handleUpdateCorrelations(draft: Draft<State>) {
|
|
61
|
-
const { data: spectra, correlations } = draft;
|
|
61
|
+
const { data: spectra, correlations } = original(draft);
|
|
62
62
|
draft.correlations = buildCorrelationData(spectra as Spectrum, {
|
|
63
63
|
...correlations.options,
|
|
64
64
|
values: lodashCloneDeep(correlations.values),
|
|
@@ -60,10 +60,7 @@ function is2DFTSpectrum(
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
export type DomainActions =
|
|
63
|
-
|
|
|
64
|
-
| SetYDomainAction
|
|
65
|
-
| SetAxisDomainAction
|
|
66
|
-
| MoveAction;
|
|
63
|
+
SetXDomainAction | SetYDomainAction | SetAxisDomainAction | MoveAction;
|
|
67
64
|
|
|
68
65
|
function getActiveData(draft: Draft<State>): Spectrum1D[] {
|
|
69
66
|
let data = draft.data.filter(
|
|
@@ -1704,8 +1704,7 @@ function deleteFilter(datum: Spectrum, id?: string) {
|
|
|
1704
1704
|
} else {
|
|
1705
1705
|
removedFilter = datum.filters.find((filter) => filter.id === id);
|
|
1706
1706
|
datum.filters = filters.filter((filter) => filter.id !== id) as
|
|
1707
|
-
|
|
|
1708
|
-
| Filter2DEntry[];
|
|
1707
|
+
Filter1DEntry[] | Filter2DEntry[];
|
|
1709
1708
|
}
|
|
1710
1709
|
|
|
1711
1710
|
// do not reprocess the filters when the deleted filter is inactive
|
|
@@ -55,9 +55,7 @@ type LoadDropFilesAction = ActionType<'LOAD_DROP_FILES', InputProps>;
|
|
|
55
55
|
type InitiateAction = ActionType<'INITIATE', InitiateProps>;
|
|
56
56
|
|
|
57
57
|
export type LoadAction =
|
|
58
|
-
|
|
|
59
|
-
| LoadDropFilesAction
|
|
60
|
-
| InitiateAction;
|
|
58
|
+
SetIsLoadingAction | LoadDropFilesAction | InitiateAction;
|
|
61
59
|
|
|
62
60
|
function convertHybridizationStringValuesInCorrelations(
|
|
63
61
|
correlations: CorrelationData,
|
|
@@ -122,6 +122,7 @@ type ChangeRangeSumAction = ActionType<
|
|
|
122
122
|
type AddRangeAction = ActionType<
|
|
123
123
|
'ADD_RANGE',
|
|
124
124
|
{
|
|
125
|
+
spectrumId?: string;
|
|
125
126
|
range: Range;
|
|
126
127
|
}
|
|
127
128
|
>;
|
|
@@ -133,7 +134,14 @@ type ChangeRangeSignalValueAction = ActionType<
|
|
|
133
134
|
'CHANGE_RANGE_SIGNAL_VALUE',
|
|
134
135
|
{ rangeId: string; signalId: string; value: number }
|
|
135
136
|
>;
|
|
136
|
-
type
|
|
137
|
+
type ChangeSignalDeltaAction = ActionType<
|
|
138
|
+
'CHANGE_SIGNAL_DELTA',
|
|
139
|
+
{ spectrumId: string; rangeId: string; signalId: string; value: number }
|
|
140
|
+
>;
|
|
141
|
+
type UpdateRangAction = ActionType<
|
|
142
|
+
'UPDATE_RANGE',
|
|
143
|
+
{ range: Range; spectrumId?: string }
|
|
144
|
+
>;
|
|
137
145
|
type CutRangAction = ActionType<
|
|
138
146
|
'CUT_RANGE',
|
|
139
147
|
{ ranges: Record<string, Range[]> }
|
|
@@ -189,6 +197,7 @@ export type RangesActions =
|
|
|
189
197
|
| Change1DSignalAssignmentLabelAction
|
|
190
198
|
| ChangeRangesViewFloatingBoxBoundingAction
|
|
191
199
|
| ChangeRangesAssignmentsLabelsByDiaIdsAction
|
|
200
|
+
| ChangeSignalDeltaAction
|
|
192
201
|
| ActionType<
|
|
193
202
|
| 'AUTO_RANGES_SPECTRA_PICKING'
|
|
194
203
|
| 'CHANGE_RANGES_SUM_FLAG'
|
|
@@ -234,6 +243,7 @@ function handleAutoRangesDetection(
|
|
|
234
243
|
broadWidth: 0.05,
|
|
235
244
|
thresholdFactor: 8,
|
|
236
245
|
minMaxRatio,
|
|
246
|
+
maxAbsoluteRatio: minMaxRatio,
|
|
237
247
|
direction: lookNegative ? 'both' : 'positive',
|
|
238
248
|
},
|
|
239
249
|
};
|
|
@@ -321,6 +331,29 @@ function handleChangeRangeSignalKind(
|
|
|
321
331
|
handleUpdateCorrelations(draft);
|
|
322
332
|
}
|
|
323
333
|
}
|
|
334
|
+
//action
|
|
335
|
+
function handleChangeSignalDelta(
|
|
336
|
+
draft: Draft<State>,
|
|
337
|
+
action: ChangeSignalDeltaAction,
|
|
338
|
+
) {
|
|
339
|
+
const { spectrumId, rangeId, signalId, value } = action.payload;
|
|
340
|
+
|
|
341
|
+
const spectrum = getSpectrum(draft, spectrumId);
|
|
342
|
+
if (!isSpectrum1D(spectrum)) return;
|
|
343
|
+
|
|
344
|
+
const rangeIndex = getRangeIndex(spectrum, rangeId);
|
|
345
|
+
const range = spectrum.ranges.values[rangeIndex];
|
|
346
|
+
if (range.signals) {
|
|
347
|
+
const signalIndex = range.signals.findIndex(
|
|
348
|
+
(_signal) => _signal.id === signalId,
|
|
349
|
+
);
|
|
350
|
+
if (signalIndex !== -1) {
|
|
351
|
+
range.signals[signalIndex].delta = value;
|
|
352
|
+
}
|
|
353
|
+
updateRangesRelativeValues(spectrum);
|
|
354
|
+
handleUpdateCorrelations(draft);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
324
357
|
|
|
325
358
|
//action
|
|
326
359
|
function handleSaveEditedRange(
|
|
@@ -517,9 +550,9 @@ function initiateRangeSumOptions(datum: Spectrum1D, options: SumParams) {
|
|
|
517
550
|
|
|
518
551
|
//action
|
|
519
552
|
function handleAddRange(draft: Draft<State>, action: AddRangeAction) {
|
|
520
|
-
const { range } = action.payload;
|
|
553
|
+
const { range, spectrumId } = action.payload;
|
|
521
554
|
|
|
522
|
-
const spectrum = getSpectrum(draft);
|
|
555
|
+
const spectrum = getSpectrum(draft, spectrumId);
|
|
523
556
|
if (!isSpectrum1D(spectrum)) return;
|
|
524
557
|
|
|
525
558
|
const { molecules } = draft;
|
|
@@ -583,9 +616,9 @@ function handleChangeRangesSumFlag(draft: Draft<State>) {
|
|
|
583
616
|
|
|
584
617
|
//action
|
|
585
618
|
function handleUpdateRange(draft: Draft<State>, action: UpdateRangAction) {
|
|
586
|
-
const { range } = action.payload;
|
|
619
|
+
const { range, spectrumId } = action.payload;
|
|
587
620
|
|
|
588
|
-
const spectrum = getSpectrum(draft);
|
|
621
|
+
const spectrum = getSpectrum(draft, spectrumId);
|
|
589
622
|
if (!isSpectrum1D(spectrum)) return;
|
|
590
623
|
|
|
591
624
|
const index = spectrum.ranges.values.findIndex(
|
|
@@ -720,6 +753,7 @@ export {
|
|
|
720
753
|
handleChangeRangesAssignmentLabelsByDiaIds,
|
|
721
754
|
handleChangeRangesSumFlag,
|
|
722
755
|
handleChangeRangesViewFloatingBoxBounding,
|
|
756
|
+
handleChangeSignalDelta,
|
|
723
757
|
handleCutRange,
|
|
724
758
|
handleDeleteRange,
|
|
725
759
|
handleDeleteRangePeak,
|
|
@@ -6,7 +6,6 @@ import { isSpectrum1D } from '../../../data/data1d/Spectrum1D/index.js';
|
|
|
6
6
|
import { contoursManager } from '../../../data/data2d/Spectrum2D/contours.js';
|
|
7
7
|
import { getXScale } from '../../1d/utilities/scale.js';
|
|
8
8
|
import type { Layout } from '../../2d/utilities/DimensionLayout.js';
|
|
9
|
-
import { LAYOUT } from '../../2d/utilities/DimensionLayout.js';
|
|
10
9
|
import { get2DXScale, get2DYScale } from '../../2d/utilities/scale.js';
|
|
11
10
|
import type {
|
|
12
11
|
BrushAxis,
|
|
@@ -25,6 +24,7 @@ import zoomHistoryManager, {
|
|
|
25
24
|
} from '../helper/ZoomHistoryManager.js';
|
|
26
25
|
import { getActiveSpectra } from '../helper/getActiveSpectra.js';
|
|
27
26
|
import { getSpectrum } from '../helper/getSpectrum.js';
|
|
27
|
+
import { getTraceSpectrumID } from '../helper/getTraceSpectrumID.tsx';
|
|
28
28
|
import { getTwoDimensionPhaseCorrectionOptions } from '../helper/getTwoDimensionPhaseCorrectionOptions.js';
|
|
29
29
|
import { getVerticalAlign } from '../helper/getVerticalAlign.js';
|
|
30
30
|
import { setIntegralsViewProperty } from '../helper/setIntegralsViewProperty.js';
|
|
@@ -173,18 +173,6 @@ function setSelectedTool(draft: Draft<State>, action: SetSelectedToolAction) {
|
|
|
173
173
|
const { selectedTool } = action.payload;
|
|
174
174
|
activateTool(draft, { toolId: selectedTool });
|
|
175
175
|
}
|
|
176
|
-
//utility
|
|
177
|
-
function getSpectrumID(draft: Draft<State>, index: any): string | null {
|
|
178
|
-
const { activeSpectra, activeTab } = draft.view.spectra;
|
|
179
|
-
|
|
180
|
-
const spectra = activeSpectra[activeTab.split(',')[index]];
|
|
181
|
-
|
|
182
|
-
if (spectra?.length === 1) {
|
|
183
|
-
return spectra[0].id;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
return null;
|
|
187
|
-
}
|
|
188
176
|
|
|
189
177
|
function setSpectraVerticalAlign(draft: Draft<State>) {
|
|
190
178
|
const currentVerticalAlign = getVerticalAlign(draft);
|
|
@@ -314,14 +302,10 @@ function handleZoom(draft: Draft<State>, action: ZoomAction) {
|
|
|
314
302
|
}
|
|
315
303
|
} else {
|
|
316
304
|
// change the vertical scale of 1D traces
|
|
317
|
-
const
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
if (id) {
|
|
322
|
-
const domain = yDomains[id];
|
|
323
|
-
yDomains[id] = wheelZoom(options, domain);
|
|
324
|
-
}
|
|
305
|
+
const id = getTraceSpectrumID(draft, trackID);
|
|
306
|
+
if (id) {
|
|
307
|
+
const domain = yDomains[id];
|
|
308
|
+
yDomains[id] = wheelZoom(options, domain);
|
|
325
309
|
}
|
|
326
310
|
}
|
|
327
311
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Draft } from 'immer';
|
|
2
|
+
|
|
3
|
+
import type { Layout } from '../../2d/utilities/DimensionLayout.ts';
|
|
4
|
+
import { LAYOUT } from '../../2d/utilities/DimensionLayout.ts';
|
|
5
|
+
import type { State } from '../Reducer.ts';
|
|
6
|
+
|
|
7
|
+
//utility
|
|
8
|
+
export function getTraceSpectrumID(
|
|
9
|
+
draft: Draft<State>,
|
|
10
|
+
trackID: Layout | undefined,
|
|
11
|
+
): string | null {
|
|
12
|
+
const index = trackID === LAYOUT.top ? 0 : trackID === LAYOUT.left ? 1 : null;
|
|
13
|
+
|
|
14
|
+
if (index === null) return null;
|
|
15
|
+
|
|
16
|
+
const { activeSpectra, activeTab } = draft.view.spectra;
|
|
17
|
+
|
|
18
|
+
const spectra = activeSpectra[activeTab.split(',')[index]];
|
|
19
|
+
|
|
20
|
+
if (spectra?.length === 1) {
|
|
21
|
+
return spectra[0].id;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
@@ -29,8 +29,7 @@ export function setRangesViewProperty<T extends keyof RangesViewState>(
|
|
|
29
29
|
options: {
|
|
30
30
|
spectrumKey?: string;
|
|
31
31
|
value:
|
|
32
|
-
|
|
33
|
-
| RangesViewState[T];
|
|
32
|
+
((value: RangesViewState[T]) => RangesViewState[T]) | RangesViewState[T];
|
|
34
33
|
},
|
|
35
34
|
) {
|
|
36
35
|
const rangesView = draft.view.ranges;
|