nmrium 0.26.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/component/1d/Chart1D.js +3 -2
- package/lib/component/1d/FooterBanner.js +1 -1
- package/lib/component/1d/Integral.d.ts +2 -1
- package/lib/component/1d/Integral.js +5 -12
- package/lib/component/1d/IntegralResizable.d.ts +2 -1
- package/lib/component/1d/IntegralResizable.js +10 -5
- package/lib/component/1d/IntegralsSeries.js +3 -3
- package/lib/component/1d/Line.d.ts +2 -2
- package/lib/component/1d/PeakAnnotation.js +5 -4
- package/lib/component/1d/database/DatabaseElements.d.ts +3 -0
- package/lib/component/1d/database/DatabaseElements.js +18 -0
- package/lib/component/1d/database/DatabaseSpectrum.d.ts +3 -0
- package/lib/component/1d/database/DatabaseSpectrum.js +58 -0
- package/lib/component/1d/{ResurrectedDatabaseRanges.d.ts → database/ResurrectedDatabaseRanges.d.ts} +0 -0
- package/lib/component/1d/{ResurrectedDatabaseRanges.js → database/ResurrectedDatabaseRanges.js} +9 -6
- package/lib/component/1d/jCouplingGraph/JGraph.js +4 -10
- package/lib/component/1d/multiAnalysis/AnalysisRange.js +10 -5
- package/lib/component/1d/ranges/Range.d.ts +2 -1
- package/lib/component/1d/ranges/Range.js +17 -9
- package/lib/component/1d/ranges/Ranges.js +6 -3
- package/lib/component/1d/tool/XLabelPointer.js +1 -1
- package/lib/component/2d/Chart2D.js +2 -1
- package/lib/component/2d/Contours.js +4 -1
- package/lib/component/2d/FooterBanner.js +1 -1
- package/lib/component/2d/tools/XYLabelPointer.js +1 -1
- package/lib/component/2d/tools/slicing/HorizontalSliceChart.d.ts +2 -2
- package/lib/component/2d/tools/slicing/SliceScale.d.ts +1 -1
- package/lib/component/2d/tools/slicing/VerticalSliceChart.d.ts +2 -2
- package/lib/component/EventsTrackers/KeysListenerTracker.js +10 -4
- package/lib/component/NMRium.d.ts +5 -1
- package/lib/component/NMRium.js +6 -3
- package/lib/component/SplitPaneWrapper.d.ts +4 -0
- package/lib/component/SplitPaneWrapper.js +8 -0
- package/lib/component/context/GlobalContext.d.ts +3 -0
- package/lib/component/context/GlobalContext.js +1 -1
- package/lib/component/context/PreferencesContext.d.ts +15 -12
- package/lib/component/context/PreferencesContext.js +1 -1
- package/lib/component/elements/Button.js +1 -1
- package/lib/component/elements/ColorInput.js +2 -2
- package/lib/component/elements/ContextMenu.d.ts +8 -3
- package/lib/component/elements/EditableColumn.d.ts +3 -2
- package/lib/component/elements/EditableColumn.js +27 -20
- package/lib/component/elements/Input.d.ts +9 -1
- package/lib/component/elements/Input.js +18 -5
- package/lib/component/elements/Select.d.ts +1 -0
- package/lib/component/elements/Select.js +21 -15
- package/lib/component/elements/ToggleButton.d.ts +2 -1
- package/lib/component/elements/ToggleButton.js +2 -2
- package/lib/component/elements/draggble/SVGDraggable.d.ts +17 -0
- package/lib/component/elements/draggble/SVGDraggable.js +33 -0
- package/lib/component/elements/{resizer → draggble}/useDraggable.d.ts +9 -6
- package/lib/component/elements/draggble/useDraggable.js +70 -0
- package/lib/component/elements/formik/FormikColorPicker.d.ts +1 -0
- package/lib/component/elements/formik/FormikColorPicker.js +10 -7
- package/lib/component/elements/formik/FormikColumnFormatField.d.ts +5 -4
- package/lib/component/elements/formik/FormikColumnFormatField.js +2 -2
- package/lib/component/elements/formik/FormikInput.d.ts +1 -0
- package/lib/component/elements/formik/FormikInput.js +6 -3
- package/lib/component/elements/formik/FormikSlider.d.ts +1 -0
- package/lib/component/elements/formik/FormikSlider.js +6 -3
- package/lib/component/elements/popup/Alert/Provider.js +1 -1
- package/lib/component/elements/resizer/DivResizer.js +17 -62
- package/lib/component/elements/resizer/Resizer.d.ts +3 -1
- package/lib/component/elements/resizer/SVGResizer.js +24 -53
- package/lib/component/elements/resizer/useResizer.d.ts +11 -0
- package/lib/component/elements/resizer/useResizer.js +65 -0
- package/lib/component/hooks/useExport.d.ts +1 -1
- package/lib/component/hooks/useFormatNumberByNucleus.d.ts +3 -0
- package/lib/component/{utility/FormatNumber.js → hooks/useFormatNumberByNucleus.js} +0 -9
- package/lib/component/hooks/usePanelPreferences.d.ts +7 -0
- package/lib/component/hooks/usePanelPreferences.js +54 -0
- package/lib/component/hooks/useXYReduce.d.ts +2 -2
- package/lib/component/loader/DefaultSpinnerComponent.d.ts +3 -1
- package/lib/component/loader/DefaultSpinnerComponent.js +2 -2
- package/lib/component/loader/SpinnerContext.d.ts +3 -3
- package/lib/component/loader/SpinnerContext.js +2 -2
- package/lib/component/modal/MoleculeStructureEditorModal.d.ts +3 -4
- package/lib/component/modal/MoleculeStructureEditorModal.js +22 -1
- package/lib/component/modal/editRange/EditRangeModal.js +6 -5
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.d.ts +2 -0
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +3 -6
- package/lib/component/modal/editRange/forms/components/SignalsForm.d.ts +3 -1
- package/lib/component/modal/editRange/forms/components/SignalsForm.js +12 -9
- package/lib/component/modal/setting/DatabasesTabContent.d.ts +6 -0
- package/lib/component/modal/setting/DatabasesTabContent.js +75 -0
- package/lib/component/modal/setting/DisplayTabContent.js +11 -7
- package/lib/component/modal/setting/FormattingTabContent.js +5 -5
- package/lib/component/modal/setting/GeneralSettings.js +2 -1
- package/lib/component/modal/setting/settingsValidation.d.ts +48 -0
- package/lib/component/modal/setting/settingsValidation.js +33 -27
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +10 -5
- package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts +0 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +2 -5
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +2 -2
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +10 -11
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +26 -74
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.d.ts +8 -0
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +38 -0
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +12 -23
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +10 -2
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +12 -1
- package/lib/component/panels/MoleculesPanel/Utilities.js +11 -0
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +1 -1
- package/lib/component/panels/Panels.js +2 -3
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +3 -3
- package/lib/component/panels/PeaksPanel/PeaksPreferences.d.ts +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPreferences.js +29 -82
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts +1 -5
- package/lib/component/panels/PeaksPanel/PeaksTable.js +18 -25
- package/lib/component/panels/RangesPanel/RangesHeader.d.ts +2 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +15 -9
- package/lib/component/panels/RangesPanel/RangesPanel.js +4 -10
- package/lib/component/panels/RangesPanel/RangesPreferences.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesPreferences.js +55 -66
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +11 -6
- package/lib/component/panels/RangesPanel/RangesTable.js +3 -7
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +5 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.js +3 -3
- package/lib/component/panels/RangesPanel/TableColumns/AbsoluteColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.d.ts +2 -1
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/CouplingColumn.d.ts +2 -1
- package/lib/component/panels/RangesPanel/TableColumns/CouplingColumn.js +5 -2
- package/lib/component/panels/RangesPanel/TableColumns/RangeColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.d.ts +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +3 -4
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.d.ts +13 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js +14 -0
- package/lib/component/panels/RangesPanel/TableColumns/format.js +2 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/PlotChart.d.ts +18 -0
- package/lib/component/panels/SpectrumsPanel/base/setting/PlotChart.js +18 -0
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.d.ts +1 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.js +7 -68
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +1 -8
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.d.ts +1 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.js +7 -68
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +8 -21
- package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +2 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.d.ts +6 -0
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +51 -0
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.d.ts +5 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +3 -2
- package/lib/component/panels/ZonesPanel/ZonesPreferences.d.ts +1 -1
- package/lib/component/panels/ZonesPanel/ZonesPreferences.js +20 -84
- package/lib/component/panels/ZonesPanel/ZonesTable.js +4 -1
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +5 -1
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js +2 -2
- package/lib/component/panels/databasePanel/DatabasePanel.js +73 -40
- package/lib/component/panels/databasePanel/DatabasePreferences.js +10 -42
- package/lib/component/panels/databasePanel/DatabaseTable.js +23 -11
- package/lib/component/panels/databasePanel/useDatabases.d.ts +5 -0
- package/lib/component/panels/databasePanel/useDatabases.js +10 -0
- package/lib/component/panels/extra/placeholder/NoTableData.d.ts +3 -1
- package/lib/component/panels/extra/placeholder/NoTableData.js +2 -2
- package/lib/component/panels/extra/preferences/ColumnsHelper.js +3 -3
- package/lib/component/panels/extra/preferences/NucleusPreferences.d.ts +13 -0
- package/lib/component/panels/extra/preferences/NucleusPreferences.js +22 -0
- package/lib/component/panels/extra/preferences/PreferencesContainer.d.ts +6 -0
- package/lib/component/panels/extra/preferences/PreferencesContainer.js +10 -0
- package/lib/component/panels/extra/preferences/PreferencesGroup.d.ts +7 -0
- package/lib/component/panels/extra/preferences/PreferencesGroup.js +21 -0
- package/lib/component/reducer/Reducer.d.ts +358 -45
- package/lib/component/reducer/Reducer.js +5 -1
- package/lib/component/reducer/actions/LoadActions.js +2 -2
- package/lib/component/reducer/actions/MoleculeActions.d.ts +4 -2
- package/lib/component/reducer/actions/MoleculeActions.js +15 -3
- package/lib/component/reducer/actions/PreferencesActions.js +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +1 -1
- package/lib/component/reducer/preferences/actions/addWorkspace.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/addWorkspace.js +19 -0
- package/lib/component/reducer/preferences/actions/initPreferences.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/initPreferences.js +60 -0
- package/lib/component/reducer/preferences/actions/removeWorkspace.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/removeWorkspace.js +20 -0
- package/lib/component/reducer/preferences/actions/resetPreferences.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/resetPreferences.js +14 -0
- package/lib/component/reducer/preferences/actions/setPanelsPreferences.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/setPanelsPreferences.js +13 -0
- package/lib/component/reducer/preferences/actions/setPreferences.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/setPreferences.js +34 -0
- package/lib/component/reducer/preferences/actions/setWorkspace.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/setWorkspace.js +8 -0
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts +7 -0
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +55 -0
- package/lib/component/reducer/{preferencesReducer.d.ts → preferences/preferencesReducer.d.ts} +131 -7
- package/lib/component/reducer/preferences/preferencesReducer.js +80 -0
- package/lib/component/reducer/preferences/utilites/checkKeysExists.d.ts +1 -0
- package/lib/component/reducer/preferences/utilites/checkKeysExists.js +14 -0
- package/lib/component/reducer/preferences/utilites/filterObject.d.ts +1 -0
- package/lib/component/reducer/preferences/utilites/filterObject.js +7 -0
- package/lib/component/reducer/preferences/utilites/flatObject.d.ts +1 -0
- package/lib/component/reducer/preferences/utilites/flatObject.js +9 -0
- package/lib/component/reducer/preferences/utilites/getActiveWorkspace.d.ts +3 -0
- package/lib/component/reducer/preferences/utilites/getActiveWorkspace.js +3 -0
- package/lib/component/reducer/preferences/utilites/getPreferencesByWorkspace.d.ts +2 -0
- package/lib/component/reducer/preferences/utilites/getPreferencesByWorkspace.js +4 -0
- package/lib/component/reducer/preferences/utilites/mapNucleiFormatting.d.ts +5 -0
- package/lib/component/reducer/preferences/utilites/mapNucleiFormatting.js +8 -0
- package/lib/component/reducer/types/Types.d.ts +2 -0
- package/lib/component/reducer/types/Types.js +2 -0
- package/lib/component/tool/FloatMoleculeStructures/ActionsButton.d.ts +4 -0
- package/lib/component/tool/FloatMoleculeStructures/ActionsButton.js +7 -0
- package/lib/component/tool/FloatMoleculeStructures/DraggableStructure.d.ts +14 -0
- package/lib/component/tool/FloatMoleculeStructures/DraggableStructure.js +43 -0
- package/lib/component/tool/FloatMoleculeStructures/index.d.ts +15 -0
- package/lib/component/tool/FloatMoleculeStructures/index.js +28 -0
- package/lib/component/utility/Export.js +6 -0
- package/lib/component/utility/PathBuilder.js +2 -1
- package/lib/component/utility/formatNumber.d.ts +3 -0
- package/lib/component/utility/formatNumber.js +10 -0
- package/lib/component/utility/getUniqueNuclei.d.ts +1 -0
- package/lib/component/utility/getUniqueNuclei.js +10 -0
- package/lib/component/workspaces/Workspace.d.ts +72 -1
- package/lib/component/workspaces/basic.js +9 -1
- package/lib/component/workspaces/embedded.d.ts +2 -0
- package/lib/component/workspaces/embedded.js +32 -0
- package/lib/component/workspaces/exercise.js +2 -0
- package/lib/component/workspaces/index.d.ts +1 -0
- package/lib/component/workspaces/index.js +2 -1
- package/lib/component/workspaces/prediction.js +2 -0
- package/lib/component/workspaces/process1D.js +2 -0
- package/lib/data/data1d/Data1DManager.js +4 -0
- package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.d.ts +2 -0
- package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.js +10 -0
- package/lib/data/data1d/Spectrum1D/get1DDataXY.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +2 -1
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +2 -1
- package/lib/data/data1d/database.d.ts +8 -13
- package/lib/data/data1d/database.js +14 -19
- package/lib/data/data1d/filter1d/absolute.d.ts +3 -2
- package/lib/data/data1d/filter1d/autoPhaseCorrection.d.ts +3 -2
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +3 -2
- package/lib/data/data1d/filter1d/centerMean.d.ts +3 -2
- package/lib/data/data1d/filter1d/digitalFilter.d.ts +3 -2
- package/lib/data/data1d/filter1d/equallySpaced.d.ts +3 -2
- package/lib/data/data1d/filter1d/exclusionZones.js +4 -4
- package/lib/data/data1d/filter1d/fft.d.ts +3 -2
- package/lib/data/data1d/filter1d/fft.js +2 -2
- package/lib/data/data1d/filter1d/fromTo.d.ts +3 -2
- package/lib/data/data1d/filter1d/lineBroadening.d.ts +3 -2
- package/lib/data/data1d/filter1d/lineBroadening.js +1 -1
- package/lib/data/data1d/filter1d/pareto.d.ts +3 -2
- package/lib/data/data1d/filter1d/pareto.js +2 -2
- package/lib/data/data1d/filter1d/phaseCorrection.d.ts +3 -2
- package/lib/data/data1d/filter1d/shiftX.d.ts +2 -1
- package/lib/data/data1d/filter1d/standardDeviation.d.ts +3 -2
- package/lib/data/data1d/filter1d/zeroFilling.d.ts +3 -2
- package/lib/data/data1d/filter1d/zeroFilling.js +1 -1
- package/lib/data/data2d/Data2DManager.js +4 -0
- package/lib/data/data2d/filter2d/shiftX.d.ts +4 -3
- package/lib/data/data2d/filter2d/shiftX.js +2 -2
- package/lib/data/data2d/filter2d/shiftY.d.ts +4 -3
- package/lib/data/data2d/filter2d/shiftY.js +2 -2
- package/lib/data/molecules/Molecule.d.ts +3 -3
- package/lib/data/molecules/Molecule.js +7 -1
- package/lib/data/molecules/MoleculeManager.d.ts +4 -1
- package/lib/data/molecules/MoleculeManager.js +33 -2
- package/lib/data/types/data1d/Data1D.d.ts +3 -3
- package/lib/data/types/data1d/Info1D.d.ts +1 -0
- package/lib/data/types/data2d/Signal2DAxisData.d.ts +1 -1
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/Chart1D.js +3 -2
- package/lib-cjs/component/1d/FooterBanner.js +2 -2
- package/lib-cjs/component/1d/Integral.js +5 -12
- package/lib-cjs/component/1d/IntegralResizable.js +10 -5
- package/lib-cjs/component/1d/IntegralsSeries.js +3 -3
- package/lib-cjs/component/1d/PeakAnnotation.js +5 -4
- package/lib-cjs/component/1d/database/DatabaseElements.js +23 -0
- package/lib-cjs/component/1d/database/DatabaseSpectrum.js +60 -0
- package/lib-cjs/component/1d/{ResurrectedDatabaseRanges.js → database/ResurrectedDatabaseRanges.js} +9 -6
- package/lib-cjs/component/1d/jCouplingGraph/JGraph.js +4 -10
- package/lib-cjs/component/1d/multiAnalysis/AnalysisRange.js +10 -5
- package/lib-cjs/component/1d/ranges/Range.js +17 -9
- package/lib-cjs/component/1d/ranges/Ranges.js +6 -3
- package/lib-cjs/component/1d/tool/XLabelPointer.js +2 -2
- package/lib-cjs/component/2d/Chart2D.js +2 -1
- package/lib-cjs/component/2d/Contours.js +4 -1
- package/lib-cjs/component/2d/FooterBanner.js +2 -2
- package/lib-cjs/component/2d/tools/XYLabelPointer.js +2 -2
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +10 -4
- package/lib-cjs/component/NMRium.js +5 -2
- package/lib-cjs/component/SplitPaneWrapper.js +12 -0
- package/lib-cjs/component/context/GlobalContext.js +1 -1
- package/lib-cjs/component/context/PreferencesContext.js +1 -1
- package/lib-cjs/component/elements/Button.js +1 -1
- package/lib-cjs/component/elements/ColorInput.js +2 -2
- package/lib-cjs/component/elements/EditableColumn.js +27 -20
- package/lib-cjs/component/elements/Input.js +18 -5
- package/lib-cjs/component/elements/Select.js +20 -14
- package/lib-cjs/component/elements/ToggleButton.js +2 -2
- package/lib-cjs/component/elements/draggble/SVGDraggable.js +39 -0
- package/lib-cjs/component/elements/draggble/useDraggable.js +73 -0
- package/lib-cjs/component/elements/formik/FormikColorPicker.js +10 -7
- package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +2 -2
- package/lib-cjs/component/elements/formik/FormikInput.js +6 -3
- package/lib-cjs/component/elements/formik/FormikSlider.js +6 -3
- package/lib-cjs/component/elements/popup/Alert/Provider.js +1 -1
- package/lib-cjs/component/elements/resizer/DivResizer.js +17 -62
- package/lib-cjs/component/elements/resizer/SVGResizer.js +24 -53
- package/lib-cjs/component/elements/resizer/useResizer.js +71 -0
- package/lib-cjs/component/{utility/FormatNumber.js → hooks/useFormatNumberByNucleus.js} +1 -11
- package/lib-cjs/component/hooks/usePanelPreferences.js +62 -0
- package/lib-cjs/component/loader/DefaultSpinnerComponent.js +2 -2
- package/lib-cjs/component/loader/SpinnerContext.js +2 -2
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +24 -1
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +6 -5
- package/lib-cjs/component/modal/editRange/forms/components/AddSignalFormTab.js +3 -6
- package/lib-cjs/component/modal/editRange/forms/components/SignalsForm.js +12 -9
- package/lib-cjs/component/modal/setting/DatabasesTabContent.js +80 -0
- package/lib-cjs/component/modal/setting/DisplayTabContent.js +11 -7
- package/lib-cjs/component/modal/setting/FormattingTabContent.js +4 -4
- package/lib-cjs/component/modal/setting/GeneralSettings.js +2 -1
- package/lib-cjs/component/modal/setting/settingsValidation.js +33 -27
- package/lib-cjs/component/panels/AutomaticAssignment/useAutoAssignments.js +10 -5
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +2 -5
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +10 -11
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +24 -72
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +44 -0
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +12 -23
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +9 -1
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +11 -0
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +2 -2
- package/lib-cjs/component/panels/Panels.js +2 -3
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +4 -4
- package/lib-cjs/component/panels/PeaksPanel/PeaksPreferences.js +27 -80
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +18 -48
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +15 -9
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +4 -10
- package/lib-cjs/component/panels/RangesPanel/RangesPreferences.js +53 -64
- package/lib-cjs/component/panels/RangesPanel/RangesTable.js +3 -7
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +3 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/AbsoluteColumn.js +2 -5
- package/lib-cjs/component/panels/RangesPanel/TableColumns/ActionsColumn.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/TableColumns/CouplingColumn.js +5 -2
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeColumn.js +2 -5
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +3 -4
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js +16 -0
- package/lib-cjs/component/panels/RangesPanel/TableColumns/format.js +2 -2
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/PlotChart.js +21 -0
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.js +10 -68
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +1 -8
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.js +10 -68
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +8 -21
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +2 -2
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +55 -0
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +3 -2
- package/lib-cjs/component/panels/ZonesPanel/ZonesPreferences.js +18 -82
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +4 -1
- package/lib-cjs/component/panels/ZonesPanel/ZonesTableRow.js +2 -2
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +72 -39
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +10 -42
- package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +22 -10
- package/lib-cjs/component/panels/databasePanel/useDatabases.js +14 -0
- package/lib-cjs/component/panels/extra/placeholder/NoTableData.js +2 -2
- package/lib-cjs/component/panels/extra/preferences/ColumnsHelper.js +3 -3
- package/lib-cjs/component/panels/extra/preferences/NucleusPreferences.js +29 -0
- package/lib-cjs/component/panels/extra/preferences/PreferencesContainer.js +14 -0
- package/lib-cjs/component/panels/extra/preferences/PreferencesGroup.js +25 -0
- package/lib-cjs/component/reducer/Reducer.js +5 -1
- package/lib-cjs/component/reducer/actions/LoadActions.js +2 -2
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +17 -3
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +1 -1
- package/lib-cjs/component/reducer/actions/ToolsActions.js +1 -1
- package/lib-cjs/component/reducer/preferences/actions/addWorkspace.js +26 -0
- package/lib-cjs/component/reducer/preferences/actions/initPreferences.js +67 -0
- package/lib-cjs/component/reducer/preferences/actions/removeWorkspace.js +24 -0
- package/lib-cjs/component/reducer/preferences/actions/resetPreferences.js +18 -0
- package/lib-cjs/component/reducer/preferences/actions/setPanelsPreferences.js +17 -0
- package/lib-cjs/component/reducer/preferences/actions/setPreferences.js +38 -0
- package/lib-cjs/component/reducer/preferences/actions/setWorkspace.js +12 -0
- package/lib-cjs/component/reducer/preferences/panelsPreferencesDefaultValues.js +62 -0
- package/lib-cjs/component/reducer/preferences/preferencesReducer.js +87 -0
- package/lib-cjs/component/reducer/preferences/utilites/checkKeysExists.js +18 -0
- package/lib-cjs/component/reducer/preferences/utilites/filterObject.js +11 -0
- package/lib-cjs/component/reducer/preferences/utilites/flatObject.js +13 -0
- package/lib-cjs/component/reducer/preferences/utilites/getActiveWorkspace.js +7 -0
- package/lib-cjs/component/reducer/preferences/utilites/getPreferencesByWorkspace.js +11 -0
- package/lib-cjs/component/reducer/preferences/utilites/mapNucleiFormatting.js +12 -0
- package/lib-cjs/component/reducer/types/Types.js +5 -3
- package/lib-cjs/component/tool/FloatMoleculeStructures/ActionsButton.js +13 -0
- package/lib-cjs/component/tool/FloatMoleculeStructures/DraggableStructure.js +50 -0
- package/lib-cjs/component/tool/FloatMoleculeStructures/index.js +36 -0
- package/lib-cjs/component/utility/Export.js +6 -0
- package/lib-cjs/component/utility/PathBuilder.js +2 -1
- package/lib-cjs/component/utility/formatNumber.js +17 -0
- package/lib-cjs/component/utility/getUniqueNuclei.js +14 -0
- package/lib-cjs/component/workspaces/basic.js +9 -1
- package/lib-cjs/component/workspaces/embedded.js +35 -0
- package/lib-cjs/component/workspaces/exercise.js +2 -0
- package/lib-cjs/component/workspaces/index.js +2 -1
- package/lib-cjs/component/workspaces/prediction.js +2 -0
- package/lib-cjs/component/workspaces/process1D.js +2 -0
- package/lib-cjs/data/data1d/Data1DManager.js +4 -0
- package/lib-cjs/data/data1d/Spectrum1D/convertDataToFloat64Array.js +14 -0
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +2 -1
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +2 -1
- package/lib-cjs/data/data1d/database.js +15 -21
- package/lib-cjs/data/data1d/filter1d/exclusionZones.js +4 -4
- package/lib-cjs/data/data1d/filter1d/fft.js +2 -2
- package/lib-cjs/data/data1d/filter1d/lineBroadening.js +1 -1
- package/lib-cjs/data/data1d/filter1d/pareto.js +2 -2
- package/lib-cjs/data/data1d/filter1d/shiftX.js +2 -2
- package/lib-cjs/data/data1d/filter1d/zeroFilling.js +1 -1
- package/lib-cjs/data/data2d/Data2DManager.js +4 -0
- package/lib-cjs/data/data2d/filter2d/shiftX.js +4 -4
- package/lib-cjs/data/data2d/filter2d/shiftY.js +4 -4
- package/lib-cjs/data/molecules/Molecule.js +7 -1
- package/lib-cjs/data/molecules/MoleculeManager.js +37 -3
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +42 -40
- package/lib/component/elements/resizer/useDraggable.js +0 -52
- package/lib/component/panels/extra/preferences/defaultValues.d.ts +0 -54
- package/lib/component/panels/extra/preferences/defaultValues.js +0 -54
- package/lib/component/reducer/preferencesReducer.js +0 -269
- package/lib/component/utility/FormatNumber.d.ts +0 -6
- package/lib-cjs/component/elements/resizer/useDraggable.js +0 -55
- package/lib-cjs/component/panels/extra/preferences/defaultValues.js +0 -61
- package/lib-cjs/component/reducer/preferencesReducer.js +0 -276
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DraggableStructure = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
8
|
+
/** @jsxImportSource @emotion/react */
|
|
9
|
+
const react_1 = require("@emotion/react");
|
|
10
|
+
const full_1 = __importDefault(require("openchemlib/full"));
|
|
11
|
+
const react_2 = require("react");
|
|
12
|
+
const react_ocl_nmr_1 = __importDefault(require("react-ocl-nmr"));
|
|
13
|
+
const DispatchContext_1 = require("../../context/DispatchContext");
|
|
14
|
+
const GlobalContext_1 = require("../../context/GlobalContext");
|
|
15
|
+
const SVGDraggable_1 = __importDefault(require("../../elements/draggble/SVGDraggable"));
|
|
16
|
+
const MoleculeStructureEditorModal_1 = require("../../modal/MoleculeStructureEditorModal");
|
|
17
|
+
const useAtomAssignment_1 = __importDefault(require("../../panels/MoleculesPanel/useAtomAssignment"));
|
|
18
|
+
const Types_1 = require("../../reducer/types/Types");
|
|
19
|
+
const ActionsButton_1 = __importDefault(require("./ActionsButton"));
|
|
20
|
+
const style = (0, react_1.css) `
|
|
21
|
+
border: 1px solid transparent;
|
|
22
|
+
button {
|
|
23
|
+
visibility: hidden;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:hover {
|
|
27
|
+
border: 1px solid #ebecf1;
|
|
28
|
+
background-color: white;
|
|
29
|
+
button {
|
|
30
|
+
visibility: visible;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`;
|
|
34
|
+
function DraggableStructure(props) {
|
|
35
|
+
const { zones, ranges, molecule, activeTab, displayerMode, index } = props;
|
|
36
|
+
const { viewerRef } = (0, GlobalContext_1.useGlobal)();
|
|
37
|
+
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
38
|
+
const openMoleculeEditor = (0, MoleculeStructureEditorModal_1.useMoleculeEditor)();
|
|
39
|
+
const { currentDiaIDsToHighlight, handleOnAtomHover, handleOnClickAtom, assignedDiaIDsMerged, } = (0, useAtomAssignment_1.default)({ zones, ranges, activeTab, displayerMode });
|
|
40
|
+
const floatMoleculeHandler = (0, react_2.useCallback)(() => {
|
|
41
|
+
dispatch({
|
|
42
|
+
type: Types_1.FLOAT_MOLECULE_OVER_SPECTRUM,
|
|
43
|
+
payload: { key: molecule.key },
|
|
44
|
+
});
|
|
45
|
+
}, [dispatch, molecule]);
|
|
46
|
+
return ((0, jsx_runtime_1.jsx)(SVGDraggable_1.default, { width: 150, height: 100, initialPosition: { x: 100, y: 50 }, dragHandleClassName: "handle", parentElement: viewerRef, children: (width, height) => ((0, jsx_runtime_1.jsxs)("foreignObject", { width: width, height: height + 30, "data-replace-float-structure": "true", css: style, onDoubleClick: () => openMoleculeEditor(molecule), children: [(0, jsx_runtime_1.jsx)(ActionsButton_1.default, { onFloatBtnClick: floatMoleculeHandler }), (0, jsx_runtime_1.jsx)(react_ocl_nmr_1.default, { OCL: full_1.default, autoCrop: true, id: `molSVG${index || ''}`, width: width - 20, height: height, molfile: molecule.molfile, setSelectedAtom: handleOnClickAtom, atomHighlightColor: currentDiaIDsToHighlight?.length > 0 ? 'red' : '#FFD700', atomHighlightOpacity: 0.35, highlights: currentDiaIDsToHighlight?.length > 0
|
|
47
|
+
? currentDiaIDsToHighlight
|
|
48
|
+
: assignedDiaIDsMerged, setHoverAtom: handleOnAtomHover, setMolfile: () => null })] })) }, molecule.key));
|
|
49
|
+
}
|
|
50
|
+
exports.DraggableStructure = DraggableStructure;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FloatMoleculeStructuresInner = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const ChartContext_1 = require("../../context/ChartContext");
|
|
10
|
+
const useSpectrum_1 = __importDefault(require("../../hooks/useSpectrum"));
|
|
11
|
+
const DraggableStructure_1 = require("./DraggableStructure");
|
|
12
|
+
function FloatMoleculeStructuresInner(props) {
|
|
13
|
+
const { zones, ranges, molecules, activeTab, displayerMode } = props;
|
|
14
|
+
if (!molecules || molecules.length === 0)
|
|
15
|
+
return null;
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)("g", { children: molecules
|
|
17
|
+
.filter((molecule) => molecule.isFloat)
|
|
18
|
+
.map((molecule) => ((0, jsx_runtime_1.jsx)(DraggableStructure_1.DraggableStructure, { ...{ zones, ranges, activeTab, displayerMode, molecule } }, molecule.key))) }));
|
|
19
|
+
}
|
|
20
|
+
exports.FloatMoleculeStructuresInner = FloatMoleculeStructuresInner;
|
|
21
|
+
const MemoizedFloatMoleculeStructures = (0, react_1.memo)(FloatMoleculeStructuresInner);
|
|
22
|
+
const emptyData = { ranges: {}, zones: {} };
|
|
23
|
+
function FloatMoleculeStructures() {
|
|
24
|
+
const { molecules, displayerMode, activeTab } = (0, ChartContext_1.useChartData)();
|
|
25
|
+
const data = (0, useSpectrum_1.default)(emptyData);
|
|
26
|
+
const ranges = data?.ranges || {};
|
|
27
|
+
const zones = data?.zones || {};
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(MemoizedFloatMoleculeStructures, { ...{
|
|
29
|
+
molecules,
|
|
30
|
+
displayerMode,
|
|
31
|
+
activeTab,
|
|
32
|
+
ranges,
|
|
33
|
+
zones,
|
|
34
|
+
} }));
|
|
35
|
+
}
|
|
36
|
+
exports.default = FloatMoleculeStructures;
|
|
@@ -226,6 +226,12 @@ function getBlob(rootRef, elementID) {
|
|
|
226
226
|
_svg
|
|
227
227
|
.querySelectorAll('[data-no-export="true"]')
|
|
228
228
|
.forEach((element) => element.remove());
|
|
229
|
+
_svg
|
|
230
|
+
.querySelectorAll('[data-replace-float-structure="true"]')
|
|
231
|
+
.forEach((element) => {
|
|
232
|
+
element.replaceWith(element.childNodes[0].childNodes[0]);
|
|
233
|
+
return element;
|
|
234
|
+
});
|
|
229
235
|
const head = `<svg class="nmr-svg" viewBox='0 0 ${width} ${height}' width="${width}" height="${height}" version="1.1" xmlns="http://www.w3.org/2000/svg">`;
|
|
230
236
|
const style = `<style>.grid line,.grid path{stroke:none;} .peaks-text{fill:#730000} .x path{stroke-width:1px} .x text{
|
|
231
237
|
font-size: 12px;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getNumberOfDecimals = exports.formatNumber = void 0;
|
|
7
|
+
const numeral_1 = __importDefault(require("numeral"));
|
|
8
|
+
function formatNumber(value, format, prefix = '', suffix = '') {
|
|
9
|
+
return prefix + (0, numeral_1.default)(value).format(format) + suffix;
|
|
10
|
+
}
|
|
11
|
+
exports.formatNumber = formatNumber;
|
|
12
|
+
function getNumberOfDecimals(value) {
|
|
13
|
+
value = String(value).trim();
|
|
14
|
+
const lastIndex = value.lastIndexOf('.');
|
|
15
|
+
return lastIndex > 0 ? value.substr(lastIndex).split('').length - 1 : 0;
|
|
16
|
+
}
|
|
17
|
+
exports.getNumberOfDecimals = getNumberOfDecimals;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUniqueNuclei = void 0;
|
|
4
|
+
function getUniqueNuclei(nuclei) {
|
|
5
|
+
let uniqueNuclei = {};
|
|
6
|
+
for (const nucleus of nuclei) {
|
|
7
|
+
const _nuclei = nucleus.split(',');
|
|
8
|
+
for (const _nucleus of _nuclei) {
|
|
9
|
+
uniqueNuclei[_nucleus.toUpperCase()] = true;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return Object.keys(uniqueNuclei);
|
|
13
|
+
}
|
|
14
|
+
exports.getUniqueNuclei = getUniqueNuclei;
|
|
@@ -9,7 +9,7 @@ exports.basic = {
|
|
|
9
9
|
disableMultipletAnalysis: false,
|
|
10
10
|
hideSetSumFromMolecule: false,
|
|
11
11
|
hideGeneralSettings: false,
|
|
12
|
-
experimentalFeatures: { display:
|
|
12
|
+
experimentalFeatures: { display: false },
|
|
13
13
|
},
|
|
14
14
|
panels: {
|
|
15
15
|
spectraPanel: { display: true, open: true },
|
|
@@ -24,6 +24,7 @@ exports.basic = {
|
|
|
24
24
|
multipleSpectraAnalysisPanel: { display: false, open: false },
|
|
25
25
|
databasePanel: { display: false, open: false },
|
|
26
26
|
predictionPanel: { display: false, open: false },
|
|
27
|
+
automaticAssignmentPanel: { display: false, open: false },
|
|
27
28
|
},
|
|
28
29
|
},
|
|
29
30
|
controllers: {
|
|
@@ -40,4 +41,11 @@ exports.basic = {
|
|
|
40
41
|
},
|
|
41
42
|
panels: {},
|
|
42
43
|
},
|
|
44
|
+
databases: [
|
|
45
|
+
{
|
|
46
|
+
label: 'Toc',
|
|
47
|
+
url: 'https://data.cheminfo.org/nmr/database/toc.json',
|
|
48
|
+
enabled: true,
|
|
49
|
+
},
|
|
50
|
+
],
|
|
43
51
|
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.embedded = void 0;
|
|
4
|
+
const basic_1 = require("./basic");
|
|
5
|
+
exports.embedded = {
|
|
6
|
+
version: 1,
|
|
7
|
+
label: 'Embedded workspace',
|
|
8
|
+
display: {
|
|
9
|
+
general: {
|
|
10
|
+
disableMultipletAnalysis: false,
|
|
11
|
+
hideSetSumFromMolecule: false,
|
|
12
|
+
hideGeneralSettings: false,
|
|
13
|
+
experimentalFeatures: { display: true },
|
|
14
|
+
hidePanelOnLoad: true,
|
|
15
|
+
},
|
|
16
|
+
panels: {
|
|
17
|
+
spectraPanel: { display: true, open: true },
|
|
18
|
+
informationPanel: { display: true, open: false },
|
|
19
|
+
peaksPanel: { display: true, open: false },
|
|
20
|
+
integralsPanel: { display: true, open: false },
|
|
21
|
+
rangesPanel: { display: true, open: false },
|
|
22
|
+
structuresPanel: { display: true, open: false },
|
|
23
|
+
filtersPanel: { display: true, open: false },
|
|
24
|
+
zonesPanel: { display: true, open: false },
|
|
25
|
+
summaryPanel: { display: false, open: false },
|
|
26
|
+
multipleSpectraAnalysisPanel: { display: false, open: false },
|
|
27
|
+
databasePanel: { display: false, open: false },
|
|
28
|
+
predictionPanel: { display: false, open: false },
|
|
29
|
+
automaticAssignmentPanel: { display: false, open: false },
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
controllers: basic_1.basic.controllers,
|
|
33
|
+
formatting: basic_1.basic.formatting,
|
|
34
|
+
databases: basic_1.basic.databases,
|
|
35
|
+
};
|
|
@@ -25,6 +25,7 @@ exports.exercise = {
|
|
|
25
25
|
multipleSpectraAnalysisPanel: { hidden: true },
|
|
26
26
|
databasePanel: { hidden: true },
|
|
27
27
|
predictionPanel: { hidden: true },
|
|
28
|
+
automaticAssignmentPanel: { hidden: true },
|
|
28
29
|
},
|
|
29
30
|
toolBarButtons: {
|
|
30
31
|
zoomTool: true,
|
|
@@ -49,4 +50,5 @@ exports.exercise = {
|
|
|
49
50
|
},
|
|
50
51
|
controllers: basic_1.basic.controllers,
|
|
51
52
|
formatting: basic_1.basic.formatting,
|
|
53
|
+
databases: basic_1.basic.databases,
|
|
52
54
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const basic_1 = require("./basic");
|
|
4
|
+
const embedded_1 = require("./embedded");
|
|
4
5
|
const exercise_1 = require("./exercise");
|
|
5
6
|
const prediction_1 = require("./prediction");
|
|
6
7
|
const process1D_1 = require("./process1D");
|
|
7
|
-
exports.default = { exercise: exercise_1.exercise, default: basic_1.basic, process1D: process1D_1.process1D, prediction: prediction_1.prediction };
|
|
8
|
+
exports.default = { exercise: exercise_1.exercise, default: basic_1.basic, process1D: process1D_1.process1D, prediction: prediction_1.prediction, embedded: embedded_1.embedded };
|
|
@@ -22,8 +22,10 @@ exports.prediction = {
|
|
|
22
22
|
summaryPanel: { display: false },
|
|
23
23
|
multipleSpectraAnalysisPanel: { display: false },
|
|
24
24
|
databasePanel: { display: false },
|
|
25
|
+
automaticAssignmentPanel: { display: false },
|
|
25
26
|
},
|
|
26
27
|
},
|
|
27
28
|
controllers: basic_1.basic.controllers,
|
|
28
29
|
formatting: basic_1.basic.formatting,
|
|
30
|
+
databases: basic_1.basic.databases,
|
|
29
31
|
};
|
|
@@ -22,6 +22,7 @@ exports.process1D = {
|
|
|
22
22
|
filtersPanel: { hidden: true },
|
|
23
23
|
databasePanel: { hidden: true },
|
|
24
24
|
predictionPanel: { hidden: true },
|
|
25
|
+
automaticAssignmentPanel: { hidden: true },
|
|
25
26
|
},
|
|
26
27
|
toolBarButtons: {
|
|
27
28
|
import: false,
|
|
@@ -33,4 +34,5 @@ exports.process1D = {
|
|
|
33
34
|
},
|
|
34
35
|
controllers: basic_1.basic.controllers,
|
|
35
36
|
formatting: basic_1.basic.formatting,
|
|
37
|
+
databases: basic_1.basic.databases,
|
|
36
38
|
};
|
|
@@ -72,6 +72,10 @@ function fromParsedJcamp(parsedJcamp, options, usedColors, jcampSpectrumIndex) {
|
|
|
72
72
|
const datum1D = (0, Spectrum1D_1.initiateDatum1D)({
|
|
73
73
|
...options,
|
|
74
74
|
source: { ...options.source, jcampSpectrumIndex },
|
|
75
|
+
display: {
|
|
76
|
+
...options.display,
|
|
77
|
+
name: options?.display?.name ? options.display.name : info?.title,
|
|
78
|
+
},
|
|
75
79
|
info,
|
|
76
80
|
meta,
|
|
77
81
|
data,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.convertDataToFloat64Array = void 0;
|
|
4
|
+
function convert(value) {
|
|
5
|
+
return !ArrayBuffer.isView(value) && value ? Float64Array.from(value) : value;
|
|
6
|
+
}
|
|
7
|
+
function convertDataToFloat64Array(data) {
|
|
8
|
+
return {
|
|
9
|
+
x: convert(data.x),
|
|
10
|
+
re: convert(data.re),
|
|
11
|
+
im: convert(data?.im),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
exports.convertDataToFloat64Array = convertDataToFloat64Array;
|
|
@@ -31,6 +31,7 @@ const FiltersTypes = __importStar(require("../../Filters"));
|
|
|
31
31
|
const FiltersManager = __importStar(require("../../FiltersManager"));
|
|
32
32
|
const generateID_1 = __importDefault(require("../../utilities/generateID"));
|
|
33
33
|
const getColor_1 = __importDefault(require("../../utilities/getColor"));
|
|
34
|
+
const convertDataToFloat64Array_1 = require("./convertDataToFloat64Array");
|
|
34
35
|
const initiateIntegrals_1 = require("./integrals/initiateIntegrals");
|
|
35
36
|
const initiatePeaks_1 = require("./peaks/initiatePeaks");
|
|
36
37
|
const initiateRanges_1 = require("./ranges/initiateRanges");
|
|
@@ -64,7 +65,7 @@ function initiateDatum1D(options, usedColors = {}) {
|
|
|
64
65
|
x: [],
|
|
65
66
|
re: [],
|
|
66
67
|
im: [],
|
|
67
|
-
}, options.data);
|
|
68
|
+
}, (0, convertDataToFloat64Array_1.convertDataToFloat64Array)(options.data));
|
|
68
69
|
datum.originalData = datum.data;
|
|
69
70
|
datum.filters = Object.assign([], options.filters); //array of object {name: "FilterName", options: FilterOptions = {value | object} }
|
|
70
71
|
datum.peaks = (0, initiatePeaks_1.initiatePeaks)(options, datum);
|
|
@@ -7,8 +7,9 @@ const mapRanges_1 = require("./mapRanges");
|
|
|
7
7
|
function generateSpectrumFromRanges(ranges, info, usedColors) {
|
|
8
8
|
const { nucleus, solvent, name = null, frequency = 400 } = info;
|
|
9
9
|
const { x, y } = (0, nmr_processing_1.rangesToXY)(ranges, {
|
|
10
|
+
nucleus,
|
|
10
11
|
frequency,
|
|
11
|
-
nbPoints:
|
|
12
|
+
nbPoints: 2 ** 17,
|
|
12
13
|
});
|
|
13
14
|
const datum = (0, initiateDatum1D_1.initiateDatum1D)({
|
|
14
15
|
data: { x, im: null, re: y },
|
|
@@ -3,23 +3,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.prepareData = exports.
|
|
6
|
+
exports.prepareData = exports.initiateDatabase = exports.databases = void 0;
|
|
7
7
|
const nmr_processing_1 = require("nmr-processing");
|
|
8
8
|
const smart_array_filter_1 = require("smart-array-filter");
|
|
9
9
|
const generateID_1 = __importDefault(require("../utilities/generateID"));
|
|
10
|
-
exports.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
value: prepareDataBase([...nmr_processing_1.protonImpurities, ...nmr_processing_1.carbonImpurities]),
|
|
15
|
-
},
|
|
10
|
+
exports.databases = [
|
|
11
|
+
{
|
|
12
|
+
label: 'Solvent database',
|
|
13
|
+
value: prepareDataBase([...nmr_processing_1.protonImpurities, ...nmr_processing_1.carbonImpurities]),
|
|
16
14
|
},
|
|
17
|
-
|
|
18
|
-
function initiateDatabase(
|
|
19
|
-
const
|
|
20
|
-
? exports.database.data[databaseKey].value
|
|
21
|
-
: [];
|
|
22
|
-
const data = databaseData.filter((datum) => datum.nucleus === nucleus);
|
|
15
|
+
];
|
|
16
|
+
function initiateDatabase(databases, nucleus) {
|
|
17
|
+
const data = databases.filter((datum) => datum.nucleus === nucleus);
|
|
23
18
|
const getSolvents = () => prepareGetSolvents(data);
|
|
24
19
|
const search = (keywords = []) => (0, smart_array_filter_1.filter)(data, { keywords });
|
|
25
20
|
return { data, getSolvents, search };
|
|
@@ -36,13 +31,12 @@ function prepareGetSolvents(data) {
|
|
|
36
31
|
}
|
|
37
32
|
return result;
|
|
38
33
|
}
|
|
39
|
-
function getDatabasesNames() {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
exports.getDatabasesNames = getDatabasesNames;
|
|
34
|
+
// export function getDatabasesNames() {
|
|
35
|
+
// return databases.map((database, index) => {
|
|
36
|
+
// const { label } = database;
|
|
37
|
+
// return { id: index, name: label };
|
|
38
|
+
// });
|
|
39
|
+
// }
|
|
46
40
|
function prepareDataBase(array) {
|
|
47
41
|
return array.map((item) => {
|
|
48
42
|
item.ranges = item.ranges.map((range) => ({
|
|
@@ -57,7 +51,7 @@ function prepareData(data) {
|
|
|
57
51
|
let index = 0;
|
|
58
52
|
for (const item of data) {
|
|
59
53
|
let ids = [];
|
|
60
|
-
const { ranges, ...restItemKeys } = item;
|
|
54
|
+
const { ranges = [], ...restItemKeys } = item;
|
|
61
55
|
for (const range of ranges) {
|
|
62
56
|
ids.push(range.id || (0, generateID_1.default)());
|
|
63
57
|
const { signals = [], ...restRangKeys } = range;
|
|
@@ -13,10 +13,10 @@ function apply(datum1D, zones = []) {
|
|
|
13
13
|
throw new Error('Exclusion Zones filter not applicable on this data');
|
|
14
14
|
}
|
|
15
15
|
const { x, re, im } = datum1D.data;
|
|
16
|
-
datum1D.data.re = (0, ml_spectra_processing_1.xySetYValue)({ x, y: re }, { zones }).y;
|
|
17
|
-
datum1D.data.im =
|
|
18
|
-
? (0, ml_spectra_processing_1.xySetYValue)({ x, y: re }, { zones })
|
|
19
|
-
: im
|
|
16
|
+
datum1D.data.re = Float64Array.from((0, ml_spectra_processing_1.xySetYValue)({ x, y: re }, { zones }).y);
|
|
17
|
+
datum1D.data.im = im
|
|
18
|
+
? Float64Array.from((0, ml_spectra_processing_1.xySetYValue)({ x, y: re }, { zones }).y)
|
|
19
|
+
: im;
|
|
20
20
|
}
|
|
21
21
|
exports.apply = apply;
|
|
22
22
|
function isApplicable(datum1D) {
|
|
@@ -15,7 +15,7 @@ function apply(datum1D) {
|
|
|
15
15
|
let digitalFilterApplied = datum1D.filters.some((e) => e.name === 'digitalFilter' && e.flag);
|
|
16
16
|
Object.assign(datum1D.data, (0, ml_spectra_processing_1.reimFFT)(datum1D.data, { applyZeroShift: true }));
|
|
17
17
|
if (digitalFilterApplied) {
|
|
18
|
-
let { digitalFilter } = datum1D.info;
|
|
18
|
+
let { digitalFilter = 0 } = datum1D.info;
|
|
19
19
|
let ph1 = (digitalFilter - Math.floor(digitalFilter)) * Math.PI * 2;
|
|
20
20
|
Object.assign(datum1D.data, (0, ml_spectra_processing_1.reimPhaseCorrection)(datum1D.data, 0, ph1));
|
|
21
21
|
}
|
|
@@ -46,7 +46,7 @@ function generateXAxis(datum1D) {
|
|
|
46
46
|
let nbPoints = datum1D.data.x.length;
|
|
47
47
|
let firstPoint = offset - spectralHalfWidth;
|
|
48
48
|
let dx = spectralWidth / (nbPoints - 1);
|
|
49
|
-
const xAxis = new
|
|
49
|
+
const xAxis = new Float64Array(nbPoints);
|
|
50
50
|
for (let i = 0; i < nbPoints; i++) {
|
|
51
51
|
xAxis[i] = firstPoint;
|
|
52
52
|
firstPoint += dx;
|
|
@@ -12,7 +12,7 @@ function apply(datum1D, value) {
|
|
|
12
12
|
if (!isApplicable(datum1D)) {
|
|
13
13
|
throw new Error('lineBroadening not applicable on this data');
|
|
14
14
|
}
|
|
15
|
-
let grpdly = datum1D.info
|
|
15
|
+
let grpdly = datum1D.info?.digitalFilter || 0;
|
|
16
16
|
let pointsToShift;
|
|
17
17
|
if (grpdly > 0) {
|
|
18
18
|
pointsToShift = Math.floor(grpdly);
|
|
@@ -14,9 +14,9 @@ function apply(datum1D) {
|
|
|
14
14
|
}
|
|
15
15
|
const re = datum1D.data.re.slice(0);
|
|
16
16
|
const im = datum1D.data.im?.slice(0);
|
|
17
|
-
datum1D.data.re = (0, ml_spectra_processing_1.xParetoNormalization)(re);
|
|
17
|
+
datum1D.data.re = Float64Array.from((0, ml_spectra_processing_1.xParetoNormalization)(re));
|
|
18
18
|
if (im) {
|
|
19
|
-
datum1D.data.im = (0, ml_spectra_processing_1.xParetoNormalization)(im);
|
|
19
|
+
datum1D.data.im = Float64Array.from((0, ml_spectra_processing_1.xParetoNormalization)(im));
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
exports.apply = apply;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reduce = exports.isApplicable = exports.apply = exports.name = exports.id = void 0;
|
|
2
4
|
/**
|
|
3
5
|
*
|
|
4
6
|
* @param {Object} datum1d
|
|
5
7
|
* @param {number} [shiftValue=0]
|
|
6
8
|
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.reduce = exports.isApplicable = exports.apply = exports.name = exports.id = void 0;
|
|
9
9
|
exports.id = 'shiftX';
|
|
10
10
|
exports.name = 'Shift X';
|
|
11
11
|
function apply(datum1D, shiftValue = 0) {
|
|
@@ -13,7 +13,7 @@ function apply(datum1D, size) {
|
|
|
13
13
|
throw new Error('zeroFilling not applicable on this data');
|
|
14
14
|
}
|
|
15
15
|
let digitalFilterApplied = datum1D.filters.some((e) => e.name === 'digitalFilter' && e.flag);
|
|
16
|
-
let grpdly = datum1D.info
|
|
16
|
+
let grpdly = datum1D.info?.digitalFilter || 0;
|
|
17
17
|
let pointsToShift;
|
|
18
18
|
if (grpdly > 0 && digitalFilterApplied) {
|
|
19
19
|
pointsToShift = Math.floor(grpdly);
|
|
@@ -8,6 +8,10 @@ function fromParsedJcamp(parsedJcamp, options, usedColors, jcampSpectrumIndex) {
|
|
|
8
8
|
const ob = (0, Spectrum2D_1.initiateDatum2D)({
|
|
9
9
|
...options,
|
|
10
10
|
source: { ...options?.source, jcampSpectrumIndex },
|
|
11
|
+
display: {
|
|
12
|
+
...options.display,
|
|
13
|
+
name: options?.display?.name ? options.display.name : info?.title,
|
|
14
|
+
},
|
|
11
15
|
info,
|
|
12
16
|
meta,
|
|
13
17
|
data,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reduce = exports.isApplicable = exports.apply = exports.name = exports.id = void 0;
|
|
4
|
+
exports.id = 'shift2DX';
|
|
5
|
+
exports.name = 'Shift 2D X';
|
|
2
6
|
/**
|
|
3
7
|
*
|
|
4
8
|
* @param {Object} datum2d
|
|
5
9
|
* @param {number} [shiftValue=0]
|
|
6
10
|
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.reduce = exports.isApplicable = exports.apply = exports.name = exports.id = void 0;
|
|
9
|
-
exports.id = 'shift2DX';
|
|
10
|
-
exports.name = 'Shift 2D X';
|
|
11
11
|
function apply(datum2D, shiftValue = 0) {
|
|
12
12
|
datum2D.data.minX += shiftValue;
|
|
13
13
|
datum2D.data.maxX += shiftValue;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reduce = exports.isApplicable = exports.apply = exports.name = exports.id = void 0;
|
|
4
|
+
exports.id = 'shift2DY';
|
|
5
|
+
exports.name = 'Shift 2D Y';
|
|
2
6
|
/**
|
|
3
7
|
*
|
|
4
8
|
* @param {Object} datum2d
|
|
5
9
|
* @param {number} [shiftValue=0]
|
|
6
10
|
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.reduce = exports.isApplicable = exports.apply = exports.name = exports.id = void 0;
|
|
9
|
-
exports.id = 'shift2DY';
|
|
10
|
-
exports.name = 'Shift 2D Y';
|
|
11
11
|
function apply(datum2D, shiftValue = 0) {
|
|
12
12
|
datum2D.data.minY += shiftValue;
|
|
13
13
|
datum2D.data.maxY += shiftValue;
|
|
@@ -9,23 +9,29 @@ const generateID_1 = __importDefault(require("../utilities/generateID"));
|
|
|
9
9
|
const getAtomsFromMF_1 = __importDefault(require("../utilities/getAtomsFromMF"));
|
|
10
10
|
function initMolecule(options = {}) {
|
|
11
11
|
const key = options.key || (0, generateID_1.default)();
|
|
12
|
+
const label = options.label || 'p#';
|
|
12
13
|
const molfile = options.molfile || '';
|
|
14
|
+
const isFloat = typeof options?.isFloat === 'boolean' ? options.isFloat : false;
|
|
13
15
|
const mol = full_1.Molecule.fromMolfile(molfile);
|
|
14
16
|
const mfInfo = mol.getMolecularFormula();
|
|
15
17
|
return {
|
|
16
18
|
key,
|
|
17
19
|
molfile,
|
|
20
|
+
label,
|
|
18
21
|
mf: mfInfo.formula,
|
|
19
22
|
em: mfInfo.absoluteWeight,
|
|
20
23
|
mw: mfInfo.relativeWeight,
|
|
21
24
|
svg: mol.toSVG(50, 50),
|
|
22
25
|
atoms: (0, getAtomsFromMF_1.default)(mfInfo.formula),
|
|
26
|
+
isFloat,
|
|
23
27
|
};
|
|
24
28
|
}
|
|
25
29
|
exports.initMolecule = initMolecule;
|
|
26
30
|
function toJSON(molecule) {
|
|
31
|
+
const { molfile, label } = molecule;
|
|
27
32
|
return {
|
|
28
|
-
molfile
|
|
33
|
+
molfile,
|
|
34
|
+
label,
|
|
29
35
|
};
|
|
30
36
|
}
|
|
31
37
|
exports.toJSON = toJSON;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setMolfile = exports.addMolfile = exports.fromJSON = void 0;
|
|
3
|
+
exports.getLabelNumber = exports.extractLabelsNumbers = exports.extractNumber = exports.setMolfile = exports.addMolfile = exports.fromJSON = void 0;
|
|
4
4
|
const full_1 = require("openchemlib/full");
|
|
5
5
|
const Molecule_1 = require("./Molecule");
|
|
6
6
|
function fromJSON(mols = []) {
|
|
7
|
+
const reservedNumbers = extractLabelsNumbers(mols);
|
|
7
8
|
const molecules = [];
|
|
8
9
|
for (const mol of mols) {
|
|
9
10
|
const molecule = full_1.Molecule.fromMolfile(mol.molfile);
|
|
@@ -11,6 +12,7 @@ function fromJSON(mols = []) {
|
|
|
11
12
|
for (let fragment of fragments) {
|
|
12
13
|
molecules.push((0, Molecule_1.initMolecule)({
|
|
13
14
|
molfile: fragment.toMolfileV3(),
|
|
15
|
+
label: mol.label ? mol.label : `P${getLabelNumber(reservedNumbers)}`,
|
|
14
16
|
}));
|
|
15
17
|
}
|
|
16
18
|
}
|
|
@@ -18,6 +20,7 @@ function fromJSON(mols = []) {
|
|
|
18
20
|
}
|
|
19
21
|
exports.fromJSON = fromJSON;
|
|
20
22
|
function addMolfile(molecules, molfile) {
|
|
23
|
+
const reservedNumbers = extractLabelsNumbers(molecules);
|
|
21
24
|
// try to parse molfile
|
|
22
25
|
// this will throw if the molecule can not be parsed !
|
|
23
26
|
const molecule = full_1.Molecule.fromMolfile(molfile);
|
|
@@ -25,12 +28,15 @@ function addMolfile(molecules, molfile) {
|
|
|
25
28
|
for (let fragment of fragments) {
|
|
26
29
|
molecules.push((0, Molecule_1.initMolecule)({
|
|
27
30
|
molfile: fragment.toMolfileV3(),
|
|
31
|
+
label: `P${getLabelNumber(reservedNumbers)}`,
|
|
28
32
|
}));
|
|
29
33
|
}
|
|
30
34
|
// we will split if we have many fragments
|
|
31
35
|
}
|
|
32
36
|
exports.addMolfile = addMolfile;
|
|
33
|
-
function setMolfile(molecules,
|
|
37
|
+
function setMolfile(molecules, currentMolecule) {
|
|
38
|
+
const { molfile, key, label, isFloat } = currentMolecule;
|
|
39
|
+
const reservedNumbers = extractLabelsNumbers(molecules);
|
|
34
40
|
// try to parse molfile
|
|
35
41
|
// this will throw if the molecule can not be parsed !
|
|
36
42
|
let molecule = full_1.Molecule.fromMolfile(molfile);
|
|
@@ -40,14 +46,17 @@ function setMolfile(molecules, molfile, key) {
|
|
|
40
46
|
for (let fragment of fragments) {
|
|
41
47
|
molecules.push((0, Molecule_1.initMolecule)({
|
|
42
48
|
molfile: fragment.toMolfileV3(),
|
|
49
|
+
label: `P${getLabelNumber(reservedNumbers)}`,
|
|
43
50
|
}));
|
|
44
51
|
}
|
|
45
52
|
}
|
|
46
53
|
else if (fragments.length === 1) {
|
|
47
54
|
const fragment = fragments[0];
|
|
48
55
|
const _mol = (0, Molecule_1.initMolecule)({
|
|
56
|
+
isFloat,
|
|
49
57
|
molfile: fragment.toMolfileV3(),
|
|
50
|
-
key
|
|
58
|
+
key,
|
|
59
|
+
label,
|
|
51
60
|
});
|
|
52
61
|
let molIndex = molecules.findIndex((m) => m.key === key);
|
|
53
62
|
molecules.splice(molIndex, 1, _mol);
|
|
@@ -55,3 +64,28 @@ function setMolfile(molecules, molfile, key) {
|
|
|
55
64
|
// we will split if we have many fragments
|
|
56
65
|
}
|
|
57
66
|
exports.setMolfile = setMolfile;
|
|
67
|
+
function extractNumber(value) {
|
|
68
|
+
return /(?<number>\d+)/.exec(value)?.groups?.number || null;
|
|
69
|
+
}
|
|
70
|
+
exports.extractNumber = extractNumber;
|
|
71
|
+
function extractLabelsNumbers(molecules) {
|
|
72
|
+
const values = [];
|
|
73
|
+
for (const molecule of molecules) {
|
|
74
|
+
const value = extractNumber(molecule.label);
|
|
75
|
+
if (value) {
|
|
76
|
+
values.push(Number(value));
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return values;
|
|
80
|
+
}
|
|
81
|
+
exports.extractLabelsNumbers = extractLabelsNumbers;
|
|
82
|
+
function getLabelNumber(reserveNumbers) {
|
|
83
|
+
for (let i = 1; i < Number.MAX_VALUE; i++) {
|
|
84
|
+
if (reserveNumbers.includes(i)) {
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
return i;
|
|
88
|
+
}
|
|
89
|
+
return 1;
|
|
90
|
+
}
|
|
91
|
+
exports.getLabelNumber = getLabelNumber;
|