nmrium 0.31.0 → 0.33.0-pre.1667632695
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/Chart1D.js +1 -1
- package/lib/component/1d/FooterBanner.js +17 -10
- package/lib/component/1d/LinesSeries.js +1 -1
- package/lib/component/1d/SpectraTracker.js +1 -1
- package/lib/component/1d/Viewer1D.js +1 -1
- package/lib/component/1d/XAxis.js +1 -1
- package/lib/component/1d/database/DatabaseSpectrum.js +2 -1
- package/lib/component/1d/database/ResurrectedDatabaseRanges.js +2 -2
- package/lib/component/1d/{Integral.d.ts → integral/Integral.d.ts} +0 -0
- package/lib/component/1d/{Integral.js → integral/Integral.js} +2 -2
- package/lib/component/1d/integral/IntegralIndicator.d.ts +9 -0
- package/lib/component/1d/integral/IntegralIndicator.js +27 -0
- package/lib/component/1d/{IntegralResizable.d.ts → integral/IntegralResizable.d.ts} +0 -0
- package/lib/component/1d/integral/IntegralResizable.js +69 -0
- package/lib/component/1d/{IntegralsSeries.d.ts → integral/IntegralsSeries.d.ts} +0 -0
- package/lib/component/1d/{IntegralsSeries.js → integral/IntegralsSeries.js} +4 -4
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +4 -4
- package/lib/component/1d/multiplicityTree/buildTreeNode.js +3 -3
- package/lib/component/1d/peaks/PeakAnnotation.js +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.js +10 -6
- package/lib/component/1d/ranges/Range.js +27 -50
- package/lib/component/1d/tool/PeakPointer.js +1 -1
- package/lib/component/1d/utilities/scale.js +2 -2
- package/lib/component/2d/Contours.js +61 -42
- package/lib/component/2d/FooterBanner.js +2 -2
- package/lib/component/2d/Left1DChart.js +1 -1
- package/lib/component/2d/Top1DChart.js +1 -1
- package/lib/component/2d/Viewer2D.js +11 -14
- package/lib/component/2d/tools/XYLabelPointer.js +2 -2
- package/lib/component/2d/tools/slicing/VerticalSliceChart.js +1 -1
- package/lib/component/2d/zones/IndicationLines.js +5 -8
- package/lib/component/EventsTrackers/BrushTracker.js +30 -21
- package/lib/component/EventsTrackers/KeysListenerTracker.js +14 -15
- package/lib/component/NMRium.d.ts +1 -1
- package/lib/component/NMRium.js +6 -6
- package/lib/component/SplitPaneWrapper.js +1 -1
- package/lib/component/assignment/actions/initAssignment.js +17 -17
- package/lib/component/assignment/index.js +2 -2
- package/lib/component/context/PreferencesContext.js +3 -6
- package/lib/component/elements/Button.js +1 -1
- package/lib/component/elements/CheckBoxCell.js +1 -1
- package/lib/component/elements/ContextMenu.js +2 -2
- package/lib/component/elements/EditableColumn.d.ts +3 -1
- package/lib/component/elements/EditableColumn.js +21 -8
- package/lib/component/elements/GroupPane.d.ts +12 -0
- package/lib/component/elements/GroupPane.js +14 -0
- package/lib/component/elements/Input.js +7 -4
- package/lib/component/elements/IsotopesViewer.js +1 -1
- package/lib/component/elements/Label.js +1 -2
- package/lib/component/elements/MolecularFormulaInput.js +2 -0
- package/lib/component/elements/NumberInput.js +2 -2
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +1 -1
- package/lib/component/elements/ReactTable/ReactTable.d.ts +2 -1
- package/lib/component/elements/ReactTable/ReactTable.js +72 -38
- package/lib/component/elements/ReactTable/ReactTableFlexLayout.d.ts +3 -2
- package/lib/component/elements/ReactTable/ReactTableFlexLayout.js +2 -2
- package/lib/component/elements/ReactTable/utility/addCustomColumn.js +3 -3
- package/lib/component/elements/ReactTable/utility/useRowSpan.js +3 -7
- package/lib/component/elements/accordion/Accordion.js +2 -2
- package/lib/component/elements/draggble/useDraggable.js +1 -3
- package/lib/component/elements/dropDownButton/DropDownList.js +1 -2
- package/lib/component/elements/formik/FormikCheckBox.js +1 -1
- package/lib/component/elements/formik/FormikColorPicker.d.ts +0 -1
- package/lib/component/elements/formik/FormikColorPicker.js +5 -8
- package/lib/component/elements/formik/FormikErrorsSummary.js +2 -2
- package/lib/component/elements/formik/FormikForm.js +2 -2
- package/lib/component/elements/formik/FormikInput.d.ts +0 -1
- package/lib/component/elements/formik/FormikInput.js +12 -20
- package/lib/component/elements/formik/FormikOnChange.d.ts +1 -1
- package/lib/component/elements/formik/FormikOnChange.js +13 -10
- package/lib/component/elements/formik/FormikSelect.js +1 -1
- package/lib/component/elements/formik/FormikSlider.d.ts +2 -4
- package/lib/component/elements/formik/FormikSlider.js +8 -11
- package/lib/component/elements/formik/FormikTextarea.js +1 -1
- package/lib/component/elements/linearAxis/LinearVerticalAxis.js +2 -2
- package/lib/component/elements/popup/Alert/Provider.js +7 -7
- package/lib/component/elements/popup/Alert/index.d.ts +3 -4
- package/lib/component/elements/popup/Alert/index.js +3 -4
- package/lib/component/elements/popup/Modal/ModalContent.js +3 -1
- package/lib/component/elements/popup/Modal/Provider.js +16 -31
- package/lib/component/elements/popup/Modal/index.d.ts +4 -5
- package/lib/component/elements/popup/Modal/index.js +4 -5
- package/lib/component/header/Header.js +1 -1
- package/lib/component/hooks/useActiveSpectrumStyleOptions.js +1 -1
- package/lib/component/hooks/useCombinedRefs.js +2 -2
- package/lib/component/hooks/useExport.d.ts +1 -1
- package/lib/component/hooks/useExport.js +9 -6
- package/lib/component/hooks/useFormatNumberByNucleus.js +1 -1
- package/lib/component/hooks/usePanelPreferences.js +9 -7
- package/lib/component/loader/DropZone.js +10 -2
- package/lib/component/modal/AlignSpectraModal.js +1 -1
- package/lib/component/modal/ExportAsMatrixModal.js +1 -1
- package/lib/component/modal/LoadJCAMPModal.js +2 -2
- package/lib/component/modal/MultipleSpectraFiltersModal/index.js +1 -1
- package/lib/component/modal/MultipletAnalysisModal.js +3 -3
- package/lib/component/modal/PredictSpectraModal.js +5 -5
- package/lib/component/modal/editRange/EditRangeModal.js +4 -4
- package/lib/component/modal/editRange/forms/components/SignalFormInfo.js +1 -1
- package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js +2 -2
- package/lib/component/modal/setting/DatabasesTabContent.js +25 -20
- package/lib/component/modal/setting/DisplayTabContent.js +21 -27
- package/lib/component/modal/setting/FormattingTabContent.js +10 -10
- package/lib/component/modal/setting/GeneralSettings.js +11 -14
- package/lib/component/modal/setting/GeneralTabContent.js +3 -1
- package/lib/component/modal/setting/ToolsTabContent.js +18 -19
- package/lib/component/modal/setting/WorkspaceItem.d.ts +2 -1
- package/lib/component/modal/setting/WorkspaceItem.js +36 -48
- package/lib/component/modal/setting/settingsValidation.d.ts +58 -57
- package/lib/component/modal/setting/settingsValidation.js +14 -12
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +8 -7
- package/lib/component/panels/InformationPanel.js +52 -56
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +1 -1
- package/lib/component/panels/MoleculesPanel/Utilities.js +6 -6
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +16 -17
- package/lib/component/panels/MultipleSpectraAnalysisPanel/ColumnHeader.js +1 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleAnalysisCodeEditor.js +1 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +18 -17
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +2 -2
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.js +2 -2
- package/lib/component/panels/RangesPanel/RangesHeader.js +1 -1
- package/lib/component/panels/RangesPanel/RangesPanel.js +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.js +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.js +1 -3
- package/lib/component/panels/RangesPanel/TableColumns/CouplingColumn.js +1 -1
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +2 -2
- package/lib/component/panels/RangesPanel/hooks/useMapRanges.js +8 -8
- package/lib/component/panels/SpectrumsPanel/SpectrumListItem.js +6 -6
- package/lib/component/panels/SpectrumsPanel/SpectrumListPanel.js +3 -3
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +5 -5
- package/lib/component/panels/SpectrumsPanel/base/ColorIndicator.js +2 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.d.ts +1 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +2 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.d.ts +1 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +2 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +3 -26
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +13 -17
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +16 -17
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +20 -21
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +12 -12
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js +1 -5
- package/lib/component/panels/SummaryPanel/utilities/Utilities.js +105 -94
- package/lib/component/panels/ZonesPanel/ZonesTable.js +8 -8
- package/lib/component/panels/databasePanel/DatabasePanel.js +5 -4
- package/lib/component/panels/databasePanel/DatabaseTable.d.ts +2 -1
- package/lib/component/panels/databasePanel/DatabaseTable.js +20 -5
- package/lib/component/panels/extra/preferences/ColumnsHelper.js +5 -2
- package/lib/component/panels/extra/utilities/MultiplicityUtilities.d.ts +2 -2
- package/lib/component/panels/extra/utilities/MultiplicityUtilities.js +2 -2
- package/lib/component/panels/filtersPanel/FiltersTable.js +1 -1
- package/lib/component/reducer/IgnoreActions.js +3 -3
- package/lib/component/reducer/Reducer.d.ts +26 -45
- package/lib/component/reducer/Reducer.js +13 -12
- package/lib/component/reducer/actions/CorrelationsActions.js +4 -4
- package/lib/component/reducer/actions/DomainActions.d.ts +2 -2
- package/lib/component/reducer/actions/DomainActions.js +52 -69
- package/lib/component/reducer/actions/FiltersActions.js +15 -6
- package/lib/component/reducer/actions/HistoryActions.js +5 -5
- package/lib/component/reducer/actions/IntegralsActions.js +6 -5
- package/lib/component/reducer/actions/LoadActions.js +12 -0
- package/lib/component/reducer/actions/PeaksActions.js +7 -6
- package/lib/component/reducer/actions/PreferencesActions.js +20 -38
- package/lib/component/reducer/actions/RangesActions.d.ts +1 -1
- package/lib/component/reducer/actions/RangesActions.js +28 -24
- package/lib/component/reducer/actions/SpectrumsActions.js +13 -6
- package/lib/component/reducer/actions/ToolsActions.d.ts +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +28 -41
- package/lib/component/reducer/actions/ZonesActions.js +11 -10
- package/lib/component/reducer/core/Constants.js +1 -1
- package/lib/component/reducer/helper/GetClosestNumber.js +2 -1
- package/lib/component/reducer/helper/Zoom1DManager.js +11 -10
- package/lib/component/reducer/helper/getActiveSpectrum.d.ts +3 -0
- package/lib/component/reducer/helper/getActiveSpectrum.js +4 -0
- package/lib/component/reducer/helper/getSpectrum.js +3 -5
- package/lib/component/reducer/helper/getStrongestPeak.d.ts +1 -1
- package/lib/component/reducer/helper/getStrongestPeak.js +2 -3
- package/lib/component/reducer/preferences/actions/removeWorkspace.js +3 -10
- package/lib/component/reducer/preferences/actions/setPreferences.js +5 -6
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +2 -2
- package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.d.ts +1 -4
- package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.js +7 -5
- package/lib/component/tool/BrushX.js +3 -3
- package/lib/component/tool/BrushXY.js +5 -5
- package/lib/component/tool/CrossLinePointer.js +3 -3
- package/lib/component/toolbar/BasicToolBar.js +9 -8
- package/lib/component/utility/Evaluate.js +2 -2
- package/lib/component/utility/FileUtility.d.ts +2 -9
- package/lib/component/utility/FileUtility.js +11 -28
- package/lib/component/utility/GroupByInfoKey.d.ts +1 -1
- package/lib/component/utility/GroupByInfoKey.js +11 -13
- package/lib/component/utility/PathBuilder.js +1 -1
- package/lib/component/utility/PreferencesHelper.js +2 -3
- package/lib/component/utility/{Export.d.ts → export.d.ts} +0 -0
- package/lib/component/utility/{Export.js → export.js} +54 -73
- package/lib/component/utility/formatNumber.d.ts +6 -1
- package/lib/component/utility/formatNumber.js +5 -4
- package/lib/component/workspaces/Workspace.d.ts +1 -1
- package/lib/component/workspaces/exercise.js +4 -4
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib/data/Filters.d.ts +16 -18
- package/lib/data/Filters.js +16 -18
- package/lib/data/FiltersManager.js +4 -3
- package/lib/data/PredictionManager.js +8 -10
- package/lib/data/SpectraManager.d.ts +1 -2
- package/lib/data/SpectraManager.js +25 -60
- package/lib/data/data1d/MultipleAnalysis.js +74 -70
- package/lib/data/data1d/Spectrum1D/SumManager.js +1 -1
- package/lib/data/data1d/Spectrum1D/generateJGraphData.js +1 -1
- package/lib/data/data1d/Spectrum1D/index.d.ts +24 -25
- package/lib/data/data1d/Spectrum1D/index.js +24 -25
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +6 -5
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.js +8 -10
- package/lib/data/data1d/Spectrum1D/peaks/lookupPeak.js +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +3 -2
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.js +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +35 -1
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +35 -1
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +6 -7
- package/lib/data/data1d/database.js +45 -28
- package/lib/data/data1d/filter1d/apodization.js +2 -1
- package/lib/data/data1d/filter1d/fft.js +24 -7
- package/lib/data/data1d/filter1d/phaseCorrection.js +11 -5
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +1 -1
- package/lib/data/data1d/filter1d/zeroFilling.js +1 -1
- package/lib/data/data2d/Processing2D.d.ts +3 -3
- package/lib/data/data2d/Processing2D.js +10 -20
- package/lib/data/data2d/Spectrum2D/contours.d.ts +40 -0
- package/lib/data/data2d/Spectrum2D/contours.js +132 -0
- package/lib/data/data2d/Spectrum2D/index.d.ts +10 -11
- package/lib/data/data2d/Spectrum2D/index.js +10 -11
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +3 -4
- package/lib/data/data2d/Spectrum2D/shift/getShift.js +4 -5
- package/lib/data/data2d/Spectrum2D/zones/detectZones.js +11 -8
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js +1 -2
- package/lib/data/molecules/MoleculeManager.js +1 -1
- package/lib/data/types/common/Source.d.ts +1 -0
- package/lib/data/types/data1d/index.d.ts +12 -13
- package/lib/data/types/data2d/Data2D.d.ts +2 -0
- package/lib/data/types/data2d/Datum2D.d.ts +0 -1
- package/lib/data/types/data2d/index.d.ts +8 -9
- package/lib/data/utilities/RangeUtilities.js +13 -9
- package/lib/data/utilities/ZoneUtilities.js +17 -13
- package/lib/data/utilities/calculateSanPlot.d.ts +8 -0
- package/lib/data/utilities/calculateSanPlot.js +31 -0
- package/lib/data/utilities/checkModifierKeyActivated.js +1 -2
- package/lib/data/utilities/generateChar.js +8 -6
- package/lib/data/utilities/getAtom.js +1 -1
- package/lib/data/utilities/getAtomsFromMF.js +2 -2
- package/lib/data/utilities/getColor.js +3 -3
- package/lib/data/utilities/getSum.js +6 -3
- package/lib/types/NMRiumGeneralPreferences.d.ts +2 -2
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/Chart1D.js +1 -1
- package/lib-cjs/component/1d/FooterBanner.js +16 -9
- package/lib-cjs/component/1d/LinesSeries.js +1 -1
- package/lib-cjs/component/1d/SpectraTracker.js +1 -1
- package/lib-cjs/component/1d/Viewer1D.js +1 -1
- package/lib-cjs/component/1d/XAxis.js +1 -1
- package/lib-cjs/component/1d/database/DatabaseSpectrum.js +2 -1
- package/lib-cjs/component/1d/database/ResurrectedDatabaseRanges.js +2 -2
- package/lib-cjs/component/1d/{Integral.js → integral/Integral.js} +2 -2
- package/lib-cjs/component/1d/integral/IntegralIndicator.js +31 -0
- package/lib-cjs/component/1d/integral/IntegralResizable.js +74 -0
- package/lib-cjs/component/1d/{IntegralsSeries.js → integral/IntegralsSeries.js} +4 -4
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +4 -4
- package/lib-cjs/component/1d/multiplicityTree/buildTreeNode.js +3 -3
- package/lib-cjs/component/1d/peaks/PeakAnnotation.js +1 -1
- package/lib-cjs/component/1d/peaks/usePeakShapesPath.js +10 -6
- package/lib-cjs/component/1d/ranges/Range.js +27 -50
- package/lib-cjs/component/1d/tool/PeakPointer.js +1 -1
- package/lib-cjs/component/1d/utilities/scale.js +2 -2
- package/lib-cjs/component/2d/Contours.js +60 -41
- package/lib-cjs/component/2d/FooterBanner.js +2 -2
- package/lib-cjs/component/2d/Left1DChart.js +1 -1
- package/lib-cjs/component/2d/Top1DChart.js +1 -1
- package/lib-cjs/component/2d/Viewer2D.js +11 -14
- package/lib-cjs/component/2d/tools/XYLabelPointer.js +2 -2
- package/lib-cjs/component/2d/tools/slicing/VerticalSliceChart.js +1 -1
- package/lib-cjs/component/2d/zones/IndicationLines.js +5 -8
- package/lib-cjs/component/EventsTrackers/BrushTracker.js +30 -21
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +14 -15
- package/lib-cjs/component/NMRium.js +7 -7
- package/lib-cjs/component/SplitPaneWrapper.js +1 -1
- package/lib-cjs/component/assignment/actions/initAssignment.js +17 -17
- package/lib-cjs/component/assignment/index.js +2 -2
- package/lib-cjs/component/context/PreferencesContext.js +3 -6
- package/lib-cjs/component/elements/Button.js +1 -1
- package/lib-cjs/component/elements/CheckBoxCell.js +1 -1
- package/lib-cjs/component/elements/ContextMenu.js +2 -2
- package/lib-cjs/component/elements/EditableColumn.js +21 -8
- package/lib-cjs/component/elements/GroupPane.js +18 -0
- package/lib-cjs/component/elements/Input.js +7 -4
- package/lib-cjs/component/elements/IsotopesViewer.js +1 -1
- package/lib-cjs/component/elements/Label.js +1 -2
- package/lib-cjs/component/elements/MolecularFormulaInput.js +2 -0
- package/lib-cjs/component/elements/NumberInput.js +2 -2
- package/lib-cjs/component/elements/ReactTable/Elements/ReactTableRow.js +1 -1
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +71 -37
- package/lib-cjs/component/elements/ReactTable/ReactTableFlexLayout.js +2 -2
- package/lib-cjs/component/elements/ReactTable/utility/addCustomColumn.js +3 -3
- package/lib-cjs/component/elements/ReactTable/utility/useRowSpan.js +3 -7
- package/lib-cjs/component/elements/accordion/Accordion.js +2 -2
- package/lib-cjs/component/elements/draggble/useDraggable.js +1 -3
- package/lib-cjs/component/elements/dropDownButton/DropDownList.js +1 -2
- package/lib-cjs/component/elements/formik/FormikCheckBox.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColorPicker.js +4 -7
- package/lib-cjs/component/elements/formik/FormikErrorsSummary.js +2 -2
- package/lib-cjs/component/elements/formik/FormikForm.js +2 -2
- package/lib-cjs/component/elements/formik/FormikInput.js +12 -20
- package/lib-cjs/component/elements/formik/FormikOnChange.js +13 -10
- package/lib-cjs/component/elements/formik/FormikSelect.js +1 -1
- package/lib-cjs/component/elements/formik/FormikSlider.js +7 -10
- package/lib-cjs/component/elements/formik/FormikTextarea.js +1 -1
- package/lib-cjs/component/elements/linearAxis/LinearVerticalAxis.js +2 -2
- package/lib-cjs/component/elements/popup/Alert/Provider.js +8 -8
- package/lib-cjs/component/elements/popup/Alert/index.js +5 -5
- package/lib-cjs/component/elements/popup/Modal/ModalContent.js +3 -1
- package/lib-cjs/component/elements/popup/Modal/Provider.js +16 -31
- package/lib-cjs/component/elements/popup/Modal/index.js +7 -7
- package/lib-cjs/component/header/Header.js +1 -1
- package/lib-cjs/component/hooks/useActiveSpectrumStyleOptions.js +1 -1
- package/lib-cjs/component/hooks/useCombinedRefs.js +2 -2
- package/lib-cjs/component/hooks/useExport.js +14 -11
- package/lib-cjs/component/hooks/useFormatNumberByNucleus.js +1 -1
- package/lib-cjs/component/hooks/usePanelPreferences.js +9 -7
- package/lib-cjs/component/loader/DropZone.js +10 -2
- package/lib-cjs/component/modal/AlignSpectraModal.js +1 -1
- package/lib-cjs/component/modal/ExportAsMatrixModal.js +2 -2
- package/lib-cjs/component/modal/LoadJCAMPModal.js +2 -2
- package/lib-cjs/component/modal/MultipleSpectraFiltersModal/index.js +1 -1
- package/lib-cjs/component/modal/MultipletAnalysisModal.js +3 -3
- package/lib-cjs/component/modal/PredictSpectraModal.js +5 -5
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +4 -4
- package/lib-cjs/component/modal/editRange/forms/components/SignalFormInfo.js +1 -1
- package/lib-cjs/component/modal/editRange/forms/validation/EditRangeValidation.js +2 -2
- package/lib-cjs/component/modal/setting/DatabasesTabContent.js +25 -20
- package/lib-cjs/component/modal/setting/DisplayTabContent.js +21 -27
- package/lib-cjs/component/modal/setting/FormattingTabContent.js +10 -10
- package/lib-cjs/component/modal/setting/GeneralSettings.js +11 -14
- package/lib-cjs/component/modal/setting/GeneralTabContent.js +3 -1
- package/lib-cjs/component/modal/setting/ToolsTabContent.js +18 -19
- package/lib-cjs/component/modal/setting/WorkspaceItem.js +37 -49
- package/lib-cjs/component/modal/setting/settingsValidation.js +14 -12
- package/lib-cjs/component/panels/AutomaticAssignment/useAutoAssignments.js +8 -7
- package/lib-cjs/component/panels/InformationPanel.js +51 -55
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +1 -1
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +1 -1
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +4 -4
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +6 -6
- package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +16 -17
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/ColumnHeader.js +1 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleAnalysisCodeEditor.js +1 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +18 -17
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +2 -2
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +1 -1
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/RangesTable.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +1 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/CouplingColumn.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/hooks/useMapRanges.js +8 -8
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumListItem.js +6 -6
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumListPanel.js +3 -3
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +6 -6
- package/lib-cjs/component/panels/SpectrumsPanel/base/ColorIndicator.js +2 -2
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +2 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +2 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -25
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +13 -17
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +16 -17
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +20 -21
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +12 -12
- package/lib-cjs/component/panels/SummaryPanel/SetShiftTolerancesModal.js +1 -5
- package/lib-cjs/component/panels/SummaryPanel/utilities/Utilities.js +105 -94
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +8 -8
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +5 -4
- package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +20 -5
- package/lib-cjs/component/panels/extra/preferences/ColumnsHelper.js +5 -2
- package/lib-cjs/component/panels/extra/utilities/MultiplicityUtilities.js +2 -2
- package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +1 -1
- package/lib-cjs/component/reducer/IgnoreActions.js +3 -3
- package/lib-cjs/component/reducer/Reducer.js +12 -11
- package/lib-cjs/component/reducer/actions/CorrelationsActions.js +4 -4
- package/lib-cjs/component/reducer/actions/DomainActions.js +52 -69
- package/lib-cjs/component/reducer/actions/FiltersActions.js +15 -6
- package/lib-cjs/component/reducer/actions/HistoryActions.js +5 -5
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +6 -5
- package/lib-cjs/component/reducer/actions/LoadActions.js +12 -0
- package/lib-cjs/component/reducer/actions/PeaksActions.js +7 -6
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +20 -38
- package/lib-cjs/component/reducer/actions/RangesActions.js +28 -24
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +12 -5
- package/lib-cjs/component/reducer/actions/ToolsActions.js +28 -41
- package/lib-cjs/component/reducer/actions/ZonesActions.js +11 -10
- package/lib-cjs/component/reducer/core/Constants.js +1 -1
- package/lib-cjs/component/reducer/helper/GetClosestNumber.js +2 -1
- package/lib-cjs/component/reducer/helper/Zoom1DManager.js +11 -10
- package/lib-cjs/component/reducer/helper/getActiveSpectrum.js +8 -0
- package/lib-cjs/component/reducer/helper/getSpectrum.js +3 -5
- package/lib-cjs/component/reducer/helper/getStrongestPeak.js +2 -3
- package/lib-cjs/component/reducer/preferences/actions/removeWorkspace.js +3 -10
- package/lib-cjs/component/reducer/preferences/actions/setPreferences.js +5 -9
- package/lib-cjs/component/reducer/preferences/utilities/mapNucleiFormatting.js +7 -5
- package/lib-cjs/component/tool/BrushX.js +3 -3
- package/lib-cjs/component/tool/BrushXY.js +5 -5
- package/lib-cjs/component/tool/CrossLinePointer.js +3 -3
- package/lib-cjs/component/toolbar/BasicToolBar.js +8 -7
- package/lib-cjs/component/utility/Evaluate.js +2 -2
- package/lib-cjs/component/utility/FileUtility.js +11 -29
- package/lib-cjs/component/utility/GroupByInfoKey.js +11 -13
- package/lib-cjs/component/utility/PathBuilder.js +1 -1
- package/lib-cjs/component/utility/PreferencesHelper.js +2 -3
- package/lib-cjs/component/utility/{Export.js → export.js} +78 -74
- package/lib-cjs/component/utility/formatNumber.js +5 -4
- package/lib-cjs/component/workspaces/exercise.js +4 -4
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib-cjs/data/Filters.js +17 -35
- package/lib-cjs/data/FiltersManager.js +4 -3
- package/lib-cjs/data/PredictionManager.js +8 -10
- package/lib-cjs/data/SpectraManager.js +26 -62
- package/lib-cjs/data/data1d/MultipleAnalysis.js +74 -70
- package/lib-cjs/data/data1d/Spectrum1D/SumManager.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/generateJGraphData.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/index.js +25 -25
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +6 -5
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateRelatives.js +8 -10
- package/lib-cjs/data/data1d/Spectrum1D/peaks/lookupPeak.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/peaks/optimizePeaks.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +3 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRange.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +6 -7
- package/lib-cjs/data/data1d/database.js +45 -28
- package/lib-cjs/data/data1d/filter1d/apodization.js +2 -1
- package/lib-cjs/data/data1d/filter1d/fft.js +23 -6
- package/lib-cjs/data/data1d/filter1d/phaseCorrection.js +10 -4
- package/lib-cjs/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +1 -1
- package/lib-cjs/data/data1d/filter1d/zeroFilling.js +1 -1
- package/lib-cjs/data/data2d/Processing2D.js +10 -20
- package/lib-cjs/data/data2d/Spectrum2D/contours.js +138 -0
- package/lib-cjs/data/data2d/Spectrum2D/index.js +11 -11
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +3 -4
- package/lib-cjs/data/data2d/Spectrum2D/shift/getShift.js +4 -5
- package/lib-cjs/data/data2d/Spectrum2D/zones/detectZones.js +11 -8
- package/lib-cjs/data/data2d/Spectrum2D/zones/detectZonesManual.js +1 -1
- package/lib-cjs/data/data2d/Spectrum2D/zones/getDetectionZones.js +1 -2
- package/lib-cjs/data/molecules/MoleculeManager.js +1 -1
- package/lib-cjs/data/utilities/RangeUtilities.js +13 -9
- package/lib-cjs/data/utilities/ZoneUtilities.js +17 -13
- package/lib-cjs/data/utilities/calculateSanPlot.js +35 -0
- package/lib-cjs/data/utilities/checkModifierKeyActivated.js +1 -2
- package/lib-cjs/data/utilities/generateChar.js +8 -6
- package/lib-cjs/data/utilities/getAtom.js +1 -1
- package/lib-cjs/data/utilities/getAtomsFromMF.js +2 -2
- package/lib-cjs/data/utilities/getColor.js +3 -3
- package/lib-cjs/data/utilities/getSum.js +6 -3
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +36 -31
- package/lib/component/1d/IntegralResizable.js +0 -72
- package/lib/component/elements/popup/helpers.d.ts +0 -1
- package/lib/component/elements/popup/helpers.js +0 -9
- package/lib/component/panels/RangesPanel/TableColumns/format.d.ts +0 -1
- package/lib/component/panels/RangesPanel/TableColumns/format.js +0 -8
- package/lib/data/data1d/Data1DManager.d.ts +0 -3
- package/lib/data/data1d/Data1DManager.js +0 -98
- package/lib/data/data1d/filter1d/absolute.d.ts +0 -13
- package/lib/data/data1d/filter1d/absolute.js +0 -26
- package/lib/data/data2d/Data2DManager.d.ts +0 -3
- package/lib/data/data2d/Data2DManager.js +0 -34
- package/lib/data/types/data2d/Contour.d.ts +0 -4
- package/lib/data/types/data2d/Contour.js +0 -1
- package/lib/data/types/data2d/Contours.d.ts +0 -2
- package/lib/data/types/data2d/Contours.js +0 -1
- package/lib-cjs/component/1d/IntegralResizable.js +0 -77
- package/lib-cjs/component/elements/popup/helpers.js +0 -13
- package/lib-cjs/component/panels/RangesPanel/TableColumns/format.js +0 -14
- package/lib-cjs/data/data1d/Data1DManager.js +0 -104
- package/lib-cjs/data/data1d/filter1d/absolute.js +0 -32
- package/lib-cjs/data/data2d/Data2DManager.js +0 -40
- package/lib-cjs/data/types/data2d/Contour.js +0 -2
- package/lib-cjs/data/types/data2d/Contours.js +0 -2
package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js
CHANGED
|
@@ -69,10 +69,10 @@ function MultipleSpectraAnalysisPreferences({ data, onAfterSave }, ref) {
|
|
|
69
69
|
},
|
|
70
70
|
}));
|
|
71
71
|
useEffect(() => {
|
|
72
|
-
const result = Object.keys(data.columns).
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
const result = Object.fromEntries(Object.keys(data.columns).map((key) => [
|
|
73
|
+
key,
|
|
74
|
+
{ ...data.columns[key], tempKey: key },
|
|
75
|
+
]));
|
|
76
76
|
setColumns(result);
|
|
77
77
|
refForm.current.setValues({ columns: result, code: data.code });
|
|
78
78
|
}, [data]);
|
|
@@ -81,26 +81,27 @@ function MultipleSpectraAnalysisPreferences({ data, onAfterSave }, ref) {
|
|
|
81
81
|
}, [columns]);
|
|
82
82
|
const preferncesSchema = useMemo(() => {
|
|
83
83
|
function columnSchema() {
|
|
84
|
-
return columnsKeys.
|
|
85
|
-
|
|
84
|
+
return Object.fromEntries(columnsKeys.map((key) => [
|
|
85
|
+
key,
|
|
86
|
+
Yup.object().shape({
|
|
86
87
|
tempKey: Yup.string()
|
|
87
88
|
.required()
|
|
88
89
|
.test('unique', 'must be unique column name', (colmnName) => {
|
|
89
90
|
const formData = refForm.current.values.columns;
|
|
90
|
-
|
|
91
|
+
const cols = [];
|
|
92
|
+
for (const colKey of Object.keys(formData)) {
|
|
91
93
|
if (formData[colKey].tempKey === colmnName) {
|
|
92
|
-
|
|
94
|
+
cols.push(colmnName);
|
|
93
95
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
}
|
|
97
|
+
return cols.length === 1;
|
|
96
98
|
}),
|
|
97
99
|
...(columns[key].type === COLUMNS_TYPES.FORMULA
|
|
98
100
|
? { formula: Yup.string().required() }
|
|
99
101
|
: {}),
|
|
100
102
|
index: Yup.string().required(),
|
|
101
|
-
})
|
|
102
|
-
|
|
103
|
-
}, {});
|
|
103
|
+
}),
|
|
104
|
+
]));
|
|
104
105
|
}
|
|
105
106
|
return Yup.object().shape({
|
|
106
107
|
columns: Yup.object().shape(columnSchema()),
|
|
@@ -108,10 +109,10 @@ function MultipleSpectraAnalysisPreferences({ data, onAfterSave }, ref) {
|
|
|
108
109
|
}, [columns, columnsKeys, refForm]);
|
|
109
110
|
const submitHandler = useCallback((values) => {
|
|
110
111
|
onAfterSave?.(true);
|
|
111
|
-
const result =
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
112
|
+
const result = {};
|
|
113
|
+
for (const [key, value] of Object.entries(values.columns)) {
|
|
114
|
+
result[key] = { ...columns[key], ...value };
|
|
115
|
+
}
|
|
115
116
|
dispatch({
|
|
116
117
|
type: SET_ANALYZE_SPECTRA_COLUMNS,
|
|
117
118
|
payload: { code: values.code, columns: result },
|
|
@@ -44,7 +44,7 @@ function MultipleSpectraAnalysisTable({ data, activeTab, }) {
|
|
|
44
44
|
: '' }));
|
|
45
45
|
}
|
|
46
46
|
if (data.columns) {
|
|
47
|
-
|
|
47
|
+
for (const columnKey in data.columns) {
|
|
48
48
|
const { valueKey, index: columnIndex } = data.columns[columnKey];
|
|
49
49
|
addCustomColumn(columns, {
|
|
50
50
|
index: columnIndex + 1,
|
|
@@ -52,7 +52,7 @@ function MultipleSpectraAnalysisTable({ data, activeTab, }) {
|
|
|
52
52
|
Header: () => headerHandler(data.columns[columnKey], columnKey),
|
|
53
53
|
id: columnKey,
|
|
54
54
|
});
|
|
55
|
-
}
|
|
55
|
+
}
|
|
56
56
|
}
|
|
57
57
|
return columns.sort((object1, object2) => object1.index - object2.index);
|
|
58
58
|
}, [columnFilterHandler, data.columns, format]);
|
|
@@ -65,7 +65,7 @@ function PeaksPanelInner({ peaks, info, xDomain, activeTab, peaksOptions, }) {
|
|
|
65
65
|
x,
|
|
66
66
|
xHz: info?.originFrequency ? value * info.originFrequency : '',
|
|
67
67
|
y,
|
|
68
|
-
width: width
|
|
68
|
+
width: width || '',
|
|
69
69
|
isConstantlyHighlighted: isInRange(value, { from, to }),
|
|
70
70
|
};
|
|
71
71
|
})
|
|
@@ -36,7 +36,7 @@ function PeaksTable({ activeTab, data }) {
|
|
|
36
36
|
});
|
|
37
37
|
}, [modal, peaksPreferences]);
|
|
38
38
|
const saveDeltaPPMRefsHandler = useCallback((event, row) => {
|
|
39
|
-
const shiftValue = parseFloat(event.target.value) - parseFloat(row.
|
|
39
|
+
const shiftValue = Number.parseFloat(event.target.value) - Number.parseFloat(row.x);
|
|
40
40
|
dispatch({ type: SHIFT_SPECTRUM, shiftValue });
|
|
41
41
|
}, [dispatch]);
|
|
42
42
|
const COLUMNS = useMemo(() => [
|
|
@@ -115,6 +115,6 @@ function PeaksTable({ activeTab, data }) {
|
|
|
115
115
|
}
|
|
116
116
|
return columns.sort((object1, object2) => object1.index - object2.index);
|
|
117
117
|
}, [COLUMNS, initialColumns, peaksPreferences]);
|
|
118
|
-
return data && data.length > 0 ? (_jsx(ReactTable, { data: data, columns: tableColumns, approxItemHeight:
|
|
118
|
+
return data && data.length > 0 ? (_jsx(ReactTable, { data: data, columns: tableColumns, approxItemHeight: 24, enableVirtualScroll: true })) : (_jsx(NoTableData, {}));
|
|
119
119
|
}
|
|
120
120
|
export default memo(PeaksTable);
|
|
@@ -18,7 +18,7 @@ import { usePanelPreferences } from '../../hooks/usePanelPreferences';
|
|
|
18
18
|
import CopyClipboardModal from '../../modal/CopyClipboardModal';
|
|
19
19
|
import ChangeSumModal from '../../modal/changeSum/ChangeSumModal';
|
|
20
20
|
import { ADD_RANGE, CHANGE_RANGES_SUM_FLAG, CHANGE_RANGE_SUM, DELETE_RANGE, SHOW_J_GRAPH, SHOW_MULTIPLICTY_TREES, SHOW_RANGES_INTEGRALS, } from '../../reducer/types/Types';
|
|
21
|
-
import { copyHTMLToClipboard } from '../../utility/
|
|
21
|
+
import { copyHTMLToClipboard } from '../../utility/export';
|
|
22
22
|
import { getNumberOfDecimals } from '../../utility/formatNumber';
|
|
23
23
|
import DefaultPanelHeader from '../header/DefaultPanelHeader';
|
|
24
24
|
import useEditRangeModal from './hooks/useEditRangeModal';
|
|
@@ -11,7 +11,7 @@ import { usePanelPreferences } from '../../hooks/usePanelPreferences';
|
|
|
11
11
|
import useSpectrum from '../../hooks/useSpectrum';
|
|
12
12
|
import { rangeStateInit } from '../../reducer/Reducer';
|
|
13
13
|
import { UNLINK_RANGE } from '../../reducer/types/Types';
|
|
14
|
-
import { copyTextToClipboard } from '../../utility/
|
|
14
|
+
import { copyTextToClipboard } from '../../utility/export';
|
|
15
15
|
import { tablePanelStyle } from '../extra/BasicPanelStyle';
|
|
16
16
|
import NoTableData from '../extra/placeholder/NoTableData';
|
|
17
17
|
import PreferencesHeader from '../header/PreferencesHeader';
|
|
@@ -48,7 +48,7 @@ const tableStyle = css `
|
|
|
48
48
|
}
|
|
49
49
|
`;
|
|
50
50
|
function RangesTable({ tableData, onUnlink, context, activeTab, preferences, info, }) {
|
|
51
|
-
const element = activeTab?.replace(/
|
|
51
|
+
const element = activeTab?.replace(/\d/g, '');
|
|
52
52
|
const contextRef = useRef();
|
|
53
53
|
const { items: sortedData, isSortedDesc, onSort } = useTableSortBy(tableData);
|
|
54
54
|
const data = useMapRanges(sortedData);
|
|
@@ -15,7 +15,6 @@ import RelativeColumn from './TableColumns/RelativeColumn';
|
|
|
15
15
|
import SignalAssignmentsColumn from './TableColumns/SignalAssignmentsColumn';
|
|
16
16
|
import SignalDeltaColumn from './TableColumns/SignalDeltaColumn';
|
|
17
17
|
import SignalDeltaHzColumn from './TableColumns/SignalDeltaHzColumn';
|
|
18
|
-
import useFormat from './TableColumns/format';
|
|
19
18
|
const HighlightedRowStyle = css `
|
|
20
19
|
background-color: #ff6f0057;
|
|
21
20
|
`;
|
|
@@ -32,7 +31,6 @@ function RangesTableRow({ rowData, onUnlink, onContextMenu, preferences, info, }
|
|
|
32
31
|
const highlightData = useHighlightData();
|
|
33
32
|
const [unlinkRangeButtonVisibility, showUnlinkRangeButton] = useState(false);
|
|
34
33
|
const [unlinkSignalButtonVisibility, showUnlinkSignalButton] = useState(false);
|
|
35
|
-
const getFormat = useFormat(preferences);
|
|
36
34
|
const rowSpanTags = useMemo(() => {
|
|
37
35
|
return {
|
|
38
36
|
rowSpan: rowData.tableMetaInfo.rowSpan,
|
|
@@ -110,6 +108,6 @@ function RangesTableRow({ rowData, onUnlink, onContextMenu, preferences, info, }
|
|
|
110
108
|
? ConstantlyHighlightedRowStyle
|
|
111
109
|
: null;
|
|
112
110
|
}, [assignmentRange.isActive, highlightRange.isActive, rowData]);
|
|
113
|
-
return (_jsxs("tr", { onContextMenu: (e) => onContextMenu(e, rowData), css: trCss, children: [_jsx("td", { ...rowSpanTags, ...onHoverRange, children: rowData.tableMetaInfo.rowIndex + 1 }), preferences.from.show && (_jsx(RangeColumn, { value: rowData.from, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.from.format })), preferences.to.show && (_jsx(RangeColumn, { value: rowData.to, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.to.format })), preferences.deltaPPM.show && (_jsx(SignalDeltaColumn, { rowData: rowData, onHoverSignal: onHoverSignal, deltaPPMFormat: preferences.deltaPPM.format })), preferences.deltaHz.show && (_jsx(SignalDeltaHzColumn, { rowData: rowData, onHoverSignal: onHoverSignal, deltaHzFormat: preferences.deltaHz.format, info: info })), preferences.relative.show && (_jsx(RelativeColumn, { rowData: rowData, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.relative.format })), preferences.absolute.show && (_jsx(AbsoluteColumn, { value: rowData.absolute, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format:
|
|
111
|
+
return (_jsxs("tr", { onContextMenu: (e) => onContextMenu(e, rowData), css: trCss, children: [_jsx("td", { ...rowSpanTags, ...onHoverRange, children: rowData.tableMetaInfo.rowIndex + 1 }), preferences.from.show && (_jsx(RangeColumn, { value: rowData.from, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.from.format })), preferences.to.show && (_jsx(RangeColumn, { value: rowData.to, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.to.format })), preferences.deltaPPM.show && (_jsx(SignalDeltaColumn, { rowData: rowData, onHoverSignal: onHoverSignal, deltaPPMFormat: preferences.deltaPPM.format })), preferences.deltaHz.show && (_jsx(SignalDeltaHzColumn, { rowData: rowData, onHoverSignal: onHoverSignal, deltaHzFormat: preferences.deltaHz.format, info: info })), preferences.relative.show && (_jsx(RelativeColumn, { rowData: rowData, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.relative.format })), preferences.absolute.show && (_jsx(AbsoluteColumn, { value: rowData.absolute, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: preferences.absolute.format })), _jsx("td", { ...onHoverSignal, children: lodashGet(rowData, 'tableMetaInfo.signal.multiplicity', '') }), preferences.coupling.show && (_jsx(CouplingColumn, { rowData: rowData, onHoverSignal: onHoverSignal, format: preferences.coupling.format })), _jsx(SignalAssignmentsColumn, { rowData: rowData, assignment: assignmentSignal, highlight: highlightSignal, onHover: onHoverSignal, unlinkVisibility: unlinkSignalButtonVisibility, onUnlinkVisibilityChange: (flag) => showUnlinkSignalButton(flag), onLink: linkHandler, onUnlink: unlinkHandler }), _jsx(RangeAssignmentsColumn, { rowData: rowData, assignment: assignmentRange, highlight: highlightRangeAssignmentsColumn, onHover: onHoverRangeAssignmentsColumn, unlinkVisibility: unlinkRangeButtonVisibility, onUnlinkVisibilityChange: (flag) => showUnlinkRangeButton(flag), onLink: linkHandler, onUnlink: unlinkHandler, rowSpanTags: rowSpanTags, highlightData: highlightData }), _jsx(ActionsColumn, { rowData: rowData, onHoverSignal: onHoverSignal, onHoverRange: onHoverRange, rowSpanTags: rowSpanTags, showKind: preferences.showKind })] }));
|
|
114
112
|
}
|
|
115
113
|
export default RangesTableRow;
|
|
@@ -4,7 +4,7 @@ import { formatNumber } from '../../../utility/formatNumber';
|
|
|
4
4
|
function CouplingColumn({ rowData, onHoverSignal, format, }) {
|
|
5
5
|
const result = lodashGet(rowData, 'tableMetaInfo.signal.js');
|
|
6
6
|
return (_jsx("td", { ...onHoverSignal, children: result
|
|
7
|
-
?.map((coupling) => !isNaN(coupling.coupling)
|
|
7
|
+
?.map((coupling) => !Number.isNaN(Number(coupling.coupling))
|
|
8
8
|
? formatNumber(coupling.coupling, format)
|
|
9
9
|
: '')
|
|
10
10
|
.join(',') }));
|
|
@@ -12,7 +12,7 @@ export default function useEditRangeModal(range) {
|
|
|
12
12
|
const modal = useModal();
|
|
13
13
|
const assignmentData = useAssignmentData();
|
|
14
14
|
const zoomRange = useCallback((modalRange) => {
|
|
15
|
-
const _range = modalRange
|
|
15
|
+
const _range = modalRange || range;
|
|
16
16
|
if (_range) {
|
|
17
17
|
const { from, to } = _range;
|
|
18
18
|
const margin = Math.abs(from - to);
|
|
@@ -27,7 +27,7 @@ export default function useEditRangeModal(range) {
|
|
|
27
27
|
dispatch({
|
|
28
28
|
type: DELETE_RANGE,
|
|
29
29
|
payload: {
|
|
30
|
-
data: { id: id
|
|
30
|
+
data: { id: id || range?.id, assignmentData },
|
|
31
31
|
resetSelectTool,
|
|
32
32
|
},
|
|
33
33
|
});
|
|
@@ -2,10 +2,10 @@ import { v4 } from '@lukeed/uuid';
|
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
function useMapRanges(data) {
|
|
4
4
|
return useMemo(() => {
|
|
5
|
-
const
|
|
6
|
-
data.
|
|
5
|
+
const rangesData = [];
|
|
6
|
+
for (const [i, range] of data.entries()) {
|
|
7
7
|
if (range.signals.length === 1) {
|
|
8
|
-
|
|
8
|
+
rangesData.push({
|
|
9
9
|
rowKey: v4(),
|
|
10
10
|
...range,
|
|
11
11
|
tableMetaInfo: {
|
|
@@ -18,7 +18,7 @@ function useMapRanges(data) {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
else if (range.signals.length > 1) {
|
|
21
|
-
range.signals.
|
|
21
|
+
for (const [j, signal] of range.signals.entries()) {
|
|
22
22
|
let hide = false;
|
|
23
23
|
let rowSpan = null;
|
|
24
24
|
if (j < range.signals.length - 1) {
|
|
@@ -32,7 +32,7 @@ function useMapRanges(data) {
|
|
|
32
32
|
else {
|
|
33
33
|
hide = true;
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
rangesData.push({
|
|
36
36
|
rowKey: v4(),
|
|
37
37
|
...range,
|
|
38
38
|
tableMetaInfo: {
|
|
@@ -45,10 +45,10 @@ function useMapRanges(data) {
|
|
|
45
45
|
id: signal.id,
|
|
46
46
|
},
|
|
47
47
|
});
|
|
48
|
-
}
|
|
48
|
+
}
|
|
49
49
|
}
|
|
50
|
-
}
|
|
51
|
-
return
|
|
50
|
+
}
|
|
51
|
+
return rangesData;
|
|
52
52
|
}, [data]);
|
|
53
53
|
}
|
|
54
54
|
export default useMapRanges;
|
|
@@ -38,13 +38,13 @@ const styles = {
|
|
|
38
38
|
justifyContent: 'center',
|
|
39
39
|
},
|
|
40
40
|
};
|
|
41
|
+
function formatValueAsHTML(value) {
|
|
42
|
+
if (value) {
|
|
43
|
+
value = value.replace(/(?<value>\d+)/g, '<sub>$<value></sub>');
|
|
44
|
+
}
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
41
47
|
function SpectrumListItem({ activeSpectrum, markersVisible, data, onChangeVisibility, onChangeMarkersVisibility, onChangeActiveSpectrum, onOpenSettingModal, onContextMenu, }) {
|
|
42
|
-
const formatValueAsHTML = (value) => {
|
|
43
|
-
if (value) {
|
|
44
|
-
value = value.replace(/(?<value>[0-9]+)/g, '<sub>$<value></sub>');
|
|
45
|
-
}
|
|
46
|
-
return value;
|
|
47
|
-
};
|
|
48
48
|
const activated = !activeSpectrum || activeSpectrum?.id === data.id;
|
|
49
49
|
const { color, name, positiveColor, negativeColor } = data.display;
|
|
50
50
|
return (_jsxs("div", { style: {
|
|
@@ -10,10 +10,10 @@ const styles = {
|
|
|
10
10
|
width: '100%',
|
|
11
11
|
};
|
|
12
12
|
function SpectrumListPanel() {
|
|
13
|
-
const [
|
|
13
|
+
const [spectra, setSpectra] = useState([]);
|
|
14
14
|
const tabChangeHandler = useCallback((e) => {
|
|
15
|
-
|
|
15
|
+
setSpectra(e.data || []);
|
|
16
16
|
}, []);
|
|
17
|
-
return (_jsxs("div", { style: styles, children: [_jsx(SpectraPanelHeader, { spectrums:
|
|
17
|
+
return (_jsxs("div", { style: styles, children: [_jsx(SpectraPanelHeader, { spectrums: spectra }), _jsx(SpectrumsTabs, { onTabChange: tabChangeHandler })] }));
|
|
18
18
|
}
|
|
19
19
|
export default memo(SpectrumListPanel);
|
|
@@ -9,8 +9,8 @@ import Tabs from '../../elements/Tab/Tabs';
|
|
|
9
9
|
import { useAlert } from '../../elements/popup/Alert';
|
|
10
10
|
import { useActiveSpectrum } from '../../reducer/Reducer';
|
|
11
11
|
import { CHANGE_PEAKS_MARKERS_VISIBILITY, SET_ACTIVE_TAB, CHANGE_VISIBILITY, CHANGE_ACTIVE_SPECTRUM, DELETE_SPECTRA, } from '../../reducer/types/Types';
|
|
12
|
-
import { copyTextToClipboard } from '../../utility/Export';
|
|
13
12
|
import groupByInfoKey from '../../utility/GroupByInfoKey';
|
|
13
|
+
import { copyTextToClipboard } from '../../utility/export';
|
|
14
14
|
import SpectrumListItem from './SpectrumListItem';
|
|
15
15
|
import SpectrumSetting from './base/setting/SpectrumSetting';
|
|
16
16
|
function SpectrumsTabsInner({ data, activeSpectrum, activeTab, onTabChange, }) {
|
|
@@ -23,13 +23,13 @@ function SpectrumsTabsInner({ data, activeSpectrum, activeTab, onTabChange, }) {
|
|
|
23
23
|
const dispatch = useDispatch();
|
|
24
24
|
useEffect(() => {
|
|
25
25
|
if (data) {
|
|
26
|
-
const visibleMarkers =
|
|
26
|
+
const visibleMarkers = [];
|
|
27
|
+
for (const datum of data) {
|
|
27
28
|
if (datum.info.dimension === 1 &&
|
|
28
29
|
datum.display.isPeaksMarkersVisible) {
|
|
29
|
-
|
|
30
|
+
visibleMarkers.push({ id: datum.id });
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
-
}, []);
|
|
32
|
+
}
|
|
33
33
|
setMarkersVisible(visibleMarkers);
|
|
34
34
|
}
|
|
35
35
|
}, [data, dispatch]);
|
|
@@ -13,7 +13,7 @@ function ColorIndicator2D({ positiveColor, negativeColor, activated, }) {
|
|
|
13
13
|
return (_jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", opacity: activated ? 1 : 0.2, children: _jsxs("g", { children: [_jsx("path", { d: "M0,0H12L0,12Z", fill: positiveColor, strokeWidth: "0" }), _jsx("path", { d: "M12,12H0L12,0Z", fill: negativeColor, strokeWidth: "0" })] }) }));
|
|
14
14
|
}
|
|
15
15
|
function ColorIndicator(props) {
|
|
16
|
-
const { style, onClick = () => null, activated } = props;
|
|
17
|
-
return (_jsx("button", { style: style, type: "button", onClick: onClick, children:
|
|
16
|
+
const { style, onClick = () => null, activated, dimension, color } = props;
|
|
17
|
+
return (_jsx("button", { style: style, type: "button", onClick: onClick, children: dimension === 2 ? (_jsx(ColorIndicator2D, { ...color, activated: activated })) : (_jsx(ColorIndicator1D, { activated: activated, ...color })) }));
|
|
18
18
|
}
|
|
19
19
|
export default memo(ColorIndicator);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
interface Spectrum1DSettingProps {
|
|
3
3
|
data: any;
|
|
4
|
-
onSubmit: (values: any
|
|
4
|
+
onSubmit: (values: any) => void;
|
|
5
5
|
}
|
|
6
6
|
declare function Spectrum1DSetting({ data: SpectrumData, onSubmit, }: Spectrum1DSettingProps): JSX.Element;
|
|
7
7
|
export default Spectrum1DSetting;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import FormikColorPicker from '../../../../elements/formik/FormikColorPicker';
|
|
3
3
|
import FormikForm from '../../../../elements/formik/FormikForm';
|
|
4
|
+
import FormikOnChange from '../../../../elements/formik/FormikOnChange';
|
|
4
5
|
import Spectrum1DHistogram from './Spectrum1DHistogram';
|
|
5
6
|
function Spectrum1DSetting({ data: SpectrumData, onSubmit, }) {
|
|
6
|
-
return (
|
|
7
|
+
return (_jsxs(FormikForm, { initialValues: SpectrumData.display, onSubmit: onSubmit, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '1.25rem' }, children: [_jsx("div", { style: { display: 'block', position: 'relative' }, children: _jsx(FormikColorPicker, { name: "color" }) }), _jsx(Spectrum1DHistogram, { color: "red", data: SpectrumData.data })] }), _jsx(FormikOnChange, { onChange: onSubmit })] }));
|
|
7
8
|
}
|
|
8
9
|
export default Spectrum1DSetting;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface Spectrum2DSettingProps {
|
|
2
2
|
data: any;
|
|
3
|
-
onSubmit: (values: any
|
|
3
|
+
onSubmit: (values: any) => void;
|
|
4
4
|
}
|
|
5
5
|
declare function Spectrum2DSetting({ data: SpectrumData, onSubmit, }: Spectrum2DSettingProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default Spectrum2DSetting;
|
|
@@ -4,6 +4,7 @@ import { css } from '@emotion/react';
|
|
|
4
4
|
import FormikColorPicker from '../../../../elements/formik/FormikColorPicker';
|
|
5
5
|
import FormikForm from '../../../../elements/formik/FormikForm';
|
|
6
6
|
import FormikInput from '../../../../elements/formik/FormikInput';
|
|
7
|
+
import FormikOnChange from '../../../../elements/formik/FormikOnChange';
|
|
7
8
|
import FormikSlider from '../../../../elements/formik/FormikSlider';
|
|
8
9
|
import Spectrum2DHistogram from './Spectrum2DHistogram';
|
|
9
10
|
const style = (color) => css `
|
|
@@ -14,6 +15,6 @@ const style = (color) => css `
|
|
|
14
15
|
`;
|
|
15
16
|
function Spectrum2DSetting({ data: SpectrumData, onSubmit, }) {
|
|
16
17
|
const { positiveColor, negativeColor } = SpectrumData.display;
|
|
17
|
-
return (
|
|
18
|
+
return (_jsxs(FormikForm, { initialValues: SpectrumData.display, children: [_jsxs("div", { children: [_jsxs("div", { css: style(positiveColor), children: [_jsx("span", { style: { padding: '0 10px' }, children: "Positive" }), _jsx(FormikColorPicker, { name: "positiveColor" }), _jsxs("div", { style: { padding: '5px' }, children: [_jsx("span", { className: "label", children: "contour Levels [ min - max ]" }), _jsx(FormikSlider, { name: "contourOptions.positive.contourLevels", debounceTime: 100 }), _jsx("span", { className: "label", children: "number of Layers " }), _jsx(FormikInput, { name: "contourOptions.positive.numberOfLayers", type: "number", debounceTime: 250 })] })] }), _jsxs("div", { css: style(negativeColor), children: [_jsx("span", { style: { padding: '0 10px' }, children: "Negative" }), _jsx(FormikColorPicker, { name: "negativeColor" }), _jsxs("div", { style: { padding: '5px' }, children: [_jsx("span", { className: "label", children: "contour Levels [ min - max ]" }), _jsx(FormikSlider, { name: "contourOptions.negative.contourLevels", debounceTime: 100 }), _jsx("span", { className: "label", children: "number of Layers " }), _jsx(FormikInput, { name: "contourOptions.negative.numberOfLayers", type: "number", debounceTime: 250 })] })] }), _jsx(Spectrum2DHistogram, { data: SpectrumData.data })] }), _jsx(FormikOnChange, { onChange: onSubmit })] }));
|
|
18
19
|
}
|
|
19
20
|
export default Spectrum2DSetting;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { xyReduce } from 'ml-spectra-processing';
|
|
2
|
+
import { calculateSanPlot } from '../../../../../data/utilities/calculateSanPlot';
|
|
2
3
|
export function processSnapPlot(dimension, data, yLogBase) {
|
|
3
|
-
const
|
|
4
|
-
? prepare1DData(data)
|
|
5
|
-
: prepare2DData(data);
|
|
6
|
-
const sanResult = xNoiseSanPlot(input);
|
|
4
|
+
const sanResult = calculateSanPlot(dimension, data);
|
|
7
5
|
const sanPlot = {};
|
|
8
6
|
const lines = {};
|
|
9
7
|
for (let plotKey in sanResult.sanplot) {
|
|
@@ -17,27 +15,6 @@ export function processSnapPlot(dimension, data, yLogBase) {
|
|
|
17
15
|
}
|
|
18
16
|
return { sanPlot, lines };
|
|
19
17
|
}
|
|
20
|
-
function prepare1DData(data) {
|
|
21
|
-
const length = data.re.length;
|
|
22
|
-
const jump = Math.floor(length / 307200) || 1;
|
|
23
|
-
const array = new Float64Array((length / jump) >> 0);
|
|
24
|
-
let index = 0;
|
|
25
|
-
for (let i = 0; i < array.length; i += jump) {
|
|
26
|
-
array[index++] = data.re[i];
|
|
27
|
-
}
|
|
28
|
-
return array;
|
|
29
|
-
}
|
|
30
|
-
function prepare2DData(data) {
|
|
31
|
-
let cols = data.z[0].length;
|
|
32
|
-
let rows = data.z.length;
|
|
33
|
-
let jump = Math.floor((cols * rows) / 204800) || 1;
|
|
34
|
-
const array = new Float64Array(((cols * rows) / jump) >> 0);
|
|
35
|
-
let index = 0;
|
|
36
|
-
for (let i = 0; i < array.length; i += jump) {
|
|
37
|
-
array[index++] = data.z[(i / rows) >> 0][i % rows];
|
|
38
|
-
}
|
|
39
|
-
return array;
|
|
40
|
-
}
|
|
41
18
|
function getLine(value, data, options) {
|
|
42
19
|
const { log10, abs } = Math;
|
|
43
20
|
const { yLogBase } = options;
|
|
@@ -14,18 +14,17 @@ function AdditionalColumnField({ rowCorrelation, columnCorrelation, commonLinks,
|
|
|
14
14
|
const contextRef = useRef();
|
|
15
15
|
const modal = useModal();
|
|
16
16
|
const highlightIDsCommonLinks = useMemo(() => {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
return commonLinks.flatMap((link) => {
|
|
18
|
+
const ids = [];
|
|
19
19
|
if (link.pseudo === false) {
|
|
20
|
-
ids.push(link.signal.id);
|
|
21
|
-
ids.push(buildID(link.signal.id, 'Crosshair'));
|
|
20
|
+
ids.push(link.signal.id, buildID(link.signal.id, 'Crosshair'));
|
|
22
21
|
const _id = findRangeOrZoneID(spectraData, link.experimentID, link.signal.id, true);
|
|
23
22
|
if (_id) {
|
|
24
23
|
ids.push(_id);
|
|
25
24
|
}
|
|
26
25
|
}
|
|
26
|
+
return ids;
|
|
27
27
|
});
|
|
28
|
-
return ids;
|
|
29
28
|
}, [commonLinks, spectraData]);
|
|
30
29
|
const highlightCommonLinks = useHighlight(highlightIDsCommonLinks);
|
|
31
30
|
const mouseEnterHandler = useCallback((event) => {
|
|
@@ -77,8 +76,7 @@ function AdditionalColumnField({ rowCorrelation, columnCorrelation, commonLinks,
|
|
|
77
76
|
}, [columnCorrelation, onEdit, rowCorrelation]);
|
|
78
77
|
const contextMenu = useMemo(() => {
|
|
79
78
|
// allow the edition of correlations
|
|
80
|
-
const commonLinksMenu = commonLinks
|
|
81
|
-
.map((commonLink) => {
|
|
79
|
+
const commonLinksMenu = commonLinks.flatMap((commonLink) => {
|
|
82
80
|
const commonLinkContextMenuLabel = `${getAbbreviation(commonLink)} (${commonLink.signal.x ? commonLink.signal.x.delta.toFixed(2) : '?'}, ${commonLink.signal.y ? commonLink.signal.y.delta.toFixed(2) : '?'})${commonLink.edited?.moved === true ? '[MOVED]' : ''}`;
|
|
83
81
|
return commonLink.pseudo === false
|
|
84
82
|
? [
|
|
@@ -94,8 +92,7 @@ function AdditionalColumnField({ rowCorrelation, columnCorrelation, commonLinks,
|
|
|
94
92
|
},
|
|
95
93
|
]
|
|
96
94
|
: [];
|
|
97
|
-
})
|
|
98
|
-
.flat();
|
|
95
|
+
});
|
|
99
96
|
// allow addition or removal of a pseudo HSQC link between pseudo heavy atom and proton
|
|
100
97
|
const commonPseudoLinkHSQC = commonLinks.find((commonLink) => commonLink.pseudo === true && commonLink.experimentType === 'hsqc');
|
|
101
98
|
if (rowCorrelation.pseudo === true) {
|
|
@@ -128,14 +125,13 @@ function AdditionalColumnField({ rowCorrelation, columnCorrelation, commonLinks,
|
|
|
128
125
|
? 'blue'
|
|
129
126
|
: 'black',
|
|
130
127
|
}, children: getAbbreviation(commonLink) }), i < commonLinks.length - 1 && _jsx("label", { children: "/" })] }, commonLink.id))), [commonLinks]);
|
|
131
|
-
const title = useMemo(() =>
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}, [])
|
|
138
|
-
.join('/'), [commonLinks]);
|
|
128
|
+
const title = useMemo(() => {
|
|
129
|
+
return [
|
|
130
|
+
...new Set(commonLinks.link.map((link) => {
|
|
131
|
+
return link.experimentType.toUpperCase();
|
|
132
|
+
})),
|
|
133
|
+
].join('/');
|
|
134
|
+
}, [commonLinks]);
|
|
139
135
|
const isInViewRow = useInView({ correlation: rowCorrelation });
|
|
140
136
|
const isInViewColumn = useInView({ correlation: columnCorrelation });
|
|
141
137
|
return (_jsxs("td", { onContextMenu: (e) => {
|
|
@@ -17,18 +17,17 @@ function AdditionalColumnHeader({ spectraData, correlationsData, correlation, on
|
|
|
17
17
|
if (correlation.pseudo === true) {
|
|
18
18
|
return [];
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
return correlation.link.flatMap((link) => {
|
|
21
|
+
const ids = [];
|
|
22
22
|
if (link.pseudo === false) {
|
|
23
|
-
ids.push(link.signal.id);
|
|
24
|
-
ids.push(buildID(link.signal.id, 'Crosshair_X'));
|
|
23
|
+
ids.push(link.signal.id, buildID(link.signal.id, 'Crosshair_X'));
|
|
25
24
|
const _id = findRangeOrZoneID(spectraData, link.experimentID, link.signal.id, true);
|
|
26
25
|
if (_id) {
|
|
27
26
|
ids.push(_id);
|
|
28
27
|
}
|
|
29
28
|
}
|
|
29
|
+
return ids;
|
|
30
30
|
});
|
|
31
|
-
return ids;
|
|
32
31
|
}, [correlation, spectraData]);
|
|
33
32
|
const highlightAdditionalColumn = useHighlight(highlightIDsAdditionalColumn);
|
|
34
33
|
const mouseEnterHandler = useCallback((event) => {
|
|
@@ -41,26 +40,26 @@ function AdditionalColumnHeader({ spectraData, correlationsData, correlation, on
|
|
|
41
40
|
}, [highlightAdditionalColumn]);
|
|
42
41
|
const isInView = useInView({ correlation });
|
|
43
42
|
const tableHeaderProps = useMemo(() => {
|
|
43
|
+
const title = [
|
|
44
|
+
...new Set(correlation.link
|
|
45
|
+
.map((link) => {
|
|
46
|
+
if (link.pseudo === false) {
|
|
47
|
+
return link.experimentType.toUpperCase();
|
|
48
|
+
}
|
|
49
|
+
return undefined;
|
|
50
|
+
})
|
|
51
|
+
.sort()),
|
|
52
|
+
].join('/');
|
|
44
53
|
return {
|
|
45
54
|
style: {
|
|
46
|
-
|
|
55
|
+
color: getLabelColor(correlationsData, correlation) || undefined,
|
|
47
56
|
backgroundColor: highlightAdditionalColumn.isActive
|
|
48
57
|
? '#ff6f0057'
|
|
49
58
|
: isInView
|
|
50
59
|
? '#f5f5dc'
|
|
51
60
|
: 'inherit',
|
|
52
61
|
},
|
|
53
|
-
title: correlation.pseudo === false &&
|
|
54
|
-
correlation.link
|
|
55
|
-
.reduce((arr, link) => {
|
|
56
|
-
if (link.pseudo === false &&
|
|
57
|
-
!arr.includes(link.experimentType.toUpperCase())) {
|
|
58
|
-
arr.push(link.experimentType.toUpperCase());
|
|
59
|
-
}
|
|
60
|
-
return arr;
|
|
61
|
-
}, [])
|
|
62
|
-
.sort()
|
|
63
|
-
.join('/'),
|
|
62
|
+
title: correlation.pseudo === false && title,
|
|
64
63
|
onMouseEnter: mouseEnterHandler,
|
|
65
64
|
onMouseLeave: mouseLeaveHandler,
|
|
66
65
|
};
|