nmrium 0.21.0 → 0.24.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 +4 -0
- package/lib/component/1d/Chart1D.js +1 -1
- package/lib/component/1d/ExclusionZoneAnnotation.js +1 -1
- package/lib/component/1d/ExclusionZonesAnnotations.js +3 -4
- package/lib/component/1d/FooterBanner.js +7 -8
- package/lib/component/1d/Integral.js +3 -8
- package/lib/component/1d/IntegralResizable.js +1 -1
- package/lib/component/1d/IntegralsSeries.js +2 -2
- package/lib/component/1d/LinesSeries.js +1 -1
- package/lib/component/1d/PeakAnnotation.js +3 -3
- package/lib/component/1d/PeakAnnotations.js +1 -1
- package/lib/component/1d/Resizable.js +2 -2
- package/lib/component/1d/ResurrectedDatabaseRanges.js +1 -1
- package/lib/component/1d/SpectraTracker.js +3 -3
- package/lib/component/1d/Viewer1D.js +9 -9
- package/lib/component/1d/XAxis.js +1 -1
- package/lib/component/1d/YAxis.js +1 -1
- package/lib/component/1d/jCouplingGraph/JGraph.js +3 -4
- package/lib/component/1d/jCouplingGraph/JGraphVerticalAxis.js +1 -1
- package/lib/component/1d/jCouplingGraph/JsCoupling.js +1 -1
- package/lib/component/1d/jCouplingGraph/JsCouplingLinks.js +1 -1
- package/lib/component/1d/jCouplingGraph/JsCouplings.js +2 -2
- package/lib/component/1d/multiAnalysis/AnalysisRange.js +1 -1
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +2 -2
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +3 -3
- package/lib/component/1d/multiplicityTree/TempMultiplicityTree.js +1 -1
- package/lib/component/1d/multiplicityTree/TreeNodes.js +2 -2
- package/lib/component/1d/ranges/Range.js +2 -2
- package/lib/component/1d/ranges/RangeIntegral.js +2 -6
- package/lib/component/1d/ranges/Ranges.js +2 -2
- package/lib/component/1d/tool/BaseLineZones.js +1 -1
- package/lib/component/1d/tool/PeakPointer.js +1 -1
- package/lib/component/1d/tool/VerticalIndicator.js +1 -1
- package/lib/component/1d/tool/XLabelPointer.js +1 -1
- package/lib/component/1d/utilities/scale.d.ts +1 -1
- package/lib/component/1d/utilities/scale.js +7 -6
- package/lib/component/2d/Chart2D.js +2 -2
- package/lib/component/2d/Contours.js +6 -6
- package/lib/component/2d/FooterBanner.js +3 -3
- package/lib/component/2d/Left1DChart.js +1 -1
- package/lib/component/2d/SignalDeltaLine.js +1 -1
- package/lib/component/2d/Top1DChart.js +1 -1
- package/lib/component/2d/Viewer2D.js +8 -8
- package/lib/component/2d/XAxis.js +1 -1
- package/lib/component/2d/YAxis.js +1 -1
- package/lib/component/2d/tools/XYLabelPointer.js +1 -1
- package/lib/component/2d/tools/slicing/HorizontalSliceChart.js +1 -1
- package/lib/component/2d/tools/slicing/SlicingView.js +1 -1
- package/lib/component/2d/tools/slicing/VerticalSliceChart.js +1 -1
- package/lib/component/2d/zones/IndicationLines.js +1 -1
- package/lib/component/2d/zones/Signal.js +2 -2
- package/lib/component/2d/zones/SignalCrosshair.js +1 -1
- package/lib/component/2d/zones/Zone.js +1 -1
- package/lib/component/2d/zones/Zones.js +2 -2
- package/lib/component/ErrorOverlay.js +1 -1
- package/lib/component/EventsTrackers/BrushTracker.js +1 -1
- package/lib/component/EventsTrackers/MouseTracker.js +1 -1
- package/lib/component/NMRium.d.ts +36 -36
- package/lib/component/NMRium.js +10 -16
- package/lib/component/assignment/index.js +1 -1
- package/lib/component/context/PreferencesContext.d.ts +84 -2
- package/lib/component/context/PreferencesContext.js +30 -5
- package/lib/component/elements/Button.js +1 -1
- package/lib/component/elements/ButtonToolTip.js +1 -1
- package/lib/component/elements/CheckBox.js +1 -1
- package/lib/component/elements/CloseButton.js +1 -1
- package/lib/component/elements/ColorInput.js +1 -1
- package/lib/component/elements/ContextMenu.js +1 -1
- package/lib/component/elements/DeleteButton.js +1 -1
- package/lib/component/elements/EditableColumn.d.ts +1 -1
- package/lib/component/elements/EditableColumn.js +1 -1
- package/lib/component/elements/Input.js +1 -1
- package/lib/component/elements/InputRange.js +1 -1
- package/lib/component/elements/IsotopesViewer.js +1 -1
- package/lib/component/elements/Label.js +1 -1
- package/lib/component/elements/Logo.js +1 -1
- package/lib/component/elements/MenuButton.js +3 -3
- package/lib/component/elements/MolecularFormulaInput.js +1 -1
- package/lib/component/elements/MoleculeSelection.js +1 -1
- package/lib/component/elements/NextPrev.js +2 -2
- package/lib/component/elements/NumberInput.js +1 -1
- package/lib/component/elements/ReactTable/Elements/ReactTableHeader.js +1 -1
- package/lib/component/elements/ReactTable/ReactTable.js +3 -3
- package/lib/component/elements/ReactTable/ReactTableExpandable.js +3 -3
- package/lib/component/elements/ReactTable/ReactTableFlexLayout.js +2 -2
- package/lib/component/elements/SaveButton.js +1 -1
- package/lib/component/elements/Select.js +1 -1
- package/lib/component/elements/Tab/DeleteButton.js +1 -1
- package/lib/component/elements/Tab/Tab.js +3 -3
- package/lib/component/elements/Tab/Tabs.js +2 -2
- package/lib/component/elements/Table/Table.js +1 -1
- package/lib/component/elements/Table/TableBody.js +1 -1
- package/lib/component/elements/Table/TableCell.js +1 -1
- package/lib/component/elements/Table/TableHead.js +1 -1
- package/lib/component/elements/Table/TableRow.js +1 -1
- package/lib/component/elements/ToggleButton.js +1 -1
- package/lib/component/elements/ToolTip/ToolTip.js +2 -2
- package/lib/component/elements/ToolbarMenu.js +3 -3
- package/lib/component/elements/accordion/Accordion.js +1 -1
- package/lib/component/elements/accordion/AccordionItem.js +2 -2
- package/lib/component/elements/dropDownButton/DropDownButton.d.ts +20 -1
- package/lib/component/elements/dropDownButton/DropDownButton.js +32 -34
- package/lib/component/elements/dropDownButton/DropDownList.d.ts +2 -9
- package/lib/component/elements/dropDownButton/DropDownList.js +39 -25
- package/lib/component/elements/formik/ErrorMessage.js +2 -2
- package/lib/component/elements/formik/FormikCheckBox.d.ts +1 -0
- package/lib/component/elements/formik/FormikCheckBox.js +2 -2
- package/lib/component/elements/formik/FormikColorInput.js +1 -1
- package/lib/component/elements/formik/FormikColorPicker.js +1 -1
- package/lib/component/elements/formik/FormikColumnFormatField.js +2 -2
- package/lib/component/elements/formik/FormikErrorsSummary.js +2 -2
- package/lib/component/elements/formik/FormikForm.js +1 -1
- package/lib/component/elements/formik/FormikInput.js +1 -1
- package/lib/component/elements/formik/FormikNumberInput.js +1 -1
- package/lib/component/elements/formik/FormikSelect.js +1 -1
- package/lib/component/elements/formik/FormikSlider.js +1 -1
- package/lib/component/elements/formik/FormikTextarea.js +1 -1
- package/lib/component/elements/formik/Input.js +1 -1
- package/lib/component/elements/formik/SelectBox.js +1 -1
- package/lib/component/elements/linearAxis/LinearVerticalAxis.js +3 -3
- package/lib/component/elements/popup/Alert/ProgressIndicator.js +1 -1
- package/lib/component/elements/popup/Alert/Provider.js +3 -3
- 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/popup/Modal/Provider.js +3 -3
- package/lib/component/elements/popup/Transition.js +1 -1
- package/lib/component/elements/popup/Wrapper.js +1 -1
- package/lib/component/elements/toggle/ToggleButton.js +1 -1
- package/lib/component/elements/toggle/ToggleButtonGroup.js +1 -1
- package/lib/component/header/AutoPeakPickingOptionPanel.js +3 -3
- package/lib/component/header/BaseLineCorrectionPanel.js +1 -1
- package/lib/component/header/Header.js +30 -20
- package/lib/component/header/ManualPhaseCorrectionPanel.js +2 -2
- package/lib/component/header/RangesPickingOptionPanel.js +2 -2
- package/lib/component/header/ZeroFillingOptionsPanel.js +1 -1
- package/lib/component/header/Zones2DOptionPanel.js +1 -1
- package/lib/component/highlight/index.js +1 -1
- package/lib/component/hooks/useActiveSpectrumStyleOptions.js +1 -1
- package/lib/component/hooks/useCheckExperimentalFeature.js +5 -4
- package/lib/component/hooks/useCheckToolsVisibility.js +1 -1
- package/lib/component/hooks/useExport.js +15 -13
- package/lib/component/{1d/utilities → hooks}/useIntegralPath.d.ts +0 -0
- package/lib/component/hooks/useIntegralPath.js +53 -0
- package/lib/component/hooks/useTableSortBy.d.ts +2 -1
- package/lib/component/hooks/useTableSortBy.js +27 -16
- package/lib/component/hooks/useToolsFunctions.js +4 -5
- package/lib/component/hooks/useXScale.d.ts +2 -0
- package/lib/component/hooks/useXScale.js +7 -0
- package/lib/component/loader/DefaultSpinnerComponent.js +1 -1
- package/lib/component/loader/DropZone.js +2 -2
- package/lib/component/loader/NoData.js +1 -3
- package/lib/component/loader/Spinner.js +1 -1
- package/lib/component/loader/SpinnerContext.js +1 -1
- package/lib/component/modal/AboutUsModal.js +4 -4
- package/lib/component/modal/AlignSpectraModal.js +1 -1
- package/lib/component/modal/CopyClipboardModal.js +2 -2
- package/lib/component/modal/ExportAsMatrixModal.js +1 -1
- package/lib/component/modal/ImportPublicationStringModal.js +13 -11
- package/lib/component/modal/LoadJCAMPModal.js +1 -1
- package/lib/component/modal/ModalStyle.js +1 -1
- package/lib/component/modal/MoleculeStructureEditorModal.js +1 -1
- package/lib/component/modal/MultipleSpectraFiltersModal/EquallySpacedFilter.js +1 -1
- package/lib/component/modal/MultipleSpectraFiltersModal/FromToFilter.js +1 -1
- package/lib/component/modal/MultipleSpectraFiltersModal/index.js +4 -4
- package/lib/component/modal/MultipletAnalysisModal.js +5 -5
- package/lib/component/modal/PredictSpectraModal.d.ts +0 -28
- package/lib/component/modal/PredictSpectraModal.js +31 -54
- package/lib/component/modal/SaveAsModal.js +2 -2
- package/lib/component/modal/changeSum/ChangeSumModal.js +8 -7
- package/lib/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib/component/modal/editRange/EditRangeModal.d.ts +2 -1
- package/lib/component/modal/editRange/EditRangeModal.js +13 -9
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +33 -40
- package/lib/component/modal/editRange/forms/components/CouplingsTable.js +5 -5
- package/lib/component/modal/editRange/forms/components/DeltaInput.js +3 -3
- package/lib/component/modal/editRange/forms/components/SignalFormTab.js +1 -1
- package/lib/component/modal/editRange/forms/components/SignalsForm.js +5 -5
- package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js +1 -1
- package/lib/component/modal/editZone/EditPathLengthFormik.d.ts +5 -0
- package/lib/component/modal/editZone/EditPathLengthFormik.js +72 -0
- package/lib/component/modal/editZone/EditZoneModal.d.ts +8 -0
- package/lib/component/modal/editZone/EditZoneModal.js +98 -0
- package/lib/component/modal/editZone/SignalFormTab.d.ts +6 -0
- package/lib/component/modal/editZone/SignalFormTab.js +6 -0
- package/lib/component/modal/editZone/SignalsForm.d.ts +2 -0
- package/lib/component/modal/editZone/SignalsForm.js +62 -0
- package/lib/component/modal/editZone/validation/EditZoneValidation.d.ts +534 -0
- package/lib/component/modal/editZone/validation/EditZoneValidation.js +17 -0
- package/lib/component/modal/editZone/validation/isDefaultPathLength.d.ts +3 -0
- package/lib/component/modal/editZone/validation/isDefaultPathLength.js +7 -0
- package/lib/component/modal/setting/ControllersTabContent.js +1 -1
- package/lib/component/modal/setting/DisplayTabContent.d.ts +2 -2
- package/lib/component/modal/setting/DisplayTabContent.js +52 -14
- package/lib/component/modal/setting/FormattingTabContent.js +3 -3
- package/lib/component/modal/setting/GeneralSettings.d.ts +1 -2
- package/lib/component/modal/setting/GeneralSettings.js +69 -76
- package/lib/component/modal/setting/WorkspaceItem.d.ts +6 -0
- package/lib/component/modal/setting/WorkspaceItem.js +59 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.d.ts +2 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.js +13 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.d.ts +7 -0
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +38 -0
- package/lib/component/panels/InformationPanel.js +4 -4
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +4 -4
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +6 -6
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +5 -6
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +3 -3
- package/lib/component/panels/MoleculesPanel/MoleculePanel.d.ts +10 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +28 -18
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.d.ts +9 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +7 -7
- package/lib/component/panels/MultipleSpectraAnalysisPanel/ColumnHeader.js +1 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleAnalysisCodeEditor.js +2 -2
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +16 -14
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +3 -3
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +5 -5
- package/lib/component/panels/Panels.d.ts +1 -1
- package/lib/component/panels/Panels.js +60 -45
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +2 -2
- package/lib/component/panels/PeaksPanel/PeaksPreferences.js +4 -5
- package/lib/component/panels/PeaksPanel/PeaksTable.js +4 -4
- package/lib/component/panels/RangesPanel/RangesHeader.js +16 -14
- package/lib/component/panels/RangesPanel/RangesPanel.js +5 -6
- package/lib/component/panels/RangesPanel/RangesPreferences.js +4 -5
- package/lib/component/panels/RangesPanel/RangesTable.js +3 -3
- package/lib/component/panels/RangesPanel/RangesTableRow.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/AbsoluteColumn.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.d.ts +2 -6
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.js +6 -66
- package/lib/component/panels/RangesPanel/TableColumns/CouplingColumn.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -2
- package/lib/component/panels/RangesPanel/TableColumns/RangeColumn.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +2 -2
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.d.ts +7 -0
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +74 -0
- package/lib/component/panels/RangesPanel/hooks/useMapRanges.d.ts +7 -0
- package/lib/component/panels/RangesPanel/{useMapRanges.js → hooks/useMapRanges.js} +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +12 -10
- package/lib/component/panels/SpectrumsPanel/SpectrumListItem.js +4 -4
- package/lib/component/panels/SpectrumsPanel/SpectrumListPanel.js +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +13 -11
- package/lib/component/panels/SpectrumsPanel/base/ColorIndicator.js +3 -3
- package/lib/component/panels/SpectrumsPanel/base/ShowHideMarkersButton.js +1 -1
- package/lib/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -3
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.js +5 -5
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +1 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.js +5 -5
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +1 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +10 -5
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +11 -6
- package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.d.ts +1 -6
- package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.js +1 -7
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.d.ts +2 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +5 -6
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.d.ts +2 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +23 -27
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/Confirmation.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +24 -30
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.d.ts +8 -0
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +89 -0
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.d.ts +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +2 -2
- package/lib/component/panels/SummaryPanel/Overview.js +2 -2
- package/lib/component/panels/SummaryPanel/SetMolecularFormulaModal.js +1 -1
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js +2 -2
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +42 -45
- package/lib/component/panels/SummaryPanel/utilities/IsInView.d.ts +6 -0
- package/lib/component/panels/SummaryPanel/utilities/IsInView.js +16 -0
- package/lib/component/panels/SummaryPanel/utilities/Utilities.d.ts +29 -0
- package/lib/component/panels/SummaryPanel/{Utilities.js → utilities/Utilities.js} +155 -19
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.d.ts +1 -0
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +26 -3
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +1 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +3 -3
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +1 -1
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +13 -8
- package/lib/component/panels/ZonesPanel/ZonesPreferences.js +4 -5
- package/lib/component/panels/ZonesPanel/ZonesTable.d.ts +3 -2
- package/lib/component/panels/ZonesPanel/ZonesTable.js +7 -4
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js +1 -1
- package/lib/component/panels/databasePanel/DatabasePanel.js +3 -3
- package/lib/component/panels/databasePanel/DatabasePreferences.js +3 -4
- package/lib/component/panels/databasePanel/DatabaseTable.js +4 -4
- package/lib/component/panels/extra/placeholder/NoTableData.js +1 -1
- package/lib/component/panels/filtersPanel/FilterPanel.js +2 -2
- package/lib/component/panels/filtersPanel/FiltersTable.js +19 -15
- package/lib/component/panels/header/DefaultPanelHeader.js +2 -2
- package/lib/component/panels/header/PreferencesHeader.js +1 -1
- package/lib/component/panels/predictionPanel/PredictionOptions.d.ts +6 -0
- package/lib/component/panels/predictionPanel/PredictionOptions.js +90 -0
- package/lib/component/panels/predictionPanel/PredictionPanel.d.ts +2 -0
- package/lib/component/panels/predictionPanel/PredictionPanel.js +35 -0
- package/lib/component/reducer/IgnoreActions.js +2 -1
- package/lib/component/reducer/Reducer.d.ts +16 -23
- package/lib/component/reducer/Reducer.js +14 -11
- package/lib/component/reducer/actions/DatabaseActions.js +1 -1
- package/lib/component/reducer/actions/DomainActions.d.ts +3 -1
- package/lib/component/reducer/actions/DomainActions.js +20 -1
- package/lib/component/reducer/actions/FiltersActions.js +1 -1
- package/lib/component/reducer/actions/IntegralsActions.js +2 -0
- package/lib/component/reducer/actions/LoadActions.d.ts +2 -2
- package/lib/component/reducer/actions/LoadActions.js +42 -9
- package/lib/component/reducer/actions/MoleculeActions.js +5 -1
- package/lib/component/reducer/actions/PreferencesActions.js +0 -2
- package/lib/component/reducer/actions/RangesActions.js +3 -1
- package/lib/component/reducer/actions/SpectrumsActions.js +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +31 -27
- package/lib/component/reducer/actions/ZonesActions.d.ts +3 -1
- package/lib/component/reducer/actions/ZonesActions.js +33 -2
- package/lib/component/reducer/helper/Zoom1DManager.d.ts +17 -21
- package/lib/component/reducer/helper/Zoom1DManager.js +53 -69
- package/lib/component/reducer/preferencesReducer.d.ts +182 -42
- package/lib/component/reducer/preferencesReducer.js +198 -80
- package/lib/component/reducer/types/Types.d.ts +9 -1
- package/lib/component/reducer/types/Types.js +3 -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/toolbar/BasicToolBar.js +23 -27
- package/lib/component/toolbar/FunctionToolBar.js +17 -18
- package/lib/component/toolbar/HistoryToolBar.js +1 -1
- package/lib/component/toolbar/ToolBar.js +2 -2
- package/lib/component/utility/FormatNumber.js +1 -1
- package/lib/component/workspaces/Workspace.d.ts +17 -0
- package/lib/component/workspaces/basic.js +29 -33
- package/lib/component/workspaces/exercise.d.ts +2 -0
- package/lib/component/workspaces/exercise.js +49 -0
- package/lib/component/workspaces/index.d.ts +3 -2
- package/lib/component/workspaces/index.js +3 -2
- package/lib/component/workspaces/prediction.d.ts +2 -0
- package/lib/component/workspaces/prediction.js +26 -0
- package/lib/component/workspaces/process1D.js +21 -31
- package/lib/data/PredictionManager.d.ts +36 -3
- package/lib/data/PredictionManager.js +62 -17
- package/lib/data/constants/DefaultPathLengths.d.ts +6 -0
- package/lib/data/constants/DefaultPathLengths.js +8 -0
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.d.ts +2 -0
- package/lib/data/data1d/Spectrum1D/getSpectrumErrorValue.js +4 -0
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +11 -20
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +11 -0
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +11 -0
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +2 -21
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +9 -0
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js +7 -0
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.d.ts +2 -0
- package/lib/data/data1d/Spectrum1D/peaks/mapPeaks.js +29 -0
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +13 -0
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js +14 -0
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +13 -8
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +2 -3
- package/lib/data/utilities/getAtom.js +1 -1
- package/lib/data/utilities/getColor.d.ts +1 -0
- package/lib/data/utilities/getColor.js +1 -1
- package/lib/types/PanelPreferencesType.d.ts +10 -0
- package/lib/types/PanelPreferencesType.js +1 -0
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/Chart1D.js +1 -1
- package/lib-cjs/component/1d/ExclusionZoneAnnotation.js +1 -1
- package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +8 -5
- package/lib-cjs/component/1d/FooterBanner.js +7 -8
- package/lib-cjs/component/1d/Integral.js +3 -8
- package/lib-cjs/component/1d/IntegralResizable.js +1 -1
- package/lib-cjs/component/1d/IntegralsSeries.js +2 -2
- package/lib-cjs/component/1d/Line.js +5 -1
- package/lib-cjs/component/1d/LinesSeries.js +1 -1
- package/lib-cjs/component/1d/PeakAnnotation.js +3 -3
- package/lib-cjs/component/1d/PeakAnnotations.js +1 -1
- package/lib-cjs/component/1d/Resizable.js +2 -2
- package/lib-cjs/component/1d/ResurrectedDatabaseRanges.js +1 -1
- package/lib-cjs/component/1d/SpectraTracker.js +3 -3
- package/lib-cjs/component/1d/Viewer1D.js +14 -10
- package/lib-cjs/component/1d/XAxis.js +6 -2
- package/lib-cjs/component/1d/YAxis.js +6 -2
- package/lib-cjs/component/1d/jCouplingGraph/JGraph.js +3 -4
- package/lib-cjs/component/1d/jCouplingGraph/JGraphVerticalAxis.js +1 -1
- package/lib-cjs/component/1d/jCouplingGraph/JsCoupling.js +1 -1
- package/lib-cjs/component/1d/jCouplingGraph/JsCouplingLinks.js +1 -1
- package/lib-cjs/component/1d/jCouplingGraph/JsCouplings.js +2 -2
- package/lib-cjs/component/1d/multiAnalysis/AnalysisRange.js +1 -1
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +2 -2
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +3 -3
- package/lib-cjs/component/1d/multiplicityTree/TempMultiplicityTree.js +1 -1
- package/lib-cjs/component/1d/multiplicityTree/TreeNodes.js +2 -2
- package/lib-cjs/component/1d/ranges/Range.js +2 -2
- package/lib-cjs/component/1d/ranges/RangeIntegral.js +2 -6
- package/lib-cjs/component/1d/ranges/Ranges.js +2 -2
- package/lib-cjs/component/1d/tool/BaseLineZones.js +1 -1
- package/lib-cjs/component/1d/tool/PeakPointer.js +1 -1
- package/lib-cjs/component/1d/tool/VerticalIndicator.js +1 -1
- package/lib-cjs/component/1d/tool/XLabelPointer.js +1 -1
- package/lib-cjs/component/1d/utilities/scale.js +7 -6
- package/lib-cjs/component/2d/Chart2D.js +2 -2
- package/lib-cjs/component/2d/Contours.js +6 -6
- package/lib-cjs/component/2d/FooterBanner.js +3 -3
- package/lib-cjs/component/2d/Left1DChart.js +6 -2
- package/lib-cjs/component/2d/SignalDeltaLine.js +1 -1
- package/lib-cjs/component/2d/Top1DChart.js +6 -2
- package/lib-cjs/component/2d/Viewer2D.js +12 -8
- package/lib-cjs/component/2d/XAxis.js +6 -2
- package/lib-cjs/component/2d/YAxis.js +6 -2
- package/lib-cjs/component/2d/tools/XYLabelPointer.js +1 -1
- package/lib-cjs/component/2d/tools/slicing/HorizontalSliceChart.js +6 -2
- package/lib-cjs/component/2d/tools/slicing/SlicingView.js +1 -1
- package/lib-cjs/component/2d/tools/slicing/VerticalSliceChart.js +6 -2
- package/lib-cjs/component/2d/zones/IndicationLines.js +1 -1
- package/lib-cjs/component/2d/zones/Signal.js +2 -2
- package/lib-cjs/component/2d/zones/SignalCrosshair.js +1 -1
- package/lib-cjs/component/2d/zones/Zone.js +1 -1
- package/lib-cjs/component/2d/zones/Zones.js +2 -2
- package/lib-cjs/component/ErrorOverlay.js +1 -1
- package/lib-cjs/component/EventsTrackers/BrushTracker.js +1 -1
- package/lib-cjs/component/EventsTrackers/MouseTracker.js +1 -1
- package/lib-cjs/component/NMRium.js +14 -17
- package/lib-cjs/component/assignment/index.js +1 -1
- package/lib-cjs/component/context/PreferencesContext.js +33 -4
- package/lib-cjs/component/elements/Button.js +1 -1
- package/lib-cjs/component/elements/ButtonToolTip.js +1 -1
- package/lib-cjs/component/elements/CheckBox.js +1 -1
- package/lib-cjs/component/elements/CloseButton.js +1 -1
- package/lib-cjs/component/elements/ColorInput.js +1 -1
- package/lib-cjs/component/elements/ContextMenu.js +1 -1
- package/lib-cjs/component/elements/DeleteButton.js +1 -1
- package/lib-cjs/component/elements/EditableColumn.js +1 -1
- package/lib-cjs/component/elements/Input.js +1 -1
- package/lib-cjs/component/elements/InputRange.js +1 -1
- package/lib-cjs/component/elements/IsotopesViewer.js +1 -1
- package/lib-cjs/component/elements/Label.js +1 -1
- package/lib-cjs/component/elements/Logo.js +1 -1
- package/lib-cjs/component/elements/MenuButton.js +3 -3
- package/lib-cjs/component/elements/MolecularFormulaInput.js +1 -1
- package/lib-cjs/component/elements/MoleculeSelection.js +1 -1
- package/lib-cjs/component/elements/NextPrev.js +2 -2
- package/lib-cjs/component/elements/NumberInput.js +1 -1
- package/lib-cjs/component/elements/ReactTable/Elements/ReactTableHeader.js +1 -1
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +8 -4
- package/lib-cjs/component/elements/ReactTable/ReactTableExpandable.js +3 -3
- package/lib-cjs/component/elements/ReactTable/ReactTableFlexLayout.js +2 -2
- package/lib-cjs/component/elements/SaveButton.js +1 -1
- package/lib-cjs/component/elements/Select.js +1 -1
- package/lib-cjs/component/elements/Tab/DeleteButton.js +1 -1
- package/lib-cjs/component/elements/Tab/Tab.js +3 -3
- package/lib-cjs/component/elements/Tab/Tabs.js +2 -2
- package/lib-cjs/component/elements/Table/Table.js +1 -1
- package/lib-cjs/component/elements/Table/TableBody.js +1 -1
- package/lib-cjs/component/elements/Table/TableCell.js +1 -1
- package/lib-cjs/component/elements/Table/TableHead.js +1 -1
- package/lib-cjs/component/elements/Table/TableRow.js +1 -1
- package/lib-cjs/component/elements/ToggleButton.js +1 -1
- package/lib-cjs/component/elements/ToolTip/ToolTip.js +2 -2
- package/lib-cjs/component/elements/ToolbarMenu.js +3 -3
- package/lib-cjs/component/elements/accordion/Accordion.js +1 -1
- package/lib-cjs/component/elements/accordion/AccordionItem.js +2 -2
- package/lib-cjs/component/elements/dropDownButton/DropDownButton.js +32 -34
- package/lib-cjs/component/elements/dropDownButton/DropDownList.js +39 -25
- package/lib-cjs/component/elements/formik/ErrorMessage.js +2 -2
- package/lib-cjs/component/elements/formik/FormikCheckBox.js +2 -2
- package/lib-cjs/component/elements/formik/FormikColorInput.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColorPicker.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +2 -2
- package/lib-cjs/component/elements/formik/FormikErrorsSummary.js +2 -2
- package/lib-cjs/component/elements/formik/FormikForm.js +1 -1
- package/lib-cjs/component/elements/formik/FormikInput.js +1 -1
- package/lib-cjs/component/elements/formik/FormikNumberInput.js +1 -1
- package/lib-cjs/component/elements/formik/FormikSelect.js +1 -1
- package/lib-cjs/component/elements/formik/FormikSlider.js +1 -1
- package/lib-cjs/component/elements/formik/FormikTextarea.js +1 -1
- package/lib-cjs/component/elements/formik/Input.js +1 -1
- package/lib-cjs/component/elements/formik/SelectBox.js +1 -1
- package/lib-cjs/component/elements/linearAxis/LinearVerticalAxis.js +3 -3
- package/lib-cjs/component/elements/popup/Alert/ProgressIndicator.js +1 -1
- package/lib-cjs/component/elements/popup/Alert/Provider.js +3 -3
- 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/popup/Modal/Provider.js +3 -3
- package/lib-cjs/component/elements/popup/Transition.js +1 -1
- package/lib-cjs/component/elements/popup/Wrapper.js +1 -1
- package/lib-cjs/component/elements/toggle/ToggleButton.js +1 -1
- package/lib-cjs/component/elements/toggle/ToggleButtonGroup.js +1 -1
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +3 -3
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +6 -2
- package/lib-cjs/component/header/Header.js +29 -19
- package/lib-cjs/component/header/ManualPhaseCorrectionPanel.js +7 -3
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +2 -2
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +1 -1
- package/lib-cjs/component/header/Zones2DOptionPanel.js +1 -1
- package/lib-cjs/component/highlight/index.js +1 -1
- package/lib-cjs/component/hooks/useActiveSpectrumStyleOptions.js +1 -1
- package/lib-cjs/component/hooks/useCheckExperimentalFeature.js +5 -4
- package/lib-cjs/component/hooks/useCheckToolsVisibility.js +1 -1
- package/lib-cjs/component/hooks/useExport.js +15 -13
- package/lib-cjs/component/hooks/useIntegralPath.js +56 -0
- package/lib-cjs/component/hooks/useTableSortBy.js +27 -16
- package/lib-cjs/component/hooks/useToolsFunctions.js +4 -5
- package/lib-cjs/component/hooks/useXScale.js +11 -0
- package/lib-cjs/component/loader/DefaultSpinnerComponent.js +1 -1
- package/lib-cjs/component/loader/DropZone.js +2 -2
- package/lib-cjs/component/loader/NoData.js +1 -3
- package/lib-cjs/component/loader/Spinner.js +1 -1
- package/lib-cjs/component/loader/SpinnerContext.js +1 -1
- package/lib-cjs/component/modal/AboutUsModal.js +4 -4
- package/lib-cjs/component/modal/AlignSpectraModal.js +1 -1
- package/lib-cjs/component/modal/CopyClipboardModal.js +2 -2
- package/lib-cjs/component/modal/ExportAsMatrixModal.js +1 -1
- package/lib-cjs/component/modal/ImportPublicationStringModal.js +18 -12
- package/lib-cjs/component/modal/LoadJCAMPModal.js +1 -1
- package/lib-cjs/component/modal/ModalStyle.js +1 -1
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +1 -1
- package/lib-cjs/component/modal/MultipleSpectraFiltersModal/EquallySpacedFilter.js +1 -1
- package/lib-cjs/component/modal/MultipleSpectraFiltersModal/FromToFilter.js +1 -1
- package/lib-cjs/component/modal/MultipleSpectraFiltersModal/index.js +9 -5
- package/lib-cjs/component/modal/MultipletAnalysisModal.js +5 -5
- package/lib-cjs/component/modal/PredictSpectraModal.js +36 -55
- package/lib-cjs/component/modal/SaveAsModal.js +2 -2
- package/lib-cjs/component/modal/changeSum/ChangeSumModal.js +13 -8
- package/lib-cjs/component/modal/changeSum/SelectMolecule.js +1 -1
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +13 -9
- package/lib-cjs/component/modal/editRange/forms/components/AddSignalFormTab.js +38 -41
- package/lib-cjs/component/modal/editRange/forms/components/CouplingsTable.js +5 -5
- package/lib-cjs/component/modal/editRange/forms/components/DeltaInput.js +3 -3
- package/lib-cjs/component/modal/editRange/forms/components/SignalFormTab.js +1 -1
- package/lib-cjs/component/modal/editRange/forms/components/SignalsForm.js +5 -5
- package/lib-cjs/component/modal/editRange/forms/validation/EditRangeValidation.js +6 -2
- package/lib-cjs/component/modal/editZone/EditPathLengthFormik.js +77 -0
- package/lib-cjs/component/modal/editZone/EditZoneModal.js +103 -0
- package/lib-cjs/component/modal/editZone/SignalFormTab.js +11 -0
- package/lib-cjs/component/modal/editZone/SignalsForm.js +67 -0
- package/lib-cjs/component/modal/editZone/validation/EditZoneValidation.js +42 -0
- package/lib-cjs/component/modal/editZone/validation/isDefaultPathLength.js +12 -0
- package/lib-cjs/component/modal/setting/ControllersTabContent.js +1 -1
- package/lib-cjs/component/modal/setting/DisplayTabContent.js +51 -13
- package/lib-cjs/component/modal/setting/FormattingTabContent.js +3 -3
- package/lib-cjs/component/modal/setting/GeneralSettings.js +72 -75
- package/lib-cjs/component/modal/setting/WorkspaceItem.js +64 -0
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignment.js +18 -0
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +43 -0
- package/lib-cjs/component/panels/InformationPanel.js +4 -4
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +4 -4
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +6 -6
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +5 -6
- package/lib-cjs/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +3 -3
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +28 -18
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +7 -7
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/ColumnHeader.js +1 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleAnalysisCodeEditor.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +16 -14
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +8 -4
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +5 -5
- package/lib-cjs/component/panels/Panels.js +61 -46
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +2 -2
- package/lib-cjs/component/panels/PeaksPanel/PeaksPreferences.js +4 -5
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +9 -5
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +16 -14
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +5 -6
- package/lib-cjs/component/panels/RangesPanel/RangesPreferences.js +4 -5
- package/lib-cjs/component/panels/RangesPanel/RangesTable.js +3 -3
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/TableColumns/AbsoluteColumn.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/TableColumns/ActionsColumn.js +5 -65
- package/lib-cjs/component/panels/RangesPanel/TableColumns/CouplingColumn.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeColumn.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +80 -0
- package/lib-cjs/component/panels/RangesPanel/{useMapRanges.js → hooks/useMapRanges.js} +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +12 -10
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumListItem.js +4 -4
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumListPanel.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +13 -11
- package/lib-cjs/component/panels/SpectrumsPanel/base/ColorIndicator.js +3 -3
- package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideMarkersButton.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +3 -3
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.js +5 -5
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.js +5 -5
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +10 -5
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +11 -6
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/Constants.js +1 -8
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +5 -6
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +23 -27
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/Confirmation.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +47 -30
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +94 -0
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/Overview.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/SetMolecularFormulaModal.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/SetShiftTolerancesModal.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +41 -44
- package/lib-cjs/component/panels/SummaryPanel/utilities/IsInView.js +18 -0
- package/lib-cjs/component/panels/SummaryPanel/{Utilities.js → utilities/Utilities.js} +157 -19
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +24 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +3 -3
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +1 -1
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +13 -8
- package/lib-cjs/component/panels/ZonesPanel/ZonesPreferences.js +4 -5
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +7 -4
- package/lib-cjs/component/panels/ZonesPanel/ZonesTableRow.js +1 -1
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +3 -3
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +3 -4
- package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +4 -4
- package/lib-cjs/component/panels/extra/placeholder/NoTableData.js +1 -1
- package/lib-cjs/component/panels/filtersPanel/FilterPanel.js +2 -2
- package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +19 -15
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +2 -2
- package/lib-cjs/component/panels/header/PreferencesHeader.js +1 -1
- package/lib-cjs/component/panels/predictionPanel/PredictionOptions.js +118 -0
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +41 -0
- package/lib-cjs/component/reducer/IgnoreActions.js +7 -2
- package/lib-cjs/component/reducer/Reducer.js +21 -13
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +2 -2
- package/lib-cjs/component/reducer/actions/DomainActions.js +21 -1
- package/lib-cjs/component/reducer/actions/FiltersActions.js +6 -2
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +2 -0
- package/lib-cjs/component/reducer/actions/LoadActions.js +47 -10
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +10 -2
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +0 -2
- package/lib-cjs/component/reducer/actions/RangesActions.js +7 -1
- package/lib-cjs/component/reducer/actions/SpectraAnalysisAction.js +5 -1
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +7 -3
- package/lib-cjs/component/reducer/actions/ToolsActions.js +43 -35
- package/lib-cjs/component/reducer/actions/ZonesActions.js +40 -3
- package/lib-cjs/component/reducer/helper/Zoom1DManager.js +55 -73
- package/lib-cjs/component/reducer/preferencesReducer.js +197 -78
- package/lib-cjs/component/reducer/types/Types.js +6 -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/toolbar/BasicToolBar.js +23 -27
- package/lib-cjs/component/toolbar/FunctionToolBar.js +22 -19
- package/lib-cjs/component/toolbar/HistoryToolBar.js +1 -1
- package/lib-cjs/component/toolbar/ToolBar.js +2 -2
- package/lib-cjs/component/toolbar/ToolTypes.js +5 -1
- package/lib-cjs/component/utility/FormatNumber.js +1 -1
- package/lib-cjs/component/workspaces/basic.js +29 -33
- package/lib-cjs/component/workspaces/exercise.js +52 -0
- package/lib-cjs/component/workspaces/index.js +3 -2
- package/lib-cjs/component/workspaces/prediction.js +29 -0
- package/lib-cjs/component/workspaces/process1D.js +21 -31
- package/lib-cjs/data/Filters.js +5 -1
- package/lib-cjs/data/FiltersManager.js +5 -1
- package/lib-cjs/data/PredictionManager.js +62 -17
- package/lib-cjs/data/SpectraManager.js +5 -1
- package/lib-cjs/data/constants/DefaultPathLengths.js +10 -0
- package/lib-cjs/data/data1d/Spectrum1D/getSpectrumErrorValue.js +8 -0
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +16 -21
- package/lib-cjs/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +18 -0
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +2 -21
- package/lib-cjs/data/data1d/Spectrum1D/peaks/initiatePeaks.js +14 -0
- package/lib-cjs/data/data1d/Spectrum1D/peaks/mapPeaks.js +36 -0
- package/lib-cjs/data/data1d/Spectrum1D/ranges/initiateRanges.js +21 -0
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +13 -8
- package/lib-cjs/data/data1d/Spectrum1D/shift/getShiftX.js +5 -1
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +7 -4
- package/lib-cjs/data/data2d/Spectrum2D/shift/getShift.js +5 -1
- package/lib-cjs/data/utilities/getAtom.js +1 -1
- package/lib-cjs/data/utilities/getColor.js +2 -1
- package/lib-cjs/types/PanelPreferencesType.js +2 -0
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +21 -21
- package/lib/component/1d/utilities/useIntegralPath.js +0 -63
- package/lib/component/panels/RangesPanel/useMapRanges.d.ts +0 -6
- package/lib/component/panels/SummaryPanel/Utilities.d.ts +0 -25
- package/lib/component/reducer/actions/Zoom.d.ts +0 -16
- package/lib/component/reducer/actions/Zoom.js +0 -92
- package/lib/component/workspaces/exercise1D.d.ts +0 -2
- package/lib/component/workspaces/exercise1D.js +0 -45
- package/lib-cjs/component/1d/utilities/useIntegralPath.js +0 -66
- package/lib-cjs/component/reducer/actions/Zoom.js +0 -116
- package/lib-cjs/component/workspaces/exercise1D.js +0 -48
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -23,11 +27,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
27
|
};
|
|
24
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
29
|
exports.initiateDatum1D = void 0;
|
|
26
|
-
const merge_1 = __importDefault(require("lodash/merge"));
|
|
27
30
|
const FiltersTypes = __importStar(require("../../Filters"));
|
|
28
31
|
const FiltersManager = __importStar(require("../../FiltersManager"));
|
|
29
32
|
const generateID_1 = __importDefault(require("../../utilities/generateID"));
|
|
30
33
|
const getColor_1 = __importDefault(require("../../utilities/getColor"));
|
|
34
|
+
const initiateIntegrals_1 = require("./integrals/initiateIntegrals");
|
|
35
|
+
const initiatePeaks_1 = require("./peaks/initiatePeaks");
|
|
36
|
+
const initiateRanges_1 = require("./ranges/initiateRanges");
|
|
31
37
|
function initiateDatum1D(options, usedColors = {}) {
|
|
32
38
|
const datum = {};
|
|
33
39
|
datum.id = options.id || (0, generateID_1.default)();
|
|
@@ -60,27 +66,13 @@ function initiateDatum1D(options, usedColors = {}) {
|
|
|
60
66
|
im: [],
|
|
61
67
|
}, options.data);
|
|
62
68
|
datum.originalData = datum.data;
|
|
63
|
-
datum.
|
|
69
|
+
datum.filters = Object.assign([], options.filters); //array of object {name: "FilterName", options: FilterOptions = {value | object} }
|
|
70
|
+
datum.peaks = (0, initiatePeaks_1.initiatePeaks)(options, datum);
|
|
64
71
|
// array of object {index: xIndex, xShift}
|
|
65
72
|
// in case the peak does not exactly correspond to the point value
|
|
66
73
|
// we can think about a second attributed `xShift`
|
|
67
|
-
datum.integrals = (0,
|
|
68
|
-
|
|
69
|
-
options: {
|
|
70
|
-
sum: undefined,
|
|
71
|
-
isSumConstant: true,
|
|
72
|
-
sumAuto: true,
|
|
73
|
-
},
|
|
74
|
-
}, options.integrals); // array of object (from: xIndex, to: xIndex)
|
|
75
|
-
datum.filters = Object.assign([], options.filters); //array of object {name: "FilterName", options: FilterOptions = {value | object} }
|
|
76
|
-
datum.ranges = (0, merge_1.default)({
|
|
77
|
-
values: [],
|
|
78
|
-
options: {
|
|
79
|
-
sum: undefined,
|
|
80
|
-
isSumConstant: true,
|
|
81
|
-
sumAuto: true,
|
|
82
|
-
},
|
|
83
|
-
}, options.ranges);
|
|
74
|
+
datum.integrals = (0, initiateIntegrals_1.initiateIntegrals)(options); // array of object (from: xIndex, to: xIndex)
|
|
75
|
+
datum.ranges = (0, initiateRanges_1.initiateRanges)(options, datum);
|
|
84
76
|
//reapply filters after load the original data
|
|
85
77
|
FiltersManager.reapplyFilters(datum);
|
|
86
78
|
preprocessing(datum);
|
|
@@ -89,9 +81,12 @@ function initiateDatum1D(options, usedColors = {}) {
|
|
|
89
81
|
exports.initiateDatum1D = initiateDatum1D;
|
|
90
82
|
function getColor(options, usedColors) {
|
|
91
83
|
let color = 'black';
|
|
92
|
-
if (options
|
|
84
|
+
if (options?.display?.color === undefined) {
|
|
93
85
|
color = (0, getColor_1.default)(false, usedColors['1d'] || []);
|
|
94
86
|
}
|
|
87
|
+
else {
|
|
88
|
+
color = options.display.color;
|
|
89
|
+
}
|
|
95
90
|
if (usedColors['1d']) {
|
|
96
91
|
usedColors['1d'].push(color);
|
|
97
92
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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.initiateIntegrals = void 0;
|
|
7
|
+
const merge_1 = __importDefault(require("lodash/merge"));
|
|
8
|
+
function initiateIntegrals(options) {
|
|
9
|
+
return (0, merge_1.default)({
|
|
10
|
+
values: [],
|
|
11
|
+
options: {
|
|
12
|
+
sum: undefined,
|
|
13
|
+
isSumConstant: true,
|
|
14
|
+
sumAuto: true,
|
|
15
|
+
},
|
|
16
|
+
}, options.integrals);
|
|
17
|
+
}
|
|
18
|
+
exports.initiateIntegrals = initiateIntegrals;
|
|
@@ -6,14 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.autoPeakPicking = void 0;
|
|
7
7
|
const ml_array_median_1 = __importDefault(require("ml-array-median"));
|
|
8
8
|
const nmr_processing_1 = require("nmr-processing");
|
|
9
|
-
const
|
|
10
|
-
const getShiftX_1 = require("../shift/getShiftX");
|
|
9
|
+
const mapPeaks_1 = require("./mapPeaks");
|
|
11
10
|
function autoPeakPicking(datum1D, options) {
|
|
12
11
|
const { minMaxRatio, maxNumberOfPeaks, noiseFactor, lookNegative, windowFromIndex, windowToIndex, } = options;
|
|
13
12
|
// we calculate the noise but this could be improved
|
|
14
13
|
const noise = (0, ml_array_median_1.default)(datum1D.data.re.map((y) => Math.abs(y)));
|
|
15
14
|
let { re, x } = datum1D.data;
|
|
16
|
-
let { values: currentPeaks = [] } = datum1D.peaks || {};
|
|
17
15
|
if (windowFromIndex !== undefined && windowToIndex !== undefined) {
|
|
18
16
|
x = x.slice(windowFromIndex, windowToIndex);
|
|
19
17
|
re = re.slice(windowFromIndex, windowToIndex);
|
|
@@ -29,23 +27,6 @@ function autoPeakPicking(datum1D, options) {
|
|
|
29
27
|
peaks.sort((a, b) => b.y - a.y);
|
|
30
28
|
if (maxNumberOfPeaks < peaks.length)
|
|
31
29
|
peaks = peaks.slice(0, maxNumberOfPeaks);
|
|
32
|
-
|
|
33
|
-
const error = (x[x.length - 1] - x[0]) / 10000;
|
|
34
|
-
return peaks.reduce((acc, newPeak) => {
|
|
35
|
-
// check if the peak is already exists
|
|
36
|
-
for (const { x } of currentPeaks) {
|
|
37
|
-
if (Math.abs(newPeak.x - x) < error) {
|
|
38
|
-
return acc;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
acc.push({
|
|
42
|
-
id: (0, generateID_1.default)(),
|
|
43
|
-
originalX: newPeak.x - shiftX,
|
|
44
|
-
x: newPeak.x,
|
|
45
|
-
y: newPeak.y,
|
|
46
|
-
width: newPeak.width,
|
|
47
|
-
});
|
|
48
|
-
return acc;
|
|
49
|
-
}, []);
|
|
30
|
+
return (0, mapPeaks_1.mapPeaks)(peaks, datum1D);
|
|
50
31
|
}
|
|
51
32
|
exports.autoPeakPicking = autoPeakPicking;
|
|
@@ -0,0 +1,14 @@
|
|
|
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.initiatePeaks = void 0;
|
|
7
|
+
const merge_1 = __importDefault(require("lodash/merge"));
|
|
8
|
+
const mapPeaks_1 = require("./mapPeaks");
|
|
9
|
+
function initiatePeaks(options, datum) {
|
|
10
|
+
return (0, merge_1.default)({ values: [], options: {} }, options.peaks, {
|
|
11
|
+
values: (0, mapPeaks_1.mapPeaks)(options?.peaks?.values || [], datum),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
exports.initiatePeaks = initiatePeaks;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.mapPeaks = void 0;
|
|
7
|
+
const generateID_1 = __importDefault(require("../../../utilities/generateID"));
|
|
8
|
+
const getSpectrumErrorValue_1 = require("../getSpectrumErrorValue");
|
|
9
|
+
const getShiftX_1 = require("../shift/getShiftX");
|
|
10
|
+
function checkPeak(peak, datum, error) {
|
|
11
|
+
// check if the Peak is already exists
|
|
12
|
+
for (const { x } of datum.peaks?.values || []) {
|
|
13
|
+
if (Math.abs(peak.x - x) < error) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
function mapPeaks(peaks, datum) {
|
|
20
|
+
const shiftX = (0, getShiftX_1.getShiftX)(datum);
|
|
21
|
+
const error = (0, getSpectrumErrorValue_1.getSpectrumErrorValue)(datum);
|
|
22
|
+
return peaks.reduce((acc, newPeak) => {
|
|
23
|
+
// check if the peak is already exists
|
|
24
|
+
if (checkPeak(newPeak, datum, error))
|
|
25
|
+
return acc;
|
|
26
|
+
acc.push({
|
|
27
|
+
id: newPeak?.id || (0, generateID_1.default)(),
|
|
28
|
+
originalX: newPeak.x - shiftX,
|
|
29
|
+
x: newPeak.x,
|
|
30
|
+
y: newPeak.y,
|
|
31
|
+
width: newPeak.width,
|
|
32
|
+
});
|
|
33
|
+
return acc;
|
|
34
|
+
}, []);
|
|
35
|
+
}
|
|
36
|
+
exports.mapPeaks = mapPeaks;
|
|
@@ -0,0 +1,21 @@
|
|
|
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.initiateRanges = void 0;
|
|
7
|
+
const merge_1 = __importDefault(require("lodash/merge"));
|
|
8
|
+
const mapRanges_1 = require("./mapRanges");
|
|
9
|
+
function initiateRanges(options, datum) {
|
|
10
|
+
return (0, merge_1.default)({
|
|
11
|
+
values: [],
|
|
12
|
+
options: {
|
|
13
|
+
sum: undefined,
|
|
14
|
+
isSumConstant: true,
|
|
15
|
+
sumAuto: true,
|
|
16
|
+
},
|
|
17
|
+
}, options.ranges, {
|
|
18
|
+
values: (0, mapRanges_1.mapRanges)(options?.ranges?.values || [], datum),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
exports.initiateRanges = initiateRanges;
|
|
@@ -7,19 +7,24 @@ exports.mapRanges = void 0;
|
|
|
7
7
|
const ml_spectra_processing_1 = require("ml-spectra-processing");
|
|
8
8
|
const SignalsKinds_1 = require("../../../constants/SignalsKinds");
|
|
9
9
|
const generateID_1 = __importDefault(require("../../../utilities/generateID"));
|
|
10
|
+
const getSpectrumErrorValue_1 = require("../getSpectrumErrorValue");
|
|
10
11
|
const getShiftX_1 = require("../shift/getShiftX");
|
|
12
|
+
function checkRange(range, datum, error) {
|
|
13
|
+
// check if the range is already exists
|
|
14
|
+
for (const { from, to } of datum.ranges?.values || []) {
|
|
15
|
+
if (Math.abs(range.from - from) < error &&
|
|
16
|
+
Math.abs(range.to - to) < error) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
11
21
|
function mapRanges(ranges, datum) {
|
|
12
22
|
const { x, re } = datum.data;
|
|
13
23
|
const shiftX = (0, getShiftX_1.getShiftX)(datum);
|
|
14
|
-
const error = (
|
|
24
|
+
const error = (0, getSpectrumErrorValue_1.getSpectrumErrorValue)(datum);
|
|
15
25
|
return ranges.reduce((acc, newRange) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (Math.abs(newRange.from - from) < error &&
|
|
19
|
-
Math.abs(newRange.to - to) < error) {
|
|
20
|
-
return acc;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
26
|
+
if (checkRange(newRange, datum, error))
|
|
27
|
+
return acc;
|
|
23
28
|
const absolute = (0, ml_spectra_processing_1.xyIntegration)({ x, y: re }, { from: newRange.from, to: newRange.to, reverse: true });
|
|
24
29
|
const signals = newRange.signals.map((signal) => {
|
|
25
30
|
const { kind = null, id, ...resSignal } = signal;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -69,9 +73,8 @@ function initiateDatum2D(options, usedColors = {}) {
|
|
|
69
73
|
exports.initiateDatum2D = initiateDatum2D;
|
|
70
74
|
function getColor(options, usedColors) {
|
|
71
75
|
let color = { positiveColor: 'red', negativeColor: 'blue' };
|
|
72
|
-
if (options.
|
|
73
|
-
options
|
|
74
|
-
options.display.positiveColor === undefined) {
|
|
76
|
+
if (options?.display.negativeColor === undefined ||
|
|
77
|
+
options?.display?.positiveColor === undefined) {
|
|
75
78
|
color = (0, getColor_1.get2DColor)(options.info.experiment, usedColors['2d'] || []);
|
|
76
79
|
}
|
|
77
80
|
if (usedColors['2d']) {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.get2DColor = exports.COLORS = void 0;
|
|
3
|
+
exports.adjustAlpha = exports.get2DColor = exports.COLORS = void 0;
|
|
4
4
|
exports.COLORS = [
|
|
5
5
|
'#C10020',
|
|
6
6
|
'#007D34',
|
|
@@ -49,6 +49,7 @@ function percentToHex(p) {
|
|
|
49
49
|
function adjustAlpha(color, factor) {
|
|
50
50
|
return color + percentToHex(factor);
|
|
51
51
|
}
|
|
52
|
+
exports.adjustAlpha = adjustAlpha;
|
|
52
53
|
function getColor(isRandom = false, usedColors = [], opacity = 100) {
|
|
53
54
|
const resetColors = exports.COLORS.filter((c) => !usedColors.includes(c));
|
|
54
55
|
if (resetColors.length > 0 && !isRandom) {
|
package/lib-cjs/versionInfo.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nmrium",
|
|
3
3
|
"description": "React component to display and process nuclear magnetic resonance (NMR) spectra.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.24.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib-cjs/component/NMRium.js",
|
|
7
7
|
"module": "lib/component/NMRium.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"react-dom": ">=16.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@emotion/react": "^11.8.
|
|
48
|
+
"@emotion/react": "^11.8.2",
|
|
49
49
|
"analysis-ui-components": "^0.10.3",
|
|
50
50
|
"cheminfo-font": "^1.8.1",
|
|
51
51
|
"cheminfo-types": "^1.1.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"immer": "^9.0.12",
|
|
57
57
|
"jszip": "^3.7.1",
|
|
58
58
|
"lodash": "^4.17.21",
|
|
59
|
-
"mf-parser": "^1.4.
|
|
59
|
+
"mf-parser": "^1.4.5",
|
|
60
60
|
"ml-airpls": "^1.0.0",
|
|
61
61
|
"ml-array-max": "^1.2.4",
|
|
62
62
|
"ml-array-mean": "^1.1.6",
|
|
@@ -64,18 +64,18 @@
|
|
|
64
64
|
"ml-array-xy-equally-spaced": "^1.2.1",
|
|
65
65
|
"ml-baseline-correction-regression": "^1.0.0",
|
|
66
66
|
"ml-conrec": "^3.2.1",
|
|
67
|
-
"ml-gsd": "^10.
|
|
68
|
-
"ml-spectra-processing": "^11.
|
|
67
|
+
"ml-gsd": "^10.2.0",
|
|
68
|
+
"ml-spectra-processing": "^11.1.0",
|
|
69
69
|
"ml-stat": "^1.3.3",
|
|
70
70
|
"multiplet-analysis": "^2.0.0",
|
|
71
71
|
"nmr-correlation": "^2.2.5",
|
|
72
72
|
"nmr-parser": "^1.7.3",
|
|
73
|
-
"nmr-processing": "^7.
|
|
73
|
+
"nmr-processing": "^7.4.1",
|
|
74
74
|
"nmredata": "^0.6.1",
|
|
75
75
|
"numeral": "^2.0.6",
|
|
76
76
|
"openchemlib": "^7.4.3",
|
|
77
|
-
"openchemlib-utils": "^1.
|
|
78
|
-
"re-resizable": "^6.9.
|
|
77
|
+
"openchemlib-utils": "^1.10.0",
|
|
78
|
+
"re-resizable": "^6.9.5",
|
|
79
79
|
"react-color": "2.17.2",
|
|
80
80
|
"react-d3-utils": "^0.5.0",
|
|
81
81
|
"react-draggable": "^4.4.4",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"react-icons": "^4.3.1",
|
|
85
85
|
"react-inspector": "^5.1.1",
|
|
86
86
|
"react-mf": "^2.0.1",
|
|
87
|
-
"react-ocl": "^4.3.
|
|
87
|
+
"react-ocl": "^4.3.5",
|
|
88
88
|
"react-ocl-nmr": "^1.1.0",
|
|
89
89
|
"react-plot": "^0.16.0",
|
|
90
90
|
"react-rnd": "^10.3.5",
|
|
@@ -96,32 +96,32 @@
|
|
|
96
96
|
"yup": "^0.32.11"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
|
-
"@babel/plugin-transform-modules-commonjs": "^7.
|
|
99
|
+
"@babel/plugin-transform-modules-commonjs": "^7.17.7",
|
|
100
100
|
"@babel/preset-react": "^7.16.7",
|
|
101
101
|
"@babel/preset-typescript": "^7.16.7",
|
|
102
|
-
"@playwright/test": "^1.
|
|
102
|
+
"@playwright/test": "^1.20.1",
|
|
103
103
|
"@simbathesailor/use-what-changed": "^2.0.0",
|
|
104
104
|
"@types/d3": "^7.1.0",
|
|
105
105
|
"@types/jest": "^27.4.1",
|
|
106
|
-
"@types/node": "^17.0.
|
|
107
|
-
"@types/react": "^17.0.
|
|
108
|
-
"@types/react-dom": "^17.0.
|
|
106
|
+
"@types/node": "^17.0.23",
|
|
107
|
+
"@types/react": "^17.0.43",
|
|
108
|
+
"@types/react-dom": "^17.0.14",
|
|
109
109
|
"@types/react-router-dom": "^5.3.3",
|
|
110
110
|
"@vitejs/plugin-react": "^1.2.0",
|
|
111
|
-
"@zakodium/eslint-config": "^5.1.
|
|
111
|
+
"@zakodium/eslint-config": "^5.1.1",
|
|
112
112
|
"cross-env": "^7.0.3",
|
|
113
|
-
"eslint": "^8.
|
|
113
|
+
"eslint": "^8.11.0",
|
|
114
114
|
"jest": "^27.5.1",
|
|
115
115
|
"modern-normalize": "^1.1.0",
|
|
116
|
-
"prettier": "^2.
|
|
117
|
-
"rc-menu": "^9.
|
|
116
|
+
"prettier": "^2.6.1",
|
|
117
|
+
"rc-menu": "^9.5.1",
|
|
118
118
|
"react": "^17.0.2",
|
|
119
119
|
"react-dom": "^17.0.2",
|
|
120
120
|
"react-router-dom": "^5.3.0",
|
|
121
121
|
"rimraf": "^3.0.2",
|
|
122
122
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
123
123
|
"serve": "^13.0.2",
|
|
124
|
-
"typescript": "~4.
|
|
125
|
-
"vite": "^2.8.
|
|
124
|
+
"typescript": "~4.6.3",
|
|
125
|
+
"vite": "^2.8.6"
|
|
126
126
|
}
|
|
127
|
-
}
|
|
127
|
+
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { xyIntegral, xyReduce } from 'ml-spectra-processing';
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
|
-
import { useChartData } from '../../context/ChartContext';
|
|
4
|
-
import { useScale } from '../../context/ScaleContext';
|
|
5
|
-
import { PathBuilder } from '../../utility/PathBuilder';
|
|
6
|
-
import { getYScale, reScaleY } from './scale';
|
|
7
|
-
export default function useIntegralPath(integralOptions) {
|
|
8
|
-
const { xDomain, height, yDomain, margin, verticalAlign, data, activeSpectrum, zoom, } = useChartData();
|
|
9
|
-
const { scaleX } = useScale();
|
|
10
|
-
const scaleY = useMemo(() => {
|
|
11
|
-
const scale = zoom.integral.scales[activeSpectrum?.id || ''];
|
|
12
|
-
const scaledYDomain = reScaleY(scale === undefined ? 1 : scale < 0.1 ? 0.05 : scale, {
|
|
13
|
-
domain: [yDomain[0], yDomain[1] / 20],
|
|
14
|
-
height,
|
|
15
|
-
margin,
|
|
16
|
-
});
|
|
17
|
-
return getYScale({
|
|
18
|
-
height,
|
|
19
|
-
margin,
|
|
20
|
-
verticalAlign,
|
|
21
|
-
yDomain: scaledYDomain,
|
|
22
|
-
});
|
|
23
|
-
}, [
|
|
24
|
-
activeSpectrum?.id,
|
|
25
|
-
height,
|
|
26
|
-
margin,
|
|
27
|
-
verticalAlign,
|
|
28
|
-
yDomain,
|
|
29
|
-
zoom.integral.scales,
|
|
30
|
-
]);
|
|
31
|
-
const integral = useMemo(() => {
|
|
32
|
-
if (activeSpectrum) {
|
|
33
|
-
const { x, re } = data[activeSpectrum?.index].data;
|
|
34
|
-
const { from, to } = integralOptions;
|
|
35
|
-
return xyIntegral({ x, y: re }, {
|
|
36
|
-
from,
|
|
37
|
-
to,
|
|
38
|
-
reverse: true,
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
return { x: [], y: [] };
|
|
42
|
-
}, [activeSpectrum, data, integralOptions]);
|
|
43
|
-
const paths = useMemo(() => {
|
|
44
|
-
if (integral && scaleX) {
|
|
45
|
-
const xySeries = xyReduce(integral, {
|
|
46
|
-
from: xDomain[0],
|
|
47
|
-
to: xDomain[1],
|
|
48
|
-
nbPoints: 200,
|
|
49
|
-
optimize: true,
|
|
50
|
-
});
|
|
51
|
-
const pathBuilder = new PathBuilder();
|
|
52
|
-
pathBuilder.moveTo(scaleX()(xySeries.x[0]), scaleY(xySeries.y[0]));
|
|
53
|
-
for (let i = 1; i < xySeries.x.length; i++) {
|
|
54
|
-
pathBuilder.lineTo(scaleX()(xySeries.x[i]), scaleY(xySeries.y[i]));
|
|
55
|
-
}
|
|
56
|
-
return pathBuilder.toString();
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
return '';
|
|
60
|
-
}
|
|
61
|
-
}, [integral, scaleX, scaleY, xDomain]);
|
|
62
|
-
return paths;
|
|
63
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Link, Correlation } from 'nmr-correlation';
|
|
2
|
-
import { Datum2D } from '../../../data/types/data2d';
|
|
3
|
-
declare function getAtomType(nucleus: string): string;
|
|
4
|
-
declare function getLabelColor(correlationData: any, correlation: any): string | null;
|
|
5
|
-
declare function findSignalMatch1D(spectrum: Datum2D, link: Link, factor: number, xDomain0: number, xDomain1: number): boolean;
|
|
6
|
-
declare function findSignalMatch2D(spectrum: Datum2D, link: Link, factor: number, xDomain0: number, xDomain1: number, yDomain0: number, yDomain1: number): boolean;
|
|
7
|
-
declare function getAbbreviation(link: Link): string;
|
|
8
|
-
declare function buildNewLink1D(link: any): Link;
|
|
9
|
-
declare function buildNewLink2D(link: Link, axis: 'x' | 'y'): Link;
|
|
10
|
-
declare function cloneCorrelationAndEditLink(correlation: Correlation, link: Link, axis: 'x' | 'y', action: 'add' | 'remove' | 'unmove'): Correlation;
|
|
11
|
-
declare function getEditedCorrelations({ correlationDim1, correlationDim2, selectedCorrelationValueDim1, selectedCorrelationValueDim2, action, link, correlations, }: {
|
|
12
|
-
correlationDim1: any;
|
|
13
|
-
correlationDim2: any;
|
|
14
|
-
selectedCorrelationValueDim1: any;
|
|
15
|
-
selectedCorrelationValueDim2: any;
|
|
16
|
-
action: any;
|
|
17
|
-
link: any;
|
|
18
|
-
correlations: any;
|
|
19
|
-
}): {
|
|
20
|
-
editedCorrelations: Correlation[];
|
|
21
|
-
buildCorrelationDataOptions: {
|
|
22
|
-
skipDataUpdate?: boolean | undefined;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
export { buildNewLink1D, buildNewLink2D, cloneCorrelationAndEditLink, findSignalMatch1D, findSignalMatch2D, getAbbreviation, getAtomType, getEditedCorrelations, getLabelColor, };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Draft } from 'immer';
|
|
2
|
-
import { State } from '../Reducer';
|
|
3
|
-
export declare const ZoomType: {
|
|
4
|
-
HORIZONTAL: string;
|
|
5
|
-
VERTICAL: string;
|
|
6
|
-
STEP_HORIZONTAL: string;
|
|
7
|
-
FULL: string;
|
|
8
|
-
};
|
|
9
|
-
export declare function wheel(deltaY: any, deltaMode: any, draft: Draft<State>, id?: string | null): void;
|
|
10
|
-
declare function setZoom(draft: Draft<State>, options?: {
|
|
11
|
-
scale?: number;
|
|
12
|
-
spectrumID?: string;
|
|
13
|
-
shareYDomain?: boolean;
|
|
14
|
-
}): void;
|
|
15
|
-
declare function setZoom1D(draft: any, height: any, margin: any, index: any, defaultScale?: number): void;
|
|
16
|
-
export { setZoom, setZoom1D };
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { zoomIdentity, scaleLinear } from 'd3';
|
|
2
|
-
import Zoom1DManager, { setAllScales } from '../helper/Zoom1DManager';
|
|
3
|
-
export const ZoomType = {
|
|
4
|
-
HORIZONTAL: 'HORIZONTAL',
|
|
5
|
-
VERTICAL: 'VERTICAL',
|
|
6
|
-
STEP_HORIZONTAL: 'STEP_HORIZONTAL',
|
|
7
|
-
FULL: 'FULL',
|
|
8
|
-
};
|
|
9
|
-
export function wheel(deltaY, deltaMode, draft, id = null) {
|
|
10
|
-
if (draft.activeSpectrum?.id || id) {
|
|
11
|
-
Zoom1DManager(draft.zoom.spectra).wheel(deltaY, id || draft.activeSpectrum?.id);
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
const zoomManager = Zoom1DManager(draft.zoom.spectra);
|
|
15
|
-
draft.data.forEach((datum) => {
|
|
16
|
-
if (datum.info.dimension === 1 &&
|
|
17
|
-
draft.activeTab === datum.info.nucleus) {
|
|
18
|
-
zoomManager.wheel(deltaY, datum.id);
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
function setZoom(draft, options = {}) {
|
|
24
|
-
const { height, margin, activeSpectrum } = draft;
|
|
25
|
-
const { scale = null, spectrumID = null } = options;
|
|
26
|
-
if (scale && !spectrumID) {
|
|
27
|
-
setAllScales(draft.zoom.spectra, scale);
|
|
28
|
-
}
|
|
29
|
-
const zoomManager = Zoom1DManager(draft.zoom.spectra);
|
|
30
|
-
if (activeSpectrum === null && spectrumID === null) {
|
|
31
|
-
const { shareYDomain, yDomain, yDomains } = draft.originDomain;
|
|
32
|
-
draft.yDomains = Object.keys(draft.yDomains).reduce((acc, id) => {
|
|
33
|
-
const scale = zoomManager.getScale(id);
|
|
34
|
-
const _scale = scaleLinear(shareYDomain ? yDomain : yDomains[id], [
|
|
35
|
-
height - margin.bottom,
|
|
36
|
-
margin.top,
|
|
37
|
-
]);
|
|
38
|
-
const [min, max] = shareYDomain ? yDomain : yDomains[id];
|
|
39
|
-
const maxPoint = Math.max(Math.abs(max), Math.abs(min));
|
|
40
|
-
const scalePoint = maxPoint === max ? 0 : min;
|
|
41
|
-
const t = zoomIdentity
|
|
42
|
-
.translate(0, Math.sign(scalePoint) >= 0 ? _scale(scalePoint) : _scale(scalePoint))
|
|
43
|
-
.scale(scale)
|
|
44
|
-
.translate(0, -_scale(0));
|
|
45
|
-
const newYDomain = t.rescaleY(_scale).domain();
|
|
46
|
-
acc[id] = newYDomain;
|
|
47
|
-
return acc;
|
|
48
|
-
}, {});
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
const spectrumId = spectrumID || activeSpectrum?.id;
|
|
52
|
-
if (spectrumId) {
|
|
53
|
-
if (scale) {
|
|
54
|
-
zoomManager.setScale(scale, spectrumId);
|
|
55
|
-
}
|
|
56
|
-
const scaleFactor = scale ? scale : zoomManager.getScale(spectrumId);
|
|
57
|
-
const _scale = scaleLinear(draft.originDomain.yDomains[spectrumId], [
|
|
58
|
-
height - margin.bottom,
|
|
59
|
-
margin.top,
|
|
60
|
-
]);
|
|
61
|
-
const t = zoomIdentity
|
|
62
|
-
.translate(0, _scale(0))
|
|
63
|
-
.scale(scaleFactor)
|
|
64
|
-
.translate(0, -_scale(0));
|
|
65
|
-
const yDomain = t.rescaleY(_scale).domain();
|
|
66
|
-
draft.yDomains = {
|
|
67
|
-
...draft.yDomains,
|
|
68
|
-
[spectrumId]: yDomain,
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
function setZoom1D(draft, height, margin, index, defaultScale) {
|
|
74
|
-
const { originDomain, tabActiveSpectrum, activeTab } = draft;
|
|
75
|
-
const { id } = tabActiveSpectrum[activeTab.split(',')[index]];
|
|
76
|
-
const { setScale, getScale } = Zoom1DManager(draft.zoom.spectra);
|
|
77
|
-
if (defaultScale) {
|
|
78
|
-
setScale(defaultScale, id);
|
|
79
|
-
}
|
|
80
|
-
const scale = getScale(id);
|
|
81
|
-
const _scale = scaleLinear(originDomain.yDomains[id], [
|
|
82
|
-
height - margin,
|
|
83
|
-
margin,
|
|
84
|
-
]);
|
|
85
|
-
const t = zoomIdentity
|
|
86
|
-
.translate(0, _scale(0))
|
|
87
|
-
.scale(scale)
|
|
88
|
-
.translate(0, -_scale(0));
|
|
89
|
-
let yDomain = t.rescaleY(_scale).domain();
|
|
90
|
-
draft.yDomains[id] = yDomain;
|
|
91
|
-
}
|
|
92
|
-
export { setZoom, setZoom1D };
|