nmrium 0.20.1 → 0.20.2
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/elements/NumberInput.d.ts +1 -2
- package/lib/component/elements/Tab/Tab.js +1 -0
- package/lib/component/loader/DropZone.js +1 -1
- package/lib/component/panels/SummaryPanel/CorrelationTable/editLink/MoveLink.d.ts +5 -5
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +1 -1
- package/lib/component/panels/SummaryPanel/Utilities.d.ts +7 -7
- package/lib/component/reducer/Reducer.d.ts +11 -11
- package/lib/component/reducer/actions/CorrelationsActions.d.ts +7 -7
- package/lib/component/reducer/actions/CorrelationsActions.js +1 -1
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/elements/Tab/Tab.js +1 -0
- package/lib-cjs/component/loader/DropZone.js +1 -1
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +15 -16
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export interface NumberInputProps {
|
|
3
|
-
ref?: any;
|
|
4
3
|
pattern?: string;
|
|
5
4
|
label?: string;
|
|
6
5
|
name?: string;
|
|
@@ -17,5 +16,5 @@ export interface NumberInputProps {
|
|
|
17
16
|
onChange?: (element: any) => void;
|
|
18
17
|
onInput?: () => void;
|
|
19
18
|
}
|
|
20
|
-
declare const NumberInput: import("react").ForwardRefExoticComponent<
|
|
19
|
+
declare const NumberInput: import("react").ForwardRefExoticComponent<NumberInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
21
20
|
export default NumberInput;
|
|
@@ -14,6 +14,7 @@ const styles = (styles) => css `
|
|
|
14
14
|
|
|
15
15
|
${styles}
|
|
16
16
|
`;
|
|
17
|
+
/* eslint-enable react/no-unused-prop-types */
|
|
17
18
|
export function InternalTab({ tabid, tablabel, isActive, onClick = () => null, canDelete, onDelete = () => null, tabstyles, render, }) {
|
|
18
19
|
let className = 'tab-list-item';
|
|
19
20
|
// use tab identifier if given (higher priority)
|
|
@@ -199,7 +199,7 @@ function DropZone(props) {
|
|
|
199
199
|
const open = useCallback(() => {
|
|
200
200
|
openImportDialog();
|
|
201
201
|
}, [openImportDialog]);
|
|
202
|
-
return (_jsx(LoaderProvider, { value: open, children: _jsxs("div", { ...getRootProps(), role: "none", css: containerStyle, children: [_jsx("input", { ...getInputProps() }, void 0), isDragActive && (_jsxs("div", { css: style, style: {
|
|
202
|
+
return (_jsx(LoaderProvider, { value: open, children: _jsxs("div", { ...getRootProps(), role: "none", css: containerStyle, children: [_jsx("input", { "data-test-id": "dropzone-input", ...getInputProps() }, void 0), isDragActive && (_jsxs("div", { css: style, style: {
|
|
203
203
|
width: `${width}px`,
|
|
204
204
|
height: `${height}px`,
|
|
205
205
|
marginTop: '30px',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Correlation, Link } from 'nmr-correlation';
|
|
2
2
|
interface MoveLinkProps {
|
|
3
|
-
correlationDim1:
|
|
4
|
-
correlationDim2:
|
|
5
|
-
link:
|
|
6
|
-
correlations:
|
|
3
|
+
correlationDim1: Correlation;
|
|
4
|
+
correlationDim2: Correlation;
|
|
5
|
+
link: Link;
|
|
6
|
+
correlations: Correlation[];
|
|
7
7
|
onEdit: (action: string, valueDim1: string, valueDim2: string | undefined) => void;
|
|
8
8
|
}
|
|
9
9
|
declare function MoveLink({ correlationDim1, correlationDim2, link, correlations, onEdit, }: MoveLinkProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
2
|
/** @jsxImportSource @emotion/react */
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import { getLinkDelta, getLinkDim } from 'nmr-correlation';
|
|
4
|
+
import { getLinkDelta, getLinkDim, } from 'nmr-correlation';
|
|
5
5
|
import { memo, useCallback, useEffect, useMemo, useState } from 'react';
|
|
6
6
|
import { FaFlask, FaSlidersH } from 'react-icons/fa';
|
|
7
7
|
import { findRange, findSignal1D, findSignal2D, findSpectrum, findZone, } from '../../../data/utilities/FindUtilities';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Link, Correlation } from 'nmr-correlation';
|
|
2
2
|
import { Datum2D } from '../../../data/types/data2d';
|
|
3
3
|
declare function getAtomType(nucleus: string): string;
|
|
4
4
|
declare function getLabelColor(correlationData: any, correlation: any): string | null;
|
|
5
|
-
declare function findSignalMatch1D(spectrum: Datum2D, link:
|
|
6
|
-
declare function findSignalMatch2D(spectrum: Datum2D, link:
|
|
7
|
-
declare function getAbbreviation(link:
|
|
5
|
+
declare function findSignalMatch1D(spectrum: Datum2D, link: Link, factor: number, xDomain0: number, xDomain1: number): boolean;
|
|
6
|
+
declare function findSignalMatch2D(spectrum: Datum2D, link: Link, factor: number, xDomain0: number, xDomain1: number, yDomain0: number, yDomain1: number): boolean;
|
|
7
|
+
declare function getAbbreviation(link: Link): string;
|
|
8
8
|
declare function buildNewLink1D(link: any): Link;
|
|
9
|
-
declare function buildNewLink2D(link:
|
|
10
|
-
declare function cloneCorrelationAndEditLink(correlation:
|
|
9
|
+
declare function buildNewLink2D(link: Link, axis: 'x' | 'y'): Link;
|
|
10
|
+
declare function cloneCorrelationAndEditLink(correlation: Correlation, link: Link, axis: 'x' | 'y', action: 'add' | 'remove' | 'unmove'): Correlation;
|
|
11
11
|
declare function getEditedCorrelations({ correlationDim1, correlationDim2, selectedCorrelationValueDim1, selectedCorrelationValueDim2, action, link, correlations, }: {
|
|
12
12
|
correlationDim1: any;
|
|
13
13
|
correlationDim2: any;
|
|
@@ -17,7 +17,7 @@ declare function getEditedCorrelations({ correlationDim1, correlationDim2, selec
|
|
|
17
17
|
link: any;
|
|
18
18
|
correlations: any;
|
|
19
19
|
}): {
|
|
20
|
-
editedCorrelations:
|
|
20
|
+
editedCorrelations: Correlation[];
|
|
21
21
|
buildCorrelationDataOptions: {
|
|
22
22
|
skipDataUpdate?: boolean | undefined;
|
|
23
23
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import {
|
|
2
|
+
import { CorrelationData } from 'nmr-correlation';
|
|
3
3
|
import { SpectraAnalysis } from '../../data/data1d/MultipleAnalysis';
|
|
4
4
|
import { Molecule } from '../../data/molecules/Molecule';
|
|
5
5
|
import { Range } from '../../data/types/data1d';
|
|
@@ -159,7 +159,7 @@ export interface State {
|
|
|
159
159
|
/**
|
|
160
160
|
* Correlation data
|
|
161
161
|
*/
|
|
162
|
-
correlations:
|
|
162
|
+
correlations: CorrelationData;
|
|
163
163
|
/**
|
|
164
164
|
* Zoom Manager for vertical scale for spectra, integral, And undo zoom in per tab (nucleus)
|
|
165
165
|
* @default {history: {},spectra: {},integral: {}}
|
|
@@ -314,9 +314,6 @@ export declare const spectrumReducer: (base: {
|
|
|
314
314
|
readonly id: string;
|
|
315
315
|
readonly originalX: number;
|
|
316
316
|
readonly kind?: string | undefined;
|
|
317
|
-
readonly x: number;
|
|
318
|
-
readonly y: number;
|
|
319
|
-
readonly width: number;
|
|
320
317
|
readonly fwhm?: number | undefined;
|
|
321
318
|
readonly shape?: {
|
|
322
319
|
readonly kind: "gaussian";
|
|
@@ -330,6 +327,9 @@ export declare const spectrumReducer: (base: {
|
|
|
330
327
|
readonly fwhm?: number | undefined;
|
|
331
328
|
readonly mu?: number | undefined;
|
|
332
329
|
} | undefined;
|
|
330
|
+
readonly x: number;
|
|
331
|
+
readonly y: number;
|
|
332
|
+
readonly width: number;
|
|
333
333
|
}[];
|
|
334
334
|
readonly options: any;
|
|
335
335
|
};
|
|
@@ -379,9 +379,6 @@ export declare const spectrumReducer: (base: {
|
|
|
379
379
|
readonly integration?: number | undefined;
|
|
380
380
|
readonly peaks?: readonly {
|
|
381
381
|
readonly kind?: string | undefined;
|
|
382
|
-
readonly x: number;
|
|
383
|
-
readonly y: number;
|
|
384
|
-
readonly width: number;
|
|
385
382
|
readonly fwhm?: number | undefined;
|
|
386
383
|
readonly shape?: {
|
|
387
384
|
readonly kind: "gaussian";
|
|
@@ -395,6 +392,9 @@ export declare const spectrumReducer: (base: {
|
|
|
395
392
|
readonly fwhm?: number | undefined;
|
|
396
393
|
readonly mu?: number | undefined;
|
|
397
394
|
} | undefined;
|
|
395
|
+
readonly x: number;
|
|
396
|
+
readonly y: number;
|
|
397
|
+
readonly width: number;
|
|
398
398
|
}[] | undefined;
|
|
399
399
|
readonly statistic?: {
|
|
400
400
|
readonly mean: number;
|
|
@@ -741,9 +741,6 @@ export declare const spectrumReducer: (base: {
|
|
|
741
741
|
readonly integration?: number | undefined;
|
|
742
742
|
readonly peaks?: readonly {
|
|
743
743
|
readonly kind?: string | undefined;
|
|
744
|
-
readonly x: number;
|
|
745
|
-
readonly y: number;
|
|
746
|
-
readonly width: number;
|
|
747
744
|
readonly fwhm?: number | undefined;
|
|
748
745
|
readonly shape?: {
|
|
749
746
|
readonly kind: "gaussian";
|
|
@@ -757,6 +754,9 @@ export declare const spectrumReducer: (base: {
|
|
|
757
754
|
readonly fwhm?: number | undefined;
|
|
758
755
|
readonly mu?: number | undefined;
|
|
759
756
|
} | undefined;
|
|
757
|
+
readonly x: number;
|
|
758
|
+
readonly y: number;
|
|
759
|
+
readonly width: number;
|
|
760
760
|
}[] | undefined;
|
|
761
761
|
readonly statistic?: {
|
|
762
762
|
readonly mean: number;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { Draft } from 'immer';
|
|
2
|
-
import {
|
|
2
|
+
import { Tolerance, Options as CorrelationOptions, Correlation, Values as CorrelationValues } from 'nmr-correlation';
|
|
3
3
|
import { State } from '../Reducer';
|
|
4
4
|
declare function handleUpdateCorrelations(draft: Draft<State>): void;
|
|
5
5
|
declare function handleSetMF(draft: Draft<State>, payload: {
|
|
6
6
|
mf: string;
|
|
7
7
|
}): void;
|
|
8
8
|
declare function handleSetTolerance(draft: Draft<State>, payload: {
|
|
9
|
-
tolerance:
|
|
9
|
+
tolerance: Tolerance;
|
|
10
10
|
}): void;
|
|
11
11
|
declare function handleSetCorrelation(draft: Draft<State>, payload: {
|
|
12
12
|
id: string;
|
|
13
|
-
correlation:
|
|
14
|
-
options:
|
|
13
|
+
correlation: Correlation;
|
|
14
|
+
options: CorrelationOptions;
|
|
15
15
|
}): void;
|
|
16
16
|
declare function handleSetCorrelations(draft: Draft<State>, payload: {
|
|
17
|
-
correlations:
|
|
18
|
-
options:
|
|
17
|
+
correlations: CorrelationValues;
|
|
18
|
+
options: CorrelationOptions;
|
|
19
19
|
}): void;
|
|
20
20
|
declare function handleDeleteCorrelation(draft: Draft<State>, payload: {
|
|
21
|
-
correlation:
|
|
21
|
+
correlation: Correlation;
|
|
22
22
|
assignmentData: any;
|
|
23
23
|
}): void;
|
|
24
24
|
export { handleDeleteCorrelation, handleSetCorrelation, handleSetCorrelations, handleSetMF, handleSetTolerance, handleUpdateCorrelations, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { original } from 'immer';
|
|
2
2
|
import lodashCloneDeep from 'lodash/cloneDeep';
|
|
3
|
-
import { buildCorrelationData, setCorrelation } from 'nmr-correlation';
|
|
3
|
+
import { buildCorrelationData, setCorrelation, } from 'nmr-correlation';
|
|
4
4
|
import { findRange, findSignal1D, findSignal2D, findSpectrum, findZone, } from '../../../data/utilities/FindUtilities';
|
|
5
5
|
import { handleDeleteSignal as handleDeleteSignal1D } from './RangesActions';
|
|
6
6
|
import { handleDeleteSignal as handleDeleteSignal2D } from './ZonesActions';
|
package/lib/versionInfo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default { version: 'v0.20.
|
|
1
|
+
export default { version: 'v0.20.2' };
|
|
@@ -20,6 +20,7 @@ const styles = (styles) => (0, react_1.css) `
|
|
|
20
20
|
|
|
21
21
|
${styles}
|
|
22
22
|
`;
|
|
23
|
+
/* eslint-enable react/no-unused-prop-types */
|
|
23
24
|
function InternalTab({ tabid, tablabel, isActive, onClick = () => null, canDelete, onDelete = () => null, tabstyles, render, }) {
|
|
24
25
|
let className = 'tab-list-item';
|
|
25
26
|
// use tab identifier if given (higher priority)
|
|
@@ -204,7 +204,7 @@ function DropZone(props) {
|
|
|
204
204
|
const open = (0, react_2.useCallback)(() => {
|
|
205
205
|
openImportDialog();
|
|
206
206
|
}, [openImportDialog]);
|
|
207
|
-
return ((0, jsx_runtime_1.jsx)(LoaderContext_1.LoaderProvider, { value: open, children: (0, jsx_runtime_1.jsxs)("div", { ...getRootProps(), role: "none", css: containerStyle, children: [(0, jsx_runtime_1.jsx)("input", { ...getInputProps() }, void 0), isDragActive && ((0, jsx_runtime_1.jsxs)("div", { css: style, style: {
|
|
207
|
+
return ((0, jsx_runtime_1.jsx)(LoaderContext_1.LoaderProvider, { value: open, children: (0, jsx_runtime_1.jsxs)("div", { ...getRootProps(), role: "none", css: containerStyle, children: [(0, jsx_runtime_1.jsx)("input", { "data-test-id": "dropzone-input", ...getInputProps() }, void 0), isDragActive && ((0, jsx_runtime_1.jsxs)("div", { css: style, style: {
|
|
208
208
|
width: `${width}px`,
|
|
209
209
|
height: `${height}px`,
|
|
210
210
|
marginTop: '30px',
|
package/lib-cjs/versionInfo.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nmrium",
|
|
3
3
|
"description": "React component to display and process nuclear magnetic resonance (NMR) spectra.",
|
|
4
|
-
"version": "0.20.
|
|
4
|
+
"version": "0.20.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib-cjs/component/NMRium.js",
|
|
7
7
|
"module": "lib/component/NMRium.js",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"react-dom": ">=16.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@emotion/react": "^11.
|
|
49
|
-
"analysis-ui-components": "^0.10.
|
|
48
|
+
"@emotion/react": "^11.8.1",
|
|
49
|
+
"analysis-ui-components": "^0.10.3",
|
|
50
50
|
"cheminfo-font": "^1.8.1",
|
|
51
|
-
"cheminfo-types": "^
|
|
51
|
+
"cheminfo-types": "^1.1.0",
|
|
52
52
|
"d3": "^7.3.0",
|
|
53
53
|
"eventemitter3": "^4.0.7",
|
|
54
54
|
"file-saver": "^2.0.5",
|
|
@@ -64,22 +64,22 @@
|
|
|
64
64
|
"ml-array-xy-equally-spaced": "^1.2.1",
|
|
65
65
|
"ml-baseline-correction-regression": "^1.0.0",
|
|
66
66
|
"ml-conrec": "^3.2.1",
|
|
67
|
-
"ml-gsd": "^
|
|
68
|
-
"ml-spectra-processing": "^
|
|
67
|
+
"ml-gsd": "^10.1.2",
|
|
68
|
+
"ml-spectra-processing": "^11.0.0",
|
|
69
69
|
"ml-stat": "^1.3.3",
|
|
70
70
|
"multiplet-analysis": "^2.0.0",
|
|
71
|
-
"nmr-correlation": "^2.2.
|
|
72
|
-
"nmr-parser": "^1.7.
|
|
73
|
-
"nmr-processing": "^
|
|
71
|
+
"nmr-correlation": "^2.2.5",
|
|
72
|
+
"nmr-parser": "^1.7.3",
|
|
73
|
+
"nmr-processing": "^7.0.1",
|
|
74
74
|
"nmredata": "^0.6.1",
|
|
75
75
|
"numeral": "^2.0.6",
|
|
76
76
|
"openchemlib": "^7.4.3",
|
|
77
77
|
"openchemlib-utils": "^1.9.0",
|
|
78
|
-
"re-resizable": "^6.9.
|
|
78
|
+
"re-resizable": "^6.9.2",
|
|
79
79
|
"react-color": "2.17.2",
|
|
80
80
|
"react-d3-utils": "^0.5.0",
|
|
81
81
|
"react-draggable": "^4.4.4",
|
|
82
|
-
"react-dropzone": "^
|
|
82
|
+
"react-dropzone": "^12.0.4",
|
|
83
83
|
"react-error-boundary": "^3.1.4",
|
|
84
84
|
"react-icons": "^4.3.1",
|
|
85
85
|
"react-inspector": "^5.1.1",
|
|
@@ -99,18 +99,18 @@
|
|
|
99
99
|
"@babel/plugin-transform-modules-commonjs": "^7.16.8",
|
|
100
100
|
"@babel/preset-react": "^7.16.7",
|
|
101
101
|
"@babel/preset-typescript": "^7.16.7",
|
|
102
|
-
"@playwright/test": "^1.19.
|
|
102
|
+
"@playwright/test": "^1.19.2",
|
|
103
103
|
"@simbathesailor/use-what-changed": "^2.0.0",
|
|
104
104
|
"@types/d3": "^7.1.0",
|
|
105
|
-
"@types/jest": "^27.4.
|
|
106
|
-
"@types/node": "^17.0.
|
|
105
|
+
"@types/jest": "^27.4.1",
|
|
106
|
+
"@types/node": "^17.0.21",
|
|
107
107
|
"@types/react": "^17.0.39",
|
|
108
108
|
"@types/react-dom": "^17.0.11",
|
|
109
109
|
"@types/react-router-dom": "^5.3.3",
|
|
110
110
|
"@vitejs/plugin-react": "^1.2.0",
|
|
111
111
|
"@zakodium/eslint-config": "^5.1.0",
|
|
112
112
|
"cross-env": "^7.0.3",
|
|
113
|
-
"eslint": "^8.
|
|
113
|
+
"eslint": "^8.10.0",
|
|
114
114
|
"jest": "^27.5.1",
|
|
115
115
|
"modern-normalize": "^1.1.0",
|
|
116
116
|
"prettier": "^2.5.1",
|
|
@@ -118,7 +118,6 @@
|
|
|
118
118
|
"react": "^17.0.2",
|
|
119
119
|
"react-dom": "^17.0.2",
|
|
120
120
|
"react-router-dom": "^5.3.0",
|
|
121
|
-
"reactstrap": "^8.10.1",
|
|
122
121
|
"rimraf": "^3.0.2",
|
|
123
122
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
124
123
|
"serve": "^13.0.2",
|