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,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { yupResolver } from '@hookform/resolvers/yup';
|
|
1
|
+
import { revalidateLogic } from '@tanstack/react-form';
|
|
3
2
|
import type { Range } from '@zakodium/nmr-types';
|
|
4
3
|
import type { CSSProperties } from 'react';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
4
|
+
import { useMemo } from 'react';
|
|
5
|
+
import { useFormContext, useWatch } from 'react-hook-form';
|
|
6
|
+
import { AppForm, useForm } from 'react-science/ui';
|
|
7
|
+
import { z } from 'zod/v4';
|
|
8
|
+
import type { CheckParams } from 'zod/v4/core';
|
|
8
9
|
|
|
9
|
-
import { NumberInput2Controller } from '../../../../elements/NumberInput2Controller.js';
|
|
10
10
|
import { useTabsController } from '../../../../elements/TabsProvider.js';
|
|
11
11
|
import { useActiveNucleusTab } from '../../../../hooks/useActiveNucleusTab.js';
|
|
12
12
|
import { usePanelPreferences } from '../../../../hooks/usePanelPreferences.js';
|
|
@@ -44,29 +44,41 @@ export function NewSignalTab(props: NewSignalTabProps) {
|
|
|
44
44
|
const activeTab = useActiveNucleusTab();
|
|
45
45
|
const { tablePreferences } = usePanelPreferences('ranges', activeTab);
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
const schemaFormValidation = useMemo(() => {
|
|
48
|
+
return getSignalValidationSchema(range);
|
|
49
|
+
}, [range]);
|
|
50
|
+
|
|
51
|
+
function saveHandler({ delta }: z.infer<typeof schemaFormValidation>) {
|
|
48
52
|
const newSignal = {
|
|
49
53
|
multiplicity: 'm',
|
|
50
54
|
kind: 'signal',
|
|
51
|
-
delta
|
|
55
|
+
delta,
|
|
52
56
|
js: [{ multiplicity: 'm', coupling: '' }],
|
|
53
57
|
};
|
|
54
|
-
const _signals = signals.slice().concat(newSignal);
|
|
55
58
|
|
|
59
|
+
const _signals = [...signals, newSignal];
|
|
56
60
|
setValue('signals', _signals);
|
|
57
61
|
selectTab(_signals.length - 1);
|
|
58
62
|
}
|
|
59
|
-
|
|
63
|
+
|
|
64
|
+
const form = useForm({
|
|
60
65
|
defaultValues: {
|
|
61
|
-
delta: (range.from + range.to) / 2,
|
|
66
|
+
delta: String((range.from + range.to) / 2),
|
|
67
|
+
},
|
|
68
|
+
onSubmit: ({ value }) => {
|
|
69
|
+
const parsedValues = schemaFormValidation.parse(value);
|
|
70
|
+
saveHandler(parsedValues);
|
|
71
|
+
},
|
|
72
|
+
validationLogic: revalidateLogic({ modeAfterSubmission: 'change' }),
|
|
73
|
+
validators: {
|
|
74
|
+
onDynamic: schemaFormValidation,
|
|
62
75
|
},
|
|
63
|
-
resolver: yupResolver(getSignalValidationSchema(range)),
|
|
64
76
|
});
|
|
65
77
|
|
|
66
78
|
useEvent({
|
|
67
79
|
onClick: ({ xPPM, shiftKey }) => {
|
|
68
80
|
if (signalIndex === -1 && shiftKey) {
|
|
69
|
-
reset({ delta: xPPM });
|
|
81
|
+
form.reset({ delta: String(xPPM) });
|
|
70
82
|
}
|
|
71
83
|
},
|
|
72
84
|
onBrushEnd: (options) => {
|
|
@@ -75,65 +87,53 @@ export function NewSignalTab(props: NewSignalTabProps) {
|
|
|
75
87
|
shiftKey,
|
|
76
88
|
} = options;
|
|
77
89
|
if (signalIndex === -1 && shiftKey) {
|
|
78
|
-
reset({ delta: (to - from) / 2 + from });
|
|
90
|
+
form.reset({ delta: String((to - from) / 2 + from) });
|
|
79
91
|
}
|
|
80
92
|
},
|
|
81
93
|
});
|
|
82
94
|
|
|
83
|
-
useEffect(() => {
|
|
84
|
-
requestAnimationFrame(() => {
|
|
85
|
-
setTimeout(() => {
|
|
86
|
-
setFocus('delta', { shouldSelect: true });
|
|
87
|
-
}, 0);
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
|
|
91
95
|
return (
|
|
92
96
|
<div style={styles.container}>
|
|
93
97
|
<div style={styles.innerContainer}>
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
{
|
|
97
|
-
|
|
98
|
-
tablePreferences.from.format,
|
|
99
|
-
)} ppm - ${formatNumber(range.to, tablePreferences.to.format)} ppm`}
|
|
100
|
-
]:
|
|
101
|
-
</p>
|
|
102
|
-
<NumberInput2Controller
|
|
103
|
-
control={control}
|
|
104
|
-
name="delta"
|
|
105
|
-
placeholder={`𝛅(ppm)`}
|
|
106
|
-
autoSelect
|
|
107
|
-
fill
|
|
108
|
-
/>
|
|
109
|
-
<Button
|
|
110
|
-
intent="success"
|
|
111
|
-
style={{
|
|
112
|
-
marginTop: '20px',
|
|
98
|
+
<AppForm
|
|
99
|
+
form={form}
|
|
100
|
+
onSubmitMeta={(event) => {
|
|
101
|
+
event.stopPropagation();
|
|
113
102
|
}}
|
|
114
|
-
onClick={() => handleSubmit(saveHandler)()}
|
|
115
103
|
>
|
|
116
|
-
|
|
117
|
-
|
|
104
|
+
<form.AppField name="delta">
|
|
105
|
+
{(field) => (
|
|
106
|
+
<field.NumericInput
|
|
107
|
+
autoFocus
|
|
108
|
+
placeholder="𝛅(ppm)"
|
|
109
|
+
label="Edit or select a delta value of new signal"
|
|
110
|
+
helpText={`Value should be in range [${formatNumber(
|
|
111
|
+
range.from,
|
|
112
|
+
tablePreferences.from.format,
|
|
113
|
+
)} ppm - ${formatNumber(range.to, tablePreferences.to.format)} ppm]`}
|
|
114
|
+
/>
|
|
115
|
+
)}
|
|
116
|
+
</form.AppField>
|
|
117
|
+
|
|
118
|
+
<form.SubmitButton intent="success">Add a signal</form.SubmitButton>
|
|
119
|
+
</AppForm>
|
|
118
120
|
</div>
|
|
119
121
|
</div>
|
|
120
122
|
);
|
|
121
123
|
}
|
|
122
124
|
|
|
123
125
|
function getSignalValidationSchema(range: Range) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
126
|
+
const params: CheckParams = {
|
|
127
|
+
error: (ctx) => {
|
|
128
|
+
const input = Number(ctx.input);
|
|
129
|
+
return `${input.toFixed(5)} ppm out of the range`;
|
|
130
|
+
},
|
|
131
|
+
};
|
|
131
132
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
.required(),
|
|
133
|
+
return z.object({
|
|
134
|
+
delta: z.coerce
|
|
135
|
+
.number<string>()
|
|
136
|
+
.min(range.from, params)
|
|
137
|
+
.max(range.to, params),
|
|
138
138
|
});
|
|
139
139
|
}
|
|
@@ -3,8 +3,9 @@ import styled from '@emotion/styled';
|
|
|
3
3
|
import { revalidateLogic } from '@tanstack/react-form';
|
|
4
4
|
import type { Workspace } from '@zakodium/nmrium-core';
|
|
5
5
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
6
|
-
import {
|
|
6
|
+
import { AppForm, useForm } from 'react-science/ui';
|
|
7
7
|
import { match } from 'ts-pattern';
|
|
8
|
+
import { z } from 'zod';
|
|
8
9
|
|
|
9
10
|
import { usePreferences } from '../../../context/PreferencesContext.js';
|
|
10
11
|
import ErrorOverlay from '../../../main/ErrorOverlay.tsx';
|
|
@@ -60,7 +61,9 @@ interface GeneralSettingsProps extends Omit<
|
|
|
60
61
|
onSave: (values?: Partial<Workspace>) => void;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
|
-
|
|
64
|
+
const metaSchema = z.enum(['apply', 'save']);
|
|
65
|
+
type FormMeta = z.input<typeof metaSchema>;
|
|
66
|
+
const onSubmitMeta: FormMeta = 'apply';
|
|
64
67
|
|
|
65
68
|
function GeneralSettings(props: GeneralSettingsProps) {
|
|
66
69
|
const { close, height, onSave } = props;
|
|
@@ -74,10 +77,12 @@ function GeneralSettings(props: GeneralSettingsProps) {
|
|
|
74
77
|
},
|
|
75
78
|
validationLogic: revalidateLogic({ mode: 'change' }),
|
|
76
79
|
defaultValues,
|
|
77
|
-
|
|
78
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
79
|
-
onSubmitMeta: 'apply' as FormMeta,
|
|
80
|
+
onSubmitMeta,
|
|
80
81
|
onSubmit: ({ value, meta }) => {
|
|
82
|
+
meta = metaSchema.parse(meta, {
|
|
83
|
+
error: () =>
|
|
84
|
+
'Submit event must be attached to a submitter with "data-action" attribute with "apply" or "save" value',
|
|
85
|
+
});
|
|
81
86
|
const mergedValues = formValueToWorkspace(value, currentWorkspace);
|
|
82
87
|
|
|
83
88
|
match(meta)
|
|
@@ -97,30 +102,19 @@ function GeneralSettings(props: GeneralSettingsProps) {
|
|
|
97
102
|
});
|
|
98
103
|
|
|
99
104
|
return (
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}}
|
|
114
|
-
>
|
|
115
|
-
<PreventImplicitSubmit />
|
|
116
|
-
|
|
117
|
-
<GeneralSettingsErrorsOpenProvider form={form}>
|
|
118
|
-
<GeneralSettingsDialogHeader form={form} />
|
|
119
|
-
<GeneralSettingsDialogBody form={form} height={height} />
|
|
120
|
-
<GeneralSettingsDialogFooter form={form} onCancel={close} />
|
|
121
|
-
</GeneralSettingsErrorsOpenProvider>
|
|
122
|
-
</Form>
|
|
123
|
-
</form.AppForm>
|
|
105
|
+
<AppForm
|
|
106
|
+
form={form}
|
|
107
|
+
layout="inline"
|
|
108
|
+
onSubmitMeta={(event) => event.nativeEvent.submitter?.dataset.action}
|
|
109
|
+
>
|
|
110
|
+
<PreventImplicitSubmit />
|
|
111
|
+
|
|
112
|
+
<GeneralSettingsErrorsOpenProvider form={form}>
|
|
113
|
+
<GeneralSettingsDialogHeader form={form} />
|
|
114
|
+
<GeneralSettingsDialogBody form={form} height={height} />
|
|
115
|
+
<GeneralSettingsDialogFooter form={form} onCancel={close} />
|
|
116
|
+
</GeneralSettingsErrorsOpenProvider>
|
|
117
|
+
</AppForm>
|
|
124
118
|
);
|
|
125
119
|
}
|
|
126
120
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import styled from '@emotion/styled';
|
|
1
2
|
import {
|
|
2
3
|
FieldGroupSVGLineStyleFields,
|
|
3
4
|
FieldGroupSVGTextStyleFields,
|
|
@@ -9,6 +10,18 @@ import type { z } from 'zod';
|
|
|
9
10
|
import type { gridlineValidation } from '../validation/axis_tab_validation.ts';
|
|
10
11
|
import { defaultGeneralSettingsFormValues } from '../validation.ts';
|
|
11
12
|
|
|
13
|
+
// TODO: Expose the Fieldset and Legend components in react-science/ui package
|
|
14
|
+
const Fieldset = styled.fieldset`
|
|
15
|
+
display: block;
|
|
16
|
+
border-top: 1px lightgrey groove;
|
|
17
|
+
min-inline-size: min-content;
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
const Legend = styled.legend`
|
|
21
|
+
display: block;
|
|
22
|
+
padding-inline-end: 5px;
|
|
23
|
+
`;
|
|
24
|
+
|
|
12
25
|
export const AxisTab = withForm({
|
|
13
26
|
defaultValues: defaultGeneralSettingsFormValues,
|
|
14
27
|
render: ({ form }) => {
|
|
@@ -28,18 +41,69 @@ const TicksSection = withFieldGroup({
|
|
|
28
41
|
const { AppField, Section } = group;
|
|
29
42
|
|
|
30
43
|
return (
|
|
31
|
-
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
<>
|
|
45
|
+
<Section title="Axis label">
|
|
46
|
+
<FieldGroupSVGTextStyleFields
|
|
47
|
+
form={group}
|
|
48
|
+
fields="labelStyle"
|
|
49
|
+
label="Style"
|
|
50
|
+
previewText="0"
|
|
51
|
+
/>
|
|
52
|
+
</Section>
|
|
53
|
+
<Section title="Primary ticks">
|
|
54
|
+
<FieldGroupSVGTextStyleFields
|
|
55
|
+
form={group}
|
|
56
|
+
fields="primaryTicks.textStyle"
|
|
57
|
+
label="Label style"
|
|
58
|
+
previewText="0"
|
|
59
|
+
/>
|
|
60
|
+
<Fieldset>
|
|
61
|
+
<Legend>Line style</Legend>
|
|
62
|
+
<group.AppField name="primaryTicks.tickStyle.stroke">
|
|
63
|
+
{(field) => <field.ColorPicker label="Color" disableAlpha />}
|
|
64
|
+
</group.AppField>
|
|
65
|
+
<group.AppField name="primaryTicks.tickStyle.strokeOpacity">
|
|
66
|
+
{(field) => (
|
|
67
|
+
<field.NumericInput
|
|
68
|
+
label="Opacity"
|
|
69
|
+
min={0}
|
|
70
|
+
max={1}
|
|
71
|
+
minorStepSize={0.01}
|
|
72
|
+
step={0.05}
|
|
73
|
+
majorStepSize={0.1}
|
|
74
|
+
/>
|
|
75
|
+
)}
|
|
76
|
+
</group.AppField>
|
|
77
|
+
<group.AppField name="primaryTicks.tickStyle.strokeWidth">
|
|
78
|
+
{(field) => <field.NumericInput label="Width" />}
|
|
79
|
+
</group.AppField>
|
|
80
|
+
</Fieldset>
|
|
81
|
+
</Section>
|
|
82
|
+
|
|
83
|
+
<Section title="Secondary ticks">
|
|
84
|
+
<AppField name="secondaryTicks.enabled">
|
|
85
|
+
{({ Checkbox }) => <Checkbox label="Show secondary ticks" />}
|
|
86
|
+
</AppField>
|
|
87
|
+
<group.AppField name="secondaryTicks.tickStyle.stroke">
|
|
88
|
+
{(field) => <field.ColorPicker label="Color" disableAlpha />}
|
|
89
|
+
</group.AppField>
|
|
90
|
+
<group.AppField name="secondaryTicks.tickStyle.strokeOpacity">
|
|
91
|
+
{(field) => (
|
|
92
|
+
<field.NumericInput
|
|
93
|
+
label="Opacity"
|
|
94
|
+
min={0}
|
|
95
|
+
max={1}
|
|
96
|
+
minorStepSize={0.01}
|
|
97
|
+
step={0.05}
|
|
98
|
+
majorStepSize={0.1}
|
|
99
|
+
/>
|
|
100
|
+
)}
|
|
101
|
+
</group.AppField>
|
|
102
|
+
<group.AppField name="secondaryTicks.tickStyle.strokeWidth">
|
|
103
|
+
{(field) => <field.NumericInput label="Width" />}
|
|
104
|
+
</group.AppField>
|
|
105
|
+
</Section>
|
|
106
|
+
</>
|
|
43
107
|
);
|
|
44
108
|
},
|
|
45
109
|
});
|
package/src/component/modal/setting/tanstack_general_settings/validation/axis_tab_validation.ts
CHANGED
|
@@ -14,10 +14,24 @@ const gridlinesValidation = z.object({
|
|
|
14
14
|
secondary: gridlineValidation,
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
+
const primaryTicksValidation = z.object({
|
|
18
|
+
textStyle: svgTextStyleFieldsSchema,
|
|
19
|
+
tickStyle: svgLineStyleFieldsSchema.omit({
|
|
20
|
+
strokeDasharray: true,
|
|
21
|
+
}),
|
|
22
|
+
});
|
|
23
|
+
const secondaryTicksValidation = z.object({
|
|
24
|
+
enabled: z.boolean(),
|
|
25
|
+
tickStyle: svgLineStyleFieldsSchema.omit({
|
|
26
|
+
strokeDasharray: true,
|
|
27
|
+
}),
|
|
28
|
+
});
|
|
29
|
+
|
|
17
30
|
export const axisValidation = z
|
|
18
31
|
.object({
|
|
19
|
-
|
|
20
|
-
|
|
32
|
+
labelStyle: svgTextStyleFieldsSchema,
|
|
33
|
+
primaryTicks: primaryTicksValidation,
|
|
34
|
+
secondaryTicks: secondaryTicksValidation,
|
|
21
35
|
gridlines1D: gridlinesValidation,
|
|
22
36
|
gridlines2D: gridlinesValidation,
|
|
23
37
|
})
|
|
@@ -273,7 +273,7 @@ export default function useAtomAssignment() {
|
|
|
273
273
|
if (oclIDs.length > 0) {
|
|
274
274
|
// set all IDs to highlight when hovering over an atom from assignment data
|
|
275
275
|
const highlights = getHighlightsOnHover(assignments, oclIDs, [
|
|
276
|
-
spectrum,
|
|
276
|
+
...(spectrum ? [spectrum] : []),
|
|
277
277
|
...tracesSpectra,
|
|
278
278
|
]);
|
|
279
279
|
highlightedIdDsRef.current = highlights;
|
|
@@ -111,14 +111,7 @@ function PeaksPanelInner(props: PeaksPanelInnerProps) {
|
|
|
111
111
|
const filterPeaks = peaks.values.filter((peak) =>
|
|
112
112
|
isInRange(peak.x, { from, to }),
|
|
113
113
|
);
|
|
114
|
-
|
|
115
|
-
dispatch({ type: 'OPTIMIZE_PEAKS', payload: { peaks: filterPeaks } });
|
|
116
|
-
} else {
|
|
117
|
-
toaster.show({
|
|
118
|
-
message: 'optimization can be done on no more than 15 peaks',
|
|
119
|
-
intent: 'danger',
|
|
120
|
-
});
|
|
121
|
-
}
|
|
114
|
+
dispatch({ type: 'OPTIMIZE_PEAKS', payload: { peaks: filterPeaks } });
|
|
122
115
|
};
|
|
123
116
|
|
|
124
117
|
function toggleViewProperty(key: keyof FilterType<PeaksViewState, boolean>) {
|
|
@@ -110,10 +110,10 @@ export function usePeaksTableColumns(activeTab: string) {
|
|
|
110
110
|
accessor: (row) => row?.shape?.fwhm || '',
|
|
111
111
|
Cell: ({ row }: CellProps<PeakRecord>) => {
|
|
112
112
|
const fwhm = row.original?.shape?.fwhm;
|
|
113
|
-
if (fwhm) {
|
|
114
|
-
return
|
|
113
|
+
if (typeof fwhm !== 'number') {
|
|
114
|
+
return '';
|
|
115
115
|
}
|
|
116
|
-
return
|
|
116
|
+
return formatNumber(fwhm, tablePreferences.fwhm.format);
|
|
117
117
|
},
|
|
118
118
|
},
|
|
119
119
|
{
|
|
@@ -126,10 +126,10 @@ export function usePeaksTableColumns(activeTab: string) {
|
|
|
126
126
|
const mu =
|
|
127
127
|
row.original?.shape?.kind === 'pseudoVoigt' &&
|
|
128
128
|
row.original?.shape?.mu;
|
|
129
|
-
if (mu) {
|
|
130
|
-
return
|
|
129
|
+
if (typeof mu !== 'number') {
|
|
130
|
+
return '';
|
|
131
131
|
}
|
|
132
|
-
return
|
|
132
|
+
return formatNumber(mu, tablePreferences.mu.format);
|
|
133
133
|
},
|
|
134
134
|
},
|
|
135
135
|
{
|
|
@@ -143,10 +143,12 @@ export function usePeaksTableColumns(activeTab: string) {
|
|
|
143
143
|
const gamma =
|
|
144
144
|
row.original?.shape?.kind === 'generalizedLorentzian' &&
|
|
145
145
|
row.original?.shape?.gamma;
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
|
|
147
|
+
if (typeof gamma !== 'number') {
|
|
148
|
+
return '';
|
|
148
149
|
}
|
|
149
|
-
|
|
150
|
+
|
|
151
|
+
return formatNumber(gamma, tablePreferences.gamma.format);
|
|
150
152
|
},
|
|
151
153
|
},
|
|
152
154
|
{
|
|
@@ -105,25 +105,23 @@ export default function RangesTableRow(props: RangesTableRowProps) {
|
|
|
105
105
|
}, [rowData.tableMetaInfo]);
|
|
106
106
|
|
|
107
107
|
const unlinkHandler = useCallback(
|
|
108
|
-
(e: MouseEvent
|
|
108
|
+
(e: MouseEvent) => {
|
|
109
109
|
// stop propagation here to prevent enabling/disabling the assignment mode at the same time
|
|
110
110
|
if (e) {
|
|
111
111
|
e.stopPropagation();
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
const { id: rangeKey, tableMetaInfo } = rowData;
|
|
114
|
+
const { id: rangeKey, tableMetaInfo } = rowData;
|
|
116
115
|
|
|
117
|
-
|
|
116
|
+
const signalIndex = tableMetaInfo.signalIndex;
|
|
118
117
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
118
|
+
dispatch({
|
|
119
|
+
type: 'UNASSIGN_1D_SIGNAL',
|
|
120
|
+
payload: {
|
|
121
|
+
rangeKey,
|
|
122
|
+
signalIndex,
|
|
123
|
+
},
|
|
124
|
+
});
|
|
127
125
|
},
|
|
128
126
|
[dispatch, rowData],
|
|
129
127
|
);
|
|
@@ -12,7 +12,7 @@ interface SignalAssignmentsColumnProps
|
|
|
12
12
|
isActive: boolean;
|
|
13
13
|
};
|
|
14
14
|
onLink?: (a: MouseEvent, b: AssignmentsData) => void;
|
|
15
|
-
onUnlink?: (element: MouseEvent
|
|
15
|
+
onUnlink?: (element: MouseEvent) => void;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
function SignalAssignmentsColumn({
|
|
@@ -44,7 +44,7 @@ function SignalAssignmentsColumn({
|
|
|
44
44
|
onClick={assignHandler}
|
|
45
45
|
style={{ padding: '0', ...tdCss }}
|
|
46
46
|
hideRemoveAssignmentButton={!diaIDs || diaIDs.length === 0}
|
|
47
|
-
onRemove={(e) => onUnlink?.(e
|
|
47
|
+
onRemove={(e) => onUnlink?.(e)}
|
|
48
48
|
>
|
|
49
49
|
{(diaIDs?.length > 0 || assignment.isActive) && (
|
|
50
50
|
<span>{diaIDs?.length || 0}</span>
|
|
@@ -10,6 +10,7 @@ import { getLinkDelta, getLinkDim } from 'nmr-correlation';
|
|
|
10
10
|
import { memo, useCallback, useMemo, useState } from 'react';
|
|
11
11
|
import { FaFlask, FaSlidersH } from 'react-icons/fa';
|
|
12
12
|
|
|
13
|
+
import { isSpectrum2D } from '../../../data/data2d/Spectrum2D/isSpectrum2D.ts';
|
|
13
14
|
import {
|
|
14
15
|
findRange,
|
|
15
16
|
findSignal1D,
|
|
@@ -148,11 +149,10 @@ function SummaryPanel() {
|
|
|
148
149
|
// try to find a link which contains the belonging 2D signal in the spectra in view
|
|
149
150
|
if (
|
|
150
151
|
correlation.link.some((link: Link) => {
|
|
151
|
-
const spectrum = findSpectrum(
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
) as Spectrum2D;
|
|
152
|
+
const spectrum = findSpectrum(spectraData, link.experimentID, true);
|
|
153
|
+
|
|
154
|
+
if (!isSpectrum2D(spectrum)) return false;
|
|
155
|
+
|
|
156
156
|
return findSignalMatch1D(
|
|
157
157
|
spectrum,
|
|
158
158
|
link,
|
|
@@ -178,8 +178,11 @@ function SummaryPanel() {
|
|
|
178
178
|
spectraData,
|
|
179
179
|
firstLink2D.experimentID,
|
|
180
180
|
true,
|
|
181
|
-
)
|
|
181
|
+
);
|
|
182
182
|
// correlation is represented by a 2D signal
|
|
183
|
+
|
|
184
|
+
if (!isSpectrum2D(spectrum)) return false;
|
|
185
|
+
|
|
183
186
|
if (
|
|
184
187
|
findSignalMatch2D(
|
|
185
188
|
spectrum,
|
|
@@ -196,11 +199,10 @@ function SummaryPanel() {
|
|
|
196
199
|
// try to find a link which contains the belonging 2D signal in the spectra in view
|
|
197
200
|
else if (
|
|
198
201
|
correlation.link.some((link: any) => {
|
|
199
|
-
const spectrum = findSpectrum(
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
) as Spectrum2D;
|
|
202
|
+
const spectrum = findSpectrum(spectraData, link.experimentID, true);
|
|
203
|
+
|
|
204
|
+
if (!isSpectrum2D(spectrum)) return false;
|
|
205
|
+
|
|
204
206
|
return findSignalMatch2D(
|
|
205
207
|
spectrum,
|
|
206
208
|
link,
|
|
@@ -2,17 +2,20 @@ import { useDispatch } from '../../context/DispatchContext.js';
|
|
|
2
2
|
import { useToaster } from '../../context/ToasterContext.js';
|
|
3
3
|
import type { AlertButton } from '../../elements/Alert.js';
|
|
4
4
|
import { useAlert } from '../../elements/Alert.js';
|
|
5
|
+
import useCheckExperimentalFeature from '../../hooks/useCheckExperimentalFeature.ts';
|
|
5
6
|
import useSpectrum from '../../hooks/useSpectrum.js';
|
|
6
7
|
import { TablePanel } from '../extra/BasicPanelStyle.js';
|
|
7
8
|
import DefaultPanelHeader from '../header/DefaultPanelHeader.js';
|
|
8
9
|
|
|
9
10
|
import { FiltersSectionsPanel } from './Filters/FiltersSectionsPanel.js';
|
|
11
|
+
import { ProcessingsSectionsPanel } from './processings_sections_panel.tsx';
|
|
10
12
|
|
|
11
13
|
export default function FiltersPanel() {
|
|
12
14
|
const dispatch = useDispatch();
|
|
13
15
|
const toaster = useToaster();
|
|
14
16
|
const { showAlert } = useAlert();
|
|
15
17
|
const { filters } = useSpectrum({ filters: [] });
|
|
18
|
+
const isExperimental = useCheckExperimentalFeature();
|
|
16
19
|
|
|
17
20
|
function handleDeleteFilter() {
|
|
18
21
|
const buttons: AlertButton[] = [
|
|
@@ -46,6 +49,13 @@ export default function FiltersPanel() {
|
|
|
46
49
|
/>
|
|
47
50
|
<div className="inner-container">
|
|
48
51
|
<FiltersSectionsPanel />
|
|
52
|
+
|
|
53
|
+
{isExperimental && (
|
|
54
|
+
<>
|
|
55
|
+
<hr />
|
|
56
|
+
<ProcessingsSectionsPanel />
|
|
57
|
+
</>
|
|
58
|
+
)}
|
|
49
59
|
</div>
|
|
50
60
|
</TablePanel>
|
|
51
61
|
);
|