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
|
@@ -26,7 +26,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.handleShowJGraph = exports.handleAutoSpectraRangesDetection = exports.handleShowRangesIntegrals = exports.handleShowMultiplicityTrees = exports.
|
|
29
|
+
exports.handleShowJGraph = exports.handleAutoSpectraRangesDetection = exports.handleShowRangesIntegrals = exports.handleShowMultiplicityTrees = exports.handleUpdateRange = exports.handleChangeRangesSumFlag = exports.handleSetDiaIDRange = exports.handleUnlinkRange = exports.handleSaveEditedRange = exports.handleChangeRangeSignalKind = exports.handleChangeRangeSignalValue = exports.handleChangeRangeRelativeValue = exports.handleResizeRange = exports.handleAddRange = exports.handleChangeRangeSum = exports.handleDeleteSignal = exports.handleDeleteRange = exports.handleAutoRangesDetection = void 0;
|
|
30
|
+
const uuid_1 = require("@lukeed/uuid");
|
|
30
31
|
const immer_1 = require("immer");
|
|
31
32
|
const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
32
33
|
const ml_spectra_processing_1 = require("ml-spectra-processing");
|
|
@@ -39,6 +40,7 @@ const RangeUtilities_1 = require("../../../data/utilities/RangeUtilities");
|
|
|
39
40
|
const getRange_1 = __importDefault(require("../helper/getRange"));
|
|
40
41
|
const CorrelationsActions_1 = require("./CorrelationsActions");
|
|
41
42
|
const DomainActions_1 = require("./DomainActions");
|
|
43
|
+
const ToolsActions_1 = require("./ToolsActions");
|
|
42
44
|
function handleAutoRangesDetection(draft, options) {
|
|
43
45
|
const { activeSpectrum, data, xDomain, molecules, activeTab: nucleus, } = draft;
|
|
44
46
|
if (activeSpectrum?.id) {
|
|
@@ -93,7 +95,8 @@ function getRangeIndex(draft, spectrumIndex, rangeID) {
|
|
|
93
95
|
function handleDeleteRange(draft, action) {
|
|
94
96
|
if (draft.activeSpectrum?.id) {
|
|
95
97
|
const { index } = draft.activeSpectrum;
|
|
96
|
-
const {
|
|
98
|
+
const { data, resetSelectTool = false } = action.payload;
|
|
99
|
+
const { id = null, assignmentData } = data;
|
|
97
100
|
const datum = draft.data[index];
|
|
98
101
|
if (id) {
|
|
99
102
|
const rangeIndex = getRangeIndex(draft, index, id);
|
|
@@ -106,6 +109,9 @@ function handleDeleteRange(draft, action) {
|
|
|
106
109
|
}
|
|
107
110
|
(0, Spectrum1D_1.updateRangesRelativeValues)(datum);
|
|
108
111
|
handleOnChangeRangesData(draft);
|
|
112
|
+
if (resetSelectTool) {
|
|
113
|
+
(0, ToolsActions_1.resetSelectedTool)(draft);
|
|
114
|
+
}
|
|
109
115
|
}
|
|
110
116
|
}
|
|
111
117
|
exports.handleDeleteRange = handleDeleteRange;
|
|
@@ -132,8 +138,6 @@ function handleSaveEditedRange(draft, action) {
|
|
|
132
138
|
if (state.activeSpectrum?.id) {
|
|
133
139
|
const { index } = state.activeSpectrum;
|
|
134
140
|
const { editedRowData, assignmentData } = action.payload;
|
|
135
|
-
// reset temp range
|
|
136
|
-
draft.toolOptions.data.tempRange = null;
|
|
137
141
|
// remove assignments in global state
|
|
138
142
|
const _editedRowData = (0, RangeUtilities_1.unlink)(editedRowData);
|
|
139
143
|
delete _editedRowData.tableMetaInfo;
|
|
@@ -142,9 +146,13 @@ function handleSaveEditedRange(draft, action) {
|
|
|
142
146
|
// for now: clear all assignments for this range because signals or levels to store might have changed
|
|
143
147
|
(0, RangeUtilities_1.unlinkInAssignmentData)(assignmentData, [_editedRowData]);
|
|
144
148
|
const rangeIndex = getRangeIndex(state, index, _editedRowData.id);
|
|
145
|
-
|
|
149
|
+
if (_editedRowData.id === 'new') {
|
|
150
|
+
_editedRowData.id = (0, uuid_1.v4)();
|
|
151
|
+
}
|
|
152
|
+
draft.data[index].ranges.values.splice(rangeIndex, 1, _editedRowData);
|
|
146
153
|
(0, Spectrum1D_1.updateRangesRelativeValues)(draft.data[index]);
|
|
147
154
|
handleOnChangeRangesData(draft);
|
|
155
|
+
(0, ToolsActions_1.resetSelectedTool)(draft);
|
|
148
156
|
}
|
|
149
157
|
}
|
|
150
158
|
exports.handleSaveEditedRange = handleSaveEditedRange;
|
|
@@ -241,18 +249,36 @@ function handleChangeRangeSum(draft, options) {
|
|
|
241
249
|
}
|
|
242
250
|
}
|
|
243
251
|
exports.handleChangeRangeSum = handleChangeRangeSum;
|
|
244
|
-
function
|
|
245
|
-
const { startX, endX } =
|
|
246
|
-
const { activeSpectrum, activeTab: nucleus, molecules } = draft;
|
|
252
|
+
function addNewRange(draft, props) {
|
|
253
|
+
const { startX, endX, id } = props;
|
|
247
254
|
const range = (0, getRange_1.default)(draft, { startX, endX });
|
|
255
|
+
const { activeSpectrum, activeTab: nucleus, molecules } = draft;
|
|
248
256
|
if (activeSpectrum?.id) {
|
|
249
257
|
const { index } = activeSpectrum;
|
|
250
258
|
const [from, to] = range;
|
|
251
|
-
(0, Spectrum1D_1.addRange)(draft.data[index], {
|
|
259
|
+
(0, Spectrum1D_1.addRange)(draft.data[index], {
|
|
260
|
+
from,
|
|
261
|
+
to,
|
|
262
|
+
id,
|
|
263
|
+
nucleus,
|
|
264
|
+
molecules,
|
|
265
|
+
});
|
|
252
266
|
handleOnChangeRangesData(draft);
|
|
253
267
|
(0, DomainActions_1.setIntegralsYDomain)(draft, draft.data[index]);
|
|
254
268
|
}
|
|
255
269
|
}
|
|
270
|
+
function handleAddRange(draft, action) {
|
|
271
|
+
const { startX, endX, id } = action.payload;
|
|
272
|
+
if (id === 'new') {
|
|
273
|
+
const { width } = draft;
|
|
274
|
+
const startX = width / 3;
|
|
275
|
+
const endX = startX + 10;
|
|
276
|
+
addNewRange(draft, { startX, endX, id: 'new' });
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
addNewRange(draft, { startX, endX });
|
|
280
|
+
}
|
|
281
|
+
}
|
|
256
282
|
exports.handleAddRange = handleAddRange;
|
|
257
283
|
function handleChangeRangeRelativeValue(draft, action) {
|
|
258
284
|
const data = action.payload.data;
|
|
@@ -291,10 +317,18 @@ function handleChangeRangesSumFlag(draft, action) {
|
|
|
291
317
|
}
|
|
292
318
|
}
|
|
293
319
|
exports.handleChangeRangesSumFlag = handleChangeRangesSumFlag;
|
|
294
|
-
function
|
|
295
|
-
|
|
320
|
+
function handleUpdateRange(draft, action) {
|
|
321
|
+
const { range, resetSelectTool = false } = action.payload;
|
|
322
|
+
if (draft.activeSpectrum?.id && range.id) {
|
|
323
|
+
const datum = draft.data[draft.activeSpectrum?.index];
|
|
324
|
+
const index = datum.ranges.values.findIndex((_range) => _range.id === range.id);
|
|
325
|
+
datum.ranges.values[index] = range;
|
|
326
|
+
}
|
|
327
|
+
if (resetSelectTool) {
|
|
328
|
+
(0, ToolsActions_1.resetSelectedTool)(draft);
|
|
329
|
+
}
|
|
296
330
|
}
|
|
297
|
-
exports.
|
|
331
|
+
exports.handleUpdateRange = handleUpdateRange;
|
|
298
332
|
function handleShowMultiplicityTrees(draft) {
|
|
299
333
|
draft.toolOptions.data.showMultiplicityTrees =
|
|
300
334
|
!draft.toolOptions.data.showMultiplicityTrees;
|
|
@@ -39,8 +39,7 @@ const DomainActions_1 = require("./DomainActions");
|
|
|
39
39
|
const FiltersActions_1 = require("./FiltersActions");
|
|
40
40
|
const ToolsActions_1 = require("./ToolsActions");
|
|
41
41
|
function checkIsVisible2D(datum) {
|
|
42
|
-
if (datum.display.isPositiveVisible
|
|
43
|
-
datum.display.isNegativeVisible === false) {
|
|
42
|
+
if (!datum.display.isPositiveVisible && !datum.display.isNegativeVisible) {
|
|
44
43
|
return false;
|
|
45
44
|
}
|
|
46
45
|
return true;
|
|
@@ -106,10 +105,8 @@ function handleChangeActiveSpectrum(draft, activeSpectrum) {
|
|
|
106
105
|
newActiveSpectrum.display.isVisible = true;
|
|
107
106
|
if (oldIndex !== -1) {
|
|
108
107
|
refreshDomain =
|
|
109
|
-
draft.data[oldIndex].info.isFid
|
|
110
|
-
newActiveSpectrum.info.isFid
|
|
111
|
-
? false
|
|
112
|
-
: true;
|
|
108
|
+
draft.data[oldIndex].info.isFid !==
|
|
109
|
+
newActiveSpectrum.info.isFid;
|
|
113
110
|
}
|
|
114
111
|
else {
|
|
115
112
|
refreshDomain = newActiveSpectrum.info.isFid || false;
|
|
@@ -132,7 +129,7 @@ function handleChangeActiveSpectrum(draft, activeSpectrum) {
|
|
|
132
129
|
}
|
|
133
130
|
if (ToolTypes_1.options[draft.toolOptions.selectedTool].isFilter) {
|
|
134
131
|
draft.toolOptions.selectedTool = ToolTypes_1.options.zoom.id;
|
|
135
|
-
draft.toolOptions.data.
|
|
132
|
+
draft.toolOptions.data.baselineCorrection = { zones: [], options: {} };
|
|
136
133
|
draft.toolOptions.selectedOptionPanel = null;
|
|
137
134
|
draft.tempData = null;
|
|
138
135
|
}
|
|
@@ -141,7 +138,7 @@ function handleChangeActiveSpectrum(draft, activeSpectrum) {
|
|
|
141
138
|
* if the new active spectrum different than the previous active spectrum fid then refresh the domain andf the mode.
|
|
142
139
|
*/
|
|
143
140
|
if (draft.toolOptions.data.activeFilterID) {
|
|
144
|
-
(0, FiltersActions_1.resetSpectrumByFilter)(draft
|
|
141
|
+
(0, FiltersActions_1.resetSpectrumByFilter)(draft);
|
|
145
142
|
}
|
|
146
143
|
else if (refreshDomain) {
|
|
147
144
|
(0, DomainActions_1.setDomain)(draft);
|
|
@@ -1,99 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
6
|
exports.resetSpectraScale = exports.setSpectraSameTopHandler = exports.setTab = exports.setActiveTab = exports.levelChangeHandler = exports.handelSetActiveTab = exports.zoomOut = exports.handleZoom = exports.setVerticalIndicatorXPosition = exports.handleBrushEnd = exports.handleToggleRealImaginaryVisibility = exports.handleDeleteBaseLineZone = exports.handleAddBaseLineZone = exports.handleChangeSpectrumDisplayMode = exports.setSpectrumsVerticalAlign = exports.setSelectedOptionPanel = exports.setSelectedTool = exports.resetSelectedTool = void 0;
|
|
30
|
-
const
|
|
7
|
+
const uuid_1 = require("@lukeed/uuid");
|
|
31
8
|
const immer_1 = require("immer");
|
|
32
9
|
const ml_spectra_processing_1 = require("ml-spectra-processing");
|
|
33
|
-
const Filters = __importStar(require("../../../data/Filters"));
|
|
34
|
-
const generateID_1 = __importDefault(require("../../../data/utilities/generateID"));
|
|
35
10
|
const scale_1 = require("../../1d/utilities/scale");
|
|
36
11
|
const DimensionLayout_1 = require("../../2d/utilities/DimensionLayout");
|
|
37
12
|
const scale_2 = require("../../2d/utilities/scale");
|
|
38
13
|
const ToolTypes_1 = require("../../toolbar/ToolTypes");
|
|
39
14
|
const GroupByInfoKey_1 = __importDefault(require("../../utility/GroupByInfoKey"));
|
|
40
|
-
const getSpectraByNucleus_1 = require("../../utility/getSpectraByNucleus");
|
|
41
15
|
const Constants_1 = require("../core/Constants");
|
|
42
16
|
const Zoom1DManager_1 = require("../helper/Zoom1DManager");
|
|
43
17
|
const ZoomHistoryManager_1 = __importDefault(require("../helper/ZoomHistoryManager"));
|
|
44
18
|
const DomainActions_1 = require("./DomainActions");
|
|
45
19
|
const FiltersActions_1 = require("./FiltersActions");
|
|
46
20
|
const PreferencesActions_1 = require("./PreferencesActions");
|
|
47
|
-
function getStrongestPeak(draft) {
|
|
48
|
-
const { activeSpectrum, data } = draft;
|
|
49
|
-
if (activeSpectrum) {
|
|
50
|
-
const activeData = data[activeSpectrum?.index].data;
|
|
51
|
-
const strongestPeakValue = (0, d3_1.max)(activeData.re);
|
|
52
|
-
const index = activeData.re.findIndex((val) => val === strongestPeakValue);
|
|
53
|
-
return {
|
|
54
|
-
xValue: activeData.x[index],
|
|
55
|
-
yValue: strongestPeakValue,
|
|
56
|
-
index: index,
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
function setFilterChanges(draft, selectedFilter) {
|
|
61
|
-
const activeSpectrumId = draft.activeSpectrum?.id;
|
|
62
|
-
//save reduced snapshot
|
|
63
|
-
//select the equalizer tool when you enable manual phase correction filter
|
|
64
|
-
if (selectedFilter === Filters.phaseCorrection.id) {
|
|
65
|
-
const datumAfterPhaseCorrection = (0, FiltersActions_1.resetSpectrumByFilter)(draft, Filters.phaseCorrection.id, {
|
|
66
|
-
rollback: true,
|
|
67
|
-
searchBy: 'name',
|
|
68
|
-
returnCurrentDatum: true,
|
|
69
|
-
});
|
|
70
|
-
draft.tempData = (0, immer_1.current)(draft).data;
|
|
71
|
-
if (datumAfterPhaseCorrection) {
|
|
72
|
-
draft.tempData[datumAfterPhaseCorrection?.index] =
|
|
73
|
-
datumAfterPhaseCorrection?.datum;
|
|
74
|
-
}
|
|
75
|
-
const { xValue, index } = getStrongestPeak(draft) || {
|
|
76
|
-
xValue: 0,
|
|
77
|
-
index: 0,
|
|
78
|
-
};
|
|
79
|
-
draft.toolOptions.data.pivot = { value: xValue, index };
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
if (draft.toolOptions.selectedTool === ToolTypes_1.options.phaseCorrection.id) {
|
|
83
|
-
draft.toolOptions.data.activeFilterID = null;
|
|
84
|
-
const spectrumIndex = draft.data.findIndex((spectrum) => spectrum.id === activeSpectrumId);
|
|
85
|
-
draft.data[spectrumIndex].data = draft.tempData[spectrumIndex].data;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
21
|
function resetTool(draft, setDefaultTool = true) {
|
|
90
22
|
// reset temp range
|
|
91
|
-
draft.toolOptions.data.tempRange = null;
|
|
92
23
|
setSelectedOptionPanel(draft, null);
|
|
93
24
|
if (setDefaultTool) {
|
|
94
25
|
draft.toolOptions.selectedTool = ToolTypes_1.options.zoom.id;
|
|
95
26
|
}
|
|
96
|
-
draft.toolOptions.data.
|
|
27
|
+
draft.toolOptions.data.baselineCorrection = { zones: [], options: [] };
|
|
97
28
|
if (draft.toolOptions.data.activeFilterID) {
|
|
98
29
|
(0, FiltersActions_1.resetSpectrumByFilter)(draft);
|
|
99
30
|
}
|
|
@@ -116,10 +47,7 @@ function setSelectedTool(draft, action) {
|
|
|
116
47
|
if (selectedTool) {
|
|
117
48
|
// start Range edit mode
|
|
118
49
|
if (selectedTool === ToolTypes_1.options.editRange.id) {
|
|
119
|
-
draft.toolOptions.data.
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
draft.toolOptions.data.tempRange = null;
|
|
50
|
+
draft.toolOptions.data.showMultiplicityTrees = true;
|
|
123
51
|
}
|
|
124
52
|
if (selectedTool !== draft.toolOptions.selectedTool) {
|
|
125
53
|
resetTool(draft, false);
|
|
@@ -129,7 +57,7 @@ function setSelectedTool(draft, action) {
|
|
|
129
57
|
setSelectedOptionPanel(draft, selectedTool);
|
|
130
58
|
}
|
|
131
59
|
if (ToolTypes_1.options[selectedTool].isFilter) {
|
|
132
|
-
setFilterChanges(draft, selectedTool);
|
|
60
|
+
(0, FiltersActions_1.setFilterChanges)(draft, selectedTool);
|
|
133
61
|
}
|
|
134
62
|
}
|
|
135
63
|
else {
|
|
@@ -144,9 +72,9 @@ function setSelectedOptionPanel(draft, selectedOptionPanel) {
|
|
|
144
72
|
}
|
|
145
73
|
exports.setSelectedOptionPanel = setSelectedOptionPanel;
|
|
146
74
|
function setSpectrumsVerticalAlign(draft) {
|
|
147
|
-
const align = ['stack', '
|
|
148
|
-
? '
|
|
149
|
-
: '
|
|
75
|
+
const align = ['stack', 'bottom'].includes(draft.verticalAlign.align)
|
|
76
|
+
? 'center'
|
|
77
|
+
: 'bottom';
|
|
150
78
|
(0, PreferencesActions_1.changeSpectrumVerticalAlignment)(draft, { align });
|
|
151
79
|
}
|
|
152
80
|
exports.setSpectrumsVerticalAlign = setSpectrumsVerticalAlign;
|
|
@@ -166,19 +94,21 @@ function handleAddBaseLineZone(draft, { from, to }) {
|
|
|
166
94
|
else {
|
|
167
95
|
zone = [start, end];
|
|
168
96
|
}
|
|
169
|
-
const zones = draft.toolOptions.data.
|
|
97
|
+
const zones = draft.toolOptions.data.baselineCorrection.zones;
|
|
170
98
|
zones.push({
|
|
171
|
-
id: (0,
|
|
99
|
+
id: (0, uuid_1.v4)(),
|
|
172
100
|
from: zone[0],
|
|
173
101
|
to: zone[1],
|
|
174
102
|
});
|
|
175
|
-
draft.toolOptions.data.
|
|
103
|
+
draft.toolOptions.data.baselineCorrection.zones = zones.slice();
|
|
104
|
+
(0, FiltersActions_1.calculateBaseLineCorrection)(draft);
|
|
176
105
|
}
|
|
177
106
|
exports.handleAddBaseLineZone = handleAddBaseLineZone;
|
|
178
107
|
function handleDeleteBaseLineZone(draft, id) {
|
|
179
108
|
const state = (0, immer_1.original)(draft);
|
|
180
|
-
draft.toolOptions.data.
|
|
181
|
-
state.toolOptions.data.
|
|
109
|
+
draft.toolOptions.data.baselineCorrection.zones =
|
|
110
|
+
state.toolOptions.data.baselineCorrection.zones.filter((zone) => zone.id !== id);
|
|
111
|
+
(0, FiltersActions_1.calculateBaseLineCorrection)(draft);
|
|
182
112
|
}
|
|
183
113
|
exports.handleDeleteBaseLineZone = handleDeleteBaseLineZone;
|
|
184
114
|
function handleToggleRealImaginaryVisibility(draft) {
|
|
@@ -255,24 +185,21 @@ function handleZoom(draft, action) {
|
|
|
255
185
|
}
|
|
256
186
|
}
|
|
257
187
|
}
|
|
258
|
-
else {
|
|
259
|
-
if (
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
draft.integralsYDomains[activeSpectrum?.id] = (0, Zoom1DManager_1.wheelZoom)(event, domain);
|
|
264
|
-
}
|
|
265
|
-
else {
|
|
266
|
-
const domain = draft.yDomains[activeSpectrum?.id];
|
|
267
|
-
draft.yDomains[activeSpectrum?.id] = (0, Zoom1DManager_1.wheelZoom)(event, domain);
|
|
268
|
-
}
|
|
188
|
+
else if (activeSpectrum?.id) {
|
|
189
|
+
if ((showRangesIntegrals || selectedTool === ToolTypes_1.options.integral.id) &&
|
|
190
|
+
event.shiftKey) {
|
|
191
|
+
const domain = draft.integralsYDomains[activeSpectrum?.id];
|
|
192
|
+
draft.integralsYDomains[activeSpectrum?.id] = (0, Zoom1DManager_1.wheelZoom)(event, domain);
|
|
269
193
|
}
|
|
270
194
|
else {
|
|
271
|
-
const
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
195
|
+
const domain = draft.yDomains[activeSpectrum?.id];
|
|
196
|
+
draft.yDomains[activeSpectrum?.id] = (0, Zoom1DManager_1.wheelZoom)(event, domain);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
for (const key of Object.keys(draft.yDomains)) {
|
|
201
|
+
const domain = draft.yDomains[key];
|
|
202
|
+
draft.yDomains[key] = (0, Zoom1DManager_1.wheelZoom)(event, domain);
|
|
276
203
|
}
|
|
277
204
|
}
|
|
278
205
|
}
|
|
@@ -331,7 +258,7 @@ function hasAcceptedSpectrum(draft, index) {
|
|
|
331
258
|
}
|
|
332
259
|
function setMargin(draft) {
|
|
333
260
|
if (draft.displayerMode === Constants_1.DISPLAYER_MODE.DM_2D &&
|
|
334
|
-
draft.toolOptions.selectedTool !== ToolTypes_1.options.
|
|
261
|
+
draft.toolOptions.selectedTool !== ToolTypes_1.options.slicing.id) {
|
|
335
262
|
const top = hasAcceptedSpectrum(draft, 0)
|
|
336
263
|
? Constants_1.MARGIN['2D'].top
|
|
337
264
|
: Constants_1.MARGIN['1D'].top;
|
|
@@ -340,14 +267,14 @@ function setMargin(draft) {
|
|
|
340
267
|
: Constants_1.MARGIN['1D'].left;
|
|
341
268
|
draft.margin = { ...Constants_1.MARGIN['2D'], top, left };
|
|
342
269
|
}
|
|
343
|
-
else if (draft.toolOptions.selectedTool === ToolTypes_1.options.
|
|
270
|
+
else if (draft.toolOptions.selectedTool === ToolTypes_1.options.slicing.id) {
|
|
344
271
|
draft.margin = Constants_1.MARGIN['2D'];
|
|
345
272
|
}
|
|
346
273
|
else if (draft.displayerMode === Constants_1.DISPLAYER_MODE.DM_1D) {
|
|
347
274
|
draft.margin = Constants_1.MARGIN['1D'];
|
|
348
275
|
}
|
|
349
276
|
}
|
|
350
|
-
function
|
|
277
|
+
function processing2DData(draft, data) {
|
|
351
278
|
if (draft.displayerMode === Constants_1.DISPLAYER_MODE.DM_2D) {
|
|
352
279
|
let _data = {};
|
|
353
280
|
for (const datum of data[draft.activeTab]) {
|
|
@@ -430,7 +357,7 @@ function setActiveTab(draft, options) {
|
|
|
430
357
|
const currentTab = !tab || !tabs.includes(tab || '') ? tabs[0] : tab;
|
|
431
358
|
setTab(draft, dataGroupByNucleus, currentTab, refreshActiveTab);
|
|
432
359
|
resetTool(draft);
|
|
433
|
-
|
|
360
|
+
processing2DData(draft, dataGroupByNucleus);
|
|
434
361
|
(0, DomainActions_1.setDomain)(draft, domainOptions);
|
|
435
362
|
(0, DomainActions_1.setIntegralsYDomain)(draft, dataGroupByNucleus[currentTab]);
|
|
436
363
|
const zoomHistory = (0, ZoomHistoryManager_1.default)(draft.zoom.history, draft.activeTab);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSpectrum = void 0;
|
|
4
|
+
function getSpectrum(state, value) {
|
|
5
|
+
if (value === undefined) {
|
|
6
|
+
if (state.activeSpectrum?.id) {
|
|
7
|
+
const index = state.activeSpectrum.index;
|
|
8
|
+
return state.data[index];
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
if (typeof value === 'number') {
|
|
12
|
+
return state.data[value] || undefined;
|
|
13
|
+
}
|
|
14
|
+
if (typeof value === 'string') {
|
|
15
|
+
return state.data.find((spectrum) => spectrum.id === value);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.getSpectrum = getSpectrum;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStrongestPeak = void 0;
|
|
4
|
+
const d3_1 = require("d3");
|
|
5
|
+
function getStrongestPeak(draft) {
|
|
6
|
+
const { activeSpectrum, data } = draft;
|
|
7
|
+
if (activeSpectrum) {
|
|
8
|
+
const activeData = data[activeSpectrum?.index].data;
|
|
9
|
+
const strongestPeakValue = (0, d3_1.max)(activeData.re);
|
|
10
|
+
const index = activeData.re.findIndex((val) => val === strongestPeakValue);
|
|
11
|
+
return {
|
|
12
|
+
xValue: activeData.x[index],
|
|
13
|
+
yValue: strongestPeakValue,
|
|
14
|
+
index,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.getStrongestPeak = getStrongestPeak;
|
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.addWorkspace = void 0;
|
|
7
|
-
const
|
|
4
|
+
const uuid_1 = require("@lukeed/uuid");
|
|
8
5
|
const LocalStorage_1 = require("../../../utility/LocalStorage");
|
|
9
6
|
function addWorkspace(draft, action) {
|
|
10
|
-
const { workspace: workspaceName, data: { display,
|
|
7
|
+
const { workspace: workspaceName, data: { display, general, formatting, databases }, } = action.payload;
|
|
11
8
|
const newWorkSpace = {
|
|
12
9
|
version: 1,
|
|
13
10
|
label: workspaceName,
|
|
14
11
|
display,
|
|
15
|
-
|
|
12
|
+
general,
|
|
16
13
|
formatting,
|
|
17
14
|
databases,
|
|
18
15
|
};
|
|
19
|
-
const newWorkspaceKey = (0,
|
|
16
|
+
const newWorkspaceKey = (0, uuid_1.v4)();
|
|
20
17
|
const localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
|
|
21
18
|
localData.workspaces[newWorkspaceKey] = newWorkSpace;
|
|
22
19
|
(0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(localData));
|
|
@@ -7,10 +7,10 @@ exports.initPreferences = void 0;
|
|
|
7
7
|
const merge_1 = __importDefault(require("lodash/merge"));
|
|
8
8
|
const LocalStorage_1 = require("../../../utility/LocalStorage");
|
|
9
9
|
const workspaces_1 = __importDefault(require("../../../workspaces"));
|
|
10
|
-
const checkKeysExists_1 = require("../
|
|
11
|
-
const filterObject_1 = require("../
|
|
12
|
-
const getActiveWorkspace_1 = require("../
|
|
13
|
-
const getPreferencesByWorkspace_1 = require("../
|
|
10
|
+
const checkKeysExists_1 = require("../utilities/checkKeysExists");
|
|
11
|
+
const filterObject_1 = require("../utilities/filterObject");
|
|
12
|
+
const getActiveWorkspace_1 = require("../utilities/getActiveWorkspace");
|
|
13
|
+
const getPreferencesByWorkspace_1 = require("../utilities/getPreferencesByWorkspace");
|
|
14
14
|
function initPreferences(draft, action) {
|
|
15
15
|
if (action.payload) {
|
|
16
16
|
const localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
|
|
@@ -59,7 +59,7 @@ function initPreferences(draft, action) {
|
|
|
59
59
|
(0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(data));
|
|
60
60
|
}
|
|
61
61
|
else {
|
|
62
|
-
|
|
62
|
+
draft.workspaces[draft.workspace.current] = (0, merge_1.default)({}, currentWorkspacePreferences, resProps);
|
|
63
63
|
}
|
|
64
64
|
draft.dispatch = dispatch;
|
|
65
65
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.removeWorkspace = void 0;
|
|
4
4
|
const immer_1 = require("immer");
|
|
5
5
|
const LocalStorage_1 = require("../../../utility/LocalStorage");
|
|
6
|
-
const filterObject_1 = require("../
|
|
6
|
+
const filterObject_1 = require("../utilities/filterObject");
|
|
7
7
|
function removeWorkspace(draft, action) {
|
|
8
8
|
const { workspace } = action.payload;
|
|
9
9
|
if (workspace === draft.workspace.current) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.setPanelsPreferences = void 0;
|
|
4
4
|
const LocalStorage_1 = require("../../../utility/LocalStorage");
|
|
5
|
-
const getActiveWorkspace_1 = require("../
|
|
5
|
+
const getActiveWorkspace_1 = require("../utilities/getActiveWorkspace");
|
|
6
6
|
function setPanelsPreferences(draft, action) {
|
|
7
7
|
if (action.payload) {
|
|
8
8
|
const currentWorkspacePreferences = (0, getActiveWorkspace_1.getActiveWorkspace)(draft);
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.setPreferences = void 0;
|
|
7
|
+
const merge_1 = __importDefault(require("lodash/merge"));
|
|
4
8
|
const LocalStorage_1 = require("../../../utility/LocalStorage");
|
|
5
|
-
const getActiveWorkspace_1 = require("../
|
|
6
|
-
const mapNucleiFormatting_1 = require("../
|
|
9
|
+
const getActiveWorkspace_1 = require("../utilities/getActiveWorkspace");
|
|
10
|
+
const mapNucleiFormatting_1 = require("../utilities/mapNucleiFormatting");
|
|
7
11
|
function setPreferences(draft, action) {
|
|
8
12
|
if (action.payload) {
|
|
9
|
-
|
|
10
|
-
let {
|
|
13
|
+
let currentWorkspacePreferences = (0, getActiveWorkspace_1.getActiveWorkspace)(draft);
|
|
14
|
+
let { general, formatting, display, databases } = action.payload;
|
|
11
15
|
formatting = (0, mapNucleiFormatting_1.mapNucleiFormatting)(formatting);
|
|
12
16
|
let localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
|
|
13
17
|
localData.currentWorkspace = draft.workspace.current;
|
|
@@ -15,24 +19,20 @@ function setPreferences(draft, action) {
|
|
|
15
19
|
...localData.workspaces,
|
|
16
20
|
[draft.workspace.current]: {
|
|
17
21
|
...localData.workspaces[draft.workspace.current],
|
|
18
|
-
|
|
22
|
+
general,
|
|
19
23
|
formatting,
|
|
20
24
|
display,
|
|
21
25
|
databases,
|
|
22
26
|
},
|
|
23
27
|
};
|
|
24
28
|
(0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(localData));
|
|
25
|
-
|
|
26
|
-
currentWorkspacePreferences
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
...(currentWorkspacePreferences.display.general || {}),
|
|
33
|
-
experimentalFeatures: display.general.experimentalFeatures,
|
|
34
|
-
},
|
|
35
|
-
};
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
30
|
+
currentWorkspacePreferences = (0, merge_1.default)(currentWorkspacePreferences, {
|
|
31
|
+
general,
|
|
32
|
+
formatting,
|
|
33
|
+
databases,
|
|
34
|
+
display,
|
|
35
|
+
});
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
exports.setPreferences = setPreferences;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.setWorkspace = void 0;
|
|
4
|
-
const getPreferencesByWorkspace_1 = require("../
|
|
4
|
+
const getPreferencesByWorkspace_1 = require("../utilities/getPreferencesByWorkspace");
|
|
5
5
|
function setWorkspace(draft, action) {
|
|
6
6
|
const workspaceKey = action.payload.workspace;
|
|
7
7
|
if (!draft.workspaces[workspaceKey]) {
|
|
@@ -42,6 +42,9 @@ const getPeaksDefaultValues = (nucleus) => {
|
|
|
42
42
|
deltaHz: { show: false, format: '0.00' },
|
|
43
43
|
peakWidth: { show: false, format: '0.00' },
|
|
44
44
|
intensity: { show: true, format: '0.00' },
|
|
45
|
+
showKind: true,
|
|
46
|
+
fwhm: { show: true, format: '0.00000' },
|
|
47
|
+
mu: { show: false, format: '0.00000' },
|
|
45
48
|
};
|
|
46
49
|
return getPreferences(preferences, nucleus);
|
|
47
50
|
};
|
|
@@ -51,12 +54,12 @@ const databaseDefaultValues = {
|
|
|
51
54
|
showSmiles: true,
|
|
52
55
|
showSolvent: false,
|
|
53
56
|
showNames: true,
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
range: { show: false, format: '0.00' },
|
|
58
|
+
delta: { show: true, format: '0.00' },
|
|
56
59
|
showAssignment: false,
|
|
57
|
-
|
|
60
|
+
coupling: { show: true, format: '0.0' },
|
|
58
61
|
showMultiplicity: true,
|
|
59
|
-
color: '
|
|
62
|
+
color: '#C0B000',
|
|
60
63
|
marginBottom: 30,
|
|
61
64
|
};
|
|
62
65
|
exports.databaseDefaultValues = databaseDefaultValues;
|
|
@@ -10,11 +10,10 @@ const workspaces_1 = __importDefault(require("../../workspaces"));
|
|
|
10
10
|
const addWorkspace_1 = require("./actions/addWorkspace");
|
|
11
11
|
const initPreferences_1 = require("./actions/initPreferences");
|
|
12
12
|
const removeWorkspace_1 = require("./actions/removeWorkspace");
|
|
13
|
-
const resetPreferences_1 = require("./actions/resetPreferences");
|
|
14
13
|
const setPanelsPreferences_1 = require("./actions/setPanelsPreferences");
|
|
15
14
|
const setPreferences_1 = require("./actions/setPreferences");
|
|
16
15
|
const setWorkspace_1 = require("./actions/setWorkspace");
|
|
17
|
-
const LOCAL_STORAGE_VERSION =
|
|
16
|
+
const LOCAL_STORAGE_VERSION = 10;
|
|
18
17
|
exports.WORKSPACES = [
|
|
19
18
|
{
|
|
20
19
|
key: 'default',
|
|
@@ -71,8 +70,6 @@ function innerPreferencesReducer(draft, action) {
|
|
|
71
70
|
return (0, setPreferences_1.setPreferences)(draft, action);
|
|
72
71
|
case 'SET_PANELS_PREFERENCES':
|
|
73
72
|
return (0, setPanelsPreferences_1.setPanelsPreferences)(draft, action);
|
|
74
|
-
case 'RESET_PREFERENCES':
|
|
75
|
-
return (0, resetPreferences_1.resetPreferences)(draft);
|
|
76
73
|
case 'SET_WORKSPACE':
|
|
77
74
|
return (0, setWorkspace_1.setWorkspace)(draft, action);
|
|
78
75
|
case 'ADD_WORKSPACE':
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib-cjs/component/reducer/preferences/{utilites → utilities}/getPreferencesByWorkspace.js
RENAMED
|
@@ -4,8 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getPreferencesByWorkspace = void 0;
|
|
7
|
+
const merge_1 = __importDefault(require("lodash/merge"));
|
|
7
8
|
const workspaces_1 = __importDefault(require("../../../workspaces"));
|
|
9
|
+
const workspaceDefaultProperties_1 = require("../../../workspaces/workspaceDefaultProperties");
|
|
8
10
|
function getPreferencesByWorkspace(workspace) {
|
|
9
|
-
return workspaces_1.default?.[workspace]
|
|
11
|
+
return (0, merge_1.default)({}, workspaceDefaultProperties_1.workspaceDefaultProperties, workspaces_1.default?.[workspace]);
|
|
10
12
|
}
|
|
11
13
|
exports.getPreferencesByWorkspace = getPreferencesByWorkspace;
|
|
File without changes
|