nmrium 0.23.0 → 0.25.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 +13 -13
- 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/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 +30 -31
- 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 +18 -28
- 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 +30 -37
- package/lib/component/assignment/index.js +1 -1
- package/lib/component/context/GlobalContext.d.ts +12 -3
- package/lib/component/context/GlobalContext.js +1 -1
- package/lib/component/context/PreferencesContext.d.ts +84 -2
- package/lib/component/context/PreferencesContext.js +30 -5
- package/lib/component/elements/ActionButtons.d.ts +10 -0
- package/lib/component/elements/ActionButtons.js +14 -0
- package/lib/component/elements/Button.d.ts +30 -5
- package/lib/component/elements/Button.js +150 -4
- 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 +7 -7
- 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 +4 -3
- 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/resizer/DivResizer.d.ts +2 -0
- package/lib/component/elements/resizer/DivResizer.js +107 -0
- package/lib/component/elements/resizer/Resizer.d.ts +18 -0
- package/lib/component/elements/resizer/Resizer.js +12 -0
- package/lib/component/elements/resizer/SVGResizer.d.ts +2 -0
- package/lib/component/elements/resizer/SVGResizer.js +71 -0
- package/lib/component/elements/resizer/useDraggable.d.ts +19 -0
- package/lib/component/elements/resizer/useDraggable.js +52 -0
- package/lib/component/elements/toggle/ToggleButton.js +1 -1
- package/lib/component/elements/toggle/ToggleButtonGroup.js +1 -1
- package/lib/component/header/AutoPeakPickingOptionPanel.js +6 -17
- package/lib/component/header/BaseLineCorrectionPanel.js +2 -9
- package/lib/component/header/Header.js +28 -14
- package/lib/component/header/ManualPhaseCorrectionPanel.js +3 -10
- package/lib/component/header/RangesPickingOptionPanel.js +4 -17
- package/lib/component/header/ZeroFillingOptionsPanel.js +2 -9
- package/lib/component/header/Zones2DOptionPanel.js +3 -14
- 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 +26 -22
- 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 +3 -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 +2 -1
- package/lib/component/modal/CopyClipboardModal.js +2 -2
- package/lib/component/modal/ExportAsMatrixModal.js +2 -1
- package/lib/component/modal/ImportPublicationStringModal.js +14 -11
- package/lib/component/modal/LoadJCAMPModal.js +7 -6
- package/lib/component/modal/ModalStyle.js +4 -26
- package/lib/component/modal/MoleculeStructureEditorModal.js +2 -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 +5 -4
- package/lib/component/modal/MultipletAnalysisModal.js +5 -5
- package/lib/component/modal/PredictSpectraModal.js +31 -29
- package/lib/component/modal/SaveAsModal.d.ts +1 -1
- package/lib/component/modal/SaveAsModal.js +3 -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 +62 -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 +16 -10
- 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 +6 -20
- 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 +195 -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/Export.d.ts +3 -3
- package/lib/component/utility/Export.js +10 -9
- 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 +12 -12
- 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/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 +29 -30
- 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 +18 -28
- 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 +34 -37
- package/lib-cjs/component/assignment/index.js +1 -1
- package/lib-cjs/component/context/GlobalContext.js +1 -1
- package/lib-cjs/component/context/PreferencesContext.js +33 -4
- package/lib-cjs/component/elements/ActionButtons.js +20 -0
- package/lib-cjs/component/elements/Button.js +149 -4
- 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 +7 -7
- 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 +4 -3
- 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/resizer/DivResizer.js +113 -0
- package/lib-cjs/component/elements/resizer/Resizer.js +18 -0
- package/lib-cjs/component/elements/resizer/SVGResizer.js +77 -0
- package/lib-cjs/component/elements/resizer/useDraggable.js +55 -0
- 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 +5 -16
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +7 -10
- package/lib-cjs/component/header/Header.js +27 -13
- package/lib-cjs/component/header/ManualPhaseCorrectionPanel.js +8 -11
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +3 -16
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +2 -9
- package/lib-cjs/component/header/Zones2DOptionPanel.js +2 -13
- 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 +26 -22
- 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 +3 -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 +2 -1
- package/lib-cjs/component/modal/CopyClipboardModal.js +2 -2
- package/lib-cjs/component/modal/ExportAsMatrixModal.js +2 -1
- package/lib-cjs/component/modal/ImportPublicationStringModal.js +19 -12
- package/lib-cjs/component/modal/LoadJCAMPModal.js +7 -6
- package/lib-cjs/component/modal/ModalStyle.js +4 -26
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +5 -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 +10 -5
- package/lib-cjs/component/modal/MultipletAnalysisModal.js +5 -5
- package/lib-cjs/component/modal/PredictSpectraModal.js +36 -30
- package/lib-cjs/component/modal/SaveAsModal.js +3 -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 +65 -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 +16 -10
- 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 +11 -21
- 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 +194 -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/Export.js +10 -9
- 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 +26 -27
- package/lib/component/1d/Resizable.d.ts +0 -12
- package/lib/component/1d/Resizable.js +0 -105
- 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/1d/Resizable.js +0 -110
- package/lib-cjs/component/workspaces/exercise1D.js +0 -49
|
@@ -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;
|
|
@@ -8,6 +8,6 @@ import DefaultPanelHeader from '../header/DefaultPanelHeader';
|
|
|
8
8
|
function AutomaticAssignment() {
|
|
9
9
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
10
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' } }
|
|
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
12
|
}
|
|
13
13
|
export default AutomaticAssignment;
|
|
@@ -30,9 +30,9 @@ function PeaksTable({ data }) {
|
|
|
30
30
|
minWidth: '24px',
|
|
31
31
|
},
|
|
32
32
|
id: 'assign-button',
|
|
33
|
-
Cell: ({ row }) => (_jsx("button", { type: "button", className: "assign-button", onClick: (e) => assignHandler(e, row), children: _jsx(SvgNmrAssignment, {}
|
|
33
|
+
Cell: ({ row }) => (_jsx("button", { type: "button", className: "assign-button", onClick: (e) => assignHandler(e, row), children: _jsx(SvgNmrAssignment, {}) })),
|
|
34
34
|
},
|
|
35
35
|
], [assignHandler]);
|
|
36
|
-
return data && data.length > 0 ? (_jsx(ReactTable, { data: data, columns: COLUMNS }
|
|
36
|
+
return data && data.length > 0 ? (_jsx(ReactTable, { data: data, columns: COLUMNS })) : (_jsx(NoTableData, {}));
|
|
37
37
|
}
|
|
38
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);
|
|
@@ -8,7 +8,6 @@ import FormikForm from '../../elements/formik/FormikForm';
|
|
|
8
8
|
import FormikNumberInput from '../../elements/formik/FormikNumberInput';
|
|
9
9
|
import { useAlert } from '../../elements/popup/Alert';
|
|
10
10
|
import useNucleus from '../../hooks/useNucleus';
|
|
11
|
-
import { SET_PANELS_PREFERENCES } from '../../reducer/preferencesReducer';
|
|
12
11
|
import { getValue as getValueByKeyPath } from '../../utility/LocalStorage';
|
|
13
12
|
import { integralDefaultValues } from '../extra/preferences/defaultValues';
|
|
14
13
|
const styles = {
|
|
@@ -65,7 +64,7 @@ function IntegralsPreferencesInner({ nucleus, preferences, innerRef, }) {
|
|
|
65
64
|
const updateValues = useCallback(() => {
|
|
66
65
|
if (nucleus) {
|
|
67
66
|
const { color, strokeWidth, ...restProps } = integralDefaultValues;
|
|
68
|
-
const integralPreferences = getValueByKeyPath(preferences, `formatting.panels.integrals`);
|
|
67
|
+
const integralPreferences = getValueByKeyPath(preferences.current, `formatting.panels.integrals`);
|
|
69
68
|
let defaultValues = nucleus.reduce((acc, nucleusLabel) => {
|
|
70
69
|
acc[nucleusLabel] = restProps;
|
|
71
70
|
return acc;
|
|
@@ -79,7 +78,7 @@ function IntegralsPreferencesInner({ nucleus, preferences, innerRef, }) {
|
|
|
79
78
|
}, [updateValues]);
|
|
80
79
|
const saveHandler = useCallback((values) => {
|
|
81
80
|
preferences.dispatch({
|
|
82
|
-
type: SET_PANELS_PREFERENCES,
|
|
81
|
+
type: 'SET_PANELS_PREFERENCES',
|
|
83
82
|
payload: { key: 'integrals', value: values },
|
|
84
83
|
});
|
|
85
84
|
alert.success('Integrals preferences saved successfully');
|
|
@@ -89,14 +88,14 @@ function IntegralsPreferencesInner({ nucleus, preferences, innerRef, }) {
|
|
|
89
88
|
formRef.current.submitForm();
|
|
90
89
|
},
|
|
91
90
|
}));
|
|
92
|
-
return (_jsx("div", { style: styles.container, children: _jsxs(FormikForm, { onSubmit: saveHandler, ref: formRef, children: [_jsxs("div", { style: styles.groupContainer, children: [_jsx("p", { style: styles.header, children: "General" }
|
|
91
|
+
return (_jsx("div", { style: styles.container, children: _jsxs(FormikForm, { onSubmit: saveHandler, ref: formRef, children: [_jsxs("div", { style: styles.groupContainer, children: [_jsx("p", { style: styles.header, children: "General" }), _jsx(FormikColorInput, { name: "color" }), _jsx(FormikNumberInput, { name: "strokeWidth", label: "stroke width :", style: {
|
|
93
92
|
label: { fontSize: '11px', fontWeight: 'bold', color: '#232323' },
|
|
94
93
|
input: {
|
|
95
94
|
width: '60%',
|
|
96
95
|
textAlign: 'center',
|
|
97
96
|
borderRadius: '5px',
|
|
98
97
|
},
|
|
99
|
-
}, min: 1, max: 9, pattern: "[1-9]+" }
|
|
98
|
+
}, min: 1, max: 9, pattern: "[1-9]+" })] }), nucleus?.map((nucleusLabel) => (_jsxs("div", { style: styles.groupContainer, children: [_jsx("p", { style: styles.header, children: _jsx(MF, { mf: nucleusLabel }) }), formatFields.map((field) => (_jsx(FormikColumnFormatField, { label: field.label, checkControllerName: `${nucleusLabel}.${field.checkController}`, formatControllerName: `${nucleusLabel}.${field.formatController}` }, field.id)))] }, nucleusLabel)))] }) }));
|
|
100
99
|
}
|
|
101
100
|
const MemoizedIntegralsPreferences = memo(IntegralsPreferencesInner);
|
|
102
101
|
// TODO: remove this hacky use of ref.
|
|
@@ -106,6 +105,6 @@ function IntegralsPreferences(props, ref) {
|
|
|
106
105
|
return (_jsx(MemoizedIntegralsPreferences, { innerRef: ref, ...{
|
|
107
106
|
nucleus,
|
|
108
107
|
preferences,
|
|
109
|
-
} }
|
|
108
|
+
} }));
|
|
110
109
|
}
|
|
111
110
|
export default forwardRef(IntegralsPreferences);
|
|
@@ -15,7 +15,7 @@ function MatrixGenerationPanel() {
|
|
|
15
15
|
const dispatch = useDispatch();
|
|
16
16
|
const openFiltersModal = useCallback(() => {
|
|
17
17
|
dispatch({ type: RESET_SELECTED_TOOL });
|
|
18
|
-
modal.show(_jsx(MultipleSpectraFiltersModal, {}
|
|
18
|
+
modal.show(_jsx(MultipleSpectraFiltersModal, {}), {
|
|
19
19
|
isBackgroundBlur: false,
|
|
20
20
|
position: positions.TOP_CENTER,
|
|
21
21
|
width: 550,
|
|
@@ -24,12 +24,12 @@ function MatrixGenerationPanel() {
|
|
|
24
24
|
}, [modal, dispatch]);
|
|
25
25
|
const openExportAsMatrixModal = useCallback(() => {
|
|
26
26
|
dispatch({ type: RESET_SELECTED_TOOL });
|
|
27
|
-
modal.show(_jsx(ExportAsMatrixModal, {}
|
|
27
|
+
modal.show(_jsx(ExportAsMatrixModal, {}), {
|
|
28
28
|
isBackgroundBlur: false,
|
|
29
29
|
position: positions.TOP_CENTER,
|
|
30
30
|
width: 500,
|
|
31
31
|
});
|
|
32
32
|
}, [modal, dispatch]);
|
|
33
|
-
return (_jsxs("div", { css: tablePanelStyle, children: [_jsxs(DefaultPanelHeader, { deleteToolTip: "Delete All Peaks", showSettingButton: true, canDelete: false, children: [_jsx(Button, { popupTitle: "Add Filter", onClick: openFiltersModal, children: _jsx(SvgNmrAddFilter, { style: { fontSize: '18px' } }
|
|
33
|
+
return (_jsxs("div", { css: tablePanelStyle, children: [_jsxs(DefaultPanelHeader, { deleteToolTip: "Delete All Peaks", showSettingButton: true, canDelete: false, children: [_jsx(Button, { popupTitle: "Add Filter", onClick: openFiltersModal, children: _jsx(SvgNmrAddFilter, { style: { fontSize: '18px' } }) }), _jsx(Button, { popupTitle: "Export spectra as a Matrix", onClick: openExportAsMatrixModal, children: _jsx(SvgNmrExportAsMatrix, {}) })] }), _jsx("div", { className: "inner-container" })] }));
|
|
34
34
|
}
|
|
35
35
|
export default MatrixGenerationPanel;
|
|
@@ -80,7 +80,7 @@ function MoleculePanelInner({ zones, ranges, molecules: moleculesProp, activeTab
|
|
|
80
80
|
dispatch({ type: SET_MOLECULE, molfile, key });
|
|
81
81
|
}, [dispatch]);
|
|
82
82
|
const openMoleculeEditorHandler = useCallback((moleclue = null) => {
|
|
83
|
-
modal.show(_jsx(MoleculeStructureEditorModal, { selectedMolecule: moleclue }
|
|
83
|
+
modal.show(_jsx(MoleculeStructureEditorModal, { selectedMolecule: moleclue }), {
|
|
84
84
|
position: positions.TOP_CENTER,
|
|
85
85
|
width: 700,
|
|
86
86
|
height: 500,
|
|
@@ -89,7 +89,7 @@ function MoleculePanelInner({ zones, ranges, molecules: moleculesProp, activeTab
|
|
|
89
89
|
const moleculeIndexHandler = useCallback((index) => {
|
|
90
90
|
setCurrentIndex(index);
|
|
91
91
|
}, []);
|
|
92
|
-
return (_jsxs("div", { css: styles.panel, children: [_jsx(MoleculePanelHeader, { currentIndex: currentIndex, molecules: molecules, onOpenMoleculeEditor: () => openMoleculeEditorHandler(), onMoleculeIndexChange: moleculeIndexHandler, actionsOptions: actionsOptions }
|
|
92
|
+
return (_jsxs("div", { css: styles.panel, children: [_jsx(MoleculePanelHeader, { currentIndex: currentIndex, molecules: molecules, onOpenMoleculeEditor: () => openMoleculeEditorHandler(), onMoleculeIndexChange: moleculeIndexHandler, actionsOptions: actionsOptions }), _jsxs("div", { css: styles.innerPanel, children: [_jsx("div", { css: styles.molecule, children: _jsx(NextPrev, { onChange: (slideIndex) => setCurrentIndex(slideIndex), defaultIndex: currentIndex, children: molecules && molecules.length > 0 ? (molecules.map((mol, index) => (_jsxs("div", { css: styles.items, children: [_jsxs("span", { css: styles.toolbar, children: [_jsx(MF, { mf: mol.mf }), " - ", mol.mw?.toFixed(2)] }), _jsx("div", { css: styles.slider, className: "mol-svg-container", onDoubleClick: () => openMoleculeEditorHandler(mol), style: {
|
|
93
93
|
backgroundColor: (index + 1) % 2 !== 0 ? '#fafafa' : 'white',
|
|
94
94
|
}, children: _jsx(ResponsiveChart, { children: ({ height, width }) => {
|
|
95
95
|
return (_jsx(OCLnmr, { OCL: OCL, id: `molSVG${index}`, width: width, height: height, molfile: mol.molfile || '', setMolfile: (molfile) => handleReplaceMolecule(mol.key, molfile), setSelectedAtom: handleOnClickAtom, atomHighlightColor: currentDiaIDsToHighlight &&
|
|
@@ -98,8 +98,8 @@ function MoleculePanelInner({ zones, ranges, molecules: moleculesProp, activeTab
|
|
|
98
98
|
: '#FFD700', atomHighlightOpacity: 0.35, highlights: currentDiaIDsToHighlight &&
|
|
99
99
|
currentDiaIDsToHighlight.length > 0
|
|
100
100
|
? currentDiaIDsToHighlight
|
|
101
|
-
: assignedDiaIDsMerged, setHoverAtom: handleOnAtomHover }
|
|
102
|
-
} }
|
|
101
|
+
: assignedDiaIDsMerged, setHoverAtom: handleOnAtomHover }));
|
|
102
|
+
} }) })] }, mol.key)))) : (_jsx("div", { css: styles.slider, style: { height: '100%' }, onClick: () => openMoleculeEditorHandler(), children: _jsx("span", { children: "Click to draw molecule" }) })) }) }), children] })] }));
|
|
103
103
|
}
|
|
104
104
|
const MemoizedMoleculePanel = memo(MoleculePanelInner);
|
|
105
105
|
const emptyData = { ranges: {}, zones: {} };
|
|
@@ -116,5 +116,5 @@ export default function MoleculePanel({ onMoleculeChange, children, actionsOptio
|
|
|
116
116
|
zones,
|
|
117
117
|
onMoleculeChange,
|
|
118
118
|
actionsOptions,
|
|
119
|
-
}, children: children }
|
|
119
|
+
}, children: children }));
|
|
120
120
|
}
|
|
@@ -6,6 +6,7 @@ import { useCallback } from 'react';
|
|
|
6
6
|
import { FaCopy, FaDownload, FaFileExport, FaFileImage, FaPaste, FaPlus, FaRegTrashAlt, } from 'react-icons/fa';
|
|
7
7
|
import { useAssignmentData } from '../../assignment';
|
|
8
8
|
import { useDispatch } from '../../context/DispatchContext';
|
|
9
|
+
import { useGlobal } from '../../context/GlobalContext';
|
|
9
10
|
import ButtonToolTip from '../../elements/ButtonToolTip';
|
|
10
11
|
import MenuButton from '../../elements/MenuButton';
|
|
11
12
|
import ToolTip from '../../elements/ToolTip/ToolTip';
|
|
@@ -41,32 +42,37 @@ const toolbarStyle = css `
|
|
|
41
42
|
const MOL_EXPORT_MENU = [
|
|
42
43
|
{
|
|
43
44
|
id: 'molfile',
|
|
44
|
-
icon: _jsx(FaCopy, {}
|
|
45
|
+
icon: _jsx(FaCopy, {}),
|
|
45
46
|
label: 'Copy as molfile',
|
|
46
47
|
},
|
|
47
48
|
{
|
|
48
49
|
id: 'png',
|
|
49
|
-
icon: _jsx(FaFileImage, {}
|
|
50
|
+
icon: _jsx(FaFileImage, {}),
|
|
50
51
|
label: 'Copy as PNG',
|
|
51
52
|
},
|
|
52
53
|
{
|
|
53
54
|
id: 'svg',
|
|
54
|
-
icon: _jsx(FaDownload, {}
|
|
55
|
+
icon: _jsx(FaDownload, {}),
|
|
55
56
|
label: 'Export as SVG',
|
|
56
57
|
},
|
|
57
58
|
];
|
|
58
59
|
export default function MoleculePanelHeader({ currentIndex, molecules, onMoleculeIndexChange = () => null, onOpenMoleculeEditor = () => null, actionsOptions = {}, }) {
|
|
60
|
+
const { rootRef } = useGlobal();
|
|
59
61
|
const alert = useAlert();
|
|
60
62
|
const dispatch = useDispatch();
|
|
61
63
|
const modal = useModal();
|
|
62
64
|
const assignmentData = useAssignmentData();
|
|
63
65
|
const saveAsSVGHandler = useCallback(() => {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
if (!rootRef)
|
|
67
|
+
return;
|
|
68
|
+
exportAsSVG(rootRef, `molSVG${currentIndex}`, 'molFile');
|
|
69
|
+
}, [rootRef, currentIndex]);
|
|
66
70
|
const saveAsPNGHandler = useCallback(() => {
|
|
67
|
-
|
|
71
|
+
if (!rootRef)
|
|
72
|
+
return;
|
|
73
|
+
copyPNGToClipboard(rootRef, `molSVG${currentIndex}`);
|
|
68
74
|
alert.success('MOL copied as PNG to clipboard');
|
|
69
|
-
}, [alert, currentIndex]);
|
|
75
|
+
}, [rootRef, alert, currentIndex]);
|
|
70
76
|
const saveAsMolHandler = useCallback(() => {
|
|
71
77
|
if (molecules[currentIndex]) {
|
|
72
78
|
void copyTextToClipboard(molecules[currentIndex].molfile).then((flag) => {
|
|
@@ -115,13 +121,13 @@ export default function MoleculePanelHeader({ currentIndex, molecules, onMolecul
|
|
|
115
121
|
assignmentData,
|
|
116
122
|
]);
|
|
117
123
|
const openPredictSpectraModal = useCallback(() => {
|
|
118
|
-
modal.show(_jsx(PredictSpectraModal, { molfile: molecules[currentIndex] }
|
|
124
|
+
modal.show(_jsx(PredictSpectraModal, { molfile: molecules[currentIndex] }), {
|
|
119
125
|
position: positions.TOP_CENTER,
|
|
120
126
|
enableResizing: true,
|
|
121
127
|
width: 600,
|
|
122
128
|
});
|
|
123
129
|
}, [modal, molecules, currentIndex]);
|
|
124
|
-
return (_jsxs("div", { css: toolbarStyle, children: [!actionsOptions.hideExport && (_jsx(MenuButton, { component: _jsx(FaFileExport, {}
|
|
130
|
+
return (_jsxs("div", { css: toolbarStyle, children: [!actionsOptions.hideExport && (_jsx(MenuButton, { component: _jsx(FaFileExport, {}), toolTip: "Export As", items: MOL_EXPORT_MENU, onClick: exportHandler })), !actionsOptions.hidePast && (_jsx(ToolTip, { title: "Paste molfile", popupPlacement: "left", children: _jsx("button", { className: "bar-button", type: "button", onClick: handlePaste, children: _jsx(FaPaste, {}) }) })), !actionsOptions.hideAdd && (_jsx(ToolTip, { title: "Add Molecule", popupPlacement: "left", children: _jsx("button", { className: "bar-button", type: "button", onClick: onOpenMoleculeEditor, "data-test-id": "panel-structures-button-add", children: _jsx(FaPlus, {}) }) })), !actionsOptions.hideDelete && (_jsx(ToolTip, { title: "Delete Molecule", popupPlacement: "left", children: _jsx("button", { className: "bar-button", type: "button", onClick: handleDelete, children: _jsx(FaRegTrashAlt, {}) }) })), !actionsOptions.hidePredict && molecules && molecules.length > 0 && (_jsx(ButtonToolTip, { popupTitle: "Predict Spectra", popupPlacement: "left", onClick: openPredictSpectraModal, children: _jsx(SvgNmrFt, {}) })), _jsxs("p", { children: [molecules &&
|
|
125
131
|
molecules.length > 0 &&
|
|
126
|
-
`${+(currentIndex + 1)} / ${molecules.length}`, ' '] }
|
|
132
|
+
`${+(currentIndex + 1)} / ${molecules.length}`, ' '] })] }));
|
|
127
133
|
}
|
|
@@ -54,6 +54,6 @@ function ColumnHeader({ charLabel, rangeLabel, data, onColumnFilter, }) {
|
|
|
54
54
|
const deleteHandler = useCallback(() => {
|
|
55
55
|
dispatch({ type: DELETE_ANALYZE_SPECTRA_RANGE, colKey: charLabel });
|
|
56
56
|
}, [charLabel, dispatch]);
|
|
57
|
-
return (_jsxs("div", { css: styles, children: [_jsxs("div", { className: "container", children: [data.type === COLUMNS_TYPES.NORMAL && (_jsx("div", { className: "dropDown-container", children: _jsx(DropDownButton, { data: columnsFilters, formatSelectedValue: (
|
|
57
|
+
return (_jsxs("div", { css: styles, children: [_jsxs("div", { className: "container", children: [data.type === COLUMNS_TYPES.NORMAL && (_jsx("div", { className: "dropDown-container", children: _jsx(DropDownButton, { data: columnsFilters, formatSelectedValue: (item) => item.label.substring(0, 3), selectedKey: data.valueKey, onSelect: onColumnFilter }) })), _jsxs("div", { className: "label-container", children: [_jsxs("span", { className: "label", children: [" ", charLabel] }), _jsx("span", { className: "label", children: rangeLabel })] })] }), _jsx(DeleteButton, { onDelete: deleteHandler })] }));
|
|
58
58
|
}
|
|
59
59
|
export default ColumnHeader;
|
|
@@ -33,7 +33,7 @@ function MultipleAnalysisCodeEditor({ data }) {
|
|
|
33
33
|
minHeight: '100px',
|
|
34
34
|
overflow: 'auto',
|
|
35
35
|
maxHeight: '200px',
|
|
36
|
-
} }
|
|
36
|
+
} }), _jsx("p", { style: { marginBottom: '5px' }, children: "Result:" }), _jsx("textarea", { value: result, readOnly: true, style: {
|
|
37
37
|
border: '0.55px solid #f3f3f3',
|
|
38
38
|
fontFamily: '"Fira code", "Fira Mono", monospace',
|
|
39
39
|
fontSize: 12,
|
|
@@ -43,6 +43,6 @@ function MultipleAnalysisCodeEditor({ data }) {
|
|
|
43
43
|
minHeight: '100px',
|
|
44
44
|
overflow: 'auto',
|
|
45
45
|
maxHeight: '200px',
|
|
46
|
-
} }
|
|
46
|
+
} })] }));
|
|
47
47
|
}
|
|
48
48
|
export default memo(MultipleAnalysisCodeEditor);
|
|
@@ -48,21 +48,23 @@ function MultipleSpectraAnalysisPanelInner({ activeTab, spectraAnalysis, }) {
|
|
|
48
48
|
}, []);
|
|
49
49
|
const openAlignSpectra = useCallback(() => {
|
|
50
50
|
dispatch({ type: RESET_SELECTED_TOOL });
|
|
51
|
-
modal.show(_jsx(AlignSpectraModal, { nucleus: activeTab }
|
|
51
|
+
modal.show(_jsx(AlignSpectraModal, { nucleus: activeTab }), {
|
|
52
52
|
isBackgroundBlur: false,
|
|
53
53
|
position: positions.TOP_CENTER,
|
|
54
54
|
width: 500,
|
|
55
55
|
});
|
|
56
56
|
}, [activeTab, modal, dispatch]);
|
|
57
|
-
const copyToClipboardHandler = useCallback(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
const copyToClipboardHandler = useCallback(() => {
|
|
58
|
+
void (async () => {
|
|
59
|
+
const data = getDataAsString(spectraAnalysis, activeTab);
|
|
60
|
+
const success = await copyTextToClipboard(data);
|
|
61
|
+
if (success) {
|
|
62
|
+
alert.success('Data copied to clipboard');
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
alert.error('copy to clipboard failed');
|
|
66
|
+
}
|
|
67
|
+
})();
|
|
66
68
|
}, [activeTab, alert, spectraAnalysis]);
|
|
67
69
|
return (_jsxs("div", { css: [
|
|
68
70
|
tablePanelStyle,
|
|
@@ -74,15 +76,15 @@ function MultipleSpectraAnalysisPanelInner({ activeTab, spectraAnalysis, }) {
|
|
|
74
76
|
`,
|
|
75
77
|
], children: [!isFlipped && (_jsxs(DefaultPanelHeader, { deleteToolTip: "Delete All Peaks", showSettingButton: true, canDelete: false, onSettingClick: settingsPanelHandler, children: [_jsx(Button, { popupTitle: "Copy To Clipboard",
|
|
76
78
|
// style={styles.button}
|
|
77
|
-
onClick: copyToClipboardHandler, children: _jsx(FaFileExport, {}
|
|
79
|
+
onClick: copyToClipboardHandler, children: _jsx(FaFileExport, {}) }), _jsx(Button, { popupTitle: "Spectra calibration",
|
|
78
80
|
// style={styles.button}
|
|
79
|
-
onClick: openAlignSpectra, children: _jsx(SvgNmrOverlay, { style: { fontSize: '18px' } }
|
|
81
|
+
onClick: openAlignSpectra, children: _jsx(SvgNmrOverlay, { style: { fontSize: '18px' } }) }), _jsx(ToggleButton, { popupTitle: "Y Spectra Tracker", popupPlacement: "right", onClick: showTrackerHandler, children: _jsx(IoPulseOutline, {}) })] })), isFlipped && (_jsx(PreferencesHeader, { onSave: saveSettingHandler, onClose: settingsPanelHandler })), _jsx("div", { className: "inner-container", children: !isFlipped ? (_jsx(MultipleSpectraAnalysisTable, { data: data, activeTab: activeTab })) : (_jsx(MultipleSpectraAnalysisPreferences, { data: data, onAfterSave: afterSaveHandler, ref: settingRef })) })] }));
|
|
80
82
|
}
|
|
81
83
|
const MemoizedMultipleSpectraAnalysisPanel = memo(MultipleSpectraAnalysisPanelInner);
|
|
82
84
|
export default function MultipleSpectraAnalysisPanel() {
|
|
83
85
|
const { activeTab, spectraAnalysis, displayerKey } = useChartData();
|
|
84
86
|
if (!activeTab) {
|
|
85
|
-
return _jsx("div", {}
|
|
87
|
+
return _jsx("div", {});
|
|
86
88
|
}
|
|
87
|
-
return (_jsx(MemoizedMultipleSpectraAnalysisPanel, { ...{ activeTab, spectraAnalysis, displayerKey } }
|
|
89
|
+
return (_jsx(MemoizedMultipleSpectraAnalysisPanel, { ...{ activeTab, spectraAnalysis, displayerKey } }));
|
|
88
90
|
}
|
package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js
CHANGED
|
@@ -131,8 +131,8 @@ function MultipleSpectraAnalysisPreferences({ data, onAfterSave }, ref) {
|
|
|
131
131
|
};
|
|
132
132
|
});
|
|
133
133
|
}, []);
|
|
134
|
-
return (_jsxs(FormikForm, { ref: refForm, initialValues: { columns, code: null }, validationSchema: preferncesSchema, onSubmit: submitHandler, children: [columnsKeys && (_jsxs("table", { css: styles, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { className: "counter", children: "#" }
|
|
135
|
-
return (_jsxs("tr", { children: [_jsx("td", { className: "counter", children: index + 1 }
|
|
136
|
-
}) }
|
|
134
|
+
return (_jsxs(FormikForm, { ref: refForm, initialValues: { columns, code: null }, validationSchema: preferncesSchema, onSubmit: submitHandler, children: [columnsKeys && (_jsxs("table", { css: styles, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { className: "counter", children: "#" }), _jsx("th", { className: "label", children: "Label" }), _jsx("th", { children: "value" }), _jsx("th", { className: "index", children: "index" })] }) }), _jsx("tbody", { children: columnsKeys.map((key, index) => {
|
|
135
|
+
return (_jsxs("tr", { children: [_jsx("td", { className: "counter", children: index + 1 }), _jsx("td", { className: "label", children: _jsx(FormikInput, { name: `columns.${key}.tempKey`, value: columns[key].tempKey }, key) }), _jsx("td", { children: columns[key].type === COLUMNS_TYPES.FORMULA ? (_jsx(FormikInput, { name: `columns.${key}.formula`, value: columns[key].formula })) : (_jsx("div", { className: "input disbale" })) }), _jsx("td", { className: "index", children: _jsx(FormikInput, { name: `columns.${key}.index`, value: columns[key].index }) }), _jsx("td", { className: "operation-col", children: columnsKeys.length === index + 1 && (_jsx("button", { className: "add", type: "button", onClick: () => addNewColumn(index + 1), children: _jsx(FaPlus, {}) })) })] }, key));
|
|
136
|
+
}) })] })), _jsx(MultipleAnalysisCodeEditor, { data: data })] }));
|
|
137
137
|
}
|
|
138
138
|
export default forwardRef(MultipleSpectraAnalysisPreferences);
|
|
@@ -35,13 +35,13 @@ function MultipleSpectraAnalysisTable({ data, activeTab, }) {
|
|
|
35
35
|
];
|
|
36
36
|
function cellHandler(row, columnKey, valueKey) {
|
|
37
37
|
const value = row.original[columnKey][valueKey];
|
|
38
|
-
const result = value instanceof Error ? (_jsx("span", { style: { color: 'red' }, children: value.message }
|
|
38
|
+
const result = value instanceof Error ? (_jsx("span", { style: { color: 'red' }, children: value.message })) : (format(value));
|
|
39
39
|
return result;
|
|
40
40
|
}
|
|
41
41
|
function headerHandler(columnData, columnKey) {
|
|
42
|
-
return (_jsx(ColumnHeader, { charLabel: columnKey, data: columnData, onColumnFilter: (
|
|
42
|
+
return (_jsx(ColumnHeader, { charLabel: columnKey, data: columnData, onColumnFilter: (item) => columnFilterHandler(columnKey, item.key), rangeLabel: columnData.from && columnData.to
|
|
43
43
|
? `${format(columnData.from)} - ${format(columnData.to)}`
|
|
44
|
-
: '' }
|
|
44
|
+
: '' }));
|
|
45
45
|
}
|
|
46
46
|
if (data.columns) {
|
|
47
47
|
Object.keys(data.columns).forEach((columnKey) => {
|
|
@@ -56,11 +56,11 @@ function MultipleSpectraAnalysisTable({ data, activeTab, }) {
|
|
|
56
56
|
}
|
|
57
57
|
return columns.sort((object1, object2) => object1.index - object2.index);
|
|
58
58
|
}, [columnFilterHandler, data.columns, format]);
|
|
59
|
-
return data.values && data.values.length > 0 ? (_jsxs(Fragment, { children: [_jsx(ReactTable, { data: data.values, columns: tableColumns }
|
|
59
|
+
return data.values && data.values.length > 0 ? (_jsxs(Fragment, { children: [_jsx(ReactTable, { data: data.values, columns: tableColumns }), _jsx("div", { style: {
|
|
60
60
|
width: '100%',
|
|
61
61
|
padding: '10px',
|
|
62
62
|
},
|
|
63
63
|
// eslint-disable-next-line react/no-danger
|
|
64
|
-
dangerouslySetInnerHTML: { __html: codeEvaluation } }
|
|
64
|
+
dangerouslySetInnerHTML: { __html: codeEvaluation } })] })) : (_jsx(NoTableData, {}));
|
|
65
65
|
}
|
|
66
66
|
export default memo(MultipleSpectraAnalysisTable);
|