( sheetDefinitions: SheetDefinition[], csvHeaders: string[] )
| 62 | } |
| 63 | |
| 64 | export const buildSuggestedHeaderMappings = ( |
| 65 | sheetDefinitions: SheetDefinition[], |
| 66 | csvHeaders: string[] |
| 67 | ) => { |
| 68 | const headerMappings: ColumnMapping[] = []; |
| 69 | |
| 70 | sheetDefinitions.forEach((sheet) => { |
| 71 | const mappings = buildSheetSuggestedHeaderMappings(sheet, csvHeaders); |
| 72 | headerMappings.push(...mappings); |
| 73 | }); |
| 74 | |
| 75 | return removeMappingDuplicates(headerMappings); |
| 76 | }; |
| 77 | |
| 78 | export function calculateNewMappingsForCsvColumnMapingChanged( |
| 79 | currentMapping: ColumnMapping[], |
no test coverage detected