@leankylin-sheet/core 7.0.30 → 7.0.32
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 +168 -145
- package/dist/index.js +168 -145
- package/dist/modules/formula.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -37586,7 +37586,7 @@ function execfunction(ctx, txt, r, c, id, isrefresh, notInsertFunc) {
|
|
|
37586
37586
|
f: txt
|
|
37587
37587
|
};else data[r][c].f = txt;
|
|
37588
37588
|
}
|
|
37589
|
-
execFunctionGroup(ctx, r, c, _.isNil(formulaError) ? result : formulaError, id, false, notInsertFunc);
|
|
37589
|
+
execFunctionGroup(ctx, r, c, _.isNil(formulaError) ? result : formulaError, id, false, notInsertFunc, undefined, txt);
|
|
37590
37590
|
if (!hadFormulaField && data && data[r] && data[r][c]) {
|
|
37591
37591
|
delete data[r][c].f;
|
|
37592
37592
|
}
|
|
@@ -37648,10 +37648,10 @@ function groupValuesRefresh(ctx) {
|
|
|
37648
37648
|
ctx.groupValuesRefreshData = [];
|
|
37649
37649
|
}
|
|
37650
37650
|
}
|
|
37651
|
-
function execFunctionGroup(ctx, origin_r, origin_c, value, id, data) {
|
|
37652
|
-
var isForce = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
|
|
37653
|
-
var notInsertFunc = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : true;
|
|
37651
|
+
function execFunctionGroup(ctx, origin_r, origin_c, value, id, data, isForce, notInsertFunc, originFormula) {
|
|
37654
37652
|
console.time('execFunctionGroup-before');
|
|
37653
|
+
isForce = !_.isNil(isForce) ? isForce : false;
|
|
37654
|
+
notInsertFunc = !_.isNil(notInsertFunc) ? notInsertFunc : true;
|
|
37655
37655
|
if (_.isNil(data)) {
|
|
37656
37656
|
data = getFlowdata(ctx);
|
|
37657
37657
|
}
|
|
@@ -37729,106 +37729,115 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data) {
|
|
|
37729
37729
|
console.timeEnd('arrayMatchCache');
|
|
37730
37730
|
console.time('cache1');
|
|
37731
37731
|
var _loop = function _loop() {
|
|
37732
|
-
|
|
37733
|
-
|
|
37734
|
-
|
|
37735
|
-
|
|
37736
|
-
|
|
37737
|
-
|
|
37738
|
-
|
|
37739
|
-
var isOffsetFunc = txt1.indexOf("INDIRECT(") > -1 || txt1.indexOf("OFFSET(") > -1 || txt1.indexOf("INDEX(") > -1;
|
|
37740
|
-
var formulaArray = [];
|
|
37741
|
-
if (isOffsetFunc) {
|
|
37742
|
-
isFunctionRange(ctx, calc_funcStr, null, null, formulaCell.id, null, function (str_nb) {
|
|
37743
|
-
var range = getcellrange(ctx, _.trim(str_nb), formulaCell.id);
|
|
37744
|
-
if (!_.isNil(range)) {
|
|
37745
|
-
formulaArray.push(range);
|
|
37732
|
+
var formulaCell = calcChains[_i12];
|
|
37733
|
+
var key = "r".concat(formulaCell.r, "c").concat(formulaCell.c, "i").concat(formulaCell.id);
|
|
37734
|
+
var calc_funcStr = getcellFormula(ctx, formulaCell.r, formulaCell.c, formulaCell.id);
|
|
37735
|
+
var isOriginCell = !_.isNil(origin_r) && !_.isNil(origin_c) && formulaCell.r === origin_r && formulaCell.c === origin_c && formulaCell.id === id;
|
|
37736
|
+
if (isOriginCell && !_.isNil(originFormula)) {
|
|
37737
|
+
if (originFormula === "") {
|
|
37738
|
+
return 0; // continue
|
|
37746
37739
|
}
|
|
37747
|
-
|
|
37748
|
-
|
|
37749
|
-
|
|
37750
|
-
|
|
37751
|
-
|
|
37752
|
-
var
|
|
37753
|
-
var
|
|
37754
|
-
var
|
|
37755
|
-
|
|
37756
|
-
|
|
37757
|
-
|
|
37758
|
-
if (
|
|
37759
|
-
|
|
37760
|
-
|
|
37761
|
-
|
|
37762
|
-
|
|
37763
|
-
|
|
37764
|
-
|
|
37765
|
-
|
|
37766
|
-
|
|
37740
|
+
calc_funcStr = originFormula;
|
|
37741
|
+
}
|
|
37742
|
+
if (_.isNil(calc_funcStr)) {
|
|
37743
|
+
return 0; // continue
|
|
37744
|
+
}
|
|
37745
|
+
var txt1 = calc_funcStr.toUpperCase();
|
|
37746
|
+
var isOffsetFunc = txt1.indexOf("INDIRECT(") > -1 || txt1.indexOf("OFFSET(") > -1 || txt1.indexOf("INDEX(") > -1;
|
|
37747
|
+
var formulaArray = [];
|
|
37748
|
+
if (isOffsetFunc) {
|
|
37749
|
+
isFunctionRange(ctx, calc_funcStr, null, null, formulaCell.id, null, function (str_nb) {
|
|
37750
|
+
var range = getcellrange(ctx, _.trim(str_nb), formulaCell.id);
|
|
37751
|
+
if (!_.isNil(range)) {
|
|
37752
|
+
formulaArray.push(range);
|
|
37753
|
+
}
|
|
37754
|
+
});
|
|
37755
|
+
} else if (!(calc_funcStr.substring(0, 2) === '="' && calc_funcStr.substring(calc_funcStr.length - 1, 1) === '"')) {
|
|
37756
|
+
var point = 0;
|
|
37757
|
+
var squote = -1;
|
|
37758
|
+
var dquote = -1;
|
|
37759
|
+
var formulaTextArray = [];
|
|
37760
|
+
var sq_end_array = [];
|
|
37761
|
+
var calc_funcStr_length = calc_funcStr.length;
|
|
37762
|
+
for (var j = 0; j < calc_funcStr_length; j += 1) {
|
|
37763
|
+
var char = calc_funcStr.charAt(j);
|
|
37764
|
+
if (char === "'" && dquote === -1) {
|
|
37765
|
+
if (squote === -1) {
|
|
37766
|
+
if (point !== j) {
|
|
37767
|
+
formulaTextArray.push.apply(formulaTextArray, _toConsumableArray(calc_funcStr.substring(point, j).split(/==|!=|<>|<=|>=|[,()=+-/*%&^><]/)));
|
|
37768
|
+
}
|
|
37769
|
+
squote = j;
|
|
37770
|
+
point = j;
|
|
37767
37771
|
} else {
|
|
37768
|
-
|
|
37769
|
-
|
|
37770
|
-
|
|
37771
|
-
|
|
37772
|
+
if (j < calc_funcStr_length - 1 && calc_funcStr.charAt(j + 1) === "'") {
|
|
37773
|
+
j += 1;
|
|
37774
|
+
} else {
|
|
37775
|
+
point = j + 1;
|
|
37776
|
+
formulaTextArray.push(calc_funcStr.substring(squote, point));
|
|
37777
|
+
sq_end_array.push(formulaTextArray.length - 1);
|
|
37778
|
+
squote = -1;
|
|
37779
|
+
}
|
|
37772
37780
|
}
|
|
37773
37781
|
}
|
|
37774
|
-
|
|
37775
|
-
|
|
37776
|
-
|
|
37777
|
-
|
|
37778
|
-
|
|
37779
|
-
|
|
37780
|
-
|
|
37781
|
-
point = j;
|
|
37782
|
-
} else {
|
|
37783
|
-
if (j < calc_funcStr_length - 1 && calc_funcStr.charAt(j + 1) === '"') {
|
|
37784
|
-
j += 1;
|
|
37782
|
+
if (char === '"' && squote === -1) {
|
|
37783
|
+
if (dquote === -1) {
|
|
37784
|
+
if (point !== j) {
|
|
37785
|
+
formulaTextArray.push.apply(formulaTextArray, _toConsumableArray(calc_funcStr.substring(point, j).split(/==|!=|<>|<=|>=|[,()=+-/*%&^><]/)));
|
|
37786
|
+
}
|
|
37787
|
+
dquote = j;
|
|
37788
|
+
point = j;
|
|
37785
37789
|
} else {
|
|
37786
|
-
|
|
37787
|
-
|
|
37788
|
-
|
|
37790
|
+
if (j < calc_funcStr_length - 1 && calc_funcStr.charAt(j + 1) === '"') {
|
|
37791
|
+
j += 1;
|
|
37792
|
+
} else {
|
|
37793
|
+
point = j + 1;
|
|
37794
|
+
formulaTextArray.push(calc_funcStr.substring(dquote, point));
|
|
37795
|
+
dquote = -1;
|
|
37796
|
+
}
|
|
37789
37797
|
}
|
|
37790
37798
|
}
|
|
37791
37799
|
}
|
|
37792
|
-
|
|
37793
|
-
|
|
37794
|
-
formulaTextArray.push.apply(formulaTextArray, _toConsumableArray(calc_funcStr.substring(point, calc_funcStr_length).split(/==|!=|<>|<=|>=|[,()=+-/*%&^><]/)));
|
|
37795
|
-
}
|
|
37796
|
-
for (var _j = sq_end_array.length - 1; _j >= 0; _j -= 1) {
|
|
37797
|
-
if (sq_end_array[_j] !== formulaTextArray.length - 1) {
|
|
37798
|
-
formulaTextArray[sq_end_array[_j]] += formulaTextArray[sq_end_array[_j] + 1];
|
|
37799
|
-
formulaTextArray.splice(sq_end_array[_j] + 1, 1);
|
|
37800
|
-
}
|
|
37801
|
-
}
|
|
37802
|
-
for (var _j2 = 0; _j2 < formulaTextArray.length; _j2 += 1) {
|
|
37803
|
-
var t = _.trim(formulaTextArray[_j2]);
|
|
37804
|
-
if (t.length <= 1) {
|
|
37805
|
-
continue;
|
|
37800
|
+
if (point !== calc_funcStr_length) {
|
|
37801
|
+
formulaTextArray.push.apply(formulaTextArray, _toConsumableArray(calc_funcStr.substring(point, calc_funcStr_length).split(/==|!=|<>|<=|>=|[,()=+-/*%&^><]/)));
|
|
37806
37802
|
}
|
|
37807
|
-
|
|
37808
|
-
|
|
37803
|
+
for (var _j = sq_end_array.length - 1; _j >= 0; _j -= 1) {
|
|
37804
|
+
if (sq_end_array[_j] !== formulaTextArray.length - 1) {
|
|
37805
|
+
formulaTextArray[sq_end_array[_j]] += formulaTextArray[sq_end_array[_j] + 1];
|
|
37806
|
+
formulaTextArray.splice(sq_end_array[_j] + 1, 1);
|
|
37807
|
+
}
|
|
37809
37808
|
}
|
|
37810
|
-
var
|
|
37811
|
-
|
|
37812
|
-
|
|
37809
|
+
for (var _j2 = 0; _j2 < formulaTextArray.length; _j2 += 1) {
|
|
37810
|
+
var t = _.trim(formulaTextArray[_j2]);
|
|
37811
|
+
if (t.length <= 1) {
|
|
37812
|
+
continue;
|
|
37813
|
+
}
|
|
37814
|
+
if (t.substring(0, 1) === '"' && t.substring(t.length - 1, 1) === '"' || !iscelldata(t)) {
|
|
37815
|
+
continue;
|
|
37816
|
+
}
|
|
37817
|
+
var range = getcellrange(ctx, t, formulaCell.id);
|
|
37818
|
+
if (_.isNil(range)) {
|
|
37819
|
+
continue;
|
|
37820
|
+
}
|
|
37821
|
+
formulaArray.push(range);
|
|
37813
37822
|
}
|
|
37814
|
-
formulaArray.push(range);
|
|
37815
37823
|
}
|
|
37816
|
-
|
|
37817
|
-
|
|
37818
|
-
|
|
37819
|
-
|
|
37820
|
-
|
|
37821
|
-
|
|
37822
|
-
|
|
37823
|
-
|
|
37824
|
-
|
|
37825
|
-
|
|
37826
|
-
|
|
37827
|
-
|
|
37828
|
-
|
|
37829
|
-
|
|
37824
|
+
var item = {
|
|
37825
|
+
formulaArray: formulaArray,
|
|
37826
|
+
calc_funcStr: calc_funcStr,
|
|
37827
|
+
key: key,
|
|
37828
|
+
r: formulaCell.r,
|
|
37829
|
+
c: formulaCell.c,
|
|
37830
|
+
id: formulaCell.id,
|
|
37831
|
+
parents: {},
|
|
37832
|
+
chidren: {},
|
|
37833
|
+
color: "w"
|
|
37834
|
+
};
|
|
37835
|
+
formulaObjects[key] = item;
|
|
37836
|
+
},
|
|
37837
|
+
_ret;
|
|
37830
37838
|
for (var _i12 = 0; _i12 < calcChains.length; _i12 += 1) {
|
|
37831
|
-
|
|
37839
|
+
_ret = _loop();
|
|
37840
|
+
if (_ret === 0) continue;
|
|
37832
37841
|
}
|
|
37833
37842
|
console.timeEnd('cache1');
|
|
37834
37843
|
console.time('cache2');
|
|
@@ -37853,66 +37862,36 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data) {
|
|
|
37853
37862
|
var visited = {};
|
|
37854
37863
|
var inStack = {};
|
|
37855
37864
|
var circularNodes = {};
|
|
37865
|
+
var dfsPath = [];
|
|
37856
37866
|
function detectCycle(nodeKey) {
|
|
37857
37867
|
inStack[nodeKey] = true;
|
|
37858
37868
|
visited[nodeKey] = true;
|
|
37869
|
+
dfsPath.push(nodeKey);
|
|
37859
37870
|
var node = formulaObjects[nodeKey];
|
|
37860
|
-
if (
|
|
37861
|
-
|
|
37862
|
-
|
|
37863
|
-
|
|
37864
|
-
|
|
37865
|
-
|
|
37866
|
-
if (
|
|
37867
|
-
|
|
37871
|
+
if (node) {
|
|
37872
|
+
var children = Object.keys(node.chidren);
|
|
37873
|
+
for (var _i13 = 0; _i13 < children.length; _i13 += 1) {
|
|
37874
|
+
var childKey = children[_i13];
|
|
37875
|
+
if (inStack[childKey]) {
|
|
37876
|
+
var cycleStart = dfsPath.indexOf(childKey);
|
|
37877
|
+
if (cycleStart > -1) {
|
|
37878
|
+
for (var k = cycleStart; k < dfsPath.length; k += 1) {
|
|
37879
|
+
circularNodes[dfsPath[k]] = true;
|
|
37880
|
+
}
|
|
37868
37881
|
}
|
|
37869
|
-
})
|
|
37870
|
-
|
|
37871
|
-
|
|
37872
|
-
if (!visited[childKey] && detectCycle(childKey)) {
|
|
37873
|
-
return true;
|
|
37882
|
+
} else if (!visited[childKey]) {
|
|
37883
|
+
detectCycle(childKey);
|
|
37884
|
+
}
|
|
37874
37885
|
}
|
|
37875
37886
|
}
|
|
37887
|
+
dfsPath.pop();
|
|
37876
37888
|
inStack[nodeKey] = false;
|
|
37877
|
-
return false;
|
|
37878
37889
|
}
|
|
37879
|
-
Object.keys(formulaObjects).
|
|
37890
|
+
Object.keys(formulaObjects).forEach(function (key) {
|
|
37880
37891
|
if (!visited[key]) {
|
|
37881
37892
|
detectCycle(key);
|
|
37882
37893
|
}
|
|
37883
|
-
return true;
|
|
37884
37894
|
});
|
|
37885
|
-
if (Object.keys(circularNodes).length > 0) {
|
|
37886
|
-
ctx.circularReference = Object.keys(circularNodes).map(function (key) {
|
|
37887
|
-
var _ctx$luckysheetfile$s;
|
|
37888
|
-
var fObj = formulaObjects[key];
|
|
37889
|
-
var sheetIndex = getSheetIndex(ctx, fObj.id);
|
|
37890
|
-
var sheetName = sheetIndex != null ? ((_ctx$luckysheetfile$s = ctx.luckysheetfile[sheetIndex]) === null || _ctx$luckysheetfile$s === void 0 ? void 0 : _ctx$luckysheetfile$s.name) || '' : '';
|
|
37891
|
-
var cellPosition = indexToColumnChar(fObj.c) + (fObj.r + 1);
|
|
37892
|
-
return {
|
|
37893
|
-
sheetName: sheetName,
|
|
37894
|
-
cellPosition: cellPosition,
|
|
37895
|
-
formulaContent: fObj.calc_funcStr,
|
|
37896
|
-
r: fObj.r,
|
|
37897
|
-
c: fObj.c,
|
|
37898
|
-
sheetId: fObj.id
|
|
37899
|
-
};
|
|
37900
|
-
});
|
|
37901
|
-
Object.keys(circularNodes).forEach(function (key) {
|
|
37902
|
-
var fObj = formulaObjects[key];
|
|
37903
|
-
if (fObj) {
|
|
37904
|
-
ctx.groupValuesRefreshData.push({
|
|
37905
|
-
r: fObj.r,
|
|
37906
|
-
c: fObj.c,
|
|
37907
|
-
v: error.r,
|
|
37908
|
-
f: fObj.calc_funcStr,
|
|
37909
|
-
id: fObj.id
|
|
37910
|
-
});
|
|
37911
|
-
fObj.level = Math.max;
|
|
37912
|
-
}
|
|
37913
|
-
});
|
|
37914
|
-
}
|
|
37915
|
-
console.timeEnd('dev');
|
|
37916
37895
|
var formulaRunList = [];
|
|
37917
37896
|
var stack = updateValueArray;
|
|
37918
37897
|
var existsFormulaRunList = {};
|
|
@@ -37942,12 +37921,56 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data) {
|
|
|
37942
37921
|
stack = stack.concat(cacheStack);
|
|
37943
37922
|
}
|
|
37944
37923
|
},
|
|
37945
|
-
|
|
37924
|
+
_ret2;
|
|
37946
37925
|
while (stack.length > 0) {
|
|
37947
|
-
|
|
37948
|
-
if (
|
|
37926
|
+
_ret2 = _loop2();
|
|
37927
|
+
if (_ret2 === 0) continue;
|
|
37949
37928
|
}
|
|
37950
37929
|
formulaRunList.reverse();
|
|
37930
|
+
var formulaRunListKeys = {};
|
|
37931
|
+
formulaRunList.forEach(function (item) {
|
|
37932
|
+
formulaRunListKeys[item.key] = true;
|
|
37933
|
+
});
|
|
37934
|
+
var circularKeys = Object.keys(circularNodes);
|
|
37935
|
+
var relevantCircularKeys = circularKeys.filter(function (key) {
|
|
37936
|
+
return formulaRunListKeys[key];
|
|
37937
|
+
});
|
|
37938
|
+
if (relevantCircularKeys.length > 0) {
|
|
37939
|
+
ctx.circularReference = relevantCircularKeys.map(function (key) {
|
|
37940
|
+
var _ctx$luckysheetfile$s;
|
|
37941
|
+
var fObj = formulaObjects[key];
|
|
37942
|
+
var sheetIndex = getSheetIndex(ctx, fObj.id);
|
|
37943
|
+
var sheetName = sheetIndex != null ? ((_ctx$luckysheetfile$s = ctx.luckysheetfile[sheetIndex]) === null || _ctx$luckysheetfile$s === void 0 ? void 0 : _ctx$luckysheetfile$s.name) || '' : '';
|
|
37944
|
+
var cellPosition = indexToColumnChar(fObj.c) + (fObj.r + 1);
|
|
37945
|
+
return {
|
|
37946
|
+
sheetName: sheetName,
|
|
37947
|
+
cellPosition: cellPosition,
|
|
37948
|
+
formulaContent: fObj.calc_funcStr,
|
|
37949
|
+
r: fObj.r,
|
|
37950
|
+
c: fObj.c,
|
|
37951
|
+
sheetId: fObj.id
|
|
37952
|
+
};
|
|
37953
|
+
});
|
|
37954
|
+
}
|
|
37955
|
+
if (relevantCircularKeys.length > 0) {
|
|
37956
|
+
var isEditingCell = !_.isNil(origin_r) && !_.isNil(origin_c);
|
|
37957
|
+
relevantCircularKeys.forEach(function (key) {
|
|
37958
|
+
var fObj = formulaObjects[key];
|
|
37959
|
+
if (!fObj) return;
|
|
37960
|
+
fObj.level = Math.max;
|
|
37961
|
+
if (isEditingCell && fObj.r === origin_r && fObj.c === origin_c && fObj.id === id) {
|
|
37962
|
+
return;
|
|
37963
|
+
}
|
|
37964
|
+
ctx.groupValuesRefreshData.push({
|
|
37965
|
+
r: fObj.r,
|
|
37966
|
+
c: fObj.c,
|
|
37967
|
+
v: error.r,
|
|
37968
|
+
f: fObj.calc_funcStr,
|
|
37969
|
+
id: fObj.id
|
|
37970
|
+
});
|
|
37971
|
+
});
|
|
37972
|
+
}
|
|
37973
|
+
console.timeEnd('dev');
|
|
37951
37974
|
console.timeEnd('execFunctionGroup-before');
|
|
37952
37975
|
var lastDataRowSheets = Object.create(null);
|
|
37953
37976
|
for (var _i14 = 0; _i14 < formulaRunList.length; _i14++) {
|
|
@@ -42060,7 +42083,7 @@ function updateCell(ctx, r, c, $input, value, canvas, sheetId) {
|
|
|
42060
42083
|
} else {
|
|
42061
42084
|
var _d$r3;
|
|
42062
42085
|
delFunctionGroup(ctx, r, c);
|
|
42063
|
-
execFunctionGroup(ctx, r, c, value, undefined, undefined, false, false);
|
|
42086
|
+
execFunctionGroup(ctx, r, c, value, undefined, undefined, false, false, "");
|
|
42064
42087
|
curv = _.cloneDeep((d === null || d === void 0 ? void 0 : (_d$r3 = d[r]) === null || _d$r3 === void 0 ? void 0 : _d$r3[c]) || {});
|
|
42065
42088
|
curv.v = value;
|
|
42066
42089
|
delete curv.f;
|
|
@@ -42119,7 +42142,7 @@ function updateCell(ctx, r, c, $input, value, canvas, sheetId) {
|
|
|
42119
42142
|
}
|
|
42120
42143
|
} else {
|
|
42121
42144
|
delFunctionGroup(ctx, r, c);
|
|
42122
|
-
execFunctionGroup(ctx, r, c, value, undefined, undefined, false, false);
|
|
42145
|
+
execFunctionGroup(ctx, r, c, value, undefined, undefined, false, false, "");
|
|
42123
42146
|
}
|
|
42124
42147
|
}
|
|
42125
42148
|
setCellValue(ctx, r, c, d, value);
|
|
@@ -56741,7 +56764,7 @@ function setCellValue$1(ctx, row, column, value, cellInput) {
|
|
|
56741
56764
|
var formatList = FORMAT_LIST;
|
|
56742
56765
|
if (value == null || value.toString().length === 0) {
|
|
56743
56766
|
delFunctionGroup(ctx, row, column);
|
|
56744
|
-
execFunctionGroup(ctx, row, column, value, sheet.id, data, false, false);
|
|
56767
|
+
execFunctionGroup(ctx, row, column, value, sheet.id, data, false, false, "");
|
|
56745
56768
|
setCellValue(ctx, row, column, data, value);
|
|
56746
56769
|
} else if (value instanceof Object) {
|
|
56747
56770
|
var _data$row;
|
|
@@ -56812,7 +56835,7 @@ function setCellValue$1(ctx, row, column, value, cellInput) {
|
|
|
56812
56835
|
updateCell(ctx, row, column, cellInput, value);
|
|
56813
56836
|
} else {
|
|
56814
56837
|
delFunctionGroup(ctx, row, column);
|
|
56815
|
-
execFunctionGroup(ctx, row, column, value, sheet.id, data, false, false);
|
|
56838
|
+
execFunctionGroup(ctx, row, column, value, sheet.id, data, false, false, "");
|
|
56816
56839
|
setCellValue(ctx, row, column, data, value);
|
|
56817
56840
|
}
|
|
56818
56841
|
}
|
package/dist/index.js
CHANGED
|
@@ -37596,7 +37596,7 @@ function execfunction(ctx, txt, r, c, id, isrefresh, notInsertFunc) {
|
|
|
37596
37596
|
f: txt
|
|
37597
37597
|
};else data[r][c].f = txt;
|
|
37598
37598
|
}
|
|
37599
|
-
execFunctionGroup(ctx, r, c, ___default['default'].isNil(formulaError) ? result : formulaError, id, false, notInsertFunc);
|
|
37599
|
+
execFunctionGroup(ctx, r, c, ___default['default'].isNil(formulaError) ? result : formulaError, id, false, notInsertFunc, undefined, txt);
|
|
37600
37600
|
if (!hadFormulaField && data && data[r] && data[r][c]) {
|
|
37601
37601
|
delete data[r][c].f;
|
|
37602
37602
|
}
|
|
@@ -37658,10 +37658,10 @@ function groupValuesRefresh(ctx) {
|
|
|
37658
37658
|
ctx.groupValuesRefreshData = [];
|
|
37659
37659
|
}
|
|
37660
37660
|
}
|
|
37661
|
-
function execFunctionGroup(ctx, origin_r, origin_c, value, id, data) {
|
|
37662
|
-
var isForce = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
|
|
37663
|
-
var notInsertFunc = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : true;
|
|
37661
|
+
function execFunctionGroup(ctx, origin_r, origin_c, value, id, data, isForce, notInsertFunc, originFormula) {
|
|
37664
37662
|
console.time('execFunctionGroup-before');
|
|
37663
|
+
isForce = !___default['default'].isNil(isForce) ? isForce : false;
|
|
37664
|
+
notInsertFunc = !___default['default'].isNil(notInsertFunc) ? notInsertFunc : true;
|
|
37665
37665
|
if (___default['default'].isNil(data)) {
|
|
37666
37666
|
data = getFlowdata(ctx);
|
|
37667
37667
|
}
|
|
@@ -37739,106 +37739,115 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data) {
|
|
|
37739
37739
|
console.timeEnd('arrayMatchCache');
|
|
37740
37740
|
console.time('cache1');
|
|
37741
37741
|
var _loop = function _loop() {
|
|
37742
|
-
|
|
37743
|
-
|
|
37744
|
-
|
|
37745
|
-
|
|
37746
|
-
|
|
37747
|
-
|
|
37748
|
-
|
|
37749
|
-
var isOffsetFunc = txt1.indexOf("INDIRECT(") > -1 || txt1.indexOf("OFFSET(") > -1 || txt1.indexOf("INDEX(") > -1;
|
|
37750
|
-
var formulaArray = [];
|
|
37751
|
-
if (isOffsetFunc) {
|
|
37752
|
-
isFunctionRange(ctx, calc_funcStr, null, null, formulaCell.id, null, function (str_nb) {
|
|
37753
|
-
var range = getcellrange(ctx, ___default['default'].trim(str_nb), formulaCell.id);
|
|
37754
|
-
if (!___default['default'].isNil(range)) {
|
|
37755
|
-
formulaArray.push(range);
|
|
37742
|
+
var formulaCell = calcChains[_i12];
|
|
37743
|
+
var key = "r".concat(formulaCell.r, "c").concat(formulaCell.c, "i").concat(formulaCell.id);
|
|
37744
|
+
var calc_funcStr = getcellFormula(ctx, formulaCell.r, formulaCell.c, formulaCell.id);
|
|
37745
|
+
var isOriginCell = !___default['default'].isNil(origin_r) && !___default['default'].isNil(origin_c) && formulaCell.r === origin_r && formulaCell.c === origin_c && formulaCell.id === id;
|
|
37746
|
+
if (isOriginCell && !___default['default'].isNil(originFormula)) {
|
|
37747
|
+
if (originFormula === "") {
|
|
37748
|
+
return 0; // continue
|
|
37756
37749
|
}
|
|
37757
|
-
|
|
37758
|
-
|
|
37759
|
-
|
|
37760
|
-
|
|
37761
|
-
|
|
37762
|
-
var
|
|
37763
|
-
var
|
|
37764
|
-
var
|
|
37765
|
-
|
|
37766
|
-
|
|
37767
|
-
|
|
37768
|
-
if (
|
|
37769
|
-
|
|
37770
|
-
|
|
37771
|
-
|
|
37772
|
-
|
|
37773
|
-
|
|
37774
|
-
|
|
37775
|
-
|
|
37776
|
-
|
|
37750
|
+
calc_funcStr = originFormula;
|
|
37751
|
+
}
|
|
37752
|
+
if (___default['default'].isNil(calc_funcStr)) {
|
|
37753
|
+
return 0; // continue
|
|
37754
|
+
}
|
|
37755
|
+
var txt1 = calc_funcStr.toUpperCase();
|
|
37756
|
+
var isOffsetFunc = txt1.indexOf("INDIRECT(") > -1 || txt1.indexOf("OFFSET(") > -1 || txt1.indexOf("INDEX(") > -1;
|
|
37757
|
+
var formulaArray = [];
|
|
37758
|
+
if (isOffsetFunc) {
|
|
37759
|
+
isFunctionRange(ctx, calc_funcStr, null, null, formulaCell.id, null, function (str_nb) {
|
|
37760
|
+
var range = getcellrange(ctx, ___default['default'].trim(str_nb), formulaCell.id);
|
|
37761
|
+
if (!___default['default'].isNil(range)) {
|
|
37762
|
+
formulaArray.push(range);
|
|
37763
|
+
}
|
|
37764
|
+
});
|
|
37765
|
+
} else if (!(calc_funcStr.substring(0, 2) === '="' && calc_funcStr.substring(calc_funcStr.length - 1, 1) === '"')) {
|
|
37766
|
+
var point = 0;
|
|
37767
|
+
var squote = -1;
|
|
37768
|
+
var dquote = -1;
|
|
37769
|
+
var formulaTextArray = [];
|
|
37770
|
+
var sq_end_array = [];
|
|
37771
|
+
var calc_funcStr_length = calc_funcStr.length;
|
|
37772
|
+
for (var j = 0; j < calc_funcStr_length; j += 1) {
|
|
37773
|
+
var char = calc_funcStr.charAt(j);
|
|
37774
|
+
if (char === "'" && dquote === -1) {
|
|
37775
|
+
if (squote === -1) {
|
|
37776
|
+
if (point !== j) {
|
|
37777
|
+
formulaTextArray.push.apply(formulaTextArray, _toConsumableArray(calc_funcStr.substring(point, j).split(/==|!=|<>|<=|>=|[,()=+-/*%&^><]/)));
|
|
37778
|
+
}
|
|
37779
|
+
squote = j;
|
|
37780
|
+
point = j;
|
|
37777
37781
|
} else {
|
|
37778
|
-
|
|
37779
|
-
|
|
37780
|
-
|
|
37781
|
-
|
|
37782
|
+
if (j < calc_funcStr_length - 1 && calc_funcStr.charAt(j + 1) === "'") {
|
|
37783
|
+
j += 1;
|
|
37784
|
+
} else {
|
|
37785
|
+
point = j + 1;
|
|
37786
|
+
formulaTextArray.push(calc_funcStr.substring(squote, point));
|
|
37787
|
+
sq_end_array.push(formulaTextArray.length - 1);
|
|
37788
|
+
squote = -1;
|
|
37789
|
+
}
|
|
37782
37790
|
}
|
|
37783
37791
|
}
|
|
37784
|
-
|
|
37785
|
-
|
|
37786
|
-
|
|
37787
|
-
|
|
37788
|
-
|
|
37789
|
-
|
|
37790
|
-
|
|
37791
|
-
point = j;
|
|
37792
|
-
} else {
|
|
37793
|
-
if (j < calc_funcStr_length - 1 && calc_funcStr.charAt(j + 1) === '"') {
|
|
37794
|
-
j += 1;
|
|
37792
|
+
if (char === '"' && squote === -1) {
|
|
37793
|
+
if (dquote === -1) {
|
|
37794
|
+
if (point !== j) {
|
|
37795
|
+
formulaTextArray.push.apply(formulaTextArray, _toConsumableArray(calc_funcStr.substring(point, j).split(/==|!=|<>|<=|>=|[,()=+-/*%&^><]/)));
|
|
37796
|
+
}
|
|
37797
|
+
dquote = j;
|
|
37798
|
+
point = j;
|
|
37795
37799
|
} else {
|
|
37796
|
-
|
|
37797
|
-
|
|
37798
|
-
|
|
37800
|
+
if (j < calc_funcStr_length - 1 && calc_funcStr.charAt(j + 1) === '"') {
|
|
37801
|
+
j += 1;
|
|
37802
|
+
} else {
|
|
37803
|
+
point = j + 1;
|
|
37804
|
+
formulaTextArray.push(calc_funcStr.substring(dquote, point));
|
|
37805
|
+
dquote = -1;
|
|
37806
|
+
}
|
|
37799
37807
|
}
|
|
37800
37808
|
}
|
|
37801
37809
|
}
|
|
37802
|
-
|
|
37803
|
-
|
|
37804
|
-
formulaTextArray.push.apply(formulaTextArray, _toConsumableArray(calc_funcStr.substring(point, calc_funcStr_length).split(/==|!=|<>|<=|>=|[,()=+-/*%&^><]/)));
|
|
37805
|
-
}
|
|
37806
|
-
for (var _j = sq_end_array.length - 1; _j >= 0; _j -= 1) {
|
|
37807
|
-
if (sq_end_array[_j] !== formulaTextArray.length - 1) {
|
|
37808
|
-
formulaTextArray[sq_end_array[_j]] += formulaTextArray[sq_end_array[_j] + 1];
|
|
37809
|
-
formulaTextArray.splice(sq_end_array[_j] + 1, 1);
|
|
37810
|
-
}
|
|
37811
|
-
}
|
|
37812
|
-
for (var _j2 = 0; _j2 < formulaTextArray.length; _j2 += 1) {
|
|
37813
|
-
var t = ___default['default'].trim(formulaTextArray[_j2]);
|
|
37814
|
-
if (t.length <= 1) {
|
|
37815
|
-
continue;
|
|
37810
|
+
if (point !== calc_funcStr_length) {
|
|
37811
|
+
formulaTextArray.push.apply(formulaTextArray, _toConsumableArray(calc_funcStr.substring(point, calc_funcStr_length).split(/==|!=|<>|<=|>=|[,()=+-/*%&^><]/)));
|
|
37816
37812
|
}
|
|
37817
|
-
|
|
37818
|
-
|
|
37813
|
+
for (var _j = sq_end_array.length - 1; _j >= 0; _j -= 1) {
|
|
37814
|
+
if (sq_end_array[_j] !== formulaTextArray.length - 1) {
|
|
37815
|
+
formulaTextArray[sq_end_array[_j]] += formulaTextArray[sq_end_array[_j] + 1];
|
|
37816
|
+
formulaTextArray.splice(sq_end_array[_j] + 1, 1);
|
|
37817
|
+
}
|
|
37819
37818
|
}
|
|
37820
|
-
var
|
|
37821
|
-
|
|
37822
|
-
|
|
37819
|
+
for (var _j2 = 0; _j2 < formulaTextArray.length; _j2 += 1) {
|
|
37820
|
+
var t = ___default['default'].trim(formulaTextArray[_j2]);
|
|
37821
|
+
if (t.length <= 1) {
|
|
37822
|
+
continue;
|
|
37823
|
+
}
|
|
37824
|
+
if (t.substring(0, 1) === '"' && t.substring(t.length - 1, 1) === '"' || !iscelldata(t)) {
|
|
37825
|
+
continue;
|
|
37826
|
+
}
|
|
37827
|
+
var range = getcellrange(ctx, t, formulaCell.id);
|
|
37828
|
+
if (___default['default'].isNil(range)) {
|
|
37829
|
+
continue;
|
|
37830
|
+
}
|
|
37831
|
+
formulaArray.push(range);
|
|
37823
37832
|
}
|
|
37824
|
-
formulaArray.push(range);
|
|
37825
37833
|
}
|
|
37826
|
-
|
|
37827
|
-
|
|
37828
|
-
|
|
37829
|
-
|
|
37830
|
-
|
|
37831
|
-
|
|
37832
|
-
|
|
37833
|
-
|
|
37834
|
-
|
|
37835
|
-
|
|
37836
|
-
|
|
37837
|
-
|
|
37838
|
-
|
|
37839
|
-
|
|
37834
|
+
var item = {
|
|
37835
|
+
formulaArray: formulaArray,
|
|
37836
|
+
calc_funcStr: calc_funcStr,
|
|
37837
|
+
key: key,
|
|
37838
|
+
r: formulaCell.r,
|
|
37839
|
+
c: formulaCell.c,
|
|
37840
|
+
id: formulaCell.id,
|
|
37841
|
+
parents: {},
|
|
37842
|
+
chidren: {},
|
|
37843
|
+
color: "w"
|
|
37844
|
+
};
|
|
37845
|
+
formulaObjects[key] = item;
|
|
37846
|
+
},
|
|
37847
|
+
_ret;
|
|
37840
37848
|
for (var _i12 = 0; _i12 < calcChains.length; _i12 += 1) {
|
|
37841
|
-
|
|
37849
|
+
_ret = _loop();
|
|
37850
|
+
if (_ret === 0) continue;
|
|
37842
37851
|
}
|
|
37843
37852
|
console.timeEnd('cache1');
|
|
37844
37853
|
console.time('cache2');
|
|
@@ -37863,66 +37872,36 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data) {
|
|
|
37863
37872
|
var visited = {};
|
|
37864
37873
|
var inStack = {};
|
|
37865
37874
|
var circularNodes = {};
|
|
37875
|
+
var dfsPath = [];
|
|
37866
37876
|
function detectCycle(nodeKey) {
|
|
37867
37877
|
inStack[nodeKey] = true;
|
|
37868
37878
|
visited[nodeKey] = true;
|
|
37879
|
+
dfsPath.push(nodeKey);
|
|
37869
37880
|
var node = formulaObjects[nodeKey];
|
|
37870
|
-
if (
|
|
37871
|
-
|
|
37872
|
-
|
|
37873
|
-
|
|
37874
|
-
|
|
37875
|
-
|
|
37876
|
-
if (
|
|
37877
|
-
|
|
37881
|
+
if (node) {
|
|
37882
|
+
var children = Object.keys(node.chidren);
|
|
37883
|
+
for (var _i13 = 0; _i13 < children.length; _i13 += 1) {
|
|
37884
|
+
var childKey = children[_i13];
|
|
37885
|
+
if (inStack[childKey]) {
|
|
37886
|
+
var cycleStart = dfsPath.indexOf(childKey);
|
|
37887
|
+
if (cycleStart > -1) {
|
|
37888
|
+
for (var k = cycleStart; k < dfsPath.length; k += 1) {
|
|
37889
|
+
circularNodes[dfsPath[k]] = true;
|
|
37890
|
+
}
|
|
37878
37891
|
}
|
|
37879
|
-
})
|
|
37880
|
-
|
|
37881
|
-
|
|
37882
|
-
if (!visited[childKey] && detectCycle(childKey)) {
|
|
37883
|
-
return true;
|
|
37892
|
+
} else if (!visited[childKey]) {
|
|
37893
|
+
detectCycle(childKey);
|
|
37894
|
+
}
|
|
37884
37895
|
}
|
|
37885
37896
|
}
|
|
37897
|
+
dfsPath.pop();
|
|
37886
37898
|
inStack[nodeKey] = false;
|
|
37887
|
-
return false;
|
|
37888
37899
|
}
|
|
37889
|
-
Object.keys(formulaObjects).
|
|
37900
|
+
Object.keys(formulaObjects).forEach(function (key) {
|
|
37890
37901
|
if (!visited[key]) {
|
|
37891
37902
|
detectCycle(key);
|
|
37892
37903
|
}
|
|
37893
|
-
return true;
|
|
37894
37904
|
});
|
|
37895
|
-
if (Object.keys(circularNodes).length > 0) {
|
|
37896
|
-
ctx.circularReference = Object.keys(circularNodes).map(function (key) {
|
|
37897
|
-
var _ctx$luckysheetfile$s;
|
|
37898
|
-
var fObj = formulaObjects[key];
|
|
37899
|
-
var sheetIndex = getSheetIndex(ctx, fObj.id);
|
|
37900
|
-
var sheetName = sheetIndex != null ? ((_ctx$luckysheetfile$s = ctx.luckysheetfile[sheetIndex]) === null || _ctx$luckysheetfile$s === void 0 ? void 0 : _ctx$luckysheetfile$s.name) || '' : '';
|
|
37901
|
-
var cellPosition = indexToColumnChar(fObj.c) + (fObj.r + 1);
|
|
37902
|
-
return {
|
|
37903
|
-
sheetName: sheetName,
|
|
37904
|
-
cellPosition: cellPosition,
|
|
37905
|
-
formulaContent: fObj.calc_funcStr,
|
|
37906
|
-
r: fObj.r,
|
|
37907
|
-
c: fObj.c,
|
|
37908
|
-
sheetId: fObj.id
|
|
37909
|
-
};
|
|
37910
|
-
});
|
|
37911
|
-
Object.keys(circularNodes).forEach(function (key) {
|
|
37912
|
-
var fObj = formulaObjects[key];
|
|
37913
|
-
if (fObj) {
|
|
37914
|
-
ctx.groupValuesRefreshData.push({
|
|
37915
|
-
r: fObj.r,
|
|
37916
|
-
c: fObj.c,
|
|
37917
|
-
v: error.r,
|
|
37918
|
-
f: fObj.calc_funcStr,
|
|
37919
|
-
id: fObj.id
|
|
37920
|
-
});
|
|
37921
|
-
fObj.level = Math.max;
|
|
37922
|
-
}
|
|
37923
|
-
});
|
|
37924
|
-
}
|
|
37925
|
-
console.timeEnd('dev');
|
|
37926
37905
|
var formulaRunList = [];
|
|
37927
37906
|
var stack = updateValueArray;
|
|
37928
37907
|
var existsFormulaRunList = {};
|
|
@@ -37952,12 +37931,56 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data) {
|
|
|
37952
37931
|
stack = stack.concat(cacheStack);
|
|
37953
37932
|
}
|
|
37954
37933
|
},
|
|
37955
|
-
|
|
37934
|
+
_ret2;
|
|
37956
37935
|
while (stack.length > 0) {
|
|
37957
|
-
|
|
37958
|
-
if (
|
|
37936
|
+
_ret2 = _loop2();
|
|
37937
|
+
if (_ret2 === 0) continue;
|
|
37959
37938
|
}
|
|
37960
37939
|
formulaRunList.reverse();
|
|
37940
|
+
var formulaRunListKeys = {};
|
|
37941
|
+
formulaRunList.forEach(function (item) {
|
|
37942
|
+
formulaRunListKeys[item.key] = true;
|
|
37943
|
+
});
|
|
37944
|
+
var circularKeys = Object.keys(circularNodes);
|
|
37945
|
+
var relevantCircularKeys = circularKeys.filter(function (key) {
|
|
37946
|
+
return formulaRunListKeys[key];
|
|
37947
|
+
});
|
|
37948
|
+
if (relevantCircularKeys.length > 0) {
|
|
37949
|
+
ctx.circularReference = relevantCircularKeys.map(function (key) {
|
|
37950
|
+
var _ctx$luckysheetfile$s;
|
|
37951
|
+
var fObj = formulaObjects[key];
|
|
37952
|
+
var sheetIndex = getSheetIndex(ctx, fObj.id);
|
|
37953
|
+
var sheetName = sheetIndex != null ? ((_ctx$luckysheetfile$s = ctx.luckysheetfile[sheetIndex]) === null || _ctx$luckysheetfile$s === void 0 ? void 0 : _ctx$luckysheetfile$s.name) || '' : '';
|
|
37954
|
+
var cellPosition = indexToColumnChar(fObj.c) + (fObj.r + 1);
|
|
37955
|
+
return {
|
|
37956
|
+
sheetName: sheetName,
|
|
37957
|
+
cellPosition: cellPosition,
|
|
37958
|
+
formulaContent: fObj.calc_funcStr,
|
|
37959
|
+
r: fObj.r,
|
|
37960
|
+
c: fObj.c,
|
|
37961
|
+
sheetId: fObj.id
|
|
37962
|
+
};
|
|
37963
|
+
});
|
|
37964
|
+
}
|
|
37965
|
+
if (relevantCircularKeys.length > 0) {
|
|
37966
|
+
var isEditingCell = !___default['default'].isNil(origin_r) && !___default['default'].isNil(origin_c);
|
|
37967
|
+
relevantCircularKeys.forEach(function (key) {
|
|
37968
|
+
var fObj = formulaObjects[key];
|
|
37969
|
+
if (!fObj) return;
|
|
37970
|
+
fObj.level = Math.max;
|
|
37971
|
+
if (isEditingCell && fObj.r === origin_r && fObj.c === origin_c && fObj.id === id) {
|
|
37972
|
+
return;
|
|
37973
|
+
}
|
|
37974
|
+
ctx.groupValuesRefreshData.push({
|
|
37975
|
+
r: fObj.r,
|
|
37976
|
+
c: fObj.c,
|
|
37977
|
+
v: error.r,
|
|
37978
|
+
f: fObj.calc_funcStr,
|
|
37979
|
+
id: fObj.id
|
|
37980
|
+
});
|
|
37981
|
+
});
|
|
37982
|
+
}
|
|
37983
|
+
console.timeEnd('dev');
|
|
37961
37984
|
console.timeEnd('execFunctionGroup-before');
|
|
37962
37985
|
var lastDataRowSheets = Object.create(null);
|
|
37963
37986
|
for (var _i14 = 0; _i14 < formulaRunList.length; _i14++) {
|
|
@@ -42070,7 +42093,7 @@ function updateCell(ctx, r, c, $input, value, canvas, sheetId) {
|
|
|
42070
42093
|
} else {
|
|
42071
42094
|
var _d$r3;
|
|
42072
42095
|
delFunctionGroup(ctx, r, c);
|
|
42073
|
-
execFunctionGroup(ctx, r, c, value, undefined, undefined, false, false);
|
|
42096
|
+
execFunctionGroup(ctx, r, c, value, undefined, undefined, false, false, "");
|
|
42074
42097
|
curv = ___default['default'].cloneDeep((d === null || d === void 0 ? void 0 : (_d$r3 = d[r]) === null || _d$r3 === void 0 ? void 0 : _d$r3[c]) || {});
|
|
42075
42098
|
curv.v = value;
|
|
42076
42099
|
delete curv.f;
|
|
@@ -42129,7 +42152,7 @@ function updateCell(ctx, r, c, $input, value, canvas, sheetId) {
|
|
|
42129
42152
|
}
|
|
42130
42153
|
} else {
|
|
42131
42154
|
delFunctionGroup(ctx, r, c);
|
|
42132
|
-
execFunctionGroup(ctx, r, c, value, undefined, undefined, false, false);
|
|
42155
|
+
execFunctionGroup(ctx, r, c, value, undefined, undefined, false, false, "");
|
|
42133
42156
|
}
|
|
42134
42157
|
}
|
|
42135
42158
|
setCellValue(ctx, r, c, d, value);
|
|
@@ -56751,7 +56774,7 @@ function setCellValue$1(ctx, row, column, value, cellInput) {
|
|
|
56751
56774
|
var formatList = FORMAT_LIST;
|
|
56752
56775
|
if (value == null || value.toString().length === 0) {
|
|
56753
56776
|
delFunctionGroup(ctx, row, column);
|
|
56754
|
-
execFunctionGroup(ctx, row, column, value, sheet.id, data, false, false);
|
|
56777
|
+
execFunctionGroup(ctx, row, column, value, sheet.id, data, false, false, "");
|
|
56755
56778
|
setCellValue(ctx, row, column, data, value);
|
|
56756
56779
|
} else if (value instanceof Object) {
|
|
56757
56780
|
var _data$row;
|
|
@@ -56822,7 +56845,7 @@ function setCellValue$1(ctx, row, column, value, cellInput) {
|
|
|
56822
56845
|
updateCell(ctx, row, column, cellInput, value);
|
|
56823
56846
|
} else {
|
|
56824
56847
|
delFunctionGroup(ctx, row, column);
|
|
56825
|
-
execFunctionGroup(ctx, row, column, value, sheet.id, data, false, false);
|
|
56848
|
+
execFunctionGroup(ctx, row, column, value, sheet.id, data, false, false, "");
|
|
56826
56849
|
setCellValue(ctx, row, column, data, value);
|
|
56827
56850
|
}
|
|
56828
56851
|
}
|
|
@@ -35,7 +35,7 @@ export declare function delFunctionGroup(ctx: Context, r: number, c: number, id?
|
|
|
35
35
|
export declare function insertUpdateFunctionGroup(ctx: Context, r: number, c: number, id?: string): void;
|
|
36
36
|
export declare function execfunction(ctx: Context, txt: string, r: number, c: number, id?: string, isrefresh?: boolean, notInsertFunc?: boolean): any[];
|
|
37
37
|
export declare function groupValuesRefresh(ctx: Context): void;
|
|
38
|
-
export declare function execFunctionGroup(ctx: Context, origin_r: number, origin_c: number, value: any, id?: string, data?: any, isForce?: boolean, notInsertFunc?: boolean): void;
|
|
38
|
+
export declare function execFunctionGroup(ctx: Context, origin_r: number, origin_c: number, value: any, id?: string, data?: any, isForce?: boolean, notInsertFunc?: boolean, originFormula?: string): void;
|
|
39
39
|
export declare function createFormulaRangeSelect(ctx: Context, select: {
|
|
40
40
|
rangeIndex: number;
|
|
41
41
|
} & Rect): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leankylin-sheet/core",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.32",
|
|
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": "7.0.
|
|
16
|
+
"@leankylin-sheet/formula-parser": "7.0.32",
|
|
17
17
|
"dayjs": "^1.11.0",
|
|
18
18
|
"immer": "^9.0.12",
|
|
19
19
|
"lodash": "^4.17.21",
|