nmrium 0.37.0 → 0.38.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/FooterBanner.js +1 -1
- package/lib/component/1d/Viewer1D.js +26 -21
- 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.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 +4 -5
- 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 +9 -7
- 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 +199 -221
- 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 +5 -8
- 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/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 +4 -5
- 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 +8 -6
- 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 +199 -221
- 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
|
@@ -16,13 +16,11 @@ const AssignmentsContext_1 = require("../../assignment/AssignmentsContext");
|
|
|
16
16
|
const DispatchContext_1 = require("../../context/DispatchContext");
|
|
17
17
|
const ActiveButton_1 = __importDefault(require("../../elements/ActiveButton"));
|
|
18
18
|
const ButtonToolTip_1 = __importDefault(require("../../elements/ButtonToolTip"));
|
|
19
|
-
const ToggleButton_1 = __importDefault(require("../../elements/ToggleButton"));
|
|
20
19
|
const Alert_1 = require("../../elements/popup/Alert");
|
|
21
20
|
const Modal_1 = require("../../elements/popup/Modal");
|
|
22
21
|
const usePanelPreferences_1 = require("../../hooks/usePanelPreferences");
|
|
23
22
|
const CopyClipboardModal_1 = __importDefault(require("../../modal/CopyClipboardModal"));
|
|
24
23
|
const ChangeSumModal_1 = __importDefault(require("../../modal/changeSum/ChangeSumModal"));
|
|
25
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
26
24
|
const export_1 = require("../../utility/export");
|
|
27
25
|
const formatNumber_1 = require("../../utility/formatNumber");
|
|
28
26
|
const DefaultPanelHeader_1 = __importDefault(require("../header/DefaultPanelHeader"));
|
|
@@ -52,8 +50,8 @@ function RangesHeader({ id, ranges, info, onUnlink, onFilterActivated, onSetting
|
|
|
52
50
|
const assignmentData = (0, AssignmentsContext_1.useAssignmentData)();
|
|
53
51
|
const currentSum = (0, get_1.default)(ranges, 'options.sum', null);
|
|
54
52
|
const rangesPreferences = (0, usePanelPreferences_1.usePanelPreferences)('ranges', activeTab);
|
|
55
|
-
const changeRangesSumHandler = (0, react_2.useCallback)((
|
|
56
|
-
dispatch({ type:
|
|
53
|
+
const changeRangesSumHandler = (0, react_2.useCallback)((options) => {
|
|
54
|
+
dispatch({ type: 'CHANGE_RANGE_SUM', payload: { options } });
|
|
57
55
|
modal.close();
|
|
58
56
|
}, [dispatch, modal]);
|
|
59
57
|
const showChangeRangesSumModal = (0, react_2.useCallback)(() => {
|
|
@@ -78,8 +76,8 @@ function RangesHeader({ id, ranges, info, onUnlink, onFilterActivated, onSetting
|
|
|
78
76
|
text: 'Yes',
|
|
79
77
|
handler: () => {
|
|
80
78
|
dispatch({
|
|
81
|
-
type:
|
|
82
|
-
payload: {
|
|
79
|
+
type: 'DELETE_RANGE',
|
|
80
|
+
payload: { assignmentData },
|
|
83
81
|
});
|
|
84
82
|
},
|
|
85
83
|
},
|
|
@@ -88,13 +86,13 @@ function RangesHeader({ id, ranges, info, onUnlink, onFilterActivated, onSetting
|
|
|
88
86
|
});
|
|
89
87
|
}, [assignmentData, dispatch, modal]);
|
|
90
88
|
const handleSetShowMultiplicityTrees = (0, react_2.useCallback)(() => {
|
|
91
|
-
dispatch({ type:
|
|
89
|
+
dispatch({ type: 'SHOW_MULTIPLICITY_TREES', payload: { id } });
|
|
92
90
|
}, [dispatch, id]);
|
|
93
91
|
const handleShowIntegrals = (0, react_2.useCallback)(() => {
|
|
94
|
-
dispatch({ type:
|
|
92
|
+
dispatch({ type: 'SHOW_RANGES_INTEGRALS', payload: { id } });
|
|
95
93
|
}, [dispatch, id]);
|
|
96
94
|
const handleShowJGraph = (0, react_2.useCallback)(() => {
|
|
97
|
-
dispatch({ type:
|
|
95
|
+
dispatch({ type: 'SHOW_J_GRAPH', payload: { id } });
|
|
98
96
|
}, [dispatch, id]);
|
|
99
97
|
const saveToClipboardHandler = (0, react_2.useCallback)((value) => {
|
|
100
98
|
void (async () => {
|
|
@@ -126,17 +124,16 @@ function RangesHeader({ id, ranges, info, onUnlink, onFilterActivated, onSetting
|
|
|
126
124
|
rangesPreferences?.deltaPPM?.format,
|
|
127
125
|
saveToClipboardHandler,
|
|
128
126
|
]);
|
|
129
|
-
const changeSumConstantFlagHandler = (0, react_2.useCallback)((
|
|
127
|
+
const changeSumConstantFlagHandler = (0, react_2.useCallback)(() => {
|
|
130
128
|
dispatch({
|
|
131
|
-
type:
|
|
132
|
-
payload: flag,
|
|
129
|
+
type: 'CHANGE_RANGES_SUM_FLAG',
|
|
133
130
|
});
|
|
134
131
|
}, [dispatch]);
|
|
135
132
|
const { editRange } = (0, useEditRangeModal_1.default)();
|
|
136
133
|
const addRangeHandler = (0, react_2.useCallback)(() => {
|
|
137
134
|
dispatch({
|
|
138
|
-
type:
|
|
139
|
-
payload: {
|
|
135
|
+
type: 'ADD_RANGE',
|
|
136
|
+
payload: {},
|
|
140
137
|
});
|
|
141
138
|
editRange(true);
|
|
142
139
|
}, [dispatch, editRange]);
|
|
@@ -144,6 +141,6 @@ function RangesHeader({ id, ranges, info, onUnlink, onFilterActivated, onSetting
|
|
|
144
141
|
? `Change ranges sum (${Number(currentSum).toFixed(2)})`
|
|
145
142
|
: 'Change ranges sum', popupPlacement: "right", onClick: showChangeRangesSumModal, className: "btn icon", children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrSum, {}) }), (0, jsx_runtime_1.jsx)(ButtonToolTip_1.default, { popupTitle: "Remove all assignments", popupPlacement: "right", onClick: handleOnRemoveAssignments, disabled: !ranges?.values || ranges.values.length === 0, className: "btn icon", children: (0, jsx_runtime_1.jsx)(fa_1.FaUnlink, {}) }), (0, jsx_runtime_1.jsx)(ActiveButton_1.default, { popupTitle: showMultiplicityTrees
|
|
146
143
|
? 'Hide multiplicity trees in spectrum'
|
|
147
|
-
: 'Show multiplicity trees in spectrum', popupPlacement: "right", onClick: handleSetShowMultiplicityTrees, value: showMultiplicityTrees, disabled: !ranges?.values || ranges.values.length === 0, children: (0, jsx_runtime_1.jsx)(fa_1.FaSitemap, { style: { pointerEvents: 'none', fontSize: '12px' } }) }), (0, jsx_runtime_1.jsx)(ActiveButton_1.default, { popupTitle: showJGraph ? 'Hide J Graph' : 'Show J Graph', popupPlacement: "right", onClick: handleShowJGraph, value: showJGraph, disabled: !ranges?.values || ranges.values.length === 0, children: (0, jsx_runtime_1.jsx)(fa_1.FaChartBar, { style: { pointerEvents: 'none', fontSize: '12px' } }) }), (0, jsx_runtime_1.jsx)(ActiveButton_1.default, { popupTitle: showRangesIntegrals ? 'Hide integrals' : 'Show integrals', popupPlacement: "right", onClick: handleShowIntegrals, value: showRangesIntegrals, disabled: !ranges?.values || ranges.values.length === 0, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrIntegrate, { style: { pointerEvents: 'none', fontSize: '12px' } }) }), (0, jsx_runtime_1.jsx)(
|
|
144
|
+
: 'Show multiplicity trees in spectrum', popupPlacement: "right", onClick: handleSetShowMultiplicityTrees, value: showMultiplicityTrees, disabled: !ranges?.values || ranges.values.length === 0, children: (0, jsx_runtime_1.jsx)(fa_1.FaSitemap, { style: { pointerEvents: 'none', fontSize: '12px' } }) }), (0, jsx_runtime_1.jsx)(ActiveButton_1.default, { popupTitle: showJGraph ? 'Hide J Graph' : 'Show J Graph', popupPlacement: "right", onClick: handleShowJGraph, value: showJGraph, disabled: !ranges?.values || ranges.values.length === 0, children: (0, jsx_runtime_1.jsx)(fa_1.FaChartBar, { style: { pointerEvents: 'none', fontSize: '12px' } }) }), (0, jsx_runtime_1.jsx)(ActiveButton_1.default, { popupTitle: showRangesIntegrals ? 'Hide integrals' : 'Show integrals', popupPlacement: "right", onClick: handleShowIntegrals, value: showRangesIntegrals, disabled: !ranges?.values || ranges.values.length === 0, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrIntegrate, { style: { pointerEvents: 'none', fontSize: '12px' } }) }), (0, jsx_runtime_1.jsx)(ActiveButton_1.default, { className: "icon", popupTitle: "Fix integral values", popupPlacement: "right", onClick: changeSumConstantFlagHandler, value: ranges?.options?.isSumConstant, children: (0, jsx_runtime_1.jsx)(im_1.ImLink, {}) }), (0, jsx_runtime_1.jsx)(ButtonToolTip_1.default, { popupTitle: "Add range", popupPlacement: "right", onClick: addRangeHandler, className: "btn icon", disabled: !ranges?.values, children: (0, jsx_runtime_1.jsx)(fa_1.FaPlus, {}) })] }) }));
|
|
148
145
|
}
|
|
149
146
|
exports.default = RangesHeader;
|
|
@@ -16,7 +16,6 @@ const Alert_1 = require("../../elements/popup/Alert");
|
|
|
16
16
|
const usePanelPreferences_1 = require("../../hooks/usePanelPreferences");
|
|
17
17
|
const useSpectrum_1 = __importDefault(require("../../hooks/useSpectrum"));
|
|
18
18
|
const Reducer_1 = require("../../reducer/Reducer");
|
|
19
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
20
19
|
const export_1 = require("../../utility/export");
|
|
21
20
|
const BasicPanelStyle_1 = require("../extra/BasicPanelStyle");
|
|
22
21
|
const NoTableData_1 = __importDefault(require("../extra/placeholder/NoTableData"));
|
|
@@ -66,9 +65,9 @@ function RangesTablePanelInner({ id, ranges, data, info, xDomain, preferences, a
|
|
|
66
65
|
}, [isFilterActive, ranges.values, xDomain]);
|
|
67
66
|
const unlinkRangeHandler = (0, react_2.useCallback)((rangeData, signalIndex = -1) => {
|
|
68
67
|
dispatch({
|
|
69
|
-
type:
|
|
68
|
+
type: 'UNLINK_RANGE',
|
|
70
69
|
payload: {
|
|
71
|
-
rangeData,
|
|
70
|
+
range: rangeData,
|
|
72
71
|
assignmentData,
|
|
73
72
|
signalIndex,
|
|
74
73
|
},
|
|
@@ -117,17 +116,15 @@ function RangesTablePanelInner({ id, ranges, data, info, xDomain, preferences, a
|
|
|
117
116
|
position: relative;
|
|
118
117
|
}
|
|
119
118
|
`,
|
|
120
|
-
], children: [!isFlipped && ((0, jsx_runtime_1.jsx)(RangesHeader_1.default, {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
isFilterActive,
|
|
130
|
-
}, onUnlink: unlinkRangeHandler, onFilterActivated: filterHandler, onSettingClick: settingsPanelHandler, filterCounter: rangesData.length })), isFlipped && ((0, jsx_runtime_1.jsx)(PreferencesHeader_1.default, { onSave: saveSettingHandler, onClose: settingsPanelHandler })), (0, jsx_runtime_1.jsx)("div", { className: "inner-container", children: !isFlipped ? ((0, jsx_runtime_1.jsx)("div", { className: "table-container", children: rangesData && rangesData.length > 0 ? ((0, jsx_runtime_1.jsx)(RangesTable_1.default, { activeTab: activeTab, tableData: rangesData, onUnlink: unlinkRangeHandler, contextMenu: rangesContextMenuOptions, onContextMenuSelect: contextMenuSelectHandler, preferences: preferences, info: info })) : ((0, jsx_runtime_1.jsx)(NoTableData_1.default, {})) })) : ((0, jsx_runtime_1.jsx)(RangesPreferences_1.default, { ref: settingRef })) })] }));
|
|
119
|
+
], children: [!isFlipped && ((0, jsx_runtime_1.jsx)(RangesHeader_1.default, { id,
|
|
120
|
+
ranges,
|
|
121
|
+
info,
|
|
122
|
+
activeTab,
|
|
123
|
+
molecules,
|
|
124
|
+
showRangesIntegrals,
|
|
125
|
+
showMultiplicityTrees,
|
|
126
|
+
showJGraph,
|
|
127
|
+
isFilterActive, onUnlink: unlinkRangeHandler, onFilterActivated: filterHandler, onSettingClick: settingsPanelHandler, filterCounter: rangesData.length })), isFlipped && ((0, jsx_runtime_1.jsx)(PreferencesHeader_1.default, { onSave: saveSettingHandler, onClose: settingsPanelHandler })), (0, jsx_runtime_1.jsx)("div", { className: "inner-container", children: !isFlipped ? ((0, jsx_runtime_1.jsx)("div", { className: "table-container", children: rangesData && rangesData.length > 0 ? ((0, jsx_runtime_1.jsx)(RangesTable_1.default, { activeTab: activeTab, tableData: rangesData, onUnlink: unlinkRangeHandler, contextMenu: rangesContextMenuOptions, onContextMenuSelect: contextMenuSelectHandler, preferences: preferences, info: info })) : ((0, jsx_runtime_1.jsx)(NoTableData_1.default, {})) })) : ((0, jsx_runtime_1.jsx)(RangesPreferences_1.default, { ref: settingRef })) })] }));
|
|
131
128
|
}
|
|
132
129
|
const MemoizedRangesTablePanel = (0, react_2.memo)(RangesTablePanelInner);
|
|
133
130
|
const emptyData = { ranges: {}, data: {}, info: {} };
|
|
@@ -136,20 +133,18 @@ function RangesTablePanel() {
|
|
|
136
133
|
const { displayerKey, xDomain, view: { spectra: { activeTab }, }, molecules, toolOptions: { selectedTool }, view: { ranges: rangeState }, } = (0, ChartContext_1.useChartData)();
|
|
137
134
|
const { showMultiplicityTrees, showRangesIntegrals, showJGraph } = (0, react_2.useMemo)(() => rangeState.find((r) => r.spectrumID === id) || Reducer_1.rangeStateInit, [id, rangeState]);
|
|
138
135
|
const rangesPreferences = (0, usePanelPreferences_1.usePanelPreferences)('ranges', activeTab);
|
|
139
|
-
return ((0, jsx_runtime_1.jsx)(MemoizedRangesTablePanel, {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
molecules,
|
|
153
|
-
} }));
|
|
136
|
+
return ((0, jsx_runtime_1.jsx)(MemoizedRangesTablePanel, { id,
|
|
137
|
+
ranges,
|
|
138
|
+
data,
|
|
139
|
+
info,
|
|
140
|
+
showMultiplicityTrees,
|
|
141
|
+
showJGraph,
|
|
142
|
+
showRangesIntegrals,
|
|
143
|
+
selectedTool,
|
|
144
|
+
displayerKey,
|
|
145
|
+
preferences: rangesPreferences,
|
|
146
|
+
xDomain,
|
|
147
|
+
activeTab,
|
|
148
|
+
molecules }));
|
|
154
149
|
}
|
|
155
150
|
exports.default = RangesTablePanel;
|
|
@@ -38,6 +38,6 @@ function RangeAssignmentsColumn({ row, assignment, highlight, onLink, onUnlink,
|
|
|
38
38
|
return ((0, jsx_runtime_1.jsx)("td", { ...rowSpanTags, style: {
|
|
39
39
|
...columnStyle,
|
|
40
40
|
...rowSpanTags.style,
|
|
41
|
-
}, ...onHover,
|
|
41
|
+
}, ...onHover, onClick: (e) => onLink?.(e, assignment), css: !assignment.isActive && RemoveAssignmentsButton_1.removeAssignmentCssStyle, children: (totalNumberOfAtoms > 0 || assignment.isActive) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [totalNumberOfAtoms, " ", ' ( ', (0, jsx_runtime_1.jsx)("span", { style: getStyle(flag, isCompletelyAssigned), children: diaIDs?.length || 0 }), ' ) ', (0, jsx_runtime_1.jsx)(RemoveAssignmentsButton_1.RemoveAssignmentsButton, { onClick: (e) => onUnlink?.(e, true) })] })) }));
|
|
42
42
|
}
|
|
43
43
|
exports.default = (0, react_1.memo)(RangeAssignmentsColumn);
|
|
@@ -7,7 +7,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
const RangeUtilities_1 = require("../../../../data/utilities/RangeUtilities");
|
|
8
8
|
const DispatchContext_1 = require("../../../context/DispatchContext");
|
|
9
9
|
const EditableColumn_1 = __importDefault(require("../../../elements/EditableColumn"));
|
|
10
|
-
const Types_1 = require("../../../reducer/types/Types");
|
|
11
10
|
const formatNumber_1 = require("../../../utility/formatNumber");
|
|
12
11
|
function RelativeColumn({ row, rowSpanTags, onHover, format, }) {
|
|
13
12
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
@@ -16,9 +15,10 @@ function RelativeColumn({ row, rowSpanTags, onHover, format, }) {
|
|
|
16
15
|
const integralVal = flag ? formattedValue : `[ ${formattedValue} ]`;
|
|
17
16
|
function saveHandler(event) {
|
|
18
17
|
dispatch({
|
|
19
|
-
type:
|
|
18
|
+
type: 'CHANGE_RANGE_RELATIVE',
|
|
20
19
|
payload: {
|
|
21
|
-
|
|
20
|
+
value: event.target.value,
|
|
21
|
+
id: row.id,
|
|
22
22
|
},
|
|
23
23
|
});
|
|
24
24
|
}
|
|
@@ -7,14 +7,13 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
const nmr_processing_1 = require("nmr-processing");
|
|
8
8
|
const DispatchContext_1 = require("../../../context/DispatchContext");
|
|
9
9
|
const EditableColumn_1 = __importDefault(require("../../../elements/EditableColumn"));
|
|
10
|
-
const Types_1 = require("../../../reducer/types/Types");
|
|
11
10
|
const formatNumber_1 = require("../../../utility/formatNumber");
|
|
12
11
|
function SignalDeltaColumn({ row, onHover, format, rowSpanTags, }) {
|
|
13
12
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
14
13
|
const signal = row.tableMetaInfo.signal;
|
|
15
14
|
function saveHandler(event) {
|
|
16
15
|
dispatch({
|
|
17
|
-
type:
|
|
16
|
+
type: 'CHANGE_RANGE_SIGNAL_VALUE',
|
|
18
17
|
payload: {
|
|
19
18
|
value: event.target.value,
|
|
20
19
|
rangeID: row.id,
|
|
@@ -10,8 +10,6 @@ const DispatchContext_1 = require("../../../context/DispatchContext");
|
|
|
10
10
|
const Modal_1 = require("../../../elements/popup/Modal");
|
|
11
11
|
const options_1 = require("../../../elements/popup/options");
|
|
12
12
|
const EditRangeModal_1 = __importDefault(require("../../../modal/editRange/EditRangeModal"));
|
|
13
|
-
const Types_1 = require("../../../reducer/types/Types");
|
|
14
|
-
const ToolTypes_1 = require("../../../toolbar/ToolTypes");
|
|
15
13
|
function useEditRangeModal(range) {
|
|
16
14
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
17
15
|
const modal = (0, Modal_1.useModal)();
|
|
@@ -22,37 +20,41 @@ function useEditRangeModal(range) {
|
|
|
22
20
|
const { from, to } = _range;
|
|
23
21
|
const margin = Math.abs(from - to);
|
|
24
22
|
dispatch({
|
|
25
|
-
type:
|
|
26
|
-
|
|
23
|
+
type: 'SET_X_DOMAIN',
|
|
24
|
+
payload: {
|
|
25
|
+
xDomain: [from - margin, to + margin],
|
|
26
|
+
},
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
}, [dispatch, range]);
|
|
30
30
|
const deleteRange = (0, react_1.useCallback)((id, resetSelectTool = false) => {
|
|
31
31
|
if (range || id) {
|
|
32
32
|
dispatch({
|
|
33
|
-
type:
|
|
33
|
+
type: 'DELETE_RANGE',
|
|
34
34
|
payload: {
|
|
35
|
-
|
|
35
|
+
id: id || range?.id,
|
|
36
|
+
assignmentData,
|
|
36
37
|
resetSelectTool,
|
|
37
38
|
},
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
41
|
}, [assignmentData, dispatch, range]);
|
|
41
|
-
const changeRangeSignalKind = (0, react_1.useCallback)((
|
|
42
|
+
const changeRangeSignalKind = (0, react_1.useCallback)((kind) => {
|
|
42
43
|
if (range) {
|
|
43
44
|
dispatch({
|
|
44
|
-
type:
|
|
45
|
+
type: 'CHANGE_RANGE_SIGNAL_KIND',
|
|
45
46
|
payload: {
|
|
46
|
-
|
|
47
|
+
range,
|
|
48
|
+
kind,
|
|
47
49
|
},
|
|
48
50
|
});
|
|
49
51
|
}
|
|
50
52
|
}, [dispatch, range]);
|
|
51
|
-
const saveEditRangeHandler = (0, react_1.useCallback)((
|
|
53
|
+
const saveEditRangeHandler = (0, react_1.useCallback)((editedRange, automaticCloseModal = true) => {
|
|
52
54
|
dispatch({
|
|
53
|
-
type:
|
|
55
|
+
type: 'SAVE_EDITED_RANGE',
|
|
54
56
|
payload: {
|
|
55
|
-
|
|
57
|
+
range: editedRange,
|
|
56
58
|
assignmentData,
|
|
57
59
|
},
|
|
58
60
|
});
|
|
@@ -71,8 +73,8 @@ function useEditRangeModal(range) {
|
|
|
71
73
|
}, [deleteRange, modal, saveEditRangeHandler]);
|
|
72
74
|
const editRange = (0, react_1.useCallback)((isManual = false) => {
|
|
73
75
|
dispatch({
|
|
74
|
-
type:
|
|
75
|
-
payload: { selectedTool:
|
|
76
|
+
type: 'SET_SELECTED_TOOL',
|
|
77
|
+
payload: { selectedTool: 'editRange' },
|
|
76
78
|
});
|
|
77
79
|
modal.show((0, jsx_runtime_1.jsx)(EditRangeModal_1.default, { onCloseEditRangeModal: closeEditRangeHandler, onSaveEditRangeModal: saveEditRangeHandler, onZoomEditRangeModal: zoomRange, range: isManual ? {} : range, manualRange: isManual }), {
|
|
78
80
|
position: options_1.positions.MIDDLE_RIGHT,
|
|
@@ -16,7 +16,6 @@ const Modal_1 = require("../../elements/popup/Modal");
|
|
|
16
16
|
const useActiveSpectra_1 = require("../../hooks/useActiveSpectra");
|
|
17
17
|
const useSpectrum_1 = __importDefault(require("../../hooks/useSpectrum"));
|
|
18
18
|
const Constants_1 = require("../../reducer/core/Constants");
|
|
19
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
20
19
|
const getSpectraByNucleus_1 = require("../../utility/getSpectraByNucleus");
|
|
21
20
|
const DefaultPanelHeader_1 = __importDefault(require("../header/DefaultPanelHeader"));
|
|
22
21
|
const SpectraAutomaticPickingButton_1 = require("../header/SpectraAutomaticPickingButton");
|
|
@@ -44,7 +43,7 @@ function SpectraPanelHeaderInner({ data, activeSpectrum, activeSpectra, activeTa
|
|
|
44
43
|
{
|
|
45
44
|
text: 'Yes',
|
|
46
45
|
handler: () => {
|
|
47
|
-
dispatch({ type:
|
|
46
|
+
dispatch({ type: 'DELETE_SPECTRA', payload: {} });
|
|
48
47
|
},
|
|
49
48
|
},
|
|
50
49
|
{ text: 'No' },
|
|
@@ -53,34 +52,37 @@ function SpectraPanelHeaderInner({ data, activeSpectrum, activeSpectra, activeTa
|
|
|
53
52
|
}, [activeSpectra?.length, dispatch, modal]);
|
|
54
53
|
function showAllSpectrumsHandler() {
|
|
55
54
|
dispatch({
|
|
56
|
-
type:
|
|
55
|
+
type: 'CHANGE_SPECTRA_VISIBILITY_BY_NUCLEUS',
|
|
57
56
|
payload: { nucleus: activeTab, flag: true },
|
|
58
57
|
});
|
|
59
58
|
}
|
|
60
59
|
function hideAllSpectrumsHandler() {
|
|
61
60
|
dispatch({
|
|
62
|
-
type:
|
|
61
|
+
type: 'CHANGE_SPECTRA_VISIBILITY_BY_NUCLEUS',
|
|
63
62
|
payload: { nucleus: activeTab, flag: false },
|
|
64
63
|
});
|
|
65
64
|
}
|
|
66
65
|
function addMissingProjectionHandler() {
|
|
67
66
|
const missingNucleus = getMissingProjection(data, activeTab);
|
|
68
67
|
if (missingNucleus.length > 0) {
|
|
69
|
-
dispatch({
|
|
68
|
+
dispatch({
|
|
69
|
+
type: 'ADD_MISSING_PROJECTION',
|
|
70
|
+
payload: { nucleus: missingNucleus },
|
|
71
|
+
});
|
|
70
72
|
}
|
|
71
73
|
else {
|
|
72
74
|
alert.error('Nothing to calculate');
|
|
73
75
|
}
|
|
74
76
|
}
|
|
75
77
|
function setSameTopHandler() {
|
|
76
|
-
dispatch({ type:
|
|
78
|
+
dispatch({ type: 'SET_SPECTRA_SAME_TOP' });
|
|
77
79
|
}
|
|
78
80
|
function resetScaleHandler() {
|
|
79
|
-
dispatch({ type:
|
|
81
|
+
dispatch({ type: 'RESET_SPECTRA_SCALE' });
|
|
80
82
|
}
|
|
81
83
|
function recolorSpectraHandler() {
|
|
82
84
|
dispatch({
|
|
83
|
-
type:
|
|
85
|
+
type: 'RECOLOR_SPECTRA_COLOR',
|
|
84
86
|
payload: {},
|
|
85
87
|
});
|
|
86
88
|
}
|
|
@@ -92,13 +94,11 @@ function SpectrumsTabs({ onSettingClick, }) {
|
|
|
92
94
|
const { data, view: { spectra: { activeTab }, }, displayerMode, } = (0, ChartContext_1.useChartData)();
|
|
93
95
|
const spectrum = (0, useSpectrum_1.default)();
|
|
94
96
|
const activeSpectra = (0, useActiveSpectra_1.useActiveSpectra)();
|
|
95
|
-
return ((0, jsx_runtime_1.jsx)(MemoizedSpectraPanelHeader, {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
onSettingClick,
|
|
102
|
-
} }));
|
|
97
|
+
return ((0, jsx_runtime_1.jsx)(MemoizedSpectraPanelHeader, { data,
|
|
98
|
+
activeSpectrum: spectrum,
|
|
99
|
+
activeSpectra,
|
|
100
|
+
activeTab,
|
|
101
|
+
displayerMode,
|
|
102
|
+
onSettingClick }));
|
|
103
103
|
}
|
|
104
104
|
exports.default = SpectrumsTabs;
|
|
@@ -15,14 +15,13 @@ const ReactTable_1 = __importDefault(require("../../elements/ReactTable/ReactTab
|
|
|
15
15
|
const Alert_1 = require("../../elements/popup/Alert");
|
|
16
16
|
const usePanelPreferences_1 = require("../../hooks/usePanelPreferences");
|
|
17
17
|
const ExportAsJcampModal_1 = __importDefault(require("../../modal/ExportAsJcampModal"));
|
|
18
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
19
18
|
const export_1 = require("../../utility/export");
|
|
20
19
|
const ColorIndicator_1 = __importDefault(require("./base/ColorIndicator"));
|
|
21
20
|
const ShowHideSpectrumButton_1 = __importDefault(require("./base/ShowHideSpectrumButton"));
|
|
22
21
|
const SpectrumName_1 = require("./base/SpectrumName");
|
|
23
22
|
function formatValueAsHTML(value) {
|
|
24
23
|
if (value) {
|
|
25
|
-
value = value.
|
|
24
|
+
value = value.replaceAll(/(?<value>\d+)/g, '<sub>$<value></sub>');
|
|
26
25
|
}
|
|
27
26
|
return value;
|
|
28
27
|
}
|
|
@@ -151,7 +150,7 @@ function SpectraTable(props) {
|
|
|
151
150
|
}
|
|
152
151
|
case SpectraContextMenuOptionsKeys.Delete: {
|
|
153
152
|
setTimeout(() => {
|
|
154
|
-
dispatch({ type:
|
|
153
|
+
dispatch({ type: 'DELETE_SPECTRA', payload: { id: spectrum.id } });
|
|
155
154
|
}, 0);
|
|
156
155
|
break;
|
|
157
156
|
}
|
|
@@ -201,7 +200,7 @@ function SpectraTable(props) {
|
|
|
201
200
|
}, [COLUMNS, spectraPreferences.columns]);
|
|
202
201
|
function handleSortEnd(data) {
|
|
203
202
|
dispatch({
|
|
204
|
-
type:
|
|
203
|
+
type: 'ORDER_SPECTRA',
|
|
205
204
|
payload: {
|
|
206
205
|
data,
|
|
207
206
|
},
|
|
@@ -224,7 +223,10 @@ const ColumnHeader = ({ label, col, }) => {
|
|
|
224
223
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
225
224
|
function selectHandler() {
|
|
226
225
|
if (col?.jpath) {
|
|
227
|
-
dispatch({
|
|
226
|
+
dispatch({
|
|
227
|
+
type: 'RECOLOR_SPECTRA_COLOR',
|
|
228
|
+
payload: { jpath: col?.jpath },
|
|
229
|
+
});
|
|
228
230
|
}
|
|
229
231
|
}
|
|
230
232
|
return ((0, jsx_runtime_1.jsx)(ui_1.DropdownMenu, { trigger: "contextMenu", options: options, onSelect: selectHandler, children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
@@ -12,7 +12,6 @@ const DispatchContext_1 = require("../../context/DispatchContext");
|
|
|
12
12
|
const IsotopesViewer_1 = __importDefault(require("../../elements/IsotopesViewer"));
|
|
13
13
|
const Tab_1 = __importDefault(require("../../elements/Tab/Tab"));
|
|
14
14
|
const Tabs_1 = __importDefault(require("../../elements/Tab/Tabs"));
|
|
15
|
-
const Types_1 = require("../../reducer/types/Types");
|
|
16
15
|
const GroupByInfoKey_1 = __importDefault(require("../../utility/GroupByInfoKey"));
|
|
17
16
|
const SpectraTable_1 = require("./SpectraTable");
|
|
18
17
|
const SpectrumSetting_1 = __importDefault(require("./base/setting/SpectrumSetting"));
|
|
@@ -28,7 +27,7 @@ function SpectrumsTabsInner({ data, activeSpectra, activeTab, }) {
|
|
|
28
27
|
return groupByNucleus(data, true);
|
|
29
28
|
}, [data]);
|
|
30
29
|
function onTabChangeHandler(tab) {
|
|
31
|
-
dispatch({ type:
|
|
30
|
+
dispatch({ type: 'SET_ACTIVE_TAB', payload: { tab: tab.tabid } });
|
|
32
31
|
}
|
|
33
32
|
const openSettingHandler = (0, react_2.useCallback)((event, selectedSpectrum) => {
|
|
34
33
|
event.stopPropagation();
|
|
@@ -41,7 +40,7 @@ function SpectrumsTabsInner({ data, activeSpectra, activeTab, }) {
|
|
|
41
40
|
}, []);
|
|
42
41
|
const handleChangeVisibility = (0, react_2.useCallback)((d, key) => {
|
|
43
42
|
dispatch({
|
|
44
|
-
type:
|
|
43
|
+
type: 'CHANGE_SPECTRUM_VISIBILITY',
|
|
45
44
|
payload: {
|
|
46
45
|
id: d.id,
|
|
47
46
|
key,
|
|
@@ -52,7 +51,7 @@ function SpectrumsTabsInner({ data, activeSpectra, activeTab, }) {
|
|
|
52
51
|
setTimeout(() => {
|
|
53
52
|
const modifier = `shift[${e.shiftKey ? 'true' : 'false'}]_ctrl[${e.ctrlKey ? 'true' : 'false'}]`;
|
|
54
53
|
dispatch({
|
|
55
|
-
type:
|
|
54
|
+
type: 'CHANGE_ACTIVE_SPECTRUM',
|
|
56
55
|
payload: { modifier, id: spectrum.id },
|
|
57
56
|
});
|
|
58
57
|
}, 0);
|
|
@@ -70,6 +69,6 @@ function SpectrumsTabsInner({ data, activeSpectra, activeTab, }) {
|
|
|
70
69
|
const MemoizedSpectra = (0, react_2.memo)(SpectrumsTabsInner);
|
|
71
70
|
function SpectrumsTabs() {
|
|
72
71
|
const { data, view: { spectra: { activeTab, activeSpectra }, }, } = (0, ChartContext_1.useChartData)();
|
|
73
|
-
return (0, jsx_runtime_1.jsx)(MemoizedSpectra, {
|
|
72
|
+
return (0, jsx_runtime_1.jsx)(MemoizedSpectra, { data, activeSpectra, activeTab });
|
|
74
73
|
}
|
|
75
74
|
exports.default = SpectrumsTabs;
|
|
@@ -20,13 +20,9 @@ function getStyle(display, key) {
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
function ShowHideSpectrumButton({ data, onChangeVisibility, }) {
|
|
23
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(DisplayButtons1D, {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
} }), (0, jsx_runtime_1.jsx)(DisplayButtons2D, { ...{
|
|
27
|
-
data,
|
|
28
|
-
onChangeVisibility,
|
|
29
|
-
} })] }));
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(DisplayButtons1D, { data,
|
|
24
|
+
onChangeVisibility }), (0, jsx_runtime_1.jsx)(DisplayButtons2D, { data,
|
|
25
|
+
onChangeVisibility })] }));
|
|
30
26
|
}
|
|
31
27
|
exports.default = ShowHideSpectrumButton;
|
|
32
28
|
function DisplayButtons1D(props) {
|
|
@@ -8,7 +8,6 @@ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
|
8
8
|
const react_1 = require("@emotion/react");
|
|
9
9
|
const react_2 = require("react");
|
|
10
10
|
const DispatchContext_1 = require("../../../../context/DispatchContext");
|
|
11
|
-
const Types_1 = require("../../../../reducer/types/Types");
|
|
12
11
|
const Spectrum1DSetting_1 = __importDefault(require("./Spectrum1DSetting"));
|
|
13
12
|
const Spectrum2DSetting_1 = __importDefault(require("./Spectrum2DSetting"));
|
|
14
13
|
const style = (0, react_1.css) `
|
|
@@ -73,7 +72,10 @@ function SpectrumSetting({ position, data, onClose }) {
|
|
|
73
72
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
74
73
|
const { id, info } = data;
|
|
75
74
|
const submitHandler = (0, react_2.useCallback)((values) => {
|
|
76
|
-
dispatch({
|
|
75
|
+
dispatch({
|
|
76
|
+
type: 'CHANGE_SPECTRUM_SETTING',
|
|
77
|
+
payload: { id, display: values },
|
|
78
|
+
});
|
|
77
79
|
}, [dispatch, id]);
|
|
78
80
|
const clickHandler = (0, react_2.useCallback)((e) => {
|
|
79
81
|
if (e.target === e.currentTarget) {
|
|
@@ -22,8 +22,8 @@ exports.processSnapPlot = processSnapPlot;
|
|
|
22
22
|
function getLine(value, data, options) {
|
|
23
23
|
const { log10, abs } = Math;
|
|
24
24
|
const { yLogBase } = options;
|
|
25
|
-
const first = data.
|
|
26
|
-
const last = data.
|
|
25
|
+
const first = data.at(0)?.x ?? 0;
|
|
26
|
+
const last = data.at(-1)?.x ?? 0;
|
|
27
27
|
const inLogScale = log10(abs(value)) / log10(yLogBase);
|
|
28
28
|
return [
|
|
29
29
|
{ x: first, y: inLogScale },
|
|
@@ -176,19 +176,15 @@ function CorrelationTableRow({ additionalColumnData, correlations, correlation,
|
|
|
176
176
|
}, [contextRef]);
|
|
177
177
|
const { title, ...otherTableDataProps } = tableDataProps;
|
|
178
178
|
const t = title || '';
|
|
179
|
-
return ((0, jsx_runtime_1.jsxs)("tr", { style: styleRow, children: [(0, jsx_runtime_1.jsxs)("td", { title: t, ...
|
|
180
|
-
|
|
181
|
-
style: { ...tableDataProps.style, styleLabel },
|
|
182
|
-
}, onContextMenu: (e) => {
|
|
179
|
+
return ((0, jsx_runtime_1.jsxs)("tr", { style: styleRow, children: [(0, jsx_runtime_1.jsxs)("td", { title: t, ...otherTableDataProps,
|
|
180
|
+
style: { ...tableDataProps.style, styleLabel }, onContextMenu: (e) => {
|
|
183
181
|
if (contextMenu.length > 0) {
|
|
184
182
|
contextMenuHandler(e);
|
|
185
183
|
}
|
|
186
184
|
}, children: [(0, nmr_correlation_1.getLabel)(correlations, correlation), (0, jsx_runtime_1.jsx)(ContextMenu_1.default, { ref: contextRef, context: contextMenu })] }), (0, jsx_runtime_1.jsx)("td", { title: t, ...otherTableDataProps, children: (0, nmr_correlation_1.getCorrelationDelta)(correlation)
|
|
187
185
|
? (0, nmr_correlation_1.getCorrelationDelta)(correlation)?.toFixed(2)
|
|
188
|
-
: '' }), (0, jsx_runtime_1.jsx)("td", { title: t, ...otherTableDataProps, children: correlation.atomType !== 'H' ? ((0, jsx_runtime_1.jsx)(EditableColumn_1.default, { type: "number", value: correlation.equivalence, style: equivalenceCellStyle, onSave: onSaveEquivalencesHandler })) : ((0, jsx_runtime_1.jsx)("text", { style: equivalenceCellStyle, children: correlation.equivalence })) }), (0, jsx_runtime_1.jsx)("td", { title: t, ...otherTableDataProps, children: correlation.atomType !== 'H' ? ((0, jsx_runtime_1.jsx)(EditableColumn_1.default, { type: "text", value: correlation.protonsCount.join(','), style: correlation.edited.protonsCount ? { color: 'blue' } : {}, onSave: (e) => onSaveEditNumericValuesHandler(e, 'protonsCount') })) : ('') }), (0, jsx_runtime_1.jsx)("td", { title: t, ...
|
|
189
|
-
|
|
190
|
-
style: { ...tableDataProps.style, borderRight: '1px solid' },
|
|
191
|
-
}, children: correlation.atomType !== 'H' ? ((0, jsx_runtime_1.jsx)(EditableColumn_1.default, { type: "text", value: correlation.hybridization
|
|
186
|
+
: '' }), (0, jsx_runtime_1.jsx)("td", { title: t, ...otherTableDataProps, children: correlation.atomType !== 'H' ? ((0, jsx_runtime_1.jsx)(EditableColumn_1.default, { type: "number", value: correlation.equivalence, style: equivalenceCellStyle, onSave: onSaveEquivalencesHandler })) : ((0, jsx_runtime_1.jsx)("text", { style: equivalenceCellStyle, children: correlation.equivalence })) }), (0, jsx_runtime_1.jsx)("td", { title: t, ...otherTableDataProps, children: correlation.atomType !== 'H' ? ((0, jsx_runtime_1.jsx)(EditableColumn_1.default, { type: "text", value: correlation.protonsCount.join(','), style: correlation.edited.protonsCount ? { color: 'blue' } : {}, onSave: (e) => onSaveEditNumericValuesHandler(e, 'protonsCount') })) : ('') }), (0, jsx_runtime_1.jsx)("td", { title: t, ...otherTableDataProps,
|
|
187
|
+
style: { ...tableDataProps.style, borderRight: '1px solid' }, children: correlation.atomType !== 'H' ? ((0, jsx_runtime_1.jsx)(EditableColumn_1.default, { type: "text", value: correlation.hybridization
|
|
192
188
|
.map((hybrid) => `sp${hybrid}`)
|
|
193
189
|
.join(','), style: correlation.edited.hybridization ? { color: 'blue' } : {}, onSave: (e) => onSaveEditNumericValuesHandler(e, 'hybridization') })) : ('') }), additionalColumnFields] }));
|
|
194
190
|
}
|