@leankylin-sheet/core 1.5.0 → 2.0.1
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 +5 -45
- package/dist/index.js +5 -45
- package/dist/types.d.ts +0 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -66353,60 +66353,20 @@ function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUndo, hand
|
|
|
66353
66353
|
e.stopPropagation();
|
|
66354
66354
|
}
|
|
66355
66355
|
|
|
66356
|
-
var mouseWheelUniqueTimeout;
|
|
66357
66356
|
function handleGlobalWheel(ctx, e, cache, scrollbarX, scrollbarY) {
|
|
66358
66357
|
var _cache$searchDialog;
|
|
66359
66358
|
if (((_cache$searchDialog = cache.searchDialog) === null || _cache$searchDialog === void 0 ? void 0 : _cache$searchDialog.mouseEnter) && ctx.showSearch && ctx.showReplace) return;
|
|
66360
66359
|
if (ctx.filterContextMenu != null) return;
|
|
66361
66360
|
var scrollLeft = scrollbarX.scrollLeft;
|
|
66362
66361
|
var scrollTop = scrollbarY.scrollTop;
|
|
66363
|
-
var visibledatacolumn_c = ctx.visibledatacolumn;
|
|
66364
|
-
var visibledatarow_c = ctx.visibledatarow;
|
|
66365
|
-
clearTimeout(mouseWheelUniqueTimeout);
|
|
66366
|
-
if (cache.visibleColumnsUnique != null) {
|
|
66367
|
-
visibledatacolumn_c = cache.visibleColumnsUnique;
|
|
66368
|
-
} else {
|
|
66369
|
-
visibledatacolumn_c = _.uniq(visibledatacolumn_c);
|
|
66370
|
-
cache.visibleColumnsUnique = visibledatacolumn_c;
|
|
66371
|
-
}
|
|
66372
|
-
if (cache.visibleRowsUnique != null) {
|
|
66373
|
-
visibledatarow_c = cache.visibleRowsUnique;
|
|
66374
|
-
} else {
|
|
66375
|
-
visibledatarow_c = _.uniq(visibledatarow_c);
|
|
66376
|
-
cache.visibleRowsUnique = visibledatarow_c;
|
|
66377
|
-
}
|
|
66378
|
-
var row_st = _.sortedIndex(visibledatarow_c, scrollTop) + 1;
|
|
66379
|
-
var rowscroll = 0;
|
|
66380
|
-
var scrollNum = 1;
|
|
66381
66362
|
if (e.deltaY !== 0) {
|
|
66382
|
-
|
|
66383
|
-
|
|
66384
|
-
|
|
66385
|
-
|
|
66386
|
-
|
|
66387
|
-
if (row_ed >= visibledatarow_c.length) {
|
|
66388
|
-
row_ed = visibledatarow_c.length - 1;
|
|
66389
|
-
}
|
|
66390
|
-
} else {
|
|
66391
|
-
row_ed = row_st - step;
|
|
66392
|
-
if (row_ed < 0) {
|
|
66393
|
-
row_ed = 0;
|
|
66394
|
-
}
|
|
66395
|
-
}
|
|
66396
|
-
rowscroll = row_ed === 0 ? 0 : visibledatarow_c[row_ed - 1];
|
|
66397
|
-
scrollbarY.scrollTop = rowscroll;
|
|
66398
|
-
} else if (e.deltaX !== 0) {
|
|
66399
|
-
if (e.deltaX > 0) {
|
|
66400
|
-
scrollLeft += 20 * ctx.zoomRatio;
|
|
66401
|
-
} else {
|
|
66402
|
-
scrollLeft -= 20 * ctx.zoomRatio;
|
|
66403
|
-
}
|
|
66363
|
+
scrollTop += e.deltaY * ctx.zoomRatio;
|
|
66364
|
+
scrollbarY.scrollTop = scrollTop;
|
|
66365
|
+
}
|
|
66366
|
+
if (e.deltaX !== 0) {
|
|
66367
|
+
scrollLeft += e.deltaX * ctx.zoomRatio;
|
|
66404
66368
|
scrollbarX.scrollLeft = scrollLeft;
|
|
66405
66369
|
}
|
|
66406
|
-
mouseWheelUniqueTimeout = setTimeout(function () {
|
|
66407
|
-
delete cache.visibleColumnsUnique;
|
|
66408
|
-
delete cache.visibleRowsUnique;
|
|
66409
|
-
}, 500);
|
|
66410
66370
|
e.preventDefault();
|
|
66411
66371
|
}
|
|
66412
66372
|
function fixPositionOnFrozenCells(freeze, x, y, mouseX, mouseY) {
|
package/dist/index.js
CHANGED
|
@@ -66363,60 +66363,20 @@ function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUndo, hand
|
|
|
66363
66363
|
e.stopPropagation();
|
|
66364
66364
|
}
|
|
66365
66365
|
|
|
66366
|
-
var mouseWheelUniqueTimeout;
|
|
66367
66366
|
function handleGlobalWheel(ctx, e, cache, scrollbarX, scrollbarY) {
|
|
66368
66367
|
var _cache$searchDialog;
|
|
66369
66368
|
if (((_cache$searchDialog = cache.searchDialog) === null || _cache$searchDialog === void 0 ? void 0 : _cache$searchDialog.mouseEnter) && ctx.showSearch && ctx.showReplace) return;
|
|
66370
66369
|
if (ctx.filterContextMenu != null) return;
|
|
66371
66370
|
var scrollLeft = scrollbarX.scrollLeft;
|
|
66372
66371
|
var scrollTop = scrollbarY.scrollTop;
|
|
66373
|
-
var visibledatacolumn_c = ctx.visibledatacolumn;
|
|
66374
|
-
var visibledatarow_c = ctx.visibledatarow;
|
|
66375
|
-
clearTimeout(mouseWheelUniqueTimeout);
|
|
66376
|
-
if (cache.visibleColumnsUnique != null) {
|
|
66377
|
-
visibledatacolumn_c = cache.visibleColumnsUnique;
|
|
66378
|
-
} else {
|
|
66379
|
-
visibledatacolumn_c = ___default['default'].uniq(visibledatacolumn_c);
|
|
66380
|
-
cache.visibleColumnsUnique = visibledatacolumn_c;
|
|
66381
|
-
}
|
|
66382
|
-
if (cache.visibleRowsUnique != null) {
|
|
66383
|
-
visibledatarow_c = cache.visibleRowsUnique;
|
|
66384
|
-
} else {
|
|
66385
|
-
visibledatarow_c = ___default['default'].uniq(visibledatarow_c);
|
|
66386
|
-
cache.visibleRowsUnique = visibledatarow_c;
|
|
66387
|
-
}
|
|
66388
|
-
var row_st = ___default['default'].sortedIndex(visibledatarow_c, scrollTop) + 1;
|
|
66389
|
-
var rowscroll = 0;
|
|
66390
|
-
var scrollNum = 1;
|
|
66391
66372
|
if (e.deltaY !== 0) {
|
|
66392
|
-
|
|
66393
|
-
|
|
66394
|
-
|
|
66395
|
-
|
|
66396
|
-
|
|
66397
|
-
if (row_ed >= visibledatarow_c.length) {
|
|
66398
|
-
row_ed = visibledatarow_c.length - 1;
|
|
66399
|
-
}
|
|
66400
|
-
} else {
|
|
66401
|
-
row_ed = row_st - step;
|
|
66402
|
-
if (row_ed < 0) {
|
|
66403
|
-
row_ed = 0;
|
|
66404
|
-
}
|
|
66405
|
-
}
|
|
66406
|
-
rowscroll = row_ed === 0 ? 0 : visibledatarow_c[row_ed - 1];
|
|
66407
|
-
scrollbarY.scrollTop = rowscroll;
|
|
66408
|
-
} else if (e.deltaX !== 0) {
|
|
66409
|
-
if (e.deltaX > 0) {
|
|
66410
|
-
scrollLeft += 20 * ctx.zoomRatio;
|
|
66411
|
-
} else {
|
|
66412
|
-
scrollLeft -= 20 * ctx.zoomRatio;
|
|
66413
|
-
}
|
|
66373
|
+
scrollTop += e.deltaY * ctx.zoomRatio;
|
|
66374
|
+
scrollbarY.scrollTop = scrollTop;
|
|
66375
|
+
}
|
|
66376
|
+
if (e.deltaX !== 0) {
|
|
66377
|
+
scrollLeft += e.deltaX * ctx.zoomRatio;
|
|
66414
66378
|
scrollbarX.scrollLeft = scrollLeft;
|
|
66415
66379
|
}
|
|
66416
|
-
mouseWheelUniqueTimeout = setTimeout(function () {
|
|
66417
|
-
delete cache.visibleColumnsUnique;
|
|
66418
|
-
delete cache.visibleRowsUnique;
|
|
66419
|
-
}, 500);
|
|
66420
66380
|
e.preventDefault();
|
|
66421
66381
|
}
|
|
66422
66382
|
function fixPositionOnFrozenCells(freeze, x, y, mouseX, mouseY) {
|
package/dist/types.d.ts
CHANGED
|
@@ -280,7 +280,6 @@ export type GlobalCache = {
|
|
|
280
280
|
recentTextColor?: string;
|
|
281
281
|
recentBackgroundColor?: string;
|
|
282
282
|
visibleColumnsUnique?: number[];
|
|
283
|
-
visibleRowsUnique?: number[];
|
|
284
283
|
undoList: History[];
|
|
285
284
|
redoList: History[];
|
|
286
285
|
editingCommentBoxEle?: HTMLDivElement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leankylin-sheet/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"repository": "http://114.55.85.79:19999/leankylin-front/leankylin-sheet",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@leankylin-sheet/formula-parser": "^
|
|
13
|
+
"@leankylin-sheet/formula-parser": "^2.0.1",
|
|
14
14
|
"dayjs": "^1.11.0",
|
|
15
15
|
"immer": "^9.0.12",
|
|
16
16
|
"lodash": "^4.17.21",
|