Merge branch 'master' into develop

This commit is contained in:
SPRINX0\prochazka
2024-07-08 08:23:41 +02:00
30 changed files with 1378 additions and 181 deletions

View File

@@ -77,6 +77,10 @@ export function extractRowCopiedValue(row, col) {
return stringifyCellValue(value);
}
const clipboardHeadersFormatter = (delimiter) => (columns) => {
return columns.join(delimiter);
};
const clipboardTextFormatter = (delimiter, headers) => (columns, rows) => {
const lines = [];
if (headers) lines.push(columns.join(delimiter));
@@ -161,6 +165,11 @@ export const copyRowsFormatDefs = {
name: 'Without headers',
formatter: clipboardTextFormatter('\t', false),
},
headers: {
label: 'Copy only headers',
name: 'Only Headers',
formatter: clipboardHeadersFormatter('\t'),
},
csv: {
label: 'Copy as CSV',
name: 'CSV',