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
|
@@ -93,7 +93,7 @@ function getFillStyle(props) {
|
|
|
93
93
|
}
|
|
94
94
|
const styles = {
|
|
95
95
|
button: (props) => {
|
|
96
|
-
const { size, backgroundColor: { hover, active }, color, borderRadius, } = props;
|
|
96
|
+
const { size, backgroundColor: { hover, active }, color, borderRadius, element, } = props;
|
|
97
97
|
const basic = (0, react_1.css) `
|
|
98
98
|
display: flex;
|
|
99
99
|
flex-direction: row;
|
|
@@ -105,17 +105,18 @@ const styles = {
|
|
|
105
105
|
}
|
|
106
106
|
`;
|
|
107
107
|
const fillStyle = getFillStyle(props);
|
|
108
|
-
const
|
|
109
|
-
&:disabled
|
|
108
|
+
const basicDisabledStyle = (0, react_1.css) `
|
|
109
|
+
&:disabled,
|
|
110
|
+
&.disabled {
|
|
110
111
|
opacity: 0.25;
|
|
111
112
|
}
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
`;
|
|
114
|
+
const colorStyle = (0, react_1.css) `
|
|
115
|
+
&:not(${element === 'button' ? '[disabled]' : '.disabled'}):hover {
|
|
114
116
|
background-color: ${hover};
|
|
115
117
|
color: ${color.hover};
|
|
116
118
|
}
|
|
117
|
-
|
|
118
|
-
&:not([disabled]):active {
|
|
119
|
+
&:not(${element === 'button' ? '[disabled]' : '.disabled'}):active {
|
|
119
120
|
background-color: ${active || hover};
|
|
120
121
|
color: ${color?.active || color.hover};
|
|
121
122
|
}
|
|
@@ -124,6 +125,7 @@ const styles = {
|
|
|
124
125
|
basic,
|
|
125
126
|
sizeConfig[size],
|
|
126
127
|
fillStyle,
|
|
128
|
+
basicDisabledStyle,
|
|
127
129
|
colorStyle,
|
|
128
130
|
{ borderRadius },
|
|
129
131
|
]);
|
|
@@ -163,8 +165,11 @@ function Button(props) {
|
|
|
163
165
|
base,
|
|
164
166
|
hover: shade,
|
|
165
167
|
active: tint,
|
|
166
|
-
}, borderColor = 'transparent', fill = 'solid', borderRadius, style = {}, wrapperStyle = {}, toolTip, tooltipOrientation = 'vertical', wrapperClassName, ...restProps } = buttonProps;
|
|
167
|
-
|
|
168
|
+
}, borderColor = 'transparent', fill = 'solid', borderRadius, style = {}, wrapperStyle = {}, toolTip, tooltipOrientation = 'vertical', wrapperClassName = '', as: Wrapper = 'button', disabled = false, className = '', ...restProps } = buttonProps;
|
|
169
|
+
const isDivDisabled = Wrapper === 'div' && disabled;
|
|
170
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { position: 'relative', ...wrapperStyle }, className: wrapperClassName, children: [(0, jsx_runtime_1.jsx)(Wrapper, { ...(Wrapper === 'button' && { type: 'button', disabled }), onClick: Wrapper === 'button' || (Wrapper === 'div' && !disabled)
|
|
171
|
+
? onClick
|
|
172
|
+
: (e) => e.stopPropagation(), css: [
|
|
168
173
|
styles.button({
|
|
169
174
|
size,
|
|
170
175
|
backgroundColor,
|
|
@@ -172,29 +177,15 @@ function Button(props) {
|
|
|
172
177
|
borderColor,
|
|
173
178
|
fill,
|
|
174
179
|
borderRadius,
|
|
180
|
+
element: Wrapper,
|
|
175
181
|
}),
|
|
176
182
|
style,
|
|
177
|
-
], ...restProps, children: (0, jsx_runtime_1.jsx)("span", { style: { flex: 1, pointerEvents: 'none' }, children: props.children }) }), toolTip && ((0, jsx_runtime_1.jsx)("div", { className: "content", css: toolTipStyle(tooltipOrientation), children: (0, jsx_runtime_1.jsx)("span", { style: {
|
|
183
|
+
], className: `${className} ${isDivDisabled ? 'disabled' : ''}`, ...restProps, children: (0, jsx_runtime_1.jsx)("span", { style: { flex: 1, pointerEvents: 'none' }, children: props.children }) }), toolTip && ((0, jsx_runtime_1.jsx)("div", { className: "content", css: toolTipStyle(tooltipOrientation), children: (0, jsx_runtime_1.jsx)("span", { style: {
|
|
178
184
|
display: 'flex',
|
|
179
185
|
margin: 'auto',
|
|
180
186
|
justifyContent: 'center',
|
|
181
187
|
}, children: toolTip }) }))] }));
|
|
182
188
|
}
|
|
183
|
-
// function ThemeButton(props: { colorTheme: ColorTheme } & ButtonProps) {
|
|
184
|
-
// const { colorTheme, ...buttonProps } = props;
|
|
185
|
-
// const { base, shade, tint } = colorPalettes[colorTheme];
|
|
186
|
-
// const {
|
|
187
|
-
// color = { base: shade, hover: 'white' },
|
|
188
|
-
// backgroundColor = {
|
|
189
|
-
// base,
|
|
190
|
-
// hover: shade,
|
|
191
|
-
// active: tint,
|
|
192
|
-
// },
|
|
193
|
-
// fill = 'solid',
|
|
194
|
-
// ...restProps
|
|
195
|
-
// } = buttonProps;
|
|
196
|
-
// return <Button {...{ fill, ...restProps, backgroundColor, color }} />;
|
|
197
|
-
// }
|
|
198
189
|
Button.Done = function ButtonDone(props) {
|
|
199
190
|
return (0, jsx_runtime_1.jsx)(Button, { ...props, theme: "success" });
|
|
200
191
|
};
|
|
@@ -66,7 +66,7 @@ const style = (0, react_1.css) `
|
|
|
66
66
|
}
|
|
67
67
|
`;
|
|
68
68
|
function ColorInput(props) {
|
|
69
|
-
const {
|
|
69
|
+
const { onColorChange = () => null, name, value = '#000000' } = props;
|
|
70
70
|
const [displayColorPicker, showColorPicker] = (0, react_2.useState)(false);
|
|
71
71
|
const [selectedColor, setColor] = (0, react_2.useState)(value);
|
|
72
72
|
(0, react_2.useEffect)(() => {
|
|
@@ -83,6 +83,6 @@ function ColorInput(props) {
|
|
|
83
83
|
setColor(hex);
|
|
84
84
|
onColorChange({ ...colorEvent, hex, name });
|
|
85
85
|
}, [name, onColorChange]);
|
|
86
|
-
return ((0, jsx_runtime_1.jsxs)("div", { css: style, children: [(0, jsx_runtime_1.
|
|
86
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: style, children: [(0, jsx_runtime_1.jsxs)("div", { className: "swatch", onClick: handleClick, children: [(0, jsx_runtime_1.jsx)("div", { className: "color", style: { backgroundColor: selectedColor } }), (0, jsx_runtime_1.jsx)("input", { type: "hidden", value: selectedColor, name: name })] }), displayColorPicker ? ((0, jsx_runtime_1.jsxs)("div", { className: "color-popover", children: [(0, jsx_runtime_1.jsx)("div", { className: "cover", onClick: handleClose }), (0, jsx_runtime_1.jsx)(ui_1.ColorPicker, { color: { hex: selectedColor }, onChangeComplete: handleOnColorChanged })] })) : null] }));
|
|
87
87
|
}
|
|
88
88
|
exports.default = (0, react_2.memo)(ColorInput);
|
|
@@ -57,14 +57,17 @@ const EditableColumn = (0, react_1.forwardRef)(function EditableColumn(props, re
|
|
|
57
57
|
}, className: "editable-column-input", onDoubleClick: startEditHandler, children: [!enabled && ((0, jsx_runtime_1.jsx)("span", { style: {
|
|
58
58
|
display: 'table-cell',
|
|
59
59
|
verticalAlign: 'middle',
|
|
60
|
-
width: '
|
|
60
|
+
width: '100%',
|
|
61
61
|
...(textOverFlowEllipses
|
|
62
62
|
? { textOverflow: 'ellipsis', overflow: 'hidden' }
|
|
63
63
|
: {}),
|
|
64
64
|
}, children: value })), enabled && ((0, jsx_runtime_1.jsx)("div", { style: { display: 'table-cell', verticalAlign: 'middle' }, children: (0, jsx_runtime_1.jsx)(Input_1.default, { style: {
|
|
65
65
|
inputWrapper: {
|
|
66
|
-
width: '100%',
|
|
67
66
|
...(!isValid && { borderColor: 'red' }),
|
|
67
|
+
width: '100%',
|
|
68
|
+
},
|
|
69
|
+
input: {
|
|
70
|
+
width: '100%',
|
|
68
71
|
},
|
|
69
72
|
}, enableAutoSelect: true, className: "editable-column", value: value, type: type, onKeyUp: editHandler, ...InputProps }) }))] }));
|
|
70
73
|
});
|
|
@@ -13,8 +13,6 @@ const styles = {
|
|
|
13
13
|
userSelect: 'none',
|
|
14
14
|
},
|
|
15
15
|
inputWrapper: {
|
|
16
|
-
height: '100%',
|
|
17
|
-
width: '100px',
|
|
18
16
|
borderRadius: '5px',
|
|
19
17
|
borderWidth: '0.55px',
|
|
20
18
|
borderColor: '#c7c7c7',
|
|
@@ -62,7 +60,7 @@ const Input = (0, react_1.forwardRef)((props, ref) => {
|
|
|
62
60
|
input: {},
|
|
63
61
|
inputWrapper: {},
|
|
64
62
|
}, onChange = () => null, debounceTime = 0, onKeyDown = () => null, onKeyUp = () => null, checkValue = () => true, type = 'text', enableAutoSelect = false, className, format = () => identity, onBlur = () => null, onFocus = () => null, renderIcon = null, canClear = false, nullable = false, onClear, datalist = [], ...otherProps } = props;
|
|
65
|
-
const [val, setVal] = (0, react_1.useState)(value);
|
|
63
|
+
const [val, setVal] = (0, react_1.useState)(value ?? '');
|
|
66
64
|
const valueRef = (0, react_1.useRef)(value);
|
|
67
65
|
const localRef = (0, react_1.useRef)();
|
|
68
66
|
const combinedRef = (0, useCombinedRefs_1.default)([ref, localRef]);
|
|
@@ -70,7 +68,7 @@ const Input = (0, react_1.forwardRef)((props, ref) => {
|
|
|
70
68
|
onChange?.(val);
|
|
71
69
|
}, debounceTime), [debounceTime, onChange]);
|
|
72
70
|
(0, react_1.useEffect)(() => {
|
|
73
|
-
setVal(value);
|
|
71
|
+
setVal((prevVal) => (prevVal !== value ? value ?? '' : prevVal));
|
|
74
72
|
}, [value]);
|
|
75
73
|
(0, react_1.useEffect)(() => {
|
|
76
74
|
if (enableAutoSelect) {
|
|
@@ -8,13 +8,13 @@ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
|
8
8
|
const react_1 = require("@emotion/react");
|
|
9
9
|
const Button_1 = __importDefault(require("./Button"));
|
|
10
10
|
function Label(props) {
|
|
11
|
-
const { title, shortTitle, className = '', children, style, description, ...otherProps } = props;
|
|
11
|
+
const { title, shortTitle, className = '', children, style, description, renderTitle, ...otherProps } = props;
|
|
12
12
|
return ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex', alignItems: 'center', ...style?.container }, children: [(0, jsx_runtime_1.jsxs)("label", { className: className, style: {
|
|
13
13
|
fontSize: '12px',
|
|
14
14
|
color: '#232323',
|
|
15
15
|
paddingRight: '10px',
|
|
16
16
|
width: 'max-content',
|
|
17
17
|
...style?.label,
|
|
18
|
-
}, ...otherProps, children: [(0, jsx_runtime_1.jsx)("span", { className: shortTitle ? 'large-label' : '', children: title }), shortTitle && ((0, jsx_runtime_1.jsx)("span", { className: "small-label", css: (0, react_1.css)({ display: 'none' }), children: shortTitle })), description && ((0, jsx_runtime_1.jsx)(Button_1.default.Info, { toolTip: description, tooltipOrientation: "horizontal", style: { display: 'inline-block' }, backgroundColor: { hover: 'white', base: 'white' }, color: { base: 'gray', hover: 'black' } }))] }), (0, jsx_runtime_1.jsx)("div", { style: style?.wrapper, children: children })] }));
|
|
18
|
+
}, ...otherProps, children: [renderTitle ? (renderTitle(title)) : ((0, jsx_runtime_1.jsx)("span", { className: shortTitle ? 'large-label' : '', children: title })), shortTitle && ((0, jsx_runtime_1.jsx)("span", { className: "small-label", css: (0, react_1.css)({ display: 'none' }), children: shortTitle })), description && ((0, jsx_runtime_1.jsx)(Button_1.default.Info, { toolTip: description, tooltipOrientation: "horizontal", style: { display: 'inline-block' }, backgroundColor: { hover: 'white', base: 'white' }, color: { base: 'gray', hover: 'black' } }))] }), (0, jsx_runtime_1.jsx)("div", { style: style?.wrapper, children: children })] }));
|
|
19
19
|
}
|
|
20
20
|
exports.default = Label;
|
|
@@ -34,27 +34,25 @@ const inputStyle = (0, react_1.css) `
|
|
|
34
34
|
background-color: gray;
|
|
35
35
|
}
|
|
36
36
|
`;
|
|
37
|
+
function isValidMf(mf) {
|
|
38
|
+
if (mf.trim().length === 0) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
(0, getAtomsFromMF_1.default)(mf);
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
37
49
|
function MolecularFormulaInput({ onSave = () => null, previousMF, }) {
|
|
38
50
|
const [mf, setMF] = (0, react_2.useState)('');
|
|
39
51
|
const [isValidMF, setIsValidMF] = (0, react_2.useState)(true);
|
|
40
52
|
const [hasChanged, setHasChanged] = (0, react_2.useState)(false);
|
|
41
|
-
const checkMF = (0, react_2.useCallback)((mf) => {
|
|
42
|
-
if (mf.trim().length === 0) {
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
try {
|
|
46
|
-
(0, getAtomsFromMF_1.default)(mf);
|
|
47
|
-
return true;
|
|
48
|
-
}
|
|
49
|
-
catch (error) {
|
|
50
|
-
// TODO: handle error.
|
|
51
|
-
reportError(error);
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
}, []);
|
|
55
53
|
const onChangeHandler = (0, react_2.useCallback)((e) => {
|
|
56
54
|
setHasChanged(true);
|
|
57
|
-
if (
|
|
55
|
+
if (isValidMf(e.target.value)) {
|
|
58
56
|
setIsValidMF(true);
|
|
59
57
|
setMF(e.target.value);
|
|
60
58
|
}
|
|
@@ -62,7 +60,7 @@ function MolecularFormulaInput({ onSave = () => null, previousMF, }) {
|
|
|
62
60
|
setIsValidMF(false);
|
|
63
61
|
setMF('');
|
|
64
62
|
}
|
|
65
|
-
}, [
|
|
63
|
+
}, []);
|
|
66
64
|
const onSaveHandler = (0, react_2.useCallback)(() => {
|
|
67
65
|
onSave(hasChanged ? mf.trim() : previousMF);
|
|
68
66
|
}, [hasChanged, mf, onSave, previousMF]);
|
|
@@ -6,12 +6,9 @@ const react_1 = require("@emotion/react");
|
|
|
6
6
|
const react_2 = require("react");
|
|
7
7
|
const fa_1 = require("react-icons/fa");
|
|
8
8
|
const react_use_1 = require("react-use");
|
|
9
|
-
function Arrow({ direction, onClick }) {
|
|
9
|
+
function Arrow({ direction, onClick, style = {} }) {
|
|
10
10
|
return ((0, jsx_runtime_1.jsx)("div", { onClick: onClick, css: (0, react_1.css) `
|
|
11
|
-
display: flex;
|
|
12
|
-
position: absolute;
|
|
13
|
-
top: 50%;
|
|
14
|
-
${direction === 'right' ? `right: 25px` : `left: 25px`};
|
|
11
|
+
display: inline-flex;
|
|
15
12
|
height: 40px;
|
|
16
13
|
width: 40px;
|
|
17
14
|
justify-content: center;
|
|
@@ -22,6 +19,7 @@ function Arrow({ direction, onClick }) {
|
|
|
22
19
|
border: none;
|
|
23
20
|
transition: transform ease-in 0.1s;
|
|
24
21
|
background-color: #f7f7f7;
|
|
22
|
+
pointer-events: auto;
|
|
25
23
|
|
|
26
24
|
&:hover {
|
|
27
25
|
transform: scale(1.1);
|
|
@@ -36,10 +34,11 @@ function Arrow({ direction, onClick }) {
|
|
|
36
34
|
outline: 0;
|
|
37
35
|
}
|
|
38
36
|
}
|
|
39
|
-
`, children: (0, jsx_runtime_1.jsx)(fa_1.FaAngleLeft, { style: { transform: `scaleX(${direction === 'right' ? '-1' : '1'})` } }) }));
|
|
37
|
+
`, style: style, children: (0, jsx_runtime_1.jsx)(fa_1.FaAngleLeft, { style: { transform: `scaleX(${direction === 'right' ? '-1' : '1'})` } }) }));
|
|
40
38
|
}
|
|
41
39
|
const transition = 0.45;
|
|
42
|
-
function NextPrev(
|
|
40
|
+
function NextPrev(props) {
|
|
41
|
+
const { children, loop = false, defaultIndex = 0, onChange = () => null, style = {}, } = props;
|
|
43
42
|
const [ref, { width }] = (0, react_use_1.useMeasure)();
|
|
44
43
|
const [activeIndex, setActiveIndex] = (0, react_2.useState)(0);
|
|
45
44
|
(0, react_2.useEffect)(() => {
|
|
@@ -100,6 +99,25 @@ function NextPrev({ children, loop = false, defaultIndex = 0, onChange = () => n
|
|
|
100
99
|
height: 100%;
|
|
101
100
|
width: ${slidersWidth}px;
|
|
102
101
|
display: flex;
|
|
103
|
-
`, children: Sliders }),
|
|
102
|
+
`, children: Sliders }), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
103
|
+
position: 'absolute',
|
|
104
|
+
top: '50%',
|
|
105
|
+
padding: '0 10px',
|
|
106
|
+
justifyContent: 'space-between',
|
|
107
|
+
width: '100%',
|
|
108
|
+
display: 'flex',
|
|
109
|
+
pointerEvents: 'none',
|
|
110
|
+
...style?.arrowContainer,
|
|
111
|
+
}, children: [(0, jsx_runtime_1.jsx)(Arrow, { direction: "left", onClick: prevHandler, style: {
|
|
112
|
+
...(activeIndex === 0 && {
|
|
113
|
+
visibility: 'hidden',
|
|
114
|
+
pointerEvents: 'none',
|
|
115
|
+
}),
|
|
116
|
+
} }), (0, jsx_runtime_1.jsx)(Arrow, { direction: "right", onClick: nextHandler, style: {
|
|
117
|
+
...((!Sliders || activeIndex === Sliders.length - 1) && {
|
|
118
|
+
visibility: 'hidden',
|
|
119
|
+
pointerEvents: 'none',
|
|
120
|
+
}),
|
|
121
|
+
} })] })] }));
|
|
104
122
|
}
|
|
105
123
|
exports.default = (0, react_2.memo)(NextPrev);
|
|
@@ -9,7 +9,7 @@ const inputStyle = {
|
|
|
9
9
|
border: '0.55px solid #c7c7c7',
|
|
10
10
|
textAlign: 'center',
|
|
11
11
|
};
|
|
12
|
-
const NumberInput = (0, react_1.forwardRef)(({ name, value: valueProp, style = {}, onChange, pattern = '^\\d*.\\d*$', step = 'any', min = 'any', max = 'any', }, ref) => {
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)("input", { ref: ref, name: name, style: { ...inputStyle, ...style }, type: "number", pattern: pattern, value: valueProp, step: step, onChange: onChange, min: min, max: max }));
|
|
12
|
+
const NumberInput = (0, react_1.forwardRef)(({ name, value: valueProp, style = {}, onChange, pattern = '^\\d*.\\d*$', step = 'any', min = 'any', max = 'any', ...otherProps }, ref) => {
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)("input", { ref: ref, name: name, style: { ...inputStyle, ...style }, type: "number", pattern: pattern, value: valueProp, step: step, onChange: onChange, min: min, max: max, ...otherProps }));
|
|
14
14
|
});
|
|
15
15
|
exports.default = NumberInput;
|
|
@@ -130,8 +130,8 @@ const ReactTableInner = (0, react_1.forwardRef)(function ReactTableInner(props,
|
|
|
130
130
|
? approxColumnWidth * (columns.length + 1)
|
|
131
131
|
: '100%',
|
|
132
132
|
pointerEvents: 'none',
|
|
133
|
-
} }), (0, jsx_runtime_1.jsxs)("table", { ...getTableProps(), css: Style_1.ReactTableStyle, style: styles.table(enableVirtualScroll, enableColumnsVirtualScroll), children: [(0, jsx_runtime_1.jsx)(ReactTableHeader_1.default, { headerGroups: headerGroups, onClick: headerClickHandler }), (0, jsx_runtime_1.jsxs)("tbody", { ...getTableBodyProps(), children: [!
|
|
134
|
-
(
|
|
133
|
+
} }), (0, jsx_runtime_1.jsxs)("table", { ...getTableProps(), css: Style_1.ReactTableStyle, style: styles.table(enableVirtualScroll, enableColumnsVirtualScroll), children: [(0, jsx_runtime_1.jsx)(ReactTableHeader_1.default, { headerGroups: headerGroups, onClick: headerClickHandler }), (0, jsx_runtime_1.jsxs)("tbody", { ...getTableBodyProps(), children: [!data ||
|
|
134
|
+
(data?.length === 0 && ((0, jsx_runtime_1.jsx)(EmptyDataRow_1.EmptyDataRow, { columns: columns, text: emptyDataRowText }))), rowsData.map((row, index) => {
|
|
135
135
|
prepareRow(row);
|
|
136
136
|
(0, useRowSpan_1.prepareRowSpan)(rows, enableVirtualScroll
|
|
137
137
|
? index + virtualBoundary.rows.start
|
|
@@ -150,7 +150,7 @@ const ReactTableInner = (0, react_1.forwardRef)(function ReactTableInner(props,
|
|
|
150
150
|
opacity: !isCounterVisible ? '0' : '1',
|
|
151
151
|
transition: 'all 0.5s',
|
|
152
152
|
visibility: !isCounterVisible ? 'hidden' : 'visible',
|
|
153
|
-
}, children: [enableColumnsVirtualScroll && typeof startColumn === 'string' && ((0, jsx_runtime_1.jsxs)("span", { style: { left: 0 }, children: [`Column ${startColumn}`, " "] })), index + 1, " / ", total] }))] }));
|
|
153
|
+
}, children: [enableColumnsVirtualScroll && typeof startColumn === 'string' && ((0, jsx_runtime_1.jsxs)("span", { style: { left: 0 }, children: [`Column ${startColumn}`, " "] })), typeof index === 'number' ? index + 1 : total, " / ", total] }))] }));
|
|
154
154
|
});
|
|
155
155
|
function ReactTable(props) {
|
|
156
156
|
const { data, approxItemHeight = 40, approxColumnWidth = 40, groupKey, onSortEnd, columns, style = {}, } = props;
|
|
@@ -187,7 +187,7 @@ function ReactTable(props) {
|
|
|
187
187
|
}, [approxColumnWidth, approxItemHeight, height, width]);
|
|
188
188
|
function lookForGroupIndex(currentIndex, side) {
|
|
189
189
|
const currentItem = data[currentIndex];
|
|
190
|
-
if (currentItem
|
|
190
|
+
if (currentItem?.index && groupKey) {
|
|
191
191
|
switch (side) {
|
|
192
192
|
case -1: {
|
|
193
193
|
let index = currentIndex - 1;
|
|
@@ -9,7 +9,7 @@ const get_1 = __importDefault(require("lodash/get"));
|
|
|
9
9
|
const react_1 = require("react");
|
|
10
10
|
const CheckBox_1 = __importDefault(require("../CheckBox"));
|
|
11
11
|
function FormikCheckBox(props) {
|
|
12
|
-
const { label, name, onChange = () => null, className = 'checkbox', reverse = false, style = { container: {}, label: {}, checkbox: {} }, defaultValue, ...resProps } = props;
|
|
12
|
+
const { label, name, onChange = () => null, className = 'checkbox', reverse = false, style = { container: {}, label: {}, checkbox: {} }, defaultValue, renderLabel, ...resProps } = props;
|
|
13
13
|
const { values, setFieldValue } = (0, formik_1.useFormikContext)();
|
|
14
14
|
const value = reverse
|
|
15
15
|
? !(0, get_1.default)(values, name, defaultValue)
|
|
@@ -19,6 +19,6 @@ function FormikCheckBox(props) {
|
|
|
19
19
|
onChange(e);
|
|
20
20
|
void setFieldValue(name, reverse ? value : !value);
|
|
21
21
|
}, [name, onChange, reverse, setFieldValue, value]);
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: `${className} check-${value}`, style: style.container
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: `${className} check-${value}`, style: { display: 'flex', justifyContent: 'center', ...style.container }, children: [renderLabel?.(label), label && !renderLabel && ((0, jsx_runtime_1.jsx)("label", { htmlFor: name, className: "checkbox-label", style: style.label || {}, children: label })), (0, jsx_runtime_1.jsx)(CheckBox_1.default, { ...resProps, name: name, id: name, checked: value, onChange: changeHandler, style: style.checkbox || {} })] }));
|
|
23
23
|
}
|
|
24
24
|
exports.default = FormikCheckBox;
|
|
@@ -3,26 +3,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.formatFieldLabelStyle = exports.formatFieldInputStyle = void 0;
|
|
6
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
8
|
const formik_1 = require("formik");
|
|
8
9
|
const get_1 = __importDefault(require("lodash/get"));
|
|
9
10
|
const react_1 = require("react");
|
|
10
11
|
const Input_1 = __importDefault(require("../Input"));
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
const Label_1 = __importDefault(require("../Label"));
|
|
13
|
+
exports.formatFieldInputStyle = {
|
|
14
|
+
inputWrapper: {
|
|
15
|
+
width: '60%',
|
|
16
|
+
margin: '2px 0',
|
|
17
|
+
},
|
|
18
|
+
input: {
|
|
19
|
+
padding: '2px',
|
|
20
|
+
textAlign: 'center',
|
|
16
21
|
},
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
};
|
|
23
|
+
exports.formatFieldLabelStyle = {
|
|
24
|
+
label: {
|
|
25
|
+
flex: 4,
|
|
19
26
|
fontSize: '11px',
|
|
20
27
|
fontWeight: 'bold',
|
|
21
28
|
color: '#232323',
|
|
22
29
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
textAlign: 'center',
|
|
30
|
+
wrapper: {
|
|
31
|
+
flex: 8,
|
|
26
32
|
},
|
|
27
33
|
};
|
|
28
34
|
function FormikColumnFormatField(props) {
|
|
@@ -34,11 +40,9 @@ function FormikColumnFormatField(props) {
|
|
|
34
40
|
const checkChangeHandler = (0, react_1.useCallback)((e) => {
|
|
35
41
|
void setFieldValue(e.target.name, e.target.checked);
|
|
36
42
|
}, [setFieldValue]);
|
|
37
|
-
return ((0, jsx_runtime_1.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
alignItems: 'center',
|
|
42
|
-
}, children: [!hideCheckField && checkControllerName && ((0, jsx_runtime_1.jsx)("input", { type: "checkbox", style: { margin: '0px 5px' }, name: checkControllerName, onChange: checkChangeHandler, checked: (0, get_1.default)(values, checkControllerName, false) })), !hideFormatField && formatControllerName && ((0, jsx_runtime_1.jsx)(Input_1.default, { style: { inputWrapper: styles.input }, name: formatControllerName, value: (0, get_1.default)(values, formatControllerName, ''), onChange: changeHandler, type: "text", disabled: disableFormat }))] })] }));
|
|
43
|
+
return ((0, jsx_runtime_1.jsx)(Label_1.default, { title: label, style: exports.formatFieldLabelStyle, children: (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
44
|
+
display: 'flex',
|
|
45
|
+
alignItems: 'center',
|
|
46
|
+
}, children: [!hideCheckField && checkControllerName ? ((0, jsx_runtime_1.jsx)("input", { type: "checkbox", style: { margin: '0px 5px' }, name: checkControllerName, onChange: checkChangeHandler, checked: (0, get_1.default)(values, checkControllerName, false) })) : ((0, jsx_runtime_1.jsx)("div", { style: { width: '23px' } })), !hideFormatField && formatControllerName && ((0, jsx_runtime_1.jsx)(Input_1.default, { style: exports.formatFieldInputStyle, name: formatControllerName, value: (0, get_1.default)(values, formatControllerName, ''), onChange: changeHandler, type: "text", disabled: disableFormat }))] }) }));
|
|
43
47
|
}
|
|
44
48
|
exports.default = (0, react_1.memo)(FormikColumnFormatField);
|
|
@@ -11,7 +11,7 @@ function identity(value) {
|
|
|
11
11
|
return value;
|
|
12
12
|
}
|
|
13
13
|
function FormikInput(props) {
|
|
14
|
-
const { name, style = { label: {}, input: {} }, onChange = () => null, checkValue = () => true, type = 'text', className = '', value = null, format = () => identity, checkErrorAfterInputTouched = true, mapOnChangeValue, mapValue, ...resProps } = props;
|
|
14
|
+
const { name, style = { label: {}, input: {}, inputWrapper: {} }, onChange = () => null, checkValue = () => true, type = 'text', className = '', value = null, format = () => identity, checkErrorAfterInputTouched = true, mapOnChangeValue, mapValue, ...resProps } = props;
|
|
15
15
|
const { values, handleChange, errors, touched, setFieldValue } = (0, formik_1.useFormikContext)();
|
|
16
16
|
function changeHandler(e) {
|
|
17
17
|
onChange(e);
|
|
@@ -31,11 +31,15 @@ function FormikInput(props) {
|
|
|
31
31
|
return ((0, jsx_runtime_1.jsx)(Input_1.default, { name: name, value: val, onChange: changeHandler, type: type, style: {
|
|
32
32
|
...style,
|
|
33
33
|
inputWrapper: {
|
|
34
|
-
...style.
|
|
35
|
-
...(isInvalid
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
...style.inputWrapper,
|
|
35
|
+
...(isInvalid
|
|
36
|
+
? {
|
|
37
|
+
borderColor: 'red',
|
|
38
|
+
borderWidth: '1px',
|
|
39
|
+
borderStyle: 'solid',
|
|
40
|
+
outline: 'none',
|
|
41
|
+
}
|
|
42
|
+
: {}),
|
|
39
43
|
},
|
|
40
44
|
}, checkValue: checkValue, className: className, format: format, ...resProps }));
|
|
41
45
|
}
|
|
@@ -24,6 +24,6 @@ const FormikSelect = function FormikSelect(props) {
|
|
|
24
24
|
if (checkErrorAfterInputTouched) {
|
|
25
25
|
isInvalid = (0, get_1.default)(errors, name) && (0, get_1.default)(touched, name);
|
|
26
26
|
}
|
|
27
|
-
return ((0, jsx_runtime_1.jsx)(Select_1.default, { name: name, defaultValue: value || (0, get_1.default)(values, name), onChange: changeHandler, style: { ...style, ...(isInvalid && { border: '1px solid red' }) }, ...resProps }));
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)(Select_1.default, { name: name, defaultValue: value || (0, get_1.default)(values, name), onChange: changeHandler, style: { ...style, ...(isInvalid && { border: '1px solid red' }) }, ...resProps }, String(value || (0, get_1.default)(values, name))));
|
|
28
28
|
};
|
|
29
29
|
exports.default = FormikSelect;
|
|
@@ -28,10 +28,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
30
30
|
const formik_1 = require("formik");
|
|
31
|
+
const nmr_processing_1 = require("nmr-processing");
|
|
31
32
|
const react_1 = require("react");
|
|
32
33
|
const Yup = __importStar(require("yup"));
|
|
33
|
-
const
|
|
34
|
-
const apodization_1 = require("../../data/data1d/filter1d/apodization");
|
|
34
|
+
const DefaultApodizationOptions_1 = require("../../data/constants/DefaultApodizationOptions");
|
|
35
35
|
const DispatchContext_1 = require("../context/DispatchContext");
|
|
36
36
|
const ActionButtons_1 = __importDefault(require("../elements/ActionButtons"));
|
|
37
37
|
const Label_1 = __importDefault(require("../elements/Label"));
|
|
@@ -42,7 +42,8 @@ const useFilter_1 = require("../hooks/useFilter");
|
|
|
42
42
|
const Header_1 = require("./Header");
|
|
43
43
|
const HeaderContainer_1 = require("./HeaderContainer");
|
|
44
44
|
const inputStyle = {
|
|
45
|
-
input: {
|
|
45
|
+
input: { width: '60px' },
|
|
46
|
+
inputWrapper: { height: '100%' },
|
|
46
47
|
};
|
|
47
48
|
const validationSchema = Yup.object().shape({
|
|
48
49
|
lineBroadening: Yup.number().required(),
|
|
@@ -50,7 +51,7 @@ const validationSchema = Yup.object().shape({
|
|
|
50
51
|
lineBroadeningCenter: Yup.number().required().min(0).max(1),
|
|
51
52
|
});
|
|
52
53
|
const initialValues = {
|
|
53
|
-
...
|
|
54
|
+
...DefaultApodizationOptions_1.defaultApodizationOptions,
|
|
54
55
|
livePreview: true,
|
|
55
56
|
};
|
|
56
57
|
function ApodizationOptionsInnerPanel(props) {
|
|
@@ -84,7 +85,7 @@ function ApodizationOptionsInnerPanel(props) {
|
|
|
84
85
|
}
|
|
85
86
|
const MemoizedApodizationPanel = (0, react_1.memo)(ApodizationOptionsInnerPanel);
|
|
86
87
|
function ApodizationOptionsPanel() {
|
|
87
|
-
const filter = (0, useFilter_1.useFilter)(Filters.apodization.id);
|
|
88
|
+
const filter = (0, useFilter_1.useFilter)(nmr_processing_1.Filters.apodization.id);
|
|
88
89
|
return (0, jsx_runtime_1.jsx)(MemoizedApodizationPanel, { filter: filter });
|
|
89
90
|
}
|
|
90
91
|
exports.default = ApodizationOptionsPanel;
|
|
@@ -35,6 +35,8 @@ const Button_1 = __importDefault(require("../elements/Button"));
|
|
|
35
35
|
const Label_1 = __importDefault(require("../elements/Label"));
|
|
36
36
|
const FormikNumberInput_1 = __importDefault(require("../elements/formik/FormikNumberInput"));
|
|
37
37
|
const FormikSelect_1 = __importDefault(require("../elements/formik/FormikSelect"));
|
|
38
|
+
const Alert_1 = require("../elements/popup/Alert");
|
|
39
|
+
const useCheckPointsNumberInWindowArea_1 = require("../hooks/useCheckPointsNumberInWindowArea");
|
|
38
40
|
const Header_1 = require("./Header");
|
|
39
41
|
const HeaderContainer_1 = require("./HeaderContainer");
|
|
40
42
|
const inputStyle = {
|
|
@@ -67,12 +69,19 @@ const INIT_VALUES = {
|
|
|
67
69
|
};
|
|
68
70
|
function AutoPeakPickingOptionPanel() {
|
|
69
71
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
const pointsNumber = (0, useCheckPointsNumberInWindowArea_1.useCheckPointsNumberInWindowArea)();
|
|
73
|
+
const alert = (0, Alert_1.useAlert)();
|
|
74
|
+
function handlePeakPicking(values) {
|
|
75
|
+
if (pointsNumber > useCheckPointsNumberInWindowArea_1.MIN_AREA_POINTS) {
|
|
76
|
+
dispatch({
|
|
77
|
+
type: 'AUTO_PEAK_PICKING',
|
|
78
|
+
payload: values,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
alert.error(`Auto peak picking only available for area more than ${useCheckPointsNumberInWindowArea_1.MIN_AREA_POINTS} points`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
76
85
|
return ((0, jsx_runtime_1.jsx)(HeaderContainer_1.HeaderContainer, { children: (0, jsx_runtime_1.jsx)(formik_1.Formik, { initialValues: INIT_VALUES, onSubmit: handlePeakPicking, validationSchema: validationSchema, children: ({ handleSubmit, isValid }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Label_1.default, { title: "Direction : ", shortTitle: "", style: Header_1.headerLabelStyle, children: (0, jsx_runtime_1.jsx)(FormikSelect_1.default, { name: "direction", items: LookFor, style: { width: '85px' } }) }), (0, jsx_runtime_1.jsx)(Label_1.default, { title: "Max Number Of Peaks :", shortTitle: "Peaks number :", style: Header_1.headerLabelStyle, children: (0, jsx_runtime_1.jsx)(FormikNumberInput_1.default, { name: "maxNumberOfPeaks", style: inputStyle, min: 0 }) }), (0, jsx_runtime_1.jsx)(Label_1.default, { title: "Noise factor :", shortTitle: "Noise :", style: Header_1.headerLabelStyle, children: (0, jsx_runtime_1.jsx)(FormikNumberInput_1.default, { name: "noiseFactor", style: inputStyle, min: 0 }) }), (0, jsx_runtime_1.jsx)(Label_1.default, { title: "Min Max Ratio :", shortTitle: "Ratio :", style: Header_1.headerLabelStyle, children: (0, jsx_runtime_1.jsx)(FormikNumberInput_1.default, { name: "minMaxRatio", style: inputStyle, step: "0.01", min: 0 }) }), (0, jsx_runtime_1.jsx)(Button_1.default.Done, { onClick: () => handleSubmit(), style: { margin: '0 10px' }, disabled: !isValid, children: "Apply" })] })) }) }));
|
|
77
86
|
}
|
|
78
87
|
exports.default = (0, react_1.memo)(AutoPeakPickingOptionPanel);
|
|
@@ -28,9 +28,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
30
30
|
const formik_1 = require("formik");
|
|
31
|
+
const nmr_processing_1 = require("nmr-processing");
|
|
31
32
|
const react_1 = require("react");
|
|
32
33
|
const Yup = __importStar(require("yup"));
|
|
33
|
-
const Filters = __importStar(require("../../data/Filters"));
|
|
34
34
|
const DispatchContext_1 = require("../context/DispatchContext");
|
|
35
35
|
const ActionButtons_1 = __importDefault(require("../elements/ActionButtons"));
|
|
36
36
|
const Label_1 = __importDefault(require("../elements/Label"));
|
|
@@ -47,7 +47,10 @@ const getAlgorithmsList = () => {
|
|
|
47
47
|
value: val.toLowerCase(),
|
|
48
48
|
}));
|
|
49
49
|
};
|
|
50
|
-
const inputStyle = {
|
|
50
|
+
const inputStyle = {
|
|
51
|
+
input: { width: '50px' },
|
|
52
|
+
inputWrapper: { height: '100%' },
|
|
53
|
+
};
|
|
51
54
|
const formData = (algorithm, filterValues) => {
|
|
52
55
|
switch (algorithm) {
|
|
53
56
|
case 'airpls': {
|
|
@@ -115,7 +118,7 @@ function BaseLineCorrectionInnerPanel(props) {
|
|
|
115
118
|
}
|
|
116
119
|
const MemoizedBaseLineCorrectionPanel = (0, react_1.memo)(BaseLineCorrectionInnerPanel);
|
|
117
120
|
function BaseLineCorrectionPanel() {
|
|
118
|
-
const filter = (0, useFilter_1.useFilter)(Filters.baselineCorrection.id);
|
|
121
|
+
const filter = (0, useFilter_1.useFilter)(nmr_processing_1.Filters.baselineCorrection.id);
|
|
119
122
|
return (0, jsx_runtime_1.jsx)(MemoizedBaseLineCorrectionPanel, { filter: filter });
|
|
120
123
|
}
|
|
121
124
|
exports.default = BaseLineCorrectionPanel;
|
|
@@ -1,34 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const nmr_processing_1 = require("nmr-processing");
|
|
30
8
|
const react_1 = require("react");
|
|
31
|
-
const Filters = __importStar(require("../../data/Filters"));
|
|
32
9
|
const ChartContext_1 = require("../context/ChartContext");
|
|
33
10
|
const DispatchContext_1 = require("../context/DispatchContext");
|
|
34
11
|
const ActionButtons_1 = __importDefault(require("../elements/ActionButtons"));
|
|
@@ -47,9 +24,12 @@ const selectStyle = {
|
|
|
47
24
|
height: '20px',
|
|
48
25
|
};
|
|
49
26
|
const inputStyle = {
|
|
50
|
-
|
|
27
|
+
input: {
|
|
51
28
|
width: '70px',
|
|
52
29
|
},
|
|
30
|
+
inputWrapper: {
|
|
31
|
+
height: '100%',
|
|
32
|
+
},
|
|
53
33
|
};
|
|
54
34
|
const phaseCorrectionTypes = {
|
|
55
35
|
manual: 'manual',
|
|
@@ -74,7 +54,7 @@ const emptyData = { datum: {}, filter: null };
|
|
|
74
54
|
function PhaseCorrectionPanel() {
|
|
75
55
|
const { toolOptions: { data: { pivot }, }, } = (0, ChartContext_1.useChartData)();
|
|
76
56
|
const { data } = (0, useSpectrum_1.default)(emptyData);
|
|
77
|
-
const filter = (0, useFilter_1.useFilter)(Filters.phaseCorrection.id);
|
|
57
|
+
const filter = (0, useFilter_1.useFilter)(nmr_processing_1.Filters.phaseCorrection.id);
|
|
78
58
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
79
59
|
const [value, setValue] = (0, react_1.useState)({ ph0: 0, ph1: 0 });
|
|
80
60
|
const valueRef = (0, react_1.useRef)({ ph0: 0, ph1: 0 });
|