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
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import * as Yup from 'yup';
|
|
3
|
+
const useValidation = () => useMemo(() => {
|
|
4
|
+
return Yup.object().shape({
|
|
5
|
+
signals: Yup.array()
|
|
6
|
+
.of(Yup.object().shape({
|
|
7
|
+
j: Yup.object().shape({
|
|
8
|
+
pathLength: Yup.object().shape({
|
|
9
|
+
from: Yup.number().required().positive().integer(),
|
|
10
|
+
to: Yup.number().required().positive().integer(),
|
|
11
|
+
}),
|
|
12
|
+
}),
|
|
13
|
+
}))
|
|
14
|
+
.min(1, 'There must be at least one signal in a zone!'),
|
|
15
|
+
});
|
|
16
|
+
}, []);
|
|
17
|
+
export default useValidation;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import DefaultPathLengths from '../../../../data/constants/DefaultPathLengths';
|
|
2
|
+
function isDefaultPathLength(pathLength, experimentType) {
|
|
3
|
+
return (DefaultPathLengths[experimentType] &&
|
|
4
|
+
pathLength.from === DefaultPathLengths[experimentType].from &&
|
|
5
|
+
pathLength.to === DefaultPathLengths[experimentType].to);
|
|
6
|
+
}
|
|
7
|
+
export default isDefaultPathLength;
|
|
@@ -2,6 +2,6 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import Label from '../../elements/Label';
|
|
3
3
|
import FormikInput from '../../elements/formik/FormikInput';
|
|
4
4
|
function ControllersTabContent() {
|
|
5
|
-
return (_jsxs(_Fragment, { children: [_jsx("p", { className: "section-header", children: "
|
|
5
|
+
return (_jsxs(_Fragment, { children: [_jsx("p", { className: "section-header", children: "Spectra" }), _jsx(Label, { title: "Transparency of Dimmed Spectra [ 0 - 1 ]", children: _jsx(FormikInput, { name: "controllers.dimmedSpectraTransparency", checkValue: (value) => value >= 0 && value <= 1, type: "number" }) })] }));
|
|
6
6
|
}
|
|
7
7
|
export default ControllersTabContent;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { NMRiumPreferences } from '../../NMRium';
|
|
3
3
|
interface DisplayTabContentProps {
|
|
4
|
-
preferences:
|
|
4
|
+
preferences: NMRiumPreferences;
|
|
5
5
|
}
|
|
6
6
|
declare function DisplayTabContent({ preferences }: DisplayTabContentProps): JSX.Element;
|
|
7
7
|
export default DisplayTabContent;
|
|
@@ -1,57 +1,95 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import lodashGet from 'lodash/get';
|
|
3
|
+
import { useMemo } from 'react';
|
|
4
|
+
import ReactTable from '../../elements/ReactTable/ReactTable';
|
|
3
5
|
import FormikCheckBox from '../../elements/formik/FormikCheckBox';
|
|
4
6
|
const LIST = [
|
|
5
7
|
{
|
|
6
8
|
label: 'Spectra selection panel',
|
|
7
|
-
name: '
|
|
9
|
+
name: 'panels.spectraPanel',
|
|
8
10
|
},
|
|
9
11
|
{
|
|
10
12
|
label: 'Spectra information Panel',
|
|
11
|
-
name: '
|
|
13
|
+
name: 'panels.informationPanel',
|
|
12
14
|
},
|
|
13
15
|
{
|
|
14
16
|
label: 'Peaks and peak picking',
|
|
15
|
-
name: '
|
|
17
|
+
name: 'panels.peaksPanel',
|
|
16
18
|
},
|
|
17
19
|
{
|
|
18
20
|
label: 'Integration and integrals',
|
|
19
|
-
name: '
|
|
21
|
+
name: 'panels.integralsPanel',
|
|
20
22
|
},
|
|
21
23
|
{
|
|
22
24
|
label: '1D ranges peak picking',
|
|
23
|
-
name: '
|
|
25
|
+
name: 'panels.rangesPanel',
|
|
24
26
|
},
|
|
25
27
|
{
|
|
26
28
|
label: 'Chemical structure panel',
|
|
27
|
-
name: '
|
|
29
|
+
name: 'panels.structuresPanel',
|
|
28
30
|
},
|
|
29
31
|
{
|
|
30
32
|
label: 'Filters Panel',
|
|
31
|
-
name: '
|
|
33
|
+
name: 'panels.filtersPanel',
|
|
32
34
|
},
|
|
33
35
|
{
|
|
34
36
|
label: '2D zones peak picking',
|
|
35
|
-
name: '
|
|
37
|
+
name: 'panels.zonesPanel',
|
|
36
38
|
},
|
|
37
39
|
{
|
|
38
40
|
label: 'Assignment summary Panel',
|
|
39
|
-
name: '
|
|
41
|
+
name: 'panels.summaryPanel',
|
|
40
42
|
},
|
|
41
43
|
{
|
|
42
44
|
label: 'Multiple Spectra Analysis Panel',
|
|
43
|
-
name: '
|
|
45
|
+
name: 'panels.multipleSpectraAnalysisPanel',
|
|
44
46
|
},
|
|
45
47
|
{
|
|
46
48
|
label: 'Database Panel',
|
|
47
|
-
name: '
|
|
49
|
+
name: 'panels.databasePanel',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: 'Prediction Panel',
|
|
53
|
+
name: 'panels.predictionPanel',
|
|
48
54
|
},
|
|
49
55
|
{
|
|
50
56
|
label: 'Experimental Features',
|
|
51
|
-
name: '
|
|
57
|
+
name: 'general.experimentalFeatures',
|
|
58
|
+
hideOpenOption: true,
|
|
52
59
|
},
|
|
53
60
|
];
|
|
61
|
+
function CheckBoxCell(props) {
|
|
62
|
+
return (_jsx(FormikCheckBox, { style: {
|
|
63
|
+
container: { display: 'block', margin: '0 auto', width: 'fit-content' },
|
|
64
|
+
}, className: "checkbox-element", name: props.name }, props.name));
|
|
65
|
+
}
|
|
54
66
|
function DisplayTabContent({ preferences }) {
|
|
55
|
-
|
|
67
|
+
const COLUMNS = useMemo(() => [
|
|
68
|
+
{
|
|
69
|
+
index: 1,
|
|
70
|
+
Header: '#',
|
|
71
|
+
Cell: ({ row }) => row.index + 1,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
index: 1,
|
|
75
|
+
Header: 'Feature',
|
|
76
|
+
accessor: 'label',
|
|
77
|
+
style: { width: '60%' },
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
index: 2,
|
|
81
|
+
Header: 'Active',
|
|
82
|
+
Cell: ({ row }) => (_jsx(CheckBoxCell, { name: `display.${row.original.name}.display` })),
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
index: 3,
|
|
86
|
+
Header: 'Open on load',
|
|
87
|
+
Cell: ({ row }) => !row.original.hideOpenOption ? (_jsx(CheckBoxCell, { name: `display.${row.original.name}.open` })) : (_jsx("div", {})),
|
|
88
|
+
},
|
|
89
|
+
], []);
|
|
90
|
+
const data = useMemo(() => {
|
|
91
|
+
return LIST.filter((item) => lodashGet(preferences, `${item.name}.hidden`) !== true);
|
|
92
|
+
}, [preferences]);
|
|
93
|
+
return (_jsx("div", { style: { width: '100%', overflow: 'hidden' }, children: _jsx(ReactTable, { columns: COLUMNS, data: data }) }));
|
|
56
94
|
}
|
|
57
95
|
export default DisplayTabContent;
|
|
@@ -62,9 +62,9 @@ function FormattingTabContent() {
|
|
|
62
62
|
const newNucleuses = [...nucleuses, newFormat];
|
|
63
63
|
setFieldValue('formatting.nucleus', newNucleuses);
|
|
64
64
|
}, [nucleuses, setFieldValue]);
|
|
65
|
-
return (_jsxs(Fragment, { children: [_jsx("p", { className: "section-header", children: "Formating according to Nucleus" }
|
|
65
|
+
return (_jsxs(Fragment, { children: [_jsx("p", { className: "section-header", children: "Formating according to Nucleus" }), _jsx("div", { css: styles, children: _jsxs("table", { children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { className: "counter-col", children: "#" }), _jsx("th", { className: "nucleus-label-col", children: "Nucleus " }), _jsx("th", { className: "nucleus-format-input-col", children: "\u03B4 (ppm)" }), _jsx("th", { className: "nucleus-format-input-col", children: "Coupling (Hz)" }), _jsx("th", { className: "nucleus-format-input-col" })] }) }), _jsx("tbody", { children: nucleuses?.map((nucleus, index) => {
|
|
66
66
|
const num = index + 1;
|
|
67
|
-
return (_jsxs("tr", { children: [_jsxs("td", { className: "counter-col", children: [_jsxs("span", { children: [num, " - "] }
|
|
68
|
-
}) }
|
|
67
|
+
return (_jsxs("tr", { children: [_jsxs("td", { className: "counter-col", children: [_jsxs("span", { children: [num, " - "] }), ' '] }), _jsx("td", { className: "nucleus-label-col", children: _jsx(FormikInput, { name: `formatting.nucleus.${index}.name`, className: "width-100" }) }), _jsx("td", { className: "nucleus-format-input-col", children: _jsx(FormikInput, { name: `formatting.nucleus.${index}.ppm`, className: "width-100" }) }), _jsx("td", { className: "nucleus-format-input-col", children: _jsx(FormikInput, { name: `formatting.nucleus.${index}.hz`, className: "width-100" }) }), _jsxs("td", { className: "operation-container", children: [_jsx(CloseButton, { onClick: () => deleteHandler(index), popupTitle: `remove ${nucleus.name}`, popupPlacement: "right" }), nucleuses.length === index + 1 && (_jsx("button", { className: "add", type: "button", onClick: addNewNucleusFormatHandler, children: _jsx(FaPlus, {}) }))] })] }, `${nucleus.key}`));
|
|
68
|
+
}) })] }) })] }));
|
|
69
69
|
}
|
|
70
70
|
export default FormattingTabContent;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
interface GeneralSettingsProps {
|
|
2
2
|
onClose?: () => void;
|
|
3
|
-
onSave?: () => void;
|
|
4
3
|
}
|
|
5
|
-
declare function GeneralSettings({ onClose
|
|
4
|
+
declare function GeneralSettings({ onClose }: GeneralSettingsProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
5
|
export default GeneralSettings;
|
|
@@ -1,31 +1,20 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
2
|
/** @jsxImportSource @emotion/react */
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import { useCallback, useRef, useState } from 'react';
|
|
5
|
-
import { usePreferences } from '../../context/PreferencesContext';
|
|
4
|
+
import { useCallback, useMemo, useRef, useState } from 'react';
|
|
5
|
+
import { usePreferences, useWorkspacesList, } from '../../context/PreferencesContext';
|
|
6
6
|
import CloseButton from '../../elements/CloseButton';
|
|
7
7
|
import Tab from '../../elements/Tab/Tab';
|
|
8
8
|
import Tabs, { PositionsEnum } from '../../elements/Tab/Tabs';
|
|
9
|
+
import DropDownButton from '../../elements/dropDownButton/DropDownButton';
|
|
9
10
|
import FormikForm from '../../elements/formik/FormikForm';
|
|
10
|
-
import {
|
|
11
|
+
import { useAlert } from '../../elements/popup/Alert';
|
|
12
|
+
import { ModalStyles } from '../ModalStyle';
|
|
11
13
|
import ControllersTabContent from './ControllersTabContent';
|
|
12
14
|
import DisplayTabContent from './DisplayTabContent';
|
|
13
15
|
import FormattingTabContent from './FormattingTabContent';
|
|
16
|
+
import WorkspaceItem from './WorkspaceItem';
|
|
14
17
|
const styles = css `
|
|
15
|
-
overflow: auto;
|
|
16
|
-
height: 100%;
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
|
|
20
|
-
.header {
|
|
21
|
-
text-align: center;
|
|
22
|
-
padding: 10px 0 10px 0px;
|
|
23
|
-
margin: 0px;
|
|
24
|
-
color: #005d9e;
|
|
25
|
-
place-items: normal;
|
|
26
|
-
text-transform: none;
|
|
27
|
-
background-color: #fcfcfc;
|
|
28
|
-
}
|
|
29
18
|
.main-content {
|
|
30
19
|
width: 100%;
|
|
31
20
|
flex: 1;
|
|
@@ -37,57 +26,6 @@ const styles = css `
|
|
|
37
26
|
width: 100%;
|
|
38
27
|
}
|
|
39
28
|
|
|
40
|
-
.inner-content {
|
|
41
|
-
padding: 15px 30px;
|
|
42
|
-
width: 100%;
|
|
43
|
-
overflow: auto;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
button:focus {
|
|
47
|
-
outline: none;
|
|
48
|
-
}
|
|
49
|
-
button:hover {
|
|
50
|
-
color: #007bff;
|
|
51
|
-
}
|
|
52
|
-
.btn:hover {
|
|
53
|
-
background-color: #ffffff;
|
|
54
|
-
}
|
|
55
|
-
.btn {
|
|
56
|
-
border: none;
|
|
57
|
-
padding: 0 15px;
|
|
58
|
-
background-color: #ffffff5e;
|
|
59
|
-
border-radius: 5px;
|
|
60
|
-
height: 25px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.footer-container {
|
|
64
|
-
display: flex;
|
|
65
|
-
align-items: flex-end;
|
|
66
|
-
justify-content: flex-end;
|
|
67
|
-
background: rgb(242, 242, 242);
|
|
68
|
-
background: -moz-linear-gradient(
|
|
69
|
-
0deg,
|
|
70
|
-
rgba(242, 242, 242, 1) 0%,
|
|
71
|
-
rgba(245, 245, 245, 1) 37%,
|
|
72
|
-
rgba(255, 255, 255, 1) 90%
|
|
73
|
-
);
|
|
74
|
-
background: -webkit-linear-gradient(
|
|
75
|
-
0deg,
|
|
76
|
-
rgba(242, 242, 242, 1) 0%,
|
|
77
|
-
rgba(245, 245, 245, 1) 37%,
|
|
78
|
-
rgba(255, 255, 255, 1) 90%
|
|
79
|
-
);
|
|
80
|
-
background: linear-gradient(
|
|
81
|
-
0deg,
|
|
82
|
-
rgba(242, 242, 242, 1) 0%,
|
|
83
|
-
rgba(245, 245, 245, 1) 37%,
|
|
84
|
-
rgba(255, 255, 255, 1) 90%
|
|
85
|
-
);
|
|
86
|
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#f2f2f2",endColorstr="#ffffff",GradientType=1);
|
|
87
|
-
padding: 6px 15px;
|
|
88
|
-
height: 55px;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
29
|
.section-header {
|
|
92
30
|
font-size: 13px;
|
|
93
31
|
color: #2ca8ff;
|
|
@@ -134,24 +72,79 @@ const styles = css `
|
|
|
134
72
|
width: 260px;
|
|
135
73
|
}
|
|
136
74
|
}
|
|
137
|
-
|
|
138
|
-
|
|
75
|
+
|
|
76
|
+
.workspace-container {
|
|
77
|
+
display: flex;
|
|
78
|
+
background-color: #f4f4f4;
|
|
79
|
+
align-items: center;
|
|
80
|
+
cursor: default;
|
|
81
|
+
padding: 0.5em;
|
|
82
|
+
.dropdown {
|
|
83
|
+
padding: 0.4em 1em;
|
|
84
|
+
}
|
|
85
|
+
& .label {
|
|
86
|
+
font-size: 0.8em;
|
|
87
|
+
}
|
|
139
88
|
}
|
|
140
89
|
`;
|
|
141
|
-
function GeneralSettings({ onClose
|
|
90
|
+
function GeneralSettings({ onClose }) {
|
|
142
91
|
const [activeTab, setActiveTab] = useState('controllers');
|
|
143
|
-
const preferences = usePreferences();
|
|
92
|
+
const { dispatch, ...preferences } = usePreferences();
|
|
93
|
+
const alert = useAlert();
|
|
144
94
|
const refForm = useRef();
|
|
95
|
+
const workspaces = useWorkspacesList();
|
|
96
|
+
const workspacesList = useMemo(() => {
|
|
97
|
+
return workspaces.concat([
|
|
98
|
+
{
|
|
99
|
+
key: 'new',
|
|
100
|
+
label: 'Custom workspace',
|
|
101
|
+
},
|
|
102
|
+
]);
|
|
103
|
+
}, [workspaces]);
|
|
145
104
|
const handleSave = useCallback(() => {
|
|
146
105
|
refForm.current.submitForm();
|
|
147
106
|
}, []);
|
|
107
|
+
const handleReset = useCallback(() => {
|
|
108
|
+
dispatch({ type: 'RESET_PREFERENCES' });
|
|
109
|
+
alert.success('Settings saved successfully');
|
|
110
|
+
onClose?.();
|
|
111
|
+
}, [alert, dispatch, onClose]);
|
|
148
112
|
const submitHandler = useCallback((values) => {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
113
|
+
dispatch({ type: 'SET_PREFERENCES', payload: values });
|
|
114
|
+
alert.success('Settings saved successfully');
|
|
115
|
+
onClose?.();
|
|
116
|
+
}, [alert, dispatch, onClose]);
|
|
152
117
|
const tabChangeHandler = useCallback((tab) => {
|
|
153
118
|
setActiveTab(tab.tabid);
|
|
154
119
|
}, []);
|
|
155
|
-
|
|
120
|
+
const addWorkSpaceHandler = useCallback((name) => {
|
|
121
|
+
dispatch({
|
|
122
|
+
type: 'ADD_WORKSPACE',
|
|
123
|
+
payload: {
|
|
124
|
+
workspace: name,
|
|
125
|
+
data: refForm.current.values,
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
}, [dispatch]);
|
|
129
|
+
const deleteWorkSpaceHandler = useCallback((key) => {
|
|
130
|
+
dispatch({
|
|
131
|
+
type: 'REMOVE_WORKSPACE',
|
|
132
|
+
payload: {
|
|
133
|
+
workspace: key,
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
}, [dispatch]);
|
|
137
|
+
const ChangeWorkspaceHandler = useCallback((option) => {
|
|
138
|
+
dispatch({
|
|
139
|
+
type: 'SET_WORKSPACE',
|
|
140
|
+
payload: {
|
|
141
|
+
workspace: option.key,
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
}, [dispatch]);
|
|
145
|
+
const renderItem = useCallback((item) => {
|
|
146
|
+
return (_jsx(WorkspaceItem, { item: item, onSave: addWorkSpaceHandler, onDelete: deleteWorkSpaceHandler }));
|
|
147
|
+
}, [addWorkSpaceHandler, deleteWorkSpaceHandler]);
|
|
148
|
+
return (_jsxs("div", { css: [ModalStyles, styles], children: [_jsxs("div", { className: "header handle", children: [_jsx("span", { children: "General Settings" }), _jsx(CloseButton, { onClick: onClose, className: "close-bt" })] }), _jsxs("div", { className: "workspace-container", children: [_jsx("span", { className: "label", children: "Workspace : " }), _jsx(DropDownButton, { data: workspacesList, renderItem: renderItem, selectedKey: preferences?.workspace.current, onSelect: ChangeWorkspaceHandler })] }), _jsx("div", { className: "main-content", children: _jsx(FormikForm, { ref: refForm, initialValues: preferences.current, onSubmit: submitHandler, children: _jsxs(Tabs, { position: PositionsEnum.LEFT, activeTab: activeTab, onClick: tabChangeHandler, children: [_jsx(Tab, { tablabel: "Controllers", tabid: "controllers", children: _jsx("div", { className: "inner-content", children: _jsx(ControllersTabContent, {}) }) }), _jsx(Tab, { tablabel: "Formatting", tabid: "formatting", children: _jsx("div", { className: "inner-content", children: _jsx(FormattingTabContent, {}) }) }), _jsx(Tab, { tablabel: "Display", tabid: "display", children: _jsx("div", { className: "inner-content", children: _jsx(DisplayTabContent, { preferences: preferences.current.display }) }) })] }) }, JSON.stringify(preferences.current)) }), _jsxs("div", { className: "footer-container", children: [_jsx("button", { type: "button", onClick: handleSave, className: "btn", children: "Save" }), _jsx("button", { type: "button", onClick: handleReset, className: "btn", children: "Reset" })] })] }));
|
|
156
149
|
}
|
|
157
150
|
export default GeneralSettings;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
/** @jsxImportSource @emotion/react */
|
|
3
|
+
import { css } from '@emotion/react';
|
|
4
|
+
import { useCallback, useState } from 'react';
|
|
5
|
+
import workspaces from '../../workspaces';
|
|
6
|
+
const styles = css `
|
|
7
|
+
.container {
|
|
8
|
+
display: flex;
|
|
9
|
+
span {
|
|
10
|
+
padding: 5px !important;
|
|
11
|
+
}
|
|
12
|
+
span {
|
|
13
|
+
flex: 1;
|
|
14
|
+
text-align: left !important;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.new-container {
|
|
19
|
+
background-color: #f6f6f6;
|
|
20
|
+
display: flex;
|
|
21
|
+
padding: 0.3em;
|
|
22
|
+
|
|
23
|
+
input {
|
|
24
|
+
padding: 0.5em;
|
|
25
|
+
color: black;
|
|
26
|
+
outline: none;
|
|
27
|
+
background-color: transparent !important;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.delete-button:hover {
|
|
32
|
+
color: white;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.save-button:hover {
|
|
36
|
+
color: green;
|
|
37
|
+
}
|
|
38
|
+
.delete-button,
|
|
39
|
+
.save-button {
|
|
40
|
+
padding: 5px;
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
const WorkspaceItem = ({ item, onSave, onDelete }) => {
|
|
44
|
+
const [name, setName] = useState('');
|
|
45
|
+
const addWorkspaceHandler = useCallback((e) => {
|
|
46
|
+
e.stopPropagation();
|
|
47
|
+
setName('');
|
|
48
|
+
onSave(name);
|
|
49
|
+
}, [name, onSave]);
|
|
50
|
+
const deleteWorkspaceHandler = useCallback((e) => {
|
|
51
|
+
e.stopPropagation();
|
|
52
|
+
onDelete(item.key);
|
|
53
|
+
}, [item.key, onDelete]);
|
|
54
|
+
const onTextChange = useCallback((e) => {
|
|
55
|
+
setName(e.target.value);
|
|
56
|
+
}, []);
|
|
57
|
+
return (_jsx("div", { css: styles, children: item.key === 'new' ? (_jsxs("div", { className: "new-container", children: [_jsx("input", { value: name, placeholder: "Custom workspace", onClick: (e) => e.stopPropagation(), onChange: onTextChange }), _jsx("button", { type: "button", className: "save-button", onClick: addWorkspaceHandler, disabled: !name, children: "save" })] })) : (_jsxs("div", { className: "container", children: [_jsx("span", { children: item.label }), !workspaces[item.key] && (_jsx("button", { type: "button", className: "delete-button", onClick: deleteWorkspaceHandler, children: "Delete" }))] })) }));
|
|
58
|
+
};
|
|
59
|
+
export default WorkspaceItem;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
/** @jsxImportSource @emotion/react */
|
|
3
|
+
import { SvgNmrAssignment2 } from 'cheminfo-font';
|
|
4
|
+
import { useCallback } from 'react';
|
|
5
|
+
import Button from '../../elements/ButtonToolTip';
|
|
6
|
+
import { tablePanelStyle } from '../extra/BasicPanelStyle';
|
|
7
|
+
import DefaultPanelHeader from '../header/DefaultPanelHeader';
|
|
8
|
+
function AutomaticAssignment() {
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
10
|
+
const automaticAssignmentHandler = useCallback(() => { }, []);
|
|
11
|
+
return (_jsxs("div", { css: tablePanelStyle, children: [_jsx(DefaultPanelHeader, { showSettingButton: false, canDelete: false, children: _jsx(Button, { popupTitle: "automatic assignment", onClick: automaticAssignmentHandler, children: _jsx(SvgNmrAssignment2, { style: { fontSize: '18px' } }) }) }), _jsx("div", { className: "inner-container" })] }));
|
|
12
|
+
}
|
|
13
|
+
export default AutomaticAssignment;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface AutomaticAssignmentTableProps {
|
|
3
|
+
data: any;
|
|
4
|
+
}
|
|
5
|
+
declare function PeaksTable({ data }: AutomaticAssignmentTableProps): JSX.Element;
|
|
6
|
+
declare const _default: import("react").MemoExoticComponent<typeof PeaksTable>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { SvgNmrAssignment } from 'cheminfo-font';
|
|
3
|
+
import { useCallback, useMemo, memo } from 'react';
|
|
4
|
+
import ReactTable from '../../elements/ReactTable/ReactTable';
|
|
5
|
+
import NoTableData from '../extra/placeholder/NoTableData';
|
|
6
|
+
function PeaksTable({ data }) {
|
|
7
|
+
const assignHandler = useCallback((e, row) => {
|
|
8
|
+
e.preventDefault();
|
|
9
|
+
e.stopPropagation();
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11
|
+
const params = row.original;
|
|
12
|
+
}, []);
|
|
13
|
+
const COLUMNS = useMemo(() => [
|
|
14
|
+
{
|
|
15
|
+
index: 1,
|
|
16
|
+
Header: '#',
|
|
17
|
+
Cell: ({ row }) => row.index + 1,
|
|
18
|
+
style: { width: '1%', maxWidth: '40px', minWidth: '40px' },
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
index: 2,
|
|
22
|
+
Header: 'Score',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
index: 3,
|
|
26
|
+
Header: '',
|
|
27
|
+
style: {
|
|
28
|
+
width: '1%',
|
|
29
|
+
maxWidth: '24px',
|
|
30
|
+
minWidth: '24px',
|
|
31
|
+
},
|
|
32
|
+
id: 'assign-button',
|
|
33
|
+
Cell: ({ row }) => (_jsx("button", { type: "button", className: "assign-button", onClick: (e) => assignHandler(e, row), children: _jsx(SvgNmrAssignment, {}) })),
|
|
34
|
+
},
|
|
35
|
+
], [assignHandler]);
|
|
36
|
+
return data && data.length > 0 ? (_jsx(ReactTable, { data: data, columns: COLUMNS })) : (_jsx(NoTableData, {}));
|
|
37
|
+
}
|
|
38
|
+
export default memo(PeaksTable);
|
|
@@ -54,7 +54,7 @@ function InformationPanelInner({ info, meta }) {
|
|
|
54
54
|
minWidth: 100,
|
|
55
55
|
width: 20,
|
|
56
56
|
maxWidth: 20,
|
|
57
|
-
Cell: ({ row }) => (_jsx("p", { style: { padding: '5px', backgroundColor: 'white' }, children: row.original }
|
|
57
|
+
Cell: ({ row }) => (_jsx("p", { style: { padding: '5px', backgroundColor: 'white' }, children: row.original })),
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
Header: 'Value',
|
|
@@ -67,14 +67,14 @@ function InformationPanelInner({ info, meta }) {
|
|
|
67
67
|
fontFamily: 'monospace',
|
|
68
68
|
whiteSpace: 'pre',
|
|
69
69
|
overflow: 'hidden',
|
|
70
|
-
}, children: `${information[row.original]}` }
|
|
70
|
+
}, children: `${information[row.original]}` })),
|
|
71
71
|
},
|
|
72
72
|
], [information]);
|
|
73
|
-
return (_jsxs("div", { style: styles.container, children: [_jsx("div", { children: _jsx("input", { type: "text", style: styles.searchInput, placeholder: "Search for parameter...", onChange: handleSearch, ref: searchRef }
|
|
73
|
+
return (_jsxs("div", { style: styles.container, children: [_jsx("div", { children: _jsx("input", { type: "text", style: styles.searchInput, placeholder: "Search for parameter...", onChange: handleSearch, ref: searchRef }) }), _jsx("div", { style: styles.tableContainer, children: _jsx(ReactTableFlexLayout, { data: matches, columns: columns }) })] }));
|
|
74
74
|
}
|
|
75
75
|
const MemoizedInformationPanel = memo(InformationPanelInner);
|
|
76
76
|
const emptyData = { info: {}, meta: {} };
|
|
77
77
|
export default function InformationPanel() {
|
|
78
78
|
const { info, meta } = useSpectrum(emptyData);
|
|
79
|
-
return _jsx(MemoizedInformationPanel, { ...{ info, meta } }
|
|
79
|
+
return _jsx(MemoizedInformationPanel, { ...{ info, meta } });
|
|
80
80
|
}
|
|
@@ -59,7 +59,7 @@ function IntegralPanelInner({ integrals, info, activeTab, xDomain, preferences,
|
|
|
59
59
|
const showChangeIntegralSumModal = useCallback(() => {
|
|
60
60
|
modal.show(_jsx(ChangeSumModal, { onClose: () => modal.close(), onSave: changeIntegralSumHandler, header: currentSum
|
|
61
61
|
? `Set new Integrals Sum (Current: ${Number(currentSum).toFixed(2)})`
|
|
62
|
-
: 'Set new Integrals Sum', sumOptions: integrals?.options }
|
|
62
|
+
: 'Set new Integrals Sum', sumOptions: integrals?.options }));
|
|
63
63
|
}, [changeIntegralSumHandler, currentSum, integrals?.options, modal]);
|
|
64
64
|
const settingsPanelHandler = useCallback(() => {
|
|
65
65
|
setFlipStatus(!isFlipped);
|
|
@@ -108,7 +108,7 @@ function IntegralPanelInner({ integrals, info, activeTab, xDomain, preferences,
|
|
|
108
108
|
? 'Show all integrals'
|
|
109
109
|
: 'Hide integrals out of view', filterIsActive: filterIsActive, counterFiltered: filteredData.length, showSettingButton: true, onSettingClick: settingsPanelHandler, children: [_jsx(ToolTip, { title: currentSum
|
|
110
110
|
? `Change Integrals Sum (${Number(currentSum).toFixed(2)})`
|
|
111
|
-
: 'Change Integrals Sum', popupPlacement: "right", children: _jsx("button", { className: "sum-button", type: "button", onClick: showChangeIntegralSumModal, children: _jsx(SvgNmrSum, {}
|
|
111
|
+
: 'Change Integrals Sum', popupPlacement: "right", children: _jsx("button", { className: "sum-button", type: "button", onClick: showChangeIntegralSumModal, children: _jsx(SvgNmrSum, {}) }) }), _jsx(ToggleButton, { className: "fix-integral-toggle-btn", popupTitle: "fix integral values", popupPlacement: "right", onClick: toggleConstantSumHandler, children: _jsx(ImLink, {}) })] })), isFlipped && (_jsx(PreferencesHeader, { onSave: saveSettingHandler, onClose: settingsPanelHandler })), _jsx("div", { className: "inner-container", children: !isFlipped ? (_jsx(IntegralTable, { data: filteredData, activeTab: activeTab, preferences: preferences })) : (_jsx(IntegralsPreferences, { ref: settingRef })) })] }) }));
|
|
112
112
|
}
|
|
113
113
|
const MemoizedIntegralPanel = memo(IntegralPanelInner);
|
|
114
114
|
const emptyData = { integrals: {}, info: {} };
|
|
@@ -119,8 +119,8 @@ export default function IntegralPanel() {
|
|
|
119
119
|
return (_jsx(MemoizedIntegralPanel, { ...{
|
|
120
120
|
integrals,
|
|
121
121
|
info,
|
|
122
|
-
preferences,
|
|
122
|
+
preferences: preferences.current,
|
|
123
123
|
xDomain,
|
|
124
124
|
activeTab,
|
|
125
|
-
} }
|
|
125
|
+
} }));
|
|
126
126
|
}
|
|
@@ -60,13 +60,13 @@ function IntegralTable({ activeTab, data, preferences }) {
|
|
|
60
60
|
sortType: 'basic',
|
|
61
61
|
resizable: true,
|
|
62
62
|
accessor: (row) => row.kind,
|
|
63
|
-
Cell: ({ row }) => (_jsx(Select, { onChange: (value) => changeIntegralDataHandler(value, row), data: SignalKinds, style: selectStyle, defaultValue: row.original.kind }
|
|
63
|
+
Cell: ({ row }) => (_jsx(Select, { onChange: (value) => changeIntegralDataHandler(value, row), data: SignalKinds, style: selectStyle, defaultValue: row.original.kind })),
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
index: 7,
|
|
67
67
|
style: { width: '1%', maxWidth: '24px', minWidth: '24px' },
|
|
68
68
|
id: 'delete-button',
|
|
69
|
-
Cell: ({ row }) => (_jsx("button", { type: "button", className: "delete-button", onClick: (e) => deleteIntegralHandler(e, row), children: _jsx(FaRegTrashAlt, {}
|
|
69
|
+
Cell: ({ row }) => (_jsx("button", { type: "button", className: "delete-button", onClick: (e) => deleteIntegralHandler(e, row), children: _jsx(FaRegTrashAlt, {}) })),
|
|
70
70
|
},
|
|
71
71
|
], [changeIntegralDataHandler, deleteIntegralHandler]);
|
|
72
72
|
const saveRelativeHandler = useCallback((event, row) => {
|
|
@@ -76,7 +76,7 @@ function IntegralTable({ activeTab, data, preferences }) {
|
|
|
76
76
|
payload: { data },
|
|
77
77
|
});
|
|
78
78
|
}, [dispatch]);
|
|
79
|
-
const integralsPreferences = useMemo(() => getValue(preferences, `formatting.panels.integrals.[${activeTab}]`, integralDefaultValues), [activeTab, preferences]);
|
|
79
|
+
const integralsPreferences = useMemo(() => getValue(preferences.current, `formatting.panels.integrals.[${activeTab}]`, integralDefaultValues), [activeTab, preferences]);
|
|
80
80
|
const COLUMNS = useMemo(() => [
|
|
81
81
|
{
|
|
82
82
|
showWhen: 'showAbsolute',
|
|
@@ -90,7 +90,7 @@ function IntegralTable({ activeTab, data, preferences }) {
|
|
|
90
90
|
id: 'relative',
|
|
91
91
|
Header: () => {
|
|
92
92
|
const n = activeTab?.replace(/[0-9]/g, '');
|
|
93
|
-
return _jsx("span", { children: `Relative ${n}` }
|
|
93
|
+
return _jsx("span", { children: `Relative ${n}` });
|
|
94
94
|
},
|
|
95
95
|
accessor: (row) => {
|
|
96
96
|
return formatNumber(row.integral, lodashGet(integralsPreferences, 'relativeFormat', integralDefaultValues.relativeFormat));
|
|
@@ -99,7 +99,7 @@ function IntegralTable({ activeTab, data, preferences }) {
|
|
|
99
99
|
const value = formatNumber(row.original.integral, lodashGet(integralsPreferences, 'relativeFormat', integralDefaultValues.relativeFormat));
|
|
100
100
|
const flag = checkIntegralKind(row.original);
|
|
101
101
|
const integral = flag ? value : `[ ${value} ]`;
|
|
102
|
-
return (_jsx(EditableColumn, { value: integral, onSave: (event) => saveRelativeHandler(event, row.original), type: "number" }
|
|
102
|
+
return (_jsx(EditableColumn, { value: integral, onSave: (event) => saveRelativeHandler(event, row.original), type: "number" }));
|
|
103
103
|
},
|
|
104
104
|
},
|
|
105
105
|
], [activeTab, integralsPreferences, saveRelativeHandler]);
|
|
@@ -113,6 +113,6 @@ function IntegralTable({ activeTab, data, preferences }) {
|
|
|
113
113
|
}
|
|
114
114
|
return columns.sort((object1, object2) => object1.index - object2.index);
|
|
115
115
|
}, [COLUMNS, initialColumns, integralsPreferences]);
|
|
116
|
-
return data && data.length > 0 ? (_jsx(ReactTable, { data: data, columns: tableColumns }
|
|
116
|
+
return data && data.length > 0 ? (_jsx(ReactTable, { data: data, columns: tableColumns })) : (_jsx(NoTableData, {}));
|
|
117
117
|
}
|
|
118
118
|
export default memo(IntegralTable);
|