@leankylin-sheet/core 3.1.13 → 3.1.14
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 +18 -7
- package/dist/index.js +18 -7
- package/dist/settings.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -58839,7 +58839,6 @@ function removeEditingComment(ctx, globalCache) {
|
|
|
58839
58839
|
}
|
|
58840
58840
|
var cell = flowdata === null || flowdata === void 0 ? void 0 : flowdata[r][c];
|
|
58841
58841
|
if (!(cell === null || cell === void 0 ? void 0 : cell.ps)) return;
|
|
58842
|
-
var oldValue = cell.ps.value;
|
|
58843
58842
|
cell.ps.value = value;
|
|
58844
58843
|
if (!cell.ps.isShow) {
|
|
58845
58844
|
ctx.commentBoxes = _.filter(ctx.commentBoxes, function (v) {
|
|
@@ -58847,10 +58846,8 @@ function removeEditingComment(ctx, globalCache) {
|
|
|
58847
58846
|
});
|
|
58848
58847
|
}
|
|
58849
58848
|
if (ctx.hooks.afterUpdateComment) {
|
|
58850
|
-
|
|
58851
|
-
|
|
58852
|
-
(_ctx$hooks$afterUpdat = (_ctx$hooks2 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat === void 0 ? void 0 : _ctx$hooks$afterUpdat.call(_ctx$hooks2, r, c, oldValue, value);
|
|
58853
|
-
});
|
|
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));
|
|
58854
58851
|
}
|
|
58855
58852
|
}
|
|
58856
58853
|
function newComment(ctx, globalCache, r, c) {
|
|
@@ -58922,6 +58919,10 @@ function deleteComment(ctx, globalCache, r, c) {
|
|
|
58922
58919
|
(_ctx$hooks$afterDelet = (_ctx$hooks6 = ctx.hooks).afterDeleteComment) === null || _ctx$hooks$afterDelet === void 0 ? void 0 : _ctx$hooks$afterDelet.call(_ctx$hooks6, r, c);
|
|
58923
58920
|
});
|
|
58924
58921
|
}
|
|
58922
|
+
if (ctx.hooks.afterUpdateComment) {
|
|
58923
|
+
var _ctx$hooks$afterUpdat2, _ctx$hooks7;
|
|
58924
|
+
(_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);
|
|
58925
|
+
}
|
|
58925
58926
|
}
|
|
58926
58927
|
function showComments(ctx, commentShowCells) {
|
|
58927
58928
|
var flowdata = getFlowdata(ctx);
|
|
@@ -58949,6 +58950,10 @@ function showHideComment(ctx, globalCache, r, c) {
|
|
|
58949
58950
|
} else {
|
|
58950
58951
|
comment.isShow = true;
|
|
58951
58952
|
}
|
|
58953
|
+
if (ctx.hooks.afterUpdateComment) {
|
|
58954
|
+
var _ctx$hooks$afterUpdat3, _ctx$hooks8;
|
|
58955
|
+
(_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));
|
|
58956
|
+
}
|
|
58952
58957
|
}
|
|
58953
58958
|
function showHideAllComments(ctx) {
|
|
58954
58959
|
var flowdata = getFlowdata(ctx);
|
|
@@ -59170,6 +59175,10 @@ function onCommentBoxResizeEnd(ctx, globalCache) {
|
|
|
59170
59175
|
cell.ps.width = width / ctx.zoomRatio;
|
|
59171
59176
|
cell.ps.height = height / ctx.zoomRatio;
|
|
59172
59177
|
setEditingComment(ctx, flowdata, r, c);
|
|
59178
|
+
if (ctx.hooks.afterUpdateComment) {
|
|
59179
|
+
var _ctx$hooks$afterUpdat4, _ctx$hooks9;
|
|
59180
|
+
(_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));
|
|
59181
|
+
}
|
|
59173
59182
|
}
|
|
59174
59183
|
}
|
|
59175
59184
|
}
|
|
@@ -59200,8 +59209,6 @@ function onCommentBoxMoveStart(ctx, globalCache, e, _ref4, movingId) {
|
|
|
59200
59209
|
}
|
|
59201
59210
|
}
|
|
59202
59211
|
function onCommentBoxMove(ctx, globalCache, e) {
|
|
59203
|
-
var allowEdit = isAllowEdit(ctx);
|
|
59204
|
-
if (!allowEdit) return false;
|
|
59205
59212
|
var commentBox = globalCache === null || globalCache === void 0 ? void 0 : globalCache.commentBox;
|
|
59206
59213
|
if (commentBox === null || commentBox === void 0 ? void 0 : commentBox.movingId) {
|
|
59207
59214
|
var box = document.getElementById(commentBox.movingId);
|
|
@@ -59239,6 +59246,10 @@ function onCommentBoxMoveEnd(ctx, globalCache) {
|
|
|
59239
59246
|
cell.ps.left = left / ctx.zoomRatio;
|
|
59240
59247
|
cell.ps.top = top / ctx.zoomRatio;
|
|
59241
59248
|
setEditingComment(ctx, flowdata, r, c);
|
|
59249
|
+
if (ctx.hooks.afterUpdateComment) {
|
|
59250
|
+
var _ctx$hooks$afterUpdat5, _ctx$hooks10;
|
|
59251
|
+
(_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));
|
|
59252
|
+
}
|
|
59242
59253
|
}
|
|
59243
59254
|
}
|
|
59244
59255
|
}
|
package/dist/index.js
CHANGED
|
@@ -58849,7 +58849,6 @@ function removeEditingComment(ctx, globalCache) {
|
|
|
58849
58849
|
}
|
|
58850
58850
|
var cell = flowdata === null || flowdata === void 0 ? void 0 : flowdata[r][c];
|
|
58851
58851
|
if (!(cell === null || cell === void 0 ? void 0 : cell.ps)) return;
|
|
58852
|
-
var oldValue = cell.ps.value;
|
|
58853
58852
|
cell.ps.value = value;
|
|
58854
58853
|
if (!cell.ps.isShow) {
|
|
58855
58854
|
ctx.commentBoxes = ___default['default'].filter(ctx.commentBoxes, function (v) {
|
|
@@ -58857,10 +58856,8 @@ function removeEditingComment(ctx, globalCache) {
|
|
|
58857
58856
|
});
|
|
58858
58857
|
}
|
|
58859
58858
|
if (ctx.hooks.afterUpdateComment) {
|
|
58860
|
-
|
|
58861
|
-
|
|
58862
|
-
(_ctx$hooks$afterUpdat = (_ctx$hooks2 = ctx.hooks).afterUpdateComment) === null || _ctx$hooks$afterUpdat === void 0 ? void 0 : _ctx$hooks$afterUpdat.call(_ctx$hooks2, r, c, oldValue, value);
|
|
58863
|
-
});
|
|
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));
|
|
58864
58861
|
}
|
|
58865
58862
|
}
|
|
58866
58863
|
function newComment(ctx, globalCache, r, c) {
|
|
@@ -58932,6 +58929,10 @@ function deleteComment(ctx, globalCache, r, c) {
|
|
|
58932
58929
|
(_ctx$hooks$afterDelet = (_ctx$hooks6 = ctx.hooks).afterDeleteComment) === null || _ctx$hooks$afterDelet === void 0 ? void 0 : _ctx$hooks$afterDelet.call(_ctx$hooks6, r, c);
|
|
58933
58930
|
});
|
|
58934
58931
|
}
|
|
58932
|
+
if (ctx.hooks.afterUpdateComment) {
|
|
58933
|
+
var _ctx$hooks$afterUpdat2, _ctx$hooks7;
|
|
58934
|
+
(_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);
|
|
58935
|
+
}
|
|
58935
58936
|
}
|
|
58936
58937
|
function showComments(ctx, commentShowCells) {
|
|
58937
58938
|
var flowdata = getFlowdata(ctx);
|
|
@@ -58959,6 +58960,10 @@ function showHideComment(ctx, globalCache, r, c) {
|
|
|
58959
58960
|
} else {
|
|
58960
58961
|
comment.isShow = true;
|
|
58961
58962
|
}
|
|
58963
|
+
if (ctx.hooks.afterUpdateComment) {
|
|
58964
|
+
var _ctx$hooks$afterUpdat3, _ctx$hooks8;
|
|
58965
|
+
(_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));
|
|
58966
|
+
}
|
|
58962
58967
|
}
|
|
58963
58968
|
function showHideAllComments(ctx) {
|
|
58964
58969
|
var flowdata = getFlowdata(ctx);
|
|
@@ -59180,6 +59185,10 @@ function onCommentBoxResizeEnd(ctx, globalCache) {
|
|
|
59180
59185
|
cell.ps.width = width / ctx.zoomRatio;
|
|
59181
59186
|
cell.ps.height = height / ctx.zoomRatio;
|
|
59182
59187
|
setEditingComment(ctx, flowdata, r, c);
|
|
59188
|
+
if (ctx.hooks.afterUpdateComment) {
|
|
59189
|
+
var _ctx$hooks$afterUpdat4, _ctx$hooks9;
|
|
59190
|
+
(_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));
|
|
59191
|
+
}
|
|
59183
59192
|
}
|
|
59184
59193
|
}
|
|
59185
59194
|
}
|
|
@@ -59210,8 +59219,6 @@ function onCommentBoxMoveStart(ctx, globalCache, e, _ref4, movingId) {
|
|
|
59210
59219
|
}
|
|
59211
59220
|
}
|
|
59212
59221
|
function onCommentBoxMove(ctx, globalCache, e) {
|
|
59213
|
-
var allowEdit = isAllowEdit(ctx);
|
|
59214
|
-
if (!allowEdit) return false;
|
|
59215
59222
|
var commentBox = globalCache === null || globalCache === void 0 ? void 0 : globalCache.commentBox;
|
|
59216
59223
|
if (commentBox === null || commentBox === void 0 ? void 0 : commentBox.movingId) {
|
|
59217
59224
|
var box = document.getElementById(commentBox.movingId);
|
|
@@ -59249,6 +59256,10 @@ function onCommentBoxMoveEnd(ctx, globalCache) {
|
|
|
59249
59256
|
cell.ps.left = left / ctx.zoomRatio;
|
|
59250
59257
|
cell.ps.top = top / ctx.zoomRatio;
|
|
59251
59258
|
setEditingComment(ctx, flowdata, r, c);
|
|
59259
|
+
if (ctx.hooks.afterUpdateComment) {
|
|
59260
|
+
var _ctx$hooks$afterUpdat5, _ctx$hooks10;
|
|
59261
|
+
(_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));
|
|
59262
|
+
}
|
|
59252
59263
|
}
|
|
59253
59264
|
}
|
|
59254
59265
|
}
|
package/dist/settings.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export type Hooks = {
|
|
|
57
57
|
}) => void;
|
|
58
58
|
beforePaste?: (selection: Selection[] | undefined, content: string) => boolean;
|
|
59
59
|
beforeUpdateComment?: (row: number, column: number, value: any) => boolean;
|
|
60
|
-
afterUpdateComment?: (row: number, column: number,
|
|
60
|
+
afterUpdateComment?: (row: number, column: number, value: any) => void;
|
|
61
61
|
beforeInsertComment?: (row: number, column: number) => boolean;
|
|
62
62
|
afterInsertComment?: (row: number, column: number) => void;
|
|
63
63
|
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.
|
|
3
|
+
"version": "3.1.14",
|
|
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
|
+
"@leankylin-sheet/formula-parser": "^3.1.14",
|
|
17
17
|
"dayjs": "^1.11.0",
|
|
18
18
|
"immer": "^9.0.12",
|
|
19
19
|
"lodash": "^4.17.21",
|