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
|
@@ -22,6 +22,7 @@ interface KeyModifiers {
|
|
|
22
22
|
}
|
|
23
23
|
interface KeyModifiersState extends KeyModifiers {
|
|
24
24
|
modifiersKey: ModifiersKey | null;
|
|
25
|
+
isPrimary: boolean;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
const defaultKeyModifiersState: KeyModifiersState = {
|
|
@@ -29,6 +30,7 @@ const defaultKeyModifiersState: KeyModifiersState = {
|
|
|
29
30
|
shiftKey: false,
|
|
30
31
|
altKey: false,
|
|
31
32
|
modifiersKey: null,
|
|
33
|
+
isPrimary: false,
|
|
32
34
|
};
|
|
33
35
|
|
|
34
36
|
const KeyModifierContext = createContext<KeyModifiersState>(
|
|
@@ -74,6 +76,11 @@ function getModifiersKey(event: EventModifierKeys) {
|
|
|
74
76
|
return toModifiersKey(keyModifiers);
|
|
75
77
|
}
|
|
76
78
|
|
|
79
|
+
export function useIsPrimaryKeyActivated() {
|
|
80
|
+
const { primaryKeyIdentifier } = useMapKeyModifiers();
|
|
81
|
+
return primaryKeyIdentifier === 'shift[false]_ctrl[false]_alt[false]';
|
|
82
|
+
}
|
|
83
|
+
|
|
77
84
|
export function useMapKeyModifiers() {
|
|
78
85
|
const {
|
|
79
86
|
current: {
|
|
@@ -91,27 +98,35 @@ export function useMapKeyModifiers() {
|
|
|
91
98
|
}, [invert]);
|
|
92
99
|
}
|
|
93
100
|
|
|
101
|
+
function isPrimaryActive(shiftKey: boolean, invert: boolean): boolean {
|
|
102
|
+
const primaryKey = getPrimaryKey(invert);
|
|
103
|
+
const shiftOnlyKey = toModifiersKey({
|
|
104
|
+
shiftKey,
|
|
105
|
+
ctrlKey: false,
|
|
106
|
+
altKey: false,
|
|
107
|
+
});
|
|
108
|
+
return shiftOnlyKey === primaryKey;
|
|
109
|
+
}
|
|
110
|
+
|
|
94
111
|
export function KeyModifiersProvider({ children }: KeyModifierProviderProps) {
|
|
95
|
-
const [modifiers, setModifiers] = useState<KeyModifiersState>(
|
|
96
|
-
defaultKeyModifiersState,
|
|
97
|
-
);
|
|
98
112
|
const {
|
|
99
113
|
current: {
|
|
100
114
|
general: { invert },
|
|
101
115
|
},
|
|
102
116
|
} = usePreferences();
|
|
117
|
+
const [modifiers, setModifiers] = useState<KeyModifiers>(
|
|
118
|
+
defaultKeyModifiersState,
|
|
119
|
+
);
|
|
103
120
|
|
|
104
121
|
useEffect(() => {
|
|
105
122
|
function handleKeyDown(event: KeyboardEvent) {
|
|
106
123
|
const keyModifiers = getModifiers(event);
|
|
107
|
-
|
|
108
|
-
setModifiers({ ...keyModifiers, modifiersKey });
|
|
124
|
+
setModifiers(keyModifiers);
|
|
109
125
|
}
|
|
110
126
|
|
|
111
127
|
function handleKeyUp(event: KeyboardEvent) {
|
|
112
128
|
const keyModifiers = getModifiers(event);
|
|
113
|
-
|
|
114
|
-
setModifiers({ ...keyModifiers, modifiersKey });
|
|
129
|
+
setModifiers(keyModifiers);
|
|
115
130
|
}
|
|
116
131
|
|
|
117
132
|
document.addEventListener('keydown', handleKeyDown);
|
|
@@ -123,8 +138,17 @@ export function KeyModifiersProvider({ children }: KeyModifierProviderProps) {
|
|
|
123
138
|
};
|
|
124
139
|
}, [invert]);
|
|
125
140
|
|
|
141
|
+
const state = useMemo(() => {
|
|
142
|
+
const modifiersKey = toModifiersKey(modifiers);
|
|
143
|
+
return {
|
|
144
|
+
...modifiers,
|
|
145
|
+
isPrimary: isPrimaryActive(modifiers.shiftKey, invert),
|
|
146
|
+
modifiersKey,
|
|
147
|
+
};
|
|
148
|
+
}, [invert, modifiers]);
|
|
149
|
+
|
|
126
150
|
return (
|
|
127
|
-
<KeyModifierContext.Provider value={
|
|
151
|
+
<KeyModifierContext.Provider value={state}>
|
|
128
152
|
{children}
|
|
129
153
|
</KeyModifierContext.Provider>
|
|
130
154
|
);
|
|
@@ -51,6 +51,8 @@ function isVerticalAxis(axisPosition: AxisPosition) {
|
|
|
51
51
|
|
|
52
52
|
function BaseLine(props: BaseLineProps) {
|
|
53
53
|
const { axisPosition, tickLength = 6, scale } = props;
|
|
54
|
+
const { primaryTicks } = useTicksConfig();
|
|
55
|
+
|
|
54
56
|
const [x1, x2] = scale.range();
|
|
55
57
|
const sign = ['left', 'top'].includes(axisPosition) ? -1 : 1;
|
|
56
58
|
|
|
@@ -60,12 +62,20 @@ function BaseLine(props: BaseLineProps) {
|
|
|
60
62
|
path = `M${sign * tickLength},${x2} H0 V${x1} H${sign * tickLength}`;
|
|
61
63
|
}
|
|
62
64
|
|
|
63
|
-
return
|
|
65
|
+
return (
|
|
66
|
+
<path
|
|
67
|
+
d={path}
|
|
68
|
+
stroke="black"
|
|
69
|
+
fill="none"
|
|
70
|
+
className="domain"
|
|
71
|
+
{...primaryTicks.tickStyle}
|
|
72
|
+
/>
|
|
73
|
+
);
|
|
64
74
|
}
|
|
65
75
|
|
|
66
76
|
function Tickets(props: TicketsProps) {
|
|
67
77
|
const { ticks, tickLength = 6, axisPosition } = props;
|
|
68
|
-
const
|
|
78
|
+
const { primaryTicks, secondaryTicks } = useTicksConfig();
|
|
69
79
|
|
|
70
80
|
if (!Array.isArray(ticks) || ticks.length === 0) return null;
|
|
71
81
|
|
|
@@ -127,19 +137,31 @@ function Tickets(props: TicketsProps) {
|
|
|
127
137
|
transform={`translate(${isVertical ? `0,${position}` : `${position},0`})`}
|
|
128
138
|
className="tick"
|
|
129
139
|
>
|
|
130
|
-
{
|
|
131
|
-
<line
|
|
140
|
+
{secondaryTicks.enabled && isFirst && (
|
|
141
|
+
<line
|
|
142
|
+
{...positionSecondaryFirstLineConfig}
|
|
143
|
+
stroke="black"
|
|
144
|
+
{...secondaryTicks.tickStyle}
|
|
145
|
+
/>
|
|
132
146
|
)}
|
|
133
147
|
|
|
134
|
-
<line
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
148
|
+
<line
|
|
149
|
+
{...positionPrimaryLineConfig}
|
|
150
|
+
stroke="black"
|
|
151
|
+
{...primaryTicks.tickStyle}
|
|
152
|
+
/>
|
|
153
|
+
|
|
154
|
+
{secondaryTicks.enabled && (
|
|
155
|
+
<line
|
|
156
|
+
{...positionSecondaryLineConfig}
|
|
157
|
+
stroke="black"
|
|
158
|
+
{...secondaryTicks.tickStyle}
|
|
159
|
+
/>
|
|
138
160
|
)}
|
|
139
161
|
|
|
140
162
|
<SVGStyledText
|
|
141
163
|
fill="black"
|
|
142
|
-
{...
|
|
164
|
+
{...primaryTicks.textStyle}
|
|
143
165
|
{...positionTextConfig}
|
|
144
166
|
>
|
|
145
167
|
{label}
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
Overlay2,
|
|
13
13
|
mergeRefs,
|
|
14
14
|
} from '@blueprintjs/core';
|
|
15
|
-
import { SmallCross } from '@blueprintjs/icons';
|
|
16
15
|
import { Global } from '@emotion/react';
|
|
17
16
|
import styled from '@emotion/styled';
|
|
18
17
|
import type { MouseEvent, ReactNode, RefObject } from 'react';
|
|
@@ -224,7 +223,7 @@ function CloseButton(
|
|
|
224
223
|
<Button
|
|
225
224
|
aria-label="Close"
|
|
226
225
|
className={Classes.DIALOG_CLOSE_BUTTON}
|
|
227
|
-
icon=
|
|
226
|
+
icon="small-cross"
|
|
228
227
|
variant="minimal"
|
|
229
228
|
onClick={onClose}
|
|
230
229
|
/>
|
|
@@ -207,7 +207,7 @@ const InnerHeader = styled.div`
|
|
|
207
207
|
`;
|
|
208
208
|
|
|
209
209
|
interface BaseSectionProps {
|
|
210
|
-
title:
|
|
210
|
+
title: ReactNode;
|
|
211
211
|
serial?: number;
|
|
212
212
|
rightElement?: ReactNode | ((isOpen: boolean) => ReactNode);
|
|
213
213
|
leftElement?: ReactNode | ((isOpen: boolean) => ReactNode);
|
|
@@ -216,14 +216,14 @@ interface BaseSectionProps {
|
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
interface SectionItemProps extends BaseSectionProps {
|
|
219
|
-
id
|
|
219
|
+
id: string;
|
|
220
220
|
index?: number;
|
|
221
221
|
onClick?: (id: any, event?: MouseEvent<HTMLDivElement>) => void;
|
|
222
222
|
children?: ReactNode | ((options: { isOpen?: boolean }) => ReactNode);
|
|
223
223
|
isOpen: boolean;
|
|
224
224
|
sticky?: boolean;
|
|
225
225
|
onReorder?: (sourceId: number, targetId: number) => void;
|
|
226
|
-
dragLabel?:
|
|
226
|
+
dragLabel?: ReactNode;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
interface SectionProps {
|
|
@@ -271,7 +271,7 @@ function SectionItem(props: SectionItemProps) {
|
|
|
271
271
|
const {
|
|
272
272
|
title,
|
|
273
273
|
dragLabel = title,
|
|
274
|
-
id
|
|
274
|
+
id,
|
|
275
275
|
onClick,
|
|
276
276
|
serial,
|
|
277
277
|
rightElement,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DialogFooter } from '@blueprintjs/core';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { AppForm, Button, useForm } from 'react-science/ui';
|
|
4
4
|
import { z } from 'zod/v4';
|
|
5
5
|
|
|
6
6
|
import { ExportFields } from '../../modal/setting/tanstack_general_settings/tabs/export_tab.fields.tsx';
|
|
@@ -67,36 +67,27 @@ function InnerExportOptionsModal(props: InnerExportOptionsModalProps) {
|
|
|
67
67
|
canEscapeKeyClose
|
|
68
68
|
autoFocus
|
|
69
69
|
>
|
|
70
|
-
<form
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
</Button>
|
|
92
|
-
<form.SubmitButton intent="success">
|
|
93
|
-
{confirmButtonText}
|
|
94
|
-
</form.SubmitButton>
|
|
95
|
-
</>
|
|
96
|
-
}
|
|
97
|
-
/>
|
|
98
|
-
</Form>
|
|
99
|
-
</form.AppForm>
|
|
70
|
+
<AppForm form={form} layout="inline">
|
|
71
|
+
<StyledDialogBody>
|
|
72
|
+
<ExportFields form={form} fields="values" />
|
|
73
|
+
</StyledDialogBody>
|
|
74
|
+
<DialogFooter
|
|
75
|
+
actions={
|
|
76
|
+
<>
|
|
77
|
+
<Button
|
|
78
|
+
variant="outlined"
|
|
79
|
+
intent="danger"
|
|
80
|
+
onClick={() => onCloseDialog?.()}
|
|
81
|
+
>
|
|
82
|
+
Cancel
|
|
83
|
+
</Button>
|
|
84
|
+
<form.SubmitButton intent="success">
|
|
85
|
+
{confirmButtonText}
|
|
86
|
+
</form.SubmitButton>
|
|
87
|
+
</>
|
|
88
|
+
}
|
|
89
|
+
/>
|
|
90
|
+
</AppForm>
|
|
100
91
|
</StandardDialog>
|
|
101
92
|
);
|
|
102
93
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { Classes, FormGroup, MenuItem, NumericInput } from '@blueprintjs/core';
|
|
2
|
+
import type { ItemRenderer } from '@blueprintjs/select';
|
|
3
|
+
import { Select } from '@blueprintjs/select';
|
|
4
|
+
import styled from '@emotion/styled';
|
|
5
|
+
import { revalidateLogic } from '@tanstack/react-form';
|
|
6
|
+
import { AppForm, Button, TooltipHelpContent, useForm } from 'react-science/ui';
|
|
7
|
+
import { z } from 'zod/v4';
|
|
5
8
|
|
|
6
9
|
import { useDispatch } from '../context/DispatchContext.js';
|
|
7
10
|
import { useToaster } from '../context/ToasterContext.js';
|
|
8
|
-
import Label from '../elements/Label.js';
|
|
9
|
-
import { NumberInput2Controller } from '../elements/NumberInput2Controller.js';
|
|
10
|
-
import { Select2Controller } from '../elements/Select2Controller.js';
|
|
11
11
|
import { useActiveNucleusTab } from '../hooks/useActiveNucleusTab.ts';
|
|
12
12
|
import { useActiveSpectra } from '../hooks/useActiveSpectra.ts';
|
|
13
13
|
import {
|
|
@@ -16,12 +16,14 @@ import {
|
|
|
16
16
|
} from '../hooks/useCheckPointsNumberInWindowArea.js';
|
|
17
17
|
import { usePanelPreferences } from '../hooks/usePanelPreferences.ts';
|
|
18
18
|
|
|
19
|
-
import { headerLabelStyle } from './Header.js';
|
|
20
|
-
import { HeaderWrapper } from './HeaderWrapper.js';
|
|
21
|
-
|
|
22
19
|
type Direction = 'positive' | 'negative' | 'both';
|
|
23
20
|
|
|
24
|
-
|
|
21
|
+
interface Item {
|
|
22
|
+
label: string;
|
|
23
|
+
value: Direction;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const LookFor: Item[] = [
|
|
25
27
|
{
|
|
26
28
|
label: 'Positive',
|
|
27
29
|
value: 'positive',
|
|
@@ -36,48 +38,78 @@ const LookFor: Array<{ label: string; value: Direction }> = [
|
|
|
36
38
|
},
|
|
37
39
|
];
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
maxNumberOfPeaks: number
|
|
41
|
-
minMaxRatio: number
|
|
42
|
-
noiseFactor: number
|
|
43
|
-
direction:
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const validationSchema = Yup.object().shape({
|
|
47
|
-
maxNumberOfPeaks: Yup.number().min(1).required(),
|
|
48
|
-
minMaxRatio: Yup.number().min(0).required(),
|
|
49
|
-
noiseFactor: Yup.number().min(0).required(),
|
|
50
|
-
direction: Yup.mixed<Direction>()
|
|
51
|
-
.oneOf(['both', 'negative', 'positive'])
|
|
52
|
-
.required(),
|
|
41
|
+
const validationSchema = z.object({
|
|
42
|
+
maxNumberOfPeaks: z.coerce.number<string>().min(1),
|
|
43
|
+
minMaxRatio: z.coerce.number<string>().min(0),
|
|
44
|
+
noiseFactor: z.coerce.number<string>().min(0),
|
|
45
|
+
direction: z.enum(['both', 'negative', 'positive']),
|
|
53
46
|
});
|
|
54
47
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
48
|
+
type AutoPeakPickingOptionsInput = z.input<typeof validationSchema>;
|
|
49
|
+
type AutoPeakPickingOptions = z.output<typeof validationSchema>;
|
|
50
|
+
|
|
51
|
+
const defaultValues: AutoPeakPickingOptionsInput = {
|
|
52
|
+
maxNumberOfPeaks: '50',
|
|
53
|
+
minMaxRatio: '0.05',
|
|
54
|
+
noiseFactor: '3',
|
|
59
55
|
direction: 'both',
|
|
60
56
|
};
|
|
61
57
|
|
|
58
|
+
const AppFormContainer = styled(AppForm)`
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: row;
|
|
61
|
+
gap: 10px;
|
|
62
|
+
align-items: center;
|
|
63
|
+
|
|
64
|
+
.${Classes.FORM_GROUP} {
|
|
65
|
+
margin-bottom: 0;
|
|
66
|
+
}
|
|
67
|
+
`;
|
|
68
|
+
|
|
69
|
+
const renderDirection: ItemRenderer<Item> = (
|
|
70
|
+
direction,
|
|
71
|
+
{ handleClick, handleFocus, modifiers },
|
|
72
|
+
) => {
|
|
73
|
+
if (!modifiers.matchesPredicate) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<MenuItem
|
|
79
|
+
active={modifiers.active}
|
|
80
|
+
disabled={modifiers.disabled}
|
|
81
|
+
key={direction.value}
|
|
82
|
+
label={direction.label}
|
|
83
|
+
onClick={handleClick}
|
|
84
|
+
onFocus={handleFocus}
|
|
85
|
+
roleStructure="listoption"
|
|
86
|
+
text={direction.label}
|
|
87
|
+
/>
|
|
88
|
+
);
|
|
89
|
+
};
|
|
90
|
+
|
|
62
91
|
export function AutoPeakPickingOptionPanel() {
|
|
63
92
|
const dispatch = useDispatch();
|
|
64
93
|
const hasEnoughPoints = useCheckPointsNumberInSelectedSpectra();
|
|
65
94
|
const toaster = useToaster();
|
|
66
95
|
const nucleus = useActiveNucleusTab();
|
|
67
96
|
const activeSpectra = useActiveSpectra();
|
|
68
|
-
|
|
69
97
|
const { defaultPeakShape } = usePanelPreferences('peaks', nucleus);
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
98
|
+
const isSpectraSelected = activeSpectra && activeSpectra.length > 0;
|
|
99
|
+
|
|
100
|
+
const form = useForm({
|
|
101
|
+
defaultValues,
|
|
102
|
+
validationLogic: revalidateLogic({ modeAfterSubmission: 'change' }),
|
|
103
|
+
onSubmit: ({ value }) => {
|
|
104
|
+
const parsedValues = validationSchema.parse(value);
|
|
105
|
+
handlePeakPicking(parsedValues);
|
|
106
|
+
},
|
|
107
|
+
validators: {
|
|
108
|
+
onDynamic: validationSchema,
|
|
109
|
+
},
|
|
78
110
|
});
|
|
79
111
|
|
|
80
|
-
function handlePeakPicking(values:
|
|
112
|
+
function handlePeakPicking(values: AutoPeakPickingOptions) {
|
|
81
113
|
if (hasEnoughPoints) {
|
|
82
114
|
dispatch({
|
|
83
115
|
type: 'AUTO_PEAK_PICKING',
|
|
@@ -94,69 +126,108 @@ export function AutoPeakPickingOptionPanel() {
|
|
|
94
126
|
}
|
|
95
127
|
}
|
|
96
128
|
|
|
97
|
-
const isSpectraSelected = activeSpectra && activeSpectra.length > 0;
|
|
98
129
|
return (
|
|
99
|
-
<
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
</
|
|
160
|
-
|
|
130
|
+
<AppFormContainer form={form}>
|
|
131
|
+
<form.AppField name="direction">
|
|
132
|
+
{(field) => {
|
|
133
|
+
const activeItem = LookFor.find(
|
|
134
|
+
(item) => item.value === field.state.value,
|
|
135
|
+
);
|
|
136
|
+
|
|
137
|
+
return (
|
|
138
|
+
<FormGroup label="Direction:" inline>
|
|
139
|
+
<Select<Item>
|
|
140
|
+
filterable={false}
|
|
141
|
+
items={LookFor}
|
|
142
|
+
itemRenderer={renderDirection}
|
|
143
|
+
activeItem={activeItem}
|
|
144
|
+
onItemSelect={(element) => {
|
|
145
|
+
field.handleChange(element.value);
|
|
146
|
+
}}
|
|
147
|
+
>
|
|
148
|
+
<Button
|
|
149
|
+
text={activeItem?.label}
|
|
150
|
+
endIcon="double-caret-vertical"
|
|
151
|
+
/>
|
|
152
|
+
</Select>
|
|
153
|
+
</FormGroup>
|
|
154
|
+
);
|
|
155
|
+
}}
|
|
156
|
+
</form.AppField>
|
|
157
|
+
|
|
158
|
+
<form.AppField name="maxNumberOfPeaks">
|
|
159
|
+
{(field) => (
|
|
160
|
+
<FormGroup label="Max peaks:" inline>
|
|
161
|
+
<NumericInput
|
|
162
|
+
value={field.state.value ?? ''}
|
|
163
|
+
onBlur={field.handleBlur}
|
|
164
|
+
min={1}
|
|
165
|
+
style={{ width: '60px' }}
|
|
166
|
+
stepSize={1}
|
|
167
|
+
onValueChange={(_, valueAsString) => {
|
|
168
|
+
field.handleChange(valueAsString);
|
|
169
|
+
}}
|
|
170
|
+
/>
|
|
171
|
+
</FormGroup>
|
|
172
|
+
)}
|
|
173
|
+
</form.AppField>
|
|
174
|
+
|
|
175
|
+
<form.AppField name="noiseFactor">
|
|
176
|
+
{(field) => (
|
|
177
|
+
<FormGroup label="Noise:" inline>
|
|
178
|
+
<NumericInput
|
|
179
|
+
value={field.state.value ?? ''}
|
|
180
|
+
onBlur={field.handleBlur}
|
|
181
|
+
min={1}
|
|
182
|
+
style={{ width: '60px' }}
|
|
183
|
+
stepSize={1}
|
|
184
|
+
onValueChange={(_, valueAsString) => {
|
|
185
|
+
field.handleChange(valueAsString);
|
|
186
|
+
}}
|
|
187
|
+
/>
|
|
188
|
+
</FormGroup>
|
|
189
|
+
)}
|
|
190
|
+
</form.AppField>
|
|
191
|
+
|
|
192
|
+
<form.AppField name="minMaxRatio">
|
|
193
|
+
{(field) => (
|
|
194
|
+
<FormGroup label="Ratio:" inline>
|
|
195
|
+
<NumericInput
|
|
196
|
+
value={field.state.value ?? ''}
|
|
197
|
+
onBlur={field.handleBlur}
|
|
198
|
+
style={{ width: '60px' }}
|
|
199
|
+
min={0}
|
|
200
|
+
stepSize={0.01}
|
|
201
|
+
majorStepSize={0.01}
|
|
202
|
+
minorStepSize={0.01}
|
|
203
|
+
onValueChange={(_, valueAsString) => {
|
|
204
|
+
field.handleChange(valueAsString);
|
|
205
|
+
}}
|
|
206
|
+
/>
|
|
207
|
+
</FormGroup>
|
|
208
|
+
)}
|
|
209
|
+
</form.AppField>
|
|
210
|
+
|
|
211
|
+
<div>
|
|
212
|
+
<form.SubmitButton
|
|
213
|
+
tooltipProps={
|
|
214
|
+
!isSpectraSelected
|
|
215
|
+
? {
|
|
216
|
+
intent: 'danger',
|
|
217
|
+
content: (
|
|
218
|
+
<TooltipHelpContent
|
|
219
|
+
title="Auto peak picking"
|
|
220
|
+
description="Select a one or more spectra to enable auto peak picking"
|
|
221
|
+
/>
|
|
222
|
+
),
|
|
223
|
+
}
|
|
224
|
+
: undefined
|
|
225
|
+
}
|
|
226
|
+
intent={isSpectraSelected ? 'success' : 'danger'}
|
|
227
|
+
>
|
|
228
|
+
Apply to {activeSpectra?.length} spectra
|
|
229
|
+
</form.SubmitButton>
|
|
230
|
+
</div>
|
|
231
|
+
</AppFormContainer>
|
|
161
232
|
);
|
|
162
233
|
}
|
|
@@ -10,7 +10,6 @@ import { Toolbar, useFullscreen } from 'react-science/ui';
|
|
|
10
10
|
|
|
11
11
|
import { docsBaseUrl } from '../../constants.js';
|
|
12
12
|
import { useChartData } from '../context/ChartContext.js';
|
|
13
|
-
import { useCore } from '../context/CoreContext.js';
|
|
14
13
|
import {
|
|
15
14
|
usePreferences,
|
|
16
15
|
useWorkspacesList,
|
|
@@ -28,7 +27,7 @@ import AboutUsModal from '../modal/aboutUs/AboutUsModal.js';
|
|
|
28
27
|
import WorkspaceItem from '../modal/setting/WorkspaceItem.js';
|
|
29
28
|
import { GeneralSettingsToolbarItem } from '../modal/setting/general_settings.js';
|
|
30
29
|
import { options } from '../toolbar/ToolTypes.js';
|
|
31
|
-
import {
|
|
30
|
+
import { CoreSlot } from '../utility/CoreSlot.tsx';
|
|
32
31
|
|
|
33
32
|
import { AutoPeakPickingOptionPanel } from './AutoPeakPickingOptionPanel.js';
|
|
34
33
|
import { HeaderWrapper } from './HeaderWrapper.js';
|
|
@@ -63,7 +62,6 @@ interface HeaderInnerProps {
|
|
|
63
62
|
|
|
64
63
|
function HeaderInner(props: HeaderInnerProps) {
|
|
65
64
|
const { selectedOptionPanel, height } = props;
|
|
66
|
-
const core = useCore();
|
|
67
65
|
|
|
68
66
|
const {
|
|
69
67
|
current: {
|
|
@@ -149,7 +147,7 @@ function HeaderInner(props: HeaderInnerProps) {
|
|
|
149
147
|
}}
|
|
150
148
|
>
|
|
151
149
|
<PluginTopBarRight>
|
|
152
|
-
|
|
150
|
+
<CoreSlot slot="topbar.right" />
|
|
153
151
|
</PluginTopBarRight>
|
|
154
152
|
|
|
155
153
|
{!hideWorkspaces && (
|