e-virt-table 1.3.21 → 1.3.23
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.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +18 -18
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/Context.d.ts +0 -1
- package/dist/lib/Context.js +0 -6
- package/dist/lib/Context.js.map +1 -1
- package/dist/lib/Editor.d.ts +1 -0
- package/dist/lib/Editor.js +11 -12
- package/dist/lib/Editor.js.map +1 -1
- package/dist/lib/Selector.js +6 -7
- package/dist/lib/Selector.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -3735,8 +3735,6 @@ class Me {
|
|
|
3735
3735
|
// 拖拽表头中
|
|
3736
3736
|
n(this, "finding", !1);
|
|
3737
3737
|
// 查找中
|
|
3738
|
-
n(this, "adjustPositioning", !1);
|
|
3739
|
-
// 调整位置中
|
|
3740
3738
|
n(this, "contextMenuIng", !1);
|
|
3741
3739
|
// 右键菜单中
|
|
3742
3740
|
n(this, "editing", !1);
|
|
@@ -4995,8 +4993,8 @@ class Be {
|
|
|
4995
4993
|
}), this.ctx.on(
|
|
4996
4994
|
"mousemove",
|
|
4997
4995
|
bt((t) => {
|
|
4998
|
-
var e
|
|
4999
|
-
(e = this.ctx.
|
|
4996
|
+
var e;
|
|
4997
|
+
(e = this.ctx.focusCellHeader) != null && e.fixed || !this.ctx.dragHeaderIng && this.ctx.selectorMove && this.ctx.startAdjustPosition(t);
|
|
5000
4998
|
}, 100)
|
|
5001
4999
|
), this.ctx.on("cellHoverChange", (t) => {
|
|
5002
5000
|
if (!this.ctx.autofillMove) {
|
|
@@ -5006,6 +5004,8 @@ class Be {
|
|
|
5006
5004
|
}
|
|
5007
5005
|
this.isMultipleRow || this.mouseenter();
|
|
5008
5006
|
}
|
|
5007
|
+
}), this.ctx.on("cellClick", () => {
|
|
5008
|
+
this.adjustBoundaryPosition();
|
|
5009
5009
|
}), this.ctx.on("cellMousedown", (t, e) => {
|
|
5010
5010
|
if (!this.ctx.isTarget(e) || this.ctx.stageElement.style.cursor === "pointer" || this.ctx.isPointer || this.ctx.stageElement.style.cursor === "crosshair")
|
|
5011
5011
|
return;
|
|
@@ -5015,7 +5015,7 @@ class Be {
|
|
|
5015
5015
|
}
|
|
5016
5016
|
window.getComputedStyle(e.target).userSelect !== "text" && e.preventDefault(), this.isMultipleRow = !1, this.click(e.shiftKey), this.ctx.emit("selectorClick", t);
|
|
5017
5017
|
}), this.ctx.on("mouseup", () => {
|
|
5018
|
-
this.ctx.selectorMove = !1, this.ctx.stopAdjustPosition(),
|
|
5018
|
+
this.ctx.selectorMove = !1, this.ctx.stopAdjustPosition(), setTimeout(() => {
|
|
5019
5019
|
this.ctx.disableHoverIconClick = !1;
|
|
5020
5020
|
}, 0);
|
|
5021
5021
|
}), this.ctx.on("cellHeaderHoverChange", (t) => {
|
|
@@ -5073,7 +5073,7 @@ class Be {
|
|
|
5073
5073
|
}), this.ctx.on("contextMenuCut", () => {
|
|
5074
5074
|
this.isCut = !0, this.copy();
|
|
5075
5075
|
}), this.ctx.on("setSelectorCell", (t) => {
|
|
5076
|
-
this.ctx.setFocusCell(t), this.click();
|
|
5076
|
+
this.ctx.setFocusCell(t), this.click(), this.adjustBoundaryPosition();
|
|
5077
5077
|
}), this.ctx.on("selectCols", (t) => {
|
|
5078
5078
|
this.selectCols(t);
|
|
5079
5079
|
});
|
|
@@ -5239,7 +5239,7 @@ class Be {
|
|
|
5239
5239
|
} else {
|
|
5240
5240
|
this.ctx.emit("cellSelectedClick", e);
|
|
5241
5241
|
const s = [e.colIndex, e.colIndex], o = [e.rowIndex, e.rowIndex];
|
|
5242
|
-
this.setSelector(s, o)
|
|
5242
|
+
this.setSelector(s, o);
|
|
5243
5243
|
}
|
|
5244
5244
|
}
|
|
5245
5245
|
clearCopyLine() {
|
|
@@ -5474,7 +5474,7 @@ class Be {
|
|
|
5474
5474
|
u && (x === "top" ? R = r.height + a.height - w : O = a.visibleHeight);
|
|
5475
5475
|
const v = w + S - (t - O - f);
|
|
5476
5476
|
let I = h, _ = d;
|
|
5477
|
-
C > 0 && !y ? I = Math.floor(h + C) : b > 0 && !y && (I = Math.floor(h - b)), R > 0 ? _ = Math.floor(d - R) : v > 0 && (_ = Math.floor(d + v)), (Math.abs(h - I) > 2 || Math.abs(d - _) > 2) &&
|
|
5477
|
+
C > 0 && !y ? I = Math.floor(h + C) : b > 0 && !y && (I = Math.floor(h - b)), R > 0 ? _ = Math.floor(d - R) : v > 0 && (_ = Math.floor(d + v)), (Math.abs(h - I) > 2.5 || Math.abs(d - _) > 2.5) && this.ctx.setScroll(I, _);
|
|
5478
5478
|
}
|
|
5479
5479
|
destroy() {
|
|
5480
5480
|
}
|
|
@@ -6743,7 +6743,7 @@ class Oi {
|
|
|
6743
6743
|
}), this.ctx.on("moveFocus", (t) => {
|
|
6744
6744
|
this.cellTarget = t, this.resetEditorStyle();
|
|
6745
6745
|
const { xArr: e, yArr: i } = this.ctx.selector;
|
|
6746
|
-
this.selectorArrStr = JSON.stringify(e) + JSON.stringify(i);
|
|
6746
|
+
this.selectorArrStr = JSON.stringify(e) + JSON.stringify(i), this.focusInput();
|
|
6747
6747
|
}), this.ctx.on("onScroll", () => {
|
|
6748
6748
|
this.enable && this.doneEdit();
|
|
6749
6749
|
}), this.ctx.on("hoverIconClick", (t) => {
|
|
@@ -6815,17 +6815,16 @@ class Oi {
|
|
|
6815
6815
|
"F12"
|
|
6816
6816
|
].includes(s))
|
|
6817
6817
|
return;
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
t.preventDefault(), this.inputEl.blur();
|
|
6818
|
+
if (!(document.activeElement === this.inputEl)) {
|
|
6819
|
+
t.preventDefault();
|
|
6821
6820
|
return;
|
|
6822
6821
|
}
|
|
6823
6822
|
this.startEdit(!0);
|
|
6824
|
-
}), this.ctx.on("
|
|
6823
|
+
}), this.ctx.on("cellClick", (t) => {
|
|
6825
6824
|
if (this.ctx.isPointer || !this.isInSelectorRange(t.rowIndex, t.colIndex))
|
|
6826
6825
|
return;
|
|
6827
6826
|
const { xArr: e, yArr: i } = this.ctx.selector, s = JSON.stringify(e) + JSON.stringify(i);
|
|
6828
|
-
if (this.selectorArrStr === s && this.cellTarget) {
|
|
6827
|
+
if (this.focusInput(), this.selectorArrStr === s && this.cellTarget) {
|
|
6829
6828
|
if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.onlyMergeCell) {
|
|
6830
6829
|
this.startEdit();
|
|
6831
6830
|
return;
|
|
@@ -6835,15 +6834,13 @@ class Oi {
|
|
|
6835
6834
|
return;
|
|
6836
6835
|
}
|
|
6837
6836
|
}
|
|
6838
|
-
if (this.selectorArrStr = s, this.doneEdit(), this.cellTarget = t, this.
|
|
6837
|
+
if (this.selectorArrStr = s, this.doneEdit(), this.cellTarget = t, this.resetEditorStyle(), this.ctx.config.ENABLE_EDIT_SINGLE_CLICK) {
|
|
6839
6838
|
if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.onlyMergeCell) {
|
|
6840
6839
|
this.startEdit();
|
|
6841
6840
|
return;
|
|
6842
6841
|
}
|
|
6843
6842
|
this.ctx.selectOnlyOne && this.startEdit();
|
|
6844
6843
|
}
|
|
6845
|
-
}), this.ctx.on("mousedownBodyOutside", () => {
|
|
6846
|
-
this.clearEditor();
|
|
6847
6844
|
});
|
|
6848
6845
|
}
|
|
6849
6846
|
isInSelectorRange(t, e) {
|
|
@@ -6888,6 +6885,9 @@ class Oi {
|
|
|
6888
6885
|
s !== i && !(s === "" && i === null) && !this.cancel && this.ctx.setItemValueByEditor(t, e, s, !0);
|
|
6889
6886
|
}
|
|
6890
6887
|
}
|
|
6888
|
+
focusInput() {
|
|
6889
|
+
document.activeElement !== this.inputEl && this.inputEl.focus({ preventScroll: !0 });
|
|
6890
|
+
}
|
|
6891
6891
|
startEdit(t = !1) {
|
|
6892
6892
|
this.cancel = !1;
|
|
6893
6893
|
const { ENABLE_EDIT_CLICK_SELECTOR: e } = this.ctx.config;
|
|
@@ -6915,7 +6915,7 @@ class Oi {
|
|
|
6915
6915
|
}
|
|
6916
6916
|
doneEdit() {
|
|
6917
6917
|
this.enable && (this.doneEditByInput(), this.ctx.emit("cellHideTooltip"), this.ctx.emit("doneEdit", this.cellTarget), this.enable = !1, this.ctx.editing = !1, this.resetEditorStyle(), setTimeout(() => {
|
|
6918
|
-
this.
|
|
6918
|
+
this.focusInput();
|
|
6919
6919
|
}, 0), this.ctx.emit("draw"));
|
|
6920
6920
|
}
|
|
6921
6921
|
resetEditorStyle() {
|