@leankylin-sheet/core 1.5.0 → 2.0.0
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 +3 -36
- package/dist/index.js +3 -36
- package/dist/types.d.ts +0 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -66353,48 +66353,19 @@ 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
|
-
var row_ed;
|
|
66383
|
-
var step = Math.round(scrollNum / ctx.zoomRatio);
|
|
66384
|
-
step = step < 1 ? 1 : step;
|
|
66385
66363
|
if (e.deltaY > 0) {
|
|
66386
|
-
|
|
66387
|
-
if (row_ed >= visibledatarow_c.length) {
|
|
66388
|
-
row_ed = visibledatarow_c.length - 1;
|
|
66389
|
-
}
|
|
66364
|
+
scrollTop += 20 * ctx.zoomRatio;
|
|
66390
66365
|
} else {
|
|
66391
|
-
|
|
66392
|
-
if (row_ed < 0) {
|
|
66393
|
-
row_ed = 0;
|
|
66394
|
-
}
|
|
66366
|
+
scrollTop -= 20 * ctx.zoomRatio;
|
|
66395
66367
|
}
|
|
66396
|
-
|
|
66397
|
-
scrollbarY.scrollTop = rowscroll;
|
|
66368
|
+
scrollbarY.scrollTop = scrollTop;
|
|
66398
66369
|
} else if (e.deltaX !== 0) {
|
|
66399
66370
|
if (e.deltaX > 0) {
|
|
66400
66371
|
scrollLeft += 20 * ctx.zoomRatio;
|
|
@@ -66403,10 +66374,6 @@ function handleGlobalWheel(ctx, e, cache, scrollbarX, scrollbarY) {
|
|
|
66403
66374
|
}
|
|
66404
66375
|
scrollbarX.scrollLeft = scrollLeft;
|
|
66405
66376
|
}
|
|
66406
|
-
mouseWheelUniqueTimeout = setTimeout(function () {
|
|
66407
|
-
delete cache.visibleColumnsUnique;
|
|
66408
|
-
delete cache.visibleRowsUnique;
|
|
66409
|
-
}, 500);
|
|
66410
66377
|
e.preventDefault();
|
|
66411
66378
|
}
|
|
66412
66379
|
function fixPositionOnFrozenCells(freeze, x, y, mouseX, mouseY) {
|
package/dist/index.js
CHANGED
|
@@ -66363,48 +66363,19 @@ 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
|
-
var row_ed;
|
|
66393
|
-
var step = Math.round(scrollNum / ctx.zoomRatio);
|
|
66394
|
-
step = step < 1 ? 1 : step;
|
|
66395
66373
|
if (e.deltaY > 0) {
|
|
66396
|
-
|
|
66397
|
-
if (row_ed >= visibledatarow_c.length) {
|
|
66398
|
-
row_ed = visibledatarow_c.length - 1;
|
|
66399
|
-
}
|
|
66374
|
+
scrollTop += 20 * ctx.zoomRatio;
|
|
66400
66375
|
} else {
|
|
66401
|
-
|
|
66402
|
-
if (row_ed < 0) {
|
|
66403
|
-
row_ed = 0;
|
|
66404
|
-
}
|
|
66376
|
+
scrollTop -= 20 * ctx.zoomRatio;
|
|
66405
66377
|
}
|
|
66406
|
-
|
|
66407
|
-
scrollbarY.scrollTop = rowscroll;
|
|
66378
|
+
scrollbarY.scrollTop = scrollTop;
|
|
66408
66379
|
} else if (e.deltaX !== 0) {
|
|
66409
66380
|
if (e.deltaX > 0) {
|
|
66410
66381
|
scrollLeft += 20 * ctx.zoomRatio;
|
|
@@ -66413,10 +66384,6 @@ function handleGlobalWheel(ctx, e, cache, scrollbarX, scrollbarY) {
|
|
|
66413
66384
|
}
|
|
66414
66385
|
scrollbarX.scrollLeft = scrollLeft;
|
|
66415
66386
|
}
|
|
66416
|
-
mouseWheelUniqueTimeout = setTimeout(function () {
|
|
66417
|
-
delete cache.visibleColumnsUnique;
|
|
66418
|
-
delete cache.visibleRowsUnique;
|
|
66419
|
-
}, 500);
|
|
66420
66387
|
e.preventDefault();
|
|
66421
66388
|
}
|
|
66422
66389
|
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.0",
|
|
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.0",
|
|
14
14
|
"dayjs": "^1.11.0",
|
|
15
15
|
"immer": "^9.0.12",
|
|
16
16
|
"lodash": "^4.17.21",
|