e-virt-table 1.3.8 → 1.3.9
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 +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +163 -157
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/Config.d.ts +0 -2
- package/dist/lib/Config.js +0 -7
- package/dist/lib/Config.js.map +1 -1
- package/dist/lib/Context.d.ts +0 -1
- package/dist/lib/Context.js +0 -6
- package/dist/lib/Context.js.map +1 -1
- package/dist/lib/Database.d.ts +1 -0
- package/dist/lib/Database.js +3 -0
- package/dist/lib/Database.js.map +1 -1
- package/dist/lib/EVirtTable.d.ts +1 -0
- package/dist/lib/EVirtTable.js +10 -11
- package/dist/lib/EVirtTable.js.map +1 -1
- package/dist/lib/Editor.js +7 -6
- package/dist/lib/Editor.js.map +1 -1
- package/dist/lib/EventTable.js +1 -1
- package/dist/lib/EventTable.js.map +1 -1
- package/dist/lib/Header.d.ts +1 -1
- package/dist/lib/Header.js +10 -9
- package/dist/lib/Header.js.map +1 -1
- package/dist/lib/Overlayer.d.ts +2 -1
- package/dist/lib/Overlayer.js +45 -10
- package/dist/lib/Overlayer.js.map +1 -1
- package/dist/lib/Selector.js +3 -8
- package/dist/lib/Selector.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -66,7 +66,7 @@ function zt() {
|
|
|
66
66
|
return (h === "x" ? t : t & 3 | 8).toString(16);
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function yt(h, t) {
|
|
70
70
|
let e = 0, i;
|
|
71
71
|
return function(...s) {
|
|
72
72
|
const o = (/* @__PURE__ */ new Date()).getTime(), r = o - e, a = typeof t == "function" ? t() : t;
|
|
@@ -75,8 +75,8 @@ function J(h, t) {
|
|
|
75
75
|
}, a - r));
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return h.length ? h.map((t) =>
|
|
78
|
+
function ot(h = []) {
|
|
79
|
+
return h.length ? h.map((t) => ot(t.children) + 1).sort((t, e) => e - t)[0] : 0;
|
|
80
80
|
}
|
|
81
81
|
function ue(h = []) {
|
|
82
82
|
let t = [], e = [], i = [];
|
|
@@ -88,14 +88,14 @@ function ue(h = []) {
|
|
|
88
88
|
...i.sort((s, o) => (s.sort ?? 0) - (o.sort ?? 0))
|
|
89
89
|
];
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function rt(h = [], t = 1, e = 0, i = "") {
|
|
92
92
|
return h.sort((s, o) => (s.sort ?? 0) - (o.sort ?? 0)).map((s) => {
|
|
93
93
|
if (s.children) {
|
|
94
94
|
let o = 0, r = s.fixed;
|
|
95
95
|
s.children.forEach((l) => {
|
|
96
96
|
l.fixed = r;
|
|
97
97
|
});
|
|
98
|
-
const a =
|
|
98
|
+
const a = rt(s.children, t - 1, e + 1, s.key);
|
|
99
99
|
return a && a.forEach((l) => {
|
|
100
100
|
o += l.colspan ?? 0;
|
|
101
101
|
}), {
|
|
@@ -117,10 +117,10 @@ function nt(h = [], t = 1, e = 0, i = "") {
|
|
|
117
117
|
};
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function J(h = []) {
|
|
121
121
|
let t = [];
|
|
122
122
|
return h.forEach((e) => {
|
|
123
|
-
e.children ? t = t.concat(
|
|
123
|
+
e.children ? t = t.concat(J(e.children)) : t.push(e);
|
|
124
124
|
}), t;
|
|
125
125
|
}
|
|
126
126
|
function $t(h) {
|
|
@@ -1052,7 +1052,7 @@ class ye {
|
|
|
1052
1052
|
// 初始化默认不忽略清空改变值和校验map
|
|
1053
1053
|
init(t = !0) {
|
|
1054
1054
|
this.ctx.paint.clearTextCache(), this.clearBufferData(), this.rowKeyMap.clear(), this.checkboxKeyMap.clear(), this.colIndexKeyMap.clear(), this.rowIndexRowKeyMap.clear(), this.rowKeyRowIndexMap.clear(), this.maxRowHeightMap.clear();
|
|
1055
|
-
const e = this.getColumns(), i =
|
|
1055
|
+
const e = this.getColumns(), i = J(e);
|
|
1056
1056
|
if (this.ctx.hasSelection = i.some((s) => s.type === "selection"), this.ctx.hasTree = i.some((s) => s.type === "tree"), t) {
|
|
1057
1057
|
this.originalDataMap.clear(), this.changedDataMap.clear(), this.validationErrorMap.clear();
|
|
1058
1058
|
const { ROW_KEY: s } = this.ctx.config;
|
|
@@ -2229,6 +2229,9 @@ class ye {
|
|
|
2229
2229
|
let i = {};
|
|
2230
2230
|
return e(t, i), i;
|
|
2231
2231
|
}
|
|
2232
|
+
clearChangeData() {
|
|
2233
|
+
this.changedDataMap.clear();
|
|
2234
|
+
}
|
|
2232
2235
|
}
|
|
2233
2236
|
class be {
|
|
2234
2237
|
constructor(t) {
|
|
@@ -2638,8 +2641,6 @@ class Dt {
|
|
|
2638
2641
|
n(this, "_config", {});
|
|
2639
2642
|
/** CSS 类名前缀 */
|
|
2640
2643
|
n(this, "CSS_PREFIX", "e-virt-table");
|
|
2641
|
-
/** 绘制时间 */
|
|
2642
|
-
n(this, "DRAW_TIME_MULTIPLIER", 2);
|
|
2643
2644
|
/** 图标集合 */
|
|
2644
2645
|
n(this, "ICONS", []);
|
|
2645
2646
|
/** 行的唯一标识键 */
|
|
@@ -3146,7 +3147,7 @@ class Te {
|
|
|
3146
3147
|
return this.list.find((e) => e.name === t);
|
|
3147
3148
|
}
|
|
3148
3149
|
}
|
|
3149
|
-
class
|
|
3150
|
+
class wt extends jt {
|
|
3150
3151
|
constructor(e, i, s, o, r, a, l) {
|
|
3151
3152
|
super(e, s, o, r, a, "header", l.fixed);
|
|
3152
3153
|
n(this, "align");
|
|
@@ -3449,7 +3450,7 @@ class Oe {
|
|
|
3449
3450
|
!0
|
|
3450
3451
|
), this.handleBodyEvent(i, e, this.ctx.body.renderRows, (s) => {
|
|
3451
3452
|
var o;
|
|
3452
|
-
this.imageEnterAndLeave(s, t), this.ctx.emit("cellMouseenter", s, t), this.ctx.hoverCell && this.ctx.hoverCell !== s && this.ctx.emit("cellMouseleave", s, t), this.ctx.hoverCell !== s && (((o = this.ctx.hoverCell) == null ? void 0 : o.rowKey) !== s.rowKey && (this.ctx.hoverCell = s, this.ctx.hoverRow = this.ctx.body.renderRows.find((r) => r.rowKey === s.rowKey), this.ctx.emit("rowHoverChange", this.ctx.hoverRow, s, t), this.ctx.emit("
|
|
3453
|
+
this.imageEnterAndLeave(s, t), this.ctx.emit("cellMouseenter", s, t), this.ctx.hoverCell && this.ctx.hoverCell !== s && this.ctx.emit("cellMouseleave", s, t), this.ctx.hoverCell !== s && (((o = this.ctx.hoverCell) == null ? void 0 : o.rowKey) !== s.rowKey && (this.ctx.hoverCell = s, this.ctx.hoverRow = this.ctx.body.renderRows.find((r) => r.rowKey === s.rowKey), this.ctx.emit("rowHoverChange", this.ctx.hoverRow, s, t), this.ctx.emit("draw")), this.ctx.hoverCell = s, this.ctx.emit("cellHoverChange", s, t));
|
|
3453
3454
|
}), this.handleFooterEvent(i, e, this.ctx.footer.renderRows, (s) => {
|
|
3454
3455
|
this.ctx.emit("cellFooterMouseenter", s, t), this.ctx.hoverCell && this.ctx.hoverCell !== s && this.ctx.emit("cellFooterMouseleave", s, t), this.ctx.emit("cellFooterHoverChange", s, t);
|
|
3455
3456
|
});
|
|
@@ -3474,7 +3475,7 @@ class Oe {
|
|
|
3474
3475
|
t.drawSelectionImageWidth,
|
|
3475
3476
|
t.drawSelectionImageHeight
|
|
3476
3477
|
))
|
|
3477
|
-
if (t instanceof
|
|
3478
|
+
if (t instanceof wt)
|
|
3478
3479
|
t.drawSelectionImageName === "checkbox-uncheck" || t.drawSelectionImageName === "checkbox-indeterminate" ? this.ctx.database.toggleAllSelection() : t.drawSelectionImageName === "checkbox-check" && this.ctx.database.clearSelection(!0);
|
|
3479
3480
|
else {
|
|
3480
3481
|
if (!this.ctx.database.getRowSelectable(t.rowKey))
|
|
@@ -3539,7 +3540,7 @@ class Oe {
|
|
|
3539
3540
|
*/
|
|
3540
3541
|
imageEnterAndLeave(t, e) {
|
|
3541
3542
|
const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), o = i, r = s;
|
|
3542
|
-
if (t instanceof
|
|
3543
|
+
if (t instanceof wt) {
|
|
3543
3544
|
if (t.drawSelectionImageSource && this.isInsideElement(
|
|
3544
3545
|
r,
|
|
3545
3546
|
o,
|
|
@@ -3789,7 +3790,6 @@ class Le {
|
|
|
3789
3790
|
n(this, "database");
|
|
3790
3791
|
n(this, "history");
|
|
3791
3792
|
n(this, "config");
|
|
3792
|
-
n(this, "drawTime", 0);
|
|
3793
3793
|
const {
|
|
3794
3794
|
containerElement: i,
|
|
3795
3795
|
stageElement: s,
|
|
@@ -4257,28 +4257,32 @@ class He {
|
|
|
4257
4257
|
n(this, "renderFixedCellHeaders", []);
|
|
4258
4258
|
this.ctx = t, this.ctx.on(
|
|
4259
4259
|
"resetHeader",
|
|
4260
|
-
|
|
4260
|
+
yt(() => {
|
|
4261
4261
|
this.init(), this.ctx.clearSelector(), this.ctx.emit("draw");
|
|
4262
4262
|
}, 100)
|
|
4263
4263
|
), this.init(), this.initResizeColumn(), this.initDragColumn();
|
|
4264
4264
|
}
|
|
4265
|
-
init() {
|
|
4265
|
+
init(t = !1) {
|
|
4266
4266
|
const {
|
|
4267
|
-
config: { HEADER_HEIGHT:
|
|
4268
|
-
} = this.ctx
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4267
|
+
config: { HEADER_HEIGHT: e, SCROLLER_TRACK_SIZE: i }
|
|
4268
|
+
} = this.ctx;
|
|
4269
|
+
if (!t) {
|
|
4270
|
+
const f = this.ctx.database.getColumns();
|
|
4271
|
+
this.columns = f;
|
|
4272
|
+
}
|
|
4273
|
+
this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [], this.visibleHeight = this.height, this.visibleColumns = $t(this.columns);
|
|
4274
|
+
const s = ot(this.visibleColumns), o = J(this.visibleColumns);
|
|
4275
|
+
this.height = e * s, this.width = o.reduce((f, x) => {
|
|
4272
4276
|
const u = x.width || 100, { maxWidth: g, minWidth: m } = x;
|
|
4273
4277
|
return g && u > g ? f + g : m && u < m ? f + m : f + u;
|
|
4274
4278
|
}, 0), this.columnIndex = 0, this.resizeNum = 0;
|
|
4275
|
-
const r = ue(
|
|
4279
|
+
const r = ue(rt(this.visibleColumns, s));
|
|
4276
4280
|
this.render(r, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
|
|
4277
4281
|
const a = this.ctx.containerElement.getBoundingClientRect();
|
|
4278
4282
|
this.resizeNum > 0 ? this.ctx.stageWidth = Math.floor(a.width) : this.ctx.stageWidth = Math.min(
|
|
4279
|
-
Math.floor(this.width +
|
|
4283
|
+
Math.floor(this.width + i),
|
|
4280
4284
|
Math.floor(a.width)
|
|
4281
|
-
), this.ctx.stageElement.style.width = this.ctx.stageWidth + "px", this.visibleWidth = this.ctx.stageWidth -
|
|
4285
|
+
), this.ctx.stageElement.style.width = this.ctx.stageWidth + "px", this.visibleWidth = this.ctx.stageWidth - i;
|
|
4282
4286
|
const l = this.visibleWidth - this.width;
|
|
4283
4287
|
if (this.resizeNum && l > 0) {
|
|
4284
4288
|
const f = Math.floor(l / this.resizeNum * 100) / 100;
|
|
@@ -4287,7 +4291,7 @@ class He {
|
|
|
4287
4291
|
const c = this.fixedLeftCellHeaders.filter((f) => !f.hasChildren);
|
|
4288
4292
|
this.ctx.fixedLeftWidth = c.reduce((f, x) => f + x.width, 0);
|
|
4289
4293
|
const d = this.fixedRightCellHeaders.filter((f) => !f.hasChildren);
|
|
4290
|
-
this.ctx.fixedRightWidth = d.reduce((f, x) => f + x.width,
|
|
4294
|
+
this.ctx.fixedRightWidth = d.reduce((f, x) => f + x.width, i), this.ctx.maxColIndex = this.leafCellHeaders.length - 1, this.ctx.header.x = this.x, this.ctx.header.y = this.y, this.ctx.header.width = this.width, this.ctx.header.height = this.height, this.ctx.header.allCellHeaders = this.allCellHeaders, this.ctx.header.visibleWidth = this.visibleWidth, this.ctx.header.visibleHeight = this.visibleHeight;
|
|
4291
4295
|
}
|
|
4292
4296
|
// 调整表头的宽度
|
|
4293
4297
|
initResizeColumn() {
|
|
@@ -4337,7 +4341,7 @@ class He {
|
|
|
4337
4341
|
if (this.dragingCell && this.dragTarget) {
|
|
4338
4342
|
const t = (c, d = {}) => (c.forEach((f, x) => {
|
|
4339
4343
|
f.children && t(f.children, d), d[f.key] = x;
|
|
4340
|
-
}), d), e = this.ctx.database.getColumns(), i =
|
|
4344
|
+
}), d), e = this.ctx.database.getColumns(), i = rt(e, ot(e)), s = new Ae(i, {
|
|
4341
4345
|
key: "key",
|
|
4342
4346
|
// 节点唯一标识字段(对应我们之前的field)
|
|
4343
4347
|
childrenKey: "children"
|
|
@@ -4389,7 +4393,7 @@ class He {
|
|
|
4389
4393
|
}
|
|
4390
4394
|
});
|
|
4391
4395
|
};
|
|
4392
|
-
i(this.columns)
|
|
4396
|
+
i(this.columns);
|
|
4393
4397
|
let s = 0;
|
|
4394
4398
|
if (this.width < this.visibleWidth) {
|
|
4395
4399
|
const r = this.visibleWidth - this.width;
|
|
@@ -4403,7 +4407,7 @@ class He {
|
|
|
4403
4407
|
width: o,
|
|
4404
4408
|
column: t.column,
|
|
4405
4409
|
columns: this.columns
|
|
4406
|
-
}), this.ctx.database.setCustomHeaderResizableData(t.key, o), this.init(), this.ctx.emit("draw");
|
|
4410
|
+
}), this.ctx.database.setCustomHeaderResizableData(t.key, o), this.init(!0), this.ctx.emit("draw");
|
|
4407
4411
|
}
|
|
4408
4412
|
resizeAllColumn(t) {
|
|
4409
4413
|
if (t === 0) return;
|
|
@@ -4423,7 +4427,7 @@ class He {
|
|
|
4423
4427
|
e.has(r.key) && (r.width = e.get(r.key)), r.children && r.children.length > 0 && s(r.children);
|
|
4424
4428
|
});
|
|
4425
4429
|
};
|
|
4426
|
-
s(this.columns), this.
|
|
4430
|
+
s(this.columns), this.init(!0), this.ctx.emit("draw");
|
|
4427
4431
|
}
|
|
4428
4432
|
getCustomHeader() {
|
|
4429
4433
|
const t = this.ctx.database.getColumns(), e = this.ctx.database.getCustomHeader(), { sortData: i = {} } = e;
|
|
@@ -4431,7 +4435,7 @@ class He {
|
|
|
4431
4435
|
columns: t,
|
|
4432
4436
|
customHeader: e
|
|
4433
4437
|
} : {
|
|
4434
|
-
columns:
|
|
4438
|
+
columns: rt(t, ot(t)),
|
|
4435
4439
|
customHeader: e
|
|
4436
4440
|
};
|
|
4437
4441
|
}
|
|
@@ -4442,8 +4446,8 @@ class He {
|
|
|
4442
4446
|
for (let r = 0; r < i; r++) {
|
|
4443
4447
|
const a = t[r], l = o * (a.rowspan || 0), c = o * (a.level || 0);
|
|
4444
4448
|
let { minWidth: d, maxWidth: f } = a, x = a.width || 100;
|
|
4445
|
-
d && x < d && (x = d), f && x > f && (x = f), a.children && (x =
|
|
4446
|
-
const u = new
|
|
4449
|
+
d && x < d && (x = d), f && x > f && (x = f), a.children && (x = J(a.children).reduce((m, w) => m + ((w == null ? void 0 : w.width) || 100), 0));
|
|
4450
|
+
const u = new wt(this.ctx, this.columnIndex, s, c, x, l, a);
|
|
4447
4451
|
this.ctx.database.setHeader(a.key, u), this.allCellHeaders.push(u), a.children || (this.leafCellHeaders.push(u), u.column.widthFillDisable || this.resizeNum++), a.fixed === "left" ? this.fixedLeftCellHeaders.push(u) : a.fixed === "right" ? this.fixedRightCellHeaders.push(u) : this.centerCellHeaders.push(u), !a.children && this.columnIndex++, a.children && this.render(a.children, s), s += x;
|
|
4448
4452
|
}
|
|
4449
4453
|
}
|
|
@@ -4945,7 +4949,7 @@ class ke {
|
|
|
4945
4949
|
this.moveFocus(t);
|
|
4946
4950
|
}), this.ctx.on(
|
|
4947
4951
|
"mousemove",
|
|
4948
|
-
|
|
4952
|
+
yt((t) => {
|
|
4949
4953
|
var e, i;
|
|
4950
4954
|
(e = this.ctx.focusCell) != null && e.fixed || (i = this.ctx.focusCellHeader) != null && i.fixed || !this.ctx.dragHeaderIng && this.ctx.selectorMove && this.ctx.startAdjustPosition(t);
|
|
4951
4955
|
}, 100)
|
|
@@ -4966,10 +4970,7 @@ class ke {
|
|
|
4966
4970
|
}
|
|
4967
4971
|
window.getComputedStyle(e.target).userSelect !== "text" && e.preventDefault(), this.isMultipleRow = !1, this.click(e.shiftKey), this.ctx.emit("selectorClick", t);
|
|
4968
4972
|
}), this.ctx.on("mouseup", () => {
|
|
4969
|
-
this.ctx.selectorMove = !1, this.ctx.stopAdjustPosition();
|
|
4970
|
-
const t = setTimeout(() => {
|
|
4971
|
-
this.ctx.adjustPositioning = !1, this.ctx.disableHoverIconClick = !1, clearTimeout(t);
|
|
4972
|
-
}, 0);
|
|
4973
|
+
this.ctx.selectorMove = !1, this.ctx.stopAdjustPosition(), this.ctx.adjustPositioning = !1, this.ctx.disableHoverIconClick = !1;
|
|
4973
4974
|
}), this.ctx.on("cellHeaderHoverChange", (t) => {
|
|
4974
4975
|
this.ctx.mousedown && this.selectCols(t);
|
|
4975
4976
|
}), this.ctx.on("cellHoverChange", (t) => {
|
|
@@ -5426,7 +5427,7 @@ class ke {
|
|
|
5426
5427
|
x && (u === "top" ? v = r.height + a.height - w : S = a.visibleHeight);
|
|
5427
5428
|
const R = w + _ - (t - S - f);
|
|
5428
5429
|
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.
|
|
5430
|
+
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.emit("adjustBoundaryPosition", i), this.ctx.setScroll(I, T));
|
|
5430
5431
|
}
|
|
5431
5432
|
destroy() {
|
|
5432
5433
|
}
|
|
@@ -5569,7 +5570,7 @@ class Xe {
|
|
|
5569
5570
|
destroy() {
|
|
5570
5571
|
}
|
|
5571
5572
|
}
|
|
5572
|
-
const j = Math.min, z = Math.max,
|
|
5573
|
+
const j = Math.min, z = Math.max, nt = Math.round, st = Math.floor, Y = (h) => ({
|
|
5573
5574
|
x: h,
|
|
5574
5575
|
y: h
|
|
5575
5576
|
}), Be = {
|
|
@@ -5581,16 +5582,16 @@ const j = Math.min, z = Math.max, at = Math.round, ot = Math.floor, Y = (h) => (
|
|
|
5581
5582
|
start: "end",
|
|
5582
5583
|
end: "start"
|
|
5583
5584
|
};
|
|
5584
|
-
function
|
|
5585
|
+
function mt(h, t, e) {
|
|
5585
5586
|
return z(h, j(t, e));
|
|
5586
5587
|
}
|
|
5587
|
-
function
|
|
5588
|
+
function tt(h, t) {
|
|
5588
5589
|
return typeof h == "function" ? h(t) : h;
|
|
5589
5590
|
}
|
|
5590
5591
|
function $(h) {
|
|
5591
5592
|
return h.split("-")[0];
|
|
5592
5593
|
}
|
|
5593
|
-
function
|
|
5594
|
+
function et(h) {
|
|
5594
5595
|
return h.split("-")[1];
|
|
5595
5596
|
}
|
|
5596
5597
|
function Jt(h) {
|
|
@@ -5608,15 +5609,15 @@ function vt(h) {
|
|
|
5608
5609
|
}
|
|
5609
5610
|
function Fe(h, t, e) {
|
|
5610
5611
|
e === void 0 && (e = !1);
|
|
5611
|
-
const i =
|
|
5612
|
+
const i = et(h), s = vt(h), o = It(s);
|
|
5612
5613
|
let r = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
|
|
5613
|
-
return t.reference[o] > t.floating[o] && (r =
|
|
5614
|
+
return t.reference[o] > t.floating[o] && (r = at(r)), [r, at(r)];
|
|
5614
5615
|
}
|
|
5615
5616
|
function We(h) {
|
|
5616
|
-
const t =
|
|
5617
|
-
return [
|
|
5617
|
+
const t = at(h);
|
|
5618
|
+
return [Et(h), t, Et(t)];
|
|
5618
5619
|
}
|
|
5619
|
-
function
|
|
5620
|
+
function Et(h) {
|
|
5620
5621
|
return h.replace(/start|end/g, (t) => Ye[t]);
|
|
5621
5622
|
}
|
|
5622
5623
|
const Bt = ["left", "right"], Yt = ["right", "left"], Ve = ["top", "bottom"], Pe = ["bottom", "top"];
|
|
@@ -5633,11 +5634,11 @@ function ze(h, t, e) {
|
|
|
5633
5634
|
}
|
|
5634
5635
|
}
|
|
5635
5636
|
function $e(h, t, e, i) {
|
|
5636
|
-
const s =
|
|
5637
|
+
const s = et(h);
|
|
5637
5638
|
let o = ze($(h), e === "start", i);
|
|
5638
|
-
return s && (o = o.map((r) => r + "-" + s), t && (o = o.concat(o.map(
|
|
5639
|
+
return s && (o = o.map((r) => r + "-" + s), t && (o = o.concat(o.map(Et)))), o;
|
|
5639
5640
|
}
|
|
5640
|
-
function
|
|
5641
|
+
function at(h) {
|
|
5641
5642
|
return h.replace(/left|right|bottom|top/g, (t) => Be[t]);
|
|
5642
5643
|
}
|
|
5643
5644
|
function Ge(h) {
|
|
@@ -5657,7 +5658,7 @@ function Qt(h) {
|
|
|
5657
5658
|
left: h
|
|
5658
5659
|
};
|
|
5659
5660
|
}
|
|
5660
|
-
function
|
|
5661
|
+
function lt(h) {
|
|
5661
5662
|
const {
|
|
5662
5663
|
x: t,
|
|
5663
5664
|
y: e,
|
|
@@ -5713,7 +5714,7 @@ function Kt(h, t, e) {
|
|
|
5713
5714
|
y: i.y
|
|
5714
5715
|
};
|
|
5715
5716
|
}
|
|
5716
|
-
switch (
|
|
5717
|
+
switch (et(t)) {
|
|
5717
5718
|
case "start":
|
|
5718
5719
|
u[r] -= x * (e && c ? -1 : 1);
|
|
5719
5720
|
break;
|
|
@@ -5800,7 +5801,7 @@ async function te(h, t) {
|
|
|
5800
5801
|
elementContext: f = "floating",
|
|
5801
5802
|
altBoundary: x = !1,
|
|
5802
5803
|
padding: u = 0
|
|
5803
|
-
} =
|
|
5804
|
+
} = tt(t, h), g = Qt(u), w = a[x ? f === "floating" ? "reference" : "floating" : f], E = lt(await o.getClippingRect({
|
|
5804
5805
|
element: (e = await (o.isElement == null ? void 0 : o.isElement(w))) == null || e ? w : w.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(a.floating)),
|
|
5805
5806
|
boundary: c,
|
|
5806
5807
|
rootBoundary: d,
|
|
@@ -5816,7 +5817,7 @@ async function te(h, t) {
|
|
|
5816
5817
|
} : {
|
|
5817
5818
|
x: 1,
|
|
5818
5819
|
y: 1
|
|
5819
|
-
}, y =
|
|
5820
|
+
}, y = lt(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
5820
5821
|
elements: a,
|
|
5821
5822
|
rect: p,
|
|
5822
5823
|
offsetParent: C,
|
|
@@ -5844,7 +5845,7 @@ const je = (h) => ({
|
|
|
5844
5845
|
} = t, {
|
|
5845
5846
|
element: c,
|
|
5846
5847
|
padding: d = 0
|
|
5847
|
-
} =
|
|
5848
|
+
} = tt(h, t) || {};
|
|
5848
5849
|
if (c == null)
|
|
5849
5850
|
return {};
|
|
5850
5851
|
const f = Qt(d), x = {
|
|
@@ -5853,7 +5854,7 @@ const je = (h) => ({
|
|
|
5853
5854
|
}, 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
5855
|
let _ = v ? v[C] : 0;
|
|
5855
5856
|
(!_ || !await (r.isElement == null ? void 0 : r.isElement(v))) && (_ = a.floating[C] || o.floating[g]);
|
|
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 =
|
|
5857
|
+
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 = mt(O, L, M), D = !l.arrow && et(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
5858
|
return {
|
|
5858
5859
|
[u]: x[u] + H,
|
|
5859
5860
|
data: {
|
|
@@ -5887,10 +5888,10 @@ const je = (h) => ({
|
|
|
5887
5888
|
fallbackAxisSideDirection: g = "none",
|
|
5888
5889
|
flipAlignment: m = !0,
|
|
5889
5890
|
...w
|
|
5890
|
-
} =
|
|
5891
|
+
} = tt(h, t);
|
|
5891
5892
|
if ((e = o.arrow) != null && e.alignmentOffset)
|
|
5892
5893
|
return {};
|
|
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 ? [
|
|
5894
|
+
const E = $(s), p = V(a), C = $(a) === a, b = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), y = x || (C || !m ? [at(a)] : We(a)), v = g !== "none";
|
|
5894
5895
|
!x && v && y.push(...$e(a, m, g, b));
|
|
5895
5896
|
const _ = [a, ...y], S = await te(t, w), R = [];
|
|
5896
5897
|
let I = ((i = o.flip) == null ? void 0 : i.overflows) || [];
|
|
@@ -5953,7 +5954,7 @@ async function Je(h, t) {
|
|
|
5953
5954
|
placement: e,
|
|
5954
5955
|
platform: i,
|
|
5955
5956
|
elements: s
|
|
5956
|
-
} = h, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r = $(e), a =
|
|
5957
|
+
} = h, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r = $(e), a = et(e), l = V(e) === "y", c = Ze.has(r) ? -1 : 1, d = o && l ? -1 : 1, f = tt(t, h);
|
|
5957
5958
|
let {
|
|
5958
5959
|
mainAxis: x,
|
|
5959
5960
|
crossAxis: u,
|
|
@@ -6022,18 +6023,18 @@ const Qe = function(h) {
|
|
|
6022
6023
|
}
|
|
6023
6024
|
},
|
|
6024
6025
|
...l
|
|
6025
|
-
} =
|
|
6026
|
+
} = tt(h, t), c = {
|
|
6026
6027
|
x: e,
|
|
6027
6028
|
y: i
|
|
6028
6029
|
}, d = await te(t, l), f = V($(s)), x = Jt(f);
|
|
6029
6030
|
let u = c[x], g = c[f];
|
|
6030
6031
|
if (o) {
|
|
6031
6032
|
const w = x === "y" ? "top" : "left", E = x === "y" ? "bottom" : "right", p = u + d[w], C = u - d[E];
|
|
6032
|
-
u =
|
|
6033
|
+
u = mt(p, u, C);
|
|
6033
6034
|
}
|
|
6034
6035
|
if (r) {
|
|
6035
6036
|
const w = f === "y" ? "top" : "left", E = f === "y" ? "bottom" : "right", p = g + d[w], C = g - d[E];
|
|
6036
|
-
g =
|
|
6037
|
+
g = mt(p, g, C);
|
|
6037
6038
|
}
|
|
6038
6039
|
const m = a.fn({
|
|
6039
6040
|
...t,
|
|
@@ -6054,7 +6055,7 @@ const Qe = function(h) {
|
|
|
6054
6055
|
}
|
|
6055
6056
|
};
|
|
6056
6057
|
};
|
|
6057
|
-
function
|
|
6058
|
+
function ft() {
|
|
6058
6059
|
return typeof window < "u";
|
|
6059
6060
|
}
|
|
6060
6061
|
function Z(h) {
|
|
@@ -6069,19 +6070,19 @@ function F(h) {
|
|
|
6069
6070
|
return (t = (ee(h) ? h.ownerDocument : h.document) || window.document) == null ? void 0 : t.documentElement;
|
|
6070
6071
|
}
|
|
6071
6072
|
function ee(h) {
|
|
6072
|
-
return
|
|
6073
|
+
return ft() ? h instanceof Node || h instanceof N(h).Node : !1;
|
|
6073
6074
|
}
|
|
6074
6075
|
function X(h) {
|
|
6075
|
-
return
|
|
6076
|
+
return ft() ? h instanceof Element || h instanceof N(h).Element : !1;
|
|
6076
6077
|
}
|
|
6077
6078
|
function K(h) {
|
|
6078
|
-
return
|
|
6079
|
+
return ft() ? h instanceof HTMLElement || h instanceof N(h).HTMLElement : !1;
|
|
6079
6080
|
}
|
|
6080
6081
|
function Ft(h) {
|
|
6081
|
-
return !
|
|
6082
|
+
return !ft() || typeof ShadowRoot > "u" ? !1 : h instanceof ShadowRoot || h instanceof N(h).ShadowRoot;
|
|
6082
6083
|
}
|
|
6083
6084
|
const ei = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
6084
|
-
function
|
|
6085
|
+
function it(h) {
|
|
6085
6086
|
const {
|
|
6086
6087
|
overflow: t,
|
|
6087
6088
|
overflowX: e,
|
|
@@ -6095,7 +6096,7 @@ function si(h) {
|
|
|
6095
6096
|
return ii.has(Z(h));
|
|
6096
6097
|
}
|
|
6097
6098
|
const oi = [":popover-open", ":modal"];
|
|
6098
|
-
function
|
|
6099
|
+
function ut(h) {
|
|
6099
6100
|
return oi.some((t) => {
|
|
6100
6101
|
try {
|
|
6101
6102
|
return h.matches(t);
|
|
@@ -6114,7 +6115,7 @@ function li(h) {
|
|
|
6114
6115
|
for (; K(t) && !q(t); ) {
|
|
6115
6116
|
if (_t(t))
|
|
6116
6117
|
return t;
|
|
6117
|
-
if (
|
|
6118
|
+
if (ut(t))
|
|
6118
6119
|
return null;
|
|
6119
6120
|
t = P(t);
|
|
6120
6121
|
}
|
|
@@ -6130,7 +6131,7 @@ function q(h) {
|
|
|
6130
6131
|
function B(h) {
|
|
6131
6132
|
return N(h).getComputedStyle(h);
|
|
6132
6133
|
}
|
|
6133
|
-
function
|
|
6134
|
+
function xt(h) {
|
|
6134
6135
|
return X(h) ? {
|
|
6135
6136
|
scrollLeft: h.scrollLeft,
|
|
6136
6137
|
scrollTop: h.scrollTop
|
|
@@ -6153,25 +6154,25 @@ function P(h) {
|
|
|
6153
6154
|
}
|
|
6154
6155
|
function ie(h) {
|
|
6155
6156
|
const t = P(h);
|
|
6156
|
-
return q(t) ? h.ownerDocument ? h.ownerDocument.body : h.body : K(t) &&
|
|
6157
|
+
return q(t) ? h.ownerDocument ? h.ownerDocument.body : h.body : K(t) && it(t) ? t : ie(t);
|
|
6157
6158
|
}
|
|
6158
|
-
function
|
|
6159
|
+
function Q(h, t, e) {
|
|
6159
6160
|
var i;
|
|
6160
6161
|
t === void 0 && (t = []), e === void 0 && (e = !0);
|
|
6161
6162
|
const s = ie(h), o = s === ((i = h.ownerDocument) == null ? void 0 : i.body), r = N(s);
|
|
6162
6163
|
if (o) {
|
|
6163
|
-
const a =
|
|
6164
|
-
return t.concat(r, r.visualViewport || [],
|
|
6164
|
+
const a = pt(r);
|
|
6165
|
+
return t.concat(r, r.visualViewport || [], it(s) ? s : [], a && e ? Q(a) : []);
|
|
6165
6166
|
}
|
|
6166
|
-
return t.concat(s,
|
|
6167
|
+
return t.concat(s, Q(s, [], e));
|
|
6167
6168
|
}
|
|
6168
|
-
function
|
|
6169
|
+
function pt(h) {
|
|
6169
6170
|
return h.parent && Object.getPrototypeOf(h.parent) ? h.frameElement : null;
|
|
6170
6171
|
}
|
|
6171
6172
|
function se(h) {
|
|
6172
6173
|
const t = B(h);
|
|
6173
6174
|
let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
|
|
6174
|
-
const s = K(h), o = s ? h.offsetWidth : e, r = s ? h.offsetHeight : i, a =
|
|
6175
|
+
const s = K(h), o = s ? h.offsetWidth : e, r = s ? h.offsetHeight : i, a = nt(e) !== o || nt(i) !== r;
|
|
6175
6176
|
return a && (e = o, i = r), {
|
|
6176
6177
|
width: e,
|
|
6177
6178
|
height: i,
|
|
@@ -6190,7 +6191,7 @@ function U(h) {
|
|
|
6190
6191
|
height: s,
|
|
6191
6192
|
$: o
|
|
6192
6193
|
} = se(t);
|
|
6193
|
-
let r = (o ?
|
|
6194
|
+
let r = (o ? nt(e.width) : e.width) / i, a = (o ? nt(e.height) : e.height) / s;
|
|
6194
6195
|
return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
6195
6196
|
x: r,
|
|
6196
6197
|
y: a
|
|
@@ -6216,13 +6217,13 @@ function G(h, t, e, i) {
|
|
|
6216
6217
|
let l = (s.left + a.x) / r.x, c = (s.top + a.y) / r.y, d = s.width / r.x, f = s.height / r.y;
|
|
6217
6218
|
if (o) {
|
|
6218
6219
|
const x = N(o), u = i && X(i) ? N(i) : i;
|
|
6219
|
-
let g = x, m =
|
|
6220
|
+
let g = x, m = pt(g);
|
|
6220
6221
|
for (; m && i && u !== g; ) {
|
|
6221
6222
|
const w = U(m), E = m.getBoundingClientRect(), p = B(m), C = E.left + (m.clientLeft + parseFloat(p.paddingLeft)) * w.x, b = E.top + (m.clientTop + parseFloat(p.paddingTop)) * w.y;
|
|
6222
|
-
l *= w.x, c *= w.y, d *= w.x, f *= w.y, l += C, c += b, g = N(m), m =
|
|
6223
|
+
l *= w.x, c *= w.y, d *= w.x, f *= w.y, l += C, c += b, g = N(m), m = pt(g);
|
|
6223
6224
|
}
|
|
6224
6225
|
}
|
|
6225
|
-
return
|
|
6226
|
+
return lt({
|
|
6226
6227
|
width: d,
|
|
6227
6228
|
height: f,
|
|
6228
6229
|
x: l,
|
|
@@ -6230,7 +6231,7 @@ function G(h, t, e, i) {
|
|
|
6230
6231
|
});
|
|
6231
6232
|
}
|
|
6232
6233
|
function Ot(h, t) {
|
|
6233
|
-
const e =
|
|
6234
|
+
const e = xt(h).scrollLeft;
|
|
6234
6235
|
return t ? t.left + e : G(F(h)).left + e;
|
|
6235
6236
|
}
|
|
6236
6237
|
function re(h, t, e) {
|
|
@@ -6251,7 +6252,7 @@ function fi(h) {
|
|
|
6251
6252
|
offsetParent: i,
|
|
6252
6253
|
strategy: s
|
|
6253
6254
|
} = h;
|
|
6254
|
-
const o = s === "fixed", r = F(i), a = t ?
|
|
6255
|
+
const o = s === "fixed", r = F(i), a = t ? ut(t.floating) : !1;
|
|
6255
6256
|
if (i === r || a && o)
|
|
6256
6257
|
return e;
|
|
6257
6258
|
let l = {
|
|
@@ -6259,7 +6260,7 @@ function fi(h) {
|
|
|
6259
6260
|
scrollTop: 0
|
|
6260
6261
|
}, c = Y(1);
|
|
6261
6262
|
const d = Y(0), f = K(i);
|
|
6262
|
-
if ((f || !f && !o) && ((Z(i) !== "body" ||
|
|
6263
|
+
if ((f || !f && !o) && ((Z(i) !== "body" || it(r)) && (l = xt(i)), K(i))) {
|
|
6263
6264
|
const u = G(i);
|
|
6264
6265
|
c = U(i), d.x = u.x + i.clientLeft, d.y = u.y + i.clientTop;
|
|
6265
6266
|
}
|
|
@@ -6275,7 +6276,7 @@ function ui(h) {
|
|
|
6275
6276
|
return Array.from(h.getClientRects());
|
|
6276
6277
|
}
|
|
6277
6278
|
function xi(h) {
|
|
6278
|
-
const t = F(h), e =
|
|
6279
|
+
const t = F(h), e = xt(h), i = h.ownerDocument.body, s = z(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = z(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
|
|
6279
6280
|
let r = -e.scrollLeft + Ot(h);
|
|
6280
6281
|
const a = -e.scrollTop;
|
|
6281
6282
|
return B(i).direction === "rtl" && (r += z(t.clientWidth, i.clientWidth) - s), {
|
|
@@ -6327,7 +6328,7 @@ function Wt(h, t, e) {
|
|
|
6327
6328
|
height: t.height
|
|
6328
6329
|
};
|
|
6329
6330
|
}
|
|
6330
|
-
return
|
|
6331
|
+
return lt(i);
|
|
6331
6332
|
}
|
|
6332
6333
|
function ne(h, t) {
|
|
6333
6334
|
const e = P(h);
|
|
@@ -6337,12 +6338,12 @@ function Ei(h, t) {
|
|
|
6337
6338
|
const e = t.get(h);
|
|
6338
6339
|
if (e)
|
|
6339
6340
|
return e;
|
|
6340
|
-
let i =
|
|
6341
|
+
let i = Q(h, [], !1).filter((a) => X(a) && Z(a) !== "body"), s = null;
|
|
6341
6342
|
const o = B(h).position === "fixed";
|
|
6342
6343
|
let r = o ? P(h) : h;
|
|
6343
6344
|
for (; X(r) && !q(r); ) {
|
|
6344
6345
|
const a = B(r), l = _t(r);
|
|
6345
|
-
!l && a.position === "fixed" && (s = null), (o ? !l && !s : !l && a.position === "static" && !!s && wi.has(s.position) ||
|
|
6346
|
+
!l && a.position === "fixed" && (s = null), (o ? !l && !s : !l && a.position === "static" && !!s && wi.has(s.position) || it(r) && !l && ne(h, r)) ? i = i.filter((d) => d !== r) : s = a, r = P(r);
|
|
6346
6347
|
}
|
|
6347
6348
|
return t.set(h, i), i;
|
|
6348
6349
|
}
|
|
@@ -6353,7 +6354,7 @@ function pi(h) {
|
|
|
6353
6354
|
rootBoundary: i,
|
|
6354
6355
|
strategy: s
|
|
6355
6356
|
} = h;
|
|
6356
|
-
const r = [...e === "clippingAncestors" ?
|
|
6357
|
+
const r = [...e === "clippingAncestors" ? ut(t) ? [] : Ei(t, this._c) : [].concat(e), i], a = r[0], l = r.reduce((c, d) => {
|
|
6357
6358
|
const f = Wt(t, d, s);
|
|
6358
6359
|
return c.top = z(f.top, c.top), c.right = j(f.right, c.right), c.bottom = j(f.bottom, c.bottom), c.left = z(f.left, c.left), c;
|
|
6359
6360
|
}, Wt(t, a, s));
|
|
@@ -6385,7 +6386,7 @@ function yi(h, t, e) {
|
|
|
6385
6386
|
l.x = Ot(s);
|
|
6386
6387
|
}
|
|
6387
6388
|
if (i || !i && !o)
|
|
6388
|
-
if ((Z(t) !== "body" ||
|
|
6389
|
+
if ((Z(t) !== "body" || it(s)) && (a = xt(t)), i) {
|
|
6389
6390
|
const u = G(t, !0, o, t);
|
|
6390
6391
|
l.x = u.x + t.clientLeft, l.y = u.y + t.clientTop;
|
|
6391
6392
|
} else s && c();
|
|
@@ -6398,7 +6399,7 @@ function yi(h, t, e) {
|
|
|
6398
6399
|
height: r.height
|
|
6399
6400
|
};
|
|
6400
6401
|
}
|
|
6401
|
-
function
|
|
6402
|
+
function gt(h) {
|
|
6402
6403
|
return B(h).position === "static";
|
|
6403
6404
|
}
|
|
6404
6405
|
function Vt(h, t) {
|
|
@@ -6411,21 +6412,21 @@ function Vt(h, t) {
|
|
|
6411
6412
|
}
|
|
6412
6413
|
function ae(h, t) {
|
|
6413
6414
|
const e = N(h);
|
|
6414
|
-
if (
|
|
6415
|
+
if (ut(h))
|
|
6415
6416
|
return e;
|
|
6416
6417
|
if (!K(h)) {
|
|
6417
6418
|
let s = P(h);
|
|
6418
6419
|
for (; s && !q(s); ) {
|
|
6419
|
-
if (X(s) && !
|
|
6420
|
+
if (X(s) && !gt(s))
|
|
6420
6421
|
return s;
|
|
6421
6422
|
s = P(s);
|
|
6422
6423
|
}
|
|
6423
6424
|
return e;
|
|
6424
6425
|
}
|
|
6425
6426
|
let i = Vt(h, t);
|
|
6426
|
-
for (; i && si(i) &&
|
|
6427
|
+
for (; i && si(i) && gt(i); )
|
|
6427
6428
|
i = Vt(i, t);
|
|
6428
|
-
return i && q(i) &&
|
|
6429
|
+
return i && q(i) && gt(i) && !_t(i) ? e : i || li(h) || e;
|
|
6429
6430
|
}
|
|
6430
6431
|
const bi = async function(h) {
|
|
6431
6432
|
const t = this.getOffsetParent || ae, e = this.getDimensions, i = await e(h.floating);
|
|
@@ -6474,7 +6475,7 @@ function vi(h, t) {
|
|
|
6474
6475
|
} = c;
|
|
6475
6476
|
if (a || t(), !x || !u)
|
|
6476
6477
|
return;
|
|
6477
|
-
const g =
|
|
6478
|
+
const g = st(f), m = st(s.clientWidth - (d + x)), w = st(s.clientHeight - (f + u)), E = st(d), C = {
|
|
6478
6479
|
rootMargin: -g + "px " + -m + "px " + -w + "px " + -E + "px",
|
|
6479
6480
|
threshold: z(0, j(1, l)) || 1
|
|
6480
6481
|
};
|
|
@@ -6503,7 +6504,7 @@ function vi(h, t) {
|
|
|
6503
6504
|
}
|
|
6504
6505
|
return r(!0), o;
|
|
6505
6506
|
}
|
|
6506
|
-
function
|
|
6507
|
+
function Ct(h, t, e, i) {
|
|
6507
6508
|
i === void 0 && (i = {});
|
|
6508
6509
|
const {
|
|
6509
6510
|
ancestorScroll: s = !0,
|
|
@@ -6511,7 +6512,7 @@ function yt(h, t, e, i) {
|
|
|
6511
6512
|
elementResize: r = typeof ResizeObserver == "function",
|
|
6512
6513
|
layoutShift: a = typeof IntersectionObserver == "function",
|
|
6513
6514
|
animationFrame: l = !1
|
|
6514
|
-
} = i, c = Tt(h), d = s || o ? [...c ?
|
|
6515
|
+
} = i, c = Tt(h), d = s || o ? [...c ? Q(c) : [], ...Q(t)] : [];
|
|
6515
6516
|
d.forEach((E) => {
|
|
6516
6517
|
s && E.addEventListener("scroll", e, {
|
|
6517
6518
|
passive: !0
|
|
@@ -6539,7 +6540,7 @@ function yt(h, t, e, i) {
|
|
|
6539
6540
|
}), f == null || f(), (E = u) == null || E.disconnect(), u = null, l && cancelAnimationFrame(g);
|
|
6540
6541
|
};
|
|
6541
6542
|
}
|
|
6542
|
-
const
|
|
6543
|
+
const ct = Qe, ht = ti, Lt = qe, _i = je, dt = (h, t, e) => {
|
|
6543
6544
|
const i = /* @__PURE__ */ new Map(), s = {
|
|
6544
6545
|
platform: Ii,
|
|
6545
6546
|
...e
|
|
@@ -6618,7 +6619,7 @@ let Si = class {
|
|
|
6618
6619
|
return;
|
|
6619
6620
|
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;
|
|
6620
6621
|
const s = t.drawX + i.x, o = t.drawY + i.y;
|
|
6621
|
-
|
|
6622
|
+
dt({
|
|
6622
6623
|
getBoundingClientRect() {
|
|
6623
6624
|
return {
|
|
6624
6625
|
width: t.visibleWidth,
|
|
@@ -6633,7 +6634,7 @@ let Si = class {
|
|
|
6633
6634
|
}
|
|
6634
6635
|
}, this.floatingEl, {
|
|
6635
6636
|
placement: t.overflowTooltipPlacement,
|
|
6636
|
-
middleware: [
|
|
6637
|
+
middleware: [ht(), Lt(), ct(6), _i({ element: this.arrowEl })]
|
|
6637
6638
|
}).then((a) => {
|
|
6638
6639
|
const { x: l, y: c, placement: d, middlewareData: f } = a;
|
|
6639
6640
|
if (Object.assign(this.floatingEl.style, {
|
|
@@ -6766,7 +6767,7 @@ class Ti {
|
|
|
6766
6767
|
"F12"
|
|
6767
6768
|
].includes(e) || this.startEdit(!0);
|
|
6768
6769
|
}), this.ctx.on("cellMouseup", (t) => {
|
|
6769
|
-
if (this.ctx.
|
|
6770
|
+
if (this.ctx.isPointer || !this.isInSelectorRange(t.rowIndex, t.colIndex))
|
|
6770
6771
|
return;
|
|
6771
6772
|
const { xArr: e, yArr: i } = this.ctx.selector, s = JSON.stringify(e) + JSON.stringify(i);
|
|
6772
6773
|
if (this.selectorArrStr === s && this.cellTarget) {
|
|
@@ -6819,7 +6820,7 @@ class Ti {
|
|
|
6819
6820
|
header: d
|
|
6820
6821
|
} = this.ctx;
|
|
6821
6822
|
let f = this.ctx.body.visibleHeight;
|
|
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();
|
|
6823
|
+
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.focus({ preventScroll: !0 }))) : this.inputEl.style.display = "none", (this.inputEl.scrollHeight > o || this.drawY < d.height) && this.autoSize();
|
|
6823
6824
|
}
|
|
6824
6825
|
doneEditByInput() {
|
|
6825
6826
|
if (this.cellTarget && this.cellTarget.editorType === "text") {
|
|
@@ -6830,13 +6831,13 @@ class Ti {
|
|
|
6830
6831
|
startEdit(t = !1) {
|
|
6831
6832
|
this.cancel = !1;
|
|
6832
6833
|
const { ENABLE_EDIT_CLICK_SELECTOR: e } = this.ctx.config;
|
|
6833
|
-
if (!e)
|
|
6834
|
+
if (!e || this.ctx.adjustPositioning)
|
|
6834
6835
|
return;
|
|
6835
6836
|
const i = this.ctx.focusCell;
|
|
6836
6837
|
if (!i || ["index", "index-selection", "selection"].includes(i.type) || this.enable || !(i.isVerticalVisible() && i.isHorizontalVisible()))
|
|
6837
6838
|
return;
|
|
6838
6839
|
const { rowKey: o, key: r } = i, a = this.ctx.database.getReadonly(o, r);
|
|
6839
|
-
i && !a && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = i, this.startEditByInput(this.cellTarget, t), this.ctx.emit("startEdit", this.cellTarget), this.ctx.emit("
|
|
6840
|
+
i && !a && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = i, this.startEditByInput(this.cellTarget, t), this.ctx.emit("startEdit", this.cellTarget), this.ctx.emit("draw"));
|
|
6840
6841
|
}
|
|
6841
6842
|
editCell(t, e) {
|
|
6842
6843
|
const i = this.ctx.body.renderRows.find((c) => c.rowIndex === t);
|
|
@@ -6850,7 +6851,7 @@ class Ti {
|
|
|
6850
6851
|
if (!o || ["index", "index-selection", "selection"].includes(o.type) || this.enable)
|
|
6851
6852
|
return;
|
|
6852
6853
|
const { rowKey: r, key: a } = o, l = this.ctx.database.getReadonly(r, a);
|
|
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("
|
|
6854
|
+
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("draw"));
|
|
6854
6855
|
}
|
|
6855
6856
|
doneEdit() {
|
|
6856
6857
|
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(() => {
|
|
@@ -6893,24 +6894,7 @@ class Li {
|
|
|
6893
6894
|
constructor(t) {
|
|
6894
6895
|
n(this, "ctx");
|
|
6895
6896
|
n(this, "observer");
|
|
6896
|
-
this.ctx = t, this.
|
|
6897
|
-
J(() => {
|
|
6898
|
-
const e = this.ctx.overlayerElement.querySelectorAll('[data-auto-height="true"]'), i = /* @__PURE__ */ new Map();
|
|
6899
|
-
e.forEach((r) => {
|
|
6900
|
-
const a = Number(r.getAttribute("data-row-index")), l = Number(r.getAttribute("data-col-index"));
|
|
6901
|
-
if (isNaN(a) || isNaN(l) || !(r instanceof HTMLElement) || r.offsetWidth === 0)
|
|
6902
|
-
return;
|
|
6903
|
-
const c = `${a}_${l}`;
|
|
6904
|
-
i.set(c, Math.round(r.offsetHeight));
|
|
6905
|
-
});
|
|
6906
|
-
const s = this.ctx.database.getOverlayerAutoHeightMap();
|
|
6907
|
-
if (!this.arerMapsEqual(s, i)) {
|
|
6908
|
-
if (this.ctx.database.setOverlayerAutoHeightMap(i), s.size === 0 && i.size === 0)
|
|
6909
|
-
return;
|
|
6910
|
-
this.ctx.emit("draw");
|
|
6911
|
-
}
|
|
6912
|
-
}, 16.67)
|
|
6913
|
-
), this.observer.observe(this.ctx.overlayerElement, { childList: !0, subtree: !0, attributes: !0 });
|
|
6897
|
+
this.ctx = t, this.init();
|
|
6914
6898
|
}
|
|
6915
6899
|
arerMapsEqual(t, e) {
|
|
6916
6900
|
if (t.size !== e.size) return !1;
|
|
@@ -6918,6 +6902,40 @@ class Li {
|
|
|
6918
6902
|
if (!e.has(i) || e.get(i) !== s) return !1;
|
|
6919
6903
|
return !0;
|
|
6920
6904
|
}
|
|
6905
|
+
init() {
|
|
6906
|
+
this.observer = new MutationObserver(
|
|
6907
|
+
yt(() => {
|
|
6908
|
+
const t = this.ctx.overlayerElement.querySelectorAll('[data-auto-height="true"]'), e = /* @__PURE__ */ new Map();
|
|
6909
|
+
t.forEach((o) => {
|
|
6910
|
+
const r = Number(o.getAttribute("data-row-index")), a = Number(o.getAttribute("data-col-index"));
|
|
6911
|
+
if (isNaN(r) || isNaN(a) || !(o instanceof HTMLElement) || o.offsetWidth === 0)
|
|
6912
|
+
return;
|
|
6913
|
+
const l = `${r}_${a}`;
|
|
6914
|
+
e.set(l, Math.round(o.offsetHeight));
|
|
6915
|
+
});
|
|
6916
|
+
const i = this.ctx.database.getOverlayerAutoHeightMap();
|
|
6917
|
+
if (!this.arerMapsEqual(i, e)) {
|
|
6918
|
+
if (this.ctx.database.setOverlayerAutoHeightMap(e), i.size === 0 && e.size === 0)
|
|
6919
|
+
return;
|
|
6920
|
+
this.ctx.emit("draw");
|
|
6921
|
+
}
|
|
6922
|
+
}, 16.67)
|
|
6923
|
+
), this.observer.observe(this.ctx.overlayerElement, { childList: !0, subtree: !0, attributes: !0 }), this.ctx.overlayerElement.getAttribute("data-overlayer") === "default" && this.ctx.on("overlayerChange", (t) => {
|
|
6924
|
+
const e = this.ctx.overlayerElement;
|
|
6925
|
+
e.replaceChildren(), Object.assign(e.style, t.style), t.views.forEach((i) => {
|
|
6926
|
+
const s = document.createElement("div");
|
|
6927
|
+
s.className = i.class, Object.assign(s.style, i.style), i.views.forEach((o) => {
|
|
6928
|
+
const r = document.createElement("div");
|
|
6929
|
+
Object.assign(r.style, o.style), o.cells.forEach((a) => {
|
|
6930
|
+
const l = document.createElement("div");
|
|
6931
|
+
Object.assign(l.style, a.style), Object.keys(a.domDataset).forEach((c) => {
|
|
6932
|
+
l.setAttribute(c, a.domDataset[c]);
|
|
6933
|
+
}), typeof a.render == "function" && a.render(l, a), r.appendChild(l);
|
|
6934
|
+
}), s.appendChild(r);
|
|
6935
|
+
}), e.appendChild(s);
|
|
6936
|
+
});
|
|
6937
|
+
});
|
|
6938
|
+
}
|
|
6921
6939
|
draw() {
|
|
6922
6940
|
const t = this.getContainer();
|
|
6923
6941
|
this.ctx.emit("overlayerChange", t);
|
|
@@ -7196,10 +7214,10 @@ class Pt {
|
|
|
7196
7214
|
async showSubmenu(t, e) {
|
|
7197
7215
|
if (this.activeSubmenus.has(e)) return;
|
|
7198
7216
|
this.activeSubmenus.add(e), e.classList.add("show");
|
|
7199
|
-
const i =
|
|
7200
|
-
const s = this.container.getBoundingClientRect(), o = window.innerWidth, r = e.offsetWidth || 200, a = o - s.right, l = s.left, c = a >= r || a >= l ? "right-start" : "left-start", { x: d, y: f } = await
|
|
7217
|
+
const i = Ct(t, e, async () => {
|
|
7218
|
+
const s = this.container.getBoundingClientRect(), o = window.innerWidth, r = e.offsetWidth || 200, a = o - s.right, l = s.left, c = a >= r || a >= l ? "right-start" : "left-start", { x: d, y: f } = await dt(t, e, {
|
|
7201
7219
|
placement: c,
|
|
7202
|
-
middleware: [
|
|
7220
|
+
middleware: [ct(8), ht({ padding: 8 })]
|
|
7203
7221
|
});
|
|
7204
7222
|
Object.assign(e.style, {
|
|
7205
7223
|
left: `${d}px`,
|
|
@@ -7266,10 +7284,10 @@ class Pt {
|
|
|
7266
7284
|
}),
|
|
7267
7285
|
contextElement: document.body
|
|
7268
7286
|
};
|
|
7269
|
-
|
|
7270
|
-
|
|
7287
|
+
Ct(e, this.container, () => {
|
|
7288
|
+
dt(e, this.container, {
|
|
7271
7289
|
placement: "right-start",
|
|
7272
|
-
middleware: [
|
|
7290
|
+
middleware: [ct(), ht(), Lt()]
|
|
7273
7291
|
}).then(({ x: i, y: s }) => {
|
|
7274
7292
|
this.container && Object.assign(this.container.style, {
|
|
7275
7293
|
left: `${i}px`,
|
|
@@ -7392,7 +7410,7 @@ class Mi {
|
|
|
7392
7410
|
const S = b.replace("visible_", "");
|
|
7393
7411
|
this.ctx.database.setCustomHeaderHideData([S], !1), this.currentDOMTreeMenu && this.currentDOMTreeMenu.removeSubMenuItem(b);
|
|
7394
7412
|
const R = this.ctx.database.getColumns();
|
|
7395
|
-
|
|
7413
|
+
J(R).filter((O) => O.hide).length === 0 && this.hide();
|
|
7396
7414
|
} else b === "resetHeader" && (this.ctx.database.resetCustomHeader(), this.hide());
|
|
7397
7415
|
}
|
|
7398
7416
|
}), this.positionMenu(e);
|
|
@@ -7414,10 +7432,10 @@ class Mi {
|
|
|
7414
7432
|
}),
|
|
7415
7433
|
contextElement: document.body
|
|
7416
7434
|
};
|
|
7417
|
-
|
|
7418
|
-
|
|
7435
|
+
Ct(e, this.contextMenuEl, () => {
|
|
7436
|
+
dt(e, this.contextMenuEl, {
|
|
7419
7437
|
placement: "right-start",
|
|
7420
|
-
middleware: [
|
|
7438
|
+
middleware: [ct(), ht(), Lt()]
|
|
7421
7439
|
}).then(({ x: i, y: s }) => {
|
|
7422
7440
|
this.contextMenuEl && Object.assign(this.contextMenuEl.style, {
|
|
7423
7441
|
left: `${i}px`,
|
|
@@ -7505,28 +7523,16 @@ class ki {
|
|
|
7505
7523
|
o,
|
|
7506
7524
|
r
|
|
7507
7525
|
);
|
|
7508
|
-
this.ctx = new Le(a, this.options), this.header = new He(this.ctx), this.footer = new Ne(this.ctx), this.body = new De(this.ctx), this.scroller = new Me(this.ctx), this.selector = new ke(this.ctx), this.autofill = new Xe(this.ctx), this.tooltip = new Si(this.ctx), this.empty = new Oi(this.ctx), this.editor = new Ti(this.ctx), this.overlayer = new Li(this.ctx), this.contextMenu = new Mi(this.ctx), this.loading = new Ai(this.ctx), this.ctx.on(
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
},
|
|
7514
|
-
() => this.ctx.drawTime
|
|
7515
|
-
)
|
|
7516
|
-
), this.ctx.on(
|
|
7517
|
-
"drawView",
|
|
7518
|
-
J(
|
|
7519
|
-
() => {
|
|
7520
|
-
this.draw(!0);
|
|
7521
|
-
},
|
|
7522
|
-
() => this.ctx.drawTime
|
|
7523
|
-
)
|
|
7524
|
-
), this.draw();
|
|
7526
|
+
this.ctx = new Le(a, this.options), this.header = new He(this.ctx), this.footer = new Ne(this.ctx), this.body = new De(this.ctx), this.scroller = new Me(this.ctx), this.selector = new ke(this.ctx), this.autofill = new Xe(this.ctx), this.tooltip = new Si(this.ctx), this.empty = new Oi(this.ctx), this.editor = new Ti(this.ctx), this.overlayer = new Li(this.ctx), this.contextMenu = new Mi(this.ctx), this.loading = new Ai(this.ctx), this.ctx.on("draw", () => {
|
|
7527
|
+
this.draw();
|
|
7528
|
+
}), this.ctx.on("drawView", () => {
|
|
7529
|
+
this.draw(!0);
|
|
7530
|
+
}), this.draw();
|
|
7525
7531
|
}
|
|
7526
7532
|
createContainer(t, e, i, s, o) {
|
|
7527
7533
|
t.className = "e-virt-table-container";
|
|
7528
7534
|
const r = document.createElement("div"), a = document.createElement("canvas"), l = e || document.createElement("div");
|
|
7529
|
-
r.className = "e-virt-table-stage", t.tabIndex = 0, a.className = "e-virt-table-canvas", l.className = "e-virt-table-overlayer";
|
|
7535
|
+
r.className = "e-virt-table-stage", t.tabIndex = 0, a.className = "e-virt-table-canvas", l.className = "e-virt-table-overlayer", l.setAttribute("data-overlayer", e ? "custom" : "default");
|
|
7530
7536
|
const c = i || document.createElement("div");
|
|
7531
7537
|
c.className = "e-virt-table-editor";
|
|
7532
7538
|
const d = s, f = o;
|
|
@@ -7542,12 +7548,9 @@ class ki {
|
|
|
7542
7548
|
}
|
|
7543
7549
|
draw(t = !1) {
|
|
7544
7550
|
this.animationFrameId && cancelAnimationFrame(this.animationFrameId), this.animationFrameId = requestAnimationFrame(() => {
|
|
7545
|
-
const e = performance.now();
|
|
7546
7551
|
this.header.update(), this.footer.update(), this.body.update(), this.ctx.paint.clear(), this.body.draw(), this.footer.draw(), this.header.draw(), this.scroller.draw(), t || this.overlayer.draw(), this.animationFrameId2 && cancelAnimationFrame(this.animationFrameId2), this.animationFrameId2 = requestAnimationFrame(() => {
|
|
7547
7552
|
this.body.updateAutoHeight();
|
|
7548
7553
|
});
|
|
7549
|
-
const i = performance.now(), s = Math.round(i - e);
|
|
7550
|
-
this.ctx.drawTime = s * this.ctx.config.DRAW_TIME_MULTIPLIER;
|
|
7551
7554
|
});
|
|
7552
7555
|
}
|
|
7553
7556
|
loadConfig(t) {
|
|
@@ -7790,6 +7793,9 @@ class ki {
|
|
|
7790
7793
|
var e;
|
|
7791
7794
|
return (e = this.ctx.database.getColumnByKey(t)) == null ? void 0 : e.column;
|
|
7792
7795
|
}
|
|
7796
|
+
clearChangeData() {
|
|
7797
|
+
this.ctx.database.clearChangeData(), this.ctx.emit("draw");
|
|
7798
|
+
}
|
|
7793
7799
|
/**
|
|
7794
7800
|
* 销毁
|
|
7795
7801
|
*/
|