nmrium 0.32.0 → 0.33.0-pre.1667755480
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/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/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/KeysListenerTracker.js +14 -15
- package/lib/component/NMRium.d.ts +1 -1
- package/lib/component/NMRium.js +6 -6
- 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.js +3 -5
- 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/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 +4 -4
- 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/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/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 +40 -14
- package/lib/component/reducer/Reducer.js +12 -11
- 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 +49 -67
- package/lib/component/reducer/actions/FiltersActions.js +3 -3
- package/lib/component/reducer/actions/HistoryActions.js +5 -5
- package/lib/component/reducer/actions/LoadActions.js +12 -0
- package/lib/component/reducer/actions/PreferencesActions.js +18 -37
- package/lib/component/reducer/actions/RangesActions.js +14 -12
- package/lib/component/reducer/actions/SpectrumsActions.js +10 -4
- package/lib/component/reducer/actions/ToolsActions.js +20 -35
- package/lib/component/reducer/actions/ZonesActions.js +2 -2
- 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/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/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 +1 -1
- 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} +53 -78
- package/lib/component/utility/formatNumber.d.ts +6 -1
- package/lib/component/utility/formatNumber.js +5 -4
- package/lib/data/Filters.d.ts +16 -17
- package/lib/data/Filters.js +16 -17
- 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 +2 -2
- 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 +7 -18
- 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/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/versionInfo.js +1 -1
- package/lib-cjs/component/1d/Chart1D.js +1 -1
- 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/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/KeysListenerTracker.js +14 -15
- package/lib-cjs/component/NMRium.js +7 -7
- 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 +3 -5
- 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/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 +4 -4
- 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/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/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 +11 -10
- package/lib-cjs/component/reducer/actions/CorrelationsActions.js +4 -4
- package/lib-cjs/component/reducer/actions/DomainActions.js +49 -67
- package/lib-cjs/component/reducer/actions/FiltersActions.js +3 -3
- package/lib-cjs/component/reducer/actions/HistoryActions.js +5 -5
- package/lib-cjs/component/reducer/actions/LoadActions.js +12 -0
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +18 -37
- package/lib-cjs/component/reducer/actions/RangesActions.js +14 -12
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +9 -3
- package/lib-cjs/component/reducer/actions/ToolsActions.js +20 -35
- package/lib-cjs/component/reducer/actions/ZonesActions.js +2 -2
- 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/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 +1 -1
- 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} +77 -79
- package/lib-cjs/component/utility/formatNumber.js +5 -4
- package/lib-cjs/data/Filters.js +17 -33
- 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 +2 -2
- 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 +7 -18
- 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/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 +30 -26
- 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/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/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
|
@@ -29,7 +29,6 @@ const immer_1 = require("immer");
|
|
|
29
29
|
const nmr_correlation_1 = require("nmr-correlation");
|
|
30
30
|
const nmr_load_save_1 = require("nmr-load-save");
|
|
31
31
|
const PredictionManager_1 = require("../../data/PredictionManager");
|
|
32
|
-
const SpectraManager = __importStar(require("../../data/SpectraManager"));
|
|
33
32
|
const ChartContext_1 = require("../context/ChartContext");
|
|
34
33
|
const Constants_1 = require("../panels/SummaryPanel/CorrelationTable/Constants");
|
|
35
34
|
const ToolTypes_1 = require("../toolbar/ToolTypes");
|
|
@@ -67,7 +66,6 @@ exports.zoneStateInit = {
|
|
|
67
66
|
const getInitialState = () => ({
|
|
68
67
|
actionType: '',
|
|
69
68
|
data: [],
|
|
70
|
-
contours: {},
|
|
71
69
|
tempData: null,
|
|
72
70
|
xDomain: [],
|
|
73
71
|
yDomain: [],
|
|
@@ -86,7 +84,7 @@ const getInitialState = () => ({
|
|
|
86
84
|
margin: {
|
|
87
85
|
top: 10,
|
|
88
86
|
right: 20,
|
|
89
|
-
bottom:
|
|
87
|
+
bottom: 50,
|
|
90
88
|
left: 0,
|
|
91
89
|
},
|
|
92
90
|
mode: 'RTL',
|
|
@@ -96,6 +94,9 @@ const getInitialState = () => ({
|
|
|
96
94
|
ranges: [],
|
|
97
95
|
zones: [],
|
|
98
96
|
spectra: { activeSpectra: {}, activeTab: '' },
|
|
97
|
+
zoom: {
|
|
98
|
+
levels: {},
|
|
99
|
+
},
|
|
99
100
|
},
|
|
100
101
|
verticalAlign: {
|
|
101
102
|
align: 'bottom',
|
|
@@ -160,14 +161,14 @@ function initState(state) {
|
|
|
160
161
|
}
|
|
161
162
|
exports.initState = initState;
|
|
162
163
|
function dispatchMiddleware(dispatch) {
|
|
163
|
-
|
|
164
|
+
let usedColors = { '1d': [], '2d': [] };
|
|
164
165
|
return (action) => {
|
|
165
166
|
switch (action.type) {
|
|
166
167
|
case types.INITIATE: {
|
|
167
168
|
if (action.payload) {
|
|
168
|
-
|
|
169
|
-
void
|
|
170
|
-
action.payload = {
|
|
169
|
+
usedColors = { '1d': [], '2d': [] };
|
|
170
|
+
void (0, nmr_load_save_1.readNMRiumObject)(action.payload).then((data) => {
|
|
171
|
+
action.payload = { ...data, usedColors };
|
|
171
172
|
dispatch(action);
|
|
172
173
|
});
|
|
173
174
|
}
|
|
@@ -176,14 +177,14 @@ function dispatchMiddleware(dispatch) {
|
|
|
176
177
|
case types.LOAD_DROP_FILES: {
|
|
177
178
|
const { fileCollection } = action;
|
|
178
179
|
action.usedColors = usedColors;
|
|
179
|
-
(0, nmr_load_save_1.read)(fileCollection
|
|
180
|
+
(0, nmr_load_save_1.read)(fileCollection)
|
|
180
181
|
.then((data) => {
|
|
181
182
|
action.data = data;
|
|
182
183
|
dispatch(action);
|
|
183
184
|
})
|
|
184
|
-
.catch((
|
|
185
|
+
.catch((error) => {
|
|
185
186
|
dispatch({ type: types.SET_LOADING_FLAG, isLoading: false });
|
|
186
|
-
reportError(
|
|
187
|
+
reportError(error);
|
|
187
188
|
});
|
|
188
189
|
break;
|
|
189
190
|
}
|
|
@@ -61,9 +61,9 @@ function handleSetCorrelations(draft, payload) {
|
|
|
61
61
|
const { correlations, options } = payload;
|
|
62
62
|
const state = (0, immer_1.original)(draft);
|
|
63
63
|
let correlationsData = (0, cloneDeep_1.default)(state.correlations);
|
|
64
|
-
|
|
64
|
+
for (const correlation of correlations) {
|
|
65
65
|
correlationsData = (0, nmr_correlation_1.setCorrelation)(correlationsData, correlation.id, correlation);
|
|
66
|
-
}
|
|
66
|
+
}
|
|
67
67
|
draft.correlations = correlationsData;
|
|
68
68
|
if (options) {
|
|
69
69
|
draft.correlations = {
|
|
@@ -77,7 +77,7 @@ exports.handleSetCorrelations = handleSetCorrelations;
|
|
|
77
77
|
function handleDeleteCorrelation(draft, payload) {
|
|
78
78
|
const { correlation, assignmentData } = payload;
|
|
79
79
|
// delete all signals linked to the correlation
|
|
80
|
-
correlation.
|
|
80
|
+
for (const link of correlation.links) {
|
|
81
81
|
const spectrum = (0, FindUtilities_1.findSpectrum)(draft.data, link.experimentID, false);
|
|
82
82
|
if (spectrum) {
|
|
83
83
|
if (spectrum.info.dimension === 1) {
|
|
@@ -105,6 +105,6 @@ function handleDeleteCorrelation(draft, payload) {
|
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
}
|
|
108
|
+
}
|
|
109
109
|
}
|
|
110
110
|
exports.handleDeleteCorrelation = handleDeleteCorrelation;
|
|
@@ -30,33 +30,26 @@ function getActiveData(draft) {
|
|
|
30
30
|
function getDomain(draft) {
|
|
31
31
|
let xArray = [];
|
|
32
32
|
let yArray = [];
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
const yDomains = {};
|
|
34
|
+
const xDomains = {};
|
|
35
35
|
const data = getActiveData(draft);
|
|
36
36
|
try {
|
|
37
|
-
|
|
38
|
-
const { display, data } = d;
|
|
37
|
+
for (const d of data) {
|
|
38
|
+
const { display, data, id } = d;
|
|
39
|
+
const { y } = (0, get1DDataXY_1.get1DDataXY)(d);
|
|
40
|
+
const _extent = (0, d3_1.extent)(y);
|
|
39
41
|
const domain = [data.x[0], data.x[data.x.length - 1]];
|
|
40
|
-
|
|
42
|
+
yDomains[id] = _extent;
|
|
43
|
+
xDomains[id] = domain;
|
|
41
44
|
if (display.isVisible) {
|
|
42
|
-
|
|
45
|
+
xArray = xArray.concat(domain);
|
|
46
|
+
yArray = yArray.concat(_extent);
|
|
43
47
|
}
|
|
44
|
-
|
|
45
|
-
}, []);
|
|
46
|
-
yArray = data.reduce((acc, d) => {
|
|
47
|
-
const { display } = d;
|
|
48
|
-
const data = (0, get1DDataXY_1.get1DDataXY)(d);
|
|
49
|
-
const _extent = (0, d3_1.extent)(data.y);
|
|
50
|
-
yDomains[d.id] = _extent;
|
|
51
|
-
if (display.isVisible) {
|
|
52
|
-
acc = acc.concat(_extent);
|
|
53
|
-
}
|
|
54
|
-
return acc;
|
|
55
|
-
}, []);
|
|
48
|
+
}
|
|
56
49
|
}
|
|
57
|
-
catch (
|
|
58
|
-
//
|
|
59
|
-
|
|
50
|
+
catch (error) {
|
|
51
|
+
// TODO: handle error.
|
|
52
|
+
reportError(error);
|
|
60
53
|
}
|
|
61
54
|
return {
|
|
62
55
|
xDomain: (0, d3_1.extent)(xArray),
|
|
@@ -69,54 +62,44 @@ exports.getDomain = getDomain;
|
|
|
69
62
|
function get2DDomain(state) {
|
|
70
63
|
let xArray = [];
|
|
71
64
|
let yArray = [];
|
|
72
|
-
|
|
73
|
-
|
|
65
|
+
const yDomains = {};
|
|
66
|
+
const xDomains = {};
|
|
74
67
|
const { view: { spectra: { activeSpectra, activeTab }, }, data, } = state;
|
|
75
68
|
const nucleus = activeTab.split(',');
|
|
76
69
|
try {
|
|
77
|
-
xArray = data.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
datum.info.nucleus?.join(',') === activeTab &&
|
|
88
|
-
datum.info.isFt) {
|
|
89
|
-
acc = acc.concat([datum.data.minY, datum.data.maxY]);
|
|
90
|
-
}
|
|
91
|
-
return acc;
|
|
92
|
-
}, []);
|
|
70
|
+
xArray = data.filter((datum) => (0, Spectrum2D_1.isSpectrum2D)(datum) &&
|
|
71
|
+
datum.info.nucleus?.join(',') === activeTab &&
|
|
72
|
+
datum.info.isFt).flatMap((datum) => {
|
|
73
|
+
return [datum.data.minX, datum.data.maxX];
|
|
74
|
+
});
|
|
75
|
+
yArray = data.filter((d) => (0, Spectrum2D_1.isSpectrum2D)(d) &&
|
|
76
|
+
d.info.nucleus?.join(',') === activeTab &&
|
|
77
|
+
d.info.isFt).flatMap((datum) => {
|
|
78
|
+
return [datum.data.minY, datum.data.maxY];
|
|
79
|
+
});
|
|
93
80
|
}
|
|
94
|
-
catch (
|
|
95
|
-
//
|
|
96
|
-
|
|
81
|
+
catch (error) {
|
|
82
|
+
// TODO: handle error
|
|
83
|
+
reportError(error);
|
|
97
84
|
}
|
|
98
|
-
const spectrumsIDs = nucleus.map((n) => activeSpectra[n]?.id);
|
|
99
|
-
const filteredData = data
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
85
|
+
const spectrumsIDs = new Set(nucleus.map((n) => activeSpectra[n]?.id));
|
|
86
|
+
const filteredData = data
|
|
87
|
+
.filter((d) => spectrumsIDs.has(d.id) && d.info.dimension === 1)
|
|
88
|
+
.map((datum) => {
|
|
89
|
+
return datum;
|
|
90
|
+
});
|
|
104
91
|
try {
|
|
105
|
-
|
|
106
|
-
const { x } = d.data;
|
|
92
|
+
for (const d of filteredData) {
|
|
93
|
+
const { x, re } = d.data;
|
|
107
94
|
const domain = [x[0], x[x.length - 1]];
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
const _extent = (0, d3_1.extent)(d.data.re);
|
|
113
|
-
acc[d.id] = _extent;
|
|
114
|
-
return acc;
|
|
115
|
-
}, {});
|
|
95
|
+
xDomains[d.id] = domain;
|
|
96
|
+
const _extent = (0, d3_1.extent)(re);
|
|
97
|
+
yDomains[d.id] = _extent;
|
|
98
|
+
}
|
|
116
99
|
}
|
|
117
|
-
catch (
|
|
118
|
-
//
|
|
119
|
-
|
|
100
|
+
catch (error) {
|
|
101
|
+
// TODO: handle error.
|
|
102
|
+
reportError(error);
|
|
120
103
|
}
|
|
121
104
|
return {
|
|
122
105
|
xDomain: (0, d3_1.extent)(xArray),
|
|
@@ -141,10 +124,9 @@ function setDomain(draft, options) {
|
|
|
141
124
|
if (yDomain.isChanged) {
|
|
142
125
|
draft.yDomain = domain.yDomain;
|
|
143
126
|
if (draft.displayerMode === Constants_1.DISPLAYER_MODE.DM_1D && yDomain.isShared) {
|
|
144
|
-
draft.yDomains = Object.keys(domain.yDomains).
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}, {});
|
|
127
|
+
draft.yDomains = Object.fromEntries(Object.keys(domain.yDomains).map((key) => {
|
|
128
|
+
return [key, domain.yDomain];
|
|
129
|
+
}));
|
|
148
130
|
}
|
|
149
131
|
else {
|
|
150
132
|
draft.yDomains = domain.yDomains;
|
|
@@ -201,8 +183,8 @@ function handelResetDomain(draft) {
|
|
|
201
183
|
}
|
|
202
184
|
exports.handelResetDomain = handelResetDomain;
|
|
203
185
|
function setMode(draft) {
|
|
204
|
-
const
|
|
186
|
+
const datum_ = draft.data.find((datum) => draft.xDomains[datum.id] &&
|
|
205
187
|
(0, nucleusToString_1.default)(datum.info.nucleus) === draft.view.spectra.activeTab);
|
|
206
|
-
draft.mode =
|
|
188
|
+
draft.mode = datum_?.info.isFid ? 'LTR' : 'RTL';
|
|
207
189
|
}
|
|
208
190
|
exports.setMode = setMode;
|
|
@@ -256,7 +256,7 @@ function deleteSpectraFilter(draft, actions) {
|
|
|
256
256
|
for (const datum of draft.data) {
|
|
257
257
|
if ((0, nucleusToString_1.default)(datum?.info?.nucleus) === draft.view.spectra.activeTab) {
|
|
258
258
|
const filtersResult = datum.filters?.filter((filter) => filter.name === filterType) || [];
|
|
259
|
-
|
|
259
|
+
for (const filter of filtersResult) {
|
|
260
260
|
FiltersManager.deleteFilter(datum, filter.id);
|
|
261
261
|
if (datum.info?.dimension === 1) {
|
|
262
262
|
(0, Spectrum1D_1.updateXShift)(datum);
|
|
@@ -264,7 +264,7 @@ function deleteSpectraFilter(draft, actions) {
|
|
|
264
264
|
else if (datum.info?.dimension === 2) {
|
|
265
265
|
(0, Spectrum2D_1.updateShift)(datum);
|
|
266
266
|
}
|
|
267
|
-
}
|
|
267
|
+
}
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
(0, ToolsActions_1.resetSelectedTool)(draft);
|
|
@@ -314,7 +314,7 @@ function resetSpectrumByFilter(draft, options) {
|
|
|
314
314
|
let filters = [];
|
|
315
315
|
if (filterIndex !== -1) {
|
|
316
316
|
filters = datum.filters.slice(0, rollback ? filterIndex : filterIndex + 1);
|
|
317
|
-
if (filters.length
|
|
317
|
+
if (filters.length > 0) {
|
|
318
318
|
draft.toolOptions.data.activeFilterID =
|
|
319
319
|
datum.filters[rollback ? filterIndex - 1 : filterIndex]?.id;
|
|
320
320
|
}
|
|
@@ -5,10 +5,10 @@ const DomainActions_1 = require("./DomainActions");
|
|
|
5
5
|
function handleHistoryUndo(draft) {
|
|
6
6
|
const { past, present, future } = draft.history;
|
|
7
7
|
const previous = past[past.length - 1];
|
|
8
|
-
const newPast = past.slice(0,
|
|
8
|
+
const newPast = past.slice(0, -1);
|
|
9
9
|
const newfuture = [present, ...future];
|
|
10
|
-
const hasRedo = newfuture.length
|
|
11
|
-
const hasUndo = past.length
|
|
10
|
+
const hasRedo = newfuture.length > 0;
|
|
11
|
+
const hasUndo = past.length > 0;
|
|
12
12
|
const domain = (0, DomainActions_1.getDomain)(draft.data);
|
|
13
13
|
const history = {
|
|
14
14
|
past: newPast,
|
|
@@ -24,13 +24,13 @@ function handleHistoryUndo(draft) {
|
|
|
24
24
|
}
|
|
25
25
|
exports.handleHistoryUndo = handleHistoryUndo;
|
|
26
26
|
function handleHistoryRedo(draft) {
|
|
27
|
-
const { history } = draft;
|
|
27
|
+
const { history, data } = draft;
|
|
28
28
|
const newPresent = history.future.shift();
|
|
29
29
|
history.past.push(history.present);
|
|
30
30
|
history.present = newPresent;
|
|
31
31
|
history.hasUndo = true;
|
|
32
32
|
history.hasRedo = history.future.length > 0;
|
|
33
|
-
(0, DomainActions_1.setDomain)(
|
|
33
|
+
(0, DomainActions_1.setDomain)(data);
|
|
34
34
|
}
|
|
35
35
|
exports.handleHistoryRedo = handleHistoryRedo;
|
|
36
36
|
function handleHistoryReset(draft, action) {
|
|
@@ -99,6 +99,18 @@ function setPreferences(draft, data) {
|
|
|
99
99
|
}
|
|
100
100
|
function initiate(draft, action) {
|
|
101
101
|
const state = (0, Reducer_1.getInitialState)();
|
|
102
|
+
const { spectra, usedColors } = action.payload;
|
|
103
|
+
const newSpectra = [];
|
|
104
|
+
for (let spectrum of spectra) {
|
|
105
|
+
const { info } = spectrum;
|
|
106
|
+
if (info.dimension === 1) {
|
|
107
|
+
newSpectra.push((0, Spectrum1D_1.initiateDatum1D)(spectrum, usedColors));
|
|
108
|
+
}
|
|
109
|
+
else if (info.dimension === 2) {
|
|
110
|
+
newSpectra.push((0, Spectrum2D_1.initiateDatum2D)(spectrum, usedColors));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
action.payload.spectra = newSpectra;
|
|
102
114
|
setData(state, action.payload);
|
|
103
115
|
const preferences = action.payload?.preferences || {};
|
|
104
116
|
(0, ToolsActions_1.setActiveTab)(state, { tab: preferences?.activeTab || '' });
|
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.applyKeyPreferencesHandler = exports.setKeyPreferencesHandler = exports.changeSpectrumVerticalAlignment = void 0;
|
|
7
|
-
const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
8
7
|
const GroupByInfoKey_1 = __importDefault(require("../../utility/GroupByInfoKey"));
|
|
9
8
|
const nucleusToString_1 = __importDefault(require("../../utility/nucleusToString"));
|
|
10
9
|
const Constants_1 = require("../core/Constants");
|
|
@@ -61,18 +60,14 @@ function changeSpectrumVerticalAlignment(draft, options) {
|
|
|
61
60
|
}
|
|
62
61
|
exports.changeSpectrumVerticalAlignment = changeSpectrumVerticalAlignment;
|
|
63
62
|
function setKeyPreferencesHandler(draft, keyCode) {
|
|
64
|
-
const { data, zoom, xDomain, xDomains, yDomain, yDomains, originDomain, margin, displayerMode, view, } = draft;
|
|
63
|
+
const { data, zoom, xDomain, xDomains, yDomain, yDomains, originDomain, margin, displayerMode, view, keysPreferences, } = draft;
|
|
64
|
+
const { spectra: { activeTab }, } = view;
|
|
65
65
|
const activeSpectrum = (0, getActiveSpectrum_1.getActiveSpectrum)(draft);
|
|
66
|
-
if (
|
|
66
|
+
if (activeTab) {
|
|
67
67
|
const groupByNucleus = (0, GroupByInfoKey_1.default)('nucleus');
|
|
68
68
|
const spectrumsGroupsList = groupByNucleus(data);
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
acc[datum.id] = datum.processingController.getLevel();
|
|
72
|
-
return acc;
|
|
73
|
-
}, {})
|
|
74
|
-
: null;
|
|
75
|
-
draft.keysPreferences[keyCode] = {
|
|
69
|
+
const spectra = spectrumsGroupsList[activeTab];
|
|
70
|
+
keysPreferences[keyCode] = {
|
|
76
71
|
activeSpectrum,
|
|
77
72
|
displayerMode,
|
|
78
73
|
view,
|
|
@@ -82,30 +77,26 @@ function setKeyPreferencesHandler(draft, keyCode) {
|
|
|
82
77
|
yDomain,
|
|
83
78
|
yDomains,
|
|
84
79
|
originDomain,
|
|
85
|
-
level,
|
|
86
80
|
margin,
|
|
87
|
-
data:
|
|
88
|
-
acc[datum.id] = {
|
|
89
|
-
display: {
|
|
90
|
-
color: datum.display.color,
|
|
91
|
-
isVisible: datum.display.isVisible,
|
|
92
|
-
isPeaksMarkersVisible: datum.display.isPeaksMarkersVisible,
|
|
93
|
-
},
|
|
94
|
-
};
|
|
95
|
-
return acc;
|
|
96
|
-
}, {}),
|
|
81
|
+
data: spectra,
|
|
97
82
|
};
|
|
98
83
|
}
|
|
99
84
|
}
|
|
100
85
|
exports.setKeyPreferencesHandler = setKeyPreferencesHandler;
|
|
86
|
+
function setSpectraDisplayPreferences(draft, preferences) {
|
|
87
|
+
for (const [index, datum] of draft.data.entries()) {
|
|
88
|
+
if ((0, nucleusToString_1.default)(datum.info.nucleus) === preferences.activeTab) {
|
|
89
|
+
draft.data[index].display = {
|
|
90
|
+
...datum.display,
|
|
91
|
+
...preferences.data[datum.id].display,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
101
96
|
function applyKeyPreferencesHandler(draft, keyCode) {
|
|
102
97
|
const preferences = draft.keysPreferences[keyCode];
|
|
103
98
|
if (preferences) {
|
|
104
|
-
draft
|
|
105
|
-
if ((0, nucleusToString_1.default)(datum.info.nucleus) === preferences.activeTab) {
|
|
106
|
-
draft.data[index].display = Object.assign((0, cloneDeep_1.default)(datum.display), preferences.data[datum.id].display);
|
|
107
|
-
}
|
|
108
|
-
});
|
|
99
|
+
setSpectraDisplayPreferences(draft, preferences);
|
|
109
100
|
draft.view = preferences.view;
|
|
110
101
|
draft.displayerMode = preferences.displayerMode;
|
|
111
102
|
draft.margin = preferences.margin;
|
|
@@ -115,17 +106,7 @@ function applyKeyPreferencesHandler(draft, keyCode) {
|
|
|
115
106
|
draft.yDomain = preferences.yDomain;
|
|
116
107
|
draft.originDomain = preferences.originDomain;
|
|
117
108
|
draft.yDomains = preferences.yDomains;
|
|
118
|
-
if (draft.displayerMode
|
|
119
|
-
for (const datumID of Object.keys(preferences.level)) {
|
|
120
|
-
const { levelPositive, levelNegative } = preferences.level[datumID];
|
|
121
|
-
const index = draft.data.findIndex((datum) => datum.id === datumID);
|
|
122
|
-
const processController = draft.data[index]
|
|
123
|
-
.processingController;
|
|
124
|
-
processController.setLevel(levelPositive, levelNegative);
|
|
125
|
-
draft.contours[datumID] = processController.drawContours();
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
109
|
+
if (draft.displayerMode !== Constants_1.DISPLAYER_MODE.DM_2D) {
|
|
129
110
|
draft.zoom = preferences.zoom;
|
|
130
111
|
}
|
|
131
112
|
}
|
|
@@ -44,15 +44,15 @@ const CorrelationsActions_1 = require("./CorrelationsActions");
|
|
|
44
44
|
const DomainActions_1 = require("./DomainActions");
|
|
45
45
|
const ToolsActions_1 = require("./ToolsActions");
|
|
46
46
|
function handleAutoRangesDetection(draft, options) {
|
|
47
|
-
const { data, xDomain, molecules, view: { spectra: { activeTab: nucleus }, }, } = draft;
|
|
47
|
+
const { data, xDomain, molecules, view: { spectra: { activeTab: nucleus }, ranges, }, } = draft;
|
|
48
48
|
const activeSpectrum = (0, getActiveSpectrum_1.getActiveSpectrum)(draft);
|
|
49
49
|
if (activeSpectrum?.id) {
|
|
50
50
|
const { index, id } = activeSpectrum;
|
|
51
51
|
const datum = data[index];
|
|
52
52
|
// add range intial state
|
|
53
|
-
const range =
|
|
53
|
+
const range = ranges.find((r) => r.spectrumID === id);
|
|
54
54
|
if (!range) {
|
|
55
|
-
|
|
55
|
+
ranges.push({
|
|
56
56
|
spectrumID: id,
|
|
57
57
|
...Reducer_1.rangeStateInit,
|
|
58
58
|
});
|
|
@@ -270,20 +270,20 @@ exports.handleChangeRangeSum = handleChangeRangeSum;
|
|
|
270
270
|
function addNewRange(draft, props) {
|
|
271
271
|
const { startX, endX, id } = props;
|
|
272
272
|
const range = (0, getRange_1.default)(draft, { startX, endX });
|
|
273
|
-
const { view: { spectra: { activeTab: nucleus }, }, molecules, } = draft;
|
|
273
|
+
const { data, view: { spectra: { activeTab: nucleus }, ranges, }, molecules, } = draft;
|
|
274
274
|
const activeSpectrum = (0, getActiveSpectrum_1.getActiveSpectrum)(draft);
|
|
275
275
|
if (activeSpectrum?.id) {
|
|
276
276
|
const { index } = activeSpectrum;
|
|
277
277
|
const [from, to] = range;
|
|
278
278
|
// add range intial state
|
|
279
|
-
const rangeState =
|
|
279
|
+
const rangeState = ranges.find((r) => r.spectrumID === activeSpectrum.id);
|
|
280
280
|
if (!rangeState) {
|
|
281
|
-
|
|
281
|
+
ranges.push({
|
|
282
282
|
spectrumID: activeSpectrum.id,
|
|
283
283
|
...Reducer_1.rangeStateInit,
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
-
(0, Spectrum1D_1.addRange)(
|
|
286
|
+
(0, Spectrum1D_1.addRange)(data[index], {
|
|
287
287
|
from,
|
|
288
288
|
to,
|
|
289
289
|
id,
|
|
@@ -291,7 +291,7 @@ function addNewRange(draft, props) {
|
|
|
291
291
|
molecules,
|
|
292
292
|
});
|
|
293
293
|
handleOnChangeRangesData(draft);
|
|
294
|
-
(0, DomainActions_1.setIntegralsYDomain)(draft,
|
|
294
|
+
(0, DomainActions_1.setIntegralsYDomain)(draft, data[index]);
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
function handleAddRange(draft, action) {
|
|
@@ -309,16 +309,18 @@ function handleAddRange(draft, action) {
|
|
|
309
309
|
exports.handleAddRange = handleAddRange;
|
|
310
310
|
function handleChangeRangeRelativeValue(draft, action) {
|
|
311
311
|
const data = action.payload.data;
|
|
312
|
-
|
|
313
|
-
|
|
312
|
+
const activeSpectrum = (0, getActiveSpectrum_1.getActiveSpectrum)(draft);
|
|
313
|
+
if (activeSpectrum?.id) {
|
|
314
|
+
const { index } = activeSpectrum;
|
|
314
315
|
(0, Spectrum1D_1.changeRangeRelativeValue)(draft.data[index], data);
|
|
315
316
|
}
|
|
316
317
|
}
|
|
317
318
|
exports.handleChangeRangeRelativeValue = handleChangeRangeRelativeValue;
|
|
318
319
|
function handleChangeRangeSignalValue(draft, action) {
|
|
319
320
|
const { rangeID, signalID, value } = action.payload;
|
|
320
|
-
|
|
321
|
-
|
|
321
|
+
const activeSpectrum = (0, getActiveSpectrum_1.getActiveSpectrum)(draft);
|
|
322
|
+
if (activeSpectrum?.id) {
|
|
323
|
+
const { index } = activeSpectrum;
|
|
322
324
|
const shift = (0, Spectrum1D_1.changeRangeSignal)(draft.data[index], {
|
|
323
325
|
rangeID,
|
|
324
326
|
signalID,
|
|
@@ -32,6 +32,7 @@ const Filters = __importStar(require("../../../data/Filters"));
|
|
|
32
32
|
const FiltersManager_1 = require("../../../data/FiltersManager");
|
|
33
33
|
const Spectrum1D_1 = require("../../../data/data1d/Spectrum1D");
|
|
34
34
|
const Spectrum2D_1 = require("../../../data/data2d/Spectrum2D");
|
|
35
|
+
const contours_1 = require("../../../data/data2d/Spectrum2D/contours");
|
|
35
36
|
const ToolTypes_1 = require("../../toolbar/ToolTypes");
|
|
36
37
|
const GroupByInfoKey_1 = __importDefault(require("../../utility/GroupByInfoKey"));
|
|
37
38
|
const Zoom1DManager_1 = require("../helper/Zoom1DManager");
|
|
@@ -147,10 +148,15 @@ function handleChangeActiveSpectrum(draft, activeSpectrum) {
|
|
|
147
148
|
}
|
|
148
149
|
exports.handleChangeActiveSpectrum = handleChangeActiveSpectrum;
|
|
149
150
|
function changeSpectrumSetting(draft, { id, display }) {
|
|
150
|
-
const
|
|
151
|
-
const index = state.data.findIndex((d) => d.id === id);
|
|
151
|
+
const index = draft.data.findIndex((d) => d.id === id);
|
|
152
152
|
if (index !== -1) {
|
|
153
|
-
draft.data[index]
|
|
153
|
+
const spectrum = draft.data[index];
|
|
154
|
+
spectrum.display = display;
|
|
155
|
+
if ((0, Spectrum2D_1.isSpectrum2D)(spectrum)) {
|
|
156
|
+
const contoursLevels = draft.view.zoom.levels;
|
|
157
|
+
const { checkLevel } = (0, contours_1.contoursManager)(spectrum.id, contoursLevels, spectrum.display.contourOptions);
|
|
158
|
+
contoursLevels[spectrum.id] = checkLevel();
|
|
159
|
+
}
|
|
154
160
|
}
|
|
155
161
|
}
|
|
156
162
|
exports.changeSpectrumSetting = changeSpectrumSetting;
|
|
@@ -7,6 +7,7 @@ exports.resetSpectraScale = exports.setSpectraSameTopHandler = exports.setTab =
|
|
|
7
7
|
const uuid_1 = require("@lukeed/uuid");
|
|
8
8
|
const immer_1 = require("immer");
|
|
9
9
|
const ml_spectra_processing_1 = require("ml-spectra-processing");
|
|
10
|
+
const contours_1 = require("../../../data/data2d/Spectrum2D/contours");
|
|
10
11
|
const scale_1 = require("../../1d/utilities/scale");
|
|
11
12
|
const DimensionLayout_1 = require("../../2d/utilities/DimensionLayout");
|
|
12
13
|
const scale_2 = require("../../2d/utilities/scale");
|
|
@@ -18,6 +19,7 @@ const Zoom1DManager_1 = require("../helper/Zoom1DManager");
|
|
|
18
19
|
const ZoomHistoryManager_1 = __importDefault(require("../helper/ZoomHistoryManager"));
|
|
19
20
|
const getActiveSpectrum_1 = require("../helper/getActiveSpectrum");
|
|
20
21
|
const getActiveSpectrumOrFail_1 = require("../helper/getActiveSpectrumOrFail");
|
|
22
|
+
const getSpectrum_1 = require("../helper/getSpectrum");
|
|
21
23
|
const DomainActions_1 = require("./DomainActions");
|
|
22
24
|
const FiltersActions_1 = require("./FiltersActions");
|
|
23
25
|
const PreferencesActions_1 = require("./PreferencesActions");
|
|
@@ -190,7 +192,7 @@ function getSpectrumID(draft, index) {
|
|
|
190
192
|
}
|
|
191
193
|
function handleZoom(draft, action) {
|
|
192
194
|
const { event, trackID, selectedTool } = action;
|
|
193
|
-
const { view: { ranges: rangeState }, displayerMode, } = draft;
|
|
195
|
+
const { view: { ranges: rangeState }, displayerMode, yDomains, integralsYDomains, } = draft;
|
|
194
196
|
const activeSpectrum = (0, getActiveSpectrum_1.getActiveSpectrum)(draft);
|
|
195
197
|
const { showRangesIntegrals } = rangeState.find((r) => r.spectrumID === activeSpectrum?.id) ||
|
|
196
198
|
Reducer_1.rangeStateInit;
|
|
@@ -199,26 +201,26 @@ function handleZoom(draft, action) {
|
|
|
199
201
|
if (index !== null) {
|
|
200
202
|
const id = getSpectrumID(draft, index);
|
|
201
203
|
if (id) {
|
|
202
|
-
const domain =
|
|
203
|
-
|
|
204
|
+
const domain = yDomains[id];
|
|
205
|
+
yDomains[id] = (0, Zoom1DManager_1.wheelZoom)(event, domain);
|
|
204
206
|
}
|
|
205
207
|
}
|
|
206
208
|
}
|
|
207
209
|
else if (activeSpectrum?.id) {
|
|
208
210
|
if ((showRangesIntegrals || selectedTool === ToolTypes_1.options.integral.id) &&
|
|
209
211
|
event.shiftKey) {
|
|
210
|
-
const domain =
|
|
211
|
-
|
|
212
|
+
const domain = integralsYDomains[activeSpectrum?.id];
|
|
213
|
+
integralsYDomains[activeSpectrum?.id] = (0, Zoom1DManager_1.wheelZoom)(event, domain);
|
|
212
214
|
}
|
|
213
215
|
else {
|
|
214
|
-
const domain =
|
|
215
|
-
|
|
216
|
+
const domain = yDomains[activeSpectrum?.id];
|
|
217
|
+
yDomains[activeSpectrum?.id] = (0, Zoom1DManager_1.wheelZoom)(event, domain);
|
|
216
218
|
}
|
|
217
219
|
}
|
|
218
220
|
else {
|
|
219
|
-
for (const key of Object.keys(
|
|
220
|
-
const domain =
|
|
221
|
-
|
|
221
|
+
for (const key of Object.keys(yDomains)) {
|
|
222
|
+
const domain = yDomains[key];
|
|
223
|
+
yDomains[key] = (0, Zoom1DManager_1.wheelZoom)(event, domain);
|
|
222
224
|
}
|
|
223
225
|
}
|
|
224
226
|
}
|
|
@@ -293,15 +295,6 @@ function setMargin(draft) {
|
|
|
293
295
|
draft.margin = Constants_1.MARGIN['1D'];
|
|
294
296
|
}
|
|
295
297
|
}
|
|
296
|
-
function processing2DData(draft, data) {
|
|
297
|
-
if (draft.displayerMode === Constants_1.DISPLAYER_MODE.DM_2D) {
|
|
298
|
-
let _data = {};
|
|
299
|
-
for (const datum of data[draft.view.spectra.activeTab]) {
|
|
300
|
-
_data[datum.id] = datum.processingController.drawContours();
|
|
301
|
-
}
|
|
302
|
-
draft.contours = _data;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
298
|
function setDisplayerMode(draft, data) {
|
|
306
299
|
draft.displayerMode =
|
|
307
300
|
data && data.some((d) => d.info.dimension === 2)
|
|
@@ -373,7 +366,6 @@ function setActiveTab(draft, options) {
|
|
|
373
366
|
const currentTab = !tab || !tabs.includes(tab || '') ? tabs[0] : tab;
|
|
374
367
|
setTab(draft, dataGroupByNucleus, currentTab, refreshActiveTab);
|
|
375
368
|
resetTool(draft);
|
|
376
|
-
processing2DData(draft, dataGroupByNucleus);
|
|
377
369
|
(0, DomainActions_1.setDomain)(draft, domainOptions);
|
|
378
370
|
(0, DomainActions_1.setIntegralsYDomain)(draft, dataGroupByNucleus[currentTab]);
|
|
379
371
|
const zoomHistory = (0, ZoomHistoryManager_1.default)(draft.zoom.history, draft.view.spectra.activeTab);
|
|
@@ -392,25 +384,18 @@ function handelSetActiveTab(draft, tab) {
|
|
|
392
384
|
}
|
|
393
385
|
exports.handelSetActiveTab = handelSetActiveTab;
|
|
394
386
|
function levelChangeHandler(draft, { deltaY, shiftKey }) {
|
|
395
|
-
const activeSpectrum = (0,
|
|
387
|
+
const activeSpectrum = (0, getSpectrum_1.getSpectrum)(draft);
|
|
396
388
|
try {
|
|
397
389
|
if (activeSpectrum?.id) {
|
|
398
|
-
const {
|
|
399
|
-
const
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
processingController.shiftWheel(deltaY);
|
|
403
|
-
}
|
|
404
|
-
else {
|
|
405
|
-
processingController.wheel(deltaY);
|
|
406
|
-
}
|
|
407
|
-
const contours = Object.freeze(processingController.drawContours());
|
|
408
|
-
draft.contours[id] = contours;
|
|
390
|
+
const { levels } = draft.view.zoom;
|
|
391
|
+
const contourOptions = activeSpectrum.display.contourOptions;
|
|
392
|
+
const zoom = (0, contours_1.contoursManager)(activeSpectrum.id, levels, contourOptions);
|
|
393
|
+
levels[activeSpectrum.id] = zoom.wheel(deltaY, shiftKey);
|
|
409
394
|
}
|
|
410
395
|
}
|
|
411
|
-
catch (
|
|
412
|
-
//
|
|
413
|
-
|
|
396
|
+
catch (error) {
|
|
397
|
+
// TODO: handle error.
|
|
398
|
+
reportError(error);
|
|
414
399
|
}
|
|
415
400
|
}
|
|
416
401
|
exports.levelChangeHandler = levelChangeHandler;
|