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
|
@@ -72,14 +72,6 @@ function FooterBannerInner({ margin, width, height, activeSpectrum, spectrum, ac
|
|
|
72
72
|
const { startX, endX, step } = (0, react_2.useContext)(BrushTracker_1.BrushContext);
|
|
73
73
|
const { scaleX } = (0, ScaleContext_1.useScaleChecked)();
|
|
74
74
|
const format = (0, useFormatNumberByNucleus_1.useFormatNumberByNucleus)(activeTab);
|
|
75
|
-
const getYValue = (0, react_2.useCallback)((xPosition) => {
|
|
76
|
-
if (spectrum) {
|
|
77
|
-
const data = (0, get1DDataXY_1.get1DDataXY)(spectrum);
|
|
78
|
-
const xIndex = (0, ml_spectra_processing_1.xFindClosestIndex)(data.x, scaleX().invert(xPosition));
|
|
79
|
-
return data.y[xIndex];
|
|
80
|
-
}
|
|
81
|
-
return 1;
|
|
82
|
-
}, [spectrum, scaleX]);
|
|
83
75
|
if (!position ||
|
|
84
76
|
position.y < margin.top ||
|
|
85
77
|
position.x < margin.left ||
|
|
@@ -87,7 +79,22 @@ function FooterBannerInner({ margin, width, height, activeSpectrum, spectrum, ac
|
|
|
87
79
|
position.y > height - margin.bottom) {
|
|
88
80
|
return (0, jsx_runtime_1.jsx)("div", { css: styles });
|
|
89
81
|
}
|
|
90
|
-
|
|
82
|
+
function getXIndex(xPosition) {
|
|
83
|
+
if (spectrum) {
|
|
84
|
+
const data = (0, get1DDataXY_1.get1DDataXY)(spectrum);
|
|
85
|
+
return (0, ml_spectra_processing_1.xFindClosestIndex)(data.x, scaleX().invert(xPosition));
|
|
86
|
+
}
|
|
87
|
+
return 0;
|
|
88
|
+
}
|
|
89
|
+
function getYValue(xPosition) {
|
|
90
|
+
if (spectrum) {
|
|
91
|
+
const data = (0, get1DDataXY_1.get1DDataXY)(spectrum);
|
|
92
|
+
const xIndex = getXIndex(xPosition);
|
|
93
|
+
return data.y[xIndex];
|
|
94
|
+
}
|
|
95
|
+
return 1;
|
|
96
|
+
}
|
|
97
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: styles, children: [(0, jsx_runtime_1.jsx)(bs_1.BsCursor, {}), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("span", { className: "label", children: " \uD835\uDEC5: " }), (0, jsx_runtime_1.jsx)("span", { className: "value", children: format(scaleX().invert(position.x)) }), (0, jsx_runtime_1.jsx)("span", { className: "unit", children: "ppm" }), activeSpectrum && spectrum?.info?.originFrequency && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("span", { className: "value", children: ["\u00A0(", format(scaleX().invert(position.x) * spectrum?.info?.originFrequency, 'hz')] }), (0, jsx_runtime_1.jsx)("span", { className: "unit", children: "Hz" }), (0, jsx_runtime_1.jsx)("span", { className: "value", children: ") " }), (0, jsx_runtime_1.jsx)("span", { children: "," }), (0, jsx_runtime_1.jsx)("span", { className: "label", children: " Index: " }), (0, jsx_runtime_1.jsx)("span", { className: "value", children: getXIndex(position.x) })] }))] }), step === 'brushing' && ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("span", { className: "label", children: " \u0394ppm: " }), (0, jsx_runtime_1.jsx)("span", { className: "value", children: (scaleX().invert(startX) - scaleX().invert(endX)).toPrecision(6) })] })), activeSpectrum && ((0, jsx_runtime_1.jsxs)(react_2.Fragment, { children: [spectrum?.info?.originFrequency && step === 'brushing' && ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("span", { className: "label", children: " \u0394Hz: " }), (0, jsx_runtime_1.jsx)("span", { className: "value", children: ((scaleX().invert(startX) - scaleX().invert(endX)) *
|
|
91
98
|
spectrum?.info?.originFrequency).toPrecision(5) })] })), step === 'brushing' && ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("span", { className: "label", children: " ratio :" }), (0, jsx_runtime_1.jsxs)("span", { className: "value", children: [((getYValue(startX) / (getYValue(endX) || Number.MIN_VALUE)) *
|
|
92
99
|
100).toFixed(2), "%"] })] }))] })), activeSpectrum && ((0, jsx_runtime_1.jsxs)(react_2.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "separator" }), (0, jsx_runtime_1.jsx)(io5_1.IoPulseSharp, {}), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("span", { className: "label", children: "Intensity: " }), (0, jsx_runtime_1.jsx)("span", { className: "value yvalue", children: format(getYValue(position.x)) })] })] }))] }));
|
|
93
100
|
}
|
|
@@ -11,7 +11,7 @@ const Line_1 = __importDefault(require("./Line"));
|
|
|
11
11
|
function LinesSeries() {
|
|
12
12
|
const { data, tempData, displayerKey, xDomains } = (0, ChartContext_1.useChartData)();
|
|
13
13
|
const activeSpectrum = (0, Reducer_1.useActiveSpectrum)();
|
|
14
|
-
let _data = tempData
|
|
14
|
+
let _data = tempData || data;
|
|
15
15
|
return ((0, jsx_runtime_1.jsxs)("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, className: "spectrums", children: [_data
|
|
16
16
|
?.filter((d) => d.display.isVisible === true && xDomains[d.id])
|
|
17
17
|
.map((d, i) => ((0, jsx_runtime_1.jsx)("g", { id: d.id, children: (0, jsx_runtime_1.jsx)(Line_1.default, { display: d.display, id: d.id, data: (0, get1DDataXY_1.get1DDataXY)(d), index: i }) }, d.id))), activeSpectrum?.id && (0, jsx_runtime_1.jsx)("use", { href: `#${activeSpectrum?.id}` })] }));
|
|
@@ -62,7 +62,7 @@ function SpectraTracker() {
|
|
|
62
62
|
spectrum.info.nucleus === activeTab && ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'block' }, children: [(0, jsx_runtime_1.jsx)("span", { style: {
|
|
63
63
|
...styles.colorIndicator,
|
|
64
64
|
borderColor: spectrum.display.color,
|
|
65
|
-
} }), (0, jsx_runtime_1.jsx)(YTracker, { datum: (0, get1DDataXY_1.get1DDataXY)(spectrum) }), (0, jsx_runtime_1.jsx)("span", { style: styles.value, children: spectrum.display.name })] }, spectrum.id))
|
|
65
|
+
} }), (0, jsx_runtime_1.jsx)(YTracker, { datum: (0, get1DDataXY_1.get1DDataXY)(spectrum) }), (0, jsx_runtime_1.jsx)("span", { style: styles.value, children: spectrum.display.name })] }, spectrum.id))));
|
|
66
66
|
}, [activeTab, data, isVisible, xDomains]);
|
|
67
67
|
if (!isVisible)
|
|
68
68
|
return null;
|
|
@@ -133,7 +133,7 @@ function Viewer1D({ emptyText = undefined }) {
|
|
|
133
133
|
});
|
|
134
134
|
if (!activeSpectrum)
|
|
135
135
|
break;
|
|
136
|
-
const { data: { x }, } =
|
|
136
|
+
const { data: { x }, } = data[activeSpectrum.index];
|
|
137
137
|
const { fromIndex, toIndex } = (0, ml_spectra_processing_1.xGetFromToIndex)(x, { from, to });
|
|
138
138
|
if (toIndex - fromIndex <= detectSignal_1.MAX_LENGTH) {
|
|
139
139
|
dispatch({
|
|
@@ -64,7 +64,7 @@ function XAxis(props) {
|
|
|
64
64
|
const { scaleX } = (0, ScaleContext_1.useScale)();
|
|
65
65
|
const refAxis = (0, react_2.useRef)(null);
|
|
66
66
|
const refGrid = (0, react_2.useRef)(null);
|
|
67
|
-
const label = labelProp
|
|
67
|
+
const label = labelProp || (mode === 'RTL' ? 'δ [ppm]' : 'time [s]');
|
|
68
68
|
(0, react_2.useEffect)(() => {
|
|
69
69
|
if (!show || !scaleX)
|
|
70
70
|
return;
|
|
@@ -44,7 +44,7 @@ function ResurrectedDatabaseRanges() {
|
|
|
44
44
|
yDomain[0] = domain[0] < yDomain[0] ? domain[0] : yDomain[0];
|
|
45
45
|
yDomain[1] = domain[1] > yDomain[1] ? domain[1] : yDomain[1];
|
|
46
46
|
return { data, from: newForm, to: newTo };
|
|
47
|
-
}
|
|
47
|
+
});
|
|
48
48
|
const scaleY = (0, scale_1.getYScale)({
|
|
49
49
|
height: blockHight,
|
|
50
50
|
margin: { top: 0, bottom: 0 },
|
|
@@ -59,7 +59,7 @@ function ResurrectedDatabaseRanges() {
|
|
|
59
59
|
pathBuilder.lineTo(finalScaleX(x[i]), scaleY(y[i]));
|
|
60
60
|
}
|
|
61
61
|
return { path: pathBuilder.toString(), from, to };
|
|
62
|
-
}
|
|
62
|
+
});
|
|
63
63
|
return ((0, jsx_runtime_1.jsx)("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, className: "resurrected-database-ranges", width: "100%", height: "100%", children: paths.map(({ path, from, to }, index) => (
|
|
64
64
|
// eslint-disable-next-line react/no-array-index-key
|
|
65
65
|
(0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("g", { transform: `translate(${scaleX()(to)},0)`, children: (0, jsx_runtime_1.jsx)("rect", { x: "0", width: Math.abs(scaleX()(to) - scaleX()(from)), height: "100%", fill: "#ff6f0057" }) }), (0, jsx_runtime_1.jsx)("path", { transform: `translate(0,${translateY})`, stroke: color, fill: "none", d: path })] }, `${index}`))) }));
|
|
@@ -4,8 +4,8 @@ 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 useIntegralPath_1 = __importDefault(require("
|
|
8
|
-
const usePanelPreferences_1 = require("
|
|
7
|
+
const useIntegralPath_1 = __importDefault(require("../../hooks/useIntegralPath"));
|
|
8
|
+
const usePanelPreferences_1 = require("../../hooks/usePanelPreferences");
|
|
9
9
|
const IntegralResizable_1 = __importDefault(require("./IntegralResizable"));
|
|
10
10
|
function Integral({ integral, isActive, nucleus }) {
|
|
11
11
|
const path = (0, useIntegralPath_1.default)(integral);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IntegralIndicator = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ChartContext_1 = require("../../context/ChartContext");
|
|
6
|
+
const formatNumber_1 = require("../../utility/formatNumber");
|
|
7
|
+
const styles = {
|
|
8
|
+
text: {
|
|
9
|
+
fontSize: '11px',
|
|
10
|
+
textAnchor: 'middle',
|
|
11
|
+
dominantBaseline: 'middle',
|
|
12
|
+
writingMode: 'vertical-rl',
|
|
13
|
+
fill: 'black',
|
|
14
|
+
},
|
|
15
|
+
path: {
|
|
16
|
+
fill: 'none',
|
|
17
|
+
strokeWidth: '1px',
|
|
18
|
+
shapeRendering: 'crispEdges',
|
|
19
|
+
stroke: 'black',
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
function IntegralIndicator(props) {
|
|
23
|
+
const { value, width, format, opacity = 1 } = props;
|
|
24
|
+
const { height, margin } = (0, ChartContext_1.useChartData)();
|
|
25
|
+
const bottom = height - margin.bottom;
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)("g", { style: { transform: `translate(0,${bottom - 10}px) `, opacity }, children: [(0, jsx_runtime_1.jsx)("text", { style: {
|
|
27
|
+
...styles.text,
|
|
28
|
+
transform: `translate(${width / 2}px,-12px) scale(-1)`,
|
|
29
|
+
}, children: value ? (0, formatNumber_1.formatNumber)(value, format) : '' }), (0, jsx_runtime_1.jsx)("path", { style: styles.path, d: `M0 0 L0 5 L${width} 5 L${width} 0 ` })] }));
|
|
30
|
+
}
|
|
31
|
+
exports.IntegralIndicator = IntegralIndicator;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
7
|
+
/** @jsxImportSource @emotion/react */
|
|
8
|
+
const react_1 = require("@emotion/react");
|
|
9
|
+
const ChartContext_1 = require("../../context/ChartContext");
|
|
10
|
+
const DispatchContext_1 = require("../../context/DispatchContext");
|
|
11
|
+
const GlobalContext_1 = require("../../context/GlobalContext");
|
|
12
|
+
const ScaleContext_1 = require("../../context/ScaleContext");
|
|
13
|
+
const Resizer_1 = __importDefault(require("../../elements/resizer/Resizer"));
|
|
14
|
+
const index_1 = require("../../highlight/index");
|
|
15
|
+
const Types_1 = require("../../reducer/types/Types");
|
|
16
|
+
const ToolTypes_1 = require("../../toolbar/ToolTypes");
|
|
17
|
+
const IntegralIndicator_1 = require("./IntegralIndicator");
|
|
18
|
+
const stylesOnHover = (0, react_1.css) `
|
|
19
|
+
pointer-events: bounding-box;
|
|
20
|
+
@-moz-document url-prefix() {
|
|
21
|
+
pointer-events: fill;
|
|
22
|
+
}
|
|
23
|
+
.highlight {
|
|
24
|
+
fill: transparent;
|
|
25
|
+
}
|
|
26
|
+
.target {
|
|
27
|
+
visibility: hidden;
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
const stylesHighlighted = (0, react_1.css) `
|
|
31
|
+
pointer-events: bounding-box;
|
|
32
|
+
|
|
33
|
+
@-moz-document url-prefix() {
|
|
34
|
+
pointer-events: fill;
|
|
35
|
+
}
|
|
36
|
+
fill: #ff6f0057;
|
|
37
|
+
|
|
38
|
+
.target {
|
|
39
|
+
visibility: visible;
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
42
|
+
function IntegralResizable({ integralData, integralFormat, }) {
|
|
43
|
+
const { height, margin, toolOptions: { selectedTool }, } = (0, ChartContext_1.useChartData)();
|
|
44
|
+
const { viewerRef } = (0, GlobalContext_1.useGlobal)();
|
|
45
|
+
const { scaleX } = (0, ScaleContext_1.useScaleChecked)();
|
|
46
|
+
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
47
|
+
const { id, integral } = integralData;
|
|
48
|
+
const highlight = (0, index_1.useHighlight)([id], {
|
|
49
|
+
type: index_1.HighlightEventSource.INTEGRAL,
|
|
50
|
+
extra: { id },
|
|
51
|
+
});
|
|
52
|
+
function handleOnStopResizing(position) {
|
|
53
|
+
dispatch({
|
|
54
|
+
type: Types_1.RESIZE_INTEGRAL,
|
|
55
|
+
payload: {
|
|
56
|
+
data: {
|
|
57
|
+
...integralData,
|
|
58
|
+
from: scaleX().invert(position.x2),
|
|
59
|
+
to: scaleX().invert(position.x1),
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
const from = integralData.from ? scaleX()(integralData.from) : 0;
|
|
65
|
+
const to = integralData.to ? scaleX()(integralData.to) : 0;
|
|
66
|
+
const bottom = height - margin.bottom;
|
|
67
|
+
return ((0, jsx_runtime_1.jsx)("g", { onMouseEnter: () => highlight.show(), onMouseLeave: () => highlight.hide(), children: (0, jsx_runtime_1.jsx)(Resizer_1.default, { tag: "svg", initialPosition: { x1: to, x2: from }, onEnd: handleOnStopResizing, parentElement: viewerRef, disabled: selectedTool !== ToolTypes_1.options.integral.id, children: ({ x1, x2 }, isActive) => {
|
|
68
|
+
const width = x2 - x1;
|
|
69
|
+
return ((0, jsx_runtime_1.jsxs)("g", { css: highlight.isActive || isActive
|
|
70
|
+
? stylesHighlighted
|
|
71
|
+
: stylesOnHover, children: [(0, jsx_runtime_1.jsx)("rect", { width: width, height: bottom, className: "highlight", "data-no-export": "true" }), (0, jsx_runtime_1.jsx)(IntegralIndicator_1.IntegralIndicator, { value: integral, format: integralFormat, width: width })] }));
|
|
72
|
+
} }, `${id}_${to}_${from}`) }));
|
|
73
|
+
}
|
|
74
|
+
exports.default = IntegralResizable;
|
|
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
const react_1 = require("react");
|
|
8
|
-
const Spectrum1D_1 = require("
|
|
9
|
-
const ChartContext_1 = require("
|
|
10
|
-
const Reducer_1 = require("
|
|
8
|
+
const Spectrum1D_1 = require("../../../data/data1d/Spectrum1D");
|
|
9
|
+
const ChartContext_1 = require("../../context/ChartContext");
|
|
10
|
+
const Reducer_1 = require("../../reducer/Reducer");
|
|
11
11
|
const Integral_1 = __importDefault(require("./Integral"));
|
|
12
12
|
function IntegralsSeries() {
|
|
13
13
|
const { xDomains, data, displayerKey, view: { spectra: { activeTab: nucleus }, }, } = (0, ChartContext_1.useChartData)();
|
|
@@ -19,7 +19,7 @@ function IntegralsSeries() {
|
|
|
19
19
|
return ((0, jsx_runtime_1.jsx)("g", { className: "integrals", children: data?.[0] &&
|
|
20
20
|
data
|
|
21
21
|
.filter((d) => d.display.isVisible && xDomains[d.id])
|
|
22
|
-
.filter(Spectrum1D_1.isSpectrum1D)
|
|
22
|
+
.filter((element) => (0, Spectrum1D_1.isSpectrum1D)(element))
|
|
23
23
|
.map((spectrum) => spectrum.integrals.values.map((integral) => ((0, jsx_runtime_1.jsx)(Integral_1.default, { nucleus: nucleus, integral: integral, isActive: isActive(spectrum.id) }, integral.id)))) }));
|
|
24
24
|
}, [activeSpectrum, data, nucleus, xDomains]);
|
|
25
25
|
return (0, jsx_runtime_1.jsx)("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, children: Integrals });
|
|
@@ -15,7 +15,7 @@ function MultiAnalysisRangesInner({ activeTab, spectraAnalysis, displayerKey, })
|
|
|
15
15
|
return columns;
|
|
16
16
|
}, [activeTab, spectraAnalysis]);
|
|
17
17
|
const ranges = (0, react_1.useMemo)(() => {
|
|
18
|
-
return Object.keys(columns).map((key) => key
|
|
18
|
+
return Object.keys(columns).map((key) => key);
|
|
19
19
|
}, [columns]);
|
|
20
20
|
if (!ranges || ranges.length === 0) {
|
|
21
21
|
return null;
|
|
@@ -84,13 +84,13 @@ function MultiplicityTree({ rangeFrom, rangeTo, signal, labelOptions = {
|
|
|
84
84
|
}, [treeProps.width, width]);
|
|
85
85
|
const startY = (0, react_1.useMemo)(() => {
|
|
86
86
|
let yMax;
|
|
87
|
-
spectrumData.data.x.
|
|
87
|
+
for (const [i, _x] of spectrumData.data.x.entries()) {
|
|
88
88
|
if (_x >= rangeFrom &&
|
|
89
89
|
_x <= rangeTo &&
|
|
90
90
|
(!yMax || spectrumData.data.re[i] > yMax)) {
|
|
91
91
|
yMax = spectrumData.data.re[i];
|
|
92
92
|
}
|
|
93
|
-
}
|
|
93
|
+
}
|
|
94
94
|
return scaleY(spectrumData.id)(yMax) - treeProps.height - 30;
|
|
95
95
|
}, [
|
|
96
96
|
spectrumData.data.x,
|
|
@@ -118,7 +118,7 @@ function MultiplicityTree({ rangeFrom, rangeTo, signal, labelOptions = {
|
|
|
118
118
|
}
|
|
119
119
|
else {
|
|
120
120
|
const _xRange = { x1: signal.delta, x2: signal.delta };
|
|
121
|
-
|
|
121
|
+
for (const _treeNodeData of treeNodesData) {
|
|
122
122
|
if (_treeNodeData.startX < _xRange.x1) {
|
|
123
123
|
_xRange.x1 = _treeNodeData.startX;
|
|
124
124
|
}
|
|
@@ -131,7 +131,7 @@ function MultiplicityTree({ rangeFrom, rangeTo, signal, labelOptions = {
|
|
|
131
131
|
if (_treeNodeData._startX > _xRange.x2) {
|
|
132
132
|
_xRange.x2 = _treeNodeData._startX;
|
|
133
133
|
}
|
|
134
|
-
}
|
|
134
|
+
}
|
|
135
135
|
setXRange(_xRange);
|
|
136
136
|
}
|
|
137
137
|
}, [
|
|
@@ -16,7 +16,7 @@ function createTreeNodes(signal, spectrumData) {
|
|
|
16
16
|
}
|
|
17
17
|
// re-use colors if needed
|
|
18
18
|
const color = TreeColors_1.TREE_LEVEL_COLORS[multiplicityIndex % TreeColors_1.TREE_LEVEL_COLORS.length];
|
|
19
|
-
const jIndex = jIndices.
|
|
19
|
+
const jIndex = jIndices.indexOf(multiplicityIndex);
|
|
20
20
|
const frequency = (0, get_1.default)(spectrumData, 'info.originFrequency', 0);
|
|
21
21
|
const coupling = jIndex >= 0 && frequency > 0 && signal?.js?.[jIndex]
|
|
22
22
|
? signal.js[jIndex].coupling / frequency // convert to ppm
|
|
@@ -40,7 +40,7 @@ function createTreeNodes(signal, spectrumData) {
|
|
|
40
40
|
let _startX = pascal.length % 2 === 0
|
|
41
41
|
? startX - (pascal.length / 2) * coupling + coupling / 2 // in case of even number of nodes
|
|
42
42
|
: startX - (pascal.length / 2 - 0.5) * coupling; // in case of odd number of nodes
|
|
43
|
-
pascal.
|
|
43
|
+
for (const [k, ratio] of pascal.entries()) {
|
|
44
44
|
if (k > 0) {
|
|
45
45
|
_startX += coupling;
|
|
46
46
|
}
|
|
@@ -53,7 +53,7 @@ function createTreeNodes(signal, spectrumData) {
|
|
|
53
53
|
});
|
|
54
54
|
// go to next multiplet in multiplicity string
|
|
55
55
|
buildTreeNodesData(multiplicityIndex + 1, jIndices, treeNodesData, _startX);
|
|
56
|
-
}
|
|
56
|
+
}
|
|
57
57
|
}
|
|
58
58
|
return treeNodesData;
|
|
59
59
|
}
|
|
@@ -72,7 +72,7 @@ value, color, nucleus, }) {
|
|
|
72
72
|
const handleKeyDown = (0, react_2.useCallback)((event) => {
|
|
73
73
|
if (event.key === 'Enter') {
|
|
74
74
|
const newValue = event.currentTarget.valueAsNumber;
|
|
75
|
-
if (!isNaN(newValue)) {
|
|
75
|
+
if (!Number.isNaN(newValue)) {
|
|
76
76
|
const shiftValue = newValue - value;
|
|
77
77
|
handleOnPeakChange({
|
|
78
78
|
id,
|
|
@@ -13,22 +13,26 @@ function usePeakShapesPath(spectrum) {
|
|
|
13
13
|
const frequency = spectrum.info.originFrequency;
|
|
14
14
|
let pathSeries = null;
|
|
15
15
|
switch (target) {
|
|
16
|
-
case 'peakShape':
|
|
17
|
-
|
|
16
|
+
case 'peakShape': {
|
|
17
|
+
const { peak } = options;
|
|
18
|
+
pathSeries = (0, nmr_processing_1.peakToXY)(peak, {
|
|
18
19
|
frequency,
|
|
19
20
|
nbPoints: 1024,
|
|
20
|
-
from:
|
|
21
|
-
to:
|
|
21
|
+
from: peak.x - (peak.width / frequency) * 9,
|
|
22
|
+
to: peak.x + (peak.width / frequency) * 9,
|
|
22
23
|
});
|
|
23
24
|
break;
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
}
|
|
26
|
+
case 'peaksSum': {
|
|
27
|
+
const { peaks } = options;
|
|
28
|
+
pathSeries = (0, nmr_processing_1.peaksToXY)(peaks, {
|
|
26
29
|
frequency,
|
|
27
30
|
nbPoints: width,
|
|
28
31
|
from: xDomain[0],
|
|
29
32
|
to: xDomain[1],
|
|
30
33
|
});
|
|
31
34
|
break;
|
|
35
|
+
}
|
|
32
36
|
default:
|
|
33
37
|
break;
|
|
34
38
|
}
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
7
7
|
/** @jsxImportSource @emotion/react */
|
|
8
8
|
const react_1 = require("@emotion/react");
|
|
9
|
-
const react_2 = require("react");
|
|
10
9
|
const RangeUtilities_1 = require("../../../data/utilities/RangeUtilities");
|
|
11
10
|
const AssignmentsContext_1 = require("../../assignment/AssignmentsContext");
|
|
12
11
|
const filterForIDsWithAssignment_1 = require("../../assignment/utilities/filterForIDsWithAssignment");
|
|
@@ -17,18 +16,17 @@ const Resizer_1 = __importDefault(require("../../elements/resizer/Resizer"));
|
|
|
17
16
|
const highlight_1 = require("../../highlight");
|
|
18
17
|
const Types_1 = require("../../reducer/types/Types");
|
|
19
18
|
const ToolTypes_1 = require("../../toolbar/ToolTypes");
|
|
20
|
-
const
|
|
19
|
+
const IntegralIndicator_1 = require("../integral/IntegralIndicator");
|
|
21
20
|
const MultiplicityTree_1 = __importDefault(require("../multiplicityTree/MultiplicityTree"));
|
|
22
21
|
const stylesOnHover = (0, react_1.css) `
|
|
23
22
|
pointer-events: bounding-box;
|
|
24
23
|
@-moz-document url-prefix() {
|
|
25
24
|
pointer-events: fill;
|
|
26
25
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
.delete-button {
|
|
26
|
+
.highlight {
|
|
27
|
+
fill: transparent;
|
|
28
|
+
}
|
|
29
|
+
.target {
|
|
32
30
|
visibility: hidden;
|
|
33
31
|
}
|
|
34
32
|
`;
|
|
@@ -38,13 +36,10 @@ const stylesHighlighted = (0, react_1.css) `
|
|
|
38
36
|
@-moz-document url-prefix() {
|
|
39
37
|
pointer-events: fill;
|
|
40
38
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
.delete-button {
|
|
39
|
+
fill: #ff6f0057;
|
|
40
|
+
|
|
41
|
+
.target {
|
|
46
42
|
visibility: visible;
|
|
47
|
-
cursor: pointer;
|
|
48
43
|
}
|
|
49
44
|
`;
|
|
50
45
|
function Range({ rangeData, showMultiplicityTrees, selectedTool, relativeFormat, }) {
|
|
@@ -55,20 +50,8 @@ function Range({ rangeData, showMultiplicityTrees, selectedTool, relativeFormat,
|
|
|
55
50
|
const highlightRange = (0, highlight_1.useHighlight)([assignmentRange.id].concat(assignmentRange.assigned?.x || []).concat((0, filterForIDsWithAssignment_1.filterForIDsWithAssignment)(assignmentData, signals.map((_signal) => _signal.id))), { type: highlight_1.HighlightEventSource.RANGE, extra: { id } });
|
|
56
51
|
const { scaleX } = (0, ScaleContext_1.useScaleChecked)();
|
|
57
52
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
(0, react_2.useEffect)(() => {
|
|
61
|
-
if (selectedTool && selectedTool === ToolTypes_1.options.editRange.id) {
|
|
62
|
-
setIsBlockedByEditing(true);
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
setIsBlockedByEditing(false);
|
|
66
|
-
}
|
|
67
|
-
}, [selectedTool]);
|
|
68
|
-
(0, react_2.useEffect)(() => {
|
|
69
|
-
setReduceOpacity(!(0, RangeUtilities_1.checkRangeKind)(rangeData));
|
|
70
|
-
}, [rangeData]);
|
|
71
|
-
const handleOnStopResizing = (0, react_2.useCallback)((position) => {
|
|
53
|
+
const isBlockedByEditing = selectedTool && selectedTool === ToolTypes_1.options.editRange.id;
|
|
54
|
+
function handleOnStopResizing(position) {
|
|
72
55
|
dispatch({
|
|
73
56
|
type: Types_1.RESIZE_RANGE,
|
|
74
57
|
data: {
|
|
@@ -77,40 +60,34 @@ function Range({ rangeData, showMultiplicityTrees, selectedTool, relativeFormat,
|
|
|
77
60
|
to: scaleX().invert(position.x1),
|
|
78
61
|
},
|
|
79
62
|
});
|
|
80
|
-
}
|
|
81
|
-
|
|
63
|
+
}
|
|
64
|
+
function mouseEnterHandler() {
|
|
82
65
|
assignmentRange.show('x');
|
|
83
66
|
highlightRange.show();
|
|
84
|
-
}
|
|
85
|
-
|
|
67
|
+
}
|
|
68
|
+
function mouseLeaveHandler() {
|
|
86
69
|
assignmentRange.hide();
|
|
87
70
|
highlightRange.hide();
|
|
88
|
-
}
|
|
89
|
-
|
|
71
|
+
}
|
|
72
|
+
function assignHandler(e) {
|
|
90
73
|
if (selectedTool === ToolTypes_1.options.rangePicking.id &&
|
|
91
74
|
e.shiftKey &&
|
|
92
75
|
!isBlockedByEditing) {
|
|
93
76
|
assignmentRange.setActive('x');
|
|
94
77
|
}
|
|
95
|
-
}
|
|
78
|
+
}
|
|
96
79
|
const from = scaleX()(rangeData.from);
|
|
97
80
|
const to = scaleX()(rangeData.to);
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
highlightRange.isActive ||
|
|
109
|
-
assignmentRange.isActive
|
|
110
|
-
? 1
|
|
111
|
-
: 0.6, children: integration !== undefined
|
|
112
|
-
? (0, formatNumber_1.formatNumber)(integration, relativeFormat)
|
|
113
|
-
: '' })] })) }, `${id}_${to}_${from}`), showMultiplicityTrees &&
|
|
81
|
+
const isNotSignal = !(0, RangeUtilities_1.checkRangeKind)(rangeData);
|
|
82
|
+
return ((0, jsx_runtime_1.jsxs)("g", { "data-test-id": "range", style: { outline: 'none' }, onMouseEnter: mouseEnterHandler, onMouseLeave: mouseLeaveHandler, onClick: assignHandler, children: [(0, jsx_runtime_1.jsx)(Resizer_1.default, { tag: "svg", initialPosition: { x1: to, x2: from }, onEnd: handleOnStopResizing, parentElement: viewerRef, disabled: selectedTool !== ToolTypes_1.options.rangePicking.id, children: ({ x1, x2 }, isActive) => {
|
|
83
|
+
const width = x2 - x1;
|
|
84
|
+
return ((0, jsx_runtime_1.jsxs)("g", { css: isBlockedByEditing ||
|
|
85
|
+
highlightRange.isActive ||
|
|
86
|
+
assignmentRange.isActive ||
|
|
87
|
+
isActive
|
|
88
|
+
? stylesHighlighted
|
|
89
|
+
: stylesOnHover, children: [(0, jsx_runtime_1.jsx)("rect", { width: width, height: "100%", className: "highlight", "data-no-export": "true" }), (0, jsx_runtime_1.jsx)(IntegralIndicator_1.IntegralIndicator, { value: integration, format: relativeFormat, width: width, opacity: isNotSignal ? 0.5 : 1 })] }));
|
|
90
|
+
} }, `${id}_${to}_${from}`), showMultiplicityTrees &&
|
|
114
91
|
signals &&
|
|
115
92
|
signals.length > 0 &&
|
|
116
93
|
signals.map((_signal) => ((0, jsx_runtime_1.jsx)(MultiplicityTree_1.default, { rangeFrom: rangeData.from, rangeTo: rangeData.to, signal: _signal }, _signal.id)))] }, id));
|
|
@@ -55,7 +55,7 @@ function PeakPointer() {
|
|
|
55
55
|
const yDataRange = datum.y.slice(minIndex, maxIndex);
|
|
56
56
|
if (yDataRange && yDataRange.length > 0) {
|
|
57
57
|
const yValue = (0, ml_array_max_1.default)(yDataRange);
|
|
58
|
-
const xIndex = yDataRange.
|
|
58
|
+
const xIndex = yDataRange.indexOf(yValue);
|
|
59
59
|
const xValue = datum.x[minIndex + xIndex];
|
|
60
60
|
return {
|
|
61
61
|
x: scaleX()(xValue),
|
|
@@ -13,8 +13,8 @@ exports.getXScale = getXScale;
|
|
|
13
13
|
function getYScale(state, spectrumId = null) {
|
|
14
14
|
const { height, margin, verticalAlign, yDomain, yDomains } = state;
|
|
15
15
|
const _height = verticalAlign.align === 'center'
|
|
16
|
-
? (height -
|
|
17
|
-
: height - margin.bottom -
|
|
16
|
+
? (height - 40) / 2
|
|
17
|
+
: height - margin.bottom - 40;
|
|
18
18
|
let domainY = [];
|
|
19
19
|
if (spectrumId === null || yDomains[spectrumId] === undefined) {
|
|
20
20
|
domainY = [0, yDomain[1]];
|