@leankylin-sheet/core 3.1.16 → 3.1.17

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
@@ -58800,7 +58800,6 @@ function getCommentBoxByRC(ctx, flowdata, r, c) {
58800
58800
  var width = (comment === null || comment === void 0 ? void 0 : comment.width) == null ? commentBoxProps.defaultWidth * ctx.zoomRatio : comment.width * ctx.zoomRatio;
58801
58801
  var height = (comment === null || comment === void 0 ? void 0 : comment.height) == null ? commentBoxProps.defaultHeight * ctx.zoomRatio : comment.height * ctx.zoomRatio;
58802
58802
  var value = (comment === null || comment === void 0 ? void 0 : comment.value) == null ? "" : comment.value;
58803
- var preValue = (comment === null || comment === void 0 ? void 0 : comment.preValue) == null ? "" : comment.preValue;
58804
58803
  if (top < 0) {
58805
58804
  top = 2;
58806
58805
  }
@@ -58816,8 +58815,7 @@ function getCommentBoxByRC(ctx, flowdata, r, c) {
58816
58815
  height: height,
58817
58816
  value: value,
58818
58817
  size: size,
58819
- autoFocus: false,
58820
- preValue: preValue
58818
+ autoFocus: false
58821
58819
  };
58822
58820
  }
58823
58821
  function setEditingComment(ctx, flowdata, r, c) {
@@ -58866,19 +58864,15 @@ function newComment(ctx, globalCache, r, c) {
58866
58864
  flowdata[r][c] = cell;
58867
58865
  }
58868
58866
  if (cell.ps) {
58869
- var _ctx$hooks$getPsPreVa, _ctx$hooks4, _ctx$hooks4$getPsPreV;
58870
58867
  cell.ps = _objectSpread2(_objectSpread2({}, cell.ps), {}, {
58871
- value: "",
58872
- preValue: "".concat(cell.ps.preValue).concat((_ctx$hooks$getPsPreVa = (_ctx$hooks4 = ctx.hooks) === null || _ctx$hooks4 === void 0 ? void 0 : (_ctx$hooks4$getPsPreV = _ctx$hooks4.getPsPreValue) === null || _ctx$hooks4$getPsPreV === void 0 ? void 0 : _ctx$hooks4$getPsPreV.call(_ctx$hooks4)) !== null && _ctx$hooks$getPsPreVa !== void 0 ? _ctx$hooks$getPsPreVa : "")
58868
+ value: ""
58873
58869
  });
58874
58870
  } else {
58875
- var _ctx$hooks$getPsPreVa2, _ctx$hooks5, _ctx$hooks5$getPsPreV;
58876
58871
  cell.ps = {
58877
58872
  left: null,
58878
58873
  top: null,
58879
58874
  width: null,
58880
58875
  height: null,
58881
- preValue: (_ctx$hooks$getPsPreVa2 = (_ctx$hooks5 = ctx.hooks) === null || _ctx$hooks5 === void 0 ? void 0 : (_ctx$hooks5$getPsPreV = _ctx$hooks5.getPsPreValue) === null || _ctx$hooks5$getPsPreV === void 0 ? void 0 : _ctx$hooks5$getPsPreV.call(_ctx$hooks5)) !== null && _ctx$hooks$getPsPreVa2 !== void 0 ? _ctx$hooks$getPsPreVa2 : "",
58882
58876
  isShow: false,
58883
58877
  value: ""
58884
58878
  };
@@ -58888,19 +58882,17 @@ function newComment(ctx, globalCache, r, c) {
58888
58882
  });
58889
58883
  if (ctx.hooks.afterInsertComment) {
58890
58884
  setTimeout(function () {
58891
- var _ctx$hooks$afterInser, _ctx$hooks6;
58892
- (_ctx$hooks$afterInser = (_ctx$hooks6 = ctx.hooks).afterInsertComment) === null || _ctx$hooks$afterInser === void 0 ? void 0 : _ctx$hooks$afterInser.call(_ctx$hooks6, r, c);
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);
58893
58887
  });
58894
58888
  }
58895
58889
  if (ctx.hooks.afterUpdateComment) {
58896
- var _ctx$hooks$afterUpdat2, _ctx$hooks7;
58897
- (_ctx$hooks$afterUpdat2 = (_ctx$hooks7 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat2 === void 0 ? void 0 : _ctx$hooks$afterUpdat2.call(_ctx$hooks7, r, c, _objectSpread2({}, cell.ps));
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));
58898
58892
  }
58899
58893
  }
58900
58894
  function editComment(ctx, globalCache, r, c) {
58901
58895
  var _flowdata$r$c2;
58902
- var allowEdit = isAllowEdit(ctx);
58903
- if (!allowEdit) return;
58904
58896
  var flowdata = getFlowdata(ctx);
58905
58897
  removeEditingComment(ctx, globalCache);
58906
58898
  var comment = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$r$c2 = flowdata[r][c]) === null || _flowdata$r$c2 === void 0 ? void 0 : _flowdata$r$c2.ps;
@@ -58918,10 +58910,8 @@ function editComment(ctx, globalCache, r, c) {
58918
58910
  }
58919
58911
  }
58920
58912
  function deleteComment(ctx, globalCache, r, c) {
58921
- var _ctx$hooks$beforeDele, _ctx$hooks8;
58922
- var allowEdit = isAllowEdit(ctx);
58923
- if (!allowEdit) return;
58924
- if (((_ctx$hooks$beforeDele = (_ctx$hooks8 = ctx.hooks).beforeDeleteComment) === null || _ctx$hooks$beforeDele === void 0 ? void 0 : _ctx$hooks$beforeDele.call(_ctx$hooks8, r, c)) === false) {
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) {
58925
58915
  return;
58926
58916
  }
58927
58917
  var flowdata = getFlowdata(ctx);
@@ -58931,13 +58921,13 @@ function deleteComment(ctx, globalCache, r, c) {
58931
58921
  cell.ps = undefined;
58932
58922
  if (ctx.hooks.afterDeleteComment) {
58933
58923
  setTimeout(function () {
58934
- var _ctx$hooks$afterDelet, _ctx$hooks9;
58935
- (_ctx$hooks$afterDelet = (_ctx$hooks9 = ctx.hooks).afterDeleteComment) === null || _ctx$hooks$afterDelet === void 0 ? void 0 : _ctx$hooks$afterDelet.call(_ctx$hooks9, r, c);
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);
58936
58926
  });
58937
58927
  }
58938
58928
  if (ctx.hooks.afterUpdateComment) {
58939
- var _ctx$hooks$afterUpdat3, _ctx$hooks10;
58940
- (_ctx$hooks$afterUpdat3 = (_ctx$hooks10 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat3 === void 0 ? void 0 : _ctx$hooks$afterUpdat3.call(_ctx$hooks10, r, c, null);
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);
58941
58931
  }
58942
58932
  }
58943
58933
  function showComments(ctx, commentShowCells) {
@@ -58967,8 +58957,8 @@ function showHideComment(ctx, globalCache, r, c) {
58967
58957
  comment.isShow = true;
58968
58958
  }
58969
58959
  if (ctx.hooks.afterUpdateComment) {
58970
- var _ctx$hooks$afterUpdat4, _ctx$hooks11;
58971
- (_ctx$hooks$afterUpdat4 = (_ctx$hooks11 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat4 === void 0 ? void 0 : _ctx$hooks$afterUpdat4.call(_ctx$hooks11, r, c, _objectSpread2({}, comment));
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));
58972
58962
  }
58973
58963
  }
58974
58964
  function showHideAllComments(ctx) {
@@ -59067,7 +59057,6 @@ function overShowComment(ctx, e, scrollX, scrollY, container) {
59067
59057
  var height = comment.height == null ? commentBoxProps.defaultHeight * ctx.zoomRatio : comment.height * ctx.zoomRatio;
59068
59058
  var size = getArrowCanvasSize(left, top, toX, toY);
59069
59059
  var value = comment.value == null ? "" : comment.value;
59070
- var preValue = comment.preValue == null ? "" : comment.preValue;
59071
59060
  ctx.hoveredCommentBox = {
59072
59061
  r: r,
59073
59062
  c: c,
@@ -59078,8 +59067,7 @@ function overShowComment(ctx, e, scrollX, scrollY, container) {
59078
59067
  height: height,
59079
59068
  size: size,
59080
59069
  value: value,
59081
- autoFocus: false,
59082
- preValue: preValue
59070
+ autoFocus: false
59083
59071
  };
59084
59072
  }
59085
59073
  function getCommentBoxPosition(commentId) {
@@ -59194,8 +59182,8 @@ function onCommentBoxResizeEnd(ctx, globalCache) {
59194
59182
  cell.ps.height = height / ctx.zoomRatio;
59195
59183
  setEditingComment(ctx, flowdata, r, c);
59196
59184
  if (ctx.hooks.afterUpdateComment) {
59197
- var _ctx$hooks$afterUpdat5, _ctx$hooks12;
59198
- (_ctx$hooks$afterUpdat5 = (_ctx$hooks12 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat5 === void 0 ? void 0 : _ctx$hooks$afterUpdat5.call(_ctx$hooks12, r, c, _objectSpread2({}, cell.ps));
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));
59199
59187
  }
59200
59188
  }
59201
59189
  }
@@ -59265,8 +59253,8 @@ function onCommentBoxMoveEnd(ctx, globalCache) {
59265
59253
  cell.ps.top = top / ctx.zoomRatio;
59266
59254
  setEditingComment(ctx, flowdata, r, c);
59267
59255
  if (ctx.hooks.afterUpdateComment) {
59268
- var _ctx$hooks$afterUpdat6, _ctx$hooks13;
59269
- (_ctx$hooks$afterUpdat6 = (_ctx$hooks13 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat6 === void 0 ? void 0 : _ctx$hooks$afterUpdat6.call(_ctx$hooks13, r, c, _objectSpread2({}, cell.ps));
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));
59270
59258
  }
59271
59259
  }
59272
59260
  }
package/dist/index.js CHANGED
@@ -58810,7 +58810,6 @@ function getCommentBoxByRC(ctx, flowdata, r, c) {
58810
58810
  var width = (comment === null || comment === void 0 ? void 0 : comment.width) == null ? commentBoxProps.defaultWidth * ctx.zoomRatio : comment.width * ctx.zoomRatio;
58811
58811
  var height = (comment === null || comment === void 0 ? void 0 : comment.height) == null ? commentBoxProps.defaultHeight * ctx.zoomRatio : comment.height * ctx.zoomRatio;
58812
58812
  var value = (comment === null || comment === void 0 ? void 0 : comment.value) == null ? "" : comment.value;
58813
- var preValue = (comment === null || comment === void 0 ? void 0 : comment.preValue) == null ? "" : comment.preValue;
58814
58813
  if (top < 0) {
58815
58814
  top = 2;
58816
58815
  }
@@ -58826,8 +58825,7 @@ function getCommentBoxByRC(ctx, flowdata, r, c) {
58826
58825
  height: height,
58827
58826
  value: value,
58828
58827
  size: size,
58829
- autoFocus: false,
58830
- preValue: preValue
58828
+ autoFocus: false
58831
58829
  };
58832
58830
  }
58833
58831
  function setEditingComment(ctx, flowdata, r, c) {
@@ -58876,19 +58874,15 @@ function newComment(ctx, globalCache, r, c) {
58876
58874
  flowdata[r][c] = cell;
58877
58875
  }
58878
58876
  if (cell.ps) {
58879
- var _ctx$hooks$getPsPreVa, _ctx$hooks4, _ctx$hooks4$getPsPreV;
58880
58877
  cell.ps = _objectSpread2(_objectSpread2({}, cell.ps), {}, {
58881
- value: "",
58882
- preValue: "".concat(cell.ps.preValue).concat((_ctx$hooks$getPsPreVa = (_ctx$hooks4 = ctx.hooks) === null || _ctx$hooks4 === void 0 ? void 0 : (_ctx$hooks4$getPsPreV = _ctx$hooks4.getPsPreValue) === null || _ctx$hooks4$getPsPreV === void 0 ? void 0 : _ctx$hooks4$getPsPreV.call(_ctx$hooks4)) !== null && _ctx$hooks$getPsPreVa !== void 0 ? _ctx$hooks$getPsPreVa : "")
58878
+ value: ""
58883
58879
  });
58884
58880
  } else {
58885
- var _ctx$hooks$getPsPreVa2, _ctx$hooks5, _ctx$hooks5$getPsPreV;
58886
58881
  cell.ps = {
58887
58882
  left: null,
58888
58883
  top: null,
58889
58884
  width: null,
58890
58885
  height: null,
58891
- preValue: (_ctx$hooks$getPsPreVa2 = (_ctx$hooks5 = ctx.hooks) === null || _ctx$hooks5 === void 0 ? void 0 : (_ctx$hooks5$getPsPreV = _ctx$hooks5.getPsPreValue) === null || _ctx$hooks5$getPsPreV === void 0 ? void 0 : _ctx$hooks5$getPsPreV.call(_ctx$hooks5)) !== null && _ctx$hooks$getPsPreVa2 !== void 0 ? _ctx$hooks$getPsPreVa2 : "",
58892
58886
  isShow: false,
58893
58887
  value: ""
58894
58888
  };
@@ -58898,19 +58892,17 @@ function newComment(ctx, globalCache, r, c) {
58898
58892
  });
58899
58893
  if (ctx.hooks.afterInsertComment) {
58900
58894
  setTimeout(function () {
58901
- var _ctx$hooks$afterInser, _ctx$hooks6;
58902
- (_ctx$hooks$afterInser = (_ctx$hooks6 = ctx.hooks).afterInsertComment) === null || _ctx$hooks$afterInser === void 0 ? void 0 : _ctx$hooks$afterInser.call(_ctx$hooks6, r, c);
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);
58903
58897
  });
58904
58898
  }
58905
58899
  if (ctx.hooks.afterUpdateComment) {
58906
- var _ctx$hooks$afterUpdat2, _ctx$hooks7;
58907
- (_ctx$hooks$afterUpdat2 = (_ctx$hooks7 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat2 === void 0 ? void 0 : _ctx$hooks$afterUpdat2.call(_ctx$hooks7, r, c, _objectSpread2({}, cell.ps));
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));
58908
58902
  }
58909
58903
  }
58910
58904
  function editComment(ctx, globalCache, r, c) {
58911
58905
  var _flowdata$r$c2;
58912
- var allowEdit = isAllowEdit(ctx);
58913
- if (!allowEdit) return;
58914
58906
  var flowdata = getFlowdata(ctx);
58915
58907
  removeEditingComment(ctx, globalCache);
58916
58908
  var comment = flowdata === null || flowdata === void 0 ? void 0 : (_flowdata$r$c2 = flowdata[r][c]) === null || _flowdata$r$c2 === void 0 ? void 0 : _flowdata$r$c2.ps;
@@ -58928,10 +58920,8 @@ function editComment(ctx, globalCache, r, c) {
58928
58920
  }
58929
58921
  }
58930
58922
  function deleteComment(ctx, globalCache, r, c) {
58931
- var _ctx$hooks$beforeDele, _ctx$hooks8;
58932
- var allowEdit = isAllowEdit(ctx);
58933
- if (!allowEdit) return;
58934
- if (((_ctx$hooks$beforeDele = (_ctx$hooks8 = ctx.hooks).beforeDeleteComment) === null || _ctx$hooks$beforeDele === void 0 ? void 0 : _ctx$hooks$beforeDele.call(_ctx$hooks8, r, c)) === false) {
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) {
58935
58925
  return;
58936
58926
  }
58937
58927
  var flowdata = getFlowdata(ctx);
@@ -58941,13 +58931,13 @@ function deleteComment(ctx, globalCache, r, c) {
58941
58931
  cell.ps = undefined;
58942
58932
  if (ctx.hooks.afterDeleteComment) {
58943
58933
  setTimeout(function () {
58944
- var _ctx$hooks$afterDelet, _ctx$hooks9;
58945
- (_ctx$hooks$afterDelet = (_ctx$hooks9 = ctx.hooks).afterDeleteComment) === null || _ctx$hooks$afterDelet === void 0 ? void 0 : _ctx$hooks$afterDelet.call(_ctx$hooks9, r, c);
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);
58946
58936
  });
58947
58937
  }
58948
58938
  if (ctx.hooks.afterUpdateComment) {
58949
- var _ctx$hooks$afterUpdat3, _ctx$hooks10;
58950
- (_ctx$hooks$afterUpdat3 = (_ctx$hooks10 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat3 === void 0 ? void 0 : _ctx$hooks$afterUpdat3.call(_ctx$hooks10, r, c, null);
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);
58951
58941
  }
58952
58942
  }
58953
58943
  function showComments(ctx, commentShowCells) {
@@ -58977,8 +58967,8 @@ function showHideComment(ctx, globalCache, r, c) {
58977
58967
  comment.isShow = true;
58978
58968
  }
58979
58969
  if (ctx.hooks.afterUpdateComment) {
58980
- var _ctx$hooks$afterUpdat4, _ctx$hooks11;
58981
- (_ctx$hooks$afterUpdat4 = (_ctx$hooks11 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat4 === void 0 ? void 0 : _ctx$hooks$afterUpdat4.call(_ctx$hooks11, r, c, _objectSpread2({}, comment));
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));
58982
58972
  }
58983
58973
  }
58984
58974
  function showHideAllComments(ctx) {
@@ -59077,7 +59067,6 @@ function overShowComment(ctx, e, scrollX, scrollY, container) {
59077
59067
  var height = comment.height == null ? commentBoxProps.defaultHeight * ctx.zoomRatio : comment.height * ctx.zoomRatio;
59078
59068
  var size = getArrowCanvasSize(left, top, toX, toY);
59079
59069
  var value = comment.value == null ? "" : comment.value;
59080
- var preValue = comment.preValue == null ? "" : comment.preValue;
59081
59070
  ctx.hoveredCommentBox = {
59082
59071
  r: r,
59083
59072
  c: c,
@@ -59088,8 +59077,7 @@ function overShowComment(ctx, e, scrollX, scrollY, container) {
59088
59077
  height: height,
59089
59078
  size: size,
59090
59079
  value: value,
59091
- autoFocus: false,
59092
- preValue: preValue
59080
+ autoFocus: false
59093
59081
  };
59094
59082
  }
59095
59083
  function getCommentBoxPosition(commentId) {
@@ -59204,8 +59192,8 @@ function onCommentBoxResizeEnd(ctx, globalCache) {
59204
59192
  cell.ps.height = height / ctx.zoomRatio;
59205
59193
  setEditingComment(ctx, flowdata, r, c);
59206
59194
  if (ctx.hooks.afterUpdateComment) {
59207
- var _ctx$hooks$afterUpdat5, _ctx$hooks12;
59208
- (_ctx$hooks$afterUpdat5 = (_ctx$hooks12 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat5 === void 0 ? void 0 : _ctx$hooks$afterUpdat5.call(_ctx$hooks12, r, c, _objectSpread2({}, cell.ps));
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));
59209
59197
  }
59210
59198
  }
59211
59199
  }
@@ -59275,8 +59263,8 @@ function onCommentBoxMoveEnd(ctx, globalCache) {
59275
59263
  cell.ps.top = top / ctx.zoomRatio;
59276
59264
  setEditingComment(ctx, flowdata, r, c);
59277
59265
  if (ctx.hooks.afterUpdateComment) {
59278
- var _ctx$hooks$afterUpdat6, _ctx$hooks13;
59279
- (_ctx$hooks$afterUpdat6 = (_ctx$hooks13 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat6 === void 0 ? void 0 : _ctx$hooks$afterUpdat6.call(_ctx$hooks13, r, c, _objectSpread2({}, cell.ps));
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));
59280
59268
  }
59281
59269
  }
59282
59270
  }
@@ -60,7 +60,6 @@ export declare function getCommentBoxByRC(ctx: Context, flowdata: CellMatrix, r:
60
60
  toY: number;
61
61
  };
62
62
  autoFocus: boolean;
63
- preValue: string;
64
63
  };
65
64
  export declare function setEditingComment(ctx: Context, flowdata: CellMatrix, r: number, c: number): void;
66
65
  export declare function removeEditingComment(ctx: Context, globalCache: GlobalCache): void;
@@ -1,7 +1,12 @@
1
1
  import React from "react";
2
2
  import { Sheet, Selection, CellMatrix, Cell } from "./types";
3
3
  export type Hooks = {
4
- getPsPreValue?: () => string;
4
+ commentsPreRender?: (r: number, c: number) => any;
5
+ showCommentsMenu?: (item: {
6
+ text: string;
7
+ show: boolean;
8
+ onClick: any;
9
+ }) => boolean;
5
10
  showMenuBefore?: (ctx: any, selection: any) => boolean;
6
11
  beforeUpdateCell?: (r: number, c: number, value: any) => boolean;
7
12
  afterUpdateCell?: (row: number, column: number, oldValue: any, newValue: any) => void;
package/dist/types.d.ts CHANGED
@@ -52,7 +52,6 @@ export type Cell = {
52
52
  height: number | null;
53
53
  value: string;
54
54
  isShow: boolean;
55
- preValue?: string;
56
55
  };
57
56
  hl?: {
58
57
  r: number;
@@ -176,7 +175,6 @@ export type CommentBox = {
176
175
  rc: string;
177
176
  autoFocus: boolean;
178
177
  value: string;
179
- preValue: string;
180
178
  size: {
181
179
  fromX: number;
182
180
  fromY: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leankylin-sheet/core",
3
- "version": "3.1.16",
3
+ "version": "3.1.17",
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.16",
16
+ "@leankylin-sheet/formula-parser": "^3.1.17",
17
17
  "dayjs": "^1.11.0",
18
18
  "immer": "^9.0.12",
19
19
  "lodash": "^4.17.21",