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,5 +1,9 @@
|
|
|
1
|
+
import styled from '@emotion/styled';
|
|
1
2
|
import type { CSSProperties } from 'react';
|
|
2
3
|
|
|
4
|
+
import { isSpectrum1D } from '../../../data/data1d/Spectrum1D/isSpectrum1D.js';
|
|
5
|
+
import { isSpectrum2D } from '../../../data/data2d/Spectrum2D/isSpectrum2D.js';
|
|
6
|
+
import { useScale2DX } from '../../2d/utilities/scale.js';
|
|
3
7
|
import {
|
|
4
8
|
detectBrushing,
|
|
5
9
|
useBrushDetectionOptions,
|
|
@@ -7,18 +11,29 @@ import {
|
|
|
7
11
|
} from '../../EventsTrackers/BrushTracker.js';
|
|
8
12
|
import type { BrushAxis } from '../../EventsTrackers/BrushTracker.js';
|
|
9
13
|
import { useChartData } from '../../context/ChartContext.js';
|
|
14
|
+
import { useScaleChecked } from '../../context/ScaleContext.js';
|
|
15
|
+
import { ArrowBox } from '../../elements/ArrowBox.js';
|
|
16
|
+
import useSpectrum from '../../hooks/useSpectrum.js';
|
|
10
17
|
import type { Margin } from '../../reducer/Reducer.js';
|
|
11
18
|
import { options } from '../../toolbar/ToolTypes.js';
|
|
12
19
|
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
const LabelWrapper = styled.span`
|
|
21
|
+
position: absolute;
|
|
22
|
+
top: 0;
|
|
23
|
+
left: 0;
|
|
24
|
+
transform-origin: center;
|
|
25
|
+
font-size: 12px;
|
|
26
|
+
will-change: transform;
|
|
27
|
+
color: black;
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
const baseStyles: CSSProperties = {
|
|
31
|
+
transformOrigin: 'top left',
|
|
32
|
+
position: 'absolute',
|
|
33
|
+
top: '0px',
|
|
34
|
+
left: '0px',
|
|
35
|
+
zoom: '100%',
|
|
36
|
+
willChange: 'transform',
|
|
22
37
|
};
|
|
23
38
|
|
|
24
39
|
const allowTools = new Set([
|
|
@@ -44,27 +59,25 @@ const allowTools = new Set([
|
|
|
44
59
|
options.inset.id,
|
|
45
60
|
]);
|
|
46
61
|
|
|
47
|
-
|
|
62
|
+
interface BrushCoordinates {
|
|
48
63
|
startX: number;
|
|
49
64
|
startY: number;
|
|
50
65
|
endX?: number;
|
|
51
66
|
endY?: number;
|
|
52
|
-
}
|
|
67
|
+
}
|
|
68
|
+
const defaultDimensionBorder: BrushCoordinates = {
|
|
53
69
|
startX: 0,
|
|
54
70
|
startY: 0,
|
|
55
71
|
};
|
|
56
72
|
|
|
57
73
|
interface BrushXYProps {
|
|
58
74
|
axis: BrushAxis;
|
|
59
|
-
dimensionBorder?:
|
|
60
|
-
startX: number;
|
|
61
|
-
startY: number;
|
|
62
|
-
endX?: number;
|
|
63
|
-
endY?: number;
|
|
64
|
-
};
|
|
75
|
+
dimensionBorder?: BrushCoordinates;
|
|
65
76
|
width?: number;
|
|
66
77
|
height?: number;
|
|
67
78
|
margin?: Margin;
|
|
79
|
+
enableHorizontalGuideline?: boolean;
|
|
80
|
+
enableVerticalGuideline?: boolean;
|
|
68
81
|
}
|
|
69
82
|
|
|
70
83
|
export default function BrushXY(props: BrushXYProps) {
|
|
@@ -74,6 +87,8 @@ export default function BrushXY(props: BrushXYProps) {
|
|
|
74
87
|
width: widthProps,
|
|
75
88
|
height: heightProps,
|
|
76
89
|
margin: externalMargin,
|
|
90
|
+
enableHorizontalGuideline = false,
|
|
91
|
+
enableVerticalGuideline = false,
|
|
77
92
|
} = props;
|
|
78
93
|
const {
|
|
79
94
|
width,
|
|
@@ -86,6 +101,7 @@ export default function BrushXY(props: BrushXYProps) {
|
|
|
86
101
|
const brushTracker = useBrushTracker();
|
|
87
102
|
const { step, mouseButton } = brushTracker;
|
|
88
103
|
let { startX, endX, startY, endY } = brushTracker;
|
|
104
|
+
|
|
89
105
|
if (
|
|
90
106
|
!allowTools.has(selectedTool) ||
|
|
91
107
|
step !== 'brushing' ||
|
|
@@ -114,6 +130,7 @@ export default function BrushXY(props: BrushXYProps) {
|
|
|
114
130
|
: dimensionBorder.startX && endX < dimensionBorder.startX
|
|
115
131
|
? dimensionBorder.startX
|
|
116
132
|
: endX;
|
|
133
|
+
|
|
117
134
|
endY =
|
|
118
135
|
dimensionBorder.endY && endY > dimensionBorder.endY
|
|
119
136
|
? dimensionBorder.endY
|
|
@@ -134,25 +151,297 @@ export default function BrushXY(props: BrushXYProps) {
|
|
|
134
151
|
|
|
135
152
|
startX = axis === 'Y' ? margin.left : brush.startX || margin.left;
|
|
136
153
|
startY = axis === 'X' ? margin.top : brush.startY || margin.top;
|
|
154
|
+
endX = axis === 'Y' ? finalWidth : brush.endX || finalWidth;
|
|
155
|
+
endY = axis === 'X' ? finalHeight : brush.endY || finalHeight;
|
|
156
|
+
|
|
157
|
+
let y1;
|
|
158
|
+
let x1;
|
|
159
|
+
|
|
160
|
+
if (brush.type === 'X') {
|
|
161
|
+
y1 = Math.max(brushTracker.startY, margin.top);
|
|
162
|
+
} else if (brush.type === 'XY') {
|
|
163
|
+
y1 = Math.round((brushTracker.endY + brushTracker.startY) / 2);
|
|
164
|
+
}
|
|
165
|
+
if (brush.type === 'Y') {
|
|
166
|
+
x1 = Math.max(brushTracker.startX, margin.left);
|
|
167
|
+
} else if (brush.type === 'XY') {
|
|
168
|
+
x1 = Math.round((brushTracker.endX + brushTracker.startX) / 2);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const invScaleX = 1 / scaleX;
|
|
172
|
+
const invScaleY = 1 / scaleY;
|
|
173
|
+
const horizontalScaleTransform = `scale(1, ${scaleY})`;
|
|
174
|
+
const verticalScaleTransform = `scale(${scaleX}, 1)`;
|
|
175
|
+
|
|
176
|
+
const styles = {
|
|
177
|
+
horizontal: {
|
|
178
|
+
...baseStyles,
|
|
179
|
+
transform: `${verticalScaleTransform} translate(${startX * invScaleX}px, ${y1}px)`,
|
|
180
|
+
backgroundColor: 'red',
|
|
181
|
+
height: `1px`,
|
|
182
|
+
width: finalWidth,
|
|
183
|
+
},
|
|
184
|
+
baseHorizontalThreshold: {
|
|
185
|
+
...baseStyles,
|
|
186
|
+
transformOrigin: 'center',
|
|
187
|
+
backgroundColor: 'red',
|
|
188
|
+
height: `${brush.yThreshold * 2}px`,
|
|
189
|
+
width: '1px',
|
|
190
|
+
},
|
|
191
|
+
baseVerticalThreshold: {
|
|
192
|
+
...baseStyles,
|
|
193
|
+
transformOrigin: 'center',
|
|
194
|
+
backgroundColor: 'red',
|
|
195
|
+
width: `${brush.xThreshold * 2}px`,
|
|
196
|
+
height: '1px',
|
|
197
|
+
},
|
|
198
|
+
|
|
199
|
+
vertical: {
|
|
200
|
+
...baseStyles,
|
|
201
|
+
transform: `${horizontalScaleTransform} translate(${x1}px, ${startY * invScaleY}px)`,
|
|
202
|
+
backgroundColor: 'red',
|
|
203
|
+
width: `1px`,
|
|
204
|
+
height: finalHeight,
|
|
205
|
+
},
|
|
206
|
+
borderTop: {
|
|
207
|
+
...baseStyles,
|
|
208
|
+
transform: `${verticalScaleTransform} translate(${startX * invScaleX}px, ${startY}px)`,
|
|
209
|
+
backgroundColor: 'red',
|
|
210
|
+
height: `1px`,
|
|
211
|
+
width: finalWidth,
|
|
212
|
+
opacity: 0.3,
|
|
213
|
+
},
|
|
214
|
+
borderBottom: {
|
|
215
|
+
...baseStyles,
|
|
216
|
+
transform: `${verticalScaleTransform} translate(${startX * invScaleX}px, ${endY}px) `,
|
|
217
|
+
backgroundColor: 'red',
|
|
218
|
+
|
|
219
|
+
height: `1px`,
|
|
220
|
+
width: finalWidth,
|
|
221
|
+
opacity: 0.3,
|
|
222
|
+
},
|
|
223
|
+
borderLeft: {
|
|
224
|
+
...baseStyles,
|
|
225
|
+
transform: `${horizontalScaleTransform} translate(${startX}px, ${startY * invScaleY}px) `,
|
|
226
|
+
backgroundColor: 'red',
|
|
227
|
+
width: `1px`,
|
|
228
|
+
height: finalHeight,
|
|
229
|
+
opacity: 0.3,
|
|
230
|
+
},
|
|
231
|
+
borderRight: {
|
|
232
|
+
...baseStyles,
|
|
233
|
+
transform: `${horizontalScaleTransform} translate(${endX}px, ${startY * invScaleY}px) `,
|
|
234
|
+
backgroundColor: 'red',
|
|
235
|
+
width: `1px`,
|
|
236
|
+
height: finalHeight,
|
|
237
|
+
opacity: 0.3,
|
|
238
|
+
},
|
|
239
|
+
overlay: {
|
|
240
|
+
...baseStyles,
|
|
241
|
+
transform: `scale(${scaleX}, ${scaleY})translate(${startX * invScaleX}px, ${startY * invScaleY}px)`,
|
|
242
|
+
width: finalWidth,
|
|
243
|
+
height: finalHeight,
|
|
244
|
+
backgroundColor: 'rgba(0,0,0,0.1)',
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
if (scaleX === 0 || scaleY === 0) return;
|
|
249
|
+
|
|
250
|
+
const centerX = Math.round((brushTracker.endX + brushTracker.startX) / 2);
|
|
251
|
+
const centerY = Math.round((brushTracker.endY + brushTracker.startY) / 2);
|
|
137
252
|
|
|
138
253
|
return (
|
|
139
254
|
<div
|
|
140
255
|
style={{
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
256
|
+
contain: 'layout style paint',
|
|
257
|
+
display: 'block',
|
|
258
|
+
width: '100%',
|
|
259
|
+
height: '100%',
|
|
260
|
+
position: 'absolute',
|
|
261
|
+
top: 0,
|
|
262
|
+
left: 0,
|
|
263
|
+
zIndex: '10',
|
|
144
264
|
}}
|
|
145
265
|
>
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
266
|
+
{/* Y Brush Lines */}
|
|
267
|
+
{brush.type.includes('Y') && (
|
|
268
|
+
<>
|
|
269
|
+
<div style={styles.borderTop} />
|
|
270
|
+
<div style={styles.borderBottom} />
|
|
271
|
+
</>
|
|
272
|
+
)}
|
|
273
|
+
|
|
274
|
+
{/* X Brush Lines */}
|
|
275
|
+
{brush.type.includes('X') && (
|
|
276
|
+
<>
|
|
277
|
+
<div style={styles.borderLeft} />
|
|
278
|
+
<div style={styles.borderRight} />
|
|
279
|
+
</>
|
|
280
|
+
)}
|
|
281
|
+
|
|
282
|
+
{/* Overlay */}
|
|
283
|
+
<div style={styles.overlay} />
|
|
284
|
+
|
|
285
|
+
{/* Horizontal guideline */}
|
|
286
|
+
{typeof y1 === 'number' && axis === 'XY' && enableHorizontalGuideline && (
|
|
287
|
+
<>
|
|
288
|
+
<div style={styles.horizontal} />
|
|
289
|
+
|
|
290
|
+
{/* Horizontal Threshold indicator */}
|
|
291
|
+
{brush.type === 'X' && (
|
|
292
|
+
<>
|
|
293
|
+
{/* left threshold indicator */}
|
|
294
|
+
|
|
295
|
+
<div
|
|
296
|
+
style={{
|
|
297
|
+
...styles.baseHorizontalThreshold,
|
|
298
|
+
transform: `translate(${startX}px,${y1 - brush.yThreshold}px)`,
|
|
299
|
+
}}
|
|
300
|
+
/>
|
|
301
|
+
{/* Right threshold indicator */}
|
|
302
|
+
<div
|
|
303
|
+
style={{
|
|
304
|
+
...styles.baseHorizontalThreshold,
|
|
305
|
+
transform: `translate(${endX}px,${y1 - brush.yThreshold}px)`,
|
|
306
|
+
}}
|
|
307
|
+
/>
|
|
308
|
+
</>
|
|
309
|
+
)}
|
|
310
|
+
{/* Range distance */}
|
|
311
|
+
<LabelWrapper
|
|
312
|
+
style={{
|
|
313
|
+
transform: `translate(${brush.type === 'X' ? centerX : startX}px, ${y1}px) translate(-${brush.type === 'X' ? '50' : '100'}%,-50%) `,
|
|
314
|
+
}}
|
|
315
|
+
>
|
|
316
|
+
<ArrowBox
|
|
317
|
+
position="right"
|
|
318
|
+
size={brush.type === 'X' ? 0 : 5}
|
|
319
|
+
borderColor="#f5f5f5"
|
|
320
|
+
borderWidth={1}
|
|
321
|
+
color="rgba(255,255,255,0.9)"
|
|
322
|
+
>
|
|
323
|
+
<DistanceValue start={startX} end={endX} axis="x" />
|
|
324
|
+
</ArrowBox>
|
|
325
|
+
</LabelWrapper>
|
|
326
|
+
</>
|
|
327
|
+
)}
|
|
328
|
+
{/* Vertical guideline */}
|
|
329
|
+
{typeof x1 === 'number' && axis === 'XY' && enableVerticalGuideline && (
|
|
330
|
+
<>
|
|
331
|
+
<div style={styles.vertical} />
|
|
332
|
+
|
|
333
|
+
{/* Vertical Threshold indicator */}
|
|
334
|
+
|
|
335
|
+
{brush.type === 'Y' && (
|
|
336
|
+
<>
|
|
337
|
+
{/* left threshold indicator */}
|
|
338
|
+
|
|
339
|
+
<div
|
|
340
|
+
style={{
|
|
341
|
+
...styles.baseVerticalThreshold,
|
|
342
|
+
transform: `translate(${x1 - brush.yThreshold}px,${startY}px)`,
|
|
343
|
+
}}
|
|
344
|
+
/>
|
|
345
|
+
{/* Right threshold indicator */}
|
|
346
|
+
<div
|
|
347
|
+
style={{
|
|
348
|
+
...styles.baseVerticalThreshold,
|
|
349
|
+
transform: `translate(${x1 - brush.yThreshold}px,${endY}px)`,
|
|
350
|
+
}}
|
|
351
|
+
/>
|
|
352
|
+
</>
|
|
353
|
+
)}
|
|
354
|
+
{/* Range distance */}
|
|
355
|
+
|
|
356
|
+
<LabelWrapper
|
|
357
|
+
style={{
|
|
358
|
+
transformOrigin: 'top left',
|
|
359
|
+
transform: `translate(${x1}px, ${brush.type === 'Y' ? centerY : startY}px) rotate(-90deg) translate(${brush.type === 'Y' ? '-50%' : '0'}, -50%) `,
|
|
360
|
+
}}
|
|
361
|
+
>
|
|
362
|
+
<ArrowBox
|
|
363
|
+
position="left"
|
|
364
|
+
size={brush.type === 'Y' ? 0 : 5}
|
|
365
|
+
borderColor="#f5f5f5"
|
|
366
|
+
borderWidth={1}
|
|
367
|
+
color="rgba(255,255,255,0.9)"
|
|
368
|
+
>
|
|
369
|
+
<DistanceValue start={startY} end={endY} axis="y" />
|
|
370
|
+
</ArrowBox>
|
|
371
|
+
</LabelWrapper>
|
|
372
|
+
</>
|
|
373
|
+
)}
|
|
156
374
|
</div>
|
|
157
375
|
);
|
|
158
376
|
}
|
|
377
|
+
|
|
378
|
+
type DistanceProps =
|
|
379
|
+
| {
|
|
380
|
+
start: number;
|
|
381
|
+
end: number;
|
|
382
|
+
axis: 'x';
|
|
383
|
+
}
|
|
384
|
+
| {
|
|
385
|
+
start: number;
|
|
386
|
+
end: number;
|
|
387
|
+
axis: 'y';
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
function DistanceValue(props: DistanceProps) {
|
|
391
|
+
const spectrum = useSpectrum();
|
|
392
|
+
|
|
393
|
+
if (!spectrum) return;
|
|
394
|
+
|
|
395
|
+
if (isSpectrum1D(spectrum)) {
|
|
396
|
+
return <DistanceOneDimension {...props} />;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
return <DistanceTwoDimension {...props} />;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
function DistanceOneDimension(props: DistanceProps) {
|
|
403
|
+
const { start, end, axis } = props;
|
|
404
|
+
|
|
405
|
+
const spectrum = useSpectrum();
|
|
406
|
+
const { scaleX } = useScaleChecked();
|
|
407
|
+
|
|
408
|
+
if (!spectrum || !isSpectrum1D(spectrum)) return;
|
|
409
|
+
|
|
410
|
+
if (axis !== 'x') {
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
const value = (
|
|
415
|
+
(scaleX().invert(start) - scaleX().invert(end)) *
|
|
416
|
+
spectrum.info.originFrequency
|
|
417
|
+
).toPrecision(5);
|
|
418
|
+
|
|
419
|
+
return (
|
|
420
|
+
<>
|
|
421
|
+
<span style={{ fontWeight: 'bold', fontFamily: 'monospace' }}>
|
|
422
|
+
{value}
|
|
423
|
+
</span>
|
|
424
|
+
<span>Hz</span>
|
|
425
|
+
</>
|
|
426
|
+
);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
function DistanceTwoDimension(props: DistanceProps) {
|
|
430
|
+
const { start, end, axis } = props;
|
|
431
|
+
const spectrum = useSpectrum();
|
|
432
|
+
const scaleX = useScale2DX();
|
|
433
|
+
|
|
434
|
+
if (!spectrum || !isSpectrum2D(spectrum)) return;
|
|
435
|
+
const value = (
|
|
436
|
+
(scaleX.invert(start) - scaleX.invert(end)) *
|
|
437
|
+
spectrum.info.originFrequency[axis === 'x' ? 0 : 1]
|
|
438
|
+
).toPrecision(5);
|
|
439
|
+
return (
|
|
440
|
+
<>
|
|
441
|
+
<span style={{ fontWeight: 'bold', fontFamily: 'monospace' }}>
|
|
442
|
+
{value}
|
|
443
|
+
</span>
|
|
444
|
+
<span>Hz</span>
|
|
445
|
+
</>
|
|
446
|
+
);
|
|
447
|
+
}
|
|
@@ -26,6 +26,8 @@ import {
|
|
|
26
26
|
import type { Layout } from './utilities/DimensionLayout.js';
|
|
27
27
|
import { useScale2DX, useScale2DY } from './utilities/scale.js';
|
|
28
28
|
|
|
29
|
+
const clickDebounceTools = new Set([options.phaseCorrectionTwoDimensions.id]);
|
|
30
|
+
|
|
29
31
|
const brushDetectionOptions: BaseDetectBrushingOptions = {
|
|
30
32
|
thresholdFormat: 'fixed',
|
|
31
33
|
thresholdAxis: 'both',
|
|
@@ -62,7 +64,7 @@ export function BrushTracker2D({ children }) {
|
|
|
62
64
|
width,
|
|
63
65
|
height,
|
|
64
66
|
} = state;
|
|
65
|
-
|
|
67
|
+
const isClickDebounced = clickDebounceTools.has(selectedTool);
|
|
66
68
|
const dispatch = useDispatch();
|
|
67
69
|
const brushStartRef = useRef<{ x: number; y: number } | null>(null);
|
|
68
70
|
const { getModifiersKey, primaryKeyIdentifier } = useMapKeyModifiers();
|
|
@@ -171,14 +173,24 @@ export function BrushTracker2D({ children }) {
|
|
|
171
173
|
);
|
|
172
174
|
|
|
173
175
|
const handleOnDoubleClick: OnDoubleClick = useCallback(
|
|
174
|
-
(
|
|
175
|
-
const
|
|
176
|
+
(event) => {
|
|
177
|
+
const keyModifiers = getModifiersKey(event as unknown as MouseEvent);
|
|
178
|
+
|
|
179
|
+
if (primaryKeyIdentifier === keyModifiers && !isClickDebounced) return;
|
|
180
|
+
|
|
181
|
+
const { x: startX, y: startY } = event;
|
|
176
182
|
const trackID = getLayoutID(DIMENSION, { startX, startY });
|
|
177
183
|
if (trackID) {
|
|
178
184
|
dispatch({ type: 'FULL_ZOOM_OUT', payload: { trackID } });
|
|
179
185
|
}
|
|
180
186
|
},
|
|
181
|
-
[
|
|
187
|
+
[
|
|
188
|
+
DIMENSION,
|
|
189
|
+
dispatch,
|
|
190
|
+
getModifiersKey,
|
|
191
|
+
isClickDebounced,
|
|
192
|
+
primaryKeyIdentifier,
|
|
193
|
+
],
|
|
182
194
|
);
|
|
183
195
|
|
|
184
196
|
const handleZoom: OnZoom = (options) => {
|
|
@@ -208,6 +220,7 @@ export function BrushTracker2D({ children }) {
|
|
|
208
220
|
const mouseClick: OnClick = useCallback(
|
|
209
221
|
(event) => {
|
|
210
222
|
const { x, y, shiftKey } = event;
|
|
223
|
+
|
|
211
224
|
if (shiftKey) {
|
|
212
225
|
switch (selectedTool) {
|
|
213
226
|
case 'phaseCorrectionTwoDimensions':
|
|
@@ -234,6 +247,7 @@ export function BrushTracker2D({ children }) {
|
|
|
234
247
|
|
|
235
248
|
return (
|
|
236
249
|
<BrushTracker
|
|
250
|
+
clickTriggerMode={isClickDebounced ? 'debounced' : 'native'}
|
|
237
251
|
onBrush={handleBrush}
|
|
238
252
|
onBrushEnd={handleBrushEnd}
|
|
239
253
|
onDoubleClick={handleOnDoubleClick}
|
|
@@ -64,7 +64,6 @@ function Viewer2D(props: Viewer2DProps) {
|
|
|
64
64
|
<CrossLinePointer />
|
|
65
65
|
<XYLabelPointer data1D={spectrumData} layout={DIMENSION} />
|
|
66
66
|
|
|
67
|
-
<BrushXY axis="XY" dimensionBorder={DIMENSION.MAIN} />
|
|
68
67
|
<>
|
|
69
68
|
{spectrumData[0] && (
|
|
70
69
|
<BrushXY
|
|
@@ -83,6 +82,12 @@ function Viewer2D(props: Viewer2DProps) {
|
|
|
83
82
|
/>
|
|
84
83
|
)}
|
|
85
84
|
</>
|
|
85
|
+
<BrushXY
|
|
86
|
+
axis="XY"
|
|
87
|
+
dimensionBorder={DIMENSION.MAIN}
|
|
88
|
+
enableHorizontalGuideline
|
|
89
|
+
enableVerticalGuideline
|
|
90
|
+
/>
|
|
86
91
|
<PivotIndicator />
|
|
87
92
|
<FooterBanner data1D={spectrumData} layout={DIMENSION} />
|
|
88
93
|
<SVGRootContainer enableBoxBorder>
|
|
@@ -3,10 +3,7 @@ import debounce from 'lodash/debounce.js';
|
|
|
3
3
|
import { memo, useMemo, useRef } from 'react';
|
|
4
4
|
|
|
5
5
|
import type { LevelSign } from '../../../data/data2d/Spectrum2D/contours.js';
|
|
6
|
-
import {
|
|
7
|
-
drawContours,
|
|
8
|
-
getDefaultContoursLevel,
|
|
9
|
-
} from '../../../data/data2d/Spectrum2D/contours.js';
|
|
6
|
+
import { drawContours } from '../../../data/data2d/Spectrum2D/contours.js';
|
|
10
7
|
import { useChartData } from '../../context/ChartContext.js';
|
|
11
8
|
import { usePreferences } from '../../context/PreferencesContext.js';
|
|
12
9
|
import { useToaster } from '../../context/ToasterContext.js';
|
|
@@ -52,16 +49,11 @@ function usePath(
|
|
|
52
49
|
return pathBuilder.toString();
|
|
53
50
|
}
|
|
54
51
|
|
|
55
|
-
const useContoursLevel = (
|
|
56
|
-
spectrum: Spectrum2D,
|
|
57
|
-
sign: LevelSign,
|
|
58
|
-
quadrant = 'rr',
|
|
59
|
-
) => {
|
|
52
|
+
const useContoursLevel = (spectrum: Spectrum2D, sign: LevelSign) => {
|
|
60
53
|
const {
|
|
61
54
|
display: { contourOptions },
|
|
62
55
|
} = spectrum;
|
|
63
|
-
|
|
64
|
-
return level ?? getDefaultContoursLevel(spectrum, quadrant)[sign];
|
|
56
|
+
return contourOptions?.[sign];
|
|
65
57
|
};
|
|
66
58
|
|
|
67
59
|
function ContoursPaths({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Range } from '@zakodium/nmr-types';
|
|
1
2
|
import type { Spectrum1D } from '@zakodium/nmrium-core';
|
|
2
3
|
|
|
3
4
|
import { SIGNAL_INCLUDED_KINDS } from '../../../data/constants/signalsKinds.js';
|
|
@@ -6,19 +7,21 @@ export interface BaseSignal {
|
|
|
6
7
|
assignment?: string;
|
|
7
8
|
delta: number;
|
|
8
9
|
id: string;
|
|
9
|
-
rangeId: string;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
export type ExtractedSignal<T> = BaseSignal & T;
|
|
13
|
+
|
|
14
|
+
interface ExtractSpectrumSignalsOptions<T> {
|
|
13
15
|
from?: number;
|
|
14
16
|
to?: number;
|
|
17
|
+
include?: (range: Range) => T;
|
|
15
18
|
}
|
|
16
|
-
export function extractSpectrumSignals(
|
|
19
|
+
export function extractSpectrumSignals<T extends object = object>(
|
|
17
20
|
spectrum: Spectrum1D,
|
|
18
|
-
options: ExtractSpectrumSignalsOptions = {},
|
|
21
|
+
options: ExtractSpectrumSignalsOptions<T> = {},
|
|
19
22
|
) {
|
|
20
|
-
const result:
|
|
21
|
-
const { from, to } = options;
|
|
23
|
+
const result: Array<ExtractedSignal<T>> = [];
|
|
24
|
+
const { from, to, include } = options;
|
|
22
25
|
|
|
23
26
|
const ranges = spectrum?.ranges?.values;
|
|
24
27
|
if (!Array.isArray(ranges) || ranges?.length === 0) {
|
|
@@ -40,7 +43,7 @@ export function extractSpectrumSignals(
|
|
|
40
43
|
|
|
41
44
|
if (!isInRange) continue;
|
|
42
45
|
|
|
43
|
-
const { assignment, signals = []
|
|
46
|
+
const { assignment, signals = [] } = range;
|
|
44
47
|
let index = 0;
|
|
45
48
|
for (const signal of signals) {
|
|
46
49
|
const { id, delta, kind } = signal;
|
|
@@ -49,8 +52,8 @@ export function extractSpectrumSignals(
|
|
|
49
52
|
assignment: index === 0 ? assignment : '',
|
|
50
53
|
delta,
|
|
51
54
|
id,
|
|
52
|
-
|
|
53
|
-
});
|
|
55
|
+
...include?.(range),
|
|
56
|
+
} as ExtractedSignal<T>);
|
|
54
57
|
index++;
|
|
55
58
|
}
|
|
56
59
|
}
|