(core) Adding Skip options when importing multiple tables.

Summary:
Adding new destination "Skip" for multiple table imports.
Selecting this destination skips the import and makes the preview grayed out.

Test Plan: New Tests

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3181
This commit is contained in:
Jarosław Sadziński
2021-12-13 10:11:18 +01:00
parent d99db8d016
commit 1ae586cf42
3 changed files with 41 additions and 15 deletions

View File

@@ -31,8 +31,14 @@ export interface TransformRuleMap {
[origTableName: string]: TransformRule;
}
// Special values for import destinations; null means "new table", "" means skip table.
// Both special options exposed as consts.
export type DestId = string | null;
export const NEW_TABLE = null;
export const SKIP_TABLE = "";
export interface TransformRule {
destTableId: string|null;
destTableId: DestId;
destCols: TransformColumn[];
sourceCols: string[];
}