@leankylin-sheet/core 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/context.d.ts +4 -1
- package/dist/index.esm.js +9 -6
- package/dist/index.js +9 -6
- package/dist/settings.d.ts +4 -0
- package/package.json +2 -2
package/dist/context.d.ts
CHANGED
|
@@ -173,6 +173,9 @@ export declare function defaultContext(refs: RefValues): Context;
|
|
|
173
173
|
export declare function getFlowdata(ctx?: Context, id?: string | null): import("./types").CellMatrix | null | undefined;
|
|
174
174
|
export declare function ensureSheetIndex(data: Sheet[], generateSheetId: () => string): void;
|
|
175
175
|
export declare function initSheetIndex(ctx: Context): void;
|
|
176
|
-
export declare function updateContextWithSheetData(ctx: Context, data: any[][]
|
|
176
|
+
export declare function updateContextWithSheetData(ctx: Context, data: any[][], blank: {
|
|
177
|
+
width: number;
|
|
178
|
+
height: number;
|
|
179
|
+
}): void;
|
|
177
180
|
export declare function updateContextWithCanvas(ctx: Context, canvas: HTMLCanvasElement, placeholder: HTMLDivElement): void;
|
|
178
181
|
export {};
|
package/dist/index.esm.js
CHANGED
|
@@ -52469,7 +52469,7 @@ function getFlowdata(ctx, id) {
|
|
|
52469
52469
|
}
|
|
52470
52470
|
return (_ctx$luckysheetfile = ctx.luckysheetfile) === null || _ctx$luckysheetfile === void 0 ? void 0 : (_ctx$luckysheetfile$i = _ctx$luckysheetfile[i]) === null || _ctx$luckysheetfile$i === void 0 ? void 0 : _ctx$luckysheetfile$i.data;
|
|
52471
52471
|
}
|
|
52472
|
-
function calcRowColSize(ctx, rowCount, colCount) {
|
|
52472
|
+
function calcRowColSize(ctx, rowCount, colCount, blank) {
|
|
52473
52473
|
ctx.visibledatarow = [];
|
|
52474
52474
|
ctx.rh_height = 0;
|
|
52475
52475
|
for (var r = 0; r < rowCount; r += 1) {
|
|
@@ -52486,10 +52486,9 @@ function calcRowColSize(ctx, rowCount, colCount) {
|
|
|
52486
52486
|
ctx.rh_height += Math.round((rowlen + 1) * ctx.zoomRatio);
|
|
52487
52487
|
ctx.visibledatarow.push(ctx.rh_height);
|
|
52488
52488
|
}
|
|
52489
|
-
ctx.rh_height +=
|
|
52489
|
+
ctx.rh_height += blank.height;
|
|
52490
52490
|
ctx.visibledatacolumn = [];
|
|
52491
52491
|
ctx.ch_width = 0;
|
|
52492
|
-
var maxColumnlen = 120;
|
|
52493
52492
|
var flowdata = getFlowdata(ctx);
|
|
52494
52493
|
for (var c = 0; c < colCount; c += 1) {
|
|
52495
52494
|
var _ctx$config3, _ctx$config3$columnle, _ctx$config5, _ctx$config5$colhidde;
|
|
@@ -52520,7 +52519,7 @@ function calcRowColSize(ctx, rowCount, colCount) {
|
|
|
52520
52519
|
ctx.ch_width += Math.round((firstcolumnlen + 1) * ctx.zoomRatio);
|
|
52521
52520
|
ctx.visibledatacolumn.push(ctx.ch_width);
|
|
52522
52521
|
}
|
|
52523
|
-
ctx.ch_width +=
|
|
52522
|
+
ctx.ch_width += blank.width;
|
|
52524
52523
|
}
|
|
52525
52524
|
function ensureSheetIndex(data, generateSheetId) {
|
|
52526
52525
|
if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
|
|
@@ -52565,10 +52564,10 @@ function initSheetIndex(ctx) {
|
|
|
52565
52564
|
}
|
|
52566
52565
|
}
|
|
52567
52566
|
}
|
|
52568
|
-
function updateContextWithSheetData(ctx, data) {
|
|
52567
|
+
function updateContextWithSheetData(ctx, data, blank) {
|
|
52569
52568
|
var rowCount = data.length;
|
|
52570
52569
|
var colCount = rowCount === 0 ? 0 : data[0].length;
|
|
52571
|
-
calcRowColSize(ctx, rowCount, colCount);
|
|
52570
|
+
calcRowColSize(ctx, rowCount, colCount, blank);
|
|
52572
52571
|
normalizeSelection(ctx, ctx.luckysheet_select_save);
|
|
52573
52572
|
}
|
|
52574
52573
|
function updateContextWithCanvas(ctx, canvas, placeholder) {
|
|
@@ -65624,6 +65623,10 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
65624
65623
|
var defaultSettings = {
|
|
65625
65624
|
fxContainer: undefined,
|
|
65626
65625
|
Footer: undefined,
|
|
65626
|
+
blank: {
|
|
65627
|
+
width: 16,
|
|
65628
|
+
height: 30
|
|
65629
|
+
},
|
|
65627
65630
|
column: 60,
|
|
65628
65631
|
row: 84,
|
|
65629
65632
|
addRows: 50,
|
package/dist/index.js
CHANGED
|
@@ -52479,7 +52479,7 @@ function getFlowdata(ctx, id) {
|
|
|
52479
52479
|
}
|
|
52480
52480
|
return (_ctx$luckysheetfile = ctx.luckysheetfile) === null || _ctx$luckysheetfile === void 0 ? void 0 : (_ctx$luckysheetfile$i = _ctx$luckysheetfile[i]) === null || _ctx$luckysheetfile$i === void 0 ? void 0 : _ctx$luckysheetfile$i.data;
|
|
52481
52481
|
}
|
|
52482
|
-
function calcRowColSize(ctx, rowCount, colCount) {
|
|
52482
|
+
function calcRowColSize(ctx, rowCount, colCount, blank) {
|
|
52483
52483
|
ctx.visibledatarow = [];
|
|
52484
52484
|
ctx.rh_height = 0;
|
|
52485
52485
|
for (var r = 0; r < rowCount; r += 1) {
|
|
@@ -52496,10 +52496,9 @@ function calcRowColSize(ctx, rowCount, colCount) {
|
|
|
52496
52496
|
ctx.rh_height += Math.round((rowlen + 1) * ctx.zoomRatio);
|
|
52497
52497
|
ctx.visibledatarow.push(ctx.rh_height);
|
|
52498
52498
|
}
|
|
52499
|
-
ctx.rh_height +=
|
|
52499
|
+
ctx.rh_height += blank.height;
|
|
52500
52500
|
ctx.visibledatacolumn = [];
|
|
52501
52501
|
ctx.ch_width = 0;
|
|
52502
|
-
var maxColumnlen = 120;
|
|
52503
52502
|
var flowdata = getFlowdata(ctx);
|
|
52504
52503
|
for (var c = 0; c < colCount; c += 1) {
|
|
52505
52504
|
var _ctx$config3, _ctx$config3$columnle, _ctx$config5, _ctx$config5$colhidde;
|
|
@@ -52530,7 +52529,7 @@ function calcRowColSize(ctx, rowCount, colCount) {
|
|
|
52530
52529
|
ctx.ch_width += Math.round((firstcolumnlen + 1) * ctx.zoomRatio);
|
|
52531
52530
|
ctx.visibledatacolumn.push(ctx.ch_width);
|
|
52532
52531
|
}
|
|
52533
|
-
ctx.ch_width +=
|
|
52532
|
+
ctx.ch_width += blank.width;
|
|
52534
52533
|
}
|
|
52535
52534
|
function ensureSheetIndex(data, generateSheetId) {
|
|
52536
52535
|
if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
|
|
@@ -52575,10 +52574,10 @@ function initSheetIndex(ctx) {
|
|
|
52575
52574
|
}
|
|
52576
52575
|
}
|
|
52577
52576
|
}
|
|
52578
|
-
function updateContextWithSheetData(ctx, data) {
|
|
52577
|
+
function updateContextWithSheetData(ctx, data, blank) {
|
|
52579
52578
|
var rowCount = data.length;
|
|
52580
52579
|
var colCount = rowCount === 0 ? 0 : data[0].length;
|
|
52581
|
-
calcRowColSize(ctx, rowCount, colCount);
|
|
52580
|
+
calcRowColSize(ctx, rowCount, colCount, blank);
|
|
52582
52581
|
normalizeSelection(ctx, ctx.luckysheet_select_save);
|
|
52583
52582
|
}
|
|
52584
52583
|
function updateContextWithCanvas(ctx, canvas, placeholder) {
|
|
@@ -65634,6 +65633,10 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
65634
65633
|
var defaultSettings = {
|
|
65635
65634
|
fxContainer: undefined,
|
|
65636
65635
|
Footer: undefined,
|
|
65636
|
+
blank: {
|
|
65637
|
+
width: 16,
|
|
65638
|
+
height: 30
|
|
65639
|
+
},
|
|
65637
65640
|
column: 60,
|
|
65638
65641
|
row: 84,
|
|
65639
65642
|
addRows: 50,
|
package/dist/settings.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leankylin-sheet/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"repository": "http://114.55.85.79:19999/leankylin-front/leankylin-sheet",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@leankylin-sheet/formula-parser": "^1.2.
|
|
13
|
+
"@leankylin-sheet/formula-parser": "^1.2.2",
|
|
14
14
|
"dayjs": "^1.11.0",
|
|
15
15
|
"immer": "^9.0.12",
|
|
16
16
|
"lodash": "^4.17.21",
|