nmrium 0.38.1 → 0.38.2
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/ApodizationLine.js +27 -4
- package/lib/component/1d/ExclusionZoneAnnotation.js +1 -1
- package/lib/component/1d/ExclusionZonesAnnotations.js +1 -1
- package/lib/component/1d/FooterBanner.js +5 -5
- package/lib/component/1d/SpectraLegends.js +2 -3
- package/lib/component/1d/Viewer1D.js +1 -1
- package/lib/component/1d/integral/Integral.d.ts +1 -1
- package/lib/component/1d/integral/IntegralResizable.d.ts +1 -1
- package/lib/component/1d/jCouplingGraph/JsCouplings.d.ts +1 -1
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +2 -2
- package/lib/component/1d/multiplicityTree/LevelNode.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/StringNode.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/buildTreeNode.d.ts +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.d.ts +2 -1
- package/lib/component/1d/ranges/Range.d.ts +1 -1
- package/lib/component/1d/tool/PeakPointer.js +6 -6
- package/lib/component/1d/tool/XLabelPointer.js +5 -5
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.d.ts +1 -1
- package/lib/component/1d-2d/tools/BrushX.js +2 -3
- package/lib/component/1d-2d/tools/BrushXY.js +2 -3
- package/lib/component/1d-2d/tools/CrossLinePointer.js +4 -5
- package/lib/component/2d/Chart2D.js +4 -4
- package/lib/component/2d/FooterBanner.js +5 -5
- package/lib/component/2d/Viewer2D.js +1 -1
- package/lib/component/2d/tools/XYLabelPointer.js +5 -5
- package/lib/component/2d/zones/Signal.d.ts +1 -1
- package/lib/component/2d/zones/SignalCrosshair.d.ts +1 -1
- package/lib/component/2d/zones/Zone.d.ts +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts +20 -12
- package/lib/component/EventsTrackers/BrushTracker.js +35 -22
- package/lib/component/EventsTrackers/MouseTracker.d.ts +6 -2
- package/lib/component/EventsTrackers/MouseTracker.js +4 -1
- package/lib/component/NMRium.d.ts +4 -5
- package/lib/component/NMRium.js +11 -14
- package/lib/component/assignment/AssignmentsReducer.d.ts +2 -2
- package/lib/component/context/PreferencesContext.d.ts +6 -6
- package/lib/component/elements/Button.d.ts +13 -11
- package/lib/component/elements/Button.js +16 -25
- package/lib/component/elements/ColorInput.d.ts +0 -1
- package/lib/component/elements/ColorInput.js +2 -2
- package/lib/component/elements/EditableColumn.js +5 -2
- package/lib/component/elements/Input.js +2 -4
- package/lib/component/elements/Label.d.ts +1 -0
- package/lib/component/elements/Label.js +2 -2
- package/lib/component/elements/MolecularFormulaInput.d.ts +2 -2
- package/lib/component/elements/MolecularFormulaInput.js +15 -18
- package/lib/component/elements/NextPrev.d.ts +5 -3
- package/lib/component/elements/NextPrev.js +26 -8
- package/lib/component/elements/NumberInput.js +2 -2
- package/lib/component/elements/ReactTable/ReactTable.js +4 -4
- package/lib/component/elements/formik/FormikCheckBox.d.ts +2 -1
- package/lib/component/elements/formik/FormikCheckBox.js +2 -2
- package/lib/component/elements/formik/FormikColumnFormatField.d.ts +4 -0
- package/lib/component/elements/formik/FormikColumnFormatField.js +19 -16
- package/lib/component/elements/formik/FormikInput.js +10 -6
- package/lib/component/elements/formik/FormikSelect.js +1 -1
- package/lib/component/header/ApodizationOptionsPanel.js +4 -3
- package/lib/component/header/AutoPeakPickingOptionPanel.js +16 -7
- package/lib/component/header/BaseLineCorrectionPanel.js +5 -2
- package/lib/component/header/PhaseCorrectionPanel.js +5 -2
- package/lib/component/header/RangesPickingOptionPanel.js +15 -7
- package/lib/component/header/ZeroFillingOptionsPanel.js +1 -1
- package/lib/component/highlight/index.d.ts +1 -1
- package/lib/component/hooks/useActiveSpectra.d.ts +1 -1
- package/lib/component/hooks/useActiveSpectrum.d.ts +1 -1
- package/lib/component/hooks/useActiveSpectrumPeaksViewState.d.ts +1 -1
- package/lib/component/hooks/useCheckPointsNumberInWindowArea.d.ts +2 -0
- package/lib/component/hooks/useCheckPointsNumberInWindowArea.js +17 -0
- package/lib/component/hooks/useCheckToolsVisibility.d.ts +2 -2
- package/lib/component/hooks/useDatumWithSpectraStatistics.d.ts +3 -2
- package/lib/component/hooks/useExport.js +1 -1
- package/lib/component/hooks/useFilter.d.ts +2 -1
- package/lib/component/hooks/usePanelPreferences.d.ts +3 -3
- package/lib/component/hooks/usePanelPreferences.js +4 -0
- package/lib/component/hooks/useSaveSettings.d.ts +1 -1
- package/lib/component/hooks/useSaveSettings.js +1 -1
- package/lib/component/hooks/useVerticalAlign.d.ts +1 -1
- package/lib/component/loader/DropZone.js +1 -2
- package/lib/component/modal/EditPeakShapeModal.d.ts +2 -2
- package/lib/component/modal/LoadJCAMPModal.d.ts +3 -3
- package/lib/component/modal/LoadJCAMPModal.js +35 -66
- package/lib/component/modal/ModalStyle.js +0 -10
- package/lib/component/modal/MoleculeStructureEditorModal.d.ts +2 -1
- package/lib/component/modal/MoleculeStructureEditorModal.js +12 -6
- package/lib/component/modal/MultipletAnalysisModal.d.ts +2 -2
- package/lib/component/modal/PredictSpectraModal.d.ts +4 -2
- package/lib/component/modal/PredictSpectraModal.js +43 -105
- package/lib/component/modal/SaveAsModal.d.ts +2 -0
- package/lib/component/modal/SaveAsModal.js +21 -14
- package/lib/component/modal/changeSum/ChangeSumModal.js +25 -38
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.d.ts +1 -1
- package/lib/component/modal/editRange/forms/components/DeltaInput.js +2 -0
- package/lib/component/modal/editRange/forms/components/SignalsForm.d.ts +2 -2
- package/lib/component/modal/metaImportation/MetaImportationModal.js +15 -5
- package/lib/component/modal/setting/GeneralSettings.js +1 -6
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +7 -15
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +2 -2
- package/lib/component/panels/MoleculesPanel/MoleculePanel.d.ts +1 -11
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +20 -25
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +6 -11
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +71 -81
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/Utilities.js +3 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisColumnHeader.js +6 -6
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/index.js +2 -2
- package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +39 -53
- package/lib/component/panels/RangesPanel/RangesPreferences.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesPreferences.js +7 -22
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +2 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.d.ts +1 -1
- package/lib/component/panels/RangesPanel/hooks/useMapRanges.d.ts +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectraTable.js +5 -1
- package/lib/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +10 -4
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.d.ts +2 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts +1 -1
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.d.ts +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.js +5 -24
- package/lib/component/panels/databasePanel/DatabasePreferences.js +2 -2
- package/lib/component/panels/header/DefaultPanelHeader.d.ts +2 -3
- package/lib/component/panels/header/DefaultPanelHeader.js +18 -26
- package/lib/component/panels/header/PanelHeader.d.ts +7 -0
- package/lib/component/panels/header/PanelHeader.js +12 -0
- package/lib/component/panels/predictionPanel/PredictionOptionsPanel.d.ts +9 -0
- package/lib/component/panels/predictionPanel/PredictionOptionsPanel.js +94 -0
- package/lib/component/panels/predictionPanel/PredictionPanel.d.ts +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.js +107 -37
- package/lib/component/panels/predictionPanel/PredictionPreferences.d.ts +3 -0
- package/lib/component/panels/predictionPanel/PredictionPreferences.js +24 -0
- package/lib/component/panels/predictionPanel/PredictionSimpleOptions.d.ts +2 -0
- package/lib/component/panels/predictionPanel/PredictionSimpleOptions.js +44 -0
- package/lib/component/reducer/Reducer.d.ts +5 -87
- package/lib/component/reducer/Reducer.js +1 -29
- package/lib/component/reducer/actions/FiltersActions.d.ts +1 -2
- package/lib/component/reducer/actions/FiltersActions.js +47 -52
- package/lib/component/reducer/actions/HistoryActions.d.ts +4 -0
- package/lib/component/reducer/actions/HistoryActions.js +40 -0
- package/lib/component/reducer/actions/IntegralsActions.d.ts +1 -1
- package/lib/component/reducer/actions/LoadActions.d.ts +1 -2
- package/lib/component/reducer/actions/LoadActions.js +1 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts +7 -4
- package/lib/component/reducer/actions/MoleculeActions.js +57 -28
- package/lib/component/reducer/actions/PeaksActions.d.ts +1 -2
- package/lib/component/reducer/actions/PeaksActions.js +3 -3
- package/lib/component/reducer/actions/RangesActions.d.ts +4 -5
- package/lib/component/reducer/actions/RangesActions.js +5 -27
- package/lib/component/reducer/actions/SpectrumsActions.js +2 -2
- package/lib/component/reducer/actions/ToolsActions.d.ts +2 -2
- package/lib/component/reducer/actions/ZonesActions.d.ts +2 -1
- package/lib/component/reducer/actions/ZonesActions.js +1 -2
- package/lib/component/reducer/helper/getActiveSpectra.d.ts +1 -1
- package/lib/component/reducer/helper/getActiveSpectrum.d.ts +1 -1
- package/lib/component/reducer/helper/getVerticalAlign.d.ts +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/getActiveWorkspace.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/getPreferencesByWorkspace.d.ts +2 -3
- package/lib/component/reducer/preferences/utilities/initWorkspace.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts +1 -1
- package/lib/component/toolbar/BasicToolBar.js +6 -11
- package/lib/component/toolbar/ToolTypes.d.ts +2 -2
- package/lib/component/toolbar/ToolTypes.js +1 -1
- package/lib/component/workspaces/assignment.d.ts +1 -1
- package/lib/component/workspaces/basic.d.ts +1 -1
- package/lib/component/workspaces/embedded.d.ts +1 -1
- package/lib/component/workspaces/exercise.d.ts +1 -1
- package/lib/component/workspaces/index.d.ts +6 -6
- package/lib/component/workspaces/prediction.d.ts +1 -1
- package/lib/component/workspaces/prediction.js +193 -0
- package/lib/component/workspaces/process1D.d.ts +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.d.ts +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib/data/PredictionManager.js +16 -2
- package/lib/data/SpectraManager.d.ts +1 -2
- package/lib/data/constants/DefaultApodizationOptions.d.ts +2 -0
- package/lib/data/constants/DefaultApodizationOptions.js +5 -0
- package/lib/data/data1d/Spectrum1D/SumManager.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/generateJGraphData.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/index.d.ts +1 -5
- package/lib/data/data1d/Spectrum1D/index.js +1 -5
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +3 -3
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -2
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +3 -2
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/lookupPeak.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +1 -2
- package/lib/data/data1d/Spectrum1D/ranges/addRange.d.ts +7 -7
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +5 -24
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/checkRangeKind.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRange.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +1 -2
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +37 -2
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js +1 -1
- package/lib/data/data1d/database.js +2 -4
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +3 -30
- package/lib/data/data1d/multipleSpectraAnalysis.js +4 -15
- package/lib/data/data2d/Spectrum2D/getMissingProjection.d.ts +3 -2
- package/lib/data/data2d/Spectrum2D/getShift.js +1 -1
- package/lib/data/data2d/Spectrum2D/getSlice.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +3 -2
- package/lib/data/data2d/Spectrum2D/zones/isZoneExists.d.ts +2 -1
- package/lib/data/data2d/Spectrum2D/zones/mapZones.d.ts +3 -2
- package/lib/data/getDefaultMatrixFilters.d.ts +1 -1
- package/lib/data/types/data1d/ComplexData1D.d.ts +2 -2
- package/lib/data/types/data1d/RangeDetectionResult.d.ts +1 -1
- package/lib/data/utilities/FindUtilities.d.ts +2 -1
- package/lib/data/utilities/RangeUtilities.d.ts +1 -1
- package/lib/data/utilities/ZoneUtilities.d.ts +1 -1
- package/lib/data/utilities/calculateSanPlot.d.ts +2 -2
- package/lib/types/NMRiumDataReturn.d.ts +1 -3
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/ApodizationLine.js +28 -5
- package/lib-cjs/component/1d/ExclusionZoneAnnotation.js +3 -26
- package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +5 -28
- package/lib-cjs/component/1d/FooterBanner.js +2 -2
- package/lib-cjs/component/1d/SpectraLegends.js +1 -2
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +2 -2
- package/lib-cjs/component/1d/tool/PeakPointer.js +3 -3
- package/lib-cjs/component/1d/tool/XLabelPointer.js +2 -2
- package/lib-cjs/component/1d-2d/tools/BrushX.js +1 -2
- package/lib-cjs/component/1d-2d/tools/BrushXY.js +1 -2
- package/lib-cjs/component/1d-2d/tools/CrossLinePointer.js +2 -3
- package/lib-cjs/component/2d/Chart2D.js +4 -4
- package/lib-cjs/component/2d/FooterBanner.js +2 -2
- package/lib-cjs/component/2d/tools/XYLabelPointer.js +2 -2
- package/lib-cjs/component/EventsTrackers/BrushTracker.js +36 -22
- package/lib-cjs/component/EventsTrackers/MouseTracker.js +4 -1
- package/lib-cjs/component/NMRium.js +8 -11
- package/lib-cjs/component/elements/Button.js +16 -25
- package/lib-cjs/component/elements/ColorInput.js +2 -2
- package/lib-cjs/component/elements/EditableColumn.js +5 -2
- package/lib-cjs/component/elements/Input.js +2 -4
- package/lib-cjs/component/elements/Label.js +2 -2
- package/lib-cjs/component/elements/MolecularFormulaInput.js +14 -16
- package/lib-cjs/component/elements/NextPrev.js +26 -8
- package/lib-cjs/component/elements/NumberInput.js +2 -2
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +4 -4
- package/lib-cjs/component/elements/formik/FormikCheckBox.js +2 -2
- package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +20 -16
- package/lib-cjs/component/elements/formik/FormikInput.js +10 -6
- package/lib-cjs/component/elements/formik/FormikSelect.js +1 -1
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +6 -5
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +15 -6
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +6 -3
- package/lib-cjs/component/header/PhaseCorrectionPanel.js +6 -26
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +15 -7
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +2 -25
- package/lib-cjs/component/hooks/useCheckPointsNumberInWindowArea.js +24 -0
- package/lib-cjs/component/hooks/useExport.js +1 -1
- package/lib-cjs/component/hooks/usePanelPreferences.js +4 -0
- package/lib-cjs/component/hooks/useSaveSettings.js +1 -1
- package/lib-cjs/component/loader/DropZone.js +1 -2
- package/lib-cjs/component/modal/LoadJCAMPModal.js +60 -67
- package/lib-cjs/component/modal/ModalStyle.js +0 -10
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +12 -6
- package/lib-cjs/component/modal/PredictSpectraModal.js +43 -126
- package/lib-cjs/component/modal/SaveAsModal.js +22 -14
- package/lib-cjs/component/modal/changeSum/ChangeSumModal.js +24 -37
- package/lib-cjs/component/modal/editRange/forms/components/DeltaInput.js +2 -0
- package/lib-cjs/component/modal/metaImportation/MetaImportationModal.js +15 -5
- package/lib-cjs/component/modal/setting/GeneralSettings.js +1 -6
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +6 -14
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +2 -2
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +19 -24
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +76 -86
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +3 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisColumnHeader.js +6 -6
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/index.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +38 -52
- package/lib-cjs/component/panels/RangesPanel/RangesPreferences.js +5 -20
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +5 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +10 -4
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +1 -1
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +5 -24
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +25 -2
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +18 -26
- package/lib-cjs/component/panels/header/PanelHeader.js +15 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionOptionsPanel.js +122 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +107 -37
- package/lib-cjs/component/panels/predictionPanel/PredictionPreferences.js +29 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionSimpleOptions.js +72 -0
- package/lib-cjs/component/reducer/Reducer.js +2 -31
- package/lib-cjs/component/reducer/actions/FiltersActions.js +66 -94
- package/lib-cjs/component/reducer/actions/HistoryActions.js +45 -0
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +58 -32
- package/lib-cjs/component/reducer/actions/PeaksActions.js +3 -3
- package/lib-cjs/component/reducer/actions/RangesActions.js +7 -52
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +4 -27
- package/lib-cjs/component/reducer/actions/ZonesActions.js +4 -28
- package/lib-cjs/component/toolbar/BasicToolBar.js +5 -10
- package/lib-cjs/component/toolbar/ToolTypes.js +9 -32
- package/lib-cjs/component/workspaces/prediction.js +193 -0
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +21 -44
- package/lib-cjs/data/PredictionManager.js +16 -2
- package/lib-cjs/data/constants/DefaultApodizationOptions.js +8 -0
- package/lib-cjs/data/data1d/Spectrum1D/index.js +7 -11
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +9 -32
- package/lib-cjs/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/initiatePeaks.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/optimizePeaks.js +1 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +7 -26
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRange.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRange.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRanges.js +3 -4
- package/lib-cjs/data/data1d/Spectrum1D/ranges/initiateRanges.js +2 -2
- package/lib-cjs/data/data1d/database.js +2 -4
- package/lib-cjs/data/data1d/multipleSpectraAnalysis.js +5 -16
- package/lib-cjs/data/data2d/Spectrum2D/getShift.js +3 -26
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +2 -25
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +25 -25
- package/lib/component/panels/predictionPanel/PredictionOptions.d.ts +0 -7
- package/lib/component/panels/predictionPanel/PredictionOptions.js +0 -74
- package/lib/component/workspaces/Workspace.d.ts +0 -188
- package/lib/component/workspaces/Workspace.js +0 -1
- package/lib/data/Filters.d.ts +0 -12
- package/lib/data/Filters.js +0 -12
- package/lib/data/FiltersManager.d.ts +0 -30
- package/lib/data/FiltersManager.js +0 -175
- package/lib/data/data1d/Spectrum1D/getShiftX.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/getShiftX.js +0 -6
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +0 -4
- package/lib/data/data1d/Spectrum1D/integrals/checkIntegralKind.d.ts +0 -7
- package/lib/data/data1d/Spectrum1D/integrals/checkIntegralKind.js +0 -9
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.d.ts +0 -12
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.js +0 -36
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.js +0 -6
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +0 -5
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.js +0 -26
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.d.ts +0 -3
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +0 -45
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.js +0 -7
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +0 -4
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +0 -78
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.js +0 -9
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +0 -5
- package/lib/data/data1d/filter1d/apodization.d.ts +0 -27
- package/lib/data/data1d/filter1d/apodization.js +0 -81
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +0 -33
- package/lib/data/data1d/filter1d/baselineCorrection.js +0 -51
- package/lib/data/data1d/filter1d/digitalFilter.d.ts +0 -20
- package/lib/data/data1d/filter1d/digitalFilter.js +0 -44
- package/lib/data/data1d/filter1d/equallySpaced.d.ts +0 -33
- package/lib/data/data1d/filter1d/equallySpaced.js +0 -52
- package/lib/data/data1d/filter1d/exclusionZones.d.ts +0 -15
- package/lib/data/data1d/filter1d/exclusionZones.js +0 -32
- package/lib/data/data1d/filter1d/fft.d.ts +0 -18
- package/lib/data/data1d/filter1d/fft.js +0 -90
- package/lib/data/data1d/filter1d/phaseCorrection.d.ts +0 -26
- package/lib/data/data1d/filter1d/phaseCorrection.js +0 -64
- package/lib/data/data1d/filter1d/shiftX.d.ts +0 -20
- package/lib/data/data1d/filter1d/shiftX.js +0 -26
- package/lib/data/data1d/filter1d/signalProcessing.d.ts +0 -26
- package/lib/data/data1d/filter1d/signalProcessing.js +0 -65
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.d.ts +0 -2
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +0 -35
- package/lib/data/data1d/filter1d/zeroFilling.d.ts +0 -22
- package/lib/data/data1d/filter1d/zeroFilling.js +0 -60
- package/lib/data/data2d/filter2d/shiftX.d.ts +0 -18
- package/lib/data/data2d/filter2d/shiftX.js +0 -27
- package/lib/data/data2d/filter2d/shiftY.d.ts +0 -18
- package/lib/data/data2d/filter2d/shiftY.js +0 -27
- package/lib/data/types/view-state/PeaksViewState.d.ts +0 -17
- package/lib/data/types/view-state/PeaksViewState.js +0 -1
- package/lib/types/NMRiumGeneralPreferences.d.ts +0 -7
- package/lib/types/NMRiumGeneralPreferences.js +0 -1
- package/lib/types/NMRiumPanelPreferences.d.ts +0 -17
- package/lib/types/NMRiumPanelPreferences.js +0 -1
- package/lib/types/NMRiumToolBarPreferences.d.ts +0 -22
- package/lib/types/NMRiumToolBarPreferences.js +0 -1
- package/lib/types/PanelPreferencesType.d.ts +0 -4
- package/lib/types/PanelPreferencesType.js +0 -1
- package/lib-cjs/component/panels/predictionPanel/PredictionOptions.js +0 -102
- package/lib-cjs/component/workspaces/Workspace.js +0 -2
- package/lib-cjs/data/Filters.js +0 -38
- package/lib-cjs/data/FiltersManager.js +0 -206
- package/lib-cjs/data/data1d/Spectrum1D/getShiftX.js +0 -33
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +0 -8
- package/lib-cjs/data/data1d/Spectrum1D/integrals/checkIntegralKind.js +0 -13
- package/lib-cjs/data/data1d/Spectrum1D/integrals/mapIntegrals.js +0 -40
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegrals.js +0 -10
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +0 -9
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateRelatives.js +0 -30
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +0 -49
- package/lib-cjs/data/data1d/Spectrum1D/peaks/updatePeaks.js +0 -11
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +0 -82
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRanges.js +0 -13
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +0 -9
- package/lib-cjs/data/data1d/filter1d/apodization.js +0 -88
- package/lib-cjs/data/data1d/filter1d/baselineCorrection.js +0 -60
- package/lib-cjs/data/data1d/filter1d/digitalFilter.js +0 -50
- package/lib-cjs/data/data1d/filter1d/equallySpaced.js +0 -61
- package/lib-cjs/data/data1d/filter1d/exclusionZones.js +0 -38
- package/lib-cjs/data/data1d/filter1d/fft.js +0 -96
- package/lib-cjs/data/data1d/filter1d/phaseCorrection.js +0 -70
- package/lib-cjs/data/data1d/filter1d/shiftX.js +0 -32
- package/lib-cjs/data/data1d/filter1d/signalProcessing.js +0 -95
- package/lib-cjs/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +0 -39
- package/lib-cjs/data/data1d/filter1d/zeroFilling.js +0 -66
- package/lib-cjs/data/data2d/filter2d/shiftX.js +0 -33
- package/lib-cjs/data/data2d/filter2d/shiftY.js +0 -33
- package/lib-cjs/data/types/view-state/PeaksViewState.js +0 -2
- package/lib-cjs/types/NMRiumGeneralPreferences.js +0 -2
- package/lib-cjs/types/NMRiumPanelPreferences.js +0 -2
- package/lib-cjs/types/NMRiumToolBarPreferences.js +0 -2
- package/lib-cjs/types/PanelPreferencesType.js +0 -2
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { InputStyle } from '../Input';
|
|
3
|
+
import { LabelStyle } from '../Label';
|
|
4
|
+
export declare const formatFieldInputStyle: InputStyle;
|
|
5
|
+
export declare const formatFieldLabelStyle: LabelStyle;
|
|
2
6
|
export interface ColumnFormatField {
|
|
3
7
|
label: string;
|
|
4
8
|
checkControllerName?: string;
|
|
@@ -3,21 +3,26 @@ import { useFormikContext } from 'formik';
|
|
|
3
3
|
import lodashGet from 'lodash/get';
|
|
4
4
|
import { memo, useCallback } from 'react';
|
|
5
5
|
import Input from '../Input';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import Label from '../Label';
|
|
7
|
+
export const formatFieldInputStyle = {
|
|
8
|
+
inputWrapper: {
|
|
9
|
+
width: '60%',
|
|
10
|
+
margin: '2px 0',
|
|
11
|
+
},
|
|
12
|
+
input: {
|
|
13
|
+
padding: '2px',
|
|
14
|
+
textAlign: 'center',
|
|
11
15
|
},
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
};
|
|
17
|
+
export const formatFieldLabelStyle = {
|
|
18
|
+
label: {
|
|
19
|
+
flex: 4,
|
|
14
20
|
fontSize: '11px',
|
|
15
21
|
fontWeight: 'bold',
|
|
16
22
|
color: '#232323',
|
|
17
23
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
textAlign: 'center',
|
|
24
|
+
wrapper: {
|
|
25
|
+
flex: 8,
|
|
21
26
|
},
|
|
22
27
|
};
|
|
23
28
|
function FormikColumnFormatField(props) {
|
|
@@ -29,11 +34,9 @@ function FormikColumnFormatField(props) {
|
|
|
29
34
|
const checkChangeHandler = useCallback((e) => {
|
|
30
35
|
void setFieldValue(e.target.name, e.target.checked);
|
|
31
36
|
}, [setFieldValue]);
|
|
32
|
-
return (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
alignItems: 'center',
|
|
37
|
-
}, children: [!hideCheckField && checkControllerName && (_jsx("input", { type: "checkbox", style: { margin: '0px 5px' }, name: checkControllerName, onChange: checkChangeHandler, checked: lodashGet(values, checkControllerName, false) })), !hideFormatField && formatControllerName && (_jsx(Input, { style: { inputWrapper: styles.input }, name: formatControllerName, value: lodashGet(values, formatControllerName, ''), onChange: changeHandler, type: "text", disabled: disableFormat }))] })] }));
|
|
37
|
+
return (_jsx(Label, { title: label, style: formatFieldLabelStyle, children: _jsxs("div", { style: {
|
|
38
|
+
display: 'flex',
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
}, children: [!hideCheckField && checkControllerName ? (_jsx("input", { type: "checkbox", style: { margin: '0px 5px' }, name: checkControllerName, onChange: checkChangeHandler, checked: lodashGet(values, checkControllerName, false) })) : (_jsx("div", { style: { width: '23px' } })), !hideFormatField && formatControllerName && (_jsx(Input, { style: formatFieldInputStyle, name: formatControllerName, value: lodashGet(values, formatControllerName, ''), onChange: changeHandler, type: "text", disabled: disableFormat }))] }) }));
|
|
38
41
|
}
|
|
39
42
|
export default memo(FormikColumnFormatField);
|
|
@@ -6,7 +6,7 @@ function identity(value) {
|
|
|
6
6
|
return value;
|
|
7
7
|
}
|
|
8
8
|
function FormikInput(props) {
|
|
9
|
-
const { name, style = { label: {}, input: {} }, onChange = () => null, checkValue = () => true, type = 'text', className = '', value = null, format = () => identity, checkErrorAfterInputTouched = true, mapOnChangeValue, mapValue, ...resProps } = props;
|
|
9
|
+
const { name, style = { label: {}, input: {}, inputWrapper: {} }, onChange = () => null, checkValue = () => true, type = 'text', className = '', value = null, format = () => identity, checkErrorAfterInputTouched = true, mapOnChangeValue, mapValue, ...resProps } = props;
|
|
10
10
|
const { values, handleChange, errors, touched, setFieldValue } = useFormikContext();
|
|
11
11
|
function changeHandler(e) {
|
|
12
12
|
onChange(e);
|
|
@@ -26,11 +26,15 @@ function FormikInput(props) {
|
|
|
26
26
|
return (_jsx(Input, { name: name, value: val, onChange: changeHandler, type: type, style: {
|
|
27
27
|
...style,
|
|
28
28
|
inputWrapper: {
|
|
29
|
-
...style.
|
|
30
|
-
...(isInvalid
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
...style.inputWrapper,
|
|
30
|
+
...(isInvalid
|
|
31
|
+
? {
|
|
32
|
+
borderColor: 'red',
|
|
33
|
+
borderWidth: '1px',
|
|
34
|
+
borderStyle: 'solid',
|
|
35
|
+
outline: 'none',
|
|
36
|
+
}
|
|
37
|
+
: {}),
|
|
34
38
|
},
|
|
35
39
|
}, checkValue: checkValue, className: className, format: format, ...resProps }));
|
|
36
40
|
}
|
|
@@ -19,6 +19,6 @@ const FormikSelect = function FormikSelect(props) {
|
|
|
19
19
|
if (checkErrorAfterInputTouched) {
|
|
20
20
|
isInvalid = lodashGet(errors, name) && lodashGet(touched, name);
|
|
21
21
|
}
|
|
22
|
-
return (_jsx(Select, { name: name, defaultValue: value || lodashGet(values, name), onChange: changeHandler, style: { ...style, ...(isInvalid && { border: '1px solid red' }) }, ...resProps }));
|
|
22
|
+
return (_jsx(Select, { name: name, defaultValue: value || lodashGet(values, name), onChange: changeHandler, style: { ...style, ...(isInvalid && { border: '1px solid red' }) }, ...resProps }, String(value || lodashGet(values, name))));
|
|
23
23
|
};
|
|
24
24
|
export default FormikSelect;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Formik } from 'formik';
|
|
3
|
+
import { Filters } from 'nmr-processing';
|
|
3
4
|
import { useRef, memo } from 'react';
|
|
4
5
|
import * as Yup from 'yup';
|
|
5
|
-
import
|
|
6
|
-
import { defaultApodizationOptions, } from '../../data/data1d/filter1d/apodization';
|
|
6
|
+
import { defaultApodizationOptions } from '../../data/constants/DefaultApodizationOptions';
|
|
7
7
|
import { useDispatch } from '../context/DispatchContext';
|
|
8
8
|
import ActionButtons from '../elements/ActionButtons';
|
|
9
9
|
import Label from '../elements/Label';
|
|
@@ -14,7 +14,8 @@ import { useFilter } from '../hooks/useFilter';
|
|
|
14
14
|
import { headerLabelStyle } from './Header';
|
|
15
15
|
import { HeaderContainer } from './HeaderContainer';
|
|
16
16
|
const inputStyle = {
|
|
17
|
-
input: {
|
|
17
|
+
input: { width: '60px' },
|
|
18
|
+
inputWrapper: { height: '100%' },
|
|
18
19
|
};
|
|
19
20
|
const validationSchema = Yup.object().shape({
|
|
20
21
|
lineBroadening: Yup.number().required(),
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Formik } from 'formik';
|
|
3
|
-
import { memo
|
|
3
|
+
import { memo } from 'react';
|
|
4
4
|
import * as Yup from 'yup';
|
|
5
5
|
import { useDispatch } from '../context/DispatchContext';
|
|
6
6
|
import Button from '../elements/Button';
|
|
7
7
|
import Label from '../elements/Label';
|
|
8
8
|
import FormikNumberInput from '../elements/formik/FormikNumberInput';
|
|
9
9
|
import FormikSelect from '../elements/formik/FormikSelect';
|
|
10
|
+
import { useAlert } from '../elements/popup/Alert';
|
|
11
|
+
import { MIN_AREA_POINTS, useCheckPointsNumberInWindowArea, } from '../hooks/useCheckPointsNumberInWindowArea';
|
|
10
12
|
import { headerLabelStyle } from './Header';
|
|
11
13
|
import { HeaderContainer } from './HeaderContainer';
|
|
12
14
|
const inputStyle = {
|
|
@@ -39,12 +41,19 @@ const INIT_VALUES = {
|
|
|
39
41
|
};
|
|
40
42
|
function AutoPeakPickingOptionPanel() {
|
|
41
43
|
const dispatch = useDispatch();
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
const pointsNumber = useCheckPointsNumberInWindowArea();
|
|
45
|
+
const alert = useAlert();
|
|
46
|
+
function handlePeakPicking(values) {
|
|
47
|
+
if (pointsNumber > MIN_AREA_POINTS) {
|
|
48
|
+
dispatch({
|
|
49
|
+
type: 'AUTO_PEAK_PICKING',
|
|
50
|
+
payload: values,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
alert.error(`Auto peak picking only available for area more than ${MIN_AREA_POINTS} points`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
48
57
|
return (_jsx(HeaderContainer, { children: _jsx(Formik, { initialValues: INIT_VALUES, onSubmit: handlePeakPicking, validationSchema: validationSchema, children: ({ handleSubmit, isValid }) => (_jsxs(_Fragment, { children: [_jsx(Label, { title: "Direction : ", shortTitle: "", style: headerLabelStyle, children: _jsx(FormikSelect, { name: "direction", items: LookFor, style: { width: '85px' } }) }), _jsx(Label, { title: "Max Number Of Peaks :", shortTitle: "Peaks number :", style: headerLabelStyle, children: _jsx(FormikNumberInput, { name: "maxNumberOfPeaks", style: inputStyle, min: 0 }) }), _jsx(Label, { title: "Noise factor :", shortTitle: "Noise :", style: headerLabelStyle, children: _jsx(FormikNumberInput, { name: "noiseFactor", style: inputStyle, min: 0 }) }), _jsx(Label, { title: "Min Max Ratio :", shortTitle: "Ratio :", style: headerLabelStyle, children: _jsx(FormikNumberInput, { name: "minMaxRatio", style: inputStyle, step: "0.01", min: 0 }) }), _jsx(Button.Done, { onClick: () => handleSubmit(), style: { margin: '0 10px' }, disabled: !isValid, children: "Apply" })] })) }) }));
|
|
49
58
|
}
|
|
50
59
|
export default memo(AutoPeakPickingOptionPanel);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Formik } from 'formik';
|
|
3
|
+
import { Filters } from 'nmr-processing';
|
|
3
4
|
import { useRef, useState, memo } from 'react';
|
|
4
5
|
import * as Yup from 'yup';
|
|
5
|
-
import * as Filters from '../../data/Filters';
|
|
6
6
|
import { useDispatch } from '../context/DispatchContext';
|
|
7
7
|
import ActionButtons from '../elements/ActionButtons';
|
|
8
8
|
import Label from '../elements/Label';
|
|
@@ -19,7 +19,10 @@ const getAlgorithmsList = () => {
|
|
|
19
19
|
value: val.toLowerCase(),
|
|
20
20
|
}));
|
|
21
21
|
};
|
|
22
|
-
const inputStyle = {
|
|
22
|
+
const inputStyle = {
|
|
23
|
+
input: { width: '50px' },
|
|
24
|
+
inputWrapper: { height: '100%' },
|
|
25
|
+
};
|
|
23
26
|
const formData = (algorithm, filterValues) => {
|
|
24
27
|
switch (algorithm) {
|
|
25
28
|
case 'airpls': {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Filters } from 'nmr-processing';
|
|
2
3
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
-
import * as Filters from '../../data/Filters';
|
|
4
4
|
import { useChartData } from '../context/ChartContext';
|
|
5
5
|
import { useDispatch } from '../context/DispatchContext';
|
|
6
6
|
import ActionButtons from '../elements/ActionButtons';
|
|
@@ -19,9 +19,12 @@ const selectStyle = {
|
|
|
19
19
|
height: '20px',
|
|
20
20
|
};
|
|
21
21
|
const inputStyle = {
|
|
22
|
-
|
|
22
|
+
input: {
|
|
23
23
|
width: '70px',
|
|
24
24
|
},
|
|
25
|
+
inputWrapper: {
|
|
26
|
+
height: '100%',
|
|
27
|
+
},
|
|
25
28
|
};
|
|
26
29
|
const phaseCorrectionTypes = {
|
|
27
30
|
manual: 'manual',
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Formik } from 'formik';
|
|
3
|
-
import { useCallback } from 'react';
|
|
4
3
|
import * as Yup from 'yup';
|
|
5
4
|
import { useDispatch } from '../context/DispatchContext';
|
|
6
5
|
import Button from '../elements/Button';
|
|
7
6
|
import Label from '../elements/Label';
|
|
8
7
|
import FormikCheckBox from '../elements/formik/FormikCheckBox';
|
|
9
8
|
import FormikNumberInput from '../elements/formik/FormikNumberInput';
|
|
9
|
+
import { useAlert } from '../elements/popup/Alert';
|
|
10
|
+
import { MIN_AREA_POINTS, useCheckPointsNumberInWindowArea, } from '../hooks/useCheckPointsNumberInWindowArea';
|
|
10
11
|
import { headerLabelStyle } from './Header';
|
|
11
12
|
import { HeaderContainer } from './HeaderContainer';
|
|
12
13
|
const validationSchema = Yup.object().shape({
|
|
@@ -18,12 +19,19 @@ const initialValues = {
|
|
|
18
19
|
};
|
|
19
20
|
function RangesPickingOptionPanel() {
|
|
20
21
|
const dispatch = useDispatch();
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const pointsNumber = useCheckPointsNumberInWindowArea();
|
|
23
|
+
const alert = useAlert();
|
|
24
|
+
function handleRangesPicking(values) {
|
|
25
|
+
if (pointsNumber > MIN_AREA_POINTS) {
|
|
26
|
+
dispatch({
|
|
27
|
+
type: 'AUTO_RANGES_DETECTION',
|
|
28
|
+
payload: values,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
alert.error(`Auto range picking only available for area more than ${MIN_AREA_POINTS} points`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
27
35
|
return (_jsx(HeaderContainer, { children: _jsx(Formik, { onSubmit: handleRangesPicking, initialValues: initialValues, validationSchema: validationSchema, children: ({ handleSubmit, isValid }) => (_jsxs(_Fragment, { children: [_jsx(Label, { title: "Detect negative:", htmlFor: "lookNegative", style: headerLabelStyle, children: _jsx(FormikCheckBox, { name: "lookNegative" }) }), _jsx(Label, { title: "Min Max Ratio:", style: headerLabelStyle, children: _jsx(FormikNumberInput, { name: "minMaxRatio", style: {
|
|
28
36
|
width: '70px',
|
|
29
37
|
}, step: "0.01", min: 0 }) }), _jsx(Button.Done, { onClick: () => handleSubmit(), style: { margin: '0 10px' }, disabled: !isValid, children: "Auto ranges picking" })] })) }) }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Filters } from 'nmr-processing';
|
|
2
3
|
import { useEffect, useState, memo } from 'react';
|
|
3
|
-
import * as Filters from '../../data/Filters';
|
|
4
4
|
import generateNumbersPowerOfX from '../../data/utilities/generateNumbersPowerOfX';
|
|
5
5
|
import { useDispatch } from '../context/DispatchContext';
|
|
6
6
|
import ActionButtons from '../elements/ActionButtons';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useActiveSpectra(): import("
|
|
1
|
+
export declare function useActiveSpectra(): import("nmr-load-save").ActiveSpectrum[] | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useActiveSpectrum(): import("
|
|
1
|
+
export declare function useActiveSpectrum(): import("nmr-load-save").ActiveSpectrum | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { xGetFromToIndex } from 'ml-spectra-processing';
|
|
2
|
+
import { useChartData } from '../context/ChartContext';
|
|
3
|
+
import useSpectrum from './useSpectrum';
|
|
4
|
+
export const MIN_AREA_POINTS = 5;
|
|
5
|
+
export function useCheckPointsNumberInWindowArea() {
|
|
6
|
+
const state = useChartData();
|
|
7
|
+
const spectrum = useSpectrum(null);
|
|
8
|
+
const { xDomain: [from, to], } = state;
|
|
9
|
+
if (spectrum) {
|
|
10
|
+
const { fromIndex, toIndex } = xGetFromToIndex(spectrum.data.x, {
|
|
11
|
+
from,
|
|
12
|
+
to,
|
|
13
|
+
});
|
|
14
|
+
return toIndex - fromIndex;
|
|
15
|
+
}
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { NMRiumToolBarPreferences } from 'nmr-load-save';
|
|
2
|
+
import { Info1D, Info2D } from 'nmr-processing';
|
|
3
3
|
type SpectrumInfo = Info1D | Info2D;
|
|
4
4
|
interface CheckOptions {
|
|
5
5
|
checkSpectrumType?: boolean;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NmrData1D, NmrData2D } from 'cheminfo-types';
|
|
2
|
+
import { Info1D, Info2D } from 'nmr-processing';
|
|
2
3
|
interface SpectrumWithStatisticsProps {
|
|
3
4
|
info: Info1D | Info2D;
|
|
4
|
-
datum:
|
|
5
|
+
datum: NmrData1D | NmrData2D;
|
|
5
6
|
ftCounter: number;
|
|
6
7
|
fidCounter: number;
|
|
7
8
|
}
|
|
@@ -86,7 +86,7 @@ export default function useExport() {
|
|
|
86
86
|
modal.show(_jsx(SaveAsModal, { name: fileName, onSave: saveHandler }), {
|
|
87
87
|
isBackgroundBlur: false,
|
|
88
88
|
position: positions.TOP_CENTER,
|
|
89
|
-
width:
|
|
89
|
+
width: 500,
|
|
90
90
|
});
|
|
91
91
|
}, [modal, saveHandler, state.data]);
|
|
92
92
|
return {
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { Filter } from 'nmr-processing';
|
|
2
|
+
export declare function useFilter(filterID: string): Filter | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { MultipleSpectraAnalysisPreferences, PanelsPreferences, WorkSpacePanelPreferences } from 'nmr-load-save';
|
|
1
2
|
import { MatrixOptions } from '../../data/types/data1d/MatrixOptions';
|
|
2
|
-
|
|
3
|
-
type Panel = 'spectra' | 'peaks' | 'integrals' | 'zones' | 'ranges' | 'database' | 'multipleSpectraAnalysis' | 'matrixGeneration';
|
|
3
|
+
type Panel = 'spectra' | 'peaks' | 'integrals' | 'zones' | 'ranges' | 'database' | 'multipleSpectraAnalysis' | 'matrixGeneration' | 'prediction';
|
|
4
4
|
export declare function usePanelPreferences<T extends Panel>(panelKey: T, nucleus: string): T extends 'matrixGeneration' ? MatrixOptions : T extends 'multipleSpectraAnalysis' ? MultipleSpectraAnalysisPreferences : WorkSpacePanelPreferences[T];
|
|
5
|
-
export declare function usePanelPreferences<T extends 'database'>(panelKey: T): WorkSpacePanelPreferences[
|
|
5
|
+
export declare function usePanelPreferences<T extends 'database' | 'prediction'>(panelKey: T): WorkSpacePanelPreferences[T];
|
|
6
6
|
export type UsePanelPreferencesByNucleiResult<T extends Panel> = T extends 'spectra' ? PanelsPreferences['spectra'] : T extends 'peaks' ? PanelsPreferences['peaks'] : T extends 'integrals' ? PanelsPreferences['integrals'] : T extends 'zones' ? PanelsPreferences['zones'] : T extends 'ranges' ? PanelsPreferences['ranges'] : T extends 'multipleSpectraAnalysis' ? PanelsPreferences['multipleSpectraAnalysis'] : T extends 'matrixGeneration' ? PanelsPreferences['matrixGeneration'] : void;
|
|
7
7
|
export declare function usePanelPreferencesByNuclei<T extends Panel>(panelKey: T, nuclei: string[]): UsePanelPreferencesByNucleiResult<T>;
|
|
8
8
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import has from 'lodash/has';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
|
+
import { defaultPredictionOptions } from '../../data/PredictionManager';
|
|
3
4
|
import { usePreferences } from '../context/PreferencesContext';
|
|
4
5
|
import { getIntegralDefaultValues, getPeaksDefaultValues, getZoneDefaultValues, getRangeDefaultValues, databaseDefaultValues, getMultipleSpectraAnalysisDefaultValues, getSpectraDefaultValues, } from '../reducer/preferences/panelsPreferencesDefaultValues';
|
|
5
6
|
import { getValue } from '../utility/LocalStorage';
|
|
@@ -20,6 +21,8 @@ function getDefaultPreferences(panelKey, nucleus) {
|
|
|
20
21
|
return databaseDefaultValues;
|
|
21
22
|
case 'multipleSpectraAnalysis':
|
|
22
23
|
return getMultipleSpectraAnalysisDefaultValues(nucleus);
|
|
24
|
+
case 'prediction':
|
|
25
|
+
return defaultPredictionOptions;
|
|
23
26
|
default:
|
|
24
27
|
return {};
|
|
25
28
|
}
|
|
@@ -57,6 +60,7 @@ function getPanelPreferences(preferences, panelKey, nucleus, returnOnlyNucleusPr
|
|
|
57
60
|
case 'matrixGeneration':
|
|
58
61
|
return nucleus ? panelPreferences[nucleus] : {};
|
|
59
62
|
case 'database':
|
|
63
|
+
case 'prediction':
|
|
60
64
|
return panelPreferences;
|
|
61
65
|
default:
|
|
62
66
|
return nucleus
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useVerticalAlign():
|
|
1
|
+
export declare function useVerticalAlign(): any;
|
|
@@ -70,7 +70,7 @@ function DropZone(props) {
|
|
|
70
70
|
const { nmrLoaders: sourceSelector } = preferences.current;
|
|
71
71
|
const { nmriumState, containsNmrium } = await readDropFiles(fileCollection, {
|
|
72
72
|
sourceSelector,
|
|
73
|
-
logger: logger.child({ context: 'nmr-
|
|
73
|
+
logger: logger.child({ context: 'nmr-processing' }),
|
|
74
74
|
});
|
|
75
75
|
if (nmriumState?.settings) {
|
|
76
76
|
dispatchPreferences({
|
|
@@ -95,7 +95,6 @@ function DropZone(props) {
|
|
|
95
95
|
catch (error) {
|
|
96
96
|
alert.error(error.message);
|
|
97
97
|
logger.error(error);
|
|
98
|
-
reportError(error);
|
|
99
98
|
}
|
|
100
99
|
finally {
|
|
101
100
|
dispatch({ type: 'SET_LOADING_FLAG', payload: { isLoading: false } });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { PeaksNucleusPreferences } from 'nmr-load-save';
|
|
2
|
+
import { Peak1D } from 'nmr-processing';
|
|
3
3
|
interface EditPeakShapeModalProps {
|
|
4
4
|
onClose?: (element?: string) => void;
|
|
5
5
|
peak: Peak1D;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface LoadJCAMPModalProps {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
onCloseDialog: () => void;
|
|
3
|
+
isOpen: boolean;
|
|
4
4
|
}
|
|
5
|
-
export
|
|
5
|
+
export declare function LoadJCAMPModal({ onCloseDialog, isOpen }: LoadJCAMPModalProps): import("@emotion/react/jsx-runtime").JSX.Element | undefined;
|
|
6
6
|
export {};
|
|
@@ -1,88 +1,57 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
2
|
/** @jsxImportSource @emotion/react */
|
|
3
|
-
import {
|
|
3
|
+
import { Formik } from 'formik';
|
|
4
4
|
import { readFromWebSource } from 'nmr-load-save';
|
|
5
|
-
import { useRef
|
|
5
|
+
import { useRef } from 'react';
|
|
6
|
+
import { Modal } from 'react-science/ui';
|
|
7
|
+
import * as Yup from 'yup';
|
|
6
8
|
import { useDispatch } from '../context/DispatchContext';
|
|
7
9
|
import Button from '../elements/Button';
|
|
8
|
-
import
|
|
10
|
+
import Label from '../elements/Label';
|
|
11
|
+
import FormikInput from '../elements/formik/FormikInput';
|
|
9
12
|
import { useAlert } from '../elements/popup/Alert/Context';
|
|
10
13
|
import { extractFileMetaFromPath } from '../utility/FileUtility';
|
|
11
|
-
const styles = css `
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-direction: column;
|
|
14
|
-
width: 450px;
|
|
15
|
-
padding: 5px;
|
|
16
|
-
|
|
17
|
-
button:focus {
|
|
18
|
-
outline: none;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.header {
|
|
22
|
-
height: 24px;
|
|
23
|
-
border-bottom: 1px solid #f0f0f0;
|
|
24
|
-
display: flex;
|
|
25
|
-
|
|
26
|
-
span {
|
|
27
|
-
color: #464646;
|
|
28
|
-
font-size: 15px;
|
|
29
|
-
flex: 1;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
button {
|
|
33
|
-
background-color: transparent;
|
|
34
|
-
border: none;
|
|
35
|
-
|
|
36
|
-
svg {
|
|
37
|
-
height: 16px;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.container {
|
|
43
|
-
display: flex;
|
|
44
|
-
margin: 30px 5px;
|
|
45
|
-
align-items: center;
|
|
46
|
-
height: 36px;
|
|
47
|
-
|
|
48
|
-
input {
|
|
49
|
-
padding: 5px;
|
|
50
|
-
border: 1px solid gray;
|
|
51
|
-
border-radius: 5px;
|
|
52
|
-
margin: 2px;
|
|
53
|
-
flex: 10;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
button {
|
|
57
|
-
flex: 2;
|
|
58
|
-
height: 100%;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
`;
|
|
62
14
|
const allowedExtensions = new Set(['dx', 'jdx', 'jcamp']);
|
|
63
|
-
|
|
64
|
-
|
|
15
|
+
const loadFormValidation = Yup.object({
|
|
16
|
+
url: Yup.string().url().required(),
|
|
17
|
+
});
|
|
18
|
+
const labelStyle = {
|
|
19
|
+
wrapper: { display: 'flex', height: '100%', flex: 1 },
|
|
20
|
+
};
|
|
21
|
+
export function LoadJCAMPModal({ onCloseDialog, isOpen }) {
|
|
65
22
|
const dispatch = useDispatch();
|
|
66
23
|
const alert = useAlert();
|
|
67
|
-
const
|
|
68
|
-
|
|
24
|
+
const ref = useRef(null);
|
|
25
|
+
if (!isOpen)
|
|
26
|
+
return;
|
|
27
|
+
async function loadJCAMPHandler({ url }) {
|
|
69
28
|
const { extension } = extractFileMetaFromPath(url);
|
|
70
29
|
if (allowedExtensions.has(extension)) {
|
|
71
|
-
|
|
30
|
+
const hidLoading = await alert.showLoading('Load JCAMP from external URL in progress ...');
|
|
72
31
|
const { pathname, origin } = new URL(url);
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
32
|
+
try {
|
|
33
|
+
const nmriumState = await readFromWebSource({
|
|
34
|
+
entries: [{ relativePath: pathname, baseURL: origin }],
|
|
35
|
+
});
|
|
76
36
|
dispatch({
|
|
77
37
|
type: 'LOAD_DROP_FILES',
|
|
78
38
|
payload: { nmriumState, resetSourceObject: false },
|
|
79
39
|
});
|
|
80
|
-
|
|
81
|
-
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
alert.error(`Failed to load ${url}`);
|
|
43
|
+
}
|
|
44
|
+
finally {
|
|
45
|
+
hidLoading();
|
|
46
|
+
onCloseDialog?.();
|
|
47
|
+
}
|
|
82
48
|
}
|
|
83
49
|
else {
|
|
84
50
|
alert.error('Imported file must be one of those extensions [ .jdx, .dx, .jcamp ] ');
|
|
85
51
|
}
|
|
86
|
-
}
|
|
87
|
-
return (_jsxs(
|
|
52
|
+
}
|
|
53
|
+
return (_jsxs(Modal, { hasCloseButton: true, isOpen: true, onRequestClose: onCloseDialog, children: [_jsx(Modal.Header, { children: "Load JCAMP Dialog" }), _jsx(Modal.Body, { children: _jsx("div", { style: { minWidth: '400px', padding: '1.5em' }, children: _jsx(Formik, { initialValues: { url: '' }, validationSchema: loadFormValidation, onSubmit: loadJCAMPHandler, innerRef: ref, children: _jsx(Label, { title: "URL", style: labelStyle, children: _jsx(FormikInput, { name: "url", type: "string", style: {
|
|
54
|
+
input: { padding: '0.8em', textAlign: 'left', width: '100%' },
|
|
55
|
+
inputWrapper: { width: '100%' },
|
|
56
|
+
}, placeholder: "Enter URL to JCAMP-DX file" }) }) }) }) }), _jsx(Modal.Footer, { children: _jsx("div", { style: { display: 'flex', flexDirection: 'row-reverse' }, children: _jsx(Button.Done, { onClick: () => ref.current?.submitForm(), children: "Load" }) }) })] }));
|
|
88
57
|
}
|
|
@@ -66,16 +66,6 @@ export const ModalStyles = css `
|
|
|
66
66
|
margin: 10px;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
.input {
|
|
70
|
-
font-size: 14px;
|
|
71
|
-
border-radius: 5px;
|
|
72
|
-
border: 1px solid #cccccc;
|
|
73
|
-
padding: 5px;
|
|
74
|
-
width: 100px;
|
|
75
|
-
margin-right: 10px;
|
|
76
|
-
height: initial !important;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
69
|
.close-bt {
|
|
80
70
|
border: none;
|
|
81
71
|
color: red;
|
|
@@ -2,7 +2,8 @@ import { StateMoleculeExtended } from '../../data/molecules/Molecule';
|
|
|
2
2
|
interface MoleculeStructureEditorModalProps {
|
|
3
3
|
onClose?: (element?: string) => void;
|
|
4
4
|
selectedMolecule?: StateMoleculeExtended;
|
|
5
|
+
floatMoleculeOnSave?: boolean;
|
|
5
6
|
}
|
|
6
7
|
declare function MoleculeStructureEditorModal(props: MoleculeStructureEditorModalProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
-
export declare function useMoleculeEditor(): (molecule?: StateMoleculeExtended) => void;
|
|
8
|
+
export declare function useMoleculeEditor(floatMoleculeOnSave?: boolean): (molecule?: StateMoleculeExtended) => void;
|
|
8
9
|
export default MoleculeStructureEditorModal;
|