e-virt-table 1.2.18 → 1.2.20

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.es.js CHANGED
@@ -11,6 +11,8 @@ class te {
11
11
  const e = [], { column: i, row: s, key: o, rowKey: r, colIndex: l, rowIndex: a, value: h, field: d, fieldValue: f } = t;
12
12
  Array.isArray(this.rules) || (this.rules = [this.rules]);
13
13
  for (const x of this.rules) {
14
+ if (!x.required && (h == null || h === ""))
15
+ return e;
14
16
  if (x.validator) {
15
17
  const u = {
16
18
  field: d,
@@ -433,17 +435,17 @@ class ut extends Dt {
433
435
  if (this.type === "tree" && s === "body") {
434
436
  const a = this.ctx.database.getRowForRowKey(i), { expand: h = !1, hasChildren: d = !1, expandLoading: f = !1, level: x = 0 } = a || {};
435
437
  if (this.rowExpand = h, this.rowHasChildren = d, f) {
436
- const w = this.ctx.icons.get("loading");
437
- l = "loading", o = w, r = x * 8;
438
+ const g = this.ctx.icons.get("loading");
439
+ l = "loading", o = g, r = x * 8;
438
440
  } else if (d) {
439
- const w = this.ctx.icons.get("expand"), g = this.ctx.icons.get("shrink");
440
- o = h ? g : w, l = h ? "shrink" : "expand", r = x * 8;
441
+ const g = this.ctx.icons.get("expand"), w = this.ctx.icons.get("shrink");
442
+ o = h ? w : g, l = h ? "shrink" : "expand", r = x * 8;
441
443
  } else
442
444
  r = x * 8;
443
445
  let u = 20, p = 20;
444
446
  if (o) {
445
- let w = this.drawX + r + e, g = this.drawY + (this.visibleHeight - p) / 2;
446
- this.ctx.paint.drawImage(o, w, g, u, p), this.drawImageX = w, this.drawImageY = g, this.drawImageWidth = u, this.drawImageHeight = p, this.drawImageName = l, this.drawImageSource = o;
447
+ let g = this.drawX + r + e, w = this.drawY + (this.visibleHeight - p) / 2;
448
+ this.ctx.paint.drawImage(o, g, w, u, p), this.drawImageX = g, this.drawImageY = w, this.drawImageWidth = u, this.drawImageHeight = p, this.drawImageName = l, this.drawImageSource = o;
447
449
  }
448
450
  this.align = "left", this.drawTextX = r + this.drawX + u - 0.5;
449
451
  }
@@ -463,12 +465,12 @@ class ut extends Dt {
463
465
  HIGHLIGHT_HOVER_ROW: x,
464
466
  HIGHLIGHT_HOVER_ROW_COLOR: u,
465
467
  STRIPE: p,
466
- STRIPE_COLOR: w
468
+ STRIPE_COLOR: g
467
469
  } = this.ctx.config;
468
470
  if (this.cellType === "footer") {
469
471
  let _ = h, S = a;
470
472
  if (typeof o == "function") {
471
- const v = o, { backgroundColor: b, color: O } = v({
473
+ const I = o, { backgroundColor: b, color: O } = I({
472
474
  row: this.row,
473
475
  rowIndex: this.rowIndex,
474
476
  colIndex: this.colIndex,
@@ -480,17 +482,17 @@ class ut extends Dt {
480
482
  this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = _, this.drawTextColor = S;
481
483
  return;
482
484
  }
483
- let g = "transparent";
484
- const E = this.ctx.hoverCell, C = this.ctx.currentCell;
485
+ let w = "transparent";
486
+ const E = this.ctx.hoverCell, y = this.ctx.currentCell;
485
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 && (g = u), E.rowIndex >= m && E.rowIndex <= R && (g = u)), d && C && (C.rowKey === this.rowKey && (g = f), C.rowIndex >= m && C.rowIndex <= R && (g = f)), this.drawCellSkyBgColor = g;
491
- let y = e, I = l;
492
- if (this.ctx.database.getReadonly(this.rowKey, this.key) || (y = i, I = r), p && (this.rowIndex % 2 ? y = w : y = e), typeof s == "function") {
493
- const _ = s, { backgroundColor: S, color: v } = _({
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;
493
+ let C = e, v = l;
494
+ if (this.ctx.database.getReadonly(this.rowKey, this.key) || (C = i, v = r), p && (this.rowIndex % 2 ? C = g : C = e), typeof s == "function") {
495
+ const _ = s, { backgroundColor: S, color: I } = _({
494
496
  row: this.row,
495
497
  rowIndex: this.rowIndex,
496
498
  colIndex: this.colIndex,
@@ -498,16 +500,16 @@ class ut extends Dt {
498
500
  isHasChanged: this.isHasChanged,
499
501
  value: this.getValue()
500
502
  }) || {};
501
- S && (y = S), v && (I = v);
503
+ S && (C = S), I && (v = I);
502
504
  }
503
- this.drawCellBgColor = y, this.drawTextColor = I;
505
+ this.drawCellBgColor = C, this.drawTextColor = v;
504
506
  }
505
507
  updateSelection() {
506
508
  const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: o, cellType: r, type: l, rowIndex: a, rowKey: h } = this;
507
509
  if (!(s === 0 || o === 0) && r !== "footer" && ["index-selection", "selection"].includes(l)) {
508
510
  const d = this.ctx.database.getRowSelection(h), f = this.ctx.database.getRowSelectable(h), { CHECKBOX_SIZE: x = 0 } = this.ctx.config, u = this.drawX + (e - x) / 2, p = this.drawY + (i - x) / 2;
509
- let w = this.ctx.icons.get("checkbox-uncheck"), g = "checkbox-uncheck";
510
- d && f ? (w = this.ctx.icons.get("checkbox-check"), g = "checkbox-check") : d && f ? (w = this.ctx.icons.get("checkbox-check-disabled"), g = "checkbox-check-disabled") : !d && f ? (w = this.ctx.icons.get("checkbox-uncheck"), g = "checkbox-uncheck") : (w = this.ctx.icons.get("checkbox-disabled"), g = "checkbox-disabled"), w && l == "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === a || ["checkbox-disabled", "checkbox-check"].includes(g)) && (this.drawImageX = u, this.drawImageY = p, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = g, this.drawImageSource = w) : w && l === "selection" && (this.drawImageX = u, this.drawImageY = p, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = g, this.drawImageSource = w);
511
+ let g = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck";
512
+ d && f ? (g = this.ctx.icons.get("checkbox-check"), w = "checkbox-check") : d && f ? (g = this.ctx.icons.get("checkbox-check-disabled"), w = "checkbox-check-disabled") : !d && f ? (g = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck") : (g = this.ctx.icons.get("checkbox-disabled"), w = "checkbox-disabled"), g && l == "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === a || ["checkbox-disabled", "checkbox-check"].includes(w)) && (this.drawImageX = u, this.drawImageY = p, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = g) : g && l === "selection" && (this.drawImageX = u, this.drawImageY = p, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = g);
511
513
  }
512
514
  }
513
515
  updateHoverIcon() {
@@ -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: w, height: g, offsetTop: E, offsetLeft: C } = f;
534
- a = this.drawX - C + w - s - o, h = this.drawY - E + (g - s) / 2;
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);
@@ -632,8 +634,8 @@ class ut extends Dt {
632
634
  return;
633
635
  const { xArr: r, yArr: l } = this.ctx.selector, a = r[1], h = l[1], { colIndex: d, rowIndex: f, drawX: x, drawY: u } = this;
634
636
  if (d === a && f === h) {
635
- const w = d === this.ctx.maxColIndex || f === this.ctx.maxRowIndex || d === this.ctx.lastCenterColIndex ? 6 : 4;
636
- this.ctx.paint.drawRect(x + this.width - w, u + this.height - w, 6, 6, {
637
+ const g = d === this.ctx.maxColIndex || f === this.ctx.maxRowIndex || d === this.ctx.lastCenterColIndex ? 6 : 4;
638
+ this.ctx.paint.drawRect(x + this.width - g, u + this.height - g, 6, 6, {
637
639
  borderColor: o,
638
640
  fillColor: e
639
641
  });
@@ -760,34 +762,34 @@ 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: w, fillColor: g } = e, E = f[0], C = f[1], m = x[0], R = x[1];
764
- if (r >= E && r <= C && o === m) {
765
- const y = r === C ? 1 : 0, I = r === E ? 1 : 0;
766
- this.ctx.paint.drawLine([h + I, d + 1, h + a - y, d + 1], {
767
- borderColor: w,
768
- fillColor: g,
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, v = r === E ? 1 : 0;
768
+ this.ctx.paint.drawLine([h + v, d + 1, h + a - C, d + 1], {
769
+ borderColor: g,
770
+ fillColor: w,
769
771
  borderWidth: p,
770
772
  lineCap: "round",
771
773
  lineJoin: "round",
772
774
  lineDash: u
773
775
  });
774
776
  }
775
- if (r === C && o >= m && o <= R) {
776
- const y = o === m ? 1 : 0, I = o === R ? 1 : 0;
777
- this.ctx.paint.drawLine([h + a - 1, d + y, h + a - 1, d + l - I], {
778
- borderColor: w,
779
- fillColor: g,
777
+ if (r === y && o >= m && o <= R) {
778
+ const C = o === m ? 1 : 0, v = o === R ? 1 : 0;
779
+ this.ctx.paint.drawLine([h + a - 1, d + C, h + a - 1, d + l - v], {
780
+ borderColor: g,
781
+ fillColor: w,
780
782
  borderWidth: p,
781
783
  lineCap: "round",
782
784
  lineJoin: "round",
783
785
  lineDash: u
784
786
  });
785
787
  }
786
- if (r >= E && r <= C && o === R) {
787
- const y = r === C ? 1 : 0, I = r === E ? 1 : 0;
788
- this.ctx.paint.drawLine([h + I, d + l - 1, h + a - y, d + l - 1], {
789
- borderColor: w,
790
- fillColor: g,
788
+ if (r >= E && r <= y && o === R) {
789
+ const C = r === y ? 1 : 0, v = r === E ? 1 : 0;
790
+ this.ctx.paint.drawLine([h + v, d + l - 1, h + a - C, d + l - 1], {
791
+ borderColor: g,
792
+ fillColor: w,
791
793
  borderWidth: p,
792
794
  lineCap: "round",
793
795
  lineJoin: "round",
@@ -795,10 +797,10 @@ class ut extends Dt {
795
797
  });
796
798
  }
797
799
  if (r === E && o >= m && o <= R) {
798
- const y = o === R ? 1 : 0, I = o === m ? 1 : 0;
799
- this.ctx.paint.drawLine([h + 1, d + I, h + 1, d + l - y], {
800
- borderColor: w,
801
- fillColor: g,
800
+ const C = o === R ? 1 : 0, v = o === m ? 1 : 0;
801
+ this.ctx.paint.drawLine([h + 1, d + v, h + 1, d + l - C], {
802
+ borderColor: g,
803
+ fillColor: w,
802
804
  borderWidth: p,
803
805
  lineCap: "round",
804
806
  lineJoin: "round",
@@ -869,30 +871,30 @@ class ae {
869
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}` : St();
870
872
  this.itemRowKeyMap.set(s, x);
871
873
  const u = s._height || a, p = s._readonly;
872
- let w = !0;
873
- if (typeof h == "function" && (w = h), d) {
874
- const C = s[d];
875
- if (this.checkboxKeyMap.has(C)) {
876
- const m = this.checkboxKeyMap.get(C) || [];
877
- m.push(x), this.checkboxKeyMap.set(C, m);
874
+ let g = !0;
875
+ if (typeof h == "function" && (g = h), d) {
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(C, [x]);
881
+ this.checkboxKeyMap.set(y, [x]);
880
882
  }
881
883
  this.selectionMap.set(x, {
882
884
  key: d ? s[d] : x,
883
885
  row: s,
884
886
  check: ((E = this.selectionMap.get(x)) == null ? void 0 : E.check) || !1
885
887
  });
886
- const g = l || this.expandMap.get(x) || s._expand || !1;
887
- this.expandMap.set(x, g), this.rowKeyMap.set(x, {
888
+ const w = l || this.expandMap.get(x) || s._expand || !1;
889
+ this.expandMap.set(x, w), this.rowKeyMap.set(x, {
888
890
  readonly: p,
889
891
  index: o,
890
892
  rowIndex: o,
891
893
  level: e,
892
894
  height: u,
893
895
  check: !1,
894
- selectable: w,
895
- expand: g,
896
+ selectable: g,
897
+ expand: w,
896
898
  expandLazy: !1,
897
899
  hasChildren: s._hasChildren || (Array.isArray(s.children) ? s.children.length > 0 : !1),
898
900
  expandLoading: !1,
@@ -1100,54 +1102,54 @@ class ae {
1100
1102
  * @param history
1101
1103
  * @returns
1102
1104
  */
1103
- async batchSetItemValue(t, e = !1) {
1104
- let i = [];
1105
- const s = /* @__PURE__ */ new Set();
1106
- let o = [], r = t.map((d) => {
1107
- const { rowKey: f, key: x } = d;
1108
- let u = d.value, p = u;
1109
- const w = this.getRowDataItemForRowKey(f), g = this.getItemValue(f, x), E = this.getVirtualBodyCellByKey(f, x);
1110
- return (E == null ? void 0 : E.type) === "number" && (["", void 0, null].includes(u) ? p = null : /^-?\d+(\.\d+)?$/.test(`${u}`) ? p = Number(u) : (p = g, o.push({
1111
- ...d,
1112
- value: p,
1113
- oldValue: g,
1114
- row: w
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
- ...d,
1117
- value: p,
1118
- oldValue: g,
1119
- row: w
1118
+ ...u,
1119
+ value: E,
1120
+ oldValue: m,
1121
+ row: y
1120
1122
  };
1121
1123
  });
1122
- if (r = r.filter((d) => !o.some((f) => d.rowKey === f.rowKey && d.key === f.key)), o.length) {
1123
- const d = {
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: o
1128
+ data: a
1127
1129
  };
1128
- this.ctx.emit("error", d);
1130
+ this.ctx.emit("error", u);
1129
1131
  }
1130
- if (!r.length)
1132
+ if (!h.length)
1131
1133
  return;
1132
- const { BEFORE_VALUE_CHANGE_METHOD: l } = this.ctx.config;
1133
- typeof l == "function" && (r = await l(r)), r.forEach((d) => {
1134
- const { value: f, rowKey: x, key: u, oldValue: p } = d;
1135
- s.add(x), this.setItemValue(x, u, f), i.push({
1136
- rowKey: x,
1137
- key: u,
1138
- oldValue: p,
1139
- newValue: f
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 a = [];
1143
- s.forEach((d) => {
1144
- a.push(this.ctx.database.getRowDataItemForRowKey(d));
1144
+ let f = [];
1145
+ l.forEach((u) => {
1146
+ f.push(this.ctx.database.getRowDataItemForRowKey(u));
1145
1147
  });
1146
- const h = r.map(({ rowKey: d, key: f }) => this.getValidator(d, f));
1147
- Promise.all(h).then(() => {
1148
+ const x = h.map(({ rowKey: u, key: p }) => this.getValidator(u, p));
1149
+ Promise.all(x).then(() => {
1148
1150
  this.validationErrorMap.size === 0 && this.changedDataMap.size > 0 && this.ctx.emit("validateChangedData", this.getChangedData());
1149
- }), this.ctx.emit("change", r, a), e && this.ctx.history.pushState({
1150
- changeList: i,
1151
+ }), this.ctx.emit("change", h, f), e && this.ctx.history.pushState({
1152
+ changeList: o,
1151
1153
  scrollX: this.ctx.scrollX,
1152
1154
  scrollY: this.ctx.scrollY,
1153
1155
  type: "multiple"
@@ -1161,106 +1163,81 @@ class ae {
1161
1163
  * @param history 是否添加历史记录
1162
1164
  * @param reDraw 是否刷新重绘
1163
1165
  * @param isEditor 是否是编辑器
1166
+ * @param checkReadonly 是否检查只读
1164
1167
  * @returns
1165
1168
  */
1166
- async setItemValue(t, e, i, s = !1, o = !1, r = !1) {
1169
+ async setItemValue(t, e, i, s = !1, o = !1, r = !1, l = !0) {
1167
1170
  if (!this.rowKeyMap.has(t))
1168
1171
  return {};
1169
- const { item: l } = this.rowKeyMap.get(t);
1170
- let a = l[e], h = i;
1171
- if (this.ctx.database.getReadonly(t, e))
1172
+ const { item: a } = this.rowKeyMap.get(t);
1173
+ let h = a[e], d = i;
1174
+ if (l && this.ctx.database.getReadonly(t, e))
1172
1175
  return {
1173
- oldValue: a,
1174
- newValue: a
1176
+ oldValue: h,
1177
+ newValue: h
1175
1178
  };
1176
- l[e] !== null && typeof l[e] == "object" && (a = JSON.parse(JSON.stringify(l[e])));
1177
- const d = `${t}​_${e}`;
1178
- this.originalDataMap.has(d) || this.originalDataMap.set(d, a);
1179
- const f = this.originalDataMap.get(d), x = this.getRowDataItemForRowKey(t);
1179
+ a[e] !== null && typeof a[e] == "object" && (h = JSON.parse(JSON.stringify(a[e])));
1180
+ const f = `${t}​_${e}`;
1181
+ this.originalDataMap.has(f) || this.originalDataMap.set(f, h);
1182
+ const x = this.originalDataMap.get(f), u = this.getRowDataItemForRowKey(t);
1180
1183
  if (r) {
1181
- const u = this.getVirtualBodyCellByKey(t, e);
1182
- if ((u == null ? void 0 : u.type) === "number")
1184
+ const p = this.getVirtualBodyCellByKey(t, e);
1185
+ if ((p == null ? void 0 : p.type) === "number")
1183
1186
  if (["", void 0, null].includes(i))
1184
- h = null;
1187
+ d = null;
1185
1188
  else if (/^-?\d+(\.\d+)?$/.test(`${i}`))
1186
- h = Number(i);
1189
+ d = Number(i);
1187
1190
  else {
1188
- h = a;
1189
- const g = {
1191
+ d = h;
1192
+ const w = {
1190
1193
  code: "ERR_SET_NUMBER_VALUE",
1191
1194
  message: "Assignment failed, not a numeric type",
1192
1195
  data: [
1193
1196
  {
1194
1197
  rowKey: t,
1195
1198
  key: e,
1196
- value: h,
1197
- oldValue: a,
1198
- row: x
1199
+ value: d,
1200
+ oldValue: h,
1201
+ row: u
1199
1202
  }
1200
1203
  ]
1201
1204
  };
1202
- this.ctx.emit("error", g);
1205
+ this.ctx.emit("error", w);
1203
1206
  }
1204
- if (h === a)
1207
+ if (d === h)
1205
1208
  return {
1206
- oldValue: a,
1207
- newValue: a
1209
+ oldValue: h,
1210
+ newValue: h
1208
1211
  };
1209
- const { BEFORE_VALUE_CHANGE_METHOD: p } = this.ctx.config;
1210
- if (typeof p == "function") {
1211
- const E = await p([
1212
- {
1213
- rowKey: t,
1214
- key: e,
1215
- value: h,
1216
- oldValue: l[e],
1217
- row: x
1218
- }
1219
- ]);
1220
- E && E.length && (h = E[0].value);
1221
- }
1222
- this.changedDataMap.set(d, h), l[e] = h;
1223
- const w = {
1224
- rowKey: t,
1225
- key: e,
1226
- oldValue: a,
1227
- value: h,
1228
- row: x
1229
- };
1230
- this.getValidator(t, e).then(() => {
1231
- this.validationErrorMap.size === 0 && this.changedDataMap.size > 0 && this.ctx.emit("validateChangedData", this.getChangedData());
1232
- }), this.ctx.emit("change", [w], [x]), 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", {
1233
1222
  rowKey: t,
1234
1223
  key: e,
1235
- oldValue: a,
1236
- value: h,
1237
- originalValue: f,
1238
- row: x
1224
+ oldValue: h,
1225
+ value: d,
1226
+ originalValue: x,
1227
+ row: u
1239
1228
  });
1240
1229
  } else
1241
- this.changedDataMap.set(d, h), l[e] = h;
1230
+ this.changedDataMap.set(f, d), a[e] = d;
1242
1231
  return this.ctx.hasEvent("iterationChange") && this.ctx.emit("iterationChange", {
1243
1232
  rowKey: t,
1244
1233
  key: e,
1245
- oldValue: a,
1246
- value: h,
1247
- originalValue: this.originalDataMap.get(d),
1248
- row: x
1249
- }), s && this.ctx.history.pushState({
1250
- type: "single",
1251
- scrollX: this.ctx.scrollX,
1252
- scrollY: this.ctx.scrollY,
1253
- changeList: [
1254
- {
1255
- rowKey: t,
1256
- key: e,
1257
- oldValue: a,
1258
- newValue: h
1259
- }
1260
- ]
1234
+ oldValue: h,
1235
+ value: d,
1236
+ originalValue: this.originalDataMap.get(f),
1237
+ row: u
1261
1238
  }), o && this.ctx.emit("draw"), {
1262
- oldValue: a,
1263
- newValue: h
1239
+ oldValue: h,
1240
+ newValue: d
1264
1241
  };
1265
1242
  }
1266
1243
  /**
@@ -1380,8 +1357,8 @@ class ae {
1380
1357
  let s = 0, o = 0;
1381
1358
  const r = this.selectionMap.size, l = Array.from(this.selectionMap.values()).some((x) => x.check);
1382
1359
  this.rowKeyMap.forEach((x, u) => {
1383
- var w;
1384
- (w = this.selectionMap.get(u)) != null && w.check && (s += 1);
1360
+ var g;
1361
+ (g = this.selectionMap.get(u)) != null && g.check && (s += 1);
1385
1362
  let p = x.selectable;
1386
1363
  typeof p == "function" && (p = p({
1387
1364
  row: x.item,
@@ -1564,7 +1541,7 @@ class ae {
1564
1541
  width: x,
1565
1542
  colspan: u,
1566
1543
  mergeRow: p,
1567
- mergeCol: w
1544
+ mergeCol: g
1568
1545
  } = t;
1569
1546
  if (d === 1 && u === 1)
1570
1547
  return {
@@ -1585,38 +1562,38 @@ class ae {
1585
1562
  }
1586
1563
  ]
1587
1564
  };
1588
- let g = e, E = e, C = l, m = l, R = [], y = 0, I = 0, _ = 0, S = 0;
1565
+ let w = e, E = e, y = l, m = l, R = [], C = 0, v = 0, _ = 0, S = 0;
1589
1566
  if (d !== 1 && p) {
1590
1567
  S = x;
1591
- const v = a.reduce((b, O) => {
1568
+ const I = a.reduce((b, O) => {
1592
1569
  const L = this.getItemValue(s, O) ?? "";
1593
1570
  return `${b}${L}`;
1594
1571
  }, "");
1595
1572
  for (let b = e - 1; b >= 0; b--) {
1596
1573
  const O = this.rowIndexRowKeyMap.get(b) || "", L = a.reduce((M, T) => {
1597
- const X = this.getItemValue(O, T) ?? "";
1598
- return `${M}${X}`;
1574
+ const k = this.getItemValue(O, T) ?? "";
1575
+ return `${M}${k}`;
1599
1576
  }, "");
1600
- if (v === L)
1601
- g = b;
1577
+ if (I === L)
1578
+ w = b;
1602
1579
  else
1603
1580
  break;
1604
1581
  }
1605
1582
  for (let b = e; b <= this.ctx.maxRowIndex; b++) {
1606
1583
  const O = this.rowIndexRowKeyMap.get(b) || "", L = a.reduce((M, T) => {
1607
- const X = this.getItemValue(O, T) ?? "";
1608
- return `${M}${X}`;
1584
+ const k = this.getItemValue(O, T) ?? "";
1585
+ return `${M}${k}`;
1609
1586
  }, "");
1610
- if (v === L)
1587
+ if (I === L)
1611
1588
  E = b;
1612
1589
  else
1613
1590
  break;
1614
1591
  }
1615
- for (let b = g; b < e; b++) {
1592
+ for (let b = w; b < e; b++) {
1616
1593
  const { height: O } = this.positions[b];
1617
- y += O;
1594
+ C += O;
1618
1595
  }
1619
- for (let b = g; b <= E; b++) {
1596
+ for (let b = w; b <= E; b++) {
1620
1597
  const { height: O } = this.positions[b];
1621
1598
  _ += O;
1622
1599
  const L = this.rowIndexRowKeyMap.get(b) || "", { item: M } = this.rowKeyMap.get(L), T = this.getItemValue(L, i);
@@ -1628,36 +1605,36 @@ class ae {
1628
1605
  });
1629
1606
  }
1630
1607
  }
1631
- if (u !== 1 && w) {
1608
+ if (u !== 1 && g) {
1632
1609
  _ = f;
1633
- for (let v = l - 1; v >= 0; v--) {
1634
- const b = this.getColumnByColIndex(v);
1610
+ for (let I = l - 1; I >= 0; I--) {
1611
+ const b = this.getColumnByColIndex(I);
1635
1612
  if (!b)
1636
1613
  break;
1637
1614
  const O = this.getItemValue(s, i), L = this.getItemValue(s, b.key);
1638
1615
  if (O === L && h.includes(b.key))
1639
- C = v;
1616
+ y = I;
1640
1617
  else
1641
1618
  break;
1642
1619
  }
1643
- for (let v = l; v <= this.ctx.maxColIndex; v++) {
1644
- const b = this.getColumnByColIndex(v);
1620
+ for (let I = l; I <= this.ctx.maxColIndex; I++) {
1621
+ const b = this.getColumnByColIndex(I);
1645
1622
  if (!b)
1646
1623
  break;
1647
1624
  const O = this.getItemValue(s, i), L = this.getItemValue(s, b.key);
1648
1625
  if (O === L && h.includes(b.key))
1649
- m = v;
1626
+ m = I;
1650
1627
  else
1651
1628
  break;
1652
1629
  }
1653
- for (let v = C; v < l; v++) {
1654
- const b = this.getColumnByColIndex(v);
1630
+ for (let I = y; I < l; I++) {
1631
+ const b = this.getColumnByColIndex(I);
1655
1632
  if (!b)
1656
1633
  break;
1657
- I += b.width || 100;
1634
+ v += b.width || 100;
1658
1635
  }
1659
- for (let v = C; v <= m; v++) {
1660
- const b = this.getColumnByColIndex(v);
1636
+ for (let I = y; I <= m; I++) {
1637
+ const b = this.getColumnByColIndex(I);
1661
1638
  if (!b)
1662
1639
  break;
1663
1640
  S += b.width || 100, R.push({
@@ -1669,14 +1646,14 @@ class ae {
1669
1646
  }
1670
1647
  }
1671
1648
  return {
1672
- xArr: [C, m],
1673
- yArr: [g, E],
1649
+ xArr: [y, m],
1650
+ yArr: [w, E],
1674
1651
  rowspan: d,
1675
1652
  colspan: u,
1676
1653
  height: _,
1677
1654
  width: S,
1678
- offsetTop: y,
1679
- offsetLeft: I,
1655
+ offsetTop: C,
1656
+ offsetLeft: v,
1680
1657
  dataList: R
1681
1658
  };
1682
1659
  }
@@ -1775,7 +1752,7 @@ class he {
1775
1752
  value: o.oldValue,
1776
1753
  row: {}
1777
1754
  }));
1778
- this.ctx.setScroll(e, i), this.ctx.database.batchSetItemValue(s, !1), this.historyIndex -= 1;
1755
+ this.ctx.setScroll(e, i), this.ctx.database.batchSetItemValue(s, !1, !1, "back"), this.historyIndex -= 1;
1779
1756
  }
1780
1757
  }
1781
1758
  // 前进
@@ -1788,7 +1765,7 @@ class he {
1788
1765
  value: i.newValue,
1789
1766
  row: {}
1790
1767
  }));
1791
- this.ctx.database.batchSetItemValue(e, !1);
1768
+ this.ctx.database.batchSetItemValue(e, !1, !1, "forward");
1792
1769
  }
1793
1770
  }
1794
1771
  // 清空历史
@@ -2014,8 +1991,8 @@ class fe {
2014
1991
  f === "top" ? x = i + d : f === "bottom" ? x = i + o - d : x = i + (o + 1) / 2;
2015
1992
  let u = 0;
2016
1993
  a === "left" ? u = e + d : a === "right" ? u = e + s - d : u = e + s / 2;
2017
- const { _text: p, ellipsis: w } = this.handleEllipsis(t, s, d, l);
2018
- return this.ctx.fillText(p, u, x), this.ctx.restore(), w;
1994
+ const { _text: p, ellipsis: g } = this.handleEllipsis(t, s, d, l);
1995
+ return this.ctx.fillText(p, u, x), this.ctx.restore(), g;
2019
1996
  }
2020
1997
  handleEllipsis(t, e, i = 0, s = "12px Arial") {
2021
1998
  let o = !1, r = t;
@@ -2449,7 +2426,7 @@ class xe {
2449
2426
  return this.icons.get(t);
2450
2427
  }
2451
2428
  }
2452
- class Xt extends Dt {
2429
+ class kt extends Dt {
2453
2430
  constructor(e, i, s, o, r, l, a) {
2454
2431
  super(e, s, o, r, l, "header", a.fixed);
2455
2432
  n(this, "align");
@@ -2669,7 +2646,7 @@ class ue {
2669
2646
  */
2670
2647
  selectionClick(t) {
2671
2648
  if (["selection", "index-selection"].includes(t.type) && this.ctx.isPointer)
2672
- if (t instanceof Xt)
2649
+ if (t instanceof kt)
2673
2650
  t.drawImageName === "checkbox-uncheck" || t.drawImageName === "checkbox-indeterminate" ? this.ctx.database.toggleAllSelection() : t.drawImageName === "checkbox-check" && this.ctx.database.clearSelection(!0);
2674
2651
  else {
2675
2652
  if (!this.ctx.database.getRowSelectable(t.rowKey))
@@ -2881,31 +2858,31 @@ class ge {
2881
2858
  setConfig(t) {
2882
2859
  this.config = new Ct(t);
2883
2860
  }
2884
- setItemValueByEditor(t, e, i, s = !0, o = !0) {
2861
+ setItemValueByEditor(t, e, i, s = !0, o = !0, r = !0) {
2885
2862
  if (this.config.ENABLE_MERGE_CELL_LINK) {
2886
- const r = this.database.getVirtualBodyCellByKey(t, e);
2887
- if (r && (r.mergeRow || r.mergeCol)) {
2888
- const { dataList: l } = r.getSpanInfo(), a = l.map((h) => ({ ...h, value: i }));
2889
- this.database.batchSetItemValue(a, s);
2863
+ const l = this.database.getVirtualBodyCellByKey(t, e);
2864
+ if (l && (l.mergeRow || l.mergeCol)) {
2865
+ const { dataList: a } = l.getSpanInfo(), h = a.map((d) => ({ ...d, value: i }));
2866
+ this.database.batchSetItemValue(h, s, r);
2890
2867
  return;
2891
2868
  }
2892
2869
  }
2893
- this.database.setItemValue(t, e, i, s, o, !0);
2870
+ this.database.setItemValue(t, e, i, s, o, !0, r);
2894
2871
  }
2895
- batchSetItemValueByEditor(t, e = !0) {
2872
+ batchSetItemValueByEditor(t, e = !0, i = !0) {
2896
2873
  if (this.config.ENABLE_MERGE_CELL_LINK) {
2897
- const i = [];
2898
- t.forEach((s) => {
2899
- const o = this.database.getRowIndexForRowKey(s.rowKey), r = this.database.getColIndexForKey(s.key);
2900
- if (o === void 0 || r === void 0) return;
2901
- const l = this.database.getVirtualBodyCell(o, r);
2902
- if (l) {
2903
- const { dataList: a } = l.getSpanInfo(), h = a.map((d) => ({ ...d, value: s.value }));
2904
- i.push(...h);
2874
+ const s = [];
2875
+ t.forEach((o) => {
2876
+ const r = this.database.getRowIndexForRowKey(o.rowKey), l = this.database.getColIndexForKey(o.key);
2877
+ if (r === void 0 || l === void 0) return;
2878
+ const a = this.database.getVirtualBodyCell(r, l);
2879
+ if (a) {
2880
+ const { dataList: h } = a.getSpanInfo(), d = h.map((f) => ({ ...f, value: o.value }));
2881
+ s.push(...d);
2905
2882
  }
2906
- }), this.database.batchSetItemValue(i, e);
2883
+ }), this.database.batchSetItemValue(s, e, i);
2907
2884
  } else
2908
- this.database.batchSetItemValue(t, e);
2885
+ this.database.batchSetItemValue(t, e, i);
2909
2886
  }
2910
2887
  setFocusCell(t) {
2911
2888
  var e;
@@ -3097,8 +3074,8 @@ class Rt {
3097
3074
  if (this.type === "vertical") {
3098
3075
  this.visibleDistance = h - o - d, this.distance = x - this.visibleDistance + u, this.trackX = a - o, this.trackY = 0, this.splitPoints = [this.trackX, d, this.trackX + o, d], this.trackWidth = o, this.trackHeight = h, this.barX = this.trackX - 1 + (o - r) / 2, this.barWidth = r;
3099
3076
  const p = this.distance ? this.visibleDistance / (x + u) : 0;
3100
- let w = Math.floor(p * this.visibleDistance);
3101
- w < 30 ? w = 30 : w > this.visibleDistance && (w = 0), this.barHeight = w, this.barY = d + this.scroll / this.distance * (this.visibleDistance - this.barHeight), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
3077
+ let g = Math.floor(p * this.visibleDistance);
3078
+ g < 30 ? g = 30 : g > this.visibleDistance && (g = 0), this.barHeight = g, this.barY = d + this.scroll / this.distance * (this.visibleDistance - this.barHeight), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
3102
3079
  } else {
3103
3080
  this.visibleDistance = a - o, this.distance = f - this.visibleDistance, this.splitPoints = [
3104
3081
  a - o,
@@ -3108,9 +3085,9 @@ class Rt {
3108
3085
  ];
3109
3086
  const p = l ? 0 : 0.5;
3110
3087
  this.trackX = 0, this.trackY = h - o + p, this.trackWidth = a, this.trackHeight = o;
3111
- const w = this.distance ? this.visibleDistance / f : 0;
3112
- let g = Math.floor(w * this.visibleDistance);
3113
- this.barY = this.trackY - 1 + (o - r) / 2, g < 30 ? g = 30 : g >= this.visibleDistance && (g = 0), this.barWidth = g, this.barHeight = r, this.barX = this.scroll / this.distance * (this.visibleDistance - this.barWidth), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
3088
+ const g = this.distance ? this.visibleDistance / f : 0;
3089
+ let w = Math.floor(g * this.visibleDistance);
3090
+ this.barY = this.trackY - 1 + (o - r) / 2, w < 30 ? w = 30 : w >= this.visibleDistance && (w = 0), this.barWidth = w, this.barHeight = r, this.barX = this.scroll / this.distance * (this.visibleDistance - this.barWidth), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
3114
3091
  }
3115
3092
  }
3116
3093
  draw() {
@@ -3249,8 +3226,8 @@ class pe {
3249
3226
  this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [];
3250
3227
  const s = Tt(i), o = et(i);
3251
3228
  this.height = t * s, this.width = o.reduce((f, x) => {
3252
- const u = x.width || 100, { maxWidth: p, minWidth: w } = x;
3253
- return p && u > p ? f + p : w && u < w ? f + w : f + u;
3229
+ const u = x.width || 100, { maxWidth: p, minWidth: g } = x;
3230
+ return p && u > p ? f + p : g && u < g ? f + g : f + u;
3254
3231
  }, 0), this.visibleHeight = this.height;
3255
3232
  const r = ee(At(i, s));
3256
3233
  this.columnIndex = 0, this.resizeNum = 0, this.render(r, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
@@ -3353,8 +3330,8 @@ class pe {
3353
3330
  for (let r = 0; r < i; r++) {
3354
3331
  const l = t[r], a = o * (l.rowspan || 0), h = o * (l.level || 0);
3355
3332
  let { minWidth: d, maxWidth: f } = l, x = l.width || 100;
3356
- d && x < d && (x = d), f && x > f && (x = f), l.children && (x = et(l.children).reduce((w, g) => w + ((g == null ? void 0 : g.width) || 100), 0));
3357
- const u = new Xt(this.ctx, this.columnIndex, s, h, x, a, l);
3333
+ d && x < d && (x = d), f && x > f && (x = f), l.children && (x = et(l.children).reduce((g, w) => g + ((w == null ? void 0 : w.width) || 100), 0));
3334
+ const u = new kt(this.ctx, this.columnIndex, s, h, x, a, l);
3358
3335
  this.ctx.database.setHeader(l.key, u), this.allCellHeaders.push(u), l.children || (this.leafCellHeaders.push(u), u.column.widthFillDisable || this.resizeNum++), l.fixed === "left" ? this.fixedLeftCellHeaders.push(u) : l.fixed === "right" ? this.fixedRightCellHeaders.push(u) : this.centerCellHeaders.push(u), !l.children && this.columnIndex++, l.children && this.render(l.children, s), s += x;
3359
3336
  }
3360
3337
  }
@@ -3428,7 +3405,7 @@ class pe {
3428
3405
  }), this.drawTipLine(), this.drawBottomLine();
3429
3406
  }
3430
3407
  }
3431
- class kt {
3408
+ class Xt {
3432
3409
  constructor(t, e, i = 0, s = 0, o = 0, r = 0, l, a = "body") {
3433
3410
  n(this, "ctx");
3434
3411
  n(this, "x", 0);
@@ -3532,33 +3509,33 @@ class Ee {
3532
3509
  this.x = 0, x === "top" && o ? this.y = e.height + i.height : this.y = e.height;
3533
3510
  const { data: u, sumHeight: p } = s.getData();
3534
3511
  this.height = p, this.data = u, this.width = e.width, this.visibleWidth = this.ctx.stageWidth - r;
3535
- const w = this.ctx.footer.height;
3536
- !this.data.length && !l ? this.height = a : !this.data.length && l && (this.height = l - e.height - w - r);
3537
- let g = this.height + e.height + r;
3538
- g += w;
3539
- let E = g;
3540
- const C = window.innerHeight, { top: m } = this.containerRect || this.ctx.containerElement.getBoundingClientRect();
3541
- if (C > m && d && !l) {
3542
- const L = C - m - f;
3543
- L > e.height + r ? E = L : g > h && (E = h);
3544
- } else this.data.length && l ? E = l : this.data.length && h && g > h && (E = h);
3512
+ const g = this.ctx.footer.height;
3513
+ !this.data.length && !l ? this.height = a : !this.data.length && l && (this.height = l - e.height - g - r);
3514
+ let w = this.height + e.height + r;
3515
+ w += g;
3516
+ let E = w;
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;
3520
+ L > e.height + r ? E = L : w > h && (E = h);
3521
+ } else this.data.length && l ? E = l : this.data.length && h && w > h && (E = h);
3545
3522
  E > 0 && (this.ctx.stageHeight = Math.floor(E), this.ctx.stageElement.style.height = `${this.ctx.stageHeight}px`);
3546
3523
  let R = this.ctx.stageHeight - e.height - r;
3547
- o ? this.visibleHeight = R - w : this.visibleHeight = R, this.data.length || (this.height = this.visibleHeight), this.ctx.body.x = this.x, this.ctx.body.y = this.y, this.ctx.body.width = this.width, this.ctx.body.height = this.height, this.ctx.body.visibleWidth = this.visibleWidth, this.ctx.body.visibleHeight = this.visibleHeight, this.ctx.body.data = u;
3548
- const y = window.devicePixelRatio || 1, I = this.ctx.stageWidth * y, _ = this.ctx.stageHeight * y;
3549
- t.width = Math.round(I), t.height = Math.round(_);
3524
+ o ? this.visibleHeight = R - g : this.visibleHeight = R, this.data.length || (this.height = this.visibleHeight), this.ctx.body.x = this.x, this.ctx.body.y = this.y, this.ctx.body.width = this.width, this.ctx.body.height = this.height, this.ctx.body.visibleWidth = this.visibleWidth, this.ctx.body.visibleHeight = this.visibleHeight, this.ctx.body.data = u;
3525
+ const C = window.devicePixelRatio || 1, v = this.ctx.stageWidth * C, _ = this.ctx.stageHeight * C;
3526
+ t.width = Math.round(v), t.height = Math.round(_);
3550
3527
  const S = this.data.length ? "not-empty" : "empty";
3551
3528
  this.ctx.emit("emptyChange", {
3552
3529
  isEmpty: S,
3553
3530
  type: S,
3554
3531
  headerHeight: e.height,
3555
3532
  bodyHeight: this.height,
3556
- footerHeight: w,
3533
+ footerHeight: g,
3557
3534
  width: this.width,
3558
- height: this.data.length ? 0 : a + w
3535
+ height: this.data.length ? 0 : a + g
3559
3536
  });
3560
- const v = Math.round(t.width / y * 1e4) / 1e4, b = Math.round(t.height / y * 1e4) / 1e4;
3561
- this.ctx.canvasElement.setAttribute("style", `height:${b}px;width:${v}px;`), this.ctx.paint.scale(y);
3537
+ const I = Math.round(t.width / C * 1e4) / 1e4, b = Math.round(t.height / C * 1e4) / 1e4;
3538
+ this.ctx.canvasElement.setAttribute("style", `height:${b}px;width:${I}px;`), this.ctx.paint.scale(C);
3562
3539
  }
3563
3540
  // 调整行的高度
3564
3541
  initResizeRow() {
@@ -3600,8 +3577,8 @@ class Ee {
3600
3577
  const x = this.renderRows[f];
3601
3578
  if (o > x.y - h + x.height - 1.5 && o < x.y - h + x.height + 1.5 && o < a - 4)
3602
3579
  for (let p = 0; p < x.cells.length; p++) {
3603
- const w = x.cells[p];
3604
- r > w.drawX + 10 && r < w.drawX + w.width - 10 && w.rowspan === 1 && (this.ctx.stageElement.style.cursor = "row-resize", this.resizeTarget = x);
3580
+ const g = x.cells[p];
3581
+ r > g.drawX + 10 && r < g.drawX + g.width - 10 && g.rowspan === 1 && (this.ctx.stageElement.style.cursor = "row-resize", this.resizeTarget = x);
3605
3582
  }
3606
3583
  }
3607
3584
  }
@@ -3684,8 +3661,8 @@ class Ee {
3684
3661
  this.headIndex = Math.max(0, a), this.tailIndex = Math.min(this.ctx.maxRowIndex, h + 1), this.visibleRows = r.slice(this.headIndex, this.tailIndex + 1), this.ctx.body.headIndex = this.headIndex, this.ctx.body.tailIndex = this.tailIndex, this.ctx.body.visibleRows = this.visibleRows;
3685
3662
  const d = [];
3686
3663
  for (let f = 0; f < this.visibleRows.length; f++) {
3687
- const x = this.headIndex + f, u = this.visibleRows[f], { height: p, top: w } = this.ctx.database.getPositionForRowIndex(x), g = new kt(this.ctx, x, 0, w + this.y, t.width, p, u);
3688
- d.push(g);
3664
+ const x = this.headIndex + f, u = this.visibleRows[f], { height: p, top: g } = this.ctx.database.getPositionForRowIndex(x), w = new Xt(this.ctx, x, 0, g + this.y, t.width, p, u);
3665
+ d.push(w);
3689
3666
  }
3690
3667
  this.renderRows = d, this.ctx.body.renderRows = d;
3691
3668
  }
@@ -3756,7 +3733,7 @@ class me {
3756
3733
  let e = this.y;
3757
3734
  const i = [];
3758
3735
  this.data.forEach((s, o) => {
3759
- const r = new kt(this.ctx, o, 0, e, this.width, t, s, "footer");
3736
+ const r = new Xt(this.ctx, o, 0, e, this.width, t, s, "footer");
3760
3737
  e += t, i.push(r);
3761
3738
  }), this.renderRows = i, this.ctx.footer.renderRows = this.renderRows;
3762
3739
  }
@@ -3904,18 +3881,18 @@ class ye {
3904
3881
  SELECTOR_AREA_MAX_Y: d,
3905
3882
  SELECTOR_AREA_MAX_X_OFFSET: f,
3906
3883
  SELECTOR_AREA_MAX_Y_OFFSET: x
3907
- } = this.ctx.config, u = l, p = a || this.ctx.maxColIndex - f, w = h, g = d || this.ctx.maxRowIndex - x;
3908
- let [E, C] = o, [m, R] = r;
3909
- if (E < u || C > p || m < w || R > g)
3884
+ } = this.ctx.config, u = l, p = a || this.ctx.maxColIndex - f, g = h, w = d || this.ctx.maxRowIndex - x;
3885
+ let [E, y] = o, [m, R] = r;
3886
+ if (E < u || y > p || m < g || R > w)
3910
3887
  return;
3911
3888
  if (this.ctx.stageElement.focus({ preventScroll: !0 }), this.ctx.config.ENABLE_MERGE_CELL_LINK) {
3912
- const I = this.adjustMergeCells(o, r);
3913
- m = I.yArr[0], R = I.yArr[1], E = I.xArr[0], C = I.xArr[1], this.ctx.onlyMergeCell = I.onlyMergeCell;
3889
+ const v = this.adjustMergeCells(o, r);
3890
+ m = v.yArr[0], R = v.yArr[1], E = v.xArr[0], y = v.xArr[1], this.ctx.onlyMergeCell = v.onlyMergeCell;
3914
3891
  }
3915
- E === C && m === R ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, o = [Math.max(u, E), Math.min(p, C)], r = [Math.max(w, m), Math.min(g, R)];
3916
- const { BEFORE_SET_SELECTOR_METHOD: y } = this.ctx.config;
3917
- if (typeof y == "function") {
3918
- const _ = y({
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)];
3893
+ const { BEFORE_SET_SELECTOR_METHOD: C } = this.ctx.config;
3894
+ if (typeof C == "function") {
3895
+ const _ = C({
3919
3896
  focusCell: this.ctx.focusCell,
3920
3897
  xArr: o,
3921
3898
  yArr: r
@@ -3931,24 +3908,24 @@ class ye {
3931
3908
  var p;
3932
3909
  const [i, s] = e, [o, r] = t;
3933
3910
  let l = [], a = [];
3934
- for (let w = 0; w <= e[1] - e[0]; w++)
3935
- for (let g = 0; g <= t[1] - t[0]; g++) {
3936
- const E = w + e[0], C = g + t[0], m = this.ctx.database.getVirtualBodyCell(E, C);
3937
- m && ((E === i || E === s) && l.push(m), (C === o || C === r) && a.push(m));
3911
+ for (let g = 0; g <= e[1] - e[0]; g++)
3912
+ for (let w = 0; w <= t[1] - t[0]; w++) {
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));
3938
3915
  }
3939
3916
  const h = l.reduce(
3940
- (w, g) => {
3941
- const { yArr: E } = g.getSpanInfo(), [C, m] = E;
3942
- return w.minY = Math.min(w.minY, C), w.maxY = Math.max(w.maxY, m), w;
3917
+ (g, w) => {
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;
3943
3920
  },
3944
3921
  {
3945
3922
  minY: i,
3946
3923
  maxY: s
3947
3924
  }
3948
3925
  ), d = a.reduce(
3949
- (w, g) => {
3950
- const { xArr: E } = g.getSpanInfo(), [C, m] = E;
3951
- return w.minX = Math.min(w.minX, C), w.maxX = Math.max(w.maxX, m), w;
3926
+ (g, w) => {
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;
3952
3929
  },
3953
3930
  {
3954
3931
  minX: o,
@@ -3957,8 +3934,8 @@ class ye {
3957
3934
  ), f = [d.minX, d.maxX], x = [h.minY, h.maxY];
3958
3935
  let u = !1;
3959
3936
  if (d.minX !== d.maxX || h.minY !== h.maxY) {
3960
- const w = JSON.stringify(f) + JSON.stringify(x), g = (p = this.ctx.focusCell) == null ? void 0 : p.getSpanInfo();
3961
- u = (g && JSON.stringify(g.xArr) + JSON.stringify(g.yArr)) === w;
3937
+ const g = JSON.stringify(f) + JSON.stringify(x), w = (p = this.ctx.focusCell) == null ? void 0 : p.getSpanInfo();
3938
+ u = (w && JSON.stringify(w.xArr) + JSON.stringify(w.yArr)) === g;
3962
3939
  }
3963
3940
  return {
3964
3941
  xArr: f,
@@ -4101,32 +4078,32 @@ class ye {
4101
4078
  }), this.ctx.emit("draw");
4102
4079
  }).catch((r) => console.error("Copy Failure:", r)) : console.error("current browser does not support the Clipboard API");
4103
4080
  }
4104
- clearSelectedData(t, e, i = !1) {
4105
- let s = [];
4106
- const o = /* @__PURE__ */ new Set();
4107
- for (let l = 0; l <= e[1] - e[0]; l++)
4108
- for (let a = 0; a <= t[1] - t[0]; a++) {
4109
- const h = l + e[0], d = a + t[0], f = this.ctx.database.getItemValueForRowIndexAndColIndex(h, d);
4110
- if (f) {
4111
- const { rowKey: x, key: u } = f;
4112
- this.ctx.database.getReadonly(x, u) || (o.add(x), s.push({
4113
- rowKey: x,
4114
- key: u,
4115
- value: null,
4081
+ clearSelectedData(t, e, i = !1, s = null) {
4082
+ let o = [];
4083
+ const r = /* @__PURE__ */ new Set();
4084
+ for (let a = 0; a <= e[1] - e[0]; a++)
4085
+ for (let h = 0; h <= t[1] - t[0]; h++) {
4086
+ const d = a + e[0], f = h + t[0], x = this.ctx.database.getItemValueForRowIndexAndColIndex(d, f);
4087
+ if (x) {
4088
+ const { rowKey: u, key: p } = x;
4089
+ this.ctx.database.getReadonly(u, p) || (r.add(u), o.push({
4090
+ rowKey: u,
4091
+ key: p,
4092
+ value: s,
4116
4093
  row: {}
4117
4094
  //内部有设置
4118
4095
  }));
4119
4096
  }
4120
4097
  }
4121
- if (!s.length)
4098
+ if (!o.length)
4122
4099
  return [];
4123
4100
  if (i)
4124
- return s;
4125
- this.ctx.database.batchSetItemValue(s, !0);
4126
- let r = [];
4127
- return o.forEach((l) => {
4128
- r.push(this.ctx.database.getRowDataItemForRowKey(l));
4129
- }), this.ctx.emit("clearSelectedDataChange", s, r), s;
4101
+ return o;
4102
+ this.ctx.database.batchSetItemValue(o, !0);
4103
+ let l = [];
4104
+ return r.forEach((a) => {
4105
+ l.push(this.ctx.database.getRowDataItemForRowKey(a));
4106
+ }), this.ctx.emit("clearSelectedDataChange", o, l), o;
4130
4107
  }
4131
4108
  paste() {
4132
4109
  if (!navigator.clipboard) {
@@ -4148,8 +4125,8 @@ class ye {
4148
4125
  overflowColCount: p,
4149
4126
  textArr: r
4150
4127
  });
4151
- const w = r.length === 1 && r[0].length === 1;
4152
- if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(l, a) && !w) {
4128
+ const g = r.length === 1 && r[0].length === 1;
4129
+ if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(l, a) && !g) {
4153
4130
  const m = {
4154
4131
  code: "ERR_MERGED_CELLS_PASTE",
4155
4132
  message: "Merged cells cannot span paste data"
@@ -4157,17 +4134,17 @@ class ye {
4157
4134
  this.ctx.hasEvent("error") ? this.ctx.emit("error", m) : alert(m.message);
4158
4135
  return;
4159
4136
  }
4160
- let g = [];
4137
+ let w = [];
4161
4138
  for (let m = 0; m <= r.length - 1; m++) {
4162
4139
  const R = r[m].length;
4163
- for (let y = 0; y <= R - 1; y++) {
4164
- const I = m + e, _ = y + i, S = r[m][y], v = this.ctx.database.getItemValueForRowIndexAndColIndex(
4165
- I,
4140
+ for (let C = 0; C <= R - 1; C++) {
4141
+ const v = m + e, _ = C + i, S = r[m][C], I = this.ctx.database.getItemValueForRowIndexAndColIndex(
4142
+ v,
4166
4143
  _
4167
4144
  );
4168
- if (v) {
4169
- const { rowKey: b, key: O } = v;
4170
- this.ctx.database.getReadonly(b, O) || (s.add(b), g.push({
4145
+ if (I) {
4146
+ const { rowKey: b, key: O } = I;
4147
+ this.ctx.database.getReadonly(b, O) || (s.add(b), w.push({
4171
4148
  rowKey: b,
4172
4149
  key: O,
4173
4150
  value: S,
@@ -4183,30 +4160,30 @@ class ye {
4183
4160
  this.ctx.selector.yArrCopy,
4184
4161
  !0
4185
4162
  // 忽略设置,只返回数据,用于cut,实现历史回退需要返回两次问题
4186
- ), R = g.map((y) => `${y.rowKey}-${y.key}`);
4187
- m.forEach((y) => {
4188
- R.includes(`${y.rowKey}-${y.key}`) || g.unshift(y);
4163
+ ), R = w.map((C) => `${C.rowKey}-${C.key}`);
4164
+ m.forEach((C) => {
4165
+ R.includes(`${C.rowKey}-${C.key}`) || w.unshift(C);
4189
4166
  }), this.isCut = !1;
4190
4167
  }
4191
- if (!g.length)
4168
+ if (!w.length)
4192
4169
  return;
4193
4170
  const { BEFORE_PASTE_DATA_METHOD: E } = this.ctx.config;
4194
4171
  if (typeof E == "function") {
4195
- const m = E, R = g.map((y) => ({
4196
- rowKey: y.rowKey,
4197
- key: y.key,
4198
- value: y.value,
4199
- oldValue: this.ctx.database.getItemValue(y.rowKey, y.key),
4200
- row: this.ctx.database.getRowDataItemForRowKey(y.rowKey)
4172
+ const m = E, R = w.map((C) => ({
4173
+ rowKey: C.rowKey,
4174
+ key: C.key,
4175
+ value: C.value,
4176
+ oldValue: this.ctx.database.getItemValue(C.rowKey, C.key),
4177
+ row: this.ctx.database.getRowDataItemForRowKey(C.rowKey)
4201
4178
  }));
4202
- if (g = await m(R, l, a, r), g && !g.length)
4179
+ if (w = await m(R, l, a, r), w && !w.length)
4203
4180
  return;
4204
4181
  }
4205
- this.clearCopyLine(), this.ctx.batchSetItemValueByEditor(g, !0);
4206
- let C = [];
4182
+ this.clearCopyLine(), this.ctx.batchSetItemValueByEditor(w, !0);
4183
+ let y = [];
4207
4184
  s.forEach((m) => {
4208
- C.push(this.ctx.database.getRowDataItemForRowKey(m));
4209
- }), this.ctx.emit("pasteChange", g, C);
4185
+ y.push(this.ctx.database.getRowDataItemForRowKey(m));
4186
+ }), this.ctx.emit("pasteChange", w, y);
4210
4187
  }).catch((o) => {
4211
4188
  console.error("Failed to get the clipboard content:", o);
4212
4189
  });
@@ -4300,14 +4277,14 @@ class ye {
4300
4277
  if (!i)
4301
4278
  return;
4302
4279
  p && this.ctx.onlyMergeCell && i.updateSpanInfo();
4303
- const { drawX: w, drawY: g, width: E, height: C, fixed: m } = i, R = o - w + 1, y = i.drawX + E - (e - s) + 1;
4304
- let I = r.height - g, _ = C;
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 v = r.height - w, _ = y;
4305
4282
  _ > a.visibleHeight && (_ = a.visibleHeight);
4306
4283
  let S = 0;
4307
- x && (u === "top" ? I = r.height + l.height - g : S = l.visibleHeight);
4308
- const v = g + _ - (t - S - f);
4284
+ x && (u === "top" ? v = r.height + l.height - w : S = l.visibleHeight);
4285
+ const I = w + _ - (t - S - f);
4309
4286
  let b = h, O = d;
4310
- y > 0 && !m ? b = Math.floor(h + y) : 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));
4287
+ C > 0 && !m ? b = Math.floor(h + C) : R > 0 && !m && (b = Math.floor(h - R)), v > 0 ? O = Math.floor(d - v) : I > 0 && (O = Math.floor(d + I)), (Math.abs(h - b) > 2 || Math.abs(d - O) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(b, O), this.ctx.emit("adjustBoundaryPosition", i));
4311
4288
  }
4312
4289
  destroy() {
4313
4290
  this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
@@ -4371,14 +4348,14 @@ class Ce {
4371
4348
  SELECTOR_AREA_MAX_Y: f,
4372
4349
  SELECTOR_AREA_MAX_X_OFFSET: x,
4373
4350
  SELECTOR_AREA_MAX_Y_OFFSET: u
4374
- } = this.ctx.config, p = a, w = h || this.ctx.maxColIndex - x, g = d, E = f || this.ctx.maxRowIndex - u;
4375
- let [C, m] = r, [R, y] = l;
4376
- if (C < p || R < g)
4351
+ } = this.ctx.config, p = a, g = h || this.ctx.maxColIndex - x, w = d, E = f || this.ctx.maxRowIndex - u;
4352
+ let [y, m] = r, [R, C] = l;
4353
+ if (y < p || R < w)
4377
4354
  return;
4378
- r = [Math.max(p, C), Math.min(w, m)], l = [Math.max(g, R), Math.min(E, y)];
4379
- const { BEFORE_SET_AUTOFILL_METHOD: I } = this.ctx.config;
4380
- if (typeof I == "function") {
4381
- const S = I({
4355
+ r = [Math.max(p, y), Math.min(g, m)], l = [Math.max(w, R), Math.min(E, C)];
4356
+ const { BEFORE_SET_AUTOFILL_METHOD: v } = this.ctx.config;
4357
+ if (typeof v == "function") {
4358
+ const S = v({
4382
4359
  focusCell: this.ctx.focusCell,
4383
4360
  xArr: r,
4384
4361
  yArr: l
@@ -4397,8 +4374,8 @@ class Ce {
4397
4374
  const t = /* @__PURE__ */ new Set(), e = this.ctx.getSelectedData(), i = /* @__PURE__ */ new Map();
4398
4375
  for (let u = 0; u <= e.yArr[1] - e.yArr[0]; u++)
4399
4376
  for (let p = 0; p <= e.xArr[1] - e.xArr[0]; p++) {
4400
- const w = u + e.yArr[0], g = p + e.xArr[0];
4401
- i.set(`${w}-${g}`, !0);
4377
+ const g = u + e.yArr[0], w = p + e.xArr[0];
4378
+ i.set(`${g}-${w}`, !0);
4402
4379
  }
4403
4380
  const { value: s } = e, o = s[0].length, r = s.length, l = this.ctx.autofill.xArr, a = this.ctx.autofill.yArr, h = o === 1 && r === 1;
4404
4381
  if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(l, a) && !h) {
@@ -4412,12 +4389,12 @@ class Ce {
4412
4389
  let d = [];
4413
4390
  for (let u = 0; u <= a[1] - a[0]; u++)
4414
4391
  for (let p = 0; p <= l[1] - l[0]; p++) {
4415
- const w = p + l[0], g = u + a[0], E = s[u % r][p % o], C = this.ctx.database.getItemValueForRowIndexAndColIndex(g, w), m = `${g}-${w}`;
4416
- if (C && !i.has(m)) {
4417
- const { rowKey: R, key: y } = C;
4418
- this.ctx.database.getReadonly(R, y) || (t.add(R), d.push({
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;
4395
+ this.ctx.database.getReadonly(R, C) || (t.add(R), d.push({
4419
4396
  rowKey: R,
4420
- key: y,
4397
+ key: C,
4421
4398
  value: E,
4422
4399
  row: {}
4423
4400
  }));
@@ -4428,12 +4405,12 @@ class Ce {
4428
4405
  this.ctx.selector.xArr = this.ctx.autofill.xArr, this.ctx.selector.yArr = this.ctx.autofill.yArr;
4429
4406
  const { BEFORE_AUTOFILL_DATA_METHOD: f } = this.ctx.config;
4430
4407
  if (typeof f == "function") {
4431
- const u = f, p = d.map((w) => ({
4432
- rowKey: w.rowKey,
4433
- key: w.key,
4434
- value: w.value,
4435
- oldValue: this.ctx.database.getItemValue(w.rowKey, w.key),
4436
- row: this.ctx.database.getRowDataItemForRowKey(w.rowKey)
4408
+ const u = f, p = d.map((g) => ({
4409
+ rowKey: g.rowKey,
4410
+ key: g.key,
4411
+ value: g.value,
4412
+ oldValue: this.ctx.database.getItemValue(g.rowKey, g.key),
4413
+ row: this.ctx.database.getRowDataItemForRowKey(g.rowKey)
4437
4414
  }));
4438
4415
  if (d = await u(p, l, a), d && !d.length)
4439
4416
  return;
@@ -4456,7 +4433,7 @@ class Ce {
4456
4433
  destroy() {
4457
4434
  }
4458
4435
  }
4459
- const Z = Math.min, z = Math.max, it = Math.round, V = (c) => ({
4436
+ const Z = Math.min, z = Math.max, it = Math.round, W = (c) => ({
4460
4437
  x: c,
4461
4438
  y: c
4462
4439
  }), be = {
@@ -4492,13 +4469,13 @@ function G(c) {
4492
4469
  function wt(c) {
4493
4470
  return Bt(G(c));
4494
4471
  }
4495
- function ve(c, t, e) {
4472
+ function Ie(c, t, e) {
4496
4473
  e === void 0 && (e = !1);
4497
4474
  const i = Q(c), s = wt(c), o = gt(s);
4498
4475
  let r = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
4499
4476
  return t.reference[o] > t.floating[o] && (r = st(r)), [r, st(r)];
4500
4477
  }
4501
- function Ie(c) {
4478
+ function ve(c) {
4502
4479
  const t = st(c);
4503
4480
  return [ct(c), t, ct(t)];
4504
4481
  }
@@ -4561,7 +4538,7 @@ function ot(c) {
4561
4538
  y: e
4562
4539
  };
4563
4540
  }
4564
- function vt(c, t, e) {
4541
+ function It(c, t, e) {
4565
4542
  let {
4566
4543
  reference: i,
4567
4544
  floating: s
@@ -4623,16 +4600,16 @@ const Le = async (c, t, e) => {
4623
4600
  }), {
4624
4601
  x: d,
4625
4602
  y: f
4626
- } = vt(h, i, a), x = i, u = {}, p = 0;
4627
- for (let w = 0; w < l.length; w++) {
4603
+ } = It(h, i, a), x = i, u = {}, p = 0;
4604
+ for (let g = 0; g < l.length; g++) {
4628
4605
  const {
4629
- name: g,
4606
+ name: w,
4630
4607
  fn: E
4631
- } = l[w], {
4632
- x: C,
4608
+ } = l[g], {
4609
+ x: y,
4633
4610
  y: m,
4634
4611
  data: R,
4635
- reset: y
4612
+ reset: C
4636
4613
  } = await E({
4637
4614
  x: d,
4638
4615
  y: f,
@@ -4647,20 +4624,20 @@ const Le = async (c, t, e) => {
4647
4624
  floating: t
4648
4625
  }
4649
4626
  });
4650
- d = C ?? d, f = m ?? f, u = {
4627
+ d = y ?? d, f = m ?? f, u = {
4651
4628
  ...u,
4652
- [g]: {
4653
- ...u[g],
4629
+ [w]: {
4630
+ ...u[w],
4654
4631
  ...R
4655
4632
  }
4656
- }, y && p <= 50 && (p++, typeof y == "object" && (y.placement && (x = y.placement), y.rects && (h = y.rects === !0 ? await r.getElementRects({
4633
+ }, C && p <= 50 && (p++, typeof C == "object" && (C.placement && (x = C.placement), C.rects && (h = C.rects === !0 ? await r.getElementRects({
4657
4634
  reference: c,
4658
4635
  floating: t,
4659
4636
  strategy: s
4660
- }) : y.rects), {
4637
+ }) : C.rects), {
4661
4638
  x: d,
4662
4639
  y: f
4663
- } = vt(h, x, a)), w = -1);
4640
+ } = It(h, x, a)), g = -1);
4664
4641
  }
4665
4642
  return {
4666
4643
  x: d,
@@ -4686,12 +4663,12 @@ async function Nt(c, t) {
4686
4663
  elementContext: f = "floating",
4687
4664
  altBoundary: x = !1,
4688
4665
  padding: u = 0
4689
- } = J(t, c), p = Kt(u), g = l[x ? f === "floating" ? "reference" : "floating" : f], E = ot(await o.getClippingRect({
4690
- element: (e = await (o.isElement == null ? void 0 : o.isElement(g))) == null || e ? g : g.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(l.floating)),
4666
+ } = J(t, c), p = Kt(u), w = l[x ? f === "floating" ? "reference" : "floating" : f], E = ot(await o.getClippingRect({
4667
+ 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)),
4691
4668
  boundary: h,
4692
4669
  rootBoundary: d,
4693
4670
  strategy: a
4694
- })), C = f === "floating" ? {
4671
+ })), y = f === "floating" ? {
4695
4672
  x: i,
4696
4673
  y: s,
4697
4674
  width: r.floating.width,
@@ -4702,17 +4679,17 @@ async function Nt(c, t) {
4702
4679
  } : {
4703
4680
  x: 1,
4704
4681
  y: 1
4705
- }, y = ot(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
4682
+ }, C = ot(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
4706
4683
  elements: l,
4707
- rect: C,
4684
+ rect: y,
4708
4685
  offsetParent: m,
4709
4686
  strategy: a
4710
- }) : C);
4687
+ }) : y);
4711
4688
  return {
4712
- top: (E.top - y.top + p.top) / R.y,
4713
- bottom: (y.bottom - E.bottom + p.bottom) / R.y,
4714
- left: (E.left - y.left + p.left) / R.x,
4715
- right: (y.right - E.right + p.right) / R.x
4689
+ top: (E.top - C.top + p.top) / R.y,
4690
+ bottom: (C.bottom - E.bottom + p.bottom) / R.y,
4691
+ left: (E.left - C.left + p.left) / R.x,
4692
+ right: (C.right - E.right + p.right) / R.x
4716
4693
  };
4717
4694
  }
4718
4695
  const Te = (c) => ({
@@ -4736,17 +4713,17 @@ const Te = (c) => ({
4736
4713
  const f = Kt(d), x = {
4737
4714
  x: e,
4738
4715
  y: i
4739
- }, u = wt(s), p = gt(u), w = await r.getDimensions(h), g = u === "y", E = g ? "top" : "left", C = g ? "bottom" : "right", m = g ? "clientHeight" : "clientWidth", R = o.reference[p] + o.reference[u] - x[u] - o.floating[p], y = x[u] - o.reference[u], I = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(h));
4740
- let _ = I ? I[m] : 0;
4741
- (!_ || !await (r.isElement == null ? void 0 : r.isElement(I))) && (_ = l.floating[m] || o.floating[p]);
4742
- const S = R / 2 - y / 2, v = _ / 2 - w[p] / 2 - 1, b = Z(f[E], v), O = Z(f[C], v), L = b, M = _ - w[p] - O, T = _ / 2 - w[p] / 2 + S, X = ht(L, T, M), K = !a.arrow && Q(s) != null && T !== X && o.reference[p] / 2 - (T < L ? b : O) - w[p] / 2 < 0, k = K ? T < L ? T - L : T - M : 0;
4716
+ }, u = wt(s), p = gt(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], v = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(h));
4717
+ let _ = v ? v[m] : 0;
4718
+ (!_ || !await (r.isElement == null ? void 0 : r.isElement(v))) && (_ = l.floating[m] || o.floating[p]);
4719
+ const S = R / 2 - C / 2, I = _ / 2 - g[p] / 2 - 1, b = Z(f[E], I), O = Z(f[y], I), L = b, M = _ - g[p] - O, T = _ / 2 - g[p] / 2 + S, k = ht(L, T, M), K = !a.arrow && Q(s) != null && T !== k && o.reference[p] / 2 - (T < L ? b : O) - g[p] / 2 < 0, X = K ? T < L ? T - L : T - M : 0;
4743
4720
  return {
4744
- [u]: x[u] + k,
4721
+ [u]: x[u] + X,
4745
4722
  data: {
4746
- [u]: X,
4747
- centerOffset: T - X - k,
4723
+ [u]: k,
4724
+ centerOffset: T - k - X,
4748
4725
  ...K && {
4749
- alignmentOffset: k
4726
+ alignmentOffset: X
4750
4727
  }
4751
4728
  },
4752
4729
  reset: K
@@ -4771,50 +4748,50 @@ const Te = (c) => ({
4771
4748
  fallbackPlacements: x,
4772
4749
  fallbackStrategy: u = "bestFit",
4773
4750
  fallbackAxisSideDirection: p = "none",
4774
- flipAlignment: w = !0,
4775
- ...g
4751
+ flipAlignment: g = !0,
4752
+ ...w
4776
4753
  } = J(c, t);
4777
4754
  if ((e = o.arrow) != null && e.alignmentOffset)
4778
4755
  return {};
4779
- const E = P(s), C = G(l), m = P(l) === l, R = await (a.isRTL == null ? void 0 : a.isRTL(h.floating)), y = x || (m || !w ? [st(l)] : Ie(l)), I = p !== "none";
4780
- !x && I && y.push(...Oe(l, w, p, R));
4781
- const _ = [l, ...y], S = await Nt(t, g), v = [];
4756
+ const E = P(s), y = G(l), m = P(l) === l, R = await (a.isRTL == null ? void 0 : a.isRTL(h.floating)), C = x || (m || !g ? [st(l)] : ve(l)), v = p !== "none";
4757
+ !x && v && C.push(...Oe(l, g, p, R));
4758
+ const _ = [l, ...C], S = await Nt(t, w), I = [];
4782
4759
  let b = ((i = o.flip) == null ? void 0 : i.overflows) || [];
4783
- if (d && v.push(S[E]), f) {
4784
- const T = ve(s, r, R);
4785
- v.push(S[T[0]], S[T[1]]);
4760
+ if (d && I.push(S[E]), f) {
4761
+ const T = Ie(s, r, R);
4762
+ I.push(S[T[0]], S[T[1]]);
4786
4763
  }
4787
4764
  if (b = [...b, {
4788
4765
  placement: s,
4789
- overflows: v
4790
- }], !v.every((T) => T <= 0)) {
4766
+ overflows: I
4767
+ }], !I.every((T) => T <= 0)) {
4791
4768
  var O, L;
4792
- const T = (((O = o.flip) == null ? void 0 : O.index) || 0) + 1, X = _[T];
4793
- if (X)
4769
+ const T = (((O = o.flip) == null ? void 0 : O.index) || 0) + 1, k = _[T];
4770
+ if (k)
4794
4771
  return {
4795
4772
  data: {
4796
4773
  index: T,
4797
4774
  overflows: b
4798
4775
  },
4799
4776
  reset: {
4800
- placement: X
4777
+ placement: k
4801
4778
  }
4802
4779
  };
4803
- let K = (L = b.filter((k) => k.overflows[0] <= 0).sort((k, Y) => k.overflows[1] - Y.overflows[1])[0]) == null ? void 0 : L.placement;
4780
+ let K = (L = b.filter((X) => X.overflows[0] <= 0).sort((X, Y) => X.overflows[1] - Y.overflows[1])[0]) == null ? void 0 : L.placement;
4804
4781
  if (!K)
4805
4782
  switch (u) {
4806
4783
  case "bestFit": {
4807
4784
  var M;
4808
- const k = (M = b.filter((Y) => {
4809
- if (I) {
4785
+ const X = (M = b.filter((Y) => {
4786
+ if (v) {
4810
4787
  const F = G(Y.placement);
4811
- return F === C || // Create a bias to the `y` side axis due to horizontal
4788
+ return F === y || // Create a bias to the `y` side axis due to horizontal
4812
4789
  // reading directions favoring greater width.
4813
4790
  F === "y";
4814
4791
  }
4815
4792
  return !0;
4816
4793
  }).map((Y) => [Y.placement, Y.overflows.filter((F) => F > 0).reduce((F, qt) => F + qt, 0)]).sort((Y, F) => Y[1] - F[1])[0]) == null ? void 0 : M[0];
4817
- k && (K = k);
4794
+ X && (K = X);
4818
4795
  break;
4819
4796
  }
4820
4797
  case "initialPlacement":
@@ -4894,14 +4871,14 @@ const He = function(c) {
4894
4871
  mainAxis: o = !0,
4895
4872
  crossAxis: r = !1,
4896
4873
  limiter: l = {
4897
- fn: (g) => {
4874
+ fn: (w) => {
4898
4875
  let {
4899
4876
  x: E,
4900
- y: C
4901
- } = g;
4877
+ y
4878
+ } = w;
4902
4879
  return {
4903
4880
  x: E,
4904
- y: C
4881
+ y
4905
4882
  };
4906
4883
  }
4907
4884
  },
@@ -4912,23 +4889,23 @@ const He = function(c) {
4912
4889
  }, d = await Nt(t, a), f = G(P(s)), x = Bt(f);
4913
4890
  let u = h[x], p = h[f];
4914
4891
  if (o) {
4915
- const g = x === "y" ? "top" : "left", E = x === "y" ? "bottom" : "right", C = u + d[g], m = u - d[E];
4916
- u = ht(C, u, m);
4892
+ const w = x === "y" ? "top" : "left", E = x === "y" ? "bottom" : "right", y = u + d[w], m = u - d[E];
4893
+ u = ht(y, u, m);
4917
4894
  }
4918
4895
  if (r) {
4919
- const g = f === "y" ? "top" : "left", E = f === "y" ? "bottom" : "right", C = p + d[g], m = p - d[E];
4920
- p = ht(C, p, m);
4896
+ const w = f === "y" ? "top" : "left", E = f === "y" ? "bottom" : "right", y = p + d[w], m = p - d[E];
4897
+ p = ht(y, p, m);
4921
4898
  }
4922
- const w = l.fn({
4899
+ const g = l.fn({
4923
4900
  ...t,
4924
4901
  [x]: u,
4925
4902
  [f]: p
4926
4903
  });
4927
4904
  return {
4928
- ...w,
4905
+ ...g,
4929
4906
  data: {
4930
- x: w.x - e,
4931
- y: w.y - i,
4907
+ x: g.x - e,
4908
+ y: g.y - i,
4932
4909
  enabled: {
4933
4910
  [x]: o,
4934
4911
  [f]: r
@@ -4961,7 +4938,7 @@ function H(c) {
4961
4938
  function B(c) {
4962
4939
  return rt() ? c instanceof HTMLElement || c instanceof A(c).HTMLElement : !1;
4963
4940
  }
4964
- function It(c) {
4941
+ function vt(c) {
4965
4942
  return !rt() || typeof ShadowRoot > "u" ? !1 : c instanceof ShadowRoot || c instanceof A(c).ShadowRoot;
4966
4943
  }
4967
4944
  function tt(c) {
@@ -4973,7 +4950,7 @@ function tt(c) {
4973
4950
  } = D(c);
4974
4951
  return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
4975
4952
  }
4976
- function Xe(c) {
4953
+ function ke(c) {
4977
4954
  return ["table", "td", "th"].includes(j(c));
4978
4955
  }
4979
4956
  function nt(c) {
@@ -4989,14 +4966,14 @@ function pt(c) {
4989
4966
  const t = Et(), e = H(c) ? D(c) : c;
4990
4967
  return e.transform !== "none" || e.perspective !== "none" || (e.containerType ? e.containerType !== "normal" : !1) || !t && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !t && (e.filter ? e.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((i) => (e.willChange || "").includes(i)) || ["paint", "layout", "strict", "content"].some((i) => (e.contain || "").includes(i));
4991
4968
  }
4992
- function ke(c) {
4993
- let t = W(c);
4969
+ function Xe(c) {
4970
+ let t = V(c);
4994
4971
  for (; B(t) && !U(t); ) {
4995
4972
  if (pt(t))
4996
4973
  return t;
4997
4974
  if (nt(t))
4998
4975
  return null;
4999
- t = W(t);
4976
+ t = V(t);
5000
4977
  }
5001
4978
  return null;
5002
4979
  }
@@ -5018,20 +4995,20 @@ function lt(c) {
5018
4995
  scrollTop: c.scrollY
5019
4996
  };
5020
4997
  }
5021
- function W(c) {
4998
+ function V(c) {
5022
4999
  if (j(c) === "html")
5023
5000
  return c;
5024
5001
  const t = (
5025
5002
  // Step into the shadow DOM of the parent of a slotted node.
5026
5003
  c.assignedSlot || // DOM Element detected.
5027
5004
  c.parentNode || // ShadowRoot detected.
5028
- It(c) && c.host || // Fallback.
5005
+ vt(c) && c.host || // Fallback.
5029
5006
  N(c)
5030
5007
  );
5031
- return It(t) ? t.host : t;
5008
+ return vt(t) ? t.host : t;
5032
5009
  }
5033
5010
  function Ft(c) {
5034
- const t = W(c);
5011
+ const t = V(c);
5035
5012
  return U(t) ? c.ownerDocument ? c.ownerDocument.body : c.body : B(t) && tt(t) ? t : Ft(t);
5036
5013
  }
5037
5014
  function dt(c, t, e) {
@@ -5047,7 +5024,7 @@ function dt(c, t, e) {
5047
5024
  function ft(c) {
5048
5025
  return c.parent && Object.getPrototypeOf(c.parent) ? c.frameElement : null;
5049
5026
  }
5050
- function Vt(c) {
5027
+ function Wt(c) {
5051
5028
  const t = D(c);
5052
5029
  let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
5053
5030
  const s = B(c), o = s ? c.offsetWidth : e, r = s ? c.offsetHeight : i, l = it(e) !== o || it(i) !== r;
@@ -5057,25 +5034,25 @@ function Vt(c) {
5057
5034
  $: l
5058
5035
  };
5059
5036
  }
5060
- function Wt(c) {
5037
+ function Vt(c) {
5061
5038
  return H(c) ? c : c.contextElement;
5062
5039
  }
5063
5040
  function $(c) {
5064
- const t = Wt(c);
5041
+ const t = Vt(c);
5065
5042
  if (!B(t))
5066
- return V(1);
5043
+ return W(1);
5067
5044
  const e = t.getBoundingClientRect(), {
5068
5045
  width: i,
5069
5046
  height: s,
5070
5047
  $: o
5071
- } = Vt(t);
5048
+ } = Wt(t);
5072
5049
  let r = (o ? it(e.width) : e.width) / i, l = (o ? it(e.height) : e.height) / s;
5073
5050
  return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
5074
5051
  x: r,
5075
5052
  y: l
5076
5053
  };
5077
5054
  }
5078
- const Be = /* @__PURE__ */ V(0);
5055
+ const Be = /* @__PURE__ */ W(0);
5079
5056
  function Pt(c) {
5080
5057
  const t = A(c);
5081
5058
  return !Et() || !t.visualViewport ? Be : {
@@ -5088,17 +5065,17 @@ function Ke(c, t, e) {
5088
5065
  }
5089
5066
  function q(c, t, e, i) {
5090
5067
  t === void 0 && (t = !1), e === void 0 && (e = !1);
5091
- const s = c.getBoundingClientRect(), o = Wt(c);
5092
- let r = V(1);
5068
+ const s = c.getBoundingClientRect(), o = Vt(c);
5069
+ let r = W(1);
5093
5070
  t && (i ? H(i) && (r = $(i)) : r = $(c));
5094
- const l = Ke(o, e, i) ? Pt(o) : V(0);
5071
+ const l = Ke(o, e, i) ? Pt(o) : W(0);
5095
5072
  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;
5096
5073
  if (o) {
5097
5074
  const x = A(o), u = i && H(i) ? A(i) : i;
5098
- let p = x, w = ft(p);
5099
- for (; w && i && u !== p; ) {
5100
- const g = $(w), E = w.getBoundingClientRect(), C = D(w), m = E.left + (w.clientLeft + parseFloat(C.paddingLeft)) * g.x, R = E.top + (w.clientTop + parseFloat(C.paddingTop)) * g.y;
5101
- a *= g.x, h *= g.y, d *= g.x, f *= g.y, a += m, h += R, p = A(w), w = ft(p);
5075
+ let p = x, g = ft(p);
5076
+ for (; g && i && u !== p; ) {
5077
+ const w = $(g), E = g.getBoundingClientRect(), y = D(g), m = E.left + (g.clientLeft + parseFloat(y.paddingLeft)) * w.x, R = E.top + (g.clientTop + parseFloat(y.paddingTop)) * w.y;
5078
+ a *= w.x, h *= w.y, d *= w.x, f *= w.y, a += m, h += R, p = A(g), g = ft(p);
5102
5079
  }
5103
5080
  }
5104
5081
  return ot({
@@ -5121,8 +5098,8 @@ function Ne(c) {
5121
5098
  let a = {
5122
5099
  scrollLeft: 0,
5123
5100
  scrollTop: 0
5124
- }, h = V(1);
5125
- const d = V(0), f = B(i);
5101
+ }, h = W(1);
5102
+ const d = W(0), f = B(i);
5126
5103
  if ((f || !f && !o) && ((j(i) !== "body" || tt(r)) && (a = lt(i)), B(i))) {
5127
5104
  const x = q(i);
5128
5105
  h = $(i), d.x = x.x + i.clientLeft, d.y = x.y + i.clientTop;
@@ -5152,7 +5129,7 @@ function Fe(c) {
5152
5129
  y: l
5153
5130
  };
5154
5131
  }
5155
- function Ve(c, t) {
5132
+ function We(c, t) {
5156
5133
  const e = A(c), i = N(c), s = e.visualViewport;
5157
5134
  let o = i.clientWidth, r = i.clientHeight, l = 0, a = 0;
5158
5135
  if (s) {
@@ -5167,8 +5144,8 @@ function Ve(c, t) {
5167
5144
  y: a
5168
5145
  };
5169
5146
  }
5170
- function We(c, t) {
5171
- const e = q(c, !0, t === "fixed"), i = e.top + c.clientTop, s = e.left + c.clientLeft, o = B(c) ? $(c) : V(1), r = c.clientWidth * o.x, l = c.clientHeight * o.y, a = s * o.x, h = i * o.y;
5147
+ function Ve(c, t) {
5148
+ const e = q(c, !0, t === "fixed"), i = e.top + c.clientTop, s = e.left + c.clientLeft, o = B(c) ? $(c) : W(1), r = c.clientWidth * o.x, l = c.clientHeight * o.y, a = s * o.x, h = i * o.y;
5172
5149
  return {
5173
5150
  width: r,
5174
5151
  height: l,
@@ -5179,11 +5156,11 @@ function We(c, t) {
5179
5156
  function _t(c, t, e) {
5180
5157
  let i;
5181
5158
  if (t === "viewport")
5182
- i = Ve(c, e);
5159
+ i = We(c, e);
5183
5160
  else if (t === "document")
5184
5161
  i = Fe(N(c));
5185
5162
  else if (H(t))
5186
- i = We(t, e);
5163
+ i = Ve(t, e);
5187
5164
  else {
5188
5165
  const s = Pt(c);
5189
5166
  i = {
@@ -5195,7 +5172,7 @@ function _t(c, t, e) {
5195
5172
  return ot(i);
5196
5173
  }
5197
5174
  function zt(c, t) {
5198
- const e = W(c);
5175
+ const e = V(c);
5199
5176
  return e === t || !H(e) || U(e) ? !1 : D(e).position === "fixed" || zt(e, t);
5200
5177
  }
5201
5178
  function Pe(c, t) {
@@ -5204,10 +5181,10 @@ function Pe(c, t) {
5204
5181
  return e;
5205
5182
  let i = dt(c, [], !1).filter((l) => H(l) && j(l) !== "body"), s = null;
5206
5183
  const o = D(c).position === "fixed";
5207
- let r = o ? W(c) : c;
5184
+ let r = o ? V(c) : c;
5208
5185
  for (; H(r) && !U(r); ) {
5209
5186
  const l = D(r), a = pt(r);
5210
- !a && l.position === "fixed" && (s = null), (o ? !a && !s : !a && l.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || tt(r) && !a && zt(c, r)) ? i = i.filter((d) => d !== r) : s = l, r = W(r);
5187
+ !a && l.position === "fixed" && (s = null), (o ? !a && !s : !a && l.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || tt(r) && !a && zt(c, r)) ? i = i.filter((d) => d !== r) : s = l, r = V(r);
5211
5188
  }
5212
5189
  return t.set(c, i), i;
5213
5190
  }
@@ -5233,7 +5210,7 @@ function $e(c) {
5233
5210
  const {
5234
5211
  width: t,
5235
5212
  height: e
5236
- } = Vt(c);
5213
+ } = Wt(c);
5237
5214
  return {
5238
5215
  width: t,
5239
5216
  height: e
@@ -5245,7 +5222,7 @@ function Ge(c, t, e) {
5245
5222
  scrollLeft: 0,
5246
5223
  scrollTop: 0
5247
5224
  };
5248
- const a = V(0);
5225
+ const a = W(0);
5249
5226
  if (i || !i && !o)
5250
5227
  if ((j(t) !== "body" || tt(s)) && (l = lt(t)), i) {
5251
5228
  const u = q(t, !0, o, t);
@@ -5281,18 +5258,18 @@ function $t(c, t) {
5281
5258
  if (nt(c))
5282
5259
  return e;
5283
5260
  if (!B(c)) {
5284
- let s = W(c);
5261
+ let s = V(c);
5285
5262
  for (; s && !U(s); ) {
5286
5263
  if (H(s) && !at(s))
5287
5264
  return s;
5288
- s = W(s);
5265
+ s = V(s);
5289
5266
  }
5290
5267
  return e;
5291
5268
  }
5292
5269
  let i = Ot(c, t);
5293
- for (; i && Xe(i) && at(i); )
5270
+ for (; i && ke(i) && at(i); )
5294
5271
  i = Ot(i, t);
5295
- return i && U(i) && at(i) && !pt(i) ? e : i || ke(c) || e;
5272
+ return i && U(i) && at(i) && !pt(i) ? e : i || Xe(c) || e;
5296
5273
  }
5297
5274
  const Ue = async function(c) {
5298
5275
  const t = this.getOffsetParent || $t, e = this.getDimensions, i = await e(c.floating);
@@ -5705,8 +5682,8 @@ class ei {
5705
5682
  config: { SCROLLER_TRACK_SIZE: i, CSS_PREFIX: s }
5706
5683
  } = this.ctx, { visibleWidth: o, visibleHeight: r, renderCellHeaders: l } = this.ctx.header;
5707
5684
  let a = [], h = [], d = [];
5708
- l.forEach((g) => {
5709
- g.render && (g.fixed === "left" ? h.push(g) : g.fixed === "right" ? d.push(g) : a.push(g));
5685
+ l.forEach((w) => {
5686
+ w.render && (w.fixed === "left" ? h.push(w) : w.fixed === "right" ? d.push(w) : a.push(w));
5710
5687
  });
5711
5688
  const f = e - i, x = {
5712
5689
  key: "left",
@@ -5757,8 +5734,8 @@ class ei {
5757
5734
  getBody() {
5758
5735
  const t = [], e = [], i = [];
5759
5736
  let s = this.ctx.body.renderRows;
5760
- this.ctx.config.FOOTER_FIXED || (s = s.concat(this.ctx.footer.renderRows)), s.forEach((g) => {
5761
- g.cells.forEach((E) => {
5737
+ this.ctx.config.FOOTER_FIXED || (s = s.concat(this.ctx.footer.renderRows)), s.forEach((w) => {
5738
+ w.cells.forEach((E) => {
5762
5739
  E.cellType === "footer" && (E.render = E.renderFooter), E.render && (E.fixed === "left" ? e.push(E) : E.fixed === "right" ? i.push(E) : t.push(E));
5763
5740
  });
5764
5741
  });
@@ -5814,9 +5791,9 @@ class ei {
5814
5791
  }
5815
5792
  getFooter() {
5816
5793
  const t = [], e = [], i = [];
5817
- this.ctx.footer.renderRows.forEach((w) => {
5818
- w.cells.forEach((g) => {
5819
- g.cellType === "footer" && g.renderFooter && (g.render = g.renderFooter, g.fixed === "left" ? e.push(g) : g.fixed === "right" ? i.push(g) : t.push(g));
5794
+ this.ctx.footer.renderRows.forEach((g) => {
5795
+ g.cells.forEach((w) => {
5796
+ w.cellType === "footer" && w.renderFooter && (w.render = w.renderFooter, w.fixed === "left" ? e.push(w) : w.fixed === "right" ? i.push(w) : t.push(w));
5820
5797
  });
5821
5798
  });
5822
5799
  const {
@@ -6046,6 +6023,10 @@ class ri {
6046
6023
  setItemValueByEditor(t, e, i, s = !0, o = !0) {
6047
6024
  this.ctx.setItemValueByEditor(t, e, i, s, o), this.editor.doneEdit();
6048
6025
  }
6026
+ clearEditableData(t = null) {
6027
+ const e = [0, this.ctx.maxColIndex], i = [0, this.ctx.maxRowIndex];
6028
+ return this.selector.clearSelectedData(e, i, !1, t);
6029
+ }
6049
6030
  clearEditor() {
6050
6031
  this.editor.clearEditor();
6051
6032
  }