nmrium 0.34.0 → 0.35.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/LinesSeries.js +4 -5
- package/lib/component/1d/jCouplingGraph/JsCouplings.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/LevelNode.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts +5 -7
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +142 -160
- 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 +4 -4
- package/lib/component/1d/ranges/AssignmentActionsButtons.d.ts +11 -0
- package/lib/component/1d/ranges/AssignmentActionsButtons.js +11 -0
- package/lib/component/1d/ranges/Range.d.ts +3 -10
- package/lib/component/1d/ranges/Range.js +30 -45
- package/lib/component/1d/ranges/Ranges.js +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts +1 -2
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.d.ts +1 -2
- package/lib/component/2d/1d-tracer/Left1DChart.d.ts +2 -2
- package/lib/component/2d/1d-tracer/Top1DChart.d.ts +2 -2
- package/lib/component/2d/Chart2D.d.ts +2 -2
- package/lib/component/2d/ft/Contours.js +13 -13
- package/lib/component/2d/ft/FTContainer.d.ts +2 -2
- package/lib/component/2d/zones/Signal.d.ts +1 -1
- package/lib/component/2d/zones/Signal.js +1 -2
- package/lib/component/2d/zones/SignalCrosshair.d.ts +1 -1
- package/lib/component/2d/zones/SignalCrosshair.js +0 -1
- package/lib/component/2d/zones/Zone.d.ts +2 -2
- package/lib/component/NMRium.d.ts +2 -5
- package/lib/component/NMRium.js +10 -2
- package/lib/component/assignment/AssignmentsReducer.d.ts +1 -2
- package/lib/component/assignment/actions/removeAssignment.js +2 -2
- package/lib/component/context/PreferencesContext.d.ts +10 -21
- package/lib/component/context/PreferencesContext.js +4 -7
- package/lib/component/elements/Button.d.ts +4 -2
- package/lib/component/elements/Button.js +26 -15
- package/lib/component/elements/Input.js +38 -46
- package/lib/component/elements/NumberInput.d.ts +4 -12
- package/lib/component/elements/NumberInput.js +10 -40
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.d.ts +2 -4
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +3 -2
- package/lib/component/elements/ReactTable/ReactTable.d.ts +7 -6
- package/lib/component/elements/ReactTable/ReactTable.js +3 -12
- package/lib/component/elements/ReactTable/Style.js +0 -8
- package/lib/component/elements/formik/FormikNumberInput.d.ts +1 -1
- package/lib/component/elements/formik/FormikNumberInput.js +13 -3
- package/lib/component/header/ApodizationOptionsPanel.js +2 -12
- package/lib/component/header/AutoPeakPickingOptionPanel.js +11 -15
- package/lib/component/header/BaseLineCorrectionPanel.js +2 -12
- package/lib/component/header/Header.js +2 -2
- package/lib/component/header/PhaseCorrectionPanel.d.ts +2 -0
- package/lib/component/header/{ManualPhaseCorrectionPanel.js → PhaseCorrectionPanel.js} +23 -22
- package/lib/component/header/RangesPickingOptionPanel.js +17 -28
- package/lib/component/header/ZeroFillingOptionsPanel.js +1 -2
- package/lib/component/header/Zones2DOptionPanel.js +16 -23
- package/lib/component/highlight/index.d.ts +2 -2
- package/lib/component/hooks/useCheckToolsVisibility.d.ts +1 -2
- package/lib/component/hooks/useDatumWithSpectraStatistics.d.ts +2 -3
- package/lib/component/hooks/useFilter.d.ts +1 -1
- package/lib/component/hooks/useSpectraPerNucleus.d.ts +2 -3
- package/lib/component/hooks/useSpectrum.d.ts +2 -3
- package/lib/component/modal/EditPeakShapeModal.d.ts +2 -2
- package/lib/component/modal/ExportAsJcampModal.d.ts +8 -0
- package/lib/component/modal/ExportAsJcampModal.js +62 -0
- package/lib/component/modal/MultipletAnalysisModal.d.ts +2 -2
- package/lib/component/modal/changeSum/ChangeSumModal.d.ts +1 -1
- package/lib/component/modal/editRange/EditRangeModal.js +1 -1
- package/lib/component/modal/editRange/forms/components/SignalsForm.d.ts +1 -1
- package/lib/component/modal/editZone/EditPathLengthFormik.js +11 -14
- package/lib/component/modal/editZone/EditZoneModal.js +1 -1
- package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js +1 -1
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.js +1 -1
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.d.ts +2 -2
- package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +3 -3
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +8 -5
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +1 -1
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +2 -3
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
- package/lib/component/panels/PanelNoData.d.ts +6 -0
- package/lib/component/panels/PanelNoData.js +24 -0
- package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts +2 -2
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +4 -4
- package/lib/component/panels/RangesPanel/RangesPanel.js +12 -7
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +4 -5
- package/lib/component/panels/RangesPanel/RangesTable.js +4 -14
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +5 -4
- package/lib/component/panels/RangesPanel/RangesTableRow.js +15 -11
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.d.ts +6 -5
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +37 -33
- package/lib/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.d.ts +4 -0
- package/lib/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.js +8 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.d.ts +2 -3
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +6 -11
- 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/SpectraPanelHeader.js +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectraTable.d.ts +3 -4
- package/lib/component/panels/SpectrumsPanel/SpectraTable.js +65 -17
- package/lib/component/panels/SpectrumsPanel/base/ColorIndicator.d.ts +1 -2
- package/lib/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.d.ts +3 -4
- package/lib/component/panels/SpectrumsPanel/base/SpectrumName.d.ts +2 -3
- package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +0 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.d.ts +2 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +11 -8
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts +1 -1
- package/lib/component/panels/SummaryPanel/utilities/Utilities.d.ts +4 -5
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +1 -1
- package/lib/component/panels/ZonesPanel/ZonesTable.d.ts +1 -2
- package/lib/component/panels/ZonesPanel/ZonesTable.js +3 -13
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +3 -3
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js +3 -2
- package/lib/component/panels/databasePanel/DatabasePanel.js +77 -7
- package/lib/component/panels/databasePanel/DatabasePreferences.js +1 -1
- package/lib/component/panels/databasePanel/DatabaseTable.d.ts +2 -1
- package/lib/component/panels/databasePanel/DatabaseTable.js +17 -9
- package/lib/component/panels/filtersPanel/FiltersTable.js +16 -30
- package/lib/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib/component/panels/header/PreferencesHeader.js +1 -1
- package/lib/component/reducer/IgnoreActions.js +0 -1
- package/lib/component/reducer/Reducer.d.ts +4 -960
- package/lib/component/reducer/Reducer.js +3 -7
- package/lib/component/reducer/actions/AssignmentsActions.js +2 -4
- package/lib/component/reducer/actions/DatabaseActions.js +1 -1
- package/lib/component/reducer/actions/DomainActions.d.ts +5 -6
- package/lib/component/reducer/actions/DomainActions.js +17 -11
- package/lib/component/reducer/actions/FiltersActions.d.ts +14 -19
- package/lib/component/reducer/actions/FiltersActions.js +257 -152
- package/lib/component/reducer/actions/LoadActions.d.ts +2 -3
- package/lib/component/reducer/actions/LoadActions.js +1 -1
- package/lib/component/reducer/actions/PeaksActions.d.ts +1 -1
- package/lib/component/reducer/actions/PeaksActions.js +6 -2
- package/lib/component/reducer/actions/PreferencesActions.js +3 -0
- package/lib/component/reducer/actions/RangesActions.d.ts +1 -1
- package/lib/component/reducer/actions/RangesActions.js +19 -11
- package/lib/component/reducer/actions/SpectrumsActions.js +15 -13
- package/lib/component/reducer/actions/ToolsActions.d.ts +6 -2
- package/lib/component/reducer/actions/ToolsActions.js +41 -38
- package/lib/component/reducer/actions/ZonesActions.d.ts +1 -1
- package/lib/component/reducer/actions/ZonesActions.js +7 -3
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.js +6 -3
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +3 -4843
- package/lib/component/reducer/preferences/preferencesReducer.js +1 -4
- package/lib/component/reducer/types/Types.d.ts +0 -2
- package/lib/component/reducer/types/Types.js +0 -2
- package/lib/component/toolbar/BasicToolBar.js +3 -3
- package/lib/component/toolbar/FunctionToolBar.js +2 -2
- package/lib/component/toolbar/ToolTypes.d.ts +1 -2
- package/lib/component/toolbar/ToolTypes.js +13 -13
- package/lib/component/utility/getSpectraByNucleus.d.ts +2 -3
- package/lib/component/utility/getSpectraObjectPaths.d.ts +2 -3
- package/lib/component/workspaces/Workspace.d.ts +1 -0
- package/lib/component/workspaces/assignment.js +1 -1
- package/lib/component/workspaces/basic.js +1 -1
- package/lib/component/workspaces/embedded.js +1 -1
- package/lib/component/workspaces/exercise.js +1 -1
- package/lib/component/workspaces/prediction.js +1 -1
- package/lib/component/workspaces/process1D.js +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib/data/Filters.d.ts +0 -4
- package/lib/data/Filters.js +0 -4
- package/lib/data/FiltersManager.d.ts +17 -5
- package/lib/data/FiltersManager.js +21 -14
- package/lib/data/PredictionManager.d.ts +2 -3
- package/lib/data/SpectraManager.d.ts +11 -0
- package/lib/data/SpectraManager.js +47 -5
- package/lib/data/data1d/Spectrum1D/SumManager.d.ts +1 -2
- package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/generateJGraphData.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/generateSpectrumFromPublicationString.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/get1DDataXY.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/getShiftX.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/getShiftX.js +3 -3
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +2 -2
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +16 -17
- package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +7 -7
- package/lib/data/data1d/Spectrum1D/integrals/checkIntegralKind.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +3 -3
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.d.ts +3 -4
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.js +3 -3
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.js +3 -3
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/isSpectrum1D.d.ts +2 -3
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +5 -5
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +3 -3
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/lookupPeak.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +7 -7
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts +3 -3
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +5 -5
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.js +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/addRange.d.ts +8 -9
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +13 -7
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.js +13 -7
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.d.ts +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +9 -9
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeSignal.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeSignal.js +6 -5
- package/lib/data/data1d/Spectrum1D/ranges/checkRangeKind.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRange.d.ts +3 -2
- package/lib/data/data1d/Spectrum1D/ranges/detectRange.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.d.ts +10 -9
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +6 -6
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.d.ts +1 -0
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.js +1 -0
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +7 -7
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +7 -7
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +7 -7
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +2 -2
- package/lib/data/data1d/filter1d/apodization.d.ts +8 -6
- package/lib/data/data1d/filter1d/apodization.js +4 -0
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +6 -4
- package/lib/data/data1d/filter1d/baselineCorrection.js +4 -0
- package/lib/data/data1d/filter1d/digitalFilter.d.ts +7 -6
- package/lib/data/data1d/filter1d/digitalFilter.js +15 -11
- package/lib/data/data1d/filter1d/equallySpaced.d.ts +5 -5
- package/lib/data/data1d/filter1d/equallySpaced.js +10 -10
- package/lib/data/data1d/filter1d/exclusionZones.d.ts +7 -5
- package/lib/data/data1d/filter1d/exclusionZones.js +13 -9
- package/lib/data/data1d/filter1d/fft.d.ts +6 -4
- package/lib/data/data1d/filter1d/fft.js +27 -23
- package/lib/data/data1d/filter1d/phaseCorrection.d.ts +6 -5
- package/lib/data/data1d/filter1d/phaseCorrection.js +22 -17
- package/lib/data/data1d/filter1d/shiftX.d.ts +5 -3
- package/lib/data/data1d/filter1d/shiftX.js +7 -3
- package/lib/data/data1d/filter1d/signalProcessing.d.ts +7 -5
- package/lib/data/data1d/filter1d/signalProcessing.js +15 -11
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.d.ts +2 -2
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +6 -6
- package/lib/data/data1d/filter1d/zeroFilling.d.ts +7 -6
- package/lib/data/data1d/filter1d/zeroFilling.js +15 -11
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +4 -5
- package/lib/data/data2d/Spectrum2D/contours.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/contours.js +5 -4
- package/lib/data/data2d/Spectrum2D/get2DColor.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/get2DSpectrumErrorValue.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/get2DSpectrumErrorValue.js +2 -2
- package/lib/data/data2d/Spectrum2D/getMissingProjection.d.ts +2 -3
- package/lib/data/data2d/Spectrum2D/getShift.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/getShift.js +3 -3
- package/lib/data/data2d/Spectrum2D/getSlice.d.ts +4 -4
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/isSpectrum2D.d.ts +2 -3
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js +4 -4
- package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +4 -10
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js +4 -4
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +6 -12
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.js +2 -2
- package/lib/data/data2d/Spectrum2D/zones/isZoneExists.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/isZoneExists.js +3 -3
- package/lib/data/data2d/Spectrum2D/zones/mapZones.d.ts +6 -12
- package/lib/data/data2d/Spectrum2D/zones/mapZones.js +1 -0
- package/lib/data/data2d/Spectrum2D/zones/updateZones.d.ts +2 -2
- package/lib/data/data2d/Spectrum2D/zones/updateZones.js +2 -2
- package/lib/data/data2d/filter2d/shiftX.d.ts +6 -4
- package/lib/data/data2d/filter2d/shiftX.js +10 -6
- package/lib/data/data2d/filter2d/shiftY.d.ts +5 -3
- package/lib/data/data2d/filter2d/shiftY.js +5 -1
- package/lib/data/getDefaultMatrixFilters.d.ts +1 -1
- package/lib/data/molecules/MoleculeManager.d.ts +1 -1
- package/lib/data/molecules/MoleculeManager.js +2 -2
- package/lib/data/parseMeta/linkMetaWithSpectra.d.ts +2 -3
- package/lib/data/types/common/Info.d.ts +1 -0
- package/lib/data/types/data1d/ComplexData1D.d.ts +1 -1
- package/lib/data/types/data1d/RangeDetectionResult.d.ts +1 -1
- package/lib/data/types/data1d/index.d.ts +0 -11
- package/lib/data/types/data2d/index.d.ts +0 -7
- package/lib/data/utilities/FindUtilities.d.ts +7 -9
- package/lib/data/utilities/RangeUtilities.d.ts +7 -2
- package/lib/data/utilities/RangeUtilities.js +9 -16
- package/lib/data/utilities/ZoneUtilities.d.ts +1 -1
- package/lib/data/utilities/ZoneUtilities.js +6 -6
- package/lib/data/utilities/calculateSanPlot.d.ts +2 -3
- package/lib/data/utilities/convertSpectraListToObject.d.ts +2 -3
- package/lib/data/utilities/generateColor.d.ts +1 -1
- package/lib/types/NMRiumDataReturn.d.ts +2 -3
- package/lib/types/NMRiumToolBarPreferences.d.ts +1 -1
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/LinesSeries.js +4 -5
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +144 -160
- package/lib-cjs/component/1d/ranges/AssignmentActionsButtons.js +18 -0
- package/lib-cjs/component/1d/ranges/Range.js +29 -44
- package/lib-cjs/component/1d/ranges/Ranges.js +1 -1
- package/lib-cjs/component/2d/ft/Contours.js +13 -13
- package/lib-cjs/component/2d/zones/Signal.js +1 -2
- package/lib-cjs/component/2d/zones/SignalCrosshair.js +0 -1
- package/lib-cjs/component/NMRium.js +10 -2
- package/lib-cjs/component/assignment/actions/removeAssignment.js +2 -2
- package/lib-cjs/component/context/PreferencesContext.js +4 -7
- package/lib-cjs/component/elements/Button.js +26 -15
- package/lib-cjs/component/elements/Input.js +37 -45
- package/lib-cjs/component/elements/NumberInput.js +8 -38
- package/lib-cjs/component/elements/ReactTable/Elements/ReactTableRow.js +3 -2
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +3 -12
- package/lib-cjs/component/elements/ReactTable/Style.js +0 -8
- package/lib-cjs/component/elements/formik/FormikNumberInput.js +13 -3
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +1 -11
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +33 -14
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +1 -11
- package/lib-cjs/component/header/Header.js +2 -2
- package/lib-cjs/component/header/{ManualPhaseCorrectionPanel.js → PhaseCorrectionPanel.js} +24 -23
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +38 -26
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +0 -1
- package/lib-cjs/component/header/Zones2DOptionPanel.js +37 -21
- package/lib-cjs/component/modal/ExportAsJcampModal.js +67 -0
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +1 -1
- package/lib-cjs/component/modal/editZone/EditPathLengthFormik.js +11 -14
- package/lib-cjs/component/modal/editZone/EditZoneModal.js +1 -1
- package/lib-cjs/component/modal/setting/settings-tabs/ToolsTabContent.js +1 -1
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignment.js +1 -1
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +3 -3
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +8 -5
- package/lib-cjs/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +1 -1
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +1 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
- package/lib-cjs/component/panels/PanelNoData.js +28 -0
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +4 -4
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +12 -7
- package/lib-cjs/component/panels/RangesPanel/RangesTable.js +4 -14
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +15 -10
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +36 -32
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RemoveAssignmentsButton.js +12 -0
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +6 -11
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +63 -15
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +0 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +11 -8
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +2 -12
- package/lib-cjs/component/panels/ZonesPanel/ZonesTableRow.js +3 -2
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +76 -6
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +1 -1
- package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +15 -7
- package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +16 -30
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +1 -1
- package/lib-cjs/component/panels/header/PreferencesHeader.js +1 -1
- package/lib-cjs/component/reducer/IgnoreActions.js +0 -1
- package/lib-cjs/component/reducer/Reducer.js +3 -7
- package/lib-cjs/component/reducer/actions/AssignmentsActions.js +2 -4
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +1 -1
- package/lib-cjs/component/reducer/actions/DomainActions.js +17 -11
- package/lib-cjs/component/reducer/actions/FiltersActions.js +257 -153
- package/lib-cjs/component/reducer/actions/LoadActions.js +1 -1
- package/lib-cjs/component/reducer/actions/PeaksActions.js +6 -2
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +3 -0
- package/lib-cjs/component/reducer/actions/RangesActions.js +19 -11
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +13 -11
- package/lib-cjs/component/reducer/actions/ToolsActions.js +38 -35
- package/lib-cjs/component/reducer/actions/ZonesActions.js +7 -3
- package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +6 -3
- package/lib-cjs/component/reducer/preferences/panelsPreferencesDefaultValues.js +1 -0
- package/lib-cjs/component/reducer/preferences/preferencesReducer.js +1 -4
- package/lib-cjs/component/reducer/types/Types.js +2 -4
- package/lib-cjs/component/toolbar/BasicToolBar.js +3 -3
- package/lib-cjs/component/toolbar/FunctionToolBar.js +2 -2
- package/lib-cjs/component/toolbar/ToolTypes.js +13 -13
- package/lib-cjs/component/workspaces/assignment.js +1 -1
- package/lib-cjs/component/workspaces/basic.js +1 -1
- package/lib-cjs/component/workspaces/embedded.js +1 -1
- package/lib-cjs/component/workspaces/exercise.js +1 -1
- package/lib-cjs/component/workspaces/prediction.js +1 -1
- package/lib-cjs/component/workspaces/process1D.js +1 -1
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib-cjs/data/Filters.js +1 -5
- package/lib-cjs/data/FiltersManager.js +22 -14
- package/lib-cjs/data/SpectraManager.js +48 -5
- package/lib-cjs/data/data1d/Spectrum1D/get1DDataXY.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/getShiftX.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +16 -17
- package/lib-cjs/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +7 -7
- package/lib-cjs/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/integrals/mapIntegrals.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegrals.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +5 -5
- package/lib-cjs/data/data1d/Spectrum1D/peaks/initiatePeaks.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +7 -7
- package/lib-cjs/data/data1d/Spectrum1D/peaks/optimizePeaks.js +5 -5
- package/lib-cjs/data/data1d/Spectrum1D/peaks/updatePeaks.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +13 -7
- package/lib-cjs/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRange.js +13 -7
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +9 -9
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeSignal.js +6 -5
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRange.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRanges.js +6 -6
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectSignal.js +1 -0
- package/lib-cjs/data/data1d/Spectrum1D/ranges/initiateRanges.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +7 -7
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRanges.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +2 -2
- package/lib-cjs/data/data1d/filter1d/apodization.js +5 -1
- package/lib-cjs/data/data1d/filter1d/baselineCorrection.js +5 -1
- package/lib-cjs/data/data1d/filter1d/digitalFilter.js +16 -12
- package/lib-cjs/data/data1d/filter1d/equallySpaced.js +10 -10
- package/lib-cjs/data/data1d/filter1d/exclusionZones.js +14 -10
- package/lib-cjs/data/data1d/filter1d/fft.js +27 -23
- package/lib-cjs/data/data1d/filter1d/phaseCorrection.js +23 -18
- package/lib-cjs/data/data1d/filter1d/shiftX.js +8 -4
- package/lib-cjs/data/data1d/filter1d/signalProcessing.js +16 -12
- package/lib-cjs/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +6 -6
- package/lib-cjs/data/data1d/filter1d/zeroFilling.js +16 -12
- package/lib-cjs/data/data2d/Spectrum2D/contours.js +5 -4
- package/lib-cjs/data/data2d/Spectrum2D/get2DSpectrumErrorValue.js +2 -2
- package/lib-cjs/data/data2d/Spectrum2D/getShift.js +3 -3
- package/lib-cjs/data/data2d/Spectrum2D/zones/changeZoneSignal.js +4 -4
- package/lib-cjs/data/data2d/Spectrum2D/zones/getDetectionZones.js +4 -4
- package/lib-cjs/data/data2d/Spectrum2D/zones/initiateZones.js +2 -2
- package/lib-cjs/data/data2d/Spectrum2D/zones/isZoneExists.js +3 -3
- package/lib-cjs/data/data2d/Spectrum2D/zones/mapZones.js +1 -0
- package/lib-cjs/data/data2d/Spectrum2D/zones/updateZones.js +2 -2
- package/lib-cjs/data/data2d/filter2d/shiftX.js +11 -7
- package/lib-cjs/data/data2d/filter2d/shiftY.js +6 -2
- package/lib-cjs/data/molecules/MoleculeManager.js +2 -2
- package/lib-cjs/data/utilities/RangeUtilities.js +9 -16
- package/lib-cjs/data/utilities/ZoneUtilities.js +6 -6
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +38 -37
- package/lib/component/header/ManualPhaseCorrectionPanel.d.ts +0 -2
- package/lib/data/data1d/filter1d/centerMean.d.ts +0 -13
- package/lib/data/data1d/filter1d/centerMean.js +0 -37
- package/lib/data/data1d/filter1d/fromTo.d.ts +0 -13
- package/lib/data/data1d/filter1d/fromTo.js +0 -31
- package/lib/data/data1d/filter1d/pareto.d.ts +0 -13
- package/lib/data/data1d/filter1d/pareto.js +0 -29
- package/lib/data/data1d/filter1d/standardDeviation.d.ts +0 -13
- package/lib/data/data1d/filter1d/standardDeviation.js +0 -37
- package/lib/data/types/data1d/Data1D.d.ts +0 -5
- package/lib/data/types/data1d/Data1D.js +0 -1
- package/lib/data/types/data1d/Datum1D.d.ts +0 -23
- package/lib/data/types/data1d/Datum1D.js +0 -1
- package/lib/data/types/data1d/Display1D.d.ts +0 -5
- package/lib/data/types/data1d/Display1D.js +0 -1
- package/lib/data/types/data1d/Info1D.d.ts +0 -8
- package/lib/data/types/data1d/Info1D.js +0 -1
- package/lib/data/types/data1d/Integral.d.ts +0 -10
- package/lib/data/types/data1d/Integral.js +0 -1
- package/lib/data/types/data1d/Integrals.d.ts +0 -6
- package/lib/data/types/data1d/Integrals.js +0 -1
- package/lib/data/types/data1d/Peak.d.ts +0 -5
- package/lib/data/types/data1d/Peak.js +0 -1
- package/lib/data/types/data1d/Peaks.d.ts +0 -5
- package/lib/data/types/data1d/Peaks.js +0 -1
- package/lib/data/types/data1d/Range.d.ts +0 -11
- package/lib/data/types/data1d/Range.js +0 -1
- package/lib/data/types/data1d/Ranges.d.ts +0 -6
- package/lib/data/types/data1d/Ranges.js +0 -1
- package/lib/data/types/data1d/Signal1D.d.ts +0 -5
- package/lib/data/types/data1d/Signal1D.js +0 -1
- package/lib/data/types/data1d/SumOptions.d.ts +0 -7
- package/lib/data/types/data1d/SumOptions.js +0 -1
- package/lib/data/types/data2d/Data2D.d.ts +0 -20
- package/lib/data/types/data2d/Data2D.js +0 -1
- package/lib/data/types/data2d/Datum2D.d.ts +0 -19
- package/lib/data/types/data2d/Datum2D.js +0 -1
- package/lib/data/types/data2d/Display2D.d.ts +0 -11
- package/lib/data/types/data2d/Display2D.js +0 -1
- package/lib/data/types/data2d/Info2D.d.ts +0 -5
- package/lib/data/types/data2d/Info2D.js +0 -1
- package/lib/data/types/data2d/Signal2D.d.ts +0 -7
- package/lib/data/types/data2d/Signal2D.js +0 -1
- package/lib/data/types/data2d/Signal2DAxisData.d.ts +0 -4
- package/lib/data/types/data2d/Signal2DAxisData.js +0 -1
- package/lib/data/types/data2d/Zone.d.ts +0 -9
- package/lib/data/types/data2d/Zone.js +0 -1
- package/lib/data/types/data2d/Zone2DAxisData.d.ts +0 -6
- package/lib/data/types/data2d/Zone2DAxisData.js +0 -1
- package/lib/data/types/data2d/Zones.d.ts +0 -7
- package/lib/data/types/data2d/Zones.js +0 -1
- package/lib-cjs/data/data1d/filter1d/centerMean.js +0 -43
- package/lib-cjs/data/data1d/filter1d/fromTo.js +0 -37
- package/lib-cjs/data/data1d/filter1d/pareto.js +0 -35
- package/lib-cjs/data/data1d/filter1d/standardDeviation.js +0 -43
- package/lib-cjs/data/types/data1d/Data1D.js +0 -2
- package/lib-cjs/data/types/data1d/Datum1D.js +0 -2
- package/lib-cjs/data/types/data1d/Display1D.js +0 -2
- package/lib-cjs/data/types/data1d/Info1D.js +0 -2
- package/lib-cjs/data/types/data1d/Integral.js +0 -2
- package/lib-cjs/data/types/data1d/Integrals.js +0 -2
- package/lib-cjs/data/types/data1d/Peak.js +0 -2
- package/lib-cjs/data/types/data1d/Peaks.js +0 -2
- package/lib-cjs/data/types/data1d/Range.js +0 -2
- package/lib-cjs/data/types/data1d/Ranges.js +0 -2
- package/lib-cjs/data/types/data1d/Signal1D.js +0 -2
- package/lib-cjs/data/types/data1d/SumOptions.js +0 -2
- package/lib-cjs/data/types/data2d/Data2D.js +0 -2
- package/lib-cjs/data/types/data2d/Datum2D.js +0 -2
- package/lib-cjs/data/types/data2d/Display2D.js +0 -2
- package/lib-cjs/data/types/data2d/Info2D.js +0 -2
- package/lib-cjs/data/types/data2d/Signal2D.js +0 -2
- package/lib-cjs/data/types/data2d/Signal2DAxisData.js +0 -2
- package/lib-cjs/data/types/data2d/Zone.js +0 -2
- package/lib-cjs/data/types/data2d/Zone2DAxisData.js +0 -2
- package/lib-cjs/data/types/data2d/Zones.js +0 -2
|
@@ -2,6 +2,7 @@ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
|
2
2
|
/** @jsxImportSource @emotion/react */
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { useMemo, useEffect, useCallback } from 'react';
|
|
5
|
+
import { DropdownMenu } from 'react-science/ui';
|
|
5
6
|
import { HighlightEventSource, useHighlight } from '../../../highlight/index';
|
|
6
7
|
function getRowStyle(isActive, rowStyle = {}, disableDefaultRowStyle) {
|
|
7
8
|
const { hover = {}, active = {}, base = {}, activated = {} } = rowStyle;
|
|
@@ -35,7 +36,7 @@ function getIDs(row) {
|
|
|
35
36
|
return [''];
|
|
36
37
|
}
|
|
37
38
|
function ReactTableRow(props) {
|
|
38
|
-
const { row, highlightedSource = HighlightEventSource.UNKNOWN,
|
|
39
|
+
const { row, highlightedSource = HighlightEventSource.UNKNOWN, onContextMenuSelect, contextMenu = [], onClick, isRowActive = false, rowStyle, disableDefaultRowStyle, } = props;
|
|
39
40
|
const data = useMemo(() => ({
|
|
40
41
|
type: highlightedSource,
|
|
41
42
|
extra: row.original,
|
|
@@ -50,7 +51,7 @@ function ReactTableRow(props) {
|
|
|
50
51
|
const clickHandler = useCallback((event) => {
|
|
51
52
|
onClick?.(event, row);
|
|
52
53
|
}, [onClick, row]);
|
|
53
|
-
return (_jsx("
|
|
54
|
+
return (_jsx(DropdownMenu, { trigger: "contextMenu", options: contextMenu, onSelect: (selected) => onContextMenuSelect?.(selected, row.original), as: "tr", css: getRowStyle(highlight.isActive || isRowActive, rowStyle, disableDefaultRowStyle), ...row.getRowProps(), ...highlight.onHover, children: row.cells.map((cell) => {
|
|
54
55
|
const { style, padding } = cell.column;
|
|
55
56
|
if (cell.isRowSpanned) {
|
|
56
57
|
return null;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
|
2
2
|
import { CSSObject, SerializedStyles } from '@emotion/react';
|
|
3
3
|
import { CSSProperties } from 'react';
|
|
4
|
+
import { DropdownMenuProps } from 'react-science/ui';
|
|
4
5
|
import { CellProps, Column as ReactColumn, UseSortByColumnOptions } from 'react-table';
|
|
5
6
|
import { HighlightEventSource } from '../../highlight';
|
|
6
7
|
import { ClickEvent } from './Elements/ReactTableRow';
|
|
@@ -19,14 +20,14 @@ export interface BaseRowStyle {
|
|
|
19
20
|
hover?: CSSProperties;
|
|
20
21
|
base?: CSSProperties;
|
|
21
22
|
}
|
|
22
|
-
interface
|
|
23
|
+
export interface ContextMenuProps {
|
|
24
|
+
onContextMenuSelect?: (selected: Parameters<DropdownMenuProps<any, any>['onSelect']>[0], data: any) => void;
|
|
25
|
+
contextMenu?: DropdownMenuProps<any, any>['options'];
|
|
26
|
+
}
|
|
27
|
+
interface ReactTableProps extends ContextMenuProps, ClickEvent, SortEvent {
|
|
23
28
|
data: any;
|
|
24
29
|
columns: any;
|
|
25
30
|
highlightedSource?: HighlightEventSource;
|
|
26
|
-
context?: Array<{
|
|
27
|
-
label: string;
|
|
28
|
-
onClick: (data: any) => void;
|
|
29
|
-
}> | null;
|
|
30
31
|
approxItemHeight?: number;
|
|
31
32
|
approxColumnWidth?: number;
|
|
32
33
|
groupKey?: string;
|
|
@@ -38,8 +39,8 @@ interface ReactTableProps extends ClickEvent, SortEvent {
|
|
|
38
39
|
totalCount?: number;
|
|
39
40
|
emptyDataRowText?: string;
|
|
40
41
|
rowStyle?: BaseRowStyle | ((data: any) => BaseRowStyle | undefined);
|
|
41
|
-
disableDefaultRowStyle?: boolean;
|
|
42
42
|
style?: CSSObject | SerializedStyles;
|
|
43
|
+
disableDefaultRowStyle?: boolean;
|
|
43
44
|
}
|
|
44
45
|
export interface VirtualBoundary {
|
|
45
46
|
start: number;
|
|
@@ -2,8 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@emotion/reac
|
|
|
2
2
|
import { useRef, memo, forwardRef, useState, useLayoutEffect, useEffect, useMemo, } from 'react';
|
|
3
3
|
import { useTable, useSortBy, } from 'react-table';
|
|
4
4
|
import { useMeasure } from 'react-use';
|
|
5
|
-
import checkModifierKeyActivated from '../../../data/utilities/checkModifierKeyActivated';
|
|
6
|
-
import ContextMenu from '../ContextMenu';
|
|
7
5
|
import { EmptyDataRow } from './Elements/EmptyDataRow';
|
|
8
6
|
import ReactTableHeader from './Elements/ReactTableHeader';
|
|
9
7
|
import ReactTableRow from './Elements/ReactTableRow';
|
|
@@ -36,8 +34,7 @@ const counterStyle = {
|
|
|
36
34
|
fontSize: '1.4em',
|
|
37
35
|
};
|
|
38
36
|
const ReactTableInner = forwardRef(function ReactTableInner(props, ref) {
|
|
39
|
-
const { data, columns, highlightedSource,
|
|
40
|
-
const contextRef = useRef(null);
|
|
37
|
+
const { data, columns, highlightedSource, contextMenu = [], onContextMenuSelect, onScroll, approxItemHeight = 40, enableVirtualScroll = false, enableColumnsVirtualScroll = false, approxColumnWidth = 40, groupKey, onClick, activeRow, totalCount, indexKey = 'index', onSortEnd, rowStyle, disableDefaultRowStyle = false, enableDefaultActiveRow = false, emptyDataRowText = 'No Data', } = props;
|
|
41
38
|
const isSortedEventTriggered = useRef(false);
|
|
42
39
|
const virtualBoundary = useReactTableContext();
|
|
43
40
|
const [rowIndex, setRowIndex] = useState();
|
|
@@ -56,12 +53,6 @@ const ReactTableInner = forwardRef(function ReactTableInner(props, ref) {
|
|
|
56
53
|
data,
|
|
57
54
|
autoResetSortBy: false,
|
|
58
55
|
}, useSortBy, useRowSpan);
|
|
59
|
-
function contextMenuHandler(e, row) {
|
|
60
|
-
if (!checkModifierKeyActivated(e)) {
|
|
61
|
-
e.preventDefault();
|
|
62
|
-
contextRef.current.handleContextMenu(e, row.original);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
56
|
function clickHandler(event, row) {
|
|
66
57
|
setRowIndex(row.index);
|
|
67
58
|
onClick?.(event, row);
|
|
@@ -119,14 +110,14 @@ const ReactTableInner = forwardRef(function ReactTableInner(props, ref) {
|
|
|
119
110
|
? index + virtualBoundary.rows.start
|
|
120
111
|
: index, rowSpanHeaders, groupKey);
|
|
121
112
|
const { key, ...restRowProps } = row.getRowProps();
|
|
122
|
-
return (_jsx(ReactTableRow, { ...restRowProps, row: row,
|
|
113
|
+
return (_jsx(ReactTableRow, { ...restRowProps, row: row, contextMenu: contextMenu, onContextMenuSelect: onContextMenuSelect, onClick: !activeRow && enableDefaultActiveRow
|
|
123
114
|
? clickHandler
|
|
124
115
|
: onClick, highlightedSource: highlightedSource, isRowActive: !activeRow
|
|
125
116
|
? enableDefaultActiveRow
|
|
126
117
|
? rowIndex === index
|
|
127
118
|
: false
|
|
128
119
|
: activeRow(row), rowStyle: typeof rowStyle === 'function' ? rowStyle(row) : rowStyle, disableDefaultRowStyle: disableDefaultRowStyle }, key));
|
|
129
|
-
})] })] })
|
|
120
|
+
})] })] })] }), (enableVirtualScroll || enableColumnsVirtualScroll) && (_jsxs("p", { style: {
|
|
130
121
|
...counterStyle,
|
|
131
122
|
...(enableColumnsVirtualScroll && { bottom: '15px' }),
|
|
132
123
|
opacity: !isCounterVisible ? '0' : '1',
|
|
@@ -30,14 +30,6 @@ const ReactTableStyle = css `
|
|
|
30
30
|
padding: 0.15rem 0.4rem;
|
|
31
31
|
border-bottom: 1px solid #dedede;
|
|
32
32
|
border-right: 1px solid #dedede;
|
|
33
|
-
|
|
34
|
-
// :last-child {
|
|
35
|
-
// border-right: 0;
|
|
36
|
-
// }
|
|
37
|
-
button {
|
|
38
|
-
background-color: transparent;
|
|
39
|
-
border: none;
|
|
40
|
-
}
|
|
41
33
|
}
|
|
42
34
|
`;
|
|
43
35
|
export { ReactTableStyle };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { NumberInputProps } from '../NumberInput';
|
|
3
3
|
interface FormikNumberInputProps extends NumberInputProps {
|
|
4
|
-
label?: string;
|
|
5
4
|
name: string;
|
|
5
|
+
checkErrorAfterInputTouched?: boolean;
|
|
6
6
|
}
|
|
7
7
|
declare function FormikNumberInput(props: FormikNumberInputProps): JSX.Element;
|
|
8
8
|
export default FormikNumberInput;
|
|
@@ -4,11 +4,21 @@ import lodashGet from 'lodash/get';
|
|
|
4
4
|
import { useCallback } from 'react';
|
|
5
5
|
import NumberInput from '../NumberInput';
|
|
6
6
|
function FormikNumberInput(props) {
|
|
7
|
-
const {
|
|
8
|
-
const { values, handleChange } = useFormikContext();
|
|
7
|
+
const { name, checkErrorAfterInputTouched = false, style = {}, ...resProps } = props;
|
|
8
|
+
const { values, errors, touched, handleChange } = useFormikContext();
|
|
9
9
|
const changeHandler = useCallback((e) => {
|
|
10
10
|
handleChange(e);
|
|
11
11
|
}, [handleChange]);
|
|
12
|
-
|
|
12
|
+
let isInvalid = lodashGet(errors, name);
|
|
13
|
+
if (checkErrorAfterInputTouched) {
|
|
14
|
+
isInvalid = lodashGet(errors, name) && lodashGet(touched, name);
|
|
15
|
+
}
|
|
16
|
+
return (_jsx(NumberInput, { name: name, value: lodashGet(values, name), onChange: changeHandler, style: {
|
|
17
|
+
...style,
|
|
18
|
+
...(isInvalid && {
|
|
19
|
+
border: '1px solid red',
|
|
20
|
+
outline: 'none',
|
|
21
|
+
}),
|
|
22
|
+
}, ...resProps }));
|
|
13
23
|
}
|
|
14
24
|
export default FormikNumberInput;
|
|
@@ -11,8 +11,7 @@ import FormikCheckBox from '../elements/formik/FormikCheckBox';
|
|
|
11
11
|
import FormikInput from '../elements/formik/FormikInput';
|
|
12
12
|
import FormikOnChange from '../elements/formik/FormikOnChange';
|
|
13
13
|
import { useFilter } from '../hooks/useFilter';
|
|
14
|
-
import { APPLY_APODIZATION_FILTER, CALCULATE_APODIZATION_FILTER,
|
|
15
|
-
import { options } from '../toolbar/ToolTypes';
|
|
14
|
+
import { APPLY_APODIZATION_FILTER, CALCULATE_APODIZATION_FILTER, RESET_SELECTED_TOOL, } from '../reducer/types/Types';
|
|
16
15
|
import { headerLabelStyle } from './Header';
|
|
17
16
|
import { HeaderContainer } from './HeaderContainer';
|
|
18
17
|
const inputStyle = {
|
|
@@ -50,20 +49,11 @@ function ApodizationOptionsInnerPanel(props) {
|
|
|
50
49
|
type: RESET_SELECTED_TOOL,
|
|
51
50
|
});
|
|
52
51
|
}
|
|
53
|
-
function disableLivePreviewHandler(event) {
|
|
54
|
-
//disable filter Live preview
|
|
55
|
-
if (!event.target.checked) {
|
|
56
|
-
dispatch({
|
|
57
|
-
type: DISABLE_FILTER_LIVE_PREVIEW,
|
|
58
|
-
payload: { selectedTool: options.apodization.id },
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
52
|
let formData = initialValues;
|
|
63
53
|
if (props.filter) {
|
|
64
54
|
formData = { ...initialValues, ...props.filter.value, livePreview: true };
|
|
65
55
|
}
|
|
66
|
-
return (_jsxs(HeaderContainer, { children: [_jsx(Formik, { innerRef: formRef, onSubmit: (values) => handleApplyFilter(values), initialValues: formData, validationSchema: validationSchema, children: _jsxs(_Fragment, { children: [_jsx(Label, { title: "Line broadening : ", shortTitle: "LB :", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "lineBroadening", min: 0, max: 1, style: inputStyle, debounceTime: 250 }) }), _jsx(Label, { title: "Gauss broadening :", shortTitle: "GB :", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "gaussBroadening", min: 0, max: 1, style: inputStyle, debounceTime: 250 }) }), _jsx(Label, { title: "lineBroadeningCenter [0 - 1] : ", shortTitle: "LB Center :", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "lineBroadeningCenter", min: 0, max: 1, style: inputStyle, debounceTime: 250 }) }), _jsx(Label, { title: "Live preview ", htmlFor: "livePreview", style: { label: { padding: '0 5px' } }, children: _jsx(FormikCheckBox, { name: "livePreview"
|
|
56
|
+
return (_jsxs(HeaderContainer, { children: [_jsx(Formik, { innerRef: formRef, onSubmit: (values) => handleApplyFilter(values), initialValues: formData, validationSchema: validationSchema, children: _jsxs(_Fragment, { children: [_jsx(Label, { title: "Line broadening : ", shortTitle: "LB :", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "lineBroadening", min: 0, max: 1, style: inputStyle, debounceTime: 250 }) }), _jsx(Label, { title: "Gauss broadening :", shortTitle: "GB :", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "gaussBroadening", min: 0, max: 1, style: inputStyle, debounceTime: 250 }) }), _jsx(Label, { title: "lineBroadeningCenter [0 - 1] : ", shortTitle: "LB Center :", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "lineBroadeningCenter", min: 0, max: 1, style: inputStyle, debounceTime: 250 }) }), _jsx(Label, { title: "Live preview ", htmlFor: "livePreview", style: { label: { padding: '0 5px' } }, children: _jsx(FormikCheckBox, { name: "livePreview" }) }), _jsx(FormikOnChange, { onChange: (values) => handleApplyFilter(values, 'onChange'), enableOnload: true })] }) }), _jsx(ActionButtons, { onDone: () => formRef.current?.submitForm(), onCancel: handleCancelFilter })] }));
|
|
67
57
|
}
|
|
68
58
|
const MemoizedApodizationPanel = memo(ApodizationOptionsInnerPanel);
|
|
69
59
|
export default function ApodizationOptionsPanel() {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Formik } from 'formik';
|
|
3
|
-
import { memo, useCallback
|
|
3
|
+
import { memo, useCallback } from 'react';
|
|
4
|
+
import * as Yup from 'yup';
|
|
4
5
|
import { useDispatch } from '../context/DispatchContext';
|
|
5
6
|
import Button from '../elements/Button';
|
|
6
7
|
import Label from '../elements/Label';
|
|
@@ -10,16 +11,7 @@ import { AUTO_PEAK_PICKING } from '../reducer/types/Types';
|
|
|
10
11
|
import { headerLabelStyle } from './Header';
|
|
11
12
|
import { HeaderContainer } from './HeaderContainer';
|
|
12
13
|
const inputStyle = {
|
|
13
|
-
|
|
14
|
-
width: '50px',
|
|
15
|
-
margin: '0px',
|
|
16
|
-
},
|
|
17
|
-
inputContainer: {
|
|
18
|
-
flex: '2',
|
|
19
|
-
},
|
|
20
|
-
container: {
|
|
21
|
-
height: '100%',
|
|
22
|
-
},
|
|
14
|
+
width: '60px',
|
|
23
15
|
};
|
|
24
16
|
const LookFor = [
|
|
25
17
|
{
|
|
@@ -35,6 +27,11 @@ const LookFor = [
|
|
|
35
27
|
value: 'both',
|
|
36
28
|
},
|
|
37
29
|
];
|
|
30
|
+
const validationSchema = Yup.object().shape({
|
|
31
|
+
maxNumberOfPeaks: Yup.number().min(0).required(),
|
|
32
|
+
minMaxRatio: Yup.number().min(0).required(),
|
|
33
|
+
noiseFactor: Yup.number().min(0).required(),
|
|
34
|
+
});
|
|
38
35
|
const INIT_VALUES = {
|
|
39
36
|
maxNumberOfPeaks: 50,
|
|
40
37
|
minMaxRatio: 0.1,
|
|
@@ -43,13 +40,12 @@ const INIT_VALUES = {
|
|
|
43
40
|
};
|
|
44
41
|
function AutoPeakPickingOptionPanel() {
|
|
45
42
|
const dispatch = useDispatch();
|
|
46
|
-
const
|
|
47
|
-
const handleApplyFilter = useCallback((values) => {
|
|
43
|
+
const handlePeakPicking = useCallback((values) => {
|
|
48
44
|
dispatch({
|
|
49
45
|
type: AUTO_PEAK_PICKING,
|
|
50
|
-
|
|
46
|
+
payload: values,
|
|
51
47
|
});
|
|
52
48
|
}, [dispatch]);
|
|
53
|
-
return (
|
|
49
|
+
return (_jsx(HeaderContainer, { children: _jsx(Formik, { initialValues: INIT_VALUES, onSubmit: handlePeakPicking, validationSchema: validationSchema, children: ({ handleSubmit, isValid }) => (_jsxs(_Fragment, { children: [_jsx(Label, { title: "Direction : ", shortTitle: "", style: headerLabelStyle, children: _jsx(FormikSelect, { name: "direction", items: LookFor, style: { width: '85px' } }) }), _jsx(Label, { title: "Max Number Of Peaks :", shortTitle: "Peaks number :", style: headerLabelStyle, children: _jsx(FormikNumberInput, { name: "maxNumberOfPeaks", style: inputStyle, min: 0 }) }), _jsx(Label, { title: "Noise factor :", shortTitle: "Noise :", style: headerLabelStyle, children: _jsx(FormikNumberInput, { name: "noiseFactor", style: inputStyle, min: 0 }) }), _jsx(Label, { title: "Min Max Ratio :", shortTitle: "Ratio :", style: headerLabelStyle, children: _jsx(FormikNumberInput, { name: "minMaxRatio", style: inputStyle, step: "0.01", min: 0 }) }), _jsx(Button.Done, { onClick: () => handleSubmit(), style: { margin: '0 10px' }, disabled: !isValid, children: "Apply" })] })) }) }));
|
|
54
50
|
}
|
|
55
51
|
export default memo(AutoPeakPickingOptionPanel);
|
|
@@ -11,8 +11,7 @@ import FormikCheckBox from '../elements/formik/FormikCheckBox';
|
|
|
11
11
|
import FormikInput from '../elements/formik/FormikInput';
|
|
12
12
|
import FormikOnChange from '../elements/formik/FormikOnChange';
|
|
13
13
|
import { useFilter } from '../hooks/useFilter';
|
|
14
|
-
import { RESET_SELECTED_TOOL, APPLY_BASE_LINE_CORRECTION_FILTER, CALCULATE_BASE_LINE_CORRECTION_FILTER,
|
|
15
|
-
import { options } from '../toolbar/ToolTypes';
|
|
14
|
+
import { RESET_SELECTED_TOOL, APPLY_BASE_LINE_CORRECTION_FILTER, CALCULATE_BASE_LINE_CORRECTION_FILTER, } from '../reducer/types/Types';
|
|
16
15
|
import { headerLabelStyle } from './Header';
|
|
17
16
|
import { HeaderContainer } from './HeaderContainer';
|
|
18
17
|
const getAlgorithmsList = () => {
|
|
@@ -80,21 +79,12 @@ function BaseLineCorrectionInnerPanel(props) {
|
|
|
80
79
|
type: RESET_SELECTED_TOOL,
|
|
81
80
|
});
|
|
82
81
|
};
|
|
83
|
-
const disableLivePreviewHandler = (event) => {
|
|
84
|
-
//disable filter Live preview
|
|
85
|
-
if (!event.target.checked) {
|
|
86
|
-
dispatch({
|
|
87
|
-
type: DISABLE_FILTER_LIVE_PREVIEW,
|
|
88
|
-
payload: { selectedTool: options.baselineCorrection.id },
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
82
|
function handleChangeAlgorithm(selectedAlgorithm) {
|
|
93
83
|
setAlgorithm(selectedAlgorithm);
|
|
94
84
|
}
|
|
95
85
|
const form = formData(algorithm, props?.filter?.value || {});
|
|
96
86
|
return (_jsxs(HeaderContainer, { children: [_jsx(Label, { title: "Algorithm: ", style: headerLabelStyle, children: _jsx(Select, { items: getAlgorithmsList(), value: algorithm, onChange: handleChangeAlgorithm }) }), _jsx(Formik, { innerRef: formRef, onSubmit: (values) => handleApplyFilter(values), initialValues: form.values, validationSchema: form.validation, enableReinitialize: true, children: _jsxs(_Fragment, { children: [algorithm && algorithm === 'airpls' && (_jsxs("div", { style: { display: 'flex' }, children: [_jsx(Label, { title: "maxIterations:", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "maxIterations", debounceTime: 250, style: inputStyle }) }), _jsx(Label, { title: "tolerance:", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "tolerance", debounceTime: 250, style: inputStyle }) })] })), algorithm &&
|
|
97
|
-
['autoPolynomial', 'polynomial'].includes(algorithm) && (_jsx(Label, { title: "degree [ 1 - 6 ]:", shortTitle: "degree :", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "degree", min: 1, max: 6, style: inputStyle, debounceTime: 250 }) })), _jsx(Label, { title: "live preview ", htmlFor: "livePreview", style: headerLabelStyle, children: _jsx(FormikCheckBox, { name: "livePreview"
|
|
87
|
+
['autoPolynomial', 'polynomial'].includes(algorithm) && (_jsx(Label, { title: "degree [ 1 - 6 ]:", shortTitle: "degree :", style: headerLabelStyle, children: _jsx(FormikInput, { type: "number", name: "degree", min: 1, max: 6, style: inputStyle, debounceTime: 250 }) })), _jsx(Label, { title: "live preview ", htmlFor: "livePreview", style: headerLabelStyle, children: _jsx(FormikCheckBox, { name: "livePreview" }) }), _jsx(FormikOnChange, { onChange: (values) => handleApplyFilter(values, 'onChange'), enableOnload: true })] }) }), _jsx(ActionButtons, { onDone: () => formRef.current?.submitForm(), onCancel: handleCancelFilter })] }));
|
|
98
88
|
}
|
|
99
89
|
const MemoizedBaseLineCorrectionPanel = memo(BaseLineCorrectionInnerPanel);
|
|
100
90
|
export default function BaseLineCorrectionPanel() {
|
|
@@ -20,7 +20,7 @@ import AutoPeakPickingOptionPanel from './AutoPeakPickingOptionPanel';
|
|
|
20
20
|
import BaseLineCorrectionPanel from './BaseLineCorrectionPanel';
|
|
21
21
|
import { HeaderContainer } from './HeaderContainer';
|
|
22
22
|
import { LogsHistory } from './LogsHistory';
|
|
23
|
-
import
|
|
23
|
+
import PhaseCorrectionPanel from './PhaseCorrectionPanel';
|
|
24
24
|
import RangesPickingOptionPanel from './RangesPickingOptionPanel';
|
|
25
25
|
import ZeroFillingOptionsPanel from './ZeroFillingOptionsPanel';
|
|
26
26
|
import Zones2DOptionPanel from './Zones2DOptionPanel';
|
|
@@ -72,7 +72,7 @@ function HeaderInner(props) {
|
|
|
72
72
|
case options.zeroFilling.id:
|
|
73
73
|
return _jsx(ZeroFillingOptionsPanel, {});
|
|
74
74
|
case options.phaseCorrection.id:
|
|
75
|
-
return _jsx(
|
|
75
|
+
return _jsx(PhaseCorrectionPanel, {});
|
|
76
76
|
case options.peakPicking.id:
|
|
77
77
|
return _jsx(AutoPeakPickingOptionPanel, {});
|
|
78
78
|
case options.rangePicking.id:
|
|
@@ -44,7 +44,7 @@ const algorithms = [
|
|
|
44
44
|
},
|
|
45
45
|
];
|
|
46
46
|
const emptyData = { datum: {}, filter: null };
|
|
47
|
-
export default function
|
|
47
|
+
export default function PhaseCorrectionPanel() {
|
|
48
48
|
const { toolOptions: { data: { pivot }, }, } = useChartData();
|
|
49
49
|
const { data } = useSpectrum(emptyData);
|
|
50
50
|
const filter = useFilter(Filters.phaseCorrection.id);
|
|
@@ -55,17 +55,21 @@ export default function ManualPhaseCorrectionPanel() {
|
|
|
55
55
|
const ph1Ref = useRef();
|
|
56
56
|
const [phaseCorrectionType, setPhaseCorrectionType] = useState(phaseCorrectionTypes.manual);
|
|
57
57
|
useEffect(() => {
|
|
58
|
-
if (filter) {
|
|
58
|
+
if (filter && phaseCorrectionType === phaseCorrectionTypes.manual) {
|
|
59
59
|
valueRef.current = filter.value;
|
|
60
60
|
setValue(filter.value);
|
|
61
|
-
ph0Ref.current.setValue(filter.value.ph0);
|
|
62
|
-
ph1Ref.current.setValue(filter.value.ph1);
|
|
63
61
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
if (ph0Ref.current && ph1Ref.current) {
|
|
63
|
+
if (filter) {
|
|
64
|
+
ph0Ref.current.setValue(filter.value.ph0);
|
|
65
|
+
ph1Ref.current.setValue(filter.value.ph1);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
ph0Ref.current.setValue(valueRef.current.ph0);
|
|
69
|
+
ph1Ref.current.setValue(valueRef.current.ph1);
|
|
70
|
+
}
|
|
67
71
|
}
|
|
68
|
-
}, [filter]);
|
|
72
|
+
}, [filter, phaseCorrectionType]);
|
|
69
73
|
const handleApplyFilter = useCallback(() => {
|
|
70
74
|
switch (phaseCorrectionType) {
|
|
71
75
|
case phaseCorrectionTypes.automatic: {
|
|
@@ -95,13 +99,19 @@ export default function ManualPhaseCorrectionPanel() {
|
|
|
95
99
|
if (filedName === 'ph1' && data.re) {
|
|
96
100
|
const diff0 = newValues.ph0 - valueRef.current.ph0;
|
|
97
101
|
const diff1 = newValues.ph1 - valueRef.current.ph1;
|
|
98
|
-
newValues.ph0 +=
|
|
102
|
+
newValues.ph0 +=
|
|
103
|
+
diff0 - (diff1 * (data.re.length - pivot?.index)) / data.re.length;
|
|
99
104
|
}
|
|
100
105
|
dispatch({
|
|
101
106
|
type: CALCULATE_MANUAL_PHASE_CORRECTION_FILTER,
|
|
102
107
|
value: newValues,
|
|
103
108
|
});
|
|
104
109
|
}, [data.re, dispatch, pivot?.index]);
|
|
110
|
+
const updateInputRangeInitialValue = useCallback((value) => {
|
|
111
|
+
// update InputRange initial value
|
|
112
|
+
ph0Ref.current.setValue(value.ph0);
|
|
113
|
+
ph1Ref.current.setValue(value.ph1);
|
|
114
|
+
}, []);
|
|
105
115
|
const handleInput = useCallback((e) => {
|
|
106
116
|
const { name, value } = e.target;
|
|
107
117
|
if (e.target) {
|
|
@@ -109,27 +119,18 @@ export default function ManualPhaseCorrectionPanel() {
|
|
|
109
119
|
if (String(value).trim() !== '-') {
|
|
110
120
|
calcPhaseCorrectionHandler(newValue, name);
|
|
111
121
|
}
|
|
112
|
-
|
|
113
|
-
switch (name) {
|
|
114
|
-
case 'ph0':
|
|
115
|
-
ph0Ref.current.setValue(newValue.ph0);
|
|
116
|
-
break;
|
|
117
|
-
case 'ph1':
|
|
118
|
-
ph1Ref.current.setValue(newValue.ph1);
|
|
119
|
-
break;
|
|
120
|
-
default:
|
|
121
|
-
break;
|
|
122
|
-
}
|
|
122
|
+
updateInputRangeInitialValue(newValue);
|
|
123
123
|
valueRef.current = newValue;
|
|
124
124
|
setValue(valueRef.current);
|
|
125
125
|
}
|
|
126
|
-
}, [calcPhaseCorrectionHandler]);
|
|
126
|
+
}, [calcPhaseCorrectionHandler, updateInputRangeInitialValue]);
|
|
127
127
|
const handleRangeChange = useCallback((e) => {
|
|
128
128
|
const newValue = { ...valueRef.current, [e.name]: e.value };
|
|
129
129
|
calcPhaseCorrectionHandler(newValue, e.name);
|
|
130
|
+
updateInputRangeInitialValue(newValue);
|
|
130
131
|
valueRef.current = newValue;
|
|
131
132
|
setValue(valueRef.current);
|
|
132
|
-
}, [calcPhaseCorrectionHandler]);
|
|
133
|
+
}, [calcPhaseCorrectionHandler, updateInputRangeInitialValue]);
|
|
133
134
|
const handleCancelFilter = useCallback(() => {
|
|
134
135
|
dispatch({
|
|
135
136
|
type: RESET_SELECTED_TOOL,
|
|
@@ -1,43 +1,32 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Formik } from 'formik';
|
|
3
|
+
import { useCallback } from 'react';
|
|
4
|
+
import * as Yup from 'yup';
|
|
3
5
|
import { useDispatch } from '../context/DispatchContext';
|
|
4
6
|
import Button from '../elements/Button';
|
|
5
|
-
import CheckBox from '../elements/CheckBox';
|
|
6
7
|
import Label from '../elements/Label';
|
|
7
|
-
import
|
|
8
|
+
import FormikCheckBox from '../elements/formik/FormikCheckBox';
|
|
9
|
+
import FormikNumberInput from '../elements/formik/FormikNumberInput';
|
|
8
10
|
import { AUTO_RANGES_DETECTION } from '../reducer/types/Types';
|
|
9
11
|
import { headerLabelStyle } from './Header';
|
|
10
12
|
import { HeaderContainer } from './HeaderContainer';
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
margin: '0px',
|
|
18
|
-
},
|
|
19
|
-
inputContainer: {
|
|
20
|
-
flex: 2,
|
|
21
|
-
},
|
|
22
|
-
container: {
|
|
23
|
-
height: '100%',
|
|
24
|
-
},
|
|
13
|
+
const validationSchema = Yup.object().shape({
|
|
14
|
+
minMaxRatio: Yup.number().min(0).required(),
|
|
15
|
+
});
|
|
16
|
+
const initialValues = {
|
|
17
|
+
minMaxRatio: 0.05,
|
|
18
|
+
lookNegative: false,
|
|
25
19
|
};
|
|
26
20
|
function RangesPickingOptionPanel() {
|
|
27
21
|
const dispatch = useDispatch();
|
|
28
|
-
const
|
|
29
|
-
const minMaxRatioRef = useRef();
|
|
30
|
-
const handleApplyFilter = useCallback(() => {
|
|
22
|
+
const handleRangesPicking = useCallback((values) => {
|
|
31
23
|
dispatch({
|
|
32
24
|
type: AUTO_RANGES_DETECTION,
|
|
33
|
-
|
|
34
|
-
peakPicking: {
|
|
35
|
-
minMaxRatio: Number(minMaxRatioRef.current.value) || 0.05,
|
|
36
|
-
lookNegative: lookNegativeRef.current.checked,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
25
|
+
payload: values,
|
|
39
26
|
});
|
|
40
27
|
}, [dispatch]);
|
|
41
|
-
return (
|
|
28
|
+
return (_jsx(HeaderContainer, { children: _jsx(Formik, { onSubmit: handleRangesPicking, initialValues: initialValues, validationSchema: validationSchema, children: ({ handleSubmit, isValid }) => (_jsxs(_Fragment, { children: [_jsx(Label, { title: "Detect negative:", htmlFor: "lookNegative", style: headerLabelStyle, children: _jsx(FormikCheckBox, { name: "lookNegative" }) }), _jsx(Label, { title: "Min Max Ratio:", style: headerLabelStyle, children: _jsx(FormikNumberInput, { name: "minMaxRatio", style: {
|
|
29
|
+
width: '70px',
|
|
30
|
+
}, step: "0.01", min: 0 }) }), _jsx(Button.Done, { onClick: () => handleSubmit(), style: { margin: '0 10px' }, disabled: !isValid, children: "Auto ranges picking" })] })) }) }));
|
|
42
31
|
}
|
|
43
32
|
export default RangesPickingOptionPanel;
|
|
@@ -9,7 +9,7 @@ import Label from '../elements/Label';
|
|
|
9
9
|
import Select from '../elements/Select';
|
|
10
10
|
import { useFilter } from '../hooks/useFilter';
|
|
11
11
|
import useSpectrum from '../hooks/useSpectrum';
|
|
12
|
-
import { APPLY_ZERO_FILLING_FILTER, CALCULATE_ZERO_FILLING_FILTER,
|
|
12
|
+
import { APPLY_ZERO_FILLING_FILTER, CALCULATE_ZERO_FILLING_FILTER, RESET_SELECTED_TOOL, } from '../reducer/types/Types';
|
|
13
13
|
import { options } from '../toolbar/ToolTypes';
|
|
14
14
|
import { headerLabelStyle } from './Header';
|
|
15
15
|
import { HeaderContainer } from './HeaderContainer';
|
|
@@ -66,7 +66,6 @@ function ZeroFillingOptionsInnerPanel(props) {
|
|
|
66
66
|
if (!checked) {
|
|
67
67
|
//disable filter Live preview
|
|
68
68
|
dispatch({
|
|
69
|
-
type: DISABLE_FILTER_LIVE_PREVIEW,
|
|
70
69
|
payload: { selectedTool: options.zeroFilling.id },
|
|
71
70
|
});
|
|
72
71
|
}
|
|
@@ -1,39 +1,32 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Formik } from 'formik';
|
|
3
|
+
import { useCallback } from 'react';
|
|
4
|
+
import * as Yup from 'yup';
|
|
3
5
|
import { useDispatch } from '../context/DispatchContext';
|
|
4
6
|
import Button from '../elements/Button';
|
|
5
7
|
import Label from '../elements/Label';
|
|
6
|
-
import
|
|
8
|
+
import FormikNumberInput from '../elements/formik/FormikNumberInput';
|
|
9
|
+
import FormikOnChange from '../elements/formik/FormikOnChange';
|
|
7
10
|
import { AUTO_ZONES_DETECTION, CHANGE_ZONES_NOISE_FACTOR, } from '../reducer/types/Types';
|
|
8
11
|
import { headerLabelStyle } from './Header';
|
|
9
12
|
import { HeaderContainer } from './HeaderContainer';
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
flex: '2',
|
|
16
|
-
},
|
|
17
|
-
container: {
|
|
18
|
-
height: '100%',
|
|
19
|
-
},
|
|
13
|
+
const validationSchema = Yup.object().shape({
|
|
14
|
+
thresholdFactor: Yup.number().min(0).required(),
|
|
15
|
+
});
|
|
16
|
+
const initialValues = {
|
|
17
|
+
thresholdFactor: 1,
|
|
20
18
|
};
|
|
21
19
|
function Zones2DOptionPanel() {
|
|
22
20
|
const dispatch = useDispatch();
|
|
23
|
-
const
|
|
24
|
-
const handleApplyFilter = useCallback(() => {
|
|
21
|
+
const handleZonesPicking = useCallback((values) => {
|
|
25
22
|
dispatch({
|
|
26
23
|
type: AUTO_ZONES_DETECTION,
|
|
27
|
-
|
|
28
|
-
thresholdFactor: thresholdFactor.current.value,
|
|
29
|
-
},
|
|
24
|
+
payload: values,
|
|
30
25
|
});
|
|
31
26
|
}, [dispatch]);
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
dispatch({ type: CHANGE_ZONES_NOISE_FACTOR, payload: e.target.value });
|
|
35
|
-
}
|
|
27
|
+
const handleChangeNoiseFactory = useCallback((values) => {
|
|
28
|
+
dispatch({ type: CHANGE_ZONES_NOISE_FACTOR, payload: values });
|
|
36
29
|
}, [dispatch]);
|
|
37
|
-
return (
|
|
30
|
+
return (_jsx(HeaderContainer, { children: _jsx(Formik, { onSubmit: handleZonesPicking, initialValues: initialValues, validationSchema: validationSchema, children: ({ handleSubmit, isValid }) => (_jsxs(_Fragment, { children: [_jsx(Label, { title: "Noise factor :", htmlFor: "livePreview", style: headerLabelStyle, children: _jsx(FormikNumberInput, { name: "thresholdFactor", style: { width: '50px' }, min: 0 }) }), _jsx(FormikOnChange, { enableValidation: true, onChange: handleChangeNoiseFactory }), _jsx(Button.Done, { onClick: () => handleSubmit(), style: { margin: '0 10px' }, disabled: !isValid, children: "Auto Zones Picking" })] })) }) }));
|
|
38
31
|
}
|
|
39
32
|
export default Zones2DOptionPanel;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Range } from 'nmr-load-save';
|
|
1
2
|
import { MouseEvent, CSSProperties } from 'react';
|
|
2
3
|
import { ExclusionZone } from '../../data/types/data1d/ExclusionZone';
|
|
3
|
-
import { RangeData } from '../1d/ranges/Range';
|
|
4
4
|
export declare enum HighlightEventSource {
|
|
5
5
|
PEAK = "PEAK",
|
|
6
6
|
INTEGRAL = "INTEGRAL",
|
|
@@ -23,7 +23,7 @@ interface SourceData {
|
|
|
23
23
|
id?: string;
|
|
24
24
|
jcampURL?: string;
|
|
25
25
|
baseURL?: string;
|
|
26
|
-
ranges?:
|
|
26
|
+
ranges?: Range[];
|
|
27
27
|
colKey?: string;
|
|
28
28
|
} | null;
|
|
29
29
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Info1D } from '
|
|
2
|
-
import { Info2D } from '../../data/types/data2d';
|
|
1
|
+
import { Info1D, Info2D } from 'nmr-load-save';
|
|
3
2
|
import { NMRiumToolBarPreferences } from '../../types/NMRiumToolBarPreferences';
|
|
4
3
|
type SpectrumInfo = Info1D | Info2D;
|
|
5
4
|
interface CheckOptions {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Info1D
|
|
2
|
-
import { Info2D as Datum2DInfo, Data2D } from '../../data/types/data2d';
|
|
1
|
+
import { Info1D, Info2D, Data1D, Data2D } from 'nmr-load-save';
|
|
3
2
|
interface SpectrumWithStatisticsProps {
|
|
4
|
-
info:
|
|
3
|
+
info: Info1D | Info2D;
|
|
5
4
|
datum: Data1D | Data2D;
|
|
6
5
|
ftCounter: number;
|
|
7
6
|
fidCounter: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useFilter(filterID: string): import("
|
|
1
|
+
export declare function useFilter(filterID: string): import("nmr-load-save/lib/types/Filter").Filter | null;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export default function useSpectraByActiveNucleus(): (Datum1D | Datum2D)[];
|
|
1
|
+
import { Spectrum } from 'nmr-load-save';
|
|
2
|
+
export default function useSpectraByActiveNucleus(): Spectrum[];
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export default function useSpectrum(defaultValue?: any): Datum1D | Datum2D;
|
|
1
|
+
import { Spectrum } from 'nmr-load-save';
|
|
2
|
+
export default function useSpectrum(defaultValue?: any): Spectrum;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Peak1D } from 'nmr-load-save';
|
|
2
2
|
import { PeaksNucleusPreferences } from '../workspaces/Workspace';
|
|
3
3
|
interface EditPeakShapeModalProps {
|
|
4
4
|
onClose?: (element?: string) => void;
|
|
5
|
-
peak:
|
|
5
|
+
peak: Peak1D;
|
|
6
6
|
peaksPreferences: PeaksNucleusPreferences;
|
|
7
7
|
}
|
|
8
8
|
declare function EditPeakShapeModal({ onClose, peak, peaksPreferences, }: EditPeakShapeModalProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Spectrum } from 'nmr-load-save';
|
|
3
|
+
interface ExportAsJCAMPProps {
|
|
4
|
+
closeDialog: () => void;
|
|
5
|
+
spectrum: Spectrum;
|
|
6
|
+
}
|
|
7
|
+
declare function ExportAsJcampModal(props: ExportAsJCAMPProps): JSX.Element;
|
|
8
|
+
export default ExportAsJcampModal;
|