|
1 | 1 | import type { BaselineCorrectionZone } from '@zakodium/nmr-types'; |
2 | 2 | import type { Spectrum, ViewState } from '@zakodium/nmrium-core'; |
3 | | -import type { FileCollection, Source } from 'file-collection'; |
| 3 | +import type { Source } from 'file-collection'; |
| 4 | +import { FileCollection } from 'file-collection'; |
4 | 5 | import type { Draft } from 'immer'; |
5 | 6 | import { original, produce } from 'immer'; |
6 | 7 | import type { CorrelationData } from 'nmr-correlation'; |
@@ -114,7 +115,7 @@ export function getDefaultViewState(): ViewState { |
114 | 115 | export const getInitialState = (): State => ({ |
115 | 116 | actionType: 'INITIALIZE_NMRIUM', |
116 | 117 | sources: {}, |
117 | | - fileCollections: {}, |
| 118 | + aggregator: new FileCollection(), |
118 | 119 | data: [], |
119 | 120 | tempData: null, |
120 | 121 | xDomain: [], |
@@ -192,15 +193,20 @@ export interface State { |
192 | 193 |
|
193 | 194 | /** |
194 | 195 | * web source of data |
195 | | - * Record key is identifier of the source (stored in spectra) |
| 196 | + * Record key is an identifier of the source (stored in spectra) |
| 197 | + * |
| 198 | + * Is needed until we remove the support of the old nmrium format |
196 | 199 | */ |
197 | 200 | sources: Record<string, Source>; |
198 | 201 |
|
199 | 202 | /** |
200 | | - * File collections of the loaded files |
201 | | - * Record key is identifier of the fileCollection (stored in spectra) |
| 203 | + * Aggregation of file collections used to load the data |
| 204 | + * - external data sources (web-source, import jdx from url, ...) |
| 205 | + * - multiples files open / drag and drop |
| 206 | + * |
| 207 | + * Each of them is separated in an uuid folder |
202 | 208 | */ |
203 | | - fileCollections: Record<string, FileCollection>; |
| 209 | + aggregator: FileCollection; |
204 | 210 |
|
205 | 211 | /** |
206 | 212 | * spectra list (1d and 2d) |
|
0 commit comments