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,8 +1,10 @@
|
|
|
1
|
-
import merge from 'lodash/merge';
|
|
2
1
|
import * as FiltersTypes from '../../Filters';
|
|
3
2
|
import * as FiltersManager from '../../FiltersManager';
|
|
4
3
|
import generateID from '../../utilities/generateID';
|
|
5
4
|
import get1dColor from '../../utilities/getColor';
|
|
5
|
+
import { initiateIntegrals } from './integrals/initiateIntegrals';
|
|
6
|
+
import { initiatePeaks } from './peaks/initiatePeaks';
|
|
7
|
+
import { initiateRanges } from './ranges/initiateRanges';
|
|
6
8
|
export function initiateDatum1D(options, usedColors = {}) {
|
|
7
9
|
const datum = {};
|
|
8
10
|
datum.id = options.id || generateID();
|
|
@@ -35,27 +37,13 @@ export function initiateDatum1D(options, usedColors = {}) {
|
|
|
35
37
|
im: [],
|
|
36
38
|
}, options.data);
|
|
37
39
|
datum.originalData = datum.data;
|
|
38
|
-
datum.
|
|
40
|
+
datum.filters = Object.assign([], options.filters); //array of object {name: "FilterName", options: FilterOptions = {value | object} }
|
|
41
|
+
datum.peaks = initiatePeaks(options, datum);
|
|
39
42
|
// array of object {index: xIndex, xShift}
|
|
40
43
|
// in case the peak does not exactly correspond to the point value
|
|
41
44
|
// we can think about a second attributed `xShift`
|
|
42
|
-
datum.integrals =
|
|
43
|
-
|
|
44
|
-
options: {
|
|
45
|
-
sum: undefined,
|
|
46
|
-
isSumConstant: true,
|
|
47
|
-
sumAuto: true,
|
|
48
|
-
},
|
|
49
|
-
}, options.integrals); // array of object (from: xIndex, to: xIndex)
|
|
50
|
-
datum.filters = Object.assign([], options.filters); //array of object {name: "FilterName", options: FilterOptions = {value | object} }
|
|
51
|
-
datum.ranges = merge({
|
|
52
|
-
values: [],
|
|
53
|
-
options: {
|
|
54
|
-
sum: undefined,
|
|
55
|
-
isSumConstant: true,
|
|
56
|
-
sumAuto: true,
|
|
57
|
-
},
|
|
58
|
-
}, options.ranges);
|
|
45
|
+
datum.integrals = initiateIntegrals(options); // array of object (from: xIndex, to: xIndex)
|
|
46
|
+
datum.ranges = initiateRanges(options, datum);
|
|
59
47
|
//reapply filters after load the original data
|
|
60
48
|
FiltersManager.reapplyFilters(datum);
|
|
61
49
|
preprocessing(datum);
|
|
@@ -63,9 +51,12 @@ export function initiateDatum1D(options, usedColors = {}) {
|
|
|
63
51
|
}
|
|
64
52
|
function getColor(options, usedColors) {
|
|
65
53
|
let color = 'black';
|
|
66
|
-
if (options
|
|
54
|
+
if (options?.display?.color === undefined) {
|
|
67
55
|
color = get1dColor(false, usedColors['1d'] || []);
|
|
68
56
|
}
|
|
57
|
+
else {
|
|
58
|
+
color = options.display.color;
|
|
59
|
+
}
|
|
69
60
|
if (usedColors['1d']) {
|
|
70
61
|
usedColors['1d'].push(color);
|
|
71
62
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Integrals } from '../../../types/data1d';
|
|
2
|
+
export declare function initiateIntegrals(options: Partial<{
|
|
3
|
+
integrals: Integrals;
|
|
4
|
+
}>): {
|
|
5
|
+
values: never[];
|
|
6
|
+
options: {
|
|
7
|
+
sum: undefined;
|
|
8
|
+
isSumConstant: boolean;
|
|
9
|
+
sumAuto: boolean;
|
|
10
|
+
};
|
|
11
|
+
} & Integrals;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import median from 'ml-array-median';
|
|
2
2
|
import { xyAutoPeaksPicking } from 'nmr-processing';
|
|
3
|
-
import
|
|
4
|
-
import { getShiftX } from '../shift/getShiftX';
|
|
3
|
+
import { mapPeaks } from './mapPeaks';
|
|
5
4
|
export function autoPeakPicking(datum1D, options) {
|
|
6
5
|
const { minMaxRatio, maxNumberOfPeaks, noiseFactor, lookNegative, windowFromIndex, windowToIndex, } = options;
|
|
7
6
|
// we calculate the noise but this could be improved
|
|
8
7
|
const noise = median(datum1D.data.re.map((y) => Math.abs(y)));
|
|
9
8
|
let { re, x } = datum1D.data;
|
|
10
|
-
let { values: currentPeaks = [] } = datum1D.peaks || {};
|
|
11
9
|
if (windowFromIndex !== undefined && windowToIndex !== undefined) {
|
|
12
10
|
x = x.slice(windowFromIndex, windowToIndex);
|
|
13
11
|
re = re.slice(windowFromIndex, windowToIndex);
|
|
@@ -23,22 +21,5 @@ export function autoPeakPicking(datum1D, options) {
|
|
|
23
21
|
peaks.sort((a, b) => b.y - a.y);
|
|
24
22
|
if (maxNumberOfPeaks < peaks.length)
|
|
25
23
|
peaks = peaks.slice(0, maxNumberOfPeaks);
|
|
26
|
-
|
|
27
|
-
const error = (x[x.length - 1] - x[0]) / 10000;
|
|
28
|
-
return peaks.reduce((acc, newPeak) => {
|
|
29
|
-
// check if the peak is already exists
|
|
30
|
-
for (const { x } of currentPeaks) {
|
|
31
|
-
if (Math.abs(newPeak.x - x) < error) {
|
|
32
|
-
return acc;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
acc.push({
|
|
36
|
-
id: generateID(),
|
|
37
|
-
originalX: newPeak.x - shiftX,
|
|
38
|
-
x: newPeak.x,
|
|
39
|
-
y: newPeak.y,
|
|
40
|
-
width: newPeak.width,
|
|
41
|
-
});
|
|
42
|
-
return acc;
|
|
43
|
-
}, []);
|
|
24
|
+
return mapPeaks(peaks, datum1D);
|
|
44
25
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import generateID from '../../../utilities/generateID';
|
|
2
|
+
import { getSpectrumErrorValue } from '../getSpectrumErrorValue';
|
|
3
|
+
import { getShiftX } from '../shift/getShiftX';
|
|
4
|
+
function checkPeak(peak, datum, error) {
|
|
5
|
+
// check if the Peak is already exists
|
|
6
|
+
for (const { x } of datum.peaks?.values || []) {
|
|
7
|
+
if (Math.abs(peak.x - x) < error) {
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
export function mapPeaks(peaks, datum) {
|
|
14
|
+
const shiftX = getShiftX(datum);
|
|
15
|
+
const error = getSpectrumErrorValue(datum);
|
|
16
|
+
return peaks.reduce((acc, newPeak) => {
|
|
17
|
+
// check if the peak is already exists
|
|
18
|
+
if (checkPeak(newPeak, datum, error))
|
|
19
|
+
return acc;
|
|
20
|
+
acc.push({
|
|
21
|
+
id: newPeak?.id || generateID(),
|
|
22
|
+
originalX: newPeak.x - shiftX,
|
|
23
|
+
x: newPeak.x,
|
|
24
|
+
y: newPeak.y,
|
|
25
|
+
width: newPeak.width,
|
|
26
|
+
});
|
|
27
|
+
return acc;
|
|
28
|
+
}, []);
|
|
29
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Datum1D, Ranges } from '../../../types/data1d';
|
|
2
|
+
export declare function initiateRanges(options: Partial<{
|
|
3
|
+
ranges: Ranges;
|
|
4
|
+
}>, datum: Datum1D): {
|
|
5
|
+
values: never[];
|
|
6
|
+
options: {
|
|
7
|
+
sum: undefined;
|
|
8
|
+
isSumConstant: boolean;
|
|
9
|
+
sumAuto: boolean;
|
|
10
|
+
};
|
|
11
|
+
} & Ranges & {
|
|
12
|
+
values: import("../../../types/data1d").Range[];
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import merge from 'lodash/merge';
|
|
2
|
+
import { mapRanges } from './mapRanges';
|
|
3
|
+
export function initiateRanges(options, datum) {
|
|
4
|
+
return merge({
|
|
5
|
+
values: [],
|
|
6
|
+
options: {
|
|
7
|
+
sum: undefined,
|
|
8
|
+
isSumConstant: true,
|
|
9
|
+
sumAuto: true,
|
|
10
|
+
},
|
|
11
|
+
}, options.ranges, {
|
|
12
|
+
values: mapRanges(options?.ranges?.values || [], datum),
|
|
13
|
+
});
|
|
14
|
+
}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import { xyIntegration } from 'ml-spectra-processing';
|
|
2
2
|
import { DatumKind } from '../../../constants/SignalsKinds';
|
|
3
3
|
import generateID from '../../../utilities/generateID';
|
|
4
|
+
import { getSpectrumErrorValue } from '../getSpectrumErrorValue';
|
|
4
5
|
import { getShiftX } from '../shift/getShiftX';
|
|
6
|
+
function checkRange(range, datum, error) {
|
|
7
|
+
// check if the range is already exists
|
|
8
|
+
for (const { from, to } of datum.ranges?.values || []) {
|
|
9
|
+
if (Math.abs(range.from - from) < error &&
|
|
10
|
+
Math.abs(range.to - to) < error) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
5
15
|
export function mapRanges(ranges, datum) {
|
|
6
16
|
const { x, re } = datum.data;
|
|
7
17
|
const shiftX = getShiftX(datum);
|
|
8
|
-
const error = (
|
|
18
|
+
const error = getSpectrumErrorValue(datum);
|
|
9
19
|
return ranges.reduce((acc, newRange) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (Math.abs(newRange.from - from) < error &&
|
|
13
|
-
Math.abs(newRange.to - to) < error) {
|
|
14
|
-
return acc;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
20
|
+
if (checkRange(newRange, datum, error))
|
|
21
|
+
return acc;
|
|
17
22
|
const absolute = xyIntegration({ x, y: re }, { from: newRange.from, to: newRange.to, reverse: true });
|
|
18
23
|
const signals = newRange.signals.map((signal) => {
|
|
19
24
|
const { kind = null, id, ...resSignal } = signal;
|
|
@@ -43,9 +43,8 @@ export function initiateDatum2D(options, usedColors = {}) {
|
|
|
43
43
|
}
|
|
44
44
|
function getColor(options, usedColors) {
|
|
45
45
|
let color = { positiveColor: 'red', negativeColor: 'blue' };
|
|
46
|
-
if (options.
|
|
47
|
-
options
|
|
48
|
-
options.display.positiveColor === undefined) {
|
|
46
|
+
if (options?.display.negativeColor === undefined ||
|
|
47
|
+
options?.display?.positiveColor === undefined) {
|
|
49
48
|
color = get2DColor(options.info.experiment, usedColors['2d'] || []);
|
|
50
49
|
}
|
|
51
50
|
if (usedColors['2d']) {
|
|
@@ -4,5 +4,6 @@ interface TwoDColors {
|
|
|
4
4
|
negativeColor: string;
|
|
5
5
|
}
|
|
6
6
|
export declare function get2DColor(experiment: string, colors?: never[]): TwoDColors;
|
|
7
|
+
export declare function adjustAlpha(color: string, factor: number): string;
|
|
7
8
|
export default function getColor(isRandom?: boolean, usedColors?: string[], opacity?: number): string;
|
|
8
9
|
export {};
|
|
@@ -42,7 +42,7 @@ function percentToHex(p) {
|
|
|
42
42
|
const hexValue = intValue.toString(16);
|
|
43
43
|
return percent === 100 ? '' : hexValue.padStart(2, '0');
|
|
44
44
|
}
|
|
45
|
-
function adjustAlpha(color, factor) {
|
|
45
|
+
export function adjustAlpha(color, factor) {
|
|
46
46
|
return color + percentToHex(factor);
|
|
47
47
|
}
|
|
48
48
|
export default function getColor(isRandom = false, usedColors = [], opacity = 100) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/versionInfo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default { version: 'v0.
|
|
1
|
+
export default { version: 'v0.24.0' };
|
|
@@ -15,6 +15,6 @@ const MultiAnalysisRanges_1 = __importDefault(require("./multiAnalysis/MultiAnal
|
|
|
15
15
|
const Ranges_1 = __importDefault(require("./ranges/Ranges"));
|
|
16
16
|
const BaseLineZones_1 = __importDefault(require("./tool/BaseLineZones"));
|
|
17
17
|
function Chart1D({ mode, width, height, margin, displayerKey }) {
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)("svg", { viewBox: `0 0 ${width} ${height}`, width: width, height: height, id: "nmrSVG", children: [(0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsx)("clipPath", { id: `${displayerKey}clip-chart-1d`, children: (0, jsx_runtime_1.jsx)("rect", { width: `${width - margin.left - margin.right}`, height: `${height}`, x: `${margin.left}`, y: `${0}` }
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { viewBox: `0 0 ${width} ${height}`, width: width, height: height, id: "nmrSVG", children: [(0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsx)("clipPath", { id: `${displayerKey}clip-chart-1d`, children: (0, jsx_runtime_1.jsx)("rect", { width: `${width - margin.left - margin.right}`, height: `${height}`, x: `${margin.left}`, y: `${0}` }) }) }), (0, jsx_runtime_1.jsx)(LinesSeries_1.default, {}), (0, jsx_runtime_1.jsx)(IntegralsSeries_1.default, {}), (0, jsx_runtime_1.jsx)(PeakAnnotations_1.default, {}), (0, jsx_runtime_1.jsx)(Ranges_1.default, {}), (0, jsx_runtime_1.jsx)(JGraph_1.default, {}), (0, jsx_runtime_1.jsx)(MultiAnalysisRanges_1.default, {}), (0, jsx_runtime_1.jsx)(BaseLineZones_1.default, {}), (0, jsx_runtime_1.jsx)(ExclusionZonesAnnotations_1.default, {}), (0, jsx_runtime_1.jsx)(ResurrectedDatabaseRanges_1.default, {}), (0, jsx_runtime_1.jsx)("g", { className: "container", style: { pointerEvents: 'none' }, children: (0, jsx_runtime_1.jsx)(XAxis_1.default, { showGrid: true, mode: mode }) })] }));
|
|
19
19
|
}
|
|
20
20
|
exports.default = Chart1D;
|
|
@@ -18,6 +18,6 @@ function ExclusionZoneAnnotation({ zone, color, vAlign, spectrumID, }) {
|
|
|
18
18
|
return ((0, jsx_runtime_1.jsx)("g", { transform: `translate(${scaleX()(zone.to)},0)`, children: (0, jsx_runtime_1.jsx)("rect", { x: "0", transform: `translate(0,${scaleY()(0) - (vAlign + 5)})`, width: `${scaleX()(zone.from) - scaleX()(zone.to)}`, height: "10px", style: {
|
|
19
19
|
fill: highlight.isActive ? '#ff6f0057' : color,
|
|
20
20
|
opacity,
|
|
21
|
-
}, ...highlight.onHover }
|
|
21
|
+
}, ...highlight.onHover }) }, zone.id));
|
|
22
22
|
}
|
|
23
23
|
exports.default = (0, react_1.memo)(ExclusionZoneAnnotation);
|
|
@@ -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];
|
|
@@ -35,7 +39,7 @@ function ExclusionZonesAnnotationsInner({ displayerKey, xDomains, spectra, verti
|
|
|
35
39
|
.filter((d) => d.display.isVisible === true && xDomains[d.id])
|
|
36
40
|
.map((d, index) => getExclusionZones(d).map((zone) => {
|
|
37
41
|
return ((0, jsx_runtime_1.jsx)(ExclusionZoneAnnotation_1.default, { spectrumID: d.id, vAlign: (0, getVerticalShift_1.default)(verticalAlign, { index }), zone: zone, color: d.display.color }, zone.id));
|
|
38
|
-
})) }
|
|
42
|
+
})) }));
|
|
39
43
|
}
|
|
40
44
|
const MemoizedPeakAnnotations = (0, react_1.memo)(ExclusionZonesAnnotationsInner);
|
|
41
45
|
function ExclusionZonesAnnotations() {
|
|
@@ -43,10 +47,9 @@ function ExclusionZonesAnnotations() {
|
|
|
43
47
|
const spectra = (0, useSpectraPerNucleus_1.default)();
|
|
44
48
|
if (displayerMode !== Constants_1.DISPLAYER_MODE.DM_1D)
|
|
45
49
|
return null;
|
|
46
|
-
return ((0, jsx_runtime_1.jsx)(MemoizedPeakAnnotations, { spectra: spectra, displayerKey: displayerKey, xDomains: xDomains, verticalAlign: verticalAlign }
|
|
50
|
+
return ((0, jsx_runtime_1.jsx)(MemoizedPeakAnnotations, { spectra: spectra, displayerKey: displayerKey, xDomains: xDomains, verticalAlign: verticalAlign }));
|
|
47
51
|
}
|
|
48
52
|
exports.default = ExclusionZonesAnnotations;
|
|
49
53
|
function getExclusionZones(data) {
|
|
50
|
-
return (data.filters.find((filter) => filter.name === Filters.exclusionZones.id)
|
|
51
|
-
?.value || []);
|
|
54
|
+
return (data.filters.find((filter) => filter.name === Filters.exclusionZones.id && filter.flag)?.value || []);
|
|
52
55
|
}
|
|
@@ -72,7 +72,7 @@ function FooterBannerInner({ margin, width, height, activeSpectrum, spectrum, ac
|
|
|
72
72
|
const { scaleX } = (0, ScaleContext_1.useScaleChecked)();
|
|
73
73
|
const format = (0, FormatNumber_1.useFormatNumberByNucleus)(activeTab);
|
|
74
74
|
const getYValue = (0, react_2.useCallback)((xPosition) => {
|
|
75
|
-
if (spectrum
|
|
75
|
+
if (spectrum) {
|
|
76
76
|
const data = (0, get1DDataXY_1.get1DDataXY)(spectrum);
|
|
77
77
|
const xIndex = (0, ml_spectra_processing_1.xFindClosestIndex)(data.x, scaleX().invert(xPosition));
|
|
78
78
|
return data.y[xIndex];
|
|
@@ -84,17 +84,16 @@ function FooterBannerInner({ margin, width, height, activeSpectrum, spectrum, ac
|
|
|
84
84
|
position.x < margin.left ||
|
|
85
85
|
position.x > width - margin.right ||
|
|
86
86
|
position.y > height - margin.bottom) {
|
|
87
|
-
return (0, jsx_runtime_1.jsx)("div", { css: styles }
|
|
87
|
+
return (0, jsx_runtime_1.jsx)("div", { css: styles });
|
|
88
88
|
}
|
|
89
|
-
return ((0, jsx_runtime_1.jsxs)("div", { css: styles, children: [(0, jsx_runtime_1.jsx)(bs_1.BsCursor, {}
|
|
90
|
-
spectrum?.info?.originFrequency).toPrecision(5) }
|
|
91
|
-
100).toFixed(2), "%"] }
|
|
89
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: styles, children: [(0, jsx_runtime_1.jsx)(bs_1.BsCursor, {}), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("span", { className: "label", children: " \uD835\uDEC5: " }), (0, jsx_runtime_1.jsx)("span", { className: "value", children: format(scaleX().invert(position.x)) }), (0, jsx_runtime_1.jsx)("span", { className: "unit", children: "ppm" }), activeSpectrum && spectrum?.info?.originFrequency && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("span", { className: "value", children: ["\u00A0(", format(scaleX().invert(position.x) * spectrum?.info?.originFrequency, 'hz')] }), (0, jsx_runtime_1.jsx)("span", { className: "unit", children: "Hz" }), (0, jsx_runtime_1.jsx)("span", { className: "value", children: ") " })] }))] }), step === 'brushing' && ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("span", { className: "label", children: " \u0394ppm: " }), (0, jsx_runtime_1.jsx)("span", { className: "value", children: (scaleX().invert(startX) - scaleX().invert(endX)).toPrecision(6) })] })), activeSpectrum && ((0, jsx_runtime_1.jsxs)(react_2.Fragment, { children: [spectrum?.info?.originFrequency && step === 'brushing' && ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("span", { className: "label", children: " \u0394Hz: " }), (0, jsx_runtime_1.jsx)("span", { className: "value", children: ((scaleX().invert(startX) - scaleX().invert(endX)) *
|
|
90
|
+
spectrum?.info?.originFrequency).toPrecision(5) })] })), step === 'brushing' && ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("span", { className: "label", children: " ratio :" }), (0, jsx_runtime_1.jsxs)("span", { className: "value", children: [((getYValue(startX) / (getYValue(endX) || Number.MIN_VALUE)) *
|
|
91
|
+
100).toFixed(2), "%"] })] }))] })), activeSpectrum && ((0, jsx_runtime_1.jsxs)(react_2.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "separator" }), (0, jsx_runtime_1.jsx)(io5_1.IoPulseSharp, {}), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("span", { className: "label", children: "Intensity: " }), (0, jsx_runtime_1.jsx)("span", { className: "value yvalue", children: format(getYValue(position.x)) })] })] }))] }));
|
|
92
92
|
}
|
|
93
93
|
const MemoizedFooterBanner = (0, react_2.memo)(FooterBannerInner);
|
|
94
|
-
const emptyData = { info: {}, data: {} };
|
|
95
94
|
function FooterBanner() {
|
|
96
95
|
const { margin, width, height, activeSpectrum, activeTab } = (0, ChartContext_1.useChartData)();
|
|
97
|
-
const spectrum = (0, useSpectrum_1.default)(
|
|
98
|
-
return ((0, jsx_runtime_1.jsx)(MemoizedFooterBanner, { ...{ margin, width, height, activeSpectrum, spectrum, activeTab } }
|
|
96
|
+
const spectrum = (0, useSpectrum_1.default)(null);
|
|
97
|
+
return ((0, jsx_runtime_1.jsx)(MemoizedFooterBanner, { ...{ margin, width, height, activeSpectrum, spectrum, activeTab } }));
|
|
99
98
|
}
|
|
100
99
|
exports.default = FooterBanner;
|
|
@@ -4,26 +4,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
// import { xyReduce, xyIntegral } from 'ml-spectra-processing';
|
|
8
7
|
const react_1 = require("react");
|
|
9
|
-
const ChartContext_1 = require("../context/ChartContext");
|
|
10
8
|
const PreferencesContext_1 = require("../context/PreferencesContext");
|
|
9
|
+
const useIntegralPath_1 = __importDefault(require("../hooks/useIntegralPath"));
|
|
11
10
|
const defaultValues_1 = require("../panels/extra/preferences/defaultValues");
|
|
12
11
|
const LocalStorage_1 = require("../utility/LocalStorage");
|
|
13
12
|
const IntegralResizable_1 = __importDefault(require("./IntegralResizable"));
|
|
14
|
-
const useIntegralPath_1 = __importDefault(require("./utilities/useIntegralPath"));
|
|
15
13
|
function Integral({ integral, isActive }) {
|
|
16
14
|
const preferences = (0, PreferencesContext_1.usePreferences)();
|
|
17
15
|
const path = (0, useIntegralPath_1.default)(integral);
|
|
18
|
-
const { height, margin } = (0, ChartContext_1.useChartData)();
|
|
19
16
|
const integralSettings = (0, react_1.useMemo)(() => {
|
|
20
|
-
let { color = defaultValues_1.integralDefaultValues.color, strokeWidth = defaultValues_1.integralDefaultValues.strokeWidth, } = (0, LocalStorage_1.getValue)(preferences, 'formatting.panels.integrals') || {};
|
|
17
|
+
let { color = defaultValues_1.integralDefaultValues.color, strokeWidth = defaultValues_1.integralDefaultValues.strokeWidth, } = (0, LocalStorage_1.getValue)(preferences.current, 'formatting.panels.integrals') || {};
|
|
21
18
|
return { color, strokeWidth };
|
|
22
19
|
}, [preferences]);
|
|
23
20
|
return ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("path", { className: "line", stroke: integralSettings.color, strokeWidth: integralSettings.strokeWidth, fill: "none", style: {
|
|
24
|
-
transformOrigin: 'center top',
|
|
25
21
|
opacity: isActive ? 1 : 0.2,
|
|
26
|
-
|
|
27
|
-
}, d: path }, void 0), (0, jsx_runtime_1.jsx)(IntegralResizable_1.default, { integralData: integral }, void 0)] }, void 0));
|
|
22
|
+
}, d: path }), (0, jsx_runtime_1.jsx)(IntegralResizable_1.default, { integralData: integral })] }));
|
|
28
23
|
}
|
|
29
24
|
exports.default = Integral;
|
|
@@ -66,6 +66,6 @@ function IntegralResizable({ integralData }) {
|
|
|
66
66
|
}, []);
|
|
67
67
|
const x0 = from ? scaleX()(from) : 0;
|
|
68
68
|
const x1 = to ? scaleX()(to) : 0;
|
|
69
|
-
return ((0, jsx_runtime_1.jsxs)("g", { css: highlight.isActive ? stylesHighlighted : stylesOnHover, onMouseEnter: handleOnEnterNotation, onMouseLeave: handleOnMouseLeaveNotation, children: [(0, jsx_runtime_1.jsx)("rect", { "data-no-export": "true", x: `${x1}`, y: "0", width: `${x0 - x1}`, height: height - margin.bottom, className: "highlight" }
|
|
69
|
+
return ((0, jsx_runtime_1.jsxs)("g", { css: highlight.isActive ? stylesHighlighted : stylesOnHover, onMouseEnter: handleOnEnterNotation, onMouseLeave: handleOnMouseLeaveNotation, children: [(0, jsx_runtime_1.jsx)("rect", { "data-no-export": "true", x: `${x1}`, y: "0", width: `${x0 - x1}`, height: height - margin.bottom, className: "highlight" }), (0, jsx_runtime_1.jsx)("text", { x: x1, y: height - margin.bottom + 30, fill: "black", style: { fontSize: '12px', fontWeight: 'bold' }, children: integral !== undefined ? integral.toFixed(2) : '' }), (0, jsx_runtime_1.jsx)(Resizable_1.default, { from: integralData.from, to: integralData.to, onDrag: dragHandler, onDrop: handleOnStopResizing, "data-no-export": "true" })] }));
|
|
70
70
|
}
|
|
71
71
|
exports.default = IntegralResizable;
|
|
@@ -22,8 +22,8 @@ function IntegralsSeries() {
|
|
|
22
22
|
data
|
|
23
23
|
.filter((d) => d.display.isVisible === true && xDomains[d.id])
|
|
24
24
|
.filter(Spectrum1D_1.isSpectrum1D)
|
|
25
|
-
.map((spectrum) => spectrum.integrals.values.map((integral) => ((0, jsx_runtime_1.jsx)(Integral_1.default, { integral: integral, isActive: isActive(spectrum.id) }, integral.id)))) }
|
|
25
|
+
.map((spectrum) => spectrum.integrals.values.map((integral) => ((0, jsx_runtime_1.jsx)(Integral_1.default, { integral: integral, isActive: isActive(spectrum.id) }, integral.id)))) }));
|
|
26
26
|
}, [activeSpectrum, data, xDomains]);
|
|
27
|
-
return (0, jsx_runtime_1.jsx)("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, children: Integrals }
|
|
27
|
+
return (0, jsx_runtime_1.jsx)("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, children: Integrals });
|
|
28
28
|
}
|
|
29
29
|
exports.default = IntegralsSeries;
|
|
@@ -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];
|
|
@@ -12,6 +12,6 @@ function LinesSeries() {
|
|
|
12
12
|
const _data = tempData ? tempData : data;
|
|
13
13
|
return ((0, jsx_runtime_1.jsx)("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, className: "spectrums", children: _data
|
|
14
14
|
?.filter((d) => d.display.isVisible === true && xDomains[d.id])
|
|
15
|
-
.map((d, i) => ((0, jsx_runtime_1.jsx)(Line_1.default, { ...d, data: (0, get1DDataXY_1.get1DDataXY)(d), index: i }, d.id))) }
|
|
15
|
+
.map((d, i) => ((0, jsx_runtime_1.jsx)(Line_1.default, { ...d, data: (0, get1DDataXY_1.get1DDataXY)(d), index: i }, d.id))) }));
|
|
16
16
|
}
|
|
17
17
|
exports.default = LinesSeries;
|
|
@@ -105,9 +105,9 @@ value, color, isActive, nucleus, }) {
|
|
|
105
105
|
}, [highlight]);
|
|
106
106
|
const newValue = (0, react_2.useMemo)(() => (isSelected ? value : format(value)), [format, isSelected, value]);
|
|
107
107
|
const oldValue = (0, react_2.useMemo)(() => (isSelected ? _value : format(_value)), [_value, format, isSelected]);
|
|
108
|
-
return ((0, jsx_runtime_1.jsxs)("g", { css: styles, id: id, style: { outline: 'none' }, transform: `translate(${x}, ${y})`, onMouseEnter: handleOnEnterNotation, onMouseLeave: handleOnMouseLeaveNotation, children: [(0, jsx_runtime_1.jsx)("line", { x1: "0", x2: "0", y1: sign === -1 ? 10 : 0, y2: sign === -1 ? 28 : -18, stroke: color, strokeWidth: highlight.isActive ? '7px' : '1px' }
|
|
108
|
+
return ((0, jsx_runtime_1.jsxs)("g", { css: styles, id: id, style: { outline: 'none' }, transform: `translate(${x}, ${y})`, onMouseEnter: handleOnEnterNotation, onMouseLeave: handleOnMouseLeaveNotation, children: [(0, jsx_runtime_1.jsx)("line", { x1: "0", x2: "0", y1: sign === -1 ? 10 : 0, y2: sign === -1 ? 28 : -18, stroke: color, strokeWidth: highlight.isActive ? '7px' : '1px' }), (0, jsx_runtime_1.jsx)("text", { ref: refText, className: "peaks-text", x: "0", y: sign === -1 ? 28 : -12, dy: "0", dx: "0.35em", fill: "transparent", fontSize: "10px", fontWeight: "100", style: {
|
|
109
109
|
position: 'absolute',
|
|
110
|
-
}, children: newValue }
|
|
110
|
+
}, children: newValue }), (0, jsx_runtime_1.jsx)("foreignObject", { x: "0", y: sign === -1 ? 16 : -22, dy: "0.1em", dx: "0.35em", width: containerSize.width + 20, height: "40px", "data-no-export": "true", children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
111
111
|
width: containerSize.width + 20,
|
|
112
112
|
height: '100%',
|
|
113
113
|
paddingRight: 5,
|
|
@@ -117,6 +117,6 @@ value, color, isActive, nucleus, }) {
|
|
|
117
117
|
opacity: isActive ? 1 : 0.2,
|
|
118
118
|
userSelect: 'none',
|
|
119
119
|
color: color,
|
|
120
|
-
}, value: oldValue, onKeyDown: handleKeyDown, onChange: handleChange, type: "number", disabled: !isActive }
|
|
120
|
+
}, value: oldValue, onKeyDown: handleKeyDown, onChange: handleChange, type: "number", disabled: !isActive }) }) })] }));
|
|
121
121
|
}
|
|
122
122
|
exports.default = PeakAnnotation;
|
|
@@ -43,6 +43,6 @@ function PeakAnnotations() {
|
|
|
43
43
|
: false }, id))) }, d.id)));
|
|
44
44
|
}));
|
|
45
45
|
}, [data, verticalAlign, activeSpectrum, xDomains, scaleX, scaleY]);
|
|
46
|
-
return ((0, jsx_runtime_1.jsx)("g", { className: "peaks", clipPath: `url(#${displayerKey}clip-chart-1d)`, children: Peaks }
|
|
46
|
+
return ((0, jsx_runtime_1.jsx)("g", { className: "peaks", clipPath: `url(#${displayerKey}clip-chart-1d)`, children: Peaks }));
|
|
47
47
|
}
|
|
48
48
|
exports.default = PeakAnnotations;
|
|
@@ -99,12 +99,12 @@ function Resizable({ from, to, onDrag = () => null, onDrop }) {
|
|
|
99
99
|
}, position: {
|
|
100
100
|
x: scaleX()(from),
|
|
101
101
|
y: 0,
|
|
102
|
-
}, scale: 1, handle: ".handle", onStart: handleRightStart, onDrag: handleRightDrag, onStop: handleRightStop, nodeRef: draggableRightRef, children: (0, jsx_runtime_1.jsx)("rect", { ref: draggableRightRef, className: enable ? 'handle' : '', width: rightDragVisibility ? 1 : 6, fill: "red", height: height + margin.top, style: { fillOpacity: rightDragVisibility ? 1 : 0 }, onMouseDownCapture: mouseDownCaptureHandler, onMouseUpCapture: mouseUpCaptureHandler, onMouseEnter: mouseOverHandler }
|
|
102
|
+
}, scale: 1, handle: ".handle", onStart: handleRightStart, onDrag: handleRightDrag, onStop: handleRightStop, nodeRef: draggableRightRef, children: (0, jsx_runtime_1.jsx)("rect", { ref: draggableRightRef, className: enable ? 'handle' : '', width: rightDragVisibility ? 1 : 6, fill: "red", height: height + margin.top, style: { fillOpacity: rightDragVisibility ? 1 : 0 }, onMouseDownCapture: mouseDownCaptureHandler, onMouseUpCapture: mouseUpCaptureHandler, onMouseEnter: mouseOverHandler }) }), (0, jsx_runtime_1.jsx)(react_draggable_1.default, { axis: "x", defaultPosition: {
|
|
103
103
|
x: scaleX()(to),
|
|
104
104
|
y: 0,
|
|
105
105
|
}, position: {
|
|
106
106
|
x: scaleX()(to),
|
|
107
107
|
y: 0,
|
|
108
|
-
}, handle: ".handle", scale: 1, onStart: handleLeftStart, onDrag: handleLeftDrag, onStop: handleLeftStop, nodeRef: draggableLeftRef, children: (0, jsx_runtime_1.jsx)("rect", { ref: draggableLeftRef, className: enable ? 'handle' : '', width: leftDragVisibility ? 1 : 6, fill: "red", height: height + margin.top, style: { fillOpacity: leftDragVisibility ? 1 : 0 }, onMouseDownCapture: mouseDownCaptureHandler, onMouseUpCapture: mouseUpCaptureHandler, onMouseEnter: mouseOverHandler }
|
|
108
|
+
}, handle: ".handle", scale: 1, onStart: handleLeftStart, onDrag: handleLeftDrag, onStop: handleLeftStop, nodeRef: draggableLeftRef, children: (0, jsx_runtime_1.jsx)("rect", { ref: draggableLeftRef, className: enable ? 'handle' : '', width: leftDragVisibility ? 1 : 6, fill: "red", height: height + margin.top, style: { fillOpacity: leftDragVisibility ? 1 : 0 }, onMouseDownCapture: mouseDownCaptureHandler, onMouseUpCapture: mouseUpCaptureHandler, onMouseEnter: mouseOverHandler }) })] }));
|
|
109
109
|
}
|
|
110
110
|
exports.default = Resizable;
|
|
@@ -57,6 +57,6 @@ function ResurrectedDatabaseRanges() {
|
|
|
57
57
|
}, []);
|
|
58
58
|
return ((0, jsx_runtime_1.jsx)("g", { clipPath: `url(#${displayerKey}clip-chart-1d)`, className: "resurrected-database-ranges", width: "100%", height: "100%", children: paths.map(({ path, from, to }, index) => (
|
|
59
59
|
// eslint-disable-next-line react/no-array-index-key
|
|
60
|
-
(0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("g", { transform: `translate(${scaleX()(to)},0)`, children: (0, jsx_runtime_1.jsx)("rect", { x: "0", width: Math.abs(scaleX()(to) - scaleX()(from)), height: "100%", fill: "#ff6f0057" }
|
|
60
|
+
(0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("g", { transform: `translate(${scaleX()(to)},0)`, children: (0, jsx_runtime_1.jsx)("rect", { x: "0", width: Math.abs(scaleX()(to) - scaleX()(from)), height: "100%", fill: "#ff6f0057" }) }), (0, jsx_runtime_1.jsx)("path", { transform: `translate(0,${fullHeight - blockHight * 2})`, stroke: "black", fill: "none", d: path })] }, `${index}`))) }));
|
|
61
61
|
}
|
|
62
62
|
exports.default = ResurrectedDatabaseRanges;
|
|
@@ -41,7 +41,7 @@ function YTracker({ datum }) {
|
|
|
41
41
|
return null;
|
|
42
42
|
}
|
|
43
43
|
const xIndex = (0, ml_spectra_processing_1.xFindClosestIndex)(datum.x, scaleX().invert(position.x));
|
|
44
|
-
return (0, jsx_runtime_1.jsx)("span", { style: styles.value, children: datum.y[xIndex] }
|
|
44
|
+
return (0, jsx_runtime_1.jsx)("span", { style: styles.value, children: datum.y[xIndex] });
|
|
45
45
|
}
|
|
46
46
|
function SpectraTracker() {
|
|
47
47
|
const { data, activeTab, xDomains } = (0, ChartContext_1.useChartData)();
|
|
@@ -62,10 +62,10 @@ function SpectraTracker() {
|
|
|
62
62
|
spectrum.info.nucleus === activeTab && ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'block' }, children: [(0, jsx_runtime_1.jsx)("span", { style: {
|
|
63
63
|
...styles.colorIndicator,
|
|
64
64
|
borderColor: spectrum.display.color,
|
|
65
|
-
} }
|
|
65
|
+
} }), (0, jsx_runtime_1.jsx)(YTracker, { datum: (0, get1DDataXY_1.get1DDataXY)(spectrum) }), (0, jsx_runtime_1.jsx)("span", { style: styles.value, children: spectrum.display.name })] }, spectrum.id)), []));
|
|
66
66
|
}, [activeTab, data, isVisible, xDomains]);
|
|
67
67
|
if (!isVisible)
|
|
68
68
|
return null;
|
|
69
|
-
return (0, jsx_runtime_1.jsx)("div", { style: styles.container, children: trackers }
|
|
69
|
+
return (0, jsx_runtime_1.jsx)("div", { style: styles.container, children: trackers });
|
|
70
70
|
}
|
|
71
71
|
exports.default = SpectraTracker;
|