nmrium 0.38.1 → 0.39.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/ApodizationLine.js +27 -4
- package/lib/component/1d/ExclusionZoneAnnotation.js +1 -1
- package/lib/component/1d/ExclusionZonesAnnotations.js +1 -1
- package/lib/component/1d/FooterBanner.js +5 -5
- package/lib/component/1d/SpectraLegends.js +2 -3
- package/lib/component/1d/Viewer1D.js +1 -1
- package/lib/component/1d/integral/Integral.d.ts +1 -1
- package/lib/component/1d/integral/IntegralResizable.d.ts +1 -1
- package/lib/component/1d/jCouplingGraph/JsCouplings.d.ts +1 -1
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +2 -2
- package/lib/component/1d/multiplicityTree/LevelNode.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/StringNode.d.ts +1 -1
- package/lib/component/1d/multiplicityTree/buildTreeNode.d.ts +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.d.ts +2 -1
- package/lib/component/1d/ranges/Range.d.ts +1 -1
- package/lib/component/1d/tool/PeakPointer.js +6 -6
- package/lib/component/1d/tool/XLabelPointer.js +5 -5
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts +1 -1
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.d.ts +1 -1
- package/lib/component/1d-2d/tools/BrushX.js +2 -3
- package/lib/component/1d-2d/tools/BrushXY.js +2 -3
- package/lib/component/1d-2d/tools/CrossLinePointer.js +4 -5
- package/lib/component/2d/Chart2D.js +4 -4
- package/lib/component/2d/FooterBanner.js +5 -5
- package/lib/component/2d/Viewer2D.js +1 -1
- package/lib/component/2d/tools/XYLabelPointer.js +5 -5
- package/lib/component/2d/zones/Signal.d.ts +1 -1
- package/lib/component/2d/zones/SignalCrosshair.d.ts +1 -1
- package/lib/component/2d/zones/Zone.d.ts +1 -1
- package/lib/component/EventsTrackers/BrushTracker.d.ts +20 -12
- package/lib/component/EventsTrackers/BrushTracker.js +35 -22
- package/lib/component/EventsTrackers/KeysListenerTracker.js +90 -67
- package/lib/component/EventsTrackers/MouseTracker.d.ts +6 -2
- package/lib/component/EventsTrackers/MouseTracker.js +4 -1
- package/lib/component/NMRium.d.ts +5 -5
- package/lib/component/NMRium.js +15 -16
- package/lib/component/assignment/AssignmentsReducer.d.ts +2 -2
- package/lib/component/context/LoggerContext.js +5 -0
- package/lib/component/context/PreferencesContext.d.ts +10 -8
- package/lib/component/elements/Button.d.ts +13 -11
- package/lib/component/elements/Button.js +16 -25
- package/lib/component/elements/ColorInput.d.ts +0 -1
- package/lib/component/elements/ColorInput.js +2 -2
- package/lib/component/elements/EditableColumn.js +5 -2
- package/lib/component/elements/Input.js +2 -4
- package/lib/component/elements/Label.d.ts +1 -0
- package/lib/component/elements/Label.js +2 -2
- package/lib/component/elements/MolecularFormulaInput.d.ts +2 -2
- package/lib/component/elements/MolecularFormulaInput.js +15 -18
- package/lib/component/elements/NextPrev.d.ts +5 -3
- package/lib/component/elements/NextPrev.js +26 -8
- package/lib/component/elements/NumberInput.js +2 -2
- package/lib/component/elements/ReactTable/ReactTable.js +4 -4
- package/lib/component/elements/formik/FormikCheckBox.d.ts +2 -1
- package/lib/component/elements/formik/FormikCheckBox.js +2 -2
- package/lib/component/elements/formik/FormikColumnFormatField.d.ts +4 -0
- package/lib/component/elements/formik/FormikColumnFormatField.js +19 -16
- package/lib/component/elements/formik/FormikError.d.ts +8 -0
- package/lib/component/elements/formik/FormikError.js +22 -0
- package/lib/component/elements/formik/FormikInput.js +10 -6
- package/lib/component/elements/formik/FormikSelect.js +1 -1
- package/lib/component/header/ApodizationOptionsPanel.js +4 -3
- package/lib/component/header/AutoPeakPickingOptionPanel.js +16 -7
- package/lib/component/header/BaseLineCorrectionPanel.js +5 -2
- package/lib/component/header/PhaseCorrectionPanel.js +5 -2
- package/lib/component/header/RangesPickingOptionPanel.js +15 -7
- package/lib/component/header/ZeroFillingOptionsPanel.js +1 -1
- package/lib/component/highlight/index.d.ts +1 -1
- package/lib/component/hooks/useActiveSpectra.d.ts +1 -1
- package/lib/component/hooks/useActiveSpectrum.d.ts +1 -1
- package/lib/component/hooks/useActiveSpectrumPeaksViewState.d.ts +1 -1
- package/lib/component/hooks/useCheckPointsNumberInWindowArea.d.ts +2 -0
- package/lib/component/hooks/useCheckPointsNumberInWindowArea.js +17 -0
- package/lib/component/hooks/useCheckToolsVisibility.d.ts +2 -2
- package/lib/component/hooks/useDatumWithSpectraStatistics.d.ts +3 -2
- package/lib/component/hooks/useExport.js +1 -1
- package/lib/component/hooks/useFilter.d.ts +2 -1
- package/lib/component/hooks/usePanelPreferences.d.ts +3 -3
- package/lib/component/hooks/usePanelPreferences.js +4 -0
- package/lib/component/hooks/useSaveSettings.d.ts +1 -1
- package/lib/component/hooks/useSaveSettings.js +17 -15
- package/lib/component/hooks/useVerticalAlign.d.ts +1 -1
- package/lib/component/loader/DropZone.js +1 -2
- package/lib/component/modal/EditPeakShapeModal.d.ts +2 -2
- package/lib/component/modal/LoadJCAMPModal.d.ts +3 -3
- package/lib/component/modal/LoadJCAMPModal.js +56 -74
- package/lib/component/modal/ModalStyle.js +0 -10
- package/lib/component/modal/MoleculeStructureEditorModal.d.ts +2 -1
- package/lib/component/modal/MoleculeStructureEditorModal.js +12 -6
- package/lib/component/modal/MultipletAnalysisModal.d.ts +2 -2
- package/lib/component/modal/PredictSpectraModal.d.ts +4 -2
- package/lib/component/modal/PredictSpectraModal.js +53 -105
- package/lib/component/modal/SaveAsModal.d.ts +2 -0
- package/lib/component/modal/SaveAsModal.js +21 -14
- package/lib/component/modal/changeSum/ChangeSumModal.js +25 -38
- package/lib/component/modal/editRange/EditRangeModal.d.ts +7 -6
- package/lib/component/modal/editRange/EditRangeModal.js +33 -13
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.d.ts +1 -1
- package/lib/component/modal/editRange/forms/components/DeltaInput.js +2 -0
- package/lib/component/modal/editRange/forms/components/SignalsForm.d.ts +2 -2
- package/lib/component/modal/metaImportation/MetaImportationModal.js +15 -5
- package/lib/component/modal/setting/GeneralSettings.js +2 -7
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +7 -15
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +2 -2
- package/lib/component/panels/MoleculesPanel/MoleculePanel.d.ts +1 -11
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +20 -25
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +6 -11
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +71 -81
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +1 -1
- package/lib/component/panels/MoleculesPanel/Utilities.js +3 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisColumnHeader.js +6 -6
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/index.js +2 -2
- package/lib/component/panels/Panels.js +2 -2
- package/lib/component/panels/PeaksPanel/PeaksPanel.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +39 -53
- package/lib/component/panels/RangesPanel/RangesPreferences.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesPreferences.js +7 -22
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +2 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.d.ts +1 -1
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.d.ts +1 -1
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +9 -12
- package/lib/component/panels/RangesPanel/hooks/useMapRanges.d.ts +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectraTable.js +5 -1
- package/lib/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +10 -4
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.d.ts +2 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts +1 -1
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.d.ts +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.d.ts +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.js +5 -24
- package/lib/component/panels/databasePanel/DatabasePreferences.js +2 -2
- package/lib/component/panels/header/DefaultPanelHeader.d.ts +2 -3
- package/lib/component/panels/header/DefaultPanelHeader.js +18 -26
- package/lib/component/panels/header/PanelHeader.d.ts +7 -0
- package/lib/component/panels/header/PanelHeader.js +12 -0
- package/lib/component/panels/predictionPanel/PredictionOptionsPanel.d.ts +9 -0
- package/lib/component/panels/predictionPanel/PredictionOptionsPanel.js +94 -0
- package/lib/component/panels/predictionPanel/PredictionPanel.d.ts +1 -1
- package/lib/component/panels/predictionPanel/PredictionPanel.js +109 -37
- package/lib/component/panels/predictionPanel/PredictionPreferences.d.ts +3 -0
- package/lib/component/panels/predictionPanel/PredictionPreferences.js +24 -0
- package/lib/component/panels/predictionPanel/PredictionSimpleOptions.d.ts +2 -0
- package/lib/component/panels/predictionPanel/PredictionSimpleOptions.js +44 -0
- package/lib/component/reducer/Reducer.d.ts +5 -87
- package/lib/component/reducer/Reducer.js +1 -29
- package/lib/component/reducer/actions/DatabaseActions.js +6 -4
- package/lib/component/reducer/actions/DomainActions.js +3 -0
- package/lib/component/reducer/actions/FiltersActions.d.ts +1 -2
- package/lib/component/reducer/actions/FiltersActions.js +47 -52
- package/lib/component/reducer/actions/HistoryActions.d.ts +4 -0
- package/lib/component/reducer/actions/HistoryActions.js +40 -0
- package/lib/component/reducer/actions/IntegralsActions.d.ts +1 -1
- package/lib/component/reducer/actions/IntegralsActions.js +3 -1
- package/lib/component/reducer/actions/LoadActions.d.ts +1 -2
- package/lib/component/reducer/actions/LoadActions.js +1 -1
- package/lib/component/reducer/actions/MoleculeActions.d.ts +7 -4
- package/lib/component/reducer/actions/MoleculeActions.js +57 -28
- package/lib/component/reducer/actions/PeaksActions.d.ts +1 -2
- package/lib/component/reducer/actions/PeaksActions.js +3 -3
- package/lib/component/reducer/actions/RangesActions.d.ts +4 -5
- package/lib/component/reducer/actions/RangesActions.js +5 -27
- package/lib/component/reducer/actions/SpectrumsActions.js +8 -8
- package/lib/component/reducer/actions/ToolsActions.d.ts +2 -2
- package/lib/component/reducer/actions/ToolsActions.js +3 -32
- package/lib/component/reducer/actions/ZonesActions.d.ts +2 -1
- package/lib/component/reducer/actions/ZonesActions.js +3 -6
- package/lib/component/reducer/helper/ZoomHistoryManager.d.ts +8 -0
- package/lib/component/reducer/helper/ZoomHistoryManager.js +35 -0
- package/lib/component/reducer/helper/getActiveSpectra.d.ts +1 -1
- package/lib/component/reducer/helper/getActiveSpectrum.d.ts +1 -1
- package/lib/component/reducer/helper/getVerticalAlign.d.ts +1 -1
- package/lib/component/reducer/preferences/actions/addWorkspace.js +2 -2
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts +1 -1
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +3 -3
- package/lib/component/reducer/preferences/utilities/getActiveWorkspace.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/getPreferencesByWorkspace.d.ts +2 -3
- package/lib/component/reducer/preferences/utilities/initWorkspace.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.d.ts +1 -1
- package/lib/component/reducer/preferences/utilities/mapWorkspaces.d.ts +1 -1
- package/lib/component/toolbar/BasicToolBar.js +6 -11
- package/lib/component/toolbar/ToolTypes.d.ts +2 -2
- package/lib/component/toolbar/ToolTypes.js +1 -1
- package/lib/component/workspaces/assignment.d.ts +1 -1
- package/lib/component/workspaces/basic.d.ts +1 -1
- package/lib/component/workspaces/embedded.d.ts +1 -1
- package/lib/component/workspaces/exercise.d.ts +1 -1
- package/lib/component/workspaces/index.d.ts +6 -6
- package/lib/component/workspaces/prediction.d.ts +1 -1
- package/lib/component/workspaces/prediction.js +193 -0
- package/lib/component/workspaces/process1D.d.ts +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.d.ts +1 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib/data/PredictionManager.d.ts +3 -1
- package/lib/data/PredictionManager.js +43 -3
- package/lib/data/SpectraManager.d.ts +1 -2
- package/lib/data/constants/DefaultApodizationOptions.d.ts +2 -0
- package/lib/data/constants/DefaultApodizationOptions.js +5 -0
- package/lib/data/data1d/Spectrum1D/SumManager.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/generateJGraphData.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/generateSpectrumFromPublicationString.d.ts +1 -2
- package/lib/data/data1d/Spectrum1D/index.d.ts +1 -5
- package/lib/data/data1d/Spectrum1D/index.js +1 -5
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +3 -3
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +3 -2
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +1 -1
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -2
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +3 -2
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/lookupPeak.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +1 -2
- package/lib/data/data1d/Spectrum1D/ranges/addRange.d.ts +7 -7
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +5 -24
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/checkRangeKind.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRange.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +1 -2
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.js +13 -6
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +23 -18
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +37 -2
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js +1 -1
- package/lib/data/data1d/database.js +2 -4
- package/lib/data/data1d/multipleSpectraAnalysis.d.ts +3 -30
- package/lib/data/data1d/multipleSpectraAnalysis.js +4 -15
- package/lib/data/data2d/Spectrum2D/getMissingProjection.d.ts +3 -2
- package/lib/data/data2d/Spectrum2D/getShift.js +1 -1
- package/lib/data/data2d/Spectrum2D/getSlice.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZones.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +1 -1
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +3 -2
- package/lib/data/data2d/Spectrum2D/zones/isZoneExists.d.ts +2 -1
- package/lib/data/data2d/Spectrum2D/zones/mapZones.d.ts +3 -2
- package/lib/data/getDefaultMatrixFilters.d.ts +1 -1
- package/lib/data/types/data1d/ComplexData1D.d.ts +2 -2
- package/lib/data/types/data1d/RangeDetectionResult.d.ts +1 -1
- package/lib/data/utilities/FindUtilities.d.ts +2 -1
- package/lib/data/utilities/RangeUtilities.d.ts +1 -1
- package/lib/data/utilities/ZoneUtilities.d.ts +1 -1
- package/lib/data/utilities/calculateSanPlot.d.ts +2 -2
- package/lib/types/NMRiumDataReturn.d.ts +1 -3
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/ApodizationLine.js +28 -5
- package/lib-cjs/component/1d/ExclusionZoneAnnotation.js +3 -26
- package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +5 -28
- package/lib-cjs/component/1d/FooterBanner.js +2 -2
- package/lib-cjs/component/1d/SpectraLegends.js +1 -2
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +2 -2
- package/lib-cjs/component/1d/tool/PeakPointer.js +3 -3
- package/lib-cjs/component/1d/tool/XLabelPointer.js +2 -2
- package/lib-cjs/component/1d-2d/tools/BrushX.js +1 -2
- package/lib-cjs/component/1d-2d/tools/BrushXY.js +1 -2
- package/lib-cjs/component/1d-2d/tools/CrossLinePointer.js +2 -3
- package/lib-cjs/component/2d/Chart2D.js +4 -4
- package/lib-cjs/component/2d/FooterBanner.js +2 -2
- package/lib-cjs/component/2d/tools/XYLabelPointer.js +2 -2
- package/lib-cjs/component/EventsTrackers/BrushTracker.js +36 -22
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +90 -67
- package/lib-cjs/component/EventsTrackers/MouseTracker.js +4 -1
- package/lib-cjs/component/NMRium.js +12 -13
- package/lib-cjs/component/context/LoggerContext.js +5 -0
- package/lib-cjs/component/elements/Button.js +16 -25
- package/lib-cjs/component/elements/ColorInput.js +2 -2
- package/lib-cjs/component/elements/EditableColumn.js +5 -2
- package/lib-cjs/component/elements/Input.js +2 -4
- package/lib-cjs/component/elements/Label.js +2 -2
- package/lib-cjs/component/elements/MolecularFormulaInput.js +14 -16
- package/lib-cjs/component/elements/NextPrev.js +26 -8
- package/lib-cjs/component/elements/NumberInput.js +2 -2
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +4 -4
- package/lib-cjs/component/elements/formik/FormikCheckBox.js +2 -2
- package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +20 -16
- package/lib-cjs/component/elements/formik/FormikError.js +27 -0
- package/lib-cjs/component/elements/formik/FormikInput.js +10 -6
- package/lib-cjs/component/elements/formik/FormikSelect.js +1 -1
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +6 -5
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +15 -6
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +6 -3
- package/lib-cjs/component/header/PhaseCorrectionPanel.js +6 -26
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +15 -7
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +2 -25
- package/lib-cjs/component/hooks/useCheckPointsNumberInWindowArea.js +24 -0
- package/lib-cjs/component/hooks/useExport.js +1 -1
- package/lib-cjs/component/hooks/usePanelPreferences.js +4 -0
- package/lib-cjs/component/hooks/useSaveSettings.js +16 -14
- package/lib-cjs/component/loader/DropZone.js +1 -2
- package/lib-cjs/component/modal/LoadJCAMPModal.js +81 -75
- package/lib-cjs/component/modal/ModalStyle.js +0 -10
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +12 -6
- package/lib-cjs/component/modal/PredictSpectraModal.js +53 -126
- package/lib-cjs/component/modal/SaveAsModal.js +22 -14
- package/lib-cjs/component/modal/changeSum/ChangeSumModal.js +24 -37
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +32 -12
- package/lib-cjs/component/modal/editRange/forms/components/DeltaInput.js +2 -0
- package/lib-cjs/component/modal/metaImportation/MetaImportationModal.js +15 -5
- package/lib-cjs/component/modal/setting/GeneralSettings.js +2 -7
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +6 -14
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +2 -2
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +19 -24
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +76 -86
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +3 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisColumnHeader.js +6 -6
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/index.js +2 -2
- package/lib-cjs/component/panels/Panels.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +38 -52
- package/lib-cjs/component/panels/RangesPanel/RangesPreferences.js +5 -20
- package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +9 -12
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +5 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +10 -4
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +1 -1
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +5 -24
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +25 -2
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +18 -26
- package/lib-cjs/component/panels/header/PanelHeader.js +15 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionOptionsPanel.js +122 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +109 -37
- package/lib-cjs/component/panels/predictionPanel/PredictionPreferences.js +29 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionSimpleOptions.js +72 -0
- package/lib-cjs/component/reducer/Reducer.js +2 -31
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +6 -4
- package/lib-cjs/component/reducer/actions/DomainActions.js +3 -0
- package/lib-cjs/component/reducer/actions/FiltersActions.js +66 -94
- package/lib-cjs/component/reducer/actions/HistoryActions.js +45 -0
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +3 -1
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +58 -32
- package/lib-cjs/component/reducer/actions/PeaksActions.js +3 -3
- package/lib-cjs/component/reducer/actions/RangesActions.js +7 -52
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +10 -33
- package/lib-cjs/component/reducer/actions/ToolsActions.js +26 -32
- package/lib-cjs/component/reducer/actions/ZonesActions.js +6 -32
- package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +37 -0
- package/lib-cjs/component/reducer/preferences/actions/addWorkspace.js +2 -2
- package/lib-cjs/component/toolbar/BasicToolBar.js +5 -10
- package/lib-cjs/component/toolbar/ToolTypes.js +9 -32
- package/lib-cjs/component/workspaces/prediction.js +193 -0
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +21 -44
- package/lib-cjs/data/PredictionManager.js +43 -3
- package/lib-cjs/data/constants/DefaultApodizationOptions.js +8 -0
- package/lib-cjs/data/data1d/Spectrum1D/index.js +7 -11
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +9 -32
- package/lib-cjs/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/initiatePeaks.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/peaks/optimizePeaks.js +1 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +7 -26
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRange.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRange.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRanges.js +3 -4
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectSignal.js +13 -6
- package/lib-cjs/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +23 -18
- package/lib-cjs/data/data1d/Spectrum1D/ranges/initiateRanges.js +2 -2
- package/lib-cjs/data/data1d/database.js +2 -4
- package/lib-cjs/data/data1d/multipleSpectraAnalysis.js +5 -16
- package/lib-cjs/data/data2d/Spectrum2D/getShift.js +3 -26
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +2 -25
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +29 -29
- package/lib/component/panels/predictionPanel/PredictionOptions.d.ts +0 -7
- package/lib/component/panels/predictionPanel/PredictionOptions.js +0 -74
- package/lib/component/workspaces/Workspace.d.ts +0 -188
- package/lib/component/workspaces/Workspace.js +0 -1
- package/lib/data/Filters.d.ts +0 -12
- package/lib/data/Filters.js +0 -12
- package/lib/data/FiltersManager.d.ts +0 -30
- package/lib/data/FiltersManager.js +0 -175
- package/lib/data/data1d/Spectrum1D/getShiftX.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/getShiftX.js +0 -6
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +0 -4
- package/lib/data/data1d/Spectrum1D/integrals/checkIntegralKind.d.ts +0 -7
- package/lib/data/data1d/Spectrum1D/integrals/checkIntegralKind.js +0 -9
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.d.ts +0 -12
- package/lib/data/data1d/Spectrum1D/integrals/mapIntegrals.js +0 -36
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegrals.js +0 -6
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +0 -5
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.js +0 -26
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.d.ts +0 -3
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +0 -45
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/peaks/updatePeaks.js +0 -7
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +0 -4
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +0 -78
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRanges.js +0 -9
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.d.ts +0 -2
- package/lib/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +0 -5
- package/lib/data/data1d/filter1d/apodization.d.ts +0 -27
- package/lib/data/data1d/filter1d/apodization.js +0 -81
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +0 -33
- package/lib/data/data1d/filter1d/baselineCorrection.js +0 -51
- package/lib/data/data1d/filter1d/digitalFilter.d.ts +0 -20
- package/lib/data/data1d/filter1d/digitalFilter.js +0 -44
- package/lib/data/data1d/filter1d/equallySpaced.d.ts +0 -33
- package/lib/data/data1d/filter1d/equallySpaced.js +0 -52
- package/lib/data/data1d/filter1d/exclusionZones.d.ts +0 -15
- package/lib/data/data1d/filter1d/exclusionZones.js +0 -32
- package/lib/data/data1d/filter1d/fft.d.ts +0 -18
- package/lib/data/data1d/filter1d/fft.js +0 -90
- package/lib/data/data1d/filter1d/phaseCorrection.d.ts +0 -26
- package/lib/data/data1d/filter1d/phaseCorrection.js +0 -64
- package/lib/data/data1d/filter1d/shiftX.d.ts +0 -20
- package/lib/data/data1d/filter1d/shiftX.js +0 -26
- package/lib/data/data1d/filter1d/signalProcessing.d.ts +0 -26
- package/lib/data/data1d/filter1d/signalProcessing.js +0 -65
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.d.ts +0 -2
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +0 -35
- package/lib/data/data1d/filter1d/zeroFilling.d.ts +0 -22
- package/lib/data/data1d/filter1d/zeroFilling.js +0 -60
- package/lib/data/data2d/filter2d/shiftX.d.ts +0 -18
- package/lib/data/data2d/filter2d/shiftX.js +0 -27
- package/lib/data/data2d/filter2d/shiftY.d.ts +0 -18
- package/lib/data/data2d/filter2d/shiftY.js +0 -27
- package/lib/data/types/view-state/PeaksViewState.d.ts +0 -17
- package/lib/data/types/view-state/PeaksViewState.js +0 -1
- package/lib/types/NMRiumGeneralPreferences.d.ts +0 -7
- package/lib/types/NMRiumGeneralPreferences.js +0 -1
- package/lib/types/NMRiumPanelPreferences.d.ts +0 -17
- package/lib/types/NMRiumPanelPreferences.js +0 -1
- package/lib/types/NMRiumToolBarPreferences.d.ts +0 -22
- package/lib/types/NMRiumToolBarPreferences.js +0 -1
- package/lib/types/PanelPreferencesType.d.ts +0 -4
- package/lib/types/PanelPreferencesType.js +0 -1
- package/lib-cjs/component/panels/predictionPanel/PredictionOptions.js +0 -102
- package/lib-cjs/component/workspaces/Workspace.js +0 -2
- package/lib-cjs/data/Filters.js +0 -38
- package/lib-cjs/data/FiltersManager.js +0 -206
- package/lib-cjs/data/data1d/Spectrum1D/getShiftX.js +0 -33
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +0 -8
- package/lib-cjs/data/data1d/Spectrum1D/integrals/checkIntegralKind.js +0 -13
- package/lib-cjs/data/data1d/Spectrum1D/integrals/mapIntegrals.js +0 -40
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegrals.js +0 -10
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateIntegralsRelativeValues.js +0 -9
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateRelatives.js +0 -30
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +0 -49
- package/lib-cjs/data/data1d/Spectrum1D/peaks/updatePeaks.js +0 -11
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +0 -82
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRanges.js +0 -13
- package/lib-cjs/data/data1d/Spectrum1D/ranges/updateRangesRelativeValues.js +0 -9
- package/lib-cjs/data/data1d/filter1d/apodization.js +0 -88
- package/lib-cjs/data/data1d/filter1d/baselineCorrection.js +0 -60
- package/lib-cjs/data/data1d/filter1d/digitalFilter.js +0 -50
- package/lib-cjs/data/data1d/filter1d/equallySpaced.js +0 -61
- package/lib-cjs/data/data1d/filter1d/exclusionZones.js +0 -38
- package/lib-cjs/data/data1d/filter1d/fft.js +0 -96
- package/lib-cjs/data/data1d/filter1d/phaseCorrection.js +0 -70
- package/lib-cjs/data/data1d/filter1d/shiftX.js +0 -32
- package/lib-cjs/data/data1d/filter1d/signalProcessing.js +0 -95
- package/lib-cjs/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +0 -39
- package/lib-cjs/data/data1d/filter1d/zeroFilling.js +0 -66
- package/lib-cjs/data/data2d/filter2d/shiftX.js +0 -33
- package/lib-cjs/data/data2d/filter2d/shiftY.js +0 -33
- package/lib-cjs/data/types/view-state/PeaksViewState.js +0 -2
- package/lib-cjs/types/NMRiumGeneralPreferences.js +0 -2
- package/lib-cjs/types/NMRiumPanelPreferences.js +0 -2
- package/lib-cjs/types/NMRiumToolBarPreferences.js +0 -2
- package/lib-cjs/types/PanelPreferencesType.js +0 -2
|
@@ -1,27 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
@@ -29,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
6
|
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
30
7
|
/** @jsxImportSource @emotion/react */
|
|
31
8
|
const react_1 = require("@emotion/react");
|
|
9
|
+
const nmr_processing_1 = require("nmr-processing");
|
|
32
10
|
const react_2 = require("react");
|
|
33
|
-
const Filters = __importStar(require("../../data/Filters"));
|
|
34
11
|
const ScaleContext_1 = require("../context/ScaleContext");
|
|
35
12
|
const highlight_1 = require("../highlight");
|
|
36
13
|
const useActiveSpectrumStyleOptions_1 = __importDefault(require("../hooks/useActiveSpectrumStyleOptions"));
|
|
@@ -41,7 +18,7 @@ const style = (0, react_1.css) `
|
|
|
41
18
|
`;
|
|
42
19
|
function ExclusionZoneAnnotation({ zone, color, vAlign, spectrumID, filterId, }) {
|
|
43
20
|
const { scaleX, scaleY } = (0, ScaleContext_1.useScaleChecked)();
|
|
44
|
-
const type = filterId === Filters.signalProcessing.id
|
|
21
|
+
const type = filterId === nmr_processing_1.Filters.signalProcessing.id
|
|
45
22
|
? highlight_1.HighlightEventSource.MATRIX_GENERATION_EXCLUSION_ZONE
|
|
46
23
|
: highlight_1.HighlightEventSource.EXCLUSION_ZONE;
|
|
47
24
|
const highlight = (0, highlight_1.useHighlight)([], {
|
|
@@ -50,7 +27,7 @@ function ExclusionZoneAnnotation({ zone, color, vAlign, spectrumID, filterId, })
|
|
|
50
27
|
});
|
|
51
28
|
const { opacity } = (0, useActiveSpectrumStyleOptions_1.default)(spectrumID);
|
|
52
29
|
return ((0, jsx_runtime_1.jsx)("g", { transform: `translate(${scaleX()(zone.to)},0)`, children: (0, jsx_runtime_1.jsx)("rect", { x: "0", css: style, transform: `translate(0,${scaleY()(0) - (vAlign + 5)})`, width: `${scaleX()(zone.from) - scaleX()(zone.to)}`, height: "10px", style: {
|
|
53
|
-
fill: filterId === Filters.signalProcessing.id ? 'gray' : color,
|
|
30
|
+
fill: filterId === nmr_processing_1.Filters.signalProcessing.id ? 'gray' : color,
|
|
54
31
|
opacity,
|
|
55
32
|
}, ...highlight.onHover }) }, zone.id));
|
|
56
33
|
}
|
|
@@ -1,34 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const nmr_processing_1 = require("nmr-processing");
|
|
30
8
|
const react_1 = require("react");
|
|
31
|
-
const Filters = __importStar(require("../../data/Filters"));
|
|
32
9
|
const ChartContext_1 = require("../context/ChartContext");
|
|
33
10
|
const ScaleContext_1 = require("../context/ScaleContext");
|
|
34
11
|
const useSpectraPerNucleus_1 = __importDefault(require("../hooks/useSpectraPerNucleus"));
|
|
@@ -56,12 +33,12 @@ exports.default = ExclusionZonesAnnotations;
|
|
|
56
33
|
function getExclusionZones(data) {
|
|
57
34
|
const zones = [];
|
|
58
35
|
for (const filter of data.filters) {
|
|
59
|
-
if (filter.name === Filters.exclusionZones.id && filter.flag) {
|
|
60
|
-
zones.push({ id: Filters.exclusionZones.id, zones: filter.value });
|
|
36
|
+
if (filter.name === nmr_processing_1.Filters.exclusionZones.id && filter.flag) {
|
|
37
|
+
zones.push({ id: nmr_processing_1.Filters.exclusionZones.id, zones: filter.value });
|
|
61
38
|
}
|
|
62
|
-
else if (filter.name === Filters.signalProcessing.id && filter.flag) {
|
|
39
|
+
else if (filter.name === nmr_processing_1.Filters.signalProcessing.id && filter.flag) {
|
|
63
40
|
zones.push({
|
|
64
|
-
id: Filters.signalProcessing.id,
|
|
41
|
+
id: nmr_processing_1.Filters.signalProcessing.id,
|
|
65
42
|
zones: filter.value.exclusionsZones,
|
|
66
43
|
});
|
|
67
44
|
}
|
|
@@ -81,8 +81,8 @@ const styles = (0, react_1.css) `
|
|
|
81
81
|
}
|
|
82
82
|
`;
|
|
83
83
|
function FooterBannerInner({ margin, width, height, activeSpectrum, spectrum, activeTab, }) {
|
|
84
|
-
let position = (0,
|
|
85
|
-
const { startX, endX, step } = (0,
|
|
84
|
+
let position = (0, MouseTracker_1.useMouseTracker)();
|
|
85
|
+
const { startX, endX, step } = (0, BrushTracker_1.useBrushTracker)();
|
|
86
86
|
const { scaleX } = (0, ScaleContext_1.useScaleChecked)();
|
|
87
87
|
const format = (0, useFormatNumberByNucleus_1.useFormatNumberByNucleus)(activeTab);
|
|
88
88
|
if (!position ||
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
const get_1 = __importDefault(require("lodash/get"));
|
|
8
8
|
const ml_spectra_processing_1 = require("ml-spectra-processing");
|
|
9
|
-
const react_1 = require("react");
|
|
10
9
|
const get1DDataXY_1 = require("../../data/data1d/Spectrum1D/get1DDataXY");
|
|
11
10
|
const MouseTracker_1 = require("../EventsTrackers/MouseTracker");
|
|
12
11
|
const ChartContext_1 = require("../context/ChartContext");
|
|
@@ -26,7 +25,7 @@ const styles = {
|
|
|
26
25
|
};
|
|
27
26
|
function YTracker({ datum }) {
|
|
28
27
|
const { scaleX } = (0, ScaleContext_1.useScale)();
|
|
29
|
-
const position = (0,
|
|
28
|
+
const position = (0, MouseTracker_1.useMouseTracker)();
|
|
30
29
|
if (!scaleX || !position) {
|
|
31
30
|
return null;
|
|
32
31
|
}
|
|
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const nmr_load_save_1 = require("nmr-load-save");
|
|
7
8
|
const react_1 = require("react");
|
|
8
|
-
const multipleSpectraAnalysis_1 = require("../../../data/data1d/multipleSpectraAnalysis");
|
|
9
9
|
const ChartContext_1 = require("../../context/ChartContext");
|
|
10
10
|
const usePanelPreferences_1 = require("../../hooks/usePanelPreferences");
|
|
11
11
|
const AnalysisRange_1 = __importDefault(require("./AnalysisRange"));
|
|
12
12
|
function MultiAnalysisRangesInner({ columns, displayerKey, activeTab, }) {
|
|
13
|
-
const ranges = Object.keys(columns).filter((key) => columns[key].type !==
|
|
13
|
+
const ranges = Object.keys(columns).filter((key) => columns[key].type !== nmr_load_save_1.AnalysisColumnsTypes.FORMULA);
|
|
14
14
|
if (!ranges || ranges.length === 0) {
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
@@ -24,8 +24,8 @@ function PeakPointer() {
|
|
|
24
24
|
const { height, width, margin, data, mode, toolOptions: { selectedTool }, } = (0, ChartContext_1.useChartData)();
|
|
25
25
|
const { scaleX, scaleY, shiftY } = (0, ScaleContext_1.useScaleChecked)();
|
|
26
26
|
const activeSpectrum = (0, useActiveSpectrum_1.useActiveSpectrum)();
|
|
27
|
-
let position = (0,
|
|
28
|
-
const brushState = (0,
|
|
27
|
+
let position = (0, MouseTracker_1.useMouseTracker)();
|
|
28
|
+
const brushState = (0, BrushTracker_1.useBrushTracker)();
|
|
29
29
|
const [closePeakPosition, setPosition] = (0, react_1.useState)();
|
|
30
30
|
(0, react_1.useEffect)(() => {
|
|
31
31
|
const getClosePeak = (xShift, mouseCoordinates) => {
|
|
@@ -78,7 +78,7 @@ function PeakPointer() {
|
|
|
78
78
|
brushState.step === 'brushing' ||
|
|
79
79
|
!position ||
|
|
80
80
|
position.y < margin.top ||
|
|
81
|
-
position.
|
|
81
|
+
position.x < margin.left ||
|
|
82
82
|
position.x > width - margin.right ||
|
|
83
83
|
position.y > height - margin.bottom) {
|
|
84
84
|
return null;
|
|
@@ -22,8 +22,8 @@ function XLabelPointer() {
|
|
|
22
22
|
const { height, width, margin, data } = (0, ChartContext_1.useChartData)();
|
|
23
23
|
const activeSpectrum = (0, useActiveSpectrum_1.useActiveSpectrum)();
|
|
24
24
|
const { scaleX } = (0, ScaleContext_1.useScaleChecked)();
|
|
25
|
-
const position = (0,
|
|
26
|
-
const brushState = (0,
|
|
25
|
+
const position = (0, MouseTracker_1.useMouseTracker)();
|
|
26
|
+
const brushState = (0, BrushTracker_1.useBrushTracker)();
|
|
27
27
|
const activeSpectrumData = (0, react_1.useMemo)(() => {
|
|
28
28
|
const spectrumData = activeSpectrum
|
|
29
29
|
? data.find((d) => d.id === activeSpectrum.id)
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
const react_1 = require("react");
|
|
5
4
|
const BrushTracker_1 = require("../../EventsTrackers/BrushTracker");
|
|
6
5
|
const ChartContext_1 = require("../../context/ChartContext");
|
|
7
6
|
const ToolTypes_1 = require("../../toolbar/ToolTypes");
|
|
@@ -25,7 +24,7 @@ const allowTools = new Set([
|
|
|
25
24
|
]);
|
|
26
25
|
function BrushX() {
|
|
27
26
|
const { width, height, toolOptions: { selectedTool }, } = (0, ChartContext_1.useChartData)();
|
|
28
|
-
const { startX, endX, step } = (0,
|
|
27
|
+
const { startX, endX, step } = (0, BrushTracker_1.useBrushTracker)();
|
|
29
28
|
if (!allowTools.has(selectedTool) || step !== 'brushing')
|
|
30
29
|
return null;
|
|
31
30
|
const scale = (endX - startX) / width;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BRUSH_TYPE = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
5
|
const BrushTracker_1 = require("../../EventsTrackers/BrushTracker");
|
|
7
6
|
const ChartContext_1 = require("../../context/ChartContext");
|
|
8
7
|
const ToolTypes_1 = require("../../toolbar/ToolTypes");
|
|
@@ -43,7 +42,7 @@ const defaultDimensionBorder = {
|
|
|
43
42
|
};
|
|
44
43
|
function BrushXY({ brushType = exports.BRUSH_TYPE.XY, dimensionBorder = defaultDimensionBorder, width: widthProps, height: heightProps, }) {
|
|
45
44
|
let { width, height, toolOptions: { selectedTool }, } = (0, ChartContext_1.useChartData)();
|
|
46
|
-
let { startX, endX, startY, endY, step } = (0,
|
|
45
|
+
let { startX, endX, startY, endY, step } = (0, BrushTracker_1.useBrushTracker)();
|
|
47
46
|
if (!allowTools.has(selectedTool) ||
|
|
48
47
|
step !== 'brushing' ||
|
|
49
48
|
!dimensionBorder ||
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
const react_1 = require("react");
|
|
5
4
|
const BrushTracker_1 = require("../../EventsTrackers/BrushTracker");
|
|
6
5
|
const MouseTracker_1 = require("../../EventsTrackers/MouseTracker");
|
|
7
6
|
const ChartContext_1 = require("../../context/ChartContext");
|
|
@@ -32,8 +31,8 @@ const allowTools = new Set([
|
|
|
32
31
|
]);
|
|
33
32
|
function CrossLinePointer() {
|
|
34
33
|
const { height, width, margin, toolOptions: { selectedTool }, } = (0, ChartContext_1.useChartData)();
|
|
35
|
-
let position = (0,
|
|
36
|
-
const brushState = (0,
|
|
34
|
+
let position = (0, MouseTracker_1.useMouseTracker)();
|
|
35
|
+
const brushState = (0, BrushTracker_1.useBrushTracker)();
|
|
37
36
|
if (!allowTools.has(selectedTool) ||
|
|
38
37
|
brushState.step === 'brushing' ||
|
|
39
38
|
!position ||
|
|
@@ -14,13 +14,13 @@ const FidContainer_1 = require("./fid/FidContainer");
|
|
|
14
14
|
const FTContainer_1 = require("./ft/FTContainer");
|
|
15
15
|
const IndicationLines_1 = __importDefault(require("./zones/IndicationLines"));
|
|
16
16
|
const Zones_1 = __importDefault(require("./zones/Zones"));
|
|
17
|
-
function chart2DInner({ spectra, width, height, margin, displayerKey,
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)("svg", { viewBox: `0 0 ${width} ${height}`, width: width, height: height, id: "nmrSVG", shapeRendering:
|
|
17
|
+
function chart2DInner({ spectra, width, height, margin, displayerKey, SpectraRendering, }) {
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { viewBox: `0 0 ${width} ${height}`, width: width, height: height, id: "nmrSVG", shapeRendering: SpectraRendering, children: [(0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsx)("clipPath", { id: `${displayerKey}clip-chart-2d`, children: (0, jsx_runtime_1.jsx)("rect", { width: width - margin.left - margin.right, height: height - margin.top - margin.bottom, x: margin.left, y: margin.top }) }) }), (0, jsx_runtime_1.jsx)("rect", { width: width - margin.left - margin.right, height: height - margin.top - margin.bottom, x: margin.left, y: margin.top, stroke: "black", strokeWidth: "1", fill: "transparent" }), (0, jsx_runtime_1.jsx)(FTContainer_1.FTContainer, { spectra: spectra }), (0, jsx_runtime_1.jsx)(FidContainer_1.FidContainer, {}), (0, jsx_runtime_1.jsx)(Zones_1.default, {}), (0, jsx_runtime_1.jsx)(IndicationLines_1.default, { axis: "X", show: true }), (0, jsx_runtime_1.jsx)(IndicationLines_1.default, { axis: "Y", show: true }), (0, jsx_runtime_1.jsx)(SpectrumInfoBlock_1.default, {}), (0, jsx_runtime_1.jsxs)("g", { className: "container", style: { pointerEvents: 'none' }, children: [(0, jsx_runtime_1.jsx)(XAxis_1.default, {}), (0, jsx_runtime_1.jsx)(YAxis_1.default, {})] })] }));
|
|
19
19
|
}
|
|
20
20
|
const MemoizedChart2D = (0, react_1.memo)(chart2DInner);
|
|
21
21
|
function Chart2D({ spectra }) {
|
|
22
22
|
const { width, height, margin, displayerKey } = (0, ChartContext_1.useChartData)();
|
|
23
|
-
const { current: { general: {
|
|
24
|
-
return ((0, jsx_runtime_1.jsx)(MemoizedChart2D, { spectra, width, height, margin, displayerKey,
|
|
23
|
+
const { current: { general: { SpectraRendering }, }, } = (0, PreferencesContext_1.usePreferences)();
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)(MemoizedChart2D, { spectra, width, height, margin, displayerKey, SpectraRendering }));
|
|
25
25
|
}
|
|
26
26
|
exports.default = Chart2D;
|
|
@@ -57,8 +57,8 @@ const styles = (0, react_1.css) `
|
|
|
57
57
|
}
|
|
58
58
|
`;
|
|
59
59
|
function FooterBanner({ layout, data1D }) {
|
|
60
|
-
const position = (0,
|
|
61
|
-
const { startX, endX, startY, endY, step } = (0,
|
|
60
|
+
const position = (0, MouseTracker_1.useMouseTracker)();
|
|
61
|
+
const { startX, endX, startY, endY, step } = (0, BrushTracker_1.useBrushTracker)();
|
|
62
62
|
const { margin, width, height, xDomain, yDomain, yDomains, view: { spectra: { activeTab }, }, data, toolOptions: { selectedTool }, } = (0, ChartContext_1.useChartData)();
|
|
63
63
|
const activeSpectrum = (0, useActiveSpectrum_1.useActiveSpectrum)();
|
|
64
64
|
const trackID = position &&
|
|
@@ -27,8 +27,8 @@ const style = {
|
|
|
27
27
|
textAlign: 'right',
|
|
28
28
|
};
|
|
29
29
|
function XYLabelPointer({ layout, data1D }) {
|
|
30
|
-
const position = (0,
|
|
31
|
-
const { step } = (0,
|
|
30
|
+
const position = (0, MouseTracker_1.useMouseTracker)();
|
|
31
|
+
const { step } = (0, BrushTracker_1.useBrushTracker)();
|
|
32
32
|
const { margin, width, height, xDomain, yDomain, yDomains, view: { spectra: { activeTab }, }, } = (0, ChartContext_1.useChartData)();
|
|
33
33
|
const activeSpectrum = (0, useActiveSpectrum_1.useActiveSpectrum)();
|
|
34
34
|
const trackID = position &&
|
|
@@ -3,26 +3,36 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.BrushTracker = exports.BrushContext = void 0;
|
|
6
|
+
exports.BrushTracker = exports.useBrushTracker = exports.BrushContext = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const debounce_1 = __importDefault(require("lodash/debounce"));
|
|
9
9
|
const map_1 = __importDefault(require("lodash/map"));
|
|
10
10
|
const react_1 = require("react");
|
|
11
11
|
const initialState = {
|
|
12
12
|
step: 'initial',
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
end: null,
|
|
16
|
-
},
|
|
13
|
+
shiftKey: false,
|
|
14
|
+
altKey: false,
|
|
17
15
|
startX: 0,
|
|
18
16
|
endX: 0,
|
|
19
17
|
startY: 0,
|
|
20
18
|
endY: 0,
|
|
19
|
+
startScreenX: 0,
|
|
20
|
+
startScreenY: 0,
|
|
21
|
+
startClientX: 0,
|
|
22
|
+
startClientY: 0,
|
|
23
|
+
boundingRect: null,
|
|
21
24
|
};
|
|
22
25
|
function stopPageScrolling(event) {
|
|
23
26
|
event.preventDefault();
|
|
24
27
|
}
|
|
25
28
|
exports.BrushContext = (0, react_1.createContext)(initialState);
|
|
29
|
+
function useBrushTracker() {
|
|
30
|
+
if (!exports.BrushContext) {
|
|
31
|
+
throw new Error('Brush context was not found');
|
|
32
|
+
}
|
|
33
|
+
return (0, react_1.useContext)(exports.BrushContext);
|
|
34
|
+
}
|
|
35
|
+
exports.useBrushTracker = useBrushTracker;
|
|
26
36
|
function BrushTracker({ children, className, style, onBrush = () => null, onZoom = () => null, onDoubleClick = () => null, onClick = () => null, noPropagation, }) {
|
|
27
37
|
const [state, dispatch] = (0, react_1.useReducer)(reducer, initialState);
|
|
28
38
|
const [mouseDownTime, setMouseDownTime] = (0, react_1.useState)(0);
|
|
@@ -34,23 +44,27 @@ function BrushTracker({ children, className, style, onBrush = () => null, onZoom
|
|
|
34
44
|
}
|
|
35
45
|
dispatch({
|
|
36
46
|
type: 'DOWN',
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
payload: {
|
|
48
|
+
shiftKey: event.shiftKey,
|
|
49
|
+
altKey: event.altKey,
|
|
50
|
+
screenX: event.screenX,
|
|
51
|
+
screenY: event.screenY,
|
|
52
|
+
clientX: event.clientX,
|
|
53
|
+
clientY: event.clientY,
|
|
54
|
+
boundingRect: event.currentTarget.getBoundingClientRect(),
|
|
55
|
+
},
|
|
44
56
|
});
|
|
45
57
|
setMouseDownTime(event.timeStamp);
|
|
46
58
|
}
|
|
47
59
|
function moveCallback(event) {
|
|
48
60
|
dispatch({
|
|
49
61
|
type: 'MOVE',
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
62
|
+
payload: {
|
|
63
|
+
screenX: event.screenX,
|
|
64
|
+
screenY: event.screenY,
|
|
65
|
+
clientX: event.clientX,
|
|
66
|
+
clientY: event.clientY,
|
|
67
|
+
},
|
|
54
68
|
});
|
|
55
69
|
}
|
|
56
70
|
function mouseUpCallback() {
|
|
@@ -65,7 +79,6 @@ function BrushTracker({ children, className, style, onBrush = () => null, onZoom
|
|
|
65
79
|
return false;
|
|
66
80
|
}, [noPropagation]);
|
|
67
81
|
const clickHandler = (0, react_1.useCallback)((e) => {
|
|
68
|
-
e.persist();
|
|
69
82
|
const timeStamp = e.timeStamp;
|
|
70
83
|
const boundingRect = e.currentTarget.getBoundingClientRect();
|
|
71
84
|
const x = e.clientX - boundingRect.x;
|
|
@@ -124,7 +137,7 @@ function reducer(state, action) {
|
|
|
124
137
|
return state;
|
|
125
138
|
case 'DOWN':
|
|
126
139
|
if (state.step === 'initial' || state.step === 'end') {
|
|
127
|
-
const { screenX, screenY, clientX, clientY, boundingRect,
|
|
140
|
+
const { shiftKey, altKey, screenX, screenY, clientX, clientY, boundingRect, } = action.payload;
|
|
128
141
|
const x = clientX - boundingRect.x;
|
|
129
142
|
const y = clientY - boundingRect.y;
|
|
130
143
|
return {
|
|
@@ -144,12 +157,13 @@ function reducer(state, action) {
|
|
|
144
157
|
return state;
|
|
145
158
|
case 'MOVE':
|
|
146
159
|
if (state.step === 'start' || state.step === 'brushing') {
|
|
147
|
-
const { clientX, clientY } = action;
|
|
160
|
+
const { clientX, clientY } = action.payload;
|
|
161
|
+
const { x = 0, y = 0 } = state.boundingRect || {};
|
|
148
162
|
return {
|
|
149
163
|
...state,
|
|
150
164
|
step: 'brushing',
|
|
151
|
-
endX: clientX -
|
|
152
|
-
endY: clientY -
|
|
165
|
+
endX: clientX - x,
|
|
166
|
+
endY: clientY - y,
|
|
153
167
|
};
|
|
154
168
|
}
|
|
155
169
|
return state;
|
|
@@ -160,7 +174,7 @@ function reducer(state, action) {
|
|
|
160
174
|
step: 'initial',
|
|
161
175
|
};
|
|
162
176
|
}
|
|
163
|
-
|
|
177
|
+
return state;
|
|
164
178
|
default:
|
|
165
179
|
return state;
|
|
166
180
|
}
|
|
@@ -34,81 +34,98 @@ function KeysListenerTracker() {
|
|
|
34
34
|
return displayerMode === Constants_1.DISPLAYER_MODE.DM_1D && data && data.length > 0;
|
|
35
35
|
}, [data, displayerMode]);
|
|
36
36
|
const deleteHandler = (0, react_1.useCallback)(async (sourceData) => {
|
|
37
|
-
const { type, extra
|
|
37
|
+
const { type, extra } = sourceData;
|
|
38
38
|
switch (type) {
|
|
39
39
|
case index_1.HighlightEventSource.INTEGRAL: {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
const { id } = extra || {};
|
|
41
|
+
if (id) {
|
|
42
|
+
dispatch({
|
|
43
|
+
type: 'DELETE_INTEGRAL',
|
|
44
|
+
payload: {
|
|
45
|
+
id,
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
// remove keys from the highlighted list after delete
|
|
49
|
+
remove();
|
|
50
|
+
}
|
|
48
51
|
break;
|
|
49
52
|
}
|
|
50
53
|
case index_1.HighlightEventSource.PEAK: {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
const { id } = extra || {};
|
|
55
|
+
if (id) {
|
|
56
|
+
dispatch({
|
|
57
|
+
type: 'DELETE_PEAK',
|
|
58
|
+
payload: {
|
|
59
|
+
id,
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
// remove keys from the highlighted list after delete
|
|
63
|
+
remove();
|
|
64
|
+
}
|
|
59
65
|
break;
|
|
60
66
|
}
|
|
61
67
|
case index_1.HighlightEventSource.RANGE: {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
const { id } = extra || {};
|
|
69
|
+
if (id) {
|
|
70
|
+
dispatch({
|
|
71
|
+
type: 'DELETE_RANGE',
|
|
72
|
+
payload: {
|
|
73
|
+
id,
|
|
74
|
+
assignmentData,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
// remove keys from the highlighted list after delete
|
|
78
|
+
remove();
|
|
79
|
+
}
|
|
71
80
|
break;
|
|
72
81
|
}
|
|
73
82
|
case index_1.HighlightEventSource.ZONE: {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
const { id } = extra || {};
|
|
84
|
+
if (id) {
|
|
85
|
+
dispatch({
|
|
86
|
+
type: 'DELETE_2D_ZONE',
|
|
87
|
+
payload: {
|
|
88
|
+
id,
|
|
89
|
+
assignmentData,
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
// remove keys from the highlighted list after delete
|
|
93
|
+
remove();
|
|
94
|
+
}
|
|
83
95
|
break;
|
|
84
96
|
}
|
|
85
97
|
case index_1.HighlightEventSource.EXCLUSION_ZONE: {
|
|
98
|
+
const { zone, spectrumID } = extra || {};
|
|
86
99
|
const buttons = [
|
|
87
100
|
{
|
|
88
101
|
text: 'Yes, for all spectra',
|
|
89
102
|
handler: async () => {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
103
|
+
if (zone) {
|
|
104
|
+
const hideLoading = await alert.showLoading('Delete all spectra exclusion zones in progress');
|
|
105
|
+
dispatch({
|
|
106
|
+
type: 'DELETE_EXCLUSION_ZONE',
|
|
107
|
+
payload: {
|
|
108
|
+
zone,
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
hideLoading();
|
|
112
|
+
}
|
|
98
113
|
},
|
|
99
114
|
},
|
|
100
115
|
{
|
|
101
116
|
text: 'Yes',
|
|
102
117
|
handler: async () => {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
118
|
+
if (spectrumID) {
|
|
119
|
+
const hideLoading = await alert.showLoading('Delete exclusion zones in progress');
|
|
120
|
+
dispatch({
|
|
121
|
+
type: 'DELETE_EXCLUSION_ZONE',
|
|
122
|
+
payload: {
|
|
123
|
+
zone,
|
|
124
|
+
spectrumId: spectrumID,
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
hideLoading();
|
|
128
|
+
}
|
|
112
129
|
},
|
|
113
130
|
},
|
|
114
131
|
{ text: 'No' },
|
|
@@ -120,19 +137,22 @@ function KeysListenerTracker() {
|
|
|
120
137
|
break;
|
|
121
138
|
}
|
|
122
139
|
case index_1.HighlightEventSource.MATRIX_GENERATION_EXCLUSION_ZONE: {
|
|
140
|
+
const { zone } = extra || {};
|
|
123
141
|
const buttons = [
|
|
124
142
|
{
|
|
125
143
|
text: 'Yes',
|
|
126
144
|
handler: async () => {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
145
|
+
if (zone) {
|
|
146
|
+
const hideLoading = await alert.showLoading('Delete all spectra exclusion zones in progress');
|
|
147
|
+
dispatchPreferences({
|
|
148
|
+
type: 'DELETE_MATRIX_GENERATION_EXCLUSION_ZONE',
|
|
149
|
+
payload: {
|
|
150
|
+
zone,
|
|
151
|
+
nucleus: activeTab,
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
hideLoading();
|
|
155
|
+
}
|
|
136
156
|
},
|
|
137
157
|
},
|
|
138
158
|
{ text: 'No' },
|
|
@@ -144,12 +164,15 @@ function KeysListenerTracker() {
|
|
|
144
164
|
break;
|
|
145
165
|
}
|
|
146
166
|
case index_1.HighlightEventSource.MULTIPLE_ANALYSIS_ZONE: {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
167
|
+
const { colKey } = extra || {};
|
|
168
|
+
if (colKey) {
|
|
169
|
+
dispatchPreferences({
|
|
170
|
+
type: 'DELETE_ANALYSIS_COLUMN',
|
|
171
|
+
payload: { columnKey: colKey, nucleus: activeTab },
|
|
172
|
+
});
|
|
173
|
+
// remove keys from the highlighted list after delete
|
|
174
|
+
remove();
|
|
175
|
+
}
|
|
153
176
|
break;
|
|
154
177
|
}
|
|
155
178
|
default:
|
|
@@ -3,9 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MouseTracker = exports.useMouseTracker = exports.MouseContext = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
exports.MouseContext = (0, react_1.createContext)(
|
|
6
|
+
exports.MouseContext = (0, react_1.createContext)(null);
|
|
7
7
|
const MouseProvider = exports.MouseContext.Provider;
|
|
8
8
|
function useMouseTracker() {
|
|
9
|
+
if (!exports.MouseContext) {
|
|
10
|
+
throw new Error('Mouse context was not found');
|
|
11
|
+
}
|
|
9
12
|
return (0, react_1.useContext)(exports.MouseContext);
|
|
10
13
|
}
|
|
11
14
|
exports.useMouseTracker = useMouseTracker;
|