nmrium 0.31.0 → 0.32.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 (80) hide show
  1. package/lib/component/1d/FooterBanner.js +17 -10
  2. package/lib/component/2d/Contours.js +1 -1
  3. package/lib/component/2d/Left1DChart.js +1 -1
  4. package/lib/component/2d/Top1DChart.js +1 -1
  5. package/lib/component/EventsTrackers/BrushTracker.js +30 -21
  6. package/lib/component/SplitPaneWrapper.js +1 -1
  7. package/lib/component/elements/EditableColumn.d.ts +3 -1
  8. package/lib/component/elements/EditableColumn.js +18 -3
  9. package/lib/component/hooks/useActiveSpectrumStyleOptions.js +1 -1
  10. package/lib/component/loader/DropZone.js +9 -1
  11. package/lib/component/modal/setting/GeneralTabContent.js +1 -1
  12. package/lib/component/panels/MoleculesPanel/MoleculeHeader.js +1 -1
  13. package/lib/component/panels/PeaksPanel/PeaksTable.js +1 -1
  14. package/lib/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +3 -26
  15. package/lib/component/reducer/Reducer.d.ts +2 -47
  16. package/lib/component/reducer/Reducer.js +2 -2
  17. package/lib/component/reducer/actions/DomainActions.js +3 -2
  18. package/lib/component/reducer/actions/FiltersActions.js +12 -3
  19. package/lib/component/reducer/actions/IntegralsActions.js +6 -5
  20. package/lib/component/reducer/actions/PeaksActions.js +7 -6
  21. package/lib/component/reducer/actions/PreferencesActions.js +2 -1
  22. package/lib/component/reducer/actions/RangesActions.d.ts +1 -1
  23. package/lib/component/reducer/actions/RangesActions.js +14 -12
  24. package/lib/component/reducer/actions/SpectrumsActions.js +3 -2
  25. package/lib/component/reducer/actions/ToolsActions.d.ts +1 -1
  26. package/lib/component/reducer/actions/ToolsActions.js +9 -7
  27. package/lib/component/reducer/actions/ZonesActions.js +9 -8
  28. package/lib/component/reducer/helper/getActiveSpectrum.d.ts +3 -0
  29. package/lib/component/reducer/helper/getActiveSpectrum.js +4 -0
  30. package/lib/component/reducer/preferences/preferencesReducer.d.ts +2 -2
  31. package/lib/component/toolbar/BasicToolBar.js +8 -7
  32. package/lib/component/utility/Export.js +7 -1
  33. package/lib/component/workspaces/Workspace.d.ts +1 -1
  34. package/lib/component/workspaces/exercise.js +4 -4
  35. package/lib/component/workspaces/workspaceDefaultProperties.js +1 -1
  36. package/lib/data/Filters.d.ts +1 -2
  37. package/lib/data/Filters.js +1 -2
  38. package/lib/data/data1d/filter1d/phaseCorrection.js +11 -5
  39. package/lib/data/data2d/Processing2D.js +3 -2
  40. package/lib/data/utilities/calculateSanPlot.d.ts +8 -0
  41. package/lib/data/utilities/calculateSanPlot.js +31 -0
  42. package/lib/types/NMRiumGeneralPreferences.d.ts +2 -2
  43. package/lib/versionInfo.js +1 -1
  44. package/lib-cjs/component/1d/FooterBanner.js +16 -9
  45. package/lib-cjs/component/2d/Contours.js +1 -1
  46. package/lib-cjs/component/2d/Left1DChart.js +1 -1
  47. package/lib-cjs/component/2d/Top1DChart.js +1 -1
  48. package/lib-cjs/component/EventsTrackers/BrushTracker.js +30 -21
  49. package/lib-cjs/component/SplitPaneWrapper.js +1 -1
  50. package/lib-cjs/component/elements/EditableColumn.js +18 -3
  51. package/lib-cjs/component/hooks/useActiveSpectrumStyleOptions.js +1 -1
  52. package/lib-cjs/component/loader/DropZone.js +9 -1
  53. package/lib-cjs/component/modal/setting/GeneralTabContent.js +1 -1
  54. package/lib-cjs/component/panels/MoleculesPanel/MoleculeHeader.js +1 -1
  55. package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +1 -1
  56. package/lib-cjs/component/panels/SpectrumsPanel/base/setting/processSnapPlot.js +2 -25
  57. package/lib-cjs/component/reducer/Reducer.js +2 -2
  58. package/lib-cjs/component/reducer/actions/DomainActions.js +3 -2
  59. package/lib-cjs/component/reducer/actions/FiltersActions.js +12 -3
  60. package/lib-cjs/component/reducer/actions/IntegralsActions.js +6 -5
  61. package/lib-cjs/component/reducer/actions/PeaksActions.js +7 -6
  62. package/lib-cjs/component/reducer/actions/PreferencesActions.js +2 -1
  63. package/lib-cjs/component/reducer/actions/RangesActions.js +14 -12
  64. package/lib-cjs/component/reducer/actions/SpectrumsActions.js +3 -2
  65. package/lib-cjs/component/reducer/actions/ToolsActions.js +9 -7
  66. package/lib-cjs/component/reducer/actions/ZonesActions.js +9 -8
  67. package/lib-cjs/component/reducer/helper/getActiveSpectrum.js +8 -0
  68. package/lib-cjs/component/toolbar/BasicToolBar.js +7 -6
  69. package/lib-cjs/component/utility/Export.js +7 -1
  70. package/lib-cjs/component/workspaces/exercise.js +4 -4
  71. package/lib-cjs/component/workspaces/workspaceDefaultProperties.js +1 -1
  72. package/lib-cjs/data/Filters.js +1 -3
  73. package/lib-cjs/data/data1d/filter1d/phaseCorrection.js +10 -4
  74. package/lib-cjs/data/data2d/Processing2D.js +3 -2
  75. package/lib-cjs/data/utilities/calculateSanPlot.js +35 -0
  76. package/lib-cjs/versionInfo.js +1 -1
  77. package/package.json +18 -17
  78. package/lib/data/data1d/filter1d/absolute.d.ts +0 -13
  79. package/lib/data/data1d/filter1d/absolute.js +0 -26
  80. package/lib-cjs/data/data1d/filter1d/absolute.js +0 -32
@@ -37,6 +37,7 @@ const Spectrum2D_1 = require("../../../data/data2d/Spectrum2D");
37
37
  const ZoneUtilities_1 = require("../../../data/utilities/ZoneUtilities");
38
38
  const Reducer_1 = require("../Reducer");
39
39
  const get2DRange_1 = __importDefault(require("../helper/get2DRange"));
40
+ const getActiveSpectrum_1 = require("../helper/getActiveSpectrum");
40
41
  const CorrelationsActions_1 = require("./CorrelationsActions");
41
42
  const DomainActions_1 = require("./DomainActions");
42
43
  function changeZonesFactorHandler(draft, action) {
@@ -44,7 +45,7 @@ function changeZonesFactorHandler(draft, action) {
44
45
  }
45
46
  exports.changeZonesFactorHandler = changeZonesFactorHandler;
46
47
  function add2dZoneHandler(draft, action) {
47
- const activeSpectrum = draft.view.spectra.activeSpectra[draft.view.spectra.activeTab];
48
+ const activeSpectrum = (0, getActiveSpectrum_1.getActiveSpectrum)(draft);
48
49
  if (activeSpectrum?.id) {
49
50
  const { index } = activeSpectrum;
50
51
  const drawnZone = (0, get2DRange_1.default)(draft, action);
@@ -60,7 +61,7 @@ function add2dZoneHandler(draft, action) {
60
61
  }
61
62
  exports.add2dZoneHandler = add2dZoneHandler;
62
63
  function handleAutoZonesDetection(draft, detectionOptions) {
63
- const activeSpectrum = draft.view.spectra.activeSpectra[draft.view.spectra.activeTab];
64
+ const activeSpectrum = (0, getActiveSpectrum_1.getActiveSpectrum)(draft);
64
65
  if (activeSpectrum?.id) {
65
66
  const { index } = activeSpectrum;
66
67
  const [fromX, toX] = draft.xDomain;
@@ -90,7 +91,7 @@ function handleAutoSpectraZonesDetection(draft) {
90
91
  exports.handleAutoSpectraZonesDetection = handleAutoSpectraZonesDetection;
91
92
  function changeZoneSignalDelta(draft, action) {
92
93
  const { zoneID, signal } = action.payload;
93
- const activeSpectrum = draft.view.spectra.activeSpectra[draft.view.spectra.activeTab];
94
+ const activeSpectrum = (0, getActiveSpectrum_1.getActiveSpectrum)(draft);
94
95
  if (activeSpectrum?.id) {
95
96
  const { index } = activeSpectrum;
96
97
  const { xShift, yShift } = (0, Spectrum2D_1.changeZoneSignal)(draft.data[index], zoneID, signal);
@@ -113,7 +114,7 @@ function getZoneIndex(state, spectrumIndex, zoneID) {
113
114
  }
114
115
  function handleChangeZoneSignalKind(draft, action) {
115
116
  const state = (0, immer_1.original)(draft);
116
- const activeSpectrum = state.view.spectra.activeSpectra[state.view.spectra.activeTab];
117
+ const activeSpectrum = (0, getActiveSpectrum_1.getActiveSpectrum)(state);
117
118
  if (activeSpectrum?.id) {
118
119
  const { index } = activeSpectrum;
119
120
  const { rowData, value } = action.payload;
@@ -129,7 +130,7 @@ function handleChangeZoneSignalKind(draft, action) {
129
130
  exports.handleChangeZoneSignalKind = handleChangeZoneSignalKind;
130
131
  function handleDeleteZone(draft, action) {
131
132
  const state = (0, immer_1.original)(draft);
132
- const activeSpectrum = state.view.spectra.activeSpectra[state.view.spectra.activeTab];
133
+ const activeSpectrum = (0, getActiveSpectrum_1.getActiveSpectrum)(state);
133
134
  if (activeSpectrum?.id) {
134
135
  const { index } = activeSpectrum;
135
136
  const { id, assignmentData } = action.payload;
@@ -187,7 +188,7 @@ function handleSetSignalPathLength(draft, action) {
187
188
  exports.handleSetSignalPathLength = handleSetSignalPathLength;
188
189
  function handleUnlinkZone(draft, action) {
189
190
  const state = (0, immer_1.original)(draft);
190
- const activeSpectrum = state.view.spectra.activeSpectra[state.view.spectra.activeTab];
191
+ const activeSpectrum = (0, getActiveSpectrum_1.getActiveSpectrum)(state);
191
192
  if (activeSpectrum?.id) {
192
193
  const { index } = activeSpectrum;
193
194
  const { zoneData = null, assignmentData, isOnZoneLevel = undefined, signalIndex = -1, axis = undefined, } = action.payload;
@@ -211,7 +212,7 @@ function handleUnlinkZone(draft, action) {
211
212
  exports.handleUnlinkZone = handleUnlinkZone;
212
213
  function handleSetDiaIDZone(draft, action) {
213
214
  const state = (0, immer_1.original)(draft);
214
- const activeSpectrum = state.view.spectra.activeSpectra[state.view.spectra.activeTab];
215
+ const activeSpectrum = (0, getActiveSpectrum_1.getActiveSpectrum)(state);
215
216
  if (activeSpectrum?.id) {
216
217
  const { index } = activeSpectrum;
217
218
  const { zoneData, diaIDs, axis, signalIndex, nbAtoms } = action.payload;
@@ -231,7 +232,7 @@ function handleSetDiaIDZone(draft, action) {
231
232
  exports.handleSetDiaIDZone = handleSetDiaIDZone;
232
233
  function handleSaveEditedZone(draft, action) {
233
234
  const state = (0, immer_1.original)(draft);
234
- const activeSpectrum = state.view.spectra.activeSpectra[state.view.spectra.activeTab];
235
+ const activeSpectrum = (0, getActiveSpectrum_1.getActiveSpectrum)(state);
235
236
  if (activeSpectrum?.id) {
236
237
  const { index } = activeSpectrum;
237
238
  const { editedRowData } = action.payload;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getActiveSpectrum = void 0;
4
+ function getActiveSpectrum(state) {
5
+ const { activeSpectra, activeTab } = state.view.spectra;
6
+ return activeSpectra[activeTab] || null;
7
+ }
8
+ exports.getActiveSpectrum = getActiveSpectrum;
@@ -79,11 +79,12 @@ function BasicToolBarInner({ info, verticalAlign, ftCounter, fidCounter, activeS
79
79
  const openLoader = (0, LoaderContext_1.useLoader)();
80
80
  const isExperimentalFeature = (0, useCheckExperimentalFeature_1.default)();
81
81
  const isButtonVisible = (0, useCheckToolsVisibility_1.useCheckToolsVisibility)();
82
- const importMenu = (0, react_1.useMemo)(() => {
83
- return isExperimentalFeature
84
- ? IMPORT_MENU
85
- : IMPORT_MENU.filter((item) => item.id !== 'importPublicationString');
86
- }, [isExperimentalFeature]);
82
+ const importMenu = isExperimentalFeature
83
+ ? IMPORT_MENU
84
+ : IMPORT_MENU.filter((item) => item.id !== 'importPublicationString');
85
+ const exportMenu = isExperimentalFeature
86
+ ? EXPORT_MENU
87
+ : EXPORT_MENU.filter((item) => item.id !== 'nmre');
87
88
  const { isRealSpectrumShown, changeSpectrumViewHandler, changeDisplayViewModeHandler, alignSpectrumsVerticallyHandler, } = (0, useToolsFunctions_1.default)();
88
89
  const { saveAsSVGHandler, saveAsPNGHandler, saveAsJSONHandler, saveToClipboardHandler, saveAsHandler, } = (0, useExport_1.default)();
89
90
  const LoadJacmpHandler = (0, react_1.useCallback)((file) => {
@@ -152,7 +153,7 @@ function BasicToolBarInner({ info, verticalAlign, ftCounter, fidCounter, activeS
152
153
  }, items: importMenu })), isButtonVisible('exportAs') && ((0, jsx_runtime_1.jsx)(ToolbarMenu_1.default, { component: (0, jsx_runtime_1.jsx)(fa_1.FaFileExport, {}), toolTip: "Export As", onClick: (element) => {
153
154
  exportHandler(element);
154
155
  return null;
155
- }, items: EXPORT_MENU })), isButtonVisible('spectraStackAlignments') &&
156
+ }, items: exportMenu })), isButtonVisible('spectraStackAlignments') &&
156
157
  ftCounter > 1 &&
157
158
  (info?.isFt || !activeSpectrum) && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "spectra-alignment", className: "cheminfo", title: "Spectra alignment ( Press s )", onClick: changeDisplayViewModeHandler, children: verticalAlign.align === 'stack' ? ((0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrOverlay3Aligned, {})) : ((0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrOverlay3, {})) })), isButtonVisible('realImaginary') && info.isComplex && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "display", title: isRealSpectrumShown ? 'Display Real ' : 'Display Imaginary', onClick: changeSpectrumViewHandler, className: "cheminfo", children: (0, jsx_runtime_1.jsx)(cheminfo_font_1.SvgNmrRealImag, {}) })), isButtonVisible('spectraCenterAlignments') &&
158
159
  (ftCounter > 0 || fidCounter > 0) && ((0, jsx_runtime_1.jsx)(analysis_ui_components_1.Toolbar.Item, { id: "baseline-position", title: verticalAlign.align === 'bottom'
@@ -50,7 +50,13 @@ async function copyHTMLToClipboard(data) {
50
50
  exports.copyHTMLToClipboard = copyHTMLToClipboard;
51
51
  async function copyTextToClipboard(data) {
52
52
  try {
53
- await navigator.clipboard.writeText(data);
53
+ void navigator.clipboard.write([
54
+ new ClipboardItem({
55
+ 'text/plain': new Promise((resolve) => {
56
+ resolve(new Blob([data], { type: 'text/plain' }));
57
+ }),
58
+ }),
59
+ ]);
54
60
  return true;
55
61
  }
56
62
  catch (err) {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.exercise = void 0;
4
4
  exports.exercise = {
5
- version: 1,
5
+ version: 2,
6
6
  label: 'Exercise',
7
7
  display: {
8
8
  general: {
@@ -13,17 +13,17 @@ exports.exercise = {
13
13
  integralsPanel: { display: true },
14
14
  },
15
15
  toolBarButtons: {
16
- peakPicking: true,
16
+ zoom: true,
17
+ zoomOut: true,
17
18
  apodization: true,
18
19
  zeroFilling: true,
19
20
  fastFourierTransform: true,
20
21
  phaseCorrection: true,
21
22
  baselineCorrection: true,
23
+ peakPicking: true,
22
24
  integral: true,
23
25
  spectraCenterAlignments: true,
24
26
  spectraStackAlignments: true,
25
- zoomOut: true,
26
- zoom: true,
27
27
  },
28
28
  },
29
29
  };
@@ -46,7 +46,7 @@ exports.workspaceDefaultProperties = {
46
46
  },
47
47
  },
48
48
  general: {
49
- dimmedSpectraTransparency: 0.1,
49
+ dimmedSpectraOpacity: 0.1,
50
50
  },
51
51
  formatting: {
52
52
  nuclei: {
@@ -23,9 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.shift2DY = exports.shift2DX = exports.exclusionZones = exports.pareto = exports.centerMean = exports.standardDeviation = exports.equallySpaced = exports.fromTo = exports.digitalFilter = exports.zeroFilling = exports.shiftX = exports.autoPhaseCorrection = exports.phaseCorrection = exports.fft = exports.apodization = exports.baselineCorrection = exports.absolute = void 0;
27
- const absolute = __importStar(require("./data1d/filter1d/absolute"));
28
- exports.absolute = absolute;
26
+ exports.shift2DY = exports.shift2DX = exports.exclusionZones = exports.pareto = exports.centerMean = exports.standardDeviation = exports.equallySpaced = exports.fromTo = exports.digitalFilter = exports.zeroFilling = exports.shiftX = exports.autoPhaseCorrection = exports.phaseCorrection = exports.fft = exports.apodization = exports.baselineCorrection = void 0;
29
27
  const apodization = __importStar(require("./data1d/filter1d/apodization"));
30
28
  exports.apodization = apodization;
31
29
  const autoPhaseCorrection = __importStar(require("./data1d/filter1d/autoPhaseCorrection"));
@@ -15,10 +15,16 @@ function apply(datum1D, options = {}) {
15
15
  if (!isApplicable(datum1D)) {
16
16
  throw new Error('phaseCorrection not applicable on this data');
17
17
  }
18
- let { ph0, ph1 } = options;
19
- ph0 *= Math.PI / 180.0;
20
- ph1 *= Math.PI / 180.0;
21
- Object.assign(datum1D.data, (0, ml_spectra_processing_1.reimPhaseCorrection)(datum1D.data, ph0, ph1));
18
+ let { ph0, ph1, absolute } = options;
19
+ if (absolute) {
20
+ datum1D.data.re = (0, ml_spectra_processing_1.reimAbsolute)(datum1D.data);
21
+ datum1D.data.im = new Float64Array(0);
22
+ }
23
+ else {
24
+ ph0 *= Math.PI / 180.0;
25
+ ph1 *= Math.PI / 180.0;
26
+ Object.assign(datum1D.data, (0, ml_spectra_processing_1.reimPhaseCorrection)(datum1D.data, ph0, ph1));
27
+ }
22
28
  }
23
29
  exports.apply = apply;
24
30
  function isApplicable(datum1D) {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defaultContourOptions = void 0;
4
4
  const ml_conrec_1 = require("ml-conrec");
5
- const ml_spectra_processing_1 = require("ml-spectra-processing");
5
+ const calculateSanPlot_1 = require("../utilities/calculateSanPlot");
6
6
  exports.defaultContourOptions = {
7
7
  positive: {
8
8
  contourLevels: [0, 21],
@@ -25,7 +25,8 @@ class Processing2D {
25
25
  const xs = getRange(minMax.minX, minMax.maxX, minMax.z[0].length);
26
26
  const ys = getRange(minMax.minY, minMax.maxY, minMax.z.length);
27
27
  this.conrec = new ml_conrec_1.Conrec(minMax.z, { xs, ys, swapAxes: false });
28
- this.median = (0, ml_spectra_processing_1.matrixAbsoluteMedian)(minMax.z);
28
+ const sanResult = (0, calculateSanPlot_1.calculateSanPlot)('2D', minMax);
29
+ this.median = sanResult.positive;
29
30
  this.minMax = minMax;
30
31
  }
31
32
  getLevel() {
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calculateSanPlot = void 0;
4
+ const ml_spectra_processing_1 = require("ml-spectra-processing");
5
+ function calculateSanPlot(dimension, data) {
6
+ const input = dimension === '1D'
7
+ ? prepare1DData(data)
8
+ : prepare2DData(data);
9
+ return (0, ml_spectra_processing_1.xNoiseSanPlot)(input);
10
+ }
11
+ exports.calculateSanPlot = calculateSanPlot;
12
+ function prepare1DData(data) {
13
+ const length = data.re.length;
14
+ const jump = Math.floor(length / 307200) || 1;
15
+ const array = new Float64Array((length / jump) >> 0);
16
+ let index = 0;
17
+ for (let i = 0; i < array.length; i += jump) {
18
+ array[index++] = data.re[i];
19
+ }
20
+ return array;
21
+ }
22
+ function prepare2DData(data) {
23
+ let cols = data.z[0].length;
24
+ let rows = data.z.length;
25
+ let jump = Math.floor((cols * rows) / 204800) || 1;
26
+ const array = new Float64Array(((cols * rows) / jump) >> 0);
27
+ let index = 0;
28
+ // console.log('jump', jump, cols * rows);
29
+ for (let r = 0; r < rows; r += 1) {
30
+ for (let c = 0; c < cols; c += jump) {
31
+ array[index++] = data.z[r][c];
32
+ }
33
+ }
34
+ return array;
35
+ }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = { version: 'v0.31.0' };
3
+ exports.default = { version: 'v0.32.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.31.0",
4
+ "version": "0.32.0",
5
5
  "license": "MIT",
6
6
  "main": "lib-cjs/component/NMRium.js",
7
7
  "module": "lib/component/NMRium.js",
@@ -51,12 +51,13 @@
51
51
  "dependencies": {
52
52
  "@emotion/react": "^11.10.4",
53
53
  "@lukeed/uuid": "^2.0.0",
54
- "analysis-ui-components": "^0.16.0",
54
+ "analysis-ui-components": "^0.17.3",
55
55
  "cheminfo-font": "^1.9.0",
56
56
  "cheminfo-types": "^1.4.0",
57
57
  "d3": "^7.6.1",
58
58
  "eventemitter3": "^4.0.7",
59
59
  "file-saver": "^2.0.5",
60
+ "filelist-utils": "^0.11.0",
60
61
  "formik": "^2.2.9",
61
62
  "immer": "^9.0.15",
62
63
  "jszip": "^3.10.1",
@@ -69,21 +70,21 @@
69
70
  "ml-array-xy-equally-spaced": "^1.2.1",
70
71
  "ml-baseline-correction-regression": "^1.0.0",
71
72
  "ml-conrec": "^3.2.1",
72
- "ml-gsd": "^12.1.0",
73
- "ml-spectra-processing": "^11.12.0",
73
+ "ml-gsd": "^12.1.2",
74
+ "ml-spectra-processing": "^11.13.0",
74
75
  "ml-stat": "^1.3.3",
75
76
  "multiplet-analysis": "^2.0.0",
76
77
  "nmr-correlation": "^2.3.3",
77
- "nmr-load-save": "^0.2.1",
78
- "nmr-parser": "^2.0.1",
78
+ "nmr-load-save": "^0.3.0",
79
+ "nmr-parser": "^3.0.1",
79
80
  "nmr-processing": "^9.2.0",
80
- "nmredata": "^0.7.1",
81
+ "nmredata": "^0.9.0",
81
82
  "numeral": "^2.0.6",
82
83
  "openchemlib": "^8.0.1",
83
84
  "openchemlib-utils": "^2.0.0",
84
85
  "re-resizable": "^6.9.9",
85
86
  "react-d3-utils": "^0.5.1",
86
- "react-dropzone": "^14.2.2",
87
+ "react-dropzone": "^14.2.3",
87
88
  "react-error-boundary": "^3.1.4",
88
89
  "react-icons": "^4.4.0",
89
90
  "react-inspector": "^6.0.1",
@@ -103,28 +104,28 @@
103
104
  "@babel/plugin-transform-modules-commonjs": "^7.18.6",
104
105
  "@babel/preset-react": "^7.18.6",
105
106
  "@babel/preset-typescript": "^7.18.6",
106
- "@playwright/test": "^1.25.2",
107
+ "@playwright/test": "^1.27.1",
107
108
  "@simbathesailor/use-what-changed": "^2.0.0",
108
109
  "@types/d3": "^7.4.0",
109
- "@types/jest": "^29.0.3",
110
- "@types/node": "^18.7.18",
111
- "@types/react": "^18.0.20",
110
+ "@types/jest": "^29.1.2",
111
+ "@types/node": "^18.8.5",
112
+ "@types/react": "^18.0.21",
112
113
  "@types/react-dom": "^18.0.6",
113
114
  "@vitejs/plugin-react": "^2.1.0",
114
115
  "@zakodium/eslint-config": "^6.0.0",
115
116
  "cross-env": "^7.0.3",
116
- "eslint": "^8.23.1",
117
- "jest": "^29.0.3",
117
+ "eslint": "^8.25.0",
118
+ "jest": "^29.1.2",
118
119
  "modern-normalize": "^1.1.0",
119
120
  "prettier": "^2.7.1",
120
121
  "rc-menu": "^9.6.4",
121
122
  "react": "^18.2.0",
122
123
  "react-dom": "^18.2.0",
123
- "react-router-dom": "^6.4.0",
124
+ "react-router-dom": "^6.4.2",
124
125
  "rimraf": "^3.0.2",
125
126
  "rollup-plugin-analyzer": "^4.0.0",
126
127
  "serve": "^14.0.1",
127
- "typescript": "~4.8.3",
128
- "vite": "^3.1.1"
128
+ "typescript": "~4.8.4",
129
+ "vite": "^3.1.7"
129
130
  }
130
131
  }
@@ -1,13 +0,0 @@
1
- import { Datum1D } from '../../types/data1d/Datum1D';
2
- export declare const id = "absolute";
3
- export declare const name = "Absolute";
4
- /**
5
- *
6
- * @param {Datum1d} datum1d
7
- */
8
- export declare function apply(datum1D: Datum1D): void;
9
- export declare function isApplicable(datum1D: Datum1D): boolean;
10
- export declare function reduce(): {
11
- once: boolean;
12
- reduce: null;
13
- };
@@ -1,26 +0,0 @@
1
- import { reimAbsolute } from 'ml-spectra-processing';
2
- export const id = 'absolute';
3
- export const name = 'Absolute';
4
- /**
5
- *
6
- * @param {Datum1d} datum1d
7
- */
8
- export function apply(datum1D) {
9
- if (!isApplicable(datum1D)) {
10
- throw new Error('absolute not applicable on this data');
11
- }
12
- datum1D.data.re = reimAbsolute(datum1D.data);
13
- datum1D.data.im = new Float64Array(0);
14
- datum1D.info = { ...datum1D.info, isComplex: false };
15
- }
16
- export function isApplicable(datum1D) {
17
- if (datum1D.info.isComplex && !datum1D.info.isFid)
18
- return true;
19
- return false;
20
- }
21
- export function reduce() {
22
- return {
23
- once: false,
24
- reduce: null,
25
- };
26
- }
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.reduce = exports.isApplicable = exports.apply = exports.name = exports.id = void 0;
4
- const ml_spectra_processing_1 = require("ml-spectra-processing");
5
- exports.id = 'absolute';
6
- exports.name = 'Absolute';
7
- /**
8
- *
9
- * @param {Datum1d} datum1d
10
- */
11
- function apply(datum1D) {
12
- if (!isApplicable(datum1D)) {
13
- throw new Error('absolute not applicable on this data');
14
- }
15
- datum1D.data.re = (0, ml_spectra_processing_1.reimAbsolute)(datum1D.data);
16
- datum1D.data.im = new Float64Array(0);
17
- datum1D.info = { ...datum1D.info, isComplex: false };
18
- }
19
- exports.apply = apply;
20
- function isApplicable(datum1D) {
21
- if (datum1D.info.isComplex && !datum1D.info.isFid)
22
- return true;
23
- return false;
24
- }
25
- exports.isApplicable = isApplicable;
26
- function reduce() {
27
- return {
28
- once: false,
29
- reduce: null,
30
- };
31
- }
32
- exports.reduce = reduce;