nmrium 0.48.0 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/lib/component/1d/Chart1D.js +1 -1
  2. package/lib/component/1d/SpectraLegends.js +1 -1
  3. package/lib/component/1d/Viewer1D.js +144 -124
  4. package/lib/component/1d/jCouplingGraph/JsCoupling.js +1 -1
  5. package/lib/component/1d/ranges/Atoms.d.ts +7 -0
  6. package/lib/component/1d/ranges/Atoms.js +43 -0
  7. package/lib/component/1d/ranges/Range.js +4 -2
  8. package/lib/component/1d/tool/BaseLine.d.ts +2 -0
  9. package/lib/component/1d/tool/BaseLine.js +26 -0
  10. package/lib/component/1d/tool/BaseLineZones.js +18 -3
  11. package/lib/component/2d/Chart2D.js +6 -4
  12. package/lib/component/2d/Viewer2D.js +35 -26
  13. package/lib/component/context/KeyModifierContext.d.ts +13 -2
  14. package/lib/component/context/KeyModifierContext.js +35 -4
  15. package/lib/component/context/LoggerContext.d.ts +9 -0
  16. package/lib/component/context/LoggerContext.js +21 -7
  17. package/lib/component/context/PreferencesContext.d.ts +1 -108
  18. package/lib/component/context/TopicMoleculeContext.d.ts +8 -0
  19. package/lib/component/context/TopicMoleculeContext.js +30 -0
  20. package/lib/component/elements/Input.js +4 -1
  21. package/lib/component/elements/ResizerWithScale.js +19 -2
  22. package/lib/component/elements/SVGGroup.js +2 -2
  23. package/lib/component/elements/formik/FormikTextarea.js +8 -9
  24. package/lib/component/elements/linearAxis/LinearVerticalAxis.js +1 -1
  25. package/lib/component/elements/resizer/SVGResizer.js +1 -1
  26. package/lib/component/header/BaseLineCorrectionPanel.js +3 -2
  27. package/lib/component/header/Header.js +2 -2
  28. package/lib/component/hooks/useCheckToolsVisibility.js +1 -1
  29. package/lib/component/hooks/useToolsFunctions.js +4 -2
  30. package/lib/component/main/InnerNMRium.js +2 -1
  31. package/lib/component/modal/ExportAsJcampModal.js +1 -1
  32. package/lib/component/modal/ImportPublicationStringModal.d.ts +2 -1
  33. package/lib/component/modal/ImportPublicationStringModal.js +76 -32
  34. package/lib/component/modal/setting/settings-tabs/GeneralTabContent.js +9 -11
  35. package/lib/component/panels/RangesPanel/RangesTable.js +1 -1
  36. package/lib/component/panels/SpectrumsPanel/SpectraPreferences.js +39 -5
  37. package/lib/component/panels/SpectrumsPanel/SpectraTable.js +3 -3
  38. package/lib/component/panels/SpectrumsPanel/SpectrumListPanel.js +4 -2
  39. package/lib/component/panels/SpectrumsPanel/base/SpectraColumnsManager.js +19 -16
  40. package/lib/component/reducer/Reducer.js +2 -0
  41. package/lib/component/reducer/actions/FiltersActions.d.ts +3 -4
  42. package/lib/component/reducer/actions/FiltersActions.js +92 -55
  43. package/lib/component/reducer/actions/LoadActions.js +10 -8
  44. package/lib/component/reducer/actions/SpectrumsActions.d.ts +8 -1
  45. package/lib/component/reducer/actions/SpectrumsActions.js +3 -3
  46. package/lib/component/reducer/actions/ToolsActions.d.ts +8 -5
  47. package/lib/component/reducer/actions/ToolsActions.js +51 -44
  48. package/lib/component/toolbar/BasicToolBar.js +11 -29
  49. package/lib/component/utility/export.js +3 -0
  50. package/lib/component/workspaces/exercise.js +1 -0
  51. package/lib/component/workspaces/prediction.js +1 -16
  52. package/lib/component/workspaces/simulation.js +1 -2
  53. package/lib/component/workspaces/workspaceDefaultProperties.js +4 -3
  54. package/lib/data/data1d/Spectrum1D/index.d.ts +0 -1
  55. package/lib/data/data1d/Spectrum1D/index.js +0 -1
  56. package/lib/versionInfo.js +1 -1
  57. package/package.json +18 -17
  58. package/lib/data/data1d/Spectrum1D/generateSpectrumFromPublicationString.d.ts +0 -2
  59. package/lib/data/data1d/Spectrum1D/generateSpectrumFromPublicationString.js +0 -6
@@ -7,6 +7,7 @@ export const prediction = {
7
7
  verticalSplitterCloseThreshold: 600,
8
8
  spectraRendering: 'auto',
9
9
  loggingLevel: 'info',
10
+ popupLoggingLevel: 'error',
10
11
  invert: false,
11
12
  },
12
13
  display: {
@@ -59,9 +60,7 @@ export const prediction = {
59
60
  visible: true,
60
61
  },
61
62
  {
62
- name: 'name',
63
63
  label: 'Spectrum Name',
64
- description: 'Spectrum Name',
65
64
  jpath: ['info', 'name'],
66
65
  visible: true,
67
66
  },
@@ -72,9 +71,7 @@ export const prediction = {
72
71
  visible: true,
73
72
  },
74
73
  {
75
- name: 'solvent',
76
74
  label: 'Solvent',
77
- description: 'Solvent',
78
75
  jpath: ['info', 'solvent'],
79
76
  visible: false,
80
77
  },
@@ -105,9 +102,7 @@ export const prediction = {
105
102
  visible: true,
106
103
  },
107
104
  {
108
- name: 'name',
109
105
  label: 'Spectrum Name',
110
- description: 'Spectrum Name',
111
106
  jpath: ['info', 'name'],
112
107
  visible: true,
113
108
  },
@@ -118,9 +113,7 @@ export const prediction = {
118
113
  visible: true,
119
114
  },
120
115
  {
121
- name: 'solvent',
122
116
  label: 'Solvent',
123
- description: 'Solvent',
124
117
  jpath: ['info', 'solvent'],
125
118
  visible: false,
126
119
  },
@@ -151,9 +144,7 @@ export const prediction = {
151
144
  visible: true,
152
145
  },
153
146
  {
154
- name: 'name',
155
147
  label: 'Spectrum Name',
156
- description: 'Spectrum Name',
157
148
  jpath: ['info', 'name'],
158
149
  visible: true,
159
150
  },
@@ -164,9 +155,7 @@ export const prediction = {
164
155
  visible: true,
165
156
  },
166
157
  {
167
- name: 'solvent',
168
158
  label: 'Solvent',
169
- description: 'Solvent',
170
159
  jpath: ['info', 'solvent'],
171
160
  visible: false,
172
161
  },
@@ -197,9 +186,7 @@ export const prediction = {
197
186
  visible: true,
198
187
  },
199
188
  {
200
- name: 'name',
201
189
  label: 'Spectrum Name',
202
- description: 'Spectrum Name',
203
190
  jpath: ['info', 'name'],
204
191
  visible: true,
205
192
  },
@@ -210,9 +197,7 @@ export const prediction = {
210
197
  visible: true,
211
198
  },
212
199
  {
213
- name: 'solvent',
214
200
  label: 'Solvent',
215
- description: 'Solvent',
216
201
  jpath: ['info', 'solvent'],
217
202
  visible: false,
218
203
  },
@@ -7,6 +7,7 @@ export const simulation = {
7
7
  verticalSplitterCloseThreshold: 600,
8
8
  spectraRendering: 'auto',
9
9
  loggingLevel: 'info',
10
+ popupLoggingLevel: 'error',
10
11
  invert: false,
11
12
  },
12
13
  display: {
@@ -42,9 +43,7 @@ export const simulation = {
42
43
  visible: true,
43
44
  },
44
45
  {
45
- name: 'name',
46
46
  label: 'Spectrum Name',
47
- description: 'Spectrum Name',
48
47
  jpath: ['info', 'name'],
49
48
  visible: true,
50
49
  },
@@ -57,6 +57,7 @@ export const workspaceDefaultProperties = {
57
57
  verticalSplitterCloseThreshold: 600,
58
58
  spectraRendering: 'auto',
59
59
  loggingLevel: 'info',
60
+ popupLoggingLevel: 'error',
60
61
  invert: false,
61
62
  },
62
63
  formatting: {
@@ -95,15 +96,15 @@ export const workspaceDefaultProperties = {
95
96
  infoBlock: {
96
97
  visible: false,
97
98
  fields: [
98
- { label: 'name', jpath: ['info', 'name'], visible: true, format: '' },
99
+ { label: 'Name', jpath: ['info', 'name'], visible: true, format: '' },
99
100
  {
100
- label: 'Number Of Scan',
101
+ label: 'Number of scans',
101
102
  jpath: ['info', 'numberOfScans'],
102
103
  visible: true,
103
104
  format: '0',
104
105
  },
105
106
  {
106
- label: 'Pulse Sequence',
107
+ label: 'Pulse sequence',
107
108
  jpath: ['info', 'pulseSequence'],
108
109
  visible: true,
109
110
  format: '',
@@ -1,4 +1,3 @@
1
- export { generateSpectrumFromPublicationString } from './generateSpectrumFromPublicationString';
2
1
  export { get1DDataXY } from './get1DDataXY';
3
2
  export { getReferenceShift } from './getReferenceShift';
4
3
  export { initiateDatum1D } from './initiateDatum1D';
@@ -1,4 +1,3 @@
1
- export { generateSpectrumFromPublicationString } from './generateSpectrumFromPublicationString';
2
1
  export { get1DDataXY } from './get1DDataXY';
3
2
  export { getReferenceShift } from './getReferenceShift';
4
3
  export { initiateDatum1D } from './initiateDatum1D';
@@ -1 +1 @@
1
- export default { version: 'v0.48.0' };
1
+ export default { version: 'v0.49.0' };
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.48.0",
4
+ "version": "0.49.0",
5
5
  "license": "MIT",
6
6
  "module": "lib/component/main/index.js",
7
7
  "types": "lib/component/main/index.d.ts",
@@ -23,6 +23,7 @@
23
23
  "eslint": "eslint . --cache",
24
24
  "eslint-fix": "npm run eslint -- --fix",
25
25
  "install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && npm install && npm start",
26
+ "playwright": "playwright test --ui",
26
27
  "prepack": "npm run clean-lib && npm run compile",
27
28
  "prepublishOnly": "npm run set-version-npm",
28
29
  "prettier": "prettier --check src test-e2e",
@@ -56,8 +57,8 @@
56
57
  "react-dom": ">=18.0.0"
57
58
  },
58
59
  "dependencies": {
59
- "@blueprintjs/core": "^5.8.2",
60
- "@blueprintjs/icons": "^5.7.0",
60
+ "@blueprintjs/core": "^5.9.1",
61
+ "@blueprintjs/icons": "^5.7.1",
61
62
  "@emotion/react": "^11.11.3",
62
63
  "@emotion/styled": "^11.11.0",
63
64
  "@lukeed/uuid": "^2.0.1",
@@ -82,16 +83,16 @@
82
83
  "ml-conrec": "^5.0.2",
83
84
  "ml-gsd": "^12.1.3",
84
85
  "ml-matrix": "^6.11.0",
85
- "ml-spectra-processing": "^12.8.0",
86
+ "ml-spectra-processing": "^12.10.1",
86
87
  "ml-stat": "^1.3.3",
87
88
  "multiplet-analysis": "^2.1.2",
88
89
  "nmr-correlation": "^2.3.3",
89
- "nmr-load-save": "^0.24.0",
90
- "nmr-processing": "^11.7.0",
90
+ "nmr-load-save": "^0.26.0",
91
+ "nmr-processing": "^11.10.0",
91
92
  "nmredata": "^0.9.9",
92
93
  "numeral": "^2.0.6",
93
- "openchemlib": "^8.7.2",
94
- "openchemlib-utils": "^5.6.1",
94
+ "openchemlib": "^8.8.1",
95
+ "openchemlib-utils": "^5.8.0",
95
96
  "papaparse": "^5.4.1",
96
97
  "re-resizable": "6.9.11",
97
98
  "react-d3-utils": "^1.0.0",
@@ -116,17 +117,17 @@
116
117
  "@babel/plugin-transform-modules-commonjs": "^7.23.3",
117
118
  "@babel/preset-react": "^7.23.3",
118
119
  "@babel/preset-typescript": "^7.23.3",
119
- "@playwright/test": "^1.41.1",
120
+ "@playwright/test": "^1.41.2",
120
121
  "@simbathesailor/use-what-changed": "^2.0.0",
121
122
  "@types/d3": "^7.4.3",
122
123
  "@types/lodash": "^4.14.202",
123
- "@types/node": "^20.11.5",
124
+ "@types/node": "^20.11.16",
124
125
  "@types/papaparse": "^5.3.14",
125
- "@types/react": "^18.2.48",
126
+ "@types/react": "^18.2.51",
126
127
  "@types/react-dom": "^18.2.18",
127
128
  "@types/react-table": "^7.7.19",
128
- "@vitejs/plugin-react-swc": "^3.5.0",
129
- "@vitest/coverage-v8": "^1.2.1",
129
+ "@vitejs/plugin-react-swc": "^3.6.0",
130
+ "@vitest/coverage-v8": "^1.2.2",
130
131
  "cross-env": "^7.0.3",
131
132
  "cspell": "^8.3.2",
132
133
  "eslint": "^8.56.0",
@@ -138,14 +139,14 @@
138
139
  "rc-menu": "^9.12.4",
139
140
  "react": "^18.2.0",
140
141
  "react-dom": "^18.2.0",
141
- "react-router-dom": "^6.21.3",
142
+ "react-router-dom": "^6.22.0",
142
143
  "rimraf": "^5.0.5",
143
144
  "rollup-plugin-analyzer": "^4.0.0",
144
145
  "serve": "^14.2.1",
145
- "stylelint": "^16.2.0",
146
+ "stylelint": "^16.2.1",
146
147
  "stylelint-config-standard": "^36.0.0",
147
148
  "typescript": "^5.3.3",
148
149
  "vite": "^5.0.12",
149
- "vitest": "^1.2.1"
150
+ "vitest": "^1.2.2"
150
151
  }
151
- }
152
+ }
@@ -1,2 +0,0 @@
1
- import { UsedColors } from '../../../types/UsedColors';
2
- export declare function generateSpectrumFromPublicationString(publicationString: string, usedColors: UsedColors): import("nmr-load-save").Spectrum1D | undefined;
@@ -1,6 +0,0 @@
1
- import { resurrect } from 'nmr-processing';
2
- import { generateSpectrumFromRanges } from './ranges/generateSpectrumFromRanges';
3
- export function generateSpectrumFromPublicationString(publicationString, usedColors) {
4
- const { ranges, experiment: { nucleus, solvent }, parts, } = resurrect(publicationString);
5
- return generateSpectrumFromRanges(ranges, { nucleus, solvent, name: parts[0] }, usedColors);
6
- }