( sheetDefinition: SheetDefinition, data: SheetRow[], enumLabelDict: EnumLabelDict, csvDownloadMode: CsvDownloadMode )
| 116 | } |
| 117 | |
| 118 | export function downloadSheetAsCsv( |
| 119 | sheetDefinition: SheetDefinition, |
| 120 | data: SheetRow[], |
| 121 | enumLabelDict: EnumLabelDict, |
| 122 | csvDownloadMode: CsvDownloadMode |
| 123 | ) { |
| 124 | const blob = generateCsvContent( |
| 125 | sheetDefinition, |
| 126 | data, |
| 127 | enumLabelDict, |
| 128 | csvDownloadMode |
| 129 | ); |
| 130 | const url = URL.createObjectURL(blob); |
| 131 | const a = document.createElement('a'); |
| 132 | a.href = url; |
| 133 | a.download = `${sheetDefinition.label}.csv`; |
| 134 | a.click(); |
| 135 | URL.revokeObjectURL(url); |
| 136 | } |
| 137 | |
| 138 | export function getLabelDict( |
| 139 | columnDefinition: SheetColumnReferenceDefinition, |
no test coverage detected