nmrium 0.24.1 → 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 +21 -16
- 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 +36 -32
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +5 -5
- package/lib/component/1d/ranges/Range.d.ts +2 -1
- package/lib/component/1d/ranges/Range.js +38 -39
- 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/2d/zones/Signal.js +8 -8
- package/lib/component/2d/zones/Zone.js +3 -3
- package/lib/component/EventsTrackers/KeysListenerTracker.js +11 -5
- package/lib/component/NMRium.d.ts +5 -1
- package/lib/component/NMRium.js +28 -32
- package/lib/component/SplitPaneWrapper.d.ts +4 -0
- package/lib/component/SplitPaneWrapper.js +8 -0
- package/lib/component/assignment/AssignmentsContext.d.ts +35 -0
- package/lib/component/assignment/AssignmentsContext.js +83 -0
- package/lib/component/assignment/AssignmentsReducer.d.ts +32 -0
- package/lib/component/assignment/AssignmentsReducer.js +39 -0
- package/lib/component/assignment/actions/initAssignment.d.ts +5 -0
- package/lib/component/assignment/actions/initAssignment.js +62 -0
- package/lib/component/assignment/actions/removeAssignment.d.ts +16 -0
- package/lib/component/assignment/actions/removeAssignment.js +24 -0
- package/lib/component/assignment/actions/setActiveAssignment.d.ts +10 -0
- package/lib/component/assignment/actions/setActiveAssignment.js +8 -0
- package/lib/component/assignment/actions/toggleAssignment.d.ts +7 -0
- package/lib/component/assignment/actions/toggleAssignment.js +44 -0
- package/lib/component/assignment/index.d.ts +0 -18
- package/lib/component/assignment/index.js +12 -266
- package/lib/component/assignment/utilities/filterForIDsWithAssignment.d.ts +2 -0
- package/lib/component/assignment/utilities/filterForIDsWithAssignment.js +3 -0
- package/lib/component/context/GlobalContext.d.ts +15 -3
- 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/ActionButtons.d.ts +10 -0
- package/lib/component/elements/ActionButtons.js +14 -0
- package/lib/component/elements/Button.d.ts +30 -5
- package/lib/component/elements/Button.js +151 -4
- package/lib/component/elements/ColorInput.js +2 -2
- package/lib/component/elements/ContextMenu.d.ts +8 -3
- package/lib/component/elements/ContextMenu.js +6 -6
- 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/ReactTable/Elements/ReactTableRow.d.ts +5 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +38 -10
- package/lib/component/elements/ReactTable/ReactTable.d.ts +3 -1
- package/lib/component/elements/ReactTable/ReactTable.js +7 -2
- package/lib/component/elements/ReactTable/Style.d.ts +1 -3
- package/lib/component/elements/ReactTable/Style.js +1 -7
- 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/ToolTip/ToolTip.js +3 -2
- package/lib/component/elements/draggble/SVGDraggable.d.ts +17 -0
- package/lib/component/elements/draggble/SVGDraggable.js +33 -0
- package/lib/component/elements/draggble/useDraggable.d.ts +22 -0
- 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.d.ts +2 -0
- package/lib/component/elements/resizer/DivResizer.js +62 -0
- package/lib/component/elements/resizer/Resizer.d.ts +20 -0
- package/lib/component/elements/resizer/Resizer.js +12 -0
- package/lib/component/elements/resizer/SVGResizer.d.ts +2 -0
- package/lib/component/elements/resizer/SVGResizer.js +42 -0
- package/lib/component/elements/resizer/useResizer.d.ts +11 -0
- package/lib/component/elements/resizer/useResizer.js +65 -0
- package/lib/component/header/AutoPeakPickingOptionPanel.js +4 -15
- package/lib/component/header/BaseLineCorrectionPanel.js +2 -9
- package/lib/component/header/ManualPhaseCorrectionPanel.js +2 -9
- package/lib/component/header/RangesPickingOptionPanel.js +3 -16
- package/lib/component/header/ZeroFillingOptionsPanel.js +2 -9
- package/lib/component/header/Zones2DOptionPanel.js +3 -14
- package/lib/component/hooks/useExport.d.ts +1 -1
- package/lib/component/hooks/useExport.js +11 -9
- package/lib/component/hooks/useFormatNumberByNucleus.d.ts +3 -0
- package/lib/component/{utility/FormatNumber.js → hooks/useFormatNumberByNucleus.js} +1 -10
- 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/DropZone.js +1 -0
- package/lib/component/loader/SpinnerContext.d.ts +3 -3
- package/lib/component/loader/SpinnerContext.js +2 -2
- package/lib/component/modal/AlignSpectraModal.js +2 -1
- package/lib/component/modal/ExportAsMatrixModal.js +2 -1
- package/lib/component/modal/ImportPublicationStringModal.js +2 -1
- package/lib/component/modal/LoadJCAMPModal.js +7 -6
- package/lib/component/modal/ModalStyle.js +4 -26
- package/lib/component/modal/MoleculeStructureEditorModal.d.ts +3 -4
- package/lib/component/modal/MoleculeStructureEditorModal.js +24 -2
- package/lib/component/modal/MultipleSpectraFiltersModal/index.js +2 -1
- package/lib/component/modal/PredictSpectraModal.js +2 -7
- package/lib/component/modal/SaveAsModal.d.ts +1 -1
- package/lib/component/modal/SaveAsModal.js +2 -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 +20 -14
- package/lib/component/modal/setting/GeneralSettings.js +4 -1
- package/lib/component/modal/setting/settingsValidation.d.ts +56 -0
- package/lib/component/modal/setting/settingsValidation.js +46 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.js +6 -4
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts +4 -3
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +13 -6
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.d.ts +10 -0
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +65 -0
- 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 +21 -7
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +31 -11
- package/lib/component/panels/MoleculesPanel/Utilities.js +61 -68
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.d.ts +2 -2
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +55 -60
- 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 +16 -10
- package/lib/component/panels/RangesPanel/RangesPanel.js +5 -11
- 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 +15 -14
- 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/RangeAssignmentsColumn.d.ts +16 -9
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -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/SignalAssignmentsColumn.d.ts +2 -3
- 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/RangesPanel/hooks/useEditRangeModal.js +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +5 -18
- 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/SummaryPanel/SummaryPanel.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.d.ts +5 -7
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.d.ts +4 -8
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.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/TableColumns/ZoneAssignmentsColumn.d.ts +5 -9
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +4 -4
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.d.ts +4 -8
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +1 -1
- 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 +7 -2
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js +22 -22
- 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/panels/header/SpectraAutomaticPickingButton.d.ts +2 -0
- package/lib/component/panels/header/SpectraAutomaticPickingButton.js +30 -0
- package/lib/component/panels/predictionPanel/PredictionOptions.js +2 -18
- package/lib/component/reducer/Reducer.d.ts +360 -45
- package/lib/component/reducer/Reducer.js +9 -2
- package/lib/component/reducer/actions/AssignmentsActions.d.ts +9 -0
- package/lib/component/reducer/actions/AssignmentsActions.js +18 -0
- package/lib/component/reducer/actions/LoadActions.d.ts +1 -1
- package/lib/component/reducer/actions/LoadActions.js +11 -6
- 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} +132 -15
- 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 +3 -0
- package/lib/component/reducer/types/Types.js +3 -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.d.ts +3 -3
- package/lib/component/utility/Export.js +16 -9
- 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 +74 -5
- package/lib/component/workspaces/basic.js +17 -10
- 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/SpectraManager.js +23 -15
- package/lib/data/data1d/Data1DManager.d.ts +1 -1
- package/lib/data/data1d/Data1DManager.js +6 -1
- 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/Spectrum1D/toJSON.d.ts +2 -0
- package/lib/data/data1d/Spectrum1D/toJSON.js +1 -0
- package/lib/data/data1d/database.d.ts +9 -15
- package/lib/data/data1d/database.js +15 -20
- 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.d.ts +1 -4
- 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.d.ts +1 -1
- package/lib/data/data2d/Data2DManager.js +6 -1
- package/lib/data/data2d/Spectrum2D/toJSON.d.ts +2 -0
- package/lib/data/data2d/Spectrum2D/toJSON.js +1 -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/common/Source.d.ts +1 -0
- 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 +20 -15
- 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 +35 -31
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +6 -6
- package/lib-cjs/component/1d/ranges/Range.js +40 -41
- 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/2d/zones/Signal.js +9 -9
- package/lib-cjs/component/2d/zones/Zone.js +4 -4
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +12 -6
- package/lib-cjs/component/NMRium.js +27 -31
- package/lib-cjs/component/SplitPaneWrapper.js +12 -0
- package/lib-cjs/component/assignment/AssignmentsContext.js +88 -0
- package/lib-cjs/component/assignment/AssignmentsReducer.js +45 -0
- package/lib-cjs/component/assignment/actions/initAssignment.js +65 -0
- package/lib-cjs/component/assignment/actions/removeAssignment.js +29 -0
- package/lib-cjs/component/assignment/actions/setActiveAssignment.js +11 -0
- package/lib-cjs/component/assignment/actions/toggleAssignment.js +47 -0
- package/lib-cjs/component/assignment/index.js +15 -269
- package/lib-cjs/component/assignment/utilities/filterForIDsWithAssignment.js +7 -0
- package/lib-cjs/component/context/GlobalContext.js +1 -1
- package/lib-cjs/component/context/PreferencesContext.js +1 -1
- package/lib-cjs/component/elements/ActionButtons.js +20 -0
- package/lib-cjs/component/elements/Button.js +150 -4
- package/lib-cjs/component/elements/ColorInput.js +2 -2
- package/lib-cjs/component/elements/ContextMenu.js +6 -6
- package/lib-cjs/component/elements/EditableColumn.js +27 -20
- package/lib-cjs/component/elements/Input.js +18 -5
- package/lib-cjs/component/elements/ReactTable/Elements/ReactTableRow.js +42 -14
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +7 -2
- package/lib-cjs/component/elements/ReactTable/Style.js +1 -9
- package/lib-cjs/component/elements/Select.js +20 -14
- package/lib-cjs/component/elements/ToggleButton.js +2 -2
- package/lib-cjs/component/elements/ToolTip/ToolTip.js +3 -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 +68 -0
- package/lib-cjs/component/elements/resizer/Resizer.js +18 -0
- package/lib-cjs/component/elements/resizer/SVGResizer.js +48 -0
- package/lib-cjs/component/elements/resizer/useResizer.js +71 -0
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +3 -14
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +2 -9
- package/lib-cjs/component/header/ManualPhaseCorrectionPanel.js +2 -9
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +2 -15
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +2 -9
- package/lib-cjs/component/header/Zones2DOptionPanel.js +2 -13
- package/lib-cjs/component/hooks/useExport.js +11 -9
- package/lib-cjs/component/{utility/FormatNumber.js → hooks/useFormatNumberByNucleus.js} +2 -12
- package/lib-cjs/component/hooks/usePanelPreferences.js +62 -0
- package/lib-cjs/component/loader/DefaultSpinnerComponent.js +2 -2
- package/lib-cjs/component/loader/DropZone.js +1 -0
- package/lib-cjs/component/loader/SpinnerContext.js +2 -2
- package/lib-cjs/component/modal/AlignSpectraModal.js +2 -1
- package/lib-cjs/component/modal/ExportAsMatrixModal.js +2 -1
- package/lib-cjs/component/modal/ImportPublicationStringModal.js +2 -1
- package/lib-cjs/component/modal/LoadJCAMPModal.js +7 -6
- package/lib-cjs/component/modal/ModalStyle.js +4 -26
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +29 -2
- package/lib-cjs/component/modal/MultipleSpectraFiltersModal/index.js +2 -1
- package/lib-cjs/component/modal/PredictSpectraModal.js +2 -7
- package/lib-cjs/component/modal/SaveAsModal.js +2 -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 +19 -13
- package/lib-cjs/component/modal/setting/GeneralSettings.js +4 -1
- package/lib-cjs/component/modal/setting/settingsValidation.js +72 -0
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignment.js +6 -4
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +13 -6
- package/lib-cjs/component/panels/AutomaticAssignment/useAutoAssignments.js +72 -0
- 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 +21 -7
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +61 -68
- package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +55 -60
- 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 +17 -11
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +6 -12
- 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 +18 -17
- 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/RangeAssignmentsColumn.js +2 -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/RangesPanel/hooks/useEditRangeModal.js +2 -2
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +3 -16
- 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/SummaryPanel/SummaryPanel.js +2 -2
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +2 -2
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +2 -2
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +3 -2
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +4 -4
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +2 -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 +23 -23
- 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/panels/header/SpectraAutomaticPickingButton.js +37 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionOptions.js +2 -18
- package/lib-cjs/component/reducer/Reducer.js +9 -2
- package/lib-cjs/component/reducer/actions/AssignmentsActions.js +21 -0
- package/lib-cjs/component/reducer/actions/LoadActions.js +10 -5
- 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 +6 -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 +16 -9
- 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 +17 -10
- 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/SpectraManager.js +23 -15
- package/lib-cjs/data/data1d/Data1DManager.js +6 -1
- 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/Spectrum1D/toJSON.js +1 -0
- 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 +6 -1
- package/lib-cjs/data/data2d/Spectrum2D/toJSON.js +1 -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 +49 -48
- package/lib/component/1d/Resizable.d.ts +0 -12
- package/lib/component/1d/Resizable.js +0 -105
- 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 -272
- package/lib/component/utility/FormatNumber.d.ts +0 -6
- package/lib-cjs/component/1d/Resizable.js +0 -110
- package/lib-cjs/component/panels/extra/preferences/defaultValues.js +0 -61
- package/lib-cjs/component/reducer/preferencesReducer.js +0 -279
|
@@ -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;
|
|
@@ -121,13 +121,13 @@ exports.exportAsMol = exportAsMol;
|
|
|
121
121
|
/**
|
|
122
122
|
* export the vitalization result as SVG, if you need to remove some content during exportation process enclose the the content with <!-- export-remove --> ${content} <!-- export-remove -->
|
|
123
123
|
*/
|
|
124
|
-
function exportAsSVG(elementID, fileName = 'experiment') {
|
|
125
|
-
const { blob } = getBlob(elementID);
|
|
124
|
+
function exportAsSVG(rootRef, elementID, fileName = 'experiment') {
|
|
125
|
+
const { blob } = getBlob(rootRef, elementID);
|
|
126
126
|
(0, file_saver_1.saveAs)(blob, `${fileName}.svg`);
|
|
127
127
|
}
|
|
128
128
|
exports.exportAsSVG = exportAsSVG;
|
|
129
|
-
function exportAsPng(elementID, fileName = 'experiment') {
|
|
130
|
-
const { blob, width, height } = getBlob(elementID);
|
|
129
|
+
function exportAsPng(rootRef, elementID, fileName = 'experiment') {
|
|
130
|
+
const { blob, width, height } = getBlob(rootRef, elementID);
|
|
131
131
|
try {
|
|
132
132
|
let canvas = document.createElement('canvas');
|
|
133
133
|
canvas.width = width;
|
|
@@ -180,8 +180,8 @@ function copyBlobToCliboard(canvas) {
|
|
|
180
180
|
});
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
|
-
function copyPNGToClipboard(elementID) {
|
|
184
|
-
const { blob, width, height } = getBlob(elementID);
|
|
183
|
+
function copyPNGToClipboard(rootRef, elementID) {
|
|
184
|
+
const { blob, width, height } = getBlob(rootRef, elementID);
|
|
185
185
|
try {
|
|
186
186
|
let canvas = document.createElement('canvas');
|
|
187
187
|
canvas.width = width;
|
|
@@ -217,14 +217,21 @@ function copyPNGToClipboard(elementID) {
|
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
exports.copyPNGToClipboard = copyPNGToClipboard;
|
|
220
|
-
function getBlob(elementID) {
|
|
221
|
-
|
|
222
|
-
|
|
220
|
+
function getBlob(rootRef, elementID) {
|
|
221
|
+
let _svg = rootRef.getRootNode()
|
|
222
|
+
.getElementById(elementID)
|
|
223
|
+
?.cloneNode(true);
|
|
223
224
|
const width = _svg?.getAttribute('width').replace('px', '');
|
|
224
225
|
const height = _svg?.getAttribute('height').replace('px', '');
|
|
225
226
|
_svg
|
|
226
227
|
.querySelectorAll('[data-no-export="true"]')
|
|
227
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
|
+
});
|
|
228
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">`;
|
|
229
236
|
const style = `<style>.grid line,.grid path{stroke:none;} .peaks-text{fill:#730000} .x path{stroke-width:1px} .x text{
|
|
230
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,21 +24,28 @@ 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: {
|
|
30
31
|
dimmedSpectraTransparency: 0.1,
|
|
31
32
|
},
|
|
32
33
|
formatting: {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
nucleusByKey: {},
|
|
34
|
+
nuclei: {
|
|
35
|
+
'1h': { name: '1H', ppm: '0.00', hz: '0.00' },
|
|
36
|
+
'13c': { name: '13C', ppm: '0.00', hz: '0.00' },
|
|
37
|
+
'15n': { name: '15N', ppm: '0.00', hz: '0.00' },
|
|
38
|
+
'19f': { name: '19F', ppm: '0.00', hz: '0.00' },
|
|
39
|
+
'29si': { name: '29Si', ppm: '0.00', hz: '0.00' },
|
|
40
|
+
'31p': { name: '31P', ppm: '0.00', hz: '0.00' },
|
|
41
|
+
},
|
|
42
42
|
panels: {},
|
|
43
43
|
},
|
|
44
|
+
databases: [
|
|
45
|
+
{
|
|
46
|
+
label: 'Toc',
|
|
47
|
+
url: 'https://data.cheminfo.org/nmr/database/toc.json',
|
|
48
|
+
enabled: true,
|
|
49
|
+
},
|
|
50
|
+
],
|
|
44
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
|
};
|
|
@@ -56,23 +56,27 @@ function addJcamp(spectra, jcamp, options, usedColors) {
|
|
|
56
56
|
if (entries.length === 0)
|
|
57
57
|
return;
|
|
58
58
|
// Should be improved when we have a more complex case
|
|
59
|
-
for (let
|
|
60
|
-
let
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
addJcampSS(spectra, entry, options, usedColors);
|
|
59
|
+
for (let index = 0; index < entries.length; index++) {
|
|
60
|
+
let entry = entries[index];
|
|
61
|
+
const components = entry.dependentVariables?.[0]?.components;
|
|
62
|
+
if (components && (components.length > 0 || components.z)) {
|
|
63
|
+
addJcampSS(spectra, { index, entry }, options, usedColors);
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
66
|
}
|
|
68
67
|
exports.addJcamp = addJcamp;
|
|
69
|
-
function addJcampSS(spectra,
|
|
70
|
-
const
|
|
71
|
-
if (
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
68
|
+
function addJcampSS(spectra, jcampDatum, options, usedColors) {
|
|
69
|
+
const source = options?.source || {};
|
|
70
|
+
if (!('jcampSpectrumIndex' in source) ||
|
|
71
|
+
source.jcampSpectrumIndex === jcampDatum.index) {
|
|
72
|
+
const dimension = jcampDatum.entry.info.dimension;
|
|
73
|
+
if (dimension === 1) {
|
|
74
|
+
spectra.push(Data1DManager.fromParsedJcamp(jcampDatum.entry, options, usedColors, jcampDatum.index));
|
|
75
|
+
}
|
|
76
|
+
if (dimension === 2) {
|
|
77
|
+
// console.log(options, jcampDatum.entry);
|
|
78
|
+
spectra.push(Data2DManager.fromParsedJcamp(jcampDatum.entry, options, usedColors, jcampDatum.index));
|
|
79
|
+
}
|
|
76
80
|
}
|
|
77
81
|
}
|
|
78
82
|
function addData(spectra, datum, usedColors) {
|
|
@@ -123,8 +127,12 @@ async function fromJSON(data = [], usedColors = {}) {
|
|
|
123
127
|
const spectra = [];
|
|
124
128
|
let promises = [];
|
|
125
129
|
for (let datum of data) {
|
|
126
|
-
|
|
127
|
-
|
|
130
|
+
const { jcamp, jcampURL } = datum?.source || {};
|
|
131
|
+
if (jcamp != null) {
|
|
132
|
+
addJcamp(spectra, jcamp, datum, usedColors);
|
|
133
|
+
}
|
|
134
|
+
else if (jcampURL != null) {
|
|
135
|
+
promises.push(addJcampFromURL(spectra, jcampURL, datum, usedColors));
|
|
128
136
|
}
|
|
129
137
|
else {
|
|
130
138
|
addData(spectra, datum, usedColors);
|
|
@@ -64,13 +64,18 @@ function fromCSD(result, options = {}, usedColors = {}) {
|
|
|
64
64
|
return datum1D;
|
|
65
65
|
}
|
|
66
66
|
exports.fromCSD = fromCSD;
|
|
67
|
-
function fromParsedJcamp(parsedJcamp, options, usedColors) {
|
|
67
|
+
function fromParsedJcamp(parsedJcamp, options, usedColors, jcampSpectrumIndex) {
|
|
68
68
|
const { dependentVariables, info, meta } = parsedJcamp;
|
|
69
69
|
let data = getData(dependentVariables[0].components);
|
|
70
70
|
if (Array.isArray(info.nucleus))
|
|
71
71
|
info.nucleus = info.nucleus[0];
|
|
72
72
|
const datum1D = (0, Spectrum1D_1.initiateDatum1D)({
|
|
73
73
|
...options,
|
|
74
|
+
source: { ...options.source, jcampSpectrumIndex },
|
|
75
|
+
display: {
|
|
76
|
+
...options.display,
|
|
77
|
+
name: options?.display?.name ? options.display.name : info?.title,
|
|
78
|
+
},
|
|
74
79
|
info,
|
|
75
80
|
meta,
|
|
76
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);
|
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fromCSD = exports.fromBruker = exports.fromParsedJcamp = void 0;
|
|
4
4
|
const Spectrum2D_1 = require("./Spectrum2D");
|
|
5
|
-
function fromParsedJcamp(parsedJcamp, options, usedColors) {
|
|
5
|
+
function fromParsedJcamp(parsedJcamp, options, usedColors, jcampSpectrumIndex) {
|
|
6
6
|
const { dependentVariables, info, meta } = parsedJcamp;
|
|
7
7
|
let data = dependentVariables[0].components;
|
|
8
8
|
const ob = (0, Spectrum2D_1.initiateDatum2D)({
|
|
9
9
|
...options,
|
|
10
|
+
source: { ...options?.source, jcampSpectrumIndex },
|
|
11
|
+
display: {
|
|
12
|
+
...options.display,
|
|
13
|
+
name: options?.display?.name ? options.display.name : info?.title,
|
|
14
|
+
},
|
|
10
15
|
info,
|
|
11
16
|
meta,
|
|
12
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;
|