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