nmrium 0.36.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 -7
- 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.d.ts +2 -0
- package/lib/component/NMRium.js +22 -15
- 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/RemoveAssignmentsButton.d.ts +4 -0
- package/lib/component/{panels/RangesPanel/TableColumns → elements}/RemoveAssignmentsButton.js +14 -1
- 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 +5 -7
- 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/AboutPredictionModal.d.ts +2 -0
- package/lib/component/modal/AboutPredictionModal.js +49 -0
- 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 +27 -23
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +8 -5
- 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.d.ts +1 -0
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +7 -7
- 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/RangesTableRow.d.ts +0 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.js +0 -11
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -3
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -3
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +2 -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/SpectraPreferences.js +2 -2
- 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/SpectraColumnsManager.js +1 -1
- 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 -21
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +22 -20
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.d.ts +4 -5
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +12 -16
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.d.ts +3 -7
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +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 +4 -5
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +27 -19
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.d.ts +3 -7
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +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/ZonesTableRow.js +2 -22
- 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 +10 -6
- 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 +65 -57
- package/lib/component/reducer/actions/MoleculeActions.d.ts +38 -9
- package/lib/component/reducer/actions/MoleculeActions.js +53 -20
- 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 +22 -7
- 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/panelsPreferencesDefaultValues.js +1 -0
- 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/component/workspaces/Workspace.d.ts +2 -1
- package/lib/component/workspaces/exercise.js +31 -0
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -0
- 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/Processing2D.d.ts +3 -3
- package/lib/data/data2d/Spectrum2D/contours.d.ts +1 -4
- package/lib/data/data2d/Spectrum2D/contours.js +0 -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/ZoneUtilities.js +0 -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/types/NMRiumGeneralPreferences.d.ts +1 -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 -7
- 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 +19 -12
- 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/{panels/RangesPanel/TableColumns → elements}/RemoveAssignmentsButton.js +15 -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 +5 -7
- 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/AboutPredictionModal.js +54 -0
- 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 +27 -23
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +7 -4
- 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 +7 -7
- 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/RangesTableRow.js +0 -12
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +3 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +2 -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/SpectraPreferences.js +2 -2
- 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/SpectraColumnsManager.js +1 -1
- 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 +12 -19
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +2 -2
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +6 -7
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +27 -22
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +2 -2
- 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/ZonesTableRow.js +1 -21
- 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 +10 -6
- 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 +68 -60
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +56 -23
- package/lib-cjs/component/reducer/actions/PeaksActions.js +23 -15
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +24 -9
- 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/preferences/panelsPreferencesDefaultValues.js +1 -0
- 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/component/workspaces/exercise.js +31 -0
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +1 -0
- 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/contours.js +0 -1
- 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/ZoneUtilities.js +0 -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 +35 -34
- package/lib/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.d.ts +0 -3
- 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
|
@@ -15,7 +15,6 @@ const ToggleButtonGroup_1 = __importDefault(require("../elements/toggle/ToggleBu
|
|
|
15
15
|
const useCheckToolsVisibility_1 = require("../hooks/useCheckToolsVisibility");
|
|
16
16
|
const useDatumWithSpectraStatistics_1 = __importDefault(require("../hooks/useDatumWithSpectraStatistics"));
|
|
17
17
|
const useToolsFunctions_1 = __importDefault(require("../hooks/useToolsFunctions"));
|
|
18
|
-
const Types_1 = require("../reducer/types/Types");
|
|
19
18
|
const ToolTypes_1 = require("./ToolTypes");
|
|
20
19
|
function FunctionToolBarInner({ defaultValue, ftCounter, }) {
|
|
21
20
|
const [option, setOption] = (0, react_1.useState)('');
|
|
@@ -31,10 +30,8 @@ function FunctionToolBarInner({ defaultValue, ftCounter, }) {
|
|
|
31
30
|
}, [defaultValue]);
|
|
32
31
|
const handleOnFFTFilter = (0, react_1.useCallback)(() => {
|
|
33
32
|
dispatch({
|
|
34
|
-
type:
|
|
35
|
-
value: '',
|
|
33
|
+
type: 'APPLY_FFT_FILTER',
|
|
36
34
|
});
|
|
37
|
-
dispatch({ type: Types_1.SET_SELECTED_FILTER, selectedFilter: null });
|
|
38
35
|
}, [dispatch]);
|
|
39
36
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(ToggleButtonGroup_1.default, { value: option, onChange: handleChange, children: [isButtonVisible('zoom') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zoom.id, id: ToolTypes_1.options.zoom.id, title: `${ToolTypes_1.options.zoom.label} ( Press z )`, children: (0, jsx_runtime_1.jsx)(fa_1.FaSearchPlus, {}) }, ToolTypes_1.options.zoom.id)), isButtonVisible('zoomOut') && ((0, jsx_runtime_1.jsx)(ui_1.Toolbar.Item, { id: "zoom-out", onClick: handleFullZoomOut, title: "Horizontal zoom out ( Press f ), Horizontal and Vertical zoom out, double click ( Press ff )", children: (0, jsx_runtime_1.jsx)(fa_1.FaExpand, {}) })), isButtonVisible('peakPicking') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.peakPicking.id, title: `${ToolTypes_1.options.peakPicking.label} ( Press p )`, id: ToolTypes_1.options.peakPicking.id, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrPeakPicking, {}) }, ToolTypes_1.options.peakPicking.id)), isButtonVisible('integral') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.integral.id, id: ToolTypes_1.options.integral.id, title: `${ToolTypes_1.options.integral.label} ( Press i )`, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrIntegrate, {}) }, ToolTypes_1.options.integral.id)), isButtonVisible('zonePicking') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zonePicking.id, id: ToolTypes_1.options.zonePicking.id, title: `${ToolTypes_1.options.zonePicking.label} ( Press r )`, children: (0, jsx_runtime_1.jsx)(fa_1.FaDiceFour, {}) }, ToolTypes_1.options.zonePicking.id)), isButtonVisible('slicing') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.slicing.id, id: ToolTypes_1.options.slicing.id, title: `${ToolTypes_1.options.slicing.label}`, children: (0, jsx_runtime_1.jsx)("p", { children: "Slic" }) }, ToolTypes_1.options.slicing.id)), isButtonVisible('rangePicking') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.rangePicking.id, title: `${ToolTypes_1.options.rangePicking.label} ( Press r )`, id: ToolTypes_1.options.rangePicking.id, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrRangePicking, {}) }, ToolTypes_1.options.rangePicking.id)), isButtonVisible('multipleSpectraAnalysis', {
|
|
40
37
|
checkSpectrumType: false,
|
|
@@ -46,10 +43,8 @@ const MemoizedFunctionToolBar = (0, react_1.memo)(FunctionToolBarInner);
|
|
|
46
43
|
function FunctionToolBar({ defaultValue = ToolTypes_1.options.zoom.id, }) {
|
|
47
44
|
const { displayerMode } = (0, ChartContext_1.useChartData)();
|
|
48
45
|
const data = (0, useDatumWithSpectraStatistics_1.default)();
|
|
49
|
-
return ((0, jsx_runtime_1.jsx)(MemoizedFunctionToolBar, { ...
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
defaultValue,
|
|
53
|
-
} }));
|
|
46
|
+
return ((0, jsx_runtime_1.jsx)(MemoizedFunctionToolBar, { ...data,
|
|
47
|
+
displayerMode,
|
|
48
|
+
defaultValue }));
|
|
54
49
|
}
|
|
55
50
|
exports.default = FunctionToolBar;
|
|
@@ -15,6 +15,6 @@ function ToolBarInner({ selectedTool }) {
|
|
|
15
15
|
const MemoizedToolBar = (0, react_1.memo)(ToolBarInner);
|
|
16
16
|
function ToolBar() {
|
|
17
17
|
const { toolOptions: { selectedTool }, } = (0, ChartContext_1.useChartData)();
|
|
18
|
-
return (0, jsx_runtime_1.jsx)(MemoizedToolBar, {
|
|
18
|
+
return (0, jsx_runtime_1.jsx)(MemoizedToolBar, { selectedTool });
|
|
19
19
|
}
|
|
20
20
|
exports.default = ToolBar;
|
|
@@ -5,7 +5,7 @@ function getNucleusSum(input) {
|
|
|
5
5
|
let output = 0;
|
|
6
6
|
for (const i of nucleus) {
|
|
7
7
|
const additions = nucleus.length === 2 ? 100 : 0;
|
|
8
|
-
output += Number(i.
|
|
8
|
+
output += Number(i.replaceAll(/\D/g, '')) + additions;
|
|
9
9
|
}
|
|
10
10
|
return output;
|
|
11
11
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getSpectraObjectPaths = void 0;
|
|
4
4
|
function getSpectraObjectPaths(spectra) {
|
|
5
|
-
const keys = ['display', 'meta', 'info', '
|
|
5
|
+
const keys = ['display', 'meta', 'info', 'customInfo'];
|
|
6
6
|
const paths = {};
|
|
7
7
|
for (const spectrum of spectra) {
|
|
8
8
|
for (const key of keys) {
|
|
@@ -7,6 +7,7 @@ exports.exercise = {
|
|
|
7
7
|
display: {
|
|
8
8
|
general: {
|
|
9
9
|
hideGeneralSettings: true,
|
|
10
|
+
hideLogs: true,
|
|
10
11
|
},
|
|
11
12
|
panels: {
|
|
12
13
|
spectraPanel: { display: true, open: true },
|
|
@@ -26,4 +27,34 @@ exports.exercise = {
|
|
|
26
27
|
spectraStackAlignments: true,
|
|
27
28
|
},
|
|
28
29
|
},
|
|
30
|
+
general: {
|
|
31
|
+
dimmedSpectraOpacity: 0.1,
|
|
32
|
+
verticalSplitterPosition: '440px',
|
|
33
|
+
verticalSplitterCloseThreshold: 600,
|
|
34
|
+
spectraRendering: 'auto',
|
|
35
|
+
loggingLevel: 'info',
|
|
36
|
+
},
|
|
37
|
+
formatting: {
|
|
38
|
+
nuclei: {},
|
|
39
|
+
panels: {
|
|
40
|
+
integrals: {
|
|
41
|
+
nuclei: {
|
|
42
|
+
'1H': {
|
|
43
|
+
relative: { show: true, format: '0.00' },
|
|
44
|
+
absolute: { show: false, format: '0.00' },
|
|
45
|
+
color: 'black',
|
|
46
|
+
strokeWidth: 1,
|
|
47
|
+
showKind: false,
|
|
48
|
+
},
|
|
49
|
+
'13C': {
|
|
50
|
+
relative: { show: true, format: '0.00' },
|
|
51
|
+
absolute: { show: false, format: '0.00' },
|
|
52
|
+
color: 'black',
|
|
53
|
+
strokeWidth: 1,
|
|
54
|
+
showKind: false,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
29
60
|
};
|
|
@@ -55,11 +55,11 @@ async function predictSpectra(molfile) {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
exports.predictSpectra = predictSpectra;
|
|
58
|
-
function generateSpectra(
|
|
58
|
+
function generateSpectra(predictedSpectra, inputOptions, color) {
|
|
59
59
|
const spectra = [];
|
|
60
|
-
for (const experiment in
|
|
60
|
+
for (const experiment in predictedSpectra) {
|
|
61
61
|
if (inputOptions.spectra[experiment]) {
|
|
62
|
-
const spectrum =
|
|
62
|
+
const spectrum = predictedSpectra[experiment];
|
|
63
63
|
switch (experiment) {
|
|
64
64
|
case 'proton':
|
|
65
65
|
case 'carbon': {
|
|
@@ -34,7 +34,7 @@ var DataExportOptions;
|
|
|
34
34
|
DataExportOptions["ROW_DATA"] = "ROW_DATA";
|
|
35
35
|
DataExportOptions["DATA_SOURCE"] = "DATA_SOURCE";
|
|
36
36
|
DataExportOptions["NO_DATA"] = "NO_DATA";
|
|
37
|
-
})(DataExportOptions
|
|
37
|
+
})(DataExportOptions || (exports.DataExportOptions = DataExportOptions = {}));
|
|
38
38
|
function getData(datum, usedColors) {
|
|
39
39
|
const dimension = datum.info.dimension;
|
|
40
40
|
if (dimension === 1) {
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getSpectrumErrorValue = void 0;
|
|
4
4
|
function getSpectrumErrorValue(spectrum) {
|
|
5
5
|
const { x } = spectrum.data;
|
|
6
|
-
return (x
|
|
6
|
+
return (x.at(-1) - x[0]) / 10000;
|
|
7
7
|
}
|
|
8
8
|
exports.getSpectrumErrorValue = getSpectrumErrorValue;
|
|
@@ -51,7 +51,7 @@ function initiateDatum1D(spectrum, options = {}) {
|
|
|
51
51
|
};
|
|
52
52
|
spectrumObj.originalInfo = spectrumObj.info;
|
|
53
53
|
spectrumObj.meta = { ...spectrum.meta };
|
|
54
|
-
spectrumObj.
|
|
54
|
+
spectrumObj.customInfo = { ...spectrum.customInfo };
|
|
55
55
|
spectrumObj.data = (0, convertDataToFloat64Array_1.convertDataToFloat64Array)(spectrum.data);
|
|
56
56
|
spectrumObj.originalData = spectrumObj.data;
|
|
57
57
|
spectrumObj.filters = Object.assign([], spectrum.filters); //array of object {name: "FilterName", options: FilterOptions = {value | object} }
|
|
@@ -6,12 +6,13 @@ exports.changeRangeRelativeValue = void 0;
|
|
|
6
6
|
* @param {Spectrum1D} spectrum spectrum 1d
|
|
7
7
|
* @param {RangeProps} newRange
|
|
8
8
|
*/
|
|
9
|
-
function changeRangeRelativeValue(spectrum,
|
|
10
|
-
const
|
|
9
|
+
function changeRangeRelativeValue(spectrum, data) {
|
|
10
|
+
const { id, value } = data;
|
|
11
|
+
const index = spectrum.ranges.values.findIndex((range) => range.id === id);
|
|
11
12
|
if (index !== -1 && spectrum.ranges.options.sum) {
|
|
12
13
|
const { absolute, integration } = spectrum.ranges.values[index];
|
|
13
|
-
const ratio = absolute /
|
|
14
|
-
const sum = (
|
|
14
|
+
const ratio = absolute / value;
|
|
15
|
+
const sum = (value / integration) * spectrum.ranges.options.sum;
|
|
15
16
|
spectrum.ranges.options = {
|
|
16
17
|
...spectrum.ranges.options,
|
|
17
18
|
mf: undefined,
|
|
@@ -12,14 +12,14 @@ var COLUMNS_TYPES;
|
|
|
12
12
|
(function (COLUMNS_TYPES) {
|
|
13
13
|
COLUMNS_TYPES["NORMAL"] = "NORMAL";
|
|
14
14
|
COLUMNS_TYPES["FORMULA"] = "FORMULA";
|
|
15
|
-
})(COLUMNS_TYPES
|
|
15
|
+
})(COLUMNS_TYPES || (exports.COLUMNS_TYPES = COLUMNS_TYPES = {}));
|
|
16
16
|
var COLUMNS_VALUES_KEYS;
|
|
17
17
|
(function (COLUMNS_VALUES_KEYS) {
|
|
18
18
|
COLUMNS_VALUES_KEYS["RELATIVE"] = "relative";
|
|
19
19
|
COLUMNS_VALUES_KEYS["ABSOLUTE"] = "absolute";
|
|
20
20
|
COLUMNS_VALUES_KEYS["MIN"] = "min";
|
|
21
21
|
COLUMNS_VALUES_KEYS["MAX"] = "max";
|
|
22
|
-
})(COLUMNS_VALUES_KEYS
|
|
22
|
+
})(COLUMNS_VALUES_KEYS || (exports.COLUMNS_VALUES_KEYS = COLUMNS_VALUES_KEYS = {}));
|
|
23
23
|
function addColumnKey(spectraAnalysis, nucleus, columnProps, columnKey) {
|
|
24
24
|
const spectraAnalysisOptions = spectraAnalysis[nucleus].analysisOptions;
|
|
25
25
|
const key = columnKey || (0, generateChar_1.default)(spectraAnalysisOptions.columnIndex).toUpperCase();
|
|
@@ -122,7 +122,6 @@ function getContours(zoomLevel, options) {
|
|
|
122
122
|
const { negative = false, timeout = 2000, nbLevels, data } = options;
|
|
123
123
|
const xs = getRange(data.minX, data.maxX, data.z[0].length);
|
|
124
124
|
const ys = getRange(data.minY, data.maxY, data.z.length);
|
|
125
|
-
// @ts-expect-error refactor Conrect class to accept Float32Array Array instead of an array of number
|
|
126
125
|
const conrec = new ml_conrec_1.Conrec(data.z, { xs, ys, swapAxes: false });
|
|
127
126
|
const sanResult = (0, calculateSanPlot_1.calculateSanPlot)('2D', data);
|
|
128
127
|
const median = sanResult.positive;
|
|
@@ -52,7 +52,7 @@ function initiateDatum2D(spectrum, usedColors = {}) {
|
|
|
52
52
|
};
|
|
53
53
|
datum.originalInfo = datum.info;
|
|
54
54
|
datum.meta = { ...spectrum.meta };
|
|
55
|
-
datum.
|
|
55
|
+
datum.customInfo = { ...spectrum.customInfo };
|
|
56
56
|
datum.data = getData(datum, spectrum);
|
|
57
57
|
datum.originalData = datum.data;
|
|
58
58
|
datum.filters = Object.assign([], spectrum.filters);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.changeZoneSignal = void 0;
|
|
4
|
+
const isNumber_1 = require("../../../utilities/isNumber");
|
|
4
5
|
/**
|
|
5
6
|
*
|
|
6
7
|
* @param {number} zoneID
|
|
@@ -9,19 +10,16 @@ exports.changeZoneSignal = void 0;
|
|
|
9
10
|
* @param {number} signal.y
|
|
10
11
|
* @param {string} signal.id
|
|
11
12
|
*/
|
|
12
|
-
function changeZoneSignal(spectrum, zoneID,
|
|
13
|
+
function changeZoneSignal(spectrum, zoneID, signal) {
|
|
13
14
|
const zoneIndex = spectrum.zones.values.findIndex((zone) => zone.id === zoneID);
|
|
15
|
+
const { id, deltaX, deltaY } = signal;
|
|
14
16
|
if (zoneIndex !== -1) {
|
|
15
|
-
const signalIndex = spectrum.zones.values[zoneIndex].signals.findIndex((s) => s.id ===
|
|
17
|
+
const signalIndex = spectrum.zones.values[zoneIndex].signals.findIndex((s) => s.id === id);
|
|
16
18
|
const zone = spectrum.zones.values[zoneIndex];
|
|
17
19
|
if (signalIndex !== -1) {
|
|
18
20
|
const originalSignal = zone.signals[signalIndex];
|
|
19
|
-
const xShift =
|
|
20
|
-
|
|
21
|
-
: 0;
|
|
22
|
-
const yShift = newSignal?.y || newSignal?.y === 0
|
|
23
|
-
? newSignal.y - originalSignal.y?.delta
|
|
24
|
-
: 0;
|
|
21
|
+
const xShift = (0, isNumber_1.isNumber)(deltaX) ? deltaX - originalSignal.x.delta : 0;
|
|
22
|
+
const yShift = (0, isNumber_1.isNumber)(deltaY) ? deltaY - originalSignal.y?.delta : 0;
|
|
25
23
|
return { xShift, yShift };
|
|
26
24
|
}
|
|
27
25
|
}
|
|
@@ -7,7 +7,7 @@ exports.getMatrixFilters = exports.normalCase = void 0;
|
|
|
7
7
|
const set_1 = __importDefault(require("lodash/set"));
|
|
8
8
|
const FilterXYSchema_json_1 = __importDefault(require("ml-signal-processing/FilterXYSchema.json"));
|
|
9
9
|
function normalCase(str) {
|
|
10
|
-
const result = str.
|
|
10
|
+
const result = str.replaceAll(/(?<upper>[A-Z])/g, ' $<upper>').trim();
|
|
11
11
|
return result.charAt(0).toUpperCase() + result.slice(1);
|
|
12
12
|
}
|
|
13
13
|
exports.normalCase = normalCase;
|
|
@@ -107,7 +107,9 @@ function generateFilterOptions(properties) {
|
|
|
107
107
|
(0, set_1.default)(options, key, []);
|
|
108
108
|
break;
|
|
109
109
|
case 'select':
|
|
110
|
-
(0, set_1.default)(options, key, field.default
|
|
110
|
+
(0, set_1.default)(options, key, field.default
|
|
111
|
+
? field.default.replaceAll(/'|"/g, '')
|
|
112
|
+
: field.choices[0]);
|
|
111
113
|
break;
|
|
112
114
|
case 'string':
|
|
113
115
|
(0, set_1.default)(options, key, undefined);
|
|
@@ -71,7 +71,7 @@ exports.extractNumber = extractNumber;
|
|
|
71
71
|
function extractLabelsNumbers(molecules) {
|
|
72
72
|
const values = [];
|
|
73
73
|
for (const molecule of molecules) {
|
|
74
|
-
const value = extractNumber(molecule
|
|
74
|
+
const value = extractNumber(molecule?.label || '');
|
|
75
75
|
if (value) {
|
|
76
76
|
values.push(Number(value));
|
|
77
77
|
}
|
|
@@ -57,7 +57,7 @@ function generateColor(isRandom = false, usedColors = [], opacity = 100) {
|
|
|
57
57
|
}
|
|
58
58
|
else {
|
|
59
59
|
const lum = -0.25;
|
|
60
|
-
let hex = String(`#${Math.random().toString(16).slice(2, 8).toUpperCase()}`).
|
|
60
|
+
let hex = String(`#${Math.random().toString(16).slice(2, 8).toUpperCase()}`).replaceAll(/[^\da-f]/gi, '');
|
|
61
61
|
if (hex.length < 6) {
|
|
62
62
|
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
|
|
63
63
|
}
|
package/lib-cjs/versionInfo.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nmrium",
|
|
3
3
|
"description": "React component to display and process nuclear magnetic resonance (NMR) spectra.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.38.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib-cjs/component/NMRium.js",
|
|
7
7
|
"module": "lib/component/NMRium.js",
|
|
@@ -58,35 +58,35 @@
|
|
|
58
58
|
"react-dom": ">=18.0.0"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@emotion/react": "^11.11.
|
|
61
|
+
"@emotion/react": "^11.11.1",
|
|
62
62
|
"@lukeed/uuid": "^2.0.1",
|
|
63
|
-
"cheminfo-font": "^1.
|
|
63
|
+
"cheminfo-font": "^1.10.0",
|
|
64
64
|
"cheminfo-types": "^1.7.1",
|
|
65
65
|
"clipboard-polyfill": "^4.0.0",
|
|
66
66
|
"convert-to-jcamp": "^5.4.6",
|
|
67
|
-
"d3": "^7.8.
|
|
67
|
+
"d3": "^7.8.5",
|
|
68
68
|
"eventemitter3": "^5.0.1",
|
|
69
69
|
"fifo-logger": "^0.6.1",
|
|
70
70
|
"file-saver": "^2.0.5",
|
|
71
|
-
"filelist-utils": "^1.
|
|
72
|
-
"formik": "^2.
|
|
73
|
-
"immer": "^10.0.
|
|
71
|
+
"filelist-utils": "^1.9.0",
|
|
72
|
+
"formik": "^2.4.1",
|
|
73
|
+
"immer": "^10.0.2",
|
|
74
74
|
"jszip": "^3.10.1",
|
|
75
75
|
"lodash": "^4.17.21",
|
|
76
|
-
"ml-airpls": "^1.0.
|
|
76
|
+
"ml-airpls": "^1.0.2",
|
|
77
77
|
"ml-array-max": "^1.2.4",
|
|
78
78
|
"ml-array-mean": "^1.1.6",
|
|
79
79
|
"ml-array-median": "^1.1.6",
|
|
80
80
|
"ml-array-xy-equally-spaced": "^1.2.1",
|
|
81
|
-
"ml-baseline-correction-regression": "^1.0.
|
|
82
|
-
"ml-conrec": "^
|
|
81
|
+
"ml-baseline-correction-regression": "^1.0.2",
|
|
82
|
+
"ml-conrec": "^5.0.2",
|
|
83
83
|
"ml-gsd": "^12.1.3",
|
|
84
84
|
"ml-spectra-processing": "^12.4.0",
|
|
85
85
|
"ml-stat": "^1.3.3",
|
|
86
86
|
"multiplet-analysis": "^2.1.1",
|
|
87
87
|
"nmr-correlation": "^2.3.3",
|
|
88
|
-
"nmr-load-save": "^0.
|
|
89
|
-
"nmr-processing": "^9.5.
|
|
88
|
+
"nmr-load-save": "^0.12.1",
|
|
89
|
+
"nmr-processing": "^9.5.1",
|
|
90
90
|
"nmredata": "^0.9.2",
|
|
91
91
|
"numeral": "^2.0.6",
|
|
92
92
|
"openchemlib": "^8.3.0",
|
|
@@ -95,54 +95,55 @@
|
|
|
95
95
|
"re-resizable": "^6.9.9",
|
|
96
96
|
"react-d3-utils": "^1.0.0",
|
|
97
97
|
"react-dropzone": "^14.2.3",
|
|
98
|
-
"react-error-boundary": "^4.0.
|
|
99
|
-
"react-icons": "^4.
|
|
100
|
-
"react-inspector": "^6.0.
|
|
98
|
+
"react-error-boundary": "^4.0.9",
|
|
99
|
+
"react-icons": "^4.9.0",
|
|
100
|
+
"react-inspector": "^6.0.2",
|
|
101
101
|
"react-mf": "^2.0.2",
|
|
102
102
|
"react-ocl": "^5.0.0",
|
|
103
103
|
"react-ocl-nmr": "^2.0.0",
|
|
104
104
|
"react-plot": "^1.4.2",
|
|
105
105
|
"react-rnd": "^10.4.1",
|
|
106
|
-
"react-science": "^0.22.
|
|
107
|
-
"react-slider": "^2.0.
|
|
106
|
+
"react-science": "^0.22.2",
|
|
107
|
+
"react-slider": "^2.0.5",
|
|
108
108
|
"react-table": "^7.8.0",
|
|
109
109
|
"react-transition-group": "^4.4.5",
|
|
110
110
|
"react-use": "^17.4.0",
|
|
111
111
|
"smart-array-filter": "^4.0.2",
|
|
112
|
-
"yup": "^1.
|
|
112
|
+
"yup": "^1.2.0"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
115
|
"@babel/plugin-transform-modules-commonjs": "^7.21.5",
|
|
116
|
-
"@babel/preset-react": "^7.
|
|
116
|
+
"@babel/preset-react": "^7.22.3",
|
|
117
117
|
"@babel/preset-typescript": "^7.21.5",
|
|
118
|
-
"@playwright/test": "^1.
|
|
118
|
+
"@playwright/test": "^1.34.3",
|
|
119
119
|
"@simbathesailor/use-what-changed": "^2.0.0",
|
|
120
120
|
"@types/d3": "^7.4.0",
|
|
121
|
-
"@types/node": "^20.
|
|
121
|
+
"@types/node": "^20.2.5",
|
|
122
122
|
"@types/papaparse": "^5.3.7",
|
|
123
|
-
"@types/react": "^18.2.
|
|
123
|
+
"@types/react": "^18.2.9",
|
|
124
124
|
"@types/react-dom": "^18.2.4",
|
|
125
125
|
"@types/react-table": "^7.7.14",
|
|
126
|
-
"@vitejs/plugin-react-swc": "^3.3.
|
|
127
|
-
"@vitest/coverage-
|
|
126
|
+
"@vitejs/plugin-react-swc": "^3.3.2",
|
|
127
|
+
"@vitest/coverage-v8": "^0.32.0",
|
|
128
128
|
"cross-env": "^7.0.3",
|
|
129
129
|
"cspell": "^6.31.1",
|
|
130
|
-
"eslint": "^8.
|
|
131
|
-
"eslint-config-
|
|
132
|
-
"
|
|
130
|
+
"eslint": "^8.42.0",
|
|
131
|
+
"eslint-config-cheminfo-react": "^9.1.0",
|
|
132
|
+
"eslint-config-cheminfo-typescript": "^11.3.1",
|
|
133
|
+
"modern-normalize": "^2.0.0",
|
|
133
134
|
"postcss-styled-syntax": "^0.4.0",
|
|
134
135
|
"prettier": "^2.8.8",
|
|
135
|
-
"rc-menu": "^9.
|
|
136
|
+
"rc-menu": "^9.9.2",
|
|
136
137
|
"react": "^18.2.0",
|
|
137
138
|
"react-dom": "^18.2.0",
|
|
138
|
-
"react-router-dom": "^6.
|
|
139
|
-
"rimraf": "^5.0.
|
|
139
|
+
"react-router-dom": "^6.12.0",
|
|
140
|
+
"rimraf": "^5.0.1",
|
|
140
141
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
141
142
|
"serve": "^14.2.0",
|
|
142
|
-
"stylelint": "^15.
|
|
143
|
+
"stylelint": "^15.7.0",
|
|
143
144
|
"stylelint-config-standard": "^33.0.0",
|
|
144
|
-
"typescript": "~5.
|
|
145
|
-
"vite": "^4.3.
|
|
146
|
-
"vitest": "^0.
|
|
145
|
+
"typescript": "~5.1.3",
|
|
146
|
+
"vite": "^4.3.9",
|
|
147
|
+
"vitest": "^0.32.0"
|
|
147
148
|
}
|
|
148
149
|
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { setDomain, getDomain } from './DomainActions';
|
|
2
|
-
function handleHistoryUndo(draft) {
|
|
3
|
-
const { past, present, future } = draft.history;
|
|
4
|
-
const previous = past[past.length - 1];
|
|
5
|
-
const newPast = past.slice(0, -1);
|
|
6
|
-
const newfuture = [present, ...future];
|
|
7
|
-
const hasRedo = newfuture.length > 0;
|
|
8
|
-
const hasUndo = past.length > 0;
|
|
9
|
-
const domain = getDomain(draft.data);
|
|
10
|
-
const history = {
|
|
11
|
-
past: newPast,
|
|
12
|
-
present: previous,
|
|
13
|
-
future: newfuture,
|
|
14
|
-
hasRedo,
|
|
15
|
-
hasUndo,
|
|
16
|
-
};
|
|
17
|
-
draft.xDomain = domain.xDomain;
|
|
18
|
-
draft.yDomain = domain.yDomain;
|
|
19
|
-
draft.originDomain = domain;
|
|
20
|
-
draft.history = history;
|
|
21
|
-
}
|
|
22
|
-
function handleHistoryRedo(draft) {
|
|
23
|
-
const { history, data } = draft;
|
|
24
|
-
const newPresent = history.future.shift();
|
|
25
|
-
history.past.push(history.present);
|
|
26
|
-
history.present = newPresent;
|
|
27
|
-
history.hasUndo = true;
|
|
28
|
-
history.hasRedo = history.future.length > 0;
|
|
29
|
-
setDomain(data);
|
|
30
|
-
}
|
|
31
|
-
function handleHistoryReset(draft, action) {
|
|
32
|
-
draft.history = {
|
|
33
|
-
past: [],
|
|
34
|
-
present: action,
|
|
35
|
-
future: [],
|
|
36
|
-
hasRedo: false,
|
|
37
|
-
hasUndo: false,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
export { handleHistoryUndo, handleHistoryRedo, handleHistoryReset };
|