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
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nmrium",
|
|
3
3
|
"description": "React component to display and process nuclear magnetic resonance (NMR) spectra.",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.4.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
"clean-lib": "rimraf lib",
|
|
27
27
|
"cspell": "cspell lint \"**/*.tsx\"",
|
|
28
28
|
"dev": "vite --host localhost --port 3000 --open",
|
|
29
|
-
"eslint": "eslint . --cache --max-warnings=
|
|
29
|
+
"eslint": "eslint . --cache --max-warnings=102",
|
|
30
30
|
"eslint-fix": "node --run eslint -- --fix",
|
|
31
31
|
"install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && npm install && npm start",
|
|
32
32
|
"knip": "knip",
|
|
33
33
|
"playwright": "playwright test --ui",
|
|
34
34
|
"prepack": "node --run clean-lib && node --run compile",
|
|
35
35
|
"prepublishOnly": "node --run set-version-npm",
|
|
36
|
-
"prettier": "prettier --check
|
|
37
|
-
"prettier-write": "prettier --write
|
|
36
|
+
"prettier": "prettier --check .",
|
|
37
|
+
"prettier-write": "prettier --write .",
|
|
38
38
|
"set-version-npm": "VERSION=$(jq .version package.json | tr -d '\"') && echo \"export default { version: 'v$VERSION' };\" > src/versionInfo.ts",
|
|
39
39
|
"set-version-sha": "SHA=$(git rev-parse HEAD) && echo \"export default { version: 'git-$SHA' };\" > src/versionInfo.ts",
|
|
40
40
|
"start": "node --run dev",
|
|
@@ -63,17 +63,17 @@
|
|
|
63
63
|
"nmr-correlation": "2.3.3"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@atlaskit/pragmatic-drag-and-drop": "^1.8.1",
|
|
67
|
-
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.2.0",
|
|
68
66
|
"@emotion/react": "^11.14.0",
|
|
69
67
|
"@emotion/styled": "^11.14.1",
|
|
70
68
|
"@hookform/resolvers": "^5.4.0",
|
|
71
69
|
"@tanstack/react-form": "^1.33.0",
|
|
70
|
+
"@tanstack/react-store": "^0.11.0",
|
|
72
71
|
"@tanstack/react-table": "^8.21.3",
|
|
73
|
-
"@zakodium/nmr-types": "^0.5.
|
|
74
|
-
"@zakodium/nmrium-core": "^0.7.
|
|
75
|
-
"@zakodium/nmrium-core-plugins": "^0.7.
|
|
76
|
-
"@zakodium/pdnd-esm": "^1.0
|
|
72
|
+
"@zakodium/nmr-types": "^0.5.18",
|
|
73
|
+
"@zakodium/nmrium-core": "^0.7.37",
|
|
74
|
+
"@zakodium/nmrium-core-plugins": "^0.7.50",
|
|
75
|
+
"@zakodium/pdnd-esm": "^1.1.0",
|
|
76
|
+
"@zakodium/utils": "^0.2.0",
|
|
77
77
|
"@zip.js/zip.js": "^2.8.26",
|
|
78
78
|
"cheminfo-font": "^1.27.0",
|
|
79
79
|
"cheminfo-types": "^1.15.0",
|
|
@@ -87,34 +87,34 @@
|
|
|
87
87
|
"file-collection": "^6.6.1",
|
|
88
88
|
"file-saver": "^2.0.5",
|
|
89
89
|
"get-jpaths": "^1.4.1",
|
|
90
|
-
"immer": "^11.1.
|
|
90
|
+
"immer": "^11.1.11",
|
|
91
91
|
"lodash": "^4.18.1",
|
|
92
92
|
"mf-parser": "^3.9.1",
|
|
93
93
|
"ml-array-mean": "^2.0.0",
|
|
94
94
|
"ml-array-median": "^2.0.0",
|
|
95
95
|
"ml-conrec": "^6.0.0",
|
|
96
|
-
"ml-gsd": "^14.1
|
|
97
|
-
"ml-signal-processing": "^2.2.
|
|
98
|
-
"ml-spectra-processing": "^14.29.
|
|
96
|
+
"ml-gsd": "^14.2.1",
|
|
97
|
+
"ml-signal-processing": "^2.2.2",
|
|
98
|
+
"ml-spectra-processing": "^14.29.2",
|
|
99
99
|
"ml-tree-similarity": "^2.2.0",
|
|
100
100
|
"nmr-correlation": "2.3.3",
|
|
101
|
-
"nmr-processing": "^22.
|
|
101
|
+
"nmr-processing": "^22.19.0",
|
|
102
102
|
"numeral": "^2.0.6",
|
|
103
|
-
"openchemlib": "^9.
|
|
104
|
-
"openchemlib-utils": "^8.
|
|
105
|
-
"papaparse": "^5.5.
|
|
103
|
+
"openchemlib": "^9.24.0",
|
|
104
|
+
"openchemlib-utils": "^8.17.1",
|
|
105
|
+
"papaparse": "^5.5.4",
|
|
106
106
|
"react-d3-utils": "^3.1.2",
|
|
107
107
|
"react-dropzone": "^15.0.0",
|
|
108
108
|
"react-error-boundary": "^6.1.2",
|
|
109
|
-
"react-hook-form": "^7.
|
|
110
|
-
"react-icons": "^5.
|
|
109
|
+
"react-hook-form": "^7.81.0",
|
|
110
|
+
"react-icons": "^5.7.0",
|
|
111
111
|
"react-inspector": "^9.0.0",
|
|
112
112
|
"react-mf": "^3.1.1",
|
|
113
113
|
"react-ocl": "^8.7.1",
|
|
114
114
|
"react-ocl-nmr": "^4.1.1",
|
|
115
115
|
"react-plot": "^3.1.2",
|
|
116
116
|
"react-rnd": "^10.5.3",
|
|
117
|
-
"react-science": "^
|
|
117
|
+
"react-science": "^20.4.0",
|
|
118
118
|
"react-table": "^7.8.0",
|
|
119
119
|
"smart-array-filter": "^5.0.0",
|
|
120
120
|
"ts-pattern": "^5.9.0",
|
|
@@ -122,9 +122,9 @@
|
|
|
122
122
|
"zod": "^4.4.3"
|
|
123
123
|
},
|
|
124
124
|
"devDependencies": {
|
|
125
|
-
"@blueprintjs/core": "^6.
|
|
126
|
-
"@blueprintjs/icons": "^6.
|
|
127
|
-
"@blueprintjs/select": "^6.3.
|
|
125
|
+
"@blueprintjs/core": "^6.17.1",
|
|
126
|
+
"@blueprintjs/icons": "^6.13.0",
|
|
127
|
+
"@blueprintjs/select": "^6.3.2",
|
|
128
128
|
"@playwright/test": "=1.57.0",
|
|
129
129
|
"@simbathesailor/use-what-changed": "^2.0.0",
|
|
130
130
|
"@types/d3-array": "^3.2.2",
|
|
@@ -133,38 +133,38 @@
|
|
|
133
133
|
"@types/dlv": "^1.1.5",
|
|
134
134
|
"@types/file-saver": "^2.0.7",
|
|
135
135
|
"@types/lodash": "^4.17.24",
|
|
136
|
-
"@types/node": "^
|
|
136
|
+
"@types/node": "^26.1.0",
|
|
137
137
|
"@types/numeral": "^2.0.5",
|
|
138
138
|
"@types/papaparse": "^5.5.2",
|
|
139
139
|
"@types/react": "^18.3.13",
|
|
140
140
|
"@types/react-dom": "^18.3.1",
|
|
141
141
|
"@types/react-table": "^7.7.20",
|
|
142
|
-
"@vitejs/plugin-react": "^6.0.
|
|
143
|
-
"@vitest/coverage-v8": "^4.1.
|
|
142
|
+
"@vitejs/plugin-react": "^6.0.3",
|
|
143
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
144
144
|
"@zakodium/tsconfig": "^1.0.5",
|
|
145
145
|
"cross-env": "^10.1.0",
|
|
146
146
|
"cspell": "^10.0.1",
|
|
147
147
|
"eslint": "^9.39.2",
|
|
148
148
|
"eslint-config-cheminfo-react": "^20.1.0",
|
|
149
149
|
"eslint-config-cheminfo-typescript": "^22.1.0",
|
|
150
|
-
"knip": "^6.
|
|
150
|
+
"knip": "^6.25.0",
|
|
151
151
|
"modern-normalize": "^3.0.1",
|
|
152
|
-
"postcss": "^8.5.
|
|
153
|
-
"postcss-styled-syntax": "^0.7.
|
|
154
|
-
"prettier": "^3.
|
|
152
|
+
"postcss": "^8.5.16",
|
|
153
|
+
"postcss-styled-syntax": "^0.7.2",
|
|
154
|
+
"prettier": "^3.9.4",
|
|
155
155
|
"rc-menu": "^9.16.1",
|
|
156
156
|
"react": "^18.3.1",
|
|
157
157
|
"react-dom": "^18.3.1",
|
|
158
|
-
"react-router-dom": "^7.
|
|
158
|
+
"react-router-dom": "^7.18.1",
|
|
159
159
|
"rimraf": "^6.1.3",
|
|
160
160
|
"serve": "^14.2.6",
|
|
161
|
-
"stylelint": "^17.
|
|
161
|
+
"stylelint": "^17.14.0",
|
|
162
162
|
"stylelint-config-standard": "^40.0.0",
|
|
163
163
|
"typescript": "~6.0.3",
|
|
164
|
-
"vite": "^8.
|
|
165
|
-
"vitest": "^4.1.
|
|
164
|
+
"vite": "^8.1.3",
|
|
165
|
+
"vitest": "^4.1.10"
|
|
166
166
|
},
|
|
167
167
|
"volta": {
|
|
168
|
-
"node": "24.
|
|
168
|
+
"node": "24.18.0"
|
|
169
169
|
}
|
|
170
|
-
}
|
|
170
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PopoverNext } from '@blueprintjs/core';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { IdcodeSvgRenderer } from 'react-ocl';
|
|
4
4
|
|
|
5
|
-
import { isSpectrum1D } from '../../data/data1d/Spectrum1D/
|
|
5
|
+
import { isSpectrum1D } from '../../data/data1d/Spectrum1D/index.ts';
|
|
6
6
|
import type { AssignmentsData } from '../assignment/AssignmentsContext.js';
|
|
7
7
|
import { useAssignment } from '../assignment/AssignmentsContext.js';
|
|
8
8
|
import { useScaleChecked } from '../context/ScaleContext.js';
|
|
@@ -148,7 +148,8 @@ function PredictionError(props: SignalStatistics) {
|
|
|
148
148
|
|
|
149
149
|
const { hose, sphere } = metadata;
|
|
150
150
|
return (
|
|
151
|
-
<
|
|
151
|
+
<PopoverNext
|
|
152
|
+
lazy
|
|
152
153
|
targetTagName="g"
|
|
153
154
|
interactionKind="hover"
|
|
154
155
|
content={
|
|
@@ -178,7 +179,7 @@ function PredictionError(props: SignalStatistics) {
|
|
|
178
179
|
isHighlighted={isHighlighted}
|
|
179
180
|
/>
|
|
180
181
|
</g>
|
|
181
|
-
</
|
|
182
|
+
</PopoverNext>
|
|
182
183
|
);
|
|
183
184
|
}
|
|
184
185
|
|
|
@@ -188,9 +188,12 @@ export default function Peaks(props: PeaksProps) {
|
|
|
188
188
|
const spectrum = useSpectrum(emptyData) as Spectrum1D;
|
|
189
189
|
const peaksViewState = useActiveSpectrumPeaksViewState();
|
|
190
190
|
const rangesViewState = useActiveSpectrumRangesViewState();
|
|
191
|
+
const { tablePreferences } = usePanelPreferences(
|
|
192
|
+
peaksSource === 'peaks' ? 'peaks' : 'ranges',
|
|
193
|
+
nucleus,
|
|
194
|
+
);
|
|
191
195
|
const { deltaPPM: { format: peakFormat } = { format: '0.0' } } =
|
|
192
|
-
|
|
193
|
-
|
|
196
|
+
tablePreferences;
|
|
194
197
|
const canDisplaySpectrumPeaks =
|
|
195
198
|
!spectrum.display.isVisible || spectrum.info?.isFid;
|
|
196
199
|
let mode: PeaksMode = 'spread';
|
|
@@ -51,7 +51,7 @@ export function AssignmentLabel(props: AssignmentLabelProps) {
|
|
|
51
51
|
inputType="text"
|
|
52
52
|
value={assignment || ''}
|
|
53
53
|
PopoverProps={{
|
|
54
|
-
|
|
54
|
+
placement: 'bottom',
|
|
55
55
|
targetTagName: 'g',
|
|
56
56
|
...(isNewAssignment
|
|
57
57
|
? { isOpen: true, onClose: () => dismissNewLabel() }
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { DialogBody, DialogFooter, MenuItem } from '@blueprintjs/core';
|
|
2
|
+
import { MultiSelect } from '@blueprintjs/select';
|
|
3
|
+
import type { SignalKind } from '@zakodium/nmr-types';
|
|
4
|
+
import { useMemo } from 'react';
|
|
5
|
+
import type { Control } from 'react-hook-form';
|
|
6
|
+
import { useController, useForm } from 'react-hook-form';
|
|
7
|
+
import { Button } from 'react-science/ui';
|
|
8
|
+
|
|
9
|
+
import type { SignalKindItem } from '../../../data/constants/signalsKinds.ts';
|
|
10
|
+
import { SIGNAL_KINDS } from '../../../data/constants/signalsKinds.ts';
|
|
11
|
+
import { usePreferences } from '../../context/PreferencesContext.js';
|
|
12
|
+
import { fieldLabelStyle } from '../../elements/FormatField.tsx';
|
|
13
|
+
import Label from '../../elements/Label.tsx';
|
|
14
|
+
import { StandardDialog } from '../../elements/StandardDialog.tsx';
|
|
15
|
+
import useNucleus from '../../hooks/useNucleus.js';
|
|
16
|
+
import { usePanelPreferencesByNuclei } from '../../hooks/usePanelPreferences.js';
|
|
17
|
+
import type { NucleusPreferenceField } from '../../panels/extra/preferences/NucleusPreferences.tsx';
|
|
18
|
+
import { NucleusPreferences } from '../../panels/extra/preferences/NucleusPreferences.tsx';
|
|
19
|
+
import { getUniqueNuclei } from '../../utility/getUniqueNuclei.js';
|
|
20
|
+
|
|
21
|
+
const formatFields: NucleusPreferenceField[] = [
|
|
22
|
+
{
|
|
23
|
+
id: 1,
|
|
24
|
+
label: 'Serial number :',
|
|
25
|
+
checkFieldName: 'floatingTablePreferences.showSerialNumber',
|
|
26
|
+
hideFormatField: true,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: 2,
|
|
30
|
+
label: 'Assignment label :',
|
|
31
|
+
checkFieldName: 'floatingTablePreferences.showAssignmentLabel',
|
|
32
|
+
hideFormatField: true,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 3,
|
|
36
|
+
label: 'From (ppm) :',
|
|
37
|
+
checkFieldName: 'floatingTablePreferences.from.show',
|
|
38
|
+
formatFieldName: 'floatingTablePreferences.from.format',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: 4,
|
|
42
|
+
label: 'To (ppm) :',
|
|
43
|
+
checkFieldName: 'floatingTablePreferences.to.show',
|
|
44
|
+
formatFieldName: 'floatingTablePreferences.to.format',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: 5,
|
|
48
|
+
label: 'Absolute integration :',
|
|
49
|
+
checkFieldName: 'floatingTablePreferences.absolute.show',
|
|
50
|
+
formatFieldName: 'floatingTablePreferences.absolute.format',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: 6,
|
|
54
|
+
label: 'Relative integration :',
|
|
55
|
+
checkFieldName: 'floatingTablePreferences.relative.show',
|
|
56
|
+
formatFieldName: 'floatingTablePreferences.relative.format',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 7,
|
|
60
|
+
label: 'δ (ppm) :',
|
|
61
|
+
checkFieldName: 'floatingTablePreferences.deltaPPM.show',
|
|
62
|
+
formatFieldName: 'floatingTablePreferences.deltaPPM.format',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: 8,
|
|
66
|
+
label: 'δ (Hz) :',
|
|
67
|
+
checkFieldName: 'floatingTablePreferences.deltaHz.show',
|
|
68
|
+
formatFieldName: 'floatingTablePreferences.deltaHz.format',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 9,
|
|
72
|
+
label: 'Coupling (Hz) :',
|
|
73
|
+
checkFieldName: 'floatingTablePreferences.coupling.show',
|
|
74
|
+
formatFieldName: 'floatingTablePreferences.coupling.format',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 10,
|
|
78
|
+
label: 'Kind :',
|
|
79
|
+
checkFieldName: 'floatingTablePreferences.showKind',
|
|
80
|
+
hideFormatField: true,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: 11,
|
|
84
|
+
label: 'Multiplicity :',
|
|
85
|
+
checkFieldName: 'floatingTablePreferences.showMultiplicity',
|
|
86
|
+
hideFormatField: true,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: 12,
|
|
90
|
+
label: 'Assignment :',
|
|
91
|
+
checkFieldName: 'floatingTablePreferences.showAssignment',
|
|
92
|
+
hideFormatField: true,
|
|
93
|
+
},
|
|
94
|
+
];
|
|
95
|
+
|
|
96
|
+
interface InnerFloatingRangeTablePreferencesModalProps {
|
|
97
|
+
onCloseDialog: () => void;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
interface FloatingRangeTablePreferencesModalProps extends InnerFloatingRangeTablePreferencesModalProps {
|
|
101
|
+
isOpen: boolean;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function FloatingRangeTablePreferencesModal(
|
|
105
|
+
props: FloatingRangeTablePreferencesModalProps,
|
|
106
|
+
) {
|
|
107
|
+
const { onCloseDialog, isOpen } = props;
|
|
108
|
+
|
|
109
|
+
if (!isOpen) return;
|
|
110
|
+
|
|
111
|
+
return (
|
|
112
|
+
<StandardDialog
|
|
113
|
+
isOpen
|
|
114
|
+
title="Ranges table preferences "
|
|
115
|
+
onClose={onCloseDialog}
|
|
116
|
+
style={{ width: 600 }}
|
|
117
|
+
>
|
|
118
|
+
<InnerFloatingRangeTablePreferencesModal onCloseDialog={onCloseDialog} />
|
|
119
|
+
</StandardDialog>
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function InnerFloatingRangeTablePreferencesModal(
|
|
124
|
+
props: InnerFloatingRangeTablePreferencesModalProps,
|
|
125
|
+
) {
|
|
126
|
+
const { onCloseDialog } = props;
|
|
127
|
+
const preferences = usePreferences();
|
|
128
|
+
const nucleus = useNucleus();
|
|
129
|
+
const nuclei = useMemo(() => getUniqueNuclei(nucleus), [nucleus]);
|
|
130
|
+
const preferencesByNuclei = usePanelPreferencesByNuclei('ranges', nuclei);
|
|
131
|
+
const { handleSubmit, control } = useForm<any>({
|
|
132
|
+
defaultValues: preferencesByNuclei,
|
|
133
|
+
});
|
|
134
|
+
function saveHandler() {
|
|
135
|
+
void handleSubmit((values) => {
|
|
136
|
+
preferences.dispatch({
|
|
137
|
+
type: 'SET_PANELS_PREFERENCES',
|
|
138
|
+
payload: { key: 'ranges', value: values },
|
|
139
|
+
});
|
|
140
|
+
onCloseDialog();
|
|
141
|
+
})();
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return (
|
|
145
|
+
<>
|
|
146
|
+
<DialogBody style={{ backgroundColor: 'white' }}>
|
|
147
|
+
{nuclei?.map((n) => (
|
|
148
|
+
<NucleusPreferences
|
|
149
|
+
key={n}
|
|
150
|
+
control={control}
|
|
151
|
+
nucleus={n}
|
|
152
|
+
fields={formatFields}
|
|
153
|
+
renderBottom={() => (
|
|
154
|
+
<SignalKindFilter control={control} nucleus={n} />
|
|
155
|
+
)}
|
|
156
|
+
/>
|
|
157
|
+
))}
|
|
158
|
+
</DialogBody>
|
|
159
|
+
<DialogFooter>
|
|
160
|
+
<div style={{ display: 'flex', flexDirection: 'row-reverse' }}>
|
|
161
|
+
<Button intent="success" onClick={saveHandler}>
|
|
162
|
+
Save preferences
|
|
163
|
+
</Button>
|
|
164
|
+
</div>
|
|
165
|
+
</DialogFooter>
|
|
166
|
+
</>
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
interface SignalKindFilterProps {
|
|
171
|
+
control: Control<any>;
|
|
172
|
+
nucleus: string;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function SignalKindFilter({ control, nucleus }: SignalKindFilterProps) {
|
|
176
|
+
const { field } = useController({
|
|
177
|
+
control,
|
|
178
|
+
name: `nuclei.${nucleus}.floatingTablePreferences.signalKinds`,
|
|
179
|
+
defaultValue: [],
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
const selectedKinds: SignalKind[] = field.value ?? [];
|
|
183
|
+
|
|
184
|
+
function handleSelect(item: SignalKindItem) {
|
|
185
|
+
const already = selectedKinds.includes(item.value);
|
|
186
|
+
field.onChange(
|
|
187
|
+
already
|
|
188
|
+
? selectedKinds.filter((k) => k !== item.value)
|
|
189
|
+
: [...selectedKinds, item.value],
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function handleRemove(item: SignalKindItem, index: number) {
|
|
194
|
+
field.onChange(selectedKinds.filter((_, i) => i !== index));
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function handleClear() {
|
|
198
|
+
field.onChange([]);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const selectedItems = SIGNAL_KINDS.filter((k) =>
|
|
202
|
+
selectedKinds.includes(k.value),
|
|
203
|
+
);
|
|
204
|
+
|
|
205
|
+
return (
|
|
206
|
+
<Label title="Signal kinds :" style={fieldLabelStyle}>
|
|
207
|
+
<div style={{ display: 'flex' }}>
|
|
208
|
+
<div style={{ width: '23px' }} />
|
|
209
|
+
|
|
210
|
+
<MultiSelect<SignalKindItem>
|
|
211
|
+
items={SIGNAL_KINDS}
|
|
212
|
+
selectedItems={selectedItems}
|
|
213
|
+
itemRenderer={(item, { handleClick, modifiers }) => (
|
|
214
|
+
<MenuItem
|
|
215
|
+
key={item.value}
|
|
216
|
+
text={item.label}
|
|
217
|
+
active={modifiers.active}
|
|
218
|
+
selected={selectedKinds.includes(item.value)}
|
|
219
|
+
onClick={handleClick}
|
|
220
|
+
roleStructure="listoption"
|
|
221
|
+
/>
|
|
222
|
+
)}
|
|
223
|
+
tagRenderer={(item) => item.label}
|
|
224
|
+
onItemSelect={handleSelect}
|
|
225
|
+
itemPredicate={(query, item) =>
|
|
226
|
+
item.label.toLowerCase().includes(query.toLowerCase())
|
|
227
|
+
}
|
|
228
|
+
onRemove={handleRemove}
|
|
229
|
+
onClear={selectedKinds.length > 0 ? handleClear : undefined}
|
|
230
|
+
placeholder="All signal kinds…"
|
|
231
|
+
fill
|
|
232
|
+
popoverProps={{ minimal: true, matchTargetWidth: true }}
|
|
233
|
+
resetOnSelect
|
|
234
|
+
/>
|
|
235
|
+
</div>
|
|
236
|
+
</Label>
|
|
237
|
+
);
|
|
238
|
+
}
|