e-virt-table 1.2.19 → 1.2.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 +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +458 -468
- 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/Database.d.ts +2 -2
- package/dist/lib/Database.js +25 -64
- package/dist/lib/Database.js.map +1 -1
- package/dist/lib/EVirtTable.d.ts +3 -3
- package/dist/lib/EVirtTable.js +6 -6
- package/dist/lib/EVirtTable.js.map +1 -1
- package/dist/lib/History.js +2 -2
- package/dist/lib/History.js.map +1 -1
- package/dist/lib/Validator.js +3 -0
- package/dist/lib/Validator.js.map +1 -1
- package/dist/lib/types.d.ts +9 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(":root{--evt-header-font: 12px normal Arial;--evt-body-font: 12px normal Arial;--evt-color-white: #fff;--evt-color-black: #000000;--evt-color-primary: rgb(82, 146, 247);--evt-text-color-primary: #333;--evt-text-color-regular: #666;--evt-text-color-secondary: #999;--evt-box-shadow: 0 2px 12px 0 #0000001a;--evt-editor-bg-color: #fff;--evt-editor-text-color: #333;--evt-border-color: #e1e6eb;--evt-stripe-color: #fafafa;--evt-placeholder-color: #cdd0dc;--evt-header-bg-color: #f8faff;--evt-body-bg-color: #fff;--evt-header-text-color: #1d2129;--evt-body-text-color: #4e5969;--evt-footer-text-color: #4e5969;--evt-loading-icon-color: #4e5969;--evt-expand-icon-color: #4e5969;--evt-shrink-icon-color: #4e5969;--evt-error-tip-icon-color: red;--evt-cell-hover-icon-bg-color: #fff;--evt-cell-hover-icon-border-color: #dde0ea;--evt-scroller-color: #dee0e3;--evt-scroller-track-color: #fff;--evt-scroller-focus-color: #bbbec4;--evt-select-border-color: var(--evt-color-primary);--evt-select-area-color: rgba(82, 146, 247, .1);--evt-select-row-col-bg-color: transparent;--evt-autofill-point-border-color: #fff;--evt-edit-bg-color: #fcf6ed;--evt-checkbox-color: var(--evt-color-primary);--evt-readonly-color: #fff;--evt-readonly-text-color: var(--evt-body-text-color);--evt-error-tip-color: #ed3f14;--evt-footer-bg-color: #fafafa;--evt-highlight-hover-row-color: rgba(186, 203, 231, .1);--evt-highlight-selected-row-color: rgba(82, 146, 247, .1);--evt-tooltip-bg-color: #303133;--evt-tooltip-text-color: #fff;--evt-resize-row-line-color: #e1e6eb;--evt-resize-column-line-color: #e1e6eb}.dark{--evt-border-color: #363637;--evt-header-bg-color: #141414;--evt-body-bg-color: #141414;--evt-header-text-color: #a3a6ad;--evt-scroller-color: #414243;--evt-scroller-track-color: #141414;--evt-scroller-focus-color: #a3a6ad;--evt-edit-bg-color: #141414;--evt-readonly-text-color: #cfd3dc;--evt-footer-bg-color: #262727;--evt-autofill-point-border-color: #fff;--evt-editor-bg-color: #434343;--evt-editor-text-color: #cfd3dc}.e-virt-table-container{position:relative;outline:none}.e-virt-table-stage{position:relative;overflow:hidden;outline:none;box-sizing:border-box;z-index:10;border-radius:8px;border:1px solid var(--evt-border-color)}.e-virt-table-canvas{position:absolute;left:0;top:0;box-sizing:border-box;border:none;outline:none;z-index:10}.e-virt-table-editor{position:absolute;top:-10000px;left:-10000px;text-align:left;height:auto;line-height:0;z-index:100;overflow:hidden;background-color:var(--evt-editor-bg-color);border:2px solid var(--evt-color-primary);box-sizing:border-box;box-shadow:var(--evt-box-shadow);display:flex;align-items:center}.e-virt-table-overlayer{position:absolute;left:0;top:0;overflow:hidden;z-index:100;pointer-events:none}.e-virt-table-editor-textarea{width:100%;box-sizing:border-box;outline:none;font-weight:400;padding:8px;font-size:12px;color:inherit;white-space:pre-wrap;word-wrap:break-word;word-break:break-all;line-height:1.5;margin:0;border:none;vertical-align:middle;background:var(--evt-editor-bg-color);color:var(--evt-editor-text-color);overflow-y:auto;resize:none}.e-virt-table-context-menu{position:absolute;font-size:14px;color:var(--evt-text-color-regular);background-color:var(--evt-color-white);border-radius:4px;border:1px solid #e4e7ed;box-shadow:var(--evt-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;color:var(--evt-text-color-regular)}.e-virt-table-context-menu-item:hover{color:var(--evt-color-primary);background-color:#f5f7fa}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var n = (c, t, e) =>
|
|
5
|
-
class
|
|
2
|
+
var ee = Object.defineProperty;
|
|
3
|
+
var ie = (c, t, e) => t in c ? ee(c, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[t] = e;
|
|
4
|
+
var n = (c, t, e) => ie(c, typeof t != "symbol" ? t + "" : t, e);
|
|
5
|
+
class se {
|
|
6
6
|
constructor(t) {
|
|
7
7
|
n(this, "rules");
|
|
8
8
|
this.rules = t;
|
|
@@ -31,6 +31,8 @@ class te {
|
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
+
if (!x.required && (h == null || h === ""))
|
|
35
|
+
return e;
|
|
34
36
|
x.pattern && !x.pattern.test(h) && e.push({
|
|
35
37
|
value: h,
|
|
36
38
|
column: i,
|
|
@@ -58,13 +60,13 @@ class te {
|
|
|
58
60
|
return e;
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
|
-
function
|
|
63
|
+
function Lt() {
|
|
62
64
|
return "xxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(c) {
|
|
63
65
|
const t = Math.random() * 16 | 0;
|
|
64
66
|
return (c === "x" ? t : t & 3 | 8).toString(16);
|
|
65
67
|
});
|
|
66
68
|
}
|
|
67
|
-
function
|
|
69
|
+
function Tt(c, t) {
|
|
68
70
|
let e = 0, i;
|
|
69
71
|
return function(...s) {
|
|
70
72
|
const o = (/* @__PURE__ */ new Date()).getTime(), r = o - e;
|
|
@@ -73,10 +75,10 @@ function Lt(c, t) {
|
|
|
73
75
|
}, t - r));
|
|
74
76
|
};
|
|
75
77
|
}
|
|
76
|
-
function
|
|
77
|
-
return c.length ? c.map((t) =>
|
|
78
|
+
function At(c = []) {
|
|
79
|
+
return c.length ? c.map((t) => At(t.children) + 1).sort((t, e) => e - t)[0] : 0;
|
|
78
80
|
}
|
|
79
|
-
function
|
|
81
|
+
function oe(c = []) {
|
|
80
82
|
let t = [], e = [], i = [];
|
|
81
83
|
return c.forEach((s) => {
|
|
82
84
|
s.fixed === "left" ? t.push(s) : s.fixed === "right" ? i.push(s) : e.push(s);
|
|
@@ -86,14 +88,14 @@ function ee(c = []) {
|
|
|
86
88
|
...i.sort((s, o) => (s.sort ?? 0) - (o.sort ?? 0))
|
|
87
89
|
];
|
|
88
90
|
}
|
|
89
|
-
function
|
|
91
|
+
function Mt(c = [], t = 1, e = 0) {
|
|
90
92
|
return c.map((i) => {
|
|
91
93
|
if (i.children) {
|
|
92
94
|
let s = 0, o = i.fixed;
|
|
93
95
|
i.children.forEach((l) => {
|
|
94
96
|
l.fixed = o;
|
|
95
97
|
});
|
|
96
|
-
const r =
|
|
98
|
+
const r = Mt(i.children, t - 1, e + 1);
|
|
97
99
|
return r && r.forEach((l) => {
|
|
98
100
|
s += l.colspan ?? 0;
|
|
99
101
|
}), {
|
|
@@ -119,17 +121,17 @@ function et(c = []) {
|
|
|
119
121
|
e.children ? t = t.concat(et(e.children)) : t.push(e);
|
|
120
122
|
}), t;
|
|
121
123
|
}
|
|
122
|
-
const
|
|
123
|
-
function
|
|
124
|
+
const Et = /^(\r\n|\n\r|\r|\n)/, re = /^[^\t\r\n]+/, mt = /^\t/;
|
|
125
|
+
function ne(c) {
|
|
124
126
|
let t = [[""]];
|
|
125
127
|
if (c.length === 0)
|
|
126
128
|
return t;
|
|
127
129
|
let e = 0, i = 0, s;
|
|
128
130
|
for (; c.length > 0 && s !== c.length; )
|
|
129
|
-
if (s = c.length, c.match(
|
|
130
|
-
c = c.replace(
|
|
131
|
-
else if (c.match(
|
|
132
|
-
c = c.replace(
|
|
131
|
+
if (s = c.length, c.match(mt))
|
|
132
|
+
c = c.replace(mt, ""), e += 1, t[i][e] = "";
|
|
133
|
+
else if (c.match(Et))
|
|
134
|
+
c = c.replace(Et, ""), e = 0, i += 1, t[i] = [""];
|
|
133
135
|
else {
|
|
134
136
|
let o = "";
|
|
135
137
|
if (c.startsWith('"')) {
|
|
@@ -140,14 +142,14 @@ function se(c) {
|
|
|
140
142
|
}
|
|
141
143
|
o = o.replace(/^"/, "").replace(/"$/, "").replace(/["]*/g, (a) => new Array(Math.floor(a.length / 2)).fill('"').join(""));
|
|
142
144
|
} else {
|
|
143
|
-
const r = c.match(
|
|
145
|
+
const r = c.match(re);
|
|
144
146
|
o = r ? r[0] : "", c = c.slice(o.length);
|
|
145
147
|
}
|
|
146
148
|
t[i][e] = o;
|
|
147
149
|
}
|
|
148
150
|
return Array.isArray(t) && t.length > 1 && t[t.length - 1].length === 1 && t[t.length - 1][0] === "" && (t = t.slice(0, t.length - 1)), t;
|
|
149
151
|
}
|
|
150
|
-
function
|
|
152
|
+
function le(c) {
|
|
151
153
|
let t, e, i, s, o = "", r;
|
|
152
154
|
for (t = 0, e = c.length; t < e; t += 1) {
|
|
153
155
|
for (s = c[t].length, i = 0; i < s; i += 1)
|
|
@@ -158,7 +160,7 @@ function oe(c) {
|
|
|
158
160
|
}
|
|
159
161
|
return o;
|
|
160
162
|
}
|
|
161
|
-
function
|
|
163
|
+
function Ht(c, t, e = []) {
|
|
162
164
|
let i = 0;
|
|
163
165
|
const s = [];
|
|
164
166
|
return c.forEach((o, r) => {
|
|
@@ -170,15 +172,15 @@ function Mt(c, t, e = []) {
|
|
|
170
172
|
}
|
|
171
173
|
}), s;
|
|
172
174
|
}
|
|
173
|
-
function
|
|
175
|
+
function Dt(c, t) {
|
|
174
176
|
let e = "", i = "";
|
|
175
177
|
const s = {};
|
|
176
178
|
return t.forEach((o, r) => {
|
|
177
179
|
r === 0 ? (e = o.key, i = o.key, s[o.key] = 1) : c[o.key] === c[e] ? (s[o.key] = 0, s[i] += 1) : (s[o.key] = 1, e = o.key, i = o.key);
|
|
178
180
|
}), s;
|
|
179
181
|
}
|
|
180
|
-
function
|
|
181
|
-
const { visibleRows: i, rowIndex: s, headIndex: o } = c, r =
|
|
182
|
+
function ae(c, t, e = []) {
|
|
183
|
+
const { visibleRows: i, rowIndex: s, headIndex: o } = c, r = Ht(i, t, e);
|
|
182
184
|
return r[s - o] === 0 ? {
|
|
183
185
|
rowspan: 0,
|
|
184
186
|
colspan: 0,
|
|
@@ -191,10 +193,10 @@ function re(c, t, e = []) {
|
|
|
191
193
|
mergeRow: !0
|
|
192
194
|
};
|
|
193
195
|
}
|
|
194
|
-
function
|
|
196
|
+
function he(c, t = []) {
|
|
195
197
|
const { column: e, row: i, visibleLeafColumns: s } = c, o = s.filter((r) => t.includes(r.key));
|
|
196
198
|
if (t.includes(e.key)) {
|
|
197
|
-
const r =
|
|
199
|
+
const r = Dt(i, o);
|
|
198
200
|
return r[e.key] === 0 ? {
|
|
199
201
|
rowspan: 0,
|
|
200
202
|
colspan: 0,
|
|
@@ -208,11 +210,11 @@ function ne(c, t = []) {
|
|
|
208
210
|
};
|
|
209
211
|
}
|
|
210
212
|
}
|
|
211
|
-
function
|
|
213
|
+
function ce(c, t = document.documentElement) {
|
|
212
214
|
const e = c.startsWith("--") ? c : `--${c}`;
|
|
213
215
|
return getComputedStyle(t).getPropertyValue(e).trim();
|
|
214
216
|
}
|
|
215
|
-
class
|
|
217
|
+
class kt {
|
|
216
218
|
constructor(t, e, i, s, o, r, l) {
|
|
217
219
|
n(this, "ctx");
|
|
218
220
|
n(this, "x", 0);
|
|
@@ -258,7 +260,7 @@ class Dt {
|
|
|
258
260
|
getRightFixedX() {
|
|
259
261
|
}
|
|
260
262
|
}
|
|
261
|
-
class
|
|
263
|
+
class ft extends kt {
|
|
262
264
|
constructor(e, i, s, o, r, l, a, h, d, f = "body") {
|
|
263
265
|
super(e, o, r, l, a, f, h.fixed);
|
|
264
266
|
n(this, "formatter");
|
|
@@ -481,13 +483,13 @@ class ut extends Dt {
|
|
|
481
483
|
return;
|
|
482
484
|
}
|
|
483
485
|
let w = "transparent";
|
|
484
|
-
const E = this.ctx.hoverCell,
|
|
485
|
-
let
|
|
486
|
+
const E = this.ctx.hoverCell, y = this.ctx.currentCell;
|
|
487
|
+
let m = this.rowIndex, R = this.rowIndex;
|
|
486
488
|
if (this.rowspan !== 1 && (x || d)) {
|
|
487
489
|
const _ = this.getSpanInfo(), { yArr: S } = _;
|
|
488
|
-
|
|
490
|
+
m = S[0], R = S[1];
|
|
489
491
|
}
|
|
490
|
-
x && E && (E.rowKey === this.rowKey && (w = u), E.rowIndex >=
|
|
492
|
+
x && E && (E.rowKey === this.rowKey && (w = u), E.rowIndex >= m && E.rowIndex <= R && (w = u)), d && y && (y.rowKey === this.rowKey && (w = f), y.rowIndex >= m && y.rowIndex <= R && (w = f)), this.drawCellSkyBgColor = w;
|
|
491
493
|
let C = e, I = l;
|
|
492
494
|
if (this.ctx.database.getReadonly(this.rowKey, this.key) || (C = i, I = r), p && (this.rowIndex % 2 ? C = g : C = e), typeof s == "function") {
|
|
493
495
|
const _ = s, { backgroundColor: S, color: v } = _({
|
|
@@ -530,8 +532,8 @@ class ut extends Dt {
|
|
|
530
532
|
if (l.rowKey === this.rowKey && (a = this.drawX + this.width - s - o, h = this.drawY + (this.height - s) / 2), this.rowspan !== 1 && r) {
|
|
531
533
|
const f = this.getSpanInfo(), { yArr: x } = f, u = x[0], p = x[1];
|
|
532
534
|
if (l.rowIndex >= u && l.rowIndex <= p) {
|
|
533
|
-
const { width: g, height: w, offsetTop: E, offsetLeft:
|
|
534
|
-
a = this.drawX -
|
|
535
|
+
const { width: g, height: w, offsetTop: E, offsetLeft: y } = f;
|
|
536
|
+
a = this.drawX - y + g - s - o, h = this.drawY - E + (w - s) / 2;
|
|
535
537
|
}
|
|
536
538
|
}
|
|
537
539
|
const d = this.ctx.icons.get(this.hoverIconName);
|
|
@@ -760,9 +762,9 @@ class ut extends Dt {
|
|
|
760
762
|
drawBorder(e) {
|
|
761
763
|
const { drawX: i, drawY: s, rowIndex: o, colIndex: r, height: l, width: a } = this;
|
|
762
764
|
let h = i, d = s;
|
|
763
|
-
const { xArr: f, yArr: x, lineDash: u = [], borderWidth: p = 1, borderColor: g, fillColor: w } = e, E = f[0],
|
|
764
|
-
if (r >= E && r <=
|
|
765
|
-
const C = r ===
|
|
765
|
+
const { xArr: f, yArr: x, lineDash: u = [], borderWidth: p = 1, borderColor: g, fillColor: w } = e, E = f[0], y = f[1], m = x[0], R = x[1];
|
|
766
|
+
if (r >= E && r <= y && o === m) {
|
|
767
|
+
const C = r === y ? 1 : 0, I = r === E ? 1 : 0;
|
|
766
768
|
this.ctx.paint.drawLine([h + I, d + 1, h + a - C, d + 1], {
|
|
767
769
|
borderColor: g,
|
|
768
770
|
fillColor: w,
|
|
@@ -772,8 +774,8 @@ class ut extends Dt {
|
|
|
772
774
|
lineDash: u
|
|
773
775
|
});
|
|
774
776
|
}
|
|
775
|
-
if (r ===
|
|
776
|
-
const C = o ===
|
|
777
|
+
if (r === y && o >= m && o <= R) {
|
|
778
|
+
const C = o === m ? 1 : 0, I = o === R ? 1 : 0;
|
|
777
779
|
this.ctx.paint.drawLine([h + a - 1, d + C, h + a - 1, d + l - I], {
|
|
778
780
|
borderColor: g,
|
|
779
781
|
fillColor: w,
|
|
@@ -783,8 +785,8 @@ class ut extends Dt {
|
|
|
783
785
|
lineDash: u
|
|
784
786
|
});
|
|
785
787
|
}
|
|
786
|
-
if (r >= E && r <=
|
|
787
|
-
const C = r ===
|
|
788
|
+
if (r >= E && r <= y && o === R) {
|
|
789
|
+
const C = r === y ? 1 : 0, I = r === E ? 1 : 0;
|
|
788
790
|
this.ctx.paint.drawLine([h + I, d + l - 1, h + a - C, d + l - 1], {
|
|
789
791
|
borderColor: g,
|
|
790
792
|
fillColor: w,
|
|
@@ -794,8 +796,8 @@ class ut extends Dt {
|
|
|
794
796
|
lineDash: u
|
|
795
797
|
});
|
|
796
798
|
}
|
|
797
|
-
if (r === E && o >=
|
|
798
|
-
const C = o === R ? 1 : 0, I = o ===
|
|
799
|
+
if (r === E && o >= m && o <= R) {
|
|
800
|
+
const C = o === R ? 1 : 0, I = o === m ? 1 : 0;
|
|
799
801
|
this.ctx.paint.drawLine([h + 1, d + I, h + 1, d + l - C], {
|
|
800
802
|
borderColor: g,
|
|
801
803
|
fillColor: w,
|
|
@@ -807,7 +809,7 @@ class ut extends Dt {
|
|
|
807
809
|
}
|
|
808
810
|
}
|
|
809
811
|
}
|
|
810
|
-
class
|
|
812
|
+
class de {
|
|
811
813
|
//虚拟滚动位置
|
|
812
814
|
constructor(t, e) {
|
|
813
815
|
n(this, "loading", !1);
|
|
@@ -866,17 +868,17 @@ class ae {
|
|
|
866
868
|
initData(t, e = 0, i = []) {
|
|
867
869
|
t.forEach((s, o) => {
|
|
868
870
|
var E;
|
|
869
|
-
const { ROW_KEY: r = "", DEFAULT_EXPAND_ALL: l, CELL_HEIGHT: a, SELECTABLE_METHOD: h, CHECKBOX_KEY: d } = this.ctx.config, f = s[r], x = f != null ? `${f}` :
|
|
871
|
+
const { ROW_KEY: r = "", DEFAULT_EXPAND_ALL: l, CELL_HEIGHT: a, SELECTABLE_METHOD: h, CHECKBOX_KEY: d } = this.ctx.config, f = s[r], x = f != null ? `${f}` : Lt();
|
|
870
872
|
this.itemRowKeyMap.set(s, x);
|
|
871
873
|
const u = s._height || a, p = s._readonly;
|
|
872
874
|
let g = !0;
|
|
873
875
|
if (typeof h == "function" && (g = h), d) {
|
|
874
|
-
const
|
|
875
|
-
if (this.checkboxKeyMap.has(
|
|
876
|
-
const
|
|
877
|
-
|
|
876
|
+
const y = s[d];
|
|
877
|
+
if (this.checkboxKeyMap.has(y)) {
|
|
878
|
+
const m = this.checkboxKeyMap.get(y) || [];
|
|
879
|
+
m.push(x), this.checkboxKeyMap.set(y, m);
|
|
878
880
|
} else
|
|
879
|
-
this.checkboxKeyMap.set(
|
|
881
|
+
this.checkboxKeyMap.set(y, [x]);
|
|
880
882
|
}
|
|
881
883
|
this.selectionMap.set(x, {
|
|
882
884
|
key: d ? s[d] : x,
|
|
@@ -1100,56 +1102,54 @@ class ae {
|
|
|
1100
1102
|
* @param history
|
|
1101
1103
|
* @returns
|
|
1102
1104
|
*/
|
|
1103
|
-
async batchSetItemValue(t, e = !1, i = !0) {
|
|
1104
|
-
let
|
|
1105
|
-
const
|
|
1106
|
-
let
|
|
1107
|
-
const { rowKey:
|
|
1108
|
-
let
|
|
1109
|
-
const
|
|
1110
|
-
return (
|
|
1111
|
-
...
|
|
1112
|
-
value:
|
|
1113
|
-
oldValue:
|
|
1114
|
-
row:
|
|
1105
|
+
async batchSetItemValue(t, e = !1, i = !0, s = "none") {
|
|
1106
|
+
let o = [], r = i;
|
|
1107
|
+
const l = /* @__PURE__ */ new Set();
|
|
1108
|
+
let a = [], h = t.map((u) => {
|
|
1109
|
+
const { rowKey: p, key: g } = u;
|
|
1110
|
+
let w = u.value, E = w;
|
|
1111
|
+
const y = this.getRowDataItemForRowKey(p), m = this.getItemValue(p, g), R = this.getVirtualBodyCellByKey(p, g);
|
|
1112
|
+
return (R == null ? void 0 : R.type) === "number" && (["", void 0, null].includes(w) ? E = null : /^-?\d+(\.\d+)?$/.test(`${w}`) ? E = Number(w) : (E = m, a.push({
|
|
1113
|
+
...u,
|
|
1114
|
+
value: E,
|
|
1115
|
+
oldValue: m,
|
|
1116
|
+
row: y
|
|
1115
1117
|
}))), {
|
|
1116
|
-
...
|
|
1117
|
-
value:
|
|
1118
|
-
oldValue:
|
|
1119
|
-
row:
|
|
1118
|
+
...u,
|
|
1119
|
+
value: E,
|
|
1120
|
+
oldValue: m,
|
|
1121
|
+
row: y
|
|
1120
1122
|
};
|
|
1121
1123
|
});
|
|
1122
|
-
if (
|
|
1123
|
-
const
|
|
1124
|
+
if (h = h.filter((u) => !a.some((p) => u.rowKey === p.rowKey && u.key === p.key)), a.length) {
|
|
1125
|
+
const u = {
|
|
1124
1126
|
code: "ERR_BATCH_SET_NUMBER_VALUE",
|
|
1125
1127
|
message: "Assignment failed, not a numeric type",
|
|
1126
|
-
data:
|
|
1128
|
+
data: a
|
|
1127
1129
|
};
|
|
1128
|
-
this.ctx.emit("error",
|
|
1130
|
+
this.ctx.emit("error", u);
|
|
1129
1131
|
}
|
|
1130
|
-
if (!
|
|
1132
|
+
if (!h.length)
|
|
1131
1133
|
return;
|
|
1132
|
-
const { BEFORE_VALUE_CHANGE_METHOD:
|
|
1133
|
-
typeof
|
|
1134
|
-
const { value:
|
|
1135
|
-
|
|
1136
|
-
rowKey:
|
|
1137
|
-
key:
|
|
1138
|
-
oldValue:
|
|
1139
|
-
newValue:
|
|
1134
|
+
const { BEFORE_VALUE_CHANGE_METHOD: d } = this.ctx.config;
|
|
1135
|
+
s === "none" && typeof d == "function" && (h = await d(h), r = !1), h.forEach((u) => {
|
|
1136
|
+
const { value: p, rowKey: g, key: w } = u, E = this.getItemValue(g, w);
|
|
1137
|
+
l.add(g), this.setItemValue(g, w, p, !1, !1, !1, r), o.push({
|
|
1138
|
+
rowKey: g,
|
|
1139
|
+
key: w,
|
|
1140
|
+
oldValue: E,
|
|
1141
|
+
newValue: p
|
|
1140
1142
|
});
|
|
1141
1143
|
});
|
|
1142
|
-
let
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
})
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
e && this.ctx.history.pushState({
|
|
1152
|
-
changeList: s,
|
|
1144
|
+
let f = [];
|
|
1145
|
+
l.forEach((u) => {
|
|
1146
|
+
f.push(this.ctx.database.getRowDataItemForRowKey(u));
|
|
1147
|
+
});
|
|
1148
|
+
const x = h.map(({ rowKey: u, key: p }) => this.getValidator(u, p));
|
|
1149
|
+
Promise.all(x).then(() => {
|
|
1150
|
+
this.validationErrorMap.size === 0 && this.changedDataMap.size > 0 && this.ctx.emit("validateChangedData", this.getChangedData());
|
|
1151
|
+
}), this.ctx.emit("change", h, f), e && this.ctx.history.pushState({
|
|
1152
|
+
changeList: o,
|
|
1153
1153
|
scrollX: this.ctx.scrollX,
|
|
1154
1154
|
scrollY: this.ctx.scrollY,
|
|
1155
1155
|
type: "multiple"
|
|
@@ -1189,7 +1189,7 @@ class ae {
|
|
|
1189
1189
|
d = Number(i);
|
|
1190
1190
|
else {
|
|
1191
1191
|
d = h;
|
|
1192
|
-
const
|
|
1192
|
+
const w = {
|
|
1193
1193
|
code: "ERR_SET_NUMBER_VALUE",
|
|
1194
1194
|
message: "Assignment failed, not a numeric type",
|
|
1195
1195
|
data: [
|
|
@@ -1202,37 +1202,23 @@ class ae {
|
|
|
1202
1202
|
}
|
|
1203
1203
|
]
|
|
1204
1204
|
};
|
|
1205
|
-
this.ctx.emit("error",
|
|
1205
|
+
this.ctx.emit("error", w);
|
|
1206
1206
|
}
|
|
1207
1207
|
if (d === h)
|
|
1208
1208
|
return {
|
|
1209
1209
|
oldValue: h,
|
|
1210
1210
|
newValue: h
|
|
1211
1211
|
};
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
]);
|
|
1223
|
-
m && m.length && (d = m[0].value);
|
|
1224
|
-
}
|
|
1225
|
-
this.changedDataMap.set(f, d), a[e] = d;
|
|
1226
|
-
const w = {
|
|
1227
|
-
rowKey: t,
|
|
1228
|
-
key: e,
|
|
1229
|
-
oldValue: h,
|
|
1230
|
-
value: d,
|
|
1231
|
-
row: u
|
|
1232
|
-
};
|
|
1233
|
-
l && (this.getValidator(t, e).then(() => {
|
|
1234
|
-
this.validationErrorMap.size === 0 && this.changedDataMap.size > 0 && this.ctx.emit("validateChangedData", this.getChangedData());
|
|
1235
|
-
}), this.ctx.emit("change", [w], [u])), this.ctx.emit("editChange", {
|
|
1212
|
+
let g = [
|
|
1213
|
+
{
|
|
1214
|
+
rowKey: t,
|
|
1215
|
+
key: e,
|
|
1216
|
+
value: d,
|
|
1217
|
+
oldValue: h,
|
|
1218
|
+
row: u
|
|
1219
|
+
}
|
|
1220
|
+
];
|
|
1221
|
+
this.batchSetItemValue(g, s, !1), this.ctx.emit("editChange", {
|
|
1236
1222
|
rowKey: t,
|
|
1237
1223
|
key: e,
|
|
1238
1224
|
oldValue: h,
|
|
@@ -1249,18 +1235,6 @@ class ae {
|
|
|
1249
1235
|
value: d,
|
|
1250
1236
|
originalValue: this.originalDataMap.get(f),
|
|
1251
1237
|
row: u
|
|
1252
|
-
}), s && this.ctx.history.pushState({
|
|
1253
|
-
type: "single",
|
|
1254
|
-
scrollX: this.ctx.scrollX,
|
|
1255
|
-
scrollY: this.ctx.scrollY,
|
|
1256
|
-
changeList: [
|
|
1257
|
-
{
|
|
1258
|
-
rowKey: t,
|
|
1259
|
-
key: e,
|
|
1260
|
-
oldValue: h,
|
|
1261
|
-
newValue: d
|
|
1262
|
-
}
|
|
1263
|
-
]
|
|
1264
1238
|
}), o && this.ctx.emit("draw"), {
|
|
1265
1239
|
oldValue: h,
|
|
1266
1240
|
newValue: d
|
|
@@ -1538,7 +1512,7 @@ class ae {
|
|
|
1538
1512
|
value: this.getItemValue(t, e),
|
|
1539
1513
|
field: e,
|
|
1540
1514
|
fieldValue: this.getItemValue(t, e)
|
|
1541
|
-
}, f = new
|
|
1515
|
+
}, f = new se(a).validate(h);
|
|
1542
1516
|
this.setValidationError(t, e, f), i(f);
|
|
1543
1517
|
} else
|
|
1544
1518
|
this.clearValidationError(t, e), i([]);
|
|
@@ -1588,7 +1562,7 @@ class ae {
|
|
|
1588
1562
|
}
|
|
1589
1563
|
]
|
|
1590
1564
|
};
|
|
1591
|
-
let w = e, E = e,
|
|
1565
|
+
let w = e, E = e, y = l, m = l, R = [], C = 0, I = 0, _ = 0, S = 0;
|
|
1592
1566
|
if (d !== 1 && p) {
|
|
1593
1567
|
S = x;
|
|
1594
1568
|
const v = a.reduce((b, O) => {
|
|
@@ -1597,8 +1571,8 @@ class ae {
|
|
|
1597
1571
|
}, "");
|
|
1598
1572
|
for (let b = e - 1; b >= 0; b--) {
|
|
1599
1573
|
const O = this.rowIndexRowKeyMap.get(b) || "", L = a.reduce((M, T) => {
|
|
1600
|
-
const
|
|
1601
|
-
return `${M}${
|
|
1574
|
+
const H = this.getItemValue(O, T) ?? "";
|
|
1575
|
+
return `${M}${H}`;
|
|
1602
1576
|
}, "");
|
|
1603
1577
|
if (v === L)
|
|
1604
1578
|
w = b;
|
|
@@ -1607,8 +1581,8 @@ class ae {
|
|
|
1607
1581
|
}
|
|
1608
1582
|
for (let b = e; b <= this.ctx.maxRowIndex; b++) {
|
|
1609
1583
|
const O = this.rowIndexRowKeyMap.get(b) || "", L = a.reduce((M, T) => {
|
|
1610
|
-
const
|
|
1611
|
-
return `${M}${
|
|
1584
|
+
const H = this.getItemValue(O, T) ?? "";
|
|
1585
|
+
return `${M}${H}`;
|
|
1612
1586
|
}, "");
|
|
1613
1587
|
if (v === L)
|
|
1614
1588
|
E = b;
|
|
@@ -1639,7 +1613,7 @@ class ae {
|
|
|
1639
1613
|
break;
|
|
1640
1614
|
const O = this.getItemValue(s, i), L = this.getItemValue(s, b.key);
|
|
1641
1615
|
if (O === L && h.includes(b.key))
|
|
1642
|
-
|
|
1616
|
+
y = v;
|
|
1643
1617
|
else
|
|
1644
1618
|
break;
|
|
1645
1619
|
}
|
|
@@ -1649,17 +1623,17 @@ class ae {
|
|
|
1649
1623
|
break;
|
|
1650
1624
|
const O = this.getItemValue(s, i), L = this.getItemValue(s, b.key);
|
|
1651
1625
|
if (O === L && h.includes(b.key))
|
|
1652
|
-
|
|
1626
|
+
m = v;
|
|
1653
1627
|
else
|
|
1654
1628
|
break;
|
|
1655
1629
|
}
|
|
1656
|
-
for (let v =
|
|
1630
|
+
for (let v = y; v < l; v++) {
|
|
1657
1631
|
const b = this.getColumnByColIndex(v);
|
|
1658
1632
|
if (!b)
|
|
1659
1633
|
break;
|
|
1660
1634
|
I += b.width || 100;
|
|
1661
1635
|
}
|
|
1662
|
-
for (let v =
|
|
1636
|
+
for (let v = y; v <= m; v++) {
|
|
1663
1637
|
const b = this.getColumnByColIndex(v);
|
|
1664
1638
|
if (!b)
|
|
1665
1639
|
break;
|
|
@@ -1672,7 +1646,7 @@ class ae {
|
|
|
1672
1646
|
}
|
|
1673
1647
|
}
|
|
1674
1648
|
return {
|
|
1675
|
-
xArr: [
|
|
1649
|
+
xArr: [y, m],
|
|
1676
1650
|
yArr: [w, E],
|
|
1677
1651
|
rowspan: d,
|
|
1678
1652
|
colspan: u,
|
|
@@ -1724,7 +1698,7 @@ class ae {
|
|
|
1724
1698
|
// 获取虚拟单元格,只针对可见的
|
|
1725
1699
|
getVirtualBodyCell(t, e) {
|
|
1726
1700
|
const i = this.getColumnByColIndex(e), s = this.getRowForRowIndex(t);
|
|
1727
|
-
return !i || !s ? void 0 : new
|
|
1701
|
+
return !i || !s ? void 0 : new ft(this.ctx, t, e, 0, 0, 0, 0, i, s.item, "body");
|
|
1728
1702
|
}
|
|
1729
1703
|
getVirtualBodyCellByKey(t, e) {
|
|
1730
1704
|
const i = this.getRowIndexForRowKey(t), s = this.getColIndexForKey(e);
|
|
@@ -1744,7 +1718,7 @@ class ae {
|
|
|
1744
1718
|
return i;
|
|
1745
1719
|
}
|
|
1746
1720
|
}
|
|
1747
|
-
class
|
|
1721
|
+
class fe {
|
|
1748
1722
|
constructor(t) {
|
|
1749
1723
|
n(this, "ctx");
|
|
1750
1724
|
n(this, "history", []);
|
|
@@ -1778,7 +1752,7 @@ class he {
|
|
|
1778
1752
|
value: o.oldValue,
|
|
1779
1753
|
row: {}
|
|
1780
1754
|
}));
|
|
1781
|
-
this.ctx.setScroll(e, i), this.ctx.database.batchSetItemValue(s, !1, !1), this.historyIndex -= 1;
|
|
1755
|
+
this.ctx.setScroll(e, i), this.ctx.database.batchSetItemValue(s, !1, !1, "back"), this.historyIndex -= 1;
|
|
1782
1756
|
}
|
|
1783
1757
|
}
|
|
1784
1758
|
// 前进
|
|
@@ -1791,7 +1765,7 @@ class he {
|
|
|
1791
1765
|
value: i.newValue,
|
|
1792
1766
|
row: {}
|
|
1793
1767
|
}));
|
|
1794
|
-
this.ctx.database.batchSetItemValue(e, !1, !1);
|
|
1768
|
+
this.ctx.database.batchSetItemValue(e, !1, !1, "forward");
|
|
1795
1769
|
}
|
|
1796
1770
|
}
|
|
1797
1771
|
// 清空历史
|
|
@@ -1799,7 +1773,7 @@ class he {
|
|
|
1799
1773
|
this.history = [], this.historyIndex = -1;
|
|
1800
1774
|
}
|
|
1801
1775
|
}
|
|
1802
|
-
class
|
|
1776
|
+
class xe {
|
|
1803
1777
|
constructor(t) {
|
|
1804
1778
|
n(this, "eventTasks", /* @__PURE__ */ new Map());
|
|
1805
1779
|
n(this, "ctx");
|
|
@@ -1875,7 +1849,7 @@ class ce {
|
|
|
1875
1849
|
t.removeEventListener(e, i), this.eventTasks.delete(e);
|
|
1876
1850
|
}
|
|
1877
1851
|
}
|
|
1878
|
-
class
|
|
1852
|
+
class ue {
|
|
1879
1853
|
constructor() {
|
|
1880
1854
|
n(this, "events", /* @__PURE__ */ new Map());
|
|
1881
1855
|
}
|
|
@@ -1913,7 +1887,7 @@ class de {
|
|
|
1913
1887
|
this.events.clear();
|
|
1914
1888
|
}
|
|
1915
1889
|
}
|
|
1916
|
-
class
|
|
1890
|
+
class ge {
|
|
1917
1891
|
constructor(t) {
|
|
1918
1892
|
n(this, "ctx");
|
|
1919
1893
|
const e = t.getContext("2d");
|
|
@@ -2043,7 +2017,7 @@ class fe {
|
|
|
2043
2017
|
};
|
|
2044
2018
|
}
|
|
2045
2019
|
}
|
|
2046
|
-
class
|
|
2020
|
+
class yt {
|
|
2047
2021
|
constructor(t) {
|
|
2048
2022
|
n(this, "_config", {});
|
|
2049
2023
|
/** CSS 类名前缀 */
|
|
@@ -2312,14 +2286,14 @@ class Ct {
|
|
|
2312
2286
|
let t = {};
|
|
2313
2287
|
Object.keys(this).forEach((e) => {
|
|
2314
2288
|
if (e.endsWith("_COLOR") || e.endsWith("_FONT")) {
|
|
2315
|
-
const i = `--evt-${e.toLocaleLowerCase().replace(/_/g, "-")}`, s =
|
|
2289
|
+
const i = `--evt-${e.toLocaleLowerCase().replace(/_/g, "-")}`, s = ce(i);
|
|
2316
2290
|
t[e] = s;
|
|
2317
2291
|
}
|
|
2318
2292
|
}), Object.assign(this, t, this._config);
|
|
2319
2293
|
}
|
|
2320
2294
|
}
|
|
2321
|
-
const
|
|
2322
|
-
class
|
|
2295
|
+
const Ct = '<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>';
|
|
2296
|
+
class we {
|
|
2323
2297
|
constructor(t) {
|
|
2324
2298
|
n(this, "ctx");
|
|
2325
2299
|
n(this, "list", [
|
|
@@ -2341,7 +2315,7 @@ class xe {
|
|
|
2341
2315
|
name: "shrink",
|
|
2342
2316
|
configName: "CHECKBOX_UNCHECK_SVG",
|
|
2343
2317
|
configColorName: "SHRINK_ICON_COLOR",
|
|
2344
|
-
svg:
|
|
2318
|
+
svg: Ct,
|
|
2345
2319
|
color: "#4E5969"
|
|
2346
2320
|
},
|
|
2347
2321
|
{
|
|
@@ -2393,7 +2367,7 @@ class xe {
|
|
|
2393
2367
|
name: "icon-select",
|
|
2394
2368
|
configName: "CHECKBOX_UNCHECK_SVG",
|
|
2395
2369
|
configColorName: "SHRINK_ICON_COLOR",
|
|
2396
|
-
svg:
|
|
2370
|
+
svg: Ct,
|
|
2397
2371
|
color: "#4E5969"
|
|
2398
2372
|
}
|
|
2399
2373
|
]);
|
|
@@ -2452,7 +2426,7 @@ class xe {
|
|
|
2452
2426
|
return this.icons.get(t);
|
|
2453
2427
|
}
|
|
2454
2428
|
}
|
|
2455
|
-
class Xt extends
|
|
2429
|
+
class Xt extends kt {
|
|
2456
2430
|
constructor(e, i, s, o, r, l, a) {
|
|
2457
2431
|
super(e, s, o, r, l, "header", a.fixed);
|
|
2458
2432
|
n(this, "align");
|
|
@@ -2495,7 +2469,7 @@ class Xt extends Dt {
|
|
|
2495
2469
|
n(this, "drawImageHeight", 0);
|
|
2496
2470
|
n(this, "drawImageName", "");
|
|
2497
2471
|
n(this, "drawImageSource");
|
|
2498
|
-
this.ctx = e, this.x = s, this.y = o, this.width = r, this.height = l, this.visibleWidth = r, this.visibleHeight = l, this.colIndex = i, this.key = a.key, this.minWidth = a.minWidth, this.maxWidth = a.maxWidth, this.type = a.type || "", this.editorType = a.editorType || "text", this.align = a.align || "center", this.verticalAlign = a.verticalAlign || "middle", this.fixed = a.fixed, this.level = a.level || 0, this.operation = a.operation || !1, this.text = a.title, this.column = a, this.colspan = a.colspan || 1, this.widthFillDisable = a.widthFillDisable || !1, this.rowspan = a.rowspan || 1, this.rules = a.rules, this.readonly = a.readonly || !1, this.required = a.required || !1, this.rowKey =
|
|
2472
|
+
this.ctx = e, this.x = s, this.y = o, this.width = r, this.height = l, this.visibleWidth = r, this.visibleHeight = l, this.colIndex = i, this.key = a.key, this.minWidth = a.minWidth, this.maxWidth = a.maxWidth, this.type = a.type || "", this.editorType = a.editorType || "text", this.align = a.align || "center", this.verticalAlign = a.verticalAlign || "middle", this.fixed = a.fixed, this.level = a.level || 0, this.operation = a.operation || !1, this.text = a.title, this.column = a, this.colspan = a.colspan || 1, this.widthFillDisable = a.widthFillDisable || !1, this.rowspan = a.rowspan || 1, this.rules = a.rules, this.readonly = a.readonly || !1, this.required = a.required || !1, this.rowKey = Lt(), this.overflowTooltipShow = a.overflowTooltipHeaderShow !== !1, this.hasChildren = a.children && a.children.length > 0 || !1, this.render = a.renderHeader;
|
|
2499
2473
|
}
|
|
2500
2474
|
/**
|
|
2501
2475
|
* 是否可见,覆盖基类方法,表头是跟y滚动条没有关系的所以不需要加滚动参数
|
|
@@ -2586,7 +2560,7 @@ class Xt extends Dt {
|
|
|
2586
2560
|
};
|
|
2587
2561
|
}
|
|
2588
2562
|
}
|
|
2589
|
-
class
|
|
2563
|
+
class pe {
|
|
2590
2564
|
constructor(t) {
|
|
2591
2565
|
n(this, "ctx");
|
|
2592
2566
|
n(this, "visibleHoverCell");
|
|
@@ -2716,7 +2690,7 @@ class ue {
|
|
|
2716
2690
|
}
|
|
2717
2691
|
selectionEnterAndLeave(t, e) {
|
|
2718
2692
|
const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), o = i, r = s;
|
|
2719
|
-
r > t.drawImageX && r < t.drawImageX + t.drawImageWidth && o > t.drawImageY && o < t.drawImageY + t.drawImageHeight && t instanceof
|
|
2693
|
+
r > t.drawImageX && r < t.drawImageX + t.drawImageWidth && o > t.drawImageY && o < t.drawImageY + t.drawImageHeight && t instanceof ft && ["selection", "index-selection"].includes(t.type) && (this.ctx.stageElement.style.cursor = "pointer", this.ctx.isPointer = !0, this.ctx.database.getRowSelectable(t.rowKey) || (this.ctx.stageElement.style.cursor = "not-allowed"));
|
|
2720
2694
|
}
|
|
2721
2695
|
isBusy(t) {
|
|
2722
2696
|
const { offsetY: e, offsetX: i } = this.ctx.getOffset(t), s = e, o = i;
|
|
@@ -2759,7 +2733,7 @@ class ue {
|
|
|
2759
2733
|
this.resizeObserver.unobserve(this.ctx.stageElement), this.mutationObserver.disconnect();
|
|
2760
2734
|
}
|
|
2761
2735
|
}
|
|
2762
|
-
class
|
|
2736
|
+
class Ee {
|
|
2763
2737
|
constructor(t, e) {
|
|
2764
2738
|
n(this, "eventBus");
|
|
2765
2739
|
n(this, "eventBrowser");
|
|
@@ -2879,10 +2853,10 @@ class ge {
|
|
|
2879
2853
|
emptyElement: a,
|
|
2880
2854
|
contextMenuElement: h
|
|
2881
2855
|
} = t;
|
|
2882
|
-
this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = o, this.overlayerElement = r, this.editorElement = l, this.emptyElement = a, this.contextMenuElement = h, this.config = new
|
|
2856
|
+
this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = o, this.overlayerElement = r, this.editorElement = l, this.emptyElement = a, this.contextMenuElement = h, this.config = new yt(e.config || {}), this.eventBus = new ue(), this.eventBrowser = new xe(this), this.eventTable = new pe(this), this.paint = new ge(this.canvasElement), this.database = new de(this, e), this.history = new fe(this), this.icons = new we(this);
|
|
2883
2857
|
}
|
|
2884
2858
|
setConfig(t) {
|
|
2885
|
-
this.config = new
|
|
2859
|
+
this.config = new yt(t);
|
|
2886
2860
|
}
|
|
2887
2861
|
setItemValueByEditor(t, e, i, s = !0, o = !0, r = !0) {
|
|
2888
2862
|
if (this.config.ENABLE_MERGE_CELL_LINK) {
|
|
@@ -3007,7 +2981,7 @@ class ge {
|
|
|
3007
2981
|
this.eventTable.destroy(), this.eventBrowser.destroy(), this.eventBus.destroy();
|
|
3008
2982
|
}
|
|
3009
2983
|
}
|
|
3010
|
-
class
|
|
2984
|
+
class bt {
|
|
3011
2985
|
constructor(t, e) {
|
|
3012
2986
|
n(this, "ctx");
|
|
3013
2987
|
n(this, "type");
|
|
@@ -3134,12 +3108,12 @@ class Rt {
|
|
|
3134
3108
|
}), this.ctx.scrollerFocus = this.isFocus;
|
|
3135
3109
|
}
|
|
3136
3110
|
}
|
|
3137
|
-
class
|
|
3111
|
+
class me {
|
|
3138
3112
|
constructor(t) {
|
|
3139
3113
|
n(this, "ctx");
|
|
3140
3114
|
n(this, "verticalScrollbar");
|
|
3141
3115
|
n(this, "horizontalScrollbar");
|
|
3142
|
-
this.ctx = t, this.verticalScrollbar = new
|
|
3116
|
+
this.ctx = t, this.verticalScrollbar = new bt(t, "vertical"), this.horizontalScrollbar = new bt(t, "horizontal"), this.ctx.on("wheel", (e) => this.onWheel(e)), this.ctx.on("mousedown", (e) => this.onMouseDown(e)), this.ctx.on("mousemove", (e) => this.onMouseMove(e)), this.ctx.on("mouseup", () => this.onMouseUp()), this.ctx.on("touchmove", (e) => this.onTouchmove(e)), this.ctx.on("touchstart", (e) => {
|
|
3143
3117
|
this.onTouchstart(e);
|
|
3144
3118
|
}), this.ctx.on("setScroll", (e, i) => {
|
|
3145
3119
|
this.setScroll(e, i);
|
|
@@ -3201,7 +3175,7 @@ class we {
|
|
|
3201
3175
|
this.setScrollY(o - e.visibleHeight / 2);
|
|
3202
3176
|
}
|
|
3203
3177
|
}
|
|
3204
|
-
class
|
|
3178
|
+
class ye {
|
|
3205
3179
|
constructor(t) {
|
|
3206
3180
|
n(this, "ctx");
|
|
3207
3181
|
// 上下文
|
|
@@ -3240,7 +3214,7 @@ class pe {
|
|
|
3240
3214
|
n(this, "renderFixedCellHeaders", []);
|
|
3241
3215
|
this.ctx = t, this.ctx.on(
|
|
3242
3216
|
"resetHeader",
|
|
3243
|
-
|
|
3217
|
+
Tt(() => {
|
|
3244
3218
|
this.init(), this.ctx.emit("draw");
|
|
3245
3219
|
}, 100)
|
|
3246
3220
|
), this.init(), this.initResizeColumn();
|
|
@@ -3250,12 +3224,12 @@ class pe {
|
|
|
3250
3224
|
config: { HEADER_HEIGHT: t, SCROLLER_TRACK_SIZE: e }
|
|
3251
3225
|
} = this.ctx, i = this.ctx.database.getColumns();
|
|
3252
3226
|
this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [];
|
|
3253
|
-
const s =
|
|
3227
|
+
const s = At(i), o = et(i);
|
|
3254
3228
|
this.height = t * s, this.width = o.reduce((f, x) => {
|
|
3255
3229
|
const u = x.width || 100, { maxWidth: p, minWidth: g } = x;
|
|
3256
3230
|
return p && u > p ? f + p : g && u < g ? f + g : f + u;
|
|
3257
3231
|
}, 0), this.visibleHeight = this.height;
|
|
3258
|
-
const r =
|
|
3232
|
+
const r = oe(Mt(i, s));
|
|
3259
3233
|
this.columnIndex = 0, this.resizeNum = 0, this.render(r, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
|
|
3260
3234
|
const l = this.ctx.containerElement.getBoundingClientRect();
|
|
3261
3235
|
this.resizeNum > 0 ? this.ctx.stageWidth = Math.floor(l.width) : this.ctx.stageWidth = Math.floor(this.width + e), this.ctx.stageElement.style.width = this.ctx.stageWidth + "px", this.visibleWidth = this.ctx.stageWidth - e;
|
|
@@ -3450,7 +3424,7 @@ class Bt {
|
|
|
3450
3424
|
update() {
|
|
3451
3425
|
const { header: t } = this.ctx, e = [], i = [], s = [];
|
|
3452
3426
|
t.renderLeafCellHeaders.forEach((o) => {
|
|
3453
|
-
const r = new
|
|
3427
|
+
const r = new ft(
|
|
3454
3428
|
this.ctx,
|
|
3455
3429
|
this.rowIndex,
|
|
3456
3430
|
o.colIndex,
|
|
@@ -3486,7 +3460,7 @@ class Bt {
|
|
|
3486
3460
|
});
|
|
3487
3461
|
}
|
|
3488
3462
|
}
|
|
3489
|
-
class
|
|
3463
|
+
class Ce {
|
|
3490
3464
|
constructor(t) {
|
|
3491
3465
|
n(this, "resizeTarget", null);
|
|
3492
3466
|
//调整行大小的目标
|
|
@@ -3540,9 +3514,9 @@ class Ee {
|
|
|
3540
3514
|
let w = this.height + e.height + r;
|
|
3541
3515
|
w += g;
|
|
3542
3516
|
let E = w;
|
|
3543
|
-
const
|
|
3544
|
-
if (
|
|
3545
|
-
const L =
|
|
3517
|
+
const y = window.innerHeight, { top: m } = this.containerRect || this.ctx.containerElement.getBoundingClientRect();
|
|
3518
|
+
if (y > m && d && !l) {
|
|
3519
|
+
const L = y - m - f;
|
|
3546
3520
|
L > e.height + r ? E = L : w > h && (E = h);
|
|
3547
3521
|
} else this.data.length && l ? E = l : this.data.length && h && w > h && (E = h);
|
|
3548
3522
|
E > 0 && (this.ctx.stageHeight = Math.floor(E), this.ctx.stageElement.style.height = `${this.ctx.stageHeight}px`);
|
|
@@ -3704,7 +3678,7 @@ class Ee {
|
|
|
3704
3678
|
}), this.drawTipLine();
|
|
3705
3679
|
}
|
|
3706
3680
|
}
|
|
3707
|
-
class
|
|
3681
|
+
class be {
|
|
3708
3682
|
constructor(t) {
|
|
3709
3683
|
n(this, "ctx");
|
|
3710
3684
|
n(this, "renderRows", []);
|
|
@@ -3785,7 +3759,7 @@ class me {
|
|
|
3785
3759
|
}), this.drawTopLine();
|
|
3786
3760
|
}
|
|
3787
3761
|
}
|
|
3788
|
-
class
|
|
3762
|
+
class Re {
|
|
3789
3763
|
// 垂直滚动定时器
|
|
3790
3764
|
constructor(t) {
|
|
3791
3765
|
n(this, "isCut", !1);
|
|
@@ -3804,7 +3778,7 @@ class ye {
|
|
|
3804
3778
|
this.moveFocus(t);
|
|
3805
3779
|
}), this.ctx.on(
|
|
3806
3780
|
"mousemove",
|
|
3807
|
-
|
|
3781
|
+
Tt((t) => {
|
|
3808
3782
|
const { offsetY: e, offsetX: i } = this.ctx.getOffset(t), s = this.ctx.isTarget(t) && i > 0 && i < this.ctx.body.visibleWidth && e > this.ctx.header.visibleHeight && e < this.ctx.header.visibleHeight + this.ctx.body.visibleHeight;
|
|
3809
3783
|
(this.ctx.selectorMove || this.ctx.autofillMove) && (!s && !this.mousedownHeader ? this.startAdjustPosition(t) : this.stopAdjustPosition());
|
|
3810
3784
|
}, 100)
|
|
@@ -3908,14 +3882,14 @@ class ye {
|
|
|
3908
3882
|
SELECTOR_AREA_MAX_X_OFFSET: f,
|
|
3909
3883
|
SELECTOR_AREA_MAX_Y_OFFSET: x
|
|
3910
3884
|
} = this.ctx.config, u = l, p = a || this.ctx.maxColIndex - f, g = h, w = d || this.ctx.maxRowIndex - x;
|
|
3911
|
-
let [E,
|
|
3912
|
-
if (E < u ||
|
|
3885
|
+
let [E, y] = o, [m, R] = r;
|
|
3886
|
+
if (E < u || y > p || m < g || R > w)
|
|
3913
3887
|
return;
|
|
3914
3888
|
if (this.ctx.stageElement.focus({ preventScroll: !0 }), this.ctx.config.ENABLE_MERGE_CELL_LINK) {
|
|
3915
3889
|
const I = this.adjustMergeCells(o, r);
|
|
3916
|
-
|
|
3890
|
+
m = I.yArr[0], R = I.yArr[1], E = I.xArr[0], y = I.xArr[1], this.ctx.onlyMergeCell = I.onlyMergeCell;
|
|
3917
3891
|
}
|
|
3918
|
-
E ===
|
|
3892
|
+
E === y && m === R ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, o = [Math.max(u, E), Math.min(p, y)], r = [Math.max(g, m), Math.min(w, R)];
|
|
3919
3893
|
const { BEFORE_SET_SELECTOR_METHOD: C } = this.ctx.config;
|
|
3920
3894
|
if (typeof C == "function") {
|
|
3921
3895
|
const _ = C({
|
|
@@ -3936,13 +3910,13 @@ class ye {
|
|
|
3936
3910
|
let l = [], a = [];
|
|
3937
3911
|
for (let g = 0; g <= e[1] - e[0]; g++)
|
|
3938
3912
|
for (let w = 0; w <= t[1] - t[0]; w++) {
|
|
3939
|
-
const E = g + e[0],
|
|
3940
|
-
|
|
3913
|
+
const E = g + e[0], y = w + t[0], m = this.ctx.database.getVirtualBodyCell(E, y);
|
|
3914
|
+
m && ((E === i || E === s) && l.push(m), (y === o || y === r) && a.push(m));
|
|
3941
3915
|
}
|
|
3942
3916
|
const h = l.reduce(
|
|
3943
3917
|
(g, w) => {
|
|
3944
|
-
const { yArr: E } = w.getSpanInfo(), [
|
|
3945
|
-
return g.minY = Math.min(g.minY,
|
|
3918
|
+
const { yArr: E } = w.getSpanInfo(), [y, m] = E;
|
|
3919
|
+
return g.minY = Math.min(g.minY, y), g.maxY = Math.max(g.maxY, m), g;
|
|
3946
3920
|
},
|
|
3947
3921
|
{
|
|
3948
3922
|
minY: i,
|
|
@@ -3950,8 +3924,8 @@ class ye {
|
|
|
3950
3924
|
}
|
|
3951
3925
|
), d = a.reduce(
|
|
3952
3926
|
(g, w) => {
|
|
3953
|
-
const { xArr: E } = w.getSpanInfo(), [
|
|
3954
|
-
return g.minX = Math.min(g.minX,
|
|
3927
|
+
const { xArr: E } = w.getSpanInfo(), [y, m] = E;
|
|
3928
|
+
return g.minX = Math.min(g.minX, y), g.maxX = Math.max(g.maxX, m), g;
|
|
3955
3929
|
},
|
|
3956
3930
|
{
|
|
3957
3931
|
minX: o,
|
|
@@ -4095,7 +4069,7 @@ class ye {
|
|
|
4095
4069
|
return;
|
|
4096
4070
|
t = l.data;
|
|
4097
4071
|
}
|
|
4098
|
-
const o =
|
|
4072
|
+
const o = le(t);
|
|
4099
4073
|
navigator.clipboard ? navigator.clipboard.writeText(o).then(() => {
|
|
4100
4074
|
this.ctx.selector.xArrCopy = this.ctx.selector.xArr.slice(), this.ctx.selector.yArrCopy = this.ctx.selector.yArr.slice(), this.ctx.emit("copyChange", {
|
|
4101
4075
|
xArr: this.ctx.selector.xArrCopy,
|
|
@@ -4140,7 +4114,7 @@ class ye {
|
|
|
4140
4114
|
if (this.ctx.selector.enable && t) {
|
|
4141
4115
|
const e = this.ctx.selector.yArr[0], i = this.ctx.selector.xArr[0], s = /* @__PURE__ */ new Set();
|
|
4142
4116
|
navigator.clipboard.readText().then(async (o) => {
|
|
4143
|
-
let r =
|
|
4117
|
+
let r = ne(o);
|
|
4144
4118
|
const l = [i, i + r[0].length - 1], a = [e, e + r.length - 1], [h, d] = a, [f, x] = l, u = d - this.ctx.maxRowIndex, p = x - this.ctx.maxColIndex;
|
|
4145
4119
|
(u > 0 || p > 0) && this.ctx.emit("onPastedDataOverflow", {
|
|
4146
4120
|
maxY: d,
|
|
@@ -4153,18 +4127,18 @@ class ye {
|
|
|
4153
4127
|
});
|
|
4154
4128
|
const g = r.length === 1 && r[0].length === 1;
|
|
4155
4129
|
if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(l, a) && !g) {
|
|
4156
|
-
const
|
|
4130
|
+
const m = {
|
|
4157
4131
|
code: "ERR_MERGED_CELLS_PASTE",
|
|
4158
4132
|
message: "Merged cells cannot span paste data"
|
|
4159
4133
|
};
|
|
4160
|
-
this.ctx.hasEvent("error") ? this.ctx.emit("error",
|
|
4134
|
+
this.ctx.hasEvent("error") ? this.ctx.emit("error", m) : alert(m.message);
|
|
4161
4135
|
return;
|
|
4162
4136
|
}
|
|
4163
4137
|
let w = [];
|
|
4164
|
-
for (let
|
|
4165
|
-
const R = r[
|
|
4138
|
+
for (let m = 0; m <= r.length - 1; m++) {
|
|
4139
|
+
const R = r[m].length;
|
|
4166
4140
|
for (let C = 0; C <= R - 1; C++) {
|
|
4167
|
-
const I =
|
|
4141
|
+
const I = m + e, _ = C + i, S = r[m][C], v = this.ctx.database.getItemValueForRowIndexAndColIndex(
|
|
4168
4142
|
I,
|
|
4169
4143
|
_
|
|
4170
4144
|
);
|
|
@@ -4181,13 +4155,13 @@ class ye {
|
|
|
4181
4155
|
}
|
|
4182
4156
|
}
|
|
4183
4157
|
if (this.isCut) {
|
|
4184
|
-
const
|
|
4158
|
+
const m = this.clearSelectedData(
|
|
4185
4159
|
this.ctx.selector.xArrCopy,
|
|
4186
4160
|
this.ctx.selector.yArrCopy,
|
|
4187
4161
|
!0
|
|
4188
4162
|
// 忽略设置,只返回数据,用于cut,实现历史回退需要返回两次问题
|
|
4189
4163
|
), R = w.map((C) => `${C.rowKey}-${C.key}`);
|
|
4190
|
-
|
|
4164
|
+
m.forEach((C) => {
|
|
4191
4165
|
R.includes(`${C.rowKey}-${C.key}`) || w.unshift(C);
|
|
4192
4166
|
}), this.isCut = !1;
|
|
4193
4167
|
}
|
|
@@ -4195,21 +4169,21 @@ class ye {
|
|
|
4195
4169
|
return;
|
|
4196
4170
|
const { BEFORE_PASTE_DATA_METHOD: E } = this.ctx.config;
|
|
4197
4171
|
if (typeof E == "function") {
|
|
4198
|
-
const
|
|
4172
|
+
const m = E, R = w.map((C) => ({
|
|
4199
4173
|
rowKey: C.rowKey,
|
|
4200
4174
|
key: C.key,
|
|
4201
4175
|
value: C.value,
|
|
4202
4176
|
oldValue: this.ctx.database.getItemValue(C.rowKey, C.key),
|
|
4203
4177
|
row: this.ctx.database.getRowDataItemForRowKey(C.rowKey)
|
|
4204
4178
|
}));
|
|
4205
|
-
if (w = await
|
|
4179
|
+
if (w = await m(R, l, a, r), w && !w.length)
|
|
4206
4180
|
return;
|
|
4207
4181
|
}
|
|
4208
4182
|
this.clearCopyLine(), this.ctx.batchSetItemValueByEditor(w, !0);
|
|
4209
|
-
let
|
|
4210
|
-
s.forEach((
|
|
4211
|
-
|
|
4212
|
-
}), this.ctx.emit("pasteChange", w,
|
|
4183
|
+
let y = [];
|
|
4184
|
+
s.forEach((m) => {
|
|
4185
|
+
y.push(this.ctx.database.getRowDataItemForRowKey(m));
|
|
4186
|
+
}), this.ctx.emit("pasteChange", w, y);
|
|
4213
4187
|
}).catch((o) => {
|
|
4214
4188
|
console.error("Failed to get the clipboard content:", o);
|
|
4215
4189
|
});
|
|
@@ -4303,20 +4277,20 @@ class ye {
|
|
|
4303
4277
|
if (!i)
|
|
4304
4278
|
return;
|
|
4305
4279
|
p && this.ctx.onlyMergeCell && i.updateSpanInfo();
|
|
4306
|
-
const { drawX: g, drawY: w, width: E, height:
|
|
4307
|
-
let I = r.height - w, _ =
|
|
4280
|
+
const { drawX: g, drawY: w, width: E, height: y, fixed: m } = i, R = o - g + 1, C = i.drawX + E - (e - s) + 1;
|
|
4281
|
+
let I = r.height - w, _ = y;
|
|
4308
4282
|
_ > a.visibleHeight && (_ = a.visibleHeight);
|
|
4309
4283
|
let S = 0;
|
|
4310
4284
|
x && (u === "top" ? I = r.height + l.height - w : S = l.visibleHeight);
|
|
4311
4285
|
const v = w + _ - (t - S - f);
|
|
4312
4286
|
let b = h, O = d;
|
|
4313
|
-
C > 0 && !
|
|
4287
|
+
C > 0 && !m ? b = Math.floor(h + C) : R > 0 && !m && (b = Math.floor(h - R)), I > 0 ? O = Math.floor(d - I) : v > 0 && (O = Math.floor(d + v)), (Math.abs(h - b) > 2 || Math.abs(d - O) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(b, O), this.ctx.emit("adjustBoundaryPosition", i));
|
|
4314
4288
|
}
|
|
4315
4289
|
destroy() {
|
|
4316
4290
|
this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
|
|
4317
4291
|
}
|
|
4318
4292
|
}
|
|
4319
|
-
class
|
|
4293
|
+
class ve {
|
|
4320
4294
|
constructor(t) {
|
|
4321
4295
|
n(this, "ctx");
|
|
4322
4296
|
n(this, "maxColRowCell");
|
|
@@ -4375,10 +4349,10 @@ class Ce {
|
|
|
4375
4349
|
SELECTOR_AREA_MAX_X_OFFSET: x,
|
|
4376
4350
|
SELECTOR_AREA_MAX_Y_OFFSET: u
|
|
4377
4351
|
} = this.ctx.config, p = a, g = h || this.ctx.maxColIndex - x, w = d, E = f || this.ctx.maxRowIndex - u;
|
|
4378
|
-
let [
|
|
4379
|
-
if (
|
|
4352
|
+
let [y, m] = r, [R, C] = l;
|
|
4353
|
+
if (y < p || R < w)
|
|
4380
4354
|
return;
|
|
4381
|
-
r = [Math.max(p,
|
|
4355
|
+
r = [Math.max(p, y), Math.min(g, m)], l = [Math.max(w, R), Math.min(E, C)];
|
|
4382
4356
|
const { BEFORE_SET_AUTOFILL_METHOD: I } = this.ctx.config;
|
|
4383
4357
|
if (typeof I == "function") {
|
|
4384
4358
|
const S = I({
|
|
@@ -4415,9 +4389,9 @@ class Ce {
|
|
|
4415
4389
|
let d = [];
|
|
4416
4390
|
for (let u = 0; u <= a[1] - a[0]; u++)
|
|
4417
4391
|
for (let p = 0; p <= l[1] - l[0]; p++) {
|
|
4418
|
-
const g = p + l[0], w = u + a[0], E = s[u % r][p % o],
|
|
4419
|
-
if (
|
|
4420
|
-
const { rowKey: R, key: C } =
|
|
4392
|
+
const g = p + l[0], w = u + a[0], E = s[u % r][p % o], y = this.ctx.database.getItemValueForRowIndexAndColIndex(w, g), m = `${w}-${g}`;
|
|
4393
|
+
if (y && !i.has(m)) {
|
|
4394
|
+
const { rowKey: R, key: C } = y;
|
|
4421
4395
|
this.ctx.database.getReadonly(R, C) || (t.add(R), d.push({
|
|
4422
4396
|
rowKey: R,
|
|
4423
4397
|
key: C,
|
|
@@ -4459,77 +4433,78 @@ class Ce {
|
|
|
4459
4433
|
destroy() {
|
|
4460
4434
|
}
|
|
4461
4435
|
}
|
|
4462
|
-
const Z = Math.min,
|
|
4436
|
+
const Z = Math.min, $ = Math.max, it = Math.round, K = (c) => ({
|
|
4463
4437
|
x: c,
|
|
4464
4438
|
y: c
|
|
4465
|
-
}),
|
|
4439
|
+
}), Ie = {
|
|
4466
4440
|
left: "right",
|
|
4467
4441
|
right: "left",
|
|
4468
4442
|
bottom: "top",
|
|
4469
4443
|
top: "bottom"
|
|
4470
|
-
},
|
|
4444
|
+
}, _e = {
|
|
4471
4445
|
start: "end",
|
|
4472
4446
|
end: "start"
|
|
4473
4447
|
};
|
|
4474
4448
|
function ht(c, t, e) {
|
|
4475
|
-
return
|
|
4449
|
+
return $(c, Z(t, e));
|
|
4476
4450
|
}
|
|
4477
4451
|
function J(c, t) {
|
|
4478
4452
|
return typeof c == "function" ? c(t) : c;
|
|
4479
4453
|
}
|
|
4480
|
-
function
|
|
4454
|
+
function z(c) {
|
|
4481
4455
|
return c.split("-")[0];
|
|
4482
4456
|
}
|
|
4483
4457
|
function Q(c) {
|
|
4484
4458
|
return c.split("-")[1];
|
|
4485
4459
|
}
|
|
4486
|
-
function
|
|
4460
|
+
function Kt(c) {
|
|
4487
4461
|
return c === "x" ? "y" : "x";
|
|
4488
4462
|
}
|
|
4489
|
-
function
|
|
4463
|
+
function xt(c) {
|
|
4490
4464
|
return c === "y" ? "height" : "width";
|
|
4491
4465
|
}
|
|
4492
|
-
|
|
4493
|
-
|
|
4466
|
+
const Oe = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
4467
|
+
function V(c) {
|
|
4468
|
+
return Oe.has(z(c)) ? "y" : "x";
|
|
4494
4469
|
}
|
|
4495
|
-
function
|
|
4496
|
-
return
|
|
4470
|
+
function ut(c) {
|
|
4471
|
+
return Kt(V(c));
|
|
4497
4472
|
}
|
|
4498
|
-
function
|
|
4473
|
+
function Se(c, t, e) {
|
|
4499
4474
|
e === void 0 && (e = !1);
|
|
4500
|
-
const i = Q(c), s =
|
|
4475
|
+
const i = Q(c), s = ut(c), o = xt(s);
|
|
4501
4476
|
let r = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
|
|
4502
4477
|
return t.reference[o] > t.floating[o] && (r = st(r)), [r, st(r)];
|
|
4503
4478
|
}
|
|
4504
|
-
function
|
|
4479
|
+
function Le(c) {
|
|
4505
4480
|
const t = st(c);
|
|
4506
4481
|
return [ct(c), t, ct(t)];
|
|
4507
4482
|
}
|
|
4508
4483
|
function ct(c) {
|
|
4509
|
-
return c.replace(/start|end/g, (t) =>
|
|
4484
|
+
return c.replace(/start|end/g, (t) => _e[t]);
|
|
4510
4485
|
}
|
|
4511
|
-
|
|
4512
|
-
|
|
4486
|
+
const Rt = ["left", "right"], vt = ["right", "left"], Te = ["top", "bottom"], Ae = ["bottom", "top"];
|
|
4487
|
+
function Me(c, t, e) {
|
|
4513
4488
|
switch (c) {
|
|
4514
4489
|
case "top":
|
|
4515
4490
|
case "bottom":
|
|
4516
|
-
return e ? t ?
|
|
4491
|
+
return e ? t ? vt : Rt : t ? Rt : vt;
|
|
4517
4492
|
case "left":
|
|
4518
4493
|
case "right":
|
|
4519
|
-
return t ?
|
|
4494
|
+
return t ? Te : Ae;
|
|
4520
4495
|
default:
|
|
4521
4496
|
return [];
|
|
4522
4497
|
}
|
|
4523
4498
|
}
|
|
4524
|
-
function
|
|
4499
|
+
function He(c, t, e, i) {
|
|
4525
4500
|
const s = Q(c);
|
|
4526
|
-
let o =
|
|
4501
|
+
let o = Me(z(c), e === "start", i);
|
|
4527
4502
|
return s && (o = o.map((r) => r + "-" + s), t && (o = o.concat(o.map(ct)))), o;
|
|
4528
4503
|
}
|
|
4529
4504
|
function st(c) {
|
|
4530
|
-
return c.replace(/left|right|bottom|top/g, (t) =>
|
|
4505
|
+
return c.replace(/left|right|bottom|top/g, (t) => Ie[t]);
|
|
4531
4506
|
}
|
|
4532
|
-
function
|
|
4507
|
+
function De(c) {
|
|
4533
4508
|
return {
|
|
4534
4509
|
top: 0,
|
|
4535
4510
|
right: 0,
|
|
@@ -4538,8 +4513,8 @@ function Se(c) {
|
|
|
4538
4513
|
...c
|
|
4539
4514
|
};
|
|
4540
4515
|
}
|
|
4541
|
-
function
|
|
4542
|
-
return typeof c != "number" ?
|
|
4516
|
+
function Nt(c) {
|
|
4517
|
+
return typeof c != "number" ? De(c) : {
|
|
4543
4518
|
top: c,
|
|
4544
4519
|
right: c,
|
|
4545
4520
|
bottom: c,
|
|
@@ -4564,12 +4539,12 @@ function ot(c) {
|
|
|
4564
4539
|
y: e
|
|
4565
4540
|
};
|
|
4566
4541
|
}
|
|
4567
|
-
function
|
|
4542
|
+
function It(c, t, e) {
|
|
4568
4543
|
let {
|
|
4569
4544
|
reference: i,
|
|
4570
4545
|
floating: s
|
|
4571
4546
|
} = c;
|
|
4572
|
-
const o =
|
|
4547
|
+
const o = V(t), r = ut(t), l = xt(r), a = z(t), h = o === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, x = i[l] / 2 - s[l] / 2;
|
|
4573
4548
|
let u;
|
|
4574
4549
|
switch (a) {
|
|
4575
4550
|
case "top":
|
|
@@ -4612,7 +4587,7 @@ function vt(c, t, e) {
|
|
|
4612
4587
|
}
|
|
4613
4588
|
return u;
|
|
4614
4589
|
}
|
|
4615
|
-
const
|
|
4590
|
+
const ke = async (c, t, e) => {
|
|
4616
4591
|
const {
|
|
4617
4592
|
placement: i = "bottom",
|
|
4618
4593
|
strategy: s = "absolute",
|
|
@@ -4626,14 +4601,14 @@ const Le = async (c, t, e) => {
|
|
|
4626
4601
|
}), {
|
|
4627
4602
|
x: d,
|
|
4628
4603
|
y: f
|
|
4629
|
-
} =
|
|
4604
|
+
} = It(h, i, a), x = i, u = {}, p = 0;
|
|
4630
4605
|
for (let g = 0; g < l.length; g++) {
|
|
4631
4606
|
const {
|
|
4632
4607
|
name: w,
|
|
4633
4608
|
fn: E
|
|
4634
4609
|
} = l[g], {
|
|
4635
|
-
x:
|
|
4636
|
-
y,
|
|
4610
|
+
x: y,
|
|
4611
|
+
y: m,
|
|
4637
4612
|
data: R,
|
|
4638
4613
|
reset: C
|
|
4639
4614
|
} = await E({
|
|
@@ -4650,7 +4625,7 @@ const Le = async (c, t, e) => {
|
|
|
4650
4625
|
floating: t
|
|
4651
4626
|
}
|
|
4652
4627
|
});
|
|
4653
|
-
d =
|
|
4628
|
+
d = y ?? d, f = m ?? f, u = {
|
|
4654
4629
|
...u,
|
|
4655
4630
|
[w]: {
|
|
4656
4631
|
...u[w],
|
|
@@ -4663,7 +4638,7 @@ const Le = async (c, t, e) => {
|
|
|
4663
4638
|
}) : C.rects), {
|
|
4664
4639
|
x: d,
|
|
4665
4640
|
y: f
|
|
4666
|
-
} =
|
|
4641
|
+
} = It(h, x, a)), g = -1);
|
|
4667
4642
|
}
|
|
4668
4643
|
return {
|
|
4669
4644
|
x: d,
|
|
@@ -4673,7 +4648,7 @@ const Le = async (c, t, e) => {
|
|
|
4673
4648
|
middlewareData: u
|
|
4674
4649
|
};
|
|
4675
4650
|
};
|
|
4676
|
-
async function
|
|
4651
|
+
async function Yt(c, t) {
|
|
4677
4652
|
var e;
|
|
4678
4653
|
t === void 0 && (t = {});
|
|
4679
4654
|
const {
|
|
@@ -4689,17 +4664,17 @@ async function Nt(c, t) {
|
|
|
4689
4664
|
elementContext: f = "floating",
|
|
4690
4665
|
altBoundary: x = !1,
|
|
4691
4666
|
padding: u = 0
|
|
4692
|
-
} = J(t, c), p =
|
|
4667
|
+
} = J(t, c), p = Nt(u), w = l[x ? f === "floating" ? "reference" : "floating" : f], E = ot(await o.getClippingRect({
|
|
4693
4668
|
element: (e = await (o.isElement == null ? void 0 : o.isElement(w))) == null || e ? w : w.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(l.floating)),
|
|
4694
4669
|
boundary: h,
|
|
4695
4670
|
rootBoundary: d,
|
|
4696
4671
|
strategy: a
|
|
4697
|
-
})),
|
|
4672
|
+
})), y = f === "floating" ? {
|
|
4698
4673
|
x: i,
|
|
4699
4674
|
y: s,
|
|
4700
4675
|
width: r.floating.width,
|
|
4701
4676
|
height: r.floating.height
|
|
4702
|
-
} : r.reference,
|
|
4677
|
+
} : r.reference, m = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l.floating)), R = await (o.isElement == null ? void 0 : o.isElement(m)) ? await (o.getScale == null ? void 0 : o.getScale(m)) || {
|
|
4703
4678
|
x: 1,
|
|
4704
4679
|
y: 1
|
|
4705
4680
|
} : {
|
|
@@ -4707,10 +4682,10 @@ async function Nt(c, t) {
|
|
|
4707
4682
|
y: 1
|
|
4708
4683
|
}, C = ot(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
4709
4684
|
elements: l,
|
|
4710
|
-
rect:
|
|
4711
|
-
offsetParent:
|
|
4685
|
+
rect: y,
|
|
4686
|
+
offsetParent: m,
|
|
4712
4687
|
strategy: a
|
|
4713
|
-
}) :
|
|
4688
|
+
}) : y);
|
|
4714
4689
|
return {
|
|
4715
4690
|
top: (E.top - C.top + p.top) / R.y,
|
|
4716
4691
|
bottom: (C.bottom - E.bottom + p.bottom) / R.y,
|
|
@@ -4718,7 +4693,7 @@ async function Nt(c, t) {
|
|
|
4718
4693
|
right: (C.right - E.right + p.right) / R.x
|
|
4719
4694
|
};
|
|
4720
4695
|
}
|
|
4721
|
-
const
|
|
4696
|
+
const Xe = (c) => ({
|
|
4722
4697
|
name: "arrow",
|
|
4723
4698
|
options: c,
|
|
4724
4699
|
async fn(t) {
|
|
@@ -4736,26 +4711,26 @@ const Te = (c) => ({
|
|
|
4736
4711
|
} = J(c, t) || {};
|
|
4737
4712
|
if (h == null)
|
|
4738
4713
|
return {};
|
|
4739
|
-
const f =
|
|
4714
|
+
const f = Nt(d), x = {
|
|
4740
4715
|
x: e,
|
|
4741
4716
|
y: i
|
|
4742
|
-
}, u =
|
|
4743
|
-
let _ = I ? I[
|
|
4744
|
-
(!_ || !await (r.isElement == null ? void 0 : r.isElement(I))) && (_ = l.floating[
|
|
4745
|
-
const S = R / 2 - C / 2, v = _ / 2 - g[p] / 2 - 1, b = Z(f[E], v), O = Z(f[
|
|
4717
|
+
}, u = ut(s), p = xt(u), g = await r.getDimensions(h), w = u === "y", E = w ? "top" : "left", y = w ? "bottom" : "right", m = w ? "clientHeight" : "clientWidth", R = o.reference[p] + o.reference[u] - x[u] - o.floating[p], C = x[u] - o.reference[u], I = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(h));
|
|
4718
|
+
let _ = I ? I[m] : 0;
|
|
4719
|
+
(!_ || !await (r.isElement == null ? void 0 : r.isElement(I))) && (_ = l.floating[m] || o.floating[p]);
|
|
4720
|
+
const S = R / 2 - C / 2, v = _ / 2 - g[p] / 2 - 1, b = Z(f[E], v), O = Z(f[y], v), L = b, M = _ - g[p] - O, T = _ / 2 - g[p] / 2 + S, H = ht(L, T, M), Y = !a.arrow && Q(s) != null && T !== H && o.reference[p] / 2 - (T < L ? b : O) - g[p] / 2 < 0, D = Y ? T < L ? T - L : T - M : 0;
|
|
4746
4721
|
return {
|
|
4747
|
-
[u]: x[u] +
|
|
4722
|
+
[u]: x[u] + D,
|
|
4748
4723
|
data: {
|
|
4749
|
-
[u]:
|
|
4750
|
-
centerOffset: T -
|
|
4751
|
-
...
|
|
4752
|
-
alignmentOffset:
|
|
4724
|
+
[u]: H,
|
|
4725
|
+
centerOffset: T - H - D,
|
|
4726
|
+
...Y && {
|
|
4727
|
+
alignmentOffset: D
|
|
4753
4728
|
}
|
|
4754
4729
|
},
|
|
4755
|
-
reset:
|
|
4730
|
+
reset: Y
|
|
4756
4731
|
};
|
|
4757
4732
|
}
|
|
4758
|
-
}),
|
|
4733
|
+
}), Be = function(c) {
|
|
4759
4734
|
return c === void 0 && (c = {}), {
|
|
4760
4735
|
name: "flip",
|
|
4761
4736
|
options: c,
|
|
@@ -4779,12 +4754,12 @@ const Te = (c) => ({
|
|
|
4779
4754
|
} = J(c, t);
|
|
4780
4755
|
if ((e = o.arrow) != null && e.alignmentOffset)
|
|
4781
4756
|
return {};
|
|
4782
|
-
const E =
|
|
4783
|
-
!x && I && C.push(...
|
|
4784
|
-
const _ = [l, ...C], S = await
|
|
4757
|
+
const E = z(s), y = V(l), m = z(l) === l, R = await (a.isRTL == null ? void 0 : a.isRTL(h.floating)), C = x || (m || !g ? [st(l)] : Le(l)), I = p !== "none";
|
|
4758
|
+
!x && I && C.push(...He(l, g, p, R));
|
|
4759
|
+
const _ = [l, ...C], S = await Yt(t, w), v = [];
|
|
4785
4760
|
let b = ((i = o.flip) == null ? void 0 : i.overflows) || [];
|
|
4786
4761
|
if (d && v.push(S[E]), f) {
|
|
4787
|
-
const T =
|
|
4762
|
+
const T = Se(s, r, R);
|
|
4788
4763
|
v.push(S[T[0]], S[T[1]]);
|
|
4789
4764
|
}
|
|
4790
4765
|
if (b = [...b, {
|
|
@@ -4792,55 +4767,57 @@ const Te = (c) => ({
|
|
|
4792
4767
|
overflows: v
|
|
4793
4768
|
}], !v.every((T) => T <= 0)) {
|
|
4794
4769
|
var O, L;
|
|
4795
|
-
const T = (((O = o.flip) == null ? void 0 : O.index) || 0) + 1,
|
|
4796
|
-
if (
|
|
4770
|
+
const T = (((O = o.flip) == null ? void 0 : O.index) || 0) + 1, H = _[T];
|
|
4771
|
+
if (H && (!(f === "alignment" ? y !== V(H) : !1) || // We leave the current main axis only if every placement on that axis
|
|
4772
|
+
// overflows the main axis.
|
|
4773
|
+
b.every((k) => V(k.placement) === y ? k.overflows[0] > 0 : !0)))
|
|
4797
4774
|
return {
|
|
4798
4775
|
data: {
|
|
4799
4776
|
index: T,
|
|
4800
4777
|
overflows: b
|
|
4801
4778
|
},
|
|
4802
4779
|
reset: {
|
|
4803
|
-
placement:
|
|
4780
|
+
placement: H
|
|
4804
4781
|
}
|
|
4805
4782
|
};
|
|
4806
|
-
let
|
|
4807
|
-
if (!
|
|
4783
|
+
let Y = (L = b.filter((D) => D.overflows[0] <= 0).sort((D, k) => D.overflows[1] - k.overflows[1])[0]) == null ? void 0 : L.placement;
|
|
4784
|
+
if (!Y)
|
|
4808
4785
|
switch (u) {
|
|
4809
4786
|
case "bestFit": {
|
|
4810
4787
|
var M;
|
|
4811
|
-
const
|
|
4788
|
+
const D = (M = b.filter((k) => {
|
|
4812
4789
|
if (I) {
|
|
4813
|
-
const
|
|
4814
|
-
return
|
|
4790
|
+
const W = V(k.placement);
|
|
4791
|
+
return W === y || // Create a bias to the `y` side axis due to horizontal
|
|
4815
4792
|
// reading directions favoring greater width.
|
|
4816
|
-
|
|
4793
|
+
W === "y";
|
|
4817
4794
|
}
|
|
4818
4795
|
return !0;
|
|
4819
|
-
}).map((
|
|
4820
|
-
|
|
4796
|
+
}).map((k) => [k.placement, k.overflows.filter((W) => W > 0).reduce((W, te) => W + te, 0)]).sort((k, W) => k[1] - W[1])[0]) == null ? void 0 : M[0];
|
|
4797
|
+
D && (Y = D);
|
|
4821
4798
|
break;
|
|
4822
4799
|
}
|
|
4823
4800
|
case "initialPlacement":
|
|
4824
|
-
|
|
4801
|
+
Y = l;
|
|
4825
4802
|
break;
|
|
4826
4803
|
}
|
|
4827
|
-
if (s !==
|
|
4804
|
+
if (s !== Y)
|
|
4828
4805
|
return {
|
|
4829
4806
|
reset: {
|
|
4830
|
-
placement:
|
|
4807
|
+
placement: Y
|
|
4831
4808
|
}
|
|
4832
4809
|
};
|
|
4833
4810
|
}
|
|
4834
4811
|
return {};
|
|
4835
4812
|
}
|
|
4836
4813
|
};
|
|
4837
|
-
};
|
|
4838
|
-
async function
|
|
4814
|
+
}, Ke = /* @__PURE__ */ new Set(["left", "top"]);
|
|
4815
|
+
async function Ne(c, t) {
|
|
4839
4816
|
const {
|
|
4840
4817
|
placement: e,
|
|
4841
4818
|
platform: i,
|
|
4842
4819
|
elements: s
|
|
4843
|
-
} = c, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r =
|
|
4820
|
+
} = c, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r = z(e), l = Q(e), a = V(e) === "y", h = Ke.has(r) ? -1 : 1, d = o && a ? -1 : 1, f = J(t, c);
|
|
4844
4821
|
let {
|
|
4845
4822
|
mainAxis: x,
|
|
4846
4823
|
crossAxis: u,
|
|
@@ -4862,7 +4839,7 @@ async function Me(c, t) {
|
|
|
4862
4839
|
y: u * d
|
|
4863
4840
|
};
|
|
4864
4841
|
}
|
|
4865
|
-
const
|
|
4842
|
+
const Ye = function(c) {
|
|
4866
4843
|
return c === void 0 && (c = 0), {
|
|
4867
4844
|
name: "offset",
|
|
4868
4845
|
options: c,
|
|
@@ -4873,7 +4850,7 @@ const He = function(c) {
|
|
|
4873
4850
|
y: o,
|
|
4874
4851
|
placement: r,
|
|
4875
4852
|
middlewareData: l
|
|
4876
|
-
} = t, a = await
|
|
4853
|
+
} = t, a = await Ne(t, c);
|
|
4877
4854
|
return r === ((e = l.offset) == null ? void 0 : e.placement) && (i = l.arrow) != null && i.alignmentOffset ? {} : {
|
|
4878
4855
|
x: s + a.x,
|
|
4879
4856
|
y: o + a.y,
|
|
@@ -4884,7 +4861,7 @@ const He = function(c) {
|
|
|
4884
4861
|
};
|
|
4885
4862
|
}
|
|
4886
4863
|
};
|
|
4887
|
-
},
|
|
4864
|
+
}, Fe = function(c) {
|
|
4888
4865
|
return c === void 0 && (c = {}), {
|
|
4889
4866
|
name: "shift",
|
|
4890
4867
|
options: c,
|
|
@@ -4900,11 +4877,11 @@ const He = function(c) {
|
|
|
4900
4877
|
fn: (w) => {
|
|
4901
4878
|
let {
|
|
4902
4879
|
x: E,
|
|
4903
|
-
y
|
|
4880
|
+
y
|
|
4904
4881
|
} = w;
|
|
4905
4882
|
return {
|
|
4906
4883
|
x: E,
|
|
4907
|
-
y
|
|
4884
|
+
y
|
|
4908
4885
|
};
|
|
4909
4886
|
}
|
|
4910
4887
|
},
|
|
@@ -4912,15 +4889,15 @@ const He = function(c) {
|
|
|
4912
4889
|
} = J(c, t), h = {
|
|
4913
4890
|
x: e,
|
|
4914
4891
|
y: i
|
|
4915
|
-
}, d = await
|
|
4892
|
+
}, d = await Yt(t, a), f = V(z(s)), x = Kt(f);
|
|
4916
4893
|
let u = h[x], p = h[f];
|
|
4917
4894
|
if (o) {
|
|
4918
|
-
const w = x === "y" ? "top" : "left", E = x === "y" ? "bottom" : "right",
|
|
4919
|
-
u = ht(
|
|
4895
|
+
const w = x === "y" ? "top" : "left", E = x === "y" ? "bottom" : "right", y = u + d[w], m = u - d[E];
|
|
4896
|
+
u = ht(y, u, m);
|
|
4920
4897
|
}
|
|
4921
4898
|
if (r) {
|
|
4922
|
-
const w = f === "y" ? "top" : "left", E = f === "y" ? "bottom" : "right",
|
|
4923
|
-
p = ht(
|
|
4899
|
+
const w = f === "y" ? "top" : "left", E = f === "y" ? "bottom" : "right", y = p + d[w], m = p - d[E];
|
|
4900
|
+
p = ht(y, p, m);
|
|
4924
4901
|
}
|
|
4925
4902
|
const g = l.fn({
|
|
4926
4903
|
...t,
|
|
@@ -4945,42 +4922,45 @@ function rt() {
|
|
|
4945
4922
|
return typeof window < "u";
|
|
4946
4923
|
}
|
|
4947
4924
|
function j(c) {
|
|
4948
|
-
return
|
|
4925
|
+
return Ft(c) ? (c.nodeName || "").toLowerCase() : "#document";
|
|
4949
4926
|
}
|
|
4950
4927
|
function A(c) {
|
|
4951
4928
|
var t;
|
|
4952
4929
|
return (c == null || (t = c.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
4953
4930
|
}
|
|
4954
|
-
function
|
|
4931
|
+
function F(c) {
|
|
4955
4932
|
var t;
|
|
4956
|
-
return (t = (
|
|
4933
|
+
return (t = (Ft(c) ? c.ownerDocument : c.document) || window.document) == null ? void 0 : t.documentElement;
|
|
4957
4934
|
}
|
|
4958
|
-
function
|
|
4935
|
+
function Ft(c) {
|
|
4959
4936
|
return rt() ? c instanceof Node || c instanceof A(c).Node : !1;
|
|
4960
4937
|
}
|
|
4961
|
-
function
|
|
4938
|
+
function X(c) {
|
|
4962
4939
|
return rt() ? c instanceof Element || c instanceof A(c).Element : !1;
|
|
4963
4940
|
}
|
|
4964
|
-
function
|
|
4941
|
+
function N(c) {
|
|
4965
4942
|
return rt() ? c instanceof HTMLElement || c instanceof A(c).HTMLElement : !1;
|
|
4966
4943
|
}
|
|
4967
|
-
function
|
|
4944
|
+
function _t(c) {
|
|
4968
4945
|
return !rt() || typeof ShadowRoot > "u" ? !1 : c instanceof ShadowRoot || c instanceof A(c).ShadowRoot;
|
|
4969
4946
|
}
|
|
4947
|
+
const We = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
4970
4948
|
function tt(c) {
|
|
4971
4949
|
const {
|
|
4972
4950
|
overflow: t,
|
|
4973
4951
|
overflowX: e,
|
|
4974
4952
|
overflowY: i,
|
|
4975
4953
|
display: s
|
|
4976
|
-
} =
|
|
4977
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !
|
|
4954
|
+
} = B(c);
|
|
4955
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !We.has(s);
|
|
4978
4956
|
}
|
|
4979
|
-
|
|
4980
|
-
|
|
4957
|
+
const Ve = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
4958
|
+
function Pe(c) {
|
|
4959
|
+
return Ve.has(j(c));
|
|
4981
4960
|
}
|
|
4961
|
+
const ze = [":popover-open", ":modal"];
|
|
4982
4962
|
function nt(c) {
|
|
4983
|
-
return
|
|
4963
|
+
return ze.some((t) => {
|
|
4984
4964
|
try {
|
|
4985
4965
|
return c.matches(t);
|
|
4986
4966
|
} catch {
|
|
@@ -4988,32 +4968,34 @@ function nt(c) {
|
|
|
4988
4968
|
}
|
|
4989
4969
|
});
|
|
4990
4970
|
}
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4971
|
+
const $e = ["transform", "translate", "scale", "rotate", "perspective"], Ge = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Ue = ["paint", "layout", "strict", "content"];
|
|
4972
|
+
function gt(c) {
|
|
4973
|
+
const t = wt(), e = X(c) ? B(c) : c;
|
|
4974
|
+
return $e.some((i) => e[i] ? e[i] !== "none" : !1) || (e.containerType ? e.containerType !== "normal" : !1) || !t && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !t && (e.filter ? e.filter !== "none" : !1) || Ge.some((i) => (e.willChange || "").includes(i)) || Ue.some((i) => (e.contain || "").includes(i));
|
|
4994
4975
|
}
|
|
4995
|
-
function
|
|
4996
|
-
let t =
|
|
4997
|
-
for (;
|
|
4998
|
-
if (
|
|
4976
|
+
function je(c) {
|
|
4977
|
+
let t = P(c);
|
|
4978
|
+
for (; N(t) && !U(t); ) {
|
|
4979
|
+
if (gt(t))
|
|
4999
4980
|
return t;
|
|
5000
4981
|
if (nt(t))
|
|
5001
4982
|
return null;
|
|
5002
|
-
t =
|
|
4983
|
+
t = P(t);
|
|
5003
4984
|
}
|
|
5004
4985
|
return null;
|
|
5005
4986
|
}
|
|
5006
|
-
function
|
|
4987
|
+
function wt() {
|
|
5007
4988
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
5008
4989
|
}
|
|
4990
|
+
const Ze = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
5009
4991
|
function U(c) {
|
|
5010
|
-
return
|
|
4992
|
+
return Ze.has(j(c));
|
|
5011
4993
|
}
|
|
5012
|
-
function
|
|
4994
|
+
function B(c) {
|
|
5013
4995
|
return A(c).getComputedStyle(c);
|
|
5014
4996
|
}
|
|
5015
4997
|
function lt(c) {
|
|
5016
|
-
return
|
|
4998
|
+
return X(c) ? {
|
|
5017
4999
|
scrollLeft: c.scrollLeft,
|
|
5018
5000
|
scrollTop: c.scrollTop
|
|
5019
5001
|
} : {
|
|
@@ -5021,87 +5003,83 @@ function lt(c) {
|
|
|
5021
5003
|
scrollTop: c.scrollY
|
|
5022
5004
|
};
|
|
5023
5005
|
}
|
|
5024
|
-
function
|
|
5006
|
+
function P(c) {
|
|
5025
5007
|
if (j(c) === "html")
|
|
5026
5008
|
return c;
|
|
5027
5009
|
const t = (
|
|
5028
5010
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
5029
5011
|
c.assignedSlot || // DOM Element detected.
|
|
5030
5012
|
c.parentNode || // ShadowRoot detected.
|
|
5031
|
-
|
|
5032
|
-
|
|
5013
|
+
_t(c) && c.host || // Fallback.
|
|
5014
|
+
F(c)
|
|
5033
5015
|
);
|
|
5034
|
-
return
|
|
5016
|
+
return _t(t) ? t.host : t;
|
|
5035
5017
|
}
|
|
5036
|
-
function
|
|
5037
|
-
const t =
|
|
5038
|
-
return U(t) ? c.ownerDocument ? c.ownerDocument.body : c.body :
|
|
5018
|
+
function Wt(c) {
|
|
5019
|
+
const t = P(c);
|
|
5020
|
+
return U(t) ? c.ownerDocument ? c.ownerDocument.body : c.body : N(t) && tt(t) ? t : Wt(t);
|
|
5039
5021
|
}
|
|
5040
|
-
function
|
|
5022
|
+
function Vt(c, t, e) {
|
|
5041
5023
|
var i;
|
|
5042
|
-
t === void 0 && (t = [])
|
|
5043
|
-
const s =
|
|
5044
|
-
|
|
5045
|
-
const l = ft(r);
|
|
5046
|
-
return t.concat(r, r.visualViewport || [], tt(s) ? s : [], l && e ? dt(l) : []);
|
|
5047
|
-
}
|
|
5048
|
-
return t.concat(s, dt(s, [], e));
|
|
5024
|
+
t === void 0 && (t = []);
|
|
5025
|
+
const s = Wt(c), o = s === ((i = c.ownerDocument) == null ? void 0 : i.body), r = A(s);
|
|
5026
|
+
return o ? (dt(r), t.concat(r, r.visualViewport || [], tt(s) ? s : [], [])) : t.concat(s, Vt(s, []));
|
|
5049
5027
|
}
|
|
5050
|
-
function
|
|
5028
|
+
function dt(c) {
|
|
5051
5029
|
return c.parent && Object.getPrototypeOf(c.parent) ? c.frameElement : null;
|
|
5052
5030
|
}
|
|
5053
|
-
function
|
|
5054
|
-
const t =
|
|
5031
|
+
function Pt(c) {
|
|
5032
|
+
const t = B(c);
|
|
5055
5033
|
let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
|
|
5056
|
-
const s =
|
|
5034
|
+
const s = N(c), o = s ? c.offsetWidth : e, r = s ? c.offsetHeight : i, l = it(e) !== o || it(i) !== r;
|
|
5057
5035
|
return l && (e = o, i = r), {
|
|
5058
5036
|
width: e,
|
|
5059
5037
|
height: i,
|
|
5060
5038
|
$: l
|
|
5061
5039
|
};
|
|
5062
5040
|
}
|
|
5063
|
-
function
|
|
5064
|
-
return
|
|
5041
|
+
function zt(c) {
|
|
5042
|
+
return X(c) ? c : c.contextElement;
|
|
5065
5043
|
}
|
|
5066
|
-
function
|
|
5067
|
-
const t =
|
|
5068
|
-
if (!
|
|
5069
|
-
return
|
|
5044
|
+
function G(c) {
|
|
5045
|
+
const t = zt(c);
|
|
5046
|
+
if (!N(t))
|
|
5047
|
+
return K(1);
|
|
5070
5048
|
const e = t.getBoundingClientRect(), {
|
|
5071
5049
|
width: i,
|
|
5072
5050
|
height: s,
|
|
5073
5051
|
$: o
|
|
5074
|
-
} =
|
|
5052
|
+
} = Pt(t);
|
|
5075
5053
|
let r = (o ? it(e.width) : e.width) / i, l = (o ? it(e.height) : e.height) / s;
|
|
5076
5054
|
return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
5077
5055
|
x: r,
|
|
5078
5056
|
y: l
|
|
5079
5057
|
};
|
|
5080
5058
|
}
|
|
5081
|
-
const
|
|
5082
|
-
function
|
|
5059
|
+
const qe = /* @__PURE__ */ K(0);
|
|
5060
|
+
function $t(c) {
|
|
5083
5061
|
const t = A(c);
|
|
5084
|
-
return !
|
|
5062
|
+
return !wt() || !t.visualViewport ? qe : {
|
|
5085
5063
|
x: t.visualViewport.offsetLeft,
|
|
5086
5064
|
y: t.visualViewport.offsetTop
|
|
5087
5065
|
};
|
|
5088
5066
|
}
|
|
5089
|
-
function
|
|
5067
|
+
function Je(c, t, e) {
|
|
5090
5068
|
return t === void 0 && (t = !1), !e || t && e !== A(c) ? !1 : t;
|
|
5091
5069
|
}
|
|
5092
5070
|
function q(c, t, e, i) {
|
|
5093
5071
|
t === void 0 && (t = !1), e === void 0 && (e = !1);
|
|
5094
|
-
const s = c.getBoundingClientRect(), o =
|
|
5095
|
-
let r =
|
|
5096
|
-
t && (i ?
|
|
5097
|
-
const l =
|
|
5072
|
+
const s = c.getBoundingClientRect(), o = zt(c);
|
|
5073
|
+
let r = K(1);
|
|
5074
|
+
t && (i ? X(i) && (r = G(i)) : r = G(c));
|
|
5075
|
+
const l = Je(o, e, i) ? $t(o) : K(0);
|
|
5098
5076
|
let a = (s.left + l.x) / r.x, h = (s.top + l.y) / r.y, d = s.width / r.x, f = s.height / r.y;
|
|
5099
5077
|
if (o) {
|
|
5100
|
-
const x = A(o), u = i &&
|
|
5101
|
-
let p = x, g =
|
|
5078
|
+
const x = A(o), u = i && X(i) ? A(i) : i;
|
|
5079
|
+
let p = x, g = dt(p);
|
|
5102
5080
|
for (; g && i && u !== p; ) {
|
|
5103
|
-
const w =
|
|
5104
|
-
a *= w.x, h *= w.y, d *= w.x, f *= w.y, a +=
|
|
5081
|
+
const w = G(g), E = g.getBoundingClientRect(), y = B(g), m = E.left + (g.clientLeft + parseFloat(y.paddingLeft)) * w.x, R = E.top + (g.clientTop + parseFloat(y.paddingTop)) * w.y;
|
|
5082
|
+
a *= w.x, h *= w.y, d *= w.x, f *= w.y, a += m, h += R, p = A(g), g = dt(p);
|
|
5105
5083
|
}
|
|
5106
5084
|
}
|
|
5107
5085
|
return ot({
|
|
@@ -5111,56 +5089,68 @@ function q(c, t, e, i) {
|
|
|
5111
5089
|
y: h
|
|
5112
5090
|
});
|
|
5113
5091
|
}
|
|
5114
|
-
function
|
|
5092
|
+
function pt(c, t) {
|
|
5093
|
+
const e = lt(c).scrollLeft;
|
|
5094
|
+
return t ? t.left + e : q(F(c)).left + e;
|
|
5095
|
+
}
|
|
5096
|
+
function Gt(c, t, e) {
|
|
5097
|
+
e === void 0 && (e = !1);
|
|
5098
|
+
const i = c.getBoundingClientRect(), s = i.left + t.scrollLeft - (e ? 0 : (
|
|
5099
|
+
// RTL <body> scrollbar.
|
|
5100
|
+
pt(c, i)
|
|
5101
|
+
)), o = i.top + t.scrollTop;
|
|
5102
|
+
return {
|
|
5103
|
+
x: s,
|
|
5104
|
+
y: o
|
|
5105
|
+
};
|
|
5106
|
+
}
|
|
5107
|
+
function Qe(c) {
|
|
5115
5108
|
let {
|
|
5116
5109
|
elements: t,
|
|
5117
5110
|
rect: e,
|
|
5118
5111
|
offsetParent: i,
|
|
5119
5112
|
strategy: s
|
|
5120
5113
|
} = c;
|
|
5121
|
-
const o = s === "fixed", r =
|
|
5114
|
+
const o = s === "fixed", r = F(i), l = t ? nt(t.floating) : !1;
|
|
5122
5115
|
if (i === r || l && o)
|
|
5123
5116
|
return e;
|
|
5124
5117
|
let a = {
|
|
5125
5118
|
scrollLeft: 0,
|
|
5126
5119
|
scrollTop: 0
|
|
5127
|
-
}, h =
|
|
5128
|
-
const d =
|
|
5129
|
-
if ((f || !f && !o) && ((j(i) !== "body" || tt(r)) && (a = lt(i)),
|
|
5130
|
-
const
|
|
5131
|
-
h =
|
|
5120
|
+
}, h = K(1);
|
|
5121
|
+
const d = K(0), f = N(i);
|
|
5122
|
+
if ((f || !f && !o) && ((j(i) !== "body" || tt(r)) && (a = lt(i)), N(i))) {
|
|
5123
|
+
const u = q(i);
|
|
5124
|
+
h = G(i), d.x = u.x + i.clientLeft, d.y = u.y + i.clientTop;
|
|
5132
5125
|
}
|
|
5126
|
+
const x = r && !f && !o ? Gt(r, a, !0) : K(0);
|
|
5133
5127
|
return {
|
|
5134
5128
|
width: e.width * h.x,
|
|
5135
5129
|
height: e.height * h.y,
|
|
5136
|
-
x: e.x * h.x - a.scrollLeft * h.x + d.x,
|
|
5137
|
-
y: e.y * h.y - a.scrollTop * h.y + d.y
|
|
5130
|
+
x: e.x * h.x - a.scrollLeft * h.x + d.x + x.x,
|
|
5131
|
+
y: e.y * h.y - a.scrollTop * h.y + d.y + x.y
|
|
5138
5132
|
};
|
|
5139
5133
|
}
|
|
5140
|
-
function
|
|
5134
|
+
function ti(c) {
|
|
5141
5135
|
return Array.from(c.getClientRects());
|
|
5142
5136
|
}
|
|
5143
|
-
function
|
|
5144
|
-
const e = lt(c).
|
|
5145
|
-
|
|
5146
|
-
}
|
|
5147
|
-
function Fe(c) {
|
|
5148
|
-
const t = N(c), e = lt(c), i = c.ownerDocument.body, s = z(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = z(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
|
|
5149
|
-
let r = -e.scrollLeft + xt(c);
|
|
5137
|
+
function ei(c) {
|
|
5138
|
+
const t = F(c), e = lt(c), i = c.ownerDocument.body, s = $(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = $(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
|
|
5139
|
+
let r = -e.scrollLeft + pt(c);
|
|
5150
5140
|
const l = -e.scrollTop;
|
|
5151
|
-
return
|
|
5141
|
+
return B(i).direction === "rtl" && (r += $(t.clientWidth, i.clientWidth) - s), {
|
|
5152
5142
|
width: s,
|
|
5153
5143
|
height: o,
|
|
5154
5144
|
x: r,
|
|
5155
5145
|
y: l
|
|
5156
5146
|
};
|
|
5157
5147
|
}
|
|
5158
|
-
function
|
|
5159
|
-
const e = A(c), i =
|
|
5148
|
+
function ii(c, t) {
|
|
5149
|
+
const e = A(c), i = F(c), s = e.visualViewport;
|
|
5160
5150
|
let o = i.clientWidth, r = i.clientHeight, l = 0, a = 0;
|
|
5161
5151
|
if (s) {
|
|
5162
5152
|
o = s.width, r = s.height;
|
|
5163
|
-
const h =
|
|
5153
|
+
const h = wt();
|
|
5164
5154
|
(!h || h && t === "fixed") && (l = s.offsetLeft, a = s.offsetTop);
|
|
5165
5155
|
}
|
|
5166
5156
|
return {
|
|
@@ -5170,8 +5160,9 @@ function Ve(c, t) {
|
|
|
5170
5160
|
y: a
|
|
5171
5161
|
};
|
|
5172
5162
|
}
|
|
5173
|
-
|
|
5174
|
-
|
|
5163
|
+
const si = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
5164
|
+
function oi(c, t) {
|
|
5165
|
+
const e = q(c, !0, t === "fixed"), i = e.top + c.clientTop, s = e.left + c.clientLeft, o = N(c) ? G(c) : K(1), r = c.clientWidth * o.x, l = c.clientHeight * o.y, a = s * o.x, h = i * o.y;
|
|
5175
5166
|
return {
|
|
5176
5167
|
width: r,
|
|
5177
5168
|
height: l,
|
|
@@ -5179,52 +5170,53 @@ function We(c, t) {
|
|
|
5179
5170
|
y: h
|
|
5180
5171
|
};
|
|
5181
5172
|
}
|
|
5182
|
-
function
|
|
5173
|
+
function Ot(c, t, e) {
|
|
5183
5174
|
let i;
|
|
5184
5175
|
if (t === "viewport")
|
|
5185
|
-
i =
|
|
5176
|
+
i = ii(c, e);
|
|
5186
5177
|
else if (t === "document")
|
|
5187
|
-
i =
|
|
5188
|
-
else if (
|
|
5189
|
-
i =
|
|
5178
|
+
i = ei(F(c));
|
|
5179
|
+
else if (X(t))
|
|
5180
|
+
i = oi(t, e);
|
|
5190
5181
|
else {
|
|
5191
|
-
const s =
|
|
5182
|
+
const s = $t(c);
|
|
5192
5183
|
i = {
|
|
5193
|
-
...t,
|
|
5194
5184
|
x: t.x - s.x,
|
|
5195
|
-
y: t.y - s.y
|
|
5185
|
+
y: t.y - s.y,
|
|
5186
|
+
width: t.width,
|
|
5187
|
+
height: t.height
|
|
5196
5188
|
};
|
|
5197
5189
|
}
|
|
5198
5190
|
return ot(i);
|
|
5199
5191
|
}
|
|
5200
|
-
function
|
|
5201
|
-
const e =
|
|
5202
|
-
return e === t || !
|
|
5192
|
+
function Ut(c, t) {
|
|
5193
|
+
const e = P(c);
|
|
5194
|
+
return e === t || !X(e) || U(e) ? !1 : B(e).position === "fixed" || Ut(e, t);
|
|
5203
5195
|
}
|
|
5204
|
-
function
|
|
5196
|
+
function ri(c, t) {
|
|
5205
5197
|
const e = t.get(c);
|
|
5206
5198
|
if (e)
|
|
5207
5199
|
return e;
|
|
5208
|
-
let i =
|
|
5209
|
-
const o =
|
|
5210
|
-
let r = o ?
|
|
5211
|
-
for (;
|
|
5212
|
-
const l =
|
|
5213
|
-
!a && l.position === "fixed" && (s = null), (o ? !a && !s : !a && l.position === "static" && !!s &&
|
|
5200
|
+
let i = Vt(c, []).filter((l) => X(l) && j(l) !== "body"), s = null;
|
|
5201
|
+
const o = B(c).position === "fixed";
|
|
5202
|
+
let r = o ? P(c) : c;
|
|
5203
|
+
for (; X(r) && !U(r); ) {
|
|
5204
|
+
const l = B(r), a = gt(r);
|
|
5205
|
+
!a && l.position === "fixed" && (s = null), (o ? !a && !s : !a && l.position === "static" && !!s && si.has(s.position) || tt(r) && !a && Ut(c, r)) ? i = i.filter((d) => d !== r) : s = l, r = P(r);
|
|
5214
5206
|
}
|
|
5215
5207
|
return t.set(c, i), i;
|
|
5216
5208
|
}
|
|
5217
|
-
function
|
|
5209
|
+
function ni(c) {
|
|
5218
5210
|
let {
|
|
5219
5211
|
element: t,
|
|
5220
5212
|
boundary: e,
|
|
5221
5213
|
rootBoundary: i,
|
|
5222
5214
|
strategy: s
|
|
5223
5215
|
} = c;
|
|
5224
|
-
const r = [...e === "clippingAncestors" ? nt(t) ? [] :
|
|
5225
|
-
const f =
|
|
5226
|
-
return h.top =
|
|
5227
|
-
},
|
|
5216
|
+
const r = [...e === "clippingAncestors" ? nt(t) ? [] : ri(t, this._c) : [].concat(e), i], l = r[0], a = r.reduce((h, d) => {
|
|
5217
|
+
const f = Ot(t, d, s);
|
|
5218
|
+
return h.top = $(f.top, h.top), h.right = Z(f.right, h.right), h.bottom = Z(f.bottom, h.bottom), h.left = $(f.left, h.left), h;
|
|
5219
|
+
}, Ot(t, l, s));
|
|
5228
5220
|
return {
|
|
5229
5221
|
width: a.right - a.left,
|
|
5230
5222
|
height: a.bottom - a.top,
|
|
@@ -5232,35 +5224,33 @@ function ze(c) {
|
|
|
5232
5224
|
y: a.top
|
|
5233
5225
|
};
|
|
5234
5226
|
}
|
|
5235
|
-
function
|
|
5227
|
+
function li(c) {
|
|
5236
5228
|
const {
|
|
5237
5229
|
width: t,
|
|
5238
5230
|
height: e
|
|
5239
|
-
} =
|
|
5231
|
+
} = Pt(c);
|
|
5240
5232
|
return {
|
|
5241
5233
|
width: t,
|
|
5242
5234
|
height: e
|
|
5243
5235
|
};
|
|
5244
5236
|
}
|
|
5245
|
-
function
|
|
5246
|
-
const i =
|
|
5237
|
+
function ai(c, t, e) {
|
|
5238
|
+
const i = N(t), s = F(t), o = e === "fixed", r = q(c, !0, o, t);
|
|
5247
5239
|
let l = {
|
|
5248
5240
|
scrollLeft: 0,
|
|
5249
5241
|
scrollTop: 0
|
|
5250
5242
|
};
|
|
5251
|
-
const a =
|
|
5243
|
+
const a = K(0);
|
|
5244
|
+
function h() {
|
|
5245
|
+
a.x = pt(s);
|
|
5246
|
+
}
|
|
5252
5247
|
if (i || !i && !o)
|
|
5253
5248
|
if ((j(t) !== "body" || tt(s)) && (l = lt(t)), i) {
|
|
5254
5249
|
const u = q(t, !0, o, t);
|
|
5255
5250
|
a.x = u.x + t.clientLeft, a.y = u.y + t.clientTop;
|
|
5256
|
-
} else s && (
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
const u = s.getBoundingClientRect();
|
|
5260
|
-
d = u.top + l.scrollTop, h = u.left + l.scrollLeft - // RTL <body> scrollbar.
|
|
5261
|
-
xt(s, u);
|
|
5262
|
-
}
|
|
5263
|
-
const f = r.left + l.scrollLeft - a.x - h, x = r.top + l.scrollTop - a.y - d;
|
|
5251
|
+
} else s && h();
|
|
5252
|
+
o && !i && s && h();
|
|
5253
|
+
const d = s && !i && !o ? Gt(s, l) : K(0), f = r.left + l.scrollLeft - a.x - d.x, x = r.top + l.scrollTop - a.y - d.y;
|
|
5264
5254
|
return {
|
|
5265
5255
|
x: f,
|
|
5266
5256
|
y: x,
|
|
@@ -5269,38 +5259,38 @@ function Ge(c, t, e) {
|
|
|
5269
5259
|
};
|
|
5270
5260
|
}
|
|
5271
5261
|
function at(c) {
|
|
5272
|
-
return
|
|
5262
|
+
return B(c).position === "static";
|
|
5273
5263
|
}
|
|
5274
|
-
function
|
|
5275
|
-
if (!
|
|
5264
|
+
function St(c, t) {
|
|
5265
|
+
if (!N(c) || B(c).position === "fixed")
|
|
5276
5266
|
return null;
|
|
5277
5267
|
if (t)
|
|
5278
5268
|
return t(c);
|
|
5279
5269
|
let e = c.offsetParent;
|
|
5280
|
-
return
|
|
5270
|
+
return F(c) === e && (e = e.ownerDocument.body), e;
|
|
5281
5271
|
}
|
|
5282
|
-
function
|
|
5272
|
+
function jt(c, t) {
|
|
5283
5273
|
const e = A(c);
|
|
5284
5274
|
if (nt(c))
|
|
5285
5275
|
return e;
|
|
5286
|
-
if (!
|
|
5287
|
-
let s =
|
|
5276
|
+
if (!N(c)) {
|
|
5277
|
+
let s = P(c);
|
|
5288
5278
|
for (; s && !U(s); ) {
|
|
5289
|
-
if (
|
|
5279
|
+
if (X(s) && !at(s))
|
|
5290
5280
|
return s;
|
|
5291
|
-
s =
|
|
5281
|
+
s = P(s);
|
|
5292
5282
|
}
|
|
5293
5283
|
return e;
|
|
5294
5284
|
}
|
|
5295
|
-
let i =
|
|
5296
|
-
for (; i &&
|
|
5297
|
-
i =
|
|
5298
|
-
return i && U(i) && at(i) && !
|
|
5285
|
+
let i = St(c, t);
|
|
5286
|
+
for (; i && Pe(i) && at(i); )
|
|
5287
|
+
i = St(i, t);
|
|
5288
|
+
return i && U(i) && at(i) && !gt(i) ? e : i || je(c) || e;
|
|
5299
5289
|
}
|
|
5300
|
-
const
|
|
5301
|
-
const t = this.getOffsetParent ||
|
|
5290
|
+
const hi = async function(c) {
|
|
5291
|
+
const t = this.getOffsetParent || jt, e = this.getDimensions, i = await e(c.floating);
|
|
5302
5292
|
return {
|
|
5303
|
-
reference:
|
|
5293
|
+
reference: ai(c.reference, await t(c.floating), c.strategy),
|
|
5304
5294
|
floating: {
|
|
5305
5295
|
x: 0,
|
|
5306
5296
|
y: 0,
|
|
@@ -5309,34 +5299,34 @@ const Ue = async function(c) {
|
|
|
5309
5299
|
}
|
|
5310
5300
|
};
|
|
5311
5301
|
};
|
|
5312
|
-
function
|
|
5313
|
-
return
|
|
5302
|
+
function ci(c) {
|
|
5303
|
+
return B(c).direction === "rtl";
|
|
5314
5304
|
}
|
|
5315
|
-
const
|
|
5316
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
5317
|
-
getDocumentElement:
|
|
5318
|
-
getClippingRect:
|
|
5319
|
-
getOffsetParent:
|
|
5320
|
-
getElementRects:
|
|
5321
|
-
getClientRects:
|
|
5322
|
-
getDimensions:
|
|
5323
|
-
getScale:
|
|
5324
|
-
isElement:
|
|
5325
|
-
isRTL:
|
|
5326
|
-
},
|
|
5305
|
+
const di = {
|
|
5306
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Qe,
|
|
5307
|
+
getDocumentElement: F,
|
|
5308
|
+
getClippingRect: ni,
|
|
5309
|
+
getOffsetParent: jt,
|
|
5310
|
+
getElementRects: hi,
|
|
5311
|
+
getClientRects: ti,
|
|
5312
|
+
getDimensions: li,
|
|
5313
|
+
getScale: G,
|
|
5314
|
+
isElement: X,
|
|
5315
|
+
isRTL: ci
|
|
5316
|
+
}, Zt = Ye, qt = Fe, Jt = Be, fi = Xe, Qt = (c, t, e) => {
|
|
5327
5317
|
const i = /* @__PURE__ */ new Map(), s = {
|
|
5328
|
-
platform:
|
|
5318
|
+
platform: di,
|
|
5329
5319
|
...e
|
|
5330
5320
|
}, o = {
|
|
5331
5321
|
...s.platform,
|
|
5332
5322
|
_c: i
|
|
5333
5323
|
};
|
|
5334
|
-
return
|
|
5324
|
+
return ke(c, t, {
|
|
5335
5325
|
...s,
|
|
5336
5326
|
platform: o
|
|
5337
5327
|
});
|
|
5338
5328
|
};
|
|
5339
|
-
let
|
|
5329
|
+
let xi = class {
|
|
5340
5330
|
constructor(t) {
|
|
5341
5331
|
n(this, "ctx");
|
|
5342
5332
|
n(this, "enable", !1);
|
|
@@ -5398,7 +5388,7 @@ let Je = class {
|
|
|
5398
5388
|
return;
|
|
5399
5389
|
this.enable = !0, this.contentEl.style.maxWidth = `${t.overflowTooltipMaxWidth || 500}px`, this.contentEl.style.minWidth = "100px", this.contentEl.style.width = "100%", this.contentEl.style.display = "inline-block", this.contentEl.style.wordBreak = "break-all", this.contentEl.style.lineHeight = "1.5", this.contentEl.innerText = e;
|
|
5400
5390
|
const s = t.drawX + i.x, o = t.drawY + i.y;
|
|
5401
|
-
|
|
5391
|
+
Qt({
|
|
5402
5392
|
getBoundingClientRect() {
|
|
5403
5393
|
return {
|
|
5404
5394
|
width: t.visibleWidth,
|
|
@@ -5413,7 +5403,7 @@ let Je = class {
|
|
|
5413
5403
|
}
|
|
5414
5404
|
}, this.floatingEl, {
|
|
5415
5405
|
placement: t.overflowTooltipPlacement,
|
|
5416
|
-
middleware: [
|
|
5406
|
+
middleware: [qt(), Jt(), Zt(6), fi({ element: this.arrowEl })]
|
|
5417
5407
|
}).then((l) => {
|
|
5418
5408
|
const { x: a, y: h, placement: d, middlewareData: f } = l;
|
|
5419
5409
|
if (Object.assign(this.floatingEl.style, {
|
|
@@ -5452,7 +5442,7 @@ let Je = class {
|
|
|
5452
5442
|
this.contentEl.remove(), this.arrowEl.remove(), this.floatingEl.remove();
|
|
5453
5443
|
}
|
|
5454
5444
|
};
|
|
5455
|
-
class
|
|
5445
|
+
class ui {
|
|
5456
5446
|
constructor(t) {
|
|
5457
5447
|
n(this, "editorEl");
|
|
5458
5448
|
n(this, "inputEl");
|
|
@@ -5654,7 +5644,7 @@ class Qe {
|
|
|
5654
5644
|
(t = this.editorEl) == null || t.remove();
|
|
5655
5645
|
}
|
|
5656
5646
|
}
|
|
5657
|
-
class
|
|
5647
|
+
class gi {
|
|
5658
5648
|
constructor(t) {
|
|
5659
5649
|
n(this, "ctx");
|
|
5660
5650
|
n(this, "emptyEl");
|
|
@@ -5678,7 +5668,7 @@ class ti {
|
|
|
5678
5668
|
this.emptyEl.remove();
|
|
5679
5669
|
}
|
|
5680
5670
|
}
|
|
5681
|
-
class
|
|
5671
|
+
class wi {
|
|
5682
5672
|
constructor(t) {
|
|
5683
5673
|
n(this, "ctx");
|
|
5684
5674
|
this.ctx = t;
|
|
@@ -5873,7 +5863,7 @@ class ei {
|
|
|
5873
5863
|
};
|
|
5874
5864
|
}
|
|
5875
5865
|
}
|
|
5876
|
-
class
|
|
5866
|
+
class pi {
|
|
5877
5867
|
constructor(t) {
|
|
5878
5868
|
n(this, "ctx");
|
|
5879
5869
|
n(this, "contextMenuEl");
|
|
@@ -5899,9 +5889,9 @@ class ii {
|
|
|
5899
5889
|
}),
|
|
5900
5890
|
contextElement: document.body
|
|
5901
5891
|
};
|
|
5902
|
-
|
|
5892
|
+
Qt(x, this.contextMenuEl, {
|
|
5903
5893
|
placement: "right-start",
|
|
5904
|
-
middleware: [
|
|
5894
|
+
middleware: [Zt(), qt(), Jt()]
|
|
5905
5895
|
}).then(({ x: u, y: p }) => {
|
|
5906
5896
|
this.show(u, p);
|
|
5907
5897
|
});
|
|
@@ -5959,7 +5949,7 @@ class ii {
|
|
|
5959
5949
|
this.contextMenuEl.remove();
|
|
5960
5950
|
}
|
|
5961
5951
|
}
|
|
5962
|
-
class
|
|
5952
|
+
class yi {
|
|
5963
5953
|
constructor(t, e) {
|
|
5964
5954
|
n(this, "options");
|
|
5965
5955
|
n(this, "scroller");
|
|
@@ -5982,7 +5972,7 @@ class ri {
|
|
|
5982
5972
|
o,
|
|
5983
5973
|
r
|
|
5984
5974
|
);
|
|
5985
|
-
this.ctx = new
|
|
5975
|
+
this.ctx = new Ee(l, this.options), this.header = new ye(this.ctx), this.footer = new be(this.ctx), this.body = new Ce(this.ctx), this.scroller = new me(this.ctx), this.selector = new Re(this.ctx), this.autofill = new ve(this.ctx), this.tooltip = new xi(this.ctx), this.empty = new gi(this.ctx), this.editor = new ui(this.ctx), this.overlayer = new wi(this.ctx), this.contextMenu = new pi(this.ctx), this.ctx.on("draw", () => {
|
|
5986
5976
|
this.draw();
|
|
5987
5977
|
}), this.ctx.on("drawView", () => {
|
|
5988
5978
|
this.draw(!0);
|
|
@@ -6040,14 +6030,14 @@ class ri {
|
|
|
6040
6030
|
editCell(t, e) {
|
|
6041
6031
|
this.editor.editCell(t, e);
|
|
6042
6032
|
}
|
|
6043
|
-
setItemValue(t, e, i, s = !0, o = !0, r = !1
|
|
6044
|
-
this.ctx.database.setItemValue(t, e, i, s, o, r
|
|
6033
|
+
setItemValue(t, e, i, s = !0, o = !0, r = !1) {
|
|
6034
|
+
this.ctx.database.setItemValue(t, e, i, s, o, r);
|
|
6045
6035
|
}
|
|
6046
|
-
batchSetItemValue(t, e = !0
|
|
6047
|
-
this.ctx.database.batchSetItemValue(t, e
|
|
6036
|
+
batchSetItemValue(t, e = !0) {
|
|
6037
|
+
this.ctx.database.batchSetItemValue(t, e);
|
|
6048
6038
|
}
|
|
6049
|
-
setItemValueByEditor(t, e, i, s = !0, o = !0
|
|
6050
|
-
this.ctx.setItemValueByEditor(t, e, i, s, o
|
|
6039
|
+
setItemValueByEditor(t, e, i, s = !0, o = !0) {
|
|
6040
|
+
this.ctx.setItemValueByEditor(t, e, i, s, o), this.editor.doneEdit();
|
|
6051
6041
|
}
|
|
6052
6042
|
clearEditableData(t = null) {
|
|
6053
6043
|
const e = [0, this.ctx.maxColIndex], i = [0, this.ctx.maxRowIndex];
|
|
@@ -6222,10 +6212,10 @@ class ri {
|
|
|
6222
6212
|
}
|
|
6223
6213
|
getUtils() {
|
|
6224
6214
|
return {
|
|
6225
|
-
mergeColCell:
|
|
6226
|
-
mergeRowCell:
|
|
6227
|
-
getSpanArrByRow:
|
|
6228
|
-
getSpanObjByColumn:
|
|
6215
|
+
mergeColCell: he,
|
|
6216
|
+
mergeRowCell: ae,
|
|
6217
|
+
getSpanArrByRow: Ht,
|
|
6218
|
+
getSpanObjByColumn: Dt
|
|
6229
6219
|
};
|
|
6230
6220
|
}
|
|
6231
6221
|
getColumnByKey(t) {
|
|
@@ -6240,6 +6230,6 @@ class ri {
|
|
|
6240
6230
|
}
|
|
6241
6231
|
}
|
|
6242
6232
|
export {
|
|
6243
|
-
|
|
6233
|
+
yi as default
|
|
6244
6234
|
};
|
|
6245
6235
|
//# sourceMappingURL=index.es.js.map
|