nmrium 0.31.0 → 0.33.0-pre.1667632695
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/Chart1D.js +1 -1
- package/lib/component/1d/FooterBanner.js +17 -10
- package/lib/component/1d/LinesSeries.js +1 -1
- package/lib/component/1d/SpectraTracker.js +1 -1
- package/lib/component/1d/Viewer1D.js +1 -1
- package/lib/component/1d/XAxis.js +1 -1
- package/lib/component/1d/database/DatabaseSpectrum.js +2 -1
- package/lib/component/1d/database/ResurrectedDatabaseRanges.js +2 -2
- package/lib/component/1d/{Integral.d.ts → integral/Integral.d.ts} +0 -0
- package/lib/component/1d/{Integral.js → integral/Integral.js} +2 -2
- package/lib/component/1d/integral/IntegralIndicator.d.ts +9 -0
- package/lib/component/1d/integral/IntegralIndicator.js +27 -0
- package/lib/component/1d/{IntegralResizable.d.ts → integral/IntegralResizable.d.ts} +0 -0
- package/lib/component/1d/integral/IntegralResizable.js +69 -0
- package/lib/component/1d/{IntegralsSeries.d.ts → integral/IntegralsSeries.d.ts} +0 -0
- package/lib/component/1d/{IntegralsSeries.js → integral/IntegralsSeries.js} +4 -4
- package/lib/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib/component/1d/multiplicityTree/MultiplicityTree.js +4 -4
- package/lib/component/1d/multiplicityTree/buildTreeNode.js +3 -3
- package/lib/component/1d/peaks/PeakAnnotation.js +1 -1
- package/lib/component/1d/peaks/usePeakShapesPath.js +10 -6
- package/lib/component/1d/ranges/Range.js +27 -50
- package/lib/component/1d/tool/PeakPointer.js +1 -1
- package/lib/component/1d/utilities/scale.js +2 -2
- package/lib/component/2d/Contours.js +61 -42
- package/lib/component/2d/FooterBanner.js +2 -2
- package/lib/component/2d/Left1DChart.js +1 -1
- package/lib/component/2d/Top1DChart.js +1 -1
- package/lib/component/2d/Viewer2D.js +11 -14
- package/lib/component/2d/tools/XYLabelPointer.js +2 -2
- package/lib/component/2d/tools/slicing/VerticalSliceChart.js +1 -1
- package/lib/component/2d/zones/IndicationLines.js +5 -8
- package/lib/component/EventsTrackers/BrushTracker.js +30 -21
- package/lib/component/EventsTrackers/KeysListenerTracker.js +14 -15
- package/lib/component/NMRium.d.ts +1 -1
- package/lib/component/NMRium.js +6 -6
- package/lib/component/SplitPaneWrapper.js +1 -1
- package/lib/component/assignment/actions/initAssignment.js +17 -17
- package/lib/component/assignment/index.js +2 -2
- package/lib/component/context/PreferencesContext.js +3 -6
- package/lib/component/elements/Button.js +1 -1
- package/lib/component/elements/CheckBoxCell.js +1 -1
- package/lib/component/elements/ContextMenu.js +2 -2
- package/lib/component/elements/EditableColumn.d.ts +3 -1
- package/lib/component/elements/EditableColumn.js +21 -8
- package/lib/component/elements/GroupPane.d.ts +12 -0
- package/lib/component/elements/GroupPane.js +14 -0
- package/lib/component/elements/Input.js +7 -4
- package/lib/component/elements/IsotopesViewer.js +1 -1
- package/lib/component/elements/Label.js +1 -2
- package/lib/component/elements/MolecularFormulaInput.js +2 -0
- package/lib/component/elements/NumberInput.js +2 -2
- package/lib/component/elements/ReactTable/Elements/ReactTableRow.js +1 -1
- package/lib/component/elements/ReactTable/ReactTable.d.ts +2 -1
- package/lib/component/elements/ReactTable/ReactTable.js +72 -38
- package/lib/component/elements/ReactTable/ReactTableFlexLayout.d.ts +3 -2
- package/lib/component/elements/ReactTable/ReactTableFlexLayout.js +2 -2
- package/lib/component/elements/ReactTable/utility/addCustomColumn.js +3 -3
- package/lib/component/elements/ReactTable/utility/useRowSpan.js +3 -7
- package/lib/component/elements/accordion/Accordion.js +2 -2
- package/lib/component/elements/draggble/useDraggable.js +1 -3
- package/lib/component/elements/dropDownButton/DropDownList.js +1 -2
- package/lib/component/elements/formik/FormikCheckBox.js +1 -1
- package/lib/component/elements/formik/FormikColorPicker.d.ts +0 -1
- package/lib/component/elements/formik/FormikColorPicker.js +5 -8
- package/lib/component/elements/formik/FormikErrorsSummary.js +2 -2
- package/lib/component/elements/formik/FormikForm.js +2 -2
- package/lib/component/elements/formik/FormikInput.d.ts +0 -1
- package/lib/component/elements/formik/FormikInput.js +12 -20
- package/lib/component/elements/formik/FormikOnChange.d.ts +1 -1
- package/lib/component/elements/formik/FormikOnChange.js +13 -10
- package/lib/component/elements/formik/FormikSelect.js +1 -1
- package/lib/component/elements/formik/FormikSlider.d.ts +2 -4
- package/lib/component/elements/formik/FormikSlider.js +8 -11
- package/lib/component/elements/formik/FormikTextarea.js +1 -1
- package/lib/component/elements/linearAxis/LinearVerticalAxis.js +2 -2
- package/lib/component/elements/popup/Alert/Provider.js +7 -7
- package/lib/component/elements/popup/Alert/index.d.ts +3 -4
- package/lib/component/elements/popup/Alert/index.js +3 -4
- package/lib/component/elements/popup/Modal/ModalContent.js +3 -1
- package/lib/component/elements/popup/Modal/Provider.js +16 -31
- package/lib/component/elements/popup/Modal/index.d.ts +4 -5
- package/lib/component/elements/popup/Modal/index.js +4 -5
- package/lib/component/header/Header.js +1 -1
- package/lib/component/hooks/useActiveSpectrumStyleOptions.js +1 -1
- package/lib/component/hooks/useCombinedRefs.js +2 -2
- package/lib/component/hooks/useExport.d.ts +1 -1
- package/lib/component/hooks/useExport.js +9 -6
- package/lib/component/hooks/useFormatNumberByNucleus.js +1 -1
- package/lib/component/hooks/usePanelPreferences.js +9 -7
- package/lib/component/loader/DropZone.js +10 -2
- package/lib/component/modal/AlignSpectraModal.js +1 -1
- package/lib/component/modal/ExportAsMatrixModal.js +1 -1
- package/lib/component/modal/LoadJCAMPModal.js +2 -2
- package/lib/component/modal/MultipleSpectraFiltersModal/index.js +1 -1
- package/lib/component/modal/MultipletAnalysisModal.js +3 -3
- package/lib/component/modal/PredictSpectraModal.js +5 -5
- package/lib/component/modal/editRange/EditRangeModal.js +4 -4
- package/lib/component/modal/editRange/forms/components/SignalFormInfo.js +1 -1
- package/lib/component/modal/editRange/forms/validation/EditRangeValidation.js +2 -2
- package/lib/component/modal/setting/DatabasesTabContent.js +25 -20
- package/lib/component/modal/setting/DisplayTabContent.js +21 -27
- package/lib/component/modal/setting/FormattingTabContent.js +10 -10
- package/lib/component/modal/setting/GeneralSettings.js +11 -14
- package/lib/component/modal/setting/GeneralTabContent.js +3 -1
- package/lib/component/modal/setting/ToolsTabContent.js +18 -19
- package/lib/component/modal/setting/WorkspaceItem.d.ts +2 -1
- package/lib/component/modal/setting/WorkspaceItem.js +36 -48
- package/lib/component/modal/setting/settingsValidation.d.ts +58 -57
- package/lib/component/modal/setting/settingsValidation.js +14 -12
- package/lib/component/panels/AutomaticAssignment/useAutoAssignments.js +8 -7
- package/lib/component/panels/InformationPanel.js +52 -56
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanelHeader.js +1 -1
- package/lib/component/panels/MoleculesPanel/Utilities.js +6 -6
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +16 -17
- package/lib/component/panels/MultipleSpectraAnalysisPanel/ColumnHeader.js +1 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleAnalysisCodeEditor.js +1 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +1 -1
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +18 -17
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +2 -2
- package/lib/component/panels/PeaksPanel/PeaksPanel.js +1 -1
- package/lib/component/panels/PeaksPanel/PeaksTable.js +2 -2
- package/lib/component/panels/RangesPanel/RangesHeader.js +1 -1
- package/lib/component/panels/RangesPanel/RangesPanel.js +1 -1
- package/lib/component/panels/RangesPanel/RangesTable.js +1 -1
- package/lib/component/panels/RangesPanel/RangesTableRow.js +1 -3
- package/lib/component/panels/RangesPanel/TableColumns/CouplingColumn.js +1 -1
- package/lib/component/panels/RangesPanel/hooks/useEditRangeModal.js +2 -2
- package/lib/component/panels/RangesPanel/hooks/useMapRanges.js +8 -8
- package/lib/component/panels/SpectrumsPanel/SpectrumListItem.js +6 -6
- package/lib/component/panels/SpectrumsPanel/SpectrumListPanel.js +3 -3
- package/lib/component/panels/SpectrumsPanel/SpectrumsTabs.js +5 -5
- package/lib/component/panels/SpectrumsPanel/base/ColorIndicator.js +2 -2
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.d.ts +1 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +2 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.d.ts +1 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +2 -1
- package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +3 -26
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +13 -17
- package/lib/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +16 -17
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +20 -21
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +12 -12
- package/lib/component/panels/SummaryPanel/SetShiftTolerancesModal.js +1 -5
- package/lib/component/panels/SummaryPanel/utilities/Utilities.js +105 -94
- package/lib/component/panels/ZonesPanel/ZonesTable.js +8 -8
- package/lib/component/panels/databasePanel/DatabasePanel.js +5 -4
- package/lib/component/panels/databasePanel/DatabaseTable.d.ts +2 -1
- package/lib/component/panels/databasePanel/DatabaseTable.js +20 -5
- package/lib/component/panels/extra/preferences/ColumnsHelper.js +5 -2
- package/lib/component/panels/extra/utilities/MultiplicityUtilities.d.ts +2 -2
- package/lib/component/panels/extra/utilities/MultiplicityUtilities.js +2 -2
- package/lib/component/panels/filtersPanel/FiltersTable.js +1 -1
- package/lib/component/reducer/IgnoreActions.js +3 -3
- package/lib/component/reducer/Reducer.d.ts +26 -45
- package/lib/component/reducer/Reducer.js +13 -12
- package/lib/component/reducer/actions/CorrelationsActions.js +4 -4
- package/lib/component/reducer/actions/DomainActions.d.ts +2 -2
- package/lib/component/reducer/actions/DomainActions.js +52 -69
- package/lib/component/reducer/actions/FiltersActions.js +15 -6
- package/lib/component/reducer/actions/HistoryActions.js +5 -5
- package/lib/component/reducer/actions/IntegralsActions.js +6 -5
- package/lib/component/reducer/actions/LoadActions.js +12 -0
- package/lib/component/reducer/actions/PeaksActions.js +7 -6
- package/lib/component/reducer/actions/PreferencesActions.js +20 -38
- package/lib/component/reducer/actions/RangesActions.d.ts +1 -1
- package/lib/component/reducer/actions/RangesActions.js +28 -24
- package/lib/component/reducer/actions/SpectrumsActions.js +13 -6
- package/lib/component/reducer/actions/ToolsActions.d.ts +1 -1
- package/lib/component/reducer/actions/ToolsActions.js +28 -41
- package/lib/component/reducer/actions/ZonesActions.js +11 -10
- package/lib/component/reducer/core/Constants.js +1 -1
- package/lib/component/reducer/helper/GetClosestNumber.js +2 -1
- package/lib/component/reducer/helper/Zoom1DManager.js +11 -10
- package/lib/component/reducer/helper/getActiveSpectrum.d.ts +3 -0
- package/lib/component/reducer/helper/getActiveSpectrum.js +4 -0
- package/lib/component/reducer/helper/getSpectrum.js +3 -5
- package/lib/component/reducer/helper/getStrongestPeak.d.ts +1 -1
- package/lib/component/reducer/helper/getStrongestPeak.js +2 -3
- package/lib/component/reducer/preferences/actions/removeWorkspace.js +3 -10
- package/lib/component/reducer/preferences/actions/setPreferences.js +5 -6
- package/lib/component/reducer/preferences/preferencesReducer.d.ts +2 -2
- package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.d.ts +1 -4
- package/lib/component/reducer/preferences/utilities/mapNucleiFormatting.js +7 -5
- package/lib/component/tool/BrushX.js +3 -3
- package/lib/component/tool/BrushXY.js +5 -5
- package/lib/component/tool/CrossLinePointer.js +3 -3
- package/lib/component/toolbar/BasicToolBar.js +9 -8
- package/lib/component/utility/Evaluate.js +2 -2
- package/lib/component/utility/FileUtility.d.ts +2 -9
- package/lib/component/utility/FileUtility.js +11 -28
- package/lib/component/utility/GroupByInfoKey.d.ts +1 -1
- package/lib/component/utility/GroupByInfoKey.js +11 -13
- package/lib/component/utility/PathBuilder.js +1 -1
- package/lib/component/utility/PreferencesHelper.js +2 -3
- package/lib/component/utility/{Export.d.ts → export.d.ts} +0 -0
- package/lib/component/utility/{Export.js → export.js} +54 -73
- package/lib/component/utility/formatNumber.d.ts +6 -1
- package/lib/component/utility/formatNumber.js +5 -4
- package/lib/component/workspaces/Workspace.d.ts +1 -1
- package/lib/component/workspaces/exercise.js +4 -4
- package/lib/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib/data/Filters.d.ts +16 -18
- package/lib/data/Filters.js +16 -18
- package/lib/data/FiltersManager.js +4 -3
- package/lib/data/PredictionManager.js +8 -10
- package/lib/data/SpectraManager.d.ts +1 -2
- package/lib/data/SpectraManager.js +25 -60
- package/lib/data/data1d/MultipleAnalysis.js +74 -70
- package/lib/data/data1d/Spectrum1D/SumManager.js +1 -1
- package/lib/data/data1d/Spectrum1D/generateJGraphData.js +1 -1
- package/lib/data/data1d/Spectrum1D/index.d.ts +24 -25
- package/lib/data/data1d/Spectrum1D/index.js +24 -25
- package/lib/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +6 -5
- package/lib/data/data1d/Spectrum1D/integrals/updateRelatives.js +8 -10
- package/lib/data/data1d/Spectrum1D/peaks/lookupPeak.js +1 -1
- package/lib/data/data1d/Spectrum1D/peaks/optimizePeaks.js +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/addRange.js +3 -2
- package/lib/data/data1d/Spectrum1D/ranges/changeRange.js +2 -2
- package/lib/data/data1d/Spectrum1D/ranges/initiateRanges.d.ts +35 -1
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.d.ts +35 -1
- package/lib/data/data1d/Spectrum1D/ranges/mapRanges.js +6 -7
- package/lib/data/data1d/database.js +45 -28
- package/lib/data/data1d/filter1d/apodization.js +2 -1
- package/lib/data/data1d/filter1d/fft.js +24 -7
- package/lib/data/data1d/filter1d/phaseCorrection.js +11 -5
- package/lib/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +1 -1
- package/lib/data/data1d/filter1d/zeroFilling.js +1 -1
- package/lib/data/data2d/Processing2D.d.ts +3 -3
- package/lib/data/data2d/Processing2D.js +10 -20
- package/lib/data/data2d/Spectrum2D/contours.d.ts +40 -0
- package/lib/data/data2d/Spectrum2D/contours.js +132 -0
- package/lib/data/data2d/Spectrum2D/index.d.ts +10 -11
- package/lib/data/data2d/Spectrum2D/index.js +10 -11
- package/lib/data/data2d/Spectrum2D/initiateDatum2D.js +3 -4
- package/lib/data/data2d/Spectrum2D/shift/getShift.js +4 -5
- package/lib/data/data2d/Spectrum2D/zones/detectZones.js +11 -8
- package/lib/data/data2d/Spectrum2D/zones/detectZonesManual.js +1 -1
- package/lib/data/data2d/Spectrum2D/zones/getDetectionZones.js +1 -2
- package/lib/data/molecules/MoleculeManager.js +1 -1
- package/lib/data/types/common/Source.d.ts +1 -0
- package/lib/data/types/data1d/index.d.ts +12 -13
- package/lib/data/types/data2d/Data2D.d.ts +2 -0
- package/lib/data/types/data2d/Datum2D.d.ts +0 -1
- package/lib/data/types/data2d/index.d.ts +8 -9
- package/lib/data/utilities/RangeUtilities.js +13 -9
- package/lib/data/utilities/ZoneUtilities.js +17 -13
- package/lib/data/utilities/calculateSanPlot.d.ts +8 -0
- package/lib/data/utilities/calculateSanPlot.js +31 -0
- package/lib/data/utilities/checkModifierKeyActivated.js +1 -2
- package/lib/data/utilities/generateChar.js +8 -6
- package/lib/data/utilities/getAtom.js +1 -1
- package/lib/data/utilities/getAtomsFromMF.js +2 -2
- package/lib/data/utilities/getColor.js +3 -3
- package/lib/data/utilities/getSum.js +6 -3
- package/lib/types/NMRiumGeneralPreferences.d.ts +2 -2
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/Chart1D.js +1 -1
- package/lib-cjs/component/1d/FooterBanner.js +16 -9
- package/lib-cjs/component/1d/LinesSeries.js +1 -1
- package/lib-cjs/component/1d/SpectraTracker.js +1 -1
- package/lib-cjs/component/1d/Viewer1D.js +1 -1
- package/lib-cjs/component/1d/XAxis.js +1 -1
- package/lib-cjs/component/1d/database/DatabaseSpectrum.js +2 -1
- package/lib-cjs/component/1d/database/ResurrectedDatabaseRanges.js +2 -2
- package/lib-cjs/component/1d/{Integral.js → integral/Integral.js} +2 -2
- package/lib-cjs/component/1d/integral/IntegralIndicator.js +31 -0
- package/lib-cjs/component/1d/integral/IntegralResizable.js +74 -0
- package/lib-cjs/component/1d/{IntegralsSeries.js → integral/IntegralsSeries.js} +4 -4
- package/lib-cjs/component/1d/multiAnalysis/MultiAnalysisRanges.js +1 -1
- package/lib-cjs/component/1d/multiplicityTree/MultiplicityTree.js +4 -4
- package/lib-cjs/component/1d/multiplicityTree/buildTreeNode.js +3 -3
- package/lib-cjs/component/1d/peaks/PeakAnnotation.js +1 -1
- package/lib-cjs/component/1d/peaks/usePeakShapesPath.js +10 -6
- package/lib-cjs/component/1d/ranges/Range.js +27 -50
- package/lib-cjs/component/1d/tool/PeakPointer.js +1 -1
- package/lib-cjs/component/1d/utilities/scale.js +2 -2
- package/lib-cjs/component/2d/Contours.js +60 -41
- package/lib-cjs/component/2d/FooterBanner.js +2 -2
- package/lib-cjs/component/2d/Left1DChart.js +1 -1
- package/lib-cjs/component/2d/Top1DChart.js +1 -1
- package/lib-cjs/component/2d/Viewer2D.js +11 -14
- package/lib-cjs/component/2d/tools/XYLabelPointer.js +2 -2
- package/lib-cjs/component/2d/tools/slicing/VerticalSliceChart.js +1 -1
- package/lib-cjs/component/2d/zones/IndicationLines.js +5 -8
- package/lib-cjs/component/EventsTrackers/BrushTracker.js +30 -21
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +14 -15
- package/lib-cjs/component/NMRium.js +7 -7
- package/lib-cjs/component/SplitPaneWrapper.js +1 -1
- package/lib-cjs/component/assignment/actions/initAssignment.js +17 -17
- package/lib-cjs/component/assignment/index.js +2 -2
- package/lib-cjs/component/context/PreferencesContext.js +3 -6
- package/lib-cjs/component/elements/Button.js +1 -1
- package/lib-cjs/component/elements/CheckBoxCell.js +1 -1
- package/lib-cjs/component/elements/ContextMenu.js +2 -2
- package/lib-cjs/component/elements/EditableColumn.js +21 -8
- package/lib-cjs/component/elements/GroupPane.js +18 -0
- package/lib-cjs/component/elements/Input.js +7 -4
- package/lib-cjs/component/elements/IsotopesViewer.js +1 -1
- package/lib-cjs/component/elements/Label.js +1 -2
- package/lib-cjs/component/elements/MolecularFormulaInput.js +2 -0
- package/lib-cjs/component/elements/NumberInput.js +2 -2
- package/lib-cjs/component/elements/ReactTable/Elements/ReactTableRow.js +1 -1
- package/lib-cjs/component/elements/ReactTable/ReactTable.js +71 -37
- package/lib-cjs/component/elements/ReactTable/ReactTableFlexLayout.js +2 -2
- package/lib-cjs/component/elements/ReactTable/utility/addCustomColumn.js +3 -3
- package/lib-cjs/component/elements/ReactTable/utility/useRowSpan.js +3 -7
- package/lib-cjs/component/elements/accordion/Accordion.js +2 -2
- package/lib-cjs/component/elements/draggble/useDraggable.js +1 -3
- package/lib-cjs/component/elements/dropDownButton/DropDownList.js +1 -2
- package/lib-cjs/component/elements/formik/FormikCheckBox.js +1 -1
- package/lib-cjs/component/elements/formik/FormikColorPicker.js +4 -7
- package/lib-cjs/component/elements/formik/FormikErrorsSummary.js +2 -2
- package/lib-cjs/component/elements/formik/FormikForm.js +2 -2
- package/lib-cjs/component/elements/formik/FormikInput.js +12 -20
- package/lib-cjs/component/elements/formik/FormikOnChange.js +13 -10
- package/lib-cjs/component/elements/formik/FormikSelect.js +1 -1
- package/lib-cjs/component/elements/formik/FormikSlider.js +7 -10
- package/lib-cjs/component/elements/formik/FormikTextarea.js +1 -1
- package/lib-cjs/component/elements/linearAxis/LinearVerticalAxis.js +2 -2
- package/lib-cjs/component/elements/popup/Alert/Provider.js +8 -8
- package/lib-cjs/component/elements/popup/Alert/index.js +5 -5
- package/lib-cjs/component/elements/popup/Modal/ModalContent.js +3 -1
- package/lib-cjs/component/elements/popup/Modal/Provider.js +16 -31
- package/lib-cjs/component/elements/popup/Modal/index.js +7 -7
- package/lib-cjs/component/header/Header.js +1 -1
- package/lib-cjs/component/hooks/useActiveSpectrumStyleOptions.js +1 -1
- package/lib-cjs/component/hooks/useCombinedRefs.js +2 -2
- package/lib-cjs/component/hooks/useExport.js +14 -11
- package/lib-cjs/component/hooks/useFormatNumberByNucleus.js +1 -1
- package/lib-cjs/component/hooks/usePanelPreferences.js +9 -7
- package/lib-cjs/component/loader/DropZone.js +10 -2
- package/lib-cjs/component/modal/AlignSpectraModal.js +1 -1
- package/lib-cjs/component/modal/ExportAsMatrixModal.js +2 -2
- package/lib-cjs/component/modal/LoadJCAMPModal.js +2 -2
- package/lib-cjs/component/modal/MultipleSpectraFiltersModal/index.js +1 -1
- package/lib-cjs/component/modal/MultipletAnalysisModal.js +3 -3
- package/lib-cjs/component/modal/PredictSpectraModal.js +5 -5
- package/lib-cjs/component/modal/editRange/EditRangeModal.js +4 -4
- package/lib-cjs/component/modal/editRange/forms/components/SignalFormInfo.js +1 -1
- package/lib-cjs/component/modal/editRange/forms/validation/EditRangeValidation.js +2 -2
- package/lib-cjs/component/modal/setting/DatabasesTabContent.js +25 -20
- package/lib-cjs/component/modal/setting/DisplayTabContent.js +21 -27
- package/lib-cjs/component/modal/setting/FormattingTabContent.js +10 -10
- package/lib-cjs/component/modal/setting/GeneralSettings.js +11 -14
- package/lib-cjs/component/modal/setting/GeneralTabContent.js +3 -1
- package/lib-cjs/component/modal/setting/ToolsTabContent.js +18 -19
- package/lib-cjs/component/modal/setting/WorkspaceItem.js +37 -49
- package/lib-cjs/component/modal/setting/settingsValidation.js +14 -12
- package/lib-cjs/component/panels/AutomaticAssignment/useAutoAssignments.js +8 -7
- package/lib-cjs/component/panels/InformationPanel.js +51 -55
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +1 -1
- package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +1 -1
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanelHeader.js +4 -4
- package/lib-cjs/component/panels/MoleculesPanel/Utilities.js +6 -6
- package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +16 -17
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/ColumnHeader.js +1 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleAnalysisCodeEditor.js +1 -1
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +2 -2
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPreferences.js +18 -17
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisTable.js +2 -2
- package/lib-cjs/component/panels/PeaksPanel/PeaksPanel.js +1 -1
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/RangesHeader.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/RangesPanel.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/RangesTable.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/RangesTableRow.js +1 -3
- package/lib-cjs/component/panels/RangesPanel/TableColumns/CouplingColumn.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/hooks/useEditRangeModal.js +2 -2
- package/lib-cjs/component/panels/RangesPanel/hooks/useMapRanges.js +8 -8
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumListItem.js +6 -6
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumListPanel.js +3 -3
- package/lib-cjs/component/panels/SpectrumsPanel/SpectrumsTabs.js +6 -6
- package/lib-cjs/component/panels/SpectrumsPanel/base/ColorIndicator.js +2 -2
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum1DSetting.js +2 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/Spectrum2DSetting.js +2 -1
- package/lib-cjs/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -25
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnField.js +13 -17
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/AdditionalColumnHeader.js +16 -17
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +20 -21
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.js +12 -12
- package/lib-cjs/component/panels/SummaryPanel/SetShiftTolerancesModal.js +1 -5
- package/lib-cjs/component/panels/SummaryPanel/utilities/Utilities.js +105 -94
- package/lib-cjs/component/panels/ZonesPanel/ZonesTable.js +8 -8
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +5 -4
- package/lib-cjs/component/panels/databasePanel/DatabaseTable.js +20 -5
- package/lib-cjs/component/panels/extra/preferences/ColumnsHelper.js +5 -2
- package/lib-cjs/component/panels/extra/utilities/MultiplicityUtilities.js +2 -2
- package/lib-cjs/component/panels/filtersPanel/FiltersTable.js +1 -1
- package/lib-cjs/component/reducer/IgnoreActions.js +3 -3
- package/lib-cjs/component/reducer/Reducer.js +12 -11
- package/lib-cjs/component/reducer/actions/CorrelationsActions.js +4 -4
- package/lib-cjs/component/reducer/actions/DomainActions.js +52 -69
- package/lib-cjs/component/reducer/actions/FiltersActions.js +15 -6
- package/lib-cjs/component/reducer/actions/HistoryActions.js +5 -5
- package/lib-cjs/component/reducer/actions/IntegralsActions.js +6 -5
- package/lib-cjs/component/reducer/actions/LoadActions.js +12 -0
- package/lib-cjs/component/reducer/actions/PeaksActions.js +7 -6
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +20 -38
- package/lib-cjs/component/reducer/actions/RangesActions.js +28 -24
- package/lib-cjs/component/reducer/actions/SpectrumsActions.js +12 -5
- package/lib-cjs/component/reducer/actions/ToolsActions.js +28 -41
- package/lib-cjs/component/reducer/actions/ZonesActions.js +11 -10
- package/lib-cjs/component/reducer/core/Constants.js +1 -1
- package/lib-cjs/component/reducer/helper/GetClosestNumber.js +2 -1
- package/lib-cjs/component/reducer/helper/Zoom1DManager.js +11 -10
- package/lib-cjs/component/reducer/helper/getActiveSpectrum.js +8 -0
- package/lib-cjs/component/reducer/helper/getSpectrum.js +3 -5
- package/lib-cjs/component/reducer/helper/getStrongestPeak.js +2 -3
- package/lib-cjs/component/reducer/preferences/actions/removeWorkspace.js +3 -10
- package/lib-cjs/component/reducer/preferences/actions/setPreferences.js +5 -9
- package/lib-cjs/component/reducer/preferences/utilities/mapNucleiFormatting.js +7 -5
- package/lib-cjs/component/tool/BrushX.js +3 -3
- package/lib-cjs/component/tool/BrushXY.js +5 -5
- package/lib-cjs/component/tool/CrossLinePointer.js +3 -3
- package/lib-cjs/component/toolbar/BasicToolBar.js +8 -7
- package/lib-cjs/component/utility/Evaluate.js +2 -2
- package/lib-cjs/component/utility/FileUtility.js +11 -29
- package/lib-cjs/component/utility/GroupByInfoKey.js +11 -13
- package/lib-cjs/component/utility/PathBuilder.js +1 -1
- package/lib-cjs/component/utility/PreferencesHelper.js +2 -3
- package/lib-cjs/component/utility/{Export.js → export.js} +78 -74
- package/lib-cjs/component/utility/formatNumber.js +5 -4
- package/lib-cjs/component/workspaces/exercise.js +4 -4
- package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +1 -1
- package/lib-cjs/data/Filters.js +17 -35
- package/lib-cjs/data/FiltersManager.js +4 -3
- package/lib-cjs/data/PredictionManager.js +8 -10
- package/lib-cjs/data/SpectraManager.js +26 -62
- package/lib-cjs/data/data1d/MultipleAnalysis.js +74 -70
- package/lib-cjs/data/data1d/Spectrum1D/SumManager.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/generateJGraphData.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/index.js +25 -25
- package/lib-cjs/data/data1d/Spectrum1D/initiateDatum1D.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/integrals/changeIntegralsRelative.js +6 -5
- package/lib-cjs/data/data1d/Spectrum1D/integrals/updateRelatives.js +8 -10
- package/lib-cjs/data/data1d/Spectrum1D/peaks/lookupPeak.js +1 -1
- package/lib-cjs/data/data1d/Spectrum1D/peaks/optimizePeaks.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/addRange.js +3 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/changeRange.js +2 -2
- package/lib-cjs/data/data1d/Spectrum1D/ranges/mapRanges.js +6 -7
- package/lib-cjs/data/data1d/database.js +45 -28
- package/lib-cjs/data/data1d/filter1d/apodization.js +2 -1
- package/lib-cjs/data/data1d/filter1d/fft.js +23 -6
- package/lib-cjs/data/data1d/filter1d/phaseCorrection.js +10 -4
- package/lib-cjs/data/data1d/filter1d/utils/padDataToNextPowerOfTwo.js +1 -1
- package/lib-cjs/data/data1d/filter1d/zeroFilling.js +1 -1
- package/lib-cjs/data/data2d/Processing2D.js +10 -20
- package/lib-cjs/data/data2d/Spectrum2D/contours.js +138 -0
- package/lib-cjs/data/data2d/Spectrum2D/index.js +11 -11
- package/lib-cjs/data/data2d/Spectrum2D/initiateDatum2D.js +3 -4
- package/lib-cjs/data/data2d/Spectrum2D/shift/getShift.js +4 -5
- package/lib-cjs/data/data2d/Spectrum2D/zones/detectZones.js +11 -8
- package/lib-cjs/data/data2d/Spectrum2D/zones/detectZonesManual.js +1 -1
- package/lib-cjs/data/data2d/Spectrum2D/zones/getDetectionZones.js +1 -2
- package/lib-cjs/data/molecules/MoleculeManager.js +1 -1
- package/lib-cjs/data/utilities/RangeUtilities.js +13 -9
- package/lib-cjs/data/utilities/ZoneUtilities.js +17 -13
- package/lib-cjs/data/utilities/calculateSanPlot.js +35 -0
- package/lib-cjs/data/utilities/checkModifierKeyActivated.js +1 -2
- package/lib-cjs/data/utilities/generateChar.js +8 -6
- package/lib-cjs/data/utilities/getAtom.js +1 -1
- package/lib-cjs/data/utilities/getAtomsFromMF.js +2 -2
- package/lib-cjs/data/utilities/getColor.js +3 -3
- package/lib-cjs/data/utilities/getSum.js +6 -3
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +36 -31
- package/lib/component/1d/IntegralResizable.js +0 -72
- package/lib/component/elements/popup/helpers.d.ts +0 -1
- package/lib/component/elements/popup/helpers.js +0 -9
- package/lib/component/panels/RangesPanel/TableColumns/format.d.ts +0 -1
- package/lib/component/panels/RangesPanel/TableColumns/format.js +0 -8
- package/lib/data/data1d/Data1DManager.d.ts +0 -3
- package/lib/data/data1d/Data1DManager.js +0 -98
- package/lib/data/data1d/filter1d/absolute.d.ts +0 -13
- package/lib/data/data1d/filter1d/absolute.js +0 -26
- package/lib/data/data2d/Data2DManager.d.ts +0 -3
- package/lib/data/data2d/Data2DManager.js +0 -34
- package/lib/data/types/data2d/Contour.d.ts +0 -4
- package/lib/data/types/data2d/Contour.js +0 -1
- package/lib/data/types/data2d/Contours.d.ts +0 -2
- package/lib/data/types/data2d/Contours.js +0 -1
- package/lib-cjs/component/1d/IntegralResizable.js +0 -77
- package/lib-cjs/component/elements/popup/helpers.js +0 -13
- package/lib-cjs/component/panels/RangesPanel/TableColumns/format.js +0 -14
- package/lib-cjs/data/data1d/Data1DManager.js +0 -104
- package/lib-cjs/data/data1d/filter1d/absolute.js +0 -32
- package/lib-cjs/data/data2d/Data2DManager.js +0 -40
- package/lib-cjs/data/types/data2d/Contour.js +0 -2
- package/lib-cjs/data/types/data2d/Contours.js +0 -2
|
@@ -1,162 +1,163 @@
|
|
|
1
1
|
import * as Yup from 'yup';
|
|
2
|
-
|
|
2
|
+
import { ObjectShape } from 'yup/lib/object';
|
|
3
|
+
export declare const validation: import("yup/lib/Lazy").default<Yup.ObjectSchema<import("yup/lib/object").Assign<ObjectShape, {
|
|
3
4
|
formatting: Yup.ObjectSchema<any, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<any>, import("yup/lib/object").AssertsShape<any>>;
|
|
4
|
-
databases: Yup.ObjectSchema<import("yup/lib/object").Assign<
|
|
5
|
-
data: Yup.ArraySchema<Yup.ObjectSchema<import("yup/lib/object").Assign<
|
|
5
|
+
databases: Yup.ObjectSchema<import("yup/lib/object").Assign<ObjectShape, {
|
|
6
|
+
data: Yup.ArraySchema<Yup.ObjectSchema<import("yup/lib/object").Assign<ObjectShape, {
|
|
6
7
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
7
8
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
8
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
9
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
9
10
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
10
11
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
11
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
12
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
12
13
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
13
14
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
14
|
-
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
15
|
+
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
15
16
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
16
17
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
17
|
-
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
18
|
+
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
18
19
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
19
20
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
20
21
|
}>>[] | undefined>;
|
|
21
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
22
|
-
data: Yup.ArraySchema<Yup.ObjectSchema<import("yup/lib/object").Assign<
|
|
22
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
23
|
+
data: Yup.ArraySchema<Yup.ObjectSchema<import("yup/lib/object").Assign<ObjectShape, {
|
|
23
24
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
24
25
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
25
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
26
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
26
27
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
27
28
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
28
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
29
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
29
30
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
30
31
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
31
|
-
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
32
|
+
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
32
33
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
33
34
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
34
|
-
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
35
|
+
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
35
36
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
36
37
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
37
38
|
}>>[] | undefined>;
|
|
38
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
39
|
-
data: Yup.ArraySchema<Yup.ObjectSchema<import("yup/lib/object").Assign<
|
|
39
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
40
|
+
data: Yup.ArraySchema<Yup.ObjectSchema<import("yup/lib/object").Assign<ObjectShape, {
|
|
40
41
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
41
42
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
42
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
43
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
43
44
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
44
45
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
45
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
46
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
46
47
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
47
48
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
48
|
-
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
49
|
+
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
49
50
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
50
51
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
51
|
-
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
52
|
+
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
52
53
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
53
54
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
54
55
|
}>>[] | undefined>;
|
|
55
56
|
}>>>;
|
|
56
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
57
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
57
58
|
formatting: Yup.ObjectSchema<any, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<any>, import("yup/lib/object").AssertsShape<any>>;
|
|
58
|
-
databases: Yup.ObjectSchema<import("yup/lib/object").Assign<
|
|
59
|
-
data: Yup.ArraySchema<Yup.ObjectSchema<import("yup/lib/object").Assign<
|
|
59
|
+
databases: Yup.ObjectSchema<import("yup/lib/object").Assign<ObjectShape, {
|
|
60
|
+
data: Yup.ArraySchema<Yup.ObjectSchema<import("yup/lib/object").Assign<ObjectShape, {
|
|
60
61
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
61
62
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
62
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
63
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
63
64
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
64
65
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
65
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
66
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
66
67
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
67
68
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
68
|
-
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
69
|
+
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
69
70
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
70
71
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
71
|
-
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
72
|
+
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
72
73
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
73
74
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
74
75
|
}>>[] | undefined>;
|
|
75
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
76
|
-
data: Yup.ArraySchema<Yup.ObjectSchema<import("yup/lib/object").Assign<
|
|
76
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
77
|
+
data: Yup.ArraySchema<Yup.ObjectSchema<import("yup/lib/object").Assign<ObjectShape, {
|
|
77
78
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
78
79
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
79
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
80
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
80
81
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
81
82
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
82
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
83
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
83
84
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
84
85
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
85
|
-
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
86
|
+
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
86
87
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
87
88
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
88
|
-
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
89
|
+
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
89
90
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
90
91
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
91
92
|
}>>[] | undefined>;
|
|
92
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
93
|
-
data: Yup.ArraySchema<Yup.ObjectSchema<import("yup/lib/object").Assign<
|
|
93
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
94
|
+
data: Yup.ArraySchema<Yup.ObjectSchema<import("yup/lib/object").Assign<ObjectShape, {
|
|
94
95
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
95
96
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
96
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
97
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
97
98
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
98
99
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
99
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
100
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
100
101
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
101
102
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
102
|
-
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
103
|
+
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
103
104
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
104
105
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
105
|
-
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
106
|
+
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
106
107
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
107
108
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
108
109
|
}>>[] | undefined>;
|
|
109
110
|
}>>>;
|
|
110
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
111
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
111
112
|
formatting: Yup.ObjectSchema<any, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<any>, import("yup/lib/object").AssertsShape<any>>;
|
|
112
|
-
databases: Yup.ObjectSchema<import("yup/lib/object").Assign<
|
|
113
|
-
data: Yup.ArraySchema<Yup.ObjectSchema<import("yup/lib/object").Assign<
|
|
113
|
+
databases: Yup.ObjectSchema<import("yup/lib/object").Assign<ObjectShape, {
|
|
114
|
+
data: Yup.ArraySchema<Yup.ObjectSchema<import("yup/lib/object").Assign<ObjectShape, {
|
|
114
115
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
115
116
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
116
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
117
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
117
118
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
118
119
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
119
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
120
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
120
121
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
121
122
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
122
|
-
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
123
|
+
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
123
124
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
124
125
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
125
|
-
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
126
|
+
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
126
127
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
127
128
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
128
129
|
}>>[] | undefined>;
|
|
129
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
130
|
-
data: Yup.ArraySchema<Yup.ObjectSchema<import("yup/lib/object").Assign<
|
|
130
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
131
|
+
data: Yup.ArraySchema<Yup.ObjectSchema<import("yup/lib/object").Assign<ObjectShape, {
|
|
131
132
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
132
133
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
133
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
134
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
134
135
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
135
136
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
136
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
137
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
137
138
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
138
139
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
139
|
-
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
140
|
+
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
140
141
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
141
142
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
142
|
-
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
143
|
+
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
143
144
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
144
145
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
145
146
|
}>>[] | undefined>;
|
|
146
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
147
|
-
data: Yup.ArraySchema<Yup.ObjectSchema<import("yup/lib/object").Assign<
|
|
147
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
148
|
+
data: Yup.ArraySchema<Yup.ObjectSchema<import("yup/lib/object").Assign<ObjectShape, {
|
|
148
149
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
149
150
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
150
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
151
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
151
152
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
152
153
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
153
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
154
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
154
155
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
155
156
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
156
|
-
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<
|
|
157
|
+
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
157
158
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
158
159
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
159
|
-
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<
|
|
160
|
+
}>>[] | undefined, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<ObjectShape, {
|
|
160
161
|
label: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
161
162
|
url: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
162
163
|
}>>[] | undefined>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import * as Yup from 'yup';
|
|
2
|
-
const formattingElementValidation = (obj) =>
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
2
|
+
const formattingElementValidation = (obj) => {
|
|
3
|
+
return Object.fromEntries(Object.keys(obj.formatting.nuclei).map((key) => [
|
|
4
|
+
key,
|
|
5
|
+
Yup.object().shape({
|
|
6
|
+
name: Yup.string().trim().required('Nucleus is a required field'),
|
|
7
|
+
ppm: Yup.string().trim().required('PPM format is a required field'),
|
|
8
|
+
hz: Yup.string().trim().required('Hz format is a required field'),
|
|
9
|
+
}),
|
|
10
|
+
]));
|
|
11
|
+
};
|
|
10
12
|
const formattingValidation = (obj) => Yup.object().shape({
|
|
11
13
|
nuclei: Yup.object()
|
|
12
14
|
.shape(formattingElementValidation(obj))
|
|
@@ -24,15 +26,15 @@ const formattingValidation = (obj) => Yup.object().shape({
|
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
|
-
const errors =
|
|
29
|
+
const errors = [];
|
|
30
|
+
for (const key in nucleusFrequencies) {
|
|
28
31
|
const { value, fields } = nucleusFrequencies[key];
|
|
29
32
|
if (value > 1) {
|
|
30
33
|
for (let field of fields) {
|
|
31
|
-
|
|
34
|
+
errors.push(new Yup.ValidationError(`${key} nucleus must te be unique`, nuclei[key].name, `${this.path}.${field}.name`));
|
|
32
35
|
}
|
|
33
36
|
}
|
|
34
|
-
|
|
35
|
-
}, []);
|
|
37
|
+
}
|
|
36
38
|
return new Yup.ValidationError(errors);
|
|
37
39
|
}),
|
|
38
40
|
});
|
|
@@ -5,20 +5,21 @@ import { useChartData } from '../../context/ChartContext';
|
|
|
5
5
|
import { useDispatch } from '../../context/DispatchContext';
|
|
6
6
|
import { useAlert } from '../../elements/popup/Alert';
|
|
7
7
|
import { SET_AUTOMATIC_ASSIGNMENTS } from '../../reducer/types/Types';
|
|
8
|
+
import { assert } from '../../utility/assert';
|
|
8
9
|
function mapSpectra(data) {
|
|
9
|
-
return data.
|
|
10
|
+
return data.map((spectrum) => {
|
|
10
11
|
const { id, info } = spectrum;
|
|
11
|
-
const dimension =
|
|
12
|
+
const dimension = info.dimension;
|
|
13
|
+
assert(dimension === 1 || dimension === 2, 'dimension must be 1 or 2');
|
|
12
14
|
if (dimension === 1) {
|
|
13
15
|
const ranges = spectrum.ranges.values;
|
|
14
|
-
|
|
16
|
+
return { id, info, ranges };
|
|
15
17
|
}
|
|
16
|
-
else
|
|
18
|
+
else {
|
|
17
19
|
const zones = spectrum.zones.values;
|
|
18
|
-
|
|
20
|
+
return { id, info, zones };
|
|
19
21
|
}
|
|
20
|
-
|
|
21
|
-
}, []);
|
|
22
|
+
});
|
|
22
23
|
}
|
|
23
24
|
export function useAutoAssignments() {
|
|
24
25
|
const dispatch = useDispatch();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState,
|
|
2
|
+
import { useState, memo } from 'react';
|
|
3
|
+
import Input from '../elements/Input';
|
|
3
4
|
import ReactTableFlexLayout from '../elements/ReactTable/ReactTableFlexLayout';
|
|
4
5
|
import useSpectrum from '../hooks/useSpectrum';
|
|
5
6
|
const styles = {
|
|
@@ -10,67 +11,62 @@ const styles = {
|
|
|
10
11
|
width: '100%',
|
|
11
12
|
},
|
|
12
13
|
tableContainer: {
|
|
13
|
-
height: 'calc(100% - 30px)',
|
|
14
14
|
overflow: 'auto',
|
|
15
15
|
display: 'block',
|
|
16
16
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
marginBottom: '2px',
|
|
17
|
+
tableHeader: {
|
|
18
|
+
padding: ' 5px 10px',
|
|
19
|
+
backgroundColor: ' #f8f8f8',
|
|
20
|
+
borderBottom: '1px solid gray',
|
|
21
|
+
fontSize: '1em',
|
|
23
22
|
},
|
|
24
23
|
};
|
|
25
|
-
function
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const values = Object.keys(information).filter((key) => key
|
|
31
|
-
.toLowerCase()
|
|
32
|
-
.includes(e.target ? e.target.value.toLowerCase() : e.toLowerCase()));
|
|
33
|
-
setMatchesData(values);
|
|
34
|
-
}, [information]);
|
|
35
|
-
useEffect(() => {
|
|
36
|
-
if (searchRef.current) {
|
|
37
|
-
handleSearch(searchRef.current.value);
|
|
24
|
+
function filter(searchKey, data) {
|
|
25
|
+
const result = [];
|
|
26
|
+
for (const key in data) {
|
|
27
|
+
if (!searchKey || key.toLowerCase().includes(searchKey)) {
|
|
28
|
+
result.push({ key, value: data[key] });
|
|
38
29
|
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
30
|
+
}
|
|
31
|
+
return result;
|
|
32
|
+
}
|
|
33
|
+
const columns = [
|
|
34
|
+
{
|
|
35
|
+
Header: 'Parameter',
|
|
36
|
+
sortType: 'basic',
|
|
37
|
+
minWidth: 100,
|
|
38
|
+
width: 20,
|
|
39
|
+
maxWidth: 20,
|
|
40
|
+
accessor: 'key',
|
|
41
|
+
Cell: ({ row }) => (_jsx("p", { style: { padding: '5px', backgroundColor: 'white' }, children: row.original.key })),
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
Header: 'Value',
|
|
45
|
+
sortType: 'basic',
|
|
46
|
+
resizable: true,
|
|
47
|
+
accessor: 'value',
|
|
48
|
+
Cell: ({ row }) => (_jsx("p", { style: {
|
|
49
|
+
backgroundColor: '#efefef',
|
|
50
|
+
height: '100%',
|
|
51
|
+
padding: '5px',
|
|
52
|
+
fontFamily: 'monospace',
|
|
53
|
+
whiteSpace: 'pre',
|
|
54
|
+
overflow: 'hidden',
|
|
55
|
+
}, children: `${row.original.value}` })),
|
|
56
|
+
},
|
|
57
|
+
];
|
|
58
|
+
function InformationPanelInner({ info, meta }) {
|
|
59
|
+
const [searchKey, setSearchKey] = useState();
|
|
60
|
+
function handleSearch(e) {
|
|
61
|
+
const searchKey = e.target.value.toLowerCase();
|
|
62
|
+
setSearchKey(searchKey);
|
|
63
|
+
}
|
|
64
|
+
const matchesInfo = filter(searchKey, info);
|
|
65
|
+
const matchesMeta = filter(searchKey, meta);
|
|
66
|
+
return (_jsxs("div", { style: styles.container, children: [_jsx("div", { children: _jsx(Input, { placeholder: "Search for parameter...", onChange: handleSearch, debounceTime: 250, style: {
|
|
67
|
+
inputWrapper: { width: '100%' },
|
|
68
|
+
input: { textAlign: 'left', padding: '5px' },
|
|
69
|
+
} }) }), _jsxs("div", { style: styles.tableContainer, children: [_jsx("p", { style: styles.tableHeader, children: "Spectrum information" }), _jsx(ReactTableFlexLayout, { data: matchesInfo, columns: columns, style: { height: 'auto' } }), _jsx("p", { style: styles.tableHeader, children: "Other parameters" }), _jsx(ReactTableFlexLayout, { data: matchesMeta, columns: columns, style: { height: 'auto' } })] })] }));
|
|
74
70
|
}
|
|
75
71
|
const MemoizedInformationPanel = memo(InformationPanelInner);
|
|
76
72
|
const emptyData = { info: {}, meta: {} };
|
|
@@ -88,7 +88,7 @@ function IntegralTable({ activeTab, data }) {
|
|
|
88
88
|
index: 5,
|
|
89
89
|
id: 'relative',
|
|
90
90
|
Header: () => {
|
|
91
|
-
const n = activeTab?.replace(/
|
|
91
|
+
const n = activeTab?.replace(/\d/g, '');
|
|
92
92
|
return _jsx("span", { children: `Relative ${n}` });
|
|
93
93
|
},
|
|
94
94
|
accessor: (row) => {
|
|
@@ -34,5 +34,5 @@ export default function MoleculeHeader(props) {
|
|
|
34
34
|
const label = event.target.value;
|
|
35
35
|
dispatch({ type: CHANGE_MOLECULE_LABEL, payload: { label, id } });
|
|
36
36
|
}, [dispatch]);
|
|
37
|
-
return (_jsxs("div", { style: styles.toolbar, children: [_jsxs("div", { style: { display: 'flex' }, children: [_jsx("span", { children: "Label" }), _jsx(EditableColumn, { value: currentMolecule.label, style: styles.labelInput, validate: validateLabel, onSave: (event) => saveLabelHandler(currentMolecule.id, event) })] }), _jsxs("span", { children: [_jsx(MF, { mf: currentMolecule.mf }), " - ", currentMolecule.mw?.toFixed(2)] })] }));
|
|
37
|
+
return (_jsxs("div", { style: styles.toolbar, children: [_jsxs("div", { style: { display: 'flex' }, children: [_jsx("span", { children: "Label" }), _jsx(EditableColumn, { value: currentMolecule.label, style: styles.labelInput, validate: validateLabel, onSave: (event) => saveLabelHandler(currentMolecule.id, event), textOverFlowEllipses: true })] }), _jsxs("span", { children: [_jsx(MF, { mf: currentMolecule.mf }), " - ", currentMolecule.mw?.toFixed(2)] })] }));
|
|
38
38
|
}
|
|
@@ -16,7 +16,7 @@ import { useAlert } from '../../elements/popup/Alert';
|
|
|
16
16
|
import { positions, useModal } from '../../elements/popup/Modal';
|
|
17
17
|
import PredictSpectraModal from '../../modal/PredictSpectraModal';
|
|
18
18
|
import { ADD_MOLECULE, DELETE_MOLECULE, FLOAT_MOLECULE_OVER_SPECTRUM, } from '../../reducer/types/Types';
|
|
19
|
-
import { copyPNGToClipboard, copyTextToClipboard, exportAsSVG, } from '../../utility/
|
|
19
|
+
import { copyPNGToClipboard, copyTextToClipboard, exportAsSVG, } from '../../utility/export';
|
|
20
20
|
const toolbarStyle = css `
|
|
21
21
|
display: flex;
|
|
22
22
|
flex-direction: row;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function getElements(activeTab) {
|
|
2
2
|
const nuclei = activeTab.split(',');
|
|
3
|
-
return nuclei.map((nucleus) => nucleus.replace(/
|
|
3
|
+
return nuclei.map((nucleus) => nucleus.replace(/\d/g, ''));
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
6
|
* Returns the OCL id(s) and number of atoms of an atom when hovering over
|
|
@@ -90,14 +90,14 @@ export function toggleDiaIDs(diaIDs, atomInformation) {
|
|
|
90
90
|
let _diaIDs = diaIDs ? diaIDs.slice() : [];
|
|
91
91
|
const { nbAtoms, oclIDs } = atomInformation;
|
|
92
92
|
let tempNbAtoms = nbAtoms;
|
|
93
|
-
oclIDs
|
|
94
|
-
if (_diaIDs.includes(
|
|
93
|
+
for (const oclID of oclIDs) {
|
|
94
|
+
if (_diaIDs.includes(oclID)) {
|
|
95
95
|
tempNbAtoms *= -1;
|
|
96
|
-
_diaIDs = _diaIDs.filter((_id) => _id !==
|
|
96
|
+
_diaIDs = _diaIDs.filter((_id) => _id !== oclID);
|
|
97
97
|
}
|
|
98
98
|
else {
|
|
99
|
-
_diaIDs.push(
|
|
99
|
+
_diaIDs.push(oclID);
|
|
100
100
|
}
|
|
101
|
-
}
|
|
101
|
+
}
|
|
102
102
|
return [_diaIDs, tempNbAtoms];
|
|
103
103
|
}
|
|
@@ -73,24 +73,23 @@ export default function useAtomAssignment({ displayerMode, activeTab: nucleus, z
|
|
|
73
73
|
// used for atom highlighting for now, until we would like to highlight atoms per axis separately
|
|
74
74
|
const assignedDiaIDsMerged = useMemo(() => assignedDiaIDs.x.concat(assignedDiaIDs.y), [assignedDiaIDs.x, assignedDiaIDs.y]);
|
|
75
75
|
const currentDiaIDsToHighlight = useMemo(() => {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
.flat());
|
|
92
|
-
}
|
|
76
|
+
const highlights = highlightData.highlight.highlighted
|
|
77
|
+
.filter((highlightID) => {
|
|
78
|
+
return assignments.data.assignments[highlightID];
|
|
79
|
+
})
|
|
80
|
+
.flatMap((highlightID) => {
|
|
81
|
+
const { datum } = findDatumAndSignalIndex(data, highlightID);
|
|
82
|
+
const type = highlightData.highlight.sourceData?.type;
|
|
83
|
+
if (datum &&
|
|
84
|
+
(type === HighlightEventSource.ZONE ||
|
|
85
|
+
type === HighlightEventSource.RANGE ||
|
|
86
|
+
type === HighlightEventSource.ATOM)) {
|
|
87
|
+
// we are on range/zone level only, so add the belonging signal IDs to highlight too
|
|
88
|
+
return datum.signals.flatMap((signal) => filterForIDsWithAssignment(assignments, [signal.id]).length > 0
|
|
89
|
+
? signal.diaIDs
|
|
90
|
+
: []);
|
|
93
91
|
}
|
|
92
|
+
return [];
|
|
94
93
|
});
|
|
95
94
|
return getCurrentDiaIDsToHighlight(assignments).concat(highlights);
|
|
96
95
|
}, [
|
|
@@ -54,6 +54,6 @@ function ColumnHeader({ charLabel, rangeLabel, data, onColumnFilter, }) {
|
|
|
54
54
|
const deleteHandler = useCallback(() => {
|
|
55
55
|
dispatch({ type: DELETE_ANALYZE_SPECTRA_RANGE, colKey: charLabel });
|
|
56
56
|
}, [charLabel, dispatch]);
|
|
57
|
-
return (_jsxs("div", { css: styles, children: [_jsxs("div", { className: "container", children: [data.type === COLUMNS_TYPES.NORMAL && (_jsx("div", { className: "dropDown-container", children: _jsx(DropDownButton, { data: columnsFilters, formatSelectedValue: (item) => item.label.
|
|
57
|
+
return (_jsxs("div", { css: styles, children: [_jsxs("div", { className: "container", children: [data.type === COLUMNS_TYPES.NORMAL && (_jsx("div", { className: "dropDown-container", children: _jsx(DropDownButton, { data: columnsFilters, formatSelectedValue: (item) => item.label.slice(0, 3), selectedKey: data.valueKey, onSelect: onColumnFilter }) })), _jsxs("div", { className: "label-container", children: [_jsxs("span", { className: "label", children: [" ", charLabel] }), _jsx("span", { className: "label", children: rangeLabel })] })] }), _jsx(DeleteButton, { onDelete: deleteHandler })] }));
|
|
58
58
|
}
|
|
59
59
|
export default ColumnHeader;
|
|
@@ -11,7 +11,7 @@ const initCode = `function run(data) {
|
|
|
11
11
|
`;
|
|
12
12
|
function MultipleAnalysisCodeEditor({ data }) {
|
|
13
13
|
const { values, setFieldValue } = useFormikContext();
|
|
14
|
-
const [code, setCode] = useState(values.code
|
|
14
|
+
const [code, setCode] = useState(values.code || initCode);
|
|
15
15
|
const [result, setResult] = useState('');
|
|
16
16
|
useEffect(() => {
|
|
17
17
|
const evalResult = evaluate(code, data);
|
|
@@ -15,7 +15,7 @@ import { useModal } from '../../elements/popup/Modal';
|
|
|
15
15
|
import AlignSpectraModal from '../../modal/AlignSpectraModal';
|
|
16
16
|
import { RESET_SELECTED_TOOL } from '../../reducer/types/Types';
|
|
17
17
|
import Events from '../../utility/Events';
|
|
18
|
-
import { copyTextToClipboard } from '../../utility/
|
|
18
|
+
import { copyTextToClipboard } from '../../utility/export';
|
|
19
19
|
import { tablePanelStyle } from '../extra/BasicPanelStyle';
|
|
20
20
|
import DefaultPanelHeader from '../header/DefaultPanelHeader';
|
|
21
21
|
import PreferencesHeader from '../header/PreferencesHeader';
|