nmrium 0.23.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 +2 -2
- package/lib/component/1d/FooterBanner.js +7 -8
- package/lib/component/1d/Integral.js +2 -2
- 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 +5 -5
- 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 +1 -1
- 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/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 +3 -3
- 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 +34 -33
- package/lib/component/NMRium.js +10 -10
- 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.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 +28 -14
- 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/hooks/useTableSortBy.d.ts +2 -1
- package/lib/component/hooks/useTableSortBy.js +27 -16
- 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.js +30 -23
- 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/editZone/EditPathLengthFormik.js +3 -3
- package/lib/component/modal/editZone/EditZoneModal.js +17 -15
- package/lib/component/modal/editZone/SignalFormTab.js +1 -1
- package/lib/component/modal/editZone/SignalsForm.js +2 -2
- 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 +49 -15
- package/lib/component/modal/setting/FormattingTabContent.js +3 -3
- package/lib/component/modal/setting/GeneralSettings.js +61 -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.js +1 -1
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +2 -2
- 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.js +5 -5
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +6 -6
- 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.js +46 -34
- 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 +3 -4
- 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 +3 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +4 -4
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -4
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/Confirmation.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +3 -3
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +3 -3
- 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 +4 -4
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +2 -2
- 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 +4 -7
- package/lib/component/panels/ZonesPanel/ZonesPreferences.js +4 -5
- package/lib/component/panels/ZonesPanel/ZonesTable.js +2 -2
- 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.js +5 -3
- package/lib/component/panels/predictionPanel/PredictionPanel.js +19 -17
- package/lib/component/reducer/Reducer.d.ts +7 -0
- package/lib/component/reducer/Reducer.js +7 -3
- package/lib/component/reducer/actions/FiltersActions.js +1 -1
- package/lib/component/reducer/actions/LoadActions.d.ts +2 -2
- package/lib/component/reducer/actions/LoadActions.js +20 -15
- package/lib/component/reducer/actions/MoleculeActions.js +5 -1
- package/lib/component/reducer/preferencesReducer.d.ts +183 -36
- package/lib/component/reducer/preferencesReducer.js +192 -83
- package/lib/component/reducer/types/Types.d.ts +6 -0
- 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 -34
- 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 -32
- package/lib/data/PredictionManager.d.ts +2 -1
- package/lib/data/PredictionManager.js +20 -13
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +4 -1
- 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 +7 -3
- package/lib-cjs/component/1d/FooterBanner.js +7 -8
- package/lib-cjs/component/1d/Integral.js +2 -2
- 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 +10 -6
- 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 +1 -1
- 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/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 +8 -4
- 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 -10
- 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 +27 -13
- 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/useTableSortBy.js +27 -16
- 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 +35 -24
- 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 +5 -1
- package/lib-cjs/component/modal/editZone/EditPathLengthFormik.js +3 -3
- package/lib-cjs/component/modal/editZone/EditZoneModal.js +17 -15
- package/lib-cjs/component/modal/editZone/SignalFormTab.js +1 -1
- package/lib-cjs/component/modal/editZone/SignalsForm.js +2 -2
- package/lib-cjs/component/modal/editZone/validation/EditZoneValidation.js +5 -1
- package/lib-cjs/component/modal/setting/ControllersTabContent.js +1 -1
- package/lib-cjs/component/modal/setting/DisplayTabContent.js +48 -14
- package/lib-cjs/component/modal/setting/FormattingTabContent.js +3 -3
- package/lib-cjs/component/modal/setting/GeneralSettings.js +64 -75
- package/lib-cjs/component/modal/setting/WorkspaceItem.js +64 -0
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignment.js +1 -1
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +2 -2
- 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 +5 -5
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +6 -6
- 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 +46 -34
- 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 +3 -4
- 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 +3 -3
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +4 -4
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +4 -4
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/Confirmation.js +1 -1
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +8 -4
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +3 -3
- 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 +4 -4
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +2 -2
- 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 +4 -7
- package/lib-cjs/component/panels/ZonesPanel/ZonesPreferences.js +4 -5
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +2 -2
- 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 +10 -4
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +19 -17
- package/lib-cjs/component/reducer/IgnoreActions.js +5 -1
- package/lib-cjs/component/reducer/Reducer.js +14 -5
- package/lib-cjs/component/reducer/actions/FiltersActions.js +6 -2
- package/lib-cjs/component/reducer/actions/LoadActions.js +25 -16
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +10 -2
- package/lib-cjs/component/reducer/actions/RangesActions.js +5 -1
- package/lib-cjs/component/reducer/actions/SpectraAnalysisAction.js +5 -1
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +5 -1
- package/lib-cjs/component/reducer/actions/ToolsActions.js +5 -1
- package/lib-cjs/component/reducer/actions/ZonesActions.js +5 -1
- package/lib-cjs/component/reducer/preferencesReducer.js +191 -81
- 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 -34
- 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 -32
- package/lib-cjs/data/Filters.js +5 -1
- package/lib-cjs/data/FiltersManager.js +5 -1
- package/lib-cjs/data/PredictionManager.js +19 -12
- package/lib-cjs/data/SpectraManager.js +5 -1
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +9 -2
- 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/panels/RangesPanel/useMapRanges.d.ts +0 -6
- package/lib/component/workspaces/exercise1D.d.ts +0 -2
- package/lib/component/workspaces/exercise1D.js +0 -46
- package/lib-cjs/component/workspaces/exercise1D.js +0 -49
|
@@ -102,9 +102,9 @@ export default function SetShiftToleranceModal({ onClose, onSave, previousTolera
|
|
|
102
102
|
const rows = useMemo(() => {
|
|
103
103
|
return tolerance
|
|
104
104
|
? Object.keys(tolerance).map((atomType) => {
|
|
105
|
-
return (_jsxs("tr", { children: [_jsx("td", { children: atomType }
|
|
105
|
+
return (_jsxs("tr", { children: [_jsx("td", { children: atomType }), _jsx("td", { children: _jsx("input", { type: "number", onChange: (e) => onChangeHandler(e, atomType), defaultValue: tolerance[atomType], style: !isValid[atomType] ? { backgroundColor: 'orange' } : {} }) })] }, `tolerance_${atomType}`));
|
|
106
106
|
})
|
|
107
107
|
: undefined;
|
|
108
108
|
}, [isValid, onChangeHandler, tolerance]);
|
|
109
|
-
return (_jsxs("div", { css: modalContainer, children: [_jsxs("div", { className: "header handle", children: [_jsx("span", { children: "Set Shift Tolerances" }
|
|
109
|
+
return (_jsxs("div", { css: modalContainer, children: [_jsxs("div", { className: "header handle", children: [_jsx("span", { children: "Set Shift Tolerances" }), _jsx(CloseButton, { onClick: onClose })] }), _jsxs("table", { children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: "Atom" }), _jsx("th", { children: "Value" })] }) }), _jsx("tbody", { children: rows })] }), _jsx("button", { type: "button", onClick: onSaveHandler, disabled: Object.keys(isValid).some((atomType) => !isValid[atomType]), children: "Set" })] }));
|
|
110
110
|
}
|
|
@@ -157,10 +157,10 @@ function SummaryPanel() {
|
|
|
157
157
|
});
|
|
158
158
|
}, [dispatch]);
|
|
159
159
|
const showSetMolecularFormulaModal = useCallback(() => {
|
|
160
|
-
modal.show(_jsx(SetMolecularFormulaModal, { onClose: () => modal.close(), onSave: handleOnSetMolecularFormula, molecules: molecules, previousMF: correlationsData.options.mf }
|
|
160
|
+
modal.show(_jsx(SetMolecularFormulaModal, { onClose: () => modal.close(), onSave: handleOnSetMolecularFormula, molecules: molecules, previousMF: correlationsData.options.mf }));
|
|
161
161
|
}, [correlationsData, handleOnSetMolecularFormula, modal, molecules]);
|
|
162
162
|
const showSetShiftToleranceModal = useCallback(() => {
|
|
163
|
-
modal.show(_jsx(SetShiftToleranceModal, { onClose: () => modal.close(), onSave: handleOnSetShiftTolerance, previousTolerance: correlationsData.options.tolerance }
|
|
163
|
+
modal.show(_jsx(SetShiftToleranceModal, { onClose: () => modal.close(), onSave: handleOnSetShiftTolerance, previousTolerance: correlationsData.options.tolerance }));
|
|
164
164
|
}, [correlationsData, handleOnSetShiftTolerance, modal]);
|
|
165
165
|
const additionalColumnTypes = useMemo(() => {
|
|
166
166
|
const columnTypes = ['H', 'H-H'].concat(correlationsData
|
|
@@ -310,7 +310,7 @@ function SummaryPanel() {
|
|
|
310
310
|
}, [filterIsActive]);
|
|
311
311
|
return (_jsxs("div", { css: panelStyle, children: [_jsxs(DefaultPanelHeader, { canDelete: false, counter: correlationsData ? correlationsData.values.length : 0, onFilter: handleOnFilter, filterToolTip: filterIsActive
|
|
312
312
|
? 'Show all correlations'
|
|
313
|
-
: 'Hide correlations out of view', filterIsActive: filterIsActive, counterFiltered: filteredCorrelationsData?.values.length, children: [_jsx(ToolTip, { title: `Set molecular formula (${correlationsData.options.mf})`, popupPlacement: "right", children: _jsx("button", { type: "button", onClick: showSetMolecularFormulaModal, children: _jsx(FaFlask, {}
|
|
313
|
+
: 'Hide correlations out of view', filterIsActive: filterIsActive, counterFiltered: filteredCorrelationsData?.values.length, children: [_jsx(ToolTip, { title: `Set molecular formula (${correlationsData.options.mf})`, popupPlacement: "right", children: _jsx("button", { type: "button", onClick: showSetMolecularFormulaModal, children: _jsx(FaFlask, {}) }) }), _jsx(ToolTip, { title: `Set shift tolerance`, popupPlacement: "right", children: _jsx("button", { type: "button", onClick: showSetShiftToleranceModal, children: _jsx(FaSlidersH, {}) }) }), _jsxs("div", { className: "extra-header-content", children: [_jsx("div", { className: "overview-container", children: _jsx(Overview, { correlationsData: correlationsData }) }), _jsx("div", { className: "table-view-selection", children: _jsxs("span", { children: [_jsx("label", { children: "View:" }), _jsx(Select, { onChange: (selection) => {
|
|
314
314
|
setSelectedAdditionalColumnsAtomType(selection);
|
|
315
315
|
if (selection === 'H-H') {
|
|
316
316
|
setShowProtonsAsRows(true);
|
|
@@ -323,6 +323,6 @@ function SummaryPanel() {
|
|
|
323
323
|
width: '70px',
|
|
324
324
|
height: '18px',
|
|
325
325
|
border: '1px solid grey',
|
|
326
|
-
} }
|
|
326
|
+
} })] }) })] })] }), _jsx(CorrelationTable, { correlationsData: correlationsData, filteredCorrelationsData: filteredCorrelationsData, additionalColumnData: additionalColumnData, editEquivalencesSaveHandler: editEquivalencesSaveHandler, onSaveEditNumericValues: editNumericValuesSaveHandler, onEditCorrelationTableCellHandler: editCorrelationTableCellHandler, showProtonsAsRows: showProtonsAsRows, spectraData: spectraData })] }));
|
|
327
327
|
}
|
|
328
328
|
export default memo(SummaryPanel);
|
|
@@ -66,7 +66,7 @@ function ActionsColumn({ rowData, rowSpanTags }) {
|
|
|
66
66
|
type: SET_SELECTED_TOOL,
|
|
67
67
|
payload: { selectedTool: options.editRange.id, tempRange: rowData },
|
|
68
68
|
});
|
|
69
|
-
modal.show(_jsx(EditZoneModal, { onCloseEditZoneModal: () => modal.close(), onSaveEditZoneModal: saveEditZoneHandler, onZoomEditZoneModal: () => zoomZoneHandler(), rowData: rowData }
|
|
69
|
+
modal.show(_jsx(EditZoneModal, { onCloseEditZoneModal: () => modal.close(), onSaveEditZoneModal: saveEditZoneHandler, onZoomEditZoneModal: () => zoomZoneHandler(), rowData: rowData }), {
|
|
70
70
|
position: positions.MIDDLE_RIGHT,
|
|
71
71
|
transition: transitions.SCALE,
|
|
72
72
|
isBackgroundBlur: false,
|
|
@@ -74,6 +74,6 @@ function ActionsColumn({ rowData, rowSpanTags }) {
|
|
|
74
74
|
}, [dispatch, modal, rowData, saveEditZoneHandler, zoomZoneHandler]);
|
|
75
75
|
return (_jsxs(Fragment, { children: [_jsx("td", { children: _jsx(Select, { onChange: (value) => {
|
|
76
76
|
changeSignalKindHandler(value);
|
|
77
|
-
}, data: SignalKinds, defaultValue: rowData.tableMetaInfo.signal.kind, style: selectBoxStyle }
|
|
77
|
+
}, data: SignalKinds, defaultValue: rowData.tableMetaInfo.signal.kind, style: selectBoxStyle }) }), _jsxs("td", { ...rowSpanTags, children: [_jsx("button", { type: "button", className: "delete-button", onClick: deleteZoneHandler, children: _jsx(FaRegTrashAlt, {}) }), _jsx("button", { type: "button", className: "zoom-button", onClick: zoomZoneHandler, children: _jsx(FaSearchPlus, { title: "Zoom to zone in spectrum" }) }), _jsx("button", { type: "button", className: "edit-button", onClick: openEditZoneHandler, children: _jsx(FaEdit, { color: "blue" }) })] })] }));
|
|
78
78
|
}
|
|
79
79
|
export default ActionsColumn;
|
|
@@ -13,6 +13,6 @@ function SignalAssignmentsColumn({ rowData, assignment, highlight, onHover, onCl
|
|
|
13
13
|
visibility: showUnlinkButton ? 'visible' : 'hidden',
|
|
14
14
|
padding: 0,
|
|
15
15
|
margin: 0,
|
|
16
|
-
}, onClick: (e) => onUnlink(e, false, axis), children: _jsx(FaMinusCircle, { color: "red" }
|
|
16
|
+
}, onClick: (e) => onUnlink(e, false, axis), children: _jsx(FaMinusCircle, { color: "red" }) }) })] })) : assignment.isActive && assignment.activeAxis === axis ? ('0') : ('') }));
|
|
17
17
|
}
|
|
18
18
|
export default SignalAssignmentsColumn;
|
|
@@ -2,6 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Fragment } from 'react';
|
|
3
3
|
import SignalAssignmentsColumn from './SignalAssignmentsColumn';
|
|
4
4
|
function SignalAssignmentsColumns({ rowData, assignmentSignal, onHoverSignalX, onHoverSignalY, showUnlinkButtonSignalX, showUnlinkButtonSignalY, setShowUnlinkButtonSignalX, setShowUnlinkButtonSignalY, onClick, onUnlink, highlightSignalX, highlightSignalY, }) {
|
|
5
|
-
return (_jsxs(Fragment, { children: [_jsx(SignalAssignmentsColumn, { rowData: rowData, assignment: assignmentSignal, highlight: highlightSignalX, onHover: onHoverSignalX, onClick: onClick, onUnlink: onUnlink, axis: 'x', showUnlinkButton: showUnlinkButtonSignalX, setShowUnlinkButton: setShowUnlinkButtonSignalX }
|
|
5
|
+
return (_jsxs(Fragment, { children: [_jsx(SignalAssignmentsColumn, { rowData: rowData, assignment: assignmentSignal, highlight: highlightSignalX, onHover: onHoverSignalX, onClick: onClick, onUnlink: onUnlink, axis: 'x', showUnlinkButton: showUnlinkButtonSignalX, setShowUnlinkButton: setShowUnlinkButtonSignalX }), _jsx(SignalAssignmentsColumn, { rowData: rowData, assignment: assignmentSignal, highlight: highlightSignalY, onHover: onHoverSignalY, onClick: onClick, onUnlink: onUnlink, axis: 'y', showUnlinkButton: showUnlinkButtonSignalY, setShowUnlinkButton: setShowUnlinkButtonSignalY })] }));
|
|
6
6
|
}
|
|
7
7
|
export default SignalAssignmentsColumns;
|
|
@@ -29,6 +29,6 @@ function SignalDeltaColumn({ rowData, onHoverSignalX, onHoverSignalY, }) {
|
|
|
29
29
|
},
|
|
30
30
|
});
|
|
31
31
|
}, [dispatch, id, rowData.id]);
|
|
32
|
-
return (_jsxs(Fragment, { children: [_jsx("td", { ...onHoverSignalX, children: signalDeltaX !== null ? (_jsx(EditableColumn, { value: signalDeltaX.toFixed(2), onSave: saveXHandler, type: "number", style: { padding: '0.1rem 0.4rem' } }
|
|
32
|
+
return (_jsxs(Fragment, { children: [_jsx("td", { ...onHoverSignalX, children: signalDeltaX !== null ? (_jsx(EditableColumn, { value: signalDeltaX.toFixed(2), onSave: saveXHandler, type: "number", style: { padding: '0.1rem 0.4rem' } })) : ('') }), _jsx("td", { ...onHoverSignalY, children: signalDeltaY !== null ? (_jsx(EditableColumn, { value: signalDeltaY.toFixed(2), onSave: saveYHandler, type: "number", style: { padding: '0.1rem 0.4rem' } })) : ('') })] }));
|
|
33
33
|
}
|
|
34
34
|
export default SignalDeltaColumn;
|
|
@@ -9,13 +9,13 @@ function ZoneAssignmentColumn({ rowData, assignment, highlight, onHover, onClick
|
|
|
9
9
|
color: 'red',
|
|
10
10
|
fontWeight: 'bold',
|
|
11
11
|
}
|
|
12
|
-
: { color: 'black', fontWeight: 'normal' }, children: lodashGet(rowData, `${axis}.diaIDs`, []).length }
|
|
12
|
+
: { color: 'black', fontWeight: 'normal' }, children: lodashGet(rowData, `${axis}.diaIDs`, []).length }), `)`, ' ', _jsx("sup", { children: _jsx("button", { type: "button", style: {
|
|
13
13
|
visibility: showUnlinkButton ? 'visible' : 'hidden',
|
|
14
14
|
padding: 0,
|
|
15
15
|
margin: 0,
|
|
16
|
-
}, onClick: (e) => onUnlink(e, true, axis), children: _jsx(FaMinusCircle, { color: "red" }
|
|
16
|
+
}, onClick: (e) => onUnlink(e, true, axis), children: _jsx(FaMinusCircle, { color: "red" }) }) })] })) : assignment.isActive && assignment.activeAxis === axis ? (_jsxs("div", { children: [`${lodashGet(rowData, `${axis}.nbAtoms`, '')} (`, _jsx("span", { style: {
|
|
17
17
|
color: 'red',
|
|
18
18
|
fontWeight: 'bold',
|
|
19
|
-
}, children: "0" }
|
|
19
|
+
}, children: "0" }), ')'] })) : (rowData[axis].nbAtoms)) : assignment.isActive && assignment.activeAxis === axis ? (_jsxs("div", { children: ['0 (', _jsx("span", { style: { color: 'red', fontWeight: 'bold' }, children: "0" }), ')'] })) : ('') }));
|
|
20
20
|
}
|
|
21
21
|
export default ZoneAssignmentColumn;
|
|
@@ -2,6 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Fragment } from 'react';
|
|
3
3
|
import ZoneAssignmentColumn from './ZoneAssignmentsColumn';
|
|
4
4
|
function ZoneAssignmentsColumns({ rowData, assignmentZone, onHoverZoneX, onHoverZoneY, showUnlinkButtonZoneX, showUnlinkButtonZoneY, setShowUnlinkButtonZoneX, setShowUnlinkButtonZoneY, rowSpanTags, onClick, onUnlink, highlightZoneX, highlightZoneY, }) {
|
|
5
|
-
return (_jsxs(Fragment, { children: [_jsx(ZoneAssignmentColumn, { rowData: rowData, assignment: assignmentZone, highlight: highlightZoneX, onHover: onHoverZoneX, onClick: onClick, onUnlink: onUnlink, axis: 'x', showUnlinkButton: showUnlinkButtonZoneX, setShowUnlinkButton: setShowUnlinkButtonZoneX, rowSpanTags: rowSpanTags }
|
|
5
|
+
return (_jsxs(Fragment, { children: [_jsx(ZoneAssignmentColumn, { rowData: rowData, assignment: assignmentZone, highlight: highlightZoneX, onHover: onHoverZoneX, onClick: onClick, onUnlink: onUnlink, axis: 'x', showUnlinkButton: showUnlinkButtonZoneX, setShowUnlinkButton: setShowUnlinkButtonZoneX, rowSpanTags: rowSpanTags }), _jsx(ZoneAssignmentColumn, { rowData: rowData, assignment: assignmentZone, highlight: highlightZoneY, onHover: onHoverZoneY, onClick: onClick, onUnlink: onUnlink, axis: 'y', showUnlinkButton: showUnlinkButtonZoneY, setShowUnlinkButton: setShowUnlinkButtonZoneY, rowSpanTags: rowSpanTags })] }));
|
|
6
6
|
}
|
|
7
7
|
export default ZoneAssignmentsColumns;
|
|
@@ -6,7 +6,6 @@ import { FaUnlink } from 'react-icons/fa';
|
|
|
6
6
|
import { useAssignmentData } from '../../assignment';
|
|
7
7
|
import { useChartData } from '../../context/ChartContext';
|
|
8
8
|
import { useDispatch } from '../../context/DispatchContext';
|
|
9
|
-
import { usePreferences } from '../../context/PreferencesContext';
|
|
10
9
|
import ToggleButton from '../../elements/ToggleButton';
|
|
11
10
|
import ToolTip from '../../elements/ToolTip/ToolTip';
|
|
12
11
|
import { useModal } from '../../elements/popup/Modal';
|
|
@@ -135,23 +134,21 @@ function ZonesPanelInner({ zones, activeTab, xDomain, yDomain, experiment }) {
|
|
|
135
134
|
position: relative;
|
|
136
135
|
}
|
|
137
136
|
`,
|
|
138
|
-
], children: [!isFlipped && (_jsxs(DefaultPanelHeader, { counter: zones.values ? zones.values.length : 0, onDelete: handleDeleteAll, deleteToolTip: "Delete All Zones", onFilter: handleOnFilter, filterToolTip: filterIsActive ? 'Show all zones' : 'Hide zones out of view', filterIsActive: filterIsActive, counterFiltered: tableData?.length, showSettingButton: true, onSettingClick: settingsPanelHandler, children: [_jsx(ToolTip, { title: `Remove all Assignments`, popupPlacement: "right", children: _jsx("button", { className: "remove-assignments-btn", type: "button", onClick: handleOnRemoveAssignments, disabled: !zones.values || zones.values.length === 0, children: _jsx(FaUnlink, {}
|
|
137
|
+
], children: [!isFlipped && (_jsxs(DefaultPanelHeader, { counter: zones.values ? zones.values.length : 0, onDelete: handleDeleteAll, deleteToolTip: "Delete All Zones", onFilter: handleOnFilter, filterToolTip: filterIsActive ? 'Show all zones' : 'Hide zones out of view', filterIsActive: filterIsActive, counterFiltered: tableData?.length, showSettingButton: true, onSettingClick: settingsPanelHandler, children: [_jsx(ToolTip, { title: `Remove all Assignments`, popupPlacement: "right", children: _jsx("button", { className: "remove-assignments-btn", type: "button", onClick: handleOnRemoveAssignments, disabled: !zones.values || zones.values.length === 0, children: _jsx(FaUnlink, {}) }) }), _jsx(ToggleButton, { popupTitle: "show/hide zones", popupPlacement: "right", defaultValue: true, onClick: () => visibilityHandler('zones'), children: _jsx("span", { style: { fontSize: '12px', pointerEvents: 'none' }, children: "z" }) }), _jsx(ToggleButton, { popupTitle: "show/hide signals", popupPlacement: "right", defaultValue: true, onClick: () => visibilityHandler('signals'), children: _jsx("span", { style: { fontSize: '12px', pointerEvents: 'none' }, children: "s" }) }), _jsx(ToggleButton, { popupTitle: "show/hide peaks", popupPlacement: "right", defaultValue: true, onClick: () => visibilityHandler('peaks'), children: _jsx("span", { style: { fontSize: '12px', pointerEvents: 'none' }, children: "p" }) })] })), isFlipped && (_jsx(PreferencesHeader, { onSave: saveSettingHandler, onClose: settingsPanelHandler })), _jsx("div", { className: "inner-container", children: !isFlipped ? (_jsx("div", { className: "table-container", children: tableData && tableData.length > 0 ? (_jsx(ZonesTable, { tableData: tableData, onUnlink: unlinkZoneHandler, nuclei: activeTab && activeTab.split(',').length === 2
|
|
139
138
|
? activeTab.split(',')
|
|
140
|
-
: ['?', '?'], experiment: experiment }
|
|
139
|
+
: ['?', '?'], experiment: experiment })) : (_jsx(NoTableData, {})) })) : (_jsx(ZonesPreferences, { ref: settingRef })) })] }) }));
|
|
141
140
|
}
|
|
142
141
|
const MemoizedZonesPanel = memo(ZonesPanelInner);
|
|
143
|
-
const emptyData = { zones: {} };
|
|
142
|
+
const emptyData = { zones: {}, info: {} };
|
|
144
143
|
export default function ZonesPanel() {
|
|
145
144
|
const { displayerKey, xDomain, yDomain, activeTab } = useChartData();
|
|
146
145
|
const { zones, info } = useSpectrum(emptyData);
|
|
147
|
-
const preferences = usePreferences();
|
|
148
146
|
return (_jsx(MemoizedZonesPanel, { ...{
|
|
149
147
|
xDomain,
|
|
150
148
|
yDomain,
|
|
151
149
|
activeTab,
|
|
152
150
|
displayerKey,
|
|
153
|
-
preferences,
|
|
154
151
|
zones,
|
|
155
152
|
experiment: info.experiment,
|
|
156
|
-
} }
|
|
153
|
+
} }));
|
|
157
154
|
}
|
|
@@ -6,7 +6,6 @@ import FormikColumnFormatField from '../../elements/formik/FormikColumnFormatFie
|
|
|
6
6
|
import FormikForm from '../../elements/formik/FormikForm';
|
|
7
7
|
import { useAlert } from '../../elements/popup/Alert';
|
|
8
8
|
import useNucleus from '../../hooks/useNucleus';
|
|
9
|
-
import { SET_PANELS_PREFERENCES } from '../../reducer/preferencesReducer';
|
|
10
9
|
import { getValue as getValueByKeyPath } from '../../utility/LocalStorage';
|
|
11
10
|
import { zoneDefaultValues } from '../extra/preferences/defaultValues';
|
|
12
11
|
const styles = {
|
|
@@ -79,7 +78,7 @@ function ZonesPreferencesInner({ nucleus, innerRef, }) {
|
|
|
79
78
|
acc[nucleusLabel] = zoneDefaultValues;
|
|
80
79
|
return acc;
|
|
81
80
|
}, {});
|
|
82
|
-
const zonesPreferences = getValueByKeyPath(preferences, `formatting.panels.zones`);
|
|
81
|
+
const zonesPreferences = getValueByKeyPath(preferences.current, `formatting.panels.zones`);
|
|
83
82
|
formRef.current.setValues(zonesPreferences ? zonesPreferences : defaultValues);
|
|
84
83
|
}
|
|
85
84
|
}, [nucleus, preferences]);
|
|
@@ -88,7 +87,7 @@ function ZonesPreferencesInner({ nucleus, innerRef, }) {
|
|
|
88
87
|
}, [updateValues]);
|
|
89
88
|
const saveHandler = useCallback((values) => {
|
|
90
89
|
preferences.dispatch({
|
|
91
|
-
type: SET_PANELS_PREFERENCES,
|
|
90
|
+
type: 'SET_PANELS_PREFERENCES',
|
|
92
91
|
payload: { key: 'zones', value: values },
|
|
93
92
|
});
|
|
94
93
|
alert.success('zones preferences saved successfully');
|
|
@@ -98,12 +97,12 @@ function ZonesPreferencesInner({ nucleus, innerRef, }) {
|
|
|
98
97
|
formRef.current.submitForm();
|
|
99
98
|
},
|
|
100
99
|
}), []);
|
|
101
|
-
return (_jsx("div", { style: styles.container, children: _jsx(FormikForm, { onSubmit: saveHandler, ref: formRef, children: nucleus?.map((nucleusLabel) => (_jsxs("div", { style: styles.groupContainer, children: [_jsx(IsotopesViewer, { style: styles.header, value: nucleusLabel }
|
|
100
|
+
return (_jsx("div", { style: styles.container, children: _jsx(FormikForm, { onSubmit: saveHandler, ref: formRef, children: nucleus?.map((nucleusLabel) => (_jsxs("div", { style: styles.groupContainer, children: [_jsx(IsotopesViewer, { style: styles.header, value: nucleusLabel }), formatFields.map((field) => (_jsx(FormikColumnFormatField, { label: field.label, checkControllerName: `${nucleusLabel}.${field.checkController}`, formatControllerName: `${nucleusLabel}.${field.formatController}` }, field.id)))] }, nucleusLabel))) }) }));
|
|
102
101
|
}
|
|
103
102
|
const MemoizedZonesPreferences = memo(ZonesPreferencesInner);
|
|
104
103
|
// TODO: remove this hacky use of ref.
|
|
105
104
|
function ZonesPreferences(props, ref) {
|
|
106
105
|
const nucleus = useNucleus();
|
|
107
|
-
return _jsx(MemoizedZonesPreferences, { innerRef: ref, ...{ nucleus } }
|
|
106
|
+
return _jsx(MemoizedZonesPreferences, { innerRef: ref, ...{ nucleus } });
|
|
108
107
|
}
|
|
109
108
|
export default forwardRef(ZonesPreferences);
|
|
@@ -112,13 +112,13 @@ function ZonesTable({ tableData, onUnlink, context, nuclei, experiment, }) {
|
|
|
112
112
|
}, [experiment, nuclei, tableData]);
|
|
113
113
|
const { items: sortedData, isSortedDesc, onSort } = useTableSortBy(data);
|
|
114
114
|
const rows = useMemo(() => sortedData.map((rowData, index) => (_jsx(ZonesTableRow, { rowIndex: index, rowData: rowData, onUnlink: onUnlink, onContextMenu: (e, rowData) => contextMenuHandler(e, rowData) }, `${rowData.tableMetaInfo.id}`))), [contextMenuHandler, sortedData, onUnlink]);
|
|
115
|
-
return (_jsxs("div", { children: [_jsxs("table", { css: tableStyle, children: [_jsxs("thead", { children: [_jsxs("tr", { children: [_jsx("th", { rowSpan: 2, children: "#" }
|
|
115
|
+
return (_jsxs("div", { children: [_jsxs("table", { css: tableStyle, children: [_jsxs("thead", { children: [_jsxs("tr", { children: [_jsx("th", { rowSpan: 2, children: "#" }), _jsx("th", { colSpan: 2, children: "\u03B4 (ppm)" }), _jsx("th", { colSpan: 2, children: _jsx(FaLink, {}) }), _jsx("th", { colSpan: 2, children: "\u03A3" }), _jsx("th", { rowSpan: 2, children: "Kind" }), _jsx("th", { rowSpan: 2, children: '' })] }), _jsxs("tr", { children: [_jsx("th", { id: "tableMetaInfo.signal.x.delta", ...onSort, children: _jsxs(SurroundedText, { text: "F2", children: [nuclei[0], ' ', isSortedDesc('tableMetaInfo.signal.x.delta').content] }) }), _jsx("th", { id: "tableMetaInfo.signal.y.delta", ...onSort, children: _jsxs(SurroundedText, { text: "F1", children: [nuclei[1], ' ', isSortedDesc('tableMetaInfo.signal.y.delta').content] }) }), _jsx("th", { children: _jsx(SurroundedText, { text: "F2", children: nuclei[0] }) }), _jsx("th", { children: _jsx(SurroundedText, { text: "F1", children: nuclei[1] }) }), _jsx("th", { children: _jsx(SurroundedText, { text: "F2", children: nuclei[0] }) }), _jsx("th", { children: _jsx(SurroundedText, { text: "F1", children: nuclei[1] }) })] })] }), _jsx("tbody", { children: rows })] }), _jsx(ContextMenu, { ref: contextRef, context: context })] }));
|
|
116
116
|
}
|
|
117
117
|
function SurroundedText(props) {
|
|
118
118
|
return (_jsxs(_Fragment, { children: [_jsx("div", { style: {
|
|
119
119
|
position: 'absolute',
|
|
120
120
|
fontSize: 8,
|
|
121
121
|
color: '#3539E6',
|
|
122
|
-
}, children: props.text }
|
|
122
|
+
}, children: props.text }), _jsx("div", { style: { marginLeft: 5 }, children: props.children })] }));
|
|
123
123
|
}
|
|
124
124
|
export default ZonesTable;
|
|
@@ -136,6 +136,6 @@ function ZonesTableRow({ rowData, onUnlink, onContextMenu, rowIndex, }) {
|
|
|
136
136
|
? HighlightedRowStyle
|
|
137
137
|
: lodashGet(rowData, 'tableMetaInfo.isConstantlyHighlighted', false) === true
|
|
138
138
|
? ConstantlyHighlightedRowStyle
|
|
139
|
-
: null, ...highlightZone.onHover, children: [_jsx("td", { ...rowSpanTags, children: rowIndex + 1 }
|
|
139
|
+
: null, ...highlightZone.onHover, children: [_jsx("td", { ...rowSpanTags, children: rowIndex + 1 }), _jsx(SignalDeltaColumn, { rowData: rowData, onHoverSignalX: onHoverSignalX, onHoverSignalY: onHoverSignalY }), _jsx(SignalAssignmentsColumns, { rowData: rowData, assignmentSignal: assignmentSignal, onHoverSignalX: onHoverSignalX, onHoverSignalY: onHoverSignalY, showUnlinkButtonSignalX: showUnlinkButtonSignalX, showUnlinkButtonSignalY: showUnlinkButtonSignalY, setShowUnlinkButtonSignalX: (show) => setShowUnlinkButtonSignalX(show), setShowUnlinkButtonSignalY: (show) => setShowUnlinkButtonSignalY(show), onClick: clickHandler, onUnlink: unlinkHandler, highlightSignalX: highlightSignalX, highlightSignalY: highlightSignalY }), _jsx(ZoneAssignmentsColumns, { rowData: rowData, assignmentZone: assignmentZone, onHoverZoneX: onHoverZoneX, onHoverZoneY: onHoverZoneY, showUnlinkButtonZoneX: showUnlinkButtonZoneX, showUnlinkButtonZoneY: showUnlinkButtonZoneY, setShowUnlinkButtonZoneX: (show) => setShowUnlinkButtonZoneX(show), setShowUnlinkButtonZoneY: (show) => setShowUnlinkButtonZoneY(show), rowSpanTags: rowSpanTags, onClick: clickHandler, onUnlink: unlinkHandler, highlightZoneX: highlightZoneX, highlightZoneY: highlightZoneY }), _jsx(ActionsColumn, { rowData: rowData, rowSpanTags: rowSpanTags })] }));
|
|
140
140
|
}
|
|
141
141
|
export default ZonesTableRow;
|
|
@@ -168,14 +168,14 @@ function DatabasePanelInner({ nucleus, selectedTool }) {
|
|
|
168
168
|
pointerEvents: 'none',
|
|
169
169
|
fontSize: '12px',
|
|
170
170
|
transform: 'rotate(90deg)',
|
|
171
|
-
} }
|
|
171
|
+
} }) }, `${selectedTool}`), _jsx(Select, { style: { flex: 2 }, data: result.databases, onChange: handleChangeDatabase }), _jsx(Select, { style: { flex: 1 }, data: result.solvents, onChange: handleSearch }), _jsx(Input, { value: keywords.searchKeywords, renderIcon: () => _jsx(IoSearchOutline, {}), style: { inputWrapper: { flex: 3 } }, className: "search-input", type: "text", debounceTime: 250, placeholder: "Search for parameter...", onChange: handleSearch, onClear: clearHandler, canClear: true })] })), isFlipped && (_jsx(PreferencesHeader, { onSave: saveSettingHandler, onClose: settingsPanelHandler })), _jsx("div", { className: "inner-container", children: !isFlipped ? (_jsx(DatabaseTable, { data: tableData, onAdd: resurrectHandler })) : (_jsx(DatabasePreferences, { ref: settingRef })) })] }));
|
|
172
172
|
}
|
|
173
173
|
const MemoizedDatabasePanel = memo(DatabasePanelInner);
|
|
174
174
|
export default function PeaksPanel() {
|
|
175
175
|
const { activeTab, toolOptions: { selectedTool }, } = useChartData();
|
|
176
176
|
if (!activeTab)
|
|
177
|
-
return _jsx("div", {}
|
|
178
|
-
return (_jsx(MemoizedDatabasePanel, { nucleus: activeTab, selectedTool: selectedTool }
|
|
177
|
+
return _jsx("div", {});
|
|
178
|
+
return (_jsx(MemoizedDatabasePanel, { nucleus: activeTab, selectedTool: selectedTool }));
|
|
179
179
|
}
|
|
180
180
|
function mapSolventsToSelect(solvents) {
|
|
181
181
|
const result = solvents.map((key) => {
|
|
@@ -4,7 +4,6 @@ import { usePreferences } from '../../context/PreferencesContext';
|
|
|
4
4
|
import FormikColumnFormatField from '../../elements/formik/FormikColumnFormatField';
|
|
5
5
|
import FormikForm from '../../elements/formik/FormikForm';
|
|
6
6
|
import { useAlert } from '../../elements/popup/Alert';
|
|
7
|
-
import { SET_PANELS_PREFERENCES } from '../../reducer/preferencesReducer';
|
|
8
7
|
import { getValue as getValueByKeyPath } from '../../utility/LocalStorage';
|
|
9
8
|
import { databaseDefaultValues } from '../extra/preferences/defaultValues';
|
|
10
9
|
const styles = {
|
|
@@ -45,7 +44,7 @@ function DatabasePreferences(props, ref) {
|
|
|
45
44
|
const alert = useAlert();
|
|
46
45
|
const formRef = useRef();
|
|
47
46
|
const updateValues = useCallback(() => {
|
|
48
|
-
const databasePreferences = getValueByKeyPath(preferences, `formatting.panels.database`);
|
|
47
|
+
const databasePreferences = getValueByKeyPath(preferences.current, `formatting.panels.database`);
|
|
49
48
|
formRef.current.setValues(databasePreferences ? databasePreferences : databaseDefaultValues);
|
|
50
49
|
}, [preferences]);
|
|
51
50
|
useEffect(() => {
|
|
@@ -53,7 +52,7 @@ function DatabasePreferences(props, ref) {
|
|
|
53
52
|
}, [updateValues]);
|
|
54
53
|
const saveHandler = useCallback((values) => {
|
|
55
54
|
preferences.dispatch({
|
|
56
|
-
type: SET_PANELS_PREFERENCES,
|
|
55
|
+
type: 'SET_PANELS_PREFERENCES',
|
|
57
56
|
payload: { key: 'database', value: values },
|
|
58
57
|
});
|
|
59
58
|
alert.success('database preferences saved successfully');
|
|
@@ -63,6 +62,6 @@ function DatabasePreferences(props, ref) {
|
|
|
63
62
|
formRef.current.submitForm();
|
|
64
63
|
},
|
|
65
64
|
}));
|
|
66
|
-
return (_jsx("div", { style: styles.container, children: _jsx(FormikForm, { onSubmit: saveHandler, ref: formRef, children: _jsxs("div", { style: styles.groupContainer, children: [_jsx(FormikColumnFormatField, { label: "Smiles", checkControllerName: "showSmiles", hideFormat: true }
|
|
65
|
+
return (_jsx("div", { style: styles.container, children: _jsx(FormikForm, { onSubmit: saveHandler, ref: formRef, children: _jsxs("div", { style: styles.groupContainer, children: [_jsx(FormikColumnFormatField, { label: "Smiles", checkControllerName: "showSmiles", hideFormat: true }), _jsx(FormikColumnFormatField, { label: "Solvent", checkControllerName: "showSolvent", hideFormat: true }), _jsx(FormikColumnFormatField, { label: "Names", checkControllerName: "showNames", hideFormat: true }), _jsx(FormikColumnFormatField, { label: "Range", checkControllerName: "showRange", hideFormat: true }), _jsx(FormikColumnFormatField, { label: "\u03B4 (ppm)", checkControllerName: "showDelta", hideFormat: true }), _jsx(FormikColumnFormatField, { label: "Assignment", checkControllerName: "showAssignment", hideFormat: true }), _jsx(FormikColumnFormatField, { label: "J (Hz)", checkControllerName: "showCoupling", hideFormat: true }), _jsx(FormikColumnFormatField, { label: "Multiplicity", checkControllerName: "showMultiplicity", hideFormat: true })] }) }) }));
|
|
67
66
|
}
|
|
68
67
|
export default forwardRef(DatabasePreferences);
|
|
@@ -82,7 +82,7 @@ const COLUMNS = [
|
|
|
82
82
|
Header: 'Smiles',
|
|
83
83
|
accessor: 'index',
|
|
84
84
|
enableRowSpan: true,
|
|
85
|
-
Cell: ({ row }) => (_jsx("div", { className: "smiles-container", style: { width: '100px', display: 'block', overflow: 'hidden' }, children: row?.original.smiles && (_jsx(SmilesSvgRenderer, { height: 60, width: 60, smiles: row.original.smiles }
|
|
85
|
+
Cell: ({ row }) => (_jsx("div", { className: "smiles-container", style: { width: '100px', display: 'block', overflow: 'hidden' }, children: row?.original.smiles && (_jsx(SmilesSvgRenderer, { height: 60, width: 60, smiles: row.original.smiles })) })),
|
|
86
86
|
},
|
|
87
87
|
];
|
|
88
88
|
function DatabaseTable({ data, onAdd }) {
|
|
@@ -97,11 +97,11 @@ function DatabaseTable({ data, onAdd }) {
|
|
|
97
97
|
id: 'add-button',
|
|
98
98
|
accessor: 'index',
|
|
99
99
|
enableRowSpan: true,
|
|
100
|
-
Cell: ({ row }) => (_jsx("button", { type: "button", className: "add-button", onClick: () => onAdd(row), children: _jsx(FaPlus, {}
|
|
100
|
+
Cell: ({ row }) => (_jsx("button", { type: "button", className: "add-button", onClick: () => onAdd(row), children: _jsx(FaPlus, {}) })),
|
|
101
101
|
},
|
|
102
102
|
], [onAdd]);
|
|
103
103
|
const tableColumns = useMemo(() => {
|
|
104
|
-
const databasePreferences = getValue(preferences, 'formatting.panels.database', databaseDefaultValues);
|
|
104
|
+
const databasePreferences = getValue(preferences.current, 'formatting.panels.database', databaseDefaultValues);
|
|
105
105
|
let columns = [...initialColumns];
|
|
106
106
|
for (const col of COLUMNS) {
|
|
107
107
|
const { showWhen, ...colParams } = col;
|
|
@@ -111,6 +111,6 @@ function DatabaseTable({ data, onAdd }) {
|
|
|
111
111
|
}
|
|
112
112
|
return columns.sort((object1, object2) => object1.index - object2.index);
|
|
113
113
|
}, [initialColumns, preferences]);
|
|
114
|
-
return data && data.length > 0 ? (_jsx(ReactTable, { data: data, columns: tableColumns, highlightedSource: HighlightedSource.DATABASE, groupKey: "index", approxItemHeight: 30, enableVirtualScroll: true }
|
|
114
|
+
return data && data.length > 0 ? (_jsx(ReactTable, { data: data, columns: tableColumns, highlightedSource: HighlightedSource.DATABASE, groupKey: "index", approxItemHeight: 30, enableVirtualScroll: true })) : (_jsx(NoTableData, {}));
|
|
115
115
|
}
|
|
116
116
|
export default memo(DatabaseTable);
|
|
@@ -14,6 +14,6 @@ const styles = {
|
|
|
14
14
|
};
|
|
15
15
|
// placeholder for empty tables if no data is available to show (e.g. peaks, integrals, ranges)
|
|
16
16
|
function NoTableData() {
|
|
17
|
-
return (_jsx("div", { style: styles.container, children: _jsx("p", { style: styles.label, children: "No Data" }
|
|
17
|
+
return (_jsx("div", { style: styles.container, children: _jsx("p", { style: styles.label, children: "No Data" }) }));
|
|
18
18
|
}
|
|
19
19
|
export default NoTableData;
|
|
@@ -52,7 +52,7 @@ const styles = css `
|
|
|
52
52
|
`;
|
|
53
53
|
function FilterPanelInner({ filters }) {
|
|
54
54
|
const filtersTable = useMemo(() => {
|
|
55
|
-
return filters ? (_jsxs(Table, { testID: "filters-table", children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [_jsx(TableCell, { align: "center", size: 1, children: "Label" }
|
|
55
|
+
return filters ? (_jsxs(Table, { testID: "filters-table", children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [_jsx(TableCell, { align: "center", size: 1, children: "Label" }), _jsx(TableCell, { align: "center", size: 2, children: "Properties" })] }) }), _jsx(TableBody, { css: styles, children: _jsx(FiltersTable, {}) })] })) : (_jsx(NoTableData, {}));
|
|
56
56
|
}, [filters]);
|
|
57
57
|
return filtersTable;
|
|
58
58
|
}
|
|
@@ -60,5 +60,5 @@ const emptyData = { filters: [] };
|
|
|
60
60
|
const MemoizedFilterPanel = memo(FilterPanelInner);
|
|
61
61
|
export default function FilterPanel() {
|
|
62
62
|
const { filters } = useSpectrum(emptyData);
|
|
63
|
-
return _jsx(MemoizedFilterPanel, { filters: filters }
|
|
63
|
+
return _jsx(MemoizedFilterPanel, { filters: filters });
|
|
64
64
|
}
|
|
@@ -19,12 +19,14 @@ function FiltersTableInner({ filters, spectraCounter, selectedTool, activeFilter
|
|
|
19
19
|
const selectedFilterRef = useRef({
|
|
20
20
|
index: null,
|
|
21
21
|
});
|
|
22
|
-
const handelFilterCheck = useCallback(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
const handelFilterCheck = useCallback((id, checked) => {
|
|
23
|
+
void (async () => {
|
|
24
|
+
const hideLoading = await alert.showLoading(`${checked ? 'Enable' : 'Disable'} filter in progress`);
|
|
25
|
+
setTimeout(() => {
|
|
26
|
+
dispatch({ type: ENABLE_FILTER, id, checked });
|
|
27
|
+
hideLoading();
|
|
28
|
+
}, 0);
|
|
29
|
+
})();
|
|
28
30
|
}, [alert, dispatch]);
|
|
29
31
|
const handelDeleteFilter = useCallback(({ id, name }) => {
|
|
30
32
|
const buttons = [
|
|
@@ -56,12 +58,14 @@ function FiltersTableInner({ filters, spectraCounter, selectedTool, activeFilter
|
|
|
56
58
|
buttons,
|
|
57
59
|
});
|
|
58
60
|
}, [alert, dispatch, modal, spectraCounter]);
|
|
59
|
-
const filterSnapShotHandler = useCallback(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
const filterSnapShotHandler = useCallback((newID) => {
|
|
62
|
+
void (async () => {
|
|
63
|
+
const hideLoading = await alert.showLoading('Filter snapshot process in progress');
|
|
64
|
+
setTimeout(() => {
|
|
65
|
+
dispatch({ type: SET_FILTER_SNAPSHOT, id: newID });
|
|
66
|
+
hideLoading();
|
|
67
|
+
}, 0);
|
|
68
|
+
})();
|
|
65
69
|
}, [alert, dispatch]);
|
|
66
70
|
const getStyle = useCallback((filter, index) => {
|
|
67
71
|
const { id, name } = filter;
|
|
@@ -86,7 +90,7 @@ function FiltersTableInner({ filters, spectraCounter, selectedTool, activeFilter
|
|
|
86
90
|
}, [activeFilterID, selectedTool]);
|
|
87
91
|
const filtersTableRow = useMemo(() => {
|
|
88
92
|
return filters?.map((d, index) => {
|
|
89
|
-
return (_jsxs(TableRow, { className: getStyle(d, index), children: [_jsx(TableCell, { align: "center", size: 2, onClick: () => filterSnapShotHandler(d.id), children: d.label }
|
|
93
|
+
return (_jsxs(TableRow, { className: getStyle(d, index), children: [_jsx(TableCell, { align: "center", size: 2, onClick: () => filterSnapShotHandler(d.id), children: d.label }), _jsx(TableCell, { align: "left", size: 3, children: _jsx("div", { onClick: (e) => e.stopPropagation(), children: _jsx(ObjectInspector, { data: d.error ? d.error : d.value }) }) }), _jsxs(TableCell, { align: "center", vAlign: "center", size: 1, children: [_jsx(CheckBox, { checked: d.flag, onChange: (event) => handelFilterCheck(d.id, event.target.checked) }), d.isDeleteAllow && (_jsx("button", { className: "btn", type: "button", onClick: () => handelDeleteFilter(d), children: _jsx(FaRegTrashAlt, {}) }))] })] }, d.id));
|
|
90
94
|
});
|
|
91
95
|
}, [
|
|
92
96
|
filterSnapShotHandler,
|
|
@@ -95,7 +99,7 @@ function FiltersTableInner({ filters, spectraCounter, selectedTool, activeFilter
|
|
|
95
99
|
handelDeleteFilter,
|
|
96
100
|
handelFilterCheck,
|
|
97
101
|
]);
|
|
98
|
-
return _jsx(_Fragment, { children: filtersTableRow }
|
|
102
|
+
return _jsx(_Fragment, { children: filtersTableRow });
|
|
99
103
|
}
|
|
100
104
|
const emptyData = { filters: [] };
|
|
101
105
|
const MemoizedFiltersTable = memo(FiltersTableInner);
|
|
@@ -103,5 +107,5 @@ export default function FilterTable() {
|
|
|
103
107
|
const { toolOptions: { selectedTool, data: { activeFilterID }, }, } = useChartData();
|
|
104
108
|
const { filters } = useSpectrum(emptyData);
|
|
105
109
|
const spectraCounter = useSpectraByActiveNucleus().length;
|
|
106
|
-
return (_jsx(MemoizedFiltersTable, { ...{ selectedTool, filters, spectraCounter, activeFilterID } }
|
|
110
|
+
return (_jsx(MemoizedFiltersTable, { ...{ selectedTool, filters, spectraCounter, activeFilterID } }));
|
|
107
111
|
}
|
|
@@ -35,10 +35,10 @@ const styles = css `
|
|
|
35
35
|
}
|
|
36
36
|
`;
|
|
37
37
|
function DefaultPanelHeader({ counter, onDelete = () => null, deleteToolTip = 'Delete', onFilter = () => null, filterToolTip = '', filterIsActive = false, counterFiltered = 0, children, onSettingClick = () => null, showSettingButton = false, canDelete = true, style = {}, className = '', }) {
|
|
38
|
-
return (_jsxs("div", { css: styles, ...{ style, className }, children: [_jsxs("div", { className: "left-container", children: [canDelete && (_jsx(ToolTip, { title: deleteToolTip, popupPlacement: "right", children: _jsx("button", { type: "button", onClick: onDelete, disabled: counter === 0, children: _jsx(FaRegTrashAlt, {}
|
|
38
|
+
return (_jsxs("div", { css: styles, ...{ style, className }, children: [_jsxs("div", { className: "left-container", children: [canDelete && (_jsx(ToolTip, { title: deleteToolTip, popupPlacement: "right", children: _jsx("button", { type: "button", onClick: onDelete, disabled: counter === 0, children: _jsx(FaRegTrashAlt, {}) }) })), filterToolTip ? (_jsx(ToggleButton, { popupTitle: filterToolTip, popupPlacement: "right", onClick: onFilter, defaultValue: filterIsActive, children: _jsx(FaFilter, { style: { pointerEvents: 'none', fontSize: '12px' } }) })) : null, children] }), counter !== undefined && (_jsxs("p", { className: "counter-label", children: ["[", ' ', filterIsActive &&
|
|
39
39
|
filterIsActive === true &&
|
|
40
40
|
counterFiltered !== undefined
|
|
41
41
|
? `${counterFiltered}/${counter}`
|
|
42
|
-
: counter, ' ', "]"] }
|
|
42
|
+
: counter, ' ', "]"] })), showSettingButton && (_jsx(ToolTip, { title: "preferences", popupPlacement: "left", children: _jsx("button", { type: "button", onClick: onSettingClick, children: _jsx(FaCog, {}) }) }))] }));
|
|
43
43
|
}
|
|
44
44
|
export default memo(DefaultPanelHeader);
|
|
@@ -19,6 +19,6 @@ const styles = css `
|
|
|
19
19
|
}
|
|
20
20
|
`;
|
|
21
21
|
function PreferencesHeader({ onClose, onSave }) {
|
|
22
|
-
return (_jsxs("div", { css: styles, children: [_jsx(CloseButton, { onClick: onClose, popupTitle: "close Preferences" }
|
|
22
|
+
return (_jsxs("div", { css: styles, children: [_jsx(CloseButton, { onClick: onClose, popupTitle: "close Preferences" }), _jsx(SaveButton, { onClick: onSave, popupTitle: "save Preferences" })] }));
|
|
23
23
|
}
|
|
24
24
|
export default memo(PreferencesHeader);
|
|
@@ -80,9 +80,11 @@ function PredictionOptions({ onPredict = () => null }) {
|
|
|
80
80
|
const handleSave = useCallback(() => {
|
|
81
81
|
refForm.current.submitForm();
|
|
82
82
|
}, []);
|
|
83
|
-
const submitHandler = useCallback(
|
|
84
|
-
|
|
83
|
+
const submitHandler = useCallback((values) => {
|
|
84
|
+
void (async () => {
|
|
85
|
+
onPredict(values);
|
|
86
|
+
})();
|
|
85
87
|
}, [onPredict]);
|
|
86
|
-
return (_jsxs("div", { css: styles, children: [_jsx("div", { children: _jsxs(FormikForm, { ref: refForm, initialValues: defaultPredictionOptions, validationSchema: predictionFormValidation, onSubmit: submitHandler, children: [_jsx(FormikErrorsSummary, {}
|
|
88
|
+
return (_jsxs("div", { css: styles, children: [_jsx("div", { children: _jsxs(FormikForm, { ref: refForm, initialValues: defaultPredictionOptions, validationSchema: predictionFormValidation, onSubmit: submitHandler, children: [_jsx(FormikErrorsSummary, {}), _jsxs("div", { className: "row margin-10", children: [_jsx("span", { className: "custom-label", children: "Frequency : " }), _jsx(FormikSelect, { data: FREQUENCIES, style: { width: 290, height: 30, margin: 0 }, name: "frequency" })] }), _jsxs("div", { className: "row", children: [_jsx(IsotopesViewer, { value: "1H", className: "custom-label" }), _jsx(Label, { title: "From", children: _jsx(FormikInput, { name: "1d.1H.from", type: "number" }) }), _jsx(Label, { title: "To", style: { label: { padding: '0 10px' } }, children: _jsx(FormikInput, { name: "1d.1H.to", type: "number" }) })] }), _jsxs("div", { className: "row", children: [_jsx(IsotopesViewer, { value: "13C", className: "custom-label" }), _jsx(Label, { title: "From", children: _jsx(FormikInput, { name: "1d.13C.from", type: "number" }) }), _jsx(Label, { title: "To", style: { label: { padding: '0 10px' } }, children: _jsx(FormikInput, { name: "1d.13C.to", type: "number" }) })] }), _jsxs("div", { className: "row margin-10 padding-h-10", children: [_jsx("span", { className: "custom-label", children: "Line Width : " }), _jsx(FormikInput, { name: "1d.lineWidth", type: "number", style: { input: { margin: 0 } } }), _jsx("span", { style: { paddingLeft: '0.4rem' }, children: " Hz " })] })] }) }), _jsx("div", { children: _jsx("button", { type: "button", onClick: handleSave, className: "btn", children: "Predict spectrum" }) })] }));
|
|
87
89
|
}
|
|
88
90
|
export default PredictionOptions;
|
|
@@ -12,22 +12,24 @@ export default function PredictionPane() {
|
|
|
12
12
|
}, []);
|
|
13
13
|
const dispatch = useDispatch();
|
|
14
14
|
const alert = useAlert();
|
|
15
|
-
const predictHandler = useCallback(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
15
|
+
const predictHandler = useCallback((values) => {
|
|
16
|
+
void (async () => {
|
|
17
|
+
if (molecule) {
|
|
18
|
+
dispatch({
|
|
19
|
+
type: SET_LOADING_FLAG,
|
|
20
|
+
isLoading: true,
|
|
21
|
+
});
|
|
22
|
+
const hideLoading = await alert.showLoading(`Predict 1H, 13C, COSY, HSQC, and HMBC in progress`);
|
|
23
|
+
dispatch({
|
|
24
|
+
type: PREDICT_SPECTRA,
|
|
25
|
+
payload: { mol: molecule, options: values },
|
|
26
|
+
});
|
|
27
|
+
hideLoading();
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
alert.error('No Molecule selected');
|
|
31
|
+
}
|
|
32
|
+
})();
|
|
31
33
|
}, [alert, dispatch, molecule]);
|
|
32
|
-
return (_jsx(MoleculePanel, { onMoleculeChange: changeHandler, actionsOptions: { hidePredict: true, hideDelete: true, hideExport: true }, children: _jsx(PredictionPreferences, { onPredict: predictHandler }
|
|
34
|
+
return (_jsx(MoleculePanel, { onMoleculeChange: changeHandler, actionsOptions: { hidePredict: true, hideDelete: true, hideExport: true }, children: _jsx(PredictionPreferences, { onPredict: predictHandler }) }));
|
|
33
35
|
}
|
|
@@ -18,6 +18,7 @@ export interface Margin {
|
|
|
18
18
|
bottom: number;
|
|
19
19
|
left: number;
|
|
20
20
|
}
|
|
21
|
+
export declare const getInitialState: () => State;
|
|
21
22
|
export declare const initialState: State;
|
|
22
23
|
export declare type VerticalAlignment = 'bottom' | 'center' | 'stack';
|
|
23
24
|
export interface VerticalAlign {
|
|
@@ -238,6 +239,11 @@ export interface State {
|
|
|
238
239
|
* @default false
|
|
239
240
|
*/
|
|
240
241
|
showJGraph: boolean;
|
|
242
|
+
/**
|
|
243
|
+
* prediction Index
|
|
244
|
+
* @default 0
|
|
245
|
+
*/
|
|
246
|
+
predictionIndex: number;
|
|
241
247
|
};
|
|
242
248
|
};
|
|
243
249
|
usedColors: UsedColors;
|
|
@@ -764,6 +770,7 @@ export declare const spectrumReducer: (base: {
|
|
|
764
770
|
readonly showMultiplicityTrees: boolean;
|
|
765
771
|
readonly showRangesIntegrals: boolean;
|
|
766
772
|
readonly showJGraph: boolean;
|
|
773
|
+
readonly predictionIndex: number;
|
|
767
774
|
};
|
|
768
775
|
};
|
|
769
776
|
readonly usedColors: {
|