@guiexpert/table 1.1.86 → 1.1.88

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/index.js CHANGED
@@ -25,8 +25,8 @@ function Yt(d = 500) {
25
25
  }, s;
26
26
  };
27
27
  }
28
- const Le = "any", X = "undefined", Oe = "null", Ve = "string", fe = "number", me = "boolean", He = "Array", K = "object", Q = [Oe, X, Le];
29
- class $e {
28
+ const Le = "any", X = "undefined", Ve = "null", Oe = "string", fe = "number", me = "boolean", $e = "Array", K = "object", Q = [Ve, X, Le];
29
+ class He {
30
30
  constructor(e) {
31
31
  this.propertyName = e, this.type = Le;
32
32
  }
@@ -38,12 +38,12 @@ class le {
38
38
  }
39
39
  class Xe {
40
40
  constructor(e) {
41
- this.propertyName = e, this.type = Oe;
41
+ this.propertyName = e, this.type = Ve;
42
42
  }
43
43
  }
44
44
  class Ke {
45
45
  constructor(e) {
46
- this.propertyName = e, this.type = Ve;
46
+ this.propertyName = e, this.type = Oe;
47
47
  }
48
48
  }
49
49
  class Je {
@@ -58,7 +58,7 @@ class qe {
58
58
  }
59
59
  class B {
60
60
  constructor(e, t = []) {
61
- this.propertyName = e, this.items = t, this.type = He;
61
+ this.propertyName = e, this.items = t, this.type = $e;
62
62
  }
63
63
  }
64
64
  class Be {
@@ -124,21 +124,21 @@ class Xt {
124
124
  p && p instanceof L && (a = p.className);
125
125
  }
126
126
  const c = this.getReadableColumnLabel(l);
127
- let h = 100, u = "", f = "ge-table-text-align-left";
128
- if (n.type === He) {
127
+ let h = 100, u = "", g = "ge-table-text-align-left";
128
+ if (n.type === $e) {
129
129
  if (this.allowCustomRenderer && a) {
130
130
  const p = `${a}ArrayCellRenderer`;
131
- u = ` bodyRenderer: new ${p}(),`, f = "", this.renderCumstomCellRenderer(a, p);
131
+ u = ` bodyRenderer: new ${p}(),`, g = "", this.renderCumstomCellRenderer(a, p);
132
132
  } else
133
133
  u = " bodyRenderer: new SimpleArrayCellRenderer(),";
134
134
  h = 250;
135
- } else n.type === fe ? (u = " bodyRenderer: new NumberCellRenderer(),", f = "ge-table-text-align-right") : n.type === me && (u = " bodyRenderer: new TrueFalseCellRenderer(),", f = "ge-table-text-align-center", h = 80);
135
+ } else n.type === fe ? (u = " bodyRenderer: new NumberCellRenderer(),", g = "ge-table-text-align-right") : n.type === me && (u = " bodyRenderer: new TrueFalseCellRenderer(),", g = "ge-table-text-align-center", h = 80);
136
136
  e.push(` ColumnDef.create({
137
137
  property: "${l}",
138
138
  headerLabel: "${c}",
139
139
  width: new Size(${h}, "px"),
140
- bodyClasses: ["${f}"],
141
- headerClasses: ["${f}"],`), u && e.push(u), e.push(" }),");
140
+ bodyClasses: ["${g}"],
141
+ headerClasses: ["${g}"],`), u && e.push(u), e.push(" }),");
142
142
  }
143
143
  }
144
144
  }
@@ -262,7 +262,7 @@ class Re {
262
262
  }
263
263
  class Ze {
264
264
  constructor() {
265
- this.property = "", this.value = "", this.path = "", this.propertyItem = new Be("", [new $e("")]);
265
+ this.property = "", this.value = "", this.path = "", this.propertyItem = new Be("", [new He("")]);
266
266
  }
267
267
  toString() {
268
268
  var e;
@@ -527,7 +527,7 @@ class Kt {
527
527
  }
528
528
  }
529
529
  }
530
- return t || new $e("");
530
+ return t || new He("");
531
531
  }
532
532
  logValueInfos(e) {
533
533
  for (let t = 0; t < e.length; t++) {
@@ -599,7 +599,7 @@ class Kt {
599
599
  ]);
600
600
  }
601
601
  createPropertyType(e, t) {
602
- return e === null ? new Xe(t) : e === void 0 ? new le(t) : typeof e === Ve ? new Ke(t) : typeof e === fe && !isNaN(e) ? new Je(t) : typeof e === me ? new qe(t) : Array.isArray(e) ? new B(t) : typeof e === K ? new L(t, Qe(t)) : new le(t);
602
+ return e === null ? new Xe(t) : e === void 0 ? new le(t) : typeof e === Oe ? new Ke(t) : typeof e === fe && !isNaN(e) ? new Je(t) : typeof e === me ? new qe(t) : Array.isArray(e) ? new B(t) : typeof e === K ? new L(t, Qe(t)) : new le(t);
603
603
  }
604
604
  }
605
605
  class Jt {
@@ -721,25 +721,25 @@ class be {
721
721
  );
722
722
  }
723
723
  }
724
- class V {
724
+ class O {
725
725
  constructor(e = ">", t = "", s = []) {
726
726
  this.content = e, this.style = t, this.classes = s;
727
727
  }
728
728
  }
729
729
  class We {
730
- constructor(e = new V(
730
+ constructor(e = new O(
731
731
  ">",
732
732
  "transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
733
733
  ["gt-table-tree-arrow-expanded"]
734
- ), t = new V(
734
+ ), t = new O(
735
735
  ">",
736
736
  "",
737
737
  ["ge-table-tree-arrow-collapsed"]
738
- ), s = new V(
738
+ ), s = new O(
739
739
  ">",
740
740
  "color:transparent;",
741
741
  ["gt-table-tree-arrow-hidden"]
742
- ), o = new V(
742
+ ), o = new O(
743
743
  "↕",
744
744
  "",
745
745
  ["gt-table-tree-arrow-expanded-all"]
@@ -748,7 +748,7 @@ class We {
748
748
  }
749
749
  }
750
750
  class Ne {
751
- constructor(e = new V("↑", "", ["ge-header-sorted-asc"]), t = new V("↓", "", ["ge-header-sorted-desc"]), s = new V("↑", "color:transparent;", [])) {
751
+ constructor(e = new O("↑", "", ["ge-header-sorted-asc"]), t = new O("↓", "", ["ge-header-sorted-desc"]), s = new O("↑", "color:transparent;", [])) {
752
752
  this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
753
753
  }
754
754
  }
@@ -838,12 +838,12 @@ class ot {
838
838
  return this.domService.appendChild(e.child, l), l;
839
839
  }
840
840
  addColumnDiv(e) {
841
- const { parent: t, geo: s, rowIndex: o = -1, columnIndex: i = -1, areaIdent: r, sideIdent: n, text: l = "", treeArrow: a, tableOptions: c, checkedType: h = void 0, sortState: u } = e, f = c == null ? void 0 : c.treeOptions, p = c == null ? void 0 : c.showCheckboxWihoutExtraColumn, m = this.domService.createElement("div");
841
+ const { parent: t, geo: s, rowIndex: o = -1, columnIndex: i = -1, areaIdent: r, sideIdent: n, text: l = "", treeArrow: a, tableOptions: c, checkedType: h = void 0, sortState: u } = e, g = c == null ? void 0 : c.treeOptions, p = c == null ? void 0 : c.showCheckboxWihoutExtraColumn, m = this.domService.createElement("div");
842
842
  this.domService.addClass(m, "ge-table-col-div"), p && this.domService.addClass(m, "ge-with-checkbox"), this.domService.addClass(m, `ge-table-col-div-${s.index}`), this.domService.setAttribute(m, "data-col-index", `${s.index}`), this.domService.setAttribute(m, "data-row-index", `${o}`), this.domService.setAttribute(m, "data-area", `${r}`);
843
- const g = ((s == null ? void 0 : s.index) ?? 0) % 2 === 0 ? "even" : "odd";
844
- if (r === "body" && n === "center" && this.domService.addClass(m, `ge-table-column-${g}`), this.domService.setStyle(m, "display", "clip"), this.domService.setStyle(m, "position", "absolute"), this.domService.setStyle(m, "left", `${s.left}px`), this.domService.setStyle(m, "top", `${s.top}px`), this.domService.setStyle(m, "width", `${s.width}px`), this.domService.setStyle(m, "height", `${s.height}px`), a && a !== "none" && (this.domService.addClass(m, "ge-table-col-tree"), this.addArrowDiv(m, a, f, o, i, r)), p && i === 0 && h && this.addCheckboxToDiv(m, h, r, o), l) {
845
- const y = a !== "none" && i === 0;
846
- this.addLabelDiv(m, l, y, o, i, r);
843
+ const f = ((s == null ? void 0 : s.index) ?? 0) % 2 === 0 ? "even" : "odd";
844
+ if (r === "body" && n === "center" && this.domService.addClass(m, `ge-table-column-${f}`), this.domService.setStyle(m, "display", "clip"), this.domService.setStyle(m, "position", "absolute"), this.domService.setStyle(m, "left", `${s.left}px`), this.domService.setStyle(m, "top", `${s.top}px`), this.domService.setStyle(m, "width", `${s.width}px`), this.domService.setStyle(m, "height", `${s.height}px`), a && a !== "none" && (this.domService.addClass(m, "ge-table-col-tree"), this.addArrowDiv(m, a, g, o, i, r)), p && i === 0 && h && this.addCheckboxToDiv(m, h, r, o), l) {
845
+ const b = a !== "none" && i === 0;
846
+ this.addLabelDiv(m, l, b, o, i, r);
847
847
  }
848
848
  return u && this.addSortedIcon(m, u, c == null ? void 0 : c.sortedOptions, i), this.domService.appendChild(t, m), m;
849
849
  }
@@ -2274,15 +2274,15 @@ class nt {
2274
2274
  * tableApi.downloadExcel('quarterly-data.xlsx');
2275
2275
  */
2276
2276
  downloadExcel(e = "table.xlsx", t = "") {
2277
- const s = [], o = this.tableScope.tableModel.getColumnCount(), i = ["header", "body", "footer"];
2278
- for (const r of i) {
2279
- const n = this.tableScope.tableModel.getAreaModel(r), l = (n == null ? void 0 : n.getRowCount()) ?? 0;
2280
- for (let a = 0; a < l; a++) {
2281
- const c = [];
2282
- s.push(c);
2283
- for (let h = 0; h < o; h++)
2284
- c.push(n.getValueAt(a, h));
2285
- }
2277
+ var n, l;
2278
+ const s = [], o = this.tableScope.tableModel, i = [];
2279
+ for (let a = 0; a < o.getColumnCount(); a++)
2280
+ ((l = (n = o.getColumnDef(a)) == null ? void 0 : n.isVisible) == null ? void 0 : l.call(n)) !== !1 && i.push(a);
2281
+ const r = ["header", "body", "footer"];
2282
+ for (const a of r) {
2283
+ const c = o.getAreaModel(a), h = (c == null ? void 0 : c.getRowCount()) ?? 0;
2284
+ for (let u = 0; u < h; u++)
2285
+ s.push(i.map((g) => c.getValueAt(u, g)));
2286
2286
  }
2287
2287
  return this.tableScope.excelService.downloadExcel(s, e, t);
2288
2288
  }
@@ -3155,14 +3155,14 @@ class dt extends xe {
3155
3155
  }
3156
3156
  }
3157
3157
  }
3158
- class O {
3158
+ class V {
3159
3159
  constructor(e = 0, t = 0, s = 0, o = 0, i) {
3160
3160
  this.left = e, this.width = t, this.height = s, this.top = o, this.index = i;
3161
3161
  }
3162
3162
  }
3163
3163
  const oe = class oe {
3164
3164
  constructor(e, t, s, o) {
3165
- this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.areaBodyWestGeo = new O(), this.areaBodyCenterGeo = new O(), this.areaBodyEastGeo = new O();
3165
+ this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.areaBodyWestGeo = new V(), this.areaBodyCenterGeo = new V(), this.areaBodyEastGeo = new V();
3166
3166
  const i = this.hostElement;
3167
3167
  i.innerText = "", this.dom.setAttribute(i, "tabindex", "0"), this.dom.setStyle(
3168
3168
  this.dom.addClass("ge-table", i),
@@ -3401,7 +3401,7 @@ class ht {
3401
3401
  return !1;
3402
3402
  }
3403
3403
  }
3404
- class T {
3404
+ class k {
3405
3405
  constructor(e, t, s) {
3406
3406
  this.header = e, this.body = t, this.footer = s;
3407
3407
  }
@@ -3413,7 +3413,7 @@ class ut extends ee {
3413
3413
  header: [],
3414
3414
  body: [],
3415
3415
  footer: []
3416
- }, this.tree = !1, this.colAndRowspanModels = new T(), this.draggingTargetColumnIndex = -1, this.contentScrollTop = 0, this.removables = [], this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (n = this.tableOptions) != null && n.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), de(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
3416
+ }, this.tree = !1, this.colAndRowspanModels = new k(), this.draggingTargetColumnIndex = -1, this.contentScrollTop = 0, this.removables = [], this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (n = this.tableOptions) != null && n.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), de(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
3417
3417
  (l) => {
3418
3418
  var a;
3419
3419
  this.colAndRowspanModels[l] = new ht(t, t.getAreaModel(l)), (a = this.colAndRowspanModels[l]) == null || a.init();
@@ -3518,19 +3518,19 @@ class ut extends ee {
3518
3518
  this.areaHeightsOfRenderPass = void 0;
3519
3519
  }
3520
3520
  this.tableOptions.tableTopBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
3521
- new O(0, e, 1, 0),
3521
+ new V(0, e, 1, 0),
3522
3522
  this.hostElement,
3523
3523
  "ge-table-border"
3524
3524
  )), this.tableOptions.tableBottomBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
3525
- new O(0, e, 1, t - 1),
3525
+ new V(0, e, 1, t - 1),
3526
3526
  this.hostElement,
3527
3527
  "ge-table-border"
3528
3528
  )), this.tableModel.getFixedLeftColumnCount() > 0 && this.removables.push(this.dom.addVerticalBorder(
3529
- new O(s, 1, t, 0),
3529
+ new V(s, 1, t, 0),
3530
3530
  this.hostElement,
3531
3531
  "ge-table-body-west-vertical-border"
3532
3532
  )), ((i = this.tableModel.getAreaModel("header")) == null ? void 0 : i.getRowCount()) > 0 && this.removables.push(this.dom.addHorizontalBorder(
3533
- new O(0, e, 1, o),
3533
+ new V(0, e, 1, o),
3534
3534
  this.hostElement,
3535
3535
  "ge-table-body-west-vertical-border"
3536
3536
  ));
@@ -3582,10 +3582,10 @@ class ut extends ee {
3582
3582
  }
3583
3583
  const u = r.getCustomClassesAt(t, s);
3584
3584
  u.length && this.dom.addClasses(u, l);
3585
- const f = r.getCustomStyleAt(t, s);
3586
- if (f)
3587
- for (const p in f)
3588
- this.dom.setStyle(l, p, f[p]);
3585
+ const g = r.getCustomStyleAt(t, s);
3586
+ if (g)
3587
+ for (const p in g)
3588
+ this.dom.setStyle(l, p, g[p]);
3589
3589
  }
3590
3590
  }
3591
3591
  getFirstVisibleRowIndex() {
@@ -3742,67 +3742,67 @@ class ut extends ee {
3742
3742
  * @protected
3743
3743
  */
3744
3744
  adjustArea(e, t = 0) {
3745
- var x, A, k;
3746
- const s = this.getArea(e, "west"), o = this.getArea(e, "center"), i = this.getArea(e, "east"), r = ((x = this.areaHeightsOfRenderPass) == null ? void 0 : x[e]) ?? o.child.clientHeight;
3745
+ var w, v, I;
3746
+ const s = this.getArea(e, "west"), o = this.getArea(e, "center"), i = this.getArea(e, "east"), r = ((w = this.areaHeightsOfRenderPass) == null ? void 0 : w[e]) ?? o.child.clientHeight;
3747
3747
  s.child.innerText = "", o.child.innerText = "", i.child.innerText = "";
3748
3748
  const n = 0, l = this.areaBodyCenterGeo.width, a = this.tableModel.getPadding(), c = this.tableModel.getAreaModel(e), h = c.getRowCount();
3749
3749
  for (; this.cleanupFunctions[e].length; ) {
3750
- const w = this.cleanupFunctions[e].shift();
3751
- w && w();
3750
+ const x = this.cleanupFunctions[e].shift();
3751
+ x && x();
3752
3752
  }
3753
3753
  let u = t;
3754
- const f = this.tableModel.getColumnCount(), p = this.tableModel.getFixedRightColumnCount(), m = this.tableModel.getFixedLeftColumnCount();
3754
+ const g = this.tableModel.getColumnCount(), p = this.tableModel.getFixedRightColumnCount(), m = this.tableModel.getFixedLeftColumnCount();
3755
3755
  e === "body" && (this.firstVisibleRowIndex = -1, this.firstFullVisibleRowIndex = -1, this.lastVisibleRowIndex = -1, this.lastFullVisibleRowIndex = -1);
3756
- let g = 0;
3757
- const y = (A = c.getConstantRowHeight) == null ? void 0 : A.call(c);
3758
- if (y !== void 0 && y > 0 && u < 0) {
3759
- for (g = Math.min(h, Math.floor(-u / y)); g > 0 && u + g * y > 0; )
3760
- g--;
3761
- u = u + g * y;
3756
+ let f = 0;
3757
+ const b = (v = c.getConstantRowHeight) == null ? void 0 : v.call(c);
3758
+ if (b !== void 0 && b > 0 && u < 0) {
3759
+ for (f = Math.min(h, Math.floor(-u / b)); f > 0 && u + f * b > 0; )
3760
+ f--;
3761
+ u = u + f * b;
3762
3762
  }
3763
- for (let w = g; w < h; w++) {
3764
- const S = u, I = w === h - 1, v = this.tableModel.getRowHeight(e, w);
3765
- if (S + v > 0) {
3766
- e === "body" && this.firstVisibleRowIndex === -1 && (this.firstVisibleRowIndex = w, this.firstFullVisibleRowIndex = S < -this.pixelLimitForFullVisible ? this.firstVisibleRowIndex + 1 : this.firstVisibleRowIndex);
3767
- let R = { left: n, width: l, height: v, top: S, index: w }, D = this.dom.addRowDiv(o, R, w, e, "center");
3763
+ for (let x = f; x < h; x++) {
3764
+ const S = u, T = x === h - 1, R = this.tableModel.getRowHeight(e, x);
3765
+ if (S + R > 0) {
3766
+ e === "body" && this.firstVisibleRowIndex === -1 && (this.firstVisibleRowIndex = x, this.firstFullVisibleRowIndex = S < -this.pixelLimitForFullVisible ? this.firstVisibleRowIndex + 1 : this.firstVisibleRowIndex);
3767
+ let A = { left: n, width: l, height: R, top: S, index: x }, D = this.dom.addRowDiv(o, A, x, e, "center");
3768
3768
  const N = m;
3769
3769
  if (this.adjustColumnsToRowParent({
3770
3770
  areaIdent: e,
3771
3771
  sideIdent: "center",
3772
3772
  areaModel: c,
3773
- geo: R,
3773
+ geo: A,
3774
3774
  parent: D,
3775
- rowIndex: w,
3775
+ rowIndex: x,
3776
3776
  columnIndexStart: N,
3777
- columnIndexEnd: f - p - 1,
3777
+ columnIndexEnd: g - p - 1,
3778
3778
  verticalFixed: !1,
3779
- lastRowOfModel: I
3780
- }), a.left > 0 && (R = { left: n, width: this.areaBodyWestGeo.width, height: v, top: S, index: w }, D = this.dom.addRowDiv(s, R, w, e, "west"), this.adjustColumnsToRowParent({
3779
+ lastRowOfModel: T
3780
+ }), a.left > 0 && (A = { left: n, width: this.areaBodyWestGeo.width, height: R, top: S, index: x }, D = this.dom.addRowDiv(s, A, x, e, "west"), this.adjustColumnsToRowParent({
3781
3781
  areaIdent: e,
3782
3782
  sideIdent: "west",
3783
3783
  areaModel: c,
3784
- geo: R,
3784
+ geo: A,
3785
3785
  parent: D,
3786
- rowIndex: w,
3786
+ rowIndex: x,
3787
3787
  columnIndexStart: 0,
3788
3788
  columnIndexEnd: N - 1,
3789
3789
  verticalFixed: !0,
3790
- lastRowOfModel: I
3791
- })), a.right > 0 && (R = { left: n, width: this.areaBodyEastGeo.width, height: v, top: S, index: w }, D = this.dom.addRowDiv(i, R, w, e, "east"), this.adjustColumnsToRowParent({
3790
+ lastRowOfModel: T
3791
+ })), a.right > 0 && (A = { left: n, width: this.areaBodyEastGeo.width, height: R, top: S, index: x }, D = this.dom.addRowDiv(i, A, x, e, "east"), this.adjustColumnsToRowParent({
3792
3792
  areaIdent: e,
3793
3793
  sideIdent: "east",
3794
3794
  areaModel: c,
3795
- geo: R,
3795
+ geo: A,
3796
3796
  parent: D,
3797
- rowIndex: w,
3798
- columnIndexStart: f - p,
3799
- columnIndexEnd: f - 1,
3797
+ rowIndex: x,
3798
+ columnIndexStart: g - p,
3799
+ columnIndexEnd: g - 1,
3800
3800
  verticalFixed: !0,
3801
- lastRowOfModel: I
3802
- })), e === "header" && this.tree && w === h - 1) {
3801
+ lastRowOfModel: T
3802
+ })), e === "header" && this.tree && x === h - 1) {
3803
3803
  const U = this.dom.applyStyle(
3804
3804
  this.dom.setAttribute(
3805
- this.dom.addDiv(D, new O(16, 20, 20, 8)),
3805
+ this.dom.addDiv(D, new V(16, 20, 20, 8)),
3806
3806
  "data-ge-action",
3807
3807
  "toggleExpandCollapseAll"
3808
3808
  ),
@@ -3814,8 +3814,8 @@ class ut extends ee {
3814
3814
  }
3815
3815
  }
3816
3816
  }
3817
- if (u = u + v, u > r) {
3818
- e === "body" && (this.lastVisibleRowIndex = w, this.lastFullVisibleRowIndex = r - u < -this.pixelLimitForFullVisible ? w - 1 : w, this.displayedRowCount = this.lastFullVisibleRowIndex - this.firstFullVisibleRowIndex + 1);
3817
+ if (u = u + R, u > r) {
3818
+ e === "body" && (this.lastVisibleRowIndex = x, this.lastFullVisibleRowIndex = r - u < -this.pixelLimitForFullVisible ? x - 1 : x, this.displayedRowCount = this.lastFullVisibleRowIndex - this.firstFullVisibleRowIndex + 1);
3819
3819
  break;
3820
3820
  }
3821
3821
  }
@@ -3823,19 +3823,19 @@ class ut extends ee {
3823
3823
  render scope: this.firstFullVisibleRowIndex <- ` + this.firstFullVisibleRowIndex + `
3824
3824
  render scope: this.lastVisibleRowIndex <- ` + this.lastVisibleRowIndex + `
3825
3825
  render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex), this.colAndRowspanModels && this.colAndRowspanModels[e]) {
3826
- const w = ((k = this.colAndRowspanModels[e]) == null ? void 0 : k.getRanges()) ?? [];
3827
- if (w.length)
3828
- for (const S of w) {
3829
- let I = 0, v = o.child, R = "center";
3826
+ const x = ((I = this.colAndRowspanModels[e]) == null ? void 0 : I.getRanges()) ?? [];
3827
+ if (x.length)
3828
+ for (const S of x) {
3829
+ let T = 0, R = o.child, A = "center";
3830
3830
  if (S.c1 < m)
3831
- v = s.child, R = "west";
3832
- else if (p > 0 && S.c1 >= f - p)
3833
- v = i.child, R = "east";
3831
+ R = s.child, A = "west";
3832
+ else if (p > 0 && S.c1 >= g - p)
3833
+ R = i.child, A = "east";
3834
3834
  else {
3835
3835
  const D = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
3836
- I = this.snapToDevicePixel(this.scrollFactorX * D) - this.areaBodyWestGeo.width, R = "center";
3836
+ T = this.snapToDevicePixel(this.scrollFactorX * D) - this.areaBodyWestGeo.width, A = "center";
3837
3837
  }
3838
- this.drawBigCell(S, I, t, c, v, R);
3838
+ this.drawBigCell(S, T, t, c, R, A);
3839
3839
  }
3840
3840
  }
3841
3841
  }
@@ -3850,10 +3850,10 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
3850
3850
  * @protected
3851
3851
  */
3852
3852
  drawBigCell(e, t, s, o, i, r) {
3853
- const n = s + this.getRowHeights(0, e.r1 - 1, o).reduce((g, y) => g + y, 0), l = this.tableModel.getColumnCount(), a = this.tableModel.getFixedRightColumnCount();
3853
+ const n = s + this.getRowHeights(0, e.r1 - 1, o).reduce((f, b) => f + b, 0), l = this.tableModel.getColumnCount(), a = this.tableModel.getFixedRightColumnCount();
3854
3854
  let c = 0;
3855
3855
  a > 0 && e.c1 >= l - a && (c = l - a);
3856
- const h = t + this.getColumnWidths(c, e.c1 - 1).reduce((g, y) => g + y, 0), u = this.getRowHeights(e.r1, e.r2, o).reduce((g, y) => g + y, 0), f = this.getColumnWidths(e.c1, e.c2).reduce((g, y) => g + y, 0);
3856
+ const h = t + this.getColumnWidths(c, e.c1 - 1).reduce((f, b) => f + b, 0), u = this.getRowHeights(e.r1, e.r2, o).reduce((f, b) => f + b, 0), g = this.getColumnWidths(e.c1, e.c2).reduce((f, b) => f + b, 0);
3857
3857
  let p = !1;
3858
3858
  const m = this.getSelectionModel ? this.getSelectionModel() : void 0;
3859
3859
  m && (p = m.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? this.renderCell({
@@ -3864,7 +3864,7 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
3864
3864
  columnIndex: e.c1,
3865
3865
  left: h,
3866
3866
  top: n,
3867
- width: f,
3867
+ width: g,
3868
3868
  height: u,
3869
3869
  parent: i,
3870
3870
  cellSelected: p,
@@ -3878,7 +3878,7 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
3878
3878
  columnIndex: e.c1,
3879
3879
  left: h,
3880
3880
  top: n,
3881
- width: f,
3881
+ width: g,
3882
3882
  height: u,
3883
3883
  parent: i,
3884
3884
  cellSelected: p,
@@ -3889,7 +3889,7 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
3889
3889
  columnIndex: e.c1,
3890
3890
  cellLeft: h,
3891
3891
  cellTop: n,
3892
- cellWidth: f,
3892
+ cellWidth: g,
3893
3893
  cellHeight: u,
3894
3894
  parent: i
3895
3895
  });
@@ -3936,55 +3936,55 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
3936
3936
  var m;
3937
3937
  let h = 0;
3938
3938
  if (!a) {
3939
- const g = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
3940
- h = this.snapToDevicePixel(this.scrollFactorX * g);
3939
+ const f = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
3940
+ h = this.snapToDevicePixel(this.scrollFactorX * f);
3941
3941
  }
3942
- const u = 0, f = !!(e === "body" && t);
3942
+ const u = 0, g = !!(e === "body" && t);
3943
3943
  let p = h;
3944
- for (let g = n; g <= l; g++) {
3945
- const y = p, x = this.tableModel.getColumnWidth(g);
3946
- if (x > 0 && y + x > 0) {
3947
- let A = o.height;
3948
- const k = s.getRowspanAt(r, g), w = s.getColspanAt(r, g);
3949
- k > 1 && (A = this.getRowHeights(r, r + k - 1, s).reduce((v, R) => v + R, 0));
3950
- let S = x;
3951
- w > 1 && (S = this.getColumnWidths(g, g + w - 1).reduce((v, R) => v + R, 0));
3952
- let I = !1;
3953
- if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (m = this.colAndRowspanModels[e]) != null && m.isInRange(r, g) && (I = !0), this.draggingTargetColumnIndex === g && e !== "header") {
3954
- this.renderDragTargetDiv(i, y, u, S, A);
3955
- const v = { left: y, top: u, width: S, height: A };
3956
- this.dom.addColumnBorderDivs(this.tableOptions, i, v, e, t);
3944
+ for (let f = n; f <= l; f++) {
3945
+ const b = p, w = this.tableModel.getColumnWidth(f);
3946
+ if (w > 0 && b + w > 0) {
3947
+ let v = o.height;
3948
+ const I = s.getRowspanAt(r, f), x = s.getColspanAt(r, f);
3949
+ I > 1 && (v = this.getRowHeights(r, r + I - 1, s).reduce((R, A) => R + A, 0));
3950
+ let S = w;
3951
+ x > 1 && (S = this.getColumnWidths(f, f + x - 1).reduce((R, A) => R + A, 0));
3952
+ let T = !1;
3953
+ if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (m = this.colAndRowspanModels[e]) != null && m.isInRange(r, f) && (T = !0), this.draggingTargetColumnIndex === f && e !== "header") {
3954
+ this.renderDragTargetDiv(i, b, u, S, v);
3955
+ const R = { left: b, top: u, width: S, height: v };
3956
+ this.dom.addColumnBorderDivs(this.tableOptions, i, R, e, t);
3957
3957
  } else {
3958
- const v = this.renderSelectedBackgroundDiv(I, f, t, s, r, g, i, y, u, S, A);
3959
- "gammaCells" in s && s.getValueAt(r, g) && (I = !1), I || this.renderCell({
3958
+ const R = this.renderSelectedBackgroundDiv(T, g, t, s, r, f, i, b, u, S, v);
3959
+ "gammaCells" in s && s.getValueAt(r, f) && (T = !1), T || this.renderCell({
3960
3960
  areaModel: s,
3961
3961
  areaIdent: e,
3962
3962
  sideIdent: t,
3963
3963
  rowIndex: r,
3964
- columnIndex: g,
3965
- left: y,
3964
+ columnIndex: f,
3965
+ left: b,
3966
3966
  top: u,
3967
3967
  width: S,
3968
- height: A,
3968
+ height: v,
3969
3969
  parent: i,
3970
- cellSelected: v,
3970
+ cellSelected: R,
3971
3971
  lastRowOfModel: c,
3972
3972
  gammaRange: !0
3973
3973
  }), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
3974
3974
  rowIndex: r,
3975
- columnIndex: g,
3976
- cellLeft: y,
3975
+ columnIndex: f,
3976
+ cellLeft: b,
3977
3977
  cellTop: u,
3978
3978
  cellWidth: S,
3979
- cellHeight: A,
3979
+ cellHeight: v,
3980
3980
  parent: i
3981
3981
  });
3982
3982
  }
3983
3983
  }
3984
- if (p = p + x, p > this.areaBodyCenterGeo.width)
3984
+ if (p = p + w, p > this.areaBodyCenterGeo.width)
3985
3985
  break;
3986
3986
  }
3987
- this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new O(p - 1, 1, o.height, 0), i);
3987
+ this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new V(p - 1, 1, o.height, 0), i);
3988
3988
  }
3989
3989
  /**
3990
3990
  * Retrieves the column index of the tree arrow column in the table.
@@ -4012,18 +4012,18 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
4012
4012
  lastRowOfModel: h
4013
4013
  }) {
4014
4014
  var U;
4015
- const f = this.editorRenderer && this.editorRendererRow === o && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(o, i), p = { left: r, width: n, height: l, top: a, index: i }, m = e.getRowByIndex(o);
4016
- let g = "none";
4015
+ const g = this.editorRenderer && this.editorRendererRow === o && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(o, i), p = { left: r, width: n, height: l, top: a, index: i }, m = e.getRowByIndex(o);
4016
+ let f = "none";
4017
4017
  if (i === this.getTreeArrowColumnIndex() && j(m)) {
4018
4018
  const C = m;
4019
- (U = C.children) != null && U.length ? C.expanded ? g = "expanded" : g = "collapsed" : g = "hidden";
4019
+ (U = C.children) != null && U.length ? C.expanded ? f = "expanded" : f = "collapsed" : f = "hidden";
4020
4020
  }
4021
- let x;
4021
+ let w;
4022
4022
  if (t === "header") {
4023
4023
  const C = this.tableModel.getColumnDef(i);
4024
- (!(C != null && C.sortIconVisible) || C != null && C.sortIconVisible()) && (x = C == null ? void 0 : C.sortState);
4024
+ (!(C != null && C.sortIconVisible) || C != null && C.sortIconVisible()) && (w = C == null ? void 0 : C.sortState);
4025
4025
  }
4026
- const A = e.getValueAt(o, i), k = f ? "" : `${A}`, w = e.isRowChecked(o), S = this.dom.addColumnDiv(
4026
+ const v = e.getValueAt(o, i), I = g ? "" : `${v}`, x = e.isRowChecked(o), S = this.dom.addColumnDiv(
4027
4027
  {
4028
4028
  parent: c,
4029
4029
  geo: p,
@@ -4031,18 +4031,18 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
4031
4031
  columnIndex: i,
4032
4032
  areaIdent: t,
4033
4033
  sideIdent: s,
4034
- text: k,
4035
- treeArrow: g,
4034
+ text: I,
4035
+ treeArrow: f,
4036
4036
  tableOptions: this.tableOptions,
4037
- checkedType: w,
4038
- sortState: x
4037
+ checkedType: x,
4038
+ sortState: w
4039
4039
  }
4040
- ), I = e.getTooltipAt(o, i);
4041
- I && this.dom.setAttribute(S, "title", I);
4042
- const v = this.tableModel.getColumnDef(i);
4043
- v && v.classes[t] && this.dom.addClasses(v.classes[t], S);
4044
- let R;
4045
- f && (R = f.render(S, o, i, t, e, A, this.dom.domService));
4040
+ ), T = e.getTooltipAt(o, i);
4041
+ T && this.dom.setAttribute(S, "title", T);
4042
+ const R = this.tableModel.getColumnDef(i);
4043
+ R && R.classes[t] && this.dom.addClasses(R.classes[t], S);
4044
+ let A;
4045
+ g && (A = g.render(S, o, i, t, e, v, this.dom.domService));
4046
4046
  const D = e.getCustomClassesAt(o, i);
4047
4047
  if (D.length && this.dom.addClasses(D, S), this.dom.addColumnBorderDivs(this.tableOptions, c, p, t, s), h && this.dom.addHorizontalBorder({ left: r, width: n, height: l, top: a + l }, c), this.getFocusModel && t === "body") {
4048
4048
  const C = this.getFocusModel();
@@ -4053,7 +4053,7 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
4053
4053
  if (N)
4054
4054
  for (const C in N)
4055
4055
  this.dom.setStyle(S, C, N[C]);
4056
- return [S, R];
4056
+ return [S, A];
4057
4057
  }
4058
4058
  /**
4059
4059
  * Applies CSS classes to an HTML element.
@@ -4231,7 +4231,7 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
4231
4231
  if (r) {
4232
4232
  const n = e.index ?? 0, l = this.draggingColumn;
4233
4233
  for (let a = 0; a < r; a++) {
4234
- const c = s, h = i.getRowHeight(a), u = { left: 0, width: e.width, height: h, top: c, index: a }, f = i.getValueAt(a, n), p = i.getCellRenderer(a, n), m = p ? "" : `${f}`, g = {
4234
+ const c = s, h = i.getRowHeight(a), u = { left: 0, width: e.width, height: h, top: c, index: a }, g = i.getValueAt(a, n), p = i.getCellRenderer(a, n), m = p ? "" : `${g}`, f = {
4235
4235
  parent: l,
4236
4236
  geo: u,
4237
4237
  rowIndex: a,
@@ -4239,17 +4239,17 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
4239
4239
  areaIdent: t,
4240
4240
  sideIdent: o,
4241
4241
  text: m
4242
- }, y = this.dom.addColumnDiv(g);
4243
- let x;
4244
- p && (x = p.render(y, a, n, t, i, f, this.dom.domService), x && this.cleanupFunctions[t].push(x));
4245
- const A = i.getCustomClassesAt(a, n);
4246
- A.length && this.dom.addClasses(A, y);
4247
- const k = this.tableModel.getColumnDef(n);
4248
- k && k.classes[t] && this.dom.addClasses(k.classes[t], y), this.dom.addColumnBorderDivs(this.tableOptions, l, u, t, o);
4249
- const w = i.getCustomStyleAt(a, n);
4250
- if (w)
4251
- for (const S in w)
4252
- this.dom.setStyle(y, S, w[S]);
4242
+ }, b = this.dom.addColumnDiv(f);
4243
+ let w;
4244
+ p && (w = p.render(b, a, n, t, i, g, this.dom.domService), w && this.cleanupFunctions[t].push(w));
4245
+ const v = i.getCustomClassesAt(a, n);
4246
+ v.length && this.dom.addClasses(v, b);
4247
+ const I = this.tableModel.getColumnDef(n);
4248
+ I && I.classes[t] && this.dom.addClasses(I.classes[t], b), this.dom.addColumnBorderDivs(this.tableOptions, l, u, t, o);
4249
+ const x = i.getCustomStyleAt(a, n);
4250
+ if (x)
4251
+ for (const S in x)
4252
+ this.dom.setStyle(b, S, x[S]);
4253
4253
  s = s + h;
4254
4254
  }
4255
4255
  }
@@ -4302,16 +4302,16 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
4302
4302
  renderSelectedBackgroundDiv(e, t, s, o, i, r, n, l, a, c, h) {
4303
4303
  let u = !1;
4304
4304
  if (!e && t && o.isSelectable(i, r) && this.getSelectionModel) {
4305
- const f = this.getSelectionModel();
4306
- if (f) {
4307
- const p = f.getSelectionCount(i, r);
4305
+ const g = this.getSelectionModel();
4306
+ if (g) {
4307
+ const p = g.getSelectionCount(i, r);
4308
4308
  u = p > 0;
4309
4309
  for (let m = 0; m < p; m++) {
4310
- const g = this.dom.applyStylePosistionAbsolute(
4310
+ const f = this.dom.applyStylePosistionAbsolute(
4311
4311
  // ge-table-body-west-selected-range
4312
4312
  this.dom.createDivWithClass(`ge-table-${o.areaIdent}-${s}-selected-range`, n)
4313
4313
  );
4314
- this.dom.setStyle(g, "left", `${l}px`), this.dom.setStyle(g, "top", `${a}px`), this.dom.setStyle(g, "width", `${c}px`), this.dom.setStyle(g, "height", `${h}px`);
4314
+ this.dom.setStyle(f, "left", `${l}px`), this.dom.setStyle(f, "top", `${a}px`), this.dom.setStyle(f, "width", `${c}px`), this.dom.setStyle(f, "height", `${h}px`);
4315
4315
  }
4316
4316
  }
4317
4317
  }
@@ -4350,7 +4350,7 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
4350
4350
  cellSelected: h,
4351
4351
  lastRowOfModel: u
4352
4352
  }) {
4353
- const [f, p] = this.addAndRenderCellDiv({
4353
+ const [g, p] = this.addAndRenderCellDiv({
4354
4354
  areaModel: e,
4355
4355
  areaIdent: t,
4356
4356
  sideIdent: s,
@@ -4363,7 +4363,7 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
4363
4363
  parent: c,
4364
4364
  lastRowOfModel: u
4365
4365
  });
4366
- h && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, f), p && this.cleanupFunctions[t].push(p);
4366
+ h && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, g), p && this.cleanupFunctions[t].push(p);
4367
4367
  }
4368
4368
  /**
4369
4369
  * Render the header cell resize handle.
@@ -4384,12 +4384,12 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
4384
4384
  l.setAttribute(c, "data-col-index", `${t}`), l.setAttribute(c, "data-row-index", `${e}`), l.setAttribute(c, "data-area", "header"), l.setAttribute(c, "data-ge-action", "resize-column"), l.addClass(c, "ge-table-column-resize-handle"), l.setStyle(c, "display", "clip"), l.setStyle(c, "position", "absolute"), l.setStyle(c, "cursor", "col-resize"), l.setStyle(c, "left", `${s + i - a}px`), l.setStyle(c, "top", `${o}px`), l.setStyle(c, "width", `${a}px`), l.setStyle(c, "height", `${r}px`), l.appendChild(n, c);
4385
4385
  }
4386
4386
  }
4387
- class pt {
4387
+ class Me {
4388
4388
  constructor(e, t) {
4389
4389
  this.columnIndex = e, this.sortState = t;
4390
4390
  }
4391
4391
  }
4392
- class gt {
4392
+ class pt {
4393
4393
  constructor(e) {
4394
4394
  this.tableScope = e, this.tableScope.hostElement.addEventListener(
4395
4395
  "change",
@@ -4415,7 +4415,7 @@ class gt {
4415
4415
  }
4416
4416
  }
4417
4417
  }
4418
- class ft {
4418
+ class gt {
4419
4419
  constructor(e = -1, t = -1) {
4420
4420
  this.rowIndex = e, this.columnIndex = t;
4421
4421
  }
@@ -4425,25 +4425,50 @@ class Se {
4425
4425
  this.cells = e;
4426
4426
  }
4427
4427
  static createSingle(e, t) {
4428
- return new Se([new ft(e, t)]);
4428
+ return new Se([new gt(e, t)]);
4429
4429
  }
4430
4430
  }
4431
- class mt {
4431
+ class ft {
4432
4432
  constructor(e, t, s, o, i, r, n, l) {
4433
4433
  this.scrollTop = e, this.scrollLeft = t, this.scrollHeight = s, this.scrollWidth = o, this.clientHeight = i, this.clientWidth = r, this.scrollFactorY = n, this.scrollFactorX = l;
4434
4434
  }
4435
4435
  }
4436
- class bt {
4436
+ class mt {
4437
4437
  constructor(e) {
4438
4438
  var t, s;
4439
- this.tableScope = e, (t = this.tableScope.tableOptions) != null && t.getSelectionModel && (this.getSelectionModel = this.tableScope.tableOptions.getSelectionModel), (s = this.tableScope.tableOptions) != null && s.getFocusModel && (this.getFocusModel = this.tableScope.tableOptions.getFocusModel);
4439
+ this.tableScope = e, this.ignoreNextClick = !1, (t = this.tableScope.tableOptions) != null && t.getSelectionModel && (this.getSelectionModel = this.tableScope.tableOptions.getSelectionModel), (s = this.tableScope.tableOptions) != null && s.getFocusModel && (this.getFocusModel = this.tableScope.tableOptions.getFocusModel);
4440
+ }
4441
+ /**
4442
+ * Called on mouse down: a new gesture starts.
4443
+ */
4444
+ onMouseDown() {
4445
+ this.ignoreNextClick = !1;
4446
+ }
4447
+ /**
4448
+ * Selects a range by dragging the mouse over body cells (selection type "range").
4449
+ * The cell where the drag started stays the anchor, so a following shift-click extends from there.
4450
+ *
4451
+ * @param {GeMouseEvent} evt - the current mouse position
4452
+ * @param {GeMouseEvent} startEvt - the mouse down event that started the drag
4453
+ * @returns {boolean} true if the selection changed (repaint needed)
4454
+ */
4455
+ onMouseDragging(e, t) {
4456
+ var i, r;
4457
+ if (!t || t.action || t.areaIdent !== "body" || e.areaIdent !== "body" || t.rowIndex < 0 || t.columnIndex < 0 || e.rowIndex < 0 || e.columnIndex < 0) return !1;
4458
+ const s = (i = this.getSelectionModel) == null ? void 0 : i.call(this);
4459
+ if (!s || !("selectionType" in s) || s.selectionType !== "range") return !1;
4460
+ s.clear(), s.addSelection(this.createRangeByEvents(e, t));
4461
+ const o = (r = this.getFocusModel) == null ? void 0 : r.call(this);
4462
+ return o && !o.hasFocus(t.rowIndex, t.columnIndex) && (o.setFocus(t.rowIndex, t.columnIndex), this.tableScope.onFocusChanged(o)), this.previousEvt = t.clone(), this.ignoreNextClick = e.rowIndex !== t.rowIndex || e.columnIndex !== t.columnIndex, this.tableScope.onSelectionChanged(s), !0;
4440
4463
  }
4441
4464
  onMouseClicked(e, t) {
4442
4465
  var i, r, n, l, a, c, h;
4466
+ if (this.ignoreNextClick)
4467
+ return this.ignoreNextClick = !1, !1;
4443
4468
  let s = !1, o = !1;
4444
4469
  if (this.getSelectionModel && this.getFocusModel) {
4445
- const u = this.getSelectionModel(), f = this.getFocusModel();
4446
- u && f && (f.hasFocus(e.rowIndex, e.columnIndex) || (f.setFocus(e.rowIndex, e.columnIndex), this.tableScope.onFocusChanged(f), s = !0), (i = e.originalEvent) != null && i.shiftKey || u.hasSelection() && (u.clear(), s = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (u.addSelection(this.createRangeByEvents(e, this.previousEvt)), o = !0, s = !0) : (n = e.originalEvent) != null && n.altKey && ((l = e.originalEvent) != null && l.ctrlKey || (a = e.originalEvent) != null && a.metaKey) ? (u.removeSelection(M.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (c = e.originalEvent) != null && c.ctrlKey || (h = e.originalEvent) != null && h.metaKey ? (u.addSelection(M.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (u.firstClick(e.rowIndex, e.columnIndex), s = !0), this.tableScope.onSelectionChanged(u));
4470
+ const u = this.getSelectionModel(), g = this.getFocusModel();
4471
+ u && g && (g.hasFocus(e.rowIndex, e.columnIndex) || (g.setFocus(e.rowIndex, e.columnIndex), this.tableScope.onFocusChanged(g), s = !0), (i = e.originalEvent) != null && i.shiftKey || u.hasSelection() && (u.clear(), s = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (u.addSelection(this.createRangeByEvents(e, this.previousEvt)), o = !0, s = !0) : (n = e.originalEvent) != null && n.altKey && ((l = e.originalEvent) != null && l.ctrlKey || (a = e.originalEvent) != null && a.metaKey) ? (u.removeSelection(M.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (c = e.originalEvent) != null && c.ctrlKey || (h = e.originalEvent) != null && h.metaKey ? (u.addSelection(M.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (u.firstClick(e.rowIndex, e.columnIndex), s = !0), this.tableScope.onSelectionChanged(u));
4447
4472
  }
4448
4473
  return o ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
4449
4474
  }
@@ -4474,7 +4499,7 @@ class bt {
4474
4499
  });
4475
4500
  }
4476
4501
  }
4477
- class yt {
4502
+ class bt {
4478
4503
  get() {
4479
4504
  return {
4480
4505
  f2: "START_EDITING",
@@ -4494,7 +4519,7 @@ class yt {
4494
4519
  };
4495
4520
  }
4496
4521
  }
4497
- class wt {
4522
+ class yt {
4498
4523
  get() {
4499
4524
  return {
4500
4525
  f2: "START_EDITING",
@@ -4516,13 +4541,13 @@ class wt {
4516
4541
  };
4517
4542
  }
4518
4543
  }
4519
- function xt(d) {
4544
+ function wt(d) {
4520
4545
  return d.trim().replace(/\+/g, " ").replace(/ +/g, " ").replace(/⌫/g, "backspace").replace(/↩/g, "enter").replace(/⇧/g, "shift").replace(/⌥/g, "alt").replace(/option/g, "alt").replace(/opt/g, "alt").replace(/⌃/g, "ctrl").replace(/control/g, "ctrl").replace(/command/g, "cmd").replace(/meta/g, "cmd").replace(/escape/g, "esc").replace(/⌘/g, "cmd").replace(/\*/g, "multiply").split(" ").filter((e) => e).filter((e, t, s) => s.indexOf(e) === t).sort((e, t) => {
4521
4546
  const s = { cmd: 1, ctrl: 2, alt: 3, shift: 4 }, o = s[e] || 5, i = s[t] || 5;
4522
4547
  return o !== i ? o - i : e.localeCompare(t);
4523
4548
  }).join(" ");
4524
4549
  }
4525
- function Me(d) {
4550
+ function Ie(d) {
4526
4551
  let e = d.key.toLowerCase();
4527
4552
  if (e === " " && (e = "space"), e === "arrowleft" && (e = "left"), e === "arrowright" && (e = "right"), e === "arrowup" && (e = "up"), e === "arrowdown" && (e = "down"), e === "delete" && d.code === "Delete" && (e = "delete"), e === "backspace" && (e = "backspace"), e === "escape" && (e = "esc"), e === "return" && (e = "enter"), d.code.startsWith("Numpad")) {
4528
4553
  const s = d.code.replace("Numpad", "").toLowerCase();
@@ -4530,9 +4555,9 @@ function Me(d) {
4530
4555
  }
4531
4556
  d.code.match(/^F\d+$/) && (e = d.code.toLowerCase()), d.code.match(/^Digit\d+$/) && (e = d.code.replace(/Digit/g, ""));
4532
4557
  let t = "";
4533
- return d.ctrlKey && (t += " ctrl"), d.altKey && (t += t + " alt"), d.shiftKey && (t += t + " shift"), d.metaKey && (t += t + " cmd"), xt(t + " " + e);
4558
+ return d.ctrlKey && (t += " ctrl"), d.altKey && (t += t + " alt"), d.shiftKey && (t += t + " shift"), d.metaKey && (t += t + " cmd"), wt(t + " " + e);
4534
4559
  }
4535
- class St {
4560
+ class xt {
4536
4561
  constructor(e) {
4537
4562
  this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
4538
4563
  }
@@ -4558,7 +4583,7 @@ class St {
4558
4583
  ));
4559
4584
  }
4560
4585
  assignPredefinedSystemShortcutMappings() {
4561
- this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new wt().get()) : Object.assign(this.shortcutActionIdMapping, new yt().get());
4586
+ this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new yt().get()) : Object.assign(this.shortcutActionIdMapping, new bt().get());
4562
4587
  }
4563
4588
  isMacintosh() {
4564
4589
  return navigator.platform.indexOf("Mac") > -1;
@@ -4581,10 +4606,10 @@ class St {
4581
4606
  return t;
4582
4607
  }
4583
4608
  findEntity(e) {
4584
- const t = Me(e);
4609
+ const t = Ie(e);
4585
4610
  this.isDebug() && console.debug("ShortcutService shortcut :", t);
4586
4611
  for (const s in this.shortcutActionIdMapping)
4587
- if (Me(e) === t)
4612
+ if (Ie(e) === t)
4588
4613
  return this.isDebug() && console.debug("ShortcutService action :", this.shortcutActionIdMapping[s]), this.shortcutActionIdMapping[s];
4589
4614
  }
4590
4615
  // private areTokensEquals(tokens1: string[], tokens2: string[]): boolean {
@@ -4653,7 +4678,7 @@ class he {
4653
4678
  onFocusChanged(e) {
4654
4679
  }
4655
4680
  }
4656
- class Ct {
4681
+ class St {
4657
4682
  setStyle(e, t, s) {
4658
4683
  return e.style[t] = s, e;
4659
4684
  }
@@ -4680,7 +4705,7 @@ class Ct {
4680
4705
  e.setAttribute(t, s);
4681
4706
  }
4682
4707
  }
4683
- class vt {
4708
+ class Ct {
4684
4709
  render(e, t, s, o, i, r, n) {
4685
4710
  if (i.isEditable(t, s)) {
4686
4711
  n.addClass(e, "ge-table-row-input-div");
@@ -4783,7 +4808,7 @@ class Ce {
4783
4808
  this.selectionType !== "none" && (this.allSelected = !1, this.selectionMode === "single" && (this.ranges = []), this.selectionType === "row" ? (e.c1 = 0, e.c2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "column" ? (e.r1 = 0, e.r2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "cell" ? (e.r2 = e.r1, e.c2 = e.c1) : this.selectionType, this.ranges.push(e), this.fireChangeEvent());
4784
4809
  }
4785
4810
  }
4786
- class Rt {
4811
+ class vt {
4787
4812
  constructor(e = "none") {
4788
4813
  this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
4789
4814
  }
@@ -4821,11 +4846,11 @@ class Rt {
4821
4846
  }
4822
4847
  }
4823
4848
  class ve {
4824
- constructor(e = new V(
4849
+ constructor(e = new O(
4825
4850
  "❯",
4826
4851
  "",
4827
4852
  ["gt-table-icon-expanded"]
4828
- ), t = new V(
4853
+ ), t = new O(
4829
4854
  "❯",
4830
4855
  "transform: rotate(180deg) translate(-100%, -100%); transform-origin: 0 0;",
4831
4856
  ["ge-table-icon-collapsed"]
@@ -4834,14 +4859,14 @@ class ve {
4834
4859
  }
4835
4860
  // `⊖ `, `⊕ `;
4836
4861
  }
4837
- const At = new Ce(), Mt = new Rt("cell");
4862
+ const Rt = new Ce(), At = new vt("cell");
4838
4863
  class J {
4839
4864
  constructor() {
4840
4865
  this.overflowX = "auto", this.overflowY = "auto", this.horizontalBorderVisible = !0, this.verticalBorderVisible = !0, this.footerSeparatorBorderVisible = !0, this.headerSeparatorBorderVisible = !0, this.fixedEastSeparatorBorderVisible = !0, this.fixedWestSeparatorBorderVisible = !0, this.tableTopBorderVisible = !0, this.tableBottomBorderVisible = !0, this.hoverRowVisible = !0, this.hoverColumnVisible = !0, this.columnsResizable = !0, this.columnsDraggable = !0, this.columnResizeHandleWidthInPx = 4, this.defaultRowHeights = {
4841
4866
  header: 34,
4842
4867
  body: 34,
4843
4868
  footer: 34
4844
- }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new We(), this.headerGroupOptions = new ve(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new Ne(), this.sortOrder = ["asc", "desc"], this.shortcutActionsDisabled = !1, this.resizeEventDebounceDelay = 500, this.getEditRenderer = (e, t) => new vt(), this.getSelectionModel = () => At, this.getFocusModel = () => Mt;
4869
+ }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new We(), this.headerGroupOptions = new ve(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new Ne(), this.sortOrder = ["asc", "desc"], this.shortcutActionsDisabled = !1, this.resizeEventDebounceDelay = 500, this.getEditRenderer = (e, t) => new Ct(), this.getSelectionModel = () => Rt, this.getFocusModel = () => At;
4845
4870
  }
4846
4871
  }
4847
4872
  const z = class z {
@@ -4856,25 +4881,27 @@ const z = class z {
4856
4881
  */
4857
4882
  createContent(e, t, s) {
4858
4883
  return new Promise((o, i) => {
4884
+ var r, n;
4859
4885
  if (t != null && t.hasSelection()) {
4860
- const r = this.mergeRanges(t.getRanges());
4861
- if (r) {
4862
- r.c2 = Math.min(r.c2, e.getColumnCount() - 1), r.r2 = Math.min(r.r2, e.getBodyModel().getRowCount() - 1);
4863
- const n = [];
4864
- for (let l = r.r1; l <= r.r2; l++) {
4865
- const a = [];
4866
- for (let c = r.c1; c <= r.c2; c++) {
4867
- const h = t.isSelected(l, c) ? e.getBodyModel().getTextValueAt(l, c) : "";
4868
- a.push(h);
4886
+ const l = this.mergeRanges(t.getRanges());
4887
+ if (l) {
4888
+ l.c2 = Math.min(l.c2, e.getColumnCount() - 1), l.r2 = Math.min(l.r2, e.getBodyModel().getRowCount() - 1);
4889
+ const a = [];
4890
+ for (let c = l.r1; c <= l.r2; c++) {
4891
+ const h = [];
4892
+ for (let u = l.c1; u <= l.c2; u++) {
4893
+ if (((n = (r = e.getColumnDef(u)) == null ? void 0 : r.isVisible) == null ? void 0 : n.call(r)) === !1) continue;
4894
+ const g = t.isSelected(c, u) ? e.getBodyModel().getTextValueAt(c, u) : "";
4895
+ h.push(g);
4869
4896
  }
4870
- n.push(a.join(z.columnSeparatorChar));
4897
+ a.push(h.join(z.columnSeparatorChar));
4871
4898
  }
4872
- return o(n.join(z.rowSeparatorChar));
4899
+ return o(a.join(z.rowSeparatorChar));
4873
4900
  }
4874
4901
  }
4875
4902
  if (s) {
4876
- const [r, n] = s.getFocus(), l = e.getBodyModel().getTextValueAt(r, n);
4877
- return o(l);
4903
+ const [l, a] = s.getFocus(), c = e.getBodyModel().getTextValueAt(l, a);
4904
+ return o(c);
4878
4905
  }
4879
4906
  i("Cannot copy, neither selection nor focus defined.");
4880
4907
  });
@@ -4903,11 +4930,11 @@ const z = class z {
4903
4930
  t,
4904
4931
  s
4905
4932
  ).then((r) => {
4906
- r && this.copyContent(r).then((n) => {
4933
+ r ? this.copyContent(r).then((n) => {
4907
4934
  o(r);
4908
4935
  }).catch((n) => {
4909
4936
  i();
4910
- });
4937
+ }) : o("");
4911
4938
  }).catch((r) => {
4912
4939
  i();
4913
4940
  });
@@ -4929,7 +4956,7 @@ const z = class z {
4929
4956
  z.columnSeparatorChar = " ", z.rowSeparatorChar = `
4930
4957
  `;
4931
4958
  let te = z;
4932
- class It {
4959
+ class Mt {
4933
4960
  constructor(e, t = 500) {
4934
4961
  this.tableScope = e, this.debounceDelay = t, this.disconnected = !1, this.resizeObserver = new ResizeObserver(Ye(this.handleResize.bind(this), t)), this.resizeObserver.observe(this.tableScope.hostElement);
4935
4962
  }
@@ -4947,7 +4974,7 @@ class It {
4947
4974
  }
4948
4975
  }
4949
4976
  let q;
4950
- function Et(d) {
4977
+ function It(d) {
4951
4978
  if (!q) {
4952
4979
  q = new Uint32Array(256);
4953
4980
  for (let t = 0; t < 256; t++) {
@@ -5043,18 +5070,18 @@ class Tt {
5043
5070
  let s = 0;
5044
5071
  const o = [];
5045
5072
  e.forEach((h, u) => {
5046
- const f = new TextEncoder().encode(u), p = new TextEncoder().encode(h), m = Et(p), g = new Uint8Array(30 + f.length), y = new DataView(g.buffer);
5047
- g.set([80, 75, 3, 4], 0), y.setUint16(4, 20, !0), y.setUint16(6, 0, !0), y.setUint16(8, 0, !0), y.setUint16(10, 0, !0), y.setUint16(12, 0, !0), y.setUint32(14, m, !0), y.setUint32(18, p.length, !0), y.setUint32(22, p.length, !0), y.setUint16(26, f.length, !0), y.setUint16(28, 0, !0), g.set(f, 30), t.push(g, p), o.push({
5073
+ const g = new TextEncoder().encode(u), p = new TextEncoder().encode(h), m = It(p), f = new Uint8Array(30 + g.length), b = new DataView(f.buffer);
5074
+ f.set([80, 75, 3, 4], 0), b.setUint16(4, 20, !0), b.setUint16(6, 0, !0), b.setUint16(8, 0, !0), b.setUint16(10, 0, !0), b.setUint16(12, 0, !0), b.setUint32(14, m, !0), b.setUint32(18, p.length, !0), b.setUint32(22, p.length, !0), b.setUint16(26, g.length, !0), b.setUint16(28, 0, !0), f.set(g, 30), t.push(f, p), o.push({
5048
5075
  path: u,
5049
5076
  offset: s,
5050
5077
  contentSize: p.length,
5051
5078
  crc: m
5052
- }), s += g.length + p.length;
5079
+ }), s += f.length + p.length;
5053
5080
  });
5054
5081
  const i = s;
5055
5082
  o.forEach((h) => {
5056
- const u = new TextEncoder().encode(h.path), f = new Uint8Array(46 + u.length), p = new DataView(f.buffer);
5057
- f.set([80, 75, 1, 2], 0), p.setUint16(4, 20, !0), p.setUint16(6, 20, !0), p.setUint16(8, 0, !0), p.setUint16(10, 0, !0), p.setUint16(12, 0, !0), p.setUint16(14, 0, !0), p.setUint32(16, h.crc, !0), p.setUint32(20, h.contentSize, !0), p.setUint32(24, h.contentSize, !0), p.setUint16(28, u.length, !0), p.setUint16(30, 0, !0), p.setUint16(32, 0, !0), p.setUint16(34, 0, !0), p.setUint16(36, 0, !0), p.setUint32(38, 0, !0), p.setUint32(42, h.offset, !0), f.set(u, 46), t.push(f), s += f.length;
5083
+ const u = new TextEncoder().encode(h.path), g = new Uint8Array(46 + u.length), p = new DataView(g.buffer);
5084
+ g.set([80, 75, 1, 2], 0), p.setUint16(4, 20, !0), p.setUint16(6, 20, !0), p.setUint16(8, 0, !0), p.setUint16(10, 0, !0), p.setUint16(12, 0, !0), p.setUint16(14, 0, !0), p.setUint32(16, h.crc, !0), p.setUint32(20, h.contentSize, !0), p.setUint32(24, h.contentSize, !0), p.setUint16(28, u.length, !0), p.setUint16(30, 0, !0), p.setUint16(32, 0, !0), p.setUint16(34, 0, !0), p.setUint16(36, 0, !0), p.setUint32(38, 0, !0), p.setUint32(42, h.offset, !0), g.set(u, 46), t.push(g), s += g.length;
5058
5085
  });
5059
5086
  const r = new Uint8Array(22), n = new DataView(r.buffer);
5060
5087
  r.set([80, 75, 5, 6], 0), n.setUint16(4, 0, !0), n.setUint16(6, 0, !0), n.setUint16(8, o.length, !0), n.setUint16(10, o.length, !0), n.setUint32(12, s - i, !0), n.setUint32(16, i, !0), n.setUint16(20, 0, !0), t.push(r);
@@ -5072,11 +5099,11 @@ class Tt {
5072
5099
  class Ge extends ut {
5073
5100
  constructor(e, t, s, o, i, r = new te(), n = new Tt()) {
5074
5101
  var c;
5075
- if (super(e, t, new ot(s), o), this.eventListener = i, this.copyService = r, this.excelService = n, this.licenseManager = G.getInstance(), this.listenerAbortController = new AbortController(), this.destroyed = !1, this.selectionService = new bt(this), this.api = new nt(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, this.lastContextmenu = Date.now(), t.setTableScope(this), i || (this.eventListener = new he()), (c = this.tableOptions) != null && c.autoRestoreOptions) {
5102
+ if (super(e, t, new ot(s), o), this.eventListener = i, this.copyService = r, this.excelService = n, this.licenseManager = G.getInstance(), this.listenerAbortController = new AbortController(), this.destroyed = !1, this.selectionService = new mt(this), this.api = new nt(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, this.lastContextmenu = Date.now(), t.setTableScope(this), i || (this.eventListener = new he()), (c = this.tableOptions) != null && c.autoRestoreOptions) {
5076
5103
  const h = this.tableOptions.autoRestoreOptions, u = h.getStorageKeyFn;
5077
5104
  u && (h.autoRestoreScrollPosition && (this.storeScrollPosStateService = new lt(u)), h.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new ct(u)), h.autoRestoreSortingState && (this.storeSortingService = new dt(u)));
5078
5105
  }
5079
- this.mouseHandler = new rt(this), this.inputHandler = new gt(this), this.resizeHandler = new It(this, o.resizeEventDebounceDelay), this.shortcutService = new St(this), this.shortcutService.addListener(this.selectionService);
5106
+ this.mouseHandler = new rt(this), this.inputHandler = new pt(this), this.resizeHandler = new Mt(this, o.resizeEventDebounceDelay), this.shortcutService = new xt(this), this.shortcutService.addListener(this.selectionService);
5080
5107
  const l = this.getSelectionModel ? this.getSelectionModel() : void 0;
5081
5108
  l && l.addEventSelectionChangedListener(this);
5082
5109
  const a = this.getFocusModel ? this.getFocusModel() : void 0;
@@ -5094,7 +5121,7 @@ class Ge extends ut {
5094
5121
  *
5095
5122
  * @return {TableScope} - The newly created TableScope instance.
5096
5123
  */
5097
- static create(e, t, s = new J(), o = new he(), i = new Ct(), r = new te()) {
5124
+ static create(e, t, s = new J(), o = new he(), i = new St(), r = new te()) {
5098
5125
  return new Ge(e, t, i, s, o, r);
5099
5126
  }
5100
5127
  /**
@@ -5205,7 +5232,7 @@ class Ge extends ut {
5205
5232
  * @return {void}
5206
5233
  */
5207
5234
  onMouseDown(e) {
5208
- e.columnIndex > -1 && e.action && ["resize-column", "drag-column"].includes(e.action) && (this.mouseStartWidth = this.tableModel.getColumnWidth(e.columnIndex), this.mouseStartAction = e.action, this.mouseStartColumnIndex = e.columnIndex, this.mouseStartAction === "drag-column" && (this.firstDraggingRendering = !0, this.dragFrom = this.mouseStartColumnIndex));
5235
+ this.selectionService.onMouseDown(), e.columnIndex > -1 && e.action && ["resize-column", "drag-column"].includes(e.action) && (this.mouseStartWidth = this.tableModel.getColumnWidth(e.columnIndex), this.mouseStartAction = e.action, this.mouseStartColumnIndex = e.columnIndex, this.mouseStartAction === "drag-column" && (this.firstDraggingRendering = !0, this.dragFrom = this.mouseStartColumnIndex));
5209
5236
  }
5210
5237
  /**
5211
5238
  * Handles mouse dragging on the frame.
@@ -5215,7 +5242,7 @@ class Ge extends ut {
5215
5242
  */
5216
5243
  mouseDraggingOnFrame(e, t) {
5217
5244
  var s, o;
5218
- (o = (s = this.eventListener).onMouseDragging) == null || o.call(s, e), this.mouseEvent = e, this.mouseStartColumnIndex > -1 && this.mouseStartAction === "resize-column" && this.tableOptions.columnsResizable ? this.resizeColumn(e) : this.mouseStartAction === "drag-column" && e.columnIndex > -1 && this.tableOptions.columnsDraggable && (this.draggingTargetColumnIndex = e.columnIndex, this.dragTo = this.draggingTargetColumnIndex, this.dragFrom > -1 && this.dragTo > -1 && this.dragFrom !== this.dragTo && (this.lastDragFrom === this.dragTo && this.lastDragTo === this.dragFrom || (this.tableModel.changeColumnOrder(this.dragFrom, this.dragTo), this.lastDragFrom = this.dragFrom, this.lastDragTo = this.dragTo, this.dragFrom = this.dragTo, this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows())), t && (this.adjustDraggingColumn(e, t.columnIndex, this.firstDraggingRendering), this.firstDraggingRendering = !1), this.repaint());
5245
+ (o = (s = this.eventListener).onMouseDragging) == null || o.call(s, e), this.mouseEvent = e, this.mouseStartColumnIndex > -1 && this.mouseStartAction === "resize-column" && this.tableOptions.columnsResizable ? this.resizeColumn(e) : !this.mouseStartAction && this.selectionService.onMouseDragging(e, t) ? this.repaint() : this.mouseStartAction === "drag-column" && e.columnIndex > -1 && this.tableOptions.columnsDraggable && (this.draggingTargetColumnIndex = e.columnIndex, this.dragTo = this.draggingTargetColumnIndex, this.dragFrom > -1 && this.dragTo > -1 && this.dragFrom !== this.dragTo && (this.lastDragFrom === this.dragTo && this.lastDragTo === this.dragFrom || (this.tableModel.changeColumnOrder(this.dragFrom, this.dragTo), this.lastDragFrom = this.dragFrom, this.lastDragTo = this.dragTo, this.dragFrom = this.dragTo, this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows())), t && (this.adjustDraggingColumn(e, t.columnIndex, this.firstDraggingRendering), this.firstDraggingRendering = !1), this.repaint());
5219
5246
  }
5220
5247
  /**
5221
5248
  * Handles the end of mouse dragging event on a frame.
@@ -5320,7 +5347,7 @@ class Ge extends ut {
5320
5347
  */
5321
5348
  externalFilterChanged(e = !0) {
5322
5349
  const t = this.tableOptions.externalFilterFunction;
5323
- t && (e && this.clearSelectionModel(), this.tableModel.externalFilterChanged(t), this.scrollViewport.scrollTo(0, 0), this.tableModel.recalcHeightAndPadding(), this.resetSizeOfWrapperDiv(), this.repaint());
5350
+ t && (e && this.clearSelectionModel(), this.tableModel.externalFilterChanged(t), this.reapplySorting(), this.scrollViewport.scrollTo(0, 0), this.tableModel.recalcHeightAndPadding(), this.resetSizeOfWrapperDiv(), this.repaint());
5324
5351
  }
5325
5352
  /**
5326
5353
  * Handle the double click event on the table header.
@@ -5336,8 +5363,8 @@ class Ge extends ut {
5336
5363
  const o = this.tableModel.getColumnDef(s);
5337
5364
  if (o != null && o.sortable && o.sortable()) {
5338
5365
  e.preventDefault(), e.stopPropagation();
5339
- const n = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, l = o.sortState ?? "", a = n[(n.indexOf(l) + 1) % n.length], c = new pt(s, a);
5340
- this.tableModel.doSort([c]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((u) => u.sortState = ""), o.sortState = a), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([c]);
5366
+ const n = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, l = o.sortState ?? "", a = n[(n.indexOf(l) + 1) % n.length], c = new Me(s, a), h = this.tableModel.doSort([c]);
5367
+ this.lastSortCompareFn = void 0, h && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((u) => u.sortState = ""), o.sortState = a), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([c]);
5341
5368
  }
5342
5369
  }
5343
5370
  /**
@@ -5374,7 +5401,7 @@ class Ge extends ut {
5374
5401
  var t, s;
5375
5402
  super.adjustAfterScrolling();
5376
5403
  const e = this.scrollViewport;
5377
- (s = (t = this.eventListener).onScroll) == null || s.call(t, new mt(
5404
+ (s = (t = this.eventListener).onScroll) == null || s.call(t, new ft(
5378
5405
  this.scrollTop,
5379
5406
  this.scrollLeft,
5380
5407
  e.scrollHeight,
@@ -5399,7 +5426,7 @@ class Ge extends ut {
5399
5426
  }
5400
5427
  toggleHeaderGroup(e) {
5401
5428
  const t = this.tableModel.getAreaModel("header");
5402
- "columnDefs" in this.tableModel && (this.tableModel.columnDefs = t.toggleHeaderGroup(e), console.info("####### !!!!!! *******, this.tableModel.columnDefs")), this.firstInit();
5429
+ "columnDefs" in this.tableModel && (this.tableModel.columnDefs = t.toggleHeaderGroup(e)), this.firstInit();
5403
5430
  }
5404
5431
  /**
5405
5432
  * Retrieves the selection model.
@@ -5524,17 +5551,48 @@ class Ge extends ut {
5524
5551
  }
5525
5552
  }
5526
5553
  }
5554
+ /**
5555
+ * Calculates a width per column that fits the widest text of header, body and footer.
5556
+ *
5557
+ * The text is measured with the font and padding of a rendered cell label (canvas `measureText`),
5558
+ * so dates, numbers and long names are no longer cut off. To stay fast with millions of rows, the body
5559
+ * is scanned once by character length and only the longest candidates per column are measured.
5560
+ * Without a canvas (e.g. in tests) it falls back to 8 px per character.
5561
+ *
5562
+ * @returns {number[]} one width in px per column (at least 50 px)
5563
+ */
5527
5564
  calcAutoColumnWidths() {
5528
- const e = this.tableModel.getBodyModel(), t = this.tableModel.getColumnCount(), s = (e == null ? void 0 : e.getRowCount()) ?? 0;
5565
+ const e = this.tableModel.getBodyModel(), t = this.tableModel.getColumnCount();
5529
5566
  if (!e)
5530
5567
  return console.warn("Body model is not available."), [];
5531
- const o = new Array(t).fill(0);
5532
- for (let i = 0; i < s; i++)
5533
- for (let r = 0; r < t; r++) {
5534
- const n = e.getValueAt(i, r), l = (n == null ? void 0 : n.toString().length) || 0;
5535
- l > o[r] && (o[r] = l);
5536
- }
5537
- return o.map((i) => Math.max(i * 10, 50));
5568
+ const s = 30, o = Array.from({ length: t }, () => /* @__PURE__ */ new Set()), i = new Array(t).fill(0), r = (u) => {
5569
+ var m, f;
5570
+ const g = this.tableModel.getAreaModel(u), p = (g == null ? void 0 : g.getRowCount()) ?? 0;
5571
+ for (let b = 0; b < p; b++)
5572
+ for (let w = 0; w < t; w++) {
5573
+ const v = ((m = g.getTextValueAt) == null ? void 0 : m.call(g, b, w)) || (((f = g.getValueAt(b, w)) == null ? void 0 : f.toString()) ?? ""), I = v.length;
5574
+ if (I > i[w]) {
5575
+ i[w] = I;
5576
+ for (const x of o[w]) x.length < I - 2 && o[w].delete(x);
5577
+ }
5578
+ I >= i[w] - 2 && o[w].size < s && o[w].add(v);
5579
+ }
5580
+ };
5581
+ r("header"), r("body"), r("footer");
5582
+ const n = this.hostElement.querySelector(".ge-table-label"), l = getComputedStyle(n ?? this.hostElement), a = n ? (parseFloat(l.paddingLeft) || 0) + (parseFloat(l.paddingRight) || 0) : 20;
5583
+ let c = null;
5584
+ try {
5585
+ c = document.createElement("canvas").getContext("2d");
5586
+ } catch {
5587
+ c = null;
5588
+ }
5589
+ c && (c.font = l.font || `${l.fontSize} ${l.fontFamily}`);
5590
+ const h = (u) => c ? c.measureText(u).width : u.length * 8;
5591
+ return o.map((u) => {
5592
+ let g = 0;
5593
+ for (const p of u) g = Math.max(g, h(p));
5594
+ return Math.max(Math.ceil(g + a + 2), 50);
5595
+ });
5538
5596
  }
5539
5597
  setColumnWidth(e, t) {
5540
5598
  this.tableModel.setColumnWidth(e, t);
@@ -5556,7 +5614,23 @@ class Ge extends ut {
5556
5614
  this.tableModel.doSort(e), this.repaint();
5557
5615
  }
5558
5616
  sort(e) {
5559
- this.tableModel.sort(e), this.repaint();
5617
+ var t;
5618
+ this.tableModel.sort(e), this.lastSortCompareFn = e, (t = this.tableModel.getColumnDefs()) == null || t.forEach((s) => s.sortState = ""), this.repaint();
5619
+ }
5620
+ /**
5621
+ * Sorts the (freshly filtered) body rows again, so a filter keeps the current order:
5622
+ * the last `sort(compareFn)` call, otherwise the columns with a `sortState` (header icons).
5623
+ */
5624
+ reapplySorting() {
5625
+ var t;
5626
+ if (this.lastSortCompareFn) {
5627
+ this.tableModel.sort(this.lastSortCompareFn);
5628
+ return;
5629
+ }
5630
+ const e = [];
5631
+ (t = this.tableModel.getColumnDefs()) == null || t.forEach((s, o) => {
5632
+ s.sortState && e.push(new Me(o, s.sortState));
5633
+ }), e.length && this.tableModel.doSort(e);
5560
5634
  }
5561
5635
  /**
5562
5636
  * Ensures that a specific row is visible in the viewport by scrolling if necessary.
@@ -5857,7 +5931,7 @@ ie.themes = ["light", "combat", "paper", "blackboard"], ie.vars = {
5857
5931
  --ge-table-drop-zone-bg: #758129;
5858
5932
  }`
5859
5933
  };
5860
- let Ie = ie;
5934
+ let Te = ie;
5861
5935
  class Ee {
5862
5936
  constructor(e, t = !0, s, o, i = 0, r = !1, n = !1) {
5863
5937
  this.data = e, this.expanded = t, this.children = s, this.parent = o, this.deep = i, this.checked = r, this.keep = n, this.type = "TreeRow";
@@ -5894,41 +5968,41 @@ class Y {
5894
5968
  this.header = e, this.body = t, this.footer = s;
5895
5969
  }
5896
5970
  }
5897
- class b {
5971
+ class y {
5898
5972
  constructor(e = 100, t = "px") {
5899
5973
  this.value = e, this.unit = t;
5900
5974
  }
5901
5975
  }
5902
- const kt = () => !0, Te = () => !1;
5976
+ const Et = () => !0, kt = () => !1;
5903
5977
  class W {
5904
- constructor(e, t, s = new b(100, "px"), o = new T(), i = new T(), r = new b(100, "px"), n = new b(100, "px"), l, a, c, h, u, f, p, m, g = () => this.visible) {
5905
- this.property = e, this.headerLabel = t, this.width = s, this.classes = o, this.rendererMap = i, this.minWidth = r, this.maxWidth = n, this.sortable = l, this.sortComparator = a, this.sortState = c, this.sortStatesOrder = h, this.sortIconVisible = u, this.editable = f, this.getEditRenderer = p, this.editInputPipe = m, this.isVisible = g, this.visible = !0, s.unit !== "px" && (this.minWidth = new b(0, "px"), this.maxWidth = new b(1e5, "px"));
5978
+ constructor(e, t, s = new y(100, "px"), o = new k(), i = new k(), r = new y(100, "px"), n = new y(100, "px"), l, a, c, h, u, g, p, m, f = () => this.visible) {
5979
+ this.property = e, this.headerLabel = t, this.width = s, this.classes = o, this.rendererMap = i, this.minWidth = r, this.maxWidth = n, this.sortable = l, this.sortComparator = a, this.sortState = c, this.sortStatesOrder = h, this.sortIconVisible = u, this.editable = g, this.getEditRenderer = p, this.editInputPipe = m, this.isVisible = f, this.visible = !0, s.unit !== "px" && (this.minWidth = new y(0, "px"), this.maxWidth = new y(1e5, "px"));
5906
5980
  }
5907
5981
  static bodyRenderer(e) {
5908
- return new T(
5982
+ return new k(
5909
5983
  void 0,
5910
5984
  e,
5911
5985
  void 0
5912
5986
  );
5913
5987
  }
5914
5988
  static create(e) {
5915
- const t = new T(
5989
+ const t = new k(
5916
5990
  e.headerRenderer,
5917
5991
  e.bodyRenderer,
5918
5992
  e.footerRenderer
5919
- ), s = new T(
5993
+ ), s = new k(
5920
5994
  e.headerClasses,
5921
5995
  e.bodyClasses,
5922
5996
  e.footerClasses
5923
- ), o = e.sortIconVisible ?? e.sortable ?? Te, i = e.editable ?? e.editable ?? Te, r = e.isVisible ?? e.isVisible ?? kt;
5997
+ ), o = e.sortIconVisible ?? e.sortable, i = e.editable ?? e.editable ?? kt, r = e.isVisible ?? e.isVisible ?? Et;
5924
5998
  return new W(
5925
5999
  e.property ?? "",
5926
6000
  e.headerLabel ?? "",
5927
- e.width ?? new b(100, "px"),
6001
+ e.width ?? new y(100, "px"),
5928
6002
  s,
5929
6003
  t,
5930
- e.minWidth ?? new b(100, "px"),
5931
- e.maxWidth ?? new b(100, "px"),
6004
+ e.minWidth ?? new y(100, "px"),
6005
+ e.maxWidth ?? new y(100, "px"),
5932
6006
  e.sortable,
5933
6007
  e.sortComparator,
5934
6008
  e.sortState,
@@ -5941,7 +6015,7 @@ class W {
5941
6015
  );
5942
6016
  }
5943
6017
  }
5944
- const Zt = new b(500, "px"), Qt = new b(400, "px"), Dt = new b(300, "px"), es = new b(290, "px"), ts = new b(280, "px"), ss = new b(270, "px"), os = new b(260, "px"), is = new b(250, "px"), rs = new b(240, "px"), ns = new b(230, "px"), ls = new b(220, "px"), as = new b(210, "px"), ke = new b(200, "px"), cs = new b(190, "px"), ds = new b(180, "px"), hs = new b(170, "px"), us = new b(160, "px"), ps = new b(150, "px"), gs = new b(140, "px"), fs = new b(130, "px"), ms = new b(120, "px"), bs = new b(110, "px"), ys = new b(100, "px"), ws = new b(90, "px"), xs = new b(80, "px"), Ss = new b(70, "px"), Cs = new b(60, "px"), vs = new b(50, "px"), Rs = new b(40, "px"), As = new b(30, "px"), Ms = new b(20, "px"), Is = new b(10, "px"), Es = new b(0, "px");
6018
+ const Zt = new y(500, "px"), Qt = new y(400, "px"), Dt = new y(300, "px"), es = new y(290, "px"), ts = new y(280, "px"), ss = new y(270, "px"), os = new y(260, "px"), is = new y(250, "px"), rs = new y(240, "px"), ns = new y(230, "px"), ls = new y(220, "px"), as = new y(210, "px"), ke = new y(200, "px"), cs = new y(190, "px"), ds = new y(180, "px"), hs = new y(170, "px"), us = new y(160, "px"), ps = new y(150, "px"), gs = new y(140, "px"), fs = new y(130, "px"), ms = new y(120, "px"), bs = new y(110, "px"), ys = new y(100, "px"), ws = new y(90, "px"), xs = new y(80, "px"), Ss = new y(70, "px"), Cs = new y(60, "px"), vs = new y(50, "px"), Rs = new y(40, "px"), As = new y(30, "px"), Ms = new y(20, "px"), Is = new y(10, "px"), Ts = new y(0, "px");
5945
6019
  class F extends ye {
5946
6020
  constructor(e, t, s, o = []) {
5947
6021
  super(e, o, s), this.areaIdent = e, this.arr = t, this.defaultRowHeight = s, this.columnDefs = o, this.filteredArr = [...t];
@@ -6276,10 +6350,10 @@ class Pt {
6276
6350
  }
6277
6351
  }
6278
6352
  class ae {
6279
- constructor(e, t, s, o = 0, i = 0, r = !1, n = new Y(), l = [], a = [], c = -1, h = 0, u = 400, f = () => {
6353
+ constructor(e, t, s, o = 0, i = 0, r = !1, n = new Y(), l = [], a = [], c = -1, h = 0, u = 400, g = () => {
6280
6354
  }) {
6281
- var p, m, g, y;
6282
- this.headerAreaModel = e, this.bodyAreaModel = t, this.footerAreaModel = s, this.fixedLeftColumnCount = o, this.fixedRightColumnCount = i, this.rowCheckboxVisible = r, this.defaultRowHeights = n, this.columnDefs = l, this.columnSizes = a, this.overridingColumnWidth = c, this.columnCount = h, this.parentSize = u, this.getSelectionModel = f, this.rowCount = 0, this.contentHeightInPx = 0, this.contentWidthInPx = 0, this.padding = new pe(0, 0, 0, 0), this.xPositions = [], e.areaIdent = "header", t.areaIdent = "body", s.areaIdent = "footer", this.columnCount || ((p = this.columnDefs) != null && p.length ? this.columnCount = this.columnDefs.length : (m = this.columnSizes) != null && m.length && (this.columnCount = (g = this.columnSizes) == null ? void 0 : g.length)), (y = this.columnDefs) != null && y.length && st(this.columnDefs[0]) && !t.rowSelectionModel && (t.rowSelectionModel = new Pt());
6355
+ var p, m, f, b;
6356
+ this.headerAreaModel = e, this.bodyAreaModel = t, this.footerAreaModel = s, this.fixedLeftColumnCount = o, this.fixedRightColumnCount = i, this.rowCheckboxVisible = r, this.defaultRowHeights = n, this.columnDefs = l, this.columnSizes = a, this.overridingColumnWidth = c, this.columnCount = h, this.parentSize = u, this.getSelectionModel = g, this.rowCount = 0, this.contentHeightInPx = 0, this.contentWidthInPx = 0, this.padding = new pe(0, 0, 0, 0), this.xPositions = [], e.areaIdent = "header", t.areaIdent = "body", s.areaIdent = "footer", this.columnCount || ((p = this.columnDefs) != null && p.length ? this.columnCount = this.columnDefs.length : (m = this.columnSizes) != null && m.length && (this.columnCount = (f = this.columnSizes) == null ? void 0 : f.length)), (b = this.columnDefs) != null && b.length && st(this.columnDefs[0]) && !t.rowSelectionModel && (t.rowSelectionModel = new Pt());
6283
6357
  }
6284
6358
  init() {
6285
6359
  this.recalcSize(this.parentSize), this.overridingColumnWidth === -1 && this.calcXPositions(), this.headerAreaModel && this.headerAreaModel.init(), this.bodyAreaModel && this.bodyAreaModel.init(), this.footerAreaModel && this.footerAreaModel.init();
@@ -6709,7 +6783,7 @@ class Fe extends _ {
6709
6783
  ), this.areaIdent = e, this.rows = t, this.columnDefs = s, this.defaultRowHeight = o;
6710
6784
  }
6711
6785
  }
6712
- class $ {
6786
+ class H {
6713
6787
  /**
6714
6788
  * TableFactory
6715
6789
  *
@@ -6747,32 +6821,32 @@ class $ {
6747
6821
  * Please consult each method's documentation for detailed explanation of their functionality.
6748
6822
  */
6749
6823
  static createTableModel(e) {
6750
- var t, s, o, i, r, n, l, a, c, h, u, f, p, m;
6824
+ var t, s, o, i, r, n, l, a, c, h, u, g, p, m;
6751
6825
  if (e.defaultRowHeights === void 0)
6752
6826
  if ((t = e.tableOptions) != null && t.defaultRowHeights)
6753
6827
  e.defaultRowHeights = e.tableOptions.defaultRowHeights;
6754
6828
  else {
6755
6829
  if (e.defaultRowHeights = new Y(), e.headerAreaModel && "defaultRowHeight" in e.headerAreaModel) {
6756
- const g = e.headerAreaModel.defaultRowHeight;
6757
- g > -1 && (e.defaultRowHeights.header = g);
6830
+ const f = e.headerAreaModel.defaultRowHeight;
6831
+ f > -1 && (e.defaultRowHeights.header = f);
6758
6832
  }
6759
6833
  if (e.bodyAreaModel && "defaultRowHeight" in e.bodyAreaModel) {
6760
- const g = e.bodyAreaModel.defaultRowHeight;
6761
- g > -1 && (e.defaultRowHeights.body = g);
6834
+ const f = e.bodyAreaModel.defaultRowHeight;
6835
+ f > -1 && (e.defaultRowHeights.body = f);
6762
6836
  }
6763
6837
  if (e.footerAreaModel && "defaultRowHeight" in e.footerAreaModel) {
6764
- const g = e.footerAreaModel.defaultRowHeight;
6765
- g > -1 && (e.defaultRowHeights.footer = g);
6838
+ const f = e.footerAreaModel.defaultRowHeight;
6839
+ f > -1 && (e.defaultRowHeights.footer = f);
6766
6840
  }
6767
6841
  }
6768
- if (e.columnDefs === void 0 && ((s = e.properties) != null && s.length ? e.columnDefs = e.properties.map((g) => new W(g, g.toUpperCase(), ke)) : (o = e.rows) != null && o.length ? e.columnDefs = Object.keys(e.rows[0]).map((g) => new W(g, g.toUpperCase(), ke)) : e.columnDefs = []), e.columnCount === void 0 && ((i = e.columnDefs) != null && i.length ? e.columnCount = e.columnDefs.length : (r = e.headerData) != null && r.length ? e.columnCount = e.headerData[0].length : (n = e.columnSizes) != null && n.length ? e.columnCount = (l = e.columnSizes) == null ? void 0 : l.length : console.warn('Property "columnCount" is missing and cannot be derived from other properties.')), e.headerAreaModel || ((a = e.headerData) != null && a.length ? e.headerAreaModel = new F(
6842
+ if (e.columnDefs === void 0 && ((s = e.properties) != null && s.length ? e.columnDefs = e.properties.map((f) => new W(f, f.toUpperCase(), ke)) : (o = e.rows) != null && o.length ? e.columnDefs = Object.keys(e.rows[0]).map((f) => new W(f, f.toUpperCase(), ke)) : e.columnDefs = []), e.columnCount === void 0 && ((i = e.columnDefs) != null && i.length ? e.columnCount = e.columnDefs.length : (r = e.headerData) != null && r.length ? e.columnCount = e.headerData[0].length : (n = e.columnSizes) != null && n.length ? e.columnCount = (l = e.columnSizes) == null ? void 0 : l.length : console.warn('Property "columnCount" is missing and cannot be derived from other properties.')), e.headerAreaModel || ((a = e.headerData) != null && a.length ? e.headerAreaModel = new F(
6769
6843
  "header",
6770
6844
  e.headerData,
6771
6845
  e.defaultRowHeights.header,
6772
6846
  e.columnDefs
6773
6847
  ) : (c = e.columnDefs) != null && c.length ? e.headerAreaModel = new F(
6774
6848
  "header",
6775
- [e.columnDefs.map((g) => g.headerLabel)],
6849
+ [e.columnDefs.map((f) => f.headerLabel)],
6776
6850
  e.defaultRowHeights.header,
6777
6851
  e.columnDefs
6778
6852
  ) : e.headerAreaModel = new P("header")), e.footerAreaModel || ((h = e.footerData) != null && h.length ? e.footerAreaModel = new F(
@@ -6783,13 +6857,13 @@ class $ {
6783
6857
  ) : e.footerAreaModel = new P("footer")), !e.bodyAreaModel)
6784
6858
  if (e.rows)
6785
6859
  if ((u = e.rows) != null && u.length && j(e.rows[0])) {
6786
- const g = e.rows;
6860
+ const f = e.rows;
6787
6861
  e.bodyAreaModel = new se(
6788
6862
  "body",
6789
- g,
6863
+ f,
6790
6864
  e.defaultRowHeights.body,
6791
6865
  e.columnDefs
6792
- ), (e.columnDefs[0].property === "CheckboxColumn" || (f = e.tableOptions) != null && f.showCheckboxWihoutExtraColumn) && (e.bodyAreaModel.rowSelectionModel = new De(g));
6866
+ ), (e.columnDefs[0].property === "CheckboxColumn" || (g = e.tableOptions) != null && g.showCheckboxWihoutExtraColumn) && (e.bodyAreaModel.rowSelectionModel = new De(f));
6793
6867
  } else
6794
6868
  e.bodyAreaModel = new Fe(
6795
6869
  "body",
@@ -6836,7 +6910,7 @@ class $ {
6836
6910
  * @method
6837
6911
  */
6838
6912
  static buildByTypedRowsParam(e) {
6839
- return $.buildByTypedRows(
6913
+ return H.buildByTypedRows(
6840
6914
  e.rows ?? [],
6841
6915
  e.columnDefs,
6842
6916
  e.tableOptions ?? new J(),
@@ -6889,7 +6963,7 @@ class $ {
6889
6963
  r.body,
6890
6964
  t
6891
6965
  );
6892
- return (n || s.showCheckboxWihoutExtraColumn) && (c.rowSelectionModel = new De(a)), $.createByAreaModelsParam({
6966
+ return (n || s.showCheckboxWihoutExtraColumn) && (c.rowSelectionModel = new De(a)), H.createByAreaModelsParam({
6893
6967
  headerAreaModel: new F("header", [t.map((h) => h.headerLabel)], r.header),
6894
6968
  bodyAreaModel: c,
6895
6969
  footerAreaModel: new F("footer", [], r.footer),
@@ -6903,7 +6977,7 @@ class $ {
6903
6977
  overridingColumnWidth: -1
6904
6978
  });
6905
6979
  }
6906
- return $.createByObjectArrayParam({
6980
+ return H.createByObjectArrayParam({
6907
6981
  rows: e,
6908
6982
  columnDefs: t,
6909
6983
  fixedLeftColumnCount: o,
@@ -6957,7 +7031,7 @@ class $ {
6957
7031
  */
6958
7032
  static createByObjectArrayParam(e) {
6959
7033
  const t = e.rowCheckboxVisible !== void 0 ? e.rowCheckboxVisible : !1;
6960
- return $.createByObjectArray(
7034
+ return H.createByObjectArray(
6961
7035
  e.rows,
6962
7036
  e.header ?? [],
6963
7037
  e.footer ?? [],
@@ -7062,7 +7136,7 @@ class $ {
7062
7136
  * });
7063
7137
  */
7064
7138
  static createByAreaModelsParam(e) {
7065
- return $.createByAreaModels(
7139
+ return H.createByAreaModels(
7066
7140
  e.headerAreaModel ?? new P(),
7067
7141
  e.bodyAreaModel,
7068
7142
  e.footerAreaModel ?? new P(),
@@ -7126,7 +7200,7 @@ class $ {
7126
7200
  */
7127
7201
  static createByObjectArray(e, t = [], s = [], o = 0, i = 0, r = !1, n = new Y(), l, a = []) {
7128
7202
  let c;
7129
- t != null && t.length ? c = new F("header", t, n.header, l) : l != null && l.length ? c = new F("header", [l.map((f) => f.headerLabel)], n.header, l) : c = new P();
7203
+ t != null && t.length ? c = new F("header", t, n.header, l) : l != null && l.length ? c = new F("header", [l.map((g) => g.headerLabel)], n.header, l) : c = new P();
7130
7204
  const h = s ? new F("footer", s, n.footer, l) : new P(), u = new Fe("body", e, l, n.body);
7131
7205
  return new ae(
7132
7206
  c,
@@ -7330,7 +7404,7 @@ class Lt {
7330
7404
  return this.tableScope;
7331
7405
  }
7332
7406
  }
7333
- class Ot {
7407
+ class Vt {
7334
7408
  constructor() {
7335
7409
  this.autoRestoreSortingState = !1, this.autoRestoreCollapsedExpandedState = !1, this.autoRestoreScrollPosition = !1, this.autoRestoreCheckedState = !1, this.autoRestoreSelectedState = !1, this.getStorageKeyFn = void 0, this.isSame = (e, t, s) => {
7336
7410
  if (e && t && s.getRowId) {
@@ -7355,7 +7429,7 @@ class Ot {
7355
7429
  };
7356
7430
  }
7357
7431
  }
7358
- class Ts {
7432
+ class Es {
7359
7433
  static createCoverGridModel(e, t, s = 200, o = 300, i = 0, r = 0) {
7360
7434
  const n = new _t(e, t, s, o, i, r);
7361
7435
  return new Lt(n, r);
@@ -7380,7 +7454,7 @@ class Ts {
7380
7454
  },
7381
7455
  // externalFilterFunction: this.filterFn.bind(this),
7382
7456
  autoRestoreOptions: {
7383
- ...new Ot(),
7457
+ ...new Vt(),
7384
7458
  getStorageKeyFn: t,
7385
7459
  autoRestoreCollapsedExpandedState: !1,
7386
7460
  autoRestoreScrollPosition: !0,
@@ -7408,17 +7482,17 @@ const ks = [
7408
7482
  // "PAGEUP_PRESSED",
7409
7483
  // "PAGEDOWN_PRESSED"
7410
7484
  ];
7411
- class Vt {
7485
+ class Ot {
7412
7486
  constructor(e, t) {
7413
7487
  this.tableModel = e, this.tableOptions = t;
7414
7488
  }
7415
7489
  }
7416
- class Ht {
7490
+ class $t {
7417
7491
  constructor(e, t, s, o, i, r, n) {
7418
7492
  this.emmitDataKey = e, this.emmitCancelKey = t, this.queryId = s, this.filter = o, this.sorting = i, this.startIndex = r, this.endIndex = n;
7419
7493
  }
7420
7494
  }
7421
- class Ds extends Ht {
7495
+ class Ds extends $t {
7422
7496
  constructor(e, t, s, o, i, r, n, l) {
7423
7497
  super(
7424
7498
  e,
@@ -7431,7 +7505,7 @@ class Ds extends Ht {
7431
7505
  ), this.rows = l;
7432
7506
  }
7433
7507
  }
7434
- class $t {
7508
+ class Ht {
7435
7509
  constructor(e, t) {
7436
7510
  this.value = e, this.label = t;
7437
7511
  }
@@ -7441,15 +7515,15 @@ class Fs {
7441
7515
  this.index = e, this.px = t;
7442
7516
  }
7443
7517
  }
7444
- const Ps = { body: ["ge-table-text-align-left"] }, _s = { body: ["ge-table-text-align-center"] }, Ls = { body: ["ge-table-text-align-right"] }, Os = {
7518
+ const Ps = { body: ["ge-table-text-align-left"] }, _s = { body: ["ge-table-text-align-center"] }, Ls = { body: ["ge-table-text-align-right"] }, Vs = {
7445
7519
  header: ["ge-table-text-align-left"],
7446
7520
  body: ["ge-table-text-align-left"],
7447
7521
  footer: ["ge-table-text-align-left"]
7448
- }, Vs = {
7522
+ }, Os = {
7449
7523
  header: ["ge-table-text-align-center"],
7450
7524
  body: ["ge-table-text-align-center"],
7451
7525
  footer: ["ge-table-text-align-center"]
7452
- }, Hs = {
7526
+ }, $s = {
7453
7527
  header: ["ge-table-text-align-right"],
7454
7528
  body: ["ge-table-text-align-right"],
7455
7529
  footer: ["ge-table-text-align-right"]
@@ -7472,9 +7546,9 @@ class Pe {
7472
7546
  }
7473
7547
  }
7474
7548
  }
7475
- class $s {
7549
+ class Hs {
7476
7550
  constructor() {
7477
- this.type = "CheckboxColumnDef", this.property = "CheckboxColumn", this.headerLabel = "", this.width = new b(50, "px"), this.minWidth = new b(50, "px"), this.maxWidth = new b(100, "px"), this.rendererMap = new T(new Pe(), new Pe(), void 0), this.classes = new T(
7551
+ this.type = "CheckboxColumnDef", this.property = "CheckboxColumn", this.headerLabel = "", this.width = new y(50, "px"), this.minWidth = new y(50, "px"), this.maxWidth = new y(100, "px"), this.rendererMap = new k(new Pe(), new Pe(), void 0), this.classes = new k(
7478
7552
  [],
7479
7553
  ["ge-table-text-align-left"],
7480
7554
  []
@@ -7489,7 +7563,7 @@ class Bs {
7489
7563
  * @returns {AreaObjectMap<CellRendererIf>} The newly created AreaObjectMap.
7490
7564
  */
7491
7565
  static body(e) {
7492
- return new T(
7566
+ return new k(
7493
7567
  void 0,
7494
7568
  e,
7495
7569
  void 0
@@ -8456,7 +8530,12 @@ class zs {
8456
8530
  }
8457
8531
  toggleHeaderGroup(e) {
8458
8532
  const t = this.arr[e.rowIdx][e.colIdx];
8459
- return t != null && t.toggle && t.visibility !== "always" && (t.closed = !t.closed, this.init()), E.buildColumnDefs(this.groupExts);
8533
+ t != null && t.toggle && t.visibility !== "always" && (t.closed = !t.closed, this.init());
8534
+ const s = E.buildColumnDefs(this.groupExts), o = new Map(this.columnDefs.map((r) => [r.property, r])), i = s.map((r) => {
8535
+ const n = o.get(r.property);
8536
+ return n ? (n.isVisible = r.isVisible, n) : r;
8537
+ });
8538
+ return this.columnDefs = i, i;
8460
8539
  }
8461
8540
  }
8462
8541
  class js {
@@ -8515,7 +8594,7 @@ class js {
8515
8594
  }
8516
8595
  class Us {
8517
8596
  static bodyRenderer(e) {
8518
- return new T(void 0, e, void 0);
8597
+ return new k(void 0, e, void 0);
8519
8598
  }
8520
8599
  }
8521
8600
  class Ys {
@@ -8538,7 +8617,7 @@ class Ys {
8538
8617
  ${h}
8539
8618
  class="ge-input-checkbox">`, !this.readonly) {
8540
8619
  const u = e.querySelector(".ge-input-checkbox");
8541
- u && u.addEventListener("click", (f, p) => (l[this.property] = !l[this.property], !0));
8620
+ u && u.addEventListener("click", (g, p) => (l[this.property] = !l[this.property], !0));
8542
8621
  }
8543
8622
  }
8544
8623
  }
@@ -8721,7 +8800,7 @@ class ze {
8721
8800
  this.action = e, this.area = t, this.areaModel = s, this.rowIndex = o, this.columnIndex = i, this.id = r;
8722
8801
  }
8723
8802
  }
8724
- class H {
8803
+ class $ {
8725
8804
  constructor(e, t, s = "", o = "", i = "button", r = !0) {
8726
8805
  this.action = e, this.label = t, this.icon = s, this.elementClass = o, this.elementType = i, this.enabled = r;
8727
8806
  }
@@ -8788,7 +8867,7 @@ class Nt {
8788
8867
  return null;
8789
8868
  }
8790
8869
  getCrudActions(e) {
8791
- return Array.isArray(e) && e.every((t) => t instanceof H) ? e : this.crudActions;
8870
+ return Array.isArray(e) && e.every((t) => t instanceof $) ? e : this.crudActions;
8792
8871
  }
8793
8872
  }
8794
8873
  const no = function(d, e, t) {
@@ -8800,7 +8879,7 @@ class je {
8800
8879
  }
8801
8880
  static create(e) {
8802
8881
  return new je(
8803
- e.map((t) => new $t(t, t))
8882
+ e.map((t) => new Ht(t, t))
8804
8883
  );
8805
8884
  }
8806
8885
  render(e, t, s, o, i, r, n) {
@@ -9081,14 +9160,14 @@ class jt {
9081
9160
  method: "GET"
9082
9161
  }
9083
9162
  }, this.singleRowActions = [
9084
- new H("VIEW", "View", "", "", "link"),
9085
- new H("EDIT", "Edit", "", "", "link"),
9086
- new H("CLONE", "Clone", "", "", "link"),
9087
- new H("DELETE", "Delete", "", "", "link")
9163
+ new $("VIEW", "View", "", "", "link"),
9164
+ new $("EDIT", "Edit", "", "", "link"),
9165
+ new $("CLONE", "Clone", "", "", "link"),
9166
+ new $("DELETE", "Delete", "", "", "link")
9088
9167
  // new CrudAction('CREATE', 'Create', '', '', 'link'),
9089
9168
  ], this.tableActions = [
9090
- new H("CREATE", "Create", "", "", "button"),
9091
- new H("DELETE_SELECTED", "Delete Selected", "", "", "button")
9169
+ new $("CREATE", "Create", "", "", "button"),
9170
+ new $("DELETE_SELECTED", "Delete Selected", "", "", "button")
9092
9171
  ], this.autoAddActionColumn = !0, this.columnWidths = new Gt(), this.calcFixedRightColumnCount = (e) => e > 6 ? 1 : 0, this.getHeadersInit = () => ({}), this.getIdKey = () => "id", this.getIdByObject = (e) => (this.getIdKey() ?? "id") in e ? e.id : e, this.fetchList = (e) => {
9093
9172
  const t = e.getHeadersInit ? e.getHeadersInit() : {};
9094
9173
  let s = e.urls.list.url, o = e.urls.list.method ?? "GET";
@@ -9151,42 +9230,42 @@ class ho {
9151
9230
  this.crudOptions = e, this.listenActionEvent = o, e.fetchList(e).then((i) => {
9152
9231
  var r, n, l, a;
9153
9232
  if (t.rows = i, i != null && i.length) {
9154
- const c = (r = t.columnDefs) != null && r.length ? t.columnDefs.map((x) => x.property) : this.extractProperties(i[0]), h = new Ce("row", "multi"), u = () => h;
9233
+ const c = (r = t.columnDefs) != null && r.length ? t.columnDefs.map((w) => w.property) : this.extractProperties(i[0]), h = new Ce("row", "multi"), u = () => h;
9155
9234
  this.tableOptions = {
9156
9235
  ...new J(),
9157
9236
  ...t.tableOptions,
9158
9237
  hoverColumnVisible: !1,
9159
9238
  getSelectionModel: u
9160
9239
  };
9161
- const f = this.calcAutoColumnWidths(i, c), p = (n = t.columnDefs) != null && n.length ? t.columnDefs : c.map(((x, A) => new W(x, x.toUpperCase(), new b(f[A], "px"))));
9240
+ const g = this.calcAutoColumnWidths(i, c), p = (n = t.columnDefs) != null && n.length ? t.columnDefs : c.map(((w, v) => new W(w, w.toUpperCase(), new y(g[v], "px"))));
9162
9241
  if ((l = e == null ? void 0 : e.columnWidths) != null && l.autoCalc)
9163
- for (let x = 0; x < p.length; x++) {
9164
- const A = p[x];
9165
- A.width = new b(f[x], "px");
9242
+ for (let w = 0; w < p.length; w++) {
9243
+ const v = p[w];
9244
+ v.width = new y(g[w], "px");
9166
9245
  }
9167
9246
  if (e.autoAddActionColumn) {
9168
- let x = new W(
9247
+ let w = new W(
9169
9248
  "id",
9170
9249
  "Actions",
9171
9250
  Dt,
9172
- new T(["ge-table-text-align-left"], ["ge-table-text-align-left ge-table-actions-cell"], void 0)
9251
+ new k(["ge-table-text-align-left"], ["ge-table-text-align-left ge-table-actions-cell"], void 0)
9173
9252
  );
9174
- x.rendererMap = new T(
9253
+ w.rendererMap = new k(
9175
9254
  void 0,
9176
9255
  new Nt(this, e.singleRowActions),
9177
9256
  void 0
9178
- ), p.push(x);
9257
+ ), p.push(w);
9179
9258
  }
9180
- const m = 0, g = e.calcFixedRightColumnCount(p.length);
9181
- this.tableModel = $.buildByTypedRowsParam({
9259
+ const m = 0, f = e.calcFixedRightColumnCount(p.length);
9260
+ this.tableModel = H.buildByTypedRowsParam({
9182
9261
  rows: i,
9183
9262
  columnDefs: p,
9184
9263
  tableOptions: this.tableOptions,
9185
9264
  fixedLeftColumnCount: m,
9186
- fixedRightColumnCount: g
9265
+ fixedRightColumnCount: f
9187
9266
  }), this.tableModel.getSelectionModel = u, this.bodyModel = (a = this.tableModel) == null ? void 0 : a.getBodyModel();
9188
- const y = new Vt(this.tableModel, this.tableOptions);
9189
- s(y);
9267
+ const b = new Ot(this.tableModel, this.tableOptions);
9268
+ s(b);
9190
9269
  }
9191
9270
  });
9192
9271
  }
@@ -9236,7 +9315,7 @@ class ho {
9236
9315
  let r = e.id;
9237
9316
  (i = this.crudOptions) == null || i.deleteItem(this.crudOptions, r).then((n) => {
9238
9317
  var l, a, c, h, u;
9239
- return (l = this.bodyModel) == null || l.filterRowsByPredict((f) => f.id != r), (c = (a = this.tableModel) == null ? void 0 : a.getTableScope()) == null || c.clearSelection(!0), (u = (h = this.tableModel) == null ? void 0 : h.getTableScope()) == null || u.repaintHard(), n;
9318
+ return (l = this.bodyModel) == null || l.filterRowsByPredict((g) => g.id != r), (c = (a = this.tableModel) == null ? void 0 : a.getTableScope()) == null || c.clearSelection(!0), (u = (h = this.tableModel) == null ? void 0 : h.getTableScope()) == null || u.repaintHard(), n;
9240
9319
  });
9241
9320
  }
9242
9321
  }
@@ -9248,7 +9327,7 @@ class ho {
9248
9327
  const i = e.length ?? 0, r = new Array(o).fill(0);
9249
9328
  for (let c = 0; c < i; c++)
9250
9329
  for (let h = 0; h < o; h++) {
9251
- const u = t[h], f = this.getValueByT(e[c], u), p = (f == null ? void 0 : f.toString().length) || 0;
9330
+ const u = t[h], g = this.getValueByT(e[c], u), p = (g == null ? void 0 : g.toString().length) || 0;
9252
9331
  p > r[h] && (r[h] = p);
9253
9332
  }
9254
9333
  if (this.crudOptions.columnWidths.takeHeaderLabelsIntoAccount)
@@ -9290,7 +9369,7 @@ export {
9290
9369
  ye as AbstractAreaModel,
9291
9370
  ze as ActionEvent,
9292
9371
  Nt as ActionsCellRenderer,
9293
- $e as AnyPropertyType,
9372
+ He as AnyPropertyType,
9294
9373
  Bs as AreaMapFactory,
9295
9374
  Gs as AreaModel,
9296
9375
  F as AreaModelArrayOfArrays,
@@ -9299,9 +9378,9 @@ export {
9299
9378
  _ as AreaModelObjectArray,
9300
9379
  Fe as AreaModelObjectArrayWithColumndefs,
9301
9380
  se as AreaModelTree,
9302
- T as AreaObjectMap,
9381
+ k as AreaObjectMap,
9303
9382
  B as ArrayPropertyType,
9304
- Ot as AutoRestoreOptions,
9383
+ Vt as AutoRestoreOptions,
9305
9384
  Yt as AvoidDoubleExecution,
9306
9385
  qe as BooleanPropertyType,
9307
9386
  Bt as CellGroup,
@@ -9311,7 +9390,7 @@ export {
9311
9390
  E as CellgroupFactory,
9312
9391
  Ys as CheckboxBooleanPropertyCellRenderer,
9313
9392
  Pe as CheckboxCellRenderer,
9314
- $s as CheckboxColumnDef,
9393
+ Hs as CheckboxColumnDef,
9315
9394
  Pt as CheckboxModel,
9316
9395
  Ds as ChunkData,
9317
9396
  ht as ColAndRowspanModel,
@@ -9323,14 +9402,14 @@ export {
9323
9402
  ot as ConvenienceDomService,
9324
9403
  te as CopyService,
9325
9404
  _t as CoverGridBodyModel,
9326
- Ts as CoverGridFactory,
9405
+ Es as CoverGridFactory,
9327
9406
  Lt as CoverGridTableModel,
9328
- H as CrudAction,
9407
+ $ as CrudAction,
9329
9408
  ce as CrudObjectEdit,
9330
9409
  zt as CrudObjectView,
9331
9410
  jt as CrudOptions,
9332
9411
  ho as CrudTableModelFactory,
9333
- Ie as CssVars,
9412
+ Te as CssVars,
9334
9413
  Ks as DateToIntlDDMMYYYYCellRenderer,
9335
9414
  Xs as DateToIsoCellRenderer,
9336
9415
  Js as DateToLocaleDateCellRenderer,
@@ -9340,20 +9419,21 @@ export {
9340
9419
  he as EventAdapter,
9341
9420
  qt as EventCheckboxChangedHandler,
9342
9421
  Tt as ExcelService,
9343
- Te as FalseFn,
9344
- Rt as FocusModel,
9345
- ft as GeCellIndices,
9422
+ kt as FalseFn,
9423
+ vt as FocusModel,
9424
+ gt as GeCellIndices,
9346
9425
  Z as GeCssColorUtil,
9347
9426
  js as GeFilterService,
9348
9427
  Ws as GeKeyEvent,
9349
9428
  Se as GeModelChangeEvent,
9350
9429
  be as GeMouseEvent,
9351
- mt as GeScrollEvent,
9352
- O as GeoData,
9353
- V as Icon,
9430
+ ft as GeScrollEvent,
9431
+ V as GeoData,
9432
+ ve as HeaderGroupOptions,
9433
+ O as Icon,
9354
9434
  Fs as IndexAndPx,
9355
- vt as InputCellRenderer,
9356
- gt as InputHandler,
9435
+ Ct as InputCellRenderer,
9436
+ pt as InputHandler,
9357
9437
  Re as JsonService,
9358
9438
  G as LicenseManager,
9359
9439
  qs as MaleFemaleToIconCellRenderer,
@@ -9365,14 +9445,14 @@ export {
9365
9445
  to as NumberCellRenderer,
9366
9446
  Je as NumberPropertyType,
9367
9447
  L as ObjectPropertyType,
9368
- wt as OsxShortcutActionIdMapping,
9448
+ yt as OsxShortcutActionIdMapping,
9369
9449
  Le as PROPERTY_TYPE_KEY_ANY,
9370
- He as PROPERTY_TYPE_KEY_ARRAY,
9450
+ $e as PROPERTY_TYPE_KEY_ARRAY,
9371
9451
  me as PROPERTY_TYPE_KEY_BOOLEAN,
9372
- Oe as PROPERTY_TYPE_KEY_NULL,
9452
+ Ve as PROPERTY_TYPE_KEY_NULL,
9373
9453
  fe as PROPERTY_TYPE_KEY_NUMBER,
9374
9454
  K as PROPERTY_TYPE_KEY_OBJECT,
9375
- Ve as PROPERTY_TYPE_KEY_STRING,
9455
+ Oe as PROPERTY_TYPE_KEY_STRING,
9376
9456
  X as PROPERTY_TYPE_KEY_UNDEFINED,
9377
9457
  pe as Padding,
9378
9458
  ro as PositiveAndNegativeNumberRenderer,
@@ -9381,17 +9461,17 @@ export {
9381
9461
  Kt as PropertyTypeService,
9382
9462
  ut as RenderScope,
9383
9463
  Us as Renderer,
9384
- Ht as RequestChunk,
9385
- It as ResizeHandler,
9464
+ $t as RequestChunk,
9465
+ Mt as ResizeHandler,
9386
9466
  Jt as SchemeGenerator,
9387
9467
  je as SelectCellRenderer,
9388
9468
  Ce as SelectionModel,
9389
- bt as SelectionService,
9390
- St as ShortcutService,
9469
+ mt as SelectionService,
9470
+ xt as ShortcutService,
9391
9471
  oo as SimpleArrayCellRenderer,
9392
- Ct as SimpleDomService,
9393
- b as Size,
9394
- pt as SortItem,
9472
+ St as SimpleDomService,
9473
+ y as Size,
9474
+ Me as SortItem,
9395
9475
  Ne as SortedOptions,
9396
9476
  so as StarRatingCellRenderer,
9397
9477
  ct as StoreStateCollapsedExpandService,
@@ -9400,9 +9480,9 @@ export {
9400
9480
  Ke as StringPropertyType,
9401
9481
  nt as TableApi,
9402
9482
  Ns as TableCellUpdateEvent,
9403
- $ as TableFactory,
9483
+ H as TableFactory,
9404
9484
  ae as TableModel,
9405
- Vt as TableModelAndOptions,
9485
+ Ot as TableModelAndOptions,
9406
9486
  J as TableOptions,
9407
9487
  Ge as TableScope,
9408
9488
  co as ThreeColorGradientArg,
@@ -9412,33 +9492,33 @@ export {
9412
9492
  Ee as TreeRow,
9413
9493
  Ft as TreeRowService,
9414
9494
  Qs as TrueFalseCellRenderer,
9415
- kt as TrueFn,
9495
+ Et as TrueFn,
9416
9496
  _e as TwoColorGradientArg,
9417
9497
  Q as UNIMPORTANT_TYPES,
9418
9498
  le as UndefinedPropertyType,
9419
9499
  uo as UrlInfo,
9420
9500
  Ze as ValueInfo,
9421
- $t as ValueLabel,
9422
- yt as WindowsShortcutActionIdMapping,
9501
+ Ht as ValueLabel,
9502
+ bt as WindowsShortcutActionIdMapping,
9423
9503
  ks as actionIds,
9424
- Vs as allCenter,
9425
- Os as allLeft,
9426
- Hs as allRight,
9504
+ Os as allCenter,
9505
+ Vs as allLeft,
9506
+ $s as allRight,
9427
9507
  _s as bodyCenter,
9428
9508
  Ps as bodyLeft,
9429
9509
  Ls as bodyRight,
9430
- Me as createHarmonizedShortcutByKeyboardEvent,
9510
+ Ie as createHarmonizedShortcutByKeyboardEvent,
9431
9511
  Ye as debounce,
9432
9512
  no as editInputPipeForNumber,
9433
9513
  Ae as entitySuffix,
9434
9514
  tt as firstLetterUppercase,
9435
9515
  ne as getAreaIdentByString,
9436
9516
  Qe as getEntityName,
9437
- xt as harmonizeShortcut,
9517
+ wt as harmonizeShortcut,
9438
9518
  de as isAreaModelTree,
9439
9519
  st as isCheckboxColumnDef,
9440
9520
  j as isTreeRow,
9441
- Es as px0,
9521
+ Ts as px0,
9442
9522
  Is as px10,
9443
9523
  ys as px100,
9444
9524
  bs as px110,