@leankylin-sheet/core 4.0.29 → 4.0.31

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 CHANGED
@@ -10403,11 +10403,11 @@ var en = {
10403
10403
  columnOverLimit: "1000 column limit exceeded"
10404
10404
  },
10405
10405
  comment: {
10406
- insert: "Insert",
10407
- edit: "Edit",
10408
- delete: "Delete",
10409
- showOne: "Show/Hide",
10410
- showAll: "Show/Hide All"
10406
+ insert: "Insert Comment",
10407
+ edit: "Edit Comment",
10408
+ delete: "Delete Comment",
10409
+ showOne: "Show/Hide Comment",
10410
+ showAll: "Show/Hide All Comment"
10411
10411
  },
10412
10412
  screenshot: {
10413
10413
  screenshotTipNoSelection: "Please select the scope of the screenshot",
@@ -20967,11 +20967,11 @@ var zh = {
20967
20967
  columnOverLimit: "超出1000列限制"
20968
20968
  },
20969
20969
  comment: {
20970
- insert: "新建批注",
20971
- edit: "编辑批注",
20972
- delete: "删除",
20973
- showOne: "显示/隐藏批注",
20974
- showAll: "显示/隐藏所有批注"
20970
+ insert: "新建说明",
20971
+ edit: "编辑说明",
20972
+ delete: "删除说明",
20973
+ showOne: "显示/隐藏说明",
20974
+ showAll: "显示/隐藏所有说明"
20975
20975
  },
20976
20976
  screenshot: {
20977
20977
  screenshotTipNoSelection: "请框选需要截图的范围",
@@ -37620,6 +37620,20 @@ function functionCopy(ctx, txt, mode, step) {
37620
37620
  };
37621
37621
  while (i < funcstack.length) {
37622
37622
  var s = funcstack[i];
37623
+ var nextS = funcstack[i + 1];
37624
+ if (s === "{" && nextS === "{") {
37625
+ var nextI = funcstack === null || funcstack === void 0 ? void 0 : funcstack.findIndex(function (__, index) {
37626
+ if (i < index && funcstack[index] === "}" && funcstack[index + 1] === "}") {
37627
+ return true;
37628
+ }
37629
+ return false;
37630
+ });
37631
+ if (nextI !== -1) {
37632
+ function_str += txt.substring(i, nextI + 2);
37633
+ i = nextI + 2;
37634
+ continue;
37635
+ }
37636
+ }
37623
37637
  if (s === "(" && matchConfig.dquote === 0) {
37624
37638
  matchConfig.bracket += 1;
37625
37639
  if (str.length > 0) {
@@ -44599,7 +44613,7 @@ function insertRowCol(ctx, op) {
44599
44613
  var calc_funcStr = getcellFormula(ctx, calc_r, calc_c, calc_i);
44600
44614
  if (type === "row" && SheetIndex === curOrder) {
44601
44615
  var _d$calc_r, _d$calc_r$calc_c;
44602
- var functionStr = "=".concat(functionStrChange(calc_funcStr, "add", "row", direction, index, count, sheetName, curOrder === i));
44616
+ var functionStr = "=".concat(functionStrChange(calc_funcStr, "add", "row", direction, index, count, sheetName, id === calc_i));
44603
44617
  if (((_d$calc_r = d[calc_r]) === null || _d$calc_r === void 0 ? void 0 : (_d$calc_r$calc_c = _d$calc_r[calc_c]) === null || _d$calc_r$calc_c === void 0 ? void 0 : _d$calc_r$calc_c.f) === calc_funcStr) {
44604
44618
  d[calc_r][calc_c].f = functionStr;
44605
44619
  }
@@ -44615,13 +44629,13 @@ function insertRowCol(ctx, op) {
44615
44629
  newCalcChain.push(calc);
44616
44630
  } else if (type === "row") {
44617
44631
  var _data$calc_r, _data$calc_r$calc_c;
44618
- var _functionStr = "=".concat(functionStrChange(calc_funcStr, "add", "row", direction, index, count, sheetName, curOrder === i));
44632
+ var _functionStr = "=".concat(functionStrChange(calc_funcStr, "add", "row", direction, index, count, sheetName, id === calc_i));
44619
44633
  if (((_data$calc_r = data[calc_r]) === null || _data$calc_r === void 0 ? void 0 : (_data$calc_r$calc_c = _data$calc_r[calc_c]) === null || _data$calc_r$calc_c === void 0 ? void 0 : _data$calc_r$calc_c.f) === calc_funcStr) {
44620
44634
  data[calc_r][calc_c].f = _functionStr;
44621
44635
  }
44622
44636
  } else if (type === "column" && SheetIndex === curOrder) {
44623
44637
  var _d$calc_r2, _d$calc_r2$calc_c;
44624
- var _functionStr2 = "=".concat(functionStrChange(calc_funcStr, "add", "col", direction, index, count, sheetName, curOrder === i));
44638
+ var _functionStr2 = "=".concat(functionStrChange(calc_funcStr, "add", "col", direction, index, count, sheetName, id === calc_i));
44625
44639
  if (((_d$calc_r2 = d[calc_r]) === null || _d$calc_r2 === void 0 ? void 0 : (_d$calc_r2$calc_c = _d$calc_r2[calc_c]) === null || _d$calc_r2$calc_c === void 0 ? void 0 : _d$calc_r2$calc_c.f) === calc_funcStr) {
44626
44640
  d[calc_r][calc_c].f = _functionStr2;
44627
44641
  }
@@ -44637,7 +44651,7 @@ function insertRowCol(ctx, op) {
44637
44651
  newCalcChain.push(calc);
44638
44652
  } else if (type === "column") {
44639
44653
  var _data$calc_r2, _data$calc_r2$calc_c;
44640
- var _functionStr3 = "=".concat(functionStrChange(calc_funcStr, "add", "col", direction, index, count, sheetName, curOrder === i));
44654
+ var _functionStr3 = "=".concat(functionStrChange(calc_funcStr, "add", "col", direction, index, count, sheetName, id === calc_i));
44641
44655
  if (((_data$calc_r2 = data[calc_r]) === null || _data$calc_r2 === void 0 ? void 0 : (_data$calc_r2$calc_c = _data$calc_r2[calc_c]) === null || _data$calc_r2$calc_c === void 0 ? void 0 : _data$calc_r2$calc_c.f) === calc_funcStr) {
44642
44656
  data[calc_r][calc_c].f = _functionStr3;
44643
44657
  }
@@ -45565,7 +45579,7 @@ function deleteRowCol(ctx, op) {
45565
45579
  if (type === "row" && SheetIndex === curOrder) {
45566
45580
  if (calc_r < start || calc_r > end) {
45567
45581
  var _data$calc_r3, _data$calc_r3$calc_c;
45568
- var functionStr = "=".concat(functionStrChange(calc_funcStr, "del", "row", null, start, slen, sheetName, curOrder === i));
45582
+ var functionStr = "=".concat(functionStrChange(calc_funcStr, "del", "row", null, start, slen, sheetName, id === calc_i));
45569
45583
  if (((_data$calc_r3 = data[calc_r]) === null || _data$calc_r3 === void 0 ? void 0 : (_data$calc_r3$calc_c = _data$calc_r3[calc_c]) === null || _data$calc_r3$calc_c === void 0 ? void 0 : _data$calc_r3$calc_c.f) === calc_funcStr) {
45570
45584
  data[calc_r][calc_c].f = functionStr;
45571
45585
  }
@@ -45576,14 +45590,14 @@ function deleteRowCol(ctx, op) {
45576
45590
  }
45577
45591
  } else if (type === "row") {
45578
45592
  var _data$calc_r4, _data$calc_r4$calc_c;
45579
- var _functionStr4 = "=".concat(functionStrChange(calc_funcStr, "del", "row", null, start, slen, sheetName, curOrder === i));
45593
+ var _functionStr4 = "=".concat(functionStrChange(calc_funcStr, "del", "row", null, start, slen, sheetName, id === calc_i));
45580
45594
  if (((_data$calc_r4 = data[calc_r]) === null || _data$calc_r4 === void 0 ? void 0 : (_data$calc_r4$calc_c = _data$calc_r4[calc_c]) === null || _data$calc_r4$calc_c === void 0 ? void 0 : _data$calc_r4$calc_c.f) === calc_funcStr) {
45581
45595
  data[calc_r][calc_c].f = _functionStr4;
45582
45596
  }
45583
45597
  } else if (type === "column" && SheetIndex === curOrder) {
45584
45598
  if (calc_c < start || calc_c > end) {
45585
45599
  var _data$calc_r5, _data$calc_r5$calc_c;
45586
- var _functionStr5 = "=".concat(functionStrChange(calc_funcStr, "del", "col", null, start, slen, sheetName, curOrder === i));
45600
+ var _functionStr5 = "=".concat(functionStrChange(calc_funcStr, "del", "col", null, start, slen, sheetName, id === calc_i));
45587
45601
  if (((_data$calc_r5 = data[calc_r]) === null || _data$calc_r5 === void 0 ? void 0 : (_data$calc_r5$calc_c = _data$calc_r5[calc_c]) === null || _data$calc_r5$calc_c === void 0 ? void 0 : _data$calc_r5$calc_c.f) === calc_funcStr) {
45588
45602
  data[calc_r][calc_c].f = _functionStr5;
45589
45603
  }
@@ -45594,7 +45608,7 @@ function deleteRowCol(ctx, op) {
45594
45608
  }
45595
45609
  } else if (type === "column") {
45596
45610
  var _data$calc_r6, _data$calc_r6$calc_c;
45597
- var _functionStr6 = "=".concat(functionStrChange(calc_funcStr, "del", "col", null, start, slen, sheetName, curOrder === i));
45611
+ var _functionStr6 = "=".concat(functionStrChange(calc_funcStr, "del", "col", null, start, slen, sheetName, id === calc_i));
45598
45612
  if (((_data$calc_r6 = data[calc_r]) === null || _data$calc_r6 === void 0 ? void 0 : (_data$calc_r6$calc_c = _data$calc_r6[calc_c]) === null || _data$calc_r6$calc_c === void 0 ? void 0 : _data$calc_r6$calc_c.f) === calc_funcStr) {
45599
45613
  data[calc_r][calc_c].f = _functionStr6;
45600
45614
  }
package/dist/index.js CHANGED
@@ -10413,11 +10413,11 @@ var en = {
10413
10413
  columnOverLimit: "1000 column limit exceeded"
10414
10414
  },
10415
10415
  comment: {
10416
- insert: "Insert",
10417
- edit: "Edit",
10418
- delete: "Delete",
10419
- showOne: "Show/Hide",
10420
- showAll: "Show/Hide All"
10416
+ insert: "Insert Comment",
10417
+ edit: "Edit Comment",
10418
+ delete: "Delete Comment",
10419
+ showOne: "Show/Hide Comment",
10420
+ showAll: "Show/Hide All Comment"
10421
10421
  },
10422
10422
  screenshot: {
10423
10423
  screenshotTipNoSelection: "Please select the scope of the screenshot",
@@ -20977,11 +20977,11 @@ var zh = {
20977
20977
  columnOverLimit: "超出1000列限制"
20978
20978
  },
20979
20979
  comment: {
20980
- insert: "新建批注",
20981
- edit: "编辑批注",
20982
- delete: "删除",
20983
- showOne: "显示/隐藏批注",
20984
- showAll: "显示/隐藏所有批注"
20980
+ insert: "新建说明",
20981
+ edit: "编辑说明",
20982
+ delete: "删除说明",
20983
+ showOne: "显示/隐藏说明",
20984
+ showAll: "显示/隐藏所有说明"
20985
20985
  },
20986
20986
  screenshot: {
20987
20987
  screenshotTipNoSelection: "请框选需要截图的范围",
@@ -37630,6 +37630,20 @@ function functionCopy(ctx, txt, mode, step) {
37630
37630
  };
37631
37631
  while (i < funcstack.length) {
37632
37632
  var s = funcstack[i];
37633
+ var nextS = funcstack[i + 1];
37634
+ if (s === "{" && nextS === "{") {
37635
+ var nextI = funcstack === null || funcstack === void 0 ? void 0 : funcstack.findIndex(function (__, index) {
37636
+ if (i < index && funcstack[index] === "}" && funcstack[index + 1] === "}") {
37637
+ return true;
37638
+ }
37639
+ return false;
37640
+ });
37641
+ if (nextI !== -1) {
37642
+ function_str += txt.substring(i, nextI + 2);
37643
+ i = nextI + 2;
37644
+ continue;
37645
+ }
37646
+ }
37633
37647
  if (s === "(" && matchConfig.dquote === 0) {
37634
37648
  matchConfig.bracket += 1;
37635
37649
  if (str.length > 0) {
@@ -44609,7 +44623,7 @@ function insertRowCol(ctx, op) {
44609
44623
  var calc_funcStr = getcellFormula(ctx, calc_r, calc_c, calc_i);
44610
44624
  if (type === "row" && SheetIndex === curOrder) {
44611
44625
  var _d$calc_r, _d$calc_r$calc_c;
44612
- var functionStr = "=".concat(functionStrChange(calc_funcStr, "add", "row", direction, index, count, sheetName, curOrder === i));
44626
+ var functionStr = "=".concat(functionStrChange(calc_funcStr, "add", "row", direction, index, count, sheetName, id === calc_i));
44613
44627
  if (((_d$calc_r = d[calc_r]) === null || _d$calc_r === void 0 ? void 0 : (_d$calc_r$calc_c = _d$calc_r[calc_c]) === null || _d$calc_r$calc_c === void 0 ? void 0 : _d$calc_r$calc_c.f) === calc_funcStr) {
44614
44628
  d[calc_r][calc_c].f = functionStr;
44615
44629
  }
@@ -44625,13 +44639,13 @@ function insertRowCol(ctx, op) {
44625
44639
  newCalcChain.push(calc);
44626
44640
  } else if (type === "row") {
44627
44641
  var _data$calc_r, _data$calc_r$calc_c;
44628
- var _functionStr = "=".concat(functionStrChange(calc_funcStr, "add", "row", direction, index, count, sheetName, curOrder === i));
44642
+ var _functionStr = "=".concat(functionStrChange(calc_funcStr, "add", "row", direction, index, count, sheetName, id === calc_i));
44629
44643
  if (((_data$calc_r = data[calc_r]) === null || _data$calc_r === void 0 ? void 0 : (_data$calc_r$calc_c = _data$calc_r[calc_c]) === null || _data$calc_r$calc_c === void 0 ? void 0 : _data$calc_r$calc_c.f) === calc_funcStr) {
44630
44644
  data[calc_r][calc_c].f = _functionStr;
44631
44645
  }
44632
44646
  } else if (type === "column" && SheetIndex === curOrder) {
44633
44647
  var _d$calc_r2, _d$calc_r2$calc_c;
44634
- var _functionStr2 = "=".concat(functionStrChange(calc_funcStr, "add", "col", direction, index, count, sheetName, curOrder === i));
44648
+ var _functionStr2 = "=".concat(functionStrChange(calc_funcStr, "add", "col", direction, index, count, sheetName, id === calc_i));
44635
44649
  if (((_d$calc_r2 = d[calc_r]) === null || _d$calc_r2 === void 0 ? void 0 : (_d$calc_r2$calc_c = _d$calc_r2[calc_c]) === null || _d$calc_r2$calc_c === void 0 ? void 0 : _d$calc_r2$calc_c.f) === calc_funcStr) {
44636
44650
  d[calc_r][calc_c].f = _functionStr2;
44637
44651
  }
@@ -44647,7 +44661,7 @@ function insertRowCol(ctx, op) {
44647
44661
  newCalcChain.push(calc);
44648
44662
  } else if (type === "column") {
44649
44663
  var _data$calc_r2, _data$calc_r2$calc_c;
44650
- var _functionStr3 = "=".concat(functionStrChange(calc_funcStr, "add", "col", direction, index, count, sheetName, curOrder === i));
44664
+ var _functionStr3 = "=".concat(functionStrChange(calc_funcStr, "add", "col", direction, index, count, sheetName, id === calc_i));
44651
44665
  if (((_data$calc_r2 = data[calc_r]) === null || _data$calc_r2 === void 0 ? void 0 : (_data$calc_r2$calc_c = _data$calc_r2[calc_c]) === null || _data$calc_r2$calc_c === void 0 ? void 0 : _data$calc_r2$calc_c.f) === calc_funcStr) {
44652
44666
  data[calc_r][calc_c].f = _functionStr3;
44653
44667
  }
@@ -45575,7 +45589,7 @@ function deleteRowCol(ctx, op) {
45575
45589
  if (type === "row" && SheetIndex === curOrder) {
45576
45590
  if (calc_r < start || calc_r > end) {
45577
45591
  var _data$calc_r3, _data$calc_r3$calc_c;
45578
- var functionStr = "=".concat(functionStrChange(calc_funcStr, "del", "row", null, start, slen, sheetName, curOrder === i));
45592
+ var functionStr = "=".concat(functionStrChange(calc_funcStr, "del", "row", null, start, slen, sheetName, id === calc_i));
45579
45593
  if (((_data$calc_r3 = data[calc_r]) === null || _data$calc_r3 === void 0 ? void 0 : (_data$calc_r3$calc_c = _data$calc_r3[calc_c]) === null || _data$calc_r3$calc_c === void 0 ? void 0 : _data$calc_r3$calc_c.f) === calc_funcStr) {
45580
45594
  data[calc_r][calc_c].f = functionStr;
45581
45595
  }
@@ -45586,14 +45600,14 @@ function deleteRowCol(ctx, op) {
45586
45600
  }
45587
45601
  } else if (type === "row") {
45588
45602
  var _data$calc_r4, _data$calc_r4$calc_c;
45589
- var _functionStr4 = "=".concat(functionStrChange(calc_funcStr, "del", "row", null, start, slen, sheetName, curOrder === i));
45603
+ var _functionStr4 = "=".concat(functionStrChange(calc_funcStr, "del", "row", null, start, slen, sheetName, id === calc_i));
45590
45604
  if (((_data$calc_r4 = data[calc_r]) === null || _data$calc_r4 === void 0 ? void 0 : (_data$calc_r4$calc_c = _data$calc_r4[calc_c]) === null || _data$calc_r4$calc_c === void 0 ? void 0 : _data$calc_r4$calc_c.f) === calc_funcStr) {
45591
45605
  data[calc_r][calc_c].f = _functionStr4;
45592
45606
  }
45593
45607
  } else if (type === "column" && SheetIndex === curOrder) {
45594
45608
  if (calc_c < start || calc_c > end) {
45595
45609
  var _data$calc_r5, _data$calc_r5$calc_c;
45596
- var _functionStr5 = "=".concat(functionStrChange(calc_funcStr, "del", "col", null, start, slen, sheetName, curOrder === i));
45610
+ var _functionStr5 = "=".concat(functionStrChange(calc_funcStr, "del", "col", null, start, slen, sheetName, id === calc_i));
45597
45611
  if (((_data$calc_r5 = data[calc_r]) === null || _data$calc_r5 === void 0 ? void 0 : (_data$calc_r5$calc_c = _data$calc_r5[calc_c]) === null || _data$calc_r5$calc_c === void 0 ? void 0 : _data$calc_r5$calc_c.f) === calc_funcStr) {
45598
45612
  data[calc_r][calc_c].f = _functionStr5;
45599
45613
  }
@@ -45604,7 +45618,7 @@ function deleteRowCol(ctx, op) {
45604
45618
  }
45605
45619
  } else if (type === "column") {
45606
45620
  var _data$calc_r6, _data$calc_r6$calc_c;
45607
- var _functionStr6 = "=".concat(functionStrChange(calc_funcStr, "del", "col", null, start, slen, sheetName, curOrder === i));
45621
+ var _functionStr6 = "=".concat(functionStrChange(calc_funcStr, "del", "col", null, start, slen, sheetName, id === calc_i));
45608
45622
  if (((_data$calc_r6 = data[calc_r]) === null || _data$calc_r6 === void 0 ? void 0 : (_data$calc_r6$calc_c = _data$calc_r6[calc_c]) === null || _data$calc_r6$calc_c === void 0 ? void 0 : _data$calc_r6$calc_c.f) === calc_funcStr) {
45609
45623
  data[calc_r][calc_c].f = _functionStr6;
45610
45624
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leankylin-sheet/core",
3
- "version": "4.0.29",
3
+ "version": "4.0.31",
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.29",
16
+ "@leankylin-sheet/formula-parser": "4.0.31",
17
17
  "dayjs": "^1.11.0",
18
18
  "immer": "^9.0.12",
19
19
  "lodash": "^4.17.21",