e-virt-table 0.0.20 → 0.0.21
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 +4 -4
- 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/Editor.js +2 -3
- package/dist/lib/Editor.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(':root{--e-virt-table-color-white: #fff;--e-virt-table-color-black: #000000;--e-virt-table-color-primary: rgb(82, 146, 247);--e-virt-table-text-color-primary: "#333";--e-virt-table-text-color-regular: "#666";--e-virt-table-text-color-secondary: "#999";--e-virt-table-box-shadow: 0 2px 12px 0 #0000001a;--e-virt-table-editor-bg-color: #fff}.e-virt-table-editor{position:absolute;top:-10000px;left:-10000px;text-align:left;line-height:0;z-index:100;overflow:hidden;background-color:var(--e-virt-table-editor-bg-color);border:2px solid var(--e-virt-table-color-primary);box-sizing:border-box;box-shadow:var(--e-virt-table-box-shadow);pointer-events:auto;display:flex;align-items:center}.e-virt-table-editor-textarea{width:100%;box-sizing:border-box;padding:8px;outline:none;font-weight:400;font-size:12px;color:inherit;white-space:
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(':root{--e-virt-table-color-white: #fff;--e-virt-table-color-black: #000000;--e-virt-table-color-primary: rgb(82, 146, 247);--e-virt-table-text-color-primary: "#333";--e-virt-table-text-color-regular: "#666";--e-virt-table-text-color-secondary: "#999";--e-virt-table-box-shadow: 0 2px 12px 0 #0000001a;--e-virt-table-editor-bg-color: #fff}.e-virt-table-editor{position:absolute;top:-10000px;left:-10000px;text-align:left;line-height:0;z-index:100;overflow:hidden;background-color:var(--e-virt-table-editor-bg-color);border:2px solid var(--e-virt-table-color-primary);box-sizing:border-box;box-shadow:var(--e-virt-table-box-shadow);pointer-events:auto;display:flex;align-items:center}.e-virt-table-editor-textarea{width:100%;box-sizing:border-box;padding:8px;outline:none;font-weight:400;font-size:12px;color:inherit;white-space:pre-wrap;word-wrap:break-word;word-break:break-all;line-height:18px;margin:0;border:none;background:var(--e-virt-table-color-white);overflow:hidden;cursor:text}.e-virt-table-context-menu{position:absolute;font-size:14px;color:var(--e-virt-table-text-color-regular);background-color:var(--e-virt-table-color-white);border-radius:4px;border:1px solid #e4e7ed;box-shadow:var(--e-virt-table-box-shadow);width:fit-content;padding:6px 0;z-index:9999;left:-99999px;top:-99999px}.e-virt-table-context-menu-item{cursor:pointer;padding:8px 24px}.e-virt-table-context-menu-item:hover{color:var(--e-virt-table-color-primary);background-color:#f5f7fa}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
2
|
var me = Object.defineProperty;
|
|
3
3
|
var Ee = (a, t, e) => t in a ? me(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
4
4
|
var c = (a, t, e) => Ee(a, typeof t != "symbol" ? t + "" : t, e);
|
|
@@ -5078,9 +5078,9 @@ class qi {
|
|
|
5078
5078
|
let r = t.getDrawY(), { height: o } = t;
|
|
5079
5079
|
t.height > this.ctx.body.visibleHeight && (o = this.ctx.body.visibleHeight, r = this.ctx.header.visibleHeight);
|
|
5080
5080
|
const { CELL_PADDING: n } = this.ctx.config;
|
|
5081
|
-
this.editorEl.style.left = `${s}px`, this.editorEl.style.top = `${r}px`, this.inputEl.style.minWidth = `${i - 1}px`, this.inputEl.style.minHeight = `${o - 1}px`, this.inputEl.style.width = `${i - 1}px`, this.inputEl.style.height = `${o - 1}px`, this.inputEl.style.padding = `${n}px`, e !== null && (this.inputEl.value = e);
|
|
5082
|
-
const l =
|
|
5083
|
-
|
|
5081
|
+
this.editorEl.style.left = `${s}px`, this.editorEl.style.top = `${r}px`, this.inputEl.style.minWidth = `${i - 1}px`, this.inputEl.style.minHeight = `${o - 1}px`, this.inputEl.style.width = `${i - 1}px`, this.inputEl.style.height = `${o - 1}px`, this.inputEl.style.padding = `${n}px`, e !== null && (this.inputEl.value = e), this.inputEl.focus();
|
|
5082
|
+
const l = this.inputEl.value.length;
|
|
5083
|
+
this.inputEl.setSelectionRange(l, l);
|
|
5084
5084
|
}
|
|
5085
5085
|
doneEditByInput() {
|
|
5086
5086
|
if (!this.cellTarget || this.cellTarget.editorType !== "text")
|