nmrium 0.27.0 → 0.30.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/README.md +12 -2
- package/lib/component/1d/ApodizationLine.d.ts +3 -0
- package/lib/component/1d/ApodizationLine.js +47 -0
- package/lib/component/1d/Chart1D.js +4 -2
- package/lib/component/1d/ExclusionZoneAnnotation.d.ts +1 -1
- package/lib/component/1d/ExclusionZoneAnnotation.js +14 -7
- package/lib/component/1d/ExclusionZonesAnnotations.js +1 -1
- package/lib/component/1d/IntegralResizable.js +5 -4
- package/lib/component/1d/IntegralsSeries.js +2 -6
- package/lib/component/1d/LinesSeries.js +6 -6
- package/lib/component/1d/SpectraTracker.js +2 -2
- package/lib/component/1d/Viewer1D.js +8 -13
- package/lib/component/1d/database/DatabaseElements.js +2 -2
- package/lib/component/1d/database/DatabaseSpectrum.js +33 -28
- package/lib/component/1d/database/ResurrectedDatabaseRanges.js +11 -9
- package/lib/component/1d/multiAnalysis/AnalysisRange.js +16 -14
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +3 -4
- package/lib/component/1d/{PeakAnnotation.d.ts → peaks/PeakAnnotation.d.ts} +1 -2
- package/lib/component/1d/{PeakAnnotation.js → peaks/PeakAnnotation.js} +10 -11
- package/lib/component/1d/{PeakAnnotations.d.ts → peaks/PeakAnnotations.d.ts} +0 -0
- package/lib/component/1d/peaks/PeakAnnotations.js +26 -0
- package/lib/component/1d/peaks/PeaksShapes.d.ts +3 -0
- package/lib/component/1d/peaks/PeaksShapes.js +35 -0
- package/lib/component/1d/peaks/usePeakShapesPath.d.ts +13 -0
- package/lib/component/1d/peaks/usePeakShapesPath.js +45 -0
- package/lib/component/1d/ranges/Range.d.ts +1 -2
- package/lib/component/1d/ranges/Range.js +7 -8
- package/lib/component/1d/ranges/Ranges.js +3 -4
- package/lib/component/1d/tool/BaseLineZones.js +3 -6
- package/lib/component/1d/tool/VerticalIndicator.js +1 -1
- package/lib/component/2d/Contours.js +9 -13
- package/lib/component/2d/FooterBanner.js +2 -2
- package/lib/component/2d/SignalDeltaLine.js +1 -1
- package/lib/component/2d/Viewer2D.js +3 -3
- package/lib/component/2d/YAxis.js +2 -2
- package/lib/component/2d/zones/IndicationLines.js +2 -3
- package/lib/component/2d/zones/Signal.d.ts +3 -2
- package/lib/component/2d/zones/Signal.js +3 -3
- package/lib/component/2d/zones/Zone.d.ts +1 -1
- package/lib/component/2d/zones/Zone.js +4 -4
- package/lib/component/EventsTrackers/KeysListenerTracker.js +132 -75
- package/lib/component/NMRium.d.ts +14 -49
- package/lib/component/NMRium.js +14 -6
- package/lib/component/SplitPaneWrapper.js +2 -2
- package/lib/component/assignment/AssignmentsContext.d.ts +1 -1
- package/lib/component/context/GlobalContext.d.ts +1 -1
- package/lib/component/context/GlobalContext.js +3 -3
- package/lib/component/context/PreferencesContext.d.ts +3 -45
- package/lib/component/elements/ActiveButton.d.ts +17 -0
- package/lib/component/elements/ActiveButton.js +28 -0
- package/lib/component/elements/Button.d.ts +6 -6
- package/lib/component/elements/Button.js +6 -6
- package/lib/component/elements/ButtonToolTip.js +1 -1
- package/lib/component/elements/CheckBox.d.ts +2 -6
- package/lib/component/elements/CheckBox.js +4 -6
- package/lib/component/elements/CheckBoxCell.d.ts +3 -0
- package/lib/component/elements/CheckBoxCell.js +8 -0
- package/lib/component/elements/Input.d.ts +5 -4
- package/lib/component/elements/Input.js +1 -1
- package/lib/component/elements/Label.d.ts +8 -6
- package/lib/component/elements/Label.js +3 -3
- package/lib/component/elements/Logo.js +1 -1
- package/lib/component/elements/MoleculeSelection.d.ts +2 -2
- package/lib/component/elements/MoleculeSelection.js +1 -1
- package/lib/component/elements/NextPrev.js +1 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.d.ts +2 -2
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +3 -2
- package/lib/component/elements/ReactTable/ReactTable.d.ts +2 -2
- package/lib/component/elements/Select.d.ts +7 -11
- package/lib/component/elements/Select.js +6 -8
- package/lib/component/elements/Tab/Tab.js +1 -1
- package/lib/component/elements/Tab/Tabs.js +2 -1
- package/lib/component/elements/Table/Table.d.ts +1 -2
- package/lib/component/elements/Table/Table.js +2 -2
- package/lib/component/elements/ToggleButton.d.ts +1 -2
- package/lib/component/elements/ToggleButton.js +5 -4
- package/lib/component/elements/accordion/Accordion.js +2 -6
- package/lib/component/elements/accordion/AccordionItem.js +2 -2
- package/lib/component/elements/formik/FormikCheckBox.d.ts +2 -1
- package/lib/component/elements/formik/FormikCheckBox.js +4 -2
- package/lib/component/elements/formik/FormikNumberInput.d.ts +1 -1
- package/lib/component/elements/formik/FormikOnChange.d.ts +3 -2
- package/lib/component/elements/formik/FormikOnChange.js +11 -5
- package/lib/component/elements/formik/Input.js +1 -1
- package/lib/component/elements/popup/Modal/ConfirmDialog.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 +3 -3
- package/lib/component/elements/resizer/Resizer.d.ts +1 -0
- package/lib/component/elements/resizer/SVGResizer.js +3 -3
- package/lib/component/elements/toggle/ToggleButtonGroup.js +2 -2
- package/lib/component/header/ApodizationOptionsPanel.d.ts +2 -0
- package/lib/component/header/ApodizationOptionsPanel.js +81 -0
- package/lib/component/header/AutoPeakPickingOptionPanel.d.ts +2 -1
- package/lib/component/header/AutoPeakPickingOptionPanel.js +40 -36
- package/lib/component/header/BaseLineCorrectionPanel.d.ts +1 -2
- package/lib/component/header/BaseLineCorrectionPanel.js +89 -53
- package/lib/component/header/Header.js +7 -4
- package/lib/component/header/HeaderContainer.d.ts +7 -0
- package/lib/component/header/HeaderContainer.js +10 -0
- package/lib/component/header/ManualPhaseCorrectionPanel.js +27 -29
- package/lib/component/header/RangesPickingOptionPanel.js +19 -21
- package/lib/component/header/ZeroFillingOptionsPanel.js +49 -46
- package/lib/component/header/Zones2DOptionPanel.js +11 -13
- package/lib/component/highlight/index.d.ts +27 -10
- package/lib/component/highlight/index.js +19 -17
- package/lib/component/hooks/useActiveSpectrumStyleOptions.js +2 -2
- package/lib/component/hooks/useCheckToolsVisibility.d.ts +11 -1
- package/lib/component/hooks/useCheckToolsVisibility.js +32 -1
- package/lib/component/hooks/useExport.js +2 -2
- package/lib/component/hooks/useFilter.d.ts +1 -0
- package/lib/component/hooks/useFilter.js +7 -0
- package/lib/component/hooks/useFormatNumberByNucleus.js +3 -4
- package/lib/component/hooks/useToolsFunctions.js +1 -1
- package/lib/component/loader/DropZone.js +9 -3
- package/lib/component/loader/NoData.d.ts +3 -2
- package/lib/component/loader/NoData.js +31 -30
- package/lib/component/modal/AlignSpectraModal.js +1 -2
- package/lib/component/modal/EditPeakShapeModal.d.ts +9 -0
- package/lib/component/modal/EditPeakShapeModal.js +85 -0
- package/lib/component/modal/MoleculeStructureEditorModal.d.ts +3 -3
- package/lib/component/modal/MoleculeStructureEditorModal.js +4 -5
- package/lib/component/modal/MultipleSpectraFiltersModal/index.js +1 -2
- package/lib/component/modal/PredictSpectraModal.js +1 -1
- package/lib/component/modal/changeSum/ChangeSumModal.d.ts +1 -1
- package/lib/component/modal/changeSum/ChangeSumModal.js +9 -11
- package/lib/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib/component/modal/editRange/EditRangeModal.d.ts +3 -3
- package/lib/component/modal/editRange/EditRangeModal.js +51 -56
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +9 -22
- package/lib/component/modal/editRange/forms/components/CouplingsTable.js +15 -58
- 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 +2 -1
- package/lib/component/modal/editRange/forms/components/SignalsForm.js +18 -29
- package/lib/component/modal/editZone/SignalsForm.js +1 -1
- package/lib/component/modal/setting/DatabasesTabContent.d.ts +2 -1
- package/lib/component/modal/setting/DatabasesTabContent.js +29 -31
- package/lib/component/modal/setting/DisplayTabContent.d.ts +1 -5
- package/lib/component/modal/setting/DisplayTabContent.js +6 -15
- package/lib/component/modal/setting/FormattingTabContent.js +2 -2
- package/lib/component/modal/setting/GeneralSettings.js +19 -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/WorkspaceItem.d.ts +2 -2
- package/lib/component/modal/setting/WorkspaceItem.js +2 -2
- package/lib/component/modal/setting/settingsValidation.d.ts +150 -42
- package/lib/component/modal/setting/settingsValidation.js +6 -4
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +13 -15
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.d.ts +3 -3
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +3 -3
- package/lib/component/panels/MoleculesPanel/MoleculePanel.d.ts +5 -4
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +17 -21
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +4 -2
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +6 -6
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +1 -2
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.d.ts +5 -3
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +13 -5
- 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 +2 -2
- package/lib/component/panels/Panels.js +10 -7
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +47 -22
- package/lib/component/panels/PeaksPanel/PeaksPreferences.js +17 -0
- package/lib/component/panels/PeaksPanel/PeaksTable.js +44 -13
- package/lib/component/panels/RangesPanel/RangesHeader.js +13 -4
- package/lib/component/panels/RangesPanel/RangesPanel.js +19 -19
- package/lib/component/panels/RangesPanel/RangesTableRow.js +4 -4
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +3 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.d.ts +3 -3
- package/lib/component/panels/RangesPanel/TableColumns/format.d.ts +1 -1
- 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/RangesPanel/hooks/useMapRanges.js +3 -3
- package/lib/component/panels/SpectrumsPanel/SpectrumListItem.js +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +3 -3
- package/lib/component/panels/SpectrumsPanel/base/ColorIndicator.js +2 -2
- package/lib/component/panels/SpectrumsPanel/base/ShowHideMarkersButton.d.ts +1 -1
- package/lib/component/panels/SpectrumsPanel/base/ShowHideMarkersButton.js +5 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +7 -7
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +2 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +2 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +1 -2
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +7 -10
- 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 +2 -2
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +13 -13
- package/lib/component/panels/databasePanel/DatabasePanel.d.ts +4 -0
- package/lib/component/panels/databasePanel/DatabasePanel.js +80 -34
- package/lib/component/panels/databasePanel/DatabasePreferences.js +1 -1
- 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 +17 -12
- package/lib/component/panels/extra/preferences/ColumnsHelper.js +2 -4
- package/lib/component/panels/filtersPanel/FilterPanel.js +1 -1
- package/lib/component/panels/filtersPanel/FiltersTable.js +2 -2
- package/lib/component/panels/header/DefaultPanelHeader.js +3 -14
- package/lib/component/panels/header/SpectraAutomaticPickingButton.js +1 -1
- package/lib/component/panels/predictionPanel/PredictionOptions.d.ts +2 -1
- package/lib/component/panels/predictionPanel/PredictionOptions.js +2 -2
- package/lib/component/panels/predictionPanel/PredictionPanel.js +15 -3
- package/lib/component/reducer/IgnoreActions.js +4 -0
- package/lib/component/reducer/Reducer.d.ts +45 -72
- package/lib/component/reducer/Reducer.js +38 -13
- 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 +14 -7
- package/lib/component/reducer/actions/FiltersActions.js +192 -32
- package/lib/component/reducer/actions/IntegralsActions.js +2 -2
- package/lib/component/reducer/actions/MoleculeActions.js +27 -14
- package/lib/component/reducer/actions/PeaksActions.d.ts +4 -1
- package/lib/component/reducer/actions/PeaksActions.js +38 -5
- 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 +7 -10
- package/lib/component/reducer/actions/ToolsActions.js +34 -84
- package/lib/component/reducer/helper/getSpectrum.d.ts +5 -0
- package/lib/component/reducer/helper/getSpectrum.js +14 -0
- package/lib/component/reducer/helper/getStrongestPeak.d.ts +7 -0
- package/lib/component/reducer/helper/getStrongestPeak.js +14 -0
- package/lib/component/reducer/preferences/actions/addWorkspace.js +4 -4
- package/lib/component/reducer/preferences/actions/initPreferences.js +5 -5
- package/lib/component/reducer/preferences/actions/removeWorkspace.js +1 -1
- package/lib/component/reducer/preferences/actions/setPanelsPreferences.js +1 -1
- package/lib/component/reducer/preferences/actions/setPreferences.js +13 -16
- package/lib/component/reducer/preferences/actions/setWorkspace.js +1 -1
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +7 -4
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +46 -67
- package/lib/component/reducer/preferences/preferencesReducer.js +1 -4
- package/lib/component/reducer/preferences/{utilites → utilities}/checkKeysExists.d.ts +0 -0
- package/lib/component/reducer/preferences/{utilites → utilities}/checkKeysExists.js +0 -0
- package/lib/component/reducer/preferences/{utilites → utilities}/filterObject.d.ts +0 -0
- package/lib/component/reducer/preferences/{utilites → utilities}/filterObject.js +0 -0
- package/lib/component/reducer/preferences/{utilites → utilities}/flatObject.d.ts +0 -0
- package/lib/component/reducer/preferences/{utilites → utilities}/flatObject.js +0 -0
- package/lib/component/reducer/preferences/{utilites → utilities}/getActiveWorkspace.d.ts +2 -1
- package/lib/component/reducer/preferences/{utilites → utilities}/getActiveWorkspace.js +0 -0
- package/lib/component/reducer/preferences/{utilites → utilities}/getPreferencesByWorkspace.d.ts +2 -1
- package/lib/component/reducer/preferences/utilities/getPreferencesByWorkspace.js +6 -0
- package/lib/component/reducer/preferences/{utilites → utilities}/mapNucleiFormatting.d.ts +0 -0
- package/lib/component/reducer/preferences/{utilites → utilities}/mapNucleiFormatting.js +0 -0
- package/lib/component/reducer/types/Types.d.ts +10 -1
- package/lib/component/reducer/types/Types.js +10 -1
- package/lib/component/tool/BrushX.js +2 -2
- package/lib/component/tool/BrushXY.js +5 -4
- package/lib/component/tool/CrossLinePointer.js +6 -5
- package/lib/component/tool/FloatMoleculeStructures/DraggableStructure.d.ts +2 -2
- package/lib/component/tool/FloatMoleculeStructures/DraggableStructure.js +12 -3
- package/lib/component/tool/FloatMoleculeStructures/index.d.ts +3 -2
- package/lib/component/tool/FloatMoleculeStructures/index.js +13 -6
- package/lib/component/toolbar/BasicToolBar.js +3 -9
- package/lib/component/toolbar/FunctionToolBar.js +11 -27
- package/lib/component/toolbar/ToolTypes.d.ts +7 -1
- package/lib/component/toolbar/ToolTypes.js +122 -12
- package/lib/component/utility/Evaluate.js +1 -0
- package/lib/component/utility/Export.d.ts +7 -1
- package/lib/component/utility/Export.js +3 -3
- package/lib/component/utility/formatNumber.d.ts +1 -1
- package/lib/component/utility/formatNumber.js +4 -2
- 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/utility/util/nmredata/addZones.js +3 -3
- package/lib/component/workspaces/Workspace.d.ts +22 -10
- package/lib/component/workspaces/basic.d.ts +2 -2
- package/lib/component/workspaces/basic.js +19 -32
- package/lib/component/workspaces/embedded.d.ts +2 -2
- package/lib/component/workspaces/embedded.js +21 -13
- package/lib/component/workspaces/exercise.d.ts +2 -2
- package/lib/component/workspaces/exercise.js +5 -36
- package/lib/component/workspaces/index.d.ts +5 -5
- package/lib/component/workspaces/prediction.d.ts +2 -2
- package/lib/component/workspaces/prediction.js +21 -17
- package/lib/component/workspaces/process1D.d.ts +2 -2
- package/lib/component/workspaces/process1D.js +21 -26
- package/lib/component/workspaces/workspaceDefaultProperties.d.ts +2 -0
- package/lib/component/workspaces/workspaceDefaultProperties.js +70 -0
- package/lib/constants.js +1 -1
- package/lib/data/Filters.d.ts +2 -2
- package/lib/data/Filters.js +2 -2
- package/lib/data/FiltersManager.js +4 -4
- package/lib/data/PredictionManager.d.ts +0 -1
- package/lib/data/PredictionManager.js +22 -24
- package/lib/data/SpectraManager.d.ts +5 -12
- package/lib/data/SpectraManager.js +14 -29
- package/lib/data/constants/SignalsKinds.d.ts +0 -1
- package/lib/data/constants/SignalsKinds.js +0 -8
- package/lib/data/data1d/Data1DManager.js +13 -6
- package/lib/data/data1d/MultipleAnalysis.js +1 -0
- package/lib/data/data1d/Spectrum1D/SumManager.d.ts +5 -5
- package/lib/data/data1d/Spectrum1D/SumManager.js +18 -12
- package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.js +1 -1
- package/lib/data/data1d/Spectrum1D/generateJGraphData.js +10 -12
- package/lib/data/data1d/Spectrum1D/getReferenceShift.js +1 -1
- package/lib/data/data1d/Spectrum1D/index.d.ts +2 -1
- package/lib/data/data1d/Spectrum1D/index.js +2 -1
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +14 -15
- package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +1 -1
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.js +5 -7
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +5 -3
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.d.ts +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +15 -16
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.d.ts +8 -0
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +24 -0
- package/lib/data/data1d/Spectrum1D/ranges/addRange.d.ts +36 -2
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +39 -16
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +1 -0
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectRange.js +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +4 -4
- package/lib/data/data1d/database.d.ts +5 -3
- package/lib/data/data1d/database.js +48 -7
- package/lib/data/data1d/filter1d/apodization.d.ts +25 -0
- package/lib/data/data1d/filter1d/apodization.js +63 -0
- package/lib/data/data1d/filter1d/autoPhaseCorrection.js +1 -1
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +24 -7
- package/lib/data/data1d/filter1d/baselineCorrection.js +10 -17
- package/lib/data/data1d/filter1d/zeroFillingAndApodization.d.ts +9 -0
- package/lib/data/data1d/filter1d/zeroFillingAndApodization.js +24 -0
- package/lib/data/data2d/Processing2D.d.ts +3 -3
- package/lib/data/data2d/Processing2D.js +4 -3
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +17 -13
- package/lib/data/data2d/Spectrum2D/zones/detectZones.js +3 -3
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js +3 -3
- package/lib/data/migration/MigrationManager.d.ts +1 -1
- package/lib/data/migration/MigrationManager.js +3 -1
- package/lib/data/migration/migrateToVersion3.d.ts +1 -0
- package/lib/data/migration/migrateToVersion3.js +55 -0
- package/lib/data/molecules/Molecule.d.ts +15 -7
- package/lib/data/molecules/Molecule.js +5 -6
- package/lib/data/molecules/MoleculeManager.d.ts +4 -4
- package/lib/data/molecules/MoleculeManager.js +5 -5
- package/lib/data/types/data1d/SumOptions.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/generateNumbersPowerOfX.d.ts +0 -1
- package/lib/data/utilities/generateNumbersPowerOfX.js +0 -1
- package/lib/data/utilities/getSum.js +1 -3
- package/lib/data/utilities/isInRange.d.ts +7 -0
- package/lib/data/utilities/isInRange.js +4 -0
- 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 +8 -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 +21 -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/ApodizationLine.js +75 -0
- package/lib-cjs/component/1d/Chart1D.js +4 -2
- package/lib-cjs/component/1d/ExclusionZoneAnnotation.js +15 -8
- package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +1 -1
- package/lib-cjs/component/1d/IntegralResizable.js +4 -3
- package/lib-cjs/component/1d/IntegralsSeries.js +2 -6
- package/lib-cjs/component/1d/LinesSeries.js +5 -5
- package/lib-cjs/component/1d/SpectraTracker.js +2 -2
- package/lib-cjs/component/1d/Viewer1D.js +8 -13
- package/lib-cjs/component/1d/database/DatabaseElements.js +1 -1
- package/lib-cjs/component/1d/database/DatabaseSpectrum.js +34 -26
- package/lib-cjs/component/1d/database/ResurrectedDatabaseRanges.js +10 -8
- package/lib-cjs/component/1d/multiAnalysis/AnalysisRange.js +15 -13
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +1 -2
- package/lib-cjs/component/1d/{PeakAnnotation.js → peaks/PeakAnnotation.js} +10 -11
- package/lib-cjs/component/1d/peaks/PeakAnnotations.js +31 -0
- package/lib-cjs/component/1d/peaks/PeaksShapes.js +40 -0
- package/lib-cjs/component/1d/peaks/usePeakShapesPath.js +49 -0
- package/lib-cjs/component/1d/ranges/Range.js +6 -7
- package/lib-cjs/component/1d/ranges/Ranges.js +3 -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/2d/Contours.js +9 -13
- 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 +3 -3
- package/lib-cjs/component/2d/YAxis.js +1 -1
- package/lib-cjs/component/2d/zones/IndicationLines.js +2 -3
- package/lib-cjs/component/2d/zones/Signal.js +3 -3
- package/lib-cjs/component/2d/zones/Zone.js +3 -3
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +130 -73
- package/lib-cjs/component/NMRium.js +13 -5
- package/lib-cjs/component/SplitPaneWrapper.js +2 -2
- package/lib-cjs/component/context/GlobalContext.js +4 -4
- package/lib-cjs/component/elements/ActiveButton.js +33 -0
- package/lib-cjs/component/elements/Button.js +6 -6
- package/lib-cjs/component/elements/ButtonToolTip.js +1 -1
- package/lib-cjs/component/elements/CheckBox.js +3 -5
- package/lib-cjs/component/elements/CheckBoxCell.js +15 -0
- package/lib-cjs/component/elements/Input.js +1 -1
- package/lib-cjs/component/elements/Label.js +3 -3
- package/lib-cjs/component/elements/Logo.js +1 -1
- package/lib-cjs/component/elements/MoleculeSelection.js +1 -1
- package/lib-cjs/component/elements/NextPrev.js +1 -1
- package/lib-cjs/component/elements/ReactTable/Elements/ReactTableRow.js +2 -1
- package/lib-cjs/component/elements/Select.js +6 -8
- package/lib-cjs/component/elements/Tab/Tab.js +1 -1
- package/lib-cjs/component/elements/Tab/Tabs.js +2 -1
- package/lib-cjs/component/elements/Table/Table.js +2 -2
- package/lib-cjs/component/elements/ToggleButton.js +5 -4
- package/lib-cjs/component/elements/accordion/Accordion.js +2 -6
- package/lib-cjs/component/elements/accordion/AccordionItem.js +2 -2
- package/lib-cjs/component/elements/formik/FormikCheckBox.js +4 -2
- package/lib-cjs/component/elements/formik/FormikOnChange.js +10 -4
- package/lib-cjs/component/elements/formik/Input.js +1 -1
- package/lib-cjs/component/elements/popup/Modal/ConfirmDialog.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 +3 -3
- package/lib-cjs/component/elements/resizer/SVGResizer.js +2 -2
- package/lib-cjs/component/elements/toggle/ToggleButtonGroup.js +2 -2
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +110 -0
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +39 -35
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +87 -50
- package/lib-cjs/component/header/Header.js +7 -4
- package/lib-cjs/component/header/HeaderContainer.js +14 -0
- package/lib-cjs/component/header/ManualPhaseCorrectionPanel.js +26 -28
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +19 -21
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +70 -44
- package/lib-cjs/component/header/Zones2DOptionPanel.js +11 -13
- package/lib-cjs/component/highlight/index.js +20 -18
- package/lib-cjs/component/hooks/useActiveSpectrumStyleOptions.js +2 -2
- package/lib-cjs/component/hooks/useCheckToolsVisibility.js +32 -1
- package/lib-cjs/component/hooks/useExport.js +2 -2
- package/lib-cjs/component/hooks/useFilter.js +14 -0
- package/lib-cjs/component/hooks/useFormatNumberByNucleus.js +2 -3
- package/lib-cjs/component/hooks/useToolsFunctions.js +1 -1
- package/lib-cjs/component/loader/DropZone.js +9 -3
- package/lib-cjs/component/loader/NoData.js +31 -30
- package/lib-cjs/component/modal/AlignSpectraModal.js +1 -2
- package/lib-cjs/component/modal/EditPeakShapeModal.js +113 -0
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +4 -5
- package/lib-cjs/component/modal/MultipleSpectraFiltersModal/index.js +1 -2
- package/lib-cjs/component/modal/PredictSpectraModal.js +1 -1
- package/lib-cjs/component/modal/changeSum/ChangeSumModal.js +9 -11
- package/lib-cjs/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +49 -54
- package/lib-cjs/component/modal/editRange/forms/components/AddSignalFormTab.js +9 -22
- package/lib-cjs/component/modal/editRange/forms/components/CouplingsTable.js +14 -57
- 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 +18 -29
- package/lib-cjs/component/modal/editZone/SignalsForm.js +1 -1
- package/lib-cjs/component/modal/setting/DatabasesTabContent.js +32 -34
- package/lib-cjs/component/modal/setting/DisplayTabContent.js +6 -15
- package/lib-cjs/component/modal/setting/FormattingTabContent.js +2 -2
- package/lib-cjs/component/modal/setting/GeneralSettings.js +19 -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/WorkspaceItem.js +2 -2
- package/lib-cjs/component/modal/setting/settingsValidation.js +6 -4
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +12 -14
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +1 -1
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +3 -3
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +16 -20
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +6 -6
- package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +12 -4
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +1 -1
- package/lib-cjs/component/panels/Panels.js +10 -7
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +45 -20
- package/lib-cjs/component/panels/PeaksPanel/PeaksPreferences.js +17 -0
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +42 -11
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +11 -2
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +18 -18
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +3 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/ActionsColumn.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -1
- package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +47 -29
- package/lib-cjs/component/panels/RangesPanel/hooks/useMapRanges.js +3 -6
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumListItem.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/ColorIndicator.js +2 -2
- package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideMarkersButton.js +5 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +7 -7
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +1 -2
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +7 -10
- 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 +2 -2
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +12 -12
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +78 -32
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +1 -1
- package/lib-cjs/component/panels/databasePanel/DatabaseStructureSearchModal.js +15 -0
- package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +16 -11
- package/lib-cjs/component/panels/extra/preferences/ColumnsHelper.js +2 -4
- package/lib-cjs/component/panels/filtersPanel/FilterPanel.js +1 -1
- package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +2 -2
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +3 -14
- package/lib-cjs/component/panels/header/SpectraAutomaticPickingButton.js +1 -1
- package/lib-cjs/component/panels/predictionPanel/PredictionOptions.js +2 -2
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +15 -3
- package/lib-cjs/component/reducer/IgnoreActions.js +4 -0
- package/lib-cjs/component/reducer/Reducer.js +38 -16
- 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 +198 -32
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +2 -2
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +27 -14
- package/lib-cjs/component/reducer/actions/PeaksActions.js +40 -4
- 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 +5 -8
- package/lib-cjs/component/reducer/actions/ToolsActions.js +31 -104
- package/lib-cjs/component/reducer/helper/getSpectrum.js +18 -0
- package/lib-cjs/component/reducer/helper/getStrongestPeak.js +18 -0
- package/lib-cjs/component/reducer/preferences/actions/addWorkspace.js +4 -7
- package/lib-cjs/component/reducer/preferences/actions/initPreferences.js +5 -5
- package/lib-cjs/component/reducer/preferences/actions/removeWorkspace.js +1 -1
- package/lib-cjs/component/reducer/preferences/actions/setPanelsPreferences.js +1 -1
- package/lib-cjs/component/reducer/preferences/actions/setPreferences.js +16 -16
- package/lib-cjs/component/reducer/preferences/actions/setWorkspace.js +1 -1
- package/lib-cjs/component/reducer/preferences/panelsPreferencesDefaultValues.js +7 -4
- package/lib-cjs/component/reducer/preferences/preferencesReducer.js +1 -4
- package/lib-cjs/component/reducer/preferences/{utilites → utilities}/checkKeysExists.js +0 -0
- package/lib-cjs/component/reducer/preferences/{utilites → utilities}/filterObject.js +0 -0
- package/lib-cjs/component/reducer/preferences/{utilites → utilities}/flatObject.js +0 -0
- package/lib-cjs/component/reducer/preferences/{utilites → utilities}/getActiveWorkspace.js +0 -0
- package/lib-cjs/component/reducer/preferences/{utilites → utilities}/getPreferencesByWorkspace.js +3 -1
- package/lib-cjs/component/reducer/preferences/{utilites → utilities}/mapNucleiFormatting.js +0 -0
- package/lib-cjs/component/reducer/types/Types.js +13 -4
- package/lib-cjs/component/tool/BrushX.js +2 -2
- package/lib-cjs/component/tool/BrushXY.js +5 -4
- package/lib-cjs/component/tool/CrossLinePointer.js +6 -5
- package/lib-cjs/component/tool/FloatMoleculeStructures/DraggableStructure.js +11 -2
- package/lib-cjs/component/tool/FloatMoleculeStructures/index.js +13 -6
- package/lib-cjs/component/toolbar/BasicToolBar.js +3 -9
- package/lib-cjs/component/toolbar/FunctionToolBar.js +10 -26
- package/lib-cjs/component/toolbar/ToolTypes.js +122 -12
- package/lib-cjs/component/utility/Evaluate.js +1 -0
- package/lib-cjs/component/utility/Export.js +4 -3
- package/lib-cjs/component/utility/formatNumber.js +3 -1
- 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/utility/util/nmredata/addZones.js +3 -6
- package/lib-cjs/component/workspaces/basic.js +19 -32
- package/lib-cjs/component/workspaces/embedded.js +21 -13
- package/lib-cjs/component/workspaces/exercise.js +5 -36
- package/lib-cjs/component/workspaces/prediction.js +21 -17
- package/lib-cjs/component/workspaces/process1D.js +21 -26
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +73 -0
- package/lib-cjs/constants.js +1 -1
- package/lib-cjs/data/Filters.js +3 -3
- package/lib-cjs/data/FiltersManager.js +4 -7
- package/lib-cjs/data/PredictionManager.js +22 -24
- package/lib-cjs/data/SpectraManager.js +14 -29
- package/lib-cjs/data/constants/SignalsKinds.js +0 -8
- package/lib-cjs/data/data1d/Data1DManager.js +13 -6
- package/lib-cjs/data/data1d/MultipleAnalysis.js +1 -0
- package/lib-cjs/data/data1d/Spectrum1D/SumManager.js +18 -12
- package/lib-cjs/data/data1d/Spectrum1D/convertDataToFloat64Array.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/generateJGraphData.js +10 -15
- package/lib-cjs/data/data1d/Spectrum1D/getReferenceShift.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/index.js +3 -1
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +14 -15
- package/lib-cjs/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateRelatives.js +5 -7
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +5 -3
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +15 -19
- package/lib-cjs/data/data1d/Spectrum1D/peaks/optimizePeaks.js +28 -0
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +41 -17
- package/lib-cjs/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +1 -0
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRange.js +2 -5
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectSignal.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +4 -7
- package/lib-cjs/data/data1d/database.js +49 -8
- package/lib-cjs/data/data1d/filter1d/apodization.js +70 -0
- package/lib-cjs/data/data1d/filter1d/autoPhaseCorrection.js +1 -1
- package/lib-cjs/data/data1d/filter1d/baselineCorrection.js +11 -18
- package/lib-cjs/data/data1d/filter1d/zeroFillingAndApodization.js +30 -0
- package/lib-cjs/data/data2d/Processing2D.js +4 -3
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +17 -16
- package/lib-cjs/data/data2d/Spectrum2D/zones/detectZones.js +3 -6
- package/lib-cjs/data/data2d/Spectrum2D/zones/detectZonesManual.js +3 -6
- package/lib-cjs/data/migration/MigrationManager.js +3 -1
- package/lib-cjs/data/migration/migrateToVersion3.js +58 -0
- package/lib-cjs/data/molecules/Molecule.js +5 -6
- package/lib-cjs/data/molecules/MoleculeManager.js +5 -5
- 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/generateNumbersPowerOfX.js +0 -1
- package/lib-cjs/data/utilities/getSum.js +1 -3
- package/lib-cjs/data/utilities/isInRange.js +7 -0
- 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 +48 -46
- package/lib/component/1d/PeakAnnotations.js +0 -43
- package/lib/component/1d/multiplicityTree/TempMultiplicityTree.d.ts +0 -2
- package/lib/component/1d/multiplicityTree/TempMultiplicityTree.js +0 -14
- package/lib/component/modal/setting/ControllersTabContent.d.ts +0 -3
- package/lib/component/panels/databasePanel/useDatabases.d.ts +0 -5
- package/lib/component/panels/databasePanel/useDatabases.js +0 -10
- package/lib/component/reducer/preferences/actions/resetPreferences.d.ts +0 -3
- package/lib/component/reducer/preferences/actions/resetPreferences.js +0 -14
- package/lib/component/reducer/preferences/utilites/getPreferencesByWorkspace.js +0 -4
- package/lib/data/data1d/filter1d/lineBroadening.d.ts +0 -14
- package/lib/data/data1d/filter1d/lineBroadening.js +0 -57
- package/lib/data/utilities/generateID.d.ts +0 -1
- package/lib/data/utilities/generateID.js +0 -9
- package/lib-cjs/component/1d/PeakAnnotations.js +0 -48
- package/lib-cjs/component/1d/multiplicityTree/TempMultiplicityTree.js +0 -20
- package/lib-cjs/component/panels/databasePanel/useDatabases.js +0 -14
- package/lib-cjs/component/reducer/preferences/actions/resetPreferences.js +0 -18
- package/lib-cjs/data/data1d/filter1d/lineBroadening.js +0 -63
- package/lib-cjs/data/utilities/generateID.js +0 -12
|
@@ -10,9 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.getSum = void 0;
|
|
11
11
|
function getSum(values, key, check = null) {
|
|
12
12
|
return values.reduce((sum, current) => {
|
|
13
|
-
return check
|
|
14
|
-
? (sum += Math.abs(current[key]))
|
|
15
|
-
: sum;
|
|
13
|
+
return check?.(current) ? (sum += Math.abs(current[key])) : sum;
|
|
16
14
|
}, 0);
|
|
17
15
|
}
|
|
18
16
|
exports.getSum = getSum;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function isInRange(value, options) {
|
|
4
|
+
const { from, to, factor = 100000 } = options;
|
|
5
|
+
return value * factor >= from * factor && value * factor <= to * factor;
|
|
6
|
+
}
|
|
7
|
+
exports.default = isInRange;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isMolFileEmpty = void 0;
|
|
4
|
+
function isMolFileEmpty(molFile) {
|
|
5
|
+
if (!molFile)
|
|
6
|
+
return true;
|
|
7
|
+
const molText = /(?<s>M {2}V30 BEGIN BOND)(?<mol>.*?)(?<e>M {2}V30 END BOND)/gs.exec(molFile)?.groups?.mol;
|
|
8
|
+
return !molText?.trim();
|
|
9
|
+
}
|
|
10
|
+
exports.isMolFileEmpty = isMolFileEmpty;
|
package/lib-cjs/versionInfo.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nmrium",
|
|
3
3
|
"description": "React component to display and process nuclear magnetic resonance (NMR) spectra.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.30.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib-cjs/component/NMRium.js",
|
|
7
7
|
"module": "lib/component/NMRium.js",
|
|
@@ -38,27 +38,29 @@
|
|
|
38
38
|
"url": "git+https://github.com/cheminfo/nmrium.git"
|
|
39
39
|
},
|
|
40
40
|
"volta": {
|
|
41
|
-
"node": "16.
|
|
41
|
+
"node": "16.16.0",
|
|
42
|
+
"npm": "8.15.1"
|
|
42
43
|
},
|
|
43
44
|
"overrides": {
|
|
44
45
|
"react": "$react",
|
|
45
46
|
"react-dom": "$react-dom"
|
|
46
47
|
},
|
|
47
48
|
"peerDependencies": {
|
|
48
|
-
"react": ">=
|
|
49
|
-
"react-dom": ">=
|
|
49
|
+
"react": ">=18.0.0",
|
|
50
|
+
"react-dom": ">=18.0.0"
|
|
50
51
|
},
|
|
51
52
|
"dependencies": {
|
|
52
|
-
"@emotion/react": "^11.
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"cheminfo-
|
|
56
|
-
"
|
|
53
|
+
"@emotion/react": "^11.10.0",
|
|
54
|
+
"@lukeed/uuid": "^2.0.0",
|
|
55
|
+
"analysis-ui-components": "^0.16.0",
|
|
56
|
+
"cheminfo-font": "^1.9.0",
|
|
57
|
+
"cheminfo-types": "^1.4.0",
|
|
58
|
+
"d3": "^7.6.1",
|
|
57
59
|
"eventemitter3": "^4.0.7",
|
|
58
60
|
"file-saver": "^2.0.5",
|
|
59
61
|
"formik": "^2.2.9",
|
|
60
|
-
"immer": "^9.0.
|
|
61
|
-
"jszip": "^3.10.
|
|
62
|
+
"immer": "^9.0.15",
|
|
63
|
+
"jszip": "^3.10.1",
|
|
62
64
|
"lodash": "^4.17.21",
|
|
63
65
|
"mf-parser": "^1.4.7",
|
|
64
66
|
"ml-airpls": "^1.0.0",
|
|
@@ -68,61 +70,61 @@
|
|
|
68
70
|
"ml-array-xy-equally-spaced": "^1.2.1",
|
|
69
71
|
"ml-baseline-correction-regression": "^1.0.0",
|
|
70
72
|
"ml-conrec": "^3.2.1",
|
|
71
|
-
"ml-gsd": "^
|
|
72
|
-
"ml-spectra-processing": "^11.
|
|
73
|
+
"ml-gsd": "^12.0.0",
|
|
74
|
+
"ml-spectra-processing": "^11.12.0",
|
|
73
75
|
"ml-stat": "^1.3.3",
|
|
74
76
|
"multiplet-analysis": "^2.0.0",
|
|
75
|
-
"nmr-correlation": "^2.3.
|
|
76
|
-
"nmr-parser": "^1.
|
|
77
|
-
"nmr-processing": "^
|
|
78
|
-
"nmredata": "^0.
|
|
77
|
+
"nmr-correlation": "^2.3.3",
|
|
78
|
+
"nmr-parser": "^1.9.1",
|
|
79
|
+
"nmr-processing": "^9.0.3",
|
|
80
|
+
"nmredata": "^0.7.0",
|
|
79
81
|
"numeral": "^2.0.6",
|
|
80
|
-
"openchemlib": "^
|
|
81
|
-
"openchemlib-utils": "^
|
|
82
|
+
"openchemlib": "^8.0.1",
|
|
83
|
+
"openchemlib-utils": "^2.0.0",
|
|
82
84
|
"re-resizable": "^6.9.9",
|
|
83
85
|
"react-d3-utils": "^0.5.1",
|
|
84
|
-
"react-dropzone": "^14.2.
|
|
86
|
+
"react-dropzone": "^14.2.2",
|
|
85
87
|
"react-error-boundary": "^3.1.4",
|
|
86
88
|
"react-icons": "^4.4.0",
|
|
87
|
-
"react-inspector": "^
|
|
89
|
+
"react-inspector": "^6.0.1",
|
|
88
90
|
"react-mf": "^2.0.1",
|
|
89
|
-
"react-ocl": "^
|
|
90
|
-
"react-ocl-nmr": "^
|
|
91
|
-
"react-plot": "^0.
|
|
91
|
+
"react-ocl": "^5.0.0",
|
|
92
|
+
"react-ocl-nmr": "^2.0.0",
|
|
93
|
+
"react-plot": "^0.20.1",
|
|
92
94
|
"react-rnd": "^10.3.7",
|
|
93
|
-
"react-slider": "^2.0.
|
|
95
|
+
"react-slider": "^2.0.3",
|
|
94
96
|
"react-table": "^7.8.0",
|
|
95
|
-
"react-transition-group": "^4.4.
|
|
97
|
+
"react-transition-group": "^4.4.5",
|
|
96
98
|
"react-use": "^17.4.0",
|
|
97
|
-
"smart-array-filter": "^
|
|
99
|
+
"smart-array-filter": "^4.0.0",
|
|
98
100
|
"yup": "^0.32.11"
|
|
99
101
|
},
|
|
100
102
|
"devDependencies": {
|
|
101
|
-
"@babel/plugin-transform-modules-commonjs": "^7.18.
|
|
102
|
-
"@babel/preset-react": "^7.
|
|
103
|
-
"@babel/preset-typescript": "^7.
|
|
104
|
-
"@playwright/test": "^1.
|
|
103
|
+
"@babel/plugin-transform-modules-commonjs": "^7.18.6",
|
|
104
|
+
"@babel/preset-react": "^7.18.6",
|
|
105
|
+
"@babel/preset-typescript": "^7.18.6",
|
|
106
|
+
"@playwright/test": "^1.25.1",
|
|
105
107
|
"@simbathesailor/use-what-changed": "^2.0.0",
|
|
106
108
|
"@types/d3": "^7.4.0",
|
|
107
|
-
"@types/jest": "^
|
|
108
|
-
"@types/node": "^
|
|
109
|
-
"@types/react": "^18.0.
|
|
110
|
-
"@types/react-dom": "^18.0.
|
|
111
|
-
"@vitejs/plugin-react": "^
|
|
112
|
-
"@zakodium/eslint-config": "^
|
|
109
|
+
"@types/jest": "^28.1.8",
|
|
110
|
+
"@types/node": "^18.7.13",
|
|
111
|
+
"@types/react": "^18.0.17",
|
|
112
|
+
"@types/react-dom": "^18.0.6",
|
|
113
|
+
"@vitejs/plugin-react": "^2.0.1",
|
|
114
|
+
"@zakodium/eslint-config": "^6.0.0",
|
|
113
115
|
"cross-env": "^7.0.3",
|
|
114
|
-
"eslint": "^8.
|
|
115
|
-
"jest": "^
|
|
116
|
+
"eslint": "^8.22.0",
|
|
117
|
+
"jest": "^29.0.1",
|
|
116
118
|
"modern-normalize": "^1.1.0",
|
|
117
|
-
"prettier": "^2.
|
|
118
|
-
"rc-menu": "^9.6.
|
|
119
|
-
"react": "^18.
|
|
120
|
-
"react-dom": "^18.
|
|
119
|
+
"prettier": "^2.7.1",
|
|
120
|
+
"rc-menu": "^9.6.3",
|
|
121
|
+
"react": "^18.2.0",
|
|
122
|
+
"react-dom": "^18.2.0",
|
|
121
123
|
"react-router-dom": "^6.3.0",
|
|
122
124
|
"rimraf": "^3.0.2",
|
|
123
125
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
124
|
-
"serve": "^
|
|
125
|
-
"typescript": "~4.
|
|
126
|
-
"vite": "^
|
|
126
|
+
"serve": "^14.0.1",
|
|
127
|
+
"typescript": "~4.8.2",
|
|
128
|
+
"vite": "^3.0.9"
|
|
127
129
|
}
|
|
128
130
|
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
|
-
import { isSpectrum1D } from '../../data/data1d/Spectrum1D';
|
|
4
|
-
import { useChartData } from '../context/ChartContext';
|
|
5
|
-
import { useScaleChecked } from '../context/ScaleContext';
|
|
6
|
-
import PeakAnnotation from './PeakAnnotation';
|
|
7
|
-
import getVerticalShift from './utilities/getVerticalShift';
|
|
8
|
-
function PeakAnnotations() {
|
|
9
|
-
const { data, activeSpectrum, verticalAlign, displayerKey, xDomains } = useChartData();
|
|
10
|
-
const { scaleX, scaleY } = useScaleChecked();
|
|
11
|
-
const Peaks = useMemo(() => {
|
|
12
|
-
const getVerticalAlign = (id) => {
|
|
13
|
-
const index = data.findIndex((d) => d.id === id);
|
|
14
|
-
return getVerticalShift(verticalAlign, { index });
|
|
15
|
-
};
|
|
16
|
-
const reSortData = () => {
|
|
17
|
-
const _data = [...data];
|
|
18
|
-
return activeSpectrum
|
|
19
|
-
? _data.sort((x, y) => {
|
|
20
|
-
return x.id === activeSpectrum.id
|
|
21
|
-
? 1
|
|
22
|
-
: y.id === activeSpectrum.id
|
|
23
|
-
? -1
|
|
24
|
-
: 0;
|
|
25
|
-
})
|
|
26
|
-
: _data;
|
|
27
|
-
};
|
|
28
|
-
return (data &&
|
|
29
|
-
reSortData()
|
|
30
|
-
.filter((d) => d.display.isVisible === true && xDomains[d.id])
|
|
31
|
-
.filter(isSpectrum1D)
|
|
32
|
-
.map((d) => {
|
|
33
|
-
return (d.peaks?.values &&
|
|
34
|
-
d.display.isPeaksMarkersVisible && (_jsx("g", { transform: `translate(0,-${getVerticalAlign(d.id)})`, children: d.peaks.values.map(({ x, y, id }) => (_jsx(PeakAnnotation, { x: scaleX()(x), y: scaleY(d.id)(y) - 5, sign: Math.sign(y), id: id, value: x, color: "#730000", nucleus: d.info.nucleus, isActive: activeSpectrum == null
|
|
35
|
-
? false
|
|
36
|
-
: activeSpectrum.id === d.id
|
|
37
|
-
? true
|
|
38
|
-
: false }, id))) }, d.id)));
|
|
39
|
-
}));
|
|
40
|
-
}, [data, verticalAlign, activeSpectrum, xDomains, scaleX, scaleY]);
|
|
41
|
-
return (_jsx("g", { className: "peaks", clipPath: `url(#${displayerKey}clip-chart-1d)`, children: Peaks }));
|
|
42
|
-
}
|
|
43
|
-
export default PeakAnnotations;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
import { useChartData } from '../../context/ChartContext';
|
|
4
|
-
import MultiplicityTree from './MultiplicityTree';
|
|
5
|
-
function TempMultiplicityTreeInner({ range }) {
|
|
6
|
-
return (range?.signals &&
|
|
7
|
-
range.signals.length > 0 &&
|
|
8
|
-
range.signals.map((signal) => (_jsx(MultiplicityTree, { rangeFrom: range.from, rangeTo: range.to, signal: signal }, signal.id))));
|
|
9
|
-
}
|
|
10
|
-
const MemoizedTempMultiplicityTree = memo(TempMultiplicityTreeInner);
|
|
11
|
-
export default function TempMultiplicityTree() {
|
|
12
|
-
const { toolOptions: { data: { tempRange }, }, } = useChartData();
|
|
13
|
-
return _jsx(MemoizedTempMultiplicityTree, { range: tempRange });
|
|
14
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
import { databases } from '../../../data/data1d/database';
|
|
3
|
-
import { usePreferences } from '../../context/PreferencesContext';
|
|
4
|
-
export function useDatabases() {
|
|
5
|
-
const { current } = usePreferences();
|
|
6
|
-
return useMemo(() => {
|
|
7
|
-
const data = current.databases || [];
|
|
8
|
-
return databases.concat(data.filter((datum) => datum.enabled));
|
|
9
|
-
}, [current.databases]);
|
|
10
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { getLocalStorage, storeData } from '../../../utility/LocalStorage';
|
|
2
|
-
import { getActiveWorkspace } from '../utilites/getActiveWorkspace';
|
|
3
|
-
import { getPreferencesByWorkspace } from '../utilites/getPreferencesByWorkspace';
|
|
4
|
-
export function resetPreferences(draft) {
|
|
5
|
-
const currentWorkspacePreferences = getActiveWorkspace(draft);
|
|
6
|
-
let localData = getLocalStorage('nmr-general-settings');
|
|
7
|
-
const workSpaceDisplayPreferences = getPreferencesByWorkspace(draft.workspace.current).display;
|
|
8
|
-
if (localData.workspaces[draft.workspace.current]) {
|
|
9
|
-
localData.workspaces[draft.workspace.current].display =
|
|
10
|
-
workSpaceDisplayPreferences;
|
|
11
|
-
storeData('nmr-general-settings', JSON.stringify(localData));
|
|
12
|
-
}
|
|
13
|
-
currentWorkspacePreferences.display = workSpaceDisplayPreferences;
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Datum1D } from '../../types/data1d/Datum1D';
|
|
2
|
-
export declare const id = "lineBroadening";
|
|
3
|
-
export declare const name = "Line broadening";
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* @param {Datum1d} datum1d
|
|
7
|
-
* @param {Object} [value]
|
|
8
|
-
*/
|
|
9
|
-
export declare function apply(datum1D: Datum1D, value: any): void;
|
|
10
|
-
export declare function isApplicable(datum1D: Datum1D): boolean;
|
|
11
|
-
export declare function reduce(previousValue: any, newValue: any): {
|
|
12
|
-
once: boolean;
|
|
13
|
-
reduce: any;
|
|
14
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
export const id = 'lineBroadening';
|
|
2
|
-
export const name = 'Line broadening';
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* @param {Datum1d} datum1d
|
|
6
|
-
* @param {Object} [value]
|
|
7
|
-
*/
|
|
8
|
-
export function apply(datum1D, value) {
|
|
9
|
-
if (!isApplicable(datum1D)) {
|
|
10
|
-
throw new Error('lineBroadening not applicable on this data');
|
|
11
|
-
}
|
|
12
|
-
let grpdly = datum1D.info?.digitalFilter || 0;
|
|
13
|
-
let pointsToShift;
|
|
14
|
-
if (grpdly > 0) {
|
|
15
|
-
pointsToShift = Math.floor(grpdly);
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
pointsToShift = 0;
|
|
19
|
-
}
|
|
20
|
-
const re = datum1D.data.re;
|
|
21
|
-
const im = datum1D.data.im;
|
|
22
|
-
const t = datum1D.data.x;
|
|
23
|
-
const length = re.length;
|
|
24
|
-
const newRE = new Float64Array(length); // I don't think we need a new array... here
|
|
25
|
-
const newIM = new Float64Array(length);
|
|
26
|
-
//if (value !== 0) {// is it OK to skip this line if "value" is zero?
|
|
27
|
-
//please check this test of zero is correct !== or != ...
|
|
28
|
-
const dw = (t[length - 1] - t[0]) / (length - 1); //REPLACE CONSTANT with calculated value... : for this we need AQ or DW to set it right...
|
|
29
|
-
// convert line broadening in Hz into exponential coefficient:
|
|
30
|
-
const em = -value * Math.exp(1);
|
|
31
|
-
const coefExp = Math.exp(em * dw);
|
|
32
|
-
let curFactor = Math.exp(em * t[0]); // in case does not start at zero
|
|
33
|
-
for (let i = 0; i < length - pointsToShift; i++) {
|
|
34
|
-
newRE[i] = re[i] * curFactor;
|
|
35
|
-
newIM[i] = im[i] * curFactor;
|
|
36
|
-
curFactor = curFactor * coefExp;
|
|
37
|
-
}
|
|
38
|
-
curFactor = Math.exp(em * t[0]);
|
|
39
|
-
for (let i = length; i > length - pointsToShift; i--) {
|
|
40
|
-
newRE[i] = re[i] * curFactor;
|
|
41
|
-
newIM[i] = im[i] * curFactor;
|
|
42
|
-
curFactor = curFactor * coefExp;
|
|
43
|
-
}
|
|
44
|
-
datum1D.data = { ...datum1D.data, ...{ re: newRE, im: newIM } };
|
|
45
|
-
//}
|
|
46
|
-
}
|
|
47
|
-
export function isApplicable(datum1D) {
|
|
48
|
-
if (datum1D.info.isComplex && datum1D.info.isFid)
|
|
49
|
-
return true;
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
export function reduce(previousValue, newValue) {
|
|
53
|
-
return {
|
|
54
|
-
once: true,
|
|
55
|
-
reduce: previousValue + newValue,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function generateID(): string;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const BASE62 = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
2
|
-
const LENGTH = 8;
|
|
3
|
-
export default function generateID() {
|
|
4
|
-
let id = '';
|
|
5
|
-
for (let i = 0; i < LENGTH; i++) {
|
|
6
|
-
id += BASE62.charAt(Math.floor(Math.random() * 62));
|
|
7
|
-
}
|
|
8
|
-
return id;
|
|
9
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
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 react_1 = require("react");
|
|
8
|
-
const Spectrum1D_1 = require("../../data/data1d/Spectrum1D");
|
|
9
|
-
const ChartContext_1 = require("../context/ChartContext");
|
|
10
|
-
const ScaleContext_1 = require("../context/ScaleContext");
|
|
11
|
-
const PeakAnnotation_1 = __importDefault(require("./PeakAnnotation"));
|
|
12
|
-
const getVerticalShift_1 = __importDefault(require("./utilities/getVerticalShift"));
|
|
13
|
-
function PeakAnnotations() {
|
|
14
|
-
const { data, activeSpectrum, verticalAlign, displayerKey, xDomains } = (0, ChartContext_1.useChartData)();
|
|
15
|
-
const { scaleX, scaleY } = (0, ScaleContext_1.useScaleChecked)();
|
|
16
|
-
const Peaks = (0, react_1.useMemo)(() => {
|
|
17
|
-
const getVerticalAlign = (id) => {
|
|
18
|
-
const index = data.findIndex((d) => d.id === id);
|
|
19
|
-
return (0, getVerticalShift_1.default)(verticalAlign, { index });
|
|
20
|
-
};
|
|
21
|
-
const reSortData = () => {
|
|
22
|
-
const _data = [...data];
|
|
23
|
-
return activeSpectrum
|
|
24
|
-
? _data.sort((x, y) => {
|
|
25
|
-
return x.id === activeSpectrum.id
|
|
26
|
-
? 1
|
|
27
|
-
: y.id === activeSpectrum.id
|
|
28
|
-
? -1
|
|
29
|
-
: 0;
|
|
30
|
-
})
|
|
31
|
-
: _data;
|
|
32
|
-
};
|
|
33
|
-
return (data &&
|
|
34
|
-
reSortData()
|
|
35
|
-
.filter((d) => d.display.isVisible === true && xDomains[d.id])
|
|
36
|
-
.filter(Spectrum1D_1.isSpectrum1D)
|
|
37
|
-
.map((d) => {
|
|
38
|
-
return (d.peaks?.values &&
|
|
39
|
-
d.display.isPeaksMarkersVisible && ((0, jsx_runtime_1.jsx)("g", { transform: `translate(0,-${getVerticalAlign(d.id)})`, children: d.peaks.values.map(({ x, y, id }) => ((0, jsx_runtime_1.jsx)(PeakAnnotation_1.default, { x: scaleX()(x), y: scaleY(d.id)(y) - 5, sign: Math.sign(y), id: id, value: x, color: "#730000", nucleus: d.info.nucleus, isActive: activeSpectrum == null
|
|
40
|
-
? false
|
|
41
|
-
: activeSpectrum.id === d.id
|
|
42
|
-
? true
|
|
43
|
-
: false }, id))) }, d.id)));
|
|
44
|
-
}));
|
|
45
|
-
}, [data, verticalAlign, activeSpectrum, xDomains, scaleX, scaleY]);
|
|
46
|
-
return ((0, jsx_runtime_1.jsx)("g", { className: "peaks", clipPath: `url(#${displayerKey}clip-chart-1d)`, children: Peaks }));
|
|
47
|
-
}
|
|
48
|
-
exports.default = PeakAnnotations;
|
|
@@ -1,20 +0,0 @@
|
|
|
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 react_1 = require("react");
|
|
8
|
-
const ChartContext_1 = require("../../context/ChartContext");
|
|
9
|
-
const MultiplicityTree_1 = __importDefault(require("./MultiplicityTree"));
|
|
10
|
-
function TempMultiplicityTreeInner({ range }) {
|
|
11
|
-
return (range?.signals &&
|
|
12
|
-
range.signals.length > 0 &&
|
|
13
|
-
range.signals.map((signal) => ((0, jsx_runtime_1.jsx)(MultiplicityTree_1.default, { rangeFrom: range.from, rangeTo: range.to, signal: signal }, signal.id))));
|
|
14
|
-
}
|
|
15
|
-
const MemoizedTempMultiplicityTree = (0, react_1.memo)(TempMultiplicityTreeInner);
|
|
16
|
-
function TempMultiplicityTree() {
|
|
17
|
-
const { toolOptions: { data: { tempRange }, }, } = (0, ChartContext_1.useChartData)();
|
|
18
|
-
return (0, jsx_runtime_1.jsx)(MemoizedTempMultiplicityTree, { range: tempRange });
|
|
19
|
-
}
|
|
20
|
-
exports.default = TempMultiplicityTree;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useDatabases = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const database_1 = require("../../../data/data1d/database");
|
|
6
|
-
const PreferencesContext_1 = require("../../context/PreferencesContext");
|
|
7
|
-
function useDatabases() {
|
|
8
|
-
const { current } = (0, PreferencesContext_1.usePreferences)();
|
|
9
|
-
return (0, react_1.useMemo)(() => {
|
|
10
|
-
const data = current.databases || [];
|
|
11
|
-
return database_1.databases.concat(data.filter((datum) => datum.enabled));
|
|
12
|
-
}, [current.databases]);
|
|
13
|
-
}
|
|
14
|
-
exports.useDatabases = useDatabases;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resetPreferences = void 0;
|
|
4
|
-
const LocalStorage_1 = require("../../../utility/LocalStorage");
|
|
5
|
-
const getActiveWorkspace_1 = require("../utilites/getActiveWorkspace");
|
|
6
|
-
const getPreferencesByWorkspace_1 = require("../utilites/getPreferencesByWorkspace");
|
|
7
|
-
function resetPreferences(draft) {
|
|
8
|
-
const currentWorkspacePreferences = (0, getActiveWorkspace_1.getActiveWorkspace)(draft);
|
|
9
|
-
let localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
|
|
10
|
-
const workSpaceDisplayPreferences = (0, getPreferencesByWorkspace_1.getPreferencesByWorkspace)(draft.workspace.current).display;
|
|
11
|
-
if (localData.workspaces[draft.workspace.current]) {
|
|
12
|
-
localData.workspaces[draft.workspace.current].display =
|
|
13
|
-
workSpaceDisplayPreferences;
|
|
14
|
-
(0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(localData));
|
|
15
|
-
}
|
|
16
|
-
currentWorkspacePreferences.display = workSpaceDisplayPreferences;
|
|
17
|
-
}
|
|
18
|
-
exports.resetPreferences = resetPreferences;
|
|
@@ -1,63 +0,0 @@
|
|
|
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 = 'lineBroadening';
|
|
5
|
-
exports.name = 'Line broadening';
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param {Datum1d} datum1d
|
|
9
|
-
* @param {Object} [value]
|
|
10
|
-
*/
|
|
11
|
-
function apply(datum1D, value) {
|
|
12
|
-
if (!isApplicable(datum1D)) {
|
|
13
|
-
throw new Error('lineBroadening not applicable on this data');
|
|
14
|
-
}
|
|
15
|
-
let grpdly = datum1D.info?.digitalFilter || 0;
|
|
16
|
-
let pointsToShift;
|
|
17
|
-
if (grpdly > 0) {
|
|
18
|
-
pointsToShift = Math.floor(grpdly);
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
pointsToShift = 0;
|
|
22
|
-
}
|
|
23
|
-
const re = datum1D.data.re;
|
|
24
|
-
const im = datum1D.data.im;
|
|
25
|
-
const t = datum1D.data.x;
|
|
26
|
-
const length = re.length;
|
|
27
|
-
const newRE = new Float64Array(length); // I don't think we need a new array... here
|
|
28
|
-
const newIM = new Float64Array(length);
|
|
29
|
-
//if (value !== 0) {// is it OK to skip this line if "value" is zero?
|
|
30
|
-
//please check this test of zero is correct !== or != ...
|
|
31
|
-
const dw = (t[length - 1] - t[0]) / (length - 1); //REPLACE CONSTANT with calculated value... : for this we need AQ or DW to set it right...
|
|
32
|
-
// convert line broadening in Hz into exponential coefficient:
|
|
33
|
-
const em = -value * Math.exp(1);
|
|
34
|
-
const coefExp = Math.exp(em * dw);
|
|
35
|
-
let curFactor = Math.exp(em * t[0]); // in case does not start at zero
|
|
36
|
-
for (let i = 0; i < length - pointsToShift; i++) {
|
|
37
|
-
newRE[i] = re[i] * curFactor;
|
|
38
|
-
newIM[i] = im[i] * curFactor;
|
|
39
|
-
curFactor = curFactor * coefExp;
|
|
40
|
-
}
|
|
41
|
-
curFactor = Math.exp(em * t[0]);
|
|
42
|
-
for (let i = length; i > length - pointsToShift; i--) {
|
|
43
|
-
newRE[i] = re[i] * curFactor;
|
|
44
|
-
newIM[i] = im[i] * curFactor;
|
|
45
|
-
curFactor = curFactor * coefExp;
|
|
46
|
-
}
|
|
47
|
-
datum1D.data = { ...datum1D.data, ...{ re: newRE, im: newIM } };
|
|
48
|
-
//}
|
|
49
|
-
}
|
|
50
|
-
exports.apply = apply;
|
|
51
|
-
function isApplicable(datum1D) {
|
|
52
|
-
if (datum1D.info.isComplex && datum1D.info.isFid)
|
|
53
|
-
return true;
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
exports.isApplicable = isApplicable;
|
|
57
|
-
function reduce(previousValue, newValue) {
|
|
58
|
-
return {
|
|
59
|
-
once: true,
|
|
60
|
-
reduce: previousValue + newValue,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
exports.reduce = reduce;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const BASE62 = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
4
|
-
const LENGTH = 8;
|
|
5
|
-
function generateID() {
|
|
6
|
-
let id = '';
|
|
7
|
-
for (let i = 0; i < LENGTH; i++) {
|
|
8
|
-
id += BASE62.charAt(Math.floor(Math.random() * 62));
|
|
9
|
-
}
|
|
10
|
-
return id;
|
|
11
|
-
}
|
|
12
|
-
exports.default = generateID;
|