e-virt-table 1.3.7 → 1.3.8
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 +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +97 -97
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/Editor.js +7 -8
- package/dist/lib/Editor.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -607,14 +607,14 @@ class bt extends jt {
|
|
|
607
607
|
if (this.cellType === "footer") {
|
|
608
608
|
let _ = c, S = l;
|
|
609
609
|
if (typeof o == "function") {
|
|
610
|
-
const
|
|
610
|
+
const R = o, { backgroundColor: I, color: T, font: O } = R({
|
|
611
611
|
row: this.row,
|
|
612
612
|
rowIndex: this.rowIndex,
|
|
613
613
|
colIndex: this.colIndex,
|
|
614
614
|
column: this.column,
|
|
615
615
|
value: this.getValue()
|
|
616
616
|
}) || {};
|
|
617
|
-
|
|
617
|
+
I && (_ = I), T && (S = T), O && (this.drawTextFont = O);
|
|
618
618
|
}
|
|
619
619
|
this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = _, this.drawTextColor = S;
|
|
620
620
|
return;
|
|
@@ -629,7 +629,7 @@ class bt extends jt {
|
|
|
629
629
|
x && E && (E.rowKey === this.rowKey && (w = u), E.rowIndex >= C && E.rowIndex <= b && (w = u)), d && p && (p.rowKey === this.rowKey && (w = f), p.rowIndex >= C && p.rowIndex <= b && (w = f)), this.drawCellSkyBgColor = w;
|
|
630
630
|
let y = e, v = a;
|
|
631
631
|
if (this.ctx.database.getReadonly(this.rowKey, this.key) || (y = i, v = r), g && (this.rowIndex % 2 ? y = m : y = e), typeof s == "function") {
|
|
632
|
-
const _ = s, { backgroundColor: S, color:
|
|
632
|
+
const _ = s, { backgroundColor: S, color: R, font: I } = _({
|
|
633
633
|
row: this.row,
|
|
634
634
|
rowIndex: this.rowIndex,
|
|
635
635
|
colIndex: this.colIndex,
|
|
@@ -637,7 +637,7 @@ class bt extends jt {
|
|
|
637
637
|
isHasChanged: this.isHasChanged,
|
|
638
638
|
value: this.getValue()
|
|
639
639
|
}) || {};
|
|
640
|
-
S && (y = S),
|
|
640
|
+
S && (y = S), R && (v = R), I && (this.drawTextFont = I);
|
|
641
641
|
}
|
|
642
642
|
this.drawCellBgColor = y, this.drawTextColor = v;
|
|
643
643
|
}
|
|
@@ -2005,38 +2005,38 @@ class ye {
|
|
|
2005
2005
|
let w = e, E = e, p = a, C = a, b = [], y = 0, v = 0, _ = 0, S = 0;
|
|
2006
2006
|
if (d !== 1 && g) {
|
|
2007
2007
|
S = x;
|
|
2008
|
-
const
|
|
2008
|
+
const R = l.reduce((I, T) => {
|
|
2009
2009
|
const O = this.getItemValue(s, T) ?? "";
|
|
2010
|
-
return `${
|
|
2010
|
+
return `${I}${O}`;
|
|
2011
2011
|
}, "");
|
|
2012
|
-
for (let
|
|
2013
|
-
const T = this.rowIndexRowKeyMap.get(
|
|
2012
|
+
for (let I = e - 1; I >= 0; I--) {
|
|
2013
|
+
const T = this.rowIndexRowKeyMap.get(I) || "", O = l.reduce((M, L) => {
|
|
2014
2014
|
const A = this.getItemValue(T, L) ?? "";
|
|
2015
2015
|
return `${M}${A}`;
|
|
2016
2016
|
}, "");
|
|
2017
|
-
if (
|
|
2018
|
-
w =
|
|
2017
|
+
if (R === O)
|
|
2018
|
+
w = I;
|
|
2019
2019
|
else
|
|
2020
2020
|
break;
|
|
2021
2021
|
}
|
|
2022
|
-
for (let
|
|
2023
|
-
const T = this.rowIndexRowKeyMap.get(
|
|
2022
|
+
for (let I = e; I <= this.ctx.maxRowIndex; I++) {
|
|
2023
|
+
const T = this.rowIndexRowKeyMap.get(I) || "", O = l.reduce((M, L) => {
|
|
2024
2024
|
const A = this.getItemValue(T, L) ?? "";
|
|
2025
2025
|
return `${M}${A}`;
|
|
2026
2026
|
}, "");
|
|
2027
|
-
if (
|
|
2028
|
-
E =
|
|
2027
|
+
if (R === O)
|
|
2028
|
+
E = I;
|
|
2029
2029
|
else
|
|
2030
2030
|
break;
|
|
2031
2031
|
}
|
|
2032
|
-
for (let
|
|
2033
|
-
const { height: T } = this.positions[
|
|
2032
|
+
for (let I = w; I < e; I++) {
|
|
2033
|
+
const { height: T } = this.positions[I];
|
|
2034
2034
|
y += T;
|
|
2035
2035
|
}
|
|
2036
|
-
for (let
|
|
2037
|
-
const { height: T } = this.positions[
|
|
2036
|
+
for (let I = w; I <= E; I++) {
|
|
2037
|
+
const { height: T } = this.positions[I];
|
|
2038
2038
|
_ += T;
|
|
2039
|
-
const O = this.rowIndexRowKeyMap.get(
|
|
2039
|
+
const O = this.rowIndexRowKeyMap.get(I) || "", { item: M } = this.rowKeyMap.get(O), L = this.getItemValue(O, i);
|
|
2040
2040
|
b.push({
|
|
2041
2041
|
rowKey: O,
|
|
2042
2042
|
key: i,
|
|
@@ -2047,40 +2047,40 @@ class ye {
|
|
|
2047
2047
|
}
|
|
2048
2048
|
if (u !== 1 && m) {
|
|
2049
2049
|
_ = f;
|
|
2050
|
-
for (let
|
|
2051
|
-
const
|
|
2052
|
-
if (!
|
|
2050
|
+
for (let R = a - 1; R >= 0; R--) {
|
|
2051
|
+
const I = this.getColumnByColIndex(R);
|
|
2052
|
+
if (!I)
|
|
2053
2053
|
break;
|
|
2054
|
-
const T = this.getItemValue(s, i), O = this.getItemValue(s,
|
|
2055
|
-
if (T === O && c.includes(
|
|
2056
|
-
p =
|
|
2054
|
+
const T = this.getItemValue(s, i), O = this.getItemValue(s, I.key);
|
|
2055
|
+
if (T === O && c.includes(I.key))
|
|
2056
|
+
p = R;
|
|
2057
2057
|
else
|
|
2058
2058
|
break;
|
|
2059
2059
|
}
|
|
2060
|
-
for (let
|
|
2061
|
-
const
|
|
2062
|
-
if (!
|
|
2060
|
+
for (let R = a; R <= this.ctx.maxColIndex; R++) {
|
|
2061
|
+
const I = this.getColumnByColIndex(R);
|
|
2062
|
+
if (!I)
|
|
2063
2063
|
break;
|
|
2064
|
-
const T = this.getItemValue(s, i), O = this.getItemValue(s,
|
|
2065
|
-
if (T === O && c.includes(
|
|
2066
|
-
C =
|
|
2064
|
+
const T = this.getItemValue(s, i), O = this.getItemValue(s, I.key);
|
|
2065
|
+
if (T === O && c.includes(I.key))
|
|
2066
|
+
C = R;
|
|
2067
2067
|
else
|
|
2068
2068
|
break;
|
|
2069
2069
|
}
|
|
2070
|
-
for (let
|
|
2071
|
-
const
|
|
2072
|
-
if (!
|
|
2070
|
+
for (let R = p; R < a; R++) {
|
|
2071
|
+
const I = this.getColumnByColIndex(R);
|
|
2072
|
+
if (!I)
|
|
2073
2073
|
break;
|
|
2074
|
-
v +=
|
|
2074
|
+
v += I.width || 100;
|
|
2075
2075
|
}
|
|
2076
|
-
for (let
|
|
2077
|
-
const
|
|
2078
|
-
if (!
|
|
2076
|
+
for (let R = p; R <= C; R++) {
|
|
2077
|
+
const I = this.getColumnByColIndex(R);
|
|
2078
|
+
if (!I)
|
|
2079
2079
|
break;
|
|
2080
|
-
S +=
|
|
2080
|
+
S += I.width || 100, b.push({
|
|
2081
2081
|
rowKey: s,
|
|
2082
|
-
key:
|
|
2083
|
-
value: this.getItemValue(s,
|
|
2082
|
+
key: I.key,
|
|
2083
|
+
value: this.getItemValue(s, I.key),
|
|
2084
2084
|
row: o
|
|
2085
2085
|
});
|
|
2086
2086
|
}
|
|
@@ -2285,7 +2285,7 @@ class be {
|
|
|
2285
2285
|
this.history = [], this.historyIndex = -1;
|
|
2286
2286
|
}
|
|
2287
2287
|
}
|
|
2288
|
-
class
|
|
2288
|
+
class Re {
|
|
2289
2289
|
constructor(t) {
|
|
2290
2290
|
n(this, "eventTasks", /* @__PURE__ */ new Set());
|
|
2291
2291
|
n(this, "ctx");
|
|
@@ -2367,7 +2367,7 @@ class Ie {
|
|
|
2367
2367
|
}
|
|
2368
2368
|
}
|
|
2369
2369
|
}
|
|
2370
|
-
class
|
|
2370
|
+
class Ie {
|
|
2371
2371
|
constructor() {
|
|
2372
2372
|
n(this, "events", /* @__PURE__ */ new Map());
|
|
2373
2373
|
}
|
|
@@ -2501,7 +2501,7 @@ class ve {
|
|
|
2501
2501
|
* @returns 是否溢出
|
|
2502
2502
|
*/
|
|
2503
2503
|
drawText(t = "", e, i, s, o, r = {}) {
|
|
2504
|
-
var
|
|
2504
|
+
var I;
|
|
2505
2505
|
this.ctx.save();
|
|
2506
2506
|
const {
|
|
2507
2507
|
font: a = "12px Arial",
|
|
@@ -2516,7 +2516,7 @@ class ve {
|
|
|
2516
2516
|
} = r;
|
|
2517
2517
|
if (this.ctx.font = a, this.ctx.fillStyle = c, this.ctx.textAlign = l, ["", null, void 0].includes(t))
|
|
2518
2518
|
return this.ctx.restore(), !1;
|
|
2519
|
-
const E = parseInt(((
|
|
2519
|
+
const E = parseInt(((I = a.match(/\d+/)) == null ? void 0 : I[0]) || "12") * (r.lineHeight || 1.2), p = s - d * 2 - g - m;
|
|
2520
2520
|
let C = !1;
|
|
2521
2521
|
const b = Math.round((o - 2 * d) / E);
|
|
2522
2522
|
let y = this.wrapText(t, p, r.cacheTextKey), v = Math.min(y.length, Math.max(b, 1));
|
|
@@ -2524,23 +2524,23 @@ class ve {
|
|
|
2524
2524
|
let _ = i + d;
|
|
2525
2525
|
const S = Math.round(v * E);
|
|
2526
2526
|
f === "middle" ? _ = i + (o - S) / 2 : f === "bottom" && (_ = i + o - S - d);
|
|
2527
|
-
let
|
|
2528
|
-
l === "center" ?
|
|
2527
|
+
let R = e + d + g;
|
|
2528
|
+
l === "center" ? R = e + s / 2 : l === "right" && (R = e + s - d - m);
|
|
2529
2529
|
for (let T = 0; T < y.length; T++) {
|
|
2530
2530
|
const O = y[T], M = _ + T * E;
|
|
2531
2531
|
if (this.ctx.textBaseline = "top", T === v - 1) {
|
|
2532
2532
|
const A = y.slice(T).join(""), { _text: D, ellipsis: H } = this.handleEllipsis(A, s, d, a);
|
|
2533
|
-
this.ctx.fillText(D,
|
|
2533
|
+
this.ctx.fillText(D, R, M), C = H;
|
|
2534
2534
|
break;
|
|
2535
2535
|
}
|
|
2536
|
-
this.ctx.fillText(O,
|
|
2536
|
+
this.ctx.fillText(O, R, M);
|
|
2537
2537
|
}
|
|
2538
2538
|
if (r.textCallback && y.length) {
|
|
2539
2539
|
const T = y.reduce((D, H) => Math.max(D, this.ctx.measureText(H).width), 0), O = Math.round(T);
|
|
2540
|
-
let M =
|
|
2541
|
-
l === "center" ? (M =
|
|
2540
|
+
let M = R, L = R + O;
|
|
2541
|
+
l === "center" ? (M = R - O / 2, L = R + O / 2) : l === "right" && (M = R - O, L = R);
|
|
2542
2542
|
const A = {
|
|
2543
|
-
x:
|
|
2543
|
+
x: R,
|
|
2544
2544
|
y: _,
|
|
2545
2545
|
width: O,
|
|
2546
2546
|
height: S,
|
|
@@ -2992,7 +2992,7 @@ class Dt {
|
|
|
2992
2992
|
}), Object.assign(this, t, this._config);
|
|
2993
2993
|
}
|
|
2994
2994
|
}
|
|
2995
|
-
const qt = '<svg t="1724122015492" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4237" width="32" height="32"><path d="M401.472 316.992l159.04 217.664L591.488 512l-30.976-22.656-159.04 217.728q-2.24 3.008-3.84 6.464-1.6 3.456-2.496 7.104-0.896 3.648-1.024 7.424-0.192 3.84 0.384 7.552 0.64 3.712 1.92 7.296 1.28 3.52 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992 3.072 2.24 6.464 3.84 3.456 1.6 7.168 2.496 3.648 0.896 7.424 1.024 3.776 0.192 7.488-0.448 3.776-0.576 7.296-1.856 3.584-1.28 6.784-3.264 3.2-1.92 6.016-4.48 2.816-2.56 5.056-5.632l159.04-217.728q3.584-4.928 5.504-10.752 1.92-5.76 1.92-11.904 0-6.08-1.92-11.904-1.92-5.76-5.504-10.752L463.488 271.68q-2.24-3.072-5.056-5.632-2.752-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.52-1.28-7.296-1.856-3.712-0.576-7.488-0.448-3.84 0.192-7.424 1.088-3.712 0.896-7.168 2.496-3.392 1.6-6.4 3.84-3.136 2.176-5.696 4.992-2.56 2.752-4.48 6.016-1.984 3.2-3.264 6.784-1.28 3.52-1.92 7.296-0.576 3.712-0.384 7.488 0.128 3.84 1.024 7.488 0.896 3.648 2.496 7.04 1.6 3.456 3.84 6.528z m30.976-61.056q-3.776 0-7.488 0.704-3.712 0.768-7.168 2.24-3.52 1.408-6.656 3.52-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.176 7.232-0.768 3.712-0.768 7.488 0 3.776 0.768 7.488 0.704 3.712 2.176 7.232 1.408 3.456 3.52 6.592 2.112 3.2 4.8 5.824 2.688 2.688 5.76 4.8 3.2 2.112 6.72 3.52 3.456 1.472 7.168 2.176 3.712 0.768 7.488 0.768 3.84 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.656 1.472-3.52 2.24-7.232 0.704-3.712 0.704-7.488 0-3.84-0.704-7.488-0.768-3.712-2.24-7.232-1.408-3.456-3.52-6.592-2.112-3.2-4.8-5.824-2.624-2.688-5.76-4.8-3.2-2.112-6.656-3.52-3.52-1.472-7.232-2.24Q436.224 256 432.448 256z m0 435.392q-3.776 0-7.488 0.704-3.712 0.768-7.168 2.176-3.52 1.472-6.656 3.584-3.2 2.112-5.824 4.736-2.688 2.688-4.8 5.824-2.112 3.2-3.52 6.656-1.472 3.52-2.176 7.232-0.768 3.712-0.768 7.488 0 3.776 0.768 7.488 0.704 3.712 2.176 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.76 2.688 2.752 5.76 4.8 3.2 2.112 6.72 3.584 3.456 1.472 7.168 2.176 3.712 0.768 7.488 0.768 3.84 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.472 6.592-3.584 3.2-2.048 5.824-4.736 2.688-2.688 4.8-5.824 2.112-3.2 3.52-6.656 1.472-3.456 2.24-7.168 0.704-3.712 0.704-7.488 0-3.84-0.704-7.488-0.768-3.712-2.24-7.232-1.408-3.52-3.52-6.656-2.112-3.136-4.8-5.76-2.624-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704z" p-id="4238"></path></svg>', Nt = '<svg t="1722595535853" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M640 128H384c-170.496 0-256 85.504-256 256v256c0 170.496 85.504 256 256 256h256c170.496 0 256-85.504 256-256V384c0-170.496-85.504-256-256-256z m67.584 302.592c-2.048 4.608-4.608 8.704-8.192 12.288L506.88 634.88c-3.584 3.584-7.68 6.144-12.288 8.192-4.608 2.048-9.728 3.072-14.848 3.072s-10.24-1.024-14.848-3.072c-4.608-2.048-8.704-4.608-12.288-8.192l-96.256-96.256c-3.584-3.584-6.144-7.68-8.192-12.288-2.048-4.608-3.072-9.728-3.072-14.848 0-2.56 0-5.12 1.024-7.68 0.512-2.56 1.024-5.12 2.048-7.168 1.024-2.56 2.048-4.608 3.584-6.656 1.536-2.048 3.072-4.096 4.608-5.632 1.536-2.048 3.584-3.584 5.632-4.608 2.048-1.536 4.096-2.56 6.656-3.584 2.56-1.024 4.608-1.536 7.168-2.048 2.56-0.512 5.12-0.512 7.68-0.512 5.12 0 10.24 1.024 14.848 3.072 4.608 2.048 8.704 4.608 12.288 8.192l69.12 68.608L645.12 389.12c3.584-3.584 7.68-6.144 12.288-8.192 4.608-2.048 9.728-3.072 14.848-3.072 2.56 0 5.12 0 7.68 0.512s5.12 1.024 7.168 2.048c2.56 1.024 4.608 2.048 6.656 3.584 2.048 1.536 4.096 3.072 5.632 4.608 1.536 1.536 3.584 3.584 4.608 5.632 1.536 2.048 2.56 4.096 3.584 6.656 1.024 2.56 1.536 4.608 2.048 7.168 0.512 2.56 1.024 5.12 1.024 7.68 0 5.12-1.024 10.24-3.072 14.848z" p-id="4552"></path></svg>', kt = '<svg t="1724122044148" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M707.648 401.28L489.28 560.704l22.656 30.976 22.656-30.976L316.16 401.216q-3.072-2.24-6.464-3.84-3.456-1.536-7.104-2.432-3.712-0.896-7.488-1.088-3.776-0.128-7.488 0.448-3.776 0.64-7.296 1.92-3.584 1.28-6.784 3.2-3.2 1.984-6.016 4.544-2.816 2.56-5.056 5.632-2.176 3.072-3.84 6.464-1.536 3.456-2.432 7.104-0.896 3.712-1.088 7.488-0.128 3.776 0.448 7.488 0.64 3.776 1.92 7.296 1.28 3.584 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992l218.368 159.552q4.928 3.584 10.752 5.504 5.76 1.92 11.904 1.92 6.08 0 11.904-1.92 5.76-1.92 10.752-5.504l218.368-159.552q3.008-2.24 5.568-4.992 2.56-2.816 4.544-6.016 1.92-3.2 3.264-6.784 1.28-3.52 1.92-7.296 0.576-3.712 0.384-7.488-0.128-3.84-1.024-7.488-0.896-3.648-2.496-7.04-1.6-3.456-3.84-6.528-2.24-3.072-4.992-5.632-2.816-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.584-1.28-7.296-1.856-3.712-0.64-7.488-0.448-3.84 0.192-7.488 1.088-3.648 0.896-7.04 2.496-3.456 1.536-6.528 3.84z m61.056 30.976q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.472-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.72-3.584-3.456-1.408-7.168-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.656 3.584-3.136 2.112-5.76 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.584 6.656-1.408 3.52-2.176 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.176 7.168 1.472 3.52 3.584 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.168-2.176 3.52-1.408 6.656-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.048-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z m-436.736 0q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.408-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.592 3.584-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.24 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.24 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z" p-id="4552"></path></svg>',
|
|
2995
|
+
const qt = '<svg t="1724122015492" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4237" width="32" height="32"><path d="M401.472 316.992l159.04 217.664L591.488 512l-30.976-22.656-159.04 217.728q-2.24 3.008-3.84 6.464-1.6 3.456-2.496 7.104-0.896 3.648-1.024 7.424-0.192 3.84 0.384 7.552 0.64 3.712 1.92 7.296 1.28 3.52 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992 3.072 2.24 6.464 3.84 3.456 1.6 7.168 2.496 3.648 0.896 7.424 1.024 3.776 0.192 7.488-0.448 3.776-0.576 7.296-1.856 3.584-1.28 6.784-3.264 3.2-1.92 6.016-4.48 2.816-2.56 5.056-5.632l159.04-217.728q3.584-4.928 5.504-10.752 1.92-5.76 1.92-11.904 0-6.08-1.92-11.904-1.92-5.76-5.504-10.752L463.488 271.68q-2.24-3.072-5.056-5.632-2.752-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.52-1.28-7.296-1.856-3.712-0.576-7.488-0.448-3.84 0.192-7.424 1.088-3.712 0.896-7.168 2.496-3.392 1.6-6.4 3.84-3.136 2.176-5.696 4.992-2.56 2.752-4.48 6.016-1.984 3.2-3.264 6.784-1.28 3.52-1.92 7.296-0.576 3.712-0.384 7.488 0.128 3.84 1.024 7.488 0.896 3.648 2.496 7.04 1.6 3.456 3.84 6.528z m30.976-61.056q-3.776 0-7.488 0.704-3.712 0.768-7.168 2.24-3.52 1.408-6.656 3.52-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.176 7.232-0.768 3.712-0.768 7.488 0 3.776 0.768 7.488 0.704 3.712 2.176 7.232 1.408 3.456 3.52 6.592 2.112 3.2 4.8 5.824 2.688 2.688 5.76 4.8 3.2 2.112 6.72 3.52 3.456 1.472 7.168 2.176 3.712 0.768 7.488 0.768 3.84 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.656 1.472-3.52 2.24-7.232 0.704-3.712 0.704-7.488 0-3.84-0.704-7.488-0.768-3.712-2.24-7.232-1.408-3.456-3.52-6.592-2.112-3.2-4.8-5.824-2.624-2.688-5.76-4.8-3.2-2.112-6.656-3.52-3.52-1.472-7.232-2.24Q436.224 256 432.448 256z m0 435.392q-3.776 0-7.488 0.704-3.712 0.768-7.168 2.176-3.52 1.472-6.656 3.584-3.2 2.112-5.824 4.736-2.688 2.688-4.8 5.824-2.112 3.2-3.52 6.656-1.472 3.52-2.176 7.232-0.768 3.712-0.768 7.488 0 3.776 0.768 7.488 0.704 3.712 2.176 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.76 2.688 2.752 5.76 4.8 3.2 2.112 6.72 3.584 3.456 1.472 7.168 2.176 3.712 0.768 7.488 0.768 3.84 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.472 6.592-3.584 3.2-2.048 5.824-4.736 2.688-2.688 4.8-5.824 2.112-3.2 3.52-6.656 1.472-3.456 2.24-7.168 0.704-3.712 0.704-7.488 0-3.84-0.704-7.488-0.768-3.712-2.24-7.232-1.408-3.52-3.52-6.656-2.112-3.136-4.8-5.76-2.624-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704z" p-id="4238"></path></svg>', Nt = '<svg t="1722595535853" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M640 128H384c-170.496 0-256 85.504-256 256v256c0 170.496 85.504 256 256 256h256c170.496 0 256-85.504 256-256V384c0-170.496-85.504-256-256-256z m67.584 302.592c-2.048 4.608-4.608 8.704-8.192 12.288L506.88 634.88c-3.584 3.584-7.68 6.144-12.288 8.192-4.608 2.048-9.728 3.072-14.848 3.072s-10.24-1.024-14.848-3.072c-4.608-2.048-8.704-4.608-12.288-8.192l-96.256-96.256c-3.584-3.584-6.144-7.68-8.192-12.288-2.048-4.608-3.072-9.728-3.072-14.848 0-2.56 0-5.12 1.024-7.68 0.512-2.56 1.024-5.12 2.048-7.168 1.024-2.56 2.048-4.608 3.584-6.656 1.536-2.048 3.072-4.096 4.608-5.632 1.536-2.048 3.584-3.584 5.632-4.608 2.048-1.536 4.096-2.56 6.656-3.584 2.56-1.024 4.608-1.536 7.168-2.048 2.56-0.512 5.12-0.512 7.68-0.512 5.12 0 10.24 1.024 14.848 3.072 4.608 2.048 8.704 4.608 12.288 8.192l69.12 68.608L645.12 389.12c3.584-3.584 7.68-6.144 12.288-8.192 4.608-2.048 9.728-3.072 14.848-3.072 2.56 0 5.12 0 7.68 0.512s5.12 1.024 7.168 2.048c2.56 1.024 4.608 2.048 6.656 3.584 2.048 1.536 4.096 3.072 5.632 4.608 1.536 1.536 3.584 3.584 4.608 5.632 1.536 2.048 2.56 4.096 3.584 6.656 1.024 2.56 1.536 4.608 2.048 7.168 0.512 2.56 1.024 5.12 1.024 7.68 0 5.12-1.024 10.24-3.072 14.848z" p-id="4552"></path></svg>', kt = '<svg t="1724122044148" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M707.648 401.28L489.28 560.704l22.656 30.976 22.656-30.976L316.16 401.216q-3.072-2.24-6.464-3.84-3.456-1.536-7.104-2.432-3.712-0.896-7.488-1.088-3.776-0.128-7.488 0.448-3.776 0.64-7.296 1.92-3.584 1.28-6.784 3.2-3.2 1.984-6.016 4.544-2.816 2.56-5.056 5.632-2.176 3.072-3.84 6.464-1.536 3.456-2.432 7.104-0.896 3.712-1.088 7.488-0.128 3.776 0.448 7.488 0.64 3.776 1.92 7.296 1.28 3.584 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992l218.368 159.552q4.928 3.584 10.752 5.504 5.76 1.92 11.904 1.92 6.08 0 11.904-1.92 5.76-1.92 10.752-5.504l218.368-159.552q3.008-2.24 5.568-4.992 2.56-2.816 4.544-6.016 1.92-3.2 3.264-6.784 1.28-3.52 1.92-7.296 0.576-3.712 0.384-7.488-0.128-3.84-1.024-7.488-0.896-3.648-2.496-7.04-1.6-3.456-3.84-6.528-2.24-3.072-4.992-5.632-2.816-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.584-1.28-7.296-1.856-3.712-0.64-7.488-0.448-3.84 0.192-7.488 1.088-3.648 0.896-7.04 2.496-3.456 1.536-6.528 3.84z m61.056 30.976q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.472-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.72-3.584-3.456-1.408-7.168-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.656 3.584-3.136 2.112-5.76 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.584 6.656-1.408 3.52-2.176 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.176 7.168 1.472 3.52 3.584 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.168-2.176 3.52-1.408 6.656-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.048-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z m-436.736 0q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.408-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.592 3.584-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.24 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.24 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z" p-id="4552"></path></svg>', Rt = '<svg t="1755138507987" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5079" width="200" height="200"><path d="M512 938.688a42.688 42.688 0 0 1-35.072-18.432l-192-277.312A42.56 42.56 0 0 1 320 576h384a42.752 42.752 0 0 1 35.072 66.944l-192 277.312a42.688 42.688 0 0 1-35.072 18.432" fill="currentColor" p-id="2016"></path><path d="M704 448H320a42.752 42.752 0 0 1-35.072-66.944l192-277.312c16-23.04 54.208-23.04 70.144 0l192 277.312A42.56 42.56 0 0 1 704 448" fill="currentColor" p-id="2015"></path></svg>', _e = Rt.replace('fill="currentColor" p-id="2016"', 'fill="#bec4c7" p-id="2016"'), Se = Rt.replace('fill="currentColor" p-id="2015"', 'fill="#bec4c7" p-id="2015"');
|
|
2996
2996
|
class Te {
|
|
2997
2997
|
constructor(t) {
|
|
2998
2998
|
n(this, "ctx");
|
|
@@ -3083,7 +3083,7 @@ class Te {
|
|
|
3083
3083
|
{
|
|
3084
3084
|
name: "sort-default",
|
|
3085
3085
|
configName: "SORTABLE_ICON_SVG",
|
|
3086
|
-
svg:
|
|
3086
|
+
svg: Rt,
|
|
3087
3087
|
color: "#bec4c7"
|
|
3088
3088
|
}
|
|
3089
3089
|
]);
|
|
@@ -3800,7 +3800,7 @@ class Le {
|
|
|
3800
3800
|
loadingElement: c,
|
|
3801
3801
|
contextMenuElement: d
|
|
3802
3802
|
} = t;
|
|
3803
|
-
this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = o, this.overlayerElement = r, this.editorElement = a, this.emptyElement = l, this.loadingElement = c, this.contextMenuElement = d, this.config = new Dt(e.config || {}), this.eventBus = new
|
|
3803
|
+
this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = o, this.overlayerElement = r, this.editorElement = a, this.emptyElement = l, this.loadingElement = c, this.contextMenuElement = d, this.config = new Dt(e.config || {}), this.eventBus = new Ie(), this.eventBrowser = new Re(this), this.eventTable = new Oe(this), this.paint = new ve(this.canvasElement), this.database = new ye(this, e), this.history = new be(this), this.icons = new Te(this);
|
|
3804
3804
|
}
|
|
3805
3805
|
setConfig(t) {
|
|
3806
3806
|
this.config = new Dt(t);
|
|
@@ -4697,8 +4697,8 @@ class De {
|
|
|
4697
4697
|
width: this.width,
|
|
4698
4698
|
height: this.data.length ? 0 : l + m
|
|
4699
4699
|
});
|
|
4700
|
-
const
|
|
4701
|
-
this.ctx.canvasElement.setAttribute("style", `height:${
|
|
4700
|
+
const R = Math.round(t.width / y * 1e4) / 1e4, I = Math.round(t.height / y * 1e4) / 1e4;
|
|
4701
|
+
this.ctx.canvasElement.setAttribute("style", `height:${I}px;width:${R}px;`), this.ctx.paint.scale(y);
|
|
4702
4702
|
}
|
|
4703
4703
|
// 调整行的高度
|
|
4704
4704
|
initResizeRow() {
|
|
@@ -5308,14 +5308,14 @@ class ke {
|
|
|
5308
5308
|
for (let C = 0; C <= r.length - 1; C++) {
|
|
5309
5309
|
const b = r[C].length;
|
|
5310
5310
|
for (let y = 0; y <= b - 1; y++) {
|
|
5311
|
-
const v = C + e, _ = y + i, S = r[C][y],
|
|
5311
|
+
const v = C + e, _ = y + i, S = r[C][y], R = this.ctx.database.getItemValueForRowIndexAndColIndex(
|
|
5312
5312
|
v,
|
|
5313
5313
|
_
|
|
5314
5314
|
);
|
|
5315
|
-
if (
|
|
5316
|
-
const { rowKey:
|
|
5317
|
-
this.ctx.database.getReadonly(
|
|
5318
|
-
rowKey:
|
|
5315
|
+
if (R) {
|
|
5316
|
+
const { rowKey: I, key: T } = R;
|
|
5317
|
+
this.ctx.database.getReadonly(I, T) || (s.add(I), w.push({
|
|
5318
|
+
rowKey: I,
|
|
5319
5319
|
key: T,
|
|
5320
5320
|
value: S,
|
|
5321
5321
|
row: {}
|
|
@@ -5424,9 +5424,9 @@ class ke {
|
|
|
5424
5424
|
_ > l.visibleHeight && (_ = l.visibleHeight);
|
|
5425
5425
|
let S = 0;
|
|
5426
5426
|
x && (u === "top" ? v = r.height + a.height - w : S = a.visibleHeight);
|
|
5427
|
-
const
|
|
5428
|
-
let
|
|
5429
|
-
y > 0 && !C ?
|
|
5427
|
+
const R = w + _ - (t - S - f);
|
|
5428
|
+
let I = c, T = d;
|
|
5429
|
+
y > 0 && !C ? I = Math.floor(c + y) : b > 0 && !C && (I = Math.floor(c - b)), v > 0 ? T = Math.floor(d - v) : R > 0 && (T = Math.floor(d + R)), (Math.abs(c - I) > 2 || Math.abs(d - T) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(I, T), this.ctx.emit("adjustBoundaryPosition", i));
|
|
5430
5430
|
}
|
|
5431
5431
|
destroy() {
|
|
5432
5432
|
}
|
|
@@ -5491,14 +5491,14 @@ class Xe {
|
|
|
5491
5491
|
r = [Math.max(w, b), Math.min(E, y)], a = [Math.max(p, v), Math.min(C, _)];
|
|
5492
5492
|
const { BEFORE_SET_AUTOFILL_METHOD: S } = this.ctx.config;
|
|
5493
5493
|
if (typeof S == "function") {
|
|
5494
|
-
const
|
|
5494
|
+
const I = S({
|
|
5495
5495
|
focusCell: this.ctx.focusCell,
|
|
5496
5496
|
xArr: r,
|
|
5497
5497
|
yArr: a
|
|
5498
5498
|
});
|
|
5499
|
-
if (!
|
|
5499
|
+
if (!I)
|
|
5500
5500
|
return;
|
|
5501
|
-
r =
|
|
5501
|
+
r = I.xArr, a = I.yArr;
|
|
5502
5502
|
}
|
|
5503
5503
|
this.ctx.autofill.xArr = r, this.ctx.autofill.yArr = a, this.ctx.emit("setAutofill", this.ctx.autofill), this.ctx.emit("draw");
|
|
5504
5504
|
}
|
|
@@ -5596,7 +5596,7 @@ function it(h) {
|
|
|
5596
5596
|
function Jt(h) {
|
|
5597
5597
|
return h === "x" ? "y" : "x";
|
|
5598
5598
|
}
|
|
5599
|
-
function
|
|
5599
|
+
function It(h) {
|
|
5600
5600
|
return h === "y" ? "height" : "width";
|
|
5601
5601
|
}
|
|
5602
5602
|
const Ke = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
@@ -5608,7 +5608,7 @@ function vt(h) {
|
|
|
5608
5608
|
}
|
|
5609
5609
|
function Fe(h, t, e) {
|
|
5610
5610
|
e === void 0 && (e = !1);
|
|
5611
|
-
const i = it(h), s = vt(h), o =
|
|
5611
|
+
const i = it(h), s = vt(h), o = It(s);
|
|
5612
5612
|
let r = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
|
|
5613
5613
|
return t.reference[o] > t.floating[o] && (r = lt(r)), [r, lt(r)];
|
|
5614
5614
|
}
|
|
@@ -5680,7 +5680,7 @@ function Kt(h, t, e) {
|
|
|
5680
5680
|
reference: i,
|
|
5681
5681
|
floating: s
|
|
5682
5682
|
} = h;
|
|
5683
|
-
const o = V(t), r = vt(t), a =
|
|
5683
|
+
const o = V(t), r = vt(t), a = It(r), l = $(t), c = o === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, x = i[a] / 2 - s[a] / 2;
|
|
5684
5684
|
let u;
|
|
5685
5685
|
switch (l) {
|
|
5686
5686
|
case "top":
|
|
@@ -5850,10 +5850,10 @@ const je = (h) => ({
|
|
|
5850
5850
|
const f = Qt(d), x = {
|
|
5851
5851
|
x: e,
|
|
5852
5852
|
y: i
|
|
5853
|
-
}, u = vt(s), g =
|
|
5853
|
+
}, u = vt(s), g = It(u), m = await r.getDimensions(c), w = u === "y", E = w ? "top" : "left", p = w ? "bottom" : "right", C = w ? "clientHeight" : "clientWidth", b = o.reference[g] + o.reference[u] - x[u] - o.floating[g], y = x[u] - o.reference[u], v = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
|
|
5854
5854
|
let _ = v ? v[C] : 0;
|
|
5855
5855
|
(!_ || !await (r.isElement == null ? void 0 : r.isElement(v))) && (_ = a.floating[C] || o.floating[g]);
|
|
5856
|
-
const S = b / 2 - y / 2,
|
|
5856
|
+
const S = b / 2 - y / 2, R = _ / 2 - m[g] / 2 - 1, I = j(f[E], R), T = j(f[p], R), O = I, M = _ - m[g] - T, L = _ / 2 - m[g] / 2 + S, A = Et(O, L, M), D = !l.arrow && it(s) != null && L !== A && o.reference[g] / 2 - (L < O ? I : T) - m[g] / 2 < 0, H = D ? L < O ? L - O : L - M : 0;
|
|
5857
5857
|
return {
|
|
5858
5858
|
[u]: x[u] + H,
|
|
5859
5859
|
data: {
|
|
@@ -5892,36 +5892,36 @@ const je = (h) => ({
|
|
|
5892
5892
|
return {};
|
|
5893
5893
|
const E = $(s), p = V(a), C = $(a) === a, b = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), y = x || (C || !m ? [lt(a)] : We(a)), v = g !== "none";
|
|
5894
5894
|
!x && v && y.push(...$e(a, m, g, b));
|
|
5895
|
-
const _ = [a, ...y], S = await te(t, w),
|
|
5896
|
-
let
|
|
5897
|
-
if (d &&
|
|
5895
|
+
const _ = [a, ...y], S = await te(t, w), R = [];
|
|
5896
|
+
let I = ((i = o.flip) == null ? void 0 : i.overflows) || [];
|
|
5897
|
+
if (d && R.push(S[E]), f) {
|
|
5898
5898
|
const L = Fe(s, r, b);
|
|
5899
|
-
|
|
5899
|
+
R.push(S[L[0]], S[L[1]]);
|
|
5900
5900
|
}
|
|
5901
|
-
if (
|
|
5901
|
+
if (I = [...I, {
|
|
5902
5902
|
placement: s,
|
|
5903
|
-
overflows:
|
|
5904
|
-
}], !
|
|
5903
|
+
overflows: R
|
|
5904
|
+
}], !R.every((L) => L <= 0)) {
|
|
5905
5905
|
var T, O;
|
|
5906
5906
|
const L = (((T = o.flip) == null ? void 0 : T.index) || 0) + 1, A = _[L];
|
|
5907
5907
|
if (A && (!(f === "alignment" ? p !== V(A) : !1) || // We leave the current main axis only if every placement on that axis
|
|
5908
5908
|
// overflows the main axis.
|
|
5909
|
-
|
|
5909
|
+
I.every((k) => V(k.placement) === p ? k.overflows[0] > 0 : !0)))
|
|
5910
5910
|
return {
|
|
5911
5911
|
data: {
|
|
5912
5912
|
index: L,
|
|
5913
|
-
overflows:
|
|
5913
|
+
overflows: I
|
|
5914
5914
|
},
|
|
5915
5915
|
reset: {
|
|
5916
5916
|
placement: A
|
|
5917
5917
|
}
|
|
5918
5918
|
};
|
|
5919
|
-
let D = (O =
|
|
5919
|
+
let D = (O = I.filter((H) => H.overflows[0] <= 0).sort((H, k) => H.overflows[1] - k.overflows[1])[0]) == null ? void 0 : O.placement;
|
|
5920
5920
|
if (!D)
|
|
5921
5921
|
switch (u) {
|
|
5922
5922
|
case "bestFit": {
|
|
5923
5923
|
var M;
|
|
5924
|
-
const H = (M =
|
|
5924
|
+
const H = (M = I.filter((k) => {
|
|
5925
5925
|
if (v) {
|
|
5926
5926
|
const W = V(k.placement);
|
|
5927
5927
|
return W === p || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -6439,10 +6439,10 @@ const bi = async function(h) {
|
|
|
6439
6439
|
}
|
|
6440
6440
|
};
|
|
6441
6441
|
};
|
|
6442
|
-
function
|
|
6442
|
+
function Ri(h) {
|
|
6443
6443
|
return B(h).direction === "rtl";
|
|
6444
6444
|
}
|
|
6445
|
-
const
|
|
6445
|
+
const Ii = {
|
|
6446
6446
|
convertOffsetParentRelativeRectToViewportRelativeRect: fi,
|
|
6447
6447
|
getDocumentElement: F,
|
|
6448
6448
|
getClippingRect: pi,
|
|
@@ -6452,7 +6452,7 @@ const Ri = {
|
|
|
6452
6452
|
getDimensions: Ci,
|
|
6453
6453
|
getScale: U,
|
|
6454
6454
|
isElement: X,
|
|
6455
|
-
isRTL:
|
|
6455
|
+
isRTL: Ri
|
|
6456
6456
|
};
|
|
6457
6457
|
function le(h, t) {
|
|
6458
6458
|
return h.x === t.x && h.y === t.y && h.width === t.width && h.height === t.height;
|
|
@@ -6541,7 +6541,7 @@ function yt(h, t, e, i) {
|
|
|
6541
6541
|
}
|
|
6542
6542
|
const ht = Qe, dt = ti, Lt = qe, _i = je, ft = (h, t, e) => {
|
|
6543
6543
|
const i = /* @__PURE__ */ new Map(), s = {
|
|
6544
|
-
platform:
|
|
6544
|
+
platform: Ii,
|
|
6545
6545
|
...e
|
|
6546
6546
|
}, o = {
|
|
6547
6547
|
...s.platform,
|
|
@@ -6793,9 +6793,7 @@ class Ti {
|
|
|
6793
6793
|
return !(e < o || e > r || t < a || t > l);
|
|
6794
6794
|
}
|
|
6795
6795
|
initTextEditor() {
|
|
6796
|
-
this.inputEl = document.createElement("textarea"), this.inputEl.setAttribute("rows", "1"), this.inputEl.setAttribute("tabindex", "-1"), this.inputEl.addEventListener("input", this.autoSize.bind(this)), this.inputEl.
|
|
6797
|
-
this.doneEdit();
|
|
6798
|
-
}), this.editorEl = this.ctx.editorElement, this.inputEl.className = "e-virt-table-editor-textarea", this.editorEl.appendChild(this.inputEl), this.ctx.containerElement.appendChild(this.editorEl);
|
|
6796
|
+
this.inputEl = document.createElement("textarea"), this.inputEl.id = "e-virt-table-editor-textarea", this.inputEl.setAttribute("rows", "1"), this.inputEl.setAttribute("tabindex", "-1"), this.inputEl.addEventListener("input", this.autoSize.bind(this)), this.editorEl = this.ctx.editorElement, this.inputEl.className = "e-virt-table-editor-textarea", this.editorEl.appendChild(this.inputEl), this.ctx.containerElement.appendChild(this.editorEl);
|
|
6799
6797
|
}
|
|
6800
6798
|
autoSize() {
|
|
6801
6799
|
this.inputEl.style.height = "auto";
|
|
@@ -6821,7 +6819,7 @@ class Ti {
|
|
|
6821
6819
|
header: d
|
|
6822
6820
|
} = this.ctx;
|
|
6823
6821
|
let f = this.ctx.body.visibleHeight;
|
|
6824
|
-
o > f && (o = f), this.editorEl.style.display = "inline-block", this.editorEl.style.zIndex = "100", this.editorEl.style.left = `${this.drawX - 1}px`, this.editorEl.style.top = `${this.drawY - 1}px`, this.editorEl.style.bottom = "auto", this.editorEl.style.maxHeight = `${f}px`, s === "text" ? (this.inputEl.style.display = "block", this.inputEl.style.minWidth = `${r - 1}px`, this.inputEl.style.minHeight = `${o - 1}px`, this.inputEl.style.maxHeight = `${f}px`, this.inputEl.style.width = `${r - 1}px`, this.inputEl.style.height = "auto", this.inputEl.style.padding = `${c}px`, this.inputEl.value = "", i !== null && (this.inputEl.value = i)) : this.
|
|
6822
|
+
o > f && (o = f), this.editorEl.style.display = "inline-block", this.editorEl.style.zIndex = "100", this.editorEl.style.left = `${this.drawX - 1}px`, this.editorEl.style.top = `${this.drawY - 1}px`, this.editorEl.style.bottom = "auto", this.editorEl.style.maxHeight = `${f}px`, s === "text" ? (this.inputEl.style.display = "inline-block", this.inputEl.style.minWidth = `${r - 1}px`, this.inputEl.style.minHeight = `${o - 1}px`, this.inputEl.style.maxHeight = `${f}px`, this.inputEl.style.width = `${r - 1}px`, this.inputEl.style.height = "auto", this.inputEl.style.padding = `${c}px`, this.inputEl.value = "", i !== null && (this.inputEl.value = i)) : this.inputEl.style.display = "none", (this.inputEl.scrollHeight > o || this.drawY < d.height) && this.autoSize();
|
|
6825
6823
|
}
|
|
6826
6824
|
doneEditByInput() {
|
|
6827
6825
|
if (this.cellTarget && this.cellTarget.editorType === "text") {
|
|
@@ -6855,7 +6853,9 @@ class Ti {
|
|
|
6855
6853
|
o && !l && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = o, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget), this.ctx.emit("drawView"));
|
|
6856
6854
|
}
|
|
6857
6855
|
doneEdit() {
|
|
6858
|
-
this.enable && (this.doneEditByInput(), this.ctx.emit("doneEdit", this.cellTarget), this.enable = !1, this.ctx.editing = !1, this.inputEl.
|
|
6856
|
+
this.enable && (this.doneEditByInput(), this.ctx.emit("doneEdit", this.cellTarget), this.enable = !1, this.ctx.editing = !1, this.inputEl.style.display = "inline-block", this.editorEl.style.zIndex = "-1", setTimeout(() => {
|
|
6857
|
+
this.inputEl.focus({ preventScroll: !0 });
|
|
6858
|
+
}, 0), this.ctx.emit("draw"));
|
|
6859
6859
|
}
|
|
6860
6860
|
clearEditor() {
|
|
6861
6861
|
this.doneEdit(), this.cellTarget = null, this.selectorArrStr = "", this.ctx.clearSelector(), this.ctx.focusCell = void 0, this.ctx.emit("draw");
|
|
@@ -7380,19 +7380,19 @@ class Mi {
|
|
|
7380
7380
|
onClick: (C, b) => {
|
|
7381
7381
|
const { xArr: y } = this.ctx.selector, [v, _] = y;
|
|
7382
7382
|
if (b === "fixedLeft" || b === "fixedRight" || b === "fixedNone") {
|
|
7383
|
-
const S = this.ctx.header.allCellHeaders.filter((
|
|
7383
|
+
const S = this.ctx.header.allCellHeaders.filter((R) => R.colIndex >= v && R.colIndex <= _).filter((R) => R.level === 0).filter((R) => !R.column.fixedDisabled).map((R) => R.key);
|
|
7384
7384
|
this.ctx.database.setCustomHeaderFixedData(
|
|
7385
7385
|
S,
|
|
7386
7386
|
b === "fixedLeft" ? "left" : b === "fixedRight" ? "right" : ""
|
|
7387
7387
|
), this.hide();
|
|
7388
7388
|
} else if (b === "hide") {
|
|
7389
|
-
const S = this.ctx.header.leafCellHeaders.filter((
|
|
7389
|
+
const S = this.ctx.header.leafCellHeaders.filter((R) => R.colIndex >= v && R.colIndex <= _).filter((R) => !R.children.length).filter((R) => !R.column.hideDisabled).map((R) => R.key);
|
|
7390
7390
|
S.length > 0 && this.ctx.database.setCustomHeaderHideData(S, !0), this.hide();
|
|
7391
7391
|
} else if (b !== "visible") if (b.startsWith("visible_")) {
|
|
7392
7392
|
const S = b.replace("visible_", "");
|
|
7393
7393
|
this.ctx.database.setCustomHeaderHideData([S], !1), this.currentDOMTreeMenu && this.currentDOMTreeMenu.removeSubMenuItem(b);
|
|
7394
|
-
const
|
|
7395
|
-
Q(
|
|
7394
|
+
const R = this.ctx.database.getColumns();
|
|
7395
|
+
Q(R).filter((O) => O.hide).length === 0 && this.hide();
|
|
7396
7396
|
} else b === "resetHeader" && (this.ctx.database.resetCustomHeader(), this.hide());
|
|
7397
7397
|
}
|
|
7398
7398
|
}), this.positionMenu(e);
|