@leankylin-sheet/core 5.2.43 → 5.2.45
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 +47 -25
- package/dist/index.js +47 -25
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -46766,6 +46766,7 @@ function calculateSheetFromula(ctx, id, isrefresh) {
|
|
|
46766
46766
|
console.time("calcTime:all}");
|
|
46767
46767
|
execFunctionGroup(ctx, null, null, null, undefined, [], true);
|
|
46768
46768
|
groupValuesRefresh(ctx);
|
|
46769
|
+
ctx.formulaCache.execFunctionGlobalData = null;
|
|
46769
46770
|
console.timeEnd("calcTime:".concat(id));
|
|
46770
46771
|
}
|
|
46771
46772
|
function updateFunctionGroupBySheetId(ctx, id) {
|
|
@@ -56692,11 +56693,17 @@ function setCellValuesByRange(ctx, data, range, cellInput) {
|
|
|
56692
56693
|
cfg.merge = {};
|
|
56693
56694
|
}
|
|
56694
56695
|
var formulaCells = [];
|
|
56696
|
+
var modifiedCells = [];
|
|
56695
56697
|
for (var i = 0; i < rowCount; i += 1) {
|
|
56696
56698
|
for (var j = 0; j < columnCount; j += 1) {
|
|
56697
56699
|
var row = rowStart + i;
|
|
56698
56700
|
var column = colStart + j;
|
|
56699
56701
|
var value = data[i][j];
|
|
56702
|
+
modifiedCells.push({
|
|
56703
|
+
r: row,
|
|
56704
|
+
c: column,
|
|
56705
|
+
i: sheet.id
|
|
56706
|
+
});
|
|
56700
56707
|
setCellValueInBatch(ctx, sheet, row, column, value, cellInput, formulaCells);
|
|
56701
56708
|
if (setMerge) {
|
|
56702
56709
|
var _value$mc, _value$mc2, _value$mc3, _value$mc4;
|
|
@@ -56718,25 +56725,30 @@ function setCellValuesByRange(ctx, data, range, cellInput) {
|
|
|
56718
56725
|
if (setMerge) {
|
|
56719
56726
|
sheet.config = cfg;
|
|
56720
56727
|
}
|
|
56721
|
-
if (
|
|
56722
|
-
ctx.formulaCache.execFunctionExist =
|
|
56723
|
-
|
|
56724
|
-
|
|
56728
|
+
if (modifiedCells.length > 0) {
|
|
56729
|
+
ctx.formulaCache.execFunctionExist = formulaCells.map(function (fc) {
|
|
56730
|
+
return {
|
|
56731
|
+
r: fc.r,
|
|
56732
|
+
c: fc.c,
|
|
56733
|
+
i: sheet.id
|
|
56734
|
+
};
|
|
56735
|
+
});
|
|
56736
|
+
for (var k = 0; k < modifiedCells.length; k += 1) {
|
|
56737
|
+
ctx.formulaCache.execFunctionExist.push(modifiedCells[k]);
|
|
56738
|
+
}
|
|
56739
|
+
for (var _k = 0; _k < formulaCells.length; _k += 1) {
|
|
56740
|
+
var fc = formulaCells[_k];
|
|
56725
56741
|
var v = execfunction(ctx, fc.f, fc.r, fc.c, sheet.id, false, true);
|
|
56726
56742
|
setCellValue(ctx, fc.r, fc.c, flowdata, {
|
|
56727
56743
|
v: v[1],
|
|
56728
56744
|
f: v[2]
|
|
56729
56745
|
});
|
|
56730
|
-
ctx.formulaCache.execFunctionExist.push({
|
|
56731
|
-
r: fc.r,
|
|
56732
|
-
c: fc.c,
|
|
56733
|
-
i: sheet.id
|
|
56734
|
-
});
|
|
56735
56746
|
}
|
|
56736
56747
|
ctx.formulaCache.execFunctionExist.reverse();
|
|
56737
56748
|
execFunctionGroup(ctx, null, null, null, null, flowdata, false, true);
|
|
56738
56749
|
groupValuesRefresh(ctx);
|
|
56739
56750
|
updateFunctionGroup(ctx);
|
|
56751
|
+
ctx.formulaCache.execFunctionGlobalData = null;
|
|
56740
56752
|
}
|
|
56741
56753
|
}
|
|
56742
56754
|
function setCellValues(ctx, data, cellInput) {
|
|
@@ -56780,23 +56792,33 @@ function setCellValues(ctx, data, cellInput) {
|
|
|
56780
56792
|
_v = _data$_j.v;
|
|
56781
56793
|
setCellValueInBatch(ctx, sheet, _r, _c, _v, cellInput, formulaCells);
|
|
56782
56794
|
}
|
|
56783
|
-
|
|
56784
|
-
|
|
56785
|
-
|
|
56786
|
-
|
|
56787
|
-
|
|
56788
|
-
|
|
56789
|
-
|
|
56790
|
-
|
|
56791
|
-
|
|
56792
|
-
|
|
56793
|
-
|
|
56794
|
-
|
|
56795
|
-
|
|
56796
|
-
|
|
56797
|
-
|
|
56798
|
-
|
|
56795
|
+
ctx.formulaCache.execFunctionExist = formulaCells.map(function (fc) {
|
|
56796
|
+
return {
|
|
56797
|
+
r: fc.r,
|
|
56798
|
+
c: fc.c,
|
|
56799
|
+
i: sheet.id
|
|
56800
|
+
};
|
|
56801
|
+
});
|
|
56802
|
+
for (var _j2 = 0; _j2 < data.length; _j2 += 1) {
|
|
56803
|
+
ctx.formulaCache.execFunctionExist.push({
|
|
56804
|
+
r: data[_j2].r,
|
|
56805
|
+
c: data[_j2].c,
|
|
56806
|
+
i: sheet.id
|
|
56807
|
+
});
|
|
56808
|
+
}
|
|
56809
|
+
for (var k = 0; k < formulaCells.length; k += 1) {
|
|
56810
|
+
var fc = formulaCells[k];
|
|
56811
|
+
var val = execfunction(ctx, fc.f, fc.r, fc.c, sheet.id, false, true);
|
|
56812
|
+
setCellValue(ctx, fc.r, fc.c, flowdata, {
|
|
56813
|
+
v: val[1],
|
|
56814
|
+
f: val[2]
|
|
56815
|
+
});
|
|
56799
56816
|
}
|
|
56817
|
+
ctx.formulaCache.execFunctionExist.reverse();
|
|
56818
|
+
execFunctionGroup(ctx, null, null, null, null, flowdata);
|
|
56819
|
+
groupValuesRefresh(ctx);
|
|
56820
|
+
updateFunctionGroup(ctx);
|
|
56821
|
+
ctx.formulaCache.execFunctionGlobalData = null;
|
|
56800
56822
|
}
|
|
56801
56823
|
function setCellFormatByRange(ctx, attr, value, range) {
|
|
56802
56824
|
var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
package/dist/index.js
CHANGED
|
@@ -46776,6 +46776,7 @@ function calculateSheetFromula(ctx, id, isrefresh) {
|
|
|
46776
46776
|
console.time("calcTime:all}");
|
|
46777
46777
|
execFunctionGroup(ctx, null, null, null, undefined, [], true);
|
|
46778
46778
|
groupValuesRefresh(ctx);
|
|
46779
|
+
ctx.formulaCache.execFunctionGlobalData = null;
|
|
46779
46780
|
console.timeEnd("calcTime:".concat(id));
|
|
46780
46781
|
}
|
|
46781
46782
|
function updateFunctionGroupBySheetId(ctx, id) {
|
|
@@ -56702,11 +56703,17 @@ function setCellValuesByRange(ctx, data, range, cellInput) {
|
|
|
56702
56703
|
cfg.merge = {};
|
|
56703
56704
|
}
|
|
56704
56705
|
var formulaCells = [];
|
|
56706
|
+
var modifiedCells = [];
|
|
56705
56707
|
for (var i = 0; i < rowCount; i += 1) {
|
|
56706
56708
|
for (var j = 0; j < columnCount; j += 1) {
|
|
56707
56709
|
var row = rowStart + i;
|
|
56708
56710
|
var column = colStart + j;
|
|
56709
56711
|
var value = data[i][j];
|
|
56712
|
+
modifiedCells.push({
|
|
56713
|
+
r: row,
|
|
56714
|
+
c: column,
|
|
56715
|
+
i: sheet.id
|
|
56716
|
+
});
|
|
56710
56717
|
setCellValueInBatch(ctx, sheet, row, column, value, cellInput, formulaCells);
|
|
56711
56718
|
if (setMerge) {
|
|
56712
56719
|
var _value$mc, _value$mc2, _value$mc3, _value$mc4;
|
|
@@ -56728,25 +56735,30 @@ function setCellValuesByRange(ctx, data, range, cellInput) {
|
|
|
56728
56735
|
if (setMerge) {
|
|
56729
56736
|
sheet.config = cfg;
|
|
56730
56737
|
}
|
|
56731
|
-
if (
|
|
56732
|
-
ctx.formulaCache.execFunctionExist =
|
|
56733
|
-
|
|
56734
|
-
|
|
56738
|
+
if (modifiedCells.length > 0) {
|
|
56739
|
+
ctx.formulaCache.execFunctionExist = formulaCells.map(function (fc) {
|
|
56740
|
+
return {
|
|
56741
|
+
r: fc.r,
|
|
56742
|
+
c: fc.c,
|
|
56743
|
+
i: sheet.id
|
|
56744
|
+
};
|
|
56745
|
+
});
|
|
56746
|
+
for (var k = 0; k < modifiedCells.length; k += 1) {
|
|
56747
|
+
ctx.formulaCache.execFunctionExist.push(modifiedCells[k]);
|
|
56748
|
+
}
|
|
56749
|
+
for (var _k = 0; _k < formulaCells.length; _k += 1) {
|
|
56750
|
+
var fc = formulaCells[_k];
|
|
56735
56751
|
var v = execfunction(ctx, fc.f, fc.r, fc.c, sheet.id, false, true);
|
|
56736
56752
|
setCellValue(ctx, fc.r, fc.c, flowdata, {
|
|
56737
56753
|
v: v[1],
|
|
56738
56754
|
f: v[2]
|
|
56739
56755
|
});
|
|
56740
|
-
ctx.formulaCache.execFunctionExist.push({
|
|
56741
|
-
r: fc.r,
|
|
56742
|
-
c: fc.c,
|
|
56743
|
-
i: sheet.id
|
|
56744
|
-
});
|
|
56745
56756
|
}
|
|
56746
56757
|
ctx.formulaCache.execFunctionExist.reverse();
|
|
56747
56758
|
execFunctionGroup(ctx, null, null, null, null, flowdata, false, true);
|
|
56748
56759
|
groupValuesRefresh(ctx);
|
|
56749
56760
|
updateFunctionGroup(ctx);
|
|
56761
|
+
ctx.formulaCache.execFunctionGlobalData = null;
|
|
56750
56762
|
}
|
|
56751
56763
|
}
|
|
56752
56764
|
function setCellValues(ctx, data, cellInput) {
|
|
@@ -56790,23 +56802,33 @@ function setCellValues(ctx, data, cellInput) {
|
|
|
56790
56802
|
_v = _data$_j.v;
|
|
56791
56803
|
setCellValueInBatch(ctx, sheet, _r, _c, _v, cellInput, formulaCells);
|
|
56792
56804
|
}
|
|
56793
|
-
|
|
56794
|
-
|
|
56795
|
-
|
|
56796
|
-
|
|
56797
|
-
|
|
56798
|
-
|
|
56799
|
-
|
|
56800
|
-
|
|
56801
|
-
|
|
56802
|
-
|
|
56803
|
-
|
|
56804
|
-
|
|
56805
|
-
|
|
56806
|
-
|
|
56807
|
-
|
|
56808
|
-
|
|
56805
|
+
ctx.formulaCache.execFunctionExist = formulaCells.map(function (fc) {
|
|
56806
|
+
return {
|
|
56807
|
+
r: fc.r,
|
|
56808
|
+
c: fc.c,
|
|
56809
|
+
i: sheet.id
|
|
56810
|
+
};
|
|
56811
|
+
});
|
|
56812
|
+
for (var _j2 = 0; _j2 < data.length; _j2 += 1) {
|
|
56813
|
+
ctx.formulaCache.execFunctionExist.push({
|
|
56814
|
+
r: data[_j2].r,
|
|
56815
|
+
c: data[_j2].c,
|
|
56816
|
+
i: sheet.id
|
|
56817
|
+
});
|
|
56818
|
+
}
|
|
56819
|
+
for (var k = 0; k < formulaCells.length; k += 1) {
|
|
56820
|
+
var fc = formulaCells[k];
|
|
56821
|
+
var val = execfunction(ctx, fc.f, fc.r, fc.c, sheet.id, false, true);
|
|
56822
|
+
setCellValue(ctx, fc.r, fc.c, flowdata, {
|
|
56823
|
+
v: val[1],
|
|
56824
|
+
f: val[2]
|
|
56825
|
+
});
|
|
56809
56826
|
}
|
|
56827
|
+
ctx.formulaCache.execFunctionExist.reverse();
|
|
56828
|
+
execFunctionGroup(ctx, null, null, null, null, flowdata);
|
|
56829
|
+
groupValuesRefresh(ctx);
|
|
56830
|
+
updateFunctionGroup(ctx);
|
|
56831
|
+
ctx.formulaCache.execFunctionGlobalData = null;
|
|
56810
56832
|
}
|
|
56811
56833
|
function setCellFormatByRange(ctx, attr, value, range) {
|
|
56812
56834
|
var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leankylin-sheet/core",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.45",
|
|
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": "5.2.
|
|
16
|
+
"@leankylin-sheet/formula-parser": "5.2.45",
|
|
17
17
|
"dayjs": "^1.11.0",
|
|
18
18
|
"immer": "^9.0.12",
|
|
19
19
|
"lodash": "^4.17.21",
|