@leankylin-sheet/core 4.0.47 → 4.0.49

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
@@ -37669,20 +37669,26 @@ function functionCopy(ctx, txt, mode, step) {
37669
37669
  squote: 0,
37670
37670
  dquote: 0
37671
37671
  };
37672
- while (i < funcstack.length) {
37672
+ var _loop3 = function _loop3() {
37673
37673
  var s = funcstack[i];
37674
37674
  var nextS = funcstack[i + 1];
37675
37675
  if (s === "{" && nextS === "{") {
37676
+ var hasCell = false;
37676
37677
  var nextI = funcstack === null || funcstack === void 0 ? void 0 : funcstack.findIndex(function (__, index) {
37678
+ if (i < index && funcstack[index - 1] === "!") {
37679
+ hasCell = true;
37680
+ return true;
37681
+ }
37677
37682
  if (i < index && funcstack[index] === "}" && funcstack[index + 1] === "}") {
37678
37683
  return true;
37679
37684
  }
37680
37685
  return false;
37681
37686
  });
37682
37687
  if (nextI !== -1) {
37683
- function_str += txt.substring(i, nextI + 2);
37684
- i = nextI + 2;
37685
- continue;
37688
+ var nestPositionI = hasCell ? nextI : nextI + 2;
37689
+ function_str += txt.substring(i, nestPositionI);
37690
+ i = nestPositionI;
37691
+ return 1; // continue
37686
37692
  }
37687
37693
  }
37688
37694
  if (s === "(" && matchConfig.dquote === 0) {
@@ -37747,6 +37753,9 @@ function functionCopy(ctx, txt, mode, step) {
37747
37753
  function_str += s;
37748
37754
  }
37749
37755
  }
37756
+ } else if (s === "}") {
37757
+ function_str += "".concat(functionCopy(ctx, str, mode, step), "}");
37758
+ str = "";
37750
37759
  } else {
37751
37760
  str += s;
37752
37761
  }
@@ -37766,6 +37775,9 @@ function functionCopy(ctx, txt, mode, step) {
37766
37775
  }
37767
37776
  }
37768
37777
  i += 1;
37778
+ };
37779
+ while (i < funcstack.length) {
37780
+ if (_loop3()) continue;
37769
37781
  }
37770
37782
  return function_str;
37771
37783
  }
package/dist/index.js CHANGED
@@ -37679,20 +37679,26 @@ function functionCopy(ctx, txt, mode, step) {
37679
37679
  squote: 0,
37680
37680
  dquote: 0
37681
37681
  };
37682
- while (i < funcstack.length) {
37682
+ var _loop3 = function _loop3() {
37683
37683
  var s = funcstack[i];
37684
37684
  var nextS = funcstack[i + 1];
37685
37685
  if (s === "{" && nextS === "{") {
37686
+ var hasCell = false;
37686
37687
  var nextI = funcstack === null || funcstack === void 0 ? void 0 : funcstack.findIndex(function (__, index) {
37688
+ if (i < index && funcstack[index - 1] === "!") {
37689
+ hasCell = true;
37690
+ return true;
37691
+ }
37687
37692
  if (i < index && funcstack[index] === "}" && funcstack[index + 1] === "}") {
37688
37693
  return true;
37689
37694
  }
37690
37695
  return false;
37691
37696
  });
37692
37697
  if (nextI !== -1) {
37693
- function_str += txt.substring(i, nextI + 2);
37694
- i = nextI + 2;
37695
- continue;
37698
+ var nestPositionI = hasCell ? nextI : nextI + 2;
37699
+ function_str += txt.substring(i, nestPositionI);
37700
+ i = nestPositionI;
37701
+ return 1; // continue
37696
37702
  }
37697
37703
  }
37698
37704
  if (s === "(" && matchConfig.dquote === 0) {
@@ -37757,6 +37763,9 @@ function functionCopy(ctx, txt, mode, step) {
37757
37763
  function_str += s;
37758
37764
  }
37759
37765
  }
37766
+ } else if (s === "}") {
37767
+ function_str += "".concat(functionCopy(ctx, str, mode, step), "}");
37768
+ str = "";
37760
37769
  } else {
37761
37770
  str += s;
37762
37771
  }
@@ -37776,6 +37785,9 @@ function functionCopy(ctx, txt, mode, step) {
37776
37785
  }
37777
37786
  }
37778
37787
  i += 1;
37788
+ };
37789
+ while (i < funcstack.length) {
37790
+ if (_loop3()) continue;
37779
37791
  }
37780
37792
  return function_str;
37781
37793
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leankylin-sheet/core",
3
- "version": "4.0.47",
3
+ "version": "4.0.49",
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.47",
16
+ "@leankylin-sheet/formula-parser": "4.0.49",
17
17
  "dayjs": "^1.11.0",
18
18
  "immer": "^9.0.12",
19
19
  "lodash": "^4.17.21",