nmrium 2.3.0 → 2.5.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/HorizontalAxis1D.d.ts.map +1 -1
- package/lib/component/1d/HorizontalAxis1D.js +4 -1
- package/lib/component/1d/HorizontalAxis1D.js.map +1 -1
- package/lib/component/1d/SVGContent1D.d.ts.map +1 -1
- package/lib/component/1d/SVGContent1D.js +2 -1
- package/lib/component/1d/SVGContent1D.js.map +1 -1
- package/lib/component/1d/Viewer1D.d.ts.map +1 -1
- package/lib/component/1d/Viewer1D.js +2 -1
- package/lib/component/1d/Viewer1D.js.map +1 -1
- package/lib/component/1d/integral/IntegralResizable.d.ts.map +1 -1
- package/lib/component/1d/integral/IntegralResizable.js +4 -4
- package/lib/component/1d/integral/IntegralResizable.js.map +1 -1
- package/lib/component/1d/peaks/PeakEditionManager.d.ts +1 -1
- package/lib/component/1d/ranges/Range.d.ts.map +1 -1
- package/lib/component/1d/ranges/Range.js +3 -3
- package/lib/component/1d/ranges/Range.js.map +1 -1
- package/lib/component/1d/ranges/Signals.d.ts +2 -0
- package/lib/component/1d/ranges/Signals.d.ts.map +1 -0
- package/lib/component/1d/ranges/Signals.js +16 -0
- package/lib/component/1d/ranges/Signals.js.map +1 -0
- package/lib/component/1d-2d/components/RangeIndicator.d.ts +13 -0
- package/lib/component/1d-2d/components/RangeIndicator.d.ts.map +1 -0
- package/lib/component/1d-2d/components/RangeIndicator.js +52 -0
- package/lib/component/1d-2d/components/RangeIndicator.js.map +1 -0
- package/lib/component/1d-2d/components/Signals1D.d.ts +19 -0
- package/lib/component/1d-2d/components/Signals1D.d.ts.map +1 -0
- package/lib/component/1d-2d/components/Signals1D.js +155 -0
- package/lib/component/1d-2d/components/Signals1D.js.map +1 -0
- package/lib/component/1d-2d/tools/BrushXY.js +6 -6
- package/lib/component/1d-2d/tools/BrushXY.js.map +1 -1
- package/lib/component/1d-2d/tools/CrossLinePointer.d.ts +16 -1
- package/lib/component/1d-2d/tools/CrossLinePointer.d.ts.map +1 -1
- package/lib/component/1d-2d/tools/CrossLinePointer.js +25 -15
- package/lib/component/1d-2d/tools/CrossLinePointer.js.map +1 -1
- package/lib/component/1d-2d/tools/CursorToolIcon.d.ts +9 -0
- package/lib/component/1d-2d/tools/CursorToolIcon.d.ts.map +1 -0
- package/lib/component/1d-2d/tools/CursorToolIcon.js +58 -0
- package/lib/component/1d-2d/tools/CursorToolIcon.js.map +1 -0
- package/lib/component/2d/1d-tracer/Left1DChart.d.ts.map +1 -1
- package/lib/component/2d/1d-tracer/Left1DChart.js +7 -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 +20 -0
- package/lib/component/2d/1d-tracer/Ranges1D.js.map +1 -0
- package/lib/component/2d/1d-tracer/Top1DChart.d.ts.map +1 -1
- package/lib/component/2d/1d-tracer/Top1DChart.js +7 -2
- package/lib/component/2d/1d-tracer/Top1DChart.js.map +1 -1
- package/lib/component/2d/DirectAxis2D.d.ts.map +1 -1
- package/lib/component/2d/DirectAxis2D.js +4 -1
- package/lib/component/2d/DirectAxis2D.js.map +1 -1
- package/lib/component/2d/IndirectAxis2D.d.ts.map +1 -1
- package/lib/component/2d/IndirectAxis2D.js +5 -2
- package/lib/component/2d/IndirectAxis2D.js.map +1 -1
- package/lib/component/2d/Viewer2D.d.ts.map +1 -1
- package/lib/component/2d/Viewer2D.js +2 -1
- package/lib/component/2d/Viewer2D.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/AnchorSVG.d.ts +36 -0
- package/lib/component/AnchorSVG.d.ts.map +1 -0
- package/lib/component/AnchorSVG.js +140 -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 +16 -2
- package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
- package/lib/component/EventsTrackers/MouseTracker.d.ts +3 -0
- package/lib/component/EventsTrackers/MouseTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/MouseTracker.js +15 -0
- package/lib/component/EventsTrackers/MouseTracker.js.map +1 -1
- package/lib/component/context/KeyModifierContext.d.ts +2 -0
- package/lib/component/context/KeyModifierContext.d.ts.map +1 -1
- package/lib/component/context/KeyModifierContext.js +26 -6
- package/lib/component/context/KeyModifierContext.js.map +1 -1
- package/lib/component/elements/D3Axis.d.ts.map +1 -1
- package/lib/component/elements/D3Axis.js +4 -3
- package/lib/component/elements/D3Axis.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/export/ExportOptionsModal.js +2 -5
- package/lib/component/elements/export/ExportOptionsModal.js.map +1 -1
- package/lib/component/header/AutoPeakPickingOptionPanel.d.ts.map +1 -1
- package/lib/component/header/AutoPeakPickingOptionPanel.js +59 -31
- package/lib/component/header/AutoPeakPickingOptionPanel.js.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/header/RangesPickingOptionPanel.d.ts.map +1 -1
- package/lib/component/header/RangesPickingOptionPanel.js +34 -19
- package/lib/component/header/RangesPickingOptionPanel.js.map +1 -1
- package/lib/component/hooks/useAddMultipletSignal.d.ts +7 -0
- package/lib/component/hooks/useAddMultipletSignal.d.ts.map +1 -0
- package/lib/component/hooks/useAddMultipletSignal.js +28 -0
- package/lib/component/hooks/useAddMultipletSignal.js.map +1 -0
- package/lib/component/hooks/useFilter.d.ts.map +1 -1
- package/lib/component/hooks/useFilter.js.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/useSpectrum.d.ts +3 -1
- package/lib/component/hooks/useSpectrum.d.ts.map +1 -1
- package/lib/component/hooks/useSpectrum.js +1 -1
- package/lib/component/hooks/useSpectrum.js.map +1 -1
- package/lib/component/hooks/useSpectrumWithDataSource.d.ts +1 -1
- package/lib/component/hooks/useSpectrumWithDataSource.d.ts.map +1 -1
- package/lib/component/hooks/useSpectrumWithDataSource.js.map +1 -1
- package/lib/component/hooks/useTempSpectrum.d.ts +1 -1
- package/lib/component/hooks/useTempSpectrum.d.ts.map +1 -1
- package/lib/component/hooks/use_ticks_config.d.ts +1 -4
- package/lib/component/hooks/use_ticks_config.d.ts.map +1 -1
- package/lib/component/hooks/use_ticks_config.js +1 -6
- package/lib/component/hooks/use_ticks_config.js.map +1 -1
- package/lib/component/modal/PublicationStringModal.d.ts +1 -1
- package/lib/component/modal/PublicationStringModal.d.ts.map +1 -1
- package/lib/component/modal/PublicationStringModal.js +4 -8
- package/lib/component/modal/PublicationStringModal.js.map +1 -1
- package/lib/component/modal/SaveAsModal.js +3 -6
- 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/forms/components/NewSignalTab.d.ts.map +1 -1
- package/lib/component/modal/editRange/forms/components/NewSignalTab.js +38 -36
- package/lib/component/modal/editRange/forms/components/NewSignalTab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +142 -24
- 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 +142 -24
- 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.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 +142 -24
- 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 +120 -24
- 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 +120 -24
- 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 +20 -4
- 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 +120 -24
- 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 +120 -24
- 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/axis_tab.js +12 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts +120 -24
- 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 +120 -24
- 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 +120 -24
- 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 +120 -24
- 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 +120 -24
- 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 +120 -24
- 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 +120 -24
- 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/spectra_colors_tab.d.ts +120 -24
- 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 +120 -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/title_block_tab.d.ts +120 -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/tools_tab.d.ts +120 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.d.ts +22 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.js +15 -2
- package/lib/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts +22 -0
- package/lib/component/modal/setting/tanstack_general_settings/validation.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.js +1 -1
- package/lib/component/panels/MoleculesPanel/hooks/useAtomAssignment.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 +1 -1
- 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 +9 -9
- package/lib/component/panels/PeaksPanel/PeaksTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesPanel.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesPanel.js +1 -3
- package/lib/component/panels/RangesPanel/RangesPanel.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.js +10 -12
- package/lib/component/panels/RangesPanel/RangesTableRow.js.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.d.ts +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.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 +134 -0
- package/lib/component/panels/filtersPanel/processings_sections_panel.js.map +1 -0
- package/lib/component/panels/hooks/use_processings_mutation.d.ts +10 -0
- package/lib/component/panels/hooks/use_processings_mutation.d.ts.map +1 -0
- package/lib/component/panels/hooks/use_processings_mutation.js +130 -0
- package/lib/component/panels/hooks/use_processings_mutation.js.map +1 -0
- package/lib/component/panels/informationPanel/InformationPanel.js +1 -1
- package/lib/component/panels/informationPanel/InformationPanel.js.map +1 -1
- package/lib/component/reducer/Reducer.d.ts.map +1 -1
- package/lib/component/reducer/Reducer.js +4 -0
- package/lib/component/reducer/Reducer.js.map +1 -1
- package/lib/component/reducer/actions/CorrelationsActions.js +2 -2
- package/lib/component/reducer/actions/CorrelationsActions.js.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.d.ts +2 -0
- package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.js +1 -1
- package/lib/component/reducer/actions/FiltersActions.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 +36 -29
- package/lib/component/reducer/actions/RangesActions.js.map +1 -1
- package/lib/component/reducer/actions/SpectraActions.d.ts +8 -2
- package/lib/component/reducer/actions/SpectraActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/SpectraActions.js +6 -1
- package/lib/component/reducer/actions/SpectraActions.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/preferences/actions/setPreferences.d.ts +2 -2
- package/lib/component/reducer/preferences/actions/setPreferences.d.ts.map +1 -1
- package/lib/component/reducer/preferences/actions/setPreferences.js +8 -5
- package/lib/component/reducer/preferences/actions/setPreferences.js.map +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
- package/lib/component/toolbar/ToolTypes.d.ts +21 -1
- package/lib/component/toolbar/ToolTypes.d.ts.map +1 -1
- package/lib/component/toolbar/ToolTypes.js +40 -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 +12 -36
- 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/workspaces/workspaceDefaultProperties.d.ts.map +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +19 -2
- package/lib/component/workspaces/workspaceDefaultProperties.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +13 -5
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js.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/data2d/Spectrum2D/initiateDatum2D.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +12 -4
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/isSpectrum2D.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/isSpectrum2D.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/isSpectrum2D.js.map +1 -1
- package/lib/data/utilities/RangeUtilities.d.ts +1 -6
- package/lib/data/utilities/RangeUtilities.d.ts.map +1 -1
- package/lib/data/utilities/RangeUtilities.js +10 -27
- package/lib/data/utilities/RangeUtilities.js.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/package.json +29 -27
- package/src/component/1d/HorizontalAxis1D.tsx +12 -2
- package/src/component/1d/SVGContent1D.tsx +2 -0
- package/src/component/1d/Viewer1D.tsx +2 -0
- package/src/component/1d/integral/IntegralResizable.tsx +6 -6
- package/src/component/1d/ranges/Range.tsx +6 -6
- package/src/component/1d/ranges/Signals.tsx +28 -0
- package/src/component/1d-2d/components/RangeIndicator.tsx +106 -0
- package/src/component/1d-2d/components/Signals1D.tsx +306 -0
- package/src/component/1d-2d/tools/BrushXY.tsx +8 -8
- package/src/component/1d-2d/tools/CrossLinePointer.tsx +75 -32
- package/src/component/1d-2d/tools/CursorToolIcon.tsx +110 -0
- package/src/component/2d/1d-tracer/Left1DChart.tsx +26 -1
- package/src/component/2d/1d-tracer/Ranges1D.tsx +38 -0
- package/src/component/2d/1d-tracer/Top1DChart.tsx +31 -2
- package/src/component/2d/DirectAxis2D.tsx +12 -3
- package/src/component/2d/IndirectAxis2D.tsx +9 -5
- package/src/component/2d/Viewer2D.tsx +5 -2
- package/src/component/2d/ft/FTContainer.tsx +1 -0
- package/src/component/AnchorSVG.tsx +369 -0
- package/src/component/EventsTrackers/BrushTracker.tsx +25 -5
- package/src/component/EventsTrackers/MouseTracker.tsx +21 -0
- package/src/component/context/KeyModifierContext.tsx +32 -8
- package/src/component/elements/D3Axis.tsx +31 -9
- package/src/component/elements/DraggableDialog.tsx +1 -2
- package/src/component/elements/Sections.tsx +4 -4
- package/src/component/elements/export/ExportOptionsModal.tsx +22 -31
- package/src/component/header/AutoPeakPickingOptionPanel.tsx +173 -102
- package/src/component/header/Header.tsx +2 -4
- package/src/component/header/RangesPickingOptionPanel.tsx +72 -59
- package/src/component/hooks/useAddMultipletSignal.tsx +32 -0
- package/src/component/hooks/useFilter.ts +2 -1
- package/src/component/hooks/useSaveSettings.tsx +4 -15
- package/src/component/hooks/useSpectrum.ts +7 -1
- package/src/component/hooks/useSpectrumWithDataSource.ts +16 -8
- package/src/component/hooks/use_ticks_config.ts +1 -7
- package/src/component/modal/PublicationStringModal.tsx +8 -14
- package/src/component/modal/SaveAsModal.tsx +41 -50
- package/src/component/modal/aboutUs/AboutUsModal.tsx +5 -4
- package/src/component/modal/editRange/forms/components/NewSignalTab.tsx +57 -57
- package/src/component/modal/setting/tanstack_general_settings/general_settings.tsx +23 -29
- package/src/component/modal/setting/tanstack_general_settings/tabs/axis_tab.tsx +76 -12
- package/src/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.ts +16 -2
- package/src/component/panels/MoleculesPanel/hooks/useAtomAssignment.tsx +1 -1
- package/src/component/panels/PeaksPanel/PeaksPanel.tsx +1 -8
- package/src/component/panels/PeaksPanel/PeaksPreferences.tsx +1 -1
- package/src/component/panels/PeaksPanel/PeaksTable.tsx +11 -9
- package/src/component/panels/RangesPanel/RangesPanel.tsx +1 -3
- package/src/component/panels/RangesPanel/RangesTableRow.tsx +10 -12
- package/src/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.tsx +2 -2
- package/src/component/panels/SummaryPanel/SummaryPanel.tsx +13 -11
- 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 +307 -0
- package/src/component/panels/hooks/use_processings_mutation.ts +171 -0
- package/src/component/panels/informationPanel/InformationPanel.tsx +1 -1
- package/src/component/reducer/Reducer.ts +4 -0
- package/src/component/reducer/actions/CorrelationsActions.ts +2 -2
- package/src/component/reducer/actions/FiltersActions.ts +1 -1
- package/src/component/reducer/actions/RangesActions.ts +53 -30
- package/src/component/reducer/actions/SpectraActions.ts +20 -1
- package/src/component/reducer/actions/ToolsActions.ts +5 -21
- package/src/component/reducer/helper/getTraceSpectrumID.tsx +25 -0
- package/src/component/reducer/preferences/actions/setPreferences.ts +18 -10
- package/src/component/reducer/preferences/preferencesReducer.ts +1 -1
- package/src/component/toolbar/ToolTypes.ts +92 -1
- package/src/component/toolbar/nmr_toolbar.tsx +15 -71
- package/src/component/utility/CoreSlot.tsx +126 -0
- package/src/component/workspaces/workspaceDefaultProperties.ts +19 -2
- package/src/data/data1d/Spectrum1D/initiateDatum1D.ts +14 -8
- 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/data2d/Spectrum2D/initiateDatum2D.ts +12 -4
- package/src/data/data2d/Spectrum2D/isSpectrum2D.ts +1 -1
- package/src/data/utilities/RangeUtilities.ts +12 -36
- package/src/versionInfo.ts +1 -1
- package/lib/component/1d/integral/IntegralIndicator.d.ts +0 -9
- package/lib/component/1d/integral/IntegralIndicator.d.ts.map +0 -1
- package/lib/component/1d/integral/IntegralIndicator.js +0 -22
- package/lib/component/1d/integral/IntegralIndicator.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/integral/IntegralIndicator.tsx +0 -43
- package/src/component/utility/renderCoreSlot.tsx +0 -21
|
@@ -1,35 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SvgNmrAlignBottom,
|
|
3
|
-
SvgNmrAlignCenter,
|
|
4
|
-
SvgNmrApodization,
|
|
5
|
-
SvgNmrBaselineCorrection,
|
|
6
|
-
SvgNmrFourierTransform,
|
|
7
|
-
SvgNmrIntegrate,
|
|
8
|
-
SvgNmrMultipleAnalysis,
|
|
9
|
-
SvgNmrOverlay3,
|
|
10
|
-
SvgNmrOverlay3Aligned,
|
|
11
|
-
SvgNmrPeakPicking,
|
|
12
|
-
SvgNmrPhaseCorrection,
|
|
13
|
-
SvgNmrRangePicking,
|
|
14
|
-
SvgNmrRealImag,
|
|
15
|
-
SvgNmrZeroFilling,
|
|
16
|
-
} from 'cheminfo-font';
|
|
17
1
|
import { useCallback } from 'react';
|
|
18
|
-
import {
|
|
19
|
-
FaDiceFour,
|
|
20
|
-
FaDownload,
|
|
21
|
-
FaExpand,
|
|
22
|
-
FaFileExport,
|
|
23
|
-
FaFileImport,
|
|
24
|
-
} from 'react-icons/fa';
|
|
25
|
-
import { PiKnifeBold, PiSelectionPlusDuotone } from 'react-icons/pi';
|
|
26
|
-
import { TbZoom } from 'react-icons/tb';
|
|
2
|
+
import { FaDownload } from 'react-icons/fa';
|
|
27
3
|
import type { ToolbarItemProps, TooltipItem } from 'react-science/ui';
|
|
28
4
|
import { Toolbar, TooltipHelpContent } from 'react-science/ui';
|
|
29
5
|
|
|
30
6
|
import { isQuadrants2DSpectrum } from '../../data/data2d/Spectrum2D/isSpectrum2D.js';
|
|
31
7
|
import { useChartData } from '../context/ChartContext.js';
|
|
32
8
|
import { useDispatch } from '../context/DispatchContext.js';
|
|
9
|
+
import { useIsPrimaryKeyActivated } from '../context/KeyModifierContext.tsx';
|
|
33
10
|
import { useLoader } from '../context/LoaderContext.js';
|
|
34
11
|
import { usePreferences } from '../context/PreferencesContext.js';
|
|
35
12
|
import type { ToolbarPopoverMenuItem } from '../elements/ToolbarPopoverItem.js';
|
|
@@ -50,14 +27,15 @@ import { LoadJCAMPModal } from '../modal/LoadJCAMPModal.js';
|
|
|
50
27
|
import SaveAsModal from '../modal/SaveAsModal.js';
|
|
51
28
|
import { MetaImportationModal } from '../modal/metaImportation/MetaImportationModal.js';
|
|
52
29
|
|
|
53
|
-
import type { MainTool } from './ToolTypes.js';
|
|
54
|
-
import { options } from './ToolTypes.js';
|
|
30
|
+
import type { IconOptions, MainTool } from './ToolTypes.js';
|
|
31
|
+
import { getToolIcon, options } from './ToolTypes.js';
|
|
55
32
|
import type { ExportMenuItems } from './toolbarMenu.js';
|
|
56
33
|
import { EXPORT_MENU, IMPORT_MENU } from './toolbarMenu.js';
|
|
57
34
|
|
|
58
|
-
interface BaseToolItem extends Pick<ToolbarItemProps, '
|
|
35
|
+
interface BaseToolItem extends Pick<ToolbarItemProps, 'disabled'> {
|
|
59
36
|
id: MainTool;
|
|
60
37
|
isVisible?: boolean;
|
|
38
|
+
iconProps?: IconOptions;
|
|
61
39
|
}
|
|
62
40
|
interface ToolItem extends BaseToolItem {
|
|
63
41
|
onClick?: () => void;
|
|
@@ -99,6 +77,7 @@ export default function NMRToolbar() {
|
|
|
99
77
|
const isButtonVisible = useCheckToolsVisibility();
|
|
100
78
|
const dispatch = useDispatch();
|
|
101
79
|
const spectrum = useSpectrum();
|
|
80
|
+
const isPrimaryKeyActivated = useIsPrimaryKeyActivated();
|
|
102
81
|
|
|
103
82
|
const {
|
|
104
83
|
isRealSpectrumShown,
|
|
@@ -224,7 +203,9 @@ export default function NMRToolbar() {
|
|
|
224
203
|
],
|
|
225
204
|
style: { minWidth: '300px' },
|
|
226
205
|
},
|
|
227
|
-
|
|
206
|
+
iconProps: {
|
|
207
|
+
strokeWidth: 3,
|
|
208
|
+
},
|
|
228
209
|
},
|
|
229
210
|
{
|
|
230
211
|
id: 'zoomOut',
|
|
@@ -234,12 +215,10 @@ export default function NMRToolbar() {
|
|
|
234
215
|
{ title: 'Horizontal', shortcuts: ['f'] },
|
|
235
216
|
{ title: 'Horizontal and Vertical', shortcuts: ['f', 'f'] },
|
|
236
217
|
],
|
|
237
|
-
description:
|
|
238
|
-
'Zoom out by double-clicking the left mouse button, and fully zoom out horizontally by pressing the key "f". Alternatively, press the key "ff" to fit the spectra horizontally and vertically.',
|
|
218
|
+
description: `Zoom out by ${isPrimaryKeyActivated ? 'Shift + ' : ''}double-clicking the left mouse button, and fully zoom out horizontally by pressing the key "f". Alternatively, press the key "ff" to fit the spectra horizontally and vertically.`,
|
|
239
219
|
link: 'https://docs.nmrium.org/help/zoom-and-scale',
|
|
240
220
|
},
|
|
241
221
|
onClick: handleFullZoomOut,
|
|
242
|
-
icon: <FaExpand />,
|
|
243
222
|
},
|
|
244
223
|
{
|
|
245
224
|
id: 'peakPicking',
|
|
@@ -249,8 +228,6 @@ export default function NMRToolbar() {
|
|
|
249
228
|
description: 'Detect peaks manually or automatically in the spectrum.',
|
|
250
229
|
link: 'https://docs.nmrium.org/help/peaks',
|
|
251
230
|
},
|
|
252
|
-
|
|
253
|
-
icon: <SvgNmrPeakPicking />,
|
|
254
231
|
},
|
|
255
232
|
{
|
|
256
233
|
id: 'integral',
|
|
@@ -260,7 +237,6 @@ export default function NMRToolbar() {
|
|
|
260
237
|
description: `Manually integrate the spectrum. Click, drag, and release ${!invert ? 'while holding SHIFT' : ''} to draw the integral. Resize the integrals by moving the edges. Cut an integral with ${!invert ? 'SHIFT +' : ''} click.`,
|
|
261
238
|
link: 'https://docs.nmrium.org/help/integrations',
|
|
262
239
|
},
|
|
263
|
-
icon: <SvgNmrIntegrate />,
|
|
264
240
|
},
|
|
265
241
|
{
|
|
266
242
|
id: 'zonePicking',
|
|
@@ -270,7 +246,6 @@ export default function NMRToolbar() {
|
|
|
270
246
|
description: `Draw 2D zones by clicking, dragging, and releasing${!invert ? 'while holding SHIFT' : ''}. Alternatively, detect zones automatically.`,
|
|
271
247
|
link: 'https://docs.nmrium.org/30_2d-spectra/zones',
|
|
272
248
|
},
|
|
273
|
-
icon: <FaDiceFour />,
|
|
274
249
|
},
|
|
275
250
|
{
|
|
276
251
|
id: 'slicing',
|
|
@@ -280,7 +255,6 @@ export default function NMRToolbar() {
|
|
|
280
255
|
'Display the horizontal and vertical slices of the selected 2D spectrum at the level of the pointer.',
|
|
281
256
|
link: 'https://docs.nmrium.org/30_2d-spectra/slicing',
|
|
282
257
|
},
|
|
283
|
-
icon: <PiKnifeBold />,
|
|
284
258
|
},
|
|
285
259
|
{
|
|
286
260
|
id: 'rangePicking',
|
|
@@ -290,7 +264,6 @@ export default function NMRToolbar() {
|
|
|
290
264
|
description: `Define ranges and analyse multiplet automatically or manually. Click, drag, and release ${!invert ? 'while holding SHIFT' : ''} to draw the range. Ranges can be resized by moving the edges.`,
|
|
291
265
|
link: 'https://docs.nmrium.org/help/ranges',
|
|
292
266
|
},
|
|
293
|
-
icon: <SvgNmrRangePicking />,
|
|
294
267
|
},
|
|
295
268
|
{
|
|
296
269
|
id: 'multipleSpectraAnalysis',
|
|
@@ -300,7 +273,6 @@ export default function NMRToolbar() {
|
|
|
300
273
|
description:
|
|
301
274
|
'Integrate multiple spectra at once and adjust integration zones by dragging their edges.',
|
|
302
275
|
},
|
|
303
|
-
icon: <SvgNmrMultipleAnalysis />,
|
|
304
276
|
isVisible: ftCounter > 0,
|
|
305
277
|
},
|
|
306
278
|
{
|
|
@@ -312,21 +284,18 @@ export default function NMRToolbar() {
|
|
|
312
284
|
'Apply mathematical function that the FID is multiplied by before Fourier Transform.',
|
|
313
285
|
link: 'https://docs.nmrium.org/help/apodization',
|
|
314
286
|
},
|
|
315
|
-
icon: <SvgNmrApodization />,
|
|
316
287
|
},
|
|
317
288
|
{
|
|
318
289
|
id: 'apodizationDimension1',
|
|
319
290
|
tooltip: {
|
|
320
291
|
title: options.apodizationDimension1.label,
|
|
321
292
|
},
|
|
322
|
-
icon: <SvgNmrApodization />,
|
|
323
293
|
},
|
|
324
294
|
{
|
|
325
295
|
id: 'apodizationDimension2',
|
|
326
296
|
tooltip: {
|
|
327
297
|
title: options.apodizationDimension2.label,
|
|
328
298
|
},
|
|
329
|
-
icon: <SvgNmrApodization />,
|
|
330
299
|
},
|
|
331
300
|
{
|
|
332
301
|
id: 'zeroFilling',
|
|
@@ -337,7 +306,6 @@ export default function NMRToolbar() {
|
|
|
337
306
|
'Improve spectrum quality by increasing the number of points. By default, the number of points is twice as many as in the original FID.',
|
|
338
307
|
link: 'https://docs.nmrium.org/help/zero-filling',
|
|
339
308
|
},
|
|
340
|
-
icon: <SvgNmrZeroFilling />,
|
|
341
309
|
},
|
|
342
310
|
{
|
|
343
311
|
id: 'zeroFillingDimension1',
|
|
@@ -346,7 +314,6 @@ export default function NMRToolbar() {
|
|
|
346
314
|
description:
|
|
347
315
|
'Improve spectrum quality by increasing the number of points',
|
|
348
316
|
},
|
|
349
|
-
icon: <SvgNmrZeroFilling />,
|
|
350
317
|
},
|
|
351
318
|
{
|
|
352
319
|
id: 'zeroFillingDimension2',
|
|
@@ -355,7 +322,6 @@ export default function NMRToolbar() {
|
|
|
355
322
|
description:
|
|
356
323
|
'Improve spectrum quality by increasing the number of points.',
|
|
357
324
|
},
|
|
358
|
-
icon: <SvgNmrZeroFilling />,
|
|
359
325
|
},
|
|
360
326
|
{
|
|
361
327
|
id: 'phaseCorrection',
|
|
@@ -365,7 +331,6 @@ export default function NMRToolbar() {
|
|
|
365
331
|
description: `Correct the spectrum phase manually or automatically. For manual phase correction, define the pivot${!invert ? ' using SHIFT +' : ''} click, then press the PH0 and PH1 button, and move the mouse horizontally.`,
|
|
366
332
|
link: 'https://docs.nmrium.org/help/phase',
|
|
367
333
|
},
|
|
368
|
-
icon: <SvgNmrPhaseCorrection />,
|
|
369
334
|
},
|
|
370
335
|
{
|
|
371
336
|
id: 'phaseCorrectionTwoDimensions',
|
|
@@ -374,7 +339,6 @@ export default function NMRToolbar() {
|
|
|
374
339
|
shortcuts: ['a'],
|
|
375
340
|
description: 'To phase the spectrum after the FFT.',
|
|
376
341
|
},
|
|
377
|
-
icon: <SvgNmrPhaseCorrection />,
|
|
378
342
|
isVisible: isQuadrants2DSpectrum(spectrum),
|
|
379
343
|
},
|
|
380
344
|
{
|
|
@@ -385,7 +349,6 @@ export default function NMRToolbar() {
|
|
|
385
349
|
description: `Correct the baseline of the spectrum. You should draw zones corresponding to the noise using click, drag, release${!invert ? 'while holding SHIFT' : ''}.`,
|
|
386
350
|
link: 'https://docs.nmrium.org/help/baseline',
|
|
387
351
|
},
|
|
388
|
-
icon: <SvgNmrBaselineCorrection />,
|
|
389
352
|
},
|
|
390
353
|
{
|
|
391
354
|
id: 'exclusionZones',
|
|
@@ -394,7 +357,6 @@ export default function NMRToolbar() {
|
|
|
394
357
|
shortcuts: ['e'],
|
|
395
358
|
description: `Define exclusion zones by clicking, dragging, releasing${!invert ? ' while holding SHIFT' : ''}. This option is practical for excluding large peaks like solvents.`,
|
|
396
359
|
},
|
|
397
|
-
icon: <SvgNmrMultipleAnalysis />,
|
|
398
360
|
isVisible: ftCounter > 0,
|
|
399
361
|
},
|
|
400
362
|
{
|
|
@@ -406,31 +368,26 @@ export default function NMRToolbar() {
|
|
|
406
368
|
link: 'https://docs.nmrium.org/help/ft',
|
|
407
369
|
},
|
|
408
370
|
onClick: handleOnFFTFilter,
|
|
409
|
-
icon: <SvgNmrFourierTransform />,
|
|
410
371
|
},
|
|
411
372
|
{
|
|
412
373
|
id: 'fftDimension1',
|
|
413
374
|
tooltip: options.fftDimension1.label,
|
|
414
375
|
onClick: handleFFtDimension1Filter,
|
|
415
|
-
icon: <SvgNmrFourierTransform />,
|
|
416
376
|
},
|
|
417
377
|
{
|
|
418
378
|
id: 'fftDimension2',
|
|
419
379
|
tooltip: options.fftDimension2.label,
|
|
420
380
|
onClick: handleFFtDimension2Filter,
|
|
421
|
-
icon: <SvgNmrFourierTransform />,
|
|
422
381
|
},
|
|
423
382
|
{
|
|
424
383
|
id: 'import',
|
|
425
384
|
tooltip: options.import.label,
|
|
426
|
-
icon: <FaFileImport />,
|
|
427
385
|
menuItems: importMenu,
|
|
428
386
|
onClick: importHandler,
|
|
429
387
|
},
|
|
430
388
|
{
|
|
431
389
|
id: 'exportAs',
|
|
432
390
|
tooltip: options.exportAs.label,
|
|
433
|
-
icon: <FaFileExport />,
|
|
434
391
|
menuItems: exportMenu,
|
|
435
392
|
onClick: exportHandler,
|
|
436
393
|
},
|
|
@@ -442,12 +399,6 @@ export default function NMRToolbar() {
|
|
|
442
399
|
description:
|
|
443
400
|
'Toggle between stack mode and all the spectra aligned at the bottom.',
|
|
444
401
|
},
|
|
445
|
-
icon:
|
|
446
|
-
verticalAlign === 'stack' ? (
|
|
447
|
-
<SvgNmrOverlay3Aligned />
|
|
448
|
-
) : (
|
|
449
|
-
<SvgNmrOverlay3 />
|
|
450
|
-
),
|
|
451
402
|
isVisible: ftCounter > 1,
|
|
452
403
|
onClick: changeDisplayViewModeHandler,
|
|
453
404
|
},
|
|
@@ -458,7 +409,6 @@ export default function NMRToolbar() {
|
|
|
458
409
|
description:
|
|
459
410
|
'Toggle between the imaginary and real parts of the spectrum.',
|
|
460
411
|
},
|
|
461
|
-
icon: <SvgNmrRealImag />,
|
|
462
412
|
onClick: changeSpectrumViewHandler,
|
|
463
413
|
},
|
|
464
414
|
{
|
|
@@ -469,12 +419,6 @@ export default function NMRToolbar() {
|
|
|
469
419
|
description:
|
|
470
420
|
'Toggle between alignment of the spectra in the center or at the bottom of the display.',
|
|
471
421
|
},
|
|
472
|
-
icon:
|
|
473
|
-
verticalAlign === 'bottom' ? (
|
|
474
|
-
<SvgNmrAlignCenter />
|
|
475
|
-
) : (
|
|
476
|
-
<SvgNmrAlignBottom />
|
|
477
|
-
),
|
|
478
422
|
isVisible: ftCounter > 0 || fidCounter > 0,
|
|
479
423
|
onClick: alignSpectraVerticallyHandler,
|
|
480
424
|
},
|
|
@@ -486,7 +430,6 @@ export default function NMRToolbar() {
|
|
|
486
430
|
description:
|
|
487
431
|
'Drag a rectangle over the spectrum region to create an inset.',
|
|
488
432
|
},
|
|
489
|
-
icon: <PiSelectionPlusDuotone />,
|
|
490
433
|
},
|
|
491
434
|
];
|
|
492
435
|
return (
|
|
@@ -506,7 +449,8 @@ export default function NMRToolbar() {
|
|
|
506
449
|
<SaveAsModal isOpen={dialog.saveAs} onCloseDialog={closeDialog} />
|
|
507
450
|
<Toolbar vertical>
|
|
508
451
|
{toolItems.map((item) => {
|
|
509
|
-
const { id,
|
|
452
|
+
const { id, tooltip, disabled, isVisible, iconProps } = item;
|
|
453
|
+
const Icon = getToolIcon(id, { verticalAlign, isRealSpectrumShown });
|
|
510
454
|
const isToolVisible =
|
|
511
455
|
isButtonVisible(id) && (isVisible === undefined || isVisible);
|
|
512
456
|
|
|
@@ -530,7 +474,7 @@ export default function NMRToolbar() {
|
|
|
530
474
|
}}
|
|
531
475
|
id={id}
|
|
532
476
|
active={selectedTool === id}
|
|
533
|
-
icon={
|
|
477
|
+
icon={Icon && <Icon {...iconProps} />}
|
|
534
478
|
onClick={onClick}
|
|
535
479
|
disabled={disabled}
|
|
536
480
|
/>
|
|
@@ -555,7 +499,7 @@ export default function NMRToolbar() {
|
|
|
555
499
|
}}
|
|
556
500
|
id={id}
|
|
557
501
|
active={selectedTool === id}
|
|
558
|
-
icon={
|
|
502
|
+
icon={Icon && <Icon {...iconProps} />}
|
|
559
503
|
disabled={disabled}
|
|
560
504
|
/>
|
|
561
505
|
);
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import styled from '@emotion/styled';
|
|
2
|
+
import type {
|
|
3
|
+
PluginUIComponentProps,
|
|
4
|
+
ProcessingOperatorId,
|
|
5
|
+
ProcessingOperatorUIExpandedProps,
|
|
6
|
+
SupportedUISlot,
|
|
7
|
+
} from '@zakodium/nmrium-core';
|
|
8
|
+
import { castSlotProps } from '@zakodium/nmrium-core';
|
|
9
|
+
import type { ReactNode } from 'react';
|
|
10
|
+
import type { FallbackProps } from 'react-error-boundary';
|
|
11
|
+
import { ErrorBoundary } from 'react-error-boundary';
|
|
12
|
+
|
|
13
|
+
import { useCore } from '../context/CoreContext.tsx';
|
|
14
|
+
|
|
15
|
+
type SlotProps<Slot extends SupportedUISlot> =
|
|
16
|
+
Omit<Extract<PluginUIComponentProps, { slot: Slot }>, 'slot'> extends Record<
|
|
17
|
+
string,
|
|
18
|
+
never
|
|
19
|
+
>
|
|
20
|
+
? object
|
|
21
|
+
: Omit<Extract<PluginUIComponentProps, { slot: Slot }>, 'slot'>;
|
|
22
|
+
|
|
23
|
+
interface CoreSlotProps<Slot extends SupportedUISlot> {
|
|
24
|
+
slot: Slot;
|
|
25
|
+
fallback?: ReactNode;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Render all components registered in the given slot.
|
|
30
|
+
*/
|
|
31
|
+
export function CoreSlot<Slot extends SupportedUISlot>(
|
|
32
|
+
props: CoreSlotProps<Slot> & SlotProps<Slot>,
|
|
33
|
+
) {
|
|
34
|
+
const { slot, fallback, ...slotProps } = props;
|
|
35
|
+
castSlotProps(slotProps, slot);
|
|
36
|
+
|
|
37
|
+
const core = useCore();
|
|
38
|
+
|
|
39
|
+
const jsx = Array.from(core.slot(slot), ([key, Component]) => (
|
|
40
|
+
<Component key={key} {...slotProps} slot={slot} />
|
|
41
|
+
));
|
|
42
|
+
|
|
43
|
+
return jsx.length > 0 ? jsx : fallback;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface CoreOperatorNameProps<Id extends ProcessingOperatorId> {
|
|
47
|
+
id: Id;
|
|
48
|
+
fallback?: ReactNode;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function CoreOperatorName<Id extends ProcessingOperatorId>(
|
|
52
|
+
props: CoreOperatorNameProps<Id>,
|
|
53
|
+
) {
|
|
54
|
+
const { id, fallback } = props;
|
|
55
|
+
const core = useCore();
|
|
56
|
+
|
|
57
|
+
const operator = core.slotOperator(id);
|
|
58
|
+
if (!operator) return fallback;
|
|
59
|
+
|
|
60
|
+
return operator.name;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
interface CoreOperatorExtendedProps<Id extends ProcessingOperatorId> {
|
|
64
|
+
id: Id;
|
|
65
|
+
fallback?: ReactNode;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function CoreOperatorExpanded<Id extends ProcessingOperatorId>(
|
|
69
|
+
props: CoreOperatorExtendedProps<Id> & ProcessingOperatorUIExpandedProps<Id>,
|
|
70
|
+
) {
|
|
71
|
+
const { id, fallback, ...operatorProps } = props;
|
|
72
|
+
const core = useCore();
|
|
73
|
+
|
|
74
|
+
const operator = core.slotOperator(id);
|
|
75
|
+
const Expanded = operator?.Expanded;
|
|
76
|
+
if (!Expanded) return fallback;
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<ErrorBoundary
|
|
80
|
+
fallbackRender={(props) => (
|
|
81
|
+
<>
|
|
82
|
+
<ErrorOverlay {...props} />
|
|
83
|
+
{fallback}
|
|
84
|
+
</>
|
|
85
|
+
)}
|
|
86
|
+
>
|
|
87
|
+
<Expanded {...operatorProps} />
|
|
88
|
+
</ErrorBoundary>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function ErrorOverlay(props: FallbackProps) {
|
|
93
|
+
const error = props.error;
|
|
94
|
+
const message =
|
|
95
|
+
error && typeof error === 'object' && 'message' in error
|
|
96
|
+
? error.message
|
|
97
|
+
: null;
|
|
98
|
+
const stack =
|
|
99
|
+
error && typeof error === 'object' && 'stack' in error ? error.stack : null;
|
|
100
|
+
|
|
101
|
+
return (
|
|
102
|
+
<ErrorOverlayStyled>
|
|
103
|
+
<p>Something went wrong.</p>
|
|
104
|
+
<details>
|
|
105
|
+
<summary>{message as ReactNode}</summary>
|
|
106
|
+
{stack as ReactNode}
|
|
107
|
+
</details>
|
|
108
|
+
</ErrorOverlayStyled>
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const ErrorOverlayStyled = styled.div`
|
|
113
|
+
background: white;
|
|
114
|
+
padding-block: 10px;
|
|
115
|
+
|
|
116
|
+
> p {
|
|
117
|
+
margin: 0;
|
|
118
|
+
text-align: center;
|
|
119
|
+
font-size: 20px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
details {
|
|
123
|
+
color: red;
|
|
124
|
+
white-space: pre-wrap;
|
|
125
|
+
}
|
|
126
|
+
`;
|
|
@@ -77,8 +77,25 @@ export const workspaceDefaultProperties: RequiredWorkspacePreferences = {
|
|
|
77
77
|
} satisfies Required<WorkspacePreferences['display']>,
|
|
78
78
|
|
|
79
79
|
axis: {
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
labelStyle: {
|
|
81
|
+
fontSize: 10,
|
|
82
|
+
},
|
|
83
|
+
secondaryTicks: {
|
|
84
|
+
enabled: true,
|
|
85
|
+
tickStyle: {
|
|
86
|
+
strokeWidth: 1,
|
|
87
|
+
strokeOpacity: 1,
|
|
88
|
+
stroke: '#000000',
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
primaryTicks: {
|
|
92
|
+
textStyle: { fontSize: 10 },
|
|
93
|
+
tickStyle: {
|
|
94
|
+
strokeWidth: 1,
|
|
95
|
+
strokeOpacity: 1,
|
|
96
|
+
stroke: '#000000',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
82
99
|
gridlines1D: {
|
|
83
100
|
primary: {
|
|
84
101
|
enabled: true,
|
|
@@ -2,6 +2,7 @@ import type {
|
|
|
2
2
|
Spectrum1D,
|
|
3
3
|
SpectrumOneDimensionColor,
|
|
4
4
|
} from '@zakodium/nmrium-core';
|
|
5
|
+
import { sliceData1D } from '@zakodium/nmrium-core';
|
|
5
6
|
import { Filters1DManager } from 'nmr-processing';
|
|
6
7
|
|
|
7
8
|
import type { UsedColors } from '../../../types/UsedColors.js';
|
|
@@ -46,15 +47,18 @@ export function initiateDatum1D(
|
|
|
46
47
|
},
|
|
47
48
|
};
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
spectrumObj.customInfo = { ...spectrum.customInfo };
|
|
50
|
+
// Now, processings can happen before loading in component
|
|
51
|
+
if (!spectrumObj.originalInfo) {
|
|
52
|
+
spectrumObj.originalInfo = structuredClone(spectrumObj.info);
|
|
53
|
+
}
|
|
54
54
|
|
|
55
55
|
spectrumObj.data = convertDataToFloat64Array(spectrum.data);
|
|
56
|
+
if (!spectrumObj.originalData) {
|
|
57
|
+
spectrumObj.originalData = sliceData1D(spectrumObj.data);
|
|
58
|
+
}
|
|
56
59
|
|
|
57
|
-
spectrumObj.
|
|
60
|
+
spectrumObj.meta = { ...spectrum.meta };
|
|
61
|
+
spectrumObj.customInfo = { ...spectrum.customInfo };
|
|
58
62
|
|
|
59
63
|
spectrumObj.filters = initiateFilters(spectrum?.filters); //array of object {name: "FilterName", options: FilterOptions = {value | object} }
|
|
60
64
|
|
|
@@ -81,8 +85,10 @@ export function initiateDatum1D(
|
|
|
81
85
|
});
|
|
82
86
|
spectrumObj.ranges = initiateRanges(spectrum, spectrumObj, rangesOptions);
|
|
83
87
|
|
|
84
|
-
|
|
85
|
-
|
|
88
|
+
if (!spectrumObj.processings) {
|
|
89
|
+
//reapply filters after load the original data
|
|
90
|
+
Filters1DManager.reapplyFilters(spectrumObj);
|
|
91
|
+
}
|
|
86
92
|
|
|
87
93
|
return spectrumObj;
|
|
88
94
|
}
|
|
@@ -48,6 +48,7 @@ export function autoPeakPicking(
|
|
|
48
48
|
sensitivity: 100,
|
|
49
49
|
shape: defaultPeakShape,
|
|
50
50
|
noiseLevel: noise * noiseFactor,
|
|
51
|
+
maxAbsoluteRatio: minMaxRatio, // Threshold to determine if a given peak should be considered as a noise
|
|
51
52
|
minMaxRatio, // Threshold to determine if a given peak should be considered as a noise
|
|
52
53
|
realTopDetection: true,
|
|
53
54
|
smoothY: false,
|
|
@@ -36,6 +36,9 @@ export function optimizePeaks(
|
|
|
36
36
|
groupingFactor: 10,
|
|
37
37
|
stages: [
|
|
38
38
|
{
|
|
39
|
+
// Stage 1: local stabilization
|
|
40
|
+
factorLimits: 2,
|
|
41
|
+
maxNumberOfPeaks: 40,
|
|
39
42
|
optimization: {
|
|
40
43
|
kind: 'lm',
|
|
41
44
|
options: { maxIterations: 20, errorTolerance: 1e-3 },
|
|
@@ -43,98 +46,100 @@ export function optimizePeaks(
|
|
|
43
46
|
parameters: {
|
|
44
47
|
fwhm: {
|
|
45
48
|
optimize: true,
|
|
46
|
-
min: (peak: any) => (peak.shape?.fwhm ?? 0)
|
|
49
|
+
min: (peak: any) => (peak.shape?.fwhm ?? 0) * 0.5,
|
|
47
50
|
max: (peak: any) => (peak.shape?.fwhm ?? 0) * 2,
|
|
48
51
|
},
|
|
49
52
|
mu: { optimize: false },
|
|
50
53
|
x: { optimize: false },
|
|
51
54
|
y: {
|
|
52
55
|
optimize: true,
|
|
53
|
-
init: (peak: any) => peak.y
|
|
56
|
+
init: (peak: any) => peak.y,
|
|
54
57
|
},
|
|
55
58
|
},
|
|
56
59
|
},
|
|
57
60
|
{
|
|
61
|
+
factorLimits: 2,
|
|
62
|
+
maxNumberOfPeaks: 40,
|
|
58
63
|
optimization: {
|
|
59
64
|
kind: 'lm',
|
|
60
|
-
options: { maxIterations: 20, errorTolerance:
|
|
65
|
+
options: { maxIterations: 20, errorTolerance: 1e-3 },
|
|
61
66
|
},
|
|
62
67
|
parameters: {
|
|
63
68
|
fwhm: {
|
|
64
69
|
optimize: true,
|
|
65
|
-
min: (peak: any) => (peak.shape?.fwhm ?? 0)
|
|
70
|
+
min: (peak: any) => (peak.shape?.fwhm ?? 0) * 0.5,
|
|
66
71
|
max: (peak: any) => (peak.shape?.fwhm ?? 0) * 2,
|
|
67
72
|
},
|
|
68
73
|
mu: { optimize: false },
|
|
69
74
|
x: { optimize: false },
|
|
70
75
|
y: {
|
|
71
76
|
optimize: true,
|
|
77
|
+
init: (peak: any) => peak.y,
|
|
72
78
|
},
|
|
73
79
|
},
|
|
74
80
|
},
|
|
75
81
|
{
|
|
82
|
+
// Stage 2: regroup into the real overlapping cluster
|
|
83
|
+
factorLimits: 2,
|
|
84
|
+
maxNumberOfPeaks: 40,
|
|
76
85
|
optimization: {
|
|
77
86
|
kind: 'lm',
|
|
78
|
-
options: { maxIterations:
|
|
87
|
+
options: { maxIterations: 25, errorTolerance: 1e-4 },
|
|
79
88
|
},
|
|
80
89
|
parameters: {
|
|
81
90
|
fwhm: {
|
|
82
91
|
optimize: true,
|
|
83
|
-
min: (peak: any) => (peak.shape?.fwhm ?? 0)
|
|
92
|
+
min: (peak: any) => (peak.shape?.fwhm ?? 0) * 0.5,
|
|
84
93
|
max: (peak: any) => (peak.shape?.fwhm ?? 0) * 2,
|
|
85
94
|
},
|
|
86
95
|
mu: { optimize: true },
|
|
87
96
|
x: { optimize: false },
|
|
88
|
-
y: {
|
|
89
|
-
optimize: true,
|
|
90
|
-
},
|
|
97
|
+
y: { optimize: true },
|
|
91
98
|
},
|
|
92
99
|
},
|
|
93
100
|
{
|
|
101
|
+
// Stage 3: final polish
|
|
102
|
+
factorLimits: 2,
|
|
103
|
+
maxNumberOfPeaks: 40,
|
|
94
104
|
optimization: {
|
|
95
105
|
kind: 'lm',
|
|
96
|
-
options: { maxIterations:
|
|
106
|
+
options: { maxIterations: 30, errorTolerance: 1e-5 },
|
|
97
107
|
},
|
|
98
108
|
parameters: {
|
|
99
109
|
fwhm: {
|
|
100
110
|
optimize: true,
|
|
101
|
-
min: (peak: any) => (peak.shape?.fwhm ?? 0)
|
|
102
|
-
max: (peak: any) => (peak.shape?.fwhm ?? 0) *
|
|
111
|
+
min: (peak: any) => (peak.shape?.fwhm ?? 0) * 0.5,
|
|
112
|
+
max: (peak: any) => (peak.shape?.fwhm ?? 0) * 2,
|
|
103
113
|
},
|
|
104
114
|
mu: { optimize: true },
|
|
105
|
-
x: {
|
|
106
|
-
y: { optimize: true },
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
optimization: {
|
|
111
|
-
kind: 'lm',
|
|
112
|
-
options: { maxIterations: 20, errorTolerance: 1e-4 },
|
|
113
|
-
},
|
|
114
|
-
parameters: {
|
|
115
|
-
fwhm: {
|
|
115
|
+
x: {
|
|
116
116
|
optimize: true,
|
|
117
|
-
min: (peak: any) => (peak.shape?.fwhm ?? 0) /
|
|
118
|
-
max: (peak: any) => (peak.shape?.fwhm ?? 0)
|
|
117
|
+
min: (peak: any) => peak.x - (peak.shape?.fwhm ?? 0) / 4,
|
|
118
|
+
max: (peak: any) => peak.x + (peak.shape?.fwhm ?? 0) / 4,
|
|
119
119
|
},
|
|
120
|
-
mu: { optimize: false },
|
|
121
|
-
x: { optimize: true },
|
|
122
120
|
y: { optimize: true },
|
|
123
121
|
},
|
|
124
122
|
},
|
|
125
123
|
{
|
|
124
|
+
// Stage 3: final polish
|
|
125
|
+
factorLimits: 2,
|
|
126
|
+
maxNumberOfPeaks: 40,
|
|
126
127
|
optimization: {
|
|
127
128
|
kind: 'lm',
|
|
128
|
-
options: { maxIterations:
|
|
129
|
+
options: { maxIterations: 30, errorTolerance: 1e-5 },
|
|
129
130
|
},
|
|
130
131
|
parameters: {
|
|
131
132
|
fwhm: {
|
|
132
133
|
optimize: true,
|
|
133
|
-
min: (peak: any) => (peak.shape?.fwhm ?? 0)
|
|
134
|
+
min: (peak: any) => (peak.shape?.fwhm ?? 0) * 0.5,
|
|
134
135
|
max: (peak: any) => (peak.shape?.fwhm ?? 0) * 2,
|
|
135
136
|
},
|
|
136
137
|
mu: { optimize: true },
|
|
137
|
-
x: {
|
|
138
|
+
x: {
|
|
139
|
+
optimize: true,
|
|
140
|
+
min: (peak: any) => peak.x - (peak.shape?.fwhm ?? 0) / 4,
|
|
141
|
+
max: (peak: any) => peak.x + (peak.shape?.fwhm ?? 0) / 4,
|
|
142
|
+
},
|
|
138
143
|
y: { optimize: true },
|
|
139
144
|
},
|
|
140
145
|
},
|