nmrium 0.43.0 → 0.43.1-pre.1692874523
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/ExclusionZonesAnnotations.js +1 -2
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.d.ts +2 -2
- package/lib/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +16 -16
- package/lib/component/1d-2d/components/FloatMoleculeStructures/index.d.ts +2 -2
- package/lib/component/2d/Viewer2D.js +1 -3
- package/lib/component/EventsTrackers/KeysListenerTracker.js +1 -2
- package/lib/component/context/DispatchContext.d.ts +3 -1
- package/lib/component/elements/CounterLabel.d.ts +7 -0
- package/lib/component/elements/CounterLabel.js +12 -0
- package/lib/component/elements/EditableColumn.js +12 -6
- package/lib/component/elements/Input.d.ts +3 -12
- package/lib/component/elements/Input.js +24 -76
- package/lib/component/elements/Message.js +0 -1
- package/lib/component/elements/PreferencesButton.d.ts +4 -0
- package/lib/component/elements/PreferencesButton.js +6 -0
- package/lib/component/elements/formik/FormikInput.d.ts +2 -2
- package/lib/component/elements/formik/FormikInput.js +3 -6
- package/lib/component/header/Header.js +1 -1
- package/lib/component/header/ZeroFillingOptionsPanel.js +4 -4
- package/lib/component/main/InnerNMRiumContents.js +1 -2
- package/lib/component/modal/AlignSpectraModal.js +78 -29
- package/lib/component/modal/MoleculeStructureEditorModal.d.ts +5 -1
- package/lib/component/modal/MoleculeStructureEditorModal.js +12 -15
- package/lib/component/modal/MultipletAnalysisModal.js +1 -1
- package/lib/component/modal/{AboutUsModal.js → aboutUs/AboutUsModal.js} +4 -3
- package/lib/component/modal/aboutUs/AboutUsZakodium.d.ts +1 -0
- package/lib/component/modal/aboutUs/AboutUsZakodium.js +33 -0
- package/lib/component/modal/changeSum/ChangeSumModalContents.js +1 -1
- package/lib/component/modal/metaImportation/MetaImportationModal.js +1 -1
- package/lib/component/modal/setting/settings-tabs/GeneralTabContent.js +1 -1
- package/lib/component/modal/setting/settings-tabs/ImportationFiltersTabContent.js +1 -1
- package/lib/component/modal/setting/settingsValidation.js +5 -1
- package/lib/component/panels/InformationPanel.js +9 -100
- package/lib/component/panels/IntegralsPanel/IntegralTable.js +1 -1
- package/lib/component/panels/MoleculesPanel/MoleculePanel.js +2 -2
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.d.ts +10 -6
- package/lib/component/panels/MoleculesPanel/useAtomAssignment.js +4 -5
- package/lib/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +5 -5
- package/lib/component/panels/Panels.js +6 -7
- package/lib/component/panels/PeaksPanel/PeaksTable.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/RelativeColumn.js +1 -1
- package/lib/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -1
- package/lib/component/panels/SpectrumsPanel/SpectraPanelHeader.js +1 -2
- package/lib/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +2 -2
- package/lib/component/panels/SummaryPanel/SummaryPanel.js +2 -3
- package/lib/component/panels/SummaryPanel/utilities/Utilities.d.ts +2 -3
- package/lib/component/panels/SummaryPanel/utilities/Utilities.js +2 -3
- package/lib/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +8 -9
- package/lib/component/panels/databasePanel/DatabasePanel.d.ts +18 -1
- package/lib/component/panels/databasePanel/DatabasePanel.js +3 -40
- package/lib/component/panels/databasePanel/DatabaseSearchOptions.d.ts +18 -0
- package/lib/component/panels/databasePanel/DatabaseSearchOptions.js +53 -0
- package/lib/component/panels/header/DefaultPanelHeader.js +4 -10
- package/lib/component/panels/predictionPanel/PredictionPanel.js +2 -2
- package/lib/component/reducer/IgnoreActions.js +1 -0
- package/lib/component/reducer/Reducer.d.ts +2 -2
- package/lib/component/reducer/Reducer.js +4 -2
- package/lib/component/reducer/actions/DomainActions.js +2 -3
- package/lib/component/reducer/actions/MoleculeActions.js +3 -3
- package/lib/component/reducer/actions/PreferencesActions.js +1 -2
- package/lib/component/reducer/actions/ToolsActions.js +10 -10
- package/lib/component/reducer/core/Constants.d.ts +0 -4
- package/lib/component/reducer/core/Constants.js +0 -5
- package/lib/component/reducer/helper/ZoomHistoryManager.js +1 -2
- package/lib/component/toolbar/ToolTypes.d.ts +2 -2
- package/lib/component/toolbar/ToolTypes.js +23 -24
- package/lib/data/constants/References.d.ts +5 -3
- package/lib/data/data1d/Spectrum1D/getReferenceShift.d.ts +10 -1
- package/lib/data/data1d/Spectrum1D/ranges/detectSignal.js +1 -1
- package/lib/versionInfo.js +1 -1
- package/lib-cjs/component/1d/ExclusionZonesAnnotations.js +1 -2
- package/lib-cjs/component/1d-2d/components/FloatMoleculeStructures/DraggableStructure.js +16 -16
- package/lib-cjs/component/2d/Viewer2D.js +1 -3
- package/lib-cjs/component/EventsTrackers/KeysListenerTracker.js +1 -2
- package/lib-cjs/component/elements/CounterLabel.js +16 -0
- package/lib-cjs/component/elements/EditableColumn.js +12 -6
- package/lib-cjs/component/elements/Input.js +23 -75
- package/lib-cjs/component/elements/Message.js +0 -1
- package/lib-cjs/component/elements/PreferencesButton.js +13 -0
- package/lib-cjs/component/elements/formik/FormikInput.js +3 -6
- package/lib-cjs/component/header/Header.js +1 -1
- package/lib-cjs/component/header/ZeroFillingOptionsPanel.js +4 -4
- package/lib-cjs/component/main/InnerNMRiumContents.js +1 -2
- package/lib-cjs/component/modal/AlignSpectraModal.js +100 -28
- package/lib-cjs/component/modal/MoleculeStructureEditorModal.js +11 -17
- package/lib-cjs/component/modal/MultipletAnalysisModal.js +1 -1
- package/lib-cjs/component/modal/{AboutUsModal.js → aboutUs/AboutUsModal.js} +4 -3
- package/lib-cjs/component/modal/aboutUs/AboutUsZakodium.js +39 -0
- package/lib-cjs/component/modal/changeSum/ChangeSumModalContents.js +1 -1
- package/lib-cjs/component/modal/metaImportation/MetaImportationModal.js +1 -1
- package/lib-cjs/component/modal/setting/settings-tabs/GeneralTabContent.js +1 -1
- package/lib-cjs/component/modal/setting/settings-tabs/ImportationFiltersTabContent.js +1 -1
- package/lib-cjs/component/modal/setting/settingsValidation.js +4 -0
- package/lib-cjs/component/panels/InformationPanel.js +7 -98
- package/lib-cjs/component/panels/IntegralsPanel/IntegralTable.js +1 -1
- package/lib-cjs/component/panels/MoleculesPanel/MoleculePanel.js +2 -2
- package/lib-cjs/component/panels/MoleculesPanel/useAtomAssignment.js +4 -5
- package/lib-cjs/component/panels/MultipleSpectraAnalysisPanel/MultipleSpectraAnalysisPanel.js +4 -4
- package/lib-cjs/component/panels/Panels.js +6 -7
- package/lib-cjs/component/panels/PeaksPanel/PeaksTable.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/TableColumns/RelativeColumn.js +1 -1
- package/lib-cjs/component/panels/RangesPanel/TableColumns/SignalDeltaColumn.js +1 -1
- package/lib-cjs/component/panels/SpectrumsPanel/SpectraPanelHeader.js +1 -2
- package/lib-cjs/component/panels/SummaryPanel/CorrelationTable/CorrelationTableRow.js +2 -2
- package/lib-cjs/component/panels/SummaryPanel/SummaryPanel.js +2 -3
- package/lib-cjs/component/panels/SummaryPanel/utilities/Utilities.js +4 -5
- package/lib-cjs/component/panels/ZonesPanel/TableColumns/SignalDeltaColumn.js +7 -8
- package/lib-cjs/component/panels/databasePanel/DatabasePanel.js +3 -40
- package/lib-cjs/component/panels/databasePanel/DatabaseSearchOptions.js +60 -0
- package/lib-cjs/component/panels/header/DefaultPanelHeader.js +3 -9
- package/lib-cjs/component/panels/predictionPanel/PredictionPanel.js +2 -2
- package/lib-cjs/component/reducer/IgnoreActions.js +1 -0
- package/lib-cjs/component/reducer/Reducer.js +4 -2
- package/lib-cjs/component/reducer/actions/DomainActions.js +2 -3
- package/lib-cjs/component/reducer/actions/MoleculeActions.js +2 -2
- package/lib-cjs/component/reducer/actions/PreferencesActions.js +1 -2
- package/lib-cjs/component/reducer/actions/ToolsActions.js +9 -9
- package/lib-cjs/component/reducer/core/Constants.js +1 -6
- package/lib-cjs/component/reducer/helper/ZoomHistoryManager.js +1 -2
- package/lib-cjs/component/toolbar/ToolTypes.js +23 -24
- package/lib-cjs/data/data1d/Spectrum1D/ranges/detectSignal.js +1 -1
- package/lib-cjs/versionInfo.js +1 -1
- package/package.json +3 -3
- /package/lib/component/modal/{AboutUsModal.d.ts → aboutUs/AboutUsModal.d.ts} +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import groupByInfoKey from '../../utility/GroupByInfoKey';
|
|
2
2
|
import nucleusToString from '../../utility/nucleusToString';
|
|
3
|
-
import { DISPLAYER_MODE } from '../core/Constants';
|
|
4
3
|
import { getActiveSpectrum } from '../helper/getActiveSpectrum';
|
|
5
4
|
import { setDomain } from './DomainActions';
|
|
6
5
|
function changeSpectrumVerticalAlignment(draft, options) {
|
|
@@ -92,7 +91,7 @@ function handleApplyKeyPreferences(draft, action) {
|
|
|
92
91
|
draft.yDomain = preferences.yDomain;
|
|
93
92
|
draft.originDomain = preferences.originDomain;
|
|
94
93
|
draft.yDomains = preferences.yDomains;
|
|
95
|
-
if (draft.displayerMode !==
|
|
94
|
+
if (draft.displayerMode !== '2D') {
|
|
96
95
|
draft.zoom = preferences.zoom;
|
|
97
96
|
}
|
|
98
97
|
}
|
|
@@ -9,7 +9,7 @@ import { options as Tools } from '../../toolbar/ToolTypes';
|
|
|
9
9
|
import groupByInfoKey from '../../utility/GroupByInfoKey';
|
|
10
10
|
import { getSpectraByNucleus } from '../../utility/getSpectraByNucleus';
|
|
11
11
|
import { rangeStateInit } from '../Reducer';
|
|
12
|
-
import {
|
|
12
|
+
import { MARGIN } from '../core/Constants';
|
|
13
13
|
import { setZoom, wheelZoom, ZOOM_TYPES, } from '../helper/Zoom1DManager';
|
|
14
14
|
import zoomHistoryManager, { addToBrushHistory, } from '../helper/ZoomHistoryManager';
|
|
15
15
|
import { getActiveSpectra } from '../helper/getActiveSpectra';
|
|
@@ -144,7 +144,7 @@ function handleToggleRealImaginaryVisibility(draft) {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
function handleBrushEnd(draft, action) {
|
|
147
|
-
const is2D = draft.displayerMode ===
|
|
147
|
+
const is2D = draft.displayerMode === '2D';
|
|
148
148
|
const { height, margin, yDomain, yDomains, width, xDomains, xDomain, mode } = draft;
|
|
149
149
|
const xScale = getXScale({ width, xDomains, xDomain, mode, margin });
|
|
150
150
|
const verticalAlign = getVerticalAlign(draft);
|
|
@@ -175,7 +175,7 @@ function handleZoom(draft, action) {
|
|
|
175
175
|
const { event, trackID, selectedTool } = action.payload;
|
|
176
176
|
const { view: { ranges: rangeState }, displayerMode, yDomains, integralsYDomains, } = draft;
|
|
177
177
|
const activeSpectra = getActiveSpectra(draft);
|
|
178
|
-
if (displayerMode ===
|
|
178
|
+
if (displayerMode === '2D') {
|
|
179
179
|
const index = trackID === LAYOUT.TOP_1D ? 0 : trackID === LAYOUT.LEFT_1D ? 1 : null;
|
|
180
180
|
if (index !== null) {
|
|
181
181
|
const id = getSpectrumID(draft, index);
|
|
@@ -221,7 +221,7 @@ function zoomOut(draft, action) {
|
|
|
221
221
|
const { zoomType, trackID } = action?.payload || {};
|
|
222
222
|
const { xDomain, yDomain } = draft.originDomain;
|
|
223
223
|
const zoomHistory = zoomHistoryManager(draft.zoom.history, draft.view.spectra.activeTab, { xDomain, yDomain });
|
|
224
|
-
if (draft.displayerMode ===
|
|
224
|
+
if (draft.displayerMode === '1D') {
|
|
225
225
|
switch (zoomType) {
|
|
226
226
|
case ZOOM_TYPES.HORIZONTAL: {
|
|
227
227
|
draft.xDomain = xDomain;
|
|
@@ -280,12 +280,12 @@ function hasAcceptedSpectrum(draft, index) {
|
|
|
280
280
|
function setMargin(draft) {
|
|
281
281
|
const activeSpectrum = getActiveSpectrum(draft);
|
|
282
282
|
const spectrum = (activeSpectrum?.id && draft.data[activeSpectrum.index]) || null;
|
|
283
|
-
if (draft.displayerMode ===
|
|
283
|
+
if (draft.displayerMode === '2D' &&
|
|
284
284
|
(draft.toolOptions.selectedTool === Tools.slicing.id ||
|
|
285
285
|
spectrum?.info.isFid)) {
|
|
286
286
|
draft.margin = MARGIN['2D'];
|
|
287
287
|
}
|
|
288
|
-
else if (draft.displayerMode ===
|
|
288
|
+
else if (draft.displayerMode === '2D') {
|
|
289
289
|
const top = hasAcceptedSpectrum(draft, 0)
|
|
290
290
|
? MARGIN['2D'].top
|
|
291
291
|
: MARGIN['1D'].top;
|
|
@@ -294,7 +294,7 @@ function setMargin(draft) {
|
|
|
294
294
|
: MARGIN['1D'].left;
|
|
295
295
|
draft.margin = { ...MARGIN['2D'], top, left };
|
|
296
296
|
}
|
|
297
|
-
else if (draft.displayerMode ===
|
|
297
|
+
else if (draft.displayerMode === '1D') {
|
|
298
298
|
draft.margin = MARGIN['1D'];
|
|
299
299
|
}
|
|
300
300
|
}
|
|
@@ -302,8 +302,8 @@ function setMargin(draft) {
|
|
|
302
302
|
function setDisplayerMode(draft, data) {
|
|
303
303
|
draft.displayerMode =
|
|
304
304
|
data && data.some((d) => d.info.dimension === 2)
|
|
305
|
-
?
|
|
306
|
-
:
|
|
305
|
+
? '2D'
|
|
306
|
+
: '1D';
|
|
307
307
|
}
|
|
308
308
|
//utility
|
|
309
309
|
function setTabActiveSpectrum(draft, dataGroupByTab) {
|
|
@@ -416,7 +416,7 @@ function levelChangeHandler(draft, action) {
|
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
418
|
function setSpectraSameTopHandler(draft) {
|
|
419
|
-
if (draft.displayerMode ===
|
|
419
|
+
if (draft.displayerMode === '1D') {
|
|
420
420
|
draft.originDomain.shareYDomain = false;
|
|
421
421
|
setZoom(draft, { scale: 0.8 });
|
|
422
422
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DISPLAYER_MODE } from '../core/Constants';
|
|
2
1
|
export default function zoomHistoryManager(zoomHistory, nucleus, baseZoom) {
|
|
3
2
|
if (!zoomHistory[nucleus] && !Array.isArray(zoomHistory[nucleus])) {
|
|
4
3
|
zoomHistory[nucleus] = [];
|
|
@@ -38,7 +37,7 @@ export function addToBrushHistory(draft, options) {
|
|
|
38
37
|
draft.zoom.history,
|
|
39
38
|
// eslint-disable-next-line unicorn/consistent-destructuring
|
|
40
39
|
draft.view.spectra.activeTab);
|
|
41
|
-
if (displayerMode ===
|
|
40
|
+
if (displayerMode === '2D') {
|
|
42
41
|
switch (trackID) {
|
|
43
42
|
case 'CENTER_2D':
|
|
44
43
|
draft.xDomain = xDomain;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { NMRiumToolBarPreferences } from 'nmr-load-save';
|
|
2
2
|
import type { Info1D, Info2D } from 'nmr-processing';
|
|
3
|
-
import {
|
|
3
|
+
import { DisplayerMode } from '../reducer/Reducer';
|
|
4
4
|
type InfoKey = keyof Info1D | keyof Info2D;
|
|
5
5
|
export interface ToolOptionItem {
|
|
6
6
|
id: string;
|
|
7
7
|
label: string;
|
|
8
|
-
mode?:
|
|
8
|
+
mode?: DisplayerMode;
|
|
9
9
|
spectraOptions?: Array<{
|
|
10
10
|
info?: Array<{
|
|
11
11
|
key: InfoKey;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Filters } from 'nmr-processing';
|
|
2
|
-
import { DISPLAYER_MODE } from '../reducer/core/Constants';
|
|
3
2
|
export const options = {
|
|
4
3
|
zoom: {
|
|
5
4
|
id: 'zoom',
|
|
@@ -13,7 +12,7 @@ export const options = {
|
|
|
13
12
|
label: 'Peaks picking',
|
|
14
13
|
hasOptionPanel: true,
|
|
15
14
|
isFilter: false,
|
|
16
|
-
mode:
|
|
15
|
+
mode: '1D',
|
|
17
16
|
spectraOptions: [
|
|
18
17
|
{
|
|
19
18
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -27,7 +26,7 @@ export const options = {
|
|
|
27
26
|
label: 'Integral Tool',
|
|
28
27
|
hasOptionPanel: false,
|
|
29
28
|
isFilter: false,
|
|
30
|
-
mode:
|
|
29
|
+
mode: '1D',
|
|
31
30
|
spectraOptions: [
|
|
32
31
|
{
|
|
33
32
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -41,7 +40,7 @@ export const options = {
|
|
|
41
40
|
label: 'Zone tool',
|
|
42
41
|
hasOptionPanel: true,
|
|
43
42
|
isFilter: false,
|
|
44
|
-
mode:
|
|
43
|
+
mode: '2D',
|
|
45
44
|
spectraOptions: [
|
|
46
45
|
{
|
|
47
46
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -55,7 +54,7 @@ export const options = {
|
|
|
55
54
|
label: 'Slicing tool',
|
|
56
55
|
hasOptionPanel: false,
|
|
57
56
|
isFilter: false,
|
|
58
|
-
mode:
|
|
57
|
+
mode: '2D',
|
|
59
58
|
spectraOptions: [
|
|
60
59
|
{
|
|
61
60
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -69,7 +68,7 @@ export const options = {
|
|
|
69
68
|
label: 'Move spectrum horizontally',
|
|
70
69
|
hasOptionPanel: false,
|
|
71
70
|
isFilter: false,
|
|
72
|
-
mode:
|
|
71
|
+
mode: '1D',
|
|
73
72
|
spectraOptions: [
|
|
74
73
|
{
|
|
75
74
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -83,7 +82,7 @@ export const options = {
|
|
|
83
82
|
label: 'Equalizer tool',
|
|
84
83
|
hasOptionPanel: false,
|
|
85
84
|
isFilter: false,
|
|
86
|
-
mode:
|
|
85
|
+
mode: '1D',
|
|
87
86
|
spectraOptions: [
|
|
88
87
|
{
|
|
89
88
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -97,7 +96,7 @@ export const options = {
|
|
|
97
96
|
label: 'Range picking and multiplet analysis',
|
|
98
97
|
hasOptionPanel: true,
|
|
99
98
|
isFilter: false,
|
|
100
|
-
mode:
|
|
99
|
+
mode: '1D',
|
|
101
100
|
spectraOptions: [
|
|
102
101
|
{
|
|
103
102
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -111,7 +110,7 @@ export const options = {
|
|
|
111
110
|
label: Filters.apodization.name,
|
|
112
111
|
hasOptionPanel: true,
|
|
113
112
|
isFilter: true,
|
|
114
|
-
mode:
|
|
113
|
+
mode: '1D',
|
|
115
114
|
spectraOptions: [
|
|
116
115
|
{
|
|
117
116
|
info: [
|
|
@@ -128,7 +127,7 @@ export const options = {
|
|
|
128
127
|
label: Filters.zeroFilling.name,
|
|
129
128
|
hasOptionPanel: true,
|
|
130
129
|
isFilter: true,
|
|
131
|
-
mode:
|
|
130
|
+
mode: '1D',
|
|
132
131
|
spectraOptions: [
|
|
133
132
|
{
|
|
134
133
|
info: [
|
|
@@ -145,7 +144,7 @@ export const options = {
|
|
|
145
144
|
label: Filters.phaseCorrection.name,
|
|
146
145
|
hasOptionPanel: true,
|
|
147
146
|
isFilter: true,
|
|
148
|
-
mode:
|
|
147
|
+
mode: '1D',
|
|
149
148
|
spectraOptions: [
|
|
150
149
|
{
|
|
151
150
|
info: [
|
|
@@ -162,7 +161,7 @@ export const options = {
|
|
|
162
161
|
label: Filters.baselineCorrection.name,
|
|
163
162
|
hasOptionPanel: true,
|
|
164
163
|
isFilter: true,
|
|
165
|
-
mode:
|
|
164
|
+
mode: '1D',
|
|
166
165
|
spectraOptions: [
|
|
167
166
|
{
|
|
168
167
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -176,7 +175,7 @@ export const options = {
|
|
|
176
175
|
label: 'range general selector',
|
|
177
176
|
hasOptionPanel: false,
|
|
178
177
|
isFilter: false,
|
|
179
|
-
mode:
|
|
178
|
+
mode: '1D',
|
|
180
179
|
spectraOptions: [
|
|
181
180
|
{
|
|
182
181
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -190,7 +189,7 @@ export const options = {
|
|
|
190
189
|
label: 'edit range',
|
|
191
190
|
hasOptionPanel: false,
|
|
192
191
|
isFilter: false,
|
|
193
|
-
mode:
|
|
192
|
+
mode: '1D',
|
|
194
193
|
spectraOptions: [
|
|
195
194
|
{
|
|
196
195
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -204,7 +203,7 @@ export const options = {
|
|
|
204
203
|
label: 'Multiple spectra analysis',
|
|
205
204
|
hasOptionPanel: false,
|
|
206
205
|
isFilter: false,
|
|
207
|
-
mode:
|
|
206
|
+
mode: '1D',
|
|
208
207
|
spectraOptions: [
|
|
209
208
|
{
|
|
210
209
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -221,7 +220,7 @@ export const options = {
|
|
|
221
220
|
label: 'Exclusion zones',
|
|
222
221
|
hasOptionPanel: false,
|
|
223
222
|
isFilter: false,
|
|
224
|
-
mode:
|
|
223
|
+
mode: '1D',
|
|
225
224
|
spectraOptions: [
|
|
226
225
|
{
|
|
227
226
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -238,7 +237,7 @@ export const options = {
|
|
|
238
237
|
label: 'Matrix generations exclusion zones',
|
|
239
238
|
hasOptionPanel: false,
|
|
240
239
|
isFilter: false,
|
|
241
|
-
mode:
|
|
240
|
+
mode: '1D',
|
|
242
241
|
spectraOptions: [
|
|
243
242
|
{
|
|
244
243
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -255,7 +254,7 @@ export const options = {
|
|
|
255
254
|
label: 'Filter database',
|
|
256
255
|
hasOptionPanel: false,
|
|
257
256
|
isFilter: false,
|
|
258
|
-
mode:
|
|
257
|
+
mode: '1D',
|
|
259
258
|
spectraOptions: [
|
|
260
259
|
{
|
|
261
260
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -276,7 +275,7 @@ export const options = {
|
|
|
276
275
|
label: 'Fourier transform',
|
|
277
276
|
hasOptionPanel: false,
|
|
278
277
|
isFilter: true,
|
|
279
|
-
mode:
|
|
278
|
+
mode: '1D',
|
|
280
279
|
spectraOptions: [
|
|
281
280
|
{
|
|
282
281
|
info: [
|
|
@@ -293,7 +292,7 @@ export const options = {
|
|
|
293
292
|
label: 'Fourier transform dimension 1',
|
|
294
293
|
hasOptionPanel: false,
|
|
295
294
|
isFilter: true,
|
|
296
|
-
mode:
|
|
295
|
+
mode: '2D',
|
|
297
296
|
spectraOptions: [
|
|
298
297
|
{
|
|
299
298
|
info: [
|
|
@@ -311,7 +310,7 @@ export const options = {
|
|
|
311
310
|
label: 'Fourier transform dimension 2',
|
|
312
311
|
hasOptionPanel: false,
|
|
313
312
|
isFilter: true,
|
|
314
|
-
mode:
|
|
313
|
+
mode: '2D',
|
|
315
314
|
spectraOptions: [
|
|
316
315
|
{
|
|
317
316
|
info: [
|
|
@@ -336,7 +335,7 @@ export const options = {
|
|
|
336
335
|
label: 'Real / Imaginary',
|
|
337
336
|
hasOptionPanel: false,
|
|
338
337
|
isFilter: false,
|
|
339
|
-
mode:
|
|
338
|
+
mode: '1D',
|
|
340
339
|
spectraOptions: [
|
|
341
340
|
{
|
|
342
341
|
info: [{ key: 'isComplex', value: true }],
|
|
@@ -350,7 +349,7 @@ export const options = {
|
|
|
350
349
|
label: 'Align spectrum',
|
|
351
350
|
hasOptionPanel: false,
|
|
352
351
|
isFilter: false,
|
|
353
|
-
mode:
|
|
352
|
+
mode: '1D',
|
|
354
353
|
isToggle: false,
|
|
355
354
|
},
|
|
356
355
|
spectraStackAlignments: {
|
|
@@ -358,7 +357,7 @@ export const options = {
|
|
|
358
357
|
label: 'Stack spectra',
|
|
359
358
|
hasOptionPanel: false,
|
|
360
359
|
isFilter: false,
|
|
361
|
-
mode:
|
|
360
|
+
mode: '1D',
|
|
362
361
|
spectraOptions: [
|
|
363
362
|
{
|
|
364
363
|
info: [{ key: 'isFt', value: true }],
|
|
@@ -4,9 +4,11 @@ interface ReferenceInfo {
|
|
|
4
4
|
nbPeaks: number;
|
|
5
5
|
delta: number;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
8
|
-
export declare
|
|
7
|
+
export type OneHReferences = 'tms' | 'tsp' | 'glucose';
|
|
8
|
+
export declare const REFERENCES: Record<'1H', Record<OneHReferences, ReferenceInfo>> | Record<'13C', any>;
|
|
9
|
+
export interface GetRangeOptions {
|
|
9
10
|
nucleus?: string;
|
|
10
11
|
reference?: string;
|
|
11
|
-
}
|
|
12
|
+
}
|
|
13
|
+
export declare function getRange(options?: GetRangeOptions): ReferenceInfo;
|
|
12
14
|
export {};
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
export interface CalibrateOptions {
|
|
2
|
+
from: number;
|
|
3
|
+
to: number;
|
|
4
|
+
nbPeaks: number;
|
|
5
|
+
targetX: number;
|
|
6
|
+
}
|
|
7
|
+
export interface GetReferenceShiftOptions extends CalibrateOptions {
|
|
8
|
+
reference?: string;
|
|
9
|
+
}
|
|
1
10
|
/**
|
|
2
11
|
*
|
|
3
12
|
* @param {*} datum1D
|
|
@@ -9,4 +18,4 @@
|
|
|
9
18
|
* @param {number} [options.targetX]
|
|
10
19
|
* @param {string} [options.reference]
|
|
11
20
|
*/
|
|
12
|
-
export declare function getReferenceShift(datum1D: any, options:
|
|
21
|
+
export declare function getReferenceShift(datum1D: any, options: GetReferenceShiftOptions): number;
|
package/lib/versionInfo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default { version: 'v0.43.
|
|
1
|
+
export default { version: 'v0.43.1-pre.1692874523' };
|
|
@@ -9,7 +9,6 @@ const react_1 = require("react");
|
|
|
9
9
|
const ChartContext_1 = require("../context/ChartContext");
|
|
10
10
|
const ScaleContext_1 = require("../context/ScaleContext");
|
|
11
11
|
const useSpectraPerNucleus_1 = __importDefault(require("../hooks/useSpectraPerNucleus"));
|
|
12
|
-
const Constants_1 = require("../reducer/core/Constants");
|
|
13
12
|
const ExclusionZoneAnnotation_1 = __importDefault(require("./ExclusionZoneAnnotation"));
|
|
14
13
|
function ExclusionZonesAnnotationsInner({ displayerKey, xDomains, spectra, shiftY, }) {
|
|
15
14
|
return ((0, jsx_runtime_1.jsx)("g", { className: "spectrum-exclusion-zones-group", clipPath: `url(#${displayerKey}clip-chart-1d)`, children: spectra
|
|
@@ -25,7 +24,7 @@ function ExclusionZonesAnnotations() {
|
|
|
25
24
|
const { displayerKey, xDomains, displayerMode } = (0, ChartContext_1.useChartData)();
|
|
26
25
|
const { shiftY } = (0, ScaleContext_1.useScale)();
|
|
27
26
|
const spectra = (0, useSpectraPerNucleus_1.default)();
|
|
28
|
-
if (displayerMode !==
|
|
27
|
+
if (displayerMode !== '1D')
|
|
29
28
|
return null;
|
|
30
29
|
return ((0, jsx_runtime_1.jsx)(MemoizedPeakAnnotations, { spectra: spectra, displayerKey: displayerKey, xDomains: xDomains, shiftY: shiftY }));
|
|
31
30
|
}
|
|
@@ -42,7 +42,7 @@ function DraggableStructure(props) {
|
|
|
42
42
|
const { zones, ranges, molecule, activeTab, displayerMode, index, moleculeView, } = props;
|
|
43
43
|
const { viewerRef } = (0, GlobalContext_1.useGlobal)();
|
|
44
44
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
45
|
-
const openMoleculeEditor = (0, MoleculeStructureEditorModal_1.useMoleculeEditor)();
|
|
45
|
+
const { modal, openMoleculeEditor } = (0, MoleculeStructureEditorModal_1.useMoleculeEditor)();
|
|
46
46
|
const { currentDiaIDsToHighlight, handleOnAtomHover, handleOnClickAtom, assignedDiaIDsMerged, } = (0, useAtomAssignment_1.default)({ zones, ranges, activeTab, displayerMode });
|
|
47
47
|
function floatMoleculeHandler() {
|
|
48
48
|
dispatch({
|
|
@@ -64,21 +64,21 @@ function DraggableStructure(props) {
|
|
|
64
64
|
}
|
|
65
65
|
if (!viewerRef)
|
|
66
66
|
return null;
|
|
67
|
-
return ((0, jsx_runtime_1.
|
|
67
|
+
return ((0, jsx_runtime_1.jsxs)(react_rnd_1.Rnd, { default: moleculeView.floating.bounding, minWidth: 90 + AUTO_CROP_MARGIN * 2, minHeight: 100 + AUTO_CROP_MARGIN * 2, dragHandleClassName: "handle", enableUserSelectHack: false, bounds: viewerRef, style: { zIndex: 1 }, className: "draggable-molecule", onResizeStop: (e, dir, eRef, { width, height }) => dragFloatMoleculeHandler({ width, height }), onDragStop: (e, { x, y }) => {
|
|
68
68
|
dragFloatMoleculeHandler({ x, y });
|
|
69
|
-
}, resizeHandleWrapperStyle: { backgroundColor: 'white' }, css: style, children: (0, jsx_runtime_1.jsxs)("div", { className: "content", onDoubleClick: () => openMoleculeEditor(molecule), children: [(0, jsx_runtime_1.jsx)(ActionsButton_1.default, { onFloatBtnClick: floatMoleculeHandler }), (0, jsx_runtime_1.jsx)(react_d3_utils_1.ResponsiveChart, { children: ({ width, height }) => {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
69
|
+
}, resizeHandleWrapperStyle: { backgroundColor: 'white' }, css: style, children: [(0, jsx_runtime_1.jsxs)("div", { className: "content", onDoubleClick: () => openMoleculeEditor(molecule), children: [(0, jsx_runtime_1.jsx)(ActionsButton_1.default, { onFloatBtnClick: floatMoleculeHandler }), (0, jsx_runtime_1.jsx)(react_d3_utils_1.ResponsiveChart, { children: ({ width, height }) => {
|
|
70
|
+
return ((0, jsx_runtime_1.jsx)(react_ocl_nmr_1.default, { OCL: full_1.default, id: `molSVG${index || ''}`, autoCrop: true, autoCropMargin: AUTO_CROP_MARGIN, height: height - AUTO_CROP_MARGIN * 2, width: width - AUTO_CROP_MARGIN * 2, label: molecule.label, labelFontSize: 15, labelColor: "rgb(0,0,0)", molfile: molecule.molfile, setSelectedAtom: handleOnClickAtom, atomHighlightColor: currentDiaIDsToHighlight?.length > 0 ? 'red' : '#FFD700', atomHighlightOpacity: 0.35, highlights: currentDiaIDsToHighlight?.length > 0
|
|
71
|
+
? currentDiaIDsToHighlight
|
|
72
|
+
: assignedDiaIDsMerged, setHoverAtom: handleOnAtomHover, setMolfile: (molfile) => {
|
|
73
|
+
dispatch({
|
|
74
|
+
type: 'SET_MOLECULE',
|
|
75
|
+
payload: {
|
|
76
|
+
molfile,
|
|
77
|
+
id: molecule.id,
|
|
78
|
+
label: molecule.label,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
}, showAtomNumber: moleculeView.showAtomNumber }));
|
|
82
|
+
} })] }), modal] }));
|
|
83
83
|
}
|
|
84
84
|
exports.DraggableStructure = DraggableStructure;
|
|
@@ -38,7 +38,6 @@ const ChartContext_1 = require("../context/ChartContext");
|
|
|
38
38
|
const DispatchContext_1 = require("../context/DispatchContext");
|
|
39
39
|
const Spinner_1 = __importDefault(require("../loader/Spinner"));
|
|
40
40
|
const ToolTypes_1 = require("../toolbar/ToolTypes");
|
|
41
|
-
const assert_1 = require("../utility/assert");
|
|
42
41
|
const Chart2D_1 = __importDefault(require("./Chart2D"));
|
|
43
42
|
const FooterBanner_1 = __importDefault(require("./FooterBanner"));
|
|
44
43
|
const SlicingView_1 = __importDefault(require("./SlicingView"));
|
|
@@ -57,7 +56,6 @@ function Viewer2D({ emptyText = undefined }) {
|
|
|
57
56
|
if (spectra?.length === 1) {
|
|
58
57
|
const id = spectra[0].id;
|
|
59
58
|
const spectrum = data.find((datum) => datum.id === id && !datum.info.isFid);
|
|
60
|
-
(0, assert_1.assert)(spectrum, `Spectrum with id ${id} not found`);
|
|
61
59
|
return spectrum;
|
|
62
60
|
}
|
|
63
61
|
return null;
|
|
@@ -151,7 +149,7 @@ function Viewer2D({ emptyText = undefined }) {
|
|
|
151
149
|
margin: 'auto',
|
|
152
150
|
position: 'relative',
|
|
153
151
|
overflow: 'hidden',
|
|
154
|
-
}, children: (0, jsx_runtime_1.jsxs)(MouseTracker_1.MouseTracker, { style: { width: '100%', height: `100%`, position: 'absolute' }, children: [selectedTool && selectedTool === ToolTypes_1.options.slicing.id && ((0, jsx_runtime_1.jsx)(SlicingView_1.default, {})), (0, jsx_runtime_1.jsx)(CrossLinePointer_1.default, {}),
|
|
152
|
+
}, children: (0, jsx_runtime_1.jsxs)(MouseTracker_1.MouseTracker, { style: { width: '100%', height: `100%`, position: 'absolute' }, children: [selectedTool && selectedTool === ToolTypes_1.options.slicing.id && ((0, jsx_runtime_1.jsx)(SlicingView_1.default, {})), (0, jsx_runtime_1.jsx)(CrossLinePointer_1.default, {}), (0, jsx_runtime_1.jsx)(XYLabelPointer_1.default, { data1D: spectrumData, layout: DIMENSION }), (0, jsx_runtime_1.jsx)(BrushXY_1.default, { brushType: BrushXY_1.BRUSH_TYPE.XY, dimensionBorder: DIMENSION.CENTER_2D }), (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [spectrumData[0] && ((0, jsx_runtime_1.jsx)(BrushXY_1.default, { brushType: BrushXY_1.BRUSH_TYPE.X, dimensionBorder: DIMENSION.TOP_1D, height: margin.top })), spectrumData[1] && ((0, jsx_runtime_1.jsx)(BrushXY_1.default, { brushType: BrushXY_1.BRUSH_TYPE.Y, dimensionBorder: DIMENSION.LEFT_1D, width: margin.left }))] }), (0, jsx_runtime_1.jsx)(FooterBanner_1.default, { data1D: spectrumData, layout: DIMENSION }), (0, jsx_runtime_1.jsx)(Chart2D_1.default, { spectra: spectrumData })] }) }))] })) }));
|
|
155
153
|
}
|
|
156
154
|
function ViewerResponsiveWrapper(props) {
|
|
157
155
|
const dispatch = (0, DispatchContext_1.useDispatch)();
|
|
@@ -16,7 +16,6 @@ const index_1 = require("../highlight/index");
|
|
|
16
16
|
const useCheckToolsVisibility_1 = require("../hooks/useCheckToolsVisibility");
|
|
17
17
|
const useExport_1 = __importDefault(require("../hooks/useExport"));
|
|
18
18
|
const useToolsFunctions_1 = __importDefault(require("../hooks/useToolsFunctions"));
|
|
19
|
-
const Constants_1 = require("../reducer/core/Constants");
|
|
20
19
|
const ToolTypes_1 = require("../toolbar/ToolTypes");
|
|
21
20
|
function KeysListenerTracker(props) {
|
|
22
21
|
const { mainDivRef } = props;
|
|
@@ -51,7 +50,7 @@ function KeysListenerTracker(props) {
|
|
|
51
50
|
}, [mainDivRef]);
|
|
52
51
|
const assignmentData = (0, AssignmentsContext_1.useAssignmentData)();
|
|
53
52
|
const allow1DTool = (0, react_1.useMemo)(() => {
|
|
54
|
-
return displayerMode ===
|
|
53
|
+
return displayerMode === '1D' && data && data.length > 0;
|
|
55
54
|
}, [data, displayerMode]);
|
|
56
55
|
const deleteHandler = (0, react_1.useCallback)(async (sourceData) => {
|
|
57
56
|
const { type, extra } = sourceData;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CounterLabel = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const labelStyle = {
|
|
6
|
+
margin: 0,
|
|
7
|
+
textAlign: 'right',
|
|
8
|
+
lineHeight: '22px',
|
|
9
|
+
padding: '0 5px',
|
|
10
|
+
whiteSpace: 'nowrap',
|
|
11
|
+
};
|
|
12
|
+
function CounterLabel(props) {
|
|
13
|
+
const { children, style = {} } = props;
|
|
14
|
+
return (0, jsx_runtime_1.jsx)("p", { style: { ...labelStyle, ...style }, children: children });
|
|
15
|
+
}
|
|
16
|
+
exports.CounterLabel = CounterLabel;
|
|
@@ -10,6 +10,7 @@ const EditableColumn = (0, react_1.forwardRef)(function EditableColumn(props, re
|
|
|
10
10
|
const { onSave = () => null, value, type = 'text', style, onEditStart = () => null, editStatus = false, validate = () => true, textOverFlowEllipses = false, ...InputProps } = props;
|
|
11
11
|
const [enabled, enableEdit] = (0, react_1.useState)();
|
|
12
12
|
const [isValid, setValid] = (0, react_1.useState)(true);
|
|
13
|
+
const [val, setVal] = (0, react_1.useState)(value);
|
|
13
14
|
(0, react_1.useEffect)(() => {
|
|
14
15
|
enableEdit(editStatus);
|
|
15
16
|
}, [editStatus]);
|
|
@@ -27,13 +28,13 @@ const EditableColumn = (0, react_1.forwardRef)(function EditableColumn(props, re
|
|
|
27
28
|
window.removeEventListener('mousedown', mouseClickCallback);
|
|
28
29
|
}
|
|
29
30
|
}, []);
|
|
30
|
-
|
|
31
|
+
function startEditHandler() {
|
|
31
32
|
window.addEventListener('mousedown', mouseClickCallback);
|
|
32
33
|
onEditStart(true);
|
|
33
34
|
enableEdit(true);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const valid = validate(
|
|
35
|
+
}
|
|
36
|
+
function editHandler(event) {
|
|
37
|
+
const valid = validate(val);
|
|
37
38
|
setValid(valid);
|
|
38
39
|
// when press Enter or Tab
|
|
39
40
|
if (valid && ['Enter', 'Tab'].includes(event.key)) {
|
|
@@ -45,7 +46,10 @@ const EditableColumn = (0, react_1.forwardRef)(function EditableColumn(props, re
|
|
|
45
46
|
enableEdit(false);
|
|
46
47
|
window.removeEventListener('mousedown', mouseClickCallback);
|
|
47
48
|
}
|
|
48
|
-
}
|
|
49
|
+
}
|
|
50
|
+
function handleChange(e) {
|
|
51
|
+
setVal(e.target.value);
|
|
52
|
+
}
|
|
49
53
|
return ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
50
54
|
display: 'table',
|
|
51
55
|
width: '100%',
|
|
@@ -67,8 +71,10 @@ const EditableColumn = (0, react_1.forwardRef)(function EditableColumn(props, re
|
|
|
67
71
|
width: '100%',
|
|
68
72
|
},
|
|
69
73
|
input: {
|
|
74
|
+
padding: '5px',
|
|
70
75
|
width: '100%',
|
|
76
|
+
minWidth: '60px',
|
|
71
77
|
},
|
|
72
|
-
},
|
|
78
|
+
}, autoSelect: true, className: "editable-column", value: val, type: type, onChange: handleChange, onKeyUp: editHandler, onMouseDown: (e) => e.stopPropagation(), ...InputProps }) }))] }));
|
|
73
79
|
});
|
|
74
80
|
exports.default = EditableColumn;
|