nmrium 0.25.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/component/1d/Chart1D.js +3 -2
- package/lib/component/1d/ExclusionZonesAnnotations.js +1 -1
- package/lib/component/1d/FooterBanner.js +1 -1
- package/lib/component/1d/Integral.d.ts +2 -1
- package/lib/component/1d/Integral.js +5 -12
- package/lib/component/1d/IntegralResizable.d.ts +2 -1
- package/lib/component/1d/IntegralResizable.js +10 -5
- package/lib/component/1d/IntegralsSeries.js +5 -9
- package/lib/component/1d/Line.d.ts +2 -2
- package/lib/component/1d/PeakAnnotation.js +7 -6
- package/lib/component/1d/PeakAnnotations.js +2 -4
- package/lib/component/1d/SpectraTracker.js +2 -2
- package/lib/component/1d/Viewer1D.js +1 -1
- package/lib/component/1d/database/DatabaseElements.d.ts +3 -0
- package/lib/component/1d/database/DatabaseElements.js +18 -0
- package/lib/component/1d/database/DatabaseSpectrum.d.ts +3 -0
- package/lib/component/1d/database/DatabaseSpectrum.js +60 -0
- package/lib/component/1d/{ResurrectedDatabaseRanges.d.ts → database/ResurrectedDatabaseRanges.d.ts} +0 -0
- package/lib/component/1d/{ResurrectedDatabaseRanges.js → database/ResurrectedDatabaseRanges.js} +9 -6
- package/lib/component/1d/jCouplingGraph/JGraph.js +4 -10
- package/lib/component/1d/multiAnalysis/AnalysisRange.js +10 -5
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +5 -5
- package/lib/component/1d/ranges/Range.d.ts +2 -2
- package/lib/component/1d/ranges/Range.js +23 -15
- package/lib/component/1d/ranges/Ranges.js +6 -4
- package/lib/component/1d/tool/BaseLineZones.js +3 -6
- package/lib/component/1d/tool/VerticalIndicator.js +1 -1
- package/lib/component/1d/tool/XLabelPointer.js +1 -1
- package/lib/component/2d/Chart2D.js +2 -1
- package/lib/component/2d/Contours.js +5 -6
- package/lib/component/2d/FooterBanner.js +1 -1
- package/lib/component/2d/SignalDeltaLine.js +1 -1
- package/lib/component/2d/Viewer2D.js +1 -1
- package/lib/component/2d/YAxis.js +2 -2
- package/lib/component/2d/tools/XYLabelPointer.js +1 -1
- package/lib/component/2d/tools/slicing/HorizontalSliceChart.d.ts +2 -2
- package/lib/component/2d/tools/slicing/SliceScale.d.ts +1 -1
- package/lib/component/2d/tools/slicing/VerticalSliceChart.d.ts +2 -2
- package/lib/component/2d/zones/IndicationLines.js +2 -3
- package/lib/component/2d/zones/Signal.js +8 -8
- package/lib/component/2d/zones/Zone.js +3 -3
- package/lib/component/EventsTrackers/KeysListenerTracker.js +70 -46
- package/lib/component/NMRium.d.ts +15 -46
- package/lib/component/NMRium.js +20 -9
- package/lib/component/SplitPaneWrapper.d.ts +4 -0
- package/lib/component/SplitPaneWrapper.js +8 -0
- package/lib/component/assignment/AssignmentsContext.d.ts +35 -0
- package/lib/component/assignment/AssignmentsContext.js +83 -0
- package/lib/component/assignment/AssignmentsReducer.d.ts +32 -0
- package/lib/component/assignment/AssignmentsReducer.js +39 -0
- package/lib/component/assignment/actions/initAssignment.d.ts +5 -0
- package/lib/component/assignment/actions/initAssignment.js +62 -0
- package/lib/component/assignment/actions/removeAssignment.d.ts +16 -0
- package/lib/component/assignment/actions/removeAssignment.js +24 -0
- package/lib/component/assignment/actions/setActiveAssignment.d.ts +10 -0
- package/lib/component/assignment/actions/setActiveAssignment.js +8 -0
- package/lib/component/assignment/actions/toggleAssignment.d.ts +7 -0
- package/lib/component/assignment/actions/toggleAssignment.js +44 -0
- package/lib/component/assignment/index.d.ts +0 -18
- package/lib/component/assignment/index.js +12 -266
- package/lib/component/assignment/utilities/filterForIDsWithAssignment.d.ts +2 -0
- package/lib/component/assignment/utilities/filterForIDsWithAssignment.js +3 -0
- package/lib/component/context/GlobalContext.d.ts +3 -0
- package/lib/component/context/GlobalContext.js +1 -1
- package/lib/component/context/PreferencesContext.d.ts +15 -52
- package/lib/component/context/PreferencesContext.js +1 -1
- package/lib/component/elements/Button.js +4 -3
- package/lib/component/elements/ColorInput.js +2 -2
- package/lib/component/elements/ContextMenu.d.ts +8 -3
- package/lib/component/elements/EditableColumn.d.ts +3 -2
- package/lib/component/elements/EditableColumn.js +27 -20
- package/lib/component/elements/Input.d.ts +9 -1
- package/lib/component/elements/Input.js +18 -5
- package/lib/component/elements/Logo.js +1 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.d.ts +5 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +39 -10
- package/lib/component/elements/ReactTable/ReactTable.d.ts +3 -1
- package/lib/component/elements/ReactTable/ReactTable.js +7 -2
- package/lib/component/elements/ReactTable/Style.d.ts +1 -3
- package/lib/component/elements/ReactTable/Style.js +1 -7
- package/lib/component/elements/Select.d.ts +1 -0
- package/lib/component/elements/Select.js +21 -15
- package/lib/component/elements/Tab/Tabs.js +2 -1
- package/lib/component/elements/ToggleButton.d.ts +2 -1
- package/lib/component/elements/ToggleButton.js +4 -4
- package/lib/component/elements/accordion/Accordion.js +2 -6
- package/lib/component/elements/draggble/SVGDraggable.d.ts +17 -0
- package/lib/component/elements/draggble/SVGDraggable.js +33 -0
- package/lib/component/elements/{resizer → draggble}/useDraggable.d.ts +9 -6
- package/lib/component/elements/draggble/useDraggable.js +70 -0
- package/lib/component/elements/formik/FormikColorPicker.d.ts +1 -0
- package/lib/component/elements/formik/FormikColorPicker.js +10 -7
- package/lib/component/elements/formik/FormikColumnFormatField.d.ts +5 -4
- package/lib/component/elements/formik/FormikColumnFormatField.js +2 -2
- package/lib/component/elements/formik/FormikInput.d.ts +1 -0
- package/lib/component/elements/formik/FormikInput.js +6 -3
- package/lib/component/elements/formik/FormikSlider.d.ts +1 -0
- package/lib/component/elements/formik/FormikSlider.js +6 -3
- package/lib/component/elements/formik/Input.js +1 -1
- package/lib/component/elements/popup/Alert/Provider.js +1 -1
- package/lib/component/elements/popup/Modal/Modal.js +1 -1
- package/lib/component/elements/popup/Modal/ModalContent.js +1 -1
- package/lib/component/elements/resizer/DivResizer.js +17 -62
- package/lib/component/elements/resizer/Resizer.d.ts +3 -1
- package/lib/component/elements/resizer/SVGResizer.js +24 -53
- package/lib/component/elements/resizer/useResizer.d.ts +11 -0
- package/lib/component/elements/resizer/useResizer.js +65 -0
- package/lib/component/elements/toggle/ToggleButtonGroup.js +2 -2
- package/lib/component/header/BaseLineCorrectionPanel.js +8 -5
- package/lib/component/header/Header.js +2 -2
- package/lib/component/header/ZeroFillingOptionsPanel.js +1 -1
- package/lib/component/hooks/useActiveSpectrumStyleOptions.js +1 -1
- package/lib/component/hooks/useCheckToolsVisibility.d.ts +2 -1
- package/lib/component/hooks/useCheckToolsVisibility.js +2 -1
- package/lib/component/hooks/useExport.d.ts +1 -1
- package/lib/component/hooks/useExport.js +2 -2
- package/lib/component/hooks/useFormatNumberByNucleus.d.ts +3 -0
- package/lib/component/{utility/FormatNumber.js → hooks/useFormatNumberByNucleus.js} +4 -14
- package/lib/component/hooks/usePanelPreferences.d.ts +7 -0
- package/lib/component/hooks/usePanelPreferences.js +54 -0
- package/lib/component/hooks/useXYReduce.d.ts +2 -2
- package/lib/component/loader/DefaultSpinnerComponent.d.ts +3 -1
- package/lib/component/loader/DefaultSpinnerComponent.js +2 -2
- package/lib/component/loader/DropZone.js +8 -2
- package/lib/component/loader/NoData.d.ts +3 -2
- package/lib/component/loader/NoData.js +31 -30
- package/lib/component/loader/SpinnerContext.d.ts +3 -3
- package/lib/component/loader/SpinnerContext.js +2 -2
- package/lib/component/modal/MoleculeStructureEditorModal.d.ts +3 -4
- package/lib/component/modal/MoleculeStructureEditorModal.js +24 -3
- package/lib/component/modal/editRange/EditRangeModal.d.ts +3 -3
- package/lib/component/modal/editRange/EditRangeModal.js +52 -56
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.d.ts +2 -0
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +11 -27
- package/lib/component/modal/editRange/forms/components/CouplingsTable.js +12 -50
- package/lib/component/modal/editRange/forms/components/SignalFormInfo.d.ts +2 -0
- package/lib/component/modal/editRange/forms/components/SignalFormInfo.js +34 -0
- package/lib/component/modal/editRange/forms/components/SignalFormTab.d.ts +1 -1
- package/lib/component/modal/editRange/forms/components/SignalFormTab.js +11 -14
- package/lib/component/modal/editRange/forms/components/SignalsForm.d.ts +5 -2
- package/lib/component/modal/editRange/forms/components/SignalsForm.js +29 -37
- package/lib/component/modal/editZone/SignalsForm.js +1 -1
- package/lib/component/modal/setting/DatabasesTabContent.d.ts +7 -0
- package/lib/component/modal/setting/DatabasesTabContent.js +73 -0
- package/lib/component/modal/setting/DisplayTabContent.js +11 -7
- package/lib/component/modal/setting/FormattingTabContent.js +20 -14
- package/lib/component/modal/setting/GeneralSettings.js +3 -1
- package/lib/component/modal/setting/settingsValidation.d.ts +164 -0
- package/lib/component/modal/setting/settingsValidation.js +48 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.js +6 -4
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts +4 -3
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +13 -6
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.d.ts +10 -0
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +65 -0
- package/lib/component/panels/IntegralsPanel/IntegralPanel.d.ts +0 -1
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +14 -19
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +2 -2
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +10 -11
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.d.ts +1 -1
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +26 -74
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.d.ts +8 -0
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +38 -0
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +17 -35
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +11 -3
- package/lib/component/panels/MoleculesPanel/Utilities.d.ts +31 -11
- package/lib/component/panels/MoleculesPanel/Utilities.js +61 -68
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.d.ts +2 -2
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +55 -60
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleAnalysisCodeEditor.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +1 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +3 -3
- package/lib/component/panels/Panels.js +3 -4
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +4 -4
- package/lib/component/panels/PeaksPanel/PeaksPreferences.d.ts +1 -1
- package/lib/component/panels/PeaksPanel/PeaksPreferences.js +29 -82
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts +1 -5
- package/lib/component/panels/PeaksPanel/PeaksTable.js +18 -25
- package/lib/component/panels/RangesPanel/RangesHeader.d.ts +2 -1
- package/lib/component/panels/RangesPanel/RangesHeader.js +28 -13
- package/lib/component/panels/RangesPanel/RangesPanel.js +23 -29
- package/lib/component/panels/RangesPanel/RangesPreferences.d.ts +1 -1
- package/lib/component/panels/RangesPanel/RangesPreferences.js +55 -66
- package/lib/component/panels/RangesPanel/RangesTable.d.ts +11 -6
- package/lib/component/panels/RangesPanel/RangesTable.js +3 -7
- package/lib/component/panels/RangesPanel/RangesTableRow.d.ts +5 -2
- package/lib/component/panels/RangesPanel/RangesTableRow.js +15 -14
- package/lib/component/panels/RangesPanel/TableColumns/AbsoluteColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.d.ts +2 -1
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/CouplingColumn.d.ts +2 -1
- package/lib/component/panels/RangesPanel/TableColumns/CouplingColumn.js +5 -2
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.d.ts +16 -9
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/RangeColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.d.ts +2 -3
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.d.ts +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +3 -4
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.d.ts +13 -0
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js +14 -0
- package/lib/component/panels/RangesPanel/TableColumns/format.d.ts +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/format.js +2 -2
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.d.ts +4 -4
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +49 -31
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +5 -18
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +3 -3
- package/lib/component/panels/SpectrumsPanel/base/ShowHideMarkersButton.js +1 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/PlotChart.d.ts +18 -0
- package/lib/component/panels/SpectrumsPanel/base/setting/PlotChart.js +18 -0
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.d.ts +1 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.js +7 -68
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +1 -8
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.d.ts +1 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.js +7 -68
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +8 -21
- package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +2 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.d.ts +6 -0
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +51 -0
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +3 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +2 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +3 -3
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +7 -9
- 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/TableColumns/SignalAssignmentsColumn.d.ts +5 -7
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +2 -2
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.d.ts +4 -8
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.d.ts +5 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +3 -2
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.d.ts +5 -9
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +4 -4
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.d.ts +4 -8
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +14 -14
- package/lib/component/panels/ZonesPanel/ZonesPreferences.d.ts +1 -1
- package/lib/component/panels/ZonesPanel/ZonesPreferences.js +20 -84
- package/lib/component/panels/ZonesPanel/ZonesTable.js +4 -1
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +7 -2
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js +22 -22
- package/lib/component/panels/databasePanel/DatabasePanel.d.ts +4 -0
- package/lib/component/panels/databasePanel/DatabasePanel.js +129 -42
- package/lib/component/panels/databasePanel/DatabasePreferences.js +10 -42
- package/lib/component/panels/databasePanel/DatabaseStructureSearchModal.d.ts +7 -0
- package/lib/component/panels/databasePanel/DatabaseStructureSearchModal.js +8 -0
- package/lib/component/panels/databasePanel/DatabaseTable.js +37 -20
- package/lib/component/panels/extra/placeholder/NoTableData.d.ts +3 -1
- package/lib/component/panels/extra/placeholder/NoTableData.js +2 -2
- package/lib/component/panels/extra/preferences/ColumnsHelper.js +5 -7
- package/lib/component/panels/extra/preferences/NucleusPreferences.d.ts +13 -0
- package/lib/component/panels/extra/preferences/NucleusPreferences.js +22 -0
- package/lib/component/panels/extra/preferences/PreferencesContainer.d.ts +6 -0
- package/lib/component/panels/extra/preferences/PreferencesContainer.js +10 -0
- package/lib/component/panels/extra/preferences/PreferencesGroup.d.ts +7 -0
- package/lib/component/panels/extra/preferences/PreferencesGroup.js +21 -0
- package/lib/component/panels/header/DefaultPanelHeader.js +1 -3
- package/lib/component/panels/header/SpectraAutomaticPickingButton.d.ts +2 -0
- package/lib/component/panels/header/SpectraAutomaticPickingButton.js +30 -0
- package/lib/component/reducer/Reducer.d.ts +352 -95
- package/lib/component/reducer/Reducer.js +22 -10
- package/lib/component/reducer/actions/AssignmentsActions.d.ts +9 -0
- package/lib/component/reducer/actions/AssignmentsActions.js +18 -0
- package/lib/component/reducer/actions/DatabaseActions.d.ts +3 -2
- package/lib/component/reducer/actions/DatabaseActions.js +21 -3
- package/lib/component/reducer/actions/DomainActions.js +1 -1
- package/lib/component/reducer/actions/FiltersActions.d.ts +2 -1
- package/lib/component/reducer/actions/FiltersActions.js +25 -4
- package/lib/component/reducer/actions/LoadActions.d.ts +1 -1
- package/lib/component/reducer/actions/LoadActions.js +11 -6
- package/lib/component/reducer/actions/MoleculeActions.d.ts +4 -2
- package/lib/component/reducer/actions/MoleculeActions.js +15 -3
- package/lib/component/reducer/actions/PreferencesActions.js +32 -20
- package/lib/component/reducer/actions/RangesActions.d.ts +2 -2
- package/lib/component/reducer/actions/RangesActions.js +45 -11
- package/lib/component/reducer/actions/SpectrumsActions.js +6 -9
- package/lib/component/reducer/actions/ToolsActions.js +67 -54
- package/lib/component/reducer/helper/getSpectrum.d.ts +5 -0
- package/lib/component/reducer/helper/getSpectrum.js +14 -0
- package/lib/component/reducer/preferences/actions/addWorkspace.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/addWorkspace.js +19 -0
- package/lib/component/reducer/preferences/actions/initPreferences.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/initPreferences.js +60 -0
- package/lib/component/reducer/preferences/actions/removeWorkspace.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/removeWorkspace.js +20 -0
- package/lib/component/reducer/preferences/actions/resetPreferences.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/resetPreferences.js +14 -0
- package/lib/component/reducer/preferences/actions/setPanelsPreferences.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/setPanelsPreferences.js +13 -0
- package/lib/component/reducer/preferences/actions/setPreferences.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/setPreferences.js +34 -0
- package/lib/component/reducer/preferences/actions/setWorkspace.d.ts +3 -0
- package/lib/component/reducer/preferences/actions/setWorkspace.js +8 -0
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.d.ts +7 -0
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +55 -0
- package/lib/component/reducer/{preferencesReducer.d.ts → preferences/preferencesReducer.d.ts} +147 -17
- package/lib/component/reducer/preferences/preferencesReducer.js +80 -0
- package/lib/component/reducer/preferences/utilites/checkKeysExists.d.ts +1 -0
- package/lib/component/reducer/preferences/utilites/checkKeysExists.js +14 -0
- package/lib/component/reducer/preferences/utilites/filterObject.d.ts +1 -0
- package/lib/component/reducer/preferences/utilites/filterObject.js +7 -0
- package/lib/component/reducer/preferences/utilites/flatObject.d.ts +1 -0
- package/lib/component/reducer/preferences/utilites/flatObject.js +9 -0
- package/lib/component/reducer/preferences/utilites/getActiveWorkspace.d.ts +3 -0
- package/lib/component/reducer/preferences/utilites/getActiveWorkspace.js +3 -0
- package/lib/component/reducer/preferences/utilites/getPreferencesByWorkspace.d.ts +2 -0
- package/lib/component/reducer/preferences/utilites/getPreferencesByWorkspace.js +4 -0
- package/lib/component/reducer/preferences/utilites/mapNucleiFormatting.d.ts +5 -0
- package/lib/component/reducer/preferences/utilites/mapNucleiFormatting.js +8 -0
- package/lib/component/reducer/types/Types.d.ts +6 -1
- package/lib/component/reducer/types/Types.js +6 -1
- package/lib/component/tool/BrushX.js +1 -1
- package/lib/component/tool/BrushXY.js +1 -1
- package/lib/component/tool/CrossLinePointer.js +1 -1
- package/lib/component/tool/FloatMoleculeStructures/ActionsButton.d.ts +4 -0
- package/lib/component/tool/FloatMoleculeStructures/ActionsButton.js +7 -0
- package/lib/component/tool/FloatMoleculeStructures/DraggableStructure.d.ts +14 -0
- package/lib/component/tool/FloatMoleculeStructures/DraggableStructure.js +44 -0
- package/lib/component/tool/FloatMoleculeStructures/index.d.ts +15 -0
- package/lib/component/tool/FloatMoleculeStructures/index.js +28 -0
- package/lib/component/toolbar/BasicToolBar.js +0 -1
- package/lib/component/toolbar/FunctionToolBar.js +9 -13
- package/lib/component/toolbar/ToolTypes.d.ts +1 -1
- package/lib/component/toolbar/ToolTypes.js +3 -3
- package/lib/component/utility/Export.d.ts +7 -1
- package/lib/component/utility/Export.js +9 -3
- package/lib/component/utility/PathBuilder.js +2 -1
- package/lib/component/utility/formatNumber.d.ts +3 -0
- package/lib/component/utility/formatNumber.js +12 -0
- package/lib/component/utility/getUniqueNuclei.d.ts +1 -0
- package/lib/component/utility/getUniqueNuclei.js +10 -0
- package/lib/component/utility/isGoogleDocument.d.ts +1 -0
- package/lib/component/utility/isGoogleDocument.js +3 -0
- package/lib/component/utility/nmredataToNmrium.js +1 -2
- package/lib/component/utility/nmriumToNmredata.d.ts +2 -2
- package/lib/component/utility/nmriumToNmredata.js +2 -2
- package/lib/component/utility/util/nmredata/addSource.js +2 -2
- package/lib/component/workspaces/Workspace.d.ts +79 -5
- package/lib/component/workspaces/basic.js +25 -11
- package/lib/component/workspaces/embedded.d.ts +2 -0
- package/lib/component/workspaces/embedded.js +32 -0
- package/lib/component/workspaces/exercise.js +4 -2
- package/lib/component/workspaces/index.d.ts +1 -0
- package/lib/component/workspaces/index.js +2 -1
- package/lib/component/workspaces/prediction.js +2 -0
- package/lib/component/workspaces/process1D.js +3 -1
- package/lib/data/FiltersManager.js +1 -1
- package/lib/data/PredictionManager.js +7 -9
- package/lib/data/SpectraManager.d.ts +4 -12
- package/lib/data/SpectraManager.js +37 -38
- package/lib/data/data1d/Data1DManager.d.ts +1 -1
- package/lib/data/data1d/Data1DManager.js +14 -2
- package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.d.ts +2 -0
- package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.js +10 -0
- package/lib/data/data1d/Spectrum1D/generateJGraphData.js +8 -10
- package/lib/data/data1d/Spectrum1D/get1DDataXY.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/getReferenceShift.js +1 -1
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +2 -1
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.js +5 -7
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +1 -1
- package/lib/data/data1d/Spectrum1D/ranges/addRange.d.ts +36 -2
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +38 -15
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.js +3 -3
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +2 -1
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +1 -1
- package/lib/data/data1d/Spectrum1D/toJSON.d.ts +2 -0
- package/lib/data/data1d/Spectrum1D/toJSON.js +1 -0
- package/lib/data/data1d/database.d.ts +11 -15
- package/lib/data/data1d/database.js +67 -22
- package/lib/data/data1d/filter1d/absolute.d.ts +3 -2
- package/lib/data/data1d/filter1d/autoPhaseCorrection.d.ts +3 -2
- package/lib/data/data1d/filter1d/baselineCorrection.d.ts +3 -2
- package/lib/data/data1d/filter1d/centerMean.d.ts +3 -2
- package/lib/data/data1d/filter1d/digitalFilter.d.ts +3 -2
- package/lib/data/data1d/filter1d/equallySpaced.d.ts +3 -2
- package/lib/data/data1d/filter1d/exclusionZones.d.ts +1 -4
- package/lib/data/data1d/filter1d/exclusionZones.js +4 -4
- package/lib/data/data1d/filter1d/fft.d.ts +3 -2
- package/lib/data/data1d/filter1d/fft.js +2 -2
- package/lib/data/data1d/filter1d/fromTo.d.ts +3 -2
- package/lib/data/data1d/filter1d/lineBroadening.d.ts +3 -2
- package/lib/data/data1d/filter1d/lineBroadening.js +2 -2
- package/lib/data/data1d/filter1d/pareto.d.ts +3 -2
- package/lib/data/data1d/filter1d/pareto.js +2 -2
- package/lib/data/data1d/filter1d/phaseCorrection.d.ts +3 -2
- package/lib/data/data1d/filter1d/shiftX.d.ts +2 -1
- package/lib/data/data1d/filter1d/standardDeviation.d.ts +3 -2
- package/lib/data/data1d/filter1d/zeroFilling.d.ts +3 -2
- package/lib/data/data1d/filter1d/zeroFilling.js +1 -1
- package/lib/data/data2d/Data2DManager.d.ts +1 -1
- package/lib/data/data2d/Data2DManager.js +6 -1
- package/lib/data/data2d/Processing2D.js +1 -1
- package/lib/data/data2d/Spectrum2D/toJSON.d.ts +2 -0
- package/lib/data/data2d/Spectrum2D/toJSON.js +1 -0
- package/lib/data/data2d/filter2d/shiftX.d.ts +4 -3
- package/lib/data/data2d/filter2d/shiftX.js +2 -2
- package/lib/data/data2d/filter2d/shiftY.d.ts +4 -3
- package/lib/data/data2d/filter2d/shiftY.js +2 -2
- package/lib/data/molecules/Molecule.d.ts +6 -7
- package/lib/data/molecules/Molecule.js +9 -1
- package/lib/data/molecules/MoleculeManager.d.ts +4 -1
- package/lib/data/molecules/MoleculeManager.js +33 -2
- package/lib/data/types/common/Source.d.ts +1 -0
- package/lib/data/types/data1d/Data1D.d.ts +3 -3
- package/lib/data/types/data1d/Info1D.d.ts +1 -0
- package/lib/data/types/data2d/Signal2DAxisData.d.ts +1 -1
- package/lib/data/utilities/FindUtilities.js +1 -3
- package/lib/data/utilities/RangeUtilities.js +5 -6
- package/lib/data/utilities/ZoneUtilities.js +1 -1
- package/lib/data/utilities/getSum.js +1 -3
- package/lib/data/utilities/isMolFileEmpty.d.ts +1 -0
- package/lib/data/utilities/isMolFileEmpty.js +6 -0
- package/lib/types/NMRiumDataReturn.d.ts +15 -0
- package/lib/types/NMRiumDataReturn.js +1 -0
- package/lib/types/NMRiumGeneralPreferences.d.ts +10 -0
- package/lib/types/NMRiumGeneralPreferences.js +1 -0
- package/lib/types/NMRiumPanelPreferences.d.ts +16 -0
- package/lib/types/NMRiumPanelPreferences.js +1 -0
- package/lib/types/NMRiumToolBarPreferences.d.ts +20 -0
- package/lib/types/NMRiumToolBarPreferences.js +1 -0
- package/lib/types/Preferences.d.ts +5 -0
- package/lib/types/Preferences.js +1 -0
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/Chart1D.js +3 -2
- package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +1 -1
- package/lib-cjs/component/1d/FooterBanner.js +2 -2
- package/lib-cjs/component/1d/Integral.js +5 -12
- package/lib-cjs/component/1d/IntegralResizable.js +10 -5
- package/lib-cjs/component/1d/IntegralsSeries.js +5 -9
- package/lib-cjs/component/1d/PeakAnnotation.js +7 -6
- package/lib-cjs/component/1d/PeakAnnotations.js +2 -4
- package/lib-cjs/component/1d/SpectraTracker.js +2 -2
- package/lib-cjs/component/1d/Viewer1D.js +1 -1
- package/lib-cjs/component/1d/database/DatabaseElements.js +23 -0
- package/lib-cjs/component/1d/database/DatabaseSpectrum.js +65 -0
- package/lib-cjs/component/1d/{ResurrectedDatabaseRanges.js → database/ResurrectedDatabaseRanges.js} +9 -6
- package/lib-cjs/component/1d/jCouplingGraph/JGraph.js +4 -10
- package/lib-cjs/component/1d/multiAnalysis/AnalysisRange.js +10 -5
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +6 -6
- package/lib-cjs/component/1d/ranges/Range.js +25 -17
- package/lib-cjs/component/1d/ranges/Ranges.js +6 -4
- package/lib-cjs/component/1d/tool/BaseLineZones.js +3 -6
- package/lib-cjs/component/1d/tool/VerticalIndicator.js +1 -1
- package/lib-cjs/component/1d/tool/XLabelPointer.js +2 -2
- package/lib-cjs/component/2d/Chart2D.js +2 -1
- package/lib-cjs/component/2d/Contours.js +5 -6
- package/lib-cjs/component/2d/FooterBanner.js +2 -2
- package/lib-cjs/component/2d/SignalDeltaLine.js +1 -1
- package/lib-cjs/component/2d/Viewer2D.js +1 -1
- package/lib-cjs/component/2d/YAxis.js +1 -1
- package/lib-cjs/component/2d/tools/XYLabelPointer.js +2 -2
- package/lib-cjs/component/2d/zones/IndicationLines.js +2 -3
- package/lib-cjs/component/2d/zones/Signal.js +9 -9
- package/lib-cjs/component/2d/zones/Zone.js +4 -4
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +71 -47
- package/lib-cjs/component/NMRium.js +18 -7
- package/lib-cjs/component/SplitPaneWrapper.js +12 -0
- package/lib-cjs/component/assignment/AssignmentsContext.js +88 -0
- package/lib-cjs/component/assignment/AssignmentsReducer.js +45 -0
- package/lib-cjs/component/assignment/actions/initAssignment.js +65 -0
- package/lib-cjs/component/assignment/actions/removeAssignment.js +29 -0
- package/lib-cjs/component/assignment/actions/setActiveAssignment.js +11 -0
- package/lib-cjs/component/assignment/actions/toggleAssignment.js +47 -0
- package/lib-cjs/component/assignment/index.js +15 -269
- package/lib-cjs/component/assignment/utilities/filterForIDsWithAssignment.js +7 -0
- package/lib-cjs/component/context/GlobalContext.js +1 -1
- package/lib-cjs/component/context/PreferencesContext.js +1 -1
- package/lib-cjs/component/elements/Button.js +4 -3
- package/lib-cjs/component/elements/ColorInput.js +2 -2
- package/lib-cjs/component/elements/EditableColumn.js +27 -20
- package/lib-cjs/component/elements/Input.js +18 -5
- package/lib-cjs/component/elements/Logo.js +1 -1
- package/lib-cjs/component/elements/ReactTable/Elements/ReactTableRow.js +43 -14
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +7 -2
- package/lib-cjs/component/elements/ReactTable/Style.js +1 -9
- package/lib-cjs/component/elements/Select.js +20 -14
- package/lib-cjs/component/elements/Tab/Tabs.js +2 -1
- package/lib-cjs/component/elements/ToggleButton.js +4 -4
- package/lib-cjs/component/elements/accordion/Accordion.js +2 -6
- package/lib-cjs/component/elements/draggble/SVGDraggable.js +39 -0
- package/lib-cjs/component/elements/draggble/useDraggable.js +73 -0
- package/lib-cjs/component/elements/formik/FormikColorPicker.js +10 -7
- package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +2 -2
- package/lib-cjs/component/elements/formik/FormikInput.js +6 -3
- package/lib-cjs/component/elements/formik/FormikSlider.js +6 -3
- package/lib-cjs/component/elements/formik/Input.js +1 -1
- package/lib-cjs/component/elements/popup/Alert/Provider.js +1 -1
- package/lib-cjs/component/elements/popup/Modal/Modal.js +1 -1
- package/lib-cjs/component/elements/popup/Modal/ModalContent.js +1 -1
- package/lib-cjs/component/elements/resizer/DivResizer.js +17 -62
- package/lib-cjs/component/elements/resizer/SVGResizer.js +24 -53
- package/lib-cjs/component/elements/resizer/useResizer.js +71 -0
- package/lib-cjs/component/elements/toggle/ToggleButtonGroup.js +2 -2
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +7 -4
- package/lib-cjs/component/header/Header.js +2 -2
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +1 -1
- package/lib-cjs/component/hooks/useActiveSpectrumStyleOptions.js +1 -1
- package/lib-cjs/component/hooks/useCheckToolsVisibility.js +2 -1
- package/lib-cjs/component/hooks/useExport.js +2 -2
- package/lib-cjs/component/{utility/FormatNumber.js → hooks/useFormatNumberByNucleus.js} +4 -15
- package/lib-cjs/component/hooks/usePanelPreferences.js +62 -0
- package/lib-cjs/component/loader/DefaultSpinnerComponent.js +2 -2
- package/lib-cjs/component/loader/DropZone.js +8 -2
- package/lib-cjs/component/loader/NoData.js +31 -30
- package/lib-cjs/component/loader/SpinnerContext.js +2 -2
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +26 -3
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +50 -54
- package/lib-cjs/component/modal/editRange/forms/components/AddSignalFormTab.js +11 -27
- package/lib-cjs/component/modal/editRange/forms/components/CouplingsTable.js +12 -50
- package/lib-cjs/component/modal/editRange/forms/components/SignalFormInfo.js +38 -0
- package/lib-cjs/component/modal/editRange/forms/components/SignalFormTab.js +13 -16
- package/lib-cjs/component/modal/editRange/forms/components/SignalsForm.js +29 -37
- package/lib-cjs/component/modal/editZone/SignalsForm.js +1 -1
- package/lib-cjs/component/modal/setting/DatabasesTabContent.js +78 -0
- package/lib-cjs/component/modal/setting/DisplayTabContent.js +11 -7
- package/lib-cjs/component/modal/setting/FormattingTabContent.js +19 -13
- package/lib-cjs/component/modal/setting/GeneralSettings.js +3 -1
- package/lib-cjs/component/modal/setting/settingsValidation.js +74 -0
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignment.js +6 -4
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +13 -6
- package/lib-cjs/component/panels/AutomaticAssignment/useAutoAssignments.js +72 -0
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +13 -18
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +10 -11
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +24 -72
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +44 -0
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +17 -35
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +11 -3
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +61 -68
- package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +55 -60
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +1 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +2 -2
- package/lib-cjs/component/panels/Panels.js +3 -4
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +5 -5
- package/lib-cjs/component/panels/PeaksPanel/PeaksPreferences.js +27 -80
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +18 -48
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +27 -12
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +23 -29
- package/lib-cjs/component/panels/RangesPanel/RangesPreferences.js +53 -64
- package/lib-cjs/component/panels/RangesPanel/RangesTable.js +3 -7
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +18 -17
- package/lib-cjs/component/panels/RangesPanel/TableColumns/AbsoluteColumn.js +2 -5
- package/lib-cjs/component/panels/RangesPanel/TableColumns/ActionsColumn.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/TableColumns/CouplingColumn.js +5 -2
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeColumn.js +2 -5
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +3 -4
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js +16 -0
- package/lib-cjs/component/panels/RangesPanel/TableColumns/format.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +49 -31
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +3 -16
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideMarkersButton.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/PlotChart.js +21 -0
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.js +10 -68
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +1 -8
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.js +10 -68
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +8 -21
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +2 -2
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +55 -0
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +3 -3
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +3 -3
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +8 -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 +3 -3
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +2 -2
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +3 -2
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +4 -4
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +14 -14
- package/lib-cjs/component/panels/ZonesPanel/ZonesPreferences.js +18 -82
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +4 -1
- package/lib-cjs/component/panels/ZonesPanel/ZonesTableRow.js +23 -23
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +128 -41
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +10 -42
- package/lib-cjs/component/panels/databasePanel/DatabaseStructureSearchModal.js +15 -0
- package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +36 -19
- package/lib-cjs/component/panels/extra/placeholder/NoTableData.js +2 -2
- package/lib-cjs/component/panels/extra/preferences/ColumnsHelper.js +5 -7
- package/lib-cjs/component/panels/extra/preferences/NucleusPreferences.js +29 -0
- package/lib-cjs/component/panels/extra/preferences/PreferencesContainer.js +14 -0
- package/lib-cjs/component/panels/extra/preferences/PreferencesGroup.js +25 -0
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +1 -3
- package/lib-cjs/component/panels/header/SpectraAutomaticPickingButton.js +37 -0
- package/lib-cjs/component/reducer/Reducer.js +22 -10
- package/lib-cjs/component/reducer/actions/AssignmentsActions.js +21 -0
- 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 +26 -4
- package/lib-cjs/component/reducer/actions/LoadActions.js +10 -5
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +17 -3
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +30 -18
- package/lib-cjs/component/reducer/actions/RangesActions.js +46 -12
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +4 -7
- package/lib-cjs/component/reducer/actions/ToolsActions.js +64 -74
- package/lib-cjs/component/reducer/helper/getSpectrum.js +18 -0
- package/lib-cjs/component/reducer/preferences/actions/addWorkspace.js +26 -0
- package/lib-cjs/component/reducer/preferences/actions/initPreferences.js +67 -0
- package/lib-cjs/component/reducer/preferences/actions/removeWorkspace.js +24 -0
- package/lib-cjs/component/reducer/preferences/actions/resetPreferences.js +18 -0
- package/lib-cjs/component/reducer/preferences/actions/setPanelsPreferences.js +17 -0
- package/lib-cjs/component/reducer/preferences/actions/setPreferences.js +38 -0
- package/lib-cjs/component/reducer/preferences/actions/setWorkspace.js +12 -0
- package/lib-cjs/component/reducer/preferences/panelsPreferencesDefaultValues.js +62 -0
- package/lib-cjs/component/reducer/preferences/preferencesReducer.js +87 -0
- package/lib-cjs/component/reducer/preferences/utilites/checkKeysExists.js +18 -0
- package/lib-cjs/component/reducer/preferences/utilites/filterObject.js +11 -0
- package/lib-cjs/component/reducer/preferences/utilites/flatObject.js +13 -0
- package/lib-cjs/component/reducer/preferences/utilites/getActiveWorkspace.js +7 -0
- package/lib-cjs/component/reducer/preferences/utilites/getPreferencesByWorkspace.js +11 -0
- package/lib-cjs/component/reducer/preferences/utilites/mapNucleiFormatting.js +12 -0
- package/lib-cjs/component/reducer/types/Types.js +9 -4
- package/lib-cjs/component/tool/BrushX.js +1 -1
- package/lib-cjs/component/tool/BrushXY.js +1 -1
- package/lib-cjs/component/tool/CrossLinePointer.js +1 -1
- package/lib-cjs/component/tool/FloatMoleculeStructures/ActionsButton.js +13 -0
- package/lib-cjs/component/tool/FloatMoleculeStructures/DraggableStructure.js +51 -0
- package/lib-cjs/component/tool/FloatMoleculeStructures/index.js +36 -0
- package/lib-cjs/component/toolbar/BasicToolBar.js +0 -1
- package/lib-cjs/component/toolbar/FunctionToolBar.js +9 -13
- package/lib-cjs/component/toolbar/ToolTypes.js +3 -3
- package/lib-cjs/component/utility/Export.js +10 -3
- package/lib-cjs/component/utility/PathBuilder.js +2 -1
- package/lib-cjs/component/utility/formatNumber.js +19 -0
- package/lib-cjs/component/utility/getUniqueNuclei.js +14 -0
- package/lib-cjs/component/utility/isGoogleDocument.js +7 -0
- package/lib-cjs/component/utility/nmredataToNmrium.js +1 -2
- package/lib-cjs/component/utility/util/nmredata/addSource.js +2 -2
- package/lib-cjs/component/workspaces/basic.js +25 -11
- package/lib-cjs/component/workspaces/embedded.js +35 -0
- package/lib-cjs/component/workspaces/exercise.js +4 -2
- package/lib-cjs/component/workspaces/index.js +2 -1
- package/lib-cjs/component/workspaces/prediction.js +2 -0
- package/lib-cjs/component/workspaces/process1D.js +3 -1
- package/lib-cjs/data/FiltersManager.js +1 -1
- package/lib-cjs/data/PredictionManager.js +7 -9
- package/lib-cjs/data/SpectraManager.js +37 -38
- package/lib-cjs/data/data1d/Data1DManager.js +14 -2
- package/lib-cjs/data/data1d/Spectrum1D/convertDataToFloat64Array.js +14 -0
- package/lib-cjs/data/data1d/Spectrum1D/generateJGraphData.js +8 -10
- package/lib-cjs/data/data1d/Spectrum1D/getReferenceShift.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +2 -1
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateRelatives.js +5 -7
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +40 -16
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectSignal.js +3 -3
- package/lib-cjs/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +2 -1
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/toJSON.js +1 -0
- package/lib-cjs/data/data1d/database.js +67 -23
- package/lib-cjs/data/data1d/filter1d/exclusionZones.js +4 -4
- package/lib-cjs/data/data1d/filter1d/fft.js +2 -2
- package/lib-cjs/data/data1d/filter1d/lineBroadening.js +2 -2
- package/lib-cjs/data/data1d/filter1d/pareto.js +2 -2
- package/lib-cjs/data/data1d/filter1d/shiftX.js +2 -2
- package/lib-cjs/data/data1d/filter1d/zeroFilling.js +1 -1
- package/lib-cjs/data/data2d/Data2DManager.js +6 -1
- package/lib-cjs/data/data2d/Processing2D.js +1 -1
- package/lib-cjs/data/data2d/Spectrum2D/toJSON.js +1 -0
- package/lib-cjs/data/data2d/filter2d/shiftX.js +4 -4
- package/lib-cjs/data/data2d/filter2d/shiftY.js +4 -4
- package/lib-cjs/data/molecules/Molecule.js +9 -1
- package/lib-cjs/data/molecules/MoleculeManager.js +37 -3
- package/lib-cjs/data/utilities/FindUtilities.js +1 -3
- package/lib-cjs/data/utilities/RangeUtilities.js +8 -6
- package/lib-cjs/data/utilities/ZoneUtilities.js +1 -1
- package/lib-cjs/data/utilities/getSum.js +1 -3
- package/lib-cjs/data/utilities/isMolFileEmpty.js +10 -0
- package/lib-cjs/types/NMRiumDataReturn.js +2 -0
- package/lib-cjs/types/NMRiumGeneralPreferences.js +2 -0
- package/lib-cjs/types/NMRiumPanelPreferences.js +2 -0
- package/lib-cjs/types/NMRiumToolBarPreferences.js +2 -0
- package/lib-cjs/types/Preferences.js +2 -0
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +53 -51
- package/lib/component/1d/multiplicityTree/TempMultiplicityTree.d.ts +0 -2
- package/lib/component/1d/multiplicityTree/TempMultiplicityTree.js +0 -14
- package/lib/component/elements/resizer/useDraggable.js +0 -52
- package/lib/component/panels/extra/preferences/defaultValues.d.ts +0 -54
- package/lib/component/panels/extra/preferences/defaultValues.js +0 -54
- package/lib/component/reducer/preferencesReducer.js +0 -272
- package/lib/component/utility/FormatNumber.d.ts +0 -6
- package/lib-cjs/component/1d/multiplicityTree/TempMultiplicityTree.js +0 -20
- package/lib-cjs/component/elements/resizer/useDraggable.js +0 -55
- package/lib-cjs/component/panels/extra/preferences/defaultValues.js +0 -61
- package/lib-cjs/component/reducer/preferencesReducer.js +0 -279
|
@@ -10,6 +10,22 @@ const nucleusToString_1 = __importDefault(require("../../utility/nucleusToString
|
|
|
10
10
|
const Constants_1 = require("../core/Constants");
|
|
11
11
|
const DomainActions_1 = require("./DomainActions");
|
|
12
12
|
function changeSpectrumVerticalAlignment(draft, options) {
|
|
13
|
+
function stack(spectra = []) {
|
|
14
|
+
if (spectra.length > 1) {
|
|
15
|
+
draft.verticalAlign.align = 'stack';
|
|
16
|
+
const visibleSpectra = spectra.filter((datum) => datum.display.isVisible);
|
|
17
|
+
draft.verticalAlign.verticalShift = Math.abs(Math.floor((draft.height - draft.margin.bottom) / (visibleSpectra.length + 2)));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function center() {
|
|
21
|
+
const YAxisShift = draft.height / 2;
|
|
22
|
+
draft.verticalAlign.align = 'center';
|
|
23
|
+
draft.verticalAlign.verticalShift = YAxisShift;
|
|
24
|
+
}
|
|
25
|
+
function bottom() {
|
|
26
|
+
draft.verticalAlign.align = 'bottom';
|
|
27
|
+
draft.verticalAlign.verticalShift = Constants_1.DEFAULT_YAXIS_SHIFT_VALUE;
|
|
28
|
+
}
|
|
13
29
|
if (draft.data && draft.data.length > 0) {
|
|
14
30
|
let dataPerNucleus = [];
|
|
15
31
|
if (['auto-check', 'stack'].includes(options.align || '')) {
|
|
@@ -18,31 +34,27 @@ function changeSpectrumVerticalAlignment(draft, options) {
|
|
|
18
34
|
: draft.activeTab && datum.info.dimension === 1);
|
|
19
35
|
}
|
|
20
36
|
switch (options.align) {
|
|
21
|
-
case 'auto-check':
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (
|
|
25
|
-
(
|
|
26
|
-
dataPerNucleus[0]?.info.isFid &&
|
|
27
|
-
!dataPerNucleus.some((d) => d.info.isFid === false))) {
|
|
28
|
-
const YAxisShift = draft.height / 2;
|
|
29
|
-
draft.verticalAlign.align = 'center';
|
|
30
|
-
draft.verticalAlign.verticalShift = YAxisShift;
|
|
37
|
+
case 'auto-check': {
|
|
38
|
+
const isFid = dataPerNucleus[0]?.info.isFid &&
|
|
39
|
+
!dataPerNucleus.some((d) => !d.info.isFid);
|
|
40
|
+
if (isFid) {
|
|
41
|
+
center();
|
|
31
42
|
}
|
|
32
|
-
else {
|
|
33
|
-
|
|
34
|
-
draft.verticalAlign.verticalShift = Constants_1.DEFAULT_YAXIS_SHIFT_VALUE;
|
|
43
|
+
else if (dataPerNucleus.length > 1) {
|
|
44
|
+
stack(dataPerNucleus);
|
|
35
45
|
}
|
|
36
46
|
break;
|
|
37
47
|
}
|
|
48
|
+
case 'bottom': {
|
|
49
|
+
return bottom();
|
|
50
|
+
}
|
|
51
|
+
case 'center': {
|
|
52
|
+
return center();
|
|
53
|
+
}
|
|
38
54
|
case 'stack': {
|
|
39
|
-
|
|
40
|
-
const visibleSpectra = dataPerNucleus.filter((datum) => datum.display.isVisible === true);
|
|
41
|
-
draft.verticalAlign.verticalShift = Math.floor((draft.height - draft.margin.bottom) / (visibleSpectra.length + 2));
|
|
42
|
-
break;
|
|
55
|
+
return stack(dataPerNucleus);
|
|
43
56
|
}
|
|
44
57
|
default:
|
|
45
|
-
return;
|
|
46
58
|
}
|
|
47
59
|
}
|
|
48
60
|
}
|
|
@@ -26,7 +26,7 @@ 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
30
|
const immer_1 = require("immer");
|
|
31
31
|
const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
32
32
|
const ml_spectra_processing_1 = require("ml-spectra-processing");
|
|
@@ -36,9 +36,11 @@ const SignalsKinds_1 = require("../../../data/constants/SignalsKinds");
|
|
|
36
36
|
const Spectrum1D_1 = require("../../../data/data1d/Spectrum1D");
|
|
37
37
|
const SumManager_1 = require("../../../data/data1d/Spectrum1D/SumManager");
|
|
38
38
|
const RangeUtilities_1 = require("../../../data/utilities/RangeUtilities");
|
|
39
|
+
const generateID_1 = __importDefault(require("../../../data/utilities/generateID"));
|
|
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, generateID_1.default)();
|
|
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
|
}
|
|
@@ -1,27 +1,4 @@
|
|
|
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
|
};
|
|
@@ -30,14 +7,12 @@ exports.resetSpectraScale = exports.setSpectraSameTopHandler = exports.setTab =
|
|
|
30
7
|
const d3_1 = require("d3");
|
|
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
10
|
const generateID_1 = __importDefault(require("../../../data/utilities/generateID"));
|
|
35
11
|
const scale_1 = require("../../1d/utilities/scale");
|
|
36
12
|
const DimensionLayout_1 = require("../../2d/utilities/DimensionLayout");
|
|
37
13
|
const scale_2 = require("../../2d/utilities/scale");
|
|
38
14
|
const ToolTypes_1 = require("../../toolbar/ToolTypes");
|
|
39
15
|
const GroupByInfoKey_1 = __importDefault(require("../../utility/GroupByInfoKey"));
|
|
40
|
-
const getSpectraByNucleus_1 = require("../../utility/getSpectraByNucleus");
|
|
41
16
|
const Constants_1 = require("../core/Constants");
|
|
42
17
|
const Zoom1DManager_1 = require("../helper/Zoom1DManager");
|
|
43
18
|
const ZoomHistoryManager_1 = __importDefault(require("../helper/ZoomHistoryManager"));
|
|
@@ -53,47 +28,66 @@ function getStrongestPeak(draft) {
|
|
|
53
28
|
return {
|
|
54
29
|
xValue: activeData.x[index],
|
|
55
30
|
yValue: strongestPeakValue,
|
|
56
|
-
index
|
|
31
|
+
index,
|
|
57
32
|
};
|
|
58
33
|
}
|
|
59
34
|
}
|
|
60
|
-
function
|
|
35
|
+
function checkFilterHasTempData(selectedToolId) {
|
|
36
|
+
return [ToolTypes_1.options.phaseCorrection.id, ToolTypes_1.options.baselineCorrection.id].includes(selectedToolId);
|
|
37
|
+
}
|
|
38
|
+
function setFilterChanges(draft, selectedFilterID) {
|
|
61
39
|
const activeSpectrumId = draft.activeSpectrum?.id;
|
|
62
|
-
//
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const
|
|
40
|
+
// If the user selects the filter from the filters list or selects its tool and has a record in the filter list for preview and edit
|
|
41
|
+
if (checkFilterHasTempData(selectedFilterID)) {
|
|
42
|
+
//return back the spectra data to point of time before applying a specific filter
|
|
43
|
+
const dataSavePoint = (0, FiltersActions_1.resetSpectrumByFilter)(draft, selectedFilterID, {
|
|
44
|
+
updateDomain: false,
|
|
66
45
|
rollback: true,
|
|
67
46
|
searchBy: 'name',
|
|
68
47
|
returnCurrentDatum: true,
|
|
69
48
|
});
|
|
49
|
+
// create a temporary clone of the data
|
|
70
50
|
draft.tempData = (0, immer_1.current)(draft).data;
|
|
71
|
-
if (
|
|
72
|
-
draft.tempData[
|
|
73
|
-
datumAfterPhaseCorrection?.datum;
|
|
51
|
+
if (dataSavePoint) {
|
|
52
|
+
draft.tempData[dataSavePoint?.index] = dataSavePoint?.datum;
|
|
74
53
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
54
|
+
switch (selectedFilterID) {
|
|
55
|
+
case ToolTypes_1.options.phaseCorrection.id: {
|
|
56
|
+
// look for the strongest peak to set it as a pivot
|
|
57
|
+
const { xValue, index } = getStrongestPeak(draft) || {
|
|
58
|
+
xValue: 0,
|
|
59
|
+
index: 0,
|
|
60
|
+
};
|
|
61
|
+
draft.toolOptions.data.pivot = { value: xValue, index };
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
case ToolTypes_1.options.baselineCorrection.id: {
|
|
65
|
+
if (draft.activeSpectrum?.id) {
|
|
66
|
+
const baselineCorrectionFilter = (0, immer_1.current)(draft).data[draft.activeSpectrum.index].filters.find((filter) => filter.name === ToolTypes_1.options.baselineCorrection.id);
|
|
67
|
+
draft.toolOptions.data.baselineCorrection.zones =
|
|
68
|
+
baselineCorrectionFilter
|
|
69
|
+
? baselineCorrectionFilter.value.zones
|
|
70
|
+
: [];
|
|
71
|
+
}
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
default:
|
|
75
|
+
break;
|
|
86
76
|
}
|
|
87
77
|
}
|
|
78
|
+
else if (checkFilterHasTempData(draft.toolOptions.selectedTool)) {
|
|
79
|
+
draft.toolOptions.data.activeFilterID = null;
|
|
80
|
+
const spectrumIndex = draft.data.findIndex((spectrum) => spectrum.id === activeSpectrumId);
|
|
81
|
+
draft.data[spectrumIndex].data = draft.tempData[spectrumIndex].data;
|
|
82
|
+
}
|
|
88
83
|
}
|
|
89
84
|
function resetTool(draft, setDefaultTool = true) {
|
|
90
85
|
// reset temp range
|
|
91
|
-
draft.toolOptions.data.tempRange = null;
|
|
92
86
|
setSelectedOptionPanel(draft, null);
|
|
93
87
|
if (setDefaultTool) {
|
|
94
88
|
draft.toolOptions.selectedTool = ToolTypes_1.options.zoom.id;
|
|
95
89
|
}
|
|
96
|
-
draft.toolOptions.data.
|
|
90
|
+
draft.toolOptions.data.baselineCorrection = { zones: [], options: [] };
|
|
97
91
|
if (draft.toolOptions.data.activeFilterID) {
|
|
98
92
|
(0, FiltersActions_1.resetSpectrumByFilter)(draft);
|
|
99
93
|
}
|
|
@@ -116,10 +110,7 @@ function setSelectedTool(draft, action) {
|
|
|
116
110
|
if (selectedTool) {
|
|
117
111
|
// start Range edit mode
|
|
118
112
|
if (selectedTool === ToolTypes_1.options.editRange.id) {
|
|
119
|
-
draft.toolOptions.data.
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
draft.toolOptions.data.tempRange = null;
|
|
113
|
+
draft.toolOptions.data.showMultiplicityTrees = true;
|
|
123
114
|
}
|
|
124
115
|
if (selectedTool !== draft.toolOptions.selectedTool) {
|
|
125
116
|
resetTool(draft, false);
|
|
@@ -166,19 +157,21 @@ function handleAddBaseLineZone(draft, { from, to }) {
|
|
|
166
157
|
else {
|
|
167
158
|
zone = [start, end];
|
|
168
159
|
}
|
|
169
|
-
const zones = draft.toolOptions.data.
|
|
160
|
+
const zones = draft.toolOptions.data.baselineCorrection.zones;
|
|
170
161
|
zones.push({
|
|
171
162
|
id: (0, generateID_1.default)(),
|
|
172
163
|
from: zone[0],
|
|
173
164
|
to: zone[1],
|
|
174
165
|
});
|
|
175
|
-
draft.toolOptions.data.
|
|
166
|
+
draft.toolOptions.data.baselineCorrection.zones = zones.slice();
|
|
167
|
+
(0, FiltersActions_1.calculateBaseLineCorrection)(draft);
|
|
176
168
|
}
|
|
177
169
|
exports.handleAddBaseLineZone = handleAddBaseLineZone;
|
|
178
170
|
function handleDeleteBaseLineZone(draft, id) {
|
|
179
171
|
const state = (0, immer_1.original)(draft);
|
|
180
|
-
draft.toolOptions.data.
|
|
181
|
-
state.toolOptions.data.
|
|
172
|
+
draft.toolOptions.data.baselineCorrection.zones =
|
|
173
|
+
state.toolOptions.data.baselineCorrection.zones.filter((zone) => zone.id !== id);
|
|
174
|
+
(0, FiltersActions_1.calculateBaseLineCorrection)(draft);
|
|
182
175
|
}
|
|
183
176
|
exports.handleDeleteBaseLineZone = handleDeleteBaseLineZone;
|
|
184
177
|
function handleToggleRealImaginaryVisibility(draft) {
|
|
@@ -255,24 +248,21 @@ function handleZoom(draft, action) {
|
|
|
255
248
|
}
|
|
256
249
|
}
|
|
257
250
|
}
|
|
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
|
-
}
|
|
251
|
+
else if (activeSpectrum?.id) {
|
|
252
|
+
if ((showRangesIntegrals || selectedTool === ToolTypes_1.options.integral.id) &&
|
|
253
|
+
event.shiftKey) {
|
|
254
|
+
const domain = draft.integralsYDomains[activeSpectrum?.id];
|
|
255
|
+
draft.integralsYDomains[activeSpectrum?.id] = (0, Zoom1DManager_1.wheelZoom)(event, domain);
|
|
269
256
|
}
|
|
270
257
|
else {
|
|
271
|
-
const
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
258
|
+
const domain = draft.yDomains[activeSpectrum?.id];
|
|
259
|
+
draft.yDomains[activeSpectrum?.id] = (0, Zoom1DManager_1.wheelZoom)(event, domain);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
for (const key of Object.keys(draft.yDomains)) {
|
|
264
|
+
const domain = draft.yDomains[key];
|
|
265
|
+
draft.yDomains[key] = (0, Zoom1DManager_1.wheelZoom)(event, domain);
|
|
276
266
|
}
|
|
277
267
|
}
|
|
278
268
|
}
|
|
@@ -347,7 +337,7 @@ function setMargin(draft) {
|
|
|
347
337
|
draft.margin = Constants_1.MARGIN['1D'];
|
|
348
338
|
}
|
|
349
339
|
}
|
|
350
|
-
function
|
|
340
|
+
function processing2DData(draft, data) {
|
|
351
341
|
if (draft.displayerMode === Constants_1.DISPLAYER_MODE.DM_2D) {
|
|
352
342
|
let _data = {};
|
|
353
343
|
for (const datum of data[draft.activeTab]) {
|
|
@@ -425,12 +415,12 @@ exports.setTab = setTab;
|
|
|
425
415
|
function setActiveTab(draft, options) {
|
|
426
416
|
const { tab = null, refreshActiveTab = false, domainOptions = {}, } = options || {};
|
|
427
417
|
const groupByNucleus = (0, GroupByInfoKey_1.default)('nucleus');
|
|
428
|
-
const dataGroupByNucleus = groupByNucleus(draft.data);
|
|
418
|
+
const dataGroupByNucleus = groupByNucleus(draft.data, true);
|
|
429
419
|
const tabs = Object.keys(dataGroupByNucleus);
|
|
430
420
|
const currentTab = !tab || !tabs.includes(tab || '') ? tabs[0] : tab;
|
|
431
421
|
setTab(draft, dataGroupByNucleus, currentTab, refreshActiveTab);
|
|
432
422
|
resetTool(draft);
|
|
433
|
-
|
|
423
|
+
processing2DData(draft, dataGroupByNucleus);
|
|
434
424
|
(0, DomainActions_1.setDomain)(draft, domainOptions);
|
|
435
425
|
(0, DomainActions_1.setIntegralsYDomain)(draft, dataGroupByNucleus[currentTab]);
|
|
436
426
|
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,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.addWorkspace = void 0;
|
|
7
|
+
const generateID_1 = __importDefault(require("../../../../data/utilities/generateID"));
|
|
8
|
+
const LocalStorage_1 = require("../../../utility/LocalStorage");
|
|
9
|
+
function addWorkspace(draft, action) {
|
|
10
|
+
const { workspace: workspaceName, data: { display, controllers, formatting, databases }, } = action.payload;
|
|
11
|
+
const newWorkSpace = {
|
|
12
|
+
version: 1,
|
|
13
|
+
label: workspaceName,
|
|
14
|
+
display,
|
|
15
|
+
controllers,
|
|
16
|
+
formatting,
|
|
17
|
+
databases,
|
|
18
|
+
};
|
|
19
|
+
const newWorkspaceKey = (0, generateID_1.default)();
|
|
20
|
+
const localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
|
|
21
|
+
localData.workspaces[newWorkspaceKey] = newWorkSpace;
|
|
22
|
+
(0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(localData));
|
|
23
|
+
draft.workspaces[newWorkspaceKey] = newWorkSpace;
|
|
24
|
+
draft.workspace.current = newWorkspaceKey;
|
|
25
|
+
}
|
|
26
|
+
exports.addWorkspace = addWorkspace;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.initPreferences = void 0;
|
|
7
|
+
const merge_1 = __importDefault(require("lodash/merge"));
|
|
8
|
+
const LocalStorage_1 = require("../../../utility/LocalStorage");
|
|
9
|
+
const workspaces_1 = __importDefault(require("../../../workspaces"));
|
|
10
|
+
const checkKeysExists_1 = require("../utilites/checkKeysExists");
|
|
11
|
+
const filterObject_1 = require("../utilites/filterObject");
|
|
12
|
+
const getActiveWorkspace_1 = require("../utilites/getActiveWorkspace");
|
|
13
|
+
const getPreferencesByWorkspace_1 = require("../utilites/getPreferencesByWorkspace");
|
|
14
|
+
function initPreferences(draft, action) {
|
|
15
|
+
if (action.payload) {
|
|
16
|
+
const localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
|
|
17
|
+
const { dispatch, workspace, ...resProps } = action.payload;
|
|
18
|
+
/**
|
|
19
|
+
* set the current workspace what the user-defined in the setting if the workspace is not defined at the level of component, otherwise
|
|
20
|
+
* use the default workspace
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
draft.workspace =
|
|
24
|
+
!workspace && localData?.currentWorkspace
|
|
25
|
+
? { current: localData.currentWorkspace, base: null }
|
|
26
|
+
: { current: workspace || 'default', base: workspace };
|
|
27
|
+
const workspacePreferences = (0, merge_1.default)({}, (0, getPreferencesByWorkspace_1.getPreferencesByWorkspace)(draft.workspace.current), resProps);
|
|
28
|
+
const currentWorkspacePreferences = (0, getActiveWorkspace_1.getActiveWorkspace)(draft);
|
|
29
|
+
/**
|
|
30
|
+
* Update the local storage general preferences
|
|
31
|
+
* 1- if local storage is empty.
|
|
32
|
+
* 2- if predefine workspaces.
|
|
33
|
+
* 3- b) if workspace not exists in the local storage
|
|
34
|
+
* c) if the local setting workspace version != current workspace version number
|
|
35
|
+
* d) if hard code workspace parameters != current workspace parameters
|
|
36
|
+
*/
|
|
37
|
+
if ((workspaces_1.default[draft.workspace.current] &&
|
|
38
|
+
(!currentWorkspacePreferences ||
|
|
39
|
+
workspacePreferences?.version !==
|
|
40
|
+
currentWorkspacePreferences?.version ||
|
|
41
|
+
!(0, checkKeysExists_1.checkKeysExists)(workspacePreferences.display, currentWorkspacePreferences?.display))) ||
|
|
42
|
+
!localData) {
|
|
43
|
+
const { workspaces, version, workspace: { current }, } = draft || {};
|
|
44
|
+
const display = (0, filterObject_1.filterObject)(workspacePreferences.display);
|
|
45
|
+
const data = {
|
|
46
|
+
version,
|
|
47
|
+
...(localData?.currentWorkspace && {
|
|
48
|
+
currentWorkspace: localData?.currentWorkspace,
|
|
49
|
+
}),
|
|
50
|
+
workspaces: {
|
|
51
|
+
...workspaces,
|
|
52
|
+
[current]: {
|
|
53
|
+
...workspacePreferences,
|
|
54
|
+
display,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
draft.workspaces[current] = (0, merge_1.default)({}, currentWorkspacePreferences, workspacePreferences);
|
|
59
|
+
(0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(data));
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
draft.workspaces[draft.workspace.current] = (0, merge_1.default)({}, currentWorkspacePreferences, resProps);
|
|
63
|
+
}
|
|
64
|
+
draft.dispatch = dispatch;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.initPreferences = initPreferences;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeWorkspace = void 0;
|
|
4
|
+
const immer_1 = require("immer");
|
|
5
|
+
const LocalStorage_1 = require("../../../utility/LocalStorage");
|
|
6
|
+
const filterObject_1 = require("../utilites/filterObject");
|
|
7
|
+
function removeWorkspace(draft, action) {
|
|
8
|
+
const { workspace } = action.payload;
|
|
9
|
+
if (workspace === draft.workspace.current) {
|
|
10
|
+
draft.workspace.current = 'default';
|
|
11
|
+
}
|
|
12
|
+
let localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
|
|
13
|
+
const storedWorkspaces = (0, immer_1.original)(draft)?.workspaces || {};
|
|
14
|
+
const workspaces = Object.keys(storedWorkspaces).reduce((acc, key) => {
|
|
15
|
+
if (key !== workspace) {
|
|
16
|
+
acc[key] = storedWorkspaces[key];
|
|
17
|
+
}
|
|
18
|
+
return acc;
|
|
19
|
+
}, {});
|
|
20
|
+
draft.workspaces = workspaces;
|
|
21
|
+
localData.workspaces = (0, filterObject_1.filterObject)(workspaces);
|
|
22
|
+
(0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(localData));
|
|
23
|
+
}
|
|
24
|
+
exports.removeWorkspace = removeWorkspace;
|
|
@@ -0,0 +1,18 @@
|
|
|
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;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setPanelsPreferences = void 0;
|
|
4
|
+
const LocalStorage_1 = require("../../../utility/LocalStorage");
|
|
5
|
+
const getActiveWorkspace_1 = require("../utilites/getActiveWorkspace");
|
|
6
|
+
function setPanelsPreferences(draft, action) {
|
|
7
|
+
if (action.payload) {
|
|
8
|
+
const currentWorkspacePreferences = (0, getActiveWorkspace_1.getActiveWorkspace)(draft);
|
|
9
|
+
const { key, value } = action.payload;
|
|
10
|
+
let localData = (0, LocalStorage_1.getLocalStorage)('nmr-general-settings');
|
|
11
|
+
localData.workspaces[draft.workspace.current].formatting.panels[key] =
|
|
12
|
+
value;
|
|
13
|
+
(0, LocalStorage_1.storeData)('nmr-general-settings', JSON.stringify(localData));
|
|
14
|
+
currentWorkspacePreferences.formatting.panels[key] = value;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.setPanelsPreferences = setPanelsPreferences;
|