@leankylin-sheet/core 5.2.4 → 5.2.6
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 -37
- package/dist/index.js +20 -37
- 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
|
@@ -46577,11 +46577,6 @@ function calculateSheetFromula(ctx, id) {
|
|
|
46577
46577
|
console.time("calcTime:".concat(id));
|
|
46578
46578
|
var index$1 = getSheetIndex(ctx, id);
|
|
46579
46579
|
var luckysheetfile = ctx.luckysheetfile;
|
|
46580
|
-
var file = luckysheetfile[index$1];
|
|
46581
|
-
var calcChain = file.calcChain;
|
|
46582
|
-
if (_.isNil(calcChain)) {
|
|
46583
|
-
calcChain = [];
|
|
46584
|
-
}
|
|
46585
46580
|
if (!ctx.luckysheetfile[index$1].data) return;
|
|
46586
46581
|
for (var r = 0; r < ctx.luckysheetfile[index$1].data.length; r += 1) {
|
|
46587
46582
|
for (var c = 0; c < ctx.luckysheetfile[index$1].data[r].length; c += 1) {
|
|
@@ -46589,12 +46584,6 @@ function calculateSheetFromula(ctx, id) {
|
|
|
46589
46584
|
if (!(cell === null || cell === void 0 ? void 0 : cell.f)) {
|
|
46590
46585
|
continue;
|
|
46591
46586
|
}
|
|
46592
|
-
var cc = {
|
|
46593
|
-
r: r,
|
|
46594
|
-
c: c,
|
|
46595
|
-
id: id
|
|
46596
|
-
};
|
|
46597
|
-
calcChain.push(cc);
|
|
46598
46587
|
var result = execfunction(ctx, cell === null || cell === void 0 ? void 0 : cell.f, r, c, id, true, true);
|
|
46599
46588
|
var newV = result[1];
|
|
46600
46589
|
if (newV === cell.v) {
|
|
@@ -46605,39 +46594,33 @@ function calculateSheetFromula(ctx, id) {
|
|
|
46605
46594
|
});
|
|
46606
46595
|
}
|
|
46607
46596
|
}
|
|
46608
|
-
file.calcChain = uniqBy(calcChain, function (item) {
|
|
46609
|
-
return item.r + item.c + item.id;
|
|
46610
|
-
});
|
|
46611
46597
|
ctx.luckysheetfile = luckysheetfile;
|
|
46612
46598
|
console.timeEnd("calcTime:".concat(id));
|
|
46613
46599
|
}
|
|
46614
|
-
function updateFunctionGroup(ctx
|
|
46615
|
-
var index = getSheetIndex(ctx, id);
|
|
46600
|
+
function updateFunctionGroup(ctx) {
|
|
46616
46601
|
var luckysheetfile = ctx.luckysheetfile;
|
|
46617
|
-
var
|
|
46618
|
-
|
|
46619
|
-
|
|
46620
|
-
|
|
46621
|
-
|
|
46622
|
-
|
|
46623
|
-
|
|
46624
|
-
|
|
46625
|
-
|
|
46626
|
-
|
|
46627
|
-
|
|
46602
|
+
for (var index = 0; index < luckysheetfile.length; index++) {
|
|
46603
|
+
var file = luckysheetfile[index];
|
|
46604
|
+
var calcChain = [];
|
|
46605
|
+
if (!ctx.luckysheetfile[index].data) return;
|
|
46606
|
+
for (var r = 0; r < ctx.luckysheetfile[index].data.length; r += 1) {
|
|
46607
|
+
for (var c = 0; c < ctx.luckysheetfile[index].data[r].length; c += 1) {
|
|
46608
|
+
var cell = ctx.luckysheetfile[index].data[r][c];
|
|
46609
|
+
if (!(cell === null || cell === void 0 ? void 0 : cell.f)) {
|
|
46610
|
+
continue;
|
|
46611
|
+
}
|
|
46612
|
+
var cc = {
|
|
46613
|
+
r: r,
|
|
46614
|
+
c: c,
|
|
46615
|
+
id: file.id
|
|
46616
|
+
};
|
|
46617
|
+
calcChain.push(cc);
|
|
46628
46618
|
}
|
|
46629
|
-
var cc = {
|
|
46630
|
-
r: r,
|
|
46631
|
-
c: c,
|
|
46632
|
-
id: id
|
|
46633
|
-
};
|
|
46634
|
-
calcChain.push(cc);
|
|
46635
46619
|
}
|
|
46620
|
+
file.calcChain = uniqBy(calcChain, function (item) {
|
|
46621
|
+
return item.r + item.c + item.id;
|
|
46622
|
+
});
|
|
46636
46623
|
}
|
|
46637
|
-
file.calcChain = uniqBy(calcChain, function (item) {
|
|
46638
|
-
return item.r + item.c + item.id;
|
|
46639
|
-
});
|
|
46640
|
-
ctx.luckysheetfile = luckysheetfile;
|
|
46641
46624
|
}
|
|
46642
46625
|
function parseCellReferences(expression) {
|
|
46643
46626
|
if (typeof expression !== "string" || expression.trim() === "") {
|
package/dist/index.js
CHANGED
|
@@ -46587,11 +46587,6 @@ function calculateSheetFromula(ctx, id) {
|
|
|
46587
46587
|
console.time("calcTime:".concat(id));
|
|
46588
46588
|
var index$1 = getSheetIndex(ctx, id);
|
|
46589
46589
|
var luckysheetfile = ctx.luckysheetfile;
|
|
46590
|
-
var file = luckysheetfile[index$1];
|
|
46591
|
-
var calcChain = file.calcChain;
|
|
46592
|
-
if (___default['default'].isNil(calcChain)) {
|
|
46593
|
-
calcChain = [];
|
|
46594
|
-
}
|
|
46595
46590
|
if (!ctx.luckysheetfile[index$1].data) return;
|
|
46596
46591
|
for (var r = 0; r < ctx.luckysheetfile[index$1].data.length; r += 1) {
|
|
46597
46592
|
for (var c = 0; c < ctx.luckysheetfile[index$1].data[r].length; c += 1) {
|
|
@@ -46599,12 +46594,6 @@ function calculateSheetFromula(ctx, id) {
|
|
|
46599
46594
|
if (!(cell === null || cell === void 0 ? void 0 : cell.f)) {
|
|
46600
46595
|
continue;
|
|
46601
46596
|
}
|
|
46602
|
-
var cc = {
|
|
46603
|
-
r: r,
|
|
46604
|
-
c: c,
|
|
46605
|
-
id: id
|
|
46606
|
-
};
|
|
46607
|
-
calcChain.push(cc);
|
|
46608
46597
|
var result = execfunction(ctx, cell === null || cell === void 0 ? void 0 : cell.f, r, c, id, true, true);
|
|
46609
46598
|
var newV = result[1];
|
|
46610
46599
|
if (newV === cell.v) {
|
|
@@ -46615,39 +46604,33 @@ function calculateSheetFromula(ctx, id) {
|
|
|
46615
46604
|
});
|
|
46616
46605
|
}
|
|
46617
46606
|
}
|
|
46618
|
-
file.calcChain = _.uniqBy(calcChain, function (item) {
|
|
46619
|
-
return item.r + item.c + item.id;
|
|
46620
|
-
});
|
|
46621
46607
|
ctx.luckysheetfile = luckysheetfile;
|
|
46622
46608
|
console.timeEnd("calcTime:".concat(id));
|
|
46623
46609
|
}
|
|
46624
|
-
function updateFunctionGroup(ctx
|
|
46625
|
-
var index = getSheetIndex(ctx, id);
|
|
46610
|
+
function updateFunctionGroup(ctx) {
|
|
46626
46611
|
var luckysheetfile = ctx.luckysheetfile;
|
|
46627
|
-
var
|
|
46628
|
-
|
|
46629
|
-
|
|
46630
|
-
|
|
46631
|
-
|
|
46632
|
-
|
|
46633
|
-
|
|
46634
|
-
|
|
46635
|
-
|
|
46636
|
-
|
|
46637
|
-
|
|
46612
|
+
for (var index = 0; index < luckysheetfile.length; index++) {
|
|
46613
|
+
var file = luckysheetfile[index];
|
|
46614
|
+
var calcChain = [];
|
|
46615
|
+
if (!ctx.luckysheetfile[index].data) return;
|
|
46616
|
+
for (var r = 0; r < ctx.luckysheetfile[index].data.length; r += 1) {
|
|
46617
|
+
for (var c = 0; c < ctx.luckysheetfile[index].data[r].length; c += 1) {
|
|
46618
|
+
var cell = ctx.luckysheetfile[index].data[r][c];
|
|
46619
|
+
if (!(cell === null || cell === void 0 ? void 0 : cell.f)) {
|
|
46620
|
+
continue;
|
|
46621
|
+
}
|
|
46622
|
+
var cc = {
|
|
46623
|
+
r: r,
|
|
46624
|
+
c: c,
|
|
46625
|
+
id: file.id
|
|
46626
|
+
};
|
|
46627
|
+
calcChain.push(cc);
|
|
46638
46628
|
}
|
|
46639
|
-
var cc = {
|
|
46640
|
-
r: r,
|
|
46641
|
-
c: c,
|
|
46642
|
-
id: id
|
|
46643
|
-
};
|
|
46644
|
-
calcChain.push(cc);
|
|
46645
46629
|
}
|
|
46630
|
+
file.calcChain = _.uniqBy(calcChain, function (item) {
|
|
46631
|
+
return item.r + item.c + item.id;
|
|
46632
|
+
});
|
|
46646
46633
|
}
|
|
46647
|
-
file.calcChain = _.uniqBy(calcChain, function (item) {
|
|
46648
|
-
return item.r + item.c + item.id;
|
|
46649
|
-
});
|
|
46650
|
-
ctx.luckysheetfile = luckysheetfile;
|
|
46651
46634
|
}
|
|
46652
46635
|
function parseCellReferences(expression) {
|
|
46653
46636
|
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.6",
|
|
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.6",
|
|
17
17
|
"dayjs": "^1.11.0",
|
|
18
18
|
"immer": "^9.0.12",
|
|
19
19
|
"lodash": "^4.17.21",
|