nmrium 0.63.2 → 0.65.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/BrushTracker1D.d.ts.map +1 -1
- package/lib/component/1d/BrushTracker1D.js +20 -5
- package/lib/component/1d/BrushTracker1D.js.map +1 -1
- package/lib/component/1d/FloatPublicationString.js +1 -1
- package/lib/component/1d/FloatPublicationString.js.map +1 -1
- package/lib/component/1d/FloatingRanges.js +1 -1
- package/lib/component/1d/FloatingRanges.js.map +1 -1
- package/lib/component/1d/PredictionErrorsNotations.d.ts +2 -0
- package/lib/component/1d/PredictionErrorsNotations.d.ts.map +1 -0
- package/lib/component/1d/PredictionErrorsNotations.js +112 -0
- package/lib/component/1d/PredictionErrorsNotations.js.map +1 -0
- package/lib/component/1d/SVGContent1D.d.ts.map +1 -1
- package/lib/component/1d/SVGContent1D.js +2 -1
- package/lib/component/1d/SVGContent1D.js.map +1 -1
- package/lib/component/1d/Viewer1D.js +1 -1
- package/lib/component/1d/Viewer1D.js.map +1 -1
- package/lib/component/1d/integral/IntegralResizable.d.ts +1 -1
- package/lib/component/1d/integral/IntegralResizable.d.ts.map +1 -1
- package/lib/component/1d/integral/IntegralsSeries.d.ts +1 -1
- package/lib/component/1d/integral/IntegralsSeries.d.ts.map +1 -1
- package/lib/component/1d/integral/IntegralsSeries.js.map +1 -1
- package/lib/component/1d/jCouplingGraph/JGraph.js.map +1 -1
- package/lib/component/1d/jCouplingGraph/JsCouplings.d.ts +1 -1
- package/lib/component/1d/jCouplingGraph/JsCouplings.d.ts.map +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts.map +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js.map +1 -1
- package/lib/component/1d/multiplicityTree/generateTreeNodes.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/generateTreeNodes.d.ts.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.d.ts.map +1 -1
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js +2 -4
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js.map +1 -1
- package/lib/component/1d/peaks/Peaks.d.ts +1 -1
- package/lib/component/1d/peaks/Peaks.d.ts.map +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.d.ts +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.d.ts.map +1 -1
- package/lib/component/1d/ranges/AssignmentLabel.d.ts +1 -1
- package/lib/component/1d/ranges/AssignmentLabel.d.ts.map +1 -1
- package/lib/component/1d/ranges/Atoms.d.ts +1 -1
- package/lib/component/1d/ranges/Atoms.d.ts.map +1 -1
- package/lib/component/1d/ranges/Range.d.ts +1 -1
- package/lib/component/1d/ranges/Range.d.ts.map +1 -1
- package/lib/component/1d/ranges/Ranges.d.ts.map +1 -1
- package/lib/component/1d/ranges/Ranges.js.map +1 -1
- package/lib/component/1d-2d/components/SpectrumInfoBlock.d.ts.map +1 -1
- package/lib/component/1d-2d/components/SpectrumInfoBlock.js +2 -4
- package/lib/component/1d-2d/components/SpectrumInfoBlock.js.map +1 -1
- package/lib/component/1d-2d/tools/BrushXY.d.ts +10 -7
- package/lib/component/1d-2d/tools/BrushXY.d.ts.map +1 -1
- package/lib/component/1d-2d/tools/BrushXY.js +177 -16
- package/lib/component/1d-2d/tools/BrushXY.js.map +1 -1
- package/lib/component/2d/BrushTracker2D.d.ts.map +1 -1
- package/lib/component/2d/BrushTracker2D.js +15 -4
- package/lib/component/2d/BrushTracker2D.js.map +1 -1
- package/lib/component/2d/Viewer2D.d.ts.map +1 -1
- package/lib/component/2d/Viewer2D.js +1 -1
- package/lib/component/2d/Viewer2D.js.map +1 -1
- package/lib/component/2d/ft/Contours.d.ts.map +1 -1
- package/lib/component/2d/ft/Contours.js +3 -4
- package/lib/component/2d/ft/Contours.js.map +1 -1
- package/lib/component/2d/utilities/extractSpectrumSignals.d.ts +5 -3
- package/lib/component/2d/utilities/extractSpectrumSignals.d.ts.map +1 -1
- package/lib/component/2d/utilities/extractSpectrumSignals.js +3 -3
- package/lib/component/2d/utilities/extractSpectrumSignals.js.map +1 -1
- package/lib/component/2d/zones/Signal.d.ts +1 -1
- package/lib/component/2d/zones/Signal.d.ts.map +1 -1
- package/lib/component/2d/zones/SignalCrosshair.d.ts +1 -1
- package/lib/component/2d/zones/SignalCrosshair.d.ts.map +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.d.ts.map +1 -1
- package/lib/component/2d/zones/SignalsGuideLines.js +74 -6
- package/lib/component/2d/zones/SignalsGuideLines.js.map +1 -1
- package/lib/component/2d/zones/Zone.d.ts +1 -1
- package/lib/component/2d/zones/Zone.d.ts.map +1 -1
- package/lib/component/2d/zones/Zone.js.map +1 -1
- package/lib/component/2d/zones/ZonesAssignmentsLabels.js.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts +5 -0
- package/lib/component/EventsTrackers/BrushTracker.d.ts.map +1 -1
- package/lib/component/EventsTrackers/BrushTracker.js +106 -31
- package/lib/component/EventsTrackers/BrushTracker.js.map +1 -1
- package/lib/component/SVGTable.d.ts.map +1 -1
- package/lib/component/SVGTable.js +1 -4
- package/lib/component/SVGTable.js.map +1 -1
- package/lib/component/assignment/AssignmentProvider.d.ts.map +1 -1
- package/lib/component/assignment/AssignmentProvider.js +2 -1
- package/lib/component/assignment/AssignmentProvider.js.map +1 -1
- package/lib/component/assignment/AssignmentsContext.d.ts +5 -2
- package/lib/component/assignment/AssignmentsContext.d.ts.map +1 -1
- package/lib/component/assignment/AssignmentsContext.js +2 -1
- package/lib/component/assignment/AssignmentsContext.js.map +1 -1
- package/lib/component/assignment/utilities/getAssignments.d.ts.map +1 -1
- package/lib/component/elements/ArrowBox.d.ts +16 -0
- package/lib/component/elements/ArrowBox.d.ts.map +1 -0
- package/lib/component/elements/ArrowBox.js +55 -0
- package/lib/component/elements/ArrowBox.js.map +1 -0
- package/lib/component/elements/DraggableDialog.js +2 -0
- package/lib/component/elements/DraggableDialog.js.map +1 -1
- package/lib/component/elements/Input.d.ts.map +1 -1
- package/lib/component/elements/Input.js +2 -2
- package/lib/component/elements/Input.js.map +1 -1
- package/lib/component/elements/Input2.js +2 -2
- package/lib/component/elements/Input2.js.map +1 -1
- package/lib/component/elements/NextPrev.d.ts.map +1 -1
- package/lib/component/elements/NextPrev.js +2 -4
- package/lib/component/elements/NextPrev.js.map +1 -1
- package/lib/component/elements/NumberInput2.js +1 -1
- package/lib/component/elements/NumberInput2.js.map +1 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.d.ts.map +1 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +3 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js.map +1 -1
- package/lib/component/elements/ReactTable/ReactTable.d.ts.map +1 -1
- package/lib/component/elements/ReactTable/ReactTable.js +6 -5
- package/lib/component/elements/ReactTable/ReactTable.js.map +1 -1
- package/lib/component/elements/SVGGroup.js +1 -1
- package/lib/component/elements/SVGGroup.js.map +1 -1
- package/lib/component/elements/Sections.d.ts +1 -0
- package/lib/component/elements/Sections.d.ts.map +1 -1
- package/lib/component/elements/Sections.js +42 -7
- package/lib/component/elements/Sections.js.map +1 -1
- package/lib/component/elements/Tab/Tabs.d.ts.map +1 -1
- package/lib/component/elements/Tab/Tabs.js +3 -1
- package/lib/component/elements/Tab/Tabs.js.map +1 -1
- package/lib/component/elements/pdnd.cjs +12 -0
- package/lib/component/elements/pdnd.cjs.map +1 -0
- package/lib/component/elements/pdnd.d.cts +2 -0
- package/lib/component/elements/pdnd.d.cts.map +1 -0
- package/lib/component/highlight/index.d.ts +2 -2
- package/lib/component/highlight/index.d.ts.map +1 -1
- package/lib/component/highlight/index.js +1 -1
- package/lib/component/highlight/index.js.map +1 -1
- package/lib/component/hooks/useCheckToolsVisibility.d.ts +1 -1
- package/lib/component/hooks/useCheckToolsVisibility.d.ts.map +1 -1
- package/lib/component/hooks/useCombinedRefs.d.ts +2 -2
- package/lib/component/hooks/useCombinedRefs.d.ts.map +1 -1
- package/lib/component/hooks/useCombinedRefs.js +2 -0
- package/lib/component/hooks/useCombinedRefs.js.map +1 -1
- package/lib/component/hooks/useDatumWithSpectraStatistics.d.ts +1 -1
- package/lib/component/hooks/useDatumWithSpectraStatistics.d.ts.map +1 -1
- package/lib/component/hooks/useFilter.d.ts +1 -1
- package/lib/component/hooks/useFilter.d.ts.map +1 -1
- package/lib/component/hooks/useToolsFunctions.js +1 -1
- package/lib/component/hooks/useToolsFunctions.js.map +1 -1
- package/lib/component/main/InnerNMRiumContents.d.ts.map +1 -1
- package/lib/component/main/InnerNMRiumContents.js +6 -3
- package/lib/component/main/InnerNMRiumContents.js.map +1 -1
- package/lib/component/modal/EditPeakShapeModal.d.ts +1 -1
- package/lib/component/modal/EditPeakShapeModal.d.ts.map +1 -1
- package/lib/component/modal/EditPeakShapeModal.js.map +1 -1
- package/lib/component/modal/editRange/EditRangeModal.js.map +1 -1
- package/lib/component/modal/editRange/forms/components/SignalsContent.d.ts +1 -1
- package/lib/component/modal/editRange/forms/components/SignalsContent.d.ts.map +1 -1
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.js.map +1 -1
- package/lib/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.js.map +1 -1
- package/lib/component/modal/editRange/utils/couplingsToMultiplicity.d.ts +1 -1
- package/lib/component/modal/editRange/utils/couplingsToMultiplicity.d.ts.map +1 -1
- package/lib/component/modal/editRange/utils/mapCouplings.d.ts +1 -1
- package/lib/component/modal/editRange/utils/mapCouplings.d.ts.map +1 -1
- package/lib/component/modal/editRange/utils/mapRange.d.ts +1 -1
- package/lib/component/modal/editRange/utils/mapRange.d.ts.map +1 -1
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.d.ts.map +1 -1
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js +7 -4
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js.map +1 -1
- package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js +3 -3
- package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts.map +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.js.map +1 -1
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.d.ts +2 -2
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.d.ts.map +1 -1
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +11 -11
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +21 -15
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +17 -9
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js.map +1 -1
- package/lib/component/panels/Panels.d.ts +0 -4
- package/lib/component/panels/Panels.d.ts.map +1 -1
- package/lib/component/panels/Panels.js +8 -14
- package/lib/component/panels/Panels.js.map +1 -1
- package/lib/component/panels/PanelsBar.d.ts.map +1 -1
- package/lib/component/panels/PanelsBar.js +2 -4
- package/lib/component/panels/PanelsBar.js.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPanel.js.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts.map +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +5 -8
- package/lib/component/panels/RangesPanel/RangesHeader.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesPanel.js.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.d.ts +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.d.ts.map +1 -1
- package/lib/component/panels/RangesPanel/hooks/useMapRanges.d.ts +1 -1
- package/lib/component/panels/RangesPanel/hooks/useMapRanges.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/base/setting/Spectrum2DSetting.d.ts.map +1 -1
- package/lib/component/panels/SpectraPanel/base/setting/Spectrum2DSetting.js +4 -1
- package/lib/component/panels/SpectraPanel/base/setting/Spectrum2DSetting.js.map +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/ZonesTable.d.ts +1 -1
- package/lib/component/panels/ZonesPanel/ZonesTable.d.ts.map +1 -1
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts +1 -1
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts.map +1 -1
- package/lib/component/panels/extra/utilities/MultiplicityUtilities.d.ts +1 -1
- package/lib/component/panels/extra/utilities/MultiplicityUtilities.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.js +7 -1
- package/lib/component/panels/filtersPanel/Filters/FiltersSectionsPanel.js.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js +3 -3
- package/lib/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.js.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/hooks/useApodization.d.ts +1 -1
- package/lib/component/panels/filtersPanel/Filters/hooks/useApodization.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/hooks/useApodization.js.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/hooks/useBaselineCorrection.d.ts +1 -1
- package/lib/component/panels/filtersPanel/Filters/hooks/useBaselineCorrection.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.d.ts +2 -2
- package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.d.ts.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.js +15 -17
- package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.js.map +1 -1
- package/lib/component/panels/filtersPanel/Filters/hooks/useZeroFilling.js +2 -2
- package/lib/component/panels/filtersPanel/Filters/hooks/useZeroFilling.js.map +1 -1
- package/lib/component/panels/hooks/useTogglePanel.d.ts.map +1 -1
- package/lib/component/panels/hooks/useTogglePanel.js +4 -3
- package/lib/component/panels/hooks/useTogglePanel.js.map +1 -1
- package/lib/component/panels/spectrumSimulation/SpinSystemTable.js +2 -2
- package/lib/component/panels/spectrumSimulation/SpinSystemTable.js.map +1 -1
- package/lib/component/panels/spectrumSimulation/simulationValidation.d.ts +1 -1
- package/lib/component/panels/spectrumSimulation/simulationValidation.d.ts.map +1 -1
- package/lib/component/panels/spectrumSimulation/simulationValidation.js +4 -8
- package/lib/component/panels/spectrumSimulation/simulationValidation.js.map +1 -1
- package/lib/component/reducer/Reducer.d.ts +1 -1
- package/lib/component/reducer/Reducer.d.ts.map +1 -1
- package/lib/component/reducer/Reducer.js +2 -0
- package/lib/component/reducer/Reducer.js.map +1 -1
- package/lib/component/reducer/actions/AssignmentsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/AssignmentsActions.js.map +1 -1
- package/lib/component/reducer/actions/DatabaseActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/DatabaseActions.js.map +1 -1
- package/lib/component/reducer/actions/DomainActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/DomainActions.js +10 -5
- package/lib/component/reducer/actions/DomainActions.js.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.d.ts +9 -4
- package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.js +58 -28
- package/lib/component/reducer/actions/FiltersActions.js.map +1 -1
- package/lib/component/reducer/actions/InsetActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/InsetActions.js +1 -5
- package/lib/component/reducer/actions/InsetActions.js.map +1 -1
- package/lib/component/reducer/actions/IntegralsActions.d.ts +1 -1
- package/lib/component/reducer/actions/IntegralsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/IntegralsActions.js +1 -1
- package/lib/component/reducer/actions/IntegralsActions.js.map +1 -1
- package/lib/component/reducer/actions/LoadActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/LoadActions.js +4 -2
- package/lib/component/reducer/actions/LoadActions.js.map +1 -1
- package/lib/component/reducer/actions/PeaksActions.d.ts +2 -1
- package/lib/component/reducer/actions/PeaksActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/PeaksActions.js +1 -1
- package/lib/component/reducer/actions/PeaksActions.js.map +1 -1
- package/lib/component/reducer/actions/RangesActions.d.ts +5 -3
- package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/RangesActions.js +8 -15
- package/lib/component/reducer/actions/RangesActions.js.map +1 -1
- package/lib/component/reducer/actions/SpectraActions.d.ts +1 -1
- package/lib/component/reducer/actions/SpectraActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/SpectraActions.js.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts +1 -1
- package/lib/component/reducer/actions/ToolsActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +2 -2
- package/lib/component/reducer/actions/ToolsActions.js.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.d.ts +1 -1
- package/lib/component/reducer/actions/ZonesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/ZonesActions.js.map +1 -1
- package/lib/component/reducer/helper/Zoom1DManager.d.ts +6 -1
- package/lib/component/reducer/helper/Zoom1DManager.d.ts.map +1 -1
- package/lib/component/reducer/helper/Zoom1DManager.js +44 -37
- package/lib/component/reducer/helper/Zoom1DManager.js.map +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +3 -2
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts.map +1 -1
- package/lib/component/reducer/helper/ZoomHistoryManager.js +17 -8
- package/lib/component/reducer/helper/ZoomHistoryManager.js.map +1 -1
- package/lib/component/reducer/helper/removeSpectrumRelatedObjectsById.d.ts.map +1 -1
- package/lib/component/reducer/helper/removeSpectrumRelatedObjectsById.js +1 -0
- package/lib/component/reducer/helper/removeSpectrumRelatedObjectsById.js.map +1 -1
- package/lib/component/reducer/preferences/actions/matrixGeneration.d.ts +2 -2
- package/lib/component/reducer/preferences/actions/matrixGeneration.d.ts.map +1 -1
- package/lib/component/reducer/preferences/actions/togglePanel.d.ts.map +1 -1
- package/lib/component/reducer/preferences/actions/togglePanel.js +11 -6
- package/lib/component/reducer/preferences/actions/togglePanel.js.map +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +3 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts.map +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.js.map +1 -1
- package/lib/component/toolbar/ToolTypes.d.ts +1 -1
- package/lib/component/toolbar/ToolTypes.d.ts.map +1 -1
- package/lib/component/workspaces/prediction.js +1 -1
- package/lib/component/workspaces/prediction.js.map +1 -1
- package/lib/data/PredictionManager.d.ts.map +1 -1
- package/lib/data/PredictionManager.js +1 -0
- package/lib/data/PredictionManager.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/SumManager.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/SumManager.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/SumManager.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/generateJGraphData.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/generateJGraphData.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/createRange.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/createRange.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/createRange.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignals.d.ts +30 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignals.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/resizeRange.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/resizeRange.d.ts.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/resizeRange.js.map +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/resurrectSpectrum.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/resurrectSpectrum.d.ts.map +1 -1
- package/lib/data/data1d/database.d.ts.map +1 -1
- package/lib/data/data1d/database.js +1 -1
- package/lib/data/data1d/database.js.map +1 -1
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts.map +1 -1
- package/lib/data/data1d/multipleSpectraAnalysis.js +19 -12
- package/lib/data/data1d/multipleSpectraAnalysis.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/contours.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/contours.js +6 -4
- package/lib/data/data2d/Spectrum2D/contours.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/getMissingProjection.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/getMissingProjection.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/getMissingProjection.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +22 -10
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts.map +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.js.map +1 -1
- package/lib/data/matrixGeneration.js +1 -1
- package/lib/data/matrixGeneration.js.map +1 -1
- package/lib/data/types/common/FilterEntry.d.ts +1 -1
- package/lib/data/types/common/FilterEntry.d.ts.map +1 -1
- package/lib/data/types/data1d/RangeDetectionResult.d.ts +1 -1
- package/lib/data/types/data1d/RangeDetectionResult.d.ts.map +1 -1
- package/lib/data/types/data1d/index.js +1 -1
- package/lib/data/types/data1d/index.js.map +1 -1
- package/lib/data/utilities/FindUtilities.d.ts +1 -1
- package/lib/data/utilities/FindUtilities.d.ts.map +1 -1
- package/lib/data/utilities/RangeUtilities.d.ts +1 -1
- package/lib/data/utilities/RangeUtilities.d.ts.map +1 -1
- package/lib/data/utilities/RangeUtilities.js.map +1 -1
- package/lib/data/utilities/ZoneUtilities.d.ts +1 -1
- package/lib/data/utilities/ZoneUtilities.d.ts.map +1 -1
- package/lib/versionInfo.js +1 -1
- package/package.json +32 -31
- package/src/component/1d/BrushTracker1D.tsx +39 -17
- package/src/component/1d/FloatPublicationString.tsx +2 -2
- package/src/component/1d/FloatingRanges.tsx +4 -4
- package/src/component/1d/PredictionErrorsNotations.tsx +209 -0
- package/src/component/1d/SVGContent1D.tsx +2 -0
- package/src/component/1d/Viewer1D.tsx +1 -1
- package/src/component/1d/integral/IntegralResizable.tsx +1 -1
- package/src/component/1d/integral/IntegralsSeries.tsx +1 -1
- package/src/component/1d/jCouplingGraph/JGraph.tsx +1 -1
- package/src/component/1d/jCouplingGraph/JsCouplings.tsx +1 -1
- package/src/component/1d/multiplicityTree/MultiplicityTree.tsx +2 -2
- package/src/component/1d/multiplicityTree/MultiplicityTrees.tsx +1 -1
- package/src/component/1d/multiplicityTree/generateTreeNodes.ts +1 -1
- package/src/component/1d/peaks/PeakAnnotationsSpreadMode.tsx +2 -6
- package/src/component/1d/peaks/Peaks.tsx +1 -1
- package/src/component/1d/peaks/usePeakShapesPath.ts +1 -1
- package/src/component/1d/ranges/AssignmentLabel.tsx +1 -1
- package/src/component/1d/ranges/Atoms.tsx +1 -1
- package/src/component/1d/ranges/Range.tsx +1 -1
- package/src/component/1d/ranges/Ranges.tsx +4 -1
- package/src/component/1d/tool/BaseLineZones.tsx +1 -1
- package/src/component/1d-2d/components/FloatMoleculeStructures/FloatMolecules.tsx +1 -1
- package/src/component/1d-2d/components/SpectrumInfoBlock.tsx +4 -6
- package/src/component/1d-2d/tools/BrushXY.tsx +319 -30
- package/src/component/2d/BrushTracker2D.tsx +18 -4
- package/src/component/2d/Viewer2D.tsx +6 -1
- package/src/component/2d/ft/Contours.tsx +3 -11
- package/src/component/2d/utilities/extractSpectrumSignals.ts +12 -9
- package/src/component/2d/zones/Signal.tsx +1 -1
- package/src/component/2d/zones/SignalCrosshair.tsx +1 -1
- package/src/component/2d/zones/SignalsGuideLines.tsx +108 -12
- package/src/component/2d/zones/Zone.tsx +2 -2
- package/src/component/2d/zones/Zones.tsx +1 -1
- package/src/component/2d/zones/ZonesAssignmentsLabels.tsx +3 -3
- package/src/component/EventsTrackers/BrushTracker.tsx +124 -30
- package/src/component/SVGTable.tsx +4 -6
- package/src/component/assignment/AssignmentProvider.tsx +2 -1
- package/src/component/assignment/AssignmentsContext.ts +7 -2
- package/src/component/assignment/utilities/getAssignments.ts +1 -1
- package/src/component/elements/ArrowBox.tsx +77 -0
- package/src/component/elements/DraggableDialog.tsx +2 -0
- package/src/component/elements/Input.tsx +3 -3
- package/src/component/elements/Input2.tsx +4 -4
- package/src/component/elements/NextPrev.tsx +2 -6
- package/src/component/elements/NumberInput2.tsx +1 -1
- package/src/component/elements/ReactTable/Elements/ReactTableRow.tsx +3 -1
- package/src/component/elements/ReactTable/ReactTable.tsx +6 -7
- package/src/component/elements/SVGGroup.tsx +2 -2
- package/src/component/elements/Sections.tsx +103 -19
- package/src/component/elements/Tab/Tabs.tsx +3 -1
- package/src/component/elements/pdnd.cts +9 -0
- package/src/component/highlight/index.tsx +5 -5
- package/src/component/hooks/useCheckToolsVisibility.ts +1 -1
- package/src/component/hooks/useCombinedRefs.ts +6 -4
- package/src/component/hooks/useDatumWithSpectraStatistics.ts +1 -1
- package/src/component/hooks/useFilter.ts +1 -1
- package/src/component/hooks/useToolsFunctions.ts +1 -1
- package/src/component/main/InnerNMRiumContents.tsx +6 -3
- package/src/component/modal/EditPeakShapeModal.tsx +7 -2
- package/src/component/modal/editRange/EditRangeModal.tsx +1 -1
- package/src/component/modal/editRange/forms/components/SignalsContent.tsx +1 -1
- package/src/component/modal/editRange/forms/components/signal-tabs/SignalJCouplingsTable.tsx +1 -1
- package/src/component/modal/editRange/forms/components/signal-tabs/SignalPeaksTable.tsx +1 -1
- package/src/component/modal/editRange/utils/couplingsToMultiplicity.ts +1 -1
- package/src/component/modal/editRange/utils/mapCouplings.ts +1 -1
- package/src/component/modal/editRange/utils/mapRange.ts +1 -1
- package/src/component/modal/editZone/EditZoneModal.tsx +1 -1
- package/src/component/modal/setting/settings-tabs/DatabasesTabContent.tsx +12 -7
- package/src/component/modal/setting/settings-tabs/ToolsTabContent.tsx +3 -3
- package/src/component/panels/IntegralsPanel/IntegralPanel.tsx +1 -1
- package/src/component/panels/IntegralsPanel/IntegralTable.tsx +1 -1
- package/src/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.tsx +22 -19
- package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +53 -48
- package/src/component/panels/MoleculesPanel/Utilities.ts +1 -1
- package/src/component/panels/MoleculesPanel/useAtomAssignment.tsx +29 -8
- package/src/component/panels/Panels.tsx +9 -24
- package/src/component/panels/PanelsBar.tsx +2 -6
- package/src/component/panels/PeaksPanel/PeaksPanel.tsx +1 -1
- package/src/component/panels/PeaksPanel/PeaksTable.tsx +1 -1
- package/src/component/panels/RangesPanel/RangesHeader.tsx +15 -22
- package/src/component/panels/RangesPanel/RangesPanel.tsx +1 -1
- package/src/component/panels/RangesPanel/RangesTable.tsx +1 -1
- package/src/component/panels/RangesPanel/RangesTableRow.tsx +1 -1
- package/src/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.tsx +1 -1
- package/src/component/panels/RangesPanel/hooks/useMapRanges.ts +1 -1
- package/src/component/panels/SpectraPanel/base/setting/Spectrum2DSetting.tsx +11 -1
- package/src/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.tsx +1 -1
- package/src/component/panels/ZonesPanel/ZonesTable.tsx +1 -1
- package/src/component/panels/ZonesPanel/hooks/useMapZones.ts +1 -1
- package/src/component/panels/filtersPanel/Filters/FiltersSectionsPanel.tsx +9 -0
- package/src/component/panels/filtersPanel/Filters/base/BaseApodizationOptions.tsx +14 -4
- package/src/component/panels/filtersPanel/Filters/hooks/useApodization.tsx +1 -1
- package/src/component/panels/filtersPanel/Filters/hooks/useBaselineCorrection.tsx +1 -1
- package/src/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.tsx +17 -19
- package/src/component/panels/filtersPanel/Filters/hooks/useZeroFilling.tsx +3 -3
- package/src/component/panels/hooks/useTogglePanel.ts +4 -3
- package/src/component/panels/spectrumSimulation/SpinSystemTable.tsx +2 -2
- package/src/component/panels/spectrumSimulation/simulationValidation.ts +9 -13
- package/src/component/reducer/Reducer.ts +3 -1
- package/src/component/reducer/actions/AssignmentsActions.ts +2 -1
- package/src/component/reducer/actions/DatabaseActions.ts +2 -1
- package/src/component/reducer/actions/DomainActions.ts +11 -7
- package/src/component/reducer/actions/FiltersActions.ts +101 -56
- package/src/component/reducer/actions/InsetActions.ts +1 -5
- package/src/component/reducer/actions/IntegralsActions.ts +2 -2
- package/src/component/reducer/actions/LoadActions.ts +4 -2
- package/src/component/reducer/actions/PeaksActions.ts +5 -4
- package/src/component/reducer/actions/RangesActions.ts +14 -17
- package/src/component/reducer/actions/SpectraActions.ts +1 -1
- package/src/component/reducer/actions/ToolsActions.ts +2 -3
- package/src/component/reducer/actions/ZonesActions.ts +1 -1
- package/src/component/reducer/helper/Zoom1DManager.ts +67 -41
- package/src/component/reducer/helper/ZoomHistoryManager.ts +20 -9
- package/src/component/reducer/helper/removeSpectrumRelatedObjectsById.ts +1 -0
- package/src/component/reducer/preferences/actions/matrixGeneration.ts +2 -2
- package/src/component/reducer/preferences/actions/togglePanel.ts +10 -6
- package/src/component/reducer/preferences/preferencesReducer.ts +12 -2
- package/src/component/toolbar/ToolTypes.ts +1 -1
- package/src/component/workspaces/prediction.ts +1 -1
- package/src/data/PredictionManager.ts +2 -2
- package/src/data/data1d/Spectrum1D/SumManager.ts +1 -1
- package/src/data/data1d/Spectrum1D/generateJGraphData.ts +1 -1
- package/src/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.ts +1 -1
- package/src/data/data1d/Spectrum1D/integrals/initiateIntegrals.ts +1 -1
- package/src/data/data1d/Spectrum1D/isRangeAssigned.ts +1 -1
- package/src/data/data1d/Spectrum1D/peaks/autoPeakPicking.ts +1 -1
- package/src/data/data1d/Spectrum1D/peaks/initiatePeaks.ts +1 -1
- package/src/data/data1d/Spectrum1D/peaks/optimizePeaks.ts +1 -1
- package/src/data/data1d/Spectrum1D/ranges/autoRangesDetection.ts +1 -1
- package/src/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.ts +1 -1
- package/src/data/data1d/Spectrum1D/ranges/createRange.ts +1 -1
- package/src/data/data1d/Spectrum1D/ranges/initiateRanges.ts +1 -1
- package/src/data/data1d/Spectrum1D/ranges/resizeRange.ts +1 -1
- package/src/data/data1d/Spectrum1D/ranges/resurrectSpectrum.ts +1 -1
- package/src/data/data1d/database.ts +3 -2
- package/src/data/data1d/multipleSpectraAnalysis.ts +25 -18
- package/src/data/data2d/Spectrum2D/contours.ts +8 -4
- package/src/data/data2d/Spectrum2D/getMissingProjection.ts +1 -2
- package/src/data/data2d/Spectrum2D/initiateDatum2D.ts +34 -16
- package/src/data/data2d/Spectrum2D/zones/detectZones.ts +1 -1
- package/src/data/data2d/Spectrum2D/zones/detectZonesManual.ts +2 -2
- package/src/data/data2d/Spectrum2D/zones/initiateZones.ts +1 -1
- package/src/data/matrixGeneration.ts +1 -1
- package/src/data/types/common/FilterEntry.ts +1 -1
- package/src/data/types/data1d/RangeDetectionResult.ts +1 -1
- package/src/data/utilities/FindUtilities.ts +1 -1
- package/src/data/utilities/RangeUtilities.ts +1 -1
- package/src/data/utilities/ZoneUtilities.ts +1 -1
- package/src/index.tsx +3 -0
- package/src/versionInfo.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
|
+
import type { Signal2D } from '@zakodium/nmr-types';
|
|
2
3
|
import type { FromTo } from 'cheminfo-types';
|
|
3
|
-
import type { Signal2D } from 'nmr-processing';
|
|
4
4
|
import { useCallback, useEffect, useState } from 'react';
|
|
5
5
|
|
|
6
6
|
import DefaultPathLengths from '../../../../../data/constants/DefaultPathLengths.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
|
+
import type { Info2D } from '@zakodium/nmr-types';
|
|
2
3
|
import type {
|
|
3
4
|
Zones1DNucleusPreferences,
|
|
4
5
|
Zones2DNucleusPreferences,
|
|
5
6
|
} from '@zakodium/nmrium-core';
|
|
6
|
-
import type { Info2D } from 'nmr-processing';
|
|
7
7
|
import type { ReactNode } from 'react';
|
|
8
8
|
import { FaLink } from 'react-icons/fa';
|
|
9
9
|
|
|
@@ -262,6 +262,14 @@ function FiltersInner(props: FiltersInnerProps) {
|
|
|
262
262
|
openSection(null);
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
+
function handleReorderFilters(sourceId, targetId) {
|
|
266
|
+
if (!sourceId || !targetId) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
dispatch({ type: 'REORDER_FILTERS', payload: { sourceId, targetId } });
|
|
271
|
+
}
|
|
272
|
+
|
|
265
273
|
return (
|
|
266
274
|
<Sections isOverflow renderActiveSectionContentOnly>
|
|
267
275
|
{filtersList.map((filter, index) => {
|
|
@@ -272,6 +280,7 @@ function FiltersInner(props: FiltersInnerProps) {
|
|
|
272
280
|
<Sections.Item
|
|
273
281
|
key={id}
|
|
274
282
|
id={name}
|
|
283
|
+
onReorder={handleReorderFilters}
|
|
275
284
|
title={error || getFilterLabel(name)}
|
|
276
285
|
serial={index + 1}
|
|
277
286
|
onClick={(id) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Switch } from '@blueprintjs/core';
|
|
2
|
-
import type { Apodization1DOptions } from 'nmr-
|
|
2
|
+
import type { Apodization1DOptions } from '@zakodium/nmr-types';
|
|
3
3
|
import type { ReactNode } from 'react';
|
|
4
4
|
import { FormProvider, useFormContext } from 'react-hook-form';
|
|
5
5
|
import * as Yup from 'yup';
|
|
@@ -11,10 +11,10 @@ import { ReadOnly } from '../../../../elements/ReadOnly.js';
|
|
|
11
11
|
import { Sections } from '../../../../elements/Sections.js';
|
|
12
12
|
import { FilterActionButtons } from '../FilterActionButtons.js';
|
|
13
13
|
import { HeaderContainer, StickyHeader } from '../InnerFilterHeader.js';
|
|
14
|
-
import { useApodization } from '../hooks/useApodization.js';
|
|
15
14
|
import type { ApodizationFilterEntry } from '../hooks/useApodization.js';
|
|
16
|
-
import {
|
|
15
|
+
import { useApodization } from '../hooks/useApodization.js';
|
|
17
16
|
import type { BaseFilterOptionsPanelProps } from '../index.js';
|
|
17
|
+
import { formLabelStyle } from '../index.js';
|
|
18
18
|
|
|
19
19
|
const advanceValidationSchema = Yup.object().shape({
|
|
20
20
|
options: Yup.object().shape({
|
|
@@ -137,6 +137,7 @@ export function BaseApodizationOptions(
|
|
|
137
137
|
|
|
138
138
|
interface SectionOptions {
|
|
139
139
|
onChange: () => void;
|
|
140
|
+
setFocus?: boolean;
|
|
140
141
|
}
|
|
141
142
|
|
|
142
143
|
function ExponentialSectionOptionsSection(options: SectionOptions) {
|
|
@@ -149,6 +150,7 @@ function ExponentialSectionOptionsSection(options: SectionOptions) {
|
|
|
149
150
|
algorithm="exponential"
|
|
150
151
|
algorithmTitle="Exponential"
|
|
151
152
|
onChange={onChange}
|
|
153
|
+
autoFocus
|
|
152
154
|
>
|
|
153
155
|
<Label
|
|
154
156
|
title="Line broadening:"
|
|
@@ -304,10 +306,17 @@ interface OptionsSectionProps extends SectionOptions {
|
|
|
304
306
|
algorithm: keyof Apodization1DOptions;
|
|
305
307
|
algorithmTitle: string;
|
|
306
308
|
children: ReactNode;
|
|
309
|
+
autoFocus?: boolean;
|
|
307
310
|
}
|
|
308
311
|
|
|
309
312
|
function OptionsSection(options: OptionsSectionProps) {
|
|
310
|
-
const {
|
|
313
|
+
const {
|
|
314
|
+
onChange,
|
|
315
|
+
algorithm,
|
|
316
|
+
algorithmTitle,
|
|
317
|
+
children,
|
|
318
|
+
autoFocus = false,
|
|
319
|
+
} = options;
|
|
311
320
|
|
|
312
321
|
const { setValue, watch } = useFormContext();
|
|
313
322
|
const isApplyChecked = watch(`options.${algorithm}.apply`) || false;
|
|
@@ -330,6 +339,7 @@ function OptionsSection(options: OptionsSectionProps) {
|
|
|
330
339
|
innerLabel="Off"
|
|
331
340
|
checked={isApplyChecked}
|
|
332
341
|
onChange={handleToggleApply}
|
|
342
|
+
autoFocus={autoFocus}
|
|
333
343
|
/>
|
|
334
344
|
}
|
|
335
345
|
headerStyle={{ backgroundColor: 'white' }}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
2
|
+
import type { Apodization1DOptions } from '@zakodium/nmr-types';
|
|
2
3
|
import lodashMerge from 'lodash/merge.js';
|
|
3
4
|
import { default1DApodization } from 'nmr-processing';
|
|
4
|
-
import type { Apodization1DOptions } from 'nmr-processing';
|
|
5
5
|
import { useCallback, useEffect, useRef } from 'react';
|
|
6
6
|
import { useForm } from 'react-hook-form';
|
|
7
7
|
import * as Yup from 'yup';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
2
|
-
import type { BaselineCorrectionOptions } from 'nmr-
|
|
2
|
+
import type { BaselineCorrectionOptions } from '@zakodium/nmr-types';
|
|
3
3
|
import { useCallback, useEffect, useRef } from 'react';
|
|
4
4
|
import { useForm } from 'react-hook-form';
|
|
5
5
|
import { useSelect } from 'react-science/ui';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { Filter2DEntry } from '@zakodium/nmr-types';
|
|
1
2
|
import type { Spectrum2D } from '@zakodium/nmrium-core';
|
|
2
3
|
import type { NmrData2DFt } from 'cheminfo-types';
|
|
3
4
|
import debounce from 'lodash/debounce.js';
|
|
4
|
-
import type { Filter2DEntry } from 'nmr-processing';
|
|
5
5
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
6
6
|
import { useSelect } from 'react-science/ui';
|
|
7
7
|
|
|
@@ -136,25 +136,23 @@ export function usePhaseCorrectionTwoDimensions(filter: Filter2DEntry | null) {
|
|
|
136
136
|
);
|
|
137
137
|
|
|
138
138
|
const handleInputValueChange = useCallback(
|
|
139
|
-
(
|
|
140
|
-
const { name
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
[activeTraceDirection]
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
calcPhaseCorrectionHandler(newValue, name, 'input');
|
|
152
|
-
}
|
|
153
|
-
updateInputRangeInitialValue(newValue);
|
|
154
|
-
valueRef.current = newValue;
|
|
155
|
-
setValue(valueRef.current);
|
|
156
|
-
syncFilterOptions(valueRef.current);
|
|
139
|
+
(valueAsNumber, valueAsString, inputElement) => {
|
|
140
|
+
const { name } = inputElement;
|
|
141
|
+
const newValue = {
|
|
142
|
+
...valueRef.current,
|
|
143
|
+
[activeTraceDirection]: {
|
|
144
|
+
...valueRef.current[activeTraceDirection],
|
|
145
|
+
[name]: valueAsNumber,
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
if (valueAsString.trim() !== '-') {
|
|
150
|
+
calcPhaseCorrectionHandler(newValue, name, 'input');
|
|
157
151
|
}
|
|
152
|
+
updateInputRangeInitialValue(newValue);
|
|
153
|
+
valueRef.current = newValue;
|
|
154
|
+
setValue(valueRef.current);
|
|
155
|
+
syncFilterOptions(valueRef.current);
|
|
158
156
|
},
|
|
159
157
|
[
|
|
160
158
|
activeTraceDirection,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import type { ZeroFillingOptions as BaseZeroFillingOptions } from '@zakodium/nmr-types';
|
|
1
2
|
import type { NmrData2DFid } from 'cheminfo-types';
|
|
2
|
-
import type { ZeroFillingOptions as BaseZeroFillingOptions } from 'nmr-processing';
|
|
3
3
|
import { useCallback, useEffect, useRef } from 'react';
|
|
4
4
|
import { useForm } from 'react-hook-form';
|
|
5
5
|
|
|
6
|
-
import { isSpectrum1D } from '../../../../../data/data1d/Spectrum1D/
|
|
7
|
-
import { isSpectrum2D } from '../../../../../data/data2d/Spectrum2D/
|
|
6
|
+
import { isSpectrum1D } from '../../../../../data/data1d/Spectrum1D/index.js';
|
|
7
|
+
import { isSpectrum2D } from '../../../../../data/data2d/Spectrum2D/index.js';
|
|
8
8
|
import type { ExtractFilterEntry } from '../../../../../data/types/common/ExtractFilterEntry.js';
|
|
9
9
|
import generateNumbersPowerOfX from '../../../../../data/utilities/generateNumbersPowerOfX.js';
|
|
10
10
|
import { useDispatch } from '../../../../context/DispatchContext.js';
|
|
@@ -5,7 +5,6 @@ import { usePanelOpenState } from '../Panels.js';
|
|
|
5
5
|
|
|
6
6
|
export function useTogglePanel() {
|
|
7
7
|
const { dispatch, current } = usePreferences();
|
|
8
|
-
const { setPanelOpenState } = usePanelOpenState();
|
|
9
8
|
const { isSplitPaneOpen, openSplitPane } = usePanelOpenState();
|
|
10
9
|
|
|
11
10
|
function togglePanel(id: keyof NMRiumPanelPreferences) {
|
|
@@ -15,8 +14,10 @@ export function useTogglePanel() {
|
|
|
15
14
|
openSplitPane();
|
|
16
15
|
|
|
17
16
|
if ((!isSplitPaneOpen && !flag) || isSplitPaneOpen) {
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
dispatch({
|
|
18
|
+
type: 'TOGGLE_PANEL',
|
|
19
|
+
payload: { id, options: { display: undefined, open: !flag } },
|
|
20
|
+
});
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
|
|
@@ -37,7 +37,7 @@ export function SpinSystemTable(props: SpinSystemTableProps) {
|
|
|
37
37
|
control={control}
|
|
38
38
|
name={`data.${row.index}.0`}
|
|
39
39
|
fill
|
|
40
|
-
|
|
40
|
+
debounceTime={500}
|
|
41
41
|
/>
|
|
42
42
|
),
|
|
43
43
|
},
|
|
@@ -58,7 +58,7 @@ export function SpinSystemTable(props: SpinSystemTableProps) {
|
|
|
58
58
|
control={control}
|
|
59
59
|
name={`data.${row.index}.${columnIndex}`}
|
|
60
60
|
fill
|
|
61
|
-
|
|
61
|
+
debounceTime={500}
|
|
62
62
|
/>
|
|
63
63
|
);
|
|
64
64
|
}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import * as Yup from 'yup';
|
|
2
2
|
|
|
3
|
+
const numberOrNull = Yup.mixed()
|
|
4
|
+
.nullable()
|
|
5
|
+
.test(
|
|
6
|
+
'isNumberOrNull',
|
|
7
|
+
'Must be a number or null',
|
|
8
|
+
(value) => value === null || typeof value === 'number',
|
|
9
|
+
);
|
|
10
|
+
|
|
3
11
|
export const simulationValidationSchema = Yup.object({
|
|
4
12
|
options: Yup.object({
|
|
5
13
|
frequency: Yup.number().required(),
|
|
@@ -18,17 +26,5 @@ export const simulationValidationSchema = Yup.object({
|
|
|
18
26
|
nbPoints: Yup.number().required(),
|
|
19
27
|
lineWidth: Yup.number().required().moreThan(0),
|
|
20
28
|
}),
|
|
21
|
-
data: Yup.array()
|
|
22
|
-
.of(
|
|
23
|
-
Yup.array().of(
|
|
24
|
-
Yup.lazy((value) => {
|
|
25
|
-
if (value === null) {
|
|
26
|
-
return Yup.mixed().nullable();
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return Yup.number().required();
|
|
30
|
-
}),
|
|
31
|
-
),
|
|
32
|
-
)
|
|
33
|
-
.required(),
|
|
29
|
+
data: Yup.array().of(Yup.array().of(numberOrNull)).required(),
|
|
34
30
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import type { BaselineCorrectionZone } from '@zakodium/nmr-types';
|
|
1
2
|
import type { Spectrum, ViewState } from '@zakodium/nmrium-core';
|
|
2
3
|
import type { WebSource as Source } from 'filelist-utils';
|
|
3
4
|
import type { Draft } from 'immer';
|
|
4
5
|
import { original, produce } from 'immer';
|
|
5
6
|
import type { CorrelationData } from 'nmr-correlation';
|
|
6
7
|
import { buildCorrelationData } from 'nmr-correlation';
|
|
7
|
-
import type { BaselineCorrectionZone } from 'nmr-processing';
|
|
8
8
|
import type { Reducer } from 'react';
|
|
9
9
|
|
|
10
10
|
import type { StateMoleculeExtended } from '../../data/molecules/Molecule.js';
|
|
@@ -574,6 +574,8 @@ function innerSpectrumReducer(draft: Draft<State>, action: Action) {
|
|
|
574
574
|
return FiltersActions.handleApplyAutoPhaseCorrectionTwoDimensionsFilter(
|
|
575
575
|
draft,
|
|
576
576
|
);
|
|
577
|
+
case 'REORDER_FILTERS':
|
|
578
|
+
return FiltersActions.handleReorderFilters(draft, action);
|
|
577
579
|
case 'CHANGE_SPECTRUM_VISIBILITY':
|
|
578
580
|
return SpectraActions.handleChangeSpectrumVisibilityById(draft, action);
|
|
579
581
|
case 'CHANGE_SPECTRA_VISIBILITY_BY_NUCLEUS':
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { Range, Zone } from '@zakodium/nmr-types';
|
|
1
2
|
import type { Spectrum1D, Spectrum2D } from '@zakodium/nmrium-core';
|
|
2
3
|
import type { Draft } from 'immer';
|
|
3
|
-
import type {
|
|
4
|
+
import type { SpectraData1D, SpectraData2D } from 'nmr-processing';
|
|
4
5
|
|
|
5
6
|
import type { State } from '../Reducer.js';
|
|
6
7
|
import type { ActionType } from '../types/ActionType.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { Info1D } from '@zakodium/nmr-types';
|
|
1
2
|
import type { Spectrum, Spectrum1D } from '@zakodium/nmrium-core';
|
|
2
3
|
import type { Draft } from 'immer';
|
|
3
|
-
import type { DatabaseNMREntry
|
|
4
|
+
import type { DatabaseNMREntry } from 'nmr-processing';
|
|
4
5
|
|
|
5
6
|
import {
|
|
6
7
|
get1DColor,
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
} from '../../../data/data2d/Spectrum2D/isSpectrum2D.js';
|
|
22
22
|
import nucleusToString from '../../utility/nucleusToString.js';
|
|
23
23
|
import type { State } from '../Reducer.js';
|
|
24
|
+
import { rescaleToSameTop } from '../helper/Zoom1DManager.js';
|
|
24
25
|
import { addToBrushHistory } from '../helper/ZoomHistoryManager.js';
|
|
25
26
|
import { getActiveSpectra } from '../helper/getActiveSpectra.js';
|
|
26
27
|
import { getActiveSpectrum } from '../helper/getActiveSpectrum.js';
|
|
@@ -243,16 +244,19 @@ function setDomain(draft: Draft<State>, options?: SetDomainOptions) {
|
|
|
243
244
|
draft.xDomain = domain.xDomain;
|
|
244
245
|
draft.xDomains = domain.xDomains;
|
|
245
246
|
}
|
|
246
|
-
// draft.originDomain = domain;
|
|
247
247
|
|
|
248
248
|
if (updateYDomain) {
|
|
249
249
|
draft.yDomain = domain.yDomain;
|
|
250
|
-
if (draft.displayerMode === '1D'
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
250
|
+
if (draft.displayerMode === '1D') {
|
|
251
|
+
if (isYDomainShared) {
|
|
252
|
+
draft.yDomains = Object.fromEntries(
|
|
253
|
+
Object.keys(domain.yDomains).map((key) => {
|
|
254
|
+
return [key, domain.yDomain];
|
|
255
|
+
}),
|
|
256
|
+
);
|
|
257
|
+
} else {
|
|
258
|
+
draft.yDomains = rescaleToSameTop(domain.yDomains);
|
|
259
|
+
}
|
|
256
260
|
} else {
|
|
257
261
|
draft.yDomains = domain.yDomains;
|
|
258
262
|
}
|
|
@@ -1,32 +1,35 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
Apodization1DOptions,
|
|
3
|
+
BaselineCorrectionOptions,
|
|
4
|
+
Filter1DEntry,
|
|
5
|
+
Filter1DOptions,
|
|
6
|
+
Filter2DEntry,
|
|
7
|
+
Filter2DOptions,
|
|
8
|
+
MatrixOptions,
|
|
9
|
+
} from '@zakodium/nmr-types';
|
|
1
10
|
import type { Spectrum, Spectrum1D, Spectrum2D } from '@zakodium/nmrium-core';
|
|
2
11
|
import type { NmrData1D, NmrData2DFt } from 'cheminfo-types';
|
|
3
12
|
import type { Draft } from 'immer';
|
|
4
13
|
import { current } from 'immer';
|
|
5
14
|
import { xFindClosestIndex } from 'ml-spectra-processing';
|
|
15
|
+
import type { Filter1D, FilterDomainUpdateRules } from 'nmr-processing';
|
|
6
16
|
import {
|
|
7
|
-
getBaselineZonesByDietrich,
|
|
8
|
-
Filters1DManager,
|
|
9
|
-
Filters2DManager,
|
|
10
17
|
Filters1D,
|
|
18
|
+
Filters1DManager,
|
|
11
19
|
Filters2D,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
BaselineCorrectionOptions,
|
|
15
|
-
Filter1D,
|
|
16
|
-
Apodization1DOptions,
|
|
17
|
-
Filter1DEntry,
|
|
18
|
-
FilterDomainUpdateRules,
|
|
19
|
-
MatrixOptions,
|
|
20
|
-
Filter2DEntry,
|
|
21
|
-
Filter2DOptions,
|
|
22
|
-
Filter1DOptions,
|
|
20
|
+
Filters2DManager,
|
|
21
|
+
getBaselineZonesByDietrich,
|
|
23
22
|
} from 'nmr-processing';
|
|
24
23
|
|
|
25
24
|
import { isSpectrum1D } from '../../../data/data1d/Spectrum1D/index.js';
|
|
26
25
|
import { isFid1DSpectrum } from '../../../data/data1d/Spectrum1D/isSpectrum1D.js';
|
|
26
|
+
import { getDefaultContoursLevel } from '../../../data/data2d/Spectrum2D/contours.js';
|
|
27
27
|
import { getProjection } from '../../../data/data2d/Spectrum2D/getMissingProjection.js';
|
|
28
28
|
import { isSpectrum2D } from '../../../data/data2d/Spectrum2D/index.js';
|
|
29
|
-
import {
|
|
29
|
+
import {
|
|
30
|
+
isFid2DSpectrum,
|
|
31
|
+
isFt2DSpectrum,
|
|
32
|
+
} from '../../../data/data2d/Spectrum2D/isSpectrum2D.js';
|
|
30
33
|
import type { ExclusionZone } from '../../../data/types/data1d/ExclusionZone.js';
|
|
31
34
|
import { getXScale } from '../../1d/utilities/scale.js';
|
|
32
35
|
import { get2DXScale, get2DYScale } from '../../2d/utilities/scale.js';
|
|
@@ -199,7 +202,7 @@ type DeleteExclusionZoneAction = ActionType<
|
|
|
199
202
|
>;
|
|
200
203
|
type ApplySignalProcessingAction = ActionType<
|
|
201
204
|
'APPLY_SIGNAL_PROCESSING_FILTER',
|
|
202
|
-
{ options: MatrixOptions }
|
|
205
|
+
{ options: MatrixOptions<object> }
|
|
203
206
|
>;
|
|
204
207
|
type AddPhaseCorrectionTraceAction = ActionType<
|
|
205
208
|
'ADD_PHASE_CORRECTION_TRACE',
|
|
@@ -213,6 +216,10 @@ type DeletePhaseCorrectionTrace = ActionType<
|
|
|
213
216
|
'DELETE_PHASE_CORRECTION_TRACE',
|
|
214
217
|
{ id: string }
|
|
215
218
|
>;
|
|
219
|
+
type ReorderFiltersAction = ActionType<
|
|
220
|
+
'REORDER_FILTERS',
|
|
221
|
+
{ sourceId: string; targetId: string }
|
|
222
|
+
>;
|
|
216
223
|
|
|
217
224
|
type SetOneDimensionPhaseCorrectionPivotPoint = ActionType<
|
|
218
225
|
'SET_ONE_DIMENSION_PIVOT_POINT',
|
|
@@ -254,6 +261,7 @@ export type FiltersActions =
|
|
|
254
261
|
| SetOneDimensionPhaseCorrectionPivotPoint
|
|
255
262
|
| SetTwoDimensionPhaseCorrectionPivotPoint
|
|
256
263
|
| ManualTwoDimensionsPhaseCorrectionFilterAction
|
|
264
|
+
| ReorderFiltersAction
|
|
257
265
|
| ActionType<
|
|
258
266
|
| 'APPLY_FFT_FILTER'
|
|
259
267
|
| 'APPLY_FFT_DIMENSION_1_FILTER'
|
|
@@ -466,15 +474,13 @@ function rollbackSpectrumByFilter(
|
|
|
466
474
|
reapplyFilters(spectrum, filters);
|
|
467
475
|
|
|
468
476
|
draft.tempData = current(draft).data.slice();
|
|
469
|
-
draft.tempData[index] = spectrum;
|
|
477
|
+
draft.tempData[index] = structuredClone(spectrum);
|
|
470
478
|
|
|
471
479
|
// apply the current Filters
|
|
472
480
|
if (applyFilter) {
|
|
473
481
|
executeFilter(spectrum, spectrum.filters[filterIndex]);
|
|
474
482
|
}
|
|
475
483
|
|
|
476
|
-
spectrum = structuredClone(spectrum);
|
|
477
|
-
|
|
478
484
|
if (tempRollback) {
|
|
479
485
|
reapplyFilters(spectrum);
|
|
480
486
|
updateDomainOptions = getFilterDomain(spectrum, {
|
|
@@ -496,16 +502,24 @@ function rollbackSpectrumByFilter(
|
|
|
496
502
|
// re-implement all filters and rest all view property that related to filters
|
|
497
503
|
if (reset) {
|
|
498
504
|
if (filterIndex !== -1 && spectrum.filters.length > 0) {
|
|
505
|
+
// A filter exists, reset the domain based on the filters from the current filter index to the last one
|
|
499
506
|
updateDomainOptions = getFilterDomain(spectrum, {
|
|
500
507
|
startIndex: filterIndex,
|
|
501
508
|
lastIndex: spectrum.filters.length - 1,
|
|
502
509
|
});
|
|
503
510
|
} else if (toolData.activeFilterID) {
|
|
511
|
+
// No filter exists yet, but there is an active one in this case reset both x and y domain
|
|
512
|
+
|
|
504
513
|
updateDomainOptions = { updateXDomain: true, updateYDomain: true };
|
|
514
|
+
} else if (searchBy === 'name' && key) {
|
|
515
|
+
// No filter exists yet and no active filter, reset the x and y domain based on the current filter domain rules
|
|
516
|
+
const { updateXDomain, updateYDomain } =
|
|
517
|
+
getFilterUpdateDomainRules(key);
|
|
518
|
+
updateDomainOptions = { updateXDomain, updateYDomain };
|
|
505
519
|
} else {
|
|
520
|
+
//otherwise do not reset the domain
|
|
506
521
|
updateDomainOptions = { updateXDomain: false, updateYDomain: false };
|
|
507
522
|
}
|
|
508
|
-
|
|
509
523
|
toolData.activeFilterID = null;
|
|
510
524
|
draft.tempData = null;
|
|
511
525
|
|
|
@@ -1224,7 +1238,16 @@ function handleApplyFFTFilter(draft: Draft<State>) {
|
|
|
1224
1238
|
draft.toolOptions.selectedTool = 'zoom';
|
|
1225
1239
|
}
|
|
1226
1240
|
|
|
1227
|
-
function
|
|
1241
|
+
function applyFFTTwoDimensionFilter(
|
|
1242
|
+
draft: Draft<State>,
|
|
1243
|
+
{
|
|
1244
|
+
filterName,
|
|
1245
|
+
domainUpdateRules,
|
|
1246
|
+
}: {
|
|
1247
|
+
filterName: 'fftDimension1' | 'fftDimension2';
|
|
1248
|
+
domainUpdateRules: FilterDomainUpdateRules;
|
|
1249
|
+
},
|
|
1250
|
+
) {
|
|
1228
1251
|
const activeSpectrum = getActiveSpectrum(draft);
|
|
1229
1252
|
|
|
1230
1253
|
if (!activeSpectrum) {
|
|
@@ -1234,46 +1257,24 @@ function handleApplyFFtDimension1Filter(draft: Draft<State>) {
|
|
|
1234
1257
|
const { index } = activeSpectrum;
|
|
1235
1258
|
const activeFilterIndex = getActiveFilterIndex(draft);
|
|
1236
1259
|
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1260
|
+
const targetSpectrum =
|
|
1261
|
+
activeFilterIndex !== -1 ? draft.tempData[index] : draft.data[index];
|
|
1262
|
+
|
|
1263
|
+
Filters2DManager.applyFilters(targetSpectrum, [
|
|
1264
|
+
{ name: filterName, value: {} },
|
|
1265
|
+
]);
|
|
1242
1266
|
|
|
1243
1267
|
if (activeFilterIndex !== -1) {
|
|
1244
1268
|
draft.data[index] = draft.tempData[index];
|
|
1245
1269
|
}
|
|
1246
1270
|
|
|
1247
|
-
|
|
1271
|
+
const spectrum = draft.data[index];
|
|
1248
1272
|
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
draft.toolOptions.selectedOptionPanel = null;
|
|
1253
|
-
draft.toolOptions.selectedTool = 'zoom';
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
function handleApplyFFtDimension2Filter(draft: Draft<State>) {
|
|
1257
|
-
const activeSpectrum = getActiveSpectrum(draft);
|
|
1258
|
-
|
|
1259
|
-
if (!activeSpectrum) {
|
|
1260
|
-
return;
|
|
1273
|
+
if (isFt2DSpectrum(spectrum)) {
|
|
1274
|
+
spectrum.display.contourOptions = getDefaultContoursLevel(spectrum);
|
|
1261
1275
|
}
|
|
1262
1276
|
|
|
1263
|
-
|
|
1264
|
-
const activeFilterIndex = getActiveFilterIndex(draft);
|
|
1265
|
-
|
|
1266
|
-
//apply filter into the spectrum
|
|
1267
|
-
Filters2DManager.applyFilters(
|
|
1268
|
-
activeFilterIndex !== -1 ? draft.tempData[index] : draft.data[index],
|
|
1269
|
-
[{ name: 'fftDimension2', value: {} }],
|
|
1270
|
-
);
|
|
1271
|
-
|
|
1272
|
-
if (activeFilterIndex !== -1) {
|
|
1273
|
-
draft.data[index] = draft.tempData[index];
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
updateView(draft, fftDimension2.domainUpdateRules);
|
|
1277
|
+
updateView(draft, domainUpdateRules);
|
|
1277
1278
|
|
|
1278
1279
|
//clear zoom history
|
|
1279
1280
|
draft.zoom.history[draft.view.spectra.activeTab] = [];
|
|
@@ -1282,6 +1283,20 @@ function handleApplyFFtDimension2Filter(draft: Draft<State>) {
|
|
|
1282
1283
|
draft.toolOptions.selectedTool = 'zoom';
|
|
1283
1284
|
}
|
|
1284
1285
|
|
|
1286
|
+
function handleApplyFFtDimension1Filter(draft: Draft<State>) {
|
|
1287
|
+
applyFFTTwoDimensionFilter(draft, {
|
|
1288
|
+
filterName: 'fftDimension1',
|
|
1289
|
+
domainUpdateRules: fftDimension1.domainUpdateRules,
|
|
1290
|
+
});
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
function handleApplyFFtDimension2Filter(draft: Draft<State>) {
|
|
1294
|
+
applyFFTTwoDimensionFilter(draft, {
|
|
1295
|
+
filterName: 'fftDimension2',
|
|
1296
|
+
domainUpdateRules: fftDimension2.domainUpdateRules,
|
|
1297
|
+
});
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1285
1300
|
//action
|
|
1286
1301
|
function handleApplyManualPhaseCorrectionFilter(
|
|
1287
1302
|
draft: Draft<State>,
|
|
@@ -1705,7 +1720,7 @@ function handleSignalProcessingFilter(
|
|
|
1705
1720
|
[
|
|
1706
1721
|
{
|
|
1707
1722
|
name: 'signalProcessing',
|
|
1708
|
-
value
|
|
1723
|
+
value,
|
|
1709
1724
|
},
|
|
1710
1725
|
],
|
|
1711
1726
|
{ forceReapply: true },
|
|
@@ -1914,7 +1929,7 @@ function handleCalculateManualTwoDimensionPhaseCorrection(
|
|
|
1914
1929
|
}
|
|
1915
1930
|
|
|
1916
1931
|
const { index } = activeSpectrum;
|
|
1917
|
-
const spectrum = draft.tempData[index];
|
|
1932
|
+
const spectrum = structuredClone(current(draft).tempData[index]);
|
|
1918
1933
|
const datum = draft.data[index];
|
|
1919
1934
|
|
|
1920
1935
|
if (!isSpectrum2D(datum) || !spectrum) {
|
|
@@ -1923,7 +1938,8 @@ function handleCalculateManualTwoDimensionPhaseCorrection(
|
|
|
1923
1938
|
|
|
1924
1939
|
const filterOptions = getTwoDimensionsPhaseCorrectionOptions(draft);
|
|
1925
1940
|
|
|
1926
|
-
phaseCorrectionTwoDimensions.apply(
|
|
1941
|
+
phaseCorrectionTwoDimensions.apply(spectrum, filterOptions);
|
|
1942
|
+
draft.data[index].data = spectrum.data;
|
|
1927
1943
|
}
|
|
1928
1944
|
|
|
1929
1945
|
function getTwoDimensionsPhaseCorrectionOptions(draft: Draft<State>) {
|
|
@@ -1997,6 +2013,34 @@ function handleApplyAutoPhaseCorrectionTwoDimensionsFilter(
|
|
|
1997
2013
|
updateView(draft, phaseCorrectionTwoDimensions.domainUpdateRules);
|
|
1998
2014
|
}
|
|
1999
2015
|
|
|
2016
|
+
function handleReorderFilters(
|
|
2017
|
+
draft: Draft<State>,
|
|
2018
|
+
action: ReorderFiltersAction,
|
|
2019
|
+
) {
|
|
2020
|
+
const { sourceId, targetId } = action.payload;
|
|
2021
|
+
const spectrum = getSpectrum(draft);
|
|
2022
|
+
|
|
2023
|
+
if (!spectrum) {
|
|
2024
|
+
return;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
const filters = spectrum.filters;
|
|
2028
|
+
|
|
2029
|
+
const sourceIndex = filters.findIndex((filter) => filter.name === sourceId);
|
|
2030
|
+
const targetIndex = filters.findIndex((filter) => filter.name === targetId);
|
|
2031
|
+
|
|
2032
|
+
if (sourceIndex === -1 || targetIndex === -1) return;
|
|
2033
|
+
|
|
2034
|
+
const sourceFilter = filters[sourceIndex];
|
|
2035
|
+
filters.splice(sourceIndex, 1);
|
|
2036
|
+
filters.splice(targetIndex, 0, sourceFilter);
|
|
2037
|
+
if (isSpectrum1D(spectrum)) {
|
|
2038
|
+
Filters1DManager.reapplyFilters(spectrum);
|
|
2039
|
+
} else {
|
|
2040
|
+
Filters2DManager.reapplyFilters(spectrum);
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2000
2044
|
export {
|
|
2001
2045
|
handleShiftSpectrumAlongXAxis,
|
|
2002
2046
|
handleApplyZeroFillingFilter,
|
|
@@ -2040,4 +2084,5 @@ export {
|
|
|
2040
2084
|
handleToggleAddTracesToBothDirections,
|
|
2041
2085
|
handleApplyAutoPhaseCorrectionTwoDimensionsFilter,
|
|
2042
2086
|
handleApplyExclusionZone,
|
|
2087
|
+
handleReorderFilters,
|
|
2043
2088
|
};
|
|
@@ -344,12 +344,8 @@ function handleInsetZoomOut(draft: Draft<State>, action: ZoomOutInsetAction) {
|
|
|
344
344
|
|
|
345
345
|
if (!inset) return;
|
|
346
346
|
const originXDomain = draft.originDomain.xDomains[inset.spectrumKey];
|
|
347
|
-
const originYDomain = draft.originDomain.yDomains[inset.spectrumKey];
|
|
348
347
|
|
|
349
|
-
const pop = preparePop(inset.zoomHistory
|
|
350
|
-
xDomain: originXDomain,
|
|
351
|
-
yDomain: originYDomain,
|
|
352
|
-
});
|
|
348
|
+
const pop = preparePop(inset.zoomHistory);
|
|
353
349
|
|
|
354
350
|
switch (zoomType) {
|
|
355
351
|
case ZOOM_TYPES.HORIZONTAL: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import type { Integral } from '@zakodium/nmr-types';
|
|
1
2
|
import type { IntegralsViewState, Spectrum1D } from '@zakodium/nmrium-core';
|
|
2
3
|
import type { Draft } from 'immer';
|
|
3
4
|
import { original } from 'immer';
|
|
4
5
|
import { xyIntegration } from 'ml-spectra-processing';
|
|
5
|
-
import type { Integral } from 'nmr-processing';
|
|
6
6
|
|
|
7
7
|
import type {
|
|
8
8
|
SetSumOptions,
|
|
@@ -13,9 +13,9 @@ import {
|
|
|
13
13
|
setSumOptions,
|
|
14
14
|
} from '../../../data/data1d/Spectrum1D/SumManager.js';
|
|
15
15
|
import {
|
|
16
|
-
updateIntegralsRelativeValues,
|
|
17
16
|
changeIntegralsRelative,
|
|
18
17
|
getShiftX,
|
|
18
|
+
updateIntegralsRelativeValues,
|
|
19
19
|
} from '../../../data/data1d/Spectrum1D/index.js';
|
|
20
20
|
import type { FilterType } from '../../utility/filterType.js';
|
|
21
21
|
import type { State } from '../Reducer.js';
|