nmrium 0.26.0 → 0.29.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/ExclusionZonesAnnotations.js +1 -1
- 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 +5 -9
- package/lib/component/1d/Line.d.ts +2 -2
- package/lib/component/1d/PeakAnnotation.js +7 -6
- package/lib/component/1d/PeakAnnotations.js +2 -4
- package/lib/component/1d/SpectraTracker.js +2 -2
- package/lib/component/1d/Viewer1D.js +1 -1
- 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 +63 -0
- package/lib/component/1d/{ResurrectedDatabaseRanges.d.ts → database/ResurrectedDatabaseRanges.d.ts} +0 -0
- package/lib/component/1d/{ResurrectedDatabaseRanges.js → database/ResurrectedDatabaseRanges.js} +17 -12
- 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 -2
- package/lib/component/1d/ranges/Range.js +17 -10
- package/lib/component/1d/ranges/Ranges.js +6 -4
- package/lib/component/1d/tool/BaseLineZones.js +3 -6
- package/lib/component/1d/tool/VerticalIndicator.js +1 -1
- package/lib/component/1d/tool/XLabelPointer.js +1 -1
- package/lib/component/2d/Chart2D.js +2 -1
- package/lib/component/2d/Contours.js +13 -14
- package/lib/component/2d/FooterBanner.js +1 -1
- package/lib/component/2d/SignalDeltaLine.js +1 -1
- package/lib/component/2d/Viewer2D.js +1 -1
- package/lib/component/2d/YAxis.js +2 -2
- 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/IndicationLines.js +2 -3
- package/lib/component/EventsTrackers/KeysListenerTracker.js +69 -45
- package/lib/component/NMRium.d.ts +15 -46
- package/lib/component/NMRium.js +20 -9
- 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 -54
- package/lib/component/context/PreferencesContext.js +1 -1
- package/lib/component/elements/Button.js +2 -2
- package/lib/component/elements/CheckBox.js +1 -1
- package/lib/component/elements/CheckBoxCell.d.ts +3 -0
- package/lib/component/elements/CheckBoxCell.js +8 -0
- 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/Logo.js +1 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +1 -0
- package/lib/component/elements/Select.d.ts +1 -0
- package/lib/component/elements/Select.js +21 -15
- package/lib/component/elements/Tab/Tabs.js +2 -1
- package/lib/component/elements/ToggleButton.d.ts +2 -1
- package/lib/component/elements/ToggleButton.js +4 -4
- package/lib/component/elements/accordion/Accordion.js +2 -6
- 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/FormikCheckBox.d.ts +2 -1
- package/lib/component/elements/formik/FormikCheckBox.js +4 -2
- 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/formik/Input.js +1 -1
- package/lib/component/elements/popup/Alert/Provider.js +1 -1
- package/lib/component/elements/popup/Modal/Modal.js +1 -1
- package/lib/component/elements/popup/Modal/ModalContent.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/elements/toggle/ToggleButtonGroup.js +2 -2
- package/lib/component/header/BaseLineCorrectionPanel.js +10 -6
- package/lib/component/header/Header.js +2 -2
- package/lib/component/header/ZeroFillingOptionsPanel.js +1 -1
- package/lib/component/hooks/useActiveSpectrumStyleOptions.js +2 -2
- package/lib/component/hooks/useCheckToolsVisibility.d.ts +2 -1
- package/lib/component/hooks/useCheckToolsVisibility.js +2 -1
- package/lib/component/hooks/useExport.d.ts +1 -1
- package/lib/component/hooks/useExport.js +2 -2
- package/lib/component/hooks/useFormatNumberByNucleus.d.ts +3 -0
- package/lib/component/{utility/FormatNumber.js → hooks/useFormatNumberByNucleus.js} +3 -13
- 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 +8 -2
- package/lib/component/loader/NoData.d.ts +3 -2
- package/lib/component/loader/NoData.js +31 -30
- 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 +24 -3
- package/lib/component/modal/changeSum/ChangeSumModal.js +2 -2
- package/lib/component/modal/editRange/EditRangeModal.d.ts +3 -3
- package/lib/component/modal/editRange/EditRangeModal.js +52 -56
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.d.ts +2 -0
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +11 -27
- package/lib/component/modal/editRange/forms/components/CouplingsTable.js +12 -50
- package/lib/component/modal/editRange/forms/components/SignalFormInfo.d.ts +2 -0
- package/lib/component/modal/editRange/forms/components/SignalFormInfo.js +34 -0
- package/lib/component/modal/editRange/forms/components/SignalFormTab.d.ts +1 -1
- package/lib/component/modal/editRange/forms/components/SignalFormTab.js +11 -14
- package/lib/component/modal/editRange/forms/components/SignalsForm.d.ts +5 -2
- package/lib/component/modal/editRange/forms/components/SignalsForm.js +29 -37
- package/lib/component/modal/editZone/SignalsForm.js +1 -1
- package/lib/component/modal/setting/DatabasesTabContent.d.ts +7 -0
- package/lib/component/modal/setting/DatabasesTabContent.js +73 -0
- package/lib/component/modal/setting/DisplayTabContent.d.ts +1 -5
- package/lib/component/modal/setting/DisplayTabContent.js +16 -21
- package/lib/component/modal/setting/FormattingTabContent.js +5 -5
- package/lib/component/modal/setting/GeneralSettings.js +20 -12
- package/lib/component/modal/setting/GeneralTabContent.d.ts +3 -0
- package/lib/component/modal/setting/{ControllersTabContent.js → GeneralTabContent.js} +3 -3
- package/lib/component/modal/setting/ToolsTabContent.d.ts +3 -0
- package/lib/component/modal/setting/ToolsTabContent.js +100 -0
- package/lib/component/modal/setting/settingsValidation.d.ts +156 -0
- package/lib/component/modal/setting/settingsValidation.js +35 -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 +14 -19
- 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 +17 -35
- 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/MoleculesPanel/useAtomAssignment.js +1 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleAnalysisCodeEditor.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +1 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +3 -3
- package/lib/component/panels/Panels.js +9 -7
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +4 -4
- 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 +27 -12
- package/lib/component/panels/RangesPanel/RangesPanel.js +22 -28
- 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.d.ts +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/format.js +2 -2
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.d.ts +4 -4
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +48 -30
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +3 -3
- package/lib/component/panels/SpectrumsPanel/base/ShowHideMarkersButton.js +1 -1
- 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/AdditionalColumnField.js +3 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +2 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +3 -3
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +6 -8
- package/lib/component/panels/SummaryPanel/utilities/Utilities.js +6 -8
- package/lib/component/panels/SummaryPanel/utilities/{IsInView.d.ts → useInView.d.ts} +2 -2
- package/lib/component/panels/SummaryPanel/utilities/{IsInView.js → useInView.js} +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.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/ZonesPanel.js +13 -13
- 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.d.ts +4 -0
- package/lib/component/panels/databasePanel/DatabasePanel.js +129 -42
- package/lib/component/panels/databasePanel/DatabasePreferences.js +10 -42
- package/lib/component/panels/databasePanel/DatabaseStructureSearchModal.d.ts +7 -0
- package/lib/component/panels/databasePanel/DatabaseStructureSearchModal.js +8 -0
- package/lib/component/panels/databasePanel/DatabaseTable.js +37 -20
- 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 +5 -7
- 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/DefaultPanelHeader.js +1 -3
- package/lib/component/panels/header/SpectraAutomaticPickingButton.js +1 -1
- package/lib/component/reducer/Reducer.d.ts +350 -95
- package/lib/component/reducer/Reducer.js +18 -9
- package/lib/component/reducer/actions/DatabaseActions.d.ts +3 -2
- package/lib/component/reducer/actions/DatabaseActions.js +21 -3
- package/lib/component/reducer/actions/DomainActions.js +1 -1
- package/lib/component/reducer/actions/FiltersActions.d.ts +2 -1
- package/lib/component/reducer/actions/FiltersActions.js +28 -4
- 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 +32 -20
- package/lib/component/reducer/actions/RangesActions.d.ts +2 -2
- package/lib/component/reducer/actions/RangesActions.js +45 -11
- package/lib/component/reducer/actions/SpectrumsActions.js +6 -9
- package/lib/component/reducer/actions/ToolsActions.js +67 -54
- package/lib/component/reducer/helper/getSpectrum.d.ts +5 -0
- package/lib/component/reducer/helper/getSpectrum.js +14 -0
- 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/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 +31 -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/preferences/preferencesReducer.d.ts +279 -0
- package/lib/component/reducer/preferences/preferencesReducer.js +77 -0
- package/lib/component/reducer/preferences/utilities/checkKeysExists.d.ts +1 -0
- package/lib/component/reducer/preferences/utilities/checkKeysExists.js +14 -0
- package/lib/component/reducer/preferences/utilities/filterObject.d.ts +1 -0
- package/lib/component/reducer/preferences/utilities/filterObject.js +7 -0
- package/lib/component/reducer/preferences/utilities/flatObject.d.ts +1 -0
- package/lib/component/reducer/preferences/utilities/flatObject.js +9 -0
- package/lib/component/reducer/preferences/utilities/getActiveWorkspace.d.ts +4 -0
- package/lib/component/reducer/preferences/utilities/getActiveWorkspace.js +3 -0
- package/lib/component/reducer/preferences/utilities/getPreferencesByWorkspace.d.ts +3 -0
- package/lib/component/reducer/preferences/utilities/getPreferencesByWorkspace.js +6 -0
- package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.d.ts +5 -0
- package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.js +8 -0
- package/lib/component/reducer/types/Types.d.ts +5 -1
- package/lib/component/reducer/types/Types.js +5 -1
- package/lib/component/tool/BrushX.js +1 -1
- package/lib/component/tool/BrushXY.js +1 -1
- package/lib/component/tool/CrossLinePointer.js +1 -1
- 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 +44 -0
- package/lib/component/tool/FloatMoleculeStructures/index.d.ts +15 -0
- package/lib/component/tool/FloatMoleculeStructures/index.js +28 -0
- package/lib/component/toolbar/BasicToolBar.js +0 -1
- package/lib/component/toolbar/FunctionToolBar.js +9 -13
- package/lib/component/toolbar/ToolTypes.d.ts +1 -1
- package/lib/component/toolbar/ToolTypes.js +3 -3
- package/lib/component/utility/Evaluate.js +1 -0
- package/lib/component/utility/Export.d.ts +7 -1
- package/lib/component/utility/Export.js +9 -3
- package/lib/component/utility/PathBuilder.js +2 -1
- package/lib/component/utility/formatNumber.d.ts +3 -0
- package/lib/component/utility/formatNumber.js +12 -0
- package/lib/component/utility/getUniqueNuclei.d.ts +1 -0
- package/lib/component/utility/getUniqueNuclei.js +10 -0
- package/lib/component/utility/isGoogleDocument.d.ts +1 -0
- package/lib/component/utility/isGoogleDocument.js +3 -0
- package/lib/component/utility/nmredataToNmrium.js +1 -2
- package/lib/component/utility/nmriumToNmredata.d.ts +2 -2
- package/lib/component/utility/nmriumToNmredata.js +2 -2
- package/lib/component/utility/util/nmredata/addSource.js +2 -2
- package/lib/component/workspaces/Workspace.d.ts +86 -6
- package/lib/component/workspaces/basic.d.ts +2 -2
- package/lib/component/workspaces/basic.js +18 -24
- package/lib/component/workspaces/embedded.d.ts +2 -0
- package/lib/component/workspaces/embedded.js +39 -0
- package/lib/component/workspaces/exercise.d.ts +2 -2
- package/lib/component/workspaces/exercise.js +4 -31
- package/lib/component/workspaces/index.d.ts +5 -4
- package/lib/component/workspaces/index.js +2 -1
- package/lib/component/workspaces/prediction.d.ts +2 -2
- package/lib/component/workspaces/prediction.js +19 -14
- package/lib/component/workspaces/process1D.d.ts +2 -2
- package/lib/component/workspaces/process1D.js +12 -16
- package/lib/component/workspaces/workspaceDefaultProperties.d.ts +2 -0
- package/lib/component/workspaces/workspaceDefaultProperties.js +71 -0
- package/lib/data/FiltersManager.js +1 -1
- package/lib/data/PredictionManager.js +7 -9
- package/lib/data/SpectraManager.d.ts +4 -12
- package/lib/data/SpectraManager.js +14 -23
- package/lib/data/data1d/Data1DManager.js +12 -1
- package/lib/data/data1d/MultipleAnalysis.js +1 -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/generateJGraphData.js +8 -10
- package/lib/data/data1d/Spectrum1D/get1DDataXY.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/getReferenceShift.js +1 -1
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +12 -12
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.js +5 -7
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/addRange.d.ts +36 -2
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +38 -15
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +2 -1
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +1 -1
- package/lib/data/data1d/database.d.ts +10 -13
- package/lib/data/data1d/database.js +59 -21
- 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/autoPhaseCorrection.js +1 -1
- 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 +2 -2
- 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/Processing2D.js +1 -1
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +14 -10
- 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 +6 -7
- package/lib/data/molecules/Molecule.js +9 -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/data/utilities/FindUtilities.js +1 -3
- package/lib/data/utilities/RangeUtilities.js +5 -6
- package/lib/data/utilities/ZoneUtilities.js +1 -1
- package/lib/data/utilities/getSum.js +1 -3
- package/lib/data/utilities/isMolFileEmpty.d.ts +1 -0
- package/lib/data/utilities/isMolFileEmpty.js +6 -0
- package/lib/types/NMRiumDataReturn.d.ts +15 -0
- package/lib/types/NMRiumDataReturn.js +1 -0
- package/lib/types/NMRiumGeneralPreferences.d.ts +10 -0
- package/lib/types/NMRiumGeneralPreferences.js +1 -0
- package/lib/types/NMRiumPanelPreferences.d.ts +16 -0
- package/lib/types/NMRiumPanelPreferences.js +1 -0
- package/lib/types/NMRiumToolBarPreferences.d.ts +20 -0
- package/lib/types/NMRiumToolBarPreferences.js +1 -0
- package/lib/types/PanelPreferencesType.d.ts +1 -7
- package/lib/types/Preferences.d.ts +5 -0
- package/lib/types/Preferences.js +1 -0
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/Chart1D.js +3 -2
- package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +1 -1
- 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 +5 -9
- package/lib-cjs/component/1d/PeakAnnotation.js +7 -6
- package/lib-cjs/component/1d/PeakAnnotations.js +2 -4
- package/lib-cjs/component/1d/SpectraTracker.js +2 -2
- package/lib-cjs/component/1d/Viewer1D.js +1 -1
- package/lib-cjs/component/1d/database/DatabaseElements.js +23 -0
- package/lib-cjs/component/1d/database/DatabaseSpectrum.js +68 -0
- package/lib-cjs/component/1d/{ResurrectedDatabaseRanges.js → database/ResurrectedDatabaseRanges.js} +17 -12
- 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 -10
- package/lib-cjs/component/1d/ranges/Ranges.js +6 -4
- package/lib-cjs/component/1d/tool/BaseLineZones.js +3 -6
- package/lib-cjs/component/1d/tool/VerticalIndicator.js +1 -1
- 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 +13 -14
- package/lib-cjs/component/2d/FooterBanner.js +2 -2
- package/lib-cjs/component/2d/SignalDeltaLine.js +1 -1
- package/lib-cjs/component/2d/Viewer2D.js +1 -1
- package/lib-cjs/component/2d/YAxis.js +1 -1
- package/lib-cjs/component/2d/tools/XYLabelPointer.js +2 -2
- package/lib-cjs/component/2d/zones/IndicationLines.js +2 -3
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +69 -45
- package/lib-cjs/component/NMRium.js +18 -7
- 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 +2 -2
- package/lib-cjs/component/elements/CheckBox.js +1 -1
- package/lib-cjs/component/elements/CheckBoxCell.js +15 -0
- 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/Logo.js +1 -1
- package/lib-cjs/component/elements/ReactTable/Elements/ReactTableRow.js +1 -0
- package/lib-cjs/component/elements/Select.js +20 -14
- package/lib-cjs/component/elements/Tab/Tabs.js +2 -1
- package/lib-cjs/component/elements/ToggleButton.js +4 -4
- package/lib-cjs/component/elements/accordion/Accordion.js +2 -6
- 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/FormikCheckBox.js +4 -2
- 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/formik/Input.js +1 -1
- package/lib-cjs/component/elements/popup/Alert/Provider.js +1 -1
- package/lib-cjs/component/elements/popup/Modal/Modal.js +1 -1
- package/lib-cjs/component/elements/popup/Modal/ModalContent.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/elements/toggle/ToggleButtonGroup.js +2 -2
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +9 -5
- package/lib-cjs/component/header/Header.js +2 -2
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +1 -1
- package/lib-cjs/component/hooks/useActiveSpectrumStyleOptions.js +2 -2
- package/lib-cjs/component/hooks/useCheckToolsVisibility.js +2 -1
- package/lib-cjs/component/hooks/useExport.js +2 -2
- package/lib-cjs/component/{utility/FormatNumber.js → hooks/useFormatNumberByNucleus.js} +3 -14
- 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 +8 -2
- package/lib-cjs/component/loader/NoData.js +31 -30
- package/lib-cjs/component/loader/SpinnerContext.js +2 -2
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +26 -3
- package/lib-cjs/component/modal/changeSum/ChangeSumModal.js +2 -2
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +50 -54
- package/lib-cjs/component/modal/editRange/forms/components/AddSignalFormTab.js +11 -27
- package/lib-cjs/component/modal/editRange/forms/components/CouplingsTable.js +12 -50
- package/lib-cjs/component/modal/editRange/forms/components/SignalFormInfo.js +38 -0
- package/lib-cjs/component/modal/editRange/forms/components/SignalFormTab.js +13 -16
- package/lib-cjs/component/modal/editRange/forms/components/SignalsForm.js +29 -37
- package/lib-cjs/component/modal/editZone/SignalsForm.js +1 -1
- package/lib-cjs/component/modal/setting/DatabasesTabContent.js +78 -0
- package/lib-cjs/component/modal/setting/DisplayTabContent.js +16 -21
- package/lib-cjs/component/modal/setting/FormattingTabContent.js +4 -4
- package/lib-cjs/component/modal/setting/GeneralSettings.js +20 -12
- package/lib-cjs/component/modal/setting/{ControllersTabContent.js → GeneralTabContent.js} +3 -3
- package/lib-cjs/component/modal/setting/ToolsTabContent.js +105 -0
- package/lib-cjs/component/modal/setting/settingsValidation.js +35 -27
- package/lib-cjs/component/panels/AutomaticAssignment/useAutoAssignments.js +10 -5
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +13 -18
- 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 +17 -35
- 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/MoleculesPanel/useAtomAssignment.js +1 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +1 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +2 -2
- package/lib-cjs/component/panels/Panels.js +9 -7
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +5 -5
- 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 +25 -10
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +21 -27
- 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/RangesPanel/hooks/useEditRangeModal.js +47 -29
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideMarkersButton.js +1 -1
- 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/AdditionalColumnField.js +3 -3
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +3 -3
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +6 -8
- package/lib-cjs/component/panels/SummaryPanel/utilities/Utilities.js +6 -8
- package/lib-cjs/component/panels/SummaryPanel/utilities/{IsInView.js → useInView.js} +2 -2
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +3 -2
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +12 -12
- 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 +128 -41
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +10 -42
- package/lib-cjs/component/panels/databasePanel/DatabaseStructureSearchModal.js +15 -0
- package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +36 -19
- package/lib-cjs/component/panels/extra/placeholder/NoTableData.js +2 -2
- package/lib-cjs/component/panels/extra/preferences/ColumnsHelper.js +5 -7
- 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/DefaultPanelHeader.js +1 -3
- package/lib-cjs/component/panels/header/SpectraAutomaticPickingButton.js +1 -1
- package/lib-cjs/component/reducer/Reducer.js +18 -9
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +22 -3
- package/lib-cjs/component/reducer/actions/DomainActions.js +1 -1
- package/lib-cjs/component/reducer/actions/FiltersActions.js +29 -4
- 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 +30 -18
- package/lib-cjs/component/reducer/actions/RangesActions.js +46 -12
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +4 -7
- package/lib-cjs/component/reducer/actions/ToolsActions.js +64 -74
- package/lib-cjs/component/reducer/helper/getSpectrum.js +18 -0
- 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/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 +84 -0
- package/lib-cjs/component/reducer/preferences/utilities/checkKeysExists.js +18 -0
- package/lib-cjs/component/reducer/preferences/utilities/filterObject.js +11 -0
- package/lib-cjs/component/reducer/preferences/utilities/flatObject.js +13 -0
- package/lib-cjs/component/reducer/preferences/utilities/getActiveWorkspace.js +7 -0
- package/lib-cjs/component/reducer/preferences/utilities/getPreferencesByWorkspace.js +13 -0
- package/lib-cjs/component/reducer/preferences/utilities/mapNucleiFormatting.js +12 -0
- package/lib-cjs/component/reducer/types/Types.js +8 -4
- package/lib-cjs/component/tool/BrushX.js +1 -1
- package/lib-cjs/component/tool/BrushXY.js +1 -1
- package/lib-cjs/component/tool/CrossLinePointer.js +1 -1
- package/lib-cjs/component/tool/FloatMoleculeStructures/ActionsButton.js +13 -0
- package/lib-cjs/component/tool/FloatMoleculeStructures/DraggableStructure.js +51 -0
- package/lib-cjs/component/tool/FloatMoleculeStructures/index.js +36 -0
- package/lib-cjs/component/toolbar/BasicToolBar.js +0 -1
- package/lib-cjs/component/toolbar/FunctionToolBar.js +9 -13
- package/lib-cjs/component/toolbar/ToolTypes.js +3 -3
- package/lib-cjs/component/utility/Evaluate.js +1 -0
- package/lib-cjs/component/utility/Export.js +10 -3
- package/lib-cjs/component/utility/PathBuilder.js +2 -1
- package/lib-cjs/component/utility/formatNumber.js +19 -0
- package/lib-cjs/component/utility/getUniqueNuclei.js +14 -0
- package/lib-cjs/component/utility/isGoogleDocument.js +7 -0
- package/lib-cjs/component/utility/nmredataToNmrium.js +1 -2
- package/lib-cjs/component/utility/util/nmredata/addSource.js +2 -2
- package/lib-cjs/component/workspaces/basic.js +18 -24
- package/lib-cjs/component/workspaces/embedded.js +42 -0
- package/lib-cjs/component/workspaces/exercise.js +4 -31
- package/lib-cjs/component/workspaces/index.js +2 -1
- package/lib-cjs/component/workspaces/prediction.js +19 -14
- package/lib-cjs/component/workspaces/process1D.js +12 -16
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +74 -0
- package/lib-cjs/data/FiltersManager.js +1 -1
- package/lib-cjs/data/PredictionManager.js +7 -9
- package/lib-cjs/data/SpectraManager.js +14 -23
- package/lib-cjs/data/data1d/Data1DManager.js +12 -1
- package/lib-cjs/data/data1d/MultipleAnalysis.js +1 -0
- package/lib-cjs/data/data1d/Spectrum1D/convertDataToFloat64Array.js +14 -0
- package/lib-cjs/data/data1d/Spectrum1D/generateJGraphData.js +8 -10
- package/lib-cjs/data/data1d/Spectrum1D/getReferenceShift.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +12 -12
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateRelatives.js +5 -7
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +40 -16
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectSignal.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +2 -1
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +1 -1
- package/lib-cjs/data/data1d/database.js +60 -23
- package/lib-cjs/data/data1d/filter1d/autoPhaseCorrection.js +1 -1
- 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 +2 -2
- 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/Processing2D.js +1 -1
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +14 -10
- 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 +9 -1
- package/lib-cjs/data/molecules/MoleculeManager.js +37 -3
- package/lib-cjs/data/utilities/FindUtilities.js +1 -3
- package/lib-cjs/data/utilities/RangeUtilities.js +8 -6
- package/lib-cjs/data/utilities/ZoneUtilities.js +1 -1
- package/lib-cjs/data/utilities/getSum.js +1 -3
- package/lib-cjs/data/utilities/isMolFileEmpty.js +10 -0
- package/lib-cjs/types/NMRiumDataReturn.js +2 -0
- package/lib-cjs/types/NMRiumGeneralPreferences.js +2 -0
- package/lib-cjs/types/NMRiumPanelPreferences.js +2 -0
- package/lib-cjs/types/NMRiumToolBarPreferences.js +2 -0
- package/lib-cjs/types/Preferences.js +2 -0
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +53 -50
- package/lib/component/1d/multiplicityTree/TempMultiplicityTree.d.ts +0 -2
- package/lib/component/1d/multiplicityTree/TempMultiplicityTree.js +0 -14
- package/lib/component/elements/resizer/useDraggable.js +0 -52
- package/lib/component/modal/setting/ControllersTabContent.d.ts +0 -3
- 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.d.ts +0 -184
- package/lib/component/reducer/preferencesReducer.js +0 -269
- package/lib/component/utility/FormatNumber.d.ts +0 -6
- package/lib-cjs/component/1d/multiplicityTree/TempMultiplicityTree.js +0 -20
- 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,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.databaseDefaultValues = exports.getZoneDefaultValues = exports.getRangeDefaultValues = exports.getIntegralDefaultValues = exports.getPeaksDefaultValues = void 0;
|
|
4
|
+
function getPreferences(data, nucleus) {
|
|
5
|
+
return { nuclei: { ...(nucleus ? { [nucleus]: data } : {}) } };
|
|
6
|
+
}
|
|
7
|
+
const getIntegralDefaultValues = (nucleus) => {
|
|
8
|
+
const preferences = {
|
|
9
|
+
absolute: { show: false, format: '0.00' },
|
|
10
|
+
relative: { show: true, format: '0.00' },
|
|
11
|
+
color: '#000000',
|
|
12
|
+
strokeWidth: 1,
|
|
13
|
+
};
|
|
14
|
+
return getPreferences(preferences, nucleus);
|
|
15
|
+
};
|
|
16
|
+
exports.getIntegralDefaultValues = getIntegralDefaultValues;
|
|
17
|
+
const getZoneDefaultValues = (nucleus) => ({
|
|
18
|
+
absolute: { show: false, format: '0.00' },
|
|
19
|
+
relative: { show: true, format: '0.00' },
|
|
20
|
+
...getPreferences({ deltaPPM: { show: true, format: '0.00' } }, nucleus),
|
|
21
|
+
});
|
|
22
|
+
exports.getZoneDefaultValues = getZoneDefaultValues;
|
|
23
|
+
const getRangeDefaultValues = (nucleus) => {
|
|
24
|
+
const preferences = {
|
|
25
|
+
from: { show: false, format: '0.00' },
|
|
26
|
+
to: { show: false, format: '0.00' },
|
|
27
|
+
absolute: { show: false, format: '0.00' },
|
|
28
|
+
relative: { show: true, format: '0.00' },
|
|
29
|
+
deltaPPM: { show: true, format: '0.00' },
|
|
30
|
+
deltaHz: { show: false, format: '0.00' },
|
|
31
|
+
coupling: { show: true, format: '0.00' },
|
|
32
|
+
jGraphTolerance: nucleus === '1H' ? 0.2 : nucleus === '13C' ? 2 : 0,
|
|
33
|
+
showKind: true,
|
|
34
|
+
};
|
|
35
|
+
return getPreferences(preferences, nucleus);
|
|
36
|
+
};
|
|
37
|
+
exports.getRangeDefaultValues = getRangeDefaultValues;
|
|
38
|
+
const getPeaksDefaultValues = (nucleus) => {
|
|
39
|
+
const preferences = {
|
|
40
|
+
peakNumber: { show: true, format: '0' },
|
|
41
|
+
deltaPPM: { show: true, format: '0.00' },
|
|
42
|
+
deltaHz: { show: false, format: '0.00' },
|
|
43
|
+
peakWidth: { show: false, format: '0.00' },
|
|
44
|
+
intensity: { show: true, format: '0.00' },
|
|
45
|
+
};
|
|
46
|
+
return getPreferences(preferences, nucleus);
|
|
47
|
+
};
|
|
48
|
+
exports.getPeaksDefaultValues = getPeaksDefaultValues;
|
|
49
|
+
const databaseDefaultValues = {
|
|
50
|
+
previewJcamp: true,
|
|
51
|
+
showSmiles: true,
|
|
52
|
+
showSolvent: false,
|
|
53
|
+
showNames: true,
|
|
54
|
+
range: { show: false, format: '0.00' },
|
|
55
|
+
delta: { show: true, format: '0.00' },
|
|
56
|
+
showAssignment: false,
|
|
57
|
+
coupling: { show: true, format: '0.0' },
|
|
58
|
+
showMultiplicity: true,
|
|
59
|
+
color: '#C0B000',
|
|
60
|
+
marginBottom: 30,
|
|
61
|
+
};
|
|
62
|
+
exports.databaseDefaultValues = databaseDefaultValues;
|
|
@@ -0,0 +1,84 @@
|
|
|
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.initPreferencesState = exports.preferencesInitialState = exports.WORKSPACES = void 0;
|
|
7
|
+
const immer_1 = require("immer");
|
|
8
|
+
const LocalStorage_1 = require("../../utility/LocalStorage");
|
|
9
|
+
const workspaces_1 = __importDefault(require("../../workspaces"));
|
|
10
|
+
const addWorkspace_1 = require("./actions/addWorkspace");
|
|
11
|
+
const initPreferences_1 = require("./actions/initPreferences");
|
|
12
|
+
const removeWorkspace_1 = require("./actions/removeWorkspace");
|
|
13
|
+
const setPanelsPreferences_1 = require("./actions/setPanelsPreferences");
|
|
14
|
+
const setPreferences_1 = require("./actions/setPreferences");
|
|
15
|
+
const setWorkspace_1 = require("./actions/setWorkspace");
|
|
16
|
+
const LOCAL_STORAGE_VERSION = 9;
|
|
17
|
+
exports.WORKSPACES = [
|
|
18
|
+
{
|
|
19
|
+
key: 'default',
|
|
20
|
+
label: workspaces_1.default.default.label,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
key: 'process1D',
|
|
24
|
+
label: workspaces_1.default.process1D.label,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
key: 'exercise',
|
|
28
|
+
label: workspaces_1.default.exercise.label,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
key: 'prediction',
|
|
32
|
+
label: workspaces_1.default.prediction.label,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
key: 'embedded',
|
|
36
|
+
label: workspaces_1.default.embedded.label,
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
exports.preferencesInitialState = {
|
|
40
|
+
version: LOCAL_STORAGE_VERSION,
|
|
41
|
+
workspaces: {},
|
|
42
|
+
dispatch: () => null,
|
|
43
|
+
workspace: {
|
|
44
|
+
current: 'default',
|
|
45
|
+
base: null,
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
function initPreferencesState(state) {
|
|
49
|
+
const nmrLocalStorageVersion = (0, LocalStorage_1.getLocalStorage)('nmr-local-storage-version', false);
|
|
50
|
+
let localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
|
|
51
|
+
// remove old nmr-local-storage-version key
|
|
52
|
+
if (nmrLocalStorageVersion && localData?.version) {
|
|
53
|
+
(0, LocalStorage_1.removeData)('nmr-local-storage-version');
|
|
54
|
+
}
|
|
55
|
+
// if the local setting version != current settings version number
|
|
56
|
+
if (!localData?.version || localData?.version !== LOCAL_STORAGE_VERSION) {
|
|
57
|
+
(0, LocalStorage_1.removeData)('nmr-general-settings');
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
...state,
|
|
61
|
+
workspaces: localData?.workspaces || { default: workspaces_1.default.default },
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
exports.initPreferencesState = initPreferencesState;
|
|
65
|
+
function innerPreferencesReducer(draft, action) {
|
|
66
|
+
switch (action.type) {
|
|
67
|
+
case 'INIT_PREFERENCES':
|
|
68
|
+
return (0, initPreferences_1.initPreferences)(draft, action);
|
|
69
|
+
case 'SET_PREFERENCES':
|
|
70
|
+
return (0, setPreferences_1.setPreferences)(draft, action);
|
|
71
|
+
case 'SET_PANELS_PREFERENCES':
|
|
72
|
+
return (0, setPanelsPreferences_1.setPanelsPreferences)(draft, action);
|
|
73
|
+
case 'SET_WORKSPACE':
|
|
74
|
+
return (0, setWorkspace_1.setWorkspace)(draft, action);
|
|
75
|
+
case 'ADD_WORKSPACE':
|
|
76
|
+
return (0, addWorkspace_1.addWorkspace)(draft, action);
|
|
77
|
+
case 'REMOVE_WORKSPACE':
|
|
78
|
+
return (0, removeWorkspace_1.removeWorkspace)(draft, action);
|
|
79
|
+
default:
|
|
80
|
+
return draft;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const preferencesReducer = (0, immer_1.produce)(innerPreferencesReducer);
|
|
84
|
+
exports.default = preferencesReducer;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkKeysExists = void 0;
|
|
4
|
+
const flatObject_1 = require("./flatObject");
|
|
5
|
+
function checkKeysExists(sourceObject, targetObject) {
|
|
6
|
+
const source = (0, flatObject_1.flatObject)(sourceObject);
|
|
7
|
+
const target = (0, flatObject_1.flatObject)(targetObject);
|
|
8
|
+
if (Object.keys(target).length === 0) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
for (const [key, value] of Object.entries(source)) {
|
|
12
|
+
if (!target[key] || target[key] !== value) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
exports.checkKeysExists = checkKeysExists;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.filterObject = void 0;
|
|
4
|
+
function filterObject(data) {
|
|
5
|
+
return JSON.parse(JSON.stringify(data), (key, value) => {
|
|
6
|
+
if (value?.hidden !== true) {
|
|
7
|
+
return value;
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
exports.filterObject = filterObject;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.flatObject = void 0;
|
|
4
|
+
function flatObject(data) {
|
|
5
|
+
let result = {};
|
|
6
|
+
JSON.parse(JSON.stringify(data), (key, value) => {
|
|
7
|
+
if (value?.hidden !== true && key) {
|
|
8
|
+
result[key] = result[key]++ || 1;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
return result;
|
|
12
|
+
}
|
|
13
|
+
exports.flatObject = flatObject;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getActiveWorkspace = void 0;
|
|
4
|
+
function getActiveWorkspace(draft) {
|
|
5
|
+
return draft.workspaces[draft.workspace.current || 'default'];
|
|
6
|
+
}
|
|
7
|
+
exports.getActiveWorkspace = getActiveWorkspace;
|
|
@@ -0,0 +1,13 @@
|
|
|
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.getPreferencesByWorkspace = void 0;
|
|
7
|
+
const merge_1 = __importDefault(require("lodash/merge"));
|
|
8
|
+
const workspaces_1 = __importDefault(require("../../../workspaces"));
|
|
9
|
+
const workspaceDefaultProperties_1 = require("../../../workspaces/workspaceDefaultProperties");
|
|
10
|
+
function getPreferencesByWorkspace(workspace) {
|
|
11
|
+
return (0, merge_1.default)({}, workspaceDefaultProperties_1.workspaceDefaultProperties, workspaces_1.default?.[workspace]);
|
|
12
|
+
}
|
|
13
|
+
exports.getPreferencesByWorkspace = getPreferencesByWorkspace;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mapNucleiFormatting = void 0;
|
|
4
|
+
function mapNucleiFormatting(formatting) {
|
|
5
|
+
const { nuclei, ...res } = formatting;
|
|
6
|
+
const _nuclei = Object.keys(nuclei).reduce((nucleusFormatting, key) => {
|
|
7
|
+
nucleusFormatting[nuclei[key].name.trim().toLowerCase()] = nuclei[key];
|
|
8
|
+
return nucleusFormatting;
|
|
9
|
+
}, {});
|
|
10
|
+
return { nuclei: _nuclei, ...res };
|
|
11
|
+
}
|
|
12
|
+
exports.mapNucleiFormatting = mapNucleiFormatting;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.SET_AUTOMATIC_ASSIGNMENTS = exports.SHOW_J_GRAPH = exports.RESURRECTING_SPECTRUM_FROM_RANGES = exports.GENERATE_SPECTRUM_FROM_PUBLICATION_STRING = exports.AUTO_ZONES_SPECTRA_PICKING = exports.AUTO_RANGES_SPECTRA_PICKING = exports.SHOW_RANGES_INTEGRALS = exports.SHOW_MULTIPLICTY_TREES = exports.
|
|
3
|
+
exports.APPLY_FFT_FILTER = exports.APPLY_ZERO_FILLING_FILTER = exports.DELETE_SPECTRA_FILTER = exports.DELETE_FILTER = exports.ENABLE_FILTER = exports.RESET_DOMAIN = exports.BRUSH_END = exports.RESIZE_INTEGRAL = exports.CHANGE_SPECTRUM_DISPLAY_VIEW_MODE = exports.DELETE_SPECTRA = exports.SET_CORRELATIONS_TOLERANCE = exports.SET_CORRELATIONS_MF = exports.DELETE_CORRELATION = exports.SET_CORRELATIONS = exports.SET_CORRELATION = exports.CHANGE_MOLECULE_LABEL = exports.FLOAT_MOLECULE_OVER_SPECTRUM = exports.DELETE_MOLECULE = exports.SET_MOLECULE = exports.ADD_MOLECULE = exports.SET_ZOOM = exports.TOGGLE_REAL_IMAGINARY_VISIBILITY = exports.DELETE_INTEGRAL = exports.ADD_INTEGRAL = exports.CHANGE_SPECTRUM_COLOR = exports.CHANGE_ACTIVE_SPECTRUM = exports.CHANGE_PEAKS_MARKERS_VISIBILITY = exports.CHANGE_VISIBILITY = exports.FULL_ZOOM_OUT = exports.CHANGE_SPECTRUM_TYPE = exports.CHANGE_SPECTRUM_SETTING = exports.SET_SELECTED_FILTER = exports.SET_SELECTED_TOOL = exports.SET_DIMENSIONS = exports.SET_WIDTH = exports.SET_ORIGINAL_DOMAIN = exports.SET_Y_DOMAIN = exports.SET_X_DOMAIN = exports.SHIFT_SPECTRUM = exports.DELETE_PEAK_NOTATION = exports.ADD_PEAKS = exports.ADD_PEAK = exports.LOAD_JDF_FILE = exports.LOAD_ZIP_FILE = exports.LOAD_MOL_FILE = exports.LOAD_NMREDATA_FILE = exports.LOAD_JCAMP_FILE = exports.LOAD_JSON_FILE = exports.SAVE_DATA_AS_JSON = exports.INITIATE = void 0;
|
|
4
|
+
exports.SAVE_EDITED_ZONE = exports.CHANGE_ZONE_SIGNAL_KIND = exports.CHANGE_ZONE_SIGNAL_VALUE = exports.ALIGN_SPECTRA = exports.FILTER_SPECTRA_COLUMN = exports.SET_ANALYZE_SPECTRA_COLUMNS = exports.RESIZE_ANALYZE_SPECTRA_RANGE = exports.DELETE_ANALYZE_SPECTRA_RANGE = exports.ANALYZE_SPECTRA = exports.CHANGE_INTEGRAL_RELATIVE = exports.SET_DIAID_RANGE = exports.UNLINK_RANGE = exports.SAVE_EDITED_RANGE = exports.CHANGE_RANGE_SIGNAL_KIND = exports.CHANGE_RANGE_SIGNAL_VALUE = exports.CHANGE_RANGE_RELATIVE = exports.SET_FILTER_SNAPSHOT = exports.ADD_MISSING_PROJECTION = exports.SET_2D_SIGNAL_PATH_LENGTH = exports.DELETE_2D_SIGNAL = exports.DELETE_2D_ZONE = exports.ADD_2D_ZONE = exports.SET_2D_LEVEL = exports.ADD_RANGE = exports.CHANGE_RANGE_SUM = exports.RESIZE_RANGE = exports.APPLY_KEY_PREFERENCES = exports.SET_KEY_PREFERENCES = exports.APPLY_BASE_LINE_CORRECTION_FILTER = exports.DELETE_BASE_LINE_ZONE = exports.ADD_BASE_LINE_ZONE = exports.CHANGE_INTEGRAL_SUM = exports.SET_ACTIVE_TAB = exports.CHANGE_INTEGRAL_DATA = exports.SAVE_AS_SVG = exports.SET_SPECTRUMS_VERTICAL_ALIGN = exports.RESET_SELECTED_TOOL = exports.SET_LOADING_FLAG = exports.SET_SELECTED_OPTIONS_PANEL = exports.DELETE_1D_SIGNAL = exports.DELETE_RANGE = exports.AUTO_ZONES_DETECTION = exports.AUTO_RANGES_DETECTION = exports.AUTO_PEAK_PICKING = exports.SET_VERTICAL_INDICATOR_X_POSITION = exports.APPLY_ABSOLUTE_FILTER = exports.APPLY_AUTO_PHASE_CORRECTION_FILTER = exports.APPLY_MANUAL_PHASE_CORRECTION_FILTER = exports.CALCULATE_BASE_LINE_CORRECTION_FILTER = exports.CALCULATE_MANUAL_PHASE_CORRECTION_FILTER = void 0;
|
|
5
|
+
exports.SET_AUTOMATIC_ASSIGNMENTS = exports.SHOW_J_GRAPH = exports.RESURRECTING_SPECTRUM_FROM_JCAMP = exports.RESURRECTING_SPECTRUM_FROM_RANGES = exports.GENERATE_SPECTRUM_FROM_PUBLICATION_STRING = exports.AUTO_ZONES_SPECTRA_PICKING = exports.AUTO_RANGES_SPECTRA_PICKING = exports.SHOW_RANGES_INTEGRALS = exports.SHOW_MULTIPLICTY_TREES = exports.UPDATE_RANGE = exports.CHANGE_ZONES_NOISE_FACTOR = exports.CHANGE_INTEGRALS_SUM_FLAG = exports.CHANGE_RANGES_SUM_FLAG = exports.DELETE_EXCLUSION_ZONE = exports.ADD_EXCLUSION_ZONE = exports.APPLY_MULTIPLE_SPECTRA_FILTER = exports.SET_MOUSE_OVER_DISPLAYER = exports.RESET_SPECTRA_SCALE = exports.SET_SPECTRA_SAME_TOP = exports.PREDICT_SPECTRA = exports.SET_DIAID_ZONE = exports.UNLINK_ZONE = void 0;
|
|
6
6
|
exports.INITIATE = 'INITIATE';
|
|
7
7
|
exports.SAVE_DATA_AS_JSON = 'SAVE_DATA_AS_JSON';
|
|
8
8
|
exports.LOAD_JSON_FILE = 'LOAD_JSON_FILE';
|
|
@@ -36,6 +36,8 @@ exports.SET_ZOOM = 'SET_ZOOM';
|
|
|
36
36
|
exports.ADD_MOLECULE = 'ADD_MOLECULE';
|
|
37
37
|
exports.SET_MOLECULE = 'SET_MOLECULE';
|
|
38
38
|
exports.DELETE_MOLECULE = 'DELETE_MOLECULE';
|
|
39
|
+
exports.FLOAT_MOLECULE_OVER_SPECTRUM = 'FLOAT_MOLECULE_OVER_SPECTRUM';
|
|
40
|
+
exports.CHANGE_MOLECULE_LABEL = 'CHANGE_MOLECULE_LABEL';
|
|
39
41
|
exports.SET_CORRELATION = 'SET_CORRELATION';
|
|
40
42
|
exports.SET_CORRELATIONS = 'SET_CORRELATIONS';
|
|
41
43
|
exports.DELETE_CORRELATION = 'DELETE_CORRELATION';
|
|
@@ -52,6 +54,7 @@ exports.DELETE_SPECTRA_FILTER = 'DELETE_SPECTRA_FILTER';
|
|
|
52
54
|
exports.APPLY_ZERO_FILLING_FILTER = 'APPLY_ZERO_FILLING_FILTER';
|
|
53
55
|
exports.APPLY_FFT_FILTER = 'APPLY_FFT_FILTER';
|
|
54
56
|
exports.CALCULATE_MANUAL_PHASE_CORRECTION_FILTER = 'CALCULATE_MANUAL_PHASE_CORRECTION_FILTER';
|
|
57
|
+
exports.CALCULATE_BASE_LINE_CORRECTION_FILTER = 'CALCULATE_BASE_LINE_CORRECTION_FILTER';
|
|
55
58
|
exports.APPLY_MANUAL_PHASE_CORRECTION_FILTER = 'APPLY_MANUAL_PHASE_CORRECTION_FILTER';
|
|
56
59
|
exports.APPLY_AUTO_PHASE_CORRECTION_FILTER = 'APPLY_AUTO_PHASE_CORRECTION_FILTER';
|
|
57
60
|
exports.APPLY_ABSOLUTE_FILTER = 'APPLY_ABSOLUTE_FILTER';
|
|
@@ -112,12 +115,13 @@ exports.DELETE_EXCLUSION_ZONE = 'DELETE_EXCLUSION_ZONE';
|
|
|
112
115
|
exports.CHANGE_RANGES_SUM_FLAG = 'CHANGE_RANGES_SUM_FLAG';
|
|
113
116
|
exports.CHANGE_INTEGRALS_SUM_FLAG = 'CHANGE_INTEGRALS_SUM_FLAG';
|
|
114
117
|
exports.CHANGE_ZONES_NOISE_FACTOR = 'CHANGE_ZONES_NOISE_FACTOR';
|
|
115
|
-
exports.
|
|
118
|
+
exports.UPDATE_RANGE = 'UPDATE_RANGE';
|
|
116
119
|
exports.SHOW_MULTIPLICTY_TREES = 'SHOW_MULTIPLICTY_TREES';
|
|
117
120
|
exports.SHOW_RANGES_INTEGRALS = 'SHOW_RANGES_INTEGRALS';
|
|
118
121
|
exports.AUTO_RANGES_SPECTRA_PICKING = 'AUTO_RANGES_SPECTRA_PICKING';
|
|
119
122
|
exports.AUTO_ZONES_SPECTRA_PICKING = 'AUTO_ZONES_SPECTRA_PICKING';
|
|
120
123
|
exports.GENERATE_SPECTRUM_FROM_PUBLICATION_STRING = 'GENERATE_SPECTRUM_FROM_PUBLICATION_STRING';
|
|
121
124
|
exports.RESURRECTING_SPECTRUM_FROM_RANGES = 'RESURRECTING_SPECTRUM_FROM_RANGES';
|
|
125
|
+
exports.RESURRECTING_SPECTRUM_FROM_JCAMP = 'RESURRECTING_SPECTRUM_FROM_JCAMP';
|
|
122
126
|
exports.SHOW_J_GRAPH = 'SHOW_J_GRAPH';
|
|
123
127
|
exports.SET_AUTOMATIC_ASSIGNMENTS = 'SET_AUTOMATIC_ASSIGNMENTS';
|
|
@@ -19,7 +19,7 @@ const allowTools = [
|
|
|
19
19
|
ToolTypes_1.options.peakPicking.id,
|
|
20
20
|
ToolTypes_1.options.integral.id,
|
|
21
21
|
ToolTypes_1.options.phaseCorrection.id,
|
|
22
|
-
ToolTypes_1.options.
|
|
22
|
+
ToolTypes_1.options.baselineCorrection.id,
|
|
23
23
|
ToolTypes_1.options.rangesPicking.id,
|
|
24
24
|
ToolTypes_1.options.exclusionZones.id,
|
|
25
25
|
];
|
|
@@ -21,7 +21,7 @@ const allowTools = [
|
|
|
21
21
|
ToolTypes_1.options.peakPicking.id,
|
|
22
22
|
ToolTypes_1.options.integral.id,
|
|
23
23
|
ToolTypes_1.options.phaseCorrection.id,
|
|
24
|
-
ToolTypes_1.options.
|
|
24
|
+
ToolTypes_1.options.baselineCorrection.id,
|
|
25
25
|
ToolTypes_1.options.rangesPicking.id,
|
|
26
26
|
ToolTypes_1.options.zone2D.id,
|
|
27
27
|
ToolTypes_1.options.slicingTool.id,
|
|
@@ -18,7 +18,7 @@ const styles = {
|
|
|
18
18
|
const allowTools = [
|
|
19
19
|
ToolTypes_1.options.zoom.id,
|
|
20
20
|
ToolTypes_1.options.equalizerTool.id,
|
|
21
|
-
ToolTypes_1.options.
|
|
21
|
+
ToolTypes_1.options.baselineCorrection.id,
|
|
22
22
|
ToolTypes_1.options.zone2D.id,
|
|
23
23
|
ToolTypes_1.options.slicingTool.id,
|
|
24
24
|
ToolTypes_1.options.integral.id,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const bs_1 = require("react-icons/bs");
|
|
8
|
+
const fa_1 = require("react-icons/fa");
|
|
9
|
+
const Button_1 = __importDefault(require("../../elements/Button"));
|
|
10
|
+
function ActionsButton({ onFloatBtnClick }) {
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)("div", { "data-no-export": "true", style: { display: 'flex', zIndex: 0 }, children: [(0, jsx_runtime_1.jsx)(Button_1.default.Action, { style: { fontSize: '14px' }, fill: "clear", className: "handle", children: (0, jsx_runtime_1.jsx)(bs_1.BsArrowsMove, {}) }), (0, jsx_runtime_1.jsx)(Button_1.default.Danger, { style: { fontSize: '14px' }, fill: "clear", onClick: onFloatBtnClick, children: (0, jsx_runtime_1.jsx)(fa_1.FaTimes, {}) })] }));
|
|
12
|
+
}
|
|
13
|
+
exports.default = ActionsButton;
|
|
@@ -0,0 +1,51 @@
|
|
|
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 [molfile, setMolFile] = (0, react_2.useState)(molecule.molfile);
|
|
37
|
+
const { viewerRef } = (0, GlobalContext_1.useGlobal)();
|
|
38
|
+
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
39
|
+
const openMoleculeEditor = (0, MoleculeStructureEditorModal_1.useMoleculeEditor)();
|
|
40
|
+
const { currentDiaIDsToHighlight, handleOnAtomHover, handleOnClickAtom, assignedDiaIDsMerged, } = (0, useAtomAssignment_1.default)({ zones, ranges, activeTab, displayerMode });
|
|
41
|
+
const floatMoleculeHandler = (0, react_2.useCallback)(() => {
|
|
42
|
+
dispatch({
|
|
43
|
+
type: Types_1.FLOAT_MOLECULE_OVER_SPECTRUM,
|
|
44
|
+
payload: { key: molecule.key },
|
|
45
|
+
});
|
|
46
|
+
}, [dispatch, molecule]);
|
|
47
|
+
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: molfile, setSelectedAtom: handleOnClickAtom, atomHighlightColor: currentDiaIDsToHighlight?.length > 0 ? 'red' : '#FFD700', atomHighlightOpacity: 0.35, highlights: currentDiaIDsToHighlight?.length > 0
|
|
48
|
+
? currentDiaIDsToHighlight
|
|
49
|
+
: assignedDiaIDsMerged, setHoverAtom: handleOnAtomHover, setMolfile: setMolFile })] })) }, molecule.key));
|
|
50
|
+
}
|
|
51
|
+
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;
|
|
@@ -117,7 +117,6 @@ function BasicToolBarInner({ info, verticalAlign, displayerMode, ftCounter, fidC
|
|
|
117
117
|
openImportPublicationStringModal();
|
|
118
118
|
break;
|
|
119
119
|
default:
|
|
120
|
-
return;
|
|
121
120
|
}
|
|
122
121
|
}, [openLoader, importJCAMPFile, openImportPublicationStringModal]);
|
|
123
122
|
const exportHandler = (0, react_1.useCallback)(({ id }) => {
|
|
@@ -61,26 +61,22 @@ function FunctionToolBarInner({ defaultValue, activeSpectrum, info, datum, displ
|
|
|
61
61
|
});
|
|
62
62
|
dispatch({ type: Types_1.SET_SELECTED_FILTER, selectedFilter: null });
|
|
63
63
|
}, [dispatch]);
|
|
64
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(ToggleButtonGroup_1.default, { value: option, onChange: handleChange, children: [isButtonVisible('zoomTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zoom.id, id: "zoomIn", title: `${ToolTypes_1.options.zoom.label} ( Press z )`, children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 14 }, children: (0, jsx_runtime_1.jsx)(fa_1.FaSearchPlus, {}) }) }, ToolTypes_1.options.zoom.id)), isButtonVisible('zoomOutTool') && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "zoom-out", onClick: handleFullZoomOut, title: "Horizontal zoom out ( Press f ), Horizontal and Vertical zoom out, double click ( Press ff )", children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 14 }, children: (0, jsx_runtime_1.jsx)(fa_1.FaExpand, {}) }) })), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D && isButtonVisible('peakTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.peakPicking.id, title: `${ToolTypes_1.options.peakPicking.label} ( Press p )`, isVisible: activeSpectrum && !info?.isFid
|
|
65
|
-
isButtonVisible('integralTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.integral.id, isVisible: activeSpectrum && !info?.isFid
|
|
66
|
-
isButtonVisible('zonePickingTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zone2D.id, id: "zone2d", isVisible: activeSpectrum && !info?.isFid
|
|
67
|
-
isButtonVisible('slicingTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.slicingTool.id, isVisible: activeSpectrum && !info?.isFid
|
|
68
|
-
isButtonVisible('
|
|
64
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(ToggleButtonGroup_1.default, { value: option, onChange: handleChange, children: [isButtonVisible('zoomTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zoom.id, id: "zoomIn", title: `${ToolTypes_1.options.zoom.label} ( Press z )`, children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 14 }, children: (0, jsx_runtime_1.jsx)(fa_1.FaSearchPlus, {}) }) }, ToolTypes_1.options.zoom.id)), isButtonVisible('zoomOutTool') && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "zoom-out", onClick: handleFullZoomOut, title: "Horizontal zoom out ( Press f ), Horizontal and Vertical zoom out, double click ( Press ff )", children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 14 }, children: (0, jsx_runtime_1.jsx)(fa_1.FaExpand, {}) }) })), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D && isButtonVisible('peakTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.peakPicking.id, title: `${ToolTypes_1.options.peakPicking.label} ( Press p )`, isVisible: !!(activeSpectrum && !info?.isFid), id: "peakPicking", children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrPeakPicking, {}) }, ToolTypes_1.options.peakPicking.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
|
|
65
|
+
isButtonVisible('integralTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.integral.id, isVisible: !!(activeSpectrum && !info?.isFid), id: "integralPicking", title: `${ToolTypes_1.options.integral.label} ( Press i )`, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrIntegrate, {}) }, ToolTypes_1.options.integral.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_2D &&
|
|
66
|
+
isButtonVisible('zonePickingTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zone2D.id, id: "zone2d", isVisible: !!(activeSpectrum && !info?.isFid), title: `${ToolTypes_1.options.zone2D.label} ( Press r )`, children: (0, jsx_runtime_1.jsx)(fa_1.FaDiceFour, {}) }, ToolTypes_1.options.zone2D.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_2D &&
|
|
67
|
+
isButtonVisible('slicingTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.slicingTool.id, isVisible: !!(activeSpectrum && !info?.isFid), id: "slic", title: `${ToolTypes_1.options.slicingTool.label}`, children: (0, jsx_runtime_1.jsx)("p", { children: "Slic" }) }, ToolTypes_1.options.slicingTool.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
|
|
68
|
+
isButtonVisible('rangePickingTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.rangesPicking.id, isVisible: !!(activeSpectrum && !info?.isFid), title: `${ToolTypes_1.options.rangesPicking.label} ( Press r )`, id: "ranges-pick", children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrRangePicking, {}) }, ToolTypes_1.options.rangesPicking.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
|
|
69
69
|
isButtonVisible('multipleSpectraAnalysisTool') &&
|
|
70
70
|
ftCounter > 1 &&
|
|
71
71
|
mode === 'RTL' && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.multipleSpectraAnalysis.id, id: "multipleSpectraAnalysis", title: ToolTypes_1.options.multipleSpectraAnalysis.label, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrMultipleAnalysis, {}) }, ToolTypes_1.options.multipleSpectraAnalysis.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
|
|
72
72
|
isButtonVisible('zeroFillingTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.zeroFilling.id, isVisible: Filters.zeroFilling.isApplicable({ info }), id: "zeroFilling", title: ToolTypes_1.options.zeroFilling.label, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrZeroFilling, {}) }, ToolTypes_1.options.zeroFilling.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
|
|
73
|
-
isButtonVisible('phaseCorrectionTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.phaseCorrection.id, id: "phaseCorrection", title: `${ToolTypes_1.options.phaseCorrection.label} ( Press a )`, isVisible: activeSpectrum &&
|
|
73
|
+
isButtonVisible('phaseCorrectionTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.phaseCorrection.id, id: "phaseCorrection", title: `${ToolTypes_1.options.phaseCorrection.label} ( Press a )`, isVisible: !!(activeSpectrum &&
|
|
74
74
|
info &&
|
|
75
75
|
Filters.phaseCorrection.isApplicable({ info }) &&
|
|
76
|
-
datum.im
|
|
77
|
-
|
|
78
|
-
: false, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrPhaseCorrection, {}) }, ToolTypes_1.options.phaseCorrection.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
|
|
79
|
-
isButtonVisible('baseLineCorrectionTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.baseLineCorrection.id, id: "baseLineCorrection", title: `${ToolTypes_1.options.baseLineCorrection.label} ( Press b )`, isVisible: activeSpectrum &&
|
|
76
|
+
datum.im), children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrPhaseCorrection, {}) }, ToolTypes_1.options.phaseCorrection.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
|
|
77
|
+
isButtonVisible('baselineCorrectionTool') && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.baselineCorrection.id, id: "baselineCorrection", title: `${ToolTypes_1.options.baselineCorrection.label} ( Press b )`, isVisible: !!(activeSpectrum &&
|
|
80
78
|
info &&
|
|
81
|
-
Filters.baselineCorrection.isApplicable({ info })
|
|
82
|
-
? true
|
|
83
|
-
: false, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrBaselineCorrection, {}) }, ToolTypes_1.options.baseLineCorrection.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
|
|
79
|
+
Filters.baselineCorrection.isApplicable({ info })), children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrBaselineCorrection, {}) }, ToolTypes_1.options.baselineCorrection.id)), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
|
|
84
80
|
isButtonVisible('exclusionZonesTool') &&
|
|
85
81
|
!info?.isFid &&
|
|
86
82
|
ftCounter > 0 && ((0, jsx_runtime_1.jsx)(ToggleButton_1.default, { value: ToolTypes_1.options.exclusionZones.id, title: `${ToolTypes_1.options.exclusionZones.label} ( Press e )`, id: "exclusionZones", children: (0, jsx_runtime_1.jsx)("div", { style: { fontSize: 18 }, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrMultipleAnalysis, {}) }) }, ToolTypes_1.options.exclusionZones.id))] }), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D &&
|
|
@@ -86,9 +86,9 @@ exports.options = {
|
|
|
86
86
|
hasOptionPanel: true,
|
|
87
87
|
isFilter: true,
|
|
88
88
|
},
|
|
89
|
-
|
|
90
|
-
id:
|
|
91
|
-
label:
|
|
89
|
+
baselineCorrection: {
|
|
90
|
+
id: Filters.baselineCorrection.id,
|
|
91
|
+
label: Filters.baselineCorrection.name,
|
|
92
92
|
hasOptionPanel: true,
|
|
93
93
|
isFilter: true,
|
|
94
94
|
},
|
|
@@ -3,7 +3,7 @@ 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.exportAsMatrix = exports.exportAsMol = exports.copyHTMLToClipboard = exports.copyTextToClipboard = exports.copyPNGToClipboard = exports.exportAsPng = exports.exportAsNMRE = exports.exportAsJSON = exports.exportAsSVG = void 0;
|
|
6
|
+
exports.getBlob = exports.exportAsMatrix = exports.exportAsMol = exports.copyHTMLToClipboard = exports.copyTextToClipboard = exports.copyPNGToClipboard = exports.exportAsPng = exports.exportAsNMRE = exports.exportAsJSON = exports.exportAsSVG = void 0;
|
|
7
7
|
const file_saver_1 = require("file-saver");
|
|
8
8
|
const jszip_1 = __importDefault(require("jszip"));
|
|
9
9
|
function copyFormattedHtml(html) {
|
|
@@ -221,11 +221,17 @@ function getBlob(rootRef, elementID) {
|
|
|
221
221
|
let _svg = rootRef.getRootNode()
|
|
222
222
|
.getElementById(elementID)
|
|
223
223
|
?.cloneNode(true);
|
|
224
|
-
const width = _svg?.getAttribute('width').replace('px', '');
|
|
225
|
-
const height = _svg?.getAttribute('height').replace('px', '');
|
|
224
|
+
const width = Number(_svg?.getAttribute('width').replace('px', ''));
|
|
225
|
+
const height = Number(_svg?.getAttribute('height').replace('px', ''));
|
|
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;
|
|
@@ -244,3 +250,4 @@ function getBlob(rootRef, elementID) {
|
|
|
244
250
|
const blob = new Blob([svg], { type: 'image/svg+xml' });
|
|
245
251
|
return { blob, width, height };
|
|
246
252
|
}
|
|
253
|
+
exports.getBlob = getBlob;
|
|
@@ -0,0 +1,19 @@
|
|
|
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 (value || value === 0) && !isNaN(value)
|
|
10
|
+
? prefix + (0, numeral_1.default)(value).format(format) + suffix
|
|
11
|
+
: value;
|
|
12
|
+
}
|
|
13
|
+
exports.formatNumber = formatNumber;
|
|
14
|
+
function getNumberOfDecimals(value) {
|
|
15
|
+
value = String(value).trim();
|
|
16
|
+
const lastIndex = value.lastIndexOf('.');
|
|
17
|
+
return lastIndex > 0 ? value.substr(lastIndex).split('').length - 1 : 0;
|
|
18
|
+
}
|
|
19
|
+
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;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isGoogleDocument = void 0;
|
|
4
|
+
function isGoogleDocument(url) {
|
|
5
|
+
return /https:\/\/docs\.google\.com\/(?<type>document|spreadsheets)\/d/.test(url);
|
|
6
|
+
}
|
|
7
|
+
exports.isGoogleDocument = isGoogleDocument;
|
|
@@ -51,8 +51,7 @@ async function getSpectra(file, options = {}, usedColors = {}) {
|
|
|
51
51
|
return (0, SpectraManager_1.addBruker)({ xy, noContours, keepOriginal }, file.binary, usedColors);
|
|
52
52
|
default:
|
|
53
53
|
if (!jcampURL) {
|
|
54
|
-
new Error('file extension is not supported');
|
|
55
|
-
return;
|
|
54
|
+
throw new Error('file extension is not supported');
|
|
56
55
|
}
|
|
57
56
|
}
|
|
58
57
|
}
|
|
@@ -32,14 +32,14 @@ async function addSource(nmrRecord, options = {}) {
|
|
|
32
32
|
default:
|
|
33
33
|
if (!jcampURL)
|
|
34
34
|
break;
|
|
35
|
-
|
|
35
|
+
await fetch(jcampURL).then(async (jcamp) => {
|
|
36
36
|
if (!jcamp)
|
|
37
37
|
return;
|
|
38
38
|
let name = jcampURL.split('/').slice(-1);
|
|
39
39
|
const path = `jcamp/${dimension}/${name}`;
|
|
40
40
|
tag += `\nJcamp_Location=file:${path}\\`;
|
|
41
41
|
nmrRecord.file(path, await jcamp.arrayBuffer());
|
|
42
|
-
})
|
|
42
|
+
});
|
|
43
43
|
}
|
|
44
44
|
return tag;
|
|
45
45
|
}
|