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];
|
|
@@ -46,7 +50,7 @@ function PeaksTable({ activeTab, preferences, data, info }) {
|
|
|
46
50
|
data: { id: params.id, xIndex: params.xIndex },
|
|
47
51
|
});
|
|
48
52
|
}, [dispatch]);
|
|
49
|
-
const peaksPreferences = (0, react_1.useMemo)(() => (0, LocalStorage_1.getValue)(preferences, `formatting.panels.peaks.[${activeTab}]`, defaultValues_1.peaksDefaultValues), [activeTab, preferences]);
|
|
53
|
+
const peaksPreferences = (0, react_1.useMemo)(() => (0, LocalStorage_1.getValue)(preferences.current, `formatting.panels.peaks.[${activeTab}]`, defaultValues_1.peaksDefaultValues), [activeTab, preferences]);
|
|
50
54
|
const saveDeltaPPMRefsHandler = (0, react_1.useCallback)((event, row) => {
|
|
51
55
|
const shiftValue = parseFloat(event.target.value) - parseFloat(row.value);
|
|
52
56
|
dispatch({ type: Types_1.SHIFT_SPECTRUM, shiftValue });
|
|
@@ -70,7 +74,7 @@ function PeaksTable({ activeTab, preferences, data, info }) {
|
|
|
70
74
|
index: 3,
|
|
71
75
|
Header: 'δ (ppm)',
|
|
72
76
|
accessor: (row) => format(row.value),
|
|
73
|
-
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)(EditableColumn_1.default, { value: format(row.original.value), onSave: (event) => saveDeltaPPMRefsHandler(event, row.original), type: "number" }
|
|
77
|
+
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)(EditableColumn_1.default, { value: format(row.original.value), onSave: (event) => saveDeltaPPMRefsHandler(event, row.original), type: "number" })),
|
|
74
78
|
},
|
|
75
79
|
{
|
|
76
80
|
showWhen: 'showDeltaHz',
|
|
@@ -102,7 +106,7 @@ function PeaksTable({ activeTab, preferences, data, info }) {
|
|
|
102
106
|
minWidth: '24px',
|
|
103
107
|
},
|
|
104
108
|
id: 'delete-button',
|
|
105
|
-
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "delete-button", onClick: (e) => deletePeakHandler(e, row), children: (0, jsx_runtime_1.jsx)(fa_1.FaRegTrashAlt, {}
|
|
109
|
+
Cell: ({ row }) => ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "delete-button", onClick: (e) => deletePeakHandler(e, row), children: (0, jsx_runtime_1.jsx)(fa_1.FaRegTrashAlt, {}) })),
|
|
106
110
|
},
|
|
107
111
|
], [deletePeakHandler]);
|
|
108
112
|
const tableColumns = (0, react_1.useMemo)(() => {
|
|
@@ -115,6 +119,6 @@ function PeaksTable({ activeTab, preferences, data, info }) {
|
|
|
115
119
|
}
|
|
116
120
|
return columns.sort((object1, object2) => object1.index - object2.index);
|
|
117
121
|
}, [COLUMNS, initialColumns, peaksPreferences]);
|
|
118
|
-
return data && data.length > 0 ? ((0, jsx_runtime_1.jsx)(ReactTable_1.default, { data: data, columns: tableColumns, approxItemHeight: 20, enableVirtualScroll: true }
|
|
122
|
+
return data && data.length > 0 ? ((0, jsx_runtime_1.jsx)(ReactTable_1.default, { data: data, columns: tableColumns, approxItemHeight: 20, enableVirtualScroll: true })) : ((0, jsx_runtime_1.jsx)(NoTableData_1.default, {}));
|
|
119
123
|
}
|
|
120
124
|
exports.default = (0, react_1.memo)(PeaksTable);
|
|
@@ -57,7 +57,7 @@ function RangesHeader({ ranges, info, onUnlink, onFilterActivated, onSettingClic
|
|
|
57
57
|
const showChangeRangesSumModal = (0, react_2.useCallback)(() => {
|
|
58
58
|
modal.show((0, jsx_runtime_1.jsx)(ChangeSumModal_1.default, { onClose: () => modal.close(), onSave: changeRangesSumHandler, header: currentSum
|
|
59
59
|
? `Set new Ranges Sum (Current: ${Number(currentSum).toFixed(2)})`
|
|
60
|
-
: 'Set new Ranges Sum', sumOptions: ranges?.options }
|
|
60
|
+
: 'Set new Ranges Sum', sumOptions: ranges?.options }));
|
|
61
61
|
}, [changeRangesSumHandler, currentSum, modal, ranges?.options]);
|
|
62
62
|
const removeAssignments = (0, react_2.useCallback)(() => {
|
|
63
63
|
onUnlink();
|
|
@@ -94,18 +94,20 @@ function RangesHeader({ ranges, info, onUnlink, onFilterActivated, onSettingClic
|
|
|
94
94
|
const handleShowJGraph = (0, react_2.useCallback)(() => {
|
|
95
95
|
dispatch({ type: Types_1.SHOW_J_GRAPH });
|
|
96
96
|
}, [dispatch]);
|
|
97
|
-
const saveToClipboardHandler = (0, react_2.useCallback)(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
97
|
+
const saveToClipboardHandler = (0, react_2.useCallback)((value) => {
|
|
98
|
+
void (async () => {
|
|
99
|
+
const success = await (0, Export_1.copyHTMLToClipboard)(value);
|
|
100
|
+
if (success) {
|
|
101
|
+
alert.success('Data copied to clipboard');
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
alert.error('copy to clipboard failed');
|
|
105
|
+
}
|
|
106
|
+
})();
|
|
105
107
|
}, [alert]);
|
|
106
108
|
const saveAsHTMLHandler = (0, react_2.useCallback)(() => {
|
|
107
109
|
const { originFrequency: observedFrequency, nucleus } = info;
|
|
108
|
-
const format = (0, get_1.default)(preferences, `formatting.nucleusByKey[${nucleus.toLowerCase()}]`);
|
|
110
|
+
const format = (0, get_1.default)(preferences.current, `formatting.nucleusByKey[${nucleus.toLowerCase()}]`);
|
|
109
111
|
const nbDecimalDelta = (0, FormatNumber_1.getNumberOfDecimals)(format.ppm);
|
|
110
112
|
const nbDecimalJ = (0, FormatNumber_1.getNumberOfDecimals)(format.hz);
|
|
111
113
|
const result = (0, nmr_processing_1.rangesToACS)(ranges.values, {
|
|
@@ -114,7 +116,7 @@ function RangesHeader({ ranges, info, onUnlink, onFilterActivated, onSettingClic
|
|
|
114
116
|
nbDecimalJ,
|
|
115
117
|
observedFrequency, //400
|
|
116
118
|
});
|
|
117
|
-
modal.show((0, jsx_runtime_1.jsx)(CopyClipboardModal_1.default, { text: result, onCopyClick: saveToClipboardHandler, onClose: () => modal.close() }
|
|
119
|
+
modal.show((0, jsx_runtime_1.jsx)(CopyClipboardModal_1.default, { text: result, onCopyClick: saveToClipboardHandler, onClose: () => modal.close() }), {});
|
|
118
120
|
}, [info, modal, preferences, ranges.values, saveToClipboardHandler]);
|
|
119
121
|
const changeSumConstantFlagHandler = (0, react_2.useCallback)((flag) => {
|
|
120
122
|
dispatch({
|
|
@@ -122,10 +124,10 @@ function RangesHeader({ ranges, info, onUnlink, onFilterActivated, onSettingClic
|
|
|
122
124
|
payload: flag,
|
|
123
125
|
});
|
|
124
126
|
}, [dispatch]);
|
|
125
|
-
return ((0, jsx_runtime_1.jsx)("div", { css: style, children: (0, jsx_runtime_1.jsxs)(DefaultPanelHeader_1.default, { counter: ranges?.values?.length, onDelete: handleDeleteAll, deleteToolTip: "Delete All Ranges", onFilter: onFilterActivated, filterToolTip: isFilterActive ? 'Show all ranges' : 'Hide ranges out of view', filterIsActive: isFilterActive, counterFiltered: filterCounter, showSettingButton: true, onSettingClick: onSettingClick, children: [(0, jsx_runtime_1.jsx)(ButtonToolTip_1.default, { popupTitle: "Preview publication string", popupPlacement: "right", onClick: saveAsHTMLHandler, className: "btn preview-publication-icon", children: (0, jsx_runtime_1.jsx)(fa_1.FaFileExport, {}
|
|
127
|
+
return ((0, jsx_runtime_1.jsx)("div", { css: style, children: (0, jsx_runtime_1.jsxs)(DefaultPanelHeader_1.default, { counter: ranges?.values?.length, onDelete: handleDeleteAll, deleteToolTip: "Delete All Ranges", onFilter: onFilterActivated, filterToolTip: isFilterActive ? 'Show all ranges' : 'Hide ranges out of view', filterIsActive: isFilterActive, counterFiltered: filterCounter, showSettingButton: true, onSettingClick: onSettingClick, children: [(0, jsx_runtime_1.jsx)(ButtonToolTip_1.default, { popupTitle: "Preview publication string", popupPlacement: "right", onClick: saveAsHTMLHandler, className: "btn preview-publication-icon", children: (0, jsx_runtime_1.jsx)(fa_1.FaFileExport, {}) }), (0, jsx_runtime_1.jsx)(ButtonToolTip_1.default, { popupTitle: currentSum
|
|
126
128
|
? `Change Ranges Sum (${Number(currentSum).toFixed(2)})`
|
|
127
|
-
: 'Change Ranges Sum', popupPlacement: "right", onClick: showChangeRangesSumModal, className: "btn icon", children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrSum, {}
|
|
129
|
+
: 'Change Ranges Sum', popupPlacement: "right", onClick: showChangeRangesSumModal, className: "btn icon", children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrSum, {}) }), (0, jsx_runtime_1.jsx)(ButtonToolTip_1.default, { popupTitle: "Remove all Assignments", popupPlacement: "right", onClick: handleOnRemoveAssignments, disabled: !ranges || !ranges.values || ranges.values.length === 0, className: "btn icon", children: (0, jsx_runtime_1.jsx)(fa_1.FaUnlink, {}) }), (0, jsx_runtime_1.jsx)(ToggleButton_1.default, { popupTitle: showMultiplicityTrees
|
|
128
130
|
? 'Hide Multiplicity Trees in Spectrum'
|
|
129
|
-
: 'Show Multiplicity Trees in Spectrum', popupPlacement: "right", onClick: handleSetShowMultiplicityTrees, disabled: !ranges || !ranges.values || ranges.values.length === 0, children: (0, jsx_runtime_1.jsx)(fa_1.FaSitemap, { style: { pointerEvents: 'none', fontSize: '12px' } }
|
|
131
|
+
: 'Show Multiplicity Trees in Spectrum', popupPlacement: "right", onClick: handleSetShowMultiplicityTrees, disabled: !ranges || !ranges.values || ranges.values.length === 0, children: (0, jsx_runtime_1.jsx)(fa_1.FaSitemap, { style: { pointerEvents: 'none', fontSize: '12px' } }) }), (0, jsx_runtime_1.jsx)(ToggleButton_1.default, { popupTitle: showJGraph ? 'Hide J Graph' : 'Show J Graph', popupPlacement: "right", onClick: handleShowJGraph, disabled: !ranges || !ranges.values || ranges.values.length === 0, children: (0, jsx_runtime_1.jsx)(fa_1.FaChartBar, { style: { pointerEvents: 'none', fontSize: '12px' } }) }), (0, jsx_runtime_1.jsx)(ToggleButton_1.default, { popupTitle: showRangesIntegrals ? 'Hide integrals' : 'Show integrals', popupPlacement: "right", onClick: handleShowIntegrals, defaultValue: showRangesIntegrals, disabled: !ranges || !ranges.values || ranges.values.length === 0, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrIntegrate, { style: { pointerEvents: 'none', fontSize: '12px' } }) }), (0, jsx_runtime_1.jsx)(ToggleButton_1.default, { className: "icon", popupTitle: "fix integral values", popupPlacement: "right", onClick: changeSumConstantFlagHandler, children: (0, jsx_runtime_1.jsx)(im_1.ImLink, {}) })] }) }));
|
|
130
132
|
}
|
|
131
133
|
exports.default = RangesHeader;
|
|
@@ -76,8 +76,8 @@ function RangesTablePanelInner({ ranges, data, info, xDomain, preferences, activ
|
|
|
76
76
|
to,
|
|
77
77
|
});
|
|
78
78
|
const dataToClipboard = {
|
|
79
|
-
x: x.slice(fromIndex, toIndex),
|
|
80
|
-
y: re.slice(fromIndex, toIndex),
|
|
79
|
+
x: Array.from(x.slice(fromIndex, toIndex)),
|
|
80
|
+
y: Array.from(re.slice(fromIndex, toIndex)),
|
|
81
81
|
...value,
|
|
82
82
|
};
|
|
83
83
|
const success = await (0, Export_1.copyTextToClipboard)(JSON.stringify(dataToClipboard, undefined, 2));
|
|
@@ -90,8 +90,7 @@ function RangesTablePanelInner({ ranges, data, info, xDomain, preferences, activ
|
|
|
90
90
|
}
|
|
91
91
|
}, [data, alert]);
|
|
92
92
|
const rangesPreferences = (0, react_2.useMemo)(() => {
|
|
93
|
-
const _preferences = (0, get_1.default)(preferences, `formatting.panels.ranges.[${activeTab}]`) ||
|
|
94
|
-
(0, defaultValues_1.getRangeDefaultValues)(activeTab);
|
|
93
|
+
const _preferences = (0, get_1.default)(preferences.current, `formatting.panels.ranges.[${activeTab}]`) || (0, defaultValues_1.getRangeDefaultValues)(activeTab);
|
|
95
94
|
return _preferences;
|
|
96
95
|
}, [activeTab, preferences]);
|
|
97
96
|
const contextMenu = (0, react_2.useMemo)(() => [
|
|
@@ -127,7 +126,7 @@ function RangesTablePanelInner({ ranges, data, info, xDomain, preferences, activ
|
|
|
127
126
|
showMultiplicityTrees,
|
|
128
127
|
showJGraph,
|
|
129
128
|
isFilterActive,
|
|
130
|
-
}, onUnlink: unlinkRangeHandler, onFilterActivated: filterHandler, onSettingClick: settingsPanelHandler, filterCounter: rangesData.length }
|
|
129
|
+
}, onUnlink: unlinkRangeHandler, onFilterActivated: filterHandler, onSettingClick: settingsPanelHandler, filterCounter: rangesData.length })), isFlipped && ((0, jsx_runtime_1.jsx)(PreferencesHeader_1.default, { onSave: saveSettingHandler, onClose: settingsPanelHandler })), (0, jsx_runtime_1.jsx)("div", { className: "inner-container", children: !isFlipped ? ((0, jsx_runtime_1.jsx)("div", { className: "table-container", children: rangesData && rangesData.length > 0 ? ((0, jsx_runtime_1.jsx)(RangesTable_1.default, { activeTab: activeTab, tableData: rangesData, onUnlink: unlinkRangeHandler, context: contextMenu, preferences: rangesPreferences })) : ((0, jsx_runtime_1.jsx)(NoTableData_1.default, {})) })) : ((0, jsx_runtime_1.jsx)(RangesPreferences_1.default, { ref: settingRef })) })] }) }));
|
|
131
130
|
}
|
|
132
131
|
const MemoizedRangesTablePanel = (0, react_2.memo)(RangesTablePanelInner);
|
|
133
132
|
const emptyData = { ranges: {}, data: {}, info: {} };
|
|
@@ -148,6 +147,6 @@ function RangesTablePanel() {
|
|
|
148
147
|
xDomain,
|
|
149
148
|
activeTab,
|
|
150
149
|
molecules,
|
|
151
|
-
} }
|
|
150
|
+
} }));
|
|
152
151
|
}
|
|
153
152
|
exports.default = RangesTablePanel;
|
|
@@ -13,7 +13,6 @@ const FormikForm_1 = __importDefault(require("../../elements/formik/FormikForm")
|
|
|
13
13
|
const FormikInput_1 = __importDefault(require("../../elements/formik/FormikInput"));
|
|
14
14
|
const Alert_1 = require("../../elements/popup/Alert");
|
|
15
15
|
const useNucleus_1 = __importDefault(require("../../hooks/useNucleus"));
|
|
16
|
-
const preferencesReducer_1 = require("../../reducer/preferencesReducer");
|
|
17
16
|
const LocalStorage_1 = require("../../utility/LocalStorage");
|
|
18
17
|
const defaultValues_1 = require("../extra/preferences/defaultValues");
|
|
19
18
|
const styles = {
|
|
@@ -83,7 +82,7 @@ function RangesPreferencesInner({ nucleus, preferences, innerRef, }) {
|
|
|
83
82
|
acc[nucleusLabel] = (0, defaultValues_1.getRangeDefaultValues)(nucleusLabel);
|
|
84
83
|
return acc;
|
|
85
84
|
}, {});
|
|
86
|
-
const rangesPreferences = (0, LocalStorage_1.getValue)(preferences, `formatting.panels.ranges`);
|
|
85
|
+
const rangesPreferences = (0, LocalStorage_1.getValue)(preferences.current, `formatting.panels.ranges`);
|
|
87
86
|
formRef.current.setValues(rangesPreferences ? rangesPreferences : defaultValues);
|
|
88
87
|
}
|
|
89
88
|
}, [nucleus, preferences]);
|
|
@@ -92,7 +91,7 @@ function RangesPreferencesInner({ nucleus, preferences, innerRef, }) {
|
|
|
92
91
|
}, [updateValues]);
|
|
93
92
|
const saveHandler = (0, react_1.useCallback)((values) => {
|
|
94
93
|
preferences.dispatch({
|
|
95
|
-
type:
|
|
94
|
+
type: 'SET_PANELS_PREFERENCES',
|
|
96
95
|
payload: { key: 'ranges', value: values },
|
|
97
96
|
});
|
|
98
97
|
alert.success('ranges preferences saved successfully');
|
|
@@ -102,7 +101,7 @@ function RangesPreferencesInner({ nucleus, preferences, innerRef, }) {
|
|
|
102
101
|
formRef.current.submitForm();
|
|
103
102
|
},
|
|
104
103
|
}), []);
|
|
105
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: styles.container, children: (0, jsx_runtime_1.jsx)(FormikForm_1.default, { onSubmit: saveHandler, ref: formRef, children: nucleus?.map((nucleusLabel) => ((0, jsx_runtime_1.jsxs)("div", { style: styles.groupContainer, children: [(0, jsx_runtime_1.jsx)(IsotopesViewer_1.default, { style: styles.header, value: nucleusLabel }
|
|
104
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: styles.container, children: (0, jsx_runtime_1.jsx)(FormikForm_1.default, { onSubmit: saveHandler, ref: formRef, children: nucleus?.map((nucleusLabel) => ((0, jsx_runtime_1.jsxs)("div", { style: styles.groupContainer, children: [(0, jsx_runtime_1.jsx)(IsotopesViewer_1.default, { style: styles.header, value: nucleusLabel }), formatFields.map((field) => ((0, jsx_runtime_1.jsx)(FormikColumnFormatField_1.default, { label: field.label, checkControllerName: `${nucleusLabel}.${field.checkController}`, formatControllerName: `${nucleusLabel}.${field.formatController}` }, field.id))), (0, jsx_runtime_1.jsx)(Label_1.default, { title: "J Graph tolerance (Hz) :", style: { label: styles.inputLabel, wrapper: styles.inputWrapper }, children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: `${nucleusLabel}.jGraphTolerance`, type: "number" }) })] }, nucleusLabel))) }) }));
|
|
106
105
|
}
|
|
107
106
|
const MemoizedRangesPreferences = (0, react_1.memo)(RangesPreferencesInner);
|
|
108
107
|
// TODO: remove this hacky use of ref.
|
|
@@ -112,6 +111,6 @@ function RangesPreferences(prop, ref) {
|
|
|
112
111
|
return ((0, jsx_runtime_1.jsx)(MemoizedRangesPreferences, { innerRef: ref, ...{
|
|
113
112
|
preferences,
|
|
114
113
|
nucleus,
|
|
115
|
-
} }
|
|
114
|
+
} }));
|
|
116
115
|
}
|
|
117
116
|
exports.default = (0, react_1.forwardRef)(RangesPreferences);
|
|
@@ -13,7 +13,7 @@ const checkModifierKeyActivated_1 = __importDefault(require("../../../data/utili
|
|
|
13
13
|
const ContextMenu_1 = __importDefault(require("../../elements/ContextMenu"));
|
|
14
14
|
const useTableSortBy_1 = __importDefault(require("../../hooks/useTableSortBy"));
|
|
15
15
|
const RangesTableRow_1 = __importDefault(require("./RangesTableRow"));
|
|
16
|
-
const useMapRanges_1 = __importDefault(require("./useMapRanges"));
|
|
16
|
+
const useMapRanges_1 = __importDefault(require("./hooks/useMapRanges"));
|
|
17
17
|
const tableStyle = (0, react_1.css) `
|
|
18
18
|
border-spacing: 0;
|
|
19
19
|
border: 1px solid #dedede;
|
|
@@ -67,8 +67,8 @@ function RangesTable({ tableData, onUnlink, context, activeTab, preferences }) {
|
|
|
67
67
|
contextRef.current.handleContextMenu(e, rowData);
|
|
68
68
|
}
|
|
69
69
|
}, [contextRef]);
|
|
70
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Fragment, { children: [(0, jsx_runtime_1.jsxs)("table", { css: tableStyle, children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { children: "#" }
|
|
70
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Fragment, { children: [(0, jsx_runtime_1.jsxs)("table", { css: tableStyle, children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { children: "#" }), isVisible('showFrom') ? ((0, jsx_runtime_1.jsxs)("th", { id: "from", ...onSort, children: ["From", isSortedDesc('from').content] })) : null, isVisible('showTo') ? ((0, jsx_runtime_1.jsxs)("th", { id: "to", ...onSort, children: ["To ", isSortedDesc('to').content] })) : null, (0, jsx_runtime_1.jsx)("th", { children: "\u03B4 (ppm) " }), isVisible('showRelative') ? ((0, jsx_runtime_1.jsxs)("th", { id: "integration", ...onSort, children: ["Rel. ", element, " ", isSortedDesc('integration').content] })) : null, isVisible('showAbsolute') ? (0, jsx_runtime_1.jsx)("th", { children: "Absolute" }) : null, (0, jsx_runtime_1.jsx)("th", { children: "Mult." }), (0, jsx_runtime_1.jsx)("th", { children: "J (Hz)" }), (0, jsx_runtime_1.jsx)("th", { children: (0, jsx_runtime_1.jsx)(fa_1.FaLink, { style: { fontSize: 10 } }) }), (0, jsx_runtime_1.jsx)("th", { children: "\u03A3" }), (0, jsx_runtime_1.jsx)("th", { children: "Kind" }), (0, jsx_runtime_1.jsx)("th", { children: '' })] }) }), (0, jsx_runtime_1.jsx)("tbody", { children: data?.map((range) => {
|
|
71
71
|
return ((0, jsx_runtime_1.jsx)(RangesTableRow_1.default, { rowData: range, onUnlink: onUnlink, onContextMenu: (e, rowData) => contextMenuHandler(e, rowData), preferences: preferences }, range.rowKey));
|
|
72
|
-
}) }
|
|
72
|
+
}) })] }), (0, jsx_runtime_1.jsx)(ContextMenu_1.default, { ref: contextRef, context: context })] }));
|
|
73
73
|
}
|
|
74
74
|
exports.default = RangesTable;
|
|
@@ -114,6 +114,6 @@ function RangesTableRow({ rowData, onUnlink, onContextMenu, preferences, }) {
|
|
|
114
114
|
? ConstantlyHighlightedRowStyle
|
|
115
115
|
: null;
|
|
116
116
|
}, [assignmentRange.isActive, highlightRange.isActive, rowData]);
|
|
117
|
-
return ((0, jsx_runtime_1.jsxs)("tr", { onContextMenu: (e) => onContextMenu(e, rowData), css: trCss, children: [(0, jsx_runtime_1.jsx)("td", { ...rowSpanTags, ...onHoverRange, children: rowData.tableMetaInfo.rowIndex + 1 }
|
|
117
|
+
return ((0, jsx_runtime_1.jsxs)("tr", { onContextMenu: (e) => onContextMenu(e, rowData), css: trCss, children: [(0, jsx_runtime_1.jsx)("td", { ...rowSpanTags, ...onHoverRange, children: rowData.tableMetaInfo.rowIndex + 1 }), (0, ColumnsHelper_1.isColumnVisible)(preferences, 'showFrom') && ((0, jsx_runtime_1.jsx)(RangeColumn_1.default, { value: rowData.from, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: getFormat('showFrom', undefined) })), (0, ColumnsHelper_1.isColumnVisible)(preferences, 'showTo') && ((0, jsx_runtime_1.jsx)(RangeColumn_1.default, { value: rowData.to, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: getFormat('toFormat', undefined) })), (0, jsx_runtime_1.jsx)(SignalDeltaColumn_1.default, { rowData: rowData, onHoverSignal: onHoverSignal, preferences: preferences }), (0, ColumnsHelper_1.isColumnVisible)(preferences, 'showRelative') && ((0, jsx_runtime_1.jsx)(RelativeColumn_1.default, { rowData: rowData, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: getFormat('relativeFormat', undefined) })), (0, ColumnsHelper_1.isColumnVisible)(preferences, 'showAbsolute') && ((0, jsx_runtime_1.jsx)(AbsoluteColumn_1.default, { value: rowData.absolute, rowSpanTags: rowSpanTags, onHoverRange: onHoverRange, format: getFormat('absoluteFormat', undefined) })), (0, jsx_runtime_1.jsx)("td", { ...onHoverSignal, children: (0, get_1.default)(rowData, 'tableMetaInfo.signal.multiplicity', '') }), (0, jsx_runtime_1.jsx)(CouplingColumn_1.default, { rowData: rowData, onHoverSignal: onHoverSignal }), (0, jsx_runtime_1.jsx)(SignalAssignmentsColumn_1.default, { rowData: rowData, assignment: assignmentSignal, highlight: highlightSignal, onHover: onHoverSignal, unlinkVisibility: unlinkSignalButtonVisibility, onUnlinkVisibilityChange: (flag) => showUnlinkSignalButton(flag), onLink: linkHandler, onUnlink: unlinkHandler }), (0, jsx_runtime_1.jsx)(RangeAssignmentsColumn_1.default, { rowData: rowData, assignment: assignmentRange, highlight: highlightRangeAssignmentsColumn, onHover: onHoverRangeAssignmentsColumn, unlinkVisibility: unlinkRangeButtonVisibility, onUnlinkVisibilityChange: (flag) => showUnlinkRangeButton(flag), onLink: linkHandler, onUnlink: unlinkHandler, rowSpanTags: rowSpanTags, highlightData: highlightData }), (0, jsx_runtime_1.jsx)(ActionsColumn_1.default, { rowData: rowData, onHoverSignal: onHoverSignal, onHoverRange: onHoverRange, rowSpanTags: rowSpanTags })] }));
|
|
118
118
|
}
|
|
119
119
|
exports.default = RangesTableRow;
|
|
@@ -6,6 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
7
|
const FormatNumber_1 = __importDefault(require("../../../utility/FormatNumber"));
|
|
8
8
|
function AbsoluteColumn({ rowSpanTags, value, onHoverRange, format, }) {
|
|
9
|
-
return ((0, jsx_runtime_1.jsx)("td", { ...rowSpanTags, ...onHoverRange, children: (0, FormatNumber_1.default)(value, format) }
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)("td", { ...rowSpanTags, ...onHoverRange, children: (0, FormatNumber_1.default)(value, format) }));
|
|
10
10
|
}
|
|
11
11
|
exports.default = AbsoluteColumn;
|
|
@@ -9,17 +9,13 @@ const react_1 = require("@emotion/react");
|
|
|
9
9
|
const react_2 = require("react");
|
|
10
10
|
const fa_1 = require("react-icons/fa");
|
|
11
11
|
const SignalsKinds_1 = require("../../../../data/constants/SignalsKinds");
|
|
12
|
-
const assignment_1 = require("../../../assignment");
|
|
13
|
-
const DispatchContext_1 = require("../../../context/DispatchContext");
|
|
14
12
|
const Select_1 = __importDefault(require("../../../elements/Select"));
|
|
15
|
-
const
|
|
16
|
-
const EditRangeModal_1 = __importDefault(require("../../../modal/editRange/EditRangeModal"));
|
|
17
|
-
const Types_1 = require("../../../reducer/types/Types");
|
|
18
|
-
const ToolTypes_1 = require("../../../toolbar/ToolTypes");
|
|
13
|
+
const useEditRangeModal_1 = __importDefault(require("../hooks/useEditRangeModal"));
|
|
19
14
|
const styles = (0, react_1.css) `
|
|
20
15
|
width: 66px;
|
|
21
16
|
padding: 0 !important;
|
|
22
|
-
button {
|
|
17
|
+
button {import useEditRangeModal from './../../../hooks/useEditRangeModal';
|
|
18
|
+
|
|
23
19
|
background-color: transparent;
|
|
24
20
|
border: none;
|
|
25
21
|
padding: 5px;
|
|
@@ -36,63 +32,7 @@ const selectBoxStyle = {
|
|
|
36
32
|
height: '20px',
|
|
37
33
|
};
|
|
38
34
|
function ActionsColumn({ rowData, onHoverSignal, rowSpanTags, }) {
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
const assignmentData = (0, assignment_1.useAssignmentData)();
|
|
42
|
-
const zoomRangeHandler = (0, react_2.useCallback)(() => {
|
|
43
|
-
const margin = Math.abs(rowData.from - rowData.to);
|
|
44
|
-
dispatch({
|
|
45
|
-
type: Types_1.SET_X_DOMAIN,
|
|
46
|
-
xDomain: [rowData.from - margin, rowData.to + margin],
|
|
47
|
-
});
|
|
48
|
-
}, [dispatch, rowData.from, rowData.to]);
|
|
49
|
-
const deleteRangeHandler = (0, react_2.useCallback)(() => {
|
|
50
|
-
dispatch({
|
|
51
|
-
type: Types_1.DELETE_RANGE,
|
|
52
|
-
payload: {
|
|
53
|
-
data: { id: rowData.id, assignmentData },
|
|
54
|
-
},
|
|
55
|
-
});
|
|
56
|
-
}, [assignmentData, dispatch, rowData.id]);
|
|
57
|
-
const changeRangeSignalKindHandler = (0, react_2.useCallback)((value) => {
|
|
58
|
-
dispatch({
|
|
59
|
-
type: Types_1.CHANGE_RANGE_SIGNAL_KIND,
|
|
60
|
-
payload: {
|
|
61
|
-
data: { rowData, value },
|
|
62
|
-
},
|
|
63
|
-
});
|
|
64
|
-
}, [dispatch, rowData]);
|
|
65
|
-
const saveEditRangeHandler = (0, react_2.useCallback)((editedRowData) => {
|
|
66
|
-
dispatch({
|
|
67
|
-
type: Types_1.SAVE_EDITED_RANGE,
|
|
68
|
-
payload: {
|
|
69
|
-
editedRowData,
|
|
70
|
-
assignmentData,
|
|
71
|
-
},
|
|
72
|
-
});
|
|
73
|
-
}, [assignmentData, dispatch]);
|
|
74
|
-
const closeEditRangeHandler = (0, react_2.useCallback)(() => {
|
|
75
|
-
dispatch({ type: Types_1.RESET_SELECTED_TOOL });
|
|
76
|
-
modal.close();
|
|
77
|
-
}, [dispatch, modal]);
|
|
78
|
-
const openEditRangeHandler = (0, react_2.useCallback)(() => {
|
|
79
|
-
dispatch({
|
|
80
|
-
type: Types_1.SET_SELECTED_TOOL,
|
|
81
|
-
payload: { selectedTool: ToolTypes_1.options.editRange.id, tempRange: rowData },
|
|
82
|
-
});
|
|
83
|
-
modal.show((0, jsx_runtime_1.jsx)(EditRangeModal_1.default, { onCloseEditRangeModal: closeEditRangeHandler, onSaveEditRangeModal: saveEditRangeHandler, onZoomEditRangeModal: zoomRangeHandler, range: rowData }, void 0), {
|
|
84
|
-
position: Modal_1.positions.MIDDLE_RIGHT,
|
|
85
|
-
transition: Modal_1.transitions.SCALE,
|
|
86
|
-
isBackgroundBlur: false,
|
|
87
|
-
});
|
|
88
|
-
}, [
|
|
89
|
-
closeEditRangeHandler,
|
|
90
|
-
dispatch,
|
|
91
|
-
modal,
|
|
92
|
-
rowData,
|
|
93
|
-
saveEditRangeHandler,
|
|
94
|
-
zoomRangeHandler,
|
|
95
|
-
]);
|
|
96
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Fragment, { children: [(0, jsx_runtime_1.jsx)("td", { ...onHoverSignal, children: (0, jsx_runtime_1.jsx)(Select_1.default, { onChange: changeRangeSignalKindHandler, data: SignalsKinds_1.SignalKinds, defaultValue: rowData.tableMetaInfo.signal.kind, style: selectBoxStyle }, void 0) }, void 0), (0, jsx_runtime_1.jsxs)("td", { ...rowSpanTags, css: styles, children: [(0, jsx_runtime_1.jsx)("button", { type: "button", className: "delete-button", onClick: deleteRangeHandler, children: (0, jsx_runtime_1.jsx)(fa_1.FaRegTrashAlt, {}, void 0) }, void 0), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "zoom-button", onClick: zoomRangeHandler, children: (0, jsx_runtime_1.jsx)(fa_1.FaSearchPlus, { title: "Zoom to range in spectrum" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "edit-button", onClick: openEditRangeHandler, children: (0, jsx_runtime_1.jsx)(fa_1.FaEdit, { color: "blue" }, void 0) }, void 0)] }, void 0)] }, void 0));
|
|
35
|
+
const { editRange, deleteRange, changeRangeSignalKind, zoomRange } = (0, useEditRangeModal_1.default)(rowData);
|
|
36
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Fragment, { children: [(0, jsx_runtime_1.jsx)("td", { ...onHoverSignal, children: (0, jsx_runtime_1.jsx)(Select_1.default, { onChange: changeRangeSignalKind, data: SignalsKinds_1.SignalKinds, defaultValue: rowData.tableMetaInfo.signal.kind, style: selectBoxStyle }) }), (0, jsx_runtime_1.jsxs)("td", { ...rowSpanTags, css: styles, children: [(0, jsx_runtime_1.jsx)("button", { type: "button", className: "delete-button", onClick: deleteRange, children: (0, jsx_runtime_1.jsx)(fa_1.FaRegTrashAlt, {}) }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "zoom-button", onClick: zoomRange, children: (0, jsx_runtime_1.jsx)(fa_1.FaSearchPlus, { title: "Zoom to range in spectrum" }) }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "edit-button", onClick: editRange, children: (0, jsx_runtime_1.jsx)(fa_1.FaEdit, { color: "blue" }) })] })] }));
|
|
97
37
|
}
|
|
98
38
|
exports.default = ActionsColumn;
|
|
@@ -9,6 +9,6 @@ function CouplingColumn({ rowData, onHoverSignal }) {
|
|
|
9
9
|
const result = (0, get_1.default)(rowData, 'tableMetaInfo.signal.js');
|
|
10
10
|
return ((0, jsx_runtime_1.jsx)("td", { ...onHoverSignal, children: result
|
|
11
11
|
?.map((coupling) => !isNaN(coupling.coupling) ? coupling.coupling.toFixed(1) : '')
|
|
12
|
-
.join(',') }
|
|
12
|
+
.join(',') }));
|
|
13
13
|
}
|
|
14
14
|
exports.default = CouplingColumn;
|
|
@@ -36,10 +36,10 @@ function RangeAssignmentsColumn({ rowData, assignment, highlight, onUnlinkVisibi
|
|
|
36
36
|
highlight.isActive,
|
|
37
37
|
highlightData.highlight.sourceData?.type,
|
|
38
38
|
]);
|
|
39
|
-
return ((0, jsx_runtime_1.jsx)("td", { ...rowSpanTags, ...onHover, ...{ onClick: (e) => onLink?.(e, assignment) }, children: rowData.nbAtoms !== undefined && rowData.nbAtoms > 0 ? (rowData.diaIDs && rowData.diaIDs.length > 0 ? ((0, jsx_runtime_1.jsxs)("div", { onMouseEnter: () => visibilityChangeHandler(true), onMouseLeave: () => visibilityChangeHandler(false), children: [rowData.nbAtoms, " ", ' ( ', (0, jsx_runtime_1.jsx)("span", { style: spanCss, children: diaIDs.length }
|
|
39
|
+
return ((0, jsx_runtime_1.jsx)("td", { ...rowSpanTags, ...onHover, ...{ onClick: (e) => onLink?.(e, assignment) }, children: rowData.nbAtoms !== undefined && rowData.nbAtoms > 0 ? (rowData.diaIDs && rowData.diaIDs.length > 0 ? ((0, jsx_runtime_1.jsxs)("div", { onMouseEnter: () => visibilityChangeHandler(true), onMouseLeave: () => visibilityChangeHandler(false), children: [rowData.nbAtoms, " ", ' ( ', (0, jsx_runtime_1.jsx)("span", { style: spanCss, children: diaIDs.length }), ' ) ', (0, jsx_runtime_1.jsx)("sup", { children: (0, jsx_runtime_1.jsx)("button", { type: "button", style: {
|
|
40
40
|
visibility: unlinkVisibility ? 'visible' : 'hidden',
|
|
41
41
|
padding: 0,
|
|
42
42
|
margin: 0,
|
|
43
|
-
}, onClick: (e) => onUnlink?.(e, true), children: (0, jsx_runtime_1.jsx)(fa_1.FaMinusCircle, { color: "red" }
|
|
43
|
+
}, onClick: (e) => onUnlink?.(e, true), children: (0, jsx_runtime_1.jsx)(fa_1.FaMinusCircle, { color: "red" }) }) })] })) : assignment.isActive ? ((0, jsx_runtime_1.jsxs)("div", { children: [`${rowData.nbAtoms} (`, (0, jsx_runtime_1.jsx)("span", { style: spanStyle, children: "0" }), ')'] })) : (rowData.nbAtoms)) : assignment.isActive ? ((0, jsx_runtime_1.jsxs)("div", { children: ['0 (', (0, jsx_runtime_1.jsx)("span", { style: spanStyle, children: "0" }), ')'] })) : ('') }));
|
|
44
44
|
}
|
|
45
45
|
exports.default = (0, react_1.memo)(RangeAssignmentsColumn);
|
|
@@ -7,6 +7,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const FormatNumber_1 = __importDefault(require("../../../utility/FormatNumber"));
|
|
9
9
|
function RangeColumn({ value, rowSpanTags, onHoverRange, format, }) {
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)("td", { ...rowSpanTags, ...onHoverRange, children: (0, FormatNumber_1.default)(value, format) }
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)("td", { ...rowSpanTags, ...onHoverRange, children: (0, FormatNumber_1.default)(value, format) }));
|
|
11
11
|
}
|
|
12
12
|
exports.default = (0, react_1.memo)(RangeColumn);
|
|
@@ -25,6 +25,6 @@ function RelativeColumn({ rowData, rowSpanTags, onHoverRange, format }) {
|
|
|
25
25
|
},
|
|
26
26
|
});
|
|
27
27
|
}, [dispatch, rowData.id]);
|
|
28
|
-
return ((0, jsx_runtime_1.jsx)("td", { ...rowSpanTags, ...onHoverRange, children: (0, jsx_runtime_1.jsx)(EditableColumn_1.default, { value: integralVal, onSave: saveHandler, type: "number", style: { padding: '0.1rem 0.4rem' } }
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)("td", { ...rowSpanTags, ...onHoverRange, children: (0, jsx_runtime_1.jsx)(EditableColumn_1.default, { value: integralVal, onSave: saveHandler, type: "number", style: { padding: '0.1rem 0.4rem' } }) }));
|
|
29
29
|
}
|
|
30
30
|
exports.default = RelativeColumn;
|
|
@@ -29,6 +29,6 @@ function SignalAssignmentsColumn({ rowData, onHover, assignment, highlight, onUn
|
|
|
29
29
|
visibility: unlinkVisibility ? 'visible' : 'hidden',
|
|
30
30
|
padding: 0,
|
|
31
31
|
margin: 0,
|
|
32
|
-
}, onClick: (e) => onUnlink?.(e, false), children: (0, jsx_runtime_1.jsx)(fa_1.FaMinusCircle, { color: "red" }
|
|
32
|
+
}, onClick: (e) => onUnlink?.(e, false), children: (0, jsx_runtime_1.jsx)(fa_1.FaMinusCircle, { color: "red" }) }) })] })) : assignment.isActive ? ('0') : ('') }));
|
|
33
33
|
}
|
|
34
34
|
exports.default = (0, react_1.memo)(SignalAssignmentsColumn);
|
|
@@ -25,7 +25,7 @@ function SignalDeltaColumn({ rowData, onHoverSignal, preferences, }) {
|
|
|
25
25
|
});
|
|
26
26
|
}, [dispatch, rowData.id, signal.id]);
|
|
27
27
|
if (!signal)
|
|
28
|
-
return (0, jsx_runtime_1.jsx)("td", { children: '' }
|
|
29
|
-
return ((0, jsx_runtime_1.jsx)("td", { ...onHoverSignal, children: !(0, MultiplicityUtilities_1.checkMultiplicity)(signal.multiplicity, ['m']) ? (`${format(rowData.from, 'fromFormat')} - ${format(rowData.to, 'toFormat')}`) : ((0, jsx_runtime_1.jsx)(EditableColumn_1.default, { value: signal.delta.toFixed(3), onSave: saveHandler, type: "number", style: { padding: '0.1rem 0.4rem' } }
|
|
28
|
+
return (0, jsx_runtime_1.jsx)("td", { children: '' });
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)("td", { ...onHoverSignal, children: !(0, MultiplicityUtilities_1.checkMultiplicity)(signal.multiplicity, ['m']) ? (`${format(rowData.from, 'fromFormat')} - ${format(rowData.to, 'toFormat')}`) : ((0, jsx_runtime_1.jsx)(EditableColumn_1.default, { value: signal.delta.toFixed(3), onSave: saveHandler, type: "number", style: { padding: '0.1rem 0.4rem' } })) }));
|
|
30
30
|
}
|
|
31
31
|
exports.default = SignalDeltaColumn;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const assignment_1 = require("../../../assignment");
|
|
9
|
+
const DispatchContext_1 = require("../../../context/DispatchContext");
|
|
10
|
+
const Modal_1 = require("../../../elements/popup/Modal");
|
|
11
|
+
const options_1 = require("../../../elements/popup/options");
|
|
12
|
+
const EditRangeModal_1 = __importDefault(require("../../../modal/editRange/EditRangeModal"));
|
|
13
|
+
const Types_1 = require("../../../reducer/types/Types");
|
|
14
|
+
const ToolTypes_1 = require("../../../toolbar/ToolTypes");
|
|
15
|
+
function useEditRangeModal(range) {
|
|
16
|
+
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
17
|
+
const modal = (0, Modal_1.useModal)();
|
|
18
|
+
const assignmentData = (0, assignment_1.useAssignmentData)();
|
|
19
|
+
const zoomRange = (0, react_1.useCallback)(() => {
|
|
20
|
+
const margin = Math.abs(range.from - range.to);
|
|
21
|
+
dispatch({
|
|
22
|
+
type: Types_1.SET_X_DOMAIN,
|
|
23
|
+
xDomain: [range.from - margin, range.to + margin],
|
|
24
|
+
});
|
|
25
|
+
}, [dispatch, range.from, range.to]);
|
|
26
|
+
const deleteRange = (0, react_1.useCallback)(() => {
|
|
27
|
+
dispatch({
|
|
28
|
+
type: Types_1.DELETE_RANGE,
|
|
29
|
+
payload: {
|
|
30
|
+
data: { id: range.id, assignmentData },
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
}, [assignmentData, dispatch, range.id]);
|
|
34
|
+
const changeRangeSignalKind = (0, react_1.useCallback)((value) => {
|
|
35
|
+
dispatch({
|
|
36
|
+
type: Types_1.CHANGE_RANGE_SIGNAL_KIND,
|
|
37
|
+
payload: {
|
|
38
|
+
data: { rowData: range, value },
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
}, [dispatch, range]);
|
|
42
|
+
const saveEditRangeHandler = (0, react_1.useCallback)((editedRowData) => {
|
|
43
|
+
dispatch({
|
|
44
|
+
type: Types_1.SAVE_EDITED_RANGE,
|
|
45
|
+
payload: {
|
|
46
|
+
editedRowData,
|
|
47
|
+
assignmentData,
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
}, [assignmentData, dispatch]);
|
|
51
|
+
const closeEditRangeHandler = (0, react_1.useCallback)(() => {
|
|
52
|
+
dispatch({ type: Types_1.RESET_SELECTED_TOOL });
|
|
53
|
+
modal.close();
|
|
54
|
+
}, [dispatch, modal]);
|
|
55
|
+
const editRange = (0, react_1.useCallback)(() => {
|
|
56
|
+
dispatch({
|
|
57
|
+
type: Types_1.SET_SELECTED_TOOL,
|
|
58
|
+
payload: { selectedTool: ToolTypes_1.options.editRange.id, tempRange: range },
|
|
59
|
+
});
|
|
60
|
+
modal.show((0, jsx_runtime_1.jsx)(EditRangeModal_1.default, { onCloseEditRangeModal: closeEditRangeHandler, onSaveEditRangeModal: saveEditRangeHandler, onZoomEditRangeModal: zoomRange, range: range }), {
|
|
61
|
+
position: options_1.positions.MIDDLE_RIGHT,
|
|
62
|
+
transition: options_1.transitions.SCALE,
|
|
63
|
+
isBackgroundBlur: false,
|
|
64
|
+
});
|
|
65
|
+
}, [
|
|
66
|
+
closeEditRangeHandler,
|
|
67
|
+
dispatch,
|
|
68
|
+
modal,
|
|
69
|
+
range,
|
|
70
|
+
saveEditRangeHandler,
|
|
71
|
+
zoomRange,
|
|
72
|
+
]);
|
|
73
|
+
return (0, react_1.useMemo)(() => ({
|
|
74
|
+
editRange,
|
|
75
|
+
deleteRange,
|
|
76
|
+
zoomRange,
|
|
77
|
+
changeRangeSignalKind,
|
|
78
|
+
}), [changeRangeSignalKind, deleteRange, editRange, zoomRange]);
|
|
79
|
+
}
|
|
80
|
+
exports.default = useEditRangeModal;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = require("react");
|
|
7
|
-
const generateID_1 = __importDefault(require("
|
|
7
|
+
const generateID_1 = __importDefault(require("../../../../data/utilities/generateID"));
|
|
8
8
|
function useMapRanges(data) {
|
|
9
9
|
return (0, react_1.useMemo)(() => {
|
|
10
10
|
const _rangesData = [];
|
|
@@ -70,21 +70,23 @@ function SpectraPanelHeaderInner({ data, activeSpectrum, activeTab, displayerMod
|
|
|
70
70
|
const resetScaleHandler = (0, react_1.useCallback)(() => {
|
|
71
71
|
dispatch({ type: Types_1.RESET_SPECTRA_SCALE });
|
|
72
72
|
}, [dispatch]);
|
|
73
|
-
const automaticPickingHandler = (0, react_1.useCallback)(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
const automaticPickingHandler = (0, react_1.useCallback)(() => {
|
|
74
|
+
void (async () => {
|
|
75
|
+
const hideLoading = await alert.showLoading('Automatic Ranges/Zones detection for all spectra in progress');
|
|
76
|
+
setTimeout(() => {
|
|
77
|
+
dispatch({ type: Types_1.AUTO_RANGES_SPECTRA_PICKING });
|
|
78
|
+
dispatch({ type: Types_1.AUTO_ZONES_SPECTRA_PICKING });
|
|
79
|
+
hideLoading();
|
|
80
|
+
}, 0);
|
|
81
|
+
})();
|
|
80
82
|
}, [dispatch, alert]);
|
|
81
|
-
return ((0, jsx_runtime_1.jsxs)(DefaultPanelHeader_1.default, { onDelete: handleDelete, counter: spectrums?.length, deleteToolTip: "Delete all spectra", children: [(0, jsx_runtime_1.jsx)(ButtonToolTip_1.default, { popupTitle: "Hide all spectra", onClick: hideAllSpectrumsHandler, children: (0, jsx_runtime_1.jsx)(fa_1.FaEyeSlash, {}
|
|
83
|
+
return ((0, jsx_runtime_1.jsxs)(DefaultPanelHeader_1.default, { onDelete: handleDelete, counter: spectrums?.length, deleteToolTip: "Delete all spectra", children: [(0, jsx_runtime_1.jsx)(ButtonToolTip_1.default, { popupTitle: "Hide all spectra", onClick: hideAllSpectrumsHandler, children: (0, jsx_runtime_1.jsx)(fa_1.FaEyeSlash, {}) }), (0, jsx_runtime_1.jsx)(ButtonToolTip_1.default, { popupTitle: "Show all spectra", onClick: showAllSpectrumsHandler, children: (0, jsx_runtime_1.jsx)(fa_1.FaEye, {}) }), activeSpectrum && activeTab && activeTab.split(',').length > 1 && ((0, jsx_runtime_1.jsx)(ButtonToolTip_1.default, { popupTitle: "Add missing projection", onClick: addMissingProjectionHandler, children: (0, jsx_runtime_1.jsx)(fa_1.FaCreativeCommonsSamplingPlus, {}) })), displayerMode === Constants_1.DISPLAYER_MODE.DM_1D && spectrums.length > 1 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ButtonToolTip_1.default, { popupTitle: "Reset Scale", onClick: resetScaleHandler, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrResetScale, {}) }), (0, jsx_runtime_1.jsx)(ButtonToolTip_1.default, { popupTitle: "Same Top", onClick: setSameTopHandler, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrSameTop, {}) })] })), data && data.length > 0 && isAutomaticPickingVisible && ((0, jsx_runtime_1.jsx)(ButtonToolTip_1.default, { popupTitle: "Automatic Ranges/Zones picking for all spectra", onClick: automaticPickingHandler, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrRangePicking, {}) }))] }));
|
|
82
84
|
}
|
|
83
85
|
const MemoizedSpectraPanelHeader = (0, react_1.memo)(SpectraPanelHeaderInner);
|
|
84
86
|
function SpectrumsTabs({ spectrums }) {
|
|
85
87
|
const { data, activeSpectrum, activeTab, displayerMode } = (0, ChartContext_1.useChartData)();
|
|
86
88
|
const isToolVisible = (0, useCheckToolsVisibility_1.useCheckToolsVisibility)();
|
|
87
|
-
const isAutomaticPickingVisible = isToolVisible('
|
|
89
|
+
const isAutomaticPickingVisible = isToolVisible('autoRangesTool');
|
|
88
90
|
return ((0, jsx_runtime_1.jsx)(MemoizedSpectraPanelHeader, { ...{
|
|
89
91
|
data,
|
|
90
92
|
activeSpectrum,
|
|
@@ -92,6 +94,6 @@ function SpectrumsTabs({ spectrums }) {
|
|
|
92
94
|
displayerMode,
|
|
93
95
|
spectrums,
|
|
94
96
|
isAutomaticPickingVisible,
|
|
95
|
-
} }
|
|
97
|
+
} }));
|
|
96
98
|
}
|
|
97
99
|
exports.default = SpectrumsTabs;
|
|
@@ -57,16 +57,16 @@ function SpectrumListItem({ activeSpectrum, markersVisible, data, onChangeVisibi
|
|
|
57
57
|
...(activated
|
|
58
58
|
? { backgroundColor: '#fafafa' }
|
|
59
59
|
: { opacity: activeSpectrum ? 0.2 : 1 }),
|
|
60
|
-
}, onContextMenu: onContextMenu, children: [(0, jsx_runtime_1.jsx)(ShowHideSpectrumButton_1.default, { data: data, onChangeVisibility: onChangeVisibility, style: styles.button }
|
|
60
|
+
}, onContextMenu: onContextMenu, children: [(0, jsx_runtime_1.jsx)(ShowHideSpectrumButton_1.default, { data: data, onChangeVisibility: onChangeVisibility, style: styles.button }), (0, jsx_runtime_1.jsxs)("div", { "data-test-id": "activate-deactivate-spectrum-button", style: styles.name, onClick: () => onChangeActiveSpectrum(data), children: [(0, jsx_runtime_1.jsx)("div", { style: { ...styles.icon, width: '16px' }, children: data.info.isFid ? ((0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrFid, {})) : data.info.dimension === 2 ? ((0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmr2D, {})) : ((0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrFt, {})) }), (0, jsx_runtime_1.jsx)("span", { style: styles.info, children: name }), (0, jsx_runtime_1.jsx)("div", { style: styles.info,
|
|
61
61
|
// eslint-disable-next-line react/no-danger
|
|
62
62
|
dangerouslySetInnerHTML: {
|
|
63
63
|
__html: data.info && formatValueAsHTML(data.info.solvent),
|
|
64
|
-
} }
|
|
64
|
+
} }), (0, jsx_runtime_1.jsxs)("span", { style: styles.info, children: [(0, jsx_runtime_1.jsx)("span", { style: {
|
|
65
65
|
borderLeft: '0.55px solid #e5e5e5',
|
|
66
66
|
paddingRight: '5px',
|
|
67
|
-
} }
|
|
67
|
+
} }), data.info?.experiment] }), (0, jsx_runtime_1.jsx)("span", { style: styles.info, children: data.info?.pulse })] }), (0, jsx_runtime_1.jsx)(ShowHideMarkersButton_1.default, { data: data, style: {
|
|
68
68
|
...styles.icon,
|
|
69
69
|
...styles.button,
|
|
70
|
-
}, onChangeMarkersVisibility: onChangeMarkersVisibility, markersVisible: markersVisible }
|
|
70
|
+
}, onChangeMarkersVisibility: onChangeMarkersVisibility, markersVisible: markersVisible }), (0, jsx_runtime_1.jsx)(ColorIndicator_1.default, { style: styles.button, dimension: data.info.dimension, color: { positiveColor, color, negativeColor }, activated: activated, onClick: (event) => onOpenSettingModal(data, event) })] }));
|
|
71
71
|
}
|
|
72
72
|
exports.default = (0, react_1.memo)(SpectrumListItem);
|
|
@@ -19,6 +19,6 @@ function SpectrumListPanel() {
|
|
|
19
19
|
const tabChangeHandler = (0, react_1.useCallback)((e) => {
|
|
20
20
|
setSpectrums(e.data ? e.data : []);
|
|
21
21
|
}, []);
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: styles, children: [(0, jsx_runtime_1.jsx)(SpectraPanelHeader_1.default, { spectrums: spectrums }
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: styles, children: [(0, jsx_runtime_1.jsx)(SpectraPanelHeader_1.default, { spectrums: spectrums }), (0, jsx_runtime_1.jsx)(SpectrumsTabs_1.default, { onTabChange: tabChangeHandler })] }));
|
|
23
23
|
}
|
|
24
24
|
exports.default = (0, react_1.memo)(SpectrumListPanel);
|