nmrium 0.64.0 → 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 +13 -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.js +1 -1
- package/lib/component/1d/PredictionErrorsNotations.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/utilities/extractSpectrumSignals.d.ts +1 -1
- package/lib/component/2d/utilities/extractSpectrumSignals.d.ts.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.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 +104 -29
- 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/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/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/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/main/InnerNMRiumContents.d.ts.map +1 -1
- package/lib/component/main/InnerNMRiumContents.js +7 -6
- 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/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 +10 -11
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts.map +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +19 -14
- 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/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.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/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/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 +1 -1
- package/lib/component/panels/filtersPanel/Filters/hooks/usePhaseCorrectionTwoDimensions.d.ts.map +1 -1
- 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/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.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 +2 -2
- package/lib/component/reducer/actions/FiltersActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/FiltersActions.js +3 -3
- package/lib/component/reducer/actions/FiltersActions.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 +2 -2
- package/lib/component/reducer/actions/RangesActions.d.ts.map +1 -1
- package/lib/component/reducer/actions/RangesActions.js +1 -1
- 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.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/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/preferencesReducer.d.ts +1 -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/data/PredictionManager.d.ts.map +1 -1
- 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/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/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/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 +30 -30
- package/src/component/1d/BrushTracker1D.tsx +31 -16
- package/src/component/1d/FloatPublicationString.tsx +2 -2
- package/src/component/1d/FloatingRanges.tsx +4 -4
- package/src/component/1d/PredictionErrorsNotations.tsx +2 -2
- 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/utilities/extractSpectrumSignals.ts +1 -1
- 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 +3 -3
- 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 +123 -28
- package/src/component/SVGTable.tsx +4 -6
- 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/Tab/Tabs.tsx +3 -1
- 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/main/InnerNMRiumContents.tsx +7 -6
- 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/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 +21 -24
- package/src/component/panels/MoleculesPanel/MoleculePanelHeader.tsx +22 -17
- package/src/component/panels/MoleculesPanel/Utilities.ts +1 -1
- 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 +1 -1
- 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/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/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 +1 -1
- package/src/component/panels/filtersPanel/Filters/hooks/useZeroFilling.tsx +3 -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 +1 -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 +16 -17
- 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 +4 -4
- package/src/component/reducer/actions/SpectraActions.ts +1 -1
- package/src/component/reducer/actions/ToolsActions.ts +1 -1
- package/src/component/reducer/actions/ZonesActions.ts +1 -1
- package/src/component/reducer/helper/Zoom1DManager.ts +67 -41
- package/src/component/reducer/helper/removeSpectrumRelatedObjectsById.ts +1 -0
- package/src/component/reducer/preferences/actions/matrixGeneration.ts +2 -2
- package/src/component/reducer/preferences/preferencesReducer.ts +2 -2
- package/src/component/toolbar/ToolTypes.ts +1 -1
- package/src/data/PredictionManager.ts +1 -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/getMissingProjection.ts +1 -2
- 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
|
@@ -124,6 +124,16 @@ interface BrushTrackerProps {
|
|
|
124
124
|
onClick?: OnClick;
|
|
125
125
|
noPropagation?: boolean;
|
|
126
126
|
brushDetectionOptions?: BaseDetectBrushingOptions;
|
|
127
|
+
clickTriggerMode?: 'native' | 'debounced';
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function getMouseXY(event: React.MouseEvent, currentTarget?: Element) {
|
|
131
|
+
const boundingRect = (
|
|
132
|
+
currentTarget ?? event.currentTarget
|
|
133
|
+
).getBoundingClientRect();
|
|
134
|
+
const x = event.clientX - boundingRect.x;
|
|
135
|
+
const y = event.clientY - boundingRect.y;
|
|
136
|
+
return { x, y };
|
|
127
137
|
}
|
|
128
138
|
|
|
129
139
|
export function BrushTracker(options: BrushTrackerProps) {
|
|
@@ -138,6 +148,7 @@ export function BrushTracker(options: BrushTrackerProps) {
|
|
|
138
148
|
onClick = () => null,
|
|
139
149
|
noPropagation,
|
|
140
150
|
brushDetectionOptions = { thresholdFormat: 'fixed' },
|
|
151
|
+
clickTriggerMode = 'native',
|
|
141
152
|
} = options;
|
|
142
153
|
|
|
143
154
|
const [state, dispatch] = useReducer<
|
|
@@ -151,11 +162,9 @@ export function BrushTracker(options: BrushTrackerProps) {
|
|
|
151
162
|
const startPositionRef = useRef<Position>({ x: 0, y: 0 });
|
|
152
163
|
const lastRef = useRef<Position>({ x: 0, y: 0 });
|
|
153
164
|
|
|
154
|
-
const
|
|
155
|
-
(event: React.MouseEvent,
|
|
156
|
-
const
|
|
157
|
-
const x = event.clientX - boundingRect.x;
|
|
158
|
-
const y = event.clientY - boundingRect.y;
|
|
165
|
+
const handleClickWithDebounce = useCallback(
|
|
166
|
+
(event: React.MouseEvent, currentTarget: Element) => {
|
|
167
|
+
const { x, y } = getMouseXY(event, currentTarget);
|
|
159
168
|
|
|
160
169
|
// Clear timeout
|
|
161
170
|
if (timeoutRef.current) {
|
|
@@ -181,9 +190,23 @@ export function BrushTracker(options: BrushTrackerProps) {
|
|
|
181
190
|
[onClick, onDoubleClick],
|
|
182
191
|
);
|
|
183
192
|
|
|
193
|
+
function handleClick(event: React.MouseEvent) {
|
|
194
|
+
if (isDraggingRef.current || clickTriggerMode !== 'native') return;
|
|
195
|
+
const { x, y } = getMouseXY(event);
|
|
196
|
+
onClick({ ...event, x, y });
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function handleDoubleClick(event: React.MouseEvent) {
|
|
200
|
+
if (isDraggingRef.current || clickTriggerMode !== 'native') return;
|
|
201
|
+
|
|
202
|
+
const { x, y } = getMouseXY(event);
|
|
203
|
+
onDoubleClick({ ...event, x, y });
|
|
204
|
+
}
|
|
205
|
+
|
|
184
206
|
const pointerDownHandler = useCallback(
|
|
185
207
|
(event: React.PointerEvent) => {
|
|
186
|
-
|
|
208
|
+
event.persist();
|
|
209
|
+
const currentTarget = event.currentTarget;
|
|
187
210
|
isDraggingRef.current = false; // Reset dragging flag
|
|
188
211
|
|
|
189
212
|
//check that the right or left mouse button pressed
|
|
@@ -198,6 +221,7 @@ export function BrushTracker(options: BrushTrackerProps) {
|
|
|
198
221
|
x: event.clientX - boundingRect.x,
|
|
199
222
|
y: event.clientY - boundingRect.y,
|
|
200
223
|
};
|
|
224
|
+
lastRef.current = { x: 0, y: 0 };
|
|
201
225
|
|
|
202
226
|
if (!event.ctrlKey) {
|
|
203
227
|
dispatch({
|
|
@@ -223,24 +247,27 @@ export function BrushTracker(options: BrushTrackerProps) {
|
|
|
223
247
|
if (event.ctrlKey) {
|
|
224
248
|
if (boundingRectRef.current) {
|
|
225
249
|
const boundingRect = boundingRectRef.current;
|
|
250
|
+
|
|
226
251
|
const x = clientX - boundingRect.x;
|
|
227
252
|
const y = clientY - boundingRect.y;
|
|
228
253
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
254
|
+
if (lastRef.current.x > 0 && lastRef.current.y > 0) {
|
|
255
|
+
const deltaX = x - lastRef.current.x;
|
|
256
|
+
const deltaY = y - lastRef.current.y;
|
|
257
|
+
|
|
258
|
+
onZoom({
|
|
259
|
+
deltaY,
|
|
260
|
+
deltaX,
|
|
261
|
+
shiftKey,
|
|
262
|
+
altKey,
|
|
263
|
+
x: startPositionRef.current.x,
|
|
264
|
+
y: startPositionRef.current.y,
|
|
265
|
+
ctrlKey,
|
|
266
|
+
deltaMode: 0,
|
|
267
|
+
isBidirectionalZoom: true,
|
|
268
|
+
});
|
|
269
|
+
}
|
|
232
270
|
lastRef.current = { x, y };
|
|
233
|
-
onZoom({
|
|
234
|
-
deltaY,
|
|
235
|
-
deltaX,
|
|
236
|
-
shiftKey,
|
|
237
|
-
altKey,
|
|
238
|
-
x: startPositionRef.current.x,
|
|
239
|
-
y: startPositionRef.current.y,
|
|
240
|
-
ctrlKey,
|
|
241
|
-
deltaMode: 0,
|
|
242
|
-
isBidirectionalZoom: true,
|
|
243
|
-
});
|
|
244
271
|
}
|
|
245
272
|
} else {
|
|
246
273
|
dispatch({
|
|
@@ -264,7 +291,9 @@ export function BrushTracker(options: BrushTrackerProps) {
|
|
|
264
291
|
dispatch({
|
|
265
292
|
type: 'DONE',
|
|
266
293
|
});
|
|
267
|
-
|
|
294
|
+
if (clickTriggerMode === 'debounced') {
|
|
295
|
+
handleClickWithDebounce(event, currentTarget);
|
|
296
|
+
}
|
|
268
297
|
}
|
|
269
298
|
|
|
270
299
|
globalThis.removeEventListener('pointermove', moveCallback);
|
|
@@ -276,7 +305,7 @@ export function BrushTracker(options: BrushTrackerProps) {
|
|
|
276
305
|
|
|
277
306
|
return false;
|
|
278
307
|
},
|
|
279
|
-
[
|
|
308
|
+
[clickTriggerMode, handleClickWithDebounce, noPropagation, onZoom],
|
|
280
309
|
);
|
|
281
310
|
|
|
282
311
|
const handleMouseWheel = useCallback(
|
|
@@ -320,10 +349,25 @@ export function BrushTracker(options: BrushTrackerProps) {
|
|
|
320
349
|
}
|
|
321
350
|
}, [onBrush, onBrushEnd, state]);
|
|
322
351
|
|
|
352
|
+
function handleStopBrush(event: React.KeyboardEvent) {
|
|
353
|
+
const isEscapePressed = event.key === 'Escape';
|
|
354
|
+
const isBrushing = state.step === 'brushing';
|
|
355
|
+
if (!isEscapePressed || !isBrushing) return;
|
|
356
|
+
|
|
357
|
+
event.stopPropagation();
|
|
358
|
+
|
|
359
|
+
dispatch({
|
|
360
|
+
type: 'DONE',
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
|
|
323
364
|
return (
|
|
324
365
|
<BrushDetectionOptionsContext.Provider value={brushDetectionOptions}>
|
|
325
366
|
<BrushContext.Provider value={state}>
|
|
326
367
|
<div
|
|
368
|
+
tabIndex={0}
|
|
369
|
+
onClick={handleClick}
|
|
370
|
+
onDoubleClick={handleDoubleClick}
|
|
327
371
|
onContextMenu={(e) => {
|
|
328
372
|
if (e.ctrlKey && e.button === 0) {
|
|
329
373
|
e.preventDefault();
|
|
@@ -333,6 +377,7 @@ export function BrushTracker(options: BrushTrackerProps) {
|
|
|
333
377
|
style={{ ...style, touchAction: 'none' }}
|
|
334
378
|
onPointerDown={pointerDownHandler}
|
|
335
379
|
onWheel={handleMouseWheel}
|
|
380
|
+
onKeyDown={handleStopBrush}
|
|
336
381
|
onMouseEnter={() => {
|
|
337
382
|
// disable page scrolling once the mouse over the Displayer
|
|
338
383
|
window.addEventListener('wheel', stopPageScrolling, {
|
|
@@ -440,6 +485,10 @@ interface DetectBrushingResult extends BrushCoordination {
|
|
|
440
485
|
type: BrushAxis;
|
|
441
486
|
scaleX: number;
|
|
442
487
|
scaleY: number;
|
|
488
|
+
directionX: number;
|
|
489
|
+
directionY: number;
|
|
490
|
+
xThreshold: number;
|
|
491
|
+
yThreshold: number;
|
|
443
492
|
}
|
|
444
493
|
interface DetectBrushingThreshold {
|
|
445
494
|
/** Width in pixels */
|
|
@@ -479,7 +528,14 @@ export function detectBrushing(
|
|
|
479
528
|
let xThreshold;
|
|
480
529
|
let yThreshold;
|
|
481
530
|
const { width, height, thresholdFormat, thresholdAxis = 'both' } = options;
|
|
482
|
-
const { startX, endX, startY, endY } = coordination;
|
|
531
|
+
const { startX: x1, endX: x2, startY: y1, endY: y2 } = coordination;
|
|
532
|
+
const startX = Math.min(x1, x2);
|
|
533
|
+
const endX = Math.max(x1, x2);
|
|
534
|
+
const startY = Math.min(y1, y2);
|
|
535
|
+
const endY = Math.max(y1, y2);
|
|
536
|
+
const directionX = endX >= startX ? 1 : -1;
|
|
537
|
+
const directionY = endY >= startY ? 1 : -1;
|
|
538
|
+
|
|
483
539
|
const xDiff = Math.abs(endX - startX);
|
|
484
540
|
const yDiff = Math.abs(endY - startY);
|
|
485
541
|
|
|
@@ -497,10 +553,27 @@ export function detectBrushing(
|
|
|
497
553
|
|
|
498
554
|
const scaleY = (endY - startY) / height;
|
|
499
555
|
const scaleX = (endX - startX) / width;
|
|
556
|
+
|
|
557
|
+
const common = {
|
|
558
|
+
directionX,
|
|
559
|
+
directionY,
|
|
560
|
+
xThreshold,
|
|
561
|
+
yThreshold,
|
|
562
|
+
};
|
|
500
563
|
if (thresholdAxis === 'y') {
|
|
501
564
|
if (yDiff >= yThreshold && yThreshold > 0) {
|
|
502
|
-
return {
|
|
565
|
+
return {
|
|
566
|
+
type: 'XY',
|
|
567
|
+
startX,
|
|
568
|
+
startY,
|
|
569
|
+
endX,
|
|
570
|
+
endY,
|
|
571
|
+
scaleX,
|
|
572
|
+
scaleY,
|
|
573
|
+
...common,
|
|
574
|
+
};
|
|
503
575
|
}
|
|
576
|
+
|
|
504
577
|
return {
|
|
505
578
|
type: 'X',
|
|
506
579
|
startX,
|
|
@@ -509,11 +582,21 @@ export function detectBrushing(
|
|
|
509
582
|
endY: height,
|
|
510
583
|
scaleX,
|
|
511
584
|
scaleY: 1,
|
|
585
|
+
...common,
|
|
512
586
|
};
|
|
513
587
|
}
|
|
514
588
|
if (thresholdAxis === 'x') {
|
|
515
589
|
if (xDiff >= xThreshold && xThreshold > 0) {
|
|
516
|
-
return {
|
|
590
|
+
return {
|
|
591
|
+
type: 'XY',
|
|
592
|
+
startX,
|
|
593
|
+
startY,
|
|
594
|
+
endX,
|
|
595
|
+
endY,
|
|
596
|
+
scaleX,
|
|
597
|
+
scaleY,
|
|
598
|
+
...common,
|
|
599
|
+
};
|
|
517
600
|
}
|
|
518
601
|
|
|
519
602
|
return {
|
|
@@ -524,10 +607,11 @@ export function detectBrushing(
|
|
|
524
607
|
endY,
|
|
525
608
|
scaleX: 1,
|
|
526
609
|
scaleY,
|
|
610
|
+
...common,
|
|
527
611
|
};
|
|
528
612
|
}
|
|
529
613
|
|
|
530
|
-
if (
|
|
614
|
+
if (yDiff < yThreshold) {
|
|
531
615
|
return {
|
|
532
616
|
type: 'X',
|
|
533
617
|
startX,
|
|
@@ -536,10 +620,11 @@ export function detectBrushing(
|
|
|
536
620
|
endY: height,
|
|
537
621
|
scaleX,
|
|
538
622
|
scaleY: 1,
|
|
623
|
+
...common,
|
|
539
624
|
};
|
|
540
625
|
}
|
|
541
626
|
|
|
542
|
-
if (
|
|
627
|
+
if (xDiff < xThreshold) {
|
|
543
628
|
return {
|
|
544
629
|
type: 'Y',
|
|
545
630
|
startX: 0,
|
|
@@ -548,8 +633,18 @@ export function detectBrushing(
|
|
|
548
633
|
endY,
|
|
549
634
|
scaleX: 1,
|
|
550
635
|
scaleY,
|
|
636
|
+
...common,
|
|
551
637
|
};
|
|
552
638
|
}
|
|
553
639
|
|
|
554
|
-
return {
|
|
640
|
+
return {
|
|
641
|
+
type: 'XY',
|
|
642
|
+
startX,
|
|
643
|
+
startY,
|
|
644
|
+
endX,
|
|
645
|
+
endY,
|
|
646
|
+
scaleX,
|
|
647
|
+
scaleY,
|
|
648
|
+
...common,
|
|
649
|
+
};
|
|
555
650
|
}
|
|
@@ -134,8 +134,6 @@ export function SVGTable<T>(props: SVGTableProps<T>) {
|
|
|
134
134
|
|
|
135
135
|
const { width, columns } = mapColumns(externalColumns);
|
|
136
136
|
|
|
137
|
-
let yOffset = rowHeight;
|
|
138
|
-
|
|
139
137
|
const tableOptions = useMemo(() => {
|
|
140
138
|
return { rowHeight };
|
|
141
139
|
}, [rowHeight]);
|
|
@@ -172,11 +170,11 @@ export function SVGTable<T>(props: SVGTableProps<T>) {
|
|
|
172
170
|
})}
|
|
173
171
|
|
|
174
172
|
{data.map((row, rowIndex) => {
|
|
175
|
-
const currentY = yOffset;
|
|
176
|
-
yOffset += rowHeight;
|
|
177
|
-
|
|
178
173
|
return (
|
|
179
|
-
<g
|
|
174
|
+
<g
|
|
175
|
+
key={rowIndex}
|
|
176
|
+
transform={`translate(0, ${rowHeight * (rowIndex + 1)})`}
|
|
177
|
+
>
|
|
180
178
|
{columns.map((col) => {
|
|
181
179
|
const {
|
|
182
180
|
cellBoxProps,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { Ranges, Zones } from '@zakodium/nmr-types';
|
|
1
2
|
import type { Spectrum } from '@zakodium/nmrium-core';
|
|
2
|
-
import type { Ranges, Zones } from 'nmr-processing';
|
|
3
3
|
|
|
4
4
|
import { isSpectrum1D } from '../../../data/data1d/Spectrum1D/index.js';
|
|
5
5
|
import type { Assignments, Axis } from '../AssignmentsContext.js';
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import styled from '@emotion/styled';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
type ArrowPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
5
|
+
|
|
6
|
+
function getInvertedPosition(position: ArrowPosition) {
|
|
7
|
+
switch (position) {
|
|
8
|
+
case 'top':
|
|
9
|
+
return 'bottom';
|
|
10
|
+
case 'bottom':
|
|
11
|
+
return 'top';
|
|
12
|
+
case 'left':
|
|
13
|
+
return 'right';
|
|
14
|
+
case 'right':
|
|
15
|
+
return 'left';
|
|
16
|
+
default:
|
|
17
|
+
return 'top';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
interface ArrowBoxProps {
|
|
21
|
+
position: ArrowPosition;
|
|
22
|
+
size?: number;
|
|
23
|
+
backgroundColor?: string;
|
|
24
|
+
borderWidth?: number;
|
|
25
|
+
borderColor?: string;
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export const ArrowBox = styled.div<ArrowBoxProps>((options) => {
|
|
29
|
+
const {
|
|
30
|
+
position,
|
|
31
|
+
size = 5,
|
|
32
|
+
backgroundColor = 'white',
|
|
33
|
+
borderWidth = 0,
|
|
34
|
+
borderColor = 'black',
|
|
35
|
+
} = options;
|
|
36
|
+
const inverted = getInvertedPosition(position);
|
|
37
|
+
const borderSize = size + Math.round(borderWidth * Math.SQRT2);
|
|
38
|
+
const isVertical = position === 'top' || position === 'bottom';
|
|
39
|
+
const translate = isVertical ? 'translateX(-50%)' : 'translateY(-50%)';
|
|
40
|
+
|
|
41
|
+
return {
|
|
42
|
+
position: 'relative',
|
|
43
|
+
background: backgroundColor,
|
|
44
|
+
border: borderWidth > 0 ? `${borderWidth}px solid ${borderColor}` : 'none',
|
|
45
|
+
padding: '5px',
|
|
46
|
+
borderRadius: '4px',
|
|
47
|
+
boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 8px',
|
|
48
|
+
|
|
49
|
+
'&::after': {
|
|
50
|
+
content: '""',
|
|
51
|
+
position: 'absolute',
|
|
52
|
+
[inverted]: '100%',
|
|
53
|
+
[isVertical ? 'left' : 'top']: '50%',
|
|
54
|
+
transform: translate,
|
|
55
|
+
border: 'solid transparent',
|
|
56
|
+
borderWidth: size,
|
|
57
|
+
[`border${inverted.charAt(0).toUpperCase() + inverted.slice(1)}Color`]:
|
|
58
|
+
backgroundColor,
|
|
59
|
+
pointerEvents: 'none',
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
...(borderWidth > 0 && {
|
|
63
|
+
'&::before': {
|
|
64
|
+
content: '""',
|
|
65
|
+
position: 'absolute',
|
|
66
|
+
[inverted]: '100%',
|
|
67
|
+
[isVertical ? 'left' : 'top']: '50%',
|
|
68
|
+
transform: translate,
|
|
69
|
+
border: 'solid transparent',
|
|
70
|
+
borderWidth: borderSize,
|
|
71
|
+
[`border${inverted.charAt(0).toUpperCase() + inverted.slice(1)}Color`]:
|
|
72
|
+
borderColor,
|
|
73
|
+
pointerEvents: 'none',
|
|
74
|
+
},
|
|
75
|
+
}),
|
|
76
|
+
};
|
|
77
|
+
});
|
|
@@ -129,6 +129,8 @@ function InnerDraggableDialog(props: InnerDraggableDialogProps) {
|
|
|
129
129
|
parentContainerRect,
|
|
130
130
|
});
|
|
131
131
|
|
|
132
|
+
// Mutating a ref.
|
|
133
|
+
// eslint-disable-next-line react-hooks/react-compiler
|
|
132
134
|
innerDialogRef.current.style.transform = `translate(${transformX}px, ${transformY}px)`;
|
|
133
135
|
};
|
|
134
136
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import debounce from 'lodash/debounce.js';
|
|
2
2
|
import type {
|
|
3
|
+
ChangeEvent,
|
|
3
4
|
CSSProperties,
|
|
4
5
|
ForwardedRef,
|
|
5
6
|
ReactElement,
|
|
6
|
-
ChangeEvent,
|
|
7
7
|
} from 'react';
|
|
8
|
-
import {
|
|
8
|
+
import { forwardRef, useEffect, useMemo, useRef, useState } from 'react';
|
|
9
9
|
|
|
10
10
|
import useCombinedRefs from '../hooks/useCombinedRefs.js';
|
|
11
11
|
|
|
@@ -87,7 +87,7 @@ const Input = forwardRef(
|
|
|
87
87
|
const [internalValue, setInternalValue] =
|
|
88
88
|
useState<React.InputHTMLAttributes<HTMLInputElement>['value']>();
|
|
89
89
|
const value = debounceTime ? internalValue : externalValue;
|
|
90
|
-
const localRef = useRef<HTMLInputElement>();
|
|
90
|
+
const localRef = useRef<HTMLInputElement>(null);
|
|
91
91
|
const combinedRef = useCombinedRefs([ref, localRef]);
|
|
92
92
|
const [isDebounced, setDebouncedStatus] = useState<boolean>(false);
|
|
93
93
|
|
|
@@ -4,12 +4,12 @@ import { Suggest } from '@blueprintjs/select';
|
|
|
4
4
|
import debounce from 'lodash/debounce.js';
|
|
5
5
|
import type { ForwardedRef } from 'react';
|
|
6
6
|
import {
|
|
7
|
+
forwardRef,
|
|
8
|
+
isValidElement,
|
|
7
9
|
useEffect,
|
|
8
|
-
useRef,
|
|
9
10
|
useMemo,
|
|
11
|
+
useRef,
|
|
10
12
|
useState,
|
|
11
|
-
isValidElement,
|
|
12
|
-
forwardRef,
|
|
13
13
|
} from 'react';
|
|
14
14
|
|
|
15
15
|
import useCombinedRefs from '../hooks/useCombinedRefs.js';
|
|
@@ -47,7 +47,7 @@ function useInput(props: UseInputProps) {
|
|
|
47
47
|
} = props;
|
|
48
48
|
const [internalValue, setValue] = useState<string>();
|
|
49
49
|
const value = debounceTime ? internalValue : externalValue;
|
|
50
|
-
const localRef = useRef<HTMLInputElement>();
|
|
50
|
+
const localRef = useRef<HTMLInputElement>(null);
|
|
51
51
|
const innerRef = useCombinedRefs([ref, localRef]);
|
|
52
52
|
const [isDebounced, setDebouncedStatus] = useState<boolean>(false);
|
|
53
53
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
2
|
import type { CSSProperties, ReactElement } from 'react';
|
|
3
3
|
import { Children } from 'react';
|
|
4
|
+
import { useResizeObserver } from 'react-d3-utils';
|
|
4
5
|
import { FaAngleLeft } from 'react-icons/fa';
|
|
5
|
-
import useResizeObserver from 'use-resize-observer';
|
|
6
6
|
|
|
7
7
|
type Direction = 'right' | 'left';
|
|
8
8
|
|
|
@@ -97,11 +97,7 @@ export function NextPrev(props: NextPrevProps) {
|
|
|
97
97
|
onChange = () => null,
|
|
98
98
|
style = {},
|
|
99
99
|
} = props;
|
|
100
|
-
const {
|
|
101
|
-
ref,
|
|
102
|
-
width = 0,
|
|
103
|
-
// @ts-expect-error Module is not published correctly.
|
|
104
|
-
} = useResizeObserver();
|
|
100
|
+
const [ref, { width } = { width: 0 }] = useResizeObserver();
|
|
105
101
|
const slidersCount = Children.count(children);
|
|
106
102
|
const lastIndex = slidersCount > 0 ? slidersCount - 1 : 0;
|
|
107
103
|
const activeIndex = Math.min(index, lastIndex);
|
|
@@ -42,7 +42,7 @@ function useNumberInput(props: UseInputProps) {
|
|
|
42
42
|
checkValue,
|
|
43
43
|
} = props;
|
|
44
44
|
const [internalValue, setValue] = useState<number | string>();
|
|
45
|
-
const localRef = useRef<HTMLInputElement>();
|
|
45
|
+
const localRef = useRef<HTMLInputElement>(null);
|
|
46
46
|
const innerRef = useCombinedRefs([ref, localRef]);
|
|
47
47
|
const value = debounceTime ? internalValue : externalValue;
|
|
48
48
|
const [isDebounced, setDebouncedStatus] = useState<boolean>(false);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import type { CSSObject, SerializedStyles } from '@emotion/react';
|
|
4
4
|
import { css } from '@emotion/react';
|
|
5
|
-
import {
|
|
5
|
+
import { useCallback, useEffect, useMemo } from 'react';
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
8
|
HighlightEventSource,
|
|
@@ -83,6 +83,8 @@ function ReactTableRow(props: ReactTableRowProps) {
|
|
|
83
83
|
return () => {
|
|
84
84
|
highlight.hide();
|
|
85
85
|
};
|
|
86
|
+
// TODO: avoid this hack.
|
|
87
|
+
// eslint-disable-next-line react-hooks/react-compiler
|
|
86
88
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
87
89
|
}, []);
|
|
88
90
|
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
useRef,
|
|
13
13
|
useState,
|
|
14
14
|
} from 'react';
|
|
15
|
+
import { useResizeObserver } from 'react-d3-utils';
|
|
15
16
|
import type {
|
|
16
17
|
CellProps,
|
|
17
18
|
Column as ReactColumn,
|
|
@@ -22,7 +23,6 @@ import type {
|
|
|
22
23
|
UseTableOptions,
|
|
23
24
|
} from 'react-table';
|
|
24
25
|
import { useSortBy, useTable } from 'react-table';
|
|
25
|
-
import useResizeObserver from 'use-resize-observer';
|
|
26
26
|
|
|
27
27
|
import type { HighlightEventSource } from '../../highlight/index.js';
|
|
28
28
|
import type { BaseContextMenuProps } from '../ContextMenuBluePrint.js';
|
|
@@ -193,8 +193,11 @@ function TableInner<T extends object>(
|
|
|
193
193
|
data,
|
|
194
194
|
autoResetSortBy: false,
|
|
195
195
|
} as TableOptions<T>,
|
|
196
|
+
// Will be fixed by migrating to tanstack table.
|
|
197
|
+
/* eslint-disable react-hooks/react-compiler */
|
|
196
198
|
useSortBy,
|
|
197
199
|
useRowSpan,
|
|
200
|
+
/* eslint-enable react-hooks/react-compiler */
|
|
198
201
|
) as TableInstanceWithHooks<T>;
|
|
199
202
|
|
|
200
203
|
const { sortBy } = state as any;
|
|
@@ -371,12 +374,8 @@ function ReactTable<T extends object>(props: ReactTableProps<T>) {
|
|
|
371
374
|
const containerRef = useRef<HTMLDivElement | null>(null);
|
|
372
375
|
const visibleRowsCountRef = useRef<number>(0);
|
|
373
376
|
const visibleColumnsCountRef = useRef<number>(0);
|
|
374
|
-
const {
|
|
375
|
-
|
|
376
|
-
width = 0,
|
|
377
|
-
height = 0,
|
|
378
|
-
// @ts-expect-error Module is not published correctly.
|
|
379
|
-
} = useResizeObserver();
|
|
377
|
+
const [mRef, { width, height } = { width: 0, height: 0 }] =
|
|
378
|
+
useResizeObserver();
|
|
380
379
|
|
|
381
380
|
const [tableVirtualBoundary, setTableVirtualBoundary] =
|
|
382
381
|
useState<TableVirtualBoundary>({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import type { ReactElement } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { Children, isValidElement, memo, useMemo } from 'react';
|
|
5
5
|
|
|
6
6
|
import type { TabEvents, TabProps } from './Tab.js';
|
|
7
7
|
import Tab from './Tab.js';
|
|
@@ -114,6 +114,8 @@ function Tabs({
|
|
|
114
114
|
const { tabid } = child.props;
|
|
115
115
|
|
|
116
116
|
if (tabid === activeTab) {
|
|
117
|
+
// TODO: avoid this by not implementing a custom tabs component.
|
|
118
|
+
// eslint-disable-next-line react-hooks/react-compiler
|
|
117
119
|
contentChild = child.props.children;
|
|
118
120
|
}
|
|
119
121
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { Range } from 'nmr-
|
|
2
|
-
import type {
|
|
1
|
+
import type { Range } from '@zakodium/nmr-types';
|
|
2
|
+
import type { CSSProperties, MouseEvent } from 'react';
|
|
3
3
|
import {
|
|
4
4
|
createContext,
|
|
5
|
-
useReducer,
|
|
6
|
-
useMemo,
|
|
7
|
-
useContext,
|
|
8
5
|
useCallback,
|
|
6
|
+
useContext,
|
|
9
7
|
useEffect,
|
|
8
|
+
useMemo,
|
|
9
|
+
useReducer,
|
|
10
10
|
} from 'react';
|
|
11
11
|
|
|
12
12
|
import type { ExclusionZone } from '../../data/types/data1d/ExclusionZone.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ForwardedRef, MutableRefObject, RefCallback } from 'react';
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
3
|
|
|
4
|
-
export default function useCombinedRefs(
|
|
5
|
-
refs: Array<MutableRefObject<
|
|
4
|
+
export default function useCombinedRefs<T>(
|
|
5
|
+
refs: Array<RefCallback<T> | MutableRefObject<T> | ForwardedRef<T>>,
|
|
6
6
|
) {
|
|
7
7
|
const targetRef = useRef<any>();
|
|
8
8
|
|
|
@@ -12,7 +12,9 @@ export default function useCombinedRefs(
|
|
|
12
12
|
if (typeof ref === 'function') {
|
|
13
13
|
ref(targetRef.current);
|
|
14
14
|
} else {
|
|
15
|
-
|
|
15
|
+
// Mutating a ref.
|
|
16
|
+
// eslint-disable-next-line react-hooks/react-compiler
|
|
17
|
+
ref.current = targetRef.current;
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
20
|
}, [refs]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { Info1D, Info2D } from '@zakodium/nmr-types';
|
|
1
2
|
import type { NmrData1D, NmrData2D } from 'cheminfo-types';
|
|
2
|
-
import type { Info1D, Info2D } from 'nmr-processing';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
|
|
5
5
|
import { useChartData } from '../context/ChartContext.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { Filter1DEntry, Filter2DEntry } from '@zakodium/nmr-types';
|
|
1
2
|
import type { Spectrum1D, Spectrum2D } from '@zakodium/nmrium-core';
|
|
2
|
-
import type { Filter1DEntry, Filter2DEntry } from 'nmr-processing';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
|
|
5
5
|
import type { ExtractFilterEntry } from '../../data/types/common/ExtractFilterEntry.js';
|
|
@@ -50,15 +50,16 @@ const NMRiumContainer = styled.div`
|
|
|
50
50
|
cursor: default;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
text {
|
|
56
|
-
-webkit-user-drag: none;
|
|
57
|
-
-moz-user-drag: none;
|
|
58
|
-
-o-user-drag: none;
|
|
53
|
+
/* Prevent text selection everywhere */
|
|
54
|
+
* {
|
|
59
55
|
user-select: none;
|
|
60
56
|
}
|
|
61
57
|
|
|
58
|
+
/* (Safari) Prevent dragging for non-draggable elements everywhere expect element with draggable attribute */
|
|
59
|
+
*:not([draggable='true']) {
|
|
60
|
+
-webkit-user-drag: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
62
63
|
.actions-buttons-popover {
|
|
63
64
|
background: transparent;
|
|
64
65
|
padding: 5px;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Dialog, DialogFooter } from '@blueprintjs/core';
|
|
2
2
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
3
|
-
import type { Peak1D } from 'nmr-
|
|
3
|
+
import type { Peak1D } from '@zakodium/nmr-types';
|
|
4
4
|
import { useState } from 'react';
|
|
5
5
|
import { useForm } from 'react-hook-form';
|
|
6
6
|
import * as Yup from 'yup';
|
|
@@ -18,7 +18,12 @@ import { formatNumber } from '../utility/formatNumber.js';
|
|
|
18
18
|
|
|
19
19
|
type Shape = NonNullable<Peak1D['shape']>;
|
|
20
20
|
|
|
21
|
-
type Kind =
|
|
21
|
+
type Kind =
|
|
22
|
+
| 'gaussian'
|
|
23
|
+
| 'lorentzian'
|
|
24
|
+
| 'pseudoVoigt'
|
|
25
|
+
| 'generalizedLorentzian'
|
|
26
|
+
| 'lorentzianDispersive';
|
|
22
27
|
|
|
23
28
|
function getKindDefaultValues(kind: Kind) {
|
|
24
29
|
return {
|