()
| 86 | } |
| 87 | |
| 88 | public async getState(): Promise<ImporterState> { |
| 89 | let state = this.initialState; |
| 90 | |
| 91 | this.buildSteps.forEach((step) => { |
| 92 | state = reducer(state, step); |
| 93 | }); |
| 94 | |
| 95 | const validationErrors = await applyValidations( |
| 96 | this.importerDefinition.sheets, |
| 97 | state.sheetData |
| 98 | ).catch(() => state.validationErrors); |
| 99 | |
| 100 | return { ...state, validationErrors }; |
| 101 | } |
| 102 | |
| 103 | public async uploadFile(file: File) { |
| 104 | const csvFile = await convertCsvFile( |
no test coverage detected