@leankylin-sheet/core 3.1.19 → 3.1.20

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
@@ -58845,14 +58845,10 @@ function removeEditingComment(ctx, globalCache) {
58845
58845
  return v.rc !== "".concat(r, "_").concat(c);
58846
58846
  });
58847
58847
  }
58848
- if (ctx.hooks.afterUpdateComment) {
58849
- var _ctx$hooks$afterUpdat, _ctx$hooks2;
58850
- (_ctx$hooks$afterUpdat = (_ctx$hooks2 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat === void 0 ? void 0 : _ctx$hooks$afterUpdat.call(_ctx$hooks2, r, c, _objectSpread2({}, cell.ps));
58851
- }
58852
58848
  }
58853
58849
  function newComment(ctx, globalCache, r, c) {
58854
- var _ctx$hooks$beforeInse, _ctx$hooks3;
58855
- if (((_ctx$hooks$beforeInse = (_ctx$hooks3 = ctx.hooks).beforeInsertComment) === null || _ctx$hooks$beforeInse === void 0 ? void 0 : _ctx$hooks$beforeInse.call(_ctx$hooks3, r, c)) === false) {
58850
+ var _ctx$hooks$beforeInse, _ctx$hooks2;
58851
+ if (((_ctx$hooks$beforeInse = (_ctx$hooks2 = ctx.hooks).beforeInsertComment) === null || _ctx$hooks$beforeInse === void 0 ? void 0 : _ctx$hooks$beforeInse.call(_ctx$hooks2, r, c)) === false) {
58856
58852
  return;
58857
58853
  }
58858
58854
  removeEditingComment(ctx, globalCache);
@@ -58882,13 +58878,13 @@ function newComment(ctx, globalCache, r, c) {
58882
58878
  });
58883
58879
  if (ctx.hooks.afterInsertComment) {
58884
58880
  setTimeout(function () {
58885
- var _ctx$hooks$afterInser, _ctx$hooks4;
58886
- (_ctx$hooks$afterInser = (_ctx$hooks4 = ctx.hooks).afterInsertComment) === null || _ctx$hooks$afterInser === void 0 ? void 0 : _ctx$hooks$afterInser.call(_ctx$hooks4, r, c);
58881
+ var _ctx$hooks$afterInser, _ctx$hooks3;
58882
+ (_ctx$hooks$afterInser = (_ctx$hooks3 = ctx.hooks).afterInsertComment) === null || _ctx$hooks$afterInser === void 0 ? void 0 : _ctx$hooks$afterInser.call(_ctx$hooks3, r, c);
58887
58883
  });
58888
58884
  }
58889
58885
  if (ctx.hooks.afterUpdateComment) {
58890
- var _ctx$hooks$afterUpdat2, _ctx$hooks5;
58891
- (_ctx$hooks$afterUpdat2 = (_ctx$hooks5 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat2 === void 0 ? void 0 : _ctx$hooks$afterUpdat2.call(_ctx$hooks5, r, c, _objectSpread2({}, cell.ps));
58886
+ var _ctx$hooks$afterUpdat, _ctx$hooks4;
58887
+ (_ctx$hooks$afterUpdat = (_ctx$hooks4 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat === void 0 ? void 0 : _ctx$hooks$afterUpdat.call(_ctx$hooks4, r, c, _objectSpread2({}, cell.ps), true);
58892
58888
  }
58893
58889
  }
58894
58890
  function editComment(ctx, globalCache, r, c) {
@@ -58910,8 +58906,8 @@ function editComment(ctx, globalCache, r, c) {
58910
58906
  }
58911
58907
  }
58912
58908
  function deleteComment(ctx, globalCache, r, c) {
58913
- var _ctx$hooks$beforeDele, _ctx$hooks6;
58914
- if (((_ctx$hooks$beforeDele = (_ctx$hooks6 = ctx.hooks).beforeDeleteComment) === null || _ctx$hooks$beforeDele === void 0 ? void 0 : _ctx$hooks$beforeDele.call(_ctx$hooks6, r, c)) === false) {
58909
+ var _ctx$hooks$beforeDele, _ctx$hooks5;
58910
+ if (((_ctx$hooks$beforeDele = (_ctx$hooks5 = ctx.hooks).beforeDeleteComment) === null || _ctx$hooks$beforeDele === void 0 ? void 0 : _ctx$hooks$beforeDele.call(_ctx$hooks5, r, c)) === false) {
58915
58911
  return;
58916
58912
  }
58917
58913
  var flowdata = getFlowdata(ctx);
@@ -58921,13 +58917,13 @@ function deleteComment(ctx, globalCache, r, c) {
58921
58917
  cell.ps = undefined;
58922
58918
  if (ctx.hooks.afterDeleteComment) {
58923
58919
  setTimeout(function () {
58924
- var _ctx$hooks$afterDelet, _ctx$hooks7;
58925
- (_ctx$hooks$afterDelet = (_ctx$hooks7 = ctx.hooks).afterDeleteComment) === null || _ctx$hooks$afterDelet === void 0 ? void 0 : _ctx$hooks$afterDelet.call(_ctx$hooks7, r, c);
58920
+ var _ctx$hooks$afterDelet, _ctx$hooks6;
58921
+ (_ctx$hooks$afterDelet = (_ctx$hooks6 = ctx.hooks).afterDeleteComment) === null || _ctx$hooks$afterDelet === void 0 ? void 0 : _ctx$hooks$afterDelet.call(_ctx$hooks6, r, c);
58926
58922
  });
58927
58923
  }
58928
58924
  if (ctx.hooks.afterUpdateComment) {
58929
- var _ctx$hooks$afterUpdat3, _ctx$hooks8;
58930
- (_ctx$hooks$afterUpdat3 = (_ctx$hooks8 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat3 === void 0 ? void 0 : _ctx$hooks$afterUpdat3.call(_ctx$hooks8, r, c, null);
58925
+ var _ctx$hooks$afterUpdat2, _ctx$hooks7;
58926
+ (_ctx$hooks$afterUpdat2 = (_ctx$hooks7 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat2 === void 0 ? void 0 : _ctx$hooks$afterUpdat2.call(_ctx$hooks7, r, c, null, true);
58931
58927
  }
58932
58928
  }
58933
58929
  function showComments(ctx, commentShowCells) {
@@ -58957,8 +58953,8 @@ function showHideComment(ctx, globalCache, r, c) {
58957
58953
  comment.isShow = true;
58958
58954
  }
58959
58955
  if (ctx.hooks.afterUpdateComment) {
58960
- var _ctx$hooks$afterUpdat4, _ctx$hooks9;
58961
- (_ctx$hooks$afterUpdat4 = (_ctx$hooks9 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat4 === void 0 ? void 0 : _ctx$hooks$afterUpdat4.call(_ctx$hooks9, r, c, _objectSpread2({}, comment));
58956
+ var _ctx$hooks$afterUpdat3, _ctx$hooks8;
58957
+ (_ctx$hooks$afterUpdat3 = (_ctx$hooks8 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat3 === void 0 ? void 0 : _ctx$hooks$afterUpdat3.call(_ctx$hooks8, r, c, _objectSpread2({}, comment), true);
58962
58958
  }
58963
58959
  }
58964
58960
  function showHideAllComments(ctx) {
@@ -59182,8 +59178,8 @@ function onCommentBoxResizeEnd(ctx, globalCache) {
59182
59178
  cell.ps.height = height / ctx.zoomRatio;
59183
59179
  setEditingComment(ctx, flowdata, r, c);
59184
59180
  if (ctx.hooks.afterUpdateComment) {
59185
- var _ctx$hooks$afterUpdat5, _ctx$hooks10;
59186
- (_ctx$hooks$afterUpdat5 = (_ctx$hooks10 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat5 === void 0 ? void 0 : _ctx$hooks$afterUpdat5.call(_ctx$hooks10, r, c, _objectSpread2({}, cell.ps));
59181
+ var _ctx$hooks$afterUpdat4, _ctx$hooks9;
59182
+ (_ctx$hooks$afterUpdat4 = (_ctx$hooks9 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat4 === void 0 ? void 0 : _ctx$hooks$afterUpdat4.call(_ctx$hooks9, r, c, _objectSpread2({}, cell.ps), true);
59187
59183
  }
59188
59184
  }
59189
59185
  }
@@ -59253,8 +59249,8 @@ function onCommentBoxMoveEnd(ctx, globalCache) {
59253
59249
  cell.ps.top = top / ctx.zoomRatio;
59254
59250
  setEditingComment(ctx, flowdata, r, c);
59255
59251
  if (ctx.hooks.afterUpdateComment) {
59256
- var _ctx$hooks$afterUpdat6, _ctx$hooks11;
59257
- (_ctx$hooks$afterUpdat6 = (_ctx$hooks11 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat6 === void 0 ? void 0 : _ctx$hooks$afterUpdat6.call(_ctx$hooks11, r, c, _objectSpread2({}, cell.ps));
59252
+ var _ctx$hooks$afterUpdat5, _ctx$hooks10;
59253
+ (_ctx$hooks$afterUpdat5 = (_ctx$hooks10 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat5 === void 0 ? void 0 : _ctx$hooks$afterUpdat5.call(_ctx$hooks10, r, c, _objectSpread2({}, cell.ps), true);
59258
59254
  }
59259
59255
  }
59260
59256
  }
package/dist/index.js CHANGED
@@ -58855,14 +58855,10 @@ function removeEditingComment(ctx, globalCache) {
58855
58855
  return v.rc !== "".concat(r, "_").concat(c);
58856
58856
  });
58857
58857
  }
58858
- if (ctx.hooks.afterUpdateComment) {
58859
- var _ctx$hooks$afterUpdat, _ctx$hooks2;
58860
- (_ctx$hooks$afterUpdat = (_ctx$hooks2 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat === void 0 ? void 0 : _ctx$hooks$afterUpdat.call(_ctx$hooks2, r, c, _objectSpread2({}, cell.ps));
58861
- }
58862
58858
  }
58863
58859
  function newComment(ctx, globalCache, r, c) {
58864
- var _ctx$hooks$beforeInse, _ctx$hooks3;
58865
- if (((_ctx$hooks$beforeInse = (_ctx$hooks3 = ctx.hooks).beforeInsertComment) === null || _ctx$hooks$beforeInse === void 0 ? void 0 : _ctx$hooks$beforeInse.call(_ctx$hooks3, r, c)) === false) {
58860
+ var _ctx$hooks$beforeInse, _ctx$hooks2;
58861
+ if (((_ctx$hooks$beforeInse = (_ctx$hooks2 = ctx.hooks).beforeInsertComment) === null || _ctx$hooks$beforeInse === void 0 ? void 0 : _ctx$hooks$beforeInse.call(_ctx$hooks2, r, c)) === false) {
58866
58862
  return;
58867
58863
  }
58868
58864
  removeEditingComment(ctx, globalCache);
@@ -58892,13 +58888,13 @@ function newComment(ctx, globalCache, r, c) {
58892
58888
  });
58893
58889
  if (ctx.hooks.afterInsertComment) {
58894
58890
  setTimeout(function () {
58895
- var _ctx$hooks$afterInser, _ctx$hooks4;
58896
- (_ctx$hooks$afterInser = (_ctx$hooks4 = ctx.hooks).afterInsertComment) === null || _ctx$hooks$afterInser === void 0 ? void 0 : _ctx$hooks$afterInser.call(_ctx$hooks4, r, c);
58891
+ var _ctx$hooks$afterInser, _ctx$hooks3;
58892
+ (_ctx$hooks$afterInser = (_ctx$hooks3 = ctx.hooks).afterInsertComment) === null || _ctx$hooks$afterInser === void 0 ? void 0 : _ctx$hooks$afterInser.call(_ctx$hooks3, r, c);
58897
58893
  });
58898
58894
  }
58899
58895
  if (ctx.hooks.afterUpdateComment) {
58900
- var _ctx$hooks$afterUpdat2, _ctx$hooks5;
58901
- (_ctx$hooks$afterUpdat2 = (_ctx$hooks5 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat2 === void 0 ? void 0 : _ctx$hooks$afterUpdat2.call(_ctx$hooks5, r, c, _objectSpread2({}, cell.ps));
58896
+ var _ctx$hooks$afterUpdat, _ctx$hooks4;
58897
+ (_ctx$hooks$afterUpdat = (_ctx$hooks4 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat === void 0 ? void 0 : _ctx$hooks$afterUpdat.call(_ctx$hooks4, r, c, _objectSpread2({}, cell.ps), true);
58902
58898
  }
58903
58899
  }
58904
58900
  function editComment(ctx, globalCache, r, c) {
@@ -58920,8 +58916,8 @@ function editComment(ctx, globalCache, r, c) {
58920
58916
  }
58921
58917
  }
58922
58918
  function deleteComment(ctx, globalCache, r, c) {
58923
- var _ctx$hooks$beforeDele, _ctx$hooks6;
58924
- if (((_ctx$hooks$beforeDele = (_ctx$hooks6 = ctx.hooks).beforeDeleteComment) === null || _ctx$hooks$beforeDele === void 0 ? void 0 : _ctx$hooks$beforeDele.call(_ctx$hooks6, r, c)) === false) {
58919
+ var _ctx$hooks$beforeDele, _ctx$hooks5;
58920
+ if (((_ctx$hooks$beforeDele = (_ctx$hooks5 = ctx.hooks).beforeDeleteComment) === null || _ctx$hooks$beforeDele === void 0 ? void 0 : _ctx$hooks$beforeDele.call(_ctx$hooks5, r, c)) === false) {
58925
58921
  return;
58926
58922
  }
58927
58923
  var flowdata = getFlowdata(ctx);
@@ -58931,13 +58927,13 @@ function deleteComment(ctx, globalCache, r, c) {
58931
58927
  cell.ps = undefined;
58932
58928
  if (ctx.hooks.afterDeleteComment) {
58933
58929
  setTimeout(function () {
58934
- var _ctx$hooks$afterDelet, _ctx$hooks7;
58935
- (_ctx$hooks$afterDelet = (_ctx$hooks7 = ctx.hooks).afterDeleteComment) === null || _ctx$hooks$afterDelet === void 0 ? void 0 : _ctx$hooks$afterDelet.call(_ctx$hooks7, r, c);
58930
+ var _ctx$hooks$afterDelet, _ctx$hooks6;
58931
+ (_ctx$hooks$afterDelet = (_ctx$hooks6 = ctx.hooks).afterDeleteComment) === null || _ctx$hooks$afterDelet === void 0 ? void 0 : _ctx$hooks$afterDelet.call(_ctx$hooks6, r, c);
58936
58932
  });
58937
58933
  }
58938
58934
  if (ctx.hooks.afterUpdateComment) {
58939
- var _ctx$hooks$afterUpdat3, _ctx$hooks8;
58940
- (_ctx$hooks$afterUpdat3 = (_ctx$hooks8 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat3 === void 0 ? void 0 : _ctx$hooks$afterUpdat3.call(_ctx$hooks8, r, c, null);
58935
+ var _ctx$hooks$afterUpdat2, _ctx$hooks7;
58936
+ (_ctx$hooks$afterUpdat2 = (_ctx$hooks7 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat2 === void 0 ? void 0 : _ctx$hooks$afterUpdat2.call(_ctx$hooks7, r, c, null, true);
58941
58937
  }
58942
58938
  }
58943
58939
  function showComments(ctx, commentShowCells) {
@@ -58967,8 +58963,8 @@ function showHideComment(ctx, globalCache, r, c) {
58967
58963
  comment.isShow = true;
58968
58964
  }
58969
58965
  if (ctx.hooks.afterUpdateComment) {
58970
- var _ctx$hooks$afterUpdat4, _ctx$hooks9;
58971
- (_ctx$hooks$afterUpdat4 = (_ctx$hooks9 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat4 === void 0 ? void 0 : _ctx$hooks$afterUpdat4.call(_ctx$hooks9, r, c, _objectSpread2({}, comment));
58966
+ var _ctx$hooks$afterUpdat3, _ctx$hooks8;
58967
+ (_ctx$hooks$afterUpdat3 = (_ctx$hooks8 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat3 === void 0 ? void 0 : _ctx$hooks$afterUpdat3.call(_ctx$hooks8, r, c, _objectSpread2({}, comment), true);
58972
58968
  }
58973
58969
  }
58974
58970
  function showHideAllComments(ctx) {
@@ -59192,8 +59188,8 @@ function onCommentBoxResizeEnd(ctx, globalCache) {
59192
59188
  cell.ps.height = height / ctx.zoomRatio;
59193
59189
  setEditingComment(ctx, flowdata, r, c);
59194
59190
  if (ctx.hooks.afterUpdateComment) {
59195
- var _ctx$hooks$afterUpdat5, _ctx$hooks10;
59196
- (_ctx$hooks$afterUpdat5 = (_ctx$hooks10 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat5 === void 0 ? void 0 : _ctx$hooks$afterUpdat5.call(_ctx$hooks10, r, c, _objectSpread2({}, cell.ps));
59191
+ var _ctx$hooks$afterUpdat4, _ctx$hooks9;
59192
+ (_ctx$hooks$afterUpdat4 = (_ctx$hooks9 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat4 === void 0 ? void 0 : _ctx$hooks$afterUpdat4.call(_ctx$hooks9, r, c, _objectSpread2({}, cell.ps), true);
59197
59193
  }
59198
59194
  }
59199
59195
  }
@@ -59263,8 +59259,8 @@ function onCommentBoxMoveEnd(ctx, globalCache) {
59263
59259
  cell.ps.top = top / ctx.zoomRatio;
59264
59260
  setEditingComment(ctx, flowdata, r, c);
59265
59261
  if (ctx.hooks.afterUpdateComment) {
59266
- var _ctx$hooks$afterUpdat6, _ctx$hooks11;
59267
- (_ctx$hooks$afterUpdat6 = (_ctx$hooks11 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat6 === void 0 ? void 0 : _ctx$hooks$afterUpdat6.call(_ctx$hooks11, r, c, _objectSpread2({}, cell.ps));
59262
+ var _ctx$hooks$afterUpdat5, _ctx$hooks10;
59263
+ (_ctx$hooks$afterUpdat5 = (_ctx$hooks10 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat5 === void 0 ? void 0 : _ctx$hooks$afterUpdat5.call(_ctx$hooks10, r, c, _objectSpread2({}, cell.ps), true);
59268
59264
  }
59269
59265
  }
59270
59266
  }
@@ -63,7 +63,7 @@ export type Hooks = {
63
63
  }) => void;
64
64
  beforePaste?: (selection: Selection[] | undefined, content: string) => boolean;
65
65
  beforeUpdateComment?: (row: number, column: number, value: any) => boolean;
66
- afterUpdateComment?: (row: number, column: number, value: any) => void;
66
+ afterUpdateComment?: (row: number, column: number, value: any, isOver: boolean) => void;
67
67
  beforeInsertComment?: (row: number, column: number) => boolean;
68
68
  afterInsertComment?: (row: number, column: number) => void;
69
69
  beforeDeleteComment?: (row: number, column: number) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leankylin-sheet/core",
3
- "version": "3.1.19",
3
+ "version": "3.1.20",
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": "^3.1.19",
16
+ "@leankylin-sheet/formula-parser": "^3.1.20",
17
17
  "dayjs": "^1.11.0",
18
18
  "immer": "^9.0.12",
19
19
  "lodash": "^4.17.21",