@leankylin-sheet/core 4.0.55 → 4.0.57

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
@@ -55629,6 +55629,14 @@ function setCellValue$1(ctx, row, column, value, cellInput) {
55629
55629
  } else if (value instanceof Object) {
55630
55630
  var _data$row;
55631
55631
  var curv = {};
55632
+ if (!(data === null || data === void 0 ? void 0 : data[row])) {
55633
+ var needAddRow = row - ((data === null || data === void 0 ? void 0 : data.length) || 0) + 1;
55634
+ data === null || data === void 0 ? void 0 : data.push.apply(data, _toConsumableArray(Array.from({
55635
+ length: needAddRow
55636
+ }).map(function () {
55637
+ return [];
55638
+ })));
55639
+ }
55632
55640
  if ((data === null || data === void 0 ? void 0 : (_data$row = data[row]) === null || _data$row === void 0 ? void 0 : _data$row[column]) == null) {
55633
55641
  data[row][column] = {};
55634
55642
  }
@@ -55641,6 +55649,7 @@ function setCellValue$1(ctx, row, column, value, cellInput) {
55641
55649
  updateCell(ctx, row, column, cellInput, curv);
55642
55650
  } else {
55643
55651
  var needupdateFdev = false;
55652
+ var needUpdateM = false;
55644
55653
  var oldF = cell.f;
55645
55654
  var nf = value.f;
55646
55655
  var oldV = cell.v;
@@ -55661,18 +55670,15 @@ function setCellValue$1(ctx, row, column, value, cellInput) {
55661
55670
  }
55662
55671
  if (nf !== undefined && nf !== oldF) {
55663
55672
  needupdateFdev = true;
55673
+ needUpdateM = true;
55664
55674
  }
55665
- console.log('new', value);
55666
- console.log('old', cell);
55667
- console.log('nv', nv);
55668
- console.log('oldV', oldV);
55669
- console.log('nv', String(nv) !== String(oldV));
55670
55675
  if (nv !== undefined && String(nv) !== String(oldV)) {
55671
- needupdateFdev = true;
55676
+ needUpdateM = true;
55672
55677
  }
55673
- console.log('needupdateFdev', needupdateFdev);
55674
55678
  if (needupdateFdev) {
55675
55679
  delFunctionGroup(ctx, row, column);
55680
+ }
55681
+ if (needUpdateM) {
55676
55682
  setCellValue(ctx, row, column, data, curv);
55677
55683
  }
55678
55684
  }
package/dist/index.js CHANGED
@@ -55639,6 +55639,14 @@ function setCellValue$1(ctx, row, column, value, cellInput) {
55639
55639
  } else if (value instanceof Object) {
55640
55640
  var _data$row;
55641
55641
  var curv = {};
55642
+ if (!(data === null || data === void 0 ? void 0 : data[row])) {
55643
+ var needAddRow = row - ((data === null || data === void 0 ? void 0 : data.length) || 0) + 1;
55644
+ data === null || data === void 0 ? void 0 : data.push.apply(data, _toConsumableArray(Array.from({
55645
+ length: needAddRow
55646
+ }).map(function () {
55647
+ return [];
55648
+ })));
55649
+ }
55642
55650
  if ((data === null || data === void 0 ? void 0 : (_data$row = data[row]) === null || _data$row === void 0 ? void 0 : _data$row[column]) == null) {
55643
55651
  data[row][column] = {};
55644
55652
  }
@@ -55651,6 +55659,7 @@ function setCellValue$1(ctx, row, column, value, cellInput) {
55651
55659
  updateCell(ctx, row, column, cellInput, curv);
55652
55660
  } else {
55653
55661
  var needupdateFdev = false;
55662
+ var needUpdateM = false;
55654
55663
  var oldF = cell.f;
55655
55664
  var nf = value.f;
55656
55665
  var oldV = cell.v;
@@ -55671,18 +55680,15 @@ function setCellValue$1(ctx, row, column, value, cellInput) {
55671
55680
  }
55672
55681
  if (nf !== undefined && nf !== oldF) {
55673
55682
  needupdateFdev = true;
55683
+ needUpdateM = true;
55674
55684
  }
55675
- console.log('new', value);
55676
- console.log('old', cell);
55677
- console.log('nv', nv);
55678
- console.log('oldV', oldV);
55679
- console.log('nv', String(nv) !== String(oldV));
55680
55685
  if (nv !== undefined && String(nv) !== String(oldV)) {
55681
- needupdateFdev = true;
55686
+ needUpdateM = true;
55682
55687
  }
55683
- console.log('needupdateFdev', needupdateFdev);
55684
55688
  if (needupdateFdev) {
55685
55689
  delFunctionGroup(ctx, row, column);
55690
+ }
55691
+ if (needUpdateM) {
55686
55692
  setCellValue(ctx, row, column, data, curv);
55687
55693
  }
55688
55694
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leankylin-sheet/core",
3
- "version": "4.0.55",
3
+ "version": "4.0.57",
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.55",
16
+ "@leankylin-sheet/formula-parser": "4.0.57",
17
17
  "dayjs": "^1.11.0",
18
18
  "immer": "^9.0.12",
19
19
  "lodash": "^4.17.21",