nmrium 0.37.0 → 0.38.1
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/FooterBanner.js +1 -1
- package/lib/component/1d/Viewer1D.js +26 -21
- package/lib/component/1d/database/DatabaseSpectrum.js +2 -1
- package/lib/component/1d/integral/Integral.d.ts +2 -6
- package/lib/component/1d/integral/IntegralResizable.d.ts +2 -6
- package/lib/component/1d/integral/IntegralResizable.js +2 -3
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +7 -9
- package/lib/component/1d/peaks/PeakAnnotation.js +1 -2
- package/lib/component/1d/ranges/Range.js +9 -8
- package/lib/component/1d/ranges/Ranges.js +5 -7
- package/lib/component/1d/tool/BaseLineZones.js +1 -2
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +4 -5
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.js +13 -17
- package/lib/component/2d/1d-tracer/Left1DChart.js +1 -1
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js +1 -1
- package/lib/component/2d/Chart2D.js +1 -1
- package/lib/component/2d/Viewer2D.js +10 -9
- package/lib/component/2d/fid/FidCanvas.js +4 -6
- package/lib/component/2d/ft/Contours.js +1 -1
- package/lib/component/2d/utilities/DimensionLayout.d.ts +9 -24
- package/lib/component/2d/utilities/scale.d.ts +2 -1
- package/lib/component/2d/utilities/scale.js +1 -1
- package/lib/component/2d/zones/Zones.js +1 -1
- package/lib/component/EventsTrackers/KeysListenerTracker.js +28 -21
- package/lib/component/NMRium.js +15 -7
- package/lib/component/assignment/AssignmentsReducer.d.ts +1 -1
- package/lib/component/context/DispatchContext.d.ts +23 -3
- package/lib/component/context/DispatchContext.js +1 -1
- package/lib/component/context/LoggerContext.js +1 -1
- package/lib/component/elements/Button.js +7 -9
- package/lib/component/elements/IsotopesViewer.js +1 -1
- package/lib/component/elements/ReactTable/ReactTable.js +1 -2
- package/lib/component/elements/formik/FormikCheckBox.js +1 -1
- package/lib/component/elements/formik/FormikColorInput.js +1 -1
- package/lib/component/elements/formik/FormikColorPicker.js +1 -1
- package/lib/component/elements/formik/FormikColumnFormatField.js +1 -1
- package/lib/component/elements/formik/FormikInput.js +1 -1
- package/lib/component/elements/formik/FormikSelect.js +2 -2
- package/lib/component/elements/formik/FormikSlider.js +1 -1
- package/lib/component/elements/formik/FormikTextarea.js +2 -2
- package/lib/component/header/ApodizationOptionsPanel.js +4 -5
- package/lib/component/header/AutoPeakPickingOptionPanel.js +1 -2
- package/lib/component/header/BaseLineCorrectionPanel.js +4 -5
- package/lib/component/header/Header.js +4 -6
- package/lib/component/header/PhaseCorrectionPanel.js +7 -8
- package/lib/component/header/RangesPickingOptionPanel.js +1 -2
- package/lib/component/header/ZeroFillingOptionsPanel.js +3 -11
- package/lib/component/header/Zones2DOptionPanel.js +5 -6
- package/lib/component/hooks/useExport.js +1 -0
- package/lib/component/hooks/useToolsFunctions.js +8 -10
- package/lib/component/loader/DropZone.js +4 -5
- package/lib/component/loader/NoData.js +1 -1
- package/lib/component/modal/AlignSpectraModal.js +1 -2
- package/lib/component/modal/EditPeakShapeModal.js +1 -2
- package/lib/component/modal/ImportPublicationStringModal.js +1 -2
- package/lib/component/modal/LoadJCAMPModal.js +2 -3
- package/lib/component/modal/MoleculeStructureEditorModal.js +24 -19
- package/lib/component/modal/PredictSpectraModal.d.ts +1 -1
- package/lib/component/modal/PredictSpectraModal.js +24 -21
- package/lib/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib/component/modal/editRange/EditRangeModal.js +3 -4
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +2 -2
- package/lib/component/modal/editRange/forms/components/CouplingsTable.js +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.js +2 -3
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js +4 -4
- package/lib/component/modal/setting/settings-tabs/FormattingTabContent.js +2 -2
- package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.js +2 -2
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +1 -2
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +7 -6
- package/lib/component/panels/InformationPanel.js +6 -6
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +11 -20
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +10 -10
- package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +1 -1
- package/lib/component/panels/MatrixGenerationPanel/FiltersOptions.js +4 -4
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -2
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +1 -2
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +10 -13
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +5 -6
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +4 -1
- package/lib/component/panels/MoleculesPanel/Utilities.js +2 -2
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +8 -9
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +3 -4
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +1 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +1 -1
- package/lib/component/panels/Panels.js +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +4 -5
- package/lib/component/panels/PeaksPanel/PeaksTable.js +4 -5
- package/lib/component/panels/RangesPanel/RangesHeader.js +12 -15
- package/lib/component/panels/RangesPanel/RangesPanel.js +24 -29
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -3
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -2
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.d.ts +1 -1
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +16 -14
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +16 -16
- package/lib/component/panels/SpectrumsPanel/SpectraTable.js +7 -5
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +4 -5
- package/lib/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -7
- package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +4 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -8
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +39 -34
- package/lib/component/panels/SummaryPanel/utilities/Utilities.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.d.ts +2 -13
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +22 -20
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.d.ts +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.d.ts +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.d.ts +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +6 -7
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.d.ts +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.d.ts +2 -2
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +15 -18
- package/lib/component/panels/ZonesPanel/ZonesTable.js +2 -51
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +3 -3
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts +16 -0
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.js +52 -0
- package/lib/component/panels/databasePanel/DatabasePanel.js +15 -11
- package/lib/component/panels/filtersPanel/FilterPanel.js +1 -2
- package/lib/component/panels/filtersPanel/FiltersTable.js +8 -9
- package/lib/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib/component/panels/header/SpectraAutomaticPickingButton.js +2 -3
- package/lib/component/panels/predictionPanel/PredictionPanel.js +4 -5
- package/lib/component/reducer/IgnoreActions.d.ts +2 -1
- package/lib/component/reducer/IgnoreActions.js +35 -32
- package/lib/component/reducer/Reducer.d.ts +8 -5
- package/lib/component/reducer/Reducer.js +202 -220
- package/lib/component/reducer/actions/AssignmentsActions.d.ts +7 -6
- package/lib/component/reducer/actions/AssignmentsActions.js +2 -2
- package/lib/component/reducer/actions/CorrelationsActions.d.ts +21 -13
- package/lib/component/reducer/actions/CorrelationsActions.js +25 -20
- package/lib/component/reducer/actions/DatabaseActions.d.ts +15 -2
- package/lib/component/reducer/actions/DatabaseActions.js +5 -2
- package/lib/component/reducer/actions/DimensionsActions.d.ts +8 -3
- package/lib/component/reducer/actions/DimensionsActions.js +3 -5
- package/lib/component/reducer/actions/DomainActions.d.ts +11 -5
- package/lib/component/reducer/actions/DomainActions.js +13 -19
- package/lib/component/reducer/actions/FiltersActions.d.ts +70 -23
- package/lib/component/reducer/actions/FiltersActions.js +250 -255
- package/lib/component/reducer/actions/GlobalActions.d.ts +7 -2
- package/lib/component/reducer/actions/GlobalActions.js +3 -3
- package/lib/component/reducer/actions/IntegralsActions.d.ts +28 -7
- package/lib/component/reducer/actions/IntegralsActions.js +16 -15
- package/lib/component/reducer/actions/LoadActions.d.ts +23 -5
- package/lib/component/reducer/actions/LoadActions.js +52 -52
- package/lib/component/reducer/actions/MoleculeActions.d.ts +38 -9
- package/lib/component/reducer/actions/MoleculeActions.js +27 -18
- package/lib/component/reducer/actions/PeaksActions.d.ts +39 -8
- package/lib/component/reducer/actions/PeaksActions.js +19 -11
- package/lib/component/reducer/actions/PreferencesActions.d.ts +8 -3
- package/lib/component/reducer/actions/PreferencesActions.js +5 -3
- package/lib/component/reducer/actions/RangesActions.d.ts +85 -18
- package/lib/component/reducer/actions/RangesActions.js +80 -65
- package/lib/component/reducer/actions/SpectraAnalysisAction.d.ts +7 -1
- package/lib/component/reducer/actions/SpectrumsActions.d.ts +57 -24
- package/lib/component/reducer/actions/SpectrumsActions.js +69 -60
- package/lib/component/reducer/actions/ToolsActions.d.ts +59 -21
- package/lib/component/reducer/actions/ToolsActions.js +54 -32
- package/lib/component/reducer/actions/ZonesActions.d.ts +79 -15
- package/lib/component/reducer/actions/ZonesActions.js +68 -49
- package/lib/component/reducer/helper/Zoom1DManager.d.ts +6 -5
- package/lib/component/reducer/helper/Zoom1DManager.js +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.js +2 -2
- package/lib/component/reducer/helper/get2DRange.d.ts +7 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
- package/lib/component/reducer/types/ActionType.d.ts +6 -0
- package/lib/component/reducer/types/ActionType.js +1 -0
- package/lib/component/toolbar/BasicToolBar.js +6 -9
- package/lib/component/toolbar/FunctionToolBar.js +4 -9
- package/lib/component/toolbar/ToolBar.js +1 -1
- package/lib/component/toolbar/ToolTypes.d.ts +2 -2
- package/lib/component/utility/Events.d.ts +4 -4
- package/lib/component/utility/Events.js +2 -2
- package/lib/component/utility/GroupByInfoKey.js +1 -1
- package/lib/component/utility/getSpectraObjectPaths.js +1 -1
- package/lib/data/PredictionManager.d.ts +7 -9
- package/lib/data/PredictionManager.js +3 -3
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +1 -1
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.d.ts +2 -3
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +5 -4
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.d.ts +5 -3
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +1 -35
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +2 -35
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +7 -10
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.d.ts +5 -1
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js +6 -8
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +2 -0
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +2 -0
- package/lib/data/data2d/Spectrum2D/zones/mapZones.d.ts +2 -0
- package/lib/data/matrixGeneration.js +4 -2
- package/lib/data/molecules/Molecule.d.ts +3 -3
- package/lib/data/molecules/MoleculeManager.d.ts +5 -5
- package/lib/data/molecules/MoleculeManager.js +1 -1
- package/lib/data/utilities/generateColor.js +1 -1
- package/lib/data/utilities/isNumber.d.ts +1 -0
- package/lib/data/utilities/isNumber.js +3 -0
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/FooterBanner.js +1 -1
- package/lib-cjs/component/1d/Viewer1D.js +25 -20
- package/lib-cjs/component/1d/database/DatabaseSpectrum.js +2 -1
- package/lib-cjs/component/1d/integral/IntegralResizable.js +2 -3
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +7 -9
- package/lib-cjs/component/1d/peaks/PeakAnnotation.js +1 -2
- package/lib-cjs/component/1d/ranges/Range.js +9 -8
- package/lib-cjs/component/1d/ranges/Ranges.js +5 -7
- package/lib-cjs/component/1d/tool/BaseLineZones.js +1 -2
- package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +4 -5
- package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/index.js +13 -17
- package/lib-cjs/component/2d/1d-tracer/Left1DChart.js +1 -1
- package/lib-cjs/component/2d/1d-tracer/VerticalSliceChart.js +1 -1
- package/lib-cjs/component/2d/Chart2D.js +1 -1
- package/lib-cjs/component/2d/Viewer2D.js +10 -9
- package/lib-cjs/component/2d/fid/FidCanvas.js +4 -6
- package/lib-cjs/component/2d/ft/Contours.js +1 -1
- package/lib-cjs/component/2d/utilities/scale.js +1 -1
- package/lib-cjs/component/2d/zones/Zones.js +1 -1
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +28 -21
- package/lib-cjs/component/NMRium.js +15 -7
- package/lib-cjs/component/context/DispatchContext.js +1 -1
- package/lib-cjs/component/context/LoggerContext.js +1 -1
- package/lib-cjs/component/elements/Button.js +7 -9
- package/lib-cjs/component/elements/IsotopesViewer.js +1 -1
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +1 -2
- package/lib-cjs/component/elements/Tab/Tabs.js +1 -1
- package/lib-cjs/component/elements/formik/FormikCheckBox.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColorInput.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColorPicker.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +1 -1
- package/lib-cjs/component/elements/formik/FormikInput.js +1 -1
- package/lib-cjs/component/elements/formik/FormikSelect.js +2 -2
- package/lib-cjs/component/elements/formik/FormikSlider.js +1 -1
- package/lib-cjs/component/elements/formik/FormikTextarea.js +2 -2
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +3 -4
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +1 -2
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +4 -5
- package/lib-cjs/component/header/Header.js +4 -6
- package/lib-cjs/component/header/PhaseCorrectionPanel.js +7 -8
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +1 -2
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +3 -11
- package/lib-cjs/component/header/Zones2DOptionPanel.js +5 -6
- package/lib-cjs/component/highlight/index.js +1 -1
- package/lib-cjs/component/hooks/useExport.js +1 -0
- package/lib-cjs/component/hooks/useTableSortBy.js +1 -1
- package/lib-cjs/component/hooks/useToolsFunctions.js +8 -10
- package/lib-cjs/component/hooks/useXYReduce.js +1 -1
- package/lib-cjs/component/loader/DropZone.js +4 -5
- package/lib-cjs/component/loader/NoData.js +1 -1
- package/lib-cjs/component/modal/AlignSpectraModal.js +1 -2
- package/lib-cjs/component/modal/EditPeakShapeModal.js +1 -2
- package/lib-cjs/component/modal/ImportPublicationStringModal.js +1 -2
- package/lib-cjs/component/modal/LoadJCAMPModal.js +2 -3
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +24 -19
- package/lib-cjs/component/modal/PredictSpectraModal.js +24 -21
- package/lib-cjs/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +3 -4
- package/lib-cjs/component/modal/editRange/forms/components/AddSignalFormTab.js +2 -2
- package/lib-cjs/component/modal/editRange/forms/components/CouplingsTable.js +1 -1
- package/lib-cjs/component/modal/metaImportation/MetaImportationModal.js +2 -3
- package/lib-cjs/component/modal/setting/settings-tabs/DatabasesTabContent.js +4 -4
- package/lib-cjs/component/modal/setting/settings-tabs/FormattingTabContent.js +2 -2
- package/lib-cjs/component/modal/setting/settings-tabs/InfoBlockTabContent.js +2 -2
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +1 -2
- package/lib-cjs/component/panels/AutomaticAssignment/useAutoAssignments.js +7 -6
- package/lib-cjs/component/panels/InformationPanel.js +6 -6
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +11 -20
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +10 -10
- package/lib-cjs/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +1 -1
- package/lib-cjs/component/panels/MatrixGenerationPanel/FiltersOptions.js +4 -4
- package/lib-cjs/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -2
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +1 -2
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +10 -13
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +5 -6
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +2 -2
- package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +8 -9
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +3 -4
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +1 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +1 -1
- package/lib-cjs/component/panels/Panels.js +1 -1
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +4 -5
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +4 -5
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +12 -15
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +24 -29
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -2
- package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +16 -14
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +16 -16
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +7 -5
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +4 -5
- package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -7
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +4 -2
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -8
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +39 -34
- package/lib-cjs/component/panels/SummaryPanel/utilities/Utilities.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +22 -20
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +6 -7
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +15 -18
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +2 -51
- package/lib-cjs/component/panels/ZonesPanel/hooks/useMapZones.js +56 -0
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +14 -10
- package/lib-cjs/component/panels/filtersPanel/FilterPanel.js +1 -2
- package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +8 -9
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib-cjs/component/panels/header/SpectraAutomaticPickingButton.js +2 -3
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +4 -5
- package/lib-cjs/component/reducer/IgnoreActions.js +35 -55
- package/lib-cjs/component/reducer/Reducer.js +202 -220
- package/lib-cjs/component/reducer/actions/AssignmentsActions.js +3 -3
- package/lib-cjs/component/reducer/actions/CorrelationsActions.js +23 -18
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +4 -1
- package/lib-cjs/component/reducer/actions/DimensionsActions.js +3 -6
- package/lib-cjs/component/reducer/actions/DomainActions.js +15 -23
- package/lib-cjs/component/reducer/actions/FiltersActions.js +267 -272
- package/lib-cjs/component/reducer/actions/GlobalActions.js +4 -4
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +19 -18
- package/lib-cjs/component/reducer/actions/LoadActions.js +55 -55
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +31 -22
- package/lib-cjs/component/reducer/actions/PeaksActions.js +23 -15
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +7 -5
- package/lib-cjs/component/reducer/actions/RangesActions.js +81 -64
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +77 -67
- package/lib-cjs/component/reducer/actions/ToolsActions.js +54 -31
- package/lib-cjs/component/reducer/actions/ZonesActions.js +73 -52
- package/lib-cjs/component/reducer/core/Constants.js +1 -1
- package/lib-cjs/component/reducer/helper/Zoom1DManager.js +2 -2
- package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +2 -2
- package/lib-cjs/component/reducer/types/ActionType.js +2 -0
- package/lib-cjs/component/toolbar/BasicToolBar.js +6 -9
- package/lib-cjs/component/toolbar/FunctionToolBar.js +4 -9
- package/lib-cjs/component/toolbar/ToolBar.js +1 -1
- package/lib-cjs/component/utility/GroupByInfoKey.js +1 -1
- package/lib-cjs/component/utility/getSpectraObjectPaths.js +1 -1
- package/lib-cjs/data/PredictionManager.js +3 -3
- package/lib-cjs/data/SpectraManager.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +5 -4
- package/lib-cjs/data/data1d/multipleSpectraAnalysis.js +2 -2
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib-cjs/data/data2d/Spectrum2D/zones/changeZoneSignal.js +6 -8
- package/lib-cjs/data/matrixGeneration.js +4 -2
- package/lib-cjs/data/molecules/MoleculeManager.js +1 -1
- package/lib-cjs/data/utilities/generateColor.js +1 -1
- package/lib-cjs/data/utilities/isNumber.js +7 -0
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +24 -23
- package/lib/component/reducer/actions/HistoryActions.d.ts +0 -4
- package/lib/component/reducer/actions/HistoryActions.js +0 -40
- package/lib/component/reducer/types/HistoryTypes.d.ts +0 -4
- package/lib/component/reducer/types/HistoryTypes.js +0 -4
- package/lib/component/reducer/types/Types.d.ts +0 -132
- package/lib/component/reducer/types/Types.js +0 -126
- package/lib/component/toolbar/HistoryToolBar.d.ts +0 -8
- package/lib/component/toolbar/HistoryToolBar.js +0 -30
- package/lib/data/utilities/isMolFileEmpty.d.ts +0 -1
- package/lib/data/utilities/isMolFileEmpty.js +0 -6
- package/lib-cjs/component/reducer/actions/HistoryActions.js +0 -45
- package/lib-cjs/component/reducer/types/HistoryTypes.js +0 -7
- package/lib-cjs/component/reducer/types/Types.js +0 -131
- package/lib-cjs/component/toolbar/HistoryToolBar.js +0 -35
- package/lib-cjs/data/utilities/isMolFileEmpty.js +0 -10
|
@@ -11,7 +11,6 @@ import { useAlert } from '../../elements/popup/Alert';
|
|
|
11
11
|
import { usePanelPreferences } from '../../hooks/usePanelPreferences';
|
|
12
12
|
import useSpectrum from '../../hooks/useSpectrum';
|
|
13
13
|
import { rangeStateInit } from '../../reducer/Reducer';
|
|
14
|
-
import { UNLINK_RANGE } from '../../reducer/types/Types';
|
|
15
14
|
import { copyTextToClipboard } from '../../utility/export';
|
|
16
15
|
import { tablePanelStyle } from '../extra/BasicPanelStyle';
|
|
17
16
|
import NoTableData from '../extra/placeholder/NoTableData';
|
|
@@ -61,9 +60,9 @@ function RangesTablePanelInner({ id, ranges, data, info, xDomain, preferences, a
|
|
|
61
60
|
}, [isFilterActive, ranges.values, xDomain]);
|
|
62
61
|
const unlinkRangeHandler = useCallback((rangeData, signalIndex = -1) => {
|
|
63
62
|
dispatch({
|
|
64
|
-
type: UNLINK_RANGE,
|
|
63
|
+
type: 'UNLINK_RANGE',
|
|
65
64
|
payload: {
|
|
66
|
-
rangeData,
|
|
65
|
+
range: rangeData,
|
|
67
66
|
assignmentData,
|
|
68
67
|
signalIndex,
|
|
69
68
|
},
|
|
@@ -112,17 +111,15 @@ function RangesTablePanelInner({ id, ranges, data, info, xDomain, preferences, a
|
|
|
112
111
|
position: relative;
|
|
113
112
|
}
|
|
114
113
|
`,
|
|
115
|
-
], children: [!isFlipped && (_jsx(RangesHeader, {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
isFilterActive,
|
|
125
|
-
}, onUnlink: unlinkRangeHandler, onFilterActivated: filterHandler, onSettingClick: settingsPanelHandler, filterCounter: rangesData.length })), isFlipped && (_jsx(PreferencesHeader, { onSave: saveSettingHandler, onClose: settingsPanelHandler })), _jsx("div", { className: "inner-container", children: !isFlipped ? (_jsx("div", { className: "table-container", children: rangesData && rangesData.length > 0 ? (_jsx(RangesTable, { activeTab: activeTab, tableData: rangesData, onUnlink: unlinkRangeHandler, contextMenu: rangesContextMenuOptions, onContextMenuSelect: contextMenuSelectHandler, preferences: preferences, info: info })) : (_jsx(NoTableData, {})) })) : (_jsx(RangesPreferences, { ref: settingRef })) })] }));
|
|
114
|
+
], children: [!isFlipped && (_jsx(RangesHeader, { id,
|
|
115
|
+
ranges,
|
|
116
|
+
info,
|
|
117
|
+
activeTab,
|
|
118
|
+
molecules,
|
|
119
|
+
showRangesIntegrals,
|
|
120
|
+
showMultiplicityTrees,
|
|
121
|
+
showJGraph,
|
|
122
|
+
isFilterActive, onUnlink: unlinkRangeHandler, onFilterActivated: filterHandler, onSettingClick: settingsPanelHandler, filterCounter: rangesData.length })), isFlipped && (_jsx(PreferencesHeader, { onSave: saveSettingHandler, onClose: settingsPanelHandler })), _jsx("div", { className: "inner-container", children: !isFlipped ? (_jsx("div", { className: "table-container", children: rangesData && rangesData.length > 0 ? (_jsx(RangesTable, { activeTab: activeTab, tableData: rangesData, onUnlink: unlinkRangeHandler, contextMenu: rangesContextMenuOptions, onContextMenuSelect: contextMenuSelectHandler, preferences: preferences, info: info })) : (_jsx(NoTableData, {})) })) : (_jsx(RangesPreferences, { ref: settingRef })) })] }));
|
|
126
123
|
}
|
|
127
124
|
const MemoizedRangesTablePanel = memo(RangesTablePanelInner);
|
|
128
125
|
const emptyData = { ranges: {}, data: {}, info: {} };
|
|
@@ -131,19 +128,17 @@ export default function RangesTablePanel() {
|
|
|
131
128
|
const { displayerKey, xDomain, view: { spectra: { activeTab }, }, molecules, toolOptions: { selectedTool }, view: { ranges: rangeState }, } = useChartData();
|
|
132
129
|
const { showMultiplicityTrees, showRangesIntegrals, showJGraph } = useMemo(() => rangeState.find((r) => r.spectrumID === id) || rangeStateInit, [id, rangeState]);
|
|
133
130
|
const rangesPreferences = usePanelPreferences('ranges', activeTab);
|
|
134
|
-
return (_jsx(MemoizedRangesTablePanel, {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
molecules,
|
|
148
|
-
} }));
|
|
131
|
+
return (_jsx(MemoizedRangesTablePanel, { id,
|
|
132
|
+
ranges,
|
|
133
|
+
data,
|
|
134
|
+
info,
|
|
135
|
+
showMultiplicityTrees,
|
|
136
|
+
showJGraph,
|
|
137
|
+
showRangesIntegrals,
|
|
138
|
+
selectedTool,
|
|
139
|
+
displayerKey,
|
|
140
|
+
preferences: rangesPreferences,
|
|
141
|
+
xDomain,
|
|
142
|
+
activeTab,
|
|
143
|
+
molecules }));
|
|
149
144
|
}
|
|
@@ -36,6 +36,6 @@ function RangeAssignmentsColumn({ row, assignment, highlight, onLink, onUnlink,
|
|
|
36
36
|
return (_jsx("td", { ...rowSpanTags, style: {
|
|
37
37
|
...columnStyle,
|
|
38
38
|
...rowSpanTags.style,
|
|
39
|
-
}, ...onHover,
|
|
39
|
+
}, ...onHover, onClick: (e) => onLink?.(e, assignment), css: !assignment.isActive && removeAssignmentCssStyle, children: (totalNumberOfAtoms > 0 || assignment.isActive) && (_jsxs(_Fragment, { children: [totalNumberOfAtoms, " ", ' ( ', _jsx("span", { style: getStyle(flag, isCompletelyAssigned), children: diaIDs?.length || 0 }), ' ) ', _jsx(RemoveAssignmentsButton, { onClick: (e) => onUnlink?.(e, true) })] })) }));
|
|
40
40
|
}
|
|
41
41
|
export default memo(RangeAssignmentsColumn);
|
|
@@ -2,7 +2,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { checkRangeKind } from '../../../../data/utilities/RangeUtilities';
|
|
3
3
|
import { useDispatch } from '../../../context/DispatchContext';
|
|
4
4
|
import EditableColumn from '../../../elements/EditableColumn';
|
|
5
|
-
import { CHANGE_RANGE_RELATIVE } from '../../../reducer/types/Types';
|
|
6
5
|
import { formatNumber } from '../../../utility/formatNumber';
|
|
7
6
|
function RelativeColumn({ row, rowSpanTags, onHover, format, }) {
|
|
8
7
|
const dispatch = useDispatch();
|
|
@@ -11,9 +10,10 @@ function RelativeColumn({ row, rowSpanTags, onHover, format, }) {
|
|
|
11
10
|
const integralVal = flag ? formattedValue : `[ ${formattedValue} ]`;
|
|
12
11
|
function saveHandler(event) {
|
|
13
12
|
dispatch({
|
|
14
|
-
type: CHANGE_RANGE_RELATIVE,
|
|
13
|
+
type: 'CHANGE_RANGE_RELATIVE',
|
|
15
14
|
payload: {
|
|
16
|
-
|
|
15
|
+
value: event.target.value,
|
|
16
|
+
id: row.id,
|
|
17
17
|
},
|
|
18
18
|
});
|
|
19
19
|
}
|
|
@@ -2,14 +2,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { checkMultiplicity } from 'nmr-processing';
|
|
3
3
|
import { useDispatch } from '../../../context/DispatchContext';
|
|
4
4
|
import EditableColumn from '../../../elements/EditableColumn';
|
|
5
|
-
import { CHANGE_RANGE_SIGNAL_VALUE } from '../../../reducer/types/Types';
|
|
6
5
|
import { formatNumber } from '../../../utility/formatNumber';
|
|
7
6
|
function SignalDeltaColumn({ row, onHover, format, rowSpanTags, }) {
|
|
8
7
|
const dispatch = useDispatch();
|
|
9
8
|
const signal = row.tableMetaInfo.signal;
|
|
10
9
|
function saveHandler(event) {
|
|
11
10
|
dispatch({
|
|
12
|
-
type: CHANGE_RANGE_SIGNAL_VALUE,
|
|
11
|
+
type: 'CHANGE_RANGE_SIGNAL_VALUE',
|
|
13
12
|
payload: {
|
|
14
13
|
value: event.target.value,
|
|
15
14
|
rangeID: row.id,
|
|
@@ -3,5 +3,5 @@ export default function useEditRangeModal(range?: RangeData): {
|
|
|
3
3
|
editRange: (isManual?: boolean) => void;
|
|
4
4
|
deleteRange: (id?: string, resetSelectTool?: boolean) => void;
|
|
5
5
|
zoomRange: (modalRange?: RangeData) => void;
|
|
6
|
-
changeRangeSignalKind: (
|
|
6
|
+
changeRangeSignalKind: (kind: any) => void;
|
|
7
7
|
};
|
|
@@ -5,8 +5,6 @@ import { useDispatch } from '../../../context/DispatchContext';
|
|
|
5
5
|
import { useModal } from '../../../elements/popup/Modal';
|
|
6
6
|
import { positions, transitions } from '../../../elements/popup/options';
|
|
7
7
|
import EditRangeModal from '../../../modal/editRange/EditRangeModal';
|
|
8
|
-
import { CHANGE_RANGE_SIGNAL_KIND, DELETE_RANGE, SAVE_EDITED_RANGE, SET_SELECTED_TOOL, SET_X_DOMAIN, } from '../../../reducer/types/Types';
|
|
9
|
-
import { options } from '../../../toolbar/ToolTypes';
|
|
10
8
|
export default function useEditRangeModal(range) {
|
|
11
9
|
const dispatch = useDispatch();
|
|
12
10
|
const modal = useModal();
|
|
@@ -17,37 +15,41 @@ export default function useEditRangeModal(range) {
|
|
|
17
15
|
const { from, to } = _range;
|
|
18
16
|
const margin = Math.abs(from - to);
|
|
19
17
|
dispatch({
|
|
20
|
-
type: SET_X_DOMAIN,
|
|
21
|
-
|
|
18
|
+
type: 'SET_X_DOMAIN',
|
|
19
|
+
payload: {
|
|
20
|
+
xDomain: [from - margin, to + margin],
|
|
21
|
+
},
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
}, [dispatch, range]);
|
|
25
25
|
const deleteRange = useCallback((id, resetSelectTool = false) => {
|
|
26
26
|
if (range || id) {
|
|
27
27
|
dispatch({
|
|
28
|
-
type: DELETE_RANGE,
|
|
28
|
+
type: 'DELETE_RANGE',
|
|
29
29
|
payload: {
|
|
30
|
-
|
|
30
|
+
id: id || range?.id,
|
|
31
|
+
assignmentData,
|
|
31
32
|
resetSelectTool,
|
|
32
33
|
},
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
36
|
}, [assignmentData, dispatch, range]);
|
|
36
|
-
const changeRangeSignalKind = useCallback((
|
|
37
|
+
const changeRangeSignalKind = useCallback((kind) => {
|
|
37
38
|
if (range) {
|
|
38
39
|
dispatch({
|
|
39
|
-
type: CHANGE_RANGE_SIGNAL_KIND,
|
|
40
|
+
type: 'CHANGE_RANGE_SIGNAL_KIND',
|
|
40
41
|
payload: {
|
|
41
|
-
|
|
42
|
+
range,
|
|
43
|
+
kind,
|
|
42
44
|
},
|
|
43
45
|
});
|
|
44
46
|
}
|
|
45
47
|
}, [dispatch, range]);
|
|
46
|
-
const saveEditRangeHandler = useCallback((
|
|
48
|
+
const saveEditRangeHandler = useCallback((editedRange, automaticCloseModal = true) => {
|
|
47
49
|
dispatch({
|
|
48
|
-
type: SAVE_EDITED_RANGE,
|
|
50
|
+
type: 'SAVE_EDITED_RANGE',
|
|
49
51
|
payload: {
|
|
50
|
-
|
|
52
|
+
range: editedRange,
|
|
51
53
|
assignmentData,
|
|
52
54
|
},
|
|
53
55
|
});
|
|
@@ -66,8 +68,8 @@ export default function useEditRangeModal(range) {
|
|
|
66
68
|
}, [deleteRange, modal, saveEditRangeHandler]);
|
|
67
69
|
const editRange = useCallback((isManual = false) => {
|
|
68
70
|
dispatch({
|
|
69
|
-
type: SET_SELECTED_TOOL,
|
|
70
|
-
payload: { selectedTool:
|
|
71
|
+
type: 'SET_SELECTED_TOOL',
|
|
72
|
+
payload: { selectedTool: 'editRange' },
|
|
71
73
|
});
|
|
72
74
|
modal.show(_jsx(EditRangeModal, { onCloseEditRangeModal: closeEditRangeHandler, onSaveEditRangeModal: saveEditRangeHandler, onZoomEditRangeModal: zoomRange, range: isManual ? {} : range, manualRange: isManual }), {
|
|
73
75
|
position: positions.MIDDLE_RIGHT,
|
|
@@ -11,7 +11,6 @@ import { useModal } from '../../elements/popup/Modal';
|
|
|
11
11
|
import { useActiveSpectra } from '../../hooks/useActiveSpectra';
|
|
12
12
|
import useSpectrum from '../../hooks/useSpectrum';
|
|
13
13
|
import { DISPLAYER_MODE } from '../../reducer/core/Constants';
|
|
14
|
-
import { ADD_MISSING_PROJECTION, CHANGE_VISIBILITY, DELETE_SPECTRA, RECOLOR_SPECTRA_COLOR, RESET_SPECTRA_SCALE, SET_SPECTRA_SAME_TOP, } from '../../reducer/types/Types';
|
|
15
14
|
import { getSpectraByNucleus } from '../../utility/getSpectraByNucleus';
|
|
16
15
|
import DefaultPanelHeader from '../header/DefaultPanelHeader';
|
|
17
16
|
import { SpectraAutomaticPickingButton } from '../header/SpectraAutomaticPickingButton';
|
|
@@ -39,7 +38,7 @@ function SpectraPanelHeaderInner({ data, activeSpectrum, activeSpectra, activeTa
|
|
|
39
38
|
{
|
|
40
39
|
text: 'Yes',
|
|
41
40
|
handler: () => {
|
|
42
|
-
dispatch({ type: DELETE_SPECTRA });
|
|
41
|
+
dispatch({ type: 'DELETE_SPECTRA', payload: {} });
|
|
43
42
|
},
|
|
44
43
|
},
|
|
45
44
|
{ text: 'No' },
|
|
@@ -48,34 +47,37 @@ function SpectraPanelHeaderInner({ data, activeSpectrum, activeSpectra, activeTa
|
|
|
48
47
|
}, [activeSpectra?.length, dispatch, modal]);
|
|
49
48
|
function showAllSpectrumsHandler() {
|
|
50
49
|
dispatch({
|
|
51
|
-
type:
|
|
50
|
+
type: 'CHANGE_SPECTRA_VISIBILITY_BY_NUCLEUS',
|
|
52
51
|
payload: { nucleus: activeTab, flag: true },
|
|
53
52
|
});
|
|
54
53
|
}
|
|
55
54
|
function hideAllSpectrumsHandler() {
|
|
56
55
|
dispatch({
|
|
57
|
-
type:
|
|
56
|
+
type: 'CHANGE_SPECTRA_VISIBILITY_BY_NUCLEUS',
|
|
58
57
|
payload: { nucleus: activeTab, flag: false },
|
|
59
58
|
});
|
|
60
59
|
}
|
|
61
60
|
function addMissingProjectionHandler() {
|
|
62
61
|
const missingNucleus = getMissingProjection(data, activeTab);
|
|
63
62
|
if (missingNucleus.length > 0) {
|
|
64
|
-
dispatch({
|
|
63
|
+
dispatch({
|
|
64
|
+
type: 'ADD_MISSING_PROJECTION',
|
|
65
|
+
payload: { nucleus: missingNucleus },
|
|
66
|
+
});
|
|
65
67
|
}
|
|
66
68
|
else {
|
|
67
69
|
alert.error('Nothing to calculate');
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
72
|
function setSameTopHandler() {
|
|
71
|
-
dispatch({ type: SET_SPECTRA_SAME_TOP });
|
|
73
|
+
dispatch({ type: 'SET_SPECTRA_SAME_TOP' });
|
|
72
74
|
}
|
|
73
75
|
function resetScaleHandler() {
|
|
74
|
-
dispatch({ type: RESET_SPECTRA_SCALE });
|
|
76
|
+
dispatch({ type: 'RESET_SPECTRA_SCALE' });
|
|
75
77
|
}
|
|
76
78
|
function recolorSpectraHandler() {
|
|
77
79
|
dispatch({
|
|
78
|
-
type: RECOLOR_SPECTRA_COLOR,
|
|
80
|
+
type: 'RECOLOR_SPECTRA_COLOR',
|
|
79
81
|
payload: {},
|
|
80
82
|
});
|
|
81
83
|
}
|
|
@@ -87,12 +89,10 @@ export default function SpectrumsTabs({ onSettingClick, }) {
|
|
|
87
89
|
const { data, view: { spectra: { activeTab }, }, displayerMode, } = useChartData();
|
|
88
90
|
const spectrum = useSpectrum();
|
|
89
91
|
const activeSpectra = useActiveSpectra();
|
|
90
|
-
return (_jsx(MemoizedSpectraPanelHeader, {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
onSettingClick,
|
|
97
|
-
} }));
|
|
92
|
+
return (_jsx(MemoizedSpectraPanelHeader, { data,
|
|
93
|
+
activeSpectrum: spectrum,
|
|
94
|
+
activeSpectra,
|
|
95
|
+
activeTab,
|
|
96
|
+
displayerMode,
|
|
97
|
+
onSettingClick }));
|
|
98
98
|
}
|
|
@@ -9,14 +9,13 @@ import ReactTable from '../../elements/ReactTable/ReactTable';
|
|
|
9
9
|
import { useAlert } from '../../elements/popup/Alert';
|
|
10
10
|
import { usePanelPreferences } from '../../hooks/usePanelPreferences';
|
|
11
11
|
import ExportAsJcampModal from '../../modal/ExportAsJcampModal';
|
|
12
|
-
import { DELETE_SPECTRA, ORDER_SPECTRA, RECOLOR_SPECTRA_COLOR, } from '../../reducer/types/Types';
|
|
13
12
|
import { copyTextToClipboard } from '../../utility/export';
|
|
14
13
|
import ColorIndicator from './base/ColorIndicator';
|
|
15
14
|
import ShowHideSpectrumButton from './base/ShowHideSpectrumButton';
|
|
16
15
|
import { SpectrumName } from './base/SpectrumName';
|
|
17
16
|
function formatValueAsHTML(value) {
|
|
18
17
|
if (value) {
|
|
19
|
-
value = value.
|
|
18
|
+
value = value.replaceAll(/(?<value>\d+)/g, '<sub>$<value></sub>');
|
|
20
19
|
}
|
|
21
20
|
return value;
|
|
22
21
|
}
|
|
@@ -145,7 +144,7 @@ export function SpectraTable(props) {
|
|
|
145
144
|
}
|
|
146
145
|
case SpectraContextMenuOptionsKeys.Delete: {
|
|
147
146
|
setTimeout(() => {
|
|
148
|
-
dispatch({ type: DELETE_SPECTRA, id: spectrum.id });
|
|
147
|
+
dispatch({ type: 'DELETE_SPECTRA', payload: { id: spectrum.id } });
|
|
149
148
|
}, 0);
|
|
150
149
|
break;
|
|
151
150
|
}
|
|
@@ -195,7 +194,7 @@ export function SpectraTable(props) {
|
|
|
195
194
|
}, [COLUMNS, spectraPreferences.columns]);
|
|
196
195
|
function handleSortEnd(data) {
|
|
197
196
|
dispatch({
|
|
198
|
-
type: ORDER_SPECTRA,
|
|
197
|
+
type: 'ORDER_SPECTRA',
|
|
199
198
|
payload: {
|
|
200
199
|
data,
|
|
201
200
|
},
|
|
@@ -217,7 +216,10 @@ const ColumnHeader = ({ label, col, }) => {
|
|
|
217
216
|
const dispatch = useDispatch();
|
|
218
217
|
function selectHandler() {
|
|
219
218
|
if (col?.jpath) {
|
|
220
|
-
dispatch({
|
|
219
|
+
dispatch({
|
|
220
|
+
type: 'RECOLOR_SPECTRA_COLOR',
|
|
221
|
+
payload: { jpath: col?.jpath },
|
|
222
|
+
});
|
|
221
223
|
}
|
|
222
224
|
}
|
|
223
225
|
return (_jsx(DropdownMenu, { trigger: "contextMenu", options: options, onSelect: selectHandler, children: _jsx("div", { style: {
|
|
@@ -7,7 +7,6 @@ import { useDispatch } from '../../context/DispatchContext';
|
|
|
7
7
|
import IsotopesViewer from '../../elements/IsotopesViewer';
|
|
8
8
|
import Tab from '../../elements/Tab/Tab';
|
|
9
9
|
import Tabs from '../../elements/Tab/Tabs';
|
|
10
|
-
import { SET_ACTIVE_TAB, CHANGE_VISIBILITY, CHANGE_ACTIVE_SPECTRUM, } from '../../reducer/types/Types';
|
|
11
10
|
import groupByInfoKey from '../../utility/GroupByInfoKey';
|
|
12
11
|
import { SpectraTable } from './SpectraTable';
|
|
13
12
|
import SpectrumSetting from './base/setting/SpectrumSetting';
|
|
@@ -23,7 +22,7 @@ function SpectrumsTabsInner({ data, activeSpectra, activeTab, }) {
|
|
|
23
22
|
return groupByNucleus(data, true);
|
|
24
23
|
}, [data]);
|
|
25
24
|
function onTabChangeHandler(tab) {
|
|
26
|
-
dispatch({ type: SET_ACTIVE_TAB, tab: tab.tabid });
|
|
25
|
+
dispatch({ type: 'SET_ACTIVE_TAB', payload: { tab: tab.tabid } });
|
|
27
26
|
}
|
|
28
27
|
const openSettingHandler = useCallback((event, selectedSpectrum) => {
|
|
29
28
|
event.stopPropagation();
|
|
@@ -36,7 +35,7 @@ function SpectrumsTabsInner({ data, activeSpectra, activeTab, }) {
|
|
|
36
35
|
}, []);
|
|
37
36
|
const handleChangeVisibility = useCallback((d, key) => {
|
|
38
37
|
dispatch({
|
|
39
|
-
type:
|
|
38
|
+
type: 'CHANGE_SPECTRUM_VISIBILITY',
|
|
40
39
|
payload: {
|
|
41
40
|
id: d.id,
|
|
42
41
|
key,
|
|
@@ -47,7 +46,7 @@ function SpectrumsTabsInner({ data, activeSpectra, activeTab, }) {
|
|
|
47
46
|
setTimeout(() => {
|
|
48
47
|
const modifier = `shift[${e.shiftKey ? 'true' : 'false'}]_ctrl[${e.ctrlKey ? 'true' : 'false'}]`;
|
|
49
48
|
dispatch({
|
|
50
|
-
type: CHANGE_ACTIVE_SPECTRUM,
|
|
49
|
+
type: 'CHANGE_ACTIVE_SPECTRUM',
|
|
51
50
|
payload: { modifier, id: spectrum.id },
|
|
52
51
|
});
|
|
53
52
|
}, 0);
|
|
@@ -65,5 +64,5 @@ function SpectrumsTabsInner({ data, activeSpectra, activeTab, }) {
|
|
|
65
64
|
const MemoizedSpectra = memo(SpectrumsTabsInner);
|
|
66
65
|
export default function SpectrumsTabs() {
|
|
67
66
|
const { data, view: { spectra: { activeTab, activeSpectra }, }, } = useChartData();
|
|
68
|
-
return _jsx(MemoizedSpectra, {
|
|
67
|
+
return _jsx(MemoizedSpectra, { data, activeSpectra, activeTab });
|
|
69
68
|
}
|
|
@@ -18,13 +18,9 @@ function getStyle(display, key) {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
export default function ShowHideSpectrumButton({ data, onChangeVisibility, }) {
|
|
21
|
-
return (_jsxs("div", { children: [_jsx(DisplayButtons1D, {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} }), _jsx(DisplayButtons2D, { ...{
|
|
25
|
-
data,
|
|
26
|
-
onChangeVisibility,
|
|
27
|
-
} })] }));
|
|
21
|
+
return (_jsxs("div", { children: [_jsx(DisplayButtons1D, { data,
|
|
22
|
+
onChangeVisibility }), _jsx(DisplayButtons2D, { data,
|
|
23
|
+
onChangeVisibility })] }));
|
|
28
24
|
}
|
|
29
25
|
function DisplayButtons1D(props) {
|
|
30
26
|
const { data, onChangeVisibility } = props;
|
|
@@ -3,7 +3,6 @@ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { memo, useCallback } from 'react';
|
|
5
5
|
import { useDispatch } from '../../../../context/DispatchContext';
|
|
6
|
-
import { CHANGE_SPECTRUM_SETTING } from '../../../../reducer/types/Types';
|
|
7
6
|
import Spectrum1DSetting from './Spectrum1DSetting';
|
|
8
7
|
import Spectrum2DSetting from './Spectrum2DSetting';
|
|
9
8
|
const style = css `
|
|
@@ -68,7 +67,10 @@ function SpectrumSetting({ position, data, onClose }) {
|
|
|
68
67
|
const dispatch = useDispatch();
|
|
69
68
|
const { id, info } = data;
|
|
70
69
|
const submitHandler = useCallback((values) => {
|
|
71
|
-
dispatch({
|
|
70
|
+
dispatch({
|
|
71
|
+
type: 'CHANGE_SPECTRUM_SETTING',
|
|
72
|
+
payload: { id, display: values },
|
|
73
|
+
});
|
|
72
74
|
}, [dispatch, id]);
|
|
73
75
|
const clickHandler = useCallback((e) => {
|
|
74
76
|
if (e.target === e.currentTarget) {
|
|
@@ -18,8 +18,8 @@ export function processSnapPlot(dimension, data, yLogBase) {
|
|
|
18
18
|
function getLine(value, data, options) {
|
|
19
19
|
const { log10, abs } = Math;
|
|
20
20
|
const { yLogBase } = options;
|
|
21
|
-
const first = data.
|
|
22
|
-
const last = data.
|
|
21
|
+
const first = data.at(0)?.x ?? 0;
|
|
22
|
+
const last = data.at(-1)?.x ?? 0;
|
|
23
23
|
const inLogScale = log10(abs(value)) / log10(yLogBase);
|
|
24
24
|
return [
|
|
25
25
|
{ x: first, y: inLogScale },
|
|
@@ -171,19 +171,15 @@ function CorrelationTableRow({ additionalColumnData, correlations, correlation,
|
|
|
171
171
|
}, [contextRef]);
|
|
172
172
|
const { title, ...otherTableDataProps } = tableDataProps;
|
|
173
173
|
const t = title || '';
|
|
174
|
-
return (_jsxs("tr", { style: styleRow, children: [_jsxs("td", { title: t, ...
|
|
175
|
-
|
|
176
|
-
style: { ...tableDataProps.style, styleLabel },
|
|
177
|
-
}, onContextMenu: (e) => {
|
|
174
|
+
return (_jsxs("tr", { style: styleRow, children: [_jsxs("td", { title: t, ...otherTableDataProps,
|
|
175
|
+
style: { ...tableDataProps.style, styleLabel }, onContextMenu: (e) => {
|
|
178
176
|
if (contextMenu.length > 0) {
|
|
179
177
|
contextMenuHandler(e);
|
|
180
178
|
}
|
|
181
179
|
}, children: [getLabel(correlations, correlation), _jsx(ContextMenu, { ref: contextRef, context: contextMenu })] }), _jsx("td", { title: t, ...otherTableDataProps, children: getCorrelationDelta(correlation)
|
|
182
180
|
? getCorrelationDelta(correlation)?.toFixed(2)
|
|
183
|
-
: '' }), _jsx("td", { title: t, ...otherTableDataProps, children: correlation.atomType !== 'H' ? (_jsx(EditableColumn, { type: "number", value: correlation.equivalence, style: equivalenceCellStyle, onSave: onSaveEquivalencesHandler })) : (_jsx("text", { style: equivalenceCellStyle, children: correlation.equivalence })) }), _jsx("td", { title: t, ...otherTableDataProps, children: correlation.atomType !== 'H' ? (_jsx(EditableColumn, { type: "text", value: correlation.protonsCount.join(','), style: correlation.edited.protonsCount ? { color: 'blue' } : {}, onSave: (e) => onSaveEditNumericValuesHandler(e, 'protonsCount') })) : ('') }), _jsx("td", { title: t, ...
|
|
184
|
-
|
|
185
|
-
style: { ...tableDataProps.style, borderRight: '1px solid' },
|
|
186
|
-
}, children: correlation.atomType !== 'H' ? (_jsx(EditableColumn, { type: "text", value: correlation.hybridization
|
|
181
|
+
: '' }), _jsx("td", { title: t, ...otherTableDataProps, children: correlation.atomType !== 'H' ? (_jsx(EditableColumn, { type: "number", value: correlation.equivalence, style: equivalenceCellStyle, onSave: onSaveEquivalencesHandler })) : (_jsx("text", { style: equivalenceCellStyle, children: correlation.equivalence })) }), _jsx("td", { title: t, ...otherTableDataProps, children: correlation.atomType !== 'H' ? (_jsx(EditableColumn, { type: "text", value: correlation.protonsCount.join(','), style: correlation.edited.protonsCount ? { color: 'blue' } : {}, onSave: (e) => onSaveEditNumericValuesHandler(e, 'protonsCount') })) : ('') }), _jsx("td", { title: t, ...otherTableDataProps,
|
|
182
|
+
style: { ...tableDataProps.style, borderRight: '1px solid' }, children: correlation.atomType !== 'H' ? (_jsx(EditableColumn, { type: "text", value: correlation.hybridization
|
|
187
183
|
.map((hybrid) => `sp${hybrid}`)
|
|
188
184
|
.join(','), style: correlation.edited.hybridization ? { color: 'blue' } : {}, onSave: (e) => onSaveEditNumericValuesHandler(e, 'hybridization') })) : ('') }), additionalColumnFields] }));
|
|
189
185
|
}
|
|
@@ -12,7 +12,6 @@ import Select from '../../elements/Select';
|
|
|
12
12
|
import ToolTip from '../../elements/ToolTip/ToolTip';
|
|
13
13
|
import { useModal } from '../../elements/popup/Modal';
|
|
14
14
|
import { DISPLAYER_MODE } from '../../reducer/core/Constants';
|
|
15
|
-
import { DELETE_1D_SIGNAL, DELETE_2D_SIGNAL, DELETE_CORRELATION, SET_2D_SIGNAL_PATH_LENGTH, SET_CORRELATION, SET_CORRELATIONS, SET_CORRELATIONS_MF, SET_CORRELATIONS_TOLERANCE, } from '../../reducer/types/Types';
|
|
16
15
|
import DefaultPanelHeader from '../header/DefaultPanelHeader';
|
|
17
16
|
import CorrelationTable from './CorrelationTable/CorrelationTable';
|
|
18
17
|
import Overview from './Overview';
|
|
@@ -139,7 +138,7 @@ function SummaryPanel() {
|
|
|
139
138
|
]);
|
|
140
139
|
const handleOnSetMolecularFormula = useCallback((mf) => {
|
|
141
140
|
dispatch({
|
|
142
|
-
type: SET_CORRELATIONS_MF,
|
|
141
|
+
type: 'SET_CORRELATIONS_MF',
|
|
143
142
|
payload: {
|
|
144
143
|
mf,
|
|
145
144
|
},
|
|
@@ -147,7 +146,7 @@ function SummaryPanel() {
|
|
|
147
146
|
}, [dispatch]);
|
|
148
147
|
const handleOnSetShiftTolerance = useCallback((tolerance) => {
|
|
149
148
|
dispatch({
|
|
150
|
-
type: SET_CORRELATIONS_TOLERANCE,
|
|
149
|
+
type: 'SET_CORRELATIONS_TOLERANCE',
|
|
151
150
|
payload: {
|
|
152
151
|
tolerance,
|
|
153
152
|
},
|
|
@@ -182,7 +181,7 @@ function SummaryPanel() {
|
|
|
182
181
|
}, [filteredCorrelationsData, selectedAdditionalColumnsAtomType]);
|
|
183
182
|
const editEquivalencesSaveHandler = useCallback((correlation, value) => {
|
|
184
183
|
dispatch({
|
|
185
|
-
type: SET_CORRELATION,
|
|
184
|
+
type: 'SET_CORRELATION',
|
|
186
185
|
payload: {
|
|
187
186
|
id: correlation.id,
|
|
188
187
|
correlation: {
|
|
@@ -195,7 +194,7 @@ function SummaryPanel() {
|
|
|
195
194
|
}, [dispatch]);
|
|
196
195
|
const editNumericValuesSaveHandler = useCallback(({ correlation, values, key, }) => {
|
|
197
196
|
dispatch({
|
|
198
|
-
type: SET_CORRELATION,
|
|
197
|
+
type: 'SET_CORRELATION',
|
|
199
198
|
payload: {
|
|
200
199
|
id: correlation.id,
|
|
201
200
|
correlation: {
|
|
@@ -211,7 +210,7 @@ function SummaryPanel() {
|
|
|
211
210
|
}, [dispatch]);
|
|
212
211
|
const setCorrelationsHandler = useCallback((correlations, options) => {
|
|
213
212
|
dispatch({
|
|
214
|
-
type: SET_CORRELATIONS,
|
|
213
|
+
type: 'SET_CORRELATIONS',
|
|
215
214
|
payload: {
|
|
216
215
|
correlations,
|
|
217
216
|
options,
|
|
@@ -220,7 +219,7 @@ function SummaryPanel() {
|
|
|
220
219
|
}, [dispatch]);
|
|
221
220
|
const deleteCorrelationHandler = useCallback((correlation) => {
|
|
222
221
|
dispatch({
|
|
223
|
-
type: DELETE_CORRELATION,
|
|
222
|
+
type: 'DELETE_CORRELATION',
|
|
224
223
|
payload: {
|
|
225
224
|
correlation,
|
|
226
225
|
assignmentData,
|
|
@@ -234,29 +233,33 @@ function SummaryPanel() {
|
|
|
234
233
|
const spectrum = findSpectrum(spectraData, link.experimentID, false);
|
|
235
234
|
const range = findRange(spectrum, link.signal.id);
|
|
236
235
|
const signal = findSignal1D(spectrum, link.signal.id);
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
236
|
+
if (spectrum && range && signal) {
|
|
237
|
+
dispatch({
|
|
238
|
+
type: 'DELETE_1D_SIGNAL',
|
|
239
|
+
payload: {
|
|
240
|
+
spectrum,
|
|
241
|
+
range,
|
|
242
|
+
signal,
|
|
243
|
+
assignmentData,
|
|
244
|
+
},
|
|
245
|
+
});
|
|
246
|
+
}
|
|
246
247
|
}
|
|
247
248
|
else if (linkDim === 2) {
|
|
248
249
|
const spectrum = findSpectrum(spectraData, link.experimentID, false);
|
|
249
250
|
const zone = findZone(spectrum, link.signal.id);
|
|
250
251
|
const signal = findSignal2D(spectrum, link.signal.id);
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
252
|
+
if (zone && signal) {
|
|
253
|
+
dispatch({
|
|
254
|
+
type: 'DELETE_2D_SIGNAL',
|
|
255
|
+
payload: {
|
|
256
|
+
spectrum,
|
|
257
|
+
zone,
|
|
258
|
+
signal,
|
|
259
|
+
assignmentData,
|
|
260
|
+
},
|
|
261
|
+
});
|
|
262
|
+
}
|
|
260
263
|
}
|
|
261
264
|
}, [assignmentData, dispatch, spectraData]);
|
|
262
265
|
const changeSignalPathLengthHandler = useCallback((link) => {
|
|
@@ -265,15 +268,17 @@ function SummaryPanel() {
|
|
|
265
268
|
const spectrum = findSpectrum(spectraData, link.experimentID, false);
|
|
266
269
|
const zone = findZone(spectrum, link.signal.id);
|
|
267
270
|
const signal = findSignal2D(spectrum, link.signal.id);
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
271
|
+
if (zone && signal) {
|
|
272
|
+
dispatch({
|
|
273
|
+
type: 'SET_2D_SIGNAL_PATH_LENGTH',
|
|
274
|
+
payload: {
|
|
275
|
+
spectrum,
|
|
276
|
+
zone,
|
|
277
|
+
signal,
|
|
278
|
+
pathLength: link.signal.j?.pathLength,
|
|
279
|
+
},
|
|
280
|
+
});
|
|
281
|
+
}
|
|
277
282
|
}
|
|
278
283
|
}, [dispatch, spectraData]);
|
|
279
284
|
const editCorrelationTableCellHandler = useCallback((editedCorrelations, action, link, options) => {
|
|
@@ -252,7 +252,7 @@ function cloneCorrelationAndSetPathLength(correlation, editedLink, axis) {
|
|
|
252
252
|
function convertValuesString(valuesString, key) {
|
|
253
253
|
valuesString = valuesString
|
|
254
254
|
.toLowerCase()
|
|
255
|
-
.
|
|
255
|
+
.replaceAll(/\s+/g, '')
|
|
256
256
|
.split(',')
|
|
257
257
|
.map((token) => (token === 'sp' ? 'sp1' : token))
|
|
258
258
|
.join(',');
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface RowDataProps extends Zone {
|
|
3
|
-
tableMetaInfo: {
|
|
4
|
-
id: number;
|
|
5
|
-
signalIndex: number;
|
|
6
|
-
rowSpan: any;
|
|
7
|
-
signal: {
|
|
8
|
-
kind: any;
|
|
9
|
-
};
|
|
10
|
-
experiment: string;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
1
|
+
import { ZoneData } from '../hooks/useMapZones';
|
|
13
2
|
interface ActionsColumnProps {
|
|
14
|
-
rowData:
|
|
3
|
+
rowData: ZoneData;
|
|
15
4
|
rowSpanTags: any;
|
|
16
5
|
}
|
|
17
6
|
declare function ActionsColumn({ rowData, rowSpanTags }: ActionsColumnProps): import("react/jsx-runtime").JSX.Element;
|