From 64362cdf13dcfebd07204d343c1a0f3c9214edc6 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Thu, 19 Nov 2020 08:02:16 +0100 Subject: [PATCH] rename --- packages/web/src/fileformats/csv.ts | 2 +- packages/web/src/fileformats/excel.ts | 2 +- packages/web/src/fileformats/jsonl.ts | 2 +- packages/web/src/fileformats/types.ts | 2 +- packages/web/src/impexp/ImportExportConfigurator.js | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/web/src/fileformats/csv.ts b/packages/web/src/fileformats/csv.ts index 8f3d8bfa..5e6ec2b9 100644 --- a/packages/web/src/fileformats/csv.ts +++ b/packages/web/src/fileformats/csv.ts @@ -1,7 +1,7 @@ export default { storageType: 'csv', extension: 'csv', + name: 'CSV files', readerFunc: 'csvReader', writerFunc: 'csvWriter', - filesTitle: 'CSV files', }; diff --git a/packages/web/src/fileformats/excel.ts b/packages/web/src/fileformats/excel.ts index 53fc4bcd..d73eab3b 100644 --- a/packages/web/src/fileformats/excel.ts +++ b/packages/web/src/fileformats/excel.ts @@ -1,6 +1,6 @@ export default { storageType: 'excel', extension: 'xlsx', + name: 'MS Excel files', readerFunc: 'excelSheetReader', - filesTitle: 'MS Excel files', }; diff --git a/packages/web/src/fileformats/jsonl.ts b/packages/web/src/fileformats/jsonl.ts index f386be88..b58b00e2 100644 --- a/packages/web/src/fileformats/jsonl.ts +++ b/packages/web/src/fileformats/jsonl.ts @@ -1,7 +1,7 @@ export default { storageType: 'jsonl', extension: 'jsonl', + name: 'JSON lines', readerFunc: 'jsonLinesReader', writerFunc: 'jsonLinesWriter', - filesTitle: 'JSON lines', }; diff --git a/packages/web/src/fileformats/types.ts b/packages/web/src/fileformats/types.ts index 8e01d0c0..f6ba3949 100644 --- a/packages/web/src/fileformats/types.ts +++ b/packages/web/src/fileformats/types.ts @@ -1,7 +1,7 @@ export interface FileFormatDefinition { storageType: string; extension: string; + name: string; readerFunc?: string; writerFunc?: string; - filesTitle: string; } diff --git a/packages/web/src/impexp/ImportExportConfigurator.js b/packages/web/src/impexp/ImportExportConfigurator.js index b152afa1..d03fc40f 100644 --- a/packages/web/src/impexp/ImportExportConfigurator.js +++ b/packages/web/src/impexp/ImportExportConfigurator.js @@ -91,7 +91,7 @@ const Title = styled.div` function getFileFilters(storageType) { const res = []; const format = findFileFormat(storageType); - if (format) res.push({ name: format.filesTitle, extensions: [format.extension] }); + if (format) res.push({ name: format.name, extensions: [format.extension] }); res.push({ name: 'All Files', extensions: ['*'] }); return res; } @@ -195,7 +195,7 @@ function SourceTargetConfig({ { value: 'database', label: 'Database', directions: ['source', 'target'] }, ...fileformats.map((format) => ({ value: format.storageType, - label: format.filesTitle, + label: format.name, directions: getFileFormatDirections(format), })), { value: 'query', label: 'SQL Query', directions: ['source'] },