@zakodium/nmrium-core 0.0.1
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/LICENSE +438 -0
- package/README.md +81 -0
- package/dist/nmrium-core.cjs +4 -0
- package/dist/nmrium-core.d.ts +1146 -0
- package/dist/nmrium-core.mjs +4 -0
- package/package.json +70 -0
|
@@ -0,0 +1,1146 @@
|
|
|
1
|
+
import type { CorrelationData } from 'nmr-correlation';
|
|
2
|
+
import type { FifoLoggerOptions } from 'fifo-logger';
|
|
3
|
+
import { FileCollection } from 'filelist-utils';
|
|
4
|
+
import type { FileCollectionItem } from 'filelist-utils';
|
|
5
|
+
import type { Filter1DEntry } from 'nmr-processing';
|
|
6
|
+
import type { Filter1DOptions } from 'nmr-processing';
|
|
7
|
+
import type { Filter2DEntry } from 'nmr-processing';
|
|
8
|
+
import type { Filter2DOptions } from 'nmr-processing';
|
|
9
|
+
import type { Info1D } from 'nmr-processing';
|
|
10
|
+
import type { Info2D } from 'nmr-processing';
|
|
11
|
+
import type { Integrals } from 'nmr-processing';
|
|
12
|
+
import type { Logger } from 'cheminfo-types';
|
|
13
|
+
import type { MatrixOptions } from 'nmr-processing';
|
|
14
|
+
import type { NmrData1D } from 'cheminfo-types';
|
|
15
|
+
import type { NmrData2D } from 'cheminfo-types';
|
|
16
|
+
import type { Peaks } from 'nmr-processing';
|
|
17
|
+
import type { Ranges } from 'nmr-processing';
|
|
18
|
+
import { SerializedNmriumState } from './core_serialize.js';
|
|
19
|
+
import { UUID } from 'crypto';
|
|
20
|
+
import type { WebSource } from 'filelist-utils';
|
|
21
|
+
import type { Zones } from 'nmr-processing';
|
|
22
|
+
|
|
23
|
+
export declare interface ActiveSpectrum {
|
|
24
|
+
id: string;
|
|
25
|
+
index: number;
|
|
26
|
+
selected: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export declare interface AdvanceExportSettings extends BaseExportSettings {
|
|
30
|
+
mode: 'advance';
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
unit: Unit;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export declare const ANALYSIS_COLUMN_TYPES: {
|
|
37
|
+
NORMAL: string;
|
|
38
|
+
FORMULA: string;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export declare const ANALYSIS_COLUMN_VALUES_KEYS: {
|
|
42
|
+
RELATIVE: string;
|
|
43
|
+
ABSOLUTE: string;
|
|
44
|
+
MIN: string;
|
|
45
|
+
MAX: string;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export declare type AnalysisColumnsTypes = ExtractValues<typeof ANALYSIS_COLUMN_TYPES>;
|
|
49
|
+
|
|
50
|
+
export declare type AnalysisColumnsValuesKeys = ExtractValues<typeof ANALYSIS_COLUMN_VALUES_KEYS>;
|
|
51
|
+
|
|
52
|
+
export declare interface AnalysisOptions {
|
|
53
|
+
sum: number;
|
|
54
|
+
code: string | null;
|
|
55
|
+
columns: SpectraAnalysisColumns;
|
|
56
|
+
columnIndex: number;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
declare interface AnalysisPreferences extends AnalysisOptions {
|
|
60
|
+
resortSpectra: boolean;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export declare type AutoProcessingFilterEntry = Omit<Filter1DOptions | Filter2DOptions, 'value'>;
|
|
64
|
+
|
|
65
|
+
declare interface BaseExportSettings {
|
|
66
|
+
useDefaultSettings: boolean;
|
|
67
|
+
dpi: number;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare interface BaseNmriumData {
|
|
71
|
+
actionType?: string;
|
|
72
|
+
correlations?: CorrelationData;
|
|
73
|
+
molecules: StateMolecule[];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export declare interface BaseNucleus1DPreferences<T> {
|
|
77
|
+
nuclei: Partial<Record<string, T>>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export declare interface BaseNucleus2DPreferences<T> {
|
|
81
|
+
nuclei: Partial<Record<string, T>>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export declare interface BaseNucleusPreferences<T> {
|
|
85
|
+
nuclei: Partial<Record<string, T>>;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
declare interface BaseSpectrum {
|
|
89
|
+
id: string;
|
|
90
|
+
sourceSelector?: NmrLoaderSelectors;
|
|
91
|
+
meta: Metadata;
|
|
92
|
+
customInfo: any;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
declare interface BasicColumnPreferences {
|
|
96
|
+
visible: boolean;
|
|
97
|
+
label: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export declare interface BasicExportSettings extends BaseExportSettings {
|
|
101
|
+
mode: 'basic';
|
|
102
|
+
size: PageSizeName;
|
|
103
|
+
layout: Layout;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export declare interface BoundingBox {
|
|
107
|
+
width: number;
|
|
108
|
+
height: number;
|
|
109
|
+
x: number;
|
|
110
|
+
y: number;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export declare interface BrukerLoaderSelector {
|
|
114
|
+
/**
|
|
115
|
+
* processing number to select, default the smallest number
|
|
116
|
+
*/
|
|
117
|
+
processingNumbers?: string;
|
|
118
|
+
/**
|
|
119
|
+
* experiment number to select, default all
|
|
120
|
+
*/
|
|
121
|
+
experimentNumbers?: string;
|
|
122
|
+
/**
|
|
123
|
+
* should we take only the first processed data (procno).
|
|
124
|
+
* @default true
|
|
125
|
+
*/
|
|
126
|
+
onlyFirstProcessedData?: boolean;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export declare interface Color2D {
|
|
130
|
+
positiveColor: string;
|
|
131
|
+
negativeColor: string;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
declare interface ColumnPreferences {
|
|
135
|
+
show: boolean;
|
|
136
|
+
format: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export declare interface ContourItem {
|
|
140
|
+
contourLevels: [number, number];
|
|
141
|
+
numberOfLayers: number;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export declare interface ContourOptions {
|
|
145
|
+
positive: ContourItem;
|
|
146
|
+
negative: ContourItem;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
declare interface ContourOptions_2 {
|
|
150
|
+
positive: {
|
|
151
|
+
contourLevels: [number, number];
|
|
152
|
+
numberOfLayers: number;
|
|
153
|
+
};
|
|
154
|
+
negative: {
|
|
155
|
+
contourLevels: [number, number];
|
|
156
|
+
numberOfLayers: number;
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export declare type ContoursLevels = Record<string, Level>;
|
|
161
|
+
|
|
162
|
+
export declare const CURRENT_EXPORT_VERSION = 9;
|
|
163
|
+
|
|
164
|
+
export declare type CustomWorkspaces = Record<string, InnerWorkspace>;
|
|
165
|
+
|
|
166
|
+
export declare interface Database {
|
|
167
|
+
key: string;
|
|
168
|
+
label: string;
|
|
169
|
+
url: string;
|
|
170
|
+
enabled: boolean;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
declare interface DatabasePanelPreferences {
|
|
174
|
+
previewJcamp: boolean;
|
|
175
|
+
showSmiles: boolean;
|
|
176
|
+
showSolvent: boolean;
|
|
177
|
+
showNames: boolean;
|
|
178
|
+
range: ColumnPreferences;
|
|
179
|
+
delta: ColumnPreferences;
|
|
180
|
+
showAssignment: boolean;
|
|
181
|
+
coupling: ColumnPreferences;
|
|
182
|
+
showMultiplicity: boolean;
|
|
183
|
+
color: string;
|
|
184
|
+
marginBottom: number;
|
|
185
|
+
allowSaveAsNMRium: boolean;
|
|
186
|
+
structureSize: {
|
|
187
|
+
minWidth: number;
|
|
188
|
+
minHeight: number;
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
declare interface Databases {
|
|
193
|
+
data: Database[];
|
|
194
|
+
defaultDatabase: string;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export declare type DataSelectionOption = 'ft' | 'fid' | 'both' | 'preferFT' | 'preferFID';
|
|
198
|
+
|
|
199
|
+
export declare type DeepPartial<T> = {
|
|
200
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
declare interface Display {
|
|
204
|
+
isVisible: boolean;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export declare interface Display1D extends Display {
|
|
208
|
+
color: string;
|
|
209
|
+
isPeaksMarkersVisible: boolean;
|
|
210
|
+
isRealSpectrumVisible: boolean;
|
|
211
|
+
isVisibleInDomain: boolean;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export declare interface Display2D extends Color2D, Display {
|
|
215
|
+
isPositiveVisible: boolean;
|
|
216
|
+
isNegativeVisible: boolean;
|
|
217
|
+
contourOptions: ContourOptions_2;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
declare interface DisplayPreferences {
|
|
221
|
+
general?: Partial<NMRiumGeneralPreferences>;
|
|
222
|
+
panels?: Partial<NMRiumPanelPreferences>;
|
|
223
|
+
toolBarButtons?: Partial<NMRiumToolBarPreferences>;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
declare type Experiment = 'proton' | 'carbon' | 'cosy' | 'hsqc' | 'hmbc';
|
|
227
|
+
|
|
228
|
+
export declare interface ExportPreferences {
|
|
229
|
+
png: ExportSettings;
|
|
230
|
+
svg: ExportSettings;
|
|
231
|
+
clipboard: ExportSettings;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export declare type ExportSettings = BasicExportSettings | AdvanceExportSettings;
|
|
235
|
+
|
|
236
|
+
export declare const EXTERNAL_API_KEYS: readonly [{
|
|
237
|
+
readonly key: "CT";
|
|
238
|
+
readonly description: "CT from NMR Solutions";
|
|
239
|
+
}];
|
|
240
|
+
|
|
241
|
+
export declare interface ExternalAPI {
|
|
242
|
+
key: ExternalAPIKeyType;
|
|
243
|
+
serverLink: string;
|
|
244
|
+
APIKey: string;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export declare type ExternalAPIKeyType = (typeof EXTERNAL_API_KEYS)[number]['key'];
|
|
248
|
+
|
|
249
|
+
declare type ExtractValues<T> = T[keyof T];
|
|
250
|
+
|
|
251
|
+
declare interface FloatingElement {
|
|
252
|
+
/**
|
|
253
|
+
* If the floating is shown.
|
|
254
|
+
*/
|
|
255
|
+
visible: boolean;
|
|
256
|
+
/**
|
|
257
|
+
* Floating position.
|
|
258
|
+
*/
|
|
259
|
+
bounding: BoundingBox;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export declare function formatSpectra(input: any): NmriumData;
|
|
263
|
+
|
|
264
|
+
export declare interface GeneralLoadersSelector {
|
|
265
|
+
/**
|
|
266
|
+
* priories processed or raw data if both exists
|
|
267
|
+
* @default 'both'
|
|
268
|
+
*/
|
|
269
|
+
dataSelection?: DataSelectionOption;
|
|
270
|
+
/**
|
|
271
|
+
* should we ignore 1D spectra
|
|
272
|
+
* @default true
|
|
273
|
+
*/
|
|
274
|
+
keep1D?: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* should we ignore 2D spectra
|
|
277
|
+
* @default true
|
|
278
|
+
*/
|
|
279
|
+
keep2D?: boolean;
|
|
280
|
+
/**
|
|
281
|
+
* should we keep only real part. we will ignore keepFID
|
|
282
|
+
* @default true
|
|
283
|
+
*/
|
|
284
|
+
onlyReal?: boolean;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
declare interface GeneralPreferences {
|
|
288
|
+
dimmedSpectraOpacity: number;
|
|
289
|
+
verticalSplitterPosition: SplitPaneSize;
|
|
290
|
+
verticalSplitterCloseThreshold: number;
|
|
291
|
+
spectraRendering: SpectraRendering;
|
|
292
|
+
loggingLevel: FifoLoggerOptions['level'];
|
|
293
|
+
popupLoggingLevel: FifoLoggerOptions['level'];
|
|
294
|
+
invert: boolean;
|
|
295
|
+
invertScroll: boolean;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export declare const generateID: () => UUID;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* It returns an element if the input is an array otherwise it returns the input.
|
|
302
|
+
* @param data - one list or single value
|
|
303
|
+
* @param index - index of the desired element, if the index is out of the boundaries it throws an error.
|
|
304
|
+
* @returns
|
|
305
|
+
*/
|
|
306
|
+
export declare function getOneIfArray<T extends PosibleInput>(data: T | T[], index?: number): T;
|
|
307
|
+
|
|
308
|
+
declare type IncludeData = 'rawData' | 'dataSource' | 'noData';
|
|
309
|
+
|
|
310
|
+
declare interface InfoBlock {
|
|
311
|
+
visible: boolean;
|
|
312
|
+
fields: InfoBlockField[];
|
|
313
|
+
position: {
|
|
314
|
+
x: number;
|
|
315
|
+
y: number;
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export declare interface InfoBlockField extends JpathTableColumn {
|
|
320
|
+
format: string;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export declare type InnerWorkspace = WorkspaceMeta & WorkspacePreferences;
|
|
324
|
+
|
|
325
|
+
declare interface IntegralsNucleusPreferences {
|
|
326
|
+
showSerialNumber: boolean;
|
|
327
|
+
absolute: ColumnPreferences;
|
|
328
|
+
relative: ColumnPreferences;
|
|
329
|
+
from: ColumnPreferences;
|
|
330
|
+
to: ColumnPreferences;
|
|
331
|
+
color: string;
|
|
332
|
+
strokeWidth: number;
|
|
333
|
+
showKind: boolean;
|
|
334
|
+
showDeleteAction: boolean;
|
|
335
|
+
isSumConstant: boolean;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export declare interface IntegralsViewState {
|
|
339
|
+
/**
|
|
340
|
+
* The ratio used to scale the integrals.
|
|
341
|
+
* @default 1
|
|
342
|
+
*/
|
|
343
|
+
scaleRatio: number;
|
|
344
|
+
/**
|
|
345
|
+
* boolean indicator to hide/show integrals values
|
|
346
|
+
* @default true
|
|
347
|
+
*/
|
|
348
|
+
showIntegralsValues: boolean;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
export declare type JpathLegendField = Omit<JpathTableColumn, 'label'>;
|
|
352
|
+
|
|
353
|
+
export declare interface JpathTableColumn extends BasicColumnPreferences {
|
|
354
|
+
jpath: string[];
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export declare type Layout = 'portrait' | 'landscape';
|
|
358
|
+
|
|
359
|
+
export declare type LegendField = JpathLegendField | PredefinedLegendField;
|
|
360
|
+
|
|
361
|
+
export declare interface Level {
|
|
362
|
+
positive: ContourItem;
|
|
363
|
+
negative: ContourItem;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
declare interface LoadersPreferences {
|
|
367
|
+
general: GeneralLoadersSelector;
|
|
368
|
+
bruker: BrukerLoaderSelector;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
declare type MatrixGeneration = Record<string, MatrixGenerationOptions>;
|
|
372
|
+
|
|
373
|
+
export declare interface MatrixGenerationOptions {
|
|
374
|
+
matrixOptions: MatrixOptions;
|
|
375
|
+
/**
|
|
376
|
+
* boolean indicator to hide/show box plot
|
|
377
|
+
* @default false
|
|
378
|
+
*/
|
|
379
|
+
showBoxPlot: boolean;
|
|
380
|
+
/**
|
|
381
|
+
* boolean indicator to hide/show stocsy
|
|
382
|
+
* @default false
|
|
383
|
+
*/
|
|
384
|
+
showStocsy: boolean;
|
|
385
|
+
/**
|
|
386
|
+
* The ratio used to vertical scale the stocsy and box plot.
|
|
387
|
+
* @default 1
|
|
388
|
+
*/
|
|
389
|
+
scaleRatio: number;
|
|
390
|
+
/**
|
|
391
|
+
* Chemical shift reference for stocsy
|
|
392
|
+
* @default null
|
|
393
|
+
*/
|
|
394
|
+
chemicalShift: number | null;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
declare type Metadata = Record<string, any>;
|
|
398
|
+
|
|
399
|
+
export declare function migrateSettings(input: any): any;
|
|
400
|
+
|
|
401
|
+
export declare type MoleculesView = Record<string, MoleculeView>;
|
|
402
|
+
|
|
403
|
+
export declare interface MoleculeView {
|
|
404
|
+
floating: FloatingElement;
|
|
405
|
+
/**
|
|
406
|
+
* Show/Hide atoms numbers on the molecule.
|
|
407
|
+
*/
|
|
408
|
+
showAtomNumber: boolean;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
declare type MultipleSpectraAnalysis = Record<string, MultipleSpectraAnalysisPreferences>;
|
|
412
|
+
|
|
413
|
+
export declare interface MultipleSpectraAnalysisPreferences {
|
|
414
|
+
analysisOptions: AnalysisPreferences;
|
|
415
|
+
legendsFields: LegendField[];
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export declare class NMRiumCore {
|
|
419
|
+
readonly version = 9;
|
|
420
|
+
private readonly plugins;
|
|
421
|
+
registerPlugin(plugin: NMRiumPlugin): void;
|
|
422
|
+
registerPlugins(plugins: NMRiumPlugin[]): void;
|
|
423
|
+
private migrate;
|
|
424
|
+
read(input: FileCollection | FileCollectionItem, options?: Partial<ParsingOptions>): ReturnType<typeof read>;
|
|
425
|
+
readNMRiumObject(nmriumObjectInput: object, options?: ParsingOptions): Promise<Partial<NmriumState>>;
|
|
426
|
+
readFromWebSource(source: WebSource, options?: ParsingOptions): Promise<Partial<NmriumState>>;
|
|
427
|
+
serializeNmriumState(nmriumState: NmriumState, options?: SerializeNmriumStateOptions): SerializedNmriumState;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
export declare interface NmriumData extends BaseNmriumData {
|
|
431
|
+
spectra: Spectrum[];
|
|
432
|
+
source?: WebSource;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
export declare interface NmriumDataSource extends BaseNmriumData {
|
|
436
|
+
spectra: SpectraSource[];
|
|
437
|
+
source: WebSource;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
export declare interface NMRiumGeneralPreferences {
|
|
441
|
+
hideGeneralSettings: boolean;
|
|
442
|
+
experimentalFeatures: PanelPreferencesType;
|
|
443
|
+
hidePanelOnLoad: boolean;
|
|
444
|
+
hideLogs: boolean;
|
|
445
|
+
hideWorkspaces: boolean;
|
|
446
|
+
hideHelp: boolean;
|
|
447
|
+
hideMaximize: boolean;
|
|
448
|
+
hidePanelsBar: boolean;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export declare interface NMRiumPanelPreferences {
|
|
452
|
+
spectraPanel: PanelPreferencesType;
|
|
453
|
+
informationPanel: PanelPreferencesType;
|
|
454
|
+
peaksPanel: PanelPreferencesType;
|
|
455
|
+
integralsPanel: PanelPreferencesType;
|
|
456
|
+
rangesPanel: PanelPreferencesType;
|
|
457
|
+
structuresPanel: PanelPreferencesType;
|
|
458
|
+
processingsPanel: PanelPreferencesType;
|
|
459
|
+
zonesPanel: PanelPreferencesType;
|
|
460
|
+
summaryPanel: PanelPreferencesType;
|
|
461
|
+
multipleSpectraAnalysisPanel: PanelPreferencesType;
|
|
462
|
+
databasePanel: PanelPreferencesType;
|
|
463
|
+
predictionPanel: PanelPreferencesType;
|
|
464
|
+
automaticAssignmentPanel: PanelPreferencesType;
|
|
465
|
+
matrixGenerationPanel: PanelPreferencesType;
|
|
466
|
+
simulationPanel: PanelPreferencesType;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export declare interface NMRiumPlugin {
|
|
470
|
+
id: string;
|
|
471
|
+
version: number;
|
|
472
|
+
migrations: NMRiumPluginMigration[];
|
|
473
|
+
onReadProcess?: NMRiumPluginOnReadProcess;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export declare interface NMRiumPluginMigration {
|
|
477
|
+
up(state: any): any;
|
|
478
|
+
minCore: number;
|
|
479
|
+
maxCore?: number;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
export declare interface NMRiumPluginOnReadProcess {
|
|
483
|
+
/**
|
|
484
|
+
* Hooks on processFileCollection, in first steps, to extract data from file collection.
|
|
485
|
+
* Usefully to parse files like nmredata, jcamp, bruker, etc.
|
|
486
|
+
* @param files
|
|
487
|
+
* @param options
|
|
488
|
+
*/
|
|
489
|
+
onFiles?: (files: FileCollection, options?: ParsingOptions) => Promise<NmriumData>;
|
|
490
|
+
/**
|
|
491
|
+
* Filter file loader by extension.
|
|
492
|
+
* Extensions should be in lowercase.
|
|
493
|
+
*/
|
|
494
|
+
supportedExtensions?: string[];
|
|
495
|
+
/**
|
|
496
|
+
* Hooks on processFileCollection, on file iteration.
|
|
497
|
+
* Each file could be processed by all plugins to load and merge to nmrium data.
|
|
498
|
+
* use `supportedExtensions` to filter files to be processed by the plugin.
|
|
499
|
+
* @param file
|
|
500
|
+
* @param options
|
|
501
|
+
*/
|
|
502
|
+
onFile?: (file: FileCollectionItem, options?: ParsingOptions) => Promise<NmriumData>;
|
|
503
|
+
/**
|
|
504
|
+
* Hooks on processFileCollection, in last steps, after fully load data.
|
|
505
|
+
* Filter data, apply processing, etc.
|
|
506
|
+
* This method is synchronous and should mutate the state.
|
|
507
|
+
* @param files
|
|
508
|
+
* @param options
|
|
509
|
+
*/
|
|
510
|
+
onProcessing?: (state: Partial<NmriumState>, options: OnReadProcessOnProcessingOptions) => void;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
export declare interface NmriumState {
|
|
514
|
+
version: number;
|
|
515
|
+
data: NmriumData;
|
|
516
|
+
settings: Workspace;
|
|
517
|
+
view: ViewState;
|
|
518
|
+
plugins: NmriumStatePlugins;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Plugins should do declaration merging on this interface so `NmriumStatePlugins satisfies Record<string, NmriumStateBasePlugin>`
|
|
523
|
+
* https://www.typescriptlang.org/docs/handbook/declaration-merging.html
|
|
524
|
+
*
|
|
525
|
+
* @example Minimal plugin declaration
|
|
526
|
+
* ```ts
|
|
527
|
+
* import type { NmriumStatePlugins, NmriumStateBasePlugin } from 'nmrium-core';
|
|
528
|
+
*
|
|
529
|
+
* export interface NmriumStatePlugins {
|
|
530
|
+
* 'nmrium-core-plugins#Bruker': NmriumStateBasePlugin;
|
|
531
|
+
* }
|
|
532
|
+
* ```
|
|
533
|
+
*/
|
|
534
|
+
declare interface NmriumStatePlugins {
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
export declare interface NMRiumToolBarPreferences {
|
|
538
|
+
zoom: boolean;
|
|
539
|
+
zoomOut: boolean;
|
|
540
|
+
import: boolean;
|
|
541
|
+
exportAs: boolean;
|
|
542
|
+
spectraStackAlignments: boolean;
|
|
543
|
+
spectraCenterAlignments: boolean;
|
|
544
|
+
realImaginary: boolean;
|
|
545
|
+
peakPicking: boolean;
|
|
546
|
+
integral: boolean;
|
|
547
|
+
zonePicking: boolean;
|
|
548
|
+
slicing: boolean;
|
|
549
|
+
rangePicking: boolean;
|
|
550
|
+
zeroFilling: boolean;
|
|
551
|
+
zeroFillingDimension1: boolean;
|
|
552
|
+
zeroFillingDimension2: boolean;
|
|
553
|
+
apodization: boolean;
|
|
554
|
+
apodizationDimension1: boolean;
|
|
555
|
+
apodizationDimension2: boolean;
|
|
556
|
+
phaseCorrection: boolean;
|
|
557
|
+
phaseCorrectionTwoDimensions: boolean;
|
|
558
|
+
baselineCorrection: boolean;
|
|
559
|
+
fft: boolean;
|
|
560
|
+
fftDimension1: boolean;
|
|
561
|
+
fftDimension2: boolean;
|
|
562
|
+
multipleSpectraAnalysis: boolean;
|
|
563
|
+
exclusionZones: boolean;
|
|
564
|
+
autoRangeAndZonePicking: boolean;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* Plugins should use Declaration Merging on this interface
|
|
569
|
+
*/
|
|
570
|
+
export declare interface NmrLoaderSelectors {
|
|
571
|
+
general?: GeneralLoadersSelector;
|
|
572
|
+
files?: string[];
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
export declare interface NucleiPreferences {
|
|
576
|
+
nucleus: string;
|
|
577
|
+
ppmFormat: string;
|
|
578
|
+
hzFormat: string;
|
|
579
|
+
axisFrom?: number;
|
|
580
|
+
axisTo?: number;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
export declare interface OnLoadProcessing {
|
|
584
|
+
autoProcessing: boolean;
|
|
585
|
+
filters?: Partial<Record<string, AutoProcessingFilterEntry[]>>;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
export declare interface OnReadProcessOnProcessingOptions extends OnLoadProcessing {
|
|
589
|
+
experimentalFeatures?: boolean;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
export declare type PageSizeName = 'Letter' | 'Legal' | 'Tabloid' | 'Executive' | 'Statement' | 'Folio' | 'A3' | 'A4' | 'A5' | 'B4' | 'B5';
|
|
593
|
+
|
|
594
|
+
export declare interface PanelPreferencesType {
|
|
595
|
+
display: boolean;
|
|
596
|
+
visible: boolean;
|
|
597
|
+
open?: boolean;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
export declare interface PanelsPreferences {
|
|
601
|
+
spectra: BaseNucleusPreferences<SpectraPreferences>;
|
|
602
|
+
peaks: BaseNucleusPreferences<PeaksNucleusPreferences>;
|
|
603
|
+
integrals: BaseNucleusPreferences<IntegralsNucleusPreferences>;
|
|
604
|
+
ranges: BaseNucleusPreferences<RangesNucleusPreferences>;
|
|
605
|
+
zones: BaseNucleus1DPreferences<Zones1DNucleusPreferences> | BaseNucleus2DPreferences<Zones2DNucleusPreferences>;
|
|
606
|
+
database: DatabasePanelPreferences;
|
|
607
|
+
multipleSpectraAnalysis: MultipleSpectraAnalysis;
|
|
608
|
+
matrixGeneration: MatrixGeneration;
|
|
609
|
+
prediction: PredictionOptions;
|
|
610
|
+
structures: BaseNucleusPreferences<StructuresPreferences>;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
export declare interface ParsingOptions {
|
|
614
|
+
name?: string;
|
|
615
|
+
converter?: Partial<ParsingOptionsConverter>;
|
|
616
|
+
sourceSelector?: Partial<NmrLoaderSelectors>;
|
|
617
|
+
/**
|
|
618
|
+
* if it is true the source object with files will be keeped
|
|
619
|
+
* @default false
|
|
620
|
+
*/
|
|
621
|
+
keepSource?: boolean;
|
|
622
|
+
onLoadProcessing?: OnLoadProcessing;
|
|
623
|
+
experimentalFeatures?: boolean;
|
|
624
|
+
logger?: Logger;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* Plugins should use Declaration Merging on this interface
|
|
629
|
+
*/
|
|
630
|
+
export declare interface ParsingOptionsConverter {
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
export declare interface PeaksLabel {
|
|
634
|
+
marginTop: number;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
export declare interface PeaksNucleusPreferences {
|
|
638
|
+
showSerialNumber: boolean;
|
|
639
|
+
deltaPPM: ColumnPreferences;
|
|
640
|
+
deltaHz: ColumnPreferences;
|
|
641
|
+
peakWidth: ColumnPreferences;
|
|
642
|
+
intensity: ColumnPreferences;
|
|
643
|
+
fwhm: ColumnPreferences;
|
|
644
|
+
mu: ColumnPreferences;
|
|
645
|
+
gamma: ColumnPreferences;
|
|
646
|
+
showDeleteAction: boolean;
|
|
647
|
+
showEditPeakShapeAction: boolean;
|
|
648
|
+
showKind: boolean;
|
|
649
|
+
defaultViewOptions?: Partial<PeaksViewState>;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
export declare interface PeaksViewState {
|
|
653
|
+
/**
|
|
654
|
+
* boolean indicator to hide/show peaks for spectrum
|
|
655
|
+
* @default true
|
|
656
|
+
*/
|
|
657
|
+
showPeaks: boolean;
|
|
658
|
+
/**
|
|
659
|
+
* boolean indicator to hide/show peaks for shapes spectrum
|
|
660
|
+
* @default false
|
|
661
|
+
*/
|
|
662
|
+
showPeaksShapes: boolean;
|
|
663
|
+
/**
|
|
664
|
+
* boolean indicator to hide/show peaks sum for spectrum
|
|
665
|
+
* @default false
|
|
666
|
+
*/
|
|
667
|
+
showPeaksSum: boolean;
|
|
668
|
+
/**
|
|
669
|
+
* displaying mode
|
|
670
|
+
* @default 'spread'
|
|
671
|
+
*/
|
|
672
|
+
displayingMode: 'spread' | 'single';
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
declare type PosibleInput = string | number | boolean;
|
|
676
|
+
|
|
677
|
+
declare type PredefinedLegend = 'intensity' | 'name';
|
|
678
|
+
|
|
679
|
+
export declare type PredefinedLegendField = Omit<PredefinedTableColumn<PredefinedLegend>, 'description'>;
|
|
680
|
+
|
|
681
|
+
export declare type PredefinedSpectraColumn = 'visible' | 'color';
|
|
682
|
+
|
|
683
|
+
export declare interface PredefinedTableColumn<T> extends BasicColumnPreferences {
|
|
684
|
+
name: T;
|
|
685
|
+
description: string;
|
|
686
|
+
jpath?: string[];
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
export declare interface PredictionOptions {
|
|
690
|
+
name: string;
|
|
691
|
+
frequency: number;
|
|
692
|
+
'1d': {
|
|
693
|
+
'1H': {
|
|
694
|
+
from: number;
|
|
695
|
+
to: number;
|
|
696
|
+
};
|
|
697
|
+
'13C': {
|
|
698
|
+
from: number;
|
|
699
|
+
to: number;
|
|
700
|
+
};
|
|
701
|
+
nbPoints: number;
|
|
702
|
+
lineWidth: number;
|
|
703
|
+
};
|
|
704
|
+
'2d': {
|
|
705
|
+
nbPoints: {
|
|
706
|
+
x: number;
|
|
707
|
+
y: number;
|
|
708
|
+
};
|
|
709
|
+
};
|
|
710
|
+
autoExtendRange: boolean;
|
|
711
|
+
spectra: SpectraPredictionOptions;
|
|
712
|
+
logger: Logger;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
export declare interface PrintPageOptions {
|
|
716
|
+
size: PageSizeName;
|
|
717
|
+
layout: Layout;
|
|
718
|
+
margin: number;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
declare interface RangesNucleusPreferences {
|
|
722
|
+
showSerialNumber: boolean;
|
|
723
|
+
from: ColumnPreferences;
|
|
724
|
+
to: ColumnPreferences;
|
|
725
|
+
absolute: ColumnPreferences;
|
|
726
|
+
relative: ColumnPreferences;
|
|
727
|
+
deltaPPM: ColumnPreferences;
|
|
728
|
+
deltaHz: ColumnPreferences;
|
|
729
|
+
coupling: ColumnPreferences;
|
|
730
|
+
jGraphTolerance: number;
|
|
731
|
+
showKind: boolean;
|
|
732
|
+
showMultiplicity: boolean;
|
|
733
|
+
showAssignment: boolean;
|
|
734
|
+
showAssignmentLabel: boolean;
|
|
735
|
+
showDeleteAction: boolean;
|
|
736
|
+
showZoomAction: boolean;
|
|
737
|
+
showEditAction: boolean;
|
|
738
|
+
defaultViewOptions?: Partial<RangesViewState>;
|
|
739
|
+
isSumConstant: boolean;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
export declare interface RangesViewState {
|
|
743
|
+
/**
|
|
744
|
+
* boolean indicator to hide/show peaks for spectrum
|
|
745
|
+
* @default true
|
|
746
|
+
*/
|
|
747
|
+
showPeaks: boolean;
|
|
748
|
+
/**
|
|
749
|
+
* boolean indicator to hide/show multiplicity tree
|
|
750
|
+
* @default false
|
|
751
|
+
*/
|
|
752
|
+
showMultiplicityTrees: boolean;
|
|
753
|
+
/**
|
|
754
|
+
* boolean indicator to hide/show J graph for spectrum signals
|
|
755
|
+
* @default false
|
|
756
|
+
*/
|
|
757
|
+
showJGraph: boolean;
|
|
758
|
+
/**
|
|
759
|
+
* boolean indicator to hide/show integrals for the spectrum ranges
|
|
760
|
+
* @default true
|
|
761
|
+
*/
|
|
762
|
+
showIntegrals: boolean;
|
|
763
|
+
/**
|
|
764
|
+
* boolean indicator to hide/show integrals values for the spectrum ranges
|
|
765
|
+
* @default true
|
|
766
|
+
*/
|
|
767
|
+
showIntegralsValues: boolean;
|
|
768
|
+
/**
|
|
769
|
+
* The ratio used to scale the integrals.
|
|
770
|
+
* @default 1
|
|
771
|
+
*/
|
|
772
|
+
integralsScaleRatio: number;
|
|
773
|
+
/**
|
|
774
|
+
* displaying mode
|
|
775
|
+
* @default 'spread'
|
|
776
|
+
*/
|
|
777
|
+
displayingMode: 'spread' | 'single';
|
|
778
|
+
/**
|
|
779
|
+
* boolean indicator to hide/show assignments labels on ranges
|
|
780
|
+
* @default false
|
|
781
|
+
*/
|
|
782
|
+
showAssignmentsLabels: boolean;
|
|
783
|
+
/**
|
|
784
|
+
* boolean indicator to hide/show publication string over spectrum
|
|
785
|
+
* @default false
|
|
786
|
+
*/
|
|
787
|
+
showPublicationString: boolean;
|
|
788
|
+
/**
|
|
789
|
+
* boolean indicator to hide/show publication string over spectrum
|
|
790
|
+
* @default false
|
|
791
|
+
*/
|
|
792
|
+
/**
|
|
793
|
+
* publication string box dimension and position
|
|
794
|
+
*/
|
|
795
|
+
publicationStringBounding: BoundingBox;
|
|
796
|
+
/**
|
|
797
|
+
* boolean indicator to hide/show ranges over spectrum
|
|
798
|
+
* @default false
|
|
799
|
+
*/
|
|
800
|
+
showRanges: boolean;
|
|
801
|
+
/**
|
|
802
|
+
* ranges box dimension and position
|
|
803
|
+
*/
|
|
804
|
+
rangesBounding: BoundingBox;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
declare function read(_options: ReadOptions): Promise<ReadReturn>;
|
|
808
|
+
|
|
809
|
+
declare interface ReadOptions {
|
|
810
|
+
input: FileCollection | FileCollectionItem;
|
|
811
|
+
migrator: (state: object) => any;
|
|
812
|
+
plugins: Map<string, NMRiumPlugin>;
|
|
813
|
+
options?: ParsingOptions;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
declare interface ReadReturn {
|
|
817
|
+
nmriumState: Partial<NmriumState>;
|
|
818
|
+
containsNmrium: boolean;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
declare interface SerializeNmriumStateOptions {
|
|
822
|
+
includeData?: IncludeData;
|
|
823
|
+
includeSettings?: boolean;
|
|
824
|
+
includeView?: boolean;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
export declare interface SpectraAnalysisColumn {
|
|
828
|
+
type: AnalysisColumnsTypes;
|
|
829
|
+
valueKey: AnalysisColumnsValuesKeys;
|
|
830
|
+
from: number;
|
|
831
|
+
to: number;
|
|
832
|
+
formula?: string;
|
|
833
|
+
index: number;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
export declare type SpectraAnalysisColumns = Record<string, SpectraAnalysisColumn>;
|
|
837
|
+
|
|
838
|
+
export declare interface SpectraColors {
|
|
839
|
+
/**
|
|
840
|
+
* Default colors for 1D spectra.
|
|
841
|
+
*/
|
|
842
|
+
oneDimension: SpectrumOneDimensionColor[];
|
|
843
|
+
/**
|
|
844
|
+
* Default colors for 2D spectra.
|
|
845
|
+
*/
|
|
846
|
+
twoDimensions: SpectrumTwoDimensionsColor[];
|
|
847
|
+
/**
|
|
848
|
+
* Color used to highlight assignments.
|
|
849
|
+
*/
|
|
850
|
+
highlightColor: string;
|
|
851
|
+
/**
|
|
852
|
+
* Color for indicator lines in phase correction, baseline correction, and apodization.
|
|
853
|
+
*/
|
|
854
|
+
indicatorLineColor: string;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
declare type SpectraPredictionOptions = Record<Experiment, boolean>;
|
|
858
|
+
|
|
859
|
+
export declare interface SpectraPreferences {
|
|
860
|
+
columns: SpectraTableColumn[];
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
export declare type SpectraRendering = 'auto' | 'optimizeSpeed' | 'crispEdges' | 'geometricPrecision';
|
|
864
|
+
|
|
865
|
+
declare type SpectraSource = Spectrum1DSource | Spectrum2DSource;
|
|
866
|
+
|
|
867
|
+
export declare type SpectraTableColumn = PredefinedTableColumn<PredefinedSpectraColumn> | JpathTableColumn;
|
|
868
|
+
|
|
869
|
+
export declare type Spectrum = Spectrum1D | Spectrum2D;
|
|
870
|
+
|
|
871
|
+
export declare interface Spectrum1D extends BaseSpectrum {
|
|
872
|
+
data: NmrData1D;
|
|
873
|
+
originalData?: NmrData1D;
|
|
874
|
+
peaks: Peaks;
|
|
875
|
+
display: Display1D;
|
|
876
|
+
integrals: Integrals;
|
|
877
|
+
ranges: Ranges;
|
|
878
|
+
info: Info1D;
|
|
879
|
+
originalInfo?: Info1D;
|
|
880
|
+
filters: Filter1DEntry[];
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
export declare type Spectrum1DSource = Partial<Spectrum1D>;
|
|
884
|
+
|
|
885
|
+
export declare interface Spectrum2D extends BaseSpectrum {
|
|
886
|
+
zones: Zones;
|
|
887
|
+
data: NmrData2D;
|
|
888
|
+
info: Info2D;
|
|
889
|
+
originalInfo?: Info2D;
|
|
890
|
+
display: Display2D;
|
|
891
|
+
originalData?: NmrData2D;
|
|
892
|
+
filters: Filter2DEntry[];
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
export declare type Spectrum2DSource = Partial<Spectrum2D>;
|
|
896
|
+
|
|
897
|
+
declare interface SpectrumColor {
|
|
898
|
+
jpath: string[];
|
|
899
|
+
value: string;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
export declare interface SpectrumOneDimensionColor extends SpectrumColor {
|
|
903
|
+
color: string;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
export declare interface SpectrumTwoDimensionsColor extends SpectrumColor {
|
|
907
|
+
positiveColor: string;
|
|
908
|
+
negativeColor: string;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
declare type SplitPaneSize = `${number}%` | `${number}px`;
|
|
912
|
+
|
|
913
|
+
export declare interface StateMolecule {
|
|
914
|
+
id?: string;
|
|
915
|
+
molfile: string;
|
|
916
|
+
label?: string;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
declare interface StructuresPreferences {
|
|
920
|
+
defaultViewOptions?: Partial<MoleculeView>;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
export declare interface SumOptions {
|
|
924
|
+
/**
|
|
925
|
+
* @default true
|
|
926
|
+
*/
|
|
927
|
+
isSumConstant: boolean;
|
|
928
|
+
/**
|
|
929
|
+
* If you force the "sum" the mf should not be exists any more otherwise if mf is exists the "sum" must be null or undefined
|
|
930
|
+
* @default undefined
|
|
931
|
+
*/
|
|
932
|
+
sum: number | undefined;
|
|
933
|
+
/**
|
|
934
|
+
* @default true
|
|
935
|
+
*/
|
|
936
|
+
sumAuto: boolean;
|
|
937
|
+
/**
|
|
938
|
+
* mf will be set automatically for the first time based on the first molecules unless the user change it
|
|
939
|
+
* example 'C10H20O3'
|
|
940
|
+
*/
|
|
941
|
+
mf?: string;
|
|
942
|
+
/**
|
|
943
|
+
* key of the selected molecule
|
|
944
|
+
*/
|
|
945
|
+
moleculeId?: string;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
export declare type Unit = UnitElement['unit'];
|
|
949
|
+
|
|
950
|
+
declare type UnitElement = (typeof units)[number];
|
|
951
|
+
|
|
952
|
+
export declare type UnitName = UnitElement['name'];
|
|
953
|
+
|
|
954
|
+
export declare const units: readonly [{
|
|
955
|
+
readonly name: "pixels";
|
|
956
|
+
readonly unit: "px";
|
|
957
|
+
}, {
|
|
958
|
+
readonly name: "inches";
|
|
959
|
+
readonly unit: "in";
|
|
960
|
+
}, {
|
|
961
|
+
readonly name: "feet";
|
|
962
|
+
readonly unit: "ft";
|
|
963
|
+
}, {
|
|
964
|
+
readonly name: "yards";
|
|
965
|
+
readonly unit: "yd";
|
|
966
|
+
}, {
|
|
967
|
+
readonly name: "centimeters";
|
|
968
|
+
readonly unit: "cm";
|
|
969
|
+
}, {
|
|
970
|
+
readonly name: "millimeters";
|
|
971
|
+
readonly unit: "mm";
|
|
972
|
+
}, {
|
|
973
|
+
readonly name: "meters";
|
|
974
|
+
readonly unit: "m";
|
|
975
|
+
}, {
|
|
976
|
+
readonly name: "points";
|
|
977
|
+
readonly unit: "pt";
|
|
978
|
+
}, {
|
|
979
|
+
readonly name: "picas";
|
|
980
|
+
readonly unit: "pc";
|
|
981
|
+
}];
|
|
982
|
+
|
|
983
|
+
export declare type VerticalAlignment = 'bottom' | 'center' | 'stack';
|
|
984
|
+
|
|
985
|
+
export declare interface ViewState {
|
|
986
|
+
/**
|
|
987
|
+
* Molecules view properties
|
|
988
|
+
* @default []
|
|
989
|
+
*/
|
|
990
|
+
molecules: MoleculesView;
|
|
991
|
+
ranges: Record<string, RangesViewState>;
|
|
992
|
+
zones: Record<string, ZonesViewState>;
|
|
993
|
+
integrals: Record<string, IntegralsViewState>;
|
|
994
|
+
/**
|
|
995
|
+
* peaks view property
|
|
996
|
+
* where the key is the id of the spectrum
|
|
997
|
+
*/
|
|
998
|
+
peaks: Record<string, PeaksViewState>;
|
|
999
|
+
spectra: {
|
|
1000
|
+
/**
|
|
1001
|
+
* active spectrum id per nucleus
|
|
1002
|
+
* @default {}
|
|
1003
|
+
*/
|
|
1004
|
+
activeSpectra: Record<string, ActiveSpectrum[] | null>;
|
|
1005
|
+
selectReferences: Record<string, string>;
|
|
1006
|
+
/**
|
|
1007
|
+
* current select tab (nucleus)
|
|
1008
|
+
* @default null
|
|
1009
|
+
*/
|
|
1010
|
+
activeTab: string;
|
|
1011
|
+
/**
|
|
1012
|
+
* show the spectra legend and the intensity
|
|
1013
|
+
* @default false
|
|
1014
|
+
*/
|
|
1015
|
+
showLegend: boolean;
|
|
1016
|
+
/**
|
|
1017
|
+
* show the similarity tree
|
|
1018
|
+
* @default false
|
|
1019
|
+
*/
|
|
1020
|
+
showSimilarityTree: boolean;
|
|
1021
|
+
};
|
|
1022
|
+
zoom: {
|
|
1023
|
+
levels: ContoursLevels;
|
|
1024
|
+
};
|
|
1025
|
+
/**
|
|
1026
|
+
* options to control spectra vertical alignment
|
|
1027
|
+
* @default 'bottom'
|
|
1028
|
+
*/
|
|
1029
|
+
verticalAlign: Partial<Record<string, VerticalAlignment>>;
|
|
1030
|
+
/**
|
|
1031
|
+
* where the key is the molecule id and the value is an array of spectra Ids
|
|
1032
|
+
*/
|
|
1033
|
+
predictions: Record<string, string[]>;
|
|
1034
|
+
/**
|
|
1035
|
+
* the current simulated spectrum key
|
|
1036
|
+
*/
|
|
1037
|
+
currentSimulatedSpectrumKey: string | null;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
export declare interface WheelOptions {
|
|
1041
|
+
shiftKey: boolean;
|
|
1042
|
+
contourOptions: ContourOptions;
|
|
1043
|
+
currentLevel: Level;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
export declare type Workspace = WorkspaceMeta & Required<WorkspacePreferences>;
|
|
1047
|
+
|
|
1048
|
+
declare interface WorkspaceMeta {
|
|
1049
|
+
label: string;
|
|
1050
|
+
/**
|
|
1051
|
+
* boolean indicator to hide/show Workspace
|
|
1052
|
+
* @default false
|
|
1053
|
+
*/
|
|
1054
|
+
visible?: boolean;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
export declare interface WorkSpacePanelPreferences {
|
|
1058
|
+
spectra: SpectraPreferences;
|
|
1059
|
+
peaks: PeaksNucleusPreferences;
|
|
1060
|
+
integrals: IntegralsNucleusPreferences;
|
|
1061
|
+
ranges: RangesNucleusPreferences;
|
|
1062
|
+
zones: Zones1DNucleusPreferences | Zones2DNucleusPreferences;
|
|
1063
|
+
database: DatabasePanelPreferences;
|
|
1064
|
+
multipleSpectraAnalysis: MultipleSpectraAnalysis;
|
|
1065
|
+
matrixGeneration: MatrixGeneration;
|
|
1066
|
+
prediction: PredictionOptions;
|
|
1067
|
+
structures: StructuresPreferences;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
export declare interface WorkspacePreferences {
|
|
1071
|
+
display?: DisplayPreferences;
|
|
1072
|
+
general?: GeneralPreferences;
|
|
1073
|
+
panels?: Partial<PanelsPreferences>;
|
|
1074
|
+
nuclei?: NucleiPreferences[];
|
|
1075
|
+
databases?: Databases;
|
|
1076
|
+
nmrLoaders?: LoadersPreferences;
|
|
1077
|
+
infoBlock?: InfoBlock;
|
|
1078
|
+
onLoadProcessing?: OnLoadProcessing;
|
|
1079
|
+
spectraColors?: SpectraColors;
|
|
1080
|
+
printPageOptions?: Partial<PrintPageOptions>;
|
|
1081
|
+
externalAPIs?: ExternalAPI[];
|
|
1082
|
+
export?: ExportPreferences;
|
|
1083
|
+
peaksLabel?: PeaksLabel;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
/**
|
|
1087
|
+
* custom : workspace which come form the component level <NMRium customWorkspaces = {} />
|
|
1088
|
+
* predefined : workspace which hardcoded in NMRium
|
|
1089
|
+
* user: workspaces which the user create from the general settings
|
|
1090
|
+
* component: workspaces which specified at the level of the component `preferences` property
|
|
1091
|
+
* nmriumFile: workspaces which is come from the the numrium file
|
|
1092
|
+
*
|
|
1093
|
+
* */
|
|
1094
|
+
export declare type WorkSpaceSource = 'custom' | 'predefined' | 'user' | 'component' | 'nmriumFile';
|
|
1095
|
+
|
|
1096
|
+
export declare interface Zones1DNucleusPreferences {
|
|
1097
|
+
deltaPPM: ColumnPreferences;
|
|
1098
|
+
defaultViewOptions?: Partial<ZonesViewState>;
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
export declare interface Zones2DNucleusPreferences {
|
|
1102
|
+
showSerialNumber: boolean;
|
|
1103
|
+
showKind: boolean;
|
|
1104
|
+
showDeleteAction: boolean;
|
|
1105
|
+
showZoomAction: boolean;
|
|
1106
|
+
showEditAction: boolean;
|
|
1107
|
+
showAssignment: boolean;
|
|
1108
|
+
/**
|
|
1109
|
+
* boolean indicator to hide/show assignments labels column in zones table
|
|
1110
|
+
* @default false
|
|
1111
|
+
*/
|
|
1112
|
+
showAssignmentLabel: boolean;
|
|
1113
|
+
defaultViewOptions?: Partial<ZonesViewState>;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
export declare interface ZonesViewState {
|
|
1117
|
+
/**
|
|
1118
|
+
* boolean indicator to hide/show zones
|
|
1119
|
+
* @default false
|
|
1120
|
+
*/
|
|
1121
|
+
showZones: boolean;
|
|
1122
|
+
/**
|
|
1123
|
+
* boolean indicator to hide/show signals for spectrum zones
|
|
1124
|
+
* @default false
|
|
1125
|
+
*/
|
|
1126
|
+
showSignals: boolean;
|
|
1127
|
+
/**
|
|
1128
|
+
* boolean indicator to hide/show peaks for spectrum zones
|
|
1129
|
+
* @default true
|
|
1130
|
+
*/
|
|
1131
|
+
showPeaks: boolean;
|
|
1132
|
+
/**
|
|
1133
|
+
* boolean indicator to hide/show assignments labels on zones
|
|
1134
|
+
* @default false
|
|
1135
|
+
*/
|
|
1136
|
+
showAssignmentsLabels: boolean;
|
|
1137
|
+
/**
|
|
1138
|
+
* Coordinates of zones assignment labels, with zone IDs as keys
|
|
1139
|
+
*/
|
|
1140
|
+
assignmentsLabelsCoordinates: Record<string, {
|
|
1141
|
+
x: number;
|
|
1142
|
+
y: number;
|
|
1143
|
+
}>;
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
export { }
|