nmrium 0.38.1 → 0.39.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/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/KeysListenerTracker.js +90 -67
- package/lib/component/EventsTrackers/MouseTracker.d.ts +6 -2
- package/lib/component/EventsTrackers/MouseTracker.js +4 -1
- package/lib/component/NMRium.d.ts +5 -5
- package/lib/component/NMRium.js +15 -16
- package/lib/component/assignment/AssignmentsReducer.d.ts +2 -2
- package/lib/component/context/LoggerContext.js +5 -0
- package/lib/component/context/PreferencesContext.d.ts +10 -8
- 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/FormikError.d.ts +8 -0
- package/lib/component/elements/formik/FormikError.js +22 -0
- 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 +17 -15
- 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 +56 -74
- 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 +53 -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/EditRangeModal.d.ts +7 -6
- package/lib/component/modal/editRange/EditRangeModal.js +33 -13
- 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 +2 -7
- 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/Panels.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/useEditRangeModal.d.ts +1 -1
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +9 -12
- 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 +109 -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/DatabaseActions.js +6 -4
- package/lib/component/reducer/actions/DomainActions.js +3 -0
- 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/IntegralsActions.js +3 -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 +8 -8
- package/lib/component/reducer/actions/ToolsActions.d.ts +2 -2
- package/lib/component/reducer/actions/ToolsActions.js +3 -32
- package/lib/component/reducer/actions/ZonesActions.d.ts +2 -1
- package/lib/component/reducer/actions/ZonesActions.js +3 -6
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +8 -0
- package/lib/component/reducer/helper/ZoomHistoryManager.js +35 -0
- 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/actions/addWorkspace.js +2 -2
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +3 -3
- 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.d.ts +3 -1
- package/lib/data/PredictionManager.js +43 -3
- 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/generateSpectrumFromPublicationString.d.ts +1 -2
- 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 +3 -2
- 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/detectSignal.js +13 -6
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +23 -18
- 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/KeysListenerTracker.js +90 -67
- package/lib-cjs/component/EventsTrackers/MouseTracker.js +4 -1
- package/lib-cjs/component/NMRium.js +12 -13
- package/lib-cjs/component/context/LoggerContext.js +5 -0
- 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/FormikError.js +27 -0
- 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 +16 -14
- package/lib-cjs/component/loader/DropZone.js +1 -2
- package/lib-cjs/component/modal/LoadJCAMPModal.js +81 -75
- 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 +53 -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/EditRangeModal.js +32 -12
- 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 +2 -7
- 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/Panels.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/RangesPanel/hooks/useEditRangeModal.js +9 -12
- 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 +109 -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/DatabaseActions.js +6 -4
- package/lib-cjs/component/reducer/actions/DomainActions.js +3 -0
- 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/IntegralsActions.js +3 -1
- 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 +10 -33
- package/lib-cjs/component/reducer/actions/ToolsActions.js +26 -32
- package/lib-cjs/component/reducer/actions/ZonesActions.js +6 -32
- package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +37 -0
- package/lib-cjs/component/reducer/preferences/actions/addWorkspace.js +2 -2
- 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 +43 -3
- 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/detectSignal.js +13 -6
- package/lib-cjs/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +23 -18
- 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 +29 -29
- 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,188 +0,0 @@
|
|
|
1
|
-
import { FifoLoggerOptions } from 'fifo-logger';
|
|
2
|
-
import { BrukerLoaderSelector, GeneralLoadersSelector } from 'nmr-load-save';
|
|
3
|
-
import { SplitPaneSize } from 'react-science/ui';
|
|
4
|
-
import { BaseFilter } from '../../data/FiltersManager';
|
|
5
|
-
import { AnalysisOptions } from '../../data/data1d/multipleSpectraAnalysis';
|
|
6
|
-
import { Nuclei, Nucleus } from '../../data/types/common/Nucleus';
|
|
7
|
-
import { MatrixOptions } from '../../data/types/data1d/MatrixOptions';
|
|
8
|
-
import { NMRiumGeneralPreferences } from '../../types/NMRiumGeneralPreferences';
|
|
9
|
-
import { NMRiumPanelPreferences } from '../../types/NMRiumPanelPreferences';
|
|
10
|
-
import { NMRiumToolBarPreferences } from '../../types/NMRiumToolBarPreferences';
|
|
11
|
-
interface NucleusFormat {
|
|
12
|
-
name: string;
|
|
13
|
-
ppm: string;
|
|
14
|
-
hz: string;
|
|
15
|
-
}
|
|
16
|
-
export type spectraRendering = 'auto' | 'optimizeSpeed' | 'crispEdges' | 'geometricPrecision';
|
|
17
|
-
export interface GeneralPreferences {
|
|
18
|
-
dimmedSpectraOpacity: number;
|
|
19
|
-
verticalSplitterPosition: SplitPaneSize;
|
|
20
|
-
verticalSplitterCloseThreshold: number;
|
|
21
|
-
spectraRendering: spectraRendering;
|
|
22
|
-
loggingLevel: FifoLoggerOptions['level'];
|
|
23
|
-
}
|
|
24
|
-
interface ColumnPreferences {
|
|
25
|
-
show: boolean;
|
|
26
|
-
format: string;
|
|
27
|
-
}
|
|
28
|
-
interface IntegralsNucleusPreferences {
|
|
29
|
-
absolute: ColumnPreferences;
|
|
30
|
-
relative: ColumnPreferences;
|
|
31
|
-
color: string;
|
|
32
|
-
strokeWidth: number;
|
|
33
|
-
showKind: boolean;
|
|
34
|
-
}
|
|
35
|
-
interface ZonesNucleusPreferences {
|
|
36
|
-
deltaPPM: ColumnPreferences;
|
|
37
|
-
}
|
|
38
|
-
interface ZonesGeneralPanelPreferences {
|
|
39
|
-
absolute: ColumnPreferences;
|
|
40
|
-
relative: ColumnPreferences;
|
|
41
|
-
}
|
|
42
|
-
interface NucleusPreferences<T> {
|
|
43
|
-
nuclei: Partial<Record<Nucleus, T>>;
|
|
44
|
-
}
|
|
45
|
-
interface BasicColumnPreferences {
|
|
46
|
-
visible: boolean;
|
|
47
|
-
label: string;
|
|
48
|
-
}
|
|
49
|
-
export type PredefinedSpectraColumn = 'visible' | 'name' | 'color' | 'solvent';
|
|
50
|
-
export interface PredefinedTableColumn<T> extends BasicColumnPreferences {
|
|
51
|
-
name: T;
|
|
52
|
-
description: string;
|
|
53
|
-
jpath?: string[];
|
|
54
|
-
}
|
|
55
|
-
export interface JpathTableColumn extends BasicColumnPreferences {
|
|
56
|
-
jpath: string[];
|
|
57
|
-
}
|
|
58
|
-
export type SpectraTableColumn = PredefinedTableColumn<PredefinedSpectraColumn> | JpathTableColumn;
|
|
59
|
-
export interface SpectraNucleusPreferences {
|
|
60
|
-
columns: Array<SpectraTableColumn>;
|
|
61
|
-
}
|
|
62
|
-
interface RangesNucleusPreferences {
|
|
63
|
-
from: ColumnPreferences;
|
|
64
|
-
to: ColumnPreferences;
|
|
65
|
-
absolute: ColumnPreferences;
|
|
66
|
-
relative: ColumnPreferences;
|
|
67
|
-
deltaPPM: ColumnPreferences;
|
|
68
|
-
deltaHz: ColumnPreferences;
|
|
69
|
-
coupling: ColumnPreferences;
|
|
70
|
-
jGraphTolerance: number;
|
|
71
|
-
showKind: boolean;
|
|
72
|
-
}
|
|
73
|
-
export interface PeaksNucleusPreferences {
|
|
74
|
-
peakNumber: ColumnPreferences;
|
|
75
|
-
deltaPPM: ColumnPreferences;
|
|
76
|
-
deltaHz: ColumnPreferences;
|
|
77
|
-
peakWidth: ColumnPreferences;
|
|
78
|
-
intensity: ColumnPreferences;
|
|
79
|
-
showKind: boolean;
|
|
80
|
-
fwhm: ColumnPreferences;
|
|
81
|
-
mu: ColumnPreferences;
|
|
82
|
-
}
|
|
83
|
-
export interface DatabasePanelPreferences {
|
|
84
|
-
previewJcamp: boolean;
|
|
85
|
-
showSmiles: boolean;
|
|
86
|
-
showSolvent: boolean;
|
|
87
|
-
showNames: boolean;
|
|
88
|
-
range: ColumnPreferences;
|
|
89
|
-
delta: ColumnPreferences;
|
|
90
|
-
showAssignment: boolean;
|
|
91
|
-
coupling: ColumnPreferences;
|
|
92
|
-
showMultiplicity: boolean;
|
|
93
|
-
color: string;
|
|
94
|
-
marginBottom: number;
|
|
95
|
-
allowSaveAsNMRium: boolean;
|
|
96
|
-
}
|
|
97
|
-
type PredefinedLegend = 'intensity' | 'name';
|
|
98
|
-
export type JpathLegendField = Omit<JpathTableColumn, 'label'>;
|
|
99
|
-
export type PredefinedLegendField = Omit<PredefinedTableColumn<PredefinedLegend>, 'description'>;
|
|
100
|
-
export type legendField = JpathLegendField | PredefinedLegendField;
|
|
101
|
-
export interface AnalysisPreferences extends AnalysisOptions {
|
|
102
|
-
resortSpectra: boolean;
|
|
103
|
-
}
|
|
104
|
-
export interface MultipleSpectraAnalysisPreferences {
|
|
105
|
-
analysisOptions: AnalysisPreferences;
|
|
106
|
-
legendsFields: legendField[];
|
|
107
|
-
}
|
|
108
|
-
export type MultipleSpectraAnalysis = Record<Nuclei, MultipleSpectraAnalysisPreferences> | {};
|
|
109
|
-
export type MatrixGeneration = Record<Nuclei, MatrixOptions> | {};
|
|
110
|
-
export interface WorkSpacePanelPreferences {
|
|
111
|
-
spectra: SpectraNucleusPreferences;
|
|
112
|
-
peaks: PeaksNucleusPreferences;
|
|
113
|
-
integrals: IntegralsNucleusPreferences;
|
|
114
|
-
ranges: RangesNucleusPreferences;
|
|
115
|
-
zones: ZonesNucleusPreferences & ZonesGeneralPanelPreferences;
|
|
116
|
-
database: DatabasePanelPreferences;
|
|
117
|
-
multipleSpectraAnalysis: MultipleSpectraAnalysis;
|
|
118
|
-
matrixGeneration: MatrixGeneration;
|
|
119
|
-
}
|
|
120
|
-
export interface PanelsPreferences {
|
|
121
|
-
spectra: NucleusPreferences<SpectraNucleusPreferences>;
|
|
122
|
-
peaks: NucleusPreferences<PeaksNucleusPreferences>;
|
|
123
|
-
integrals: NucleusPreferences<IntegralsNucleusPreferences>;
|
|
124
|
-
ranges: NucleusPreferences<RangesNucleusPreferences>;
|
|
125
|
-
zones: NucleusPreferences<ZonesNucleusPreferences> & ZonesGeneralPanelPreferences;
|
|
126
|
-
database: DatabasePanelPreferences;
|
|
127
|
-
multipleSpectraAnalysis: MultipleSpectraAnalysis;
|
|
128
|
-
matrixGeneration: MatrixGeneration;
|
|
129
|
-
}
|
|
130
|
-
export interface Formatting {
|
|
131
|
-
nuclei: Record<string, NucleusFormat>;
|
|
132
|
-
panels: Partial<PanelsPreferences>;
|
|
133
|
-
}
|
|
134
|
-
export interface Database {
|
|
135
|
-
key: string;
|
|
136
|
-
label: string;
|
|
137
|
-
url: string;
|
|
138
|
-
enabled: boolean;
|
|
139
|
-
}
|
|
140
|
-
export interface WorkspaceMeta {
|
|
141
|
-
version: number;
|
|
142
|
-
label: string;
|
|
143
|
-
/**
|
|
144
|
-
* boolean indicator to hide/show Workspace
|
|
145
|
-
* @default false
|
|
146
|
-
*/
|
|
147
|
-
visible?: boolean;
|
|
148
|
-
}
|
|
149
|
-
export interface Databases {
|
|
150
|
-
data: Database[];
|
|
151
|
-
defaultDatabase: string;
|
|
152
|
-
}
|
|
153
|
-
export interface LoadersPreferences {
|
|
154
|
-
general: GeneralLoadersSelector;
|
|
155
|
-
bruker: BrukerLoaderSelector;
|
|
156
|
-
}
|
|
157
|
-
export interface InfoBlock {
|
|
158
|
-
visible: boolean;
|
|
159
|
-
fields: JpathTableColumn[];
|
|
160
|
-
}
|
|
161
|
-
export type OnLoadProcessing = Partial<Record<Nucleus, BaseFilter[]>>;
|
|
162
|
-
export interface DisplayPreferences {
|
|
163
|
-
general?: Partial<NMRiumGeneralPreferences>;
|
|
164
|
-
panels?: Partial<NMRiumPanelPreferences>;
|
|
165
|
-
toolBarButtons?: Partial<NMRiumToolBarPreferences>;
|
|
166
|
-
}
|
|
167
|
-
export interface WorkspacePreferences {
|
|
168
|
-
display?: DisplayPreferences;
|
|
169
|
-
general?: GeneralPreferences;
|
|
170
|
-
formatting?: Formatting;
|
|
171
|
-
databases?: Databases;
|
|
172
|
-
nmrLoaders?: LoadersPreferences;
|
|
173
|
-
infoBlock?: InfoBlock;
|
|
174
|
-
onLoadProcessing?: OnLoadProcessing;
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* custom : workspace which come form the component level <NMRium customWorkspaces = {} />
|
|
178
|
-
* predefined : workspace which hardcoded in NMRium
|
|
179
|
-
* user: workspaces which the user create from the general settings
|
|
180
|
-
* component: workspaces which specified at the level of the component `preferences` property
|
|
181
|
-
* nmriumFile: workspaces which is come from the the numrium file
|
|
182
|
-
*
|
|
183
|
-
* */
|
|
184
|
-
export type WorkSpaceSource = 'custom' | 'predefined' | 'user' | 'component' | 'nmriumFile';
|
|
185
|
-
export type InnerWorkspace = WorkspaceMeta & WorkspacePreferences;
|
|
186
|
-
export type CustomWorkspaces = Record<string, InnerWorkspace>;
|
|
187
|
-
export type Workspace = WorkspaceMeta & Required<WorkspacePreferences>;
|
|
188
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/data/Filters.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * as apodization from './data1d/filter1d/apodization';
|
|
2
|
-
export * as baselineCorrection from './data1d/filter1d/baselineCorrection';
|
|
3
|
-
export * as digitalFilter from './data1d/filter1d/digitalFilter';
|
|
4
|
-
export * as equallySpaced from './data1d/filter1d/equallySpaced';
|
|
5
|
-
export * as exclusionZones from './data1d/filter1d/exclusionZones';
|
|
6
|
-
export * as fft from './data1d/filter1d/fft';
|
|
7
|
-
export * as phaseCorrection from './data1d/filter1d/phaseCorrection';
|
|
8
|
-
export * as shiftX from './data1d/filter1d/shiftX';
|
|
9
|
-
export * as signalProcessing from './data1d/filter1d/signalProcessing';
|
|
10
|
-
export * as zeroFilling from './data1d/filter1d/zeroFilling';
|
|
11
|
-
export * as shift2DX from './data2d/filter2d/shiftX';
|
|
12
|
-
export * as shift2DY from './data2d/filter2d/shiftY';
|
package/lib/data/Filters.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * as apodization from './data1d/filter1d/apodization';
|
|
2
|
-
export * as baselineCorrection from './data1d/filter1d/baselineCorrection';
|
|
3
|
-
export * as digitalFilter from './data1d/filter1d/digitalFilter';
|
|
4
|
-
export * as equallySpaced from './data1d/filter1d/equallySpaced';
|
|
5
|
-
export * as exclusionZones from './data1d/filter1d/exclusionZones';
|
|
6
|
-
export * as fft from './data1d/filter1d/fft';
|
|
7
|
-
export * as phaseCorrection from './data1d/filter1d/phaseCorrection';
|
|
8
|
-
export * as shiftX from './data1d/filter1d/shiftX';
|
|
9
|
-
export * as signalProcessing from './data1d/filter1d/signalProcessing';
|
|
10
|
-
export * as zeroFilling from './data1d/filter1d/zeroFilling';
|
|
11
|
-
export * as shift2DX from './data2d/filter2d/shiftX';
|
|
12
|
-
export * as shift2DY from './data2d/filter2d/shiftY';
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Spectrum } from 'nmr-load-save';
|
|
2
|
-
export interface FilterDomainUpdateRules {
|
|
3
|
-
updateYDomain: boolean;
|
|
4
|
-
updateXDomain: boolean;
|
|
5
|
-
}
|
|
6
|
-
export interface BaseFilter {
|
|
7
|
-
name: string;
|
|
8
|
-
value: any;
|
|
9
|
-
isDeleteAllow?: boolean;
|
|
10
|
-
flag?: boolean;
|
|
11
|
-
label?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface Filter extends Required<BaseFilter> {
|
|
14
|
-
id: string;
|
|
15
|
-
}
|
|
16
|
-
interface ApplyFilterOptions {
|
|
17
|
-
forceReapply?: boolean;
|
|
18
|
-
filterIndex?: number | -1;
|
|
19
|
-
}
|
|
20
|
-
declare function applyFilter(datum: Spectrum, filters?: BaseFilter[], options?: ApplyFilterOptions): void;
|
|
21
|
-
declare function lookupForFilter(datum: any, filterName: any): any;
|
|
22
|
-
declare function reapplyFilters(datum: any, filters?: any): void;
|
|
23
|
-
declare function enableFilter(datum: any, id: any, checked: any, filters?: null): void;
|
|
24
|
-
declare function deleteFilter(datum: any, id?: string): void;
|
|
25
|
-
interface AddFilterOptions {
|
|
26
|
-
filterIndex?: number;
|
|
27
|
-
isDeleteAllow?: boolean;
|
|
28
|
-
}
|
|
29
|
-
declare function addFilter(datum: any, filterOptions: any, options?: AddFilterOptions): void;
|
|
30
|
-
export { applyFilter, reapplyFilters, enableFilter, addFilter, deleteFilter, lookupForFilter, };
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
/* eslint-disable import/namespace */
|
|
2
|
-
import { v4 } from '@lukeed/uuid';
|
|
3
|
-
import * as Filters from './Filters';
|
|
4
|
-
import { cloneDatum1D } from './data1d/Spectrum1D/cloneDatum1D';
|
|
5
|
-
import { updateIntegrals } from './data1d/Spectrum1D/integrals/updateIntegrals';
|
|
6
|
-
import { updatePeaks } from './data1d/Spectrum1D/peaks/updatePeaks';
|
|
7
|
-
import { updateRanges } from './data1d/Spectrum1D/ranges/updateRanges';
|
|
8
|
-
import { cloneDatum2D } from './data2d/Spectrum2D/cloneDatum2D';
|
|
9
|
-
import { updateZones } from './data2d/Spectrum2D/zones/updateZones';
|
|
10
|
-
function resetDataToOrigin(datum) {
|
|
11
|
-
datum.data =
|
|
12
|
-
datum.info.dimension === 1
|
|
13
|
-
? cloneDatum1D(datum.originalData)
|
|
14
|
-
: cloneDatum2D(datum.originalData);
|
|
15
|
-
datum.info = { ...datum.originalInfo };
|
|
16
|
-
}
|
|
17
|
-
// update the the part of the data that affected by applying the filters
|
|
18
|
-
function updateData(datum) {
|
|
19
|
-
if (datum.info.dimension === 1) {
|
|
20
|
-
updatePeaks(datum);
|
|
21
|
-
updateRanges(datum);
|
|
22
|
-
updateIntegrals(datum);
|
|
23
|
-
}
|
|
24
|
-
else if (datum.info.dimension === 2) {
|
|
25
|
-
updateZones(datum);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function applyFilter(datum, filters = [], options = {}) {
|
|
29
|
-
const { forceReapply = false, filterIndex } = options;
|
|
30
|
-
let isReduced = false;
|
|
31
|
-
for (let filter of filters) {
|
|
32
|
-
const filterOption = {
|
|
33
|
-
name: filter.name,
|
|
34
|
-
label: Filters[filter.name].name,
|
|
35
|
-
value: filter.value,
|
|
36
|
-
};
|
|
37
|
-
const previousFilter = lookupForFilter(datum, filter.name);
|
|
38
|
-
const isDeleteAllow = 'isDeleteAllow' in filter ? filter.isDeleteAllow : true;
|
|
39
|
-
if (previousFilter) {
|
|
40
|
-
// eslint-disable-next-line unicorn/no-array-reduce
|
|
41
|
-
const reduceResult = Filters[filter.name].reduce(previousFilter.value, filterOption.value);
|
|
42
|
-
if (reduceResult.once) {
|
|
43
|
-
if (!isReduced) {
|
|
44
|
-
isReduced = true;
|
|
45
|
-
}
|
|
46
|
-
if (reduceResult.reduce != null && reduceResult.reduce !== undefined) {
|
|
47
|
-
replaceFilter(datum, previousFilter.id, reduceResult.reduce);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
addFilter(datum, filterOption, { isDeleteAllow, filterIndex });
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
addFilter(datum, filterOption, { isDeleteAllow, filterIndex });
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
if (forceReapply) {
|
|
59
|
-
reapplyFilters(datum);
|
|
60
|
-
}
|
|
61
|
-
else if (isReduced) {
|
|
62
|
-
if (filters.length === 1 && isLastFilter(datum, filters[0].name)) {
|
|
63
|
-
Filters[filters[0].name].apply(datum, filters[0].value);
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
reapplyFilters(datum);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
for (let filter of filters) {
|
|
71
|
-
Filters[filter.name].apply(datum, filter.value);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
updateData(datum);
|
|
75
|
-
}
|
|
76
|
-
function isLastFilter(datum, id) {
|
|
77
|
-
const index = datum.filters.findIndex((f) => f.name === id);
|
|
78
|
-
if (datum.filters.length === index + 1) {
|
|
79
|
-
return true;
|
|
80
|
-
}
|
|
81
|
-
return false;
|
|
82
|
-
}
|
|
83
|
-
function lookupForFilter(datum, filterName) {
|
|
84
|
-
return datum.filters.find((f) => f.name === filterName);
|
|
85
|
-
}
|
|
86
|
-
function reapplyFilters(datum, filters = null) {
|
|
87
|
-
const _filters = filters || datum.filters;
|
|
88
|
-
enableFilter(datum, null, null, _filters);
|
|
89
|
-
}
|
|
90
|
-
// id filter id
|
|
91
|
-
function enableFilter(datum, id, checked, filters = null) {
|
|
92
|
-
datum.filters = datum.filters.slice(0);
|
|
93
|
-
if (id) {
|
|
94
|
-
datum.filters = datum.filters.map((filter) => {
|
|
95
|
-
return { ...filter, flag: filter.id === id ? checked : filter.flag };
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
resetDataToOrigin(datum);
|
|
99
|
-
const _filters = filters || datum.filters;
|
|
100
|
-
for (let filterIndex in _filters) {
|
|
101
|
-
const filter = datum.filters[filterIndex];
|
|
102
|
-
datum.filters[filterIndex] = {
|
|
103
|
-
...datum.filters[filterIndex],
|
|
104
|
-
error: null,
|
|
105
|
-
};
|
|
106
|
-
if (filter.flag) {
|
|
107
|
-
try {
|
|
108
|
-
Filters[filter.name].apply(datum, filter.value);
|
|
109
|
-
}
|
|
110
|
-
catch (error) {
|
|
111
|
-
datum.filters[filterIndex] = {
|
|
112
|
-
...datum.filters[filterIndex],
|
|
113
|
-
error: error.message,
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
updateData(datum);
|
|
119
|
-
}
|
|
120
|
-
function deleteFilter(datum, id) {
|
|
121
|
-
// delete the specified filter otherwise delete all filters where isDeleteAllow is true
|
|
122
|
-
datum.filters = datum.filters
|
|
123
|
-
.slice(0)
|
|
124
|
-
.filter((filter) => (id ? filter.id !== id : !filter.isDeleteAllow));
|
|
125
|
-
resetDataToOrigin(datum);
|
|
126
|
-
for (let filterIndex in datum.filters) {
|
|
127
|
-
const filter = datum.filters[filterIndex];
|
|
128
|
-
datum.filters[filterIndex] = {
|
|
129
|
-
...datum.filters[filterIndex],
|
|
130
|
-
error: null,
|
|
131
|
-
};
|
|
132
|
-
if (filter.flag) {
|
|
133
|
-
try {
|
|
134
|
-
Filters[filter.name].apply(datum, filter.value);
|
|
135
|
-
}
|
|
136
|
-
catch (error) {
|
|
137
|
-
datum.filters[filterIndex] = {
|
|
138
|
-
...datum.filters[filterIndex],
|
|
139
|
-
error: error.message,
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
updateData(datum);
|
|
145
|
-
}
|
|
146
|
-
function addFilter(datum, filterOptions, options = {}) {
|
|
147
|
-
const { filterIndex, isDeleteAllow = true } = options;
|
|
148
|
-
const id = v4();
|
|
149
|
-
const filter = {
|
|
150
|
-
...filterOptions,
|
|
151
|
-
id,
|
|
152
|
-
flag: true,
|
|
153
|
-
isDeleteAllow,
|
|
154
|
-
};
|
|
155
|
-
if (typeof filterIndex === 'number' && filterIndex !== -1) {
|
|
156
|
-
datum.filters = [
|
|
157
|
-
...datum.filters.slice(0, filterIndex + 1),
|
|
158
|
-
filter,
|
|
159
|
-
...datum.filters.slice(filterIndex + 1),
|
|
160
|
-
];
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
datum.filters.push(filter);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
function replaceFilter(datum, filterID, value) {
|
|
167
|
-
// datum.filters = datum.filters.slice(0);
|
|
168
|
-
const index = datum.filters.findIndex((f) => f.id === filterID);
|
|
169
|
-
delete datum.filters[index].isSnapshot;
|
|
170
|
-
datum.filters[index] = {
|
|
171
|
-
...datum.filters[index],
|
|
172
|
-
value,
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
export { applyFilter, reapplyFilters, enableFilter, addFilter, deleteFilter, lookupForFilter, };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SignalKindsToInclude } from '../../../constants/SignalsKinds';
|
|
2
|
-
/**
|
|
3
|
-
* check whether integral based on its kind can be included in another operation or not
|
|
4
|
-
* @param integral integral
|
|
5
|
-
* @returns {boolean}
|
|
6
|
-
*/
|
|
7
|
-
export function checkIntegralKind(integral) {
|
|
8
|
-
return SignalKindsToInclude.includes(integral.kind);
|
|
9
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Integral, Spectrum1D } from 'nmr-load-save';
|
|
2
|
-
import { ShiftTarget } from '../../../types/common/MapOptions';
|
|
3
|
-
export declare function mapIntegrals(integrals: Integral[], spectrum: Spectrum1D, shiftTarget?: ShiftTarget): {
|
|
4
|
-
absolute: number;
|
|
5
|
-
originFrom: number;
|
|
6
|
-
originTo: number;
|
|
7
|
-
from: number;
|
|
8
|
-
to: number;
|
|
9
|
-
id: string;
|
|
10
|
-
integral?: number | undefined;
|
|
11
|
-
kind: string;
|
|
12
|
-
}[];
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { v4 } from '@lukeed/uuid';
|
|
2
|
-
import { xyIntegration } from 'ml-spectra-processing';
|
|
3
|
-
import { getShiftX } from '../getShiftX';
|
|
4
|
-
function getRange(integral, shiftTarget, shift) {
|
|
5
|
-
const { originFrom, originTo, from, to } = integral;
|
|
6
|
-
if (shiftTarget === 'origin') {
|
|
7
|
-
return {
|
|
8
|
-
originFrom: from - shift,
|
|
9
|
-
originTo: to - shift,
|
|
10
|
-
from,
|
|
11
|
-
to,
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
return {
|
|
16
|
-
originFrom,
|
|
17
|
-
originTo,
|
|
18
|
-
from: originFrom + shift,
|
|
19
|
-
to: originTo + shift,
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export function mapIntegrals(integrals, spectrum, shiftTarget = 'origin') {
|
|
24
|
-
const { x, re } = spectrum.data;
|
|
25
|
-
const shiftX = getShiftX(spectrum);
|
|
26
|
-
return integrals.map((integral) => {
|
|
27
|
-
const integralBoundary = getRange(integral, shiftTarget, shiftX);
|
|
28
|
-
const absolute = xyIntegration({ x, y: re }, { from: integralBoundary.from, to: integralBoundary.to, reverse: true });
|
|
29
|
-
return {
|
|
30
|
-
...integral,
|
|
31
|
-
id: integral.id || v4(),
|
|
32
|
-
...integralBoundary,
|
|
33
|
-
absolute,
|
|
34
|
-
};
|
|
35
|
-
});
|
|
36
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { mapIntegrals } from './mapIntegrals';
|
|
2
|
-
import { updateIntegralsRelativeValues } from './updateIntegralsRelativeValues';
|
|
3
|
-
export function updateIntegrals(spectrum) {
|
|
4
|
-
spectrum.integrals.values = mapIntegrals(spectrum.integrals.values, spectrum, 'current');
|
|
5
|
-
updateIntegralsRelativeValues(spectrum, true);
|
|
6
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { checkIntegralKind } from './checkIntegralKind';
|
|
2
|
-
import { updateRelatives } from './updateRelatives';
|
|
3
|
-
export function updateIntegralsRelativeValues(spectrum, forceCalculateIntegral = false) {
|
|
4
|
-
updateRelatives(spectrum.integrals, 'integral', checkIntegralKind, forceCalculateIntegral);
|
|
5
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { Integral, Range, Integrals, Ranges } from 'nmr-load-save';
|
|
2
|
-
export declare function updateRelatives<Type extends Integral | Range>(data: Type extends Integral ? Integrals : Ranges, key: keyof Type, check: (value: Type) => boolean, forceCalculateIntegral?: boolean): void;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { getSum } from '../../../utilities/getSum';
|
|
2
|
-
export function updateRelatives(data, key, check, forceCalculateIntegral = false) {
|
|
3
|
-
const { values, options } = data;
|
|
4
|
-
const currentSum = getSum(values, 'absolute', check);
|
|
5
|
-
let factor = 0;
|
|
6
|
-
if (options?.sum) {
|
|
7
|
-
if (options.isSumConstant || forceCalculateIntegral) {
|
|
8
|
-
factor = currentSum > 0 ? options.sum / currentSum : 0;
|
|
9
|
-
}
|
|
10
|
-
else if (values?.[0]) {
|
|
11
|
-
const item = values[0];
|
|
12
|
-
factor = (item[key] || options.sum) / item.absolute;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
data.values = values.map((value) => {
|
|
16
|
-
return {
|
|
17
|
-
...value,
|
|
18
|
-
...(check(value) && {
|
|
19
|
-
[key]: value.absolute * factor,
|
|
20
|
-
}),
|
|
21
|
-
};
|
|
22
|
-
});
|
|
23
|
-
if (!options.isSumConstant && !forceCalculateIntegral) {
|
|
24
|
-
options.sum = getSum(values, key, check);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { v4 } from '@lukeed/uuid';
|
|
2
|
-
import { getShiftX } from '../getShiftX';
|
|
3
|
-
import { getSpectrumErrorValue } from '../getSpectrumErrorValue';
|
|
4
|
-
function isExists(peak, spectrum, error) {
|
|
5
|
-
// check if the Peak is already exists
|
|
6
|
-
for (const { x } of spectrum.peaks?.values || []) {
|
|
7
|
-
if (Math.abs(peak.x - x) < error) {
|
|
8
|
-
return true;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
function getPeakDelta(peak, shiftTarget, shift) {
|
|
14
|
-
const { originalX = 0, x } = peak;
|
|
15
|
-
if (shiftTarget === 'origin') {
|
|
16
|
-
return {
|
|
17
|
-
originalX: x - shift,
|
|
18
|
-
x,
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
return {
|
|
23
|
-
originalX,
|
|
24
|
-
x: originalX + shift,
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
export function mapPeaks(peaks, spectrum, options = {}) {
|
|
29
|
-
const { checkIsExisting = true, shiftTarget = 'origin' } = options;
|
|
30
|
-
const shiftX = getShiftX(spectrum);
|
|
31
|
-
const error = getSpectrumErrorValue(spectrum);
|
|
32
|
-
let newPeaks = [];
|
|
33
|
-
for (const peak of peaks) {
|
|
34
|
-
const peakDelta = getPeakDelta(peak, shiftTarget, shiftX);
|
|
35
|
-
if (!checkIsExisting ||
|
|
36
|
-
(checkIsExisting && !isExists(peak, spectrum, error))) {
|
|
37
|
-
newPeaks.push({
|
|
38
|
-
...peak,
|
|
39
|
-
id: peak?.id || v4(),
|
|
40
|
-
...peakDelta,
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return newPeaks;
|
|
45
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Range, Spectrum1D } from 'nmr-load-save';
|
|
2
|
-
import { NMRRange } from 'nmr-processing';
|
|
3
|
-
import { MapOptions } from '../../../types/common/MapOptions';
|
|
4
|
-
export declare function mapRanges(ranges: Range[] | NMRRange[], spectrum: Spectrum1D, options?: MapOptions): any[];
|