nmrium 2.2.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/component/1d/PredictionErrorsNotations.js +3 -3
- package/lib/component/1d/PredictionErrorsNotations.js.map +1 -1
- package/lib/component/1d/peaks/PeakEditionManager.d.ts +1 -1
- package/lib/component/1d/peaks/Peaks.d.ts.map +1 -1
- package/lib/component/1d/peaks/Peaks.js +2 -1
- package/lib/component/1d/peaks/Peaks.js.map +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.d.ts.map +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.js.map +1 -1
- package/lib/component/1d/ranges/AssignmentLabel.js +1 -1
- package/lib/component/1d/ranges/AssignmentLabel.js.map +1 -1
- package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.d.ts +9 -0
- package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.d.ts.map +1 -0
- package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.js +138 -0
- package/lib/component/1d/ranges/FloatingRangeTablePreferencesModal.js.map +1 -0
- package/lib/component/1d/ranges/FloatingRanges.d.ts.map +1 -0
- package/lib/component/1d/ranges/FloatingRanges.js +362 -0
- package/lib/component/1d/ranges/FloatingRanges.js.map +1 -0
- package/lib/component/1d/ranges/Ranges.js +2 -2
- package/lib/component/1d/ranges/Ranges.js.map +1 -1
- package/lib/component/1d-2d/FieldEdition.d.ts +2 -2
- package/lib/component/1d-2d/FieldEdition.d.ts.map +1 -1
- package/lib/component/1d-2d/FieldEdition.js +2 -2
- package/lib/component/1d-2d/FieldEdition.js.map +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +7 -7
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js.map +1 -1
- package/lib/component/1d-2d/tools/BrushXY.js +6 -6
- package/lib/component/1d-2d/tools/BrushXY.js.map +1 -1
- package/lib/component/2d/1d-tracer/Left1DChart.d.ts.map +1 -1
- package/lib/component/2d/1d-tracer/Left1DChart.js +6 -2
- package/lib/component/2d/1d-tracer/Left1DChart.js.map +1 -1
- package/lib/component/2d/1d-tracer/Ranges1D.d.ts +9 -0
- package/lib/component/2d/1d-tracer/Ranges1D.d.ts.map +1 -0
- package/lib/component/2d/1d-tracer/Ranges1D.js +76 -0
- package/lib/component/2d/1d-tracer/Ranges1D.js.map +1 -0
- package/lib/component/2d/1d-tracer/Signals1D.d.ts +11 -0
- package/lib/component/2d/1d-tracer/Signals1D.d.ts.map +1 -0
- package/lib/component/2d/1d-tracer/Signals1D.js +90 -0
- package/lib/component/2d/1d-tracer/Signals1D.js.map +1 -0
- package/lib/component/2d/1d-tracer/Top1DChart.d.ts.map +1 -1
- package/lib/component/2d/1d-tracer/Top1DChart.js +6 -2
- package/lib/component/2d/1d-tracer/Top1DChart.js.map +1 -1
- package/lib/component/2d/ft/FTContainer.d.ts.map +1 -1
- package/lib/component/2d/ft/FTContainer.js.map +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.js +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js.map +1 -1
- package/lib/component/AnchorSVG.d.ts +37 -0
- package/lib/component/AnchorSVG.d.ts.map +1 -0
- package/lib/component/AnchorSVG.js +137 -0
- package/lib/component/AnchorSVG.js.map +1 -0
- package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.js +4 -0
- package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
- package/lib/component/SVGTable.d.ts +5 -3
- package/lib/component/SVGTable.d.ts.map +1 -1
- package/lib/component/SVGTable.js +16 -16
- package/lib/component/SVGTable.js.map +1 -1
- package/lib/component/context/KeyModifierContext.d.ts +1 -0
- package/lib/component/context/KeyModifierContext.d.ts.map +1 -1
- package/lib/component/context/KeyModifierContext.js +4 -0
- package/lib/component/context/KeyModifierContext.js.map +1 -1
- package/lib/component/context/LoggerContext.d.ts.map +1 -1
- package/lib/component/context/LoggerContext.js.map +1 -1
- package/lib/component/context/SortSpectraContext.d.ts.map +1 -1
- package/lib/component/context/SortSpectraContext.js.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.d.ts +2 -2
- package/lib/component/elements/ActionsButtonsPopover.d.ts.map +1 -1
- package/lib/component/elements/ActionsButtonsPopover.js +6 -9
- package/lib/component/elements/ActionsButtonsPopover.js.map +1 -1
- package/lib/component/elements/Button.d.ts.map +1 -1
- package/lib/component/elements/Button.js.map +1 -1
- package/lib/component/elements/DraggableDialog.d.ts.map +1 -1
- package/lib/component/elements/DraggableDialog.js +1 -2
- package/lib/component/elements/DraggableDialog.js.map +1 -1
- package/lib/component/elements/Sections.d.ts +3 -3
- package/lib/component/elements/Sections.d.ts.map +1 -1
- package/lib/component/elements/Sections.js +1 -1
- package/lib/component/elements/Sections.js.map +1 -1
- package/lib/component/elements/TabTitle.d.ts.map +1 -1
- package/lib/component/elements/TabTitle.js +2 -2
- package/lib/component/elements/TabTitle.js.map +1 -1
- package/lib/component/elements/ToolbarPopoverItem.d.ts +1 -0
- package/lib/component/elements/ToolbarPopoverItem.d.ts.map +1 -1
- package/lib/component/elements/ToolbarPopoverItem.js +10 -3
- package/lib/component/elements/ToolbarPopoverItem.js.map +1 -1
- package/lib/component/elements/dropDownButton/DropDownButton.d.ts.map +1 -1
- package/lib/component/elements/dropDownButton/DropDownButton.js +2 -2
- package/lib/component/elements/dropDownButton/DropDownButton.js.map +1 -1
- package/lib/component/elements/export/ExportOptionsModal.d.ts +1 -1
- package/lib/component/elements/export/ExportOptionsModal.d.ts.map +1 -1
- package/lib/component/elements/export/ExportOptionsModal.js +28 -110
- package/lib/component/elements/export/ExportOptionsModal.js.map +1 -1
- package/lib/component/elements/export/units.d.ts +0 -28
- package/lib/component/elements/export/units.d.ts.map +1 -1
- package/lib/component/elements/export/units.js +0 -5
- package/lib/component/elements/export/units.js.map +1 -1
- package/lib/component/elements/export/utilities/getExportOptions.d.ts.map +1 -1
- package/lib/component/elements/export/utilities/getExportOptions.js.map +1 -1
- package/lib/component/elements/print/pageSize.d.ts +1 -1
- package/lib/component/elements/print/pageSize.d.ts.map +1 -1
- package/lib/component/header/Header.d.ts.map +1 -1
- package/lib/component/header/Header.js +2 -4
- package/lib/component/header/Header.js.map +1 -1
- package/lib/component/hooks/useExport.d.ts.map +1 -1
- package/lib/component/hooks/useExport.js.map +1 -1
- package/lib/component/hooks/usePanelPreferences.d.ts +3 -3
- package/lib/component/hooks/usePanelPreferences.d.ts.map +1 -1
- package/lib/component/hooks/useSaveSettings.d.ts.map +1 -1
- package/lib/component/hooks/useSaveSettings.js +3 -6
- package/lib/component/hooks/useSaveSettings.js.map +1 -1
- package/lib/component/hooks/useTextMetrics.d.ts.map +1 -1
- package/lib/component/hooks/useTextMetrics.js +1 -0
- package/lib/component/hooks/useTextMetrics.js.map +1 -1
- package/lib/component/main/NMRiumViewer.js +1 -1
- package/lib/component/main/NMRiumViewer.js.map +1 -1
- package/lib/component/modal/EditPeakShapeModal.js +2 -2
- package/lib/component/modal/EditPeakShapeModal.js.map +1 -1
- package/lib/component/modal/PublicationStringModal.d.ts.map +1 -1
- package/lib/component/modal/PublicationStringModal.js +2 -6
- package/lib/component/modal/PublicationStringModal.js.map +1 -1
- package/lib/component/modal/SaveAsModal.d.ts +2 -2
- package/lib/component/modal/SaveAsModal.d.ts.map +1 -1
- package/lib/component/modal/SaveAsModal.js +40 -35
- package/lib/component/modal/SaveAsModal.js.map +1 -1
- package/lib/component/modal/aboutUs/AboutUsModal.d.ts.map +1 -1
- package/lib/component/modal/aboutUs/AboutUsModal.js +2 -4
- package/lib/component/modal/aboutUs/AboutUsModal.js.map +1 -1
- package/lib/component/modal/editRange/EditRangeModal.js +4 -3
- package/lib/component/modal/editRange/EditRangeModal.js.map +1 -1
- package/lib/component/modal/editRange/forms/components/NewSignalTab.d.ts.map +1 -1
- package/lib/component/modal/editRange/forms/components/NewSignalTab.js +39 -37
- package/lib/component/modal/editRange/forms/components/NewSignalTab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.d.ts +29 -29
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.js +3 -3
- package/lib/component/modal/setting/tanstack_general_settings/errors/context.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.d.ts +29 -29
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/errors/renderer.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings.js +9 -12
- package/lib/component/modal/setting/tanstack_general_settings/general_settings.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.d.ts +29 -29
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_footer.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.d.ts +29 -29
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/hooks/use_safe_workspace.d.ts +4 -4
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.d.ts +29 -29
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/axis_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/database_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.d.ts +14 -14
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js +2 -2
- package/lib/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/external_api_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/general_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/import_filters_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/nuclei_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/panels_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_colors_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.js +3 -2
- package/lib/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts +24 -24
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.d.ts.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.js +3 -2
- package/lib/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.js.map +1 -1
- package/lib/component/modal/setting/tanstack_general_settings/tabs/tools_tab.d.ts +24 -24
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +30 -3
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +1 -9
- package/lib/component/panels/PeaksPanel/PeaksPanel.js.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPreferences.js +18 -18
- package/lib/component/panels/PeaksPanel/PeaksPreferences.js.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.js +17 -17
- package/lib/component/panels/PeaksPanel/PeaksTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesPreferences.js +22 -22
- package/lib/component/panels/RangesPanel/RangesPreferences.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +2 -2
- package/lib/component/panels/RangesPanel/RangesTable.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.js +5 -4
- package/lib/component/panels/RangesPanel/RangesTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +2 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.js +2 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.js.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.js +5 -1
- package/lib/component/panels/SpectraPanel/SpectraTable.js.map +1 -1
- package/lib/component/panels/SpectraPanel/base/RenderAsHTML.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/base/RenderAsHTML.js +7 -4
- package/lib/component/panels/SpectraPanel/base/RenderAsHTML.js.map +1 -1
- package/lib/component/panels/SpectraPanel/base/SpectrumName.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/base/SpectrumName.js +5 -1
- package/lib/component/panels/SpectraPanel/base/SpectrumName.js.map +1 -1
- package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.js +2 -2
- package/lib/component/panels/SpectraPanel/base/setting/SpectrumSetting.js.map +1 -1
- package/lib/component/panels/SummaryPanel/SummaryPanel.d.ts.map +1 -1
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +7 -0
- package/lib/component/panels/SummaryPanel/SummaryPanel.js.map +1 -1
- package/lib/component/panels/filtersPanel/FilterPanel.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/FilterPanel.js +5 -2
- package/lib/component/panels/filtersPanel/FilterPanel.js.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js +1 -1
- package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js.map +1 -1
- package/lib/component/panels/filtersPanel/processings_sections_panel.d.ts +2 -0
- package/lib/component/panels/filtersPanel/processings_sections_panel.d.ts.map +1 -0
- package/lib/component/panels/filtersPanel/processings_sections_panel.js +144 -0
- package/lib/component/panels/filtersPanel/processings_sections_panel.js.map +1 -0
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts +3 -2
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.d.ts.map +1 -1
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.js +14 -8
- package/lib/component/panels/hooks/useMoleculeAnnotationCore.js.map +1 -1
- package/lib/component/panels/informationPanel/MixedValuesBadge.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/MixedValuesBadge.js +2 -2
- package/lib/component/panels/informationPanel/MixedValuesBadge.js.map +1 -1
- package/lib/component/panels/informationPanel/SpectraPicker.d.ts.map +1 -1
- package/lib/component/panels/informationPanel/SpectraPicker.js +2 -2
- package/lib/component/panels/informationPanel/SpectraPicker.js.map +1 -1
- package/lib/component/reducer/Reducer.d.ts.map +1 -1
- package/lib/component/reducer/Reducer.js +2 -0
- package/lib/component/reducer/Reducer.js.map +1 -1
- package/lib/component/reducer/actions/CorrelationsActions.js +1 -1
- package/lib/component/reducer/actions/CorrelationsActions.js.map +1 -1
- package/lib/component/reducer/actions/DomainActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/DomainActions.js.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
- package/lib/component/reducer/actions/LoadAction.d.ts.map +1 -1
- package/lib/component/reducer/actions/LoadAction.js.map +1 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts +9 -0
- package/lib/component/reducer/actions/MoleculeActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/RangesActions.d.ts +11 -2
- package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/RangesActions.js +23 -5
- package/lib/component/reducer/actions/RangesActions.js.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +5 -17
- package/lib/component/reducer/actions/ToolsActions.js.map +1 -1
- package/lib/component/reducer/helper/getTraceSpectrumID.d.ts +5 -0
- package/lib/component/reducer/helper/getTraceSpectrumID.d.ts.map +1 -0
- package/lib/component/reducer/helper/getTraceSpectrumID.js +14 -0
- package/lib/component/reducer/helper/getTraceSpectrumID.js.map +1 -0
- package/lib/component/reducer/helper/setRangesViewProperty.d.ts.map +1 -1
- package/lib/component/reducer/helper/setRangesViewProperty.js.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts.map +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +35 -26
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js.map +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +2 -2
- package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
- package/lib/component/reducer/preferences/utilities/initWorkspace.d.ts +2 -2
- package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts +2 -2
- package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts.map +1 -1
- package/lib/component/toolbar/ToolTypes.d.ts +2 -2
- package/lib/component/toolbar/nmr_toolbar.d.ts.map +1 -1
- package/lib/component/toolbar/nmr_toolbar.js +3 -1
- package/lib/component/toolbar/nmr_toolbar.js.map +1 -1
- package/lib/component/utility/CoreSlot.d.ts +27 -0
- package/lib/component/utility/CoreSlot.d.ts.map +1 -0
- package/lib/component/utility/CoreSlot.js +56 -0
- package/lib/component/utility/CoreSlot.js.map +1 -0
- package/lib/component/utility/export.d.ts.map +1 -1
- package/lib/component/utility/export.js +1 -0
- package/lib/component/utility/export.js.map +1 -1
- package/lib/data/PredictionManager.js.map +1 -1
- package/lib/data/constants/signalsKinds.d.ts +1 -2
- package/lib/data/constants/signalsKinds.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -0
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +35 -30
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.js +1 -0
- package/lib/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.js.map +1 -1
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +2 -2
- package/lib/data/matrixGeneration.d.ts.map +1 -1
- package/lib/data/matrixGeneration.js.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/package.json +37 -37
- package/src/component/1d/PredictionErrorsNotations.tsx +5 -4
- package/src/component/1d/peaks/Peaks.tsx +5 -2
- package/src/component/1d/peaks/usePeakShapesPath.ts +0 -1
- package/src/component/1d/ranges/AssignmentLabel.tsx +1 -1
- package/src/component/1d/ranges/FloatingRangeTablePreferencesModal.tsx +238 -0
- package/src/component/1d/ranges/FloatingRanges.tsx +529 -0
- package/src/component/1d/ranges/Ranges.tsx +2 -2
- package/src/component/1d-2d/FieldEdition.tsx +4 -4
- package/src/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.tsx +8 -8
- package/src/component/1d-2d/tools/BrushXY.tsx +8 -8
- package/src/component/2d/1d-tracer/Left1DChart.tsx +24 -1
- package/src/component/2d/1d-tracer/Ranges1D.tsx +134 -0
- package/src/component/2d/1d-tracer/Signals1D.tsx +145 -0
- package/src/component/2d/1d-tracer/Top1DChart.tsx +29 -2
- package/src/component/2d/ft/FTContainer.tsx +1 -0
- package/src/component/2d/zones/SignalsGuideLines.tsx +1 -1
- package/src/component/2d/zones/ZonesAssignmentsLabels.tsx +1 -1
- package/src/component/AnchorSVG.tsx +370 -0
- package/src/component/EventsTrackers/BrushTracker.tsx +7 -2
- package/src/component/SVGTable.tsx +35 -33
- package/src/component/context/KeyModifierContext.tsx +6 -2
- package/src/component/context/LoggerContext.tsx +1 -7
- package/src/component/context/SortSpectraContext.tsx +1 -3
- package/src/component/elements/ActionsButtonsPopover.tsx +12 -14
- package/src/component/elements/Button.tsx +1 -6
- package/src/component/elements/DraggableDialog.tsx +1 -2
- package/src/component/elements/Sections.tsx +9 -7
- package/src/component/elements/TabTitle.tsx +7 -5
- package/src/component/elements/ToolbarPopoverItem.tsx +13 -2
- package/src/component/elements/dropDownButton/DropDownButton.tsx +7 -5
- package/src/component/elements/export/ExportOptionsModal.tsx +51 -280
- package/src/component/elements/export/units.ts +0 -6
- package/src/component/elements/export/utilities/getExportOptions.ts +1 -0
- package/src/component/elements/print/pageSize.ts +1 -1
- package/src/component/header/Header.tsx +2 -4
- package/src/component/hooks/useExport.tsx +1 -3
- package/src/component/hooks/usePanelPreferences.ts +4 -4
- package/src/component/hooks/useSaveSettings.tsx +4 -15
- package/src/component/hooks/useTextMetrics.ts +1 -0
- package/src/component/main/NMRiumViewer.tsx +1 -1
- package/src/component/modal/EditPeakShapeModal.tsx +2 -2
- package/src/component/modal/PublicationStringModal.tsx +5 -11
- package/src/component/modal/SaveAsModal.tsx +80 -82
- package/src/component/modal/aboutUs/AboutUsModal.tsx +5 -4
- package/src/component/modal/editRange/EditRangeModal.tsx +6 -4
- package/src/component/modal/editRange/forms/components/NewSignalTab.tsx +58 -58
- package/src/component/modal/setting/WorkspaceItem.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/errors/context.tsx +3 -3
- package/src/component/modal/setting/tanstack_general_settings/errors/renderer.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/general_settings.tsx +23 -29
- package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/tabs/auto_processing_tab.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/tabs/export_tab.fields.tsx +2 -2
- package/src/component/modal/setting/tanstack_general_settings/tabs/spectra_label_tab.tsx +3 -2
- package/src/component/modal/setting/tanstack_general_settings/tabs/title_block_tab.tsx +3 -2
- package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +41 -8
- package/src/component/panels/PeaksPanel/PeaksPanel.tsx +1 -8
- package/src/component/panels/PeaksPanel/PeaksPreferences.tsx +18 -18
- package/src/component/panels/PeaksPanel/PeaksTable.tsx +19 -17
- package/src/component/panels/RangesPanel/RangesHeader.tsx +1 -2
- package/src/component/panels/RangesPanel/RangesPanel.tsx +2 -2
- package/src/component/panels/RangesPanel/RangesPreferences.tsx +22 -22
- package/src/component/panels/RangesPanel/RangesTable.tsx +19 -17
- package/src/component/panels/RangesPanel/RangesTableRow.tsx +25 -25
- package/src/component/panels/SpectraPanel/SpectraTable.tsx +12 -1
- package/src/component/panels/SpectraPanel/base/RenderAsHTML.tsx +22 -4
- package/src/component/panels/SpectraPanel/base/SpectrumName.tsx +15 -6
- package/src/component/panels/SpectraPanel/base/setting/SpectrumSetting.tsx +3 -2
- package/src/component/panels/SummaryPanel/SummaryPanel.tsx +14 -16
- package/src/component/panels/filtersPanel/FilterPanel.tsx +10 -0
- package/src/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.tsx +1 -0
- package/src/component/panels/filtersPanel/processings_sections_panel.tsx +324 -0
- package/src/component/panels/hooks/useMoleculeAnnotationCore.ts +17 -9
- package/src/component/panels/informationPanel/MixedValuesBadge.tsx +3 -2
- package/src/component/panels/informationPanel/SpectraPicker.tsx +12 -4
- package/src/component/panels/multipleAnalysisPanel/AnalysisChart.tsx +2 -2
- package/src/component/reducer/Reducer.ts +2 -0
- package/src/component/reducer/actions/CorrelationsActions.ts +1 -1
- package/src/component/reducer/actions/DomainActions.ts +1 -4
- package/src/component/reducer/actions/FiltersActions.ts +1 -2
- package/src/component/reducer/actions/LoadAction.ts +1 -3
- package/src/component/reducer/actions/RangesActions.ts +39 -5
- package/src/component/reducer/actions/ToolsActions.ts +5 -21
- package/src/component/reducer/helper/getTraceSpectrumID.tsx +25 -0
- package/src/component/reducer/helper/setRangesViewProperty.ts +1 -2
- package/src/component/reducer/preferences/panelsPreferencesDefaultValues.ts +32 -19
- package/src/component/reducer/preferences/preferencesReducer.ts +2 -2
- package/src/component/reducer/preferences/utilities/initWorkspace.ts +2 -2
- package/src/component/reducer/preferences/utilities/mapWorkspaces.ts +2 -2
- package/src/component/toolbar/ToolTypes.ts +2 -2
- package/src/component/toolbar/nmr_toolbar.tsx +3 -2
- package/src/component/utility/CoreSlot.tsx +126 -0
- package/src/component/utility/export.ts +1 -0
- package/src/data/PredictionManager.ts +4 -6
- package/src/data/constants/signalsKinds.ts +1 -1
- package/src/data/data1d/Spectrum1D/peaks/autoPeakPicking.ts +1 -0
- package/src/data/data1d/Spectrum1D/peaks/optimizePeaks.ts +35 -30
- package/src/data/data1d/Spectrum1D/ranges/detectSignalsByMultipletAnalysis.ts +1 -0
- package/src/data/data1d/multipleSpectraAnalysis.ts +2 -2
- package/src/data/matrixGeneration.ts +1 -5
- package/src/versionInfo.ts +1 -1
- package/lib/component/1d/FloatingRanges.d.ts.map +0 -1
- package/lib/component/1d/FloatingRanges.js +0 -263
- package/lib/component/1d/FloatingRanges.js.map +0 -1
- package/lib/component/elements/export/utilities/exportOptionValidationSchema.d.ts +0 -17
- package/lib/component/elements/export/utilities/exportOptionValidationSchema.d.ts.map +0 -1
- package/lib/component/elements/export/utilities/exportOptionValidationSchema.js +0 -79
- package/lib/component/elements/export/utilities/exportOptionValidationSchema.js.map +0 -1
- package/lib/component/elements/export/utilities/getModes.d.ts +0 -4
- package/lib/component/elements/export/utilities/getModes.d.ts.map +0 -1
- package/lib/component/elements/export/utilities/getModes.js +0 -11
- package/lib/component/elements/export/utilities/getModes.js.map +0 -1
- package/lib/component/utility/renderCoreSlot.d.ts +0 -11
- package/lib/component/utility/renderCoreSlot.d.ts.map +0 -1
- package/lib/component/utility/renderCoreSlot.js +0 -13
- package/lib/component/utility/renderCoreSlot.js.map +0 -1
- package/src/component/1d/FloatingRanges.tsx +0 -378
- package/src/component/elements/export/utilities/exportOptionValidationSchema.ts +0 -106
- package/src/component/elements/export/utilities/getModes.ts +0 -14
- package/src/component/utility/renderCoreSlot.tsx +0 -21
- /package/lib/component/1d/{FloatingRanges.d.ts → ranges/FloatingRanges.d.ts} +0 -0
|
@@ -3,8 +3,9 @@ import styled from '@emotion/styled';
|
|
|
3
3
|
import { revalidateLogic } from '@tanstack/react-form';
|
|
4
4
|
import type { Workspace } from '@zakodium/nmrium-core';
|
|
5
5
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
6
|
-
import {
|
|
6
|
+
import { AppForm, useForm } from 'react-science/ui';
|
|
7
7
|
import { match } from 'ts-pattern';
|
|
8
|
+
import { z } from 'zod';
|
|
8
9
|
|
|
9
10
|
import { usePreferences } from '../../../context/PreferencesContext.js';
|
|
10
11
|
import ErrorOverlay from '../../../main/ErrorOverlay.tsx';
|
|
@@ -60,7 +61,9 @@ interface GeneralSettingsProps extends Omit<
|
|
|
60
61
|
onSave: (values?: Partial<Workspace>) => void;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
|
-
|
|
64
|
+
const metaSchema = z.enum(['apply', 'save']);
|
|
65
|
+
type FormMeta = z.input<typeof metaSchema>;
|
|
66
|
+
const onSubmitMeta: FormMeta = 'apply';
|
|
64
67
|
|
|
65
68
|
function GeneralSettings(props: GeneralSettingsProps) {
|
|
66
69
|
const { close, height, onSave } = props;
|
|
@@ -74,10 +77,12 @@ function GeneralSettings(props: GeneralSettingsProps) {
|
|
|
74
77
|
},
|
|
75
78
|
validationLogic: revalidateLogic({ mode: 'change' }),
|
|
76
79
|
defaultValues,
|
|
77
|
-
|
|
78
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
79
|
-
onSubmitMeta: 'apply' as FormMeta,
|
|
80
|
+
onSubmitMeta,
|
|
80
81
|
onSubmit: ({ value, meta }) => {
|
|
82
|
+
meta = metaSchema.parse(meta, {
|
|
83
|
+
error: () =>
|
|
84
|
+
'Submit event must be attached to a submitter with "data-action" attribute with "apply" or "save" value',
|
|
85
|
+
});
|
|
81
86
|
const mergedValues = formValueToWorkspace(value, currentWorkspace);
|
|
82
87
|
|
|
83
88
|
match(meta)
|
|
@@ -97,30 +102,19 @@ function GeneralSettings(props: GeneralSettingsProps) {
|
|
|
97
102
|
});
|
|
98
103
|
|
|
99
104
|
return (
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}}
|
|
114
|
-
>
|
|
115
|
-
<PreventImplicitSubmit />
|
|
116
|
-
|
|
117
|
-
<GeneralSettingsErrorsOpenProvider form={form}>
|
|
118
|
-
<GeneralSettingsDialogHeader form={form} />
|
|
119
|
-
<GeneralSettingsDialogBody form={form} height={height} />
|
|
120
|
-
<GeneralSettingsDialogFooter form={form} onCancel={close} />
|
|
121
|
-
</GeneralSettingsErrorsOpenProvider>
|
|
122
|
-
</Form>
|
|
123
|
-
</form.AppForm>
|
|
105
|
+
<AppForm
|
|
106
|
+
form={form}
|
|
107
|
+
layout="inline"
|
|
108
|
+
onSubmitMeta={(event) => event.nativeEvent.submitter?.dataset.action}
|
|
109
|
+
>
|
|
110
|
+
<PreventImplicitSubmit />
|
|
111
|
+
|
|
112
|
+
<GeneralSettingsErrorsOpenProvider form={form}>
|
|
113
|
+
<GeneralSettingsDialogHeader form={form} />
|
|
114
|
+
<GeneralSettingsDialogBody form={form} height={height} />
|
|
115
|
+
<GeneralSettingsDialogFooter form={form} onCancel={close} />
|
|
116
|
+
</GeneralSettingsErrorsOpenProvider>
|
|
117
|
+
</AppForm>
|
|
124
118
|
);
|
|
125
119
|
}
|
|
126
120
|
|
package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_body.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Classes, Tab, Tabs as BPTabs } from '@blueprintjs/core';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
|
-
import {
|
|
3
|
+
import { useSelector } from '@tanstack/react-store';
|
|
4
4
|
import { withForm } from 'react-science/ui';
|
|
5
5
|
|
|
6
6
|
import { StyledDialogBody } from '../../../elements/StyledDialogBody.js';
|
|
@@ -54,7 +54,7 @@ export const GeneralSettingsDialogBody = withForm({
|
|
|
54
54
|
height: undefined as number | undefined,
|
|
55
55
|
},
|
|
56
56
|
render: function GeneralSettingsDialogBody({ height, form }) {
|
|
57
|
-
const isExperimentalEnabled =
|
|
57
|
+
const isExperimentalEnabled = useSelector(
|
|
58
58
|
form.store,
|
|
59
59
|
(state) =>
|
|
60
60
|
state.values.display.general?.experimentalFeatures?.display ?? false,
|
package/src/component/modal/setting/tanstack_general_settings/general_settings_dialog_header.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Classes } from '@blueprintjs/core';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
|
-
import {
|
|
3
|
+
import { useSelector } from '@tanstack/react-store';
|
|
4
4
|
import { Button, withForm } from 'react-science/ui';
|
|
5
5
|
|
|
6
6
|
import { useErrors } from './errors/context.tsx';
|
|
@@ -12,7 +12,7 @@ export const GeneralSettingsDialogHeader = withForm({
|
|
|
12
12
|
defaultValues: defaultGeneralSettingsFormValues,
|
|
13
13
|
render: function GeneralSettingsDialogHeader({ form }) {
|
|
14
14
|
const { reset, store } = form;
|
|
15
|
-
const formValues =
|
|
15
|
+
const formValues = useSelector(store, (state) => state.values);
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
18
|
<DialogHeader className={Classes.DIALOG_HEADER}>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useSelector } from '@tanstack/react-store';
|
|
2
2
|
import { withFieldGroup, withForm } from 'react-science/ui';
|
|
3
3
|
import type { z } from 'zod';
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ import { defaultGeneralSettingsFormValues } from '../validation.ts';
|
|
|
9
9
|
export const AutoProcessingTab = withForm({
|
|
10
10
|
defaultValues: defaultGeneralSettingsFormValues,
|
|
11
11
|
render: function Render({ form }) {
|
|
12
|
-
const isExperimentalFeatures =
|
|
12
|
+
const isExperimentalFeatures = useSelector(
|
|
13
13
|
form.store,
|
|
14
14
|
(state) => state.values.display.general?.experimentalFeatures?.display,
|
|
15
15
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Checkbox, Tag } from '@blueprintjs/core';
|
|
2
|
-
import {
|
|
2
|
+
import { useSelector } from '@tanstack/react-store';
|
|
3
3
|
import type { PageSizeName, Unit } from '@zakodium/nmrium-core';
|
|
4
4
|
import { units } from '@zakodium/nmrium-core';
|
|
5
5
|
import { memo, useMemo } from 'react';
|
|
@@ -77,7 +77,7 @@ function safeStringNumber(str: string, onInvalid: (str: string) => void) {
|
|
|
77
77
|
export const ExportFields = withFieldGroup({
|
|
78
78
|
defaultValues: defaultGeneralSettingsFormValues.export.png,
|
|
79
79
|
render: function ExportFields({ group }) {
|
|
80
|
-
const inputValues =
|
|
80
|
+
const inputValues = useSelector(group.store, (s) => s.values);
|
|
81
81
|
const outputValues = useMemo(() => {
|
|
82
82
|
return exportSettingsValidation.decode(inputValues);
|
|
83
83
|
}, [inputValues]);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Classes } from '@blueprintjs/core';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
|
-
import { useField
|
|
3
|
+
import { useField } from '@tanstack/react-form';
|
|
4
|
+
import { useSelector } from '@tanstack/react-store';
|
|
4
5
|
import { useCallback, useMemo, useState } from 'react';
|
|
5
6
|
import { FaRegTrashAlt } from 'react-icons/fa';
|
|
6
7
|
import {
|
|
@@ -163,7 +164,7 @@ const TableFields = withForm({
|
|
|
163
164
|
[setValue],
|
|
164
165
|
);
|
|
165
166
|
|
|
166
|
-
const fieldsData =
|
|
167
|
+
const fieldsData = useSelector(store, (s) => s.value);
|
|
167
168
|
|
|
168
169
|
return (
|
|
169
170
|
<TableSection
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Classes } from '@blueprintjs/core';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
|
-
import { useField
|
|
3
|
+
import { useField } from '@tanstack/react-form';
|
|
4
|
+
import { useSelector } from '@tanstack/react-store';
|
|
4
5
|
import { useCallback, useMemo, useState } from 'react';
|
|
5
6
|
import { FaRegTrashAlt } from 'react-icons/fa';
|
|
6
7
|
import {
|
|
@@ -180,7 +181,7 @@ const TableFields = withForm({
|
|
|
180
181
|
|
|
181
182
|
// It seems fields.setValue don't always trigger rerender
|
|
182
183
|
// so fields.state.value can de-sync and cause weird behavior with DnD reorder.
|
|
183
|
-
const fieldsData =
|
|
184
|
+
const fieldsData = useSelector(store, (s) => s.value);
|
|
184
185
|
|
|
185
186
|
return (
|
|
186
187
|
<TableSection
|
|
@@ -8,8 +8,10 @@ import {
|
|
|
8
8
|
FaDownload,
|
|
9
9
|
FaFileExport,
|
|
10
10
|
FaFileImage,
|
|
11
|
+
FaMinusSquare,
|
|
11
12
|
FaPaste,
|
|
12
13
|
FaPlus,
|
|
14
|
+
FaPlusSquare,
|
|
13
15
|
FaRegBookmark,
|
|
14
16
|
FaRegTrashAlt,
|
|
15
17
|
} from 'react-icons/fa';
|
|
@@ -112,6 +114,7 @@ const MOL_EXPORT_MENU: Array<ToolbarPopoverMenuItem<ExportDataItem>> = [
|
|
|
112
114
|
},
|
|
113
115
|
},
|
|
114
116
|
];
|
|
117
|
+
|
|
115
118
|
interface MoleculePanelHeaderProps {
|
|
116
119
|
currentIndex: number;
|
|
117
120
|
molecules: StateMoleculeExtended[];
|
|
@@ -146,6 +149,9 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
146
149
|
const { dialog, openDialog, closeDialog } = useDialogToggle({
|
|
147
150
|
autoLabelDatabaseDialog: false,
|
|
148
151
|
});
|
|
152
|
+
const { toggleAtomAnnotation, isActiveAnnotation, setAtomAnnotation } =
|
|
153
|
+
useMoleculeAnnotationCore(moleculeKey, moleculesView[moleculeKey]);
|
|
154
|
+
|
|
149
155
|
const saveAsSVGHandler = useCallback(() => {
|
|
150
156
|
if (!rootRef) return;
|
|
151
157
|
exportAsSVG(`molSVG${currentIndex}`, {
|
|
@@ -318,6 +324,25 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
318
324
|
payload: { id, label, molfile: molecule.toMolfileV3() },
|
|
319
325
|
});
|
|
320
326
|
}
|
|
327
|
+
function toggleProchirality(action: 'add' | 'remove') {
|
|
328
|
+
const molecule = molecules[currentIndex];
|
|
329
|
+
|
|
330
|
+
setAtomAnnotation('custom-labels');
|
|
331
|
+
|
|
332
|
+
if (!molecule) return;
|
|
333
|
+
|
|
334
|
+
const { id, label } = molecule;
|
|
335
|
+
if (action === 'add') {
|
|
336
|
+
topicMolecule[id].setProchiralHydrogenLabels();
|
|
337
|
+
} else {
|
|
338
|
+
topicMolecule[id].removeProchiralHydrogenLabels();
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
dispatch({
|
|
342
|
+
type: 'SET_MOLECULE',
|
|
343
|
+
payload: { id, label, molfile: topicMolecule[id].toMolfile() },
|
|
344
|
+
});
|
|
345
|
+
}
|
|
321
346
|
|
|
322
347
|
function autoLabels() {
|
|
323
348
|
const currentMolecule = molecules[currentIndex];
|
|
@@ -371,10 +396,18 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
371
396
|
text: 'Template database',
|
|
372
397
|
onClick: () => openDialog('autoLabelDatabaseDialog'),
|
|
373
398
|
},
|
|
399
|
+
{
|
|
400
|
+
icon: <FaPlusSquare />,
|
|
401
|
+
text: 'Add prochirality',
|
|
402
|
+
onClick: () => toggleProchirality('add'),
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
icon: <FaMinusSquare />,
|
|
406
|
+
text: 'Remove prochirality',
|
|
407
|
+
onClick: () => toggleProchirality('remove'),
|
|
408
|
+
},
|
|
374
409
|
];
|
|
375
410
|
|
|
376
|
-
const { handleChangeAtomAnnotation, isAnnotation } =
|
|
377
|
-
useMoleculeAnnotationCore(moleculeKey, moleculesView[moleculeKey]);
|
|
378
411
|
return (
|
|
379
412
|
<PanelHeader
|
|
380
413
|
onClickSettings={onClickPreferences}
|
|
@@ -422,23 +455,23 @@ export default function MoleculePanelHeader(props: MoleculePanelHeaderProps) {
|
|
|
422
455
|
)}
|
|
423
456
|
|
|
424
457
|
<Toolbar.Item
|
|
425
|
-
tooltip={`${booleanToString(!
|
|
458
|
+
tooltip={`${booleanToString(!isActiveAnnotation('atom-numbers'))} atom number`}
|
|
426
459
|
icon={<MdNumbers />}
|
|
427
|
-
onClick={() =>
|
|
428
|
-
active={
|
|
460
|
+
onClick={() => toggleAtomAnnotation('atom-numbers')}
|
|
461
|
+
active={isActiveAnnotation('atom-numbers')}
|
|
429
462
|
disabled={!hasMolecules}
|
|
430
463
|
/>
|
|
431
464
|
<Toolbar.Item
|
|
432
465
|
tooltip={
|
|
433
466
|
<TooltipHelpContent
|
|
434
|
-
title={`${booleanToString(!
|
|
467
|
+
title={`${booleanToString(!isActiveAnnotation('custom-labels'), { trueLabel: 'Display' })} custom atom labels`}
|
|
435
468
|
description="Custom atom labels can be displayed or hidden on the molecule structure"
|
|
436
469
|
link="https://docs.nmrium.org/help/structure-labelling/"
|
|
437
470
|
/>
|
|
438
471
|
}
|
|
439
472
|
icon={<FaRegBookmark />}
|
|
440
|
-
onClick={() =>
|
|
441
|
-
active={
|
|
473
|
+
onClick={() => toggleAtomAnnotation('custom-labels')}
|
|
474
|
+
active={isActiveAnnotation('custom-labels')}
|
|
442
475
|
disabled={!hasMolecules}
|
|
443
476
|
/>
|
|
444
477
|
</>
|
|
@@ -111,14 +111,7 @@ function PeaksPanelInner(props: PeaksPanelInnerProps) {
|
|
|
111
111
|
const filterPeaks = peaks.values.filter((peak) =>
|
|
112
112
|
isInRange(peak.x, { from, to }),
|
|
113
113
|
);
|
|
114
|
-
|
|
115
|
-
dispatch({ type: 'OPTIMIZE_PEAKS', payload: { peaks: filterPeaks } });
|
|
116
|
-
} else {
|
|
117
|
-
toaster.show({
|
|
118
|
-
message: 'optimization can be done on no more than 15 peaks',
|
|
119
|
-
intent: 'danger',
|
|
120
|
-
});
|
|
121
|
-
}
|
|
114
|
+
dispatch({ type: 'OPTIMIZE_PEAKS', payload: { peaks: filterPeaks } });
|
|
122
115
|
};
|
|
123
116
|
|
|
124
117
|
function toggleViewProperty(key: keyof FilterType<PeaksViewState, boolean>) {
|
|
@@ -21,66 +21,66 @@ const formatFields: NucleusPreferenceField[] = [
|
|
|
21
21
|
{
|
|
22
22
|
id: 1,
|
|
23
23
|
label: 'Serial number :',
|
|
24
|
-
checkFieldName: 'showSerialNumber',
|
|
24
|
+
checkFieldName: 'tablePreferences.showSerialNumber',
|
|
25
25
|
hideFormatField: true,
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
id: 2,
|
|
29
29
|
label: 'δ (ppm) :',
|
|
30
|
-
checkFieldName: 'deltaPPM.show',
|
|
31
|
-
formatFieldName: 'deltaPPM.format',
|
|
30
|
+
checkFieldName: 'tablePreferences.deltaPPM.show',
|
|
31
|
+
formatFieldName: 'tablePreferences.deltaPPM.format',
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
id: 3,
|
|
35
35
|
label: 'δ (Hz) :',
|
|
36
|
-
checkFieldName: 'deltaHz.show',
|
|
37
|
-
formatFieldName: 'deltaHz.format',
|
|
36
|
+
checkFieldName: 'tablePreferences.deltaHz.show',
|
|
37
|
+
formatFieldName: 'tablePreferences.deltaHz.format',
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
id: 4,
|
|
41
41
|
label: 'Peak Width (Hz)',
|
|
42
|
-
checkFieldName: 'peakWidth.show',
|
|
43
|
-
formatFieldName: 'peakWidth.format',
|
|
42
|
+
checkFieldName: 'tablePreferences.peakWidth.show',
|
|
43
|
+
formatFieldName: 'tablePreferences.peakWidth.format',
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
id: 5,
|
|
47
47
|
label: 'Intensity :',
|
|
48
|
-
checkFieldName: 'intensity.show',
|
|
49
|
-
formatFieldName: 'intensity.format',
|
|
48
|
+
checkFieldName: 'tablePreferences.intensity.show',
|
|
49
|
+
formatFieldName: 'tablePreferences.intensity.format',
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
id: 6,
|
|
53
53
|
label: 'kind :',
|
|
54
|
-
checkFieldName: '
|
|
54
|
+
checkFieldName: 'tablePreferences.showKind',
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
id: 7,
|
|
58
58
|
label: 'fwhm :',
|
|
59
|
-
checkFieldName: 'fwhm.show',
|
|
60
|
-
formatFieldName: 'fwhm.format',
|
|
59
|
+
checkFieldName: 'tablePreferences.fwhm.show',
|
|
60
|
+
formatFieldName: 'tablePreferences.fwhm.format',
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
id: 8,
|
|
64
64
|
label: 'mu :',
|
|
65
|
-
checkFieldName: 'mu.show',
|
|
66
|
-
formatFieldName: 'mu.format',
|
|
65
|
+
checkFieldName: 'tablePreferences.mu.show',
|
|
66
|
+
formatFieldName: 'tablePreferences.mu.format',
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
id: 11,
|
|
70
70
|
label: 'gamma :',
|
|
71
|
-
checkFieldName: 'gamma.show',
|
|
72
|
-
formatFieldName: 'gamma.format',
|
|
71
|
+
checkFieldName: 'tablePreferences.gamma.show',
|
|
72
|
+
formatFieldName: 'tablePreferences.gamma.format',
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
id: 9,
|
|
76
76
|
label: 'Delete action :',
|
|
77
|
-
checkFieldName: 'showDeleteAction',
|
|
77
|
+
checkFieldName: 'tablePreferences.showDeleteAction',
|
|
78
78
|
hideFormatField: true,
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
id: 10,
|
|
82
82
|
label: 'Edit peak shape action :',
|
|
83
|
-
checkFieldName: 'showEditPeakShapeAction',
|
|
83
|
+
checkFieldName: 'tablePreferences.showEditPeakShapeAction',
|
|
84
84
|
hideFormatField: true,
|
|
85
85
|
},
|
|
86
86
|
];
|
|
@@ -20,7 +20,7 @@ import type { PeakRecord } from './PeaksPanel.js';
|
|
|
20
20
|
|
|
21
21
|
export function usePeaksTableColumns(activeTab: string) {
|
|
22
22
|
const dispatch = useDispatch();
|
|
23
|
-
const
|
|
23
|
+
const { tablePreferences } = usePanelPreferences('peaks', activeTab);
|
|
24
24
|
const [peak, setEditedPeak] = useState<Peak1D | undefined>();
|
|
25
25
|
|
|
26
26
|
const deletePeakHandler = useCallback(
|
|
@@ -64,7 +64,7 @@ export function usePeaksTableColumns(activeTab: string) {
|
|
|
64
64
|
<EditableColumn
|
|
65
65
|
value={formatNumber(
|
|
66
66
|
row.original.x,
|
|
67
|
-
|
|
67
|
+
tablePreferences.deltaPPM.format,
|
|
68
68
|
)}
|
|
69
69
|
onSave={(value) => saveDeltaPPMRefsHandler(value, row.original)}
|
|
70
70
|
type="number"
|
|
@@ -78,7 +78,7 @@ export function usePeaksTableColumns(activeTab: string) {
|
|
|
78
78
|
Header: 'δ (Hz)',
|
|
79
79
|
accessor: 'xHz',
|
|
80
80
|
Cell: ({ row }: CellProps<PeakRecord>) =>
|
|
81
|
-
formatNumber(row.original.xHz,
|
|
81
|
+
formatNumber(row.original.xHz, tablePreferences.deltaHz.format),
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
showWhen: 'intensity.show',
|
|
@@ -87,7 +87,7 @@ export function usePeaksTableColumns(activeTab: string) {
|
|
|
87
87
|
style: { maxWidth: '80px' },
|
|
88
88
|
accessor: 'y',
|
|
89
89
|
Cell: ({ row }: CellProps<PeakRecord>) =>
|
|
90
|
-
formatNumber(row.original.y,
|
|
90
|
+
formatNumber(row.original.y, tablePreferences.intensity.format),
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
showWhen: 'peakWidth.show',
|
|
@@ -95,7 +95,7 @@ export function usePeaksTableColumns(activeTab: string) {
|
|
|
95
95
|
Header: 'Width (Hz)',
|
|
96
96
|
accessor: 'width',
|
|
97
97
|
Cell: ({ row }: CellProps<PeakRecord>) =>
|
|
98
|
-
formatNumber(row.original.width,
|
|
98
|
+
formatNumber(row.original.width, tablePreferences.peakWidth.format),
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
101
|
showWhen: 'showKind',
|
|
@@ -110,10 +110,10 @@ export function usePeaksTableColumns(activeTab: string) {
|
|
|
110
110
|
accessor: (row) => row?.shape?.fwhm || '',
|
|
111
111
|
Cell: ({ row }: CellProps<PeakRecord>) => {
|
|
112
112
|
const fwhm = row.original?.shape?.fwhm;
|
|
113
|
-
if (fwhm) {
|
|
114
|
-
return
|
|
113
|
+
if (typeof fwhm !== 'number') {
|
|
114
|
+
return '';
|
|
115
115
|
}
|
|
116
|
-
return
|
|
116
|
+
return formatNumber(fwhm, tablePreferences.fwhm.format);
|
|
117
117
|
},
|
|
118
118
|
},
|
|
119
119
|
{
|
|
@@ -126,10 +126,10 @@ export function usePeaksTableColumns(activeTab: string) {
|
|
|
126
126
|
const mu =
|
|
127
127
|
row.original?.shape?.kind === 'pseudoVoigt' &&
|
|
128
128
|
row.original?.shape?.mu;
|
|
129
|
-
if (mu) {
|
|
130
|
-
return
|
|
129
|
+
if (typeof mu !== 'number') {
|
|
130
|
+
return '';
|
|
131
131
|
}
|
|
132
|
-
return
|
|
132
|
+
return formatNumber(mu, tablePreferences.mu.format);
|
|
133
133
|
},
|
|
134
134
|
},
|
|
135
135
|
{
|
|
@@ -143,10 +143,12 @@ export function usePeaksTableColumns(activeTab: string) {
|
|
|
143
143
|
const gamma =
|
|
144
144
|
row.original?.shape?.kind === 'generalizedLorentzian' &&
|
|
145
145
|
row.original?.shape?.gamma;
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
|
|
147
|
+
if (typeof gamma !== 'number') {
|
|
148
|
+
return '';
|
|
148
149
|
}
|
|
149
|
-
|
|
150
|
+
|
|
151
|
+
return formatNumber(gamma, tablePreferences.gamma.format);
|
|
150
152
|
},
|
|
151
153
|
},
|
|
152
154
|
{
|
|
@@ -170,7 +172,7 @@ export function usePeaksTableColumns(activeTab: string) {
|
|
|
170
172
|
},
|
|
171
173
|
],
|
|
172
174
|
[
|
|
173
|
-
|
|
175
|
+
tablePreferences,
|
|
174
176
|
saveDeltaPPMRefsHandler,
|
|
175
177
|
deletePeakHandler,
|
|
176
178
|
editPeakHandler,
|
|
@@ -181,14 +183,14 @@ export function usePeaksTableColumns(activeTab: string) {
|
|
|
181
183
|
const columns: Array<ControlCustomColumn<PeakRecord>> = [];
|
|
182
184
|
for (const col of COLUMNS) {
|
|
183
185
|
const { showWhen, ...colParams } = col;
|
|
184
|
-
if (dlv(
|
|
186
|
+
if (dlv(tablePreferences, showWhen)) {
|
|
185
187
|
addCustomColumn(columns, colParams);
|
|
186
188
|
}
|
|
187
189
|
}
|
|
188
190
|
|
|
189
191
|
columns.sort((object1, object2) => object1.index - object2.index);
|
|
190
192
|
return columns;
|
|
191
|
-
}, [COLUMNS,
|
|
193
|
+
}, [COLUMNS, tablePreferences]);
|
|
192
194
|
|
|
193
195
|
return { tableColumns, peak, setEditedPeak };
|
|
194
196
|
}
|
|
@@ -40,8 +40,7 @@ interface ExportData {
|
|
|
40
40
|
id: ExportRangesType;
|
|
41
41
|
}
|
|
42
42
|
type ExportItem =
|
|
43
|
-
|
|
44
|
-
| ToolbarPopoverMenuDivider;
|
|
43
|
+
ToolbarPopoverMenuItem<ExportData> | ToolbarPopoverMenuDivider;
|
|
45
44
|
|
|
46
45
|
const EXPORT_MENU: ExportItem[] = [
|
|
47
46
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Info1D, Range, Ranges } from '@zakodium/nmr-types';
|
|
2
2
|
import type {
|
|
3
3
|
Spectrum1D,
|
|
4
|
-
|
|
4
|
+
WorkspacePanelPreferences,
|
|
5
5
|
} from '@zakodium/nmrium-core';
|
|
6
6
|
import type { NmrData1D } from 'cheminfo-types';
|
|
7
7
|
import { xGetFromToIndex } from 'ml-spectra-processing';
|
|
@@ -37,7 +37,7 @@ interface RangesTablePanelInnerProps {
|
|
|
37
37
|
info: Info1D;
|
|
38
38
|
xDomain: number[];
|
|
39
39
|
activeTab: string;
|
|
40
|
-
preferences:
|
|
40
|
+
preferences: WorkspacePanelPreferences['ranges'];
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
export interface RangesTableDataMetaInfo {
|
|
@@ -18,91 +18,91 @@ const formatFields: NucleusPreferenceField[] = [
|
|
|
18
18
|
{
|
|
19
19
|
id: 1,
|
|
20
20
|
label: 'Serial number :',
|
|
21
|
-
checkFieldName: 'showSerialNumber',
|
|
21
|
+
checkFieldName: 'tablePreferences.showSerialNumber',
|
|
22
22
|
hideFormatField: true,
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
id: 2,
|
|
26
26
|
label: 'Assignment label :',
|
|
27
|
-
checkFieldName: 'showAssignmentLabel',
|
|
27
|
+
checkFieldName: 'tablePreferences.showAssignmentLabel',
|
|
28
28
|
hideFormatField: true,
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
id: 3,
|
|
32
32
|
label: 'From (ppm) :',
|
|
33
|
-
checkFieldName: 'from.show',
|
|
34
|
-
formatFieldName: 'from.format',
|
|
33
|
+
checkFieldName: 'tablePreferences.from.show',
|
|
34
|
+
formatFieldName: 'tablePreferences.from.format',
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
id: 4,
|
|
38
38
|
label: 'To (ppm) :',
|
|
39
|
-
checkFieldName: 'to.show',
|
|
40
|
-
formatFieldName: 'to.format',
|
|
39
|
+
checkFieldName: 'tablePreferences.to.show',
|
|
40
|
+
formatFieldName: 'tablePreferences.to.format',
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
id: 5,
|
|
44
44
|
label: 'Absolute integration :',
|
|
45
|
-
checkFieldName: 'absolute.show',
|
|
46
|
-
formatFieldName: 'absolute.format',
|
|
45
|
+
checkFieldName: 'tablePreferences.absolute.show',
|
|
46
|
+
formatFieldName: 'tablePreferences.absolute.format',
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
id: 6,
|
|
50
50
|
label: 'Relative integration :',
|
|
51
|
-
checkFieldName: 'relative.show',
|
|
52
|
-
formatFieldName: 'relative.format',
|
|
51
|
+
checkFieldName: 'tablePreferences.relative.show',
|
|
52
|
+
formatFieldName: 'tablePreferences.relative.format',
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
id: 7,
|
|
56
56
|
label: 'δ (ppm) :',
|
|
57
|
-
checkFieldName: 'deltaPPM.show',
|
|
58
|
-
formatFieldName: 'deltaPPM.format',
|
|
57
|
+
checkFieldName: 'tablePreferences.deltaPPM.show',
|
|
58
|
+
formatFieldName: 'tablePreferences.deltaPPM.format',
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
id: 8,
|
|
62
62
|
label: 'δ (Hz) :',
|
|
63
|
-
checkFieldName: 'deltaHz.show',
|
|
64
|
-
formatFieldName: 'deltaHz.format',
|
|
63
|
+
checkFieldName: 'tablePreferences.deltaHz.show',
|
|
64
|
+
formatFieldName: 'tablePreferences.deltaHz.format',
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
id: 9,
|
|
68
68
|
label: 'Coupling (Hz) :',
|
|
69
|
-
checkFieldName: 'coupling.show',
|
|
70
|
-
formatFieldName: 'coupling.format',
|
|
69
|
+
checkFieldName: 'tablePreferences.coupling.show',
|
|
70
|
+
formatFieldName: 'tablePreferences.coupling.format',
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
id: 10,
|
|
74
74
|
label: 'Kind :',
|
|
75
|
-
checkFieldName: 'showKind',
|
|
75
|
+
checkFieldName: 'tablePreferences.showKind',
|
|
76
76
|
hideFormatField: true,
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
id: 11,
|
|
80
80
|
label: 'Multiplicity :',
|
|
81
|
-
checkFieldName: 'showMultiplicity',
|
|
81
|
+
checkFieldName: 'tablePreferences.showMultiplicity',
|
|
82
82
|
hideFormatField: true,
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
id: 12,
|
|
86
86
|
label: 'Assignment links :',
|
|
87
|
-
checkFieldName: 'showAssignment',
|
|
87
|
+
checkFieldName: 'tablePreferences.showAssignment',
|
|
88
88
|
hideFormatField: true,
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
id: 13,
|
|
92
92
|
label: 'Delete action :',
|
|
93
|
-
checkFieldName: 'showDeleteAction',
|
|
93
|
+
checkFieldName: 'tablePreferences.showDeleteAction',
|
|
94
94
|
hideFormatField: true,
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
id: 14,
|
|
98
98
|
label: 'Zoom action :',
|
|
99
|
-
checkFieldName: 'showZoomAction',
|
|
99
|
+
checkFieldName: 'tablePreferences.showZoomAction',
|
|
100
100
|
hideFormatField: true,
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
id: 15,
|
|
104
104
|
label: 'Edit action :',
|
|
105
|
-
checkFieldName: 'showEditAction',
|
|
105
|
+
checkFieldName: 'tablePreferences.showEditAction',
|
|
106
106
|
hideFormatField: true,
|
|
107
107
|
},
|
|
108
108
|
];
|