@leankylin-sheet/core 4.0.59 → 4.0.60
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/index.esm.js +12 -9
- package/dist/index.js +12 -9
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -46539,6 +46539,7 @@ function copySheet(ctx, sheetId, hooks) {
|
|
|
46539
46539
|
(_hooks$onCopySheet = hooks.onCopySheet) === null || _hooks$onCopySheet === void 0 ? void 0 : _hooks$onCopySheet.call(hooks, sheetId, copyId);
|
|
46540
46540
|
}
|
|
46541
46541
|
function calculateSheetFromula(ctx, id) {
|
|
46542
|
+
console.time("calcTime:".concat(id));
|
|
46542
46543
|
var index$1 = getSheetIndex(ctx, id);
|
|
46543
46544
|
var luckysheetfile = ctx.luckysheetfile;
|
|
46544
46545
|
var file = luckysheetfile[index$1];
|
|
@@ -46549,29 +46550,31 @@ function calculateSheetFromula(ctx, id) {
|
|
|
46549
46550
|
if (!ctx.luckysheetfile[index$1].data) return;
|
|
46550
46551
|
for (var r = 0; r < ctx.luckysheetfile[index$1].data.length; r += 1) {
|
|
46551
46552
|
for (var c = 0; c < ctx.luckysheetfile[index$1].data[r].length; c += 1) {
|
|
46552
|
-
var
|
|
46553
|
-
if (!(
|
|
46553
|
+
var cell = ctx.luckysheetfile[index$1].data[r][c];
|
|
46554
|
+
if (!(cell === null || cell === void 0 ? void 0 : cell.f)) {
|
|
46554
46555
|
continue;
|
|
46555
46556
|
}
|
|
46556
|
-
var result = execfunction(ctx, (_ctx$luckysheetfile$i2 = ctx.luckysheetfile[index$1].data[r][c]) === null || _ctx$luckysheetfile$i2 === void 0 ? void 0 : _ctx$luckysheetfile$i2.f, r, c, id, undefined, true);
|
|
46557
|
-
setCellValue$1(ctx, r, c, result[1], null, {
|
|
46558
|
-
id: id
|
|
46559
|
-
});
|
|
46560
|
-
if (_.isNil(id)) {
|
|
46561
|
-
id = ctx.currentSheetId;
|
|
46562
|
-
}
|
|
46563
46557
|
var cc = {
|
|
46564
46558
|
r: r,
|
|
46565
46559
|
c: c,
|
|
46566
46560
|
id: id
|
|
46567
46561
|
};
|
|
46568
46562
|
calcChain.push(cc);
|
|
46563
|
+
var result = execfunction(ctx, cell === null || cell === void 0 ? void 0 : cell.f, r, c, id, undefined, true);
|
|
46564
|
+
var newV = result[1];
|
|
46565
|
+
if (newV === cell.v) {
|
|
46566
|
+
continue;
|
|
46567
|
+
}
|
|
46568
|
+
setCellValue$1(ctx, r, c, result[1], null, {
|
|
46569
|
+
id: id
|
|
46570
|
+
});
|
|
46569
46571
|
}
|
|
46570
46572
|
}
|
|
46571
46573
|
file.calcChain = uniqBy(calcChain, function (item) {
|
|
46572
46574
|
return item.r + item.c + item.id;
|
|
46573
46575
|
});
|
|
46574
46576
|
ctx.luckysheetfile = luckysheetfile;
|
|
46577
|
+
console.timeEnd("calcTime:".concat(id));
|
|
46575
46578
|
}
|
|
46576
46579
|
|
|
46577
46580
|
function storeSheetParam(ctx) {
|
package/dist/index.js
CHANGED
|
@@ -46549,6 +46549,7 @@ function copySheet(ctx, sheetId, hooks) {
|
|
|
46549
46549
|
(_hooks$onCopySheet = hooks.onCopySheet) === null || _hooks$onCopySheet === void 0 ? void 0 : _hooks$onCopySheet.call(hooks, sheetId, copyId);
|
|
46550
46550
|
}
|
|
46551
46551
|
function calculateSheetFromula(ctx, id) {
|
|
46552
|
+
console.time("calcTime:".concat(id));
|
|
46552
46553
|
var index$1 = getSheetIndex(ctx, id);
|
|
46553
46554
|
var luckysheetfile = ctx.luckysheetfile;
|
|
46554
46555
|
var file = luckysheetfile[index$1];
|
|
@@ -46559,29 +46560,31 @@ function calculateSheetFromula(ctx, id) {
|
|
|
46559
46560
|
if (!ctx.luckysheetfile[index$1].data) return;
|
|
46560
46561
|
for (var r = 0; r < ctx.luckysheetfile[index$1].data.length; r += 1) {
|
|
46561
46562
|
for (var c = 0; c < ctx.luckysheetfile[index$1].data[r].length; c += 1) {
|
|
46562
|
-
var
|
|
46563
|
-
if (!(
|
|
46563
|
+
var cell = ctx.luckysheetfile[index$1].data[r][c];
|
|
46564
|
+
if (!(cell === null || cell === void 0 ? void 0 : cell.f)) {
|
|
46564
46565
|
continue;
|
|
46565
46566
|
}
|
|
46566
|
-
var result = execfunction(ctx, (_ctx$luckysheetfile$i2 = ctx.luckysheetfile[index$1].data[r][c]) === null || _ctx$luckysheetfile$i2 === void 0 ? void 0 : _ctx$luckysheetfile$i2.f, r, c, id, undefined, true);
|
|
46567
|
-
setCellValue$1(ctx, r, c, result[1], null, {
|
|
46568
|
-
id: id
|
|
46569
|
-
});
|
|
46570
|
-
if (___default['default'].isNil(id)) {
|
|
46571
|
-
id = ctx.currentSheetId;
|
|
46572
|
-
}
|
|
46573
46567
|
var cc = {
|
|
46574
46568
|
r: r,
|
|
46575
46569
|
c: c,
|
|
46576
46570
|
id: id
|
|
46577
46571
|
};
|
|
46578
46572
|
calcChain.push(cc);
|
|
46573
|
+
var result = execfunction(ctx, cell === null || cell === void 0 ? void 0 : cell.f, r, c, id, undefined, true);
|
|
46574
|
+
var newV = result[1];
|
|
46575
|
+
if (newV === cell.v) {
|
|
46576
|
+
continue;
|
|
46577
|
+
}
|
|
46578
|
+
setCellValue$1(ctx, r, c, result[1], null, {
|
|
46579
|
+
id: id
|
|
46580
|
+
});
|
|
46579
46581
|
}
|
|
46580
46582
|
}
|
|
46581
46583
|
file.calcChain = _.uniqBy(calcChain, function (item) {
|
|
46582
46584
|
return item.r + item.c + item.id;
|
|
46583
46585
|
});
|
|
46584
46586
|
ctx.luckysheetfile = luckysheetfile;
|
|
46587
|
+
console.timeEnd("calcTime:".concat(id));
|
|
46585
46588
|
}
|
|
46586
46589
|
|
|
46587
46590
|
function storeSheetParam(ctx) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leankylin-sheet/core",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.60",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"build": "father-build"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@leankylin-sheet/formula-parser": "4.0.
|
|
16
|
+
"@leankylin-sheet/formula-parser": "4.0.60",
|
|
17
17
|
"dayjs": "^1.11.0",
|
|
18
18
|
"immer": "^9.0.12",
|
|
19
19
|
"lodash": "^4.17.21",
|