chore: release 0.0.1
This commit is contained in:
@@ -10,32 +10,40 @@ export const DEFAULT_TABLE_SCHEMA: TableSchema = {
|
||||
export const DEFAULT_TABLE_ROWS = 50;
|
||||
export const DEFAULT_TABLE_COLUMNS = 15;
|
||||
|
||||
export const createDefaultTableSnapshot = (schema: TableSchema): DocumentTableSnapshot => ({
|
||||
rows: [],
|
||||
luckysheet: [
|
||||
{
|
||||
name: "Sheet1",
|
||||
index: 0,
|
||||
status: 1,
|
||||
order: 0,
|
||||
hide: 0,
|
||||
row: DEFAULT_TABLE_ROWS,
|
||||
column: DEFAULT_TABLE_COLUMNS,
|
||||
defaultRowHeight: 19,
|
||||
defaultColWidth: 73,
|
||||
celldata: [],
|
||||
config: {
|
||||
columnlen: {},
|
||||
rowlen: {},
|
||||
export const createDefaultTableSnapshot = (schema: TableSchema): DocumentTableSnapshot => {
|
||||
const frozenRowCount = schema.frozenRowCount ?? 0;
|
||||
const frozenColCount = schema.frozenColCount ?? 0;
|
||||
return {
|
||||
rows: [],
|
||||
luckysheet: [
|
||||
{
|
||||
name: "Sheet1",
|
||||
index: 0,
|
||||
status: 1,
|
||||
order: 0,
|
||||
hide: 0,
|
||||
row: DEFAULT_TABLE_ROWS,
|
||||
column: DEFAULT_TABLE_COLUMNS,
|
||||
defaultRowHeight: 19,
|
||||
defaultColWidth: 73,
|
||||
celldata: [],
|
||||
config: {
|
||||
columnlen: {},
|
||||
rowlen: {},
|
||||
},
|
||||
frozen: {
|
||||
type: frozenRowCount > 0 || frozenColCount > 0 ? "both" : undefined,
|
||||
row_focus: frozenRowCount,
|
||||
column_focus: frozenColCount,
|
||||
},
|
||||
scrollLeft: 0,
|
||||
scrollTop: 0,
|
||||
zoomRatio: 1,
|
||||
showGridLines: true,
|
||||
},
|
||||
frozen: {},
|
||||
scrollLeft: 0,
|
||||
scrollTop: 0,
|
||||
zoomRatio: 1,
|
||||
showGridLines: true,
|
||||
},
|
||||
],
|
||||
});
|
||||
],
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* 在 Supabase 中创建一个新的在线表格并返回元数据。
|
||||
|
||||
Reference in New Issue
Block a user