nmrium 0.43.0 → 0.44.1-pre.1694759092
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/lib/component/1d/ApodizationLine.js +54 -25
- package/lib/component/1d/Chart1D.js +25 -20
- package/lib/component/1d/ExclusionZoneAnnotation.js +22 -17
- package/lib/component/1d/ExclusionZonesAnnotations.js +25 -21
- package/lib/component/1d/FooterBanner.js +38 -32
- package/lib/component/1d/Line.js +43 -15
- package/lib/component/1d/LinesSeries.js +16 -11
- package/lib/component/1d/SpectraLegends.js +29 -24
- package/lib/component/1d/Viewer1D.js +102 -74
- package/lib/component/1d/XAxis.js +40 -15
- package/lib/component/1d/YAxis.js +38 -13
- package/lib/component/1d/database/DatabaseElements.js +16 -11
- package/lib/component/1d/database/DatabaseSpectrum.js +45 -31
- package/lib/component/1d/database/ResurrectedDatabaseRanges.js +31 -25
- package/lib/component/1d/integral/Integral.d.ts +1 -2
- package/lib/component/1d/integral/Integral.js +14 -11
- package/lib/component/1d/integral/IntegralIndicator.js +10 -6
- package/lib/component/1d/integral/IntegralResizable.js +28 -23
- package/lib/component/1d/integral/IntegralsSeries.d.ts +1 -1
- package/lib/component/1d/integral/IntegralsSeries.js +19 -20
- package/lib/component/1d/jCouplingGraph/JGraph.js +30 -24
- package/lib/component/1d/jCouplingGraph/JGraphContext.js +9 -5
- package/lib/component/1d/jCouplingGraph/JGraphVerticalAxis.js +12 -8
- package/lib/component/1d/jCouplingGraph/JsCoupling.js +10 -7
- package/lib/component/1d/jCouplingGraph/JsCouplingLinks.js +13 -10
- package/lib/component/1d/jCouplingGraph/JsCouplings.js +16 -10
- package/lib/component/1d/multiAnalysis/AnalysisRange.js +26 -21
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +19 -13
- package/lib/component/1d/multiplicityTree/LevelNode.js +8 -6
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +40 -33
- package/lib/component/1d/multiplicityTree/StringNode.js +7 -5
- package/lib/component/1d/multiplicityTree/TreeColors.js +4 -1
- package/lib/component/1d/multiplicityTree/TreeNodes.js +10 -8
- package/lib/component/1d/multiplicityTree/buildTreeNode.js +12 -7
- package/lib/component/1d/peaks/PeakAnnotations.d.ts +10 -1
- package/lib/component/1d/peaks/PeakAnnotations.js +26 -25
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.d.ts +5 -2
- package/lib/component/1d/peaks/PeakAnnotationsSpreadMode.js +25 -42
- package/lib/component/1d/peaks/PeakEditionManager.js +60 -27
- package/lib/component/1d/peaks/Peaks.d.ts +31 -1
- package/lib/component/1d/peaks/Peaks.js +95 -18
- package/lib/component/1d/peaks/PeaksShapes.js +26 -21
- package/lib/component/1d/peaks/usePeakShapesPath.js +14 -10
- package/lib/component/1d/ranges/AssignmentActionsButtons.js +12 -5
- package/lib/component/1d/ranges/Range.js +36 -31
- package/lib/component/1d/ranges/RangeIntegral.js +10 -5
- package/lib/component/1d/ranges/Ranges.js +26 -22
- package/lib/component/1d/tool/BaseLineZones.js +12 -10
- package/lib/component/1d/tool/PeakPointer.js +29 -24
- package/lib/component/1d/tool/VerticalIndicator.js +11 -9
- package/lib/component/1d/tool/XLabelPointer.js +21 -19
- package/lib/component/1d/utilities/getDecimalsCount.d.ts +1 -0
- package/lib/component/1d/utilities/getDecimalsCount.js +10 -0
- package/lib/component/1d/utilities/intersectionResolver.js +9 -3
- package/lib/component/1d/utilities/scale.d.ts +28 -4
- package/lib/component/1d/utilities/scale.js +33 -13
- package/lib/component/1d-2d/components/FloatMoleculeStructures/ActionsButton.js +12 -6
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts +2 -2
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +39 -32
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.d.ts +2 -2
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.js +23 -15
- package/lib/component/1d-2d/components/SpectrumInfoBlock.js +20 -15
- package/lib/component/1d-2d/tools/BrushX.js +20 -17
- package/lib/component/1d-2d/tools/BrushXY.js +33 -29
- package/lib/component/1d-2d/tools/CrossLinePointer.js +26 -24
- package/lib/component/2d/1d-tracer/HorizontalSliceChart.js +40 -15
- package/lib/component/2d/1d-tracer/Left1DChart.js +39 -14
- package/lib/component/2d/1d-tracer/Top1DChart.js +39 -14
- package/lib/component/2d/1d-tracer/VerticalSliceChart.js +40 -15
- package/lib/component/2d/Chart2D.js +23 -17
- package/lib/component/2d/FooterBanner.js +59 -57
- package/lib/component/2d/SignalDeltaLine.js +15 -13
- package/lib/component/2d/SlicingView.js +24 -19
- package/lib/component/2d/Viewer2D.js +68 -40
- package/lib/component/2d/XAxis.js +43 -15
- package/lib/component/2d/YAxis.js +43 -15
- package/lib/component/2d/fid/FidCanvas.js +24 -17
- package/lib/component/2d/fid/FidContainer.js +26 -19
- package/lib/component/2d/ft/Contours.js +41 -35
- package/lib/component/2d/ft/FTContainer.js +15 -8
- package/lib/component/2d/tools/XYLabelPointer.js +46 -41
- package/lib/component/2d/utilities/DimensionLayout.js +6 -1
- package/lib/component/2d/utilities/SliceScale.js +12 -7
- package/lib/component/2d/utilities/scale.js +17 -11
- package/lib/component/2d/zones/IndicationLines.js +21 -19
- package/lib/component/2d/zones/Signal.d.ts +2 -9
- package/lib/component/2d/zones/Signal.js +30 -23
- package/lib/component/2d/zones/SignalCrosshair.js +19 -14
- package/lib/component/2d/zones/Zone.d.ts +1 -4
- package/lib/component/2d/zones/Zone.js +31 -24
- package/lib/component/2d/zones/Zones.js +19 -22
- package/lib/component/EventsTrackers/BrushTracker.js +28 -20
- package/lib/component/EventsTrackers/KeysListenerTracker.js +73 -55
- package/lib/component/EventsTrackers/MouseTracker.js +17 -12
- package/lib/component/assignment/AssignmentsContext.js +21 -16
- package/lib/component/assignment/AssignmentsReducer.js +15 -9
- package/lib/component/assignment/actions/initAssignment.js +8 -5
- package/lib/component/assignment/actions/removeAssignment.js +7 -2
- package/lib/component/assignment/actions/setActiveAssignment.js +4 -1
- package/lib/component/assignment/actions/toggleAssignment.js +6 -3
- package/lib/component/assignment/index.js +18 -11
- package/lib/component/assignment/utilities/filterForIDsWithAssignment.js +5 -1
- package/lib/component/context/ChartContext.js +10 -6
- package/lib/component/context/DispatchContext.d.ts +3 -1
- package/lib/component/context/DispatchContext.js +9 -5
- package/lib/component/context/GlobalContext.js +9 -5
- package/lib/component/context/KeyModifierContext.d.ts +5 -0
- package/lib/component/context/KeyModifierContext.js +15 -9
- package/lib/component/context/LoaderContext.js +9 -5
- package/lib/component/context/LoggerContext.js +23 -18
- package/lib/component/context/PreferencesContext.js +16 -11
- package/lib/component/context/ScaleContext.js +12 -7
- package/lib/component/elements/ActionButtons.js +11 -5
- package/lib/component/elements/ActiveButton.d.ts +2 -2
- package/lib/component/elements/ActiveButton.js +13 -8
- package/lib/component/elements/Button.js +23 -21
- package/lib/component/elements/ButtonToolTip.js +9 -4
- package/lib/component/elements/CheckBox.js +8 -6
- package/lib/component/elements/CheckBoxCell.js +11 -4
- package/lib/component/elements/CloseButton.js +11 -6
- package/lib/component/elements/ColorInput.js +15 -13
- package/lib/component/elements/ColumnWrapper.js +7 -3
- package/lib/component/elements/ContextMenu.js +20 -18
- package/lib/component/elements/CounterLabel.d.ts +7 -0
- package/lib/component/elements/CounterLabel.js +16 -0
- package/lib/component/elements/DeleteButton.js +5 -3
- package/lib/component/elements/EditableColumn.js +36 -19
- package/lib/component/elements/GroupPane.js +7 -3
- package/lib/component/elements/Header.js +9 -5
- package/lib/component/elements/Input.d.ts +3 -12
- package/lib/component/elements/Input.js +39 -86
- package/lib/component/elements/InputRange.js +10 -8
- package/lib/component/elements/IsotopesViewer.js +5 -3
- package/lib/component/elements/Label.js +12 -6
- package/lib/component/elements/Logo.js +6 -3
- package/lib/component/elements/MenuButton.js +21 -15
- package/lib/component/elements/Message.js +9 -7
- package/lib/component/elements/MolecularFormulaInput.js +19 -13
- package/lib/component/elements/MoleculeSelection.js +20 -14
- package/lib/component/elements/NextPrev.js +22 -20
- package/lib/component/elements/NumberInput.js +13 -8
- package/lib/component/elements/PreferencesButton.d.ts +4 -0
- package/lib/component/elements/PreferencesButton.js +13 -0
- package/lib/component/elements/ReactTable/Elements/EmptyDataRow.js +9 -5
- package/lib/component/elements/ReactTable/Elements/ReactTableHeader.js +8 -6
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +16 -14
- package/lib/component/elements/ReactTable/ReactTable.js +65 -37
- package/lib/component/elements/ReactTable/ReactTableFlexLayout.js +14 -12
- package/lib/component/elements/ReactTable/Style.js +6 -3
- package/lib/component/elements/ReactTable/utility/ReactTableContext.js +9 -5
- package/lib/component/elements/ReactTable/utility/addCustomColumn.d.ts +12 -0
- package/lib/component/elements/ReactTable/utility/addCustomColumn.js +29 -1
- package/lib/component/elements/ReactTable/utility/useRowSpan.js +7 -2
- package/lib/component/elements/RemoveAssignmentsButton.js +11 -7
- package/lib/component/elements/SVGGroup.js +11 -7
- package/lib/component/elements/SaveButton.js +13 -8
- package/lib/component/elements/Scroller.js +15 -11
- package/lib/component/elements/Select.js +10 -8
- package/lib/component/elements/Tab/DeleteButton.js +8 -6
- package/lib/component/elements/Tab/Tab.js +12 -6
- package/lib/component/elements/Tab/Tabs.js +20 -14
- package/lib/component/elements/Table/Table.js +6 -4
- package/lib/component/elements/Table/TableBody.js +8 -6
- package/lib/component/elements/Table/TableCell.js +6 -4
- package/lib/component/elements/Table/TableHead.js +6 -4
- package/lib/component/elements/Table/TableRow.js +6 -4
- package/lib/component/elements/ToggleButton.js +14 -9
- package/lib/component/elements/ToolTip/ToolTip.js +18 -16
- package/lib/component/elements/ToolbarMenu.js +22 -19
- package/lib/component/elements/accordion/Accordion.js +17 -15
- package/lib/component/elements/accordion/AccordionItem.js +20 -17
- package/lib/component/elements/draggable/SVGDraggable.js +13 -7
- package/lib/component/elements/draggable/useDraggable.js +10 -7
- package/lib/component/elements/dropDownButton/DropDownButton.js +21 -16
- package/lib/component/elements/dropDownButton/DropDownList.js +14 -12
- package/lib/component/elements/formik/ErrorMessage.js +8 -6
- package/lib/component/elements/formik/FormikCheckBox.js +16 -11
- package/lib/component/elements/formik/FormikColorInput.js +14 -9
- package/lib/component/elements/formik/FormikColorPicker.js +14 -9
- package/lib/component/elements/formik/FormikColumnFormatField.js +21 -14
- package/lib/component/elements/formik/FormikError.js +13 -8
- package/lib/component/elements/formik/FormikErrorsSummary.js +11 -9
- package/lib/component/elements/formik/FormikInput.d.ts +2 -2
- package/lib/component/elements/formik/FormikInput.js +18 -16
- package/lib/component/elements/formik/FormikNumberInput.js +16 -11
- package/lib/component/elements/formik/FormikOnChange.js +13 -8
- package/lib/component/elements/formik/FormikSelect.js +17 -12
- package/lib/component/elements/formik/FormikSlider.js +15 -10
- package/lib/component/elements/formik/FormikTextarea.js +16 -11
- package/lib/component/elements/formik/Input.js +11 -6
- package/lib/component/elements/formik/SelectBox.js +13 -8
- package/lib/component/elements/linearAxis/LinearVerticalAxis.js +14 -10
- package/lib/component/elements/popup/Alert/AlertBlock.js +15 -9
- package/lib/component/elements/popup/Alert/Context.js +9 -5
- package/lib/component/elements/popup/Alert/ProgressIndicator.js +8 -5
- package/lib/component/elements/popup/Alert/Provider.js +39 -34
- package/lib/component/elements/popup/Alert/index.js +14 -3
- package/lib/component/elements/popup/Modal/ConfirmDialog.js +9 -7
- package/lib/component/elements/popup/Modal/Context.js +9 -5
- package/lib/component/elements/popup/Modal/Modal.js +8 -6
- package/lib/component/elements/popup/Modal/ModalContent.js +11 -9
- package/lib/component/elements/popup/Modal/Provider.js +44 -39
- package/lib/component/elements/popup/Modal/index.js +15 -4
- package/lib/component/elements/popup/Transition.js +14 -11
- package/lib/component/elements/popup/Wrapper.js +18 -15
- package/lib/component/elements/popup/options.js +6 -3
- package/lib/component/elements/popup/utility.js +4 -1
- package/lib/component/elements/resizer/DivResizer.js +18 -12
- package/lib/component/elements/resizer/Resizer.js +12 -6
- package/lib/component/elements/resizer/SVGResizer.js +15 -9
- package/lib/component/elements/resizer/useResizer.js +18 -12
- package/lib/component/elements/toggle/ToggleButton.js +11 -8
- package/lib/component/elements/toggle/ToggleButtonGroup.js +21 -15
- package/lib/component/header/ApodizationOptionsPanel.js +53 -24
- package/lib/component/header/AutoPeakPickingOptionPanel.js +53 -21
- package/lib/component/header/BaseLineCorrectionPanel.js +54 -25
- package/lib/component/header/Header.js +65 -57
- package/lib/component/header/HeaderContainer.js +7 -3
- package/lib/component/header/PhaseCorrectionPanel.js +41 -34
- package/lib/component/header/RangesPickingOptionPanel.js +53 -21
- package/lib/component/header/ZeroFillingOptionsPanel.js +30 -24
- package/lib/component/header/Zones2DOptionPanel.js +47 -16
- package/lib/component/highlight/index.d.ts +1 -0
- package/lib/component/highlight/index.js +29 -22
- package/lib/component/hooks/useActiveSpectra.js +9 -5
- package/lib/component/hooks/useActiveSpectrum.js +9 -5
- package/lib/component/hooks/useActiveSpectrumPeaksViewState.js +12 -8
- package/lib/component/hooks/useActiveSpectrumRangesViewState.d.ts +3 -0
- package/lib/component/hooks/useActiveSpectrumRangesViewState.js +23 -0
- package/lib/component/hooks/useActiveSpectrumStyleOptions.js +15 -9
- package/lib/component/hooks/useActiveSpectrumZonesViewState.d.ts +3 -0
- package/lib/component/hooks/useActiveSpectrumZonesViewState.js +21 -0
- package/lib/component/hooks/useCheckExperimentalFeature.js +6 -3
- package/lib/component/hooks/useCheckPointsNumberInWindowArea.js +15 -8
- package/lib/component/hooks/useCheckToolsVisibility.js +22 -15
- package/lib/component/hooks/useCombinedRefs.js +7 -4
- package/lib/component/hooks/useDatumWithSpectraStatistics.js +15 -9
- package/lib/component/hooks/useExport.js +37 -31
- package/lib/component/hooks/useFilter.js +12 -5
- package/lib/component/hooks/useFormatNumberByNucleus.js +16 -9
- package/lib/component/hooks/useIntegralPath.js +24 -21
- package/lib/component/hooks/useNucleus.js +8 -5
- package/lib/component/hooks/usePanelPreferences.js +30 -22
- package/lib/component/hooks/useResizerStatus.js +9 -5
- package/lib/component/hooks/useSaveSettings.js +49 -19
- package/lib/component/hooks/useSpectraPerNucleus.js +13 -7
- package/lib/component/hooks/useSpectrum.js +10 -7
- package/lib/component/hooks/useTableSortBy.js +18 -11
- package/lib/component/hooks/useToolsFunctions.js +36 -30
- package/lib/component/hooks/useVerticalAlign.js +9 -5
- package/lib/component/hooks/useXScale.js +10 -6
- package/lib/component/hooks/useXYReduce.js +13 -9
- package/lib/component/loader/DefaultSpinnerComponent.js +8 -5
- package/lib/component/loader/DropZone.js +38 -36
- package/lib/component/loader/NoData.js +9 -7
- package/lib/component/loader/Spinner.js +16 -11
- package/lib/component/loader/SpinnerContext.js +14 -7
- package/lib/component/main/ErrorOverlay.js +12 -6
- package/lib/component/main/InnerNMRium.js +61 -31
- package/lib/component/main/InnerNMRiumContents.js +32 -26
- package/lib/component/main/NMRium.js +17 -11
- package/lib/component/main/NMRiumStateProvider.js +33 -27
- package/lib/component/main/SplitPaneWrapper.js +10 -6
- package/lib/component/main/StateError.js +11 -7
- package/lib/component/main/index.js +21 -3
- package/lib/component/main/types.js +2 -1
- package/lib/component/modal/AboutPredictionModal.js +14 -9
- package/lib/component/modal/AboutSpectrumSimulationModal.js +14 -9
- package/lib/component/modal/AlignSpectraModal.js +122 -45
- package/lib/component/modal/CopyClipboardModal.js +12 -7
- package/lib/component/modal/EditPeakShapeModal.js +49 -21
- package/lib/component/modal/ExportAsJcampModal.js +21 -16
- package/lib/component/modal/ImportPublicationStringModal.js +47 -19
- package/lib/component/modal/LoadJCAMPModal.js +49 -19
- package/lib/component/modal/LogsHistoryModal.js +27 -20
- package/lib/component/modal/ModalStyle.js +5 -2
- package/lib/component/modal/MoleculeStructureEditorModal.d.ts +5 -1
- package/lib/component/modal/MoleculeStructureEditorModal.js +27 -26
- package/lib/component/modal/MultipletAnalysisModal.js +30 -24
- package/lib/component/modal/PredictSpectraModal.js +39 -32
- package/lib/component/modal/SaveAsModal.js +29 -23
- package/{lib-cjs/component/modal → lib/component/modal/aboutUs}/AboutUsModal.js +4 -3
- package/lib/component/modal/aboutUs/AboutUsZakodium.d.ts +1 -0
- package/lib/component/modal/aboutUs/AboutUsZakodium.js +39 -0
- package/lib/component/modal/changeSum/ChangeSumModal.js +9 -6
- package/lib/component/modal/changeSum/ChangeSumModalContents.js +50 -20
- package/lib/component/modal/changeSum/SelectMolecule.js +24 -18
- package/lib/component/modal/editRange/EditRangeModal.js +48 -43
- package/lib/component/modal/editRange/forms/components/AddSignalFormTab.js +53 -25
- package/lib/component/modal/editRange/forms/components/CouplingsTable.js +29 -24
- package/lib/component/modal/editRange/forms/components/DeltaInput.js +11 -6
- package/lib/component/modal/editRange/forms/components/SignalFormInfo.js +11 -7
- package/lib/component/modal/editRange/forms/components/SignalFormTab.js +12 -7
- package/lib/component/modal/editRange/forms/components/SignalsForm.js +45 -40
- package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js +29 -4
- package/lib/component/modal/editZone/EditPathLengthFormik.js +19 -14
- package/lib/component/modal/editZone/EditZoneModal.js +29 -24
- package/lib/component/modal/editZone/SignalFormTab.js +9 -4
- package/lib/component/modal/editZone/SignalsForm.js +25 -20
- package/lib/component/modal/editZone/validation/EditZoneValidation.js +27 -2
- package/lib/component/modal/editZone/validation/isDefaultPathLength.js +10 -5
- package/lib/component/modal/metaImportation/MetaImportationModal.js +68 -40
- package/lib/component/modal/metaImportation/index.js +19 -11
- package/lib/component/modal/metaImportation/utils/mapColumnToSelectItems.js +5 -1
- package/lib/component/modal/setting/GeneralSettings.js +84 -56
- package/lib/component/modal/setting/WorkspaceItem.js +13 -8
- package/lib/component/modal/setting/settings-tabs/DatabasesTabContent.js +27 -22
- package/lib/component/modal/setting/settings-tabs/DisplayTabContent.js +12 -7
- package/lib/component/modal/setting/settings-tabs/FormattingTabContent.js +21 -16
- package/lib/component/modal/setting/settings-tabs/GeneralTabContent.js +13 -8
- package/lib/component/modal/setting/settings-tabs/ImportationFiltersTabContent.js +17 -12
- package/lib/component/modal/setting/settings-tabs/InfoBlockTabContent.js +35 -30
- package/lib/component/modal/setting/settings-tabs/OnLoadProcessingTabContent.js +20 -15
- package/lib/component/modal/setting/settings-tabs/ToolsTabContent.js +11 -6
- package/lib/component/modal/setting/settingsValidation.js +25 -18
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignment.js +21 -16
- package/lib/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +16 -11
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +23 -16
- package/lib/component/panels/InformationPanel.js +17 -102
- package/lib/component/panels/IntegralsPanel/IntegralPanel.js +73 -44
- package/lib/component/panels/IntegralsPanel/IntegralTable.d.ts +3 -2
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +88 -52
- package/lib/component/panels/IntegralsPanel/IntegralsPreferences.js +60 -27
- package/lib/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +19 -12
- package/lib/component/panels/MatrixGenerationPanel/FiltersOptions.js +37 -30
- package/lib/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +71 -42
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +20 -14
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +41 -35
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +50 -44
- package/lib/component/panels/MoleculesPanel/Utilities.js +13 -5
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.d.ts +10 -6
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +49 -44
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +58 -52
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +30 -25
- package/lib/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisCell.js +9 -7
- package/lib/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisColumnHeader.js +17 -12
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +25 -18
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js +28 -23
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +17 -12
- package/lib/component/panels/MultipleSpectraAnalysisPanel/preferences/index.js +54 -26
- package/lib/component/panels/PanelNoData.js +7 -3
- package/lib/component/panels/Panels.js +63 -57
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +84 -55
- package/lib/component/panels/PeaksPanel/PeaksPreferences.js +38 -21
- package/lib/component/panels/PeaksPanel/PeaksTable.d.ts +5 -2
- package/lib/component/panels/PeaksPanel/PeaksTable.js +97 -55
- package/lib/component/panels/PeaksPanel/PeaksToggleActions.d.ts +10 -0
- package/lib/component/panels/PeaksPanel/PeaksToggleActions.js +17 -0
- package/lib/component/panels/RangesPanel/RangesHeader.d.ts +1 -5
- package/lib/component/panels/RangesPanel/RangesHeader.js +86 -40
- package/lib/component/panels/RangesPanel/RangesPanel.js +52 -55
- package/lib/component/panels/RangesPanel/RangesPreferences.js +68 -27
- package/lib/component/panels/RangesPanel/RangesTable.js +28 -12
- package/lib/component/panels/RangesPanel/RangesTableRow.js +43 -38
- package/lib/component/panels/RangesPanel/TableColumns/AbsoluteColumn.js +6 -4
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.d.ts +4 -1
- package/lib/component/panels/RangesPanel/TableColumns/ActionsColumn.js +18 -12
- package/lib/component/panels/RangesPanel/TableColumns/CouplingColumn.js +12 -7
- package/lib/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +10 -8
- package/lib/component/panels/RangesPanel/TableColumns/RangeColumn.js +6 -4
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +15 -10
- package/lib/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +12 -7
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +14 -9
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js +10 -8
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +27 -21
- package/lib/component/panels/RangesPanel/hooks/useMapRanges.js +8 -6
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +34 -29
- package/lib/component/panels/SpectrumsPanel/SpectraPreferences.js +31 -26
- package/lib/component/panels/SpectrumsPanel/SpectraTable.js +50 -43
- package/lib/component/panels/SpectrumsPanel/SpectrumListPanel.js +15 -10
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +35 -27
- package/lib/component/panels/SpectrumsPanel/base/ColorIndicator.js +8 -6
- package/lib/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +14 -11
- package/lib/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +24 -17
- package/lib/component/panels/SpectrumsPanel/base/SpectrumName.js +12 -8
- package/lib/component/panels/SpectrumsPanel/base/setting/PlotChart.js +9 -6
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.js +14 -9
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +12 -7
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.js +14 -9
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +16 -11
- package/lib/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +18 -13
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +9 -5
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +46 -41
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +39 -34
- package/lib/component/panels/SummaryPanel/CorrelationTable/Constants.js +7 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +18 -13
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +48 -43
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/Confirmation.js +9 -7
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +49 -20
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +26 -21
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +20 -15
- package/lib/component/panels/SummaryPanel/Overview.js +15 -13
- package/lib/component/panels/SummaryPanel/SetMolecularFormulaModal.js +20 -14
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js +20 -14
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +100 -73
- package/lib/component/panels/SummaryPanel/utilities/Utilities.d.ts +2 -3
- package/lib/component/panels/SummaryPanel/utilities/Utilities.js +59 -44
- package/lib/component/panels/SummaryPanel/utilities/useInView.js +10 -8
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.d.ts +5 -1
- package/lib/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +30 -24
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +6 -4
- package/lib/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +10 -5
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.d.ts +2 -5
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +27 -19
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +6 -4
- package/lib/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +10 -5
- package/lib/component/panels/ZonesPanel/ZonesPanel.js +85 -51
- package/lib/component/panels/ZonesPanel/ZonesPreferences.js +68 -21
- package/lib/component/panels/ZonesPanel/ZonesTable.d.ts +4 -3
- package/lib/component/panels/ZonesPanel/ZonesTable.js +34 -17
- package/lib/component/panels/ZonesPanel/ZonesTableRow.d.ts +2 -5
- package/lib/component/panels/ZonesPanel/ZonesTableRow.js +38 -31
- package/lib/component/panels/ZonesPanel/hooks/useMapZones.js +9 -3
- package/lib/component/panels/databasePanel/DatabasePanel.d.ts +18 -1
- package/lib/component/panels/databasePanel/DatabasePanel.js +88 -119
- package/lib/component/panels/databasePanel/DatabasePreferences.js +47 -19
- package/lib/component/panels/databasePanel/DatabaseSearchOptions.d.ts +18 -0
- package/lib/component/panels/databasePanel/DatabaseSearchOptions.js +60 -0
- package/lib/component/panels/databasePanel/DatabaseStructureSearchModal.js +13 -6
- package/lib/component/panels/databasePanel/DatabaseTable.js +32 -27
- package/lib/component/panels/extra/BasicPanelStyle.js +5 -2
- package/lib/component/panels/extra/placeholder/NoDataForFid.d.ts +1 -0
- package/{lib-cjs/component/modal/editZone/SignalFormTab.js → lib/component/panels/extra/placeholder/NoDataForFid.js} +4 -4
- package/lib/component/panels/extra/placeholder/NoTableData.js +5 -3
- package/lib/component/panels/extra/preferences/ColumnsHelper.js +15 -7
- package/lib/component/panels/extra/preferences/NucleusGroup.js +11 -4
- package/lib/component/panels/extra/preferences/NucleusPreferences.js +12 -5
- package/lib/component/panels/extra/preferences/PreferencesContainer.js +7 -3
- package/lib/component/panels/extra/preferences/PreferencesGroup.js +8 -4
- package/lib/component/panels/extra/utilities/MultiplicityUtilities.js +10 -5
- package/lib/component/panels/extra/utilities/UseToggleStatus.js +8 -6
- package/lib/component/panels/filtersPanel/FilterPanel.js +18 -12
- package/lib/component/panels/filtersPanel/FiltersTable.js +39 -33
- package/lib/component/panels/header/DefaultPanelHeader.js +17 -16
- package/lib/component/panels/header/PanelHeader.js +6 -3
- package/lib/component/panels/header/PreferencesHeader.js +13 -8
- package/lib/component/panels/header/SpectraAutomaticPickingButton.js +22 -15
- package/lib/component/panels/predictionPanel/PredictionOptionsPanel.js +50 -22
- package/lib/component/panels/predictionPanel/PredictionPanel.js +46 -40
- package/lib/component/panels/predictionPanel/PredictionPreferences.js +18 -13
- package/lib/component/panels/predictionPanel/PredictionSimpleOptions.js +48 -20
- package/lib/component/panels/spectrumSimulation/SpectrumSimulation.js +37 -31
- package/lib/component/panels/spectrumSimulation/SpectrumSimulationPreferences.js +19 -14
- package/lib/component/panels/spectrumSimulation/SpectrumSimulationSimpleOptions.js +22 -11
- package/lib/component/panels/spectrumSimulation/SpinSystemTable.js +22 -15
- package/lib/component/reducer/IgnoreActions.js +4 -8
- package/lib/component/reducer/Reducer.d.ts +9 -17
- package/lib/component/reducer/Reducer.js +71 -54
- package/lib/component/reducer/actions/AssignmentsActions.js +4 -1
- package/lib/component/reducer/actions/CorrelationsActions.js +38 -27
- package/lib/component/reducer/actions/DatabaseActions.js +18 -14
- package/lib/component/reducer/actions/DimensionsActions.js +4 -1
- package/lib/component/reducer/actions/DomainActions.js +36 -25
- package/lib/component/reducer/actions/FiltersActions.js +132 -96
- package/lib/component/reducer/actions/HistoryActions.js +9 -4
- package/lib/component/reducer/actions/IntegralsActions.js +50 -38
- package/lib/component/reducer/actions/LoadActions.d.ts +2 -0
- package/lib/component/reducer/actions/LoadActions.js +66 -33
- package/lib/component/reducer/actions/MoleculeActions.js +65 -28
- package/lib/component/reducer/actions/PeaksActions.d.ts +3 -2
- package/lib/component/reducer/actions/PeaksActions.js +69 -41
- package/lib/component/reducer/actions/PreferencesActions.js +18 -11
- package/lib/component/reducer/actions/RangesActions.d.ts +13 -9
- package/lib/component/reducer/actions/RangesActions.js +147 -137
- package/lib/component/reducer/actions/SpectraAnalysisAction.js +4 -1
- package/lib/component/reducer/actions/SpectrumsActions.js +82 -63
- package/lib/component/reducer/actions/ToolsActions.js +143 -96
- package/lib/component/reducer/actions/ZonesActions.d.ts +8 -9
- package/lib/component/reducer/actions/ZonesActions.js +96 -102
- package/lib/component/reducer/core/Constants.d.ts +0 -4
- package/lib/component/reducer/core/Constants.js +4 -6
- package/lib/component/reducer/helper/GetClosestNumber.js +3 -1
- package/lib/component/reducer/helper/Zoom1DManager.js +13 -9
- package/lib/component/reducer/helper/ZoomHistoryManager.js +8 -4
- package/lib/component/reducer/helper/get2DRange.js +7 -4
- package/lib/component/reducer/helper/getActiveSpectra.js +5 -1
- package/lib/component/reducer/helper/getActiveSpectraAsObject.js +9 -4
- package/lib/component/reducer/helper/getActiveSpectrum.js +5 -1
- package/lib/component/reducer/helper/getRange.js +9 -4
- package/lib/component/reducer/helper/getSpectrum.js +7 -3
- package/lib/component/reducer/helper/getStrongestPeak.js +9 -5
- package/lib/component/reducer/helper/getVerticalAlign.js +5 -1
- package/lib/component/reducer/preferences/actions/addWorkspace.js +16 -9
- package/lib/component/reducer/preferences/actions/analyzeSpectra.js +45 -15
- package/lib/component/reducer/preferences/actions/applyGeneralPreferences.js +5 -1
- package/lib/component/reducer/preferences/actions/initPreferences.js +15 -11
- package/lib/component/reducer/preferences/actions/matrixGeneration.js +12 -7
- package/lib/component/reducer/preferences/actions/removeWorkspace.js +8 -4
- package/lib/component/reducer/preferences/actions/setActiveWorkspace.js +8 -4
- package/lib/component/reducer/preferences/actions/setPanelsPreferences.js +7 -3
- package/lib/component/reducer/preferences/actions/setPreferences.js +17 -10
- package/lib/component/reducer/preferences/actions/setVerticalSplitterPosition.js +7 -3
- package/lib/component/reducer/preferences/actions/setWorkspace.js +12 -8
- package/lib/component/reducer/preferences/panelsPreferencesDefaultValues.js +51 -8
- package/lib/component/reducer/preferences/preferencesReducer.js +58 -51
- package/lib/component/reducer/preferences/utilities/checkKeysExists.js +8 -4
- package/lib/component/reducer/preferences/utilities/filterObject.js +5 -1
- package/lib/component/reducer/preferences/utilities/flatObject.js +5 -1
- package/lib/component/reducer/preferences/utilities/getActiveWorkspace.js +5 -1
- package/lib/component/reducer/preferences/utilities/getPreferencesByWorkspace.js +11 -4
- package/lib/component/reducer/preferences/utilities/initWorkspace.js +11 -4
- package/lib/component/reducer/preferences/utilities/isReadOnlyWorkspace.js +5 -1
- package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.js +5 -1
- package/lib/component/reducer/preferences/utilities/mapWorkspaces.js +11 -4
- package/lib/component/reducer/scaleReducer.js +18 -15
- package/lib/component/reducer/types/ActionType.js +2 -1
- package/lib/component/toolbar/BasicToolBar.js +58 -52
- package/lib/component/toolbar/FunctionToolBar.js +36 -30
- package/lib/component/toolbar/ToolBar.js +17 -11
- package/lib/component/toolbar/ToolTypes.d.ts +2 -2
- package/lib/component/toolbar/ToolTypes.js +36 -34
- package/lib/component/utility/Evaluate.js +4 -1
- package/lib/component/utility/Events.js +8 -3
- package/lib/component/utility/FileUtility.js +5 -1
- package/lib/component/utility/GroupByInfoKey.js +4 -1
- package/lib/component/utility/LocalStorage.js +26 -15
- package/lib/component/utility/PathBuilder.js +5 -1
- package/lib/component/utility/PreferencesHelper.js +8 -5
- package/lib/component/utility/assert.js +5 -1
- package/lib/component/utility/convertPathArrayToString.js +5 -1
- package/lib/component/utility/export.js +27 -14
- package/lib/component/utility/filterType.js +2 -1
- package/lib/component/utility/formatNumber.js +10 -3
- package/lib/component/utility/getSpectraByNucleus.js +10 -3
- package/lib/component/utility/getSpectraObjectPaths.js +5 -1
- package/lib/component/utility/getUniqueNuclei.js +5 -1
- package/lib/component/utility/isGoogleDocument.js +5 -1
- package/lib/component/utility/jpathToArray.js +5 -1
- package/lib/component/utility/nucleusToString.d.ts +1 -0
- package/lib/component/utility/nucleusToString.js +9 -1
- package/lib/component/utility/parseColor.js +5 -1
- package/lib/component/workspaces/assignment.js +4 -1
- package/lib/component/workspaces/basic.js +4 -1
- package/lib/component/workspaces/embedded.js +10 -1
- package/lib/component/workspaces/exercise.js +12 -1
- package/lib/component/workspaces/index.js +17 -15
- package/lib/component/workspaces/prediction.js +4 -1
- package/lib/component/workspaces/process1D.js +4 -1
- package/lib/component/workspaces/simulation.js +4 -1
- package/lib/component/workspaces/workspaceDefaultProperties.js +28 -22
- package/lib/constants.js +10 -7
- package/lib/data/PredictionManager.js +39 -30
- package/lib/data/SpectraManager.js +49 -20
- package/lib/data/constants/DefaultApodizationOptions.js +4 -1
- package/lib/data/constants/DefaultPathLengths.js +3 -1
- package/lib/data/constants/Multiplets.js +5 -2
- package/lib/data/constants/References.d.ts +5 -3
- package/lib/data/constants/References.js +8 -4
- package/lib/data/constants/signalsKinds.d.ts +12 -0
- package/lib/data/constants/signalsKinds.js +20 -0
- package/lib/data/data1d/Spectrum1D/SumManager.d.ts +1 -7
- package/lib/data/data1d/Spectrum1D/SumManager.js +28 -12
- package/lib/data/data1d/Spectrum1D/cloneDatum1D.js +5 -1
- package/lib/data/data1d/Spectrum1D/convertDataToFloat64Array.js +5 -1
- package/lib/data/data1d/Spectrum1D/generateJGraphData.js +6 -3
- package/lib/data/data1d/Spectrum1D/generateSpectrumFromPublicationString.js +9 -5
- package/lib/data/data1d/Spectrum1D/get1DColor.js +7 -3
- package/lib/data/data1d/Spectrum1D/get1DDataXY.js +5 -1
- package/lib/data/data1d/Spectrum1D/getReferenceShift.d.ts +10 -1
- package/lib/data/data1d/Spectrum1D/getReferenceShift.js +17 -10
- package/lib/data/data1d/Spectrum1D/index.js +45 -19
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.d.ts +2 -0
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +36 -22
- package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +5 -1
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.d.ts +5 -11
- package/lib/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +14 -11
- package/lib/data/data1d/Spectrum1D/isRangeAssigned.js +5 -1
- package/lib/data/data1d/Spectrum1D/isSpectrum1D.js +5 -1
- package/lib/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +13 -6
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.d.ts +2 -5
- package/lib/data/data1d/Spectrum1D/peaks/initiatePeaks.js +12 -5
- package/lib/data/data1d/Spectrum1D/peaks/lookupPeak.js +10 -3
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +11 -7
- package/lib/data/data1d/Spectrum1D/ranges/addRange.d.ts +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +21 -13
- package/lib/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +6 -3
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.js +18 -11
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +5 -1
- package/lib/data/data1d/Spectrum1D/ranges/changeRangeSignal.js +5 -1
- package/lib/data/data1d/Spectrum1D/ranges/checkRangeKind.js +8 -4
- package/lib/data/data1d/Spectrum1D/ranges/detectRange.js +15 -11
- package/lib/data/data1d/Spectrum1D/ranges/detectRanges.js +15 -8
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.js +16 -12
- package/lib/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +9 -5
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +15 -13
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.js +14 -11
- package/lib/data/data1d/database.js +24 -16
- package/lib/data/data1d/multipleSpectraAnalysis.js +37 -22
- package/lib/data/data1d/spectrumSimulation.js +10 -5
- package/lib/data/data2d/Processing2D.js +11 -7
- package/lib/data/data2d/Spectrum2D/cloneDatum2D.js +5 -1
- package/lib/data/data2d/Spectrum2D/contours.js +11 -5
- package/lib/data/data2d/Spectrum2D/get2DColor.js +7 -3
- package/lib/data/data2d/Spectrum2D/get2DSpectrumErrorValue.js +5 -1
- package/lib/data/data2d/Spectrum2D/getMissingProjection.js +9 -5
- package/lib/data/data2d/Spectrum2D/getShift.js +8 -4
- package/lib/data/data2d/Spectrum2D/getSlice.js +11 -7
- package/lib/data/data2d/Spectrum2D/index.js +21 -9
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +15 -11
- package/lib/data/data2d/Spectrum2D/isSpectrum2D.js +5 -1
- package/lib/data/data2d/Spectrum2D/zones/changeZoneSignal.js +8 -4
- package/lib/data/data2d/Spectrum2D/zones/detectZones.js +9 -5
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.d.ts +32 -12
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js +9 -5
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js +7 -3
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.d.ts +32 -12
- package/lib/data/data2d/Spectrum2D/zones/initiateZones.js +12 -5
- package/lib/data/data2d/Spectrum2D/zones/isZoneExists.js +5 -1
- package/lib/data/data2d/Spectrum2D/zones/updateZones.js +7 -3
- package/lib/data/defaults/13c.js +3 -1
- package/lib/data/defaults/1h.js +3 -1
- package/lib/data/defaults/default.js +12 -5
- package/lib/data/getDefaultMatrixFilters.js +10 -3
- package/lib/data/matrixGeneration.js +18 -10
- package/lib/data/molecules/Molecule.js +17 -9
- package/lib/data/molecules/MoleculeManager.js +30 -20
- package/lib/data/parseMeta/index.js +14 -4
- package/lib/data/parseMeta/isMetaFile.js +5 -1
- package/lib/data/parseMeta/linkMetaWithSpectra.js +17 -8
- package/lib/data/parseMeta/mapErrors.js +5 -1
- package/lib/data/parseMeta/parseMetaFile.js +7 -3
- package/lib/data/parseMeta/prepareKey.js +5 -1
- package/lib/data/types/common/File.js +2 -1
- package/lib/data/types/common/Info.js +2 -1
- package/lib/data/types/common/MapOptions.js +2 -1
- package/lib/data/types/common/Nucleus.js +2 -1
- package/lib/data/types/common/SignalKind.d.ts +1 -0
- package/lib/data/types/data1d/ComplexData1D.js +2 -1
- package/lib/data/types/data1d/ExclusionZone.js +2 -1
- package/lib/data/types/data1d/MatrixOptions.js +2 -1
- package/lib/data/types/data1d/RangeDetectionResult.js +2 -1
- package/lib/data/types/data1d/index.js +2 -1
- package/lib/data/types/data2d/ContourOptions.js +2 -1
- package/lib/data/types/data2d/index.js +2 -1
- package/lib/data/utilities/Concatenation.js +7 -3
- package/lib/data/utilities/FindUtilities.js +9 -1
- package/lib/data/utilities/RangeUtilities.js +31 -16
- package/lib/data/utilities/ZoneUtilities.js +21 -10
- package/lib/data/utilities/calculateSanPlot.js +7 -3
- package/lib/data/utilities/checkModifierKeyActivated.js +4 -1
- package/lib/data/utilities/convertSpectraListToObject.js +5 -1
- package/lib/data/utilities/generateChar.js +4 -1
- package/lib/data/utilities/generateColor.js +11 -5
- package/lib/data/utilities/generateNumbersPowerOfX.js +4 -1
- package/lib/data/utilities/getAtom.js +4 -1
- package/lib/data/utilities/getAtomsFromMF.js +4 -1
- package/lib/data/utilities/getSum.js +5 -1
- package/lib/data/utilities/isInRange.js +4 -1
- package/lib/data/utilities/isNumber.js +5 -1
- package/lib/types/NMRiumDataReturn.js +2 -1
- package/lib/types/UsedColors.js +2 -1
- package/lib/utils/clipboard/clipboard.js +13 -5
- package/lib/utils/clipboard/clipboardComponents.js +36 -28
- package/lib/utils/clipboard/clipboardHooks.js +22 -17
- package/lib/utils/clipboard/types.js +2 -1
- package/lib/utils/stringCapitalize.d.ts +1 -0
- package/lib/utils/stringCapitalize.js +7 -0
- package/lib/versionInfo.js +3 -1
- package/package.json +33 -35
- package/lib/component/modal/AboutUsModal.js +0 -109
- package/lib/data/constants/SignalsKinds.d.ts +0 -9
- package/lib/data/constants/SignalsKinds.js +0 -36
- package/lib/data/data2d/Spectrum2D/zones/mapZones.d.ts +0 -36
- package/lib/data/data2d/Spectrum2D/zones/mapZones.js +0 -63
- package/lib-cjs/component/1d/ApodizationLine.js +0 -102
- package/lib-cjs/component/1d/Chart1D.js +0 -27
- package/lib-cjs/component/1d/ExclusionZoneAnnotation.js +0 -34
- package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +0 -47
- package/lib-cjs/component/1d/FooterBanner.js +0 -122
- package/lib-cjs/component/1d/Line.js +0 -59
- package/lib-cjs/component/1d/LinesSeries.js +0 -18
- package/lib-cjs/component/1d/SpectraLegends.js +0 -64
- package/lib-cjs/component/1d/Viewer1D.js +0 -321
- package/lib-cjs/component/1d/XAxis.js +0 -90
- package/lib-cjs/component/1d/YAxis.js +0 -62
- package/lib-cjs/component/1d/database/DatabaseElements.js +0 -23
- package/lib-cjs/component/1d/database/DatabaseSpectrum.js +0 -70
- package/lib-cjs/component/1d/database/ResurrectedDatabaseRanges.js +0 -69
- package/lib-cjs/component/1d/integral/Integral.js +0 -17
- package/lib-cjs/component/1d/integral/IntegralIndicator.js +0 -25
- package/lib-cjs/component/1d/integral/IntegralResizable.js +0 -78
- package/lib-cjs/component/1d/integral/IntegralsSeries.js +0 -27
- package/lib-cjs/component/1d/jCouplingGraph/JGraph.js +0 -46
- package/lib-cjs/component/1d/jCouplingGraph/JGraphContext.js +0 -18
- package/lib-cjs/component/1d/jCouplingGraph/JGraphVerticalAxis.js +0 -15
- package/lib-cjs/component/1d/jCouplingGraph/JsCoupling.js +0 -13
- package/lib-cjs/component/1d/jCouplingGraph/JsCouplingLinks.js +0 -29
- package/lib-cjs/component/1d/jCouplingGraph/JsCouplings.js +0 -19
- package/lib-cjs/component/1d/multiAnalysis/AnalysisRange.js +0 -68
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +0 -26
- package/lib-cjs/component/1d/multiplicityTree/LevelNode.js +0 -10
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +0 -184
- package/lib-cjs/component/1d/multiplicityTree/StringNode.js +0 -9
- package/lib-cjs/component/1d/multiplicityTree/TreeColors.js +0 -4
- package/lib-cjs/component/1d/multiplicityTree/TreeNodes.js +0 -25
- package/lib-cjs/component/1d/multiplicityTree/buildTreeNode.js +0 -62
- package/lib-cjs/component/1d/peaks/PeakAnnotations.js +0 -36
- package/lib-cjs/component/1d/peaks/PeakAnnotationsSpreadMode.js +0 -64
- package/lib-cjs/component/1d/peaks/PeakEditionManager.js +0 -129
- package/lib-cjs/component/1d/peaks/Peaks.js +0 -29
- package/lib-cjs/component/1d/peaks/PeaksShapes.js +0 -43
- package/lib-cjs/component/1d/peaks/usePeakShapesPath.js +0 -57
- package/lib-cjs/component/1d/ranges/AssignmentActionsButtons.js +0 -18
- package/lib-cjs/component/1d/ranges/Range.js +0 -89
- package/lib-cjs/component/1d/ranges/RangeIntegral.js +0 -12
- package/lib-cjs/component/1d/ranges/Ranges.js +0 -37
- package/lib-cjs/component/1d/tool/BaseLineZones.js +0 -23
- package/lib-cjs/component/1d/tool/PeakPointer.js +0 -97
- package/lib-cjs/component/1d/tool/VerticalIndicator.js +0 -26
- package/lib-cjs/component/1d/tool/XLabelPointer.js +0 -54
- package/lib-cjs/component/1d/utilities/intersectionResolver.js +0 -75
- package/lib-cjs/component/1d/utilities/scale.js +0 -44
- package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/ActionsButton.js +0 -13
- package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +0 -84
- package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/index.js +0 -47
- package/lib-cjs/component/1d-2d/components/SpectrumInfoBlock.js +0 -43
- package/lib-cjs/component/1d-2d/tools/BrushX.js +0 -37
- package/lib-cjs/component/1d-2d/tools/BrushXY.js +0 -94
- package/lib-cjs/component/1d-2d/tools/CrossLinePointer.js +0 -58
- package/lib-cjs/component/2d/1d-tracer/HorizontalSliceChart.js +0 -68
- package/lib-cjs/component/2d/1d-tracer/Left1DChart.js +0 -71
- package/lib-cjs/component/2d/1d-tracer/Top1DChart.js +0 -67
- package/lib-cjs/component/2d/1d-tracer/VerticalSliceChart.js +0 -68
- package/lib-cjs/component/2d/Chart2D.js +0 -26
- package/lib-cjs/component/2d/FooterBanner.js +0 -220
- package/lib-cjs/component/2d/SignalDeltaLine.js +0 -23
- package/lib-cjs/component/2d/SlicingView.js +0 -49
- package/lib-cjs/component/2d/Viewer2D.js +0 -165
- package/lib-cjs/component/2d/XAxis.js +0 -72
- package/lib-cjs/component/2d/YAxis.js +0 -68
- package/lib-cjs/component/2d/fid/FidCanvas.js +0 -114
- package/lib-cjs/component/2d/fid/FidContainer.js +0 -39
- package/lib-cjs/component/2d/ft/Contours.js +0 -81
- package/lib-cjs/component/2d/ft/FTContainer.js +0 -20
- package/lib-cjs/component/2d/tools/XYLabelPointer.js +0 -137
- package/lib-cjs/component/2d/utilities/DimensionLayout.js +0 -44
- package/lib-cjs/component/2d/utilities/SliceScale.js +0 -32
- package/lib-cjs/component/2d/utilities/scale.js +0 -42
- package/lib-cjs/component/2d/zones/IndicationLines.js +0 -47
- package/lib-cjs/component/2d/zones/Signal.js +0 -50
- package/lib-cjs/component/2d/zones/SignalCrosshair.js +0 -25
- package/lib-cjs/component/2d/zones/Zone.js +0 -71
- package/lib-cjs/component/2d/zones/Zones.js +0 -31
- package/lib-cjs/component/EventsTrackers/BrushTracker.js +0 -196
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +0 -426
- package/lib-cjs/component/EventsTrackers/MouseTracker.js +0 -34
- package/lib-cjs/component/assignment/AssignmentsContext.js +0 -88
- package/lib-cjs/component/assignment/AssignmentsReducer.js +0 -45
- package/lib-cjs/component/assignment/actions/initAssignment.js +0 -65
- package/lib-cjs/component/assignment/actions/removeAssignment.js +0 -29
- package/lib-cjs/component/assignment/actions/setActiveAssignment.js +0 -11
- package/lib-cjs/component/assignment/actions/toggleAssignment.js +0 -47
- package/lib-cjs/component/assignment/index.js +0 -29
- package/lib-cjs/component/assignment/utilities/filterForIDsWithAssignment.js +0 -7
- package/lib-cjs/component/context/ChartContext.js +0 -11
- package/lib-cjs/component/context/DispatchContext.js +0 -10
- package/lib-cjs/component/context/GlobalContext.js +0 -10
- package/lib-cjs/component/context/KeyModifierContext.js +0 -44
- package/lib-cjs/component/context/LoaderContext.js +0 -13
- package/lib-cjs/component/context/LoggerContext.js +0 -57
- package/lib-cjs/component/context/PreferencesContext.js +0 -37
- package/lib-cjs/component/context/ScaleContext.js +0 -19
- package/lib-cjs/component/elements/ActionButtons.js +0 -20
- package/lib-cjs/component/elements/ActiveButton.js +0 -39
- package/lib-cjs/component/elements/Button.js +0 -216
- package/lib-cjs/component/elements/ButtonToolTip.js +0 -11
- package/lib-cjs/component/elements/CheckBox.js +0 -12
- package/lib-cjs/component/elements/CheckBoxCell.js +0 -15
- package/lib-cjs/component/elements/CloseButton.js +0 -28
- package/lib-cjs/component/elements/ColorInput.js +0 -88
- package/lib-cjs/component/elements/ColumnWrapper.js +0 -12
- package/lib-cjs/component/elements/ContextMenu.js +0 -130
- package/lib-cjs/component/elements/DeleteButton.js +0 -8
- package/lib-cjs/component/elements/EditableColumn.js +0 -74
- package/lib-cjs/component/elements/GroupPane.js +0 -18
- package/lib-cjs/component/elements/Header.js +0 -21
- package/lib-cjs/component/elements/Input.js +0 -141
- package/lib-cjs/component/elements/InputRange.js +0 -62
- package/lib-cjs/component/elements/IsotopesViewer.js +0 -14
- package/lib-cjs/component/elements/Label.js +0 -20
- package/lib-cjs/component/elements/Logo.js +0 -7
- package/lib-cjs/component/elements/MenuButton.js +0 -87
- package/lib-cjs/component/elements/Message.js +0 -38
- package/lib-cjs/component/elements/MolecularFormulaInput.js +0 -69
- package/lib-cjs/component/elements/MoleculeSelection.js +0 -85
- package/lib-cjs/component/elements/NextPrev.js +0 -123
- package/lib-cjs/component/elements/NumberInput.js +0 -25
- package/lib-cjs/component/elements/ReactTable/Elements/EmptyDataRow.js +0 -15
- package/lib-cjs/component/elements/ReactTable/Elements/ReactTableHeader.js +0 -28
- package/lib-cjs/component/elements/ReactTable/Elements/ReactTableRow.js +0 -69
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +0 -260
- package/lib-cjs/component/elements/ReactTable/ReactTableFlexLayout.js +0 -30
- package/lib-cjs/component/elements/ReactTable/Style.js +0 -38
- package/lib-cjs/component/elements/ReactTable/utility/ReactTableContext.js +0 -14
- package/lib-cjs/component/elements/ReactTable/utility/addCustomColumn.js +0 -16
- package/lib-cjs/component/elements/ReactTable/utility/useRowSpan.js +0 -40
- package/lib-cjs/component/elements/RemoveAssignmentsButton.js +0 -25
- package/lib-cjs/component/elements/SVGGroup.js +0 -35
- package/lib-cjs/component/elements/SaveButton.js +0 -26
- package/lib-cjs/component/elements/Scroller.js +0 -35
- package/lib-cjs/component/elements/Select.js +0 -45
- package/lib-cjs/component/elements/Tab/DeleteButton.js +0 -35
- package/lib-cjs/component/elements/Tab/Tab.js +0 -42
- package/lib-cjs/component/elements/Tab/Tabs.js +0 -120
- package/lib-cjs/component/elements/Table/Table.js +0 -15
- package/lib-cjs/component/elements/Table/TableBody.js +0 -21
- package/lib-cjs/component/elements/Table/TableCell.js +0 -28
- package/lib-cjs/component/elements/Table/TableHead.js +0 -18
- package/lib-cjs/component/elements/Table/TableRow.js +0 -13
- package/lib-cjs/component/elements/ToggleButton.js +0 -35
- package/lib-cjs/component/elements/ToolTip/ToolTip.js +0 -103
- package/lib-cjs/component/elements/ToolbarMenu.js +0 -105
- package/lib-cjs/component/elements/accordion/Accordion.js +0 -68
- package/lib-cjs/component/elements/accordion/AccordionItem.js +0 -81
- package/lib-cjs/component/elements/draggable/SVGDraggable.js +0 -39
- package/lib-cjs/component/elements/draggable/useDraggable.js +0 -71
- package/lib-cjs/component/elements/dropDownButton/DropDownButton.js +0 -59
- package/lib-cjs/component/elements/dropDownButton/DropDownList.js +0 -69
- package/lib-cjs/component/elements/formik/ErrorMessage.js +0 -15
- package/lib-cjs/component/elements/formik/FormikCheckBox.js +0 -24
- package/lib-cjs/component/elements/formik/FormikColorInput.js +0 -20
- package/lib-cjs/component/elements/formik/FormikColorPicker.js +0 -21
- package/lib-cjs/component/elements/formik/FormikColumnFormatField.js +0 -48
- package/lib-cjs/component/elements/formik/FormikError.js +0 -27
- package/lib-cjs/component/elements/formik/FormikErrorsSummary.js +0 -47
- package/lib-cjs/component/elements/formik/FormikInput.js +0 -46
- package/lib-cjs/component/elements/formik/FormikNumberInput.js +0 -29
- package/lib-cjs/component/elements/formik/FormikOnChange.js +0 -35
- package/lib-cjs/component/elements/formik/FormikSelect.js +0 -29
- package/lib-cjs/component/elements/formik/FormikSlider.js +0 -20
- package/lib-cjs/component/elements/formik/FormikTextarea.js +0 -34
- package/lib-cjs/component/elements/formik/Input.js +0 -14
- package/lib-cjs/component/elements/formik/SelectBox.js +0 -16
- package/lib-cjs/component/elements/linearAxis/LinearVerticalAxis.js +0 -19
- package/lib-cjs/component/elements/popup/Alert/AlertBlock.js +0 -36
- package/lib-cjs/component/elements/popup/Alert/Context.js +0 -14
- package/lib-cjs/component/elements/popup/Alert/ProgressIndicator.js +0 -36
- package/lib-cjs/component/elements/popup/Alert/Provider.js +0 -132
- package/lib-cjs/component/elements/popup/Alert/index.js +0 -14
- package/lib-cjs/component/elements/popup/Modal/ConfirmDialog.js +0 -67
- package/lib-cjs/component/elements/popup/Modal/Context.js +0 -10
- package/lib-cjs/component/elements/popup/Modal/Modal.js +0 -44
- package/lib-cjs/component/elements/popup/Modal/ModalContent.js +0 -29
- package/lib-cjs/component/elements/popup/Modal/Provider.js +0 -177
- package/lib-cjs/component/elements/popup/Modal/index.js +0 -15
- package/lib-cjs/component/elements/popup/Transition.js +0 -38
- package/lib-cjs/component/elements/popup/Wrapper.js +0 -86
- package/lib-cjs/component/elements/popup/options.js +0 -28
- package/lib-cjs/component/elements/popup/utility.js +0 -16
- package/lib-cjs/component/elements/resizer/DivResizer.js +0 -68
- package/lib-cjs/component/elements/resizer/Resizer.js +0 -18
- package/lib-cjs/component/elements/resizer/SVGResizer.js +0 -46
- package/lib-cjs/component/elements/resizer/useResizer.js +0 -71
- package/lib-cjs/component/elements/toggle/ToggleButton.js +0 -27
- package/lib-cjs/component/elements/toggle/ToggleButtonGroup.js +0 -54
- package/lib-cjs/component/header/ApodizationOptionsPanel.js +0 -100
- package/lib-cjs/component/header/AutoPeakPickingOptionPanel.js +0 -87
- package/lib-cjs/component/header/BaseLineCorrectionPanel.js +0 -145
- package/lib-cjs/component/header/Header.js +0 -133
- package/lib-cjs/component/header/HeaderContainer.js +0 -12
- package/lib-cjs/component/header/PhaseCorrectionPanel.js +0 -151
- package/lib-cjs/component/header/RangesPickingOptionPanel.js +0 -67
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +0 -78
- package/lib-cjs/component/header/Zones2DOptionPanel.js +0 -59
- package/lib-cjs/component/highlight/index.js +0 -210
- package/lib-cjs/component/hooks/useActiveSpectra.js +0 -10
- package/lib-cjs/component/hooks/useActiveSpectrum.js +0 -10
- package/lib-cjs/component/hooks/useActiveSpectrumPeaksViewState.js +0 -22
- package/lib-cjs/component/hooks/useActiveSpectrumStyleOptions.js +0 -22
- package/lib-cjs/component/hooks/useCheckExperimentalFeature.js +0 -8
- package/lib-cjs/component/hooks/useCheckPointsNumberInWindowArea.js +0 -24
- package/lib-cjs/component/hooks/useCheckToolsVisibility.js +0 -66
- package/lib-cjs/component/hooks/useCombinedRefs.js +0 -20
- package/lib-cjs/component/hooks/useDatumWithSpectraStatistics.js +0 -45
- package/lib-cjs/component/hooks/useExport.js +0 -106
- package/lib-cjs/component/hooks/useFilter.js +0 -14
- package/lib-cjs/component/hooks/useFormatNumberByNucleus.js +0 -40
- package/lib-cjs/component/hooks/useIntegralPath.js +0 -61
- package/lib-cjs/component/hooks/useNucleus.js +0 -14
- package/lib-cjs/component/hooks/usePanelPreferences.js +0 -98
- package/lib-cjs/component/hooks/useResizerStatus.js +0 -11
- package/lib-cjs/component/hooks/useSaveSettings.js +0 -104
- package/lib-cjs/component/hooks/useSpectraPerNucleus.js +0 -18
- package/lib-cjs/component/hooks/useSpectrum.js +0 -17
- package/lib-cjs/component/hooks/useTableSortBy.js +0 -66
- package/lib-cjs/component/hooks/useToolsFunctions.js +0 -84
- package/lib-cjs/component/hooks/useVerticalAlign.js +0 -10
- package/lib-cjs/component/hooks/useXScale.js +0 -11
- package/lib-cjs/component/hooks/useXYReduce.js +0 -20
- package/lib-cjs/component/loader/DefaultSpinnerComponent.js +0 -41
- package/lib-cjs/component/loader/DropZone.js +0 -128
- package/lib-cjs/component/loader/NoData.js +0 -40
- package/lib-cjs/component/loader/Spinner.js +0 -28
- package/lib-cjs/component/loader/SpinnerContext.js +0 -15
- package/lib-cjs/component/main/ErrorOverlay.js +0 -26
- package/lib-cjs/component/main/InnerNMRium.js +0 -82
- package/lib-cjs/component/main/InnerNMRiumContents.js +0 -96
- package/lib-cjs/component/main/NMRium.js +0 -19
- package/lib-cjs/component/main/NMRiumStateProvider.js +0 -80
- package/lib-cjs/component/main/SplitPaneWrapper.js +0 -20
- package/lib-cjs/component/main/StateError.js +0 -20
- package/lib-cjs/component/main/index.js +0 -21
- package/lib-cjs/component/main/types.js +0 -3
- package/lib-cjs/component/modal/AboutPredictionModal.js +0 -54
- package/lib-cjs/component/modal/AboutSpectrumSimulationModal.js +0 -54
- package/lib-cjs/component/modal/AlignSpectraModal.js +0 -70
- package/lib-cjs/component/modal/CopyClipboardModal.js +0 -44
- package/lib-cjs/component/modal/EditPeakShapeModal.js +0 -112
- package/lib-cjs/component/modal/ExportAsJcampModal.js +0 -67
- package/lib-cjs/component/modal/ImportPublicationStringModal.js +0 -84
- package/lib-cjs/component/modal/LoadJCAMPModal.js +0 -100
- package/lib-cjs/component/modal/LogsHistoryModal.js +0 -115
- package/lib-cjs/component/modal/ModalStyle.js +0 -83
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +0 -78
- package/lib-cjs/component/modal/MultipletAnalysisModal.js +0 -164
- package/lib-cjs/component/modal/PredictSpectraModal.js +0 -118
- package/lib-cjs/component/modal/SaveAsModal.js +0 -77
- package/lib-cjs/component/modal/changeSum/ChangeSumModal.js +0 -10
- package/lib-cjs/component/modal/changeSum/ChangeSumModalContents.js +0 -124
- package/lib-cjs/component/modal/changeSum/SelectMolecule.js +0 -77
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +0 -169
- package/lib-cjs/component/modal/editRange/forms/components/AddSignalFormTab.js +0 -107
- package/lib-cjs/component/modal/editRange/forms/components/CouplingsTable.js +0 -65
- package/lib-cjs/component/modal/editRange/forms/components/DeltaInput.js +0 -24
- package/lib-cjs/component/modal/editRange/forms/components/SignalFormInfo.js +0 -38
- package/lib-cjs/component/modal/editRange/forms/components/SignalFormTab.js +0 -23
- package/lib-cjs/component/modal/editRange/forms/components/SignalsForm.js +0 -118
- package/lib-cjs/component/modal/editRange/forms/validation/EditRangeValidation.js +0 -50
- package/lib-cjs/component/modal/editZone/EditPathLengthFormik.js +0 -72
- package/lib-cjs/component/modal/editZone/EditZoneModal.js +0 -106
- package/lib-cjs/component/modal/editZone/SignalsForm.js +0 -57
- package/lib-cjs/component/modal/editZone/validation/EditZoneValidation.js +0 -39
- package/lib-cjs/component/modal/editZone/validation/isDefaultPathLength.js +0 -12
- package/lib-cjs/component/modal/metaImportation/MetaImportationModal.js +0 -226
- package/lib-cjs/component/modal/metaImportation/index.js +0 -25
- package/lib-cjs/component/modal/metaImportation/utils/mapColumnToSelectItems.js +0 -13
- package/lib-cjs/component/modal/setting/GeneralSettings.js +0 -270
- package/lib-cjs/component/modal/setting/WorkspaceItem.js +0 -101
- package/lib-cjs/component/modal/setting/settings-tabs/DatabasesTabContent.js +0 -82
- package/lib-cjs/component/modal/setting/settings-tabs/DisplayTabContent.js +0 -97
- package/lib-cjs/component/modal/setting/settings-tabs/FormattingTabContent.js +0 -85
- package/lib-cjs/component/modal/setting/settings-tabs/GeneralTabContent.js +0 -45
- package/lib-cjs/component/modal/setting/settings-tabs/ImportationFiltersTabContent.js +0 -90
- package/lib-cjs/component/modal/setting/settings-tabs/InfoBlockTabContent.js +0 -104
- package/lib-cjs/component/modal/setting/settings-tabs/OnLoadProcessingTabContent.js +0 -44
- package/lib-cjs/component/modal/setting/settings-tabs/ToolsTabContent.js +0 -112
- package/lib-cjs/component/modal/setting/settingsValidation.js +0 -60
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignment.js +0 -32
- package/lib-cjs/component/panels/AutomaticAssignment/AutomaticAssignmentTable.js +0 -47
- package/lib-cjs/component/panels/AutomaticAssignment/useAutoAssignments.js +0 -70
- package/lib-cjs/component/panels/InformationPanel.js +0 -111
- package/lib-cjs/component/panels/IntegralsPanel/IntegralPanel.js +0 -136
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +0 -125
- package/lib-cjs/component/panels/IntegralsPanel/IntegralsPreferences.js +0 -62
- package/lib-cjs/component/panels/MatrixGenerationPanel/ExclusionsZonesTable.js +0 -54
- package/lib-cjs/component/panels/MatrixGenerationPanel/FiltersOptions.js +0 -111
- package/lib-cjs/component/panels/MatrixGenerationPanel/MatrixGenerationPanel.js +0 -131
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +0 -43
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +0 -103
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +0 -170
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +0 -117
- package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +0 -203
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +0 -85
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +0 -101
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisCell.js +0 -20
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/base/AnalysisColumnHeader.js +0 -58
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/AnalysisTablePreferences.js +0 -62
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/LegendsPreferences.js +0 -86
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/MultipleAnalysisCodeEditor.js +0 -53
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/preferences/index.js +0 -134
- package/lib-cjs/component/panels/PanelNoData.js +0 -28
- package/lib-cjs/component/panels/Panels.js +0 -170
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +0 -149
- package/lib-cjs/component/panels/PeaksPanel/PeaksPreferences.js +0 -83
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +0 -145
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +0 -145
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +0 -147
- package/lib-cjs/component/panels/RangesPanel/RangesPreferences.js +0 -87
- package/lib-cjs/component/panels/RangesPanel/RangesTable.js +0 -65
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +0 -111
- package/lib-cjs/component/panels/RangesPanel/TableColumns/AbsoluteColumn.js +0 -8
- package/lib-cjs/component/panels/RangesPanel/TableColumns/ActionsColumn.js +0 -38
- package/lib-cjs/component/panels/RangesPanel/TableColumns/CouplingColumn.js +0 -17
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeAssignmentsColumn.js +0 -43
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RangeColumn.js +0 -8
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +0 -27
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalAssignmentsColumn.js +0 -24
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +0 -28
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaHzColumn.js +0 -16
- package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +0 -97
- package/lib-cjs/component/panels/RangesPanel/hooks/useMapRanges.js +0 -56
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +0 -104
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPreferences.js +0 -78
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraTable.js +0 -238
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumListPanel.js +0 -31
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +0 -74
- package/lib-cjs/component/panels/SpectrumsPanel/base/ColorIndicator.js +0 -27
- package/lib-cjs/component/panels/SpectrumsPanel/base/ShowHideSpectrumButton.js +0 -64
- package/lib-cjs/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +0 -71
- package/lib-cjs/component/panels/SpectrumsPanel/base/SpectrumName.js +0 -41
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/PlotChart.js +0 -21
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DHistogram.js +0 -22
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +0 -14
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DHistogram.js +0 -23
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +0 -26
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/SpectrumSetting.js +0 -100
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +0 -32
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +0 -157
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +0 -146
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/Constants.js +0 -45
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTable.js +0 -95
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +0 -191
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/Confirmation.js +0 -42
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditLinkModal.js +0 -136
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/EditPathLength.js +0 -92
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +0 -83
- package/lib-cjs/component/panels/SummaryPanel/Overview.js +0 -44
- package/lib-cjs/component/panels/SummaryPanel/SetMolecularFormulaModal.js +0 -100
- package/lib-cjs/component/panels/SummaryPanel/SetShiftTolerancesModal.js +0 -112
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +0 -358
- package/lib-cjs/component/panels/SummaryPanel/utilities/Utilities.js +0 -355
- package/lib-cjs/component/panels/SummaryPanel/utilities/useInView.js +0 -20
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ActionsColumn.js +0 -86
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumn.js +0 -16
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalAssignmentsColumns.js +0 -12
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +0 -39
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumn.js +0 -31
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/ZoneAssignmentsColumns.js +0 -12
- package/lib-cjs/component/panels/ZonesPanel/ZonesPanel.js +0 -191
- package/lib-cjs/component/panels/ZonesPanel/ZonesPreferences.js +0 -46
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +0 -80
- package/lib-cjs/component/panels/ZonesPanel/ZonesTableRow.js +0 -127
- package/lib-cjs/component/panels/ZonesPanel/hooks/useMapZones.js +0 -56
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +0 -348
- package/lib-cjs/component/panels/databasePanel/DatabasePreferences.js +0 -60
- package/lib-cjs/component/panels/databasePanel/DatabaseStructureSearchModal.js +0 -15
- package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +0 -161
- package/lib-cjs/component/panels/extra/BasicPanelStyle.js +0 -23
- package/lib-cjs/component/panels/extra/placeholder/NoTableData.js +0 -21
- package/lib-cjs/component/panels/extra/preferences/ColumnsHelper.js +0 -54
- package/lib-cjs/component/panels/extra/preferences/NucleusGroup.js +0 -26
- package/lib-cjs/component/panels/extra/preferences/NucleusPreferences.js +0 -15
- package/lib-cjs/component/panels/extra/preferences/PreferencesContainer.js +0 -14
- package/lib-cjs/component/panels/extra/preferences/PreferencesGroup.js +0 -25
- package/lib-cjs/component/panels/extra/utilities/MultiplicityUtilities.js +0 -39
- package/lib-cjs/component/panels/extra/utilities/UseToggleStatus.js +0 -34
- package/lib-cjs/component/panels/filtersPanel/FilterPanel.js +0 -36
- package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +0 -153
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +0 -37
- package/lib-cjs/component/panels/header/PanelHeader.js +0 -15
- package/lib-cjs/component/panels/header/PreferencesHeader.js +0 -30
- package/lib-cjs/component/panels/header/SpectraAutomaticPickingButton.js +0 -36
- package/lib-cjs/component/panels/predictionPanel/PredictionOptionsPanel.js +0 -123
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +0 -130
- package/lib-cjs/component/panels/predictionPanel/PredictionPreferences.js +0 -29
- package/lib-cjs/component/panels/predictionPanel/PredictionSimpleOptions.js +0 -71
- package/lib-cjs/component/panels/spectrumSimulation/SpectrumSimulation.js +0 -94
- package/lib-cjs/component/panels/spectrumSimulation/SpectrumSimulationPreferences.js +0 -42
- package/lib-cjs/component/panels/spectrumSimulation/SpectrumSimulationSimpleOptions.js +0 -30
- package/lib-cjs/component/panels/spectrumSimulation/SpinSystemTable.js +0 -67
- package/lib-cjs/component/reducer/IgnoreActions.js +0 -43
- package/lib-cjs/component/reducer/Reducer.js +0 -437
- package/lib-cjs/component/reducer/actions/AssignmentsActions.js +0 -19
- package/lib-cjs/component/reducer/actions/CorrelationsActions.js +0 -115
- package/lib-cjs/component/reducer/actions/DatabaseActions.js +0 -38
- package/lib-cjs/component/reducer/actions/DimensionsActions.js +0 -9
- package/lib-cjs/component/reducer/actions/DomainActions.js +0 -238
- package/lib-cjs/component/reducer/actions/FiltersActions.js +0 -667
- package/lib-cjs/component/reducer/actions/HistoryActions.js +0 -45
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +0 -139
- package/lib-cjs/component/reducer/actions/LoadActions.js +0 -194
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +0 -282
- package/lib-cjs/component/reducer/actions/PeaksActions.js +0 -179
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +0 -108
- package/lib-cjs/component/reducer/actions/RangesActions.js +0 -415
- package/lib-cjs/component/reducer/actions/SpectraAnalysisAction.js +0 -24
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +0 -428
- package/lib-cjs/component/reducer/actions/ToolsActions.js +0 -478
- package/lib-cjs/component/reducer/actions/ZonesActions.js +0 -299
- package/lib-cjs/component/reducer/core/Constants.js +0 -17
- package/lib-cjs/component/reducer/helper/GetClosestNumber.js +0 -10
- package/lib-cjs/component/reducer/helper/Zoom1DManager.js +0 -64
- package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +0 -71
- package/lib-cjs/component/reducer/helper/get2DRange.js +0 -18
- package/lib-cjs/component/reducer/helper/getActiveSpectra.js +0 -8
- package/lib-cjs/component/reducer/helper/getActiveSpectraAsObject.js +0 -19
- package/lib-cjs/component/reducer/helper/getActiveSpectrum.js +0 -12
- package/lib-cjs/component/reducer/helper/getRange.js +0 -25
- package/lib-cjs/component/reducer/helper/getSpectrum.js +0 -18
- package/lib-cjs/component/reducer/helper/getStrongestPeak.js +0 -19
- package/lib-cjs/component/reducer/helper/getVerticalAlign.js +0 -8
- package/lib-cjs/component/reducer/preferences/actions/addWorkspace.js +0 -34
- package/lib-cjs/component/reducer/preferences/actions/analyzeSpectra.js +0 -78
- package/lib-cjs/component/reducer/preferences/actions/applyGeneralPreferences.js +0 -8
- package/lib-cjs/component/reducer/preferences/actions/initPreferences.js +0 -65
- package/lib-cjs/component/reducer/preferences/actions/matrixGeneration.js +0 -47
- package/lib-cjs/component/reducer/preferences/actions/removeWorkspace.js +0 -17
- package/lib-cjs/component/reducer/preferences/actions/setActiveWorkspace.js +0 -14
- package/lib-cjs/component/reducer/preferences/actions/setPanelsPreferences.js +0 -22
- package/lib-cjs/component/reducer/preferences/actions/setPreferences.js +0 -34
- package/lib-cjs/component/reducer/preferences/actions/setVerticalSplitterPosition.js +0 -10
- package/lib-cjs/component/reducer/preferences/actions/setWorkspace.js +0 -22
- package/lib-cjs/component/reducer/preferences/panelsPreferencesDefaultValues.js +0 -128
- package/lib-cjs/component/reducer/preferences/preferencesReducer.js +0 -139
- package/lib-cjs/component/reducer/preferences/utilities/checkKeysExists.js +0 -18
- package/lib-cjs/component/reducer/preferences/utilities/filterObject.js +0 -11
- package/lib-cjs/component/reducer/preferences/utilities/flatObject.js +0 -13
- package/lib-cjs/component/reducer/preferences/utilities/getActiveWorkspace.js +0 -7
- package/lib-cjs/component/reducer/preferences/utilities/getPreferencesByWorkspace.js +0 -12
- package/lib-cjs/component/reducer/preferences/utilities/initWorkspace.js +0 -12
- package/lib-cjs/component/reducer/preferences/utilities/isReadOnlyWorkspace.js +0 -7
- package/lib-cjs/component/reducer/preferences/utilities/mapNucleiFormatting.js +0 -14
- package/lib-cjs/component/reducer/preferences/utilities/mapWorkspaces.js +0 -25
- package/lib-cjs/component/reducer/scaleReducer.js +0 -39
- package/lib-cjs/component/toolbar/BasicToolBar.js +0 -170
- package/lib-cjs/component/toolbar/FunctionToolBar.js +0 -60
- package/lib-cjs/component/toolbar/ToolBar.js +0 -20
- package/lib-cjs/component/toolbar/ToolTypes.js +0 -390
- package/lib-cjs/component/utility/Evaluate.js +0 -12
- package/lib-cjs/component/utility/Events.js +0 -15
- package/lib-cjs/component/utility/FileUtility.js +0 -22
- package/lib-cjs/component/utility/GroupByInfoKey.js +0 -29
- package/lib-cjs/component/utility/LocalStorage.js +0 -49
- package/lib-cjs/component/utility/PathBuilder.js +0 -33
- package/lib-cjs/component/utility/PreferencesHelper.js +0 -11
- package/lib-cjs/component/utility/assert.js +0 -9
- package/lib-cjs/component/utility/convertPathArrayToString.js +0 -7
- package/lib-cjs/component/utility/export.js +0 -225
- package/lib-cjs/component/utility/filterType.js +0 -2
- package/lib-cjs/component/utility/formatNumber.js +0 -22
- package/lib-cjs/component/utility/getSpectraByNucleus.js +0 -11
- package/lib-cjs/component/utility/getSpectraObjectPaths.js +0 -26
- package/lib-cjs/component/utility/getUniqueNuclei.js +0 -14
- package/lib-cjs/component/utility/isGoogleDocument.js +0 -7
- package/lib-cjs/component/utility/jpathToArray.js +0 -27
- package/lib-cjs/component/utility/nucleusToString.js +0 -6
- package/lib-cjs/component/utility/parseColor.js +0 -19
- package/lib-cjs/component/workspaces/assignment.js +0 -36
- package/lib-cjs/component/workspaces/basic.js +0 -42
- package/lib-cjs/component/workspaces/embedded.js +0 -46
- package/lib-cjs/component/workspaces/exercise.js +0 -62
- package/lib-cjs/component/workspaces/index.js +0 -18
- package/lib-cjs/component/workspaces/prediction.js +0 -238
- package/lib-cjs/component/workspaces/process1D.js +0 -38
- package/lib-cjs/component/workspaces/simulation.js +0 -71
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +0 -184
- package/lib-cjs/constants.js +0 -26
- package/lib-cjs/data/PredictionManager.js +0 -314
- package/lib-cjs/data/SpectraManager.js +0 -147
- package/lib-cjs/data/constants/DefaultApodizationOptions.js +0 -8
- package/lib-cjs/data/constants/DefaultPathLengths.js +0 -10
- package/lib-cjs/data/constants/Multiplets.js +0 -9
- package/lib-cjs/data/constants/References.js +0 -43
- package/lib-cjs/data/constants/SignalsKinds.js +0 -39
- package/lib-cjs/data/data1d/Spectrum1D/SumManager.js +0 -101
- package/lib-cjs/data/data1d/Spectrum1D/cloneDatum1D.js +0 -8
- package/lib-cjs/data/data1d/Spectrum1D/convertDataToFloat64Array.js +0 -14
- package/lib-cjs/data/data1d/Spectrum1D/generateJGraphData.js +0 -83
- package/lib-cjs/data/data1d/Spectrum1D/generateSpectrumFromPublicationString.js +0 -10
- package/lib-cjs/data/data1d/Spectrum1D/get1DColor.js +0 -18
- package/lib-cjs/data/data1d/Spectrum1D/get1DDataXY.js +0 -18
- package/lib-cjs/data/data1d/Spectrum1D/getReferenceShift.js +0 -63
- package/lib-cjs/data/data1d/Spectrum1D/index.js +0 -45
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +0 -74
- package/lib-cjs/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +0 -27
- package/lib-cjs/data/data1d/Spectrum1D/integrals/initiateIntegrals.js +0 -21
- package/lib-cjs/data/data1d/Spectrum1D/isRangeAssigned.js +0 -14
- package/lib-cjs/data/data1d/Spectrum1D/isSpectrum1D.js +0 -7
- package/lib-cjs/data/data1d/Spectrum1D/peaks/autoPeakPicking.js +0 -33
- package/lib-cjs/data/data1d/Spectrum1D/peaks/initiatePeaks.js +0 -14
- package/lib-cjs/data/data1d/Spectrum1D/peaks/lookupPeak.js +0 -25
- package/lib-cjs/data/data1d/Spectrum1D/peaks/optimizePeaks.js +0 -29
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +0 -53
- package/lib-cjs/data/data1d/Spectrum1D/ranges/autoRangesDetection.js +0 -45
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRange.js +0 -45
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeRelativeValue.js +0 -32
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRangeSignal.js +0 -18
- package/lib-cjs/data/data1d/Spectrum1D/ranges/checkRangeKind.js +0 -9
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRange.js +0 -25
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectRanges.js +0 -21
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectSignal.js +0 -80
- package/lib-cjs/data/data1d/Spectrum1D/ranges/generateSpectrumFromRanges.js +0 -33
- package/lib-cjs/data/data1d/Spectrum1D/ranges/initiateRanges.js +0 -21
- package/lib-cjs/data/data1d/database.js +0 -155
- package/lib-cjs/data/data1d/multipleSpectraAnalysis.js +0 -215
- package/lib-cjs/data/data1d/spectrumSimulation.js +0 -58
- package/lib-cjs/data/data2d/Processing2D.js +0 -134
- package/lib-cjs/data/data2d/Spectrum2D/cloneDatum2D.js +0 -13
- package/lib-cjs/data/data2d/Spectrum2D/contours.js +0 -144
- package/lib-cjs/data/data2d/Spectrum2D/get2DColor.js +0 -21
- package/lib-cjs/data/data2d/Spectrum2D/get2DSpectrumErrorValue.js +0 -13
- package/lib-cjs/data/data2d/Spectrum2D/getMissingProjection.js +0 -44
- package/lib-cjs/data/data2d/Spectrum2D/getShift.js +0 -19
- package/lib-cjs/data/data2d/Spectrum2D/getSlice.js +0 -50
- package/lib-cjs/data/data2d/Spectrum2D/index.js +0 -21
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +0 -48
- package/lib-cjs/data/data2d/Spectrum2D/isSpectrum2D.js +0 -7
- package/lib-cjs/data/data2d/Spectrum2D/zones/changeZoneSignal.js +0 -28
- package/lib-cjs/data/data2d/Spectrum2D/zones/detectZones.js +0 -10
- package/lib-cjs/data/data2d/Spectrum2D/zones/detectZonesManual.js +0 -33
- package/lib-cjs/data/data2d/Spectrum2D/zones/getDetectionZones.js +0 -88
- package/lib-cjs/data/data2d/Spectrum2D/zones/initiateZones.js +0 -21
- package/lib-cjs/data/data2d/Spectrum2D/zones/isZoneExists.js +0 -19
- package/lib-cjs/data/data2d/Spectrum2D/zones/mapZones.js +0 -67
- package/lib-cjs/data/data2d/Spectrum2D/zones/updateZones.js +0 -11
- package/lib-cjs/data/defaults/13c.js +0 -5
- package/lib-cjs/data/defaults/1h.js +0 -5
- package/lib-cjs/data/defaults/default.js +0 -23
- package/lib-cjs/data/getDefaultMatrixFilters.js +0 -27
- package/lib-cjs/data/matrixGeneration.js +0 -130
- package/lib-cjs/data/molecules/Molecule.js +0 -42
- package/lib-cjs/data/molecules/MoleculeManager.js +0 -106
- package/lib-cjs/data/parseMeta/index.js +0 -14
- package/lib-cjs/data/parseMeta/isMetaFile.js +0 -11
- package/lib-cjs/data/parseMeta/linkMetaWithSpectra.js +0 -97
- package/lib-cjs/data/parseMeta/mapErrors.js +0 -11
- package/lib-cjs/data/parseMeta/parseMetaFile.js +0 -16
- package/lib-cjs/data/parseMeta/prepareKey.js +0 -10
- package/lib-cjs/data/types/common/File.js +0 -2
- package/lib-cjs/data/types/common/Info.js +0 -2
- package/lib-cjs/data/types/common/MapOptions.js +0 -2
- package/lib-cjs/data/types/common/Nucleus.js +0 -2
- package/lib-cjs/data/types/data1d/ComplexData1D.js +0 -2
- package/lib-cjs/data/types/data1d/ExclusionZone.js +0 -2
- package/lib-cjs/data/types/data1d/MatrixOptions.js +0 -2
- package/lib-cjs/data/types/data1d/RangeDetectionResult.js +0 -2
- package/lib-cjs/data/types/data1d/index.js +0 -2
- package/lib-cjs/data/types/data2d/ContourOptions.js +0 -2
- package/lib-cjs/data/types/data2d/index.js +0 -2
- package/lib-cjs/data/utilities/Concatenation.js +0 -8
- package/lib-cjs/data/utilities/FindUtilities.js +0 -63
- package/lib-cjs/data/utilities/RangeUtilities.js +0 -95
- package/lib-cjs/data/utilities/ZoneUtilities.js +0 -99
- package/lib-cjs/data/utilities/calculateSanPlot.js +0 -34
- package/lib-cjs/data/utilities/checkModifierKeyActivated.js +0 -13
- package/lib-cjs/data/utilities/convertSpectraListToObject.js +0 -10
- package/lib-cjs/data/utilities/generateChar.js +0 -16
- package/lib-cjs/data/utilities/generateColor.js +0 -74
- package/lib-cjs/data/utilities/generateNumbersPowerOfX.js +0 -26
- package/lib-cjs/data/utilities/getAtom.js +0 -6
- package/lib-cjs/data/utilities/getAtomsFromMF.js +0 -19
- package/lib-cjs/data/utilities/getSum.js +0 -19
- package/lib-cjs/data/utilities/isInRange.js +0 -7
- package/lib-cjs/data/utilities/isNumber.js +0 -7
- package/lib-cjs/types/NMRiumDataReturn.js +0 -2
- package/lib-cjs/types/UsedColors.js +0 -2
- package/lib-cjs/utils/clipboard/clipboard.js +0 -23
- package/lib-cjs/utils/clipboard/clipboardComponents.js +0 -158
- package/lib-cjs/utils/clipboard/clipboardHooks.js +0 -147
- package/lib-cjs/utils/clipboard/types.js +0 -2
- package/lib-cjs/versionInfo.js +0 -3
- /package/lib/component/modal/{AboutUsModal.d.ts → aboutUs/AboutUsModal.d.ts} +0 -0
- /package/{lib-cjs/component/reducer/types/ActionType.js → lib/data/types/common/SignalKind.js} +0 -0
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
2
7
|
/** @jsxImportSource @emotion/react */
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const styles = css `
|
|
8
|
+
const react_1 = require("@emotion/react");
|
|
9
|
+
const ml_spectra_processing_1 = require("ml-spectra-processing");
|
|
10
|
+
const multiplet_analysis_1 = require("multiplet-analysis");
|
|
11
|
+
const react_2 = require("react");
|
|
12
|
+
const react_plot_1 = require("react-plot");
|
|
13
|
+
const Spectrum2D_1 = require("../../data/data2d/Spectrum2D");
|
|
14
|
+
const CloseButton_1 = __importDefault(require("../elements/CloseButton"));
|
|
15
|
+
const styles = (0, react_1.css) `
|
|
11
16
|
display: flex;
|
|
12
17
|
flex-direction: column;
|
|
13
18
|
width: 900px;
|
|
@@ -67,7 +72,7 @@ const styles = css `
|
|
|
67
72
|
}
|
|
68
73
|
}
|
|
69
74
|
`;
|
|
70
|
-
const loaderStyles = css `
|
|
75
|
+
const loaderStyles = (0, react_1.css) `
|
|
71
76
|
display: flex;
|
|
72
77
|
align-items: center;
|
|
73
78
|
justify-content: center;
|
|
@@ -97,25 +102,25 @@ const loaderStyles = css `
|
|
|
97
102
|
}
|
|
98
103
|
}
|
|
99
104
|
`;
|
|
100
|
-
|
|
101
|
-
const [analysisData, setAnalysisData] = useState();
|
|
102
|
-
const [calcStart, setCalcStartStatus] = useState(false);
|
|
103
|
-
const [isCalcFinished, setCalcFinished] = useState(false);
|
|
104
|
-
useEffect(() => {
|
|
105
|
+
function MultipletAnalysisModal({ data, activeSpectrum, scaleX, startX, endX, onClose, }) {
|
|
106
|
+
const [analysisData, setAnalysisData] = (0, react_2.useState)();
|
|
107
|
+
const [calcStart, setCalcStartStatus] = (0, react_2.useState)(false);
|
|
108
|
+
const [isCalcFinished, setCalcFinished] = (0, react_2.useState)(false);
|
|
109
|
+
(0, react_2.useEffect)(() => {
|
|
105
110
|
setTimeout(() => {
|
|
106
111
|
setCalcStartStatus(true);
|
|
107
112
|
}, 400);
|
|
108
113
|
}, []);
|
|
109
|
-
useEffect(() => {
|
|
114
|
+
(0, react_2.useEffect)(() => {
|
|
110
115
|
if (activeSpectrum && startX && endX && calcStart) {
|
|
111
116
|
const spectrum = data[activeSpectrum.index];
|
|
112
|
-
if (isSpectrum2D(spectrum)) {
|
|
117
|
+
if ((0, Spectrum2D_1.isSpectrum2D)(spectrum)) {
|
|
113
118
|
throw new Error('unreachable');
|
|
114
119
|
}
|
|
115
120
|
const { data: { x, re }, info, } = spectrum;
|
|
116
121
|
const from = scaleX().invert(startX);
|
|
117
122
|
const to = scaleX().invert(endX);
|
|
118
|
-
const { fromIndex, toIndex } = xGetFromToIndex(x, {
|
|
123
|
+
const { fromIndex, toIndex } = (0, ml_spectra_processing_1.xGetFromToIndex)(x, {
|
|
119
124
|
from,
|
|
120
125
|
to,
|
|
121
126
|
});
|
|
@@ -124,9 +129,9 @@ export default function MultipletAnalysisModal({ data, activeSpectrum, scaleX, s
|
|
|
124
129
|
y: re.slice(fromIndex, toIndex),
|
|
125
130
|
};
|
|
126
131
|
try {
|
|
127
|
-
const result = analyseMultiplet(analysesProps, {
|
|
132
|
+
const result = (0, multiplet_analysis_1.analyseMultiplet)(analysesProps, {
|
|
128
133
|
frequency: info.originFrequency,
|
|
129
|
-
minimalResolution: 0.
|
|
134
|
+
minimalResolution: 0.1,
|
|
130
135
|
maxTestedJ: 17,
|
|
131
136
|
takeBestPartMultiplet: true,
|
|
132
137
|
correctVerticalOffset: true,
|
|
@@ -145,14 +150,15 @@ export default function MultipletAnalysisModal({ data, activeSpectrum, scaleX, s
|
|
|
145
150
|
}
|
|
146
151
|
}, [startX, endX, data, scaleX, activeSpectrum, calcStart]);
|
|
147
152
|
if (!isCalcFinished) {
|
|
148
|
-
return (
|
|
153
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: loaderStyles, children: [(0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 841.9 595.3", children: (0, jsx_runtime_1.jsxs)("g", { fill: "#61DAFB", children: [(0, jsx_runtime_1.jsx)("path", { d: "M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z" }), (0, jsx_runtime_1.jsx)("path", { d: "M520.5 78.1z" })] }) }), (0, jsx_runtime_1.jsx)("p", { children: "Analyse Multiplet in progress. Please wait ..." })] }));
|
|
149
154
|
}
|
|
150
|
-
return (
|
|
155
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: styles, children: [(0, jsx_runtime_1.jsxs)("div", { className: "header handle", children: [(0, jsx_runtime_1.jsx)("span", { children: "Analyse Multiplet" }), (0, jsx_runtime_1.jsx)(CloseButton_1.default, { onClick: onClose })] }), (0, jsx_runtime_1.jsx)("div", { className: "container", children: analysisData?.debug?.steps.map((d, index) => {
|
|
151
156
|
return (
|
|
152
157
|
// eslint-disable-next-line react/no-array-index-key
|
|
153
|
-
|
|
158
|
+
(0, jsx_runtime_1.jsxs)("div", { className: "row", children: [(0, jsx_runtime_1.jsxs)(react_plot_1.Plot, { width: 400, height: 200, svgStyle: { overflow: 'visible' }, seriesViewportStyle: { stroke: 'black' }, children: [(0, jsx_runtime_1.jsx)(react_plot_1.LineSeries, { data: (0, ml_spectra_processing_1.xyToXYObject)(d.multiplet) }), (0, jsx_runtime_1.jsx)(react_plot_1.Axis, { id: "y", position: "left", tickPosition: "inner", displayPrimaryGridLines: true, hiddenTicks: true, paddingStart: 0.1, paddingEnd: 0.1 }), (0, jsx_runtime_1.jsx)(react_plot_1.Axis, { id: "x", position: "bottom", tickPosition: "inner", displayPrimaryGridLines: true })] }), (0, jsx_runtime_1.jsx)("div", { className: "multiplicity", children: (0, jsx_runtime_1.jsx)("p", { children: analysisData.js[index]
|
|
154
159
|
? `${analysisData.js[index]
|
|
155
160
|
?.multiplicity}: ${analysisData.js[index]?.coupling.toFixed(3)} Hz`
|
|
156
|
-
: '' }) }),
|
|
161
|
+
: '' }) }), (0, jsx_runtime_1.jsxs)(react_plot_1.Plot, { width: 400, height: 200, seriesViewportStyle: { stroke: 'black' }, children: [(0, jsx_runtime_1.jsx)(react_plot_1.LineSeries, { data: (0, ml_spectra_processing_1.xyToXYObject)(d.errorFunction), lineStyle: { strokeWidth: 1 } }), (0, jsx_runtime_1.jsx)(react_plot_1.Axis, { id: "y", position: "left", tickPosition: "inner", displayPrimaryGridLines: true, hiddenTicks: true, paddingStart: 0.1, paddingEnd: 0.1 }), (0, jsx_runtime_1.jsx)(react_plot_1.Axis, { id: "x", position: "bottom", tickPosition: "inner", displayPrimaryGridLines: true })] })] }, index));
|
|
157
162
|
}) })] }));
|
|
158
163
|
}
|
|
164
|
+
exports.default = MultipletAnalysisModal;
|
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PredictSpectraModal = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
2
8
|
/** @jsxImportSource @emotion/react */
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const styles = css `
|
|
9
|
+
const react_1 = require("@emotion/react");
|
|
10
|
+
const cheminfo_font_1 = require("cheminfo-font");
|
|
11
|
+
const react_2 = require("react");
|
|
12
|
+
const ui_1 = require("react-science/ui");
|
|
13
|
+
const PredictionManager_1 = require("../../data/PredictionManager");
|
|
14
|
+
const ChartContext_1 = require("../context/ChartContext");
|
|
15
|
+
const DispatchContext_1 = require("../context/DispatchContext");
|
|
16
|
+
const LoggerContext_1 = require("../context/LoggerContext");
|
|
17
|
+
const Button_1 = __importDefault(require("../elements/Button"));
|
|
18
|
+
const Alert_1 = require("../elements/popup/Alert");
|
|
19
|
+
const PredictionOptionsPanel_1 = __importDefault(require("../panels/predictionPanel/PredictionOptionsPanel"));
|
|
20
|
+
const LocalStorage_1 = require("../utility/LocalStorage");
|
|
21
|
+
const ModalStyle_1 = require("./ModalStyle");
|
|
22
|
+
const styles = (0, react_1.css) `
|
|
17
23
|
.inner-content {
|
|
18
24
|
flex: 1;
|
|
19
25
|
}
|
|
@@ -41,25 +47,25 @@ const styles = css `
|
|
|
41
47
|
width: 40%;
|
|
42
48
|
}
|
|
43
49
|
`;
|
|
44
|
-
|
|
45
|
-
const [isOpenDialog, openDialog, closeDialog] = useOnOff(false);
|
|
46
|
-
const refForm = useRef();
|
|
47
|
-
const dispatch = useDispatch();
|
|
48
|
-
const alert = useAlert();
|
|
49
|
-
const [predictionPreferences, setPredictionPreferences] = useStateWithLocalStorage('nmrium-prediction-preferences');
|
|
50
|
+
function PredictSpectraModal({ onClose = () => null, molecule, }) {
|
|
51
|
+
const [isOpenDialog, openDialog, closeDialog] = (0, ui_1.useOnOff)(false);
|
|
52
|
+
const refForm = (0, react_2.useRef)();
|
|
53
|
+
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
54
|
+
const alert = (0, Alert_1.useAlert)();
|
|
55
|
+
const [predictionPreferences, setPredictionPreferences] = (0, LocalStorage_1.useStateWithLocalStorage)('nmrium-prediction-preferences');
|
|
50
56
|
const { isApproved: isAgree = false, ...options } = predictionPreferences;
|
|
51
|
-
const [isApproved, setApproved] = useState(isAgree);
|
|
52
|
-
const { toolOptions: { data: { predictionIndex }, }, } = useChartData();
|
|
53
|
-
const handleSave = useCallback(() => {
|
|
57
|
+
const [isApproved, setApproved] = (0, react_2.useState)(isAgree);
|
|
58
|
+
const { toolOptions: { data: { predictionIndex }, }, } = (0, ChartContext_1.useChartData)();
|
|
59
|
+
const handleSave = (0, react_2.useCallback)(() => {
|
|
54
60
|
refForm.current.submitForm();
|
|
55
61
|
}, []);
|
|
56
|
-
const initValues = useMemo(() => {
|
|
57
|
-
return Object.assign(getDefaultPredictionOptions(), options, {
|
|
62
|
+
const initValues = (0, react_2.useMemo)(() => {
|
|
63
|
+
return Object.assign((0, PredictionManager_1.getDefaultPredictionOptions)(), options, {
|
|
58
64
|
name: `Prediction ${predictionIndex + 1}`,
|
|
59
65
|
});
|
|
60
66
|
}, [options, predictionIndex]);
|
|
61
|
-
const { logger } = useLogger();
|
|
62
|
-
const submitHandler = useCallback((values) => {
|
|
67
|
+
const { logger } = (0, LoggerContext_1.useLogger)();
|
|
68
|
+
const submitHandler = (0, react_2.useCallback)((values) => {
|
|
63
69
|
void (async () => {
|
|
64
70
|
if (molecule) {
|
|
65
71
|
const { molfile } = molecule;
|
|
@@ -74,7 +80,7 @@ export function PredictSpectraModal({ onClose = () => null, molecule, }) {
|
|
|
74
80
|
closeDialog();
|
|
75
81
|
const hideLoading = await alert.showLoading(`Predict ${predictedSpectra.join(',')} in progress`);
|
|
76
82
|
try {
|
|
77
|
-
const data = await predictSpectra(molfile, values.spectra);
|
|
83
|
+
const data = await (0, PredictionManager_1.predictSpectra)(molfile, values.spectra);
|
|
78
84
|
dispatch({
|
|
79
85
|
type: 'PREDICT_SPECTRA',
|
|
80
86
|
payload: {
|
|
@@ -103,9 +109,10 @@ export function PredictSpectraModal({ onClose = () => null, molecule, }) {
|
|
|
103
109
|
setPredictionPreferences,
|
|
104
110
|
closeDialog,
|
|
105
111
|
]);
|
|
106
|
-
return (
|
|
112
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Button_1.default.BarButton, { color: { base: '#4e4e4e', hover: '#4e4e4e' }, onClick: openDialog, toolTip: "Predict spectra", tooltipOrientation: "horizontal", children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrFt, {}) }), (0, jsx_runtime_1.jsx)(ui_1.Modal, { hasCloseButton: true, isOpen: isOpenDialog, onRequestClose: () => {
|
|
107
113
|
onClose();
|
|
108
114
|
closeDialog();
|
|
109
|
-
}, width: 600, maxWidth: 1000, children:
|
|
115
|
+
}, width: 600, maxWidth: 1000, children: (0, jsx_runtime_1.jsxs)("div", { css: [ModalStyle_1.ModalStyles, styles], children: [(0, jsx_runtime_1.jsx)(ui_1.Modal.Header, { children: (0, jsx_runtime_1.jsx)("div", { className: "header handle", children: (0, jsx_runtime_1.jsx)("span", { children: "Prediction of NMR spectrum" }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "inner-content", children: [(0, jsx_runtime_1.jsx)(PredictionOptionsPanel_1.default, { onSubmit: submitHandler, options: initValues, ref: refForm }), (0, jsx_runtime_1.jsx)("p", { className: "warning", children: "In order to predict spectra we are calling an external service and the chemical structure will leave your browser! You should never predict spectra for confidential molecules." }), (0, jsx_runtime_1.jsx)("div", { className: "warning-container", children: (0, jsx_runtime_1.jsx)(ui_1.Checkbox, { onChange: setApproved, checked: isApproved, label: "I confirm that the chemical structure is not confidential." }, String(isApproved)) })] }), (0, jsx_runtime_1.jsx)("div", { className: "footer-container", children: (0, jsx_runtime_1.jsx)(Button_1.default.Done, { onClick: handleSave, disabled: !isApproved, children: "Predict spectrum" }) })] }) })] }));
|
|
110
116
|
}
|
|
111
|
-
|
|
117
|
+
exports.PredictSpectraModal = PredictSpectraModal;
|
|
118
|
+
exports.default = PredictSpectraModal;
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.labelStyle = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
2
8
|
/** @jsxImportSource @emotion/react */
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const styles = css `
|
|
9
|
+
const react_1 = require("@emotion/react");
|
|
10
|
+
const formik_1 = require("formik");
|
|
11
|
+
const react_2 = require("react");
|
|
12
|
+
const SpectraManager_1 = require("../../data/SpectraManager");
|
|
13
|
+
const ChartContext_1 = require("../context/ChartContext");
|
|
14
|
+
const ActionButtons_1 = __importDefault(require("../elements/ActionButtons"));
|
|
15
|
+
const CloseButton_1 = __importDefault(require("../elements/CloseButton"));
|
|
16
|
+
const Label_1 = __importDefault(require("../elements/Label"));
|
|
17
|
+
const FormikCheckBox_1 = __importDefault(require("../elements/formik/FormikCheckBox"));
|
|
18
|
+
const FormikInput_1 = __importDefault(require("../elements/formik/FormikInput"));
|
|
19
|
+
const ModalStyle_1 = require("./ModalStyle");
|
|
20
|
+
const styles = (0, react_1.css) `
|
|
15
21
|
.inner-content {
|
|
16
22
|
flex: 1;
|
|
17
23
|
}
|
|
@@ -32,12 +38,12 @@ const INITIAL_VALUE = {
|
|
|
32
38
|
compressed: false,
|
|
33
39
|
pretty: false,
|
|
34
40
|
include: {
|
|
35
|
-
dataType: DataExportOptions.ROW_DATA,
|
|
41
|
+
dataType: SpectraManager_1.DataExportOptions.ROW_DATA,
|
|
36
42
|
view: false,
|
|
37
43
|
settings: false,
|
|
38
44
|
},
|
|
39
45
|
};
|
|
40
|
-
|
|
46
|
+
exports.labelStyle = {
|
|
41
47
|
label: {
|
|
42
48
|
flex: 4,
|
|
43
49
|
fontSize: '12px',
|
|
@@ -52,20 +58,20 @@ export const labelStyle = {
|
|
|
52
58
|
container: { padding: '5px 0' },
|
|
53
59
|
};
|
|
54
60
|
function SaveAsModal({ onClose, onSave, name }) {
|
|
55
|
-
const refForm = useRef();
|
|
56
|
-
const { source } = useChartData();
|
|
57
|
-
const handleSave = useCallback(() => {
|
|
61
|
+
const refForm = (0, react_2.useRef)();
|
|
62
|
+
const { source } = (0, ChartContext_1.useChartData)();
|
|
63
|
+
const handleSave = (0, react_2.useCallback)(() => {
|
|
58
64
|
refForm.current.submitForm();
|
|
59
65
|
}, []);
|
|
60
|
-
const submitHandler = useCallback((values) => {
|
|
66
|
+
const submitHandler = (0, react_2.useCallback)((values) => {
|
|
61
67
|
onSave(values);
|
|
62
68
|
onClose?.();
|
|
63
69
|
}, [onClose, onSave]);
|
|
64
|
-
return (
|
|
70
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: [ModalStyle_1.ModalStyles, styles], children: [(0, jsx_runtime_1.jsxs)("div", { className: "header handle", children: [(0, jsx_runtime_1.jsx)("span", { children: "Save as ... " }), (0, jsx_runtime_1.jsx)(CloseButton_1.default, { onClick: onClose, className: "close-bt" })] }), (0, jsx_runtime_1.jsx)("div", { className: "inner-content", children: (0, jsx_runtime_1.jsx)(formik_1.Formik, { innerRef: refForm, initialValues: { ...INITIAL_VALUE, name }, onSubmit: submitHandler, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Label_1.default, { style: exports.labelStyle, title: "Name", children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: "name", className: "name", style: {
|
|
65
71
|
inputWrapper: { width: '100%' },
|
|
66
72
|
input: { padding: '5px', textAlign: 'left' },
|
|
67
|
-
} }) }),
|
|
73
|
+
} }) }), (0, jsx_runtime_1.jsx)(Label_1.default, { style: exports.labelStyle, title: "Compressed", children: (0, jsx_runtime_1.jsx)(FormikCheckBox_1.default, { name: "compressed" }) }), (0, jsx_runtime_1.jsx)(Label_1.default, { style: exports.labelStyle, title: "Pretty Format", children: (0, jsx_runtime_1.jsx)(FormikCheckBox_1.default, { name: "pretty" }) }), (0, jsx_runtime_1.jsx)(Label_1.default, { style: exports.labelStyle, title: "Include view", children: (0, jsx_runtime_1.jsx)(FormikCheckBox_1.default, { name: "include.view" }) }), (0, jsx_runtime_1.jsx)(Label_1.default, { style: exports.labelStyle, title: "Include settings", children: (0, jsx_runtime_1.jsx)(FormikCheckBox_1.default, { name: "include.settings" }) }), (0, jsx_runtime_1.jsx)(Label_1.default, { style: exports.labelStyle, title: "Include Data", children: (0, jsx_runtime_1.jsx)("div", { style: { display: 'flex', flexDirection: 'column' }, children: (0, jsx_runtime_1.jsxs)("div", { className: "data-export-group", children: [(0, jsx_runtime_1.jsxs)("label", { children: [(0, jsx_runtime_1.jsx)(formik_1.Field, { type: "radio", name: "include.dataType", value: SpectraManager_1.DataExportOptions.ROW_DATA }), "Raw Data"] }), (0, jsx_runtime_1.jsxs)("label", { style: {
|
|
68
74
|
color: source ? 'black' : 'lightgray',
|
|
69
|
-
}, children: [
|
|
75
|
+
}, children: [(0, jsx_runtime_1.jsx)(formik_1.Field, { type: "radio", name: "include.dataType", value: SpectraManager_1.DataExportOptions.DATA_SOURCE, disabled: !source }), "Data Source"] }), (0, jsx_runtime_1.jsxs)("label", { children: [(0, jsx_runtime_1.jsx)(formik_1.Field, { type: "radio", name: "include.dataType", value: SpectraManager_1.DataExportOptions.NO_DATA }), "No Data"] })] }) }) })] }) }) }), (0, jsx_runtime_1.jsx)("div", { className: "footer-container", children: (0, jsx_runtime_1.jsx)(ActionButtons_1.default, { style: { flexDirection: 'row-reverse', margin: 0 }, onDone: handleSave, doneLabel: "Save", onCancel: () => onClose?.() }) })] }));
|
|
70
76
|
}
|
|
71
|
-
|
|
77
|
+
exports.default = SaveAsModal;
|
|
@@ -8,8 +8,9 @@ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
|
8
8
|
const react_1 = require("@emotion/react");
|
|
9
9
|
const cheminfo_font_1 = require("cheminfo-font");
|
|
10
10
|
const ui_1 = require("react-science/ui");
|
|
11
|
-
const versionInfo_1 = __importDefault(require("
|
|
12
|
-
const Logo_1 = __importDefault(require("
|
|
11
|
+
const versionInfo_1 = __importDefault(require("../../../versionInfo"));
|
|
12
|
+
const Logo_1 = __importDefault(require("../../elements/Logo"));
|
|
13
|
+
const AboutUsZakodium_1 = __importDefault(require("./AboutUsZakodium"));
|
|
13
14
|
const styles = (0, react_1.css) `
|
|
14
15
|
width: 40vw;
|
|
15
16
|
min-width: 500px;
|
|
@@ -97,7 +98,7 @@ function AboutUsModal() {
|
|
|
97
98
|
display: 'flex',
|
|
98
99
|
alignItems: 'center',
|
|
99
100
|
justifyContent: 'center',
|
|
100
|
-
}, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgLogoNmrium, {}) }) }), (0, jsx_runtime_1.jsx)(ui_1.Modal, { hasCloseButton: true, isOpen: isOpenDialog, onRequestClose: closeDialog, maxWidth: 1000, children: (0, jsx_runtime_1.jsxs)("div", { css: styles, children: [(0, jsx_runtime_1.jsx)(ui_1.Modal.Header, { children: (0, jsx_runtime_1.jsx)("div", { className: "header", children: (0, jsx_runtime_1.jsx)("span", { children: "About NMRium" }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "container", children: [(0, jsx_runtime_1.jsxs)("div", { className: "center-container", children: [(0, jsx_runtime_1.jsx)(Logo_1.default, { width: 160, height: 50 }), "Version ", (0, jsx_runtime_1.jsx)(VersionInfo, {}), (0, jsx_runtime_1.jsx)("span", { className: "separator" }), (0, jsx_runtime_1.jsx)("a", { href: "https://git.nmrium.org", target: "_blank", rel: "noreferrer", children: "GitHub ( https://git.nmrium.org )" })] }), (0, jsx_runtime_1.jsx)("div", { className: "center-container", children: (0, jsx_runtime_1.jsx)("span", { className: "separator" }) }), (0, jsx_runtime_1.jsx)("span", { className: "content", children: "This project is developed by Zakodium S\u00E0rl (Switzerland), the University of Cologne (Germany), Johannes Gutenberg University Mainz (Germany) and Universidad del Valle (Colombia)." }), (0, jsx_runtime_1.jsxs)("div", { className: "center-container", children: [(0, jsx_runtime_1.jsx)("span", { className: "separator" }), (0, jsx_runtime_1.jsx)("span", { className: "title", children: "Funding is provided by" }), (0, jsx_runtime_1.jsx)("span", { className: "separator" })] }), (0, jsx_runtime_1.jsx)("div", { className: "content", children: (0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsx)("li", { children: "IDNMR grant, which part of the Scientific Library Services and Information Systems (LIS) initiative of the DFG." }), (0, jsx_runtime_1.jsx)("li", { children:
|
|
101
|
+
}, children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgLogoNmrium, {}) }) }), (0, jsx_runtime_1.jsx)(ui_1.Modal, { hasCloseButton: true, isOpen: isOpenDialog, onRequestClose: closeDialog, maxWidth: 1000, children: (0, jsx_runtime_1.jsxs)("div", { css: styles, children: [(0, jsx_runtime_1.jsx)(ui_1.Modal.Header, { children: (0, jsx_runtime_1.jsx)("div", { className: "header", children: (0, jsx_runtime_1.jsx)("span", { children: "About NMRium" }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "container", children: [(0, jsx_runtime_1.jsxs)("div", { className: "center-container", children: [(0, jsx_runtime_1.jsx)(Logo_1.default, { width: 160, height: 50 }), "Version ", (0, jsx_runtime_1.jsx)(VersionInfo, {}), (0, jsx_runtime_1.jsx)("span", { className: "separator" }), (0, jsx_runtime_1.jsx)("a", { href: "https://git.nmrium.org", target: "_blank", rel: "noreferrer", children: "GitHub ( https://git.nmrium.org )" })] }), (0, jsx_runtime_1.jsx)("div", { className: "center-container", children: (0, jsx_runtime_1.jsx)("span", { className: "separator" }) }), (0, jsx_runtime_1.jsx)("span", { className: "content", children: "This project is developed by Zakodium S\u00E0rl (Switzerland), the University of Cologne (Germany), Johannes Gutenberg University Mainz (Germany) and Universidad del Valle (Colombia)." }), (0, jsx_runtime_1.jsxs)("div", { className: "center-container", children: [(0, jsx_runtime_1.jsx)("span", { className: "separator" }), (0, jsx_runtime_1.jsx)("span", { className: "title", children: "Funding is provided by" }), (0, jsx_runtime_1.jsx)("span", { className: "separator" })] }), (0, jsx_runtime_1.jsx)("div", { className: "content", children: (0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsx)("li", { children: "IDNMR grant, which part of the Scientific Library Services and Information Systems (LIS) initiative of the DFG." }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)(AboutUsZakodium_1.default, {}) }), (0, jsx_runtime_1.jsx)("li", { children: "Universidad del Valle (Cali, Colombia)." })] }) })] })] }) })] }));
|
|
101
102
|
}
|
|
102
103
|
exports.default = AboutUsModal;
|
|
103
104
|
function VersionInfo() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function AboutUsZakodium(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
8
|
+
const ui_1 = require("react-science/ui");
|
|
9
|
+
const DispatchContext_1 = require("../../context/DispatchContext");
|
|
10
|
+
function AboutUsZakodium() {
|
|
11
|
+
const [isSecretOpen, openSecret] = (0, ui_1.useOnOff)();
|
|
12
|
+
function handleClick(event) {
|
|
13
|
+
if (event.shiftKey && event.altKey) {
|
|
14
|
+
openSecret();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { onClick: handleClick, children: "Zakodium" }), ` Sàrl (Switzerland).`, isSecretOpen && (0, jsx_runtime_1.jsx)(SecretThrower, {})] }));
|
|
18
|
+
}
|
|
19
|
+
exports.default = AboutUsZakodium;
|
|
20
|
+
const ThrowerDiv = styled_1.default.div `
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
gap: 1rem;
|
|
24
|
+
`;
|
|
25
|
+
/**
|
|
26
|
+
* This component is here for us so we can test the impact of thrown exceptions
|
|
27
|
+
* in the deployed application.
|
|
28
|
+
*/
|
|
29
|
+
function SecretThrower() {
|
|
30
|
+
const [shouldThrow, setShouldThrow] = (0, ui_1.useOnOff)();
|
|
31
|
+
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
32
|
+
if (shouldThrow) {
|
|
33
|
+
throw new Error('Error thrown in React render');
|
|
34
|
+
}
|
|
35
|
+
return ((0, jsx_runtime_1.jsxs)(ThrowerDiv, { children: [(0, jsx_runtime_1.jsx)(ui_1.Button, { onClick: setShouldThrow, children: "Throw in React render" }), (0, jsx_runtime_1.jsx)(ui_1.Button, { onClick: () => dispatch({
|
|
36
|
+
type: 'SECRET_THROW_ERROR',
|
|
37
|
+
payload: { randomNumber: Math.random() },
|
|
38
|
+
}), children: "Throw in main reducer" })] }));
|
|
39
|
+
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const ui_1 = require("react-science/ui");
|
|
5
|
+
const ChangeSumModalContents_1 = require("./ChangeSumModalContents");
|
|
6
|
+
function ChangeSumModal({ renderButton, ...otherProps }) {
|
|
7
|
+
const [isOpenDialog, openDialog, closeDialog] = (0, ui_1.useOnOff)(false);
|
|
8
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [renderButton(openDialog), (0, jsx_runtime_1.jsx)(ui_1.Modal, { isOpen: isOpenDialog, onRequestClose: closeDialog, width: 500, height: 400, children: (0, jsx_runtime_1.jsx)(ChangeSumModalContents_1.ChangeSumModalContents, { ...otherProps, onClose: closeDialog }) })] }));
|
|
7
9
|
}
|
|
10
|
+
exports.default = ChangeSumModal;
|
|
@@ -1,15 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.ChangeSumModalContents = void 0;
|
|
30
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
31
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
32
|
+
const formik_1 = require("formik");
|
|
33
|
+
const react_1 = require("react");
|
|
34
|
+
const ui_1 = require("react-science/ui");
|
|
35
|
+
const Yup = __importStar(require("yup"));
|
|
36
|
+
const PreferencesContext_1 = require("../../context/PreferencesContext");
|
|
37
|
+
const Button_1 = __importDefault(require("../../elements/Button"));
|
|
38
|
+
const Tab_1 = __importDefault(require("../../elements/Tab/Tab"));
|
|
39
|
+
const Tabs_1 = __importDefault(require("../../elements/Tab/Tabs"));
|
|
40
|
+
const FormikInput_1 = __importDefault(require("../../elements/formik/FormikInput"));
|
|
41
|
+
const SelectMolecule_1 = __importDefault(require("./SelectMolecule"));
|
|
13
42
|
function getValidationSchema(option) {
|
|
14
43
|
switch (option) {
|
|
15
44
|
case 'auto': {
|
|
@@ -26,7 +55,7 @@ function getValidationSchema(option) {
|
|
|
26
55
|
return null;
|
|
27
56
|
}
|
|
28
57
|
}
|
|
29
|
-
const ManualContainer =
|
|
58
|
+
const ManualContainer = styled_1.default.div `
|
|
30
59
|
padding: 30px 5px;
|
|
31
60
|
|
|
32
61
|
.input {
|
|
@@ -40,12 +69,12 @@ const ManualContainer = styled.div `
|
|
|
40
69
|
text-align: center;
|
|
41
70
|
}
|
|
42
71
|
`;
|
|
43
|
-
|
|
72
|
+
function ChangeSumModalContents(props) {
|
|
44
73
|
const { currentSum, sumType, sumOptions, onSave, onClose } = props;
|
|
45
|
-
const { current: { display: { panels }, }, } = usePreferences();
|
|
46
|
-
const [setOption, setActiveOption] = useState('auto');
|
|
47
|
-
const formRef = useRef(null);
|
|
48
|
-
useEffect(() => {
|
|
74
|
+
const { current: { display: { panels }, }, } = (0, PreferencesContext_1.usePreferences)();
|
|
75
|
+
const [setOption, setActiveOption] = (0, react_1.useState)('auto');
|
|
76
|
+
const formRef = (0, react_1.useRef)(null);
|
|
77
|
+
(0, react_1.useEffect)(() => {
|
|
49
78
|
if (sumOptions?.sumAuto && panels?.structuresPanel?.display) {
|
|
50
79
|
setActiveOption('auto');
|
|
51
80
|
const { mf, moleculeId: id } = sumOptions;
|
|
@@ -88,7 +117,8 @@ export function ChangeSumModalContents(props) {
|
|
|
88
117
|
onClose();
|
|
89
118
|
}
|
|
90
119
|
const isStructurePanelVisible = panels?.structuresPanel?.display || false;
|
|
91
|
-
return (
|
|
120
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ui_1.Modal.Header, { children: currentSum
|
|
92
121
|
? `Set new ${sumType} sum (Current: ${currentSum.toFixed(2)})`
|
|
93
|
-
: `Set new ${sumType} Sum` }),
|
|
122
|
+
: `Set new ${sumType} Sum` }), (0, jsx_runtime_1.jsx)(ui_1.Modal.Body, { children: (0, jsx_runtime_1.jsx)(formik_1.Formik, { innerRef: formRef, onSubmit: saveHandler, initialValues: { sum: '', molecule: null }, validationSchema: getValidationSchema(setOption), children: (0, jsx_runtime_1.jsxs)(Tabs_1.default, { activeTab: setOption, onClick: onTabChangeHandler, children: [isStructurePanelVisible && ((0, jsx_runtime_1.jsx)(Tab_1.default, { title: "Auto", tabid: "auto", children: (0, jsx_runtime_1.jsx)(SelectMolecule_1.default, { name: "molecule" }) })), (0, jsx_runtime_1.jsx)(Tab_1.default, { title: "Manual", tabid: "manual", children: (0, jsx_runtime_1.jsx)(ManualContainer, { children: (0, jsx_runtime_1.jsx)(FormikInput_1.default, { name: "sum", type: "number", placeholder: "Enter the new value", onKeyDown: handleKeyDown }) }) })] }) }) }), (0, jsx_runtime_1.jsx)(ui_1.Modal.Footer, { children: (0, jsx_runtime_1.jsx)(Button_1.default.Done, { onClick: () => formRef.current.submitForm(), style: { width: 80 }, children: "Set" }) })] }));
|
|
94
123
|
}
|
|
124
|
+
exports.ChangeSumModalContents = ChangeSumModalContents;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
2
7
|
/** @jsxImportSource @emotion/react */
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const styles = css `
|
|
8
|
+
const react_1 = require("@emotion/react");
|
|
9
|
+
const formik_1 = require("formik");
|
|
10
|
+
const react_2 = require("react");
|
|
11
|
+
const getAtom_1 = __importDefault(require("../../../data/utilities/getAtom"));
|
|
12
|
+
const ChartContext_1 = require("../../context/ChartContext");
|
|
13
|
+
const MoleculeSelection_1 = __importDefault(require("../../elements/MoleculeSelection"));
|
|
14
|
+
const styles = (0, react_1.css) `
|
|
10
15
|
.molecule-container {
|
|
11
16
|
display: flex;
|
|
12
17
|
flex-direction: column;
|
|
@@ -38,12 +43,12 @@ const styles = css `
|
|
|
38
43
|
text-align: center;
|
|
39
44
|
}
|
|
40
45
|
`;
|
|
41
|
-
|
|
42
|
-
const [currentIndex, setCurrentIndex] = useState();
|
|
43
|
-
const { setFieldValue, errors, values } = useFormikContext();
|
|
44
|
-
const { molecules, view: { spectra: { activeTab }, }, } = useChartData();
|
|
45
|
-
const element =
|
|
46
|
-
const newSum = useMemo(() => {
|
|
46
|
+
function SelectMolecule(props) {
|
|
47
|
+
const [currentIndex, setCurrentIndex] = (0, react_2.useState)();
|
|
48
|
+
const { setFieldValue, errors, values } = (0, formik_1.useFormikContext)();
|
|
49
|
+
const { molecules, view: { spectra: { activeTab }, }, } = (0, ChartContext_1.useChartData)();
|
|
50
|
+
const element = (0, getAtom_1.default)(activeTab);
|
|
51
|
+
const newSum = (0, react_2.useMemo)(() => {
|
|
47
52
|
return element &&
|
|
48
53
|
molecules &&
|
|
49
54
|
molecules.length > 0 &&
|
|
@@ -52,11 +57,11 @@ export default function SelectMolecule(props) {
|
|
|
52
57
|
? molecules[currentIndex].atoms[element]
|
|
53
58
|
: 0;
|
|
54
59
|
}, [currentIndex, element, molecules]);
|
|
55
|
-
const setValue = useCallback((index) => {
|
|
60
|
+
const setValue = (0, react_2.useCallback)((index) => {
|
|
56
61
|
setCurrentIndex(index);
|
|
57
62
|
void setFieldValue(props.name, molecules[index]);
|
|
58
63
|
}, [molecules, props.name, setFieldValue]);
|
|
59
|
-
useEffect(() => {
|
|
64
|
+
(0, react_2.useEffect)(() => {
|
|
60
65
|
if (molecules && molecules.length > 0) {
|
|
61
66
|
const index = values[props.name]
|
|
62
67
|
? molecules.findIndex((molecule) => molecule.id === values[props.name].id)
|
|
@@ -64,8 +69,9 @@ export default function SelectMolecule(props) {
|
|
|
64
69
|
setValue(index !== -1 ? index : 0);
|
|
65
70
|
}
|
|
66
71
|
}, [molecules, props.name, setValue, values]);
|
|
67
|
-
const onChangeMoleculeSelectionHandler = useCallback((index) => {
|
|
72
|
+
const onChangeMoleculeSelectionHandler = (0, react_2.useCallback)((index) => {
|
|
68
73
|
setValue(index);
|
|
69
74
|
}, [setValue]);
|
|
70
|
-
return (
|
|
75
|
+
return ((0, jsx_runtime_1.jsx)("div", { css: styles, children: element && molecules && molecules.length > 0 ? ((0, jsx_runtime_1.jsxs)("div", { className: "molecule-container", children: [(0, jsx_runtime_1.jsx)("p", { className: "title", children: "Select a molecule as reference!" }), (0, jsx_runtime_1.jsxs)("div", { className: "molecule-selection-container", children: [(0, jsx_runtime_1.jsx)(MoleculeSelection_1.default, { index: currentIndex, molecules: molecules, onChange: onChangeMoleculeSelectionHandler }), (0, jsx_runtime_1.jsxs)("p", { className: "new-sum-text", children: ["New sum for ", element, " will be ", newSum, "!"] })] })] })) : ((0, jsx_runtime_1.jsx)("p", { className: "empty", style: { color: errors[props.name] ? 'red' : 'black' }, children: "You have to Select a spectrum and Add a molecule from the Structure panel to select as a reference!" })) }));
|
|
71
76
|
}
|
|
77
|
+
exports.default = SelectMolecule;
|