nmrium 2.4.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/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/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 +3 -2
- package/lib/component/2d/1d-tracer/Left1DChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/Ranges1D.d.ts.map +1 -1
- package/lib/component/2d/1d-tracer/Ranges1D.js +4 -60
- package/lib/component/2d/1d-tracer/Ranges1D.js.map +1 -1
- package/lib/component/2d/1d-tracer/Top1DChart.d.ts.map +1 -1
- package/lib/component/2d/1d-tracer/Top1DChart.js +3 -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/AnchorSVG.d.ts +5 -6
- package/lib/component/AnchorSVG.d.ts.map +1 -1
- package/lib/component/AnchorSVG.js +9 -6
- package/lib/component/AnchorSVG.js.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.js +14 -4
- 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 +1 -0
- package/lib/component/context/KeyModifierContext.d.ts.map +1 -1
- package/lib/component/context/KeyModifierContext.js +22 -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/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/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/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 +2 -2
- package/lib/component/modal/PublicationStringModal.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +118 -0
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts +118 -0
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +118 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts +96 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +96 -0
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts +16 -0
- package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +96 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts +96 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/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 +96 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +96 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts +96 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +96 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts +96 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts +96 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts +96 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts +96 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts +96 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts +96 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts +96 -0
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/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/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/filtersPanel/processings_sections_panel.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/processings_sections_panel.js +13 -23
- package/lib/component/panels/filtersPanel/processings_sections_panel.js.map +1 -1
- 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 +2 -0
- package/lib/component/reducer/Reducer.js.map +1 -1
- package/lib/component/reducer/actions/CorrelationsActions.js +1 -1
- package/lib/component/reducer/actions/CorrelationsActions.js.map +1 -1
- package/lib/component/reducer/actions/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/RangesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/RangesActions.js +13 -24
- 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/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 +9 -35
- package/lib/component/toolbar/nmr_toolbar.js.map +1 -1
- 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/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 +15 -14
- 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/CrossLinePointer.tsx +75 -32
- package/src/component/1d-2d/tools/CursorToolIcon.tsx +110 -0
- package/src/component/2d/1d-tracer/Left1DChart.tsx +4 -2
- package/src/component/2d/1d-tracer/Ranges1D.tsx +4 -100
- package/src/component/2d/1d-tracer/Top1DChart.tsx +4 -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/AnchorSVG.tsx +27 -28
- package/src/component/EventsTrackers/BrushTracker.tsx +21 -7
- package/src/component/EventsTrackers/MouseTracker.tsx +21 -0
- package/src/component/context/KeyModifierContext.tsx +27 -8
- package/src/component/elements/D3Axis.tsx +31 -9
- package/src/component/header/AutoPeakPickingOptionPanel.tsx +173 -102
- 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/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 +3 -3
- 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/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/filtersPanel/processings_sections_panel.tsx +27 -44
- 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 +2 -0
- package/src/component/reducer/actions/CorrelationsActions.ts +1 -1
- package/src/component/reducer/actions/FiltersActions.ts +1 -1
- package/src/component/reducer/actions/RangesActions.ts +14 -25
- package/src/component/reducer/actions/SpectraActions.ts +20 -1
- 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 +12 -69
- package/src/component/workspaces/workspaceDefaultProperties.ts +19 -2
- package/src/data/data1d/Spectrum1D/initiateDatum1D.ts +14 -8
- 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/2d/1d-tracer/Signals1D.d.ts +0 -11
- package/lib/component/2d/1d-tracer/Signals1D.d.ts.map +0 -1
- package/lib/component/2d/1d-tracer/Signals1D.js +0 -90
- package/lib/component/2d/1d-tracer/Signals1D.js.map +0 -1
- package/src/component/1d/integral/IntegralIndicator.tsx +0 -43
- package/src/component/2d/1d-tracer/Signals1D.tsx +0 -145
|
@@ -163,6 +163,15 @@ type UpdateSpectrumMetaAction = ActionType<
|
|
|
163
163
|
}
|
|
164
164
|
>;
|
|
165
165
|
|
|
166
|
+
type SetSpectrumAction = ActionType<
|
|
167
|
+
'SET_SPECTRUM',
|
|
168
|
+
{
|
|
169
|
+
index: number;
|
|
170
|
+
spectrum: Spectrum;
|
|
171
|
+
onProduce: (draft: Draft<State>, processedSpectrum: Spectrum) => void;
|
|
172
|
+
}
|
|
173
|
+
>;
|
|
174
|
+
|
|
166
175
|
export type SpectrumActions =
|
|
167
176
|
| ActionType<'TOGGLE_SPECTRA_LEGEND'>
|
|
168
177
|
| ChangeSpectrumVisibilityByIdAction
|
|
@@ -176,7 +185,8 @@ export type SpectrumActions =
|
|
|
176
185
|
| ImportSpectraMetaInfoAction
|
|
177
186
|
| ReColorSpectraBasedOnDistinctValueAction
|
|
178
187
|
| SimulateSpectrumAction
|
|
179
|
-
| UpdateSpectrumMetaAction
|
|
188
|
+
| UpdateSpectrumMetaAction
|
|
189
|
+
| SetSpectrumAction;
|
|
180
190
|
|
|
181
191
|
function checkIsVisible2D(datum: Spectrum2D): boolean {
|
|
182
192
|
if (!datum.display.isPositiveVisible && !datum.display.isNegativeVisible) {
|
|
@@ -808,6 +818,14 @@ function handleUpdateSpectrumMeta(
|
|
|
808
818
|
}
|
|
809
819
|
}
|
|
810
820
|
|
|
821
|
+
function setSpectrum(draft: Draft<State>, action: SetSpectrumAction) {
|
|
822
|
+
const { index, spectrum, onProduce } = action.payload;
|
|
823
|
+
|
|
824
|
+
draft.data[index] = spectrum;
|
|
825
|
+
|
|
826
|
+
onProduce(draft, spectrum);
|
|
827
|
+
}
|
|
828
|
+
|
|
811
829
|
export {
|
|
812
830
|
handleAddMissingProjectionHandler,
|
|
813
831
|
handleAlignSpectraHandler,
|
|
@@ -823,4 +841,5 @@ export {
|
|
|
823
841
|
handleToggleSpectraLegend,
|
|
824
842
|
handleUpdateSpectrumMeta,
|
|
825
843
|
setSpectraMetaInfo,
|
|
844
|
+
setSpectrum,
|
|
826
845
|
};
|
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
import type { Draft } from 'immer';
|
|
2
|
+
import { original } from 'immer';
|
|
2
3
|
import cloneDeep from 'lodash/cloneDeep.js';
|
|
3
4
|
|
|
4
|
-
import type {
|
|
5
|
+
import type {
|
|
6
|
+
PreferencesState,
|
|
7
|
+
SetPreferencesAction,
|
|
8
|
+
WorkspaceWithSource,
|
|
9
|
+
} from '../preferencesReducer.js';
|
|
5
10
|
import { getActiveWorkspace } from '../utilities/getActiveWorkspace.js';
|
|
6
11
|
|
|
7
|
-
export function setPreferences(
|
|
8
|
-
|
|
12
|
+
export function setPreferences(
|
|
13
|
+
draft: Draft<PreferencesState>,
|
|
14
|
+
action: SetPreferencesAction,
|
|
15
|
+
) {
|
|
16
|
+
const currentWorkspacePreferences = getActiveWorkspace(original(draft));
|
|
9
17
|
|
|
10
|
-
if (action
|
|
18
|
+
if ('payload' in action) {
|
|
11
19
|
const preferences = action.payload;
|
|
12
20
|
|
|
13
|
-
draft.workspaces[draft.workspace.current] = {
|
|
21
|
+
draft.workspaces[draft.workspace.current] = cloneDeep({
|
|
14
22
|
...currentWorkspacePreferences,
|
|
15
23
|
...preferences,
|
|
16
|
-
};
|
|
24
|
+
}) as WorkspaceWithSource;
|
|
25
|
+
} else {
|
|
26
|
+
draft.originalWorkspaces[draft.workspace.current] = cloneDeep(
|
|
27
|
+
original(draft.workspaces[draft.workspace.current]),
|
|
28
|
+
);
|
|
17
29
|
}
|
|
18
|
-
|
|
19
|
-
draft.originalWorkspaces[draft.workspace.current] = cloneDeep(
|
|
20
|
-
draft.workspaces[draft.workspace.current],
|
|
21
|
-
);
|
|
22
30
|
}
|
|
@@ -1,12 +1,58 @@
|
|
|
1
1
|
import type { Info1D, Info2D } from '@zakodium/nmr-types';
|
|
2
2
|
import type { NMRiumToolbarPreferences } from '@zakodium/nmrium-core';
|
|
3
|
+
import {
|
|
4
|
+
SvgNmrAlignBottom,
|
|
5
|
+
SvgNmrAlignCenter,
|
|
6
|
+
SvgNmrApodization,
|
|
7
|
+
SvgNmrBaselineCorrection,
|
|
8
|
+
SvgNmrFourierTransform,
|
|
9
|
+
SvgNmrIntegrate,
|
|
10
|
+
SvgNmrMultipleAnalysis,
|
|
11
|
+
SvgNmrOverlay3,
|
|
12
|
+
SvgNmrOverlay3Aligned,
|
|
13
|
+
SvgNmrPeakPicking,
|
|
14
|
+
SvgNmrPhaseCorrection,
|
|
15
|
+
SvgNmrRangePicking,
|
|
16
|
+
SvgNmrRealImag,
|
|
17
|
+
SvgNmrZeroFilling,
|
|
18
|
+
} from 'cheminfo-font';
|
|
3
19
|
import { Filters1D, Filters2D } from 'nmr-processing';
|
|
20
|
+
import type { ComponentType } from 'react';
|
|
21
|
+
import {
|
|
22
|
+
FaDiceFour,
|
|
23
|
+
FaExpand,
|
|
24
|
+
FaFileExport,
|
|
25
|
+
FaFileImport,
|
|
26
|
+
FaICursor,
|
|
27
|
+
} from 'react-icons/fa';
|
|
28
|
+
import { PiKnifeBold, PiSelectionPlusDuotone } from 'react-icons/pi';
|
|
29
|
+
import { TbZoom } from 'react-icons/tb';
|
|
4
30
|
|
|
5
31
|
import type { DisplayerMode } from '../reducer/Reducer.js';
|
|
6
32
|
|
|
7
33
|
type InfoKey = keyof Info1D | keyof Info2D;
|
|
8
34
|
|
|
9
|
-
|
|
35
|
+
interface StaticIcon {
|
|
36
|
+
icon: ToolIconComponent;
|
|
37
|
+
getIcon?: never;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface DynamicIcon {
|
|
41
|
+
icon?: never;
|
|
42
|
+
getIcon: (ctx: IconDataContext) => ToolIconComponent;
|
|
43
|
+
}
|
|
44
|
+
export interface IconOptions {
|
|
45
|
+
fontSize?: number;
|
|
46
|
+
strokeWidth?: number;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type ToolIconComponent = ComponentType<IconOptions>;
|
|
50
|
+
|
|
51
|
+
export interface IconDataContext {
|
|
52
|
+
verticalAlign?: 'bottom' | 'center' | 'stack';
|
|
53
|
+
isRealSpectrumShown?: boolean;
|
|
54
|
+
}
|
|
55
|
+
interface BaseToolOption {
|
|
10
56
|
id: Tool;
|
|
11
57
|
label: string;
|
|
12
58
|
mode?: DisplayerMode;
|
|
@@ -32,6 +78,8 @@ export interface ToolOptionItem {
|
|
|
32
78
|
isExperimental?: true;
|
|
33
79
|
}
|
|
34
80
|
|
|
81
|
+
export type ToolOptionItem = BaseToolOption & (StaticIcon | DynamicIcon);
|
|
82
|
+
|
|
35
83
|
export type MainTool = keyof NMRiumToolbarPreferences;
|
|
36
84
|
|
|
37
85
|
/**
|
|
@@ -47,6 +95,7 @@ export const options: RecordOptions = {
|
|
|
47
95
|
zoom: {
|
|
48
96
|
id: 'zoom',
|
|
49
97
|
label: 'Zoom in / out',
|
|
98
|
+
icon: TbZoom,
|
|
50
99
|
hasOptionPanel: false,
|
|
51
100
|
isFilter: false,
|
|
52
101
|
isToggle: true,
|
|
@@ -54,6 +103,7 @@ export const options: RecordOptions = {
|
|
|
54
103
|
peakPicking: {
|
|
55
104
|
id: 'peakPicking',
|
|
56
105
|
label: 'Peaks picking',
|
|
106
|
+
icon: SvgNmrPeakPicking,
|
|
57
107
|
hasOptionPanel: true,
|
|
58
108
|
isFilter: false,
|
|
59
109
|
mode: '1D',
|
|
@@ -69,6 +119,7 @@ export const options: RecordOptions = {
|
|
|
69
119
|
integral: {
|
|
70
120
|
id: 'integral',
|
|
71
121
|
label: 'Integral Tool',
|
|
122
|
+
icon: SvgNmrIntegrate,
|
|
72
123
|
hasOptionPanel: false,
|
|
73
124
|
isFilter: false,
|
|
74
125
|
mode: '1D',
|
|
@@ -82,6 +133,7 @@ export const options: RecordOptions = {
|
|
|
82
133
|
inset: {
|
|
83
134
|
id: 'inset',
|
|
84
135
|
label: 'Inset Tool',
|
|
136
|
+
icon: PiSelectionPlusDuotone,
|
|
85
137
|
hasOptionPanel: false,
|
|
86
138
|
isFilter: false,
|
|
87
139
|
mode: '1D',
|
|
@@ -95,6 +147,7 @@ export const options: RecordOptions = {
|
|
|
95
147
|
zonePicking: {
|
|
96
148
|
id: 'zonePicking',
|
|
97
149
|
label: 'Zone tool',
|
|
150
|
+
icon: FaDiceFour,
|
|
98
151
|
hasOptionPanel: true,
|
|
99
152
|
isFilter: false,
|
|
100
153
|
mode: '2D',
|
|
@@ -108,6 +161,7 @@ export const options: RecordOptions = {
|
|
|
108
161
|
slicing: {
|
|
109
162
|
id: 'slicing',
|
|
110
163
|
label: 'Slicing tool',
|
|
164
|
+
icon: PiKnifeBold,
|
|
111
165
|
hasOptionPanel: false,
|
|
112
166
|
isFilter: false,
|
|
113
167
|
mode: '2D',
|
|
@@ -121,6 +175,7 @@ export const options: RecordOptions = {
|
|
|
121
175
|
rangePicking: {
|
|
122
176
|
id: 'rangePicking',
|
|
123
177
|
label: 'Range picking and multiplet analysis',
|
|
178
|
+
icon: SvgNmrRangePicking,
|
|
124
179
|
hasOptionPanel: true,
|
|
125
180
|
isFilter: false,
|
|
126
181
|
mode: '1D',
|
|
@@ -134,6 +189,7 @@ export const options: RecordOptions = {
|
|
|
134
189
|
apodization: {
|
|
135
190
|
id: Filters1D.apodization.name,
|
|
136
191
|
label: Filters1D.apodization.label,
|
|
192
|
+
icon: SvgNmrApodization,
|
|
137
193
|
hasOptionPanel: true,
|
|
138
194
|
isFilter: true,
|
|
139
195
|
mode: '1D',
|
|
@@ -150,6 +206,7 @@ export const options: RecordOptions = {
|
|
|
150
206
|
zeroFilling: {
|
|
151
207
|
id: Filters1D.zeroFilling.name,
|
|
152
208
|
label: Filters1D.zeroFilling.label,
|
|
209
|
+
icon: SvgNmrZeroFilling,
|
|
153
210
|
hasOptionPanel: true,
|
|
154
211
|
isFilter: true,
|
|
155
212
|
mode: '1D',
|
|
@@ -166,6 +223,7 @@ export const options: RecordOptions = {
|
|
|
166
223
|
zeroFillingDimension1: {
|
|
167
224
|
id: Filters2D.zeroFillingDimension1.name,
|
|
168
225
|
label: Filters2D.zeroFillingDimension1.label,
|
|
226
|
+
icon: SvgNmrZeroFilling,
|
|
169
227
|
hasOptionPanel: true,
|
|
170
228
|
isFilter: true,
|
|
171
229
|
mode: '2D',
|
|
@@ -182,6 +240,7 @@ export const options: RecordOptions = {
|
|
|
182
240
|
zeroFillingDimension2: {
|
|
183
241
|
id: Filters2D.zeroFillingDimension2.name,
|
|
184
242
|
label: Filters2D.zeroFillingDimension2.label,
|
|
243
|
+
icon: SvgNmrZeroFilling,
|
|
185
244
|
hasOptionPanel: true,
|
|
186
245
|
isFilter: true,
|
|
187
246
|
mode: '2D',
|
|
@@ -199,6 +258,7 @@ export const options: RecordOptions = {
|
|
|
199
258
|
phaseCorrection: {
|
|
200
259
|
id: Filters1D.phaseCorrection.name,
|
|
201
260
|
label: Filters1D.phaseCorrection.label,
|
|
261
|
+
icon: SvgNmrPhaseCorrection,
|
|
202
262
|
hasOptionPanel: true,
|
|
203
263
|
isFilter: true,
|
|
204
264
|
mode: '1D',
|
|
@@ -215,6 +275,7 @@ export const options: RecordOptions = {
|
|
|
215
275
|
baselineCorrection: {
|
|
216
276
|
id: Filters1D.baselineCorrection.name,
|
|
217
277
|
label: Filters1D.baselineCorrection.label,
|
|
278
|
+
icon: SvgNmrBaselineCorrection,
|
|
218
279
|
hasOptionPanel: true,
|
|
219
280
|
isFilter: true,
|
|
220
281
|
mode: '1D',
|
|
@@ -228,6 +289,7 @@ export const options: RecordOptions = {
|
|
|
228
289
|
multipleSpectraAnalysis: {
|
|
229
290
|
id: 'multipleSpectraAnalysis',
|
|
230
291
|
label: 'Multiple spectra integration',
|
|
292
|
+
icon: SvgNmrMultipleAnalysis,
|
|
231
293
|
hasOptionPanel: false,
|
|
232
294
|
isFilter: false,
|
|
233
295
|
mode: '1D',
|
|
@@ -242,6 +304,7 @@ export const options: RecordOptions = {
|
|
|
242
304
|
exclusionZones: {
|
|
243
305
|
id: 'exclusionZones',
|
|
244
306
|
label: 'Exclusion zones',
|
|
307
|
+
icon: SvgNmrMultipleAnalysis,
|
|
245
308
|
hasOptionPanel: false,
|
|
246
309
|
isFilter: true,
|
|
247
310
|
mode: '1D',
|
|
@@ -266,6 +329,7 @@ export const options: RecordOptions = {
|
|
|
266
329
|
],
|
|
267
330
|
selectedSpectra: { min: 0 },
|
|
268
331
|
isToggle: true,
|
|
332
|
+
icon: SvgNmrMultipleAnalysis,
|
|
269
333
|
},
|
|
270
334
|
databaseRangesSelection: {
|
|
271
335
|
id: 'databaseRangesSelection',
|
|
@@ -279,10 +343,12 @@ export const options: RecordOptions = {
|
|
|
279
343
|
},
|
|
280
344
|
],
|
|
281
345
|
isToggle: true,
|
|
346
|
+
icon: FaICursor,
|
|
282
347
|
},
|
|
283
348
|
exportAs: {
|
|
284
349
|
id: 'exportAs',
|
|
285
350
|
label: 'Export as',
|
|
351
|
+
icon: FaFileExport,
|
|
286
352
|
hasOptionPanel: false,
|
|
287
353
|
isFilter: false,
|
|
288
354
|
isToggle: false,
|
|
@@ -290,6 +356,7 @@ export const options: RecordOptions = {
|
|
|
290
356
|
fft: {
|
|
291
357
|
id: 'fft',
|
|
292
358
|
label: 'Fourier transform',
|
|
359
|
+
icon: SvgNmrFourierTransform,
|
|
293
360
|
hasOptionPanel: false,
|
|
294
361
|
isFilter: true,
|
|
295
362
|
mode: '1D',
|
|
@@ -306,6 +373,7 @@ export const options: RecordOptions = {
|
|
|
306
373
|
fftDimension1: {
|
|
307
374
|
id: 'fftDimension1',
|
|
308
375
|
label: 'Fourier transform dimension 1',
|
|
376
|
+
icon: SvgNmrFourierTransform,
|
|
309
377
|
hasOptionPanel: false,
|
|
310
378
|
isFilter: true,
|
|
311
379
|
mode: '2D',
|
|
@@ -322,6 +390,7 @@ export const options: RecordOptions = {
|
|
|
322
390
|
fftDimension2: {
|
|
323
391
|
id: 'fftDimension2',
|
|
324
392
|
label: 'Fourier transform dimension 2',
|
|
393
|
+
icon: SvgNmrFourierTransform,
|
|
325
394
|
hasOptionPanel: false,
|
|
326
395
|
isFilter: true,
|
|
327
396
|
mode: '2D',
|
|
@@ -339,6 +408,7 @@ export const options: RecordOptions = {
|
|
|
339
408
|
phaseCorrectionTwoDimensions: {
|
|
340
409
|
id: 'phaseCorrectionTwoDimensions',
|
|
341
410
|
label: 'Phase correction two dimension',
|
|
411
|
+
icon: SvgNmrPhaseCorrection,
|
|
342
412
|
hasOptionPanel: true,
|
|
343
413
|
isFilter: true,
|
|
344
414
|
mode: '2D',
|
|
@@ -352,6 +422,7 @@ export const options: RecordOptions = {
|
|
|
352
422
|
import: {
|
|
353
423
|
id: 'import',
|
|
354
424
|
label: 'Import',
|
|
425
|
+
icon: FaFileImport,
|
|
355
426
|
hasOptionPanel: false,
|
|
356
427
|
isFilter: false,
|
|
357
428
|
isToggle: false,
|
|
@@ -359,6 +430,7 @@ export const options: RecordOptions = {
|
|
|
359
430
|
realImaginary: {
|
|
360
431
|
id: 'realImaginary',
|
|
361
432
|
label: 'Real / Imaginary',
|
|
433
|
+
icon: SvgNmrRealImag,
|
|
362
434
|
hasOptionPanel: false,
|
|
363
435
|
isFilter: false,
|
|
364
436
|
mode: '1D',
|
|
@@ -372,6 +444,9 @@ export const options: RecordOptions = {
|
|
|
372
444
|
spectraCenterAlignments: {
|
|
373
445
|
id: 'spectraCenterAlignments',
|
|
374
446
|
label: 'Align spectrum',
|
|
447
|
+
// depends on current vertical alignment state
|
|
448
|
+
getIcon: (idc: IconDataContext) =>
|
|
449
|
+
idc.verticalAlign === 'bottom' ? SvgNmrAlignCenter : SvgNmrAlignBottom,
|
|
375
450
|
hasOptionPanel: false,
|
|
376
451
|
isFilter: false,
|
|
377
452
|
mode: '1D',
|
|
@@ -380,6 +455,9 @@ export const options: RecordOptions = {
|
|
|
380
455
|
spectraStackAlignments: {
|
|
381
456
|
id: 'spectraStackAlignments',
|
|
382
457
|
label: 'Stack spectra',
|
|
458
|
+
// depends on current vertical alignment state
|
|
459
|
+
getIcon: (idc: IconDataContext) =>
|
|
460
|
+
idc.verticalAlign === 'stack' ? SvgNmrOverlay3Aligned : SvgNmrOverlay3,
|
|
383
461
|
hasOptionPanel: false,
|
|
384
462
|
isFilter: false,
|
|
385
463
|
mode: '1D',
|
|
@@ -394,6 +472,7 @@ export const options: RecordOptions = {
|
|
|
394
472
|
zoomOut: {
|
|
395
473
|
id: 'zoomOut',
|
|
396
474
|
label: 'Zoom out',
|
|
475
|
+
icon: FaExpand,
|
|
397
476
|
hasOptionPanel: false,
|
|
398
477
|
isFilter: false,
|
|
399
478
|
isToggle: false,
|
|
@@ -404,10 +483,12 @@ export const options: RecordOptions = {
|
|
|
404
483
|
hasOptionPanel: false,
|
|
405
484
|
isFilter: false,
|
|
406
485
|
isToggle: false,
|
|
486
|
+
icon: SvgNmrRangePicking,
|
|
407
487
|
},
|
|
408
488
|
apodizationDimension1: {
|
|
409
489
|
id: Filters2D.apodizationDimension1.name,
|
|
410
490
|
label: Filters2D.apodizationDimension1.label,
|
|
491
|
+
icon: SvgNmrApodization,
|
|
411
492
|
hasOptionPanel: true,
|
|
412
493
|
isFilter: true,
|
|
413
494
|
mode: '2D',
|
|
@@ -421,6 +502,7 @@ export const options: RecordOptions = {
|
|
|
421
502
|
apodizationDimension2: {
|
|
422
503
|
id: Filters2D.apodizationDimension2.name,
|
|
423
504
|
label: Filters2D.apodizationDimension2.label,
|
|
505
|
+
icon: SvgNmrApodization,
|
|
424
506
|
hasOptionPanel: true,
|
|
425
507
|
isFilter: true,
|
|
426
508
|
mode: '2D',
|
|
@@ -436,3 +518,12 @@ export const options: RecordOptions = {
|
|
|
436
518
|
isToggle: true,
|
|
437
519
|
},
|
|
438
520
|
};
|
|
521
|
+
|
|
522
|
+
export function getToolIcon(
|
|
523
|
+
id: Tool,
|
|
524
|
+
idc: IconDataContext = {},
|
|
525
|
+
): ToolIconComponent | undefined {
|
|
526
|
+
const option = options[id];
|
|
527
|
+
|
|
528
|
+
return 'getIcon' in option ? option.getIcon?.(idc) : option.icon;
|
|
529
|
+
}
|
|
@@ -1,29 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SvgNmrAlignBottom,
|
|
3
|
-
SvgNmrAlignCenter,
|
|
4
|
-
SvgNmrApodization,
|
|
5
|
-
SvgNmrBaselineCorrection,
|
|
6
|
-
SvgNmrFourierTransform,
|
|
7
|
-
SvgNmrIntegrate,
|
|
8
|
-
SvgNmrMultipleAnalysis,
|
|
9
|
-
SvgNmrOverlay3,
|
|
10
|
-
SvgNmrOverlay3Aligned,
|
|
11
|
-
SvgNmrPeakPicking,
|
|
12
|
-
SvgNmrPhaseCorrection,
|
|
13
|
-
SvgNmrRangePicking,
|
|
14
|
-
SvgNmrRealImag,
|
|
15
|
-
SvgNmrZeroFilling,
|
|
16
|
-
} from 'cheminfo-font';
|
|
17
1
|
import { useCallback } from 'react';
|
|
18
|
-
import {
|
|
19
|
-
FaDiceFour,
|
|
20
|
-
FaDownload,
|
|
21
|
-
FaExpand,
|
|
22
|
-
FaFileExport,
|
|
23
|
-
FaFileImport,
|
|
24
|
-
} from 'react-icons/fa';
|
|
25
|
-
import { PiKnifeBold, PiSelectionPlusDuotone } from 'react-icons/pi';
|
|
26
|
-
import { TbZoom } from 'react-icons/tb';
|
|
2
|
+
import { FaDownload } from 'react-icons/fa';
|
|
27
3
|
import type { ToolbarItemProps, TooltipItem } from 'react-science/ui';
|
|
28
4
|
import { Toolbar, TooltipHelpContent } from 'react-science/ui';
|
|
29
5
|
|
|
@@ -51,14 +27,15 @@ import { LoadJCAMPModal } from '../modal/LoadJCAMPModal.js';
|
|
|
51
27
|
import SaveAsModal from '../modal/SaveAsModal.js';
|
|
52
28
|
import { MetaImportationModal } from '../modal/metaImportation/MetaImportationModal.js';
|
|
53
29
|
|
|
54
|
-
import type { MainTool } from './ToolTypes.js';
|
|
55
|
-
import { options } from './ToolTypes.js';
|
|
30
|
+
import type { IconOptions, MainTool } from './ToolTypes.js';
|
|
31
|
+
import { getToolIcon, options } from './ToolTypes.js';
|
|
56
32
|
import type { ExportMenuItems } from './toolbarMenu.js';
|
|
57
33
|
import { EXPORT_MENU, IMPORT_MENU } from './toolbarMenu.js';
|
|
58
34
|
|
|
59
|
-
interface BaseToolItem extends Pick<ToolbarItemProps, '
|
|
35
|
+
interface BaseToolItem extends Pick<ToolbarItemProps, 'disabled'> {
|
|
60
36
|
id: MainTool;
|
|
61
37
|
isVisible?: boolean;
|
|
38
|
+
iconProps?: IconOptions;
|
|
62
39
|
}
|
|
63
40
|
interface ToolItem extends BaseToolItem {
|
|
64
41
|
onClick?: () => void;
|
|
@@ -226,7 +203,9 @@ export default function NMRToolbar() {
|
|
|
226
203
|
],
|
|
227
204
|
style: { minWidth: '300px' },
|
|
228
205
|
},
|
|
229
|
-
|
|
206
|
+
iconProps: {
|
|
207
|
+
strokeWidth: 3,
|
|
208
|
+
},
|
|
230
209
|
},
|
|
231
210
|
{
|
|
232
211
|
id: 'zoomOut',
|
|
@@ -240,7 +219,6 @@ export default function NMRToolbar() {
|
|
|
240
219
|
link: 'https://docs.nmrium.org/help/zoom-and-scale',
|
|
241
220
|
},
|
|
242
221
|
onClick: handleFullZoomOut,
|
|
243
|
-
icon: <FaExpand />,
|
|
244
222
|
},
|
|
245
223
|
{
|
|
246
224
|
id: 'peakPicking',
|
|
@@ -250,8 +228,6 @@ export default function NMRToolbar() {
|
|
|
250
228
|
description: 'Detect peaks manually or automatically in the spectrum.',
|
|
251
229
|
link: 'https://docs.nmrium.org/help/peaks',
|
|
252
230
|
},
|
|
253
|
-
|
|
254
|
-
icon: <SvgNmrPeakPicking />,
|
|
255
231
|
},
|
|
256
232
|
{
|
|
257
233
|
id: 'integral',
|
|
@@ -261,7 +237,6 @@ export default function NMRToolbar() {
|
|
|
261
237
|
description: `Manually integrate the spectrum. Click, drag, and release ${!invert ? 'while holding SHIFT' : ''} to draw the integral. Resize the integrals by moving the edges. Cut an integral with ${!invert ? 'SHIFT +' : ''} click.`,
|
|
262
238
|
link: 'https://docs.nmrium.org/help/integrations',
|
|
263
239
|
},
|
|
264
|
-
icon: <SvgNmrIntegrate />,
|
|
265
240
|
},
|
|
266
241
|
{
|
|
267
242
|
id: 'zonePicking',
|
|
@@ -271,7 +246,6 @@ export default function NMRToolbar() {
|
|
|
271
246
|
description: `Draw 2D zones by clicking, dragging, and releasing${!invert ? 'while holding SHIFT' : ''}. Alternatively, detect zones automatically.`,
|
|
272
247
|
link: 'https://docs.nmrium.org/30_2d-spectra/zones',
|
|
273
248
|
},
|
|
274
|
-
icon: <FaDiceFour />,
|
|
275
249
|
},
|
|
276
250
|
{
|
|
277
251
|
id: 'slicing',
|
|
@@ -281,7 +255,6 @@ export default function NMRToolbar() {
|
|
|
281
255
|
'Display the horizontal and vertical slices of the selected 2D spectrum at the level of the pointer.',
|
|
282
256
|
link: 'https://docs.nmrium.org/30_2d-spectra/slicing',
|
|
283
257
|
},
|
|
284
|
-
icon: <PiKnifeBold />,
|
|
285
258
|
},
|
|
286
259
|
{
|
|
287
260
|
id: 'rangePicking',
|
|
@@ -291,7 +264,6 @@ export default function NMRToolbar() {
|
|
|
291
264
|
description: `Define ranges and analyse multiplet automatically or manually. Click, drag, and release ${!invert ? 'while holding SHIFT' : ''} to draw the range. Ranges can be resized by moving the edges.`,
|
|
292
265
|
link: 'https://docs.nmrium.org/help/ranges',
|
|
293
266
|
},
|
|
294
|
-
icon: <SvgNmrRangePicking />,
|
|
295
267
|
},
|
|
296
268
|
{
|
|
297
269
|
id: 'multipleSpectraAnalysis',
|
|
@@ -301,7 +273,6 @@ export default function NMRToolbar() {
|
|
|
301
273
|
description:
|
|
302
274
|
'Integrate multiple spectra at once and adjust integration zones by dragging their edges.',
|
|
303
275
|
},
|
|
304
|
-
icon: <SvgNmrMultipleAnalysis />,
|
|
305
276
|
isVisible: ftCounter > 0,
|
|
306
277
|
},
|
|
307
278
|
{
|
|
@@ -313,21 +284,18 @@ export default function NMRToolbar() {
|
|
|
313
284
|
'Apply mathematical function that the FID is multiplied by before Fourier Transform.',
|
|
314
285
|
link: 'https://docs.nmrium.org/help/apodization',
|
|
315
286
|
},
|
|
316
|
-
icon: <SvgNmrApodization />,
|
|
317
287
|
},
|
|
318
288
|
{
|
|
319
289
|
id: 'apodizationDimension1',
|
|
320
290
|
tooltip: {
|
|
321
291
|
title: options.apodizationDimension1.label,
|
|
322
292
|
},
|
|
323
|
-
icon: <SvgNmrApodization />,
|
|
324
293
|
},
|
|
325
294
|
{
|
|
326
295
|
id: 'apodizationDimension2',
|
|
327
296
|
tooltip: {
|
|
328
297
|
title: options.apodizationDimension2.label,
|
|
329
298
|
},
|
|
330
|
-
icon: <SvgNmrApodization />,
|
|
331
299
|
},
|
|
332
300
|
{
|
|
333
301
|
id: 'zeroFilling',
|
|
@@ -338,7 +306,6 @@ export default function NMRToolbar() {
|
|
|
338
306
|
'Improve spectrum quality by increasing the number of points. By default, the number of points is twice as many as in the original FID.',
|
|
339
307
|
link: 'https://docs.nmrium.org/help/zero-filling',
|
|
340
308
|
},
|
|
341
|
-
icon: <SvgNmrZeroFilling />,
|
|
342
309
|
},
|
|
343
310
|
{
|
|
344
311
|
id: 'zeroFillingDimension1',
|
|
@@ -347,7 +314,6 @@ export default function NMRToolbar() {
|
|
|
347
314
|
description:
|
|
348
315
|
'Improve spectrum quality by increasing the number of points',
|
|
349
316
|
},
|
|
350
|
-
icon: <SvgNmrZeroFilling />,
|
|
351
317
|
},
|
|
352
318
|
{
|
|
353
319
|
id: 'zeroFillingDimension2',
|
|
@@ -356,7 +322,6 @@ export default function NMRToolbar() {
|
|
|
356
322
|
description:
|
|
357
323
|
'Improve spectrum quality by increasing the number of points.',
|
|
358
324
|
},
|
|
359
|
-
icon: <SvgNmrZeroFilling />,
|
|
360
325
|
},
|
|
361
326
|
{
|
|
362
327
|
id: 'phaseCorrection',
|
|
@@ -366,7 +331,6 @@ export default function NMRToolbar() {
|
|
|
366
331
|
description: `Correct the spectrum phase manually or automatically. For manual phase correction, define the pivot${!invert ? ' using SHIFT +' : ''} click, then press the PH0 and PH1 button, and move the mouse horizontally.`,
|
|
367
332
|
link: 'https://docs.nmrium.org/help/phase',
|
|
368
333
|
},
|
|
369
|
-
icon: <SvgNmrPhaseCorrection />,
|
|
370
334
|
},
|
|
371
335
|
{
|
|
372
336
|
id: 'phaseCorrectionTwoDimensions',
|
|
@@ -375,7 +339,6 @@ export default function NMRToolbar() {
|
|
|
375
339
|
shortcuts: ['a'],
|
|
376
340
|
description: 'To phase the spectrum after the FFT.',
|
|
377
341
|
},
|
|
378
|
-
icon: <SvgNmrPhaseCorrection />,
|
|
379
342
|
isVisible: isQuadrants2DSpectrum(spectrum),
|
|
380
343
|
},
|
|
381
344
|
{
|
|
@@ -386,7 +349,6 @@ export default function NMRToolbar() {
|
|
|
386
349
|
description: `Correct the baseline of the spectrum. You should draw zones corresponding to the noise using click, drag, release${!invert ? 'while holding SHIFT' : ''}.`,
|
|
387
350
|
link: 'https://docs.nmrium.org/help/baseline',
|
|
388
351
|
},
|
|
389
|
-
icon: <SvgNmrBaselineCorrection />,
|
|
390
352
|
},
|
|
391
353
|
{
|
|
392
354
|
id: 'exclusionZones',
|
|
@@ -395,7 +357,6 @@ export default function NMRToolbar() {
|
|
|
395
357
|
shortcuts: ['e'],
|
|
396
358
|
description: `Define exclusion zones by clicking, dragging, releasing${!invert ? ' while holding SHIFT' : ''}. This option is practical for excluding large peaks like solvents.`,
|
|
397
359
|
},
|
|
398
|
-
icon: <SvgNmrMultipleAnalysis />,
|
|
399
360
|
isVisible: ftCounter > 0,
|
|
400
361
|
},
|
|
401
362
|
{
|
|
@@ -407,31 +368,26 @@ export default function NMRToolbar() {
|
|
|
407
368
|
link: 'https://docs.nmrium.org/help/ft',
|
|
408
369
|
},
|
|
409
370
|
onClick: handleOnFFTFilter,
|
|
410
|
-
icon: <SvgNmrFourierTransform />,
|
|
411
371
|
},
|
|
412
372
|
{
|
|
413
373
|
id: 'fftDimension1',
|
|
414
374
|
tooltip: options.fftDimension1.label,
|
|
415
375
|
onClick: handleFFtDimension1Filter,
|
|
416
|
-
icon: <SvgNmrFourierTransform />,
|
|
417
376
|
},
|
|
418
377
|
{
|
|
419
378
|
id: 'fftDimension2',
|
|
420
379
|
tooltip: options.fftDimension2.label,
|
|
421
380
|
onClick: handleFFtDimension2Filter,
|
|
422
|
-
icon: <SvgNmrFourierTransform />,
|
|
423
381
|
},
|
|
424
382
|
{
|
|
425
383
|
id: 'import',
|
|
426
384
|
tooltip: options.import.label,
|
|
427
|
-
icon: <FaFileImport />,
|
|
428
385
|
menuItems: importMenu,
|
|
429
386
|
onClick: importHandler,
|
|
430
387
|
},
|
|
431
388
|
{
|
|
432
389
|
id: 'exportAs',
|
|
433
390
|
tooltip: options.exportAs.label,
|
|
434
|
-
icon: <FaFileExport />,
|
|
435
391
|
menuItems: exportMenu,
|
|
436
392
|
onClick: exportHandler,
|
|
437
393
|
},
|
|
@@ -443,12 +399,6 @@ export default function NMRToolbar() {
|
|
|
443
399
|
description:
|
|
444
400
|
'Toggle between stack mode and all the spectra aligned at the bottom.',
|
|
445
401
|
},
|
|
446
|
-
icon:
|
|
447
|
-
verticalAlign === 'stack' ? (
|
|
448
|
-
<SvgNmrOverlay3Aligned />
|
|
449
|
-
) : (
|
|
450
|
-
<SvgNmrOverlay3 />
|
|
451
|
-
),
|
|
452
402
|
isVisible: ftCounter > 1,
|
|
453
403
|
onClick: changeDisplayViewModeHandler,
|
|
454
404
|
},
|
|
@@ -459,7 +409,6 @@ export default function NMRToolbar() {
|
|
|
459
409
|
description:
|
|
460
410
|
'Toggle between the imaginary and real parts of the spectrum.',
|
|
461
411
|
},
|
|
462
|
-
icon: <SvgNmrRealImag />,
|
|
463
412
|
onClick: changeSpectrumViewHandler,
|
|
464
413
|
},
|
|
465
414
|
{
|
|
@@ -470,12 +419,6 @@ export default function NMRToolbar() {
|
|
|
470
419
|
description:
|
|
471
420
|
'Toggle between alignment of the spectra in the center or at the bottom of the display.',
|
|
472
421
|
},
|
|
473
|
-
icon:
|
|
474
|
-
verticalAlign === 'bottom' ? (
|
|
475
|
-
<SvgNmrAlignCenter />
|
|
476
|
-
) : (
|
|
477
|
-
<SvgNmrAlignBottom />
|
|
478
|
-
),
|
|
479
422
|
isVisible: ftCounter > 0 || fidCounter > 0,
|
|
480
423
|
onClick: alignSpectraVerticallyHandler,
|
|
481
424
|
},
|
|
@@ -487,7 +430,6 @@ export default function NMRToolbar() {
|
|
|
487
430
|
description:
|
|
488
431
|
'Drag a rectangle over the spectrum region to create an inset.',
|
|
489
432
|
},
|
|
490
|
-
icon: <PiSelectionPlusDuotone />,
|
|
491
433
|
},
|
|
492
434
|
];
|
|
493
435
|
return (
|
|
@@ -507,7 +449,8 @@ export default function NMRToolbar() {
|
|
|
507
449
|
<SaveAsModal isOpen={dialog.saveAs} onCloseDialog={closeDialog} />
|
|
508
450
|
<Toolbar vertical>
|
|
509
451
|
{toolItems.map((item) => {
|
|
510
|
-
const { id,
|
|
452
|
+
const { id, tooltip, disabled, isVisible, iconProps } = item;
|
|
453
|
+
const Icon = getToolIcon(id, { verticalAlign, isRealSpectrumShown });
|
|
511
454
|
const isToolVisible =
|
|
512
455
|
isButtonVisible(id) && (isVisible === undefined || isVisible);
|
|
513
456
|
|
|
@@ -531,7 +474,7 @@ export default function NMRToolbar() {
|
|
|
531
474
|
}}
|
|
532
475
|
id={id}
|
|
533
476
|
active={selectedTool === id}
|
|
534
|
-
icon={
|
|
477
|
+
icon={Icon && <Icon {...iconProps} />}
|
|
535
478
|
onClick={onClick}
|
|
536
479
|
disabled={disabled}
|
|
537
480
|
/>
|
|
@@ -556,7 +499,7 @@ export default function NMRToolbar() {
|
|
|
556
499
|
}}
|
|
557
500
|
id={id}
|
|
558
501
|
active={selectedTool === id}
|
|
559
|
-
icon={
|
|
502
|
+
icon={Icon && <Icon {...iconProps} />}
|
|
560
503
|
disabled={disabled}
|
|
561
504
|
/>
|
|
562
505
|
);
|