( sheetDefinitions: SheetDefinition[] )
| 34 | } |
| 35 | |
| 36 | export function buildInitialState( |
| 37 | sheetDefinitions: SheetDefinition[] |
| 38 | ): ImporterState { |
| 39 | return { |
| 40 | sheetDefinitions, |
| 41 | currentSheetId: sheetDefinitions[0].id, |
| 42 | mode: 'upload', |
| 43 | validationErrors: [], |
| 44 | validationInProgress: false, |
| 45 | sheetData: sheetDefinitions.map((sheet) => ({ |
| 46 | sheetId: sheet.id, |
| 47 | rows: [], |
| 48 | })), |
| 49 | importProgress: 0, |
| 50 | }; |
| 51 | } |
| 52 | |
| 53 | async function buildStateWithIndexedDB( |
| 54 | sheetDefinitions: SheetDefinition[], |
no outgoing calls
no test coverage detected