@leankylin-sheet/core 5.2.3 → 5.2.5
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/api/sheet.d.ts +1 -1
- package/dist/index.esm.js +20 -23
- package/dist/index.js +20 -23
- package/package.json +2 -2
package/dist/api/sheet.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare function hideSheet(ctx: Context, sheetId: string): void;
|
|
|
9
9
|
export declare function showSheet(ctx: Context, sheetId: string): void;
|
|
10
10
|
export declare function copySheet(ctx: Context, sheetId: string, hooks: Hooks): void;
|
|
11
11
|
export declare function calculateSheetFromula(ctx: Context, id: string): void;
|
|
12
|
-
export declare function updateFunctionGroup(ctx: Context
|
|
12
|
+
export declare function updateFunctionGroup(ctx: Context): void;
|
|
13
13
|
export declare function calculateSheetByCells(ctx: Context, cells: {
|
|
14
14
|
r: number;
|
|
15
15
|
c: number;
|
package/dist/index.esm.js
CHANGED
|
@@ -46611,33 +46611,30 @@ function calculateSheetFromula(ctx, id) {
|
|
|
46611
46611
|
ctx.luckysheetfile = luckysheetfile;
|
|
46612
46612
|
console.timeEnd("calcTime:".concat(id));
|
|
46613
46613
|
}
|
|
46614
|
-
function updateFunctionGroup(ctx
|
|
46615
|
-
var index = getSheetIndex(ctx, id);
|
|
46614
|
+
function updateFunctionGroup(ctx) {
|
|
46616
46615
|
var luckysheetfile = ctx.luckysheetfile;
|
|
46617
|
-
var
|
|
46618
|
-
|
|
46619
|
-
|
|
46620
|
-
|
|
46621
|
-
|
|
46622
|
-
|
|
46623
|
-
|
|
46624
|
-
|
|
46625
|
-
|
|
46626
|
-
|
|
46627
|
-
|
|
46616
|
+
for (var index = 0; index < luckysheetfile.length; index++) {
|
|
46617
|
+
var file = luckysheetfile[index];
|
|
46618
|
+
var calcChain = [];
|
|
46619
|
+
if (!ctx.luckysheetfile[index].data) return;
|
|
46620
|
+
for (var r = 0; r < ctx.luckysheetfile[index].data.length; r += 1) {
|
|
46621
|
+
for (var c = 0; c < ctx.luckysheetfile[index].data[r].length; c += 1) {
|
|
46622
|
+
var cell = ctx.luckysheetfile[index].data[r][c];
|
|
46623
|
+
if (!(cell === null || cell === void 0 ? void 0 : cell.f)) {
|
|
46624
|
+
continue;
|
|
46625
|
+
}
|
|
46626
|
+
var cc = {
|
|
46627
|
+
r: r,
|
|
46628
|
+
c: c,
|
|
46629
|
+
id: file.id
|
|
46630
|
+
};
|
|
46631
|
+
calcChain.push(cc);
|
|
46628
46632
|
}
|
|
46629
|
-
var cc = {
|
|
46630
|
-
r: r,
|
|
46631
|
-
c: c,
|
|
46632
|
-
id: id
|
|
46633
|
-
};
|
|
46634
|
-
calcChain.push(cc);
|
|
46635
46633
|
}
|
|
46634
|
+
file.calcChain = uniqBy(calcChain, function (item) {
|
|
46635
|
+
return item.r + item.c + item.id;
|
|
46636
|
+
});
|
|
46636
46637
|
}
|
|
46637
|
-
file.calcChain = uniqBy(calcChain, function (item) {
|
|
46638
|
-
return item.r + item.c + item.id;
|
|
46639
|
-
});
|
|
46640
|
-
ctx.luckysheetfile = luckysheetfile;
|
|
46641
46638
|
}
|
|
46642
46639
|
function parseCellReferences(expression) {
|
|
46643
46640
|
if (typeof expression !== "string" || expression.trim() === "") {
|
package/dist/index.js
CHANGED
|
@@ -46621,33 +46621,30 @@ function calculateSheetFromula(ctx, id) {
|
|
|
46621
46621
|
ctx.luckysheetfile = luckysheetfile;
|
|
46622
46622
|
console.timeEnd("calcTime:".concat(id));
|
|
46623
46623
|
}
|
|
46624
|
-
function updateFunctionGroup(ctx
|
|
46625
|
-
var index = getSheetIndex(ctx, id);
|
|
46624
|
+
function updateFunctionGroup(ctx) {
|
|
46626
46625
|
var luckysheetfile = ctx.luckysheetfile;
|
|
46627
|
-
var
|
|
46628
|
-
|
|
46629
|
-
|
|
46630
|
-
|
|
46631
|
-
|
|
46632
|
-
|
|
46633
|
-
|
|
46634
|
-
|
|
46635
|
-
|
|
46636
|
-
|
|
46637
|
-
|
|
46626
|
+
for (var index = 0; index < luckysheetfile.length; index++) {
|
|
46627
|
+
var file = luckysheetfile[index];
|
|
46628
|
+
var calcChain = [];
|
|
46629
|
+
if (!ctx.luckysheetfile[index].data) return;
|
|
46630
|
+
for (var r = 0; r < ctx.luckysheetfile[index].data.length; r += 1) {
|
|
46631
|
+
for (var c = 0; c < ctx.luckysheetfile[index].data[r].length; c += 1) {
|
|
46632
|
+
var cell = ctx.luckysheetfile[index].data[r][c];
|
|
46633
|
+
if (!(cell === null || cell === void 0 ? void 0 : cell.f)) {
|
|
46634
|
+
continue;
|
|
46635
|
+
}
|
|
46636
|
+
var cc = {
|
|
46637
|
+
r: r,
|
|
46638
|
+
c: c,
|
|
46639
|
+
id: file.id
|
|
46640
|
+
};
|
|
46641
|
+
calcChain.push(cc);
|
|
46638
46642
|
}
|
|
46639
|
-
var cc = {
|
|
46640
|
-
r: r,
|
|
46641
|
-
c: c,
|
|
46642
|
-
id: id
|
|
46643
|
-
};
|
|
46644
|
-
calcChain.push(cc);
|
|
46645
46643
|
}
|
|
46644
|
+
file.calcChain = _.uniqBy(calcChain, function (item) {
|
|
46645
|
+
return item.r + item.c + item.id;
|
|
46646
|
+
});
|
|
46646
46647
|
}
|
|
46647
|
-
file.calcChain = _.uniqBy(calcChain, function (item) {
|
|
46648
|
-
return item.r + item.c + item.id;
|
|
46649
|
-
});
|
|
46650
|
-
ctx.luckysheetfile = luckysheetfile;
|
|
46651
46648
|
}
|
|
46652
46649
|
function parseCellReferences(expression) {
|
|
46653
46650
|
if (typeof expression !== "string" || expression.trim() === "") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leankylin-sheet/core",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.5",
|
|
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.5",
|
|
17
17
|
"dayjs": "^1.11.0",
|
|
18
18
|
"immer": "^9.0.12",
|
|
19
19
|
"lodash": "^4.17.21",
|