@guiexpert/table 1.1.14 → 1.1.16

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.d.ts CHANGED
@@ -93,6 +93,7 @@ export * from './lib/table/data/tablemodel/areamodel/area-model-object-array';
93
93
  export * from './lib/table/data/tablemodel/areamodel/area-model-tree';
94
94
  export * from './lib/table/data/tablemodel/areamodel/col-and-rowspan-model';
95
95
  export * from './lib/table/data/tablemodel/areamodel/has-default-row-height-if';
96
+ export * from './lib/table/data/tablemodel/areamodel/object-array-holder.if';
96
97
  export * from './lib/table/data/common/tree-row';
97
98
  export * from './lib/table/data/common/tree-row-if';
98
99
  export * from './lib/table/data/common/tree-arrow.type';
@@ -135,6 +136,7 @@ export * from './lib/table/selection/selection-model';
135
136
  export * from './lib/table/selection/selection-model.if';
136
137
  export * from './lib/table/selection/selection.type';
137
138
  export * from './lib/table/selection/selection-service';
139
+ export * from './lib/table/selection/multi-rows-selection-model';
138
140
  export * from './lib/table/color/color-rgb';
139
141
  export * from './lib/table/color/color-rgb.if';
140
142
  export * from './lib/table/color/ge-css-color-util';
package/index.js CHANGED
@@ -29,7 +29,7 @@ function L(c) {
29
29
  function z(c) {
30
30
  return c && c.type === "AreaModelTree";
31
31
  }
32
- function Ce(c) {
32
+ function ye(c) {
33
33
  return c && c.type === "CheckboxColumnDef";
34
34
  }
35
35
  class K {
@@ -83,7 +83,7 @@ class pe {
83
83
  this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = o;
84
84
  }
85
85
  }
86
- class ye {
86
+ class ve {
87
87
  constructor(e) {
88
88
  this.domService = e;
89
89
  }
@@ -266,7 +266,7 @@ class ye {
266
266
  }
267
267
  }
268
268
  const U = (c) => c === "header" ? "header" : c === "footer" ? "footer" : "body";
269
- class ve {
269
+ class Re {
270
270
  constructor(e, t) {
271
271
  if (this.rowIdx = -1, this.colIdx = -1, this.action = null, this.inputType = null, this.className = "", e !== null && (e instanceof HTMLDivElement || e instanceof HTMLSpanElement || e instanceof HTMLInputElement)) {
272
272
  this.className = e.className, this.action = e.getAttribute("data-ge-action"), this.inputType = e.getAttribute("data-input-type"), this.rowIdx = Number(e.getAttribute("data-row-index")), this.colIdx = Number(e.getAttribute("data-col-index"));
@@ -278,7 +278,7 @@ class ve {
278
278
  }
279
279
  }
280
280
  }
281
- class Re {
281
+ class Ae {
282
282
  constructor(e) {
283
283
  this.tableScope = e, this.doubleClickDelay = 500, this.expandedAll = !0, this.mouseDown = !1, this.dragging = !1, this.lastClicked = 0, this.tableScope.hostElement.addEventListener("click", this.onHostElementClicked.bind(this)), this.tableScope.hostElement.addEventListener("dblclick", this.onHostElementDblClicked.bind(this)), this.tableScope.hostElement.addEventListener("mousedown", this.onMouseDown.bind(this)), this.tableScope.hostElement.addEventListener("mousemove", this.onMouseMove.bind(this)), this.tableScope.hostElement.addEventListener("mouseup", this.onMouseUp.bind(this)), this.tableScope.hostElement.addEventListener("contextmenu", this.onContextmenu.bind(this)), this.tableScope.hostElement._MouseHandler = "true", this.tableScope.scrollViewport.addEventListener("scroll", this.tableScope.adjustAfterScrolling.bind(this.tableScope)), [window, this.tableScope.hostElement].forEach(
284
284
  (t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
@@ -308,7 +308,7 @@ class Re {
308
308
  if (t - this.lastClicked < this.doubleClickDelay)
309
309
  return;
310
310
  this.lastClicked = t;
311
- const o = new ve(e.target, this.tableScope);
311
+ const o = new Re(e.target, this.tableScope);
312
312
  if (o.action === "toggleExpandCollapseAll")
313
313
  this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
314
314
  else if (o.action === "toggleHeaderGroup")
@@ -410,7 +410,7 @@ class Re {
410
410
  }
411
411
  }
412
412
  }
413
- class Ae {
413
+ class Me {
414
414
  constructor(e) {
415
415
  this.tableScope = e;
416
416
  }
@@ -670,7 +670,7 @@ class q {
670
670
  // }
671
671
  // }
672
672
  }
673
- class Me extends q {
673
+ class Ee extends q {
674
674
  constructor(e) {
675
675
  super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
676
676
  }
@@ -692,14 +692,14 @@ class Me extends q {
692
692
  }
693
693
  }
694
694
  }
695
- class Ee {
695
+ class Ie {
696
696
  constructor(e = "collapsed", t = [], o = !1, s = !1) {
697
697
  this.mode = e, this.rowIds = t, this.allCollapsed = o, this.allExpanded = s;
698
698
  }
699
699
  }
700
- class Ie extends q {
700
+ class ke extends q {
701
701
  constructor(e) {
702
- super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new Ee(), this.load();
702
+ super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new Ie(), this.load();
703
703
  }
704
704
  collapsedExpandedStateGet() {
705
705
  return this.collapsedExpandedState;
@@ -731,7 +731,7 @@ class Ie extends q {
731
731
  this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
732
732
  }
733
733
  }
734
- class ke extends q {
734
+ class Te extends q {
735
735
  constructor(e) {
736
736
  super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
737
737
  }
@@ -758,7 +758,7 @@ class $ {
758
758
  this.left = e, this.width = t, this.height = o, this.top = s, this.index = i;
759
759
  }
760
760
  }
761
- class Te {
761
+ class De {
762
762
  constructor(e, t, o, s) {
763
763
  this.hostElement = e, this.tableModel = t, this.dom = o, this.tableOptions = s, this.scrollTop = 0, this.areaBodyWestGeo = new $(), this.areaBodyCenterGeo = new $(), this.areaBodyEastGeo = new $();
764
764
  const i = this.hostElement;
@@ -964,7 +964,7 @@ class A {
964
964
  return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
965
965
  }
966
966
  }
967
- class De {
967
+ class _e {
968
968
  constructor(e, t) {
969
969
  this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
970
970
  }
@@ -1002,7 +1002,7 @@ class T {
1002
1002
  this.header = e, this.body = t, this.footer = o;
1003
1003
  }
1004
1004
  }
1005
- class _e extends Te {
1005
+ class $e extends De {
1006
1006
  constructor(e, t, o, s) {
1007
1007
  var r, n;
1008
1008
  super(e, t, o, s), this.dragging = !1, this.editing = !1, this.storedColumnWidths = [], this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
@@ -1012,7 +1012,7 @@ class _e extends Te {
1012
1012
  }, this.tree = !1, this.colAndRowspanModels = new T(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, 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), z(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
1013
1013
  (l) => {
1014
1014
  var d;
1015
- this.colAndRowspanModels[l] = new De(t, t.getAreaModel(l)), (d = this.colAndRowspanModels[l]) == null || d.init();
1015
+ this.colAndRowspanModels[l] = new _e(t, t.getAreaModel(l)), (d = this.colAndRowspanModels[l]) == null || d.init();
1016
1016
  }
1017
1017
  );
1018
1018
  }
@@ -1880,12 +1880,12 @@ class _e extends Te {
1880
1880
  l.setAttribute(a, "data-col-index", `${t}`), l.setAttribute(a, "data-row-index", `${e}`), l.setAttribute(a, "data-area", "header"), l.setAttribute(a, "data-ge-action", "resize-column"), l.addClass(a, "ge-table-column-resize-handle"), l.setStyle(a, "display", "clip"), l.setStyle(a, "position", "absolute"), l.setStyle(a, "cursor", "col-resize"), l.setStyle(a, "left", `${o + i - d}px`), l.setStyle(a, "top", `${s}px`), l.setStyle(a, "width", `${d}px`), l.setStyle(a, "height", `${r}px`), l.appendChild(n, a);
1881
1881
  }
1882
1882
  }
1883
- class $e {
1883
+ class Oe {
1884
1884
  constructor(e, t) {
1885
1885
  this.columnIndex = e, this.sortState = t;
1886
1886
  }
1887
1887
  }
1888
- class Oe {
1888
+ class Fe {
1889
1889
  constructor(e) {
1890
1890
  this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
1891
1891
  }
@@ -1907,7 +1907,7 @@ class Oe {
1907
1907
  }
1908
1908
  }
1909
1909
  }
1910
- class Fe {
1910
+ class Pe {
1911
1911
  constructor(e = -1, t = -1) {
1912
1912
  this.rowIndex = e, this.columnIndex = t;
1913
1913
  }
@@ -1917,10 +1917,10 @@ class J {
1917
1917
  this.cells = e;
1918
1918
  }
1919
1919
  static createSingle(e, t) {
1920
- return new J([new Fe(e, t)]);
1920
+ return new J([new Pe(e, t)]);
1921
1921
  }
1922
1922
  }
1923
- class Pe {
1923
+ class Le {
1924
1924
  constructor(e) {
1925
1925
  var t, o;
1926
1926
  this.tableScope = e, (t = this.tableScope.tableOptions) != null && t.getSelectionModel && (this.getSelectionModel = this.tableScope.tableOptions.getSelectionModel), (o = this.tableScope.tableOptions) != null && o.getFocusModel && (this.getFocusModel = this.tableScope.tableOptions.getFocusModel);
@@ -1961,7 +1961,7 @@ class Pe {
1961
1961
  });
1962
1962
  }
1963
1963
  }
1964
- class Le {
1964
+ class He {
1965
1965
  get() {
1966
1966
  return {
1967
1967
  f2: "START_EDITING",
@@ -1981,7 +1981,7 @@ class Le {
1981
1981
  };
1982
1982
  }
1983
1983
  }
1984
- class He {
1984
+ class Ve {
1985
1985
  get() {
1986
1986
  return {
1987
1987
  f2: "START_EDITING",
@@ -2003,7 +2003,7 @@ class He {
2003
2003
  };
2004
2004
  }
2005
2005
  }
2006
- class Ve {
2006
+ class Be {
2007
2007
  constructor(e) {
2008
2008
  this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
2009
2009
  }
@@ -2024,7 +2024,7 @@ class Ve {
2024
2024
  this.assignPredefinedSystemShortcutMappings(), Object.assign(this.shortcutActionIdMapping, this.tableScope.tableOptions.shortcutActionIdMapping), this.isDebug() && console.debug("ShortcutService", this.shortcutActionIdMapping), this.tableScope.hostElement.addEventListener("keydown", this.onKeyDown.bind(this));
2025
2025
  }
2026
2026
  assignPredefinedSystemShortcutMappings() {
2027
- this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new He().get()) : Object.assign(this.shortcutActionIdMapping, new Le().get());
2027
+ this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new Ve().get()) : Object.assign(this.shortcutActionIdMapping, new He().get());
2028
2028
  }
2029
2029
  isMacintosh() {
2030
2030
  return navigator.platform.indexOf("Mac") > -1;
@@ -2092,7 +2092,7 @@ class oe {
2092
2092
  onMouseMoved(e) {
2093
2093
  }
2094
2094
  }
2095
- class Be {
2095
+ class We {
2096
2096
  setStyle(e, t, o) {
2097
2097
  return e.style[t] = o, e;
2098
2098
  }
@@ -2119,7 +2119,7 @@ class Be {
2119
2119
  e.setAttribute(t, o);
2120
2120
  }
2121
2121
  }
2122
- class We {
2122
+ class Ge {
2123
2123
  render(e, t, o, s, i, r, n) {
2124
2124
  if (i.isEditable(t, o)) {
2125
2125
  n.addClass(e, "ge-table-row-input-div");
@@ -2140,7 +2140,7 @@ class We {
2140
2140
  }
2141
2141
  }
2142
2142
  }
2143
- class Ge {
2143
+ class be {
2144
2144
  constructor(e = "none", t = "single") {
2145
2145
  this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
2146
2146
  }
@@ -2166,11 +2166,29 @@ class Ge {
2166
2166
  this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
2167
2167
  }
2168
2168
  hasSelection() {
2169
- return !!this.ranges.length;
2169
+ return this.allSelected || !!this.ranges.length;
2170
+ }
2171
+ hasNoSelection() {
2172
+ return !this.hasSelection();
2173
+ }
2174
+ /**
2175
+ * Retrieves the merged row indices from the given range selection.
2176
+ *
2177
+ * @returns {number[]} Array of merged row indices
2178
+ */
2179
+ getMergedRowIndices() {
2180
+ const e = /* @__PURE__ */ new Set();
2181
+ for (const t of this.ranges)
2182
+ for (let o = t.r1; o <= t.r2; o++)
2183
+ !e.has(o) && !this.isInNegativeRange(o, 0) && e.add(o);
2184
+ return Array.from(e);
2170
2185
  }
2171
2186
  selectAll() {
2172
2187
  this.allSelected = !0;
2173
2188
  }
2189
+ isAllSelected() {
2190
+ return this.allSelected;
2191
+ }
2174
2192
  addSelection(e) {
2175
2193
  this.addRange(e);
2176
2194
  }
@@ -2227,14 +2245,14 @@ class Q {
2227
2245
  }
2228
2246
  // `⊖ `, `⊕ `;
2229
2247
  }
2230
- const ze = new Ge(), je = new Ne("cell");
2248
+ const ze = new be(), je = new Ne("cell");
2231
2249
  class j {
2232
2250
  constructor() {
2233
2251
  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 = {
2234
2252
  header: 34,
2235
2253
  body: 34,
2236
2254
  footer: 34
2237
- }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new ge(), this.headerGroupOptions = new Q(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new pe(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new We(), this.getSelectionModel = () => ze, this.getFocusModel = () => je;
2255
+ }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new ge(), this.headerGroupOptions = new Q(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new pe(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new Ge(), this.getSelectionModel = () => ze, this.getFocusModel = () => je;
2238
2256
  }
2239
2257
  }
2240
2258
  const Z = class X {
@@ -2323,19 +2341,19 @@ Z.columnSeparatorChar = " ";
2323
2341
  Z.rowSeparatorChar = `
2324
2342
  `;
2325
2343
  let se = Z;
2326
- class be extends _e {
2344
+ class fe extends $e {
2327
2345
  constructor(e, t, o, s, i, r = new se()) {
2328
2346
  var n;
2329
2347
  if (super(
2330
2348
  e,
2331
2349
  t,
2332
- new ye(o),
2350
+ new ve(o),
2333
2351
  s
2334
- ), this.eventListener = i, this.copyService = r, this.licenseManager = P.getInstance(), this.selectionService = new Pe(this), this.api = new Ae(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, i || (this.eventListener = new oe()), (n = this.tableOptions) != null && n.autoRestoreOptions) {
2352
+ ), this.eventListener = i, this.copyService = r, this.licenseManager = P.getInstance(), this.selectionService = new Le(this), this.api = new Me(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, i || (this.eventListener = new oe()), (n = this.tableOptions) != null && n.autoRestoreOptions) {
2335
2353
  const l = this.tableOptions.autoRestoreOptions, d = l.getStorageKeyFn;
2336
- d && (l.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Me(d)), l.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new Ie(d)), l.autoRestoreSortingState && (this.storeSortingService = new ke(d)));
2354
+ d && (l.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Ee(d)), l.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new ke(d)), l.autoRestoreSortingState && (this.storeSortingService = new Te(d)));
2337
2355
  }
2338
- this.mouseHandler = new Re(this), this.inputHandler = new Oe(this), this.shortcutService = new Ve(this), this.shortcutService.addListener(this.selectionService);
2356
+ this.mouseHandler = new Ae(this), this.inputHandler = new Fe(this), this.shortcutService = new Be(this), this.shortcutService.addListener(this.selectionService);
2339
2357
  }
2340
2358
  /**
2341
2359
  * Creates a TableScope instance.
@@ -2348,8 +2366,8 @@ class be extends _e {
2348
2366
  *
2349
2367
  * @return {TableScope} - The newly created TableScope instance.
2350
2368
  */
2351
- static create(e, t, o = new j(), s = new oe(), i = new Be(), r = new se()) {
2352
- return new be(
2369
+ static create(e, t, o = new j(), s = new oe(), i = new We(), r = new se()) {
2370
+ return new fe(
2353
2371
  e,
2354
2372
  t,
2355
2373
  i,
@@ -2547,7 +2565,7 @@ class be extends _e {
2547
2565
  const s = this.tableModel.getColumnDef(o);
2548
2566
  if (s != null && s.sortable && s.sortable()) {
2549
2567
  e.preventDefault(), e.stopPropagation();
2550
- const n = s.sortStatesOrder ? s.sortStatesOrder : this.tableOptions.sortOrder, l = s.sortState ?? "", d = n[(n.indexOf(l) + 1) % n.length], a = new $e(o, d);
2568
+ const n = s.sortStatesOrder ? s.sortStatesOrder : this.tableOptions.sortOrder, l = s.sortState ?? "", d = n[(n.indexOf(l) + 1) % n.length], a = new Oe(o, d);
2551
2569
  this.tableModel.doSort([a]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((u) => u.sortState = ""), s.sortState = d), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([a]);
2552
2570
  }
2553
2571
  }
@@ -2713,10 +2731,10 @@ class be extends _e {
2713
2731
  }
2714
2732
  }
2715
2733
  }
2716
- class fe {
2734
+ class me {
2717
2735
  }
2718
- fe.themes = ["light", "combat", "paper", "blackboard"];
2719
- fe.vars = {
2736
+ me.themes = ["light", "combat", "paper", "blackboard"];
2737
+ me.vars = {
2720
2738
  light: `html[data-theme="light"] {
2721
2739
  --ge-table-bg: rgba(255,255,255, 0.5);
2722
2740
  --ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
@@ -3241,7 +3259,7 @@ class Ye {
3241
3259
  return e.parent ? e.parent.expanded ? this.isVisible(e.parent) : !1 : !0;
3242
3260
  }
3243
3261
  }
3244
- class me {
3262
+ class we {
3245
3263
  genericSortComparator(e, t, o) {
3246
3264
  if (typeof e == "number" && typeof t == "number")
3247
3265
  return o * (e - t);
@@ -3261,7 +3279,7 @@ class me {
3261
3279
  }
3262
3280
  class ne extends ee {
3263
3281
  constructor(e, t, o, s = []) {
3264
- super(e, s, o), this.areaIdent = e, this.rows = t, this.defaultRowHeight = o, this.columnDefs = s, this.type = "AreaModelTree", this.sorterService = new me(), this.service = new Ye(), this.properties = s.map((i) => i.property), this.flattenRows = this.service.flattenTree(t), this.filteredFlattenRows = [...this.flattenRows];
3282
+ super(e, s, o), this.areaIdent = e, this.rows = t, this.defaultRowHeight = o, this.columnDefs = s, this.type = "AreaModelTree", this.sorterService = new we(), this.service = new Ye(), this.properties = s.map((i) => i.property), this.flattenRows = this.service.flattenTree(t), this.filteredFlattenRows = [...this.flattenRows];
3265
3283
  }
3266
3284
  changeColumnOrder(e, t) {
3267
3285
  this.arrayMove(this.properties, e, t), super.changeColumnOrder(e, t);
@@ -3463,7 +3481,7 @@ class N {
3463
3481
  constructor(e, t, o, s = 0, i = 0, r = !1, n = new H(), l = [], d = [], a = -1, h = 0, u = 400, m = () => {
3464
3482
  }) {
3465
3483
  var b, f, g, p;
3466
- this.headerAreaModel = e, this.bodyAreaModel = t, this.footerAreaModel = o, this.fixedLeftColumnCount = s, this.fixedRightColumnCount = i, this.rowCheckboxVisible = r, this.defaultRowHeights = n, this.columnDefs = l, this.columnSizes = d, this.overridingColumnWidth = a, this.columnCount = h, this.parentSize = u, this.getSelectionModel = m, this.rowCount = 0, this.contentHeightInPx = 0, this.contentWidthInPx = 0, this.padding = new de(0, 0, 0, 0), this.xPositions = [], e.areaIdent = "header", t.areaIdent = "body", o.areaIdent = "footer", this.columnCount || ((b = this.columnDefs) != null && b.length ? this.columnCount = this.columnDefs.length : (f = this.columnSizes) != null && f.length && (this.columnCount = (g = this.columnSizes) == null ? void 0 : g.length)), (p = this.columnDefs) != null && p.length && Ce(this.columnDefs[0]) && !t.rowSelectionModel && (t.rowSelectionModel = new Ke());
3484
+ this.headerAreaModel = e, this.bodyAreaModel = t, this.footerAreaModel = o, this.fixedLeftColumnCount = s, this.fixedRightColumnCount = i, this.rowCheckboxVisible = r, this.defaultRowHeights = n, this.columnDefs = l, this.columnSizes = d, this.overridingColumnWidth = a, this.columnCount = h, this.parentSize = u, this.getSelectionModel = m, this.rowCount = 0, this.contentHeightInPx = 0, this.contentWidthInPx = 0, this.padding = new de(0, 0, 0, 0), this.xPositions = [], e.areaIdent = "header", t.areaIdent = "body", o.areaIdent = "footer", this.columnCount || ((b = this.columnDefs) != null && b.length ? this.columnCount = this.columnDefs.length : (f = this.columnSizes) != null && f.length && (this.columnCount = (g = this.columnSizes) == null ? void 0 : g.length)), (p = this.columnDefs) != null && p.length && ye(this.columnDefs[0]) && !t.rowSelectionModel && (t.rowSelectionModel = new Ke());
3467
3485
  }
3468
3486
  init() {
3469
3487
  this.recalcSize(this.parentSize), this.overridingColumnWidth === -1 && this.calcXPositions(), this.headerAreaModel && this.headerAreaModel.init(), this.bodyAreaModel && this.bodyAreaModel.init(), this.footerAreaModel && this.footerAreaModel.init();
@@ -3816,7 +3834,7 @@ class N {
3816
3834
  }
3817
3835
  class Ue extends ee {
3818
3836
  constructor(e, t, o, s = []) {
3819
- super(e, s, o), this.areaIdent = e, this.rows = t, this.defaultRowHeight = o, this.columnDefs = s, this.sorterService = new me(), this.filteredRows = [...t], this.properties = s.map((i) => i.property);
3837
+ super(e, s, o), this.areaIdent = e, this.rows = t, this.defaultRowHeight = o, this.columnDefs = s, this.sorterService = new we(), this.filteredRows = [...t], this.properties = s.map((i) => i.property);
3820
3838
  }
3821
3839
  setRows(e) {
3822
3840
  this.rows = e, this.filteredRows = [...e];
@@ -3865,8 +3883,7 @@ class Ue extends ee {
3865
3883
  };
3866
3884
  }
3867
3885
  getPropertyValue(e, t) {
3868
- const o = t.shift();
3869
- let s = e[o];
3886
+ const o = t.shift(), s = e[o];
3870
3887
  return s && t.length ? this.getPropertyValue(s, t) : s;
3871
3888
  }
3872
3889
  }
@@ -4438,14 +4455,14 @@ class Xt {
4438
4455
  return !1;
4439
4456
  }
4440
4457
  }
4441
- const we = class Se {
4458
+ const Se = class xe {
4442
4459
  constructor(e = new Q()) {
4443
4460
  this.headerGroupOptions = e;
4444
4461
  }
4445
4462
  render(e, t, o, s, i, r, n) {
4446
4463
  const l = r != null && r.data ? r.data : "";
4447
4464
  if (r) {
4448
- const { toggle: d, visibility: a, closed: h } = r, u = d ? Se.toggleHeaderGroup : "";
4465
+ const { toggle: d, visibility: a, closed: h } = r, u = d ? xe.toggleHeaderGroup : "";
4449
4466
  this.addText(e, s, t, o, l, u), d && a !== "always" && this.addArrowDiv(n, e, !h, t, o, s, u);
4450
4467
  } else
4451
4468
  this.addText(e, s, t, o, l, "");
@@ -4477,8 +4494,8 @@ const we = class Se {
4477
4494
  }
4478
4495
  }
4479
4496
  };
4480
- we.toggleHeaderGroup = "toggleHeaderGroup";
4481
- let et = we;
4497
+ Se.toggleHeaderGroup = "toggleHeaderGroup";
4498
+ let et = Se;
4482
4499
  class Yt {
4483
4500
  constructor(e = "header", t, o = [], s, i = new Q()) {
4484
4501
  this.areaIdent = e, this.groups = t, this.columnDefs = o, this.defaultRowHeight = s, this.headerGroupOptions = i, this.gammaCells = !0, this.arr = [], this.groupExts = [], this.cellGroupExtCellRenderer = new et(this.headerGroupOptions), this.groupExts = I.buildGroupExts(t), this.init();
@@ -4823,12 +4840,12 @@ class no {
4823
4840
  const ao = function(c, e, t) {
4824
4841
  return c ? Number(c) : "";
4825
4842
  };
4826
- class xe {
4843
+ class Ce {
4827
4844
  constructor(e) {
4828
4845
  this.options = e;
4829
4846
  }
4830
4847
  static create(e) {
4831
- return new xe(
4848
+ return new Ce(
4832
4849
  e.map((t) => new Je(t, t))
4833
4850
  );
4834
4851
  }
@@ -4857,7 +4874,55 @@ class xe {
4857
4874
  }
4858
4875
  }
4859
4876
  }
4860
- class ho {
4877
+ class ho extends be {
4878
+ constructor(e) {
4879
+ super("row", "multi"), this.model = e;
4880
+ }
4881
+ /**
4882
+ * Retrieves the selected rows from an array of all table rows.
4883
+ *
4884
+ * @param {T[]} allrows - The array of all rows from the table model.
4885
+ * @returns {T[]} - The selected rows from the given array.
4886
+ */
4887
+ getSelectedRowItems(e) {
4888
+ const t = this.getMergedRowIndices();
4889
+ return this.isAllSelected() ? e : e.filter((o, s) => t.includes(s));
4890
+ }
4891
+ /**
4892
+ * Selects the specified row.
4893
+ *
4894
+ * @param {number} rowIndex - The index of the row to be selected.
4895
+ */
4896
+ selectRow(e) {
4897
+ this.addRange(A.singleRow(e));
4898
+ }
4899
+ /**
4900
+ * Unselects the specified row.
4901
+ *
4902
+ * @param {number} rowIndex - The index of the row to be unselected.
4903
+ * @return {void}
4904
+ */
4905
+ unselectRow(e) {
4906
+ this.removeSelection(A.singleRow(e));
4907
+ }
4908
+ /**
4909
+ * Toggles the selection of items based on current selection state.
4910
+ */
4911
+ toggleSelection() {
4912
+ this.isAllSelected() ? this.clear() : this.hasNoSelection() ? this.selectAll() : this.toggleSelection();
4913
+ }
4914
+ /**
4915
+ * Toggles the selection state of a row.
4916
+ *
4917
+ * @param {number} rowIndex - The index of the row to toggle.
4918
+ *
4919
+ * @return {void}
4920
+ */
4921
+ toggleRow(e) {
4922
+ this.isSelected(e, 0) ? this.unselectRow(e) : this.selectRow(e);
4923
+ }
4924
+ }
4925
+ class co {
4861
4926
  constructor(e, t, o) {
4862
4927
  this.r = e, this.g = t, this.b = o;
4863
4928
  }
@@ -4879,7 +4944,7 @@ class W {
4879
4944
  return e < t.middleValue ? W.getTwoColorGradientRGB(e, new ue(t.minValue, t.minColor, t.middleValue, t.middleColor)) : e > t.middleValue ? W.getTwoColorGradientRGB(e, new ue(t.middleValue, t.middleColor, t.maxValue, t.maxColor)) : `rgb(${t.middleColor.r}, ${t.middleColor.g}, ${t.middleColor.b})`;
4880
4945
  }
4881
4946
  }
4882
- class co {
4947
+ class uo {
4883
4948
  constructor(e, t, o, s, i, r) {
4884
4949
  this.minValue = e, this.minColor = t, this.middleValue = o, this.middleColor = s, this.maxValue = i, this.maxColor = r;
4885
4950
  }
@@ -4891,8 +4956,8 @@ export {
4891
4956
  D as AreaModelArrayOfArrays,
4892
4957
  Yt as AreaModelCellGroups,
4893
4958
  _ as AreaModelHidden,
4959
+ Ue as AreaModelObjectArray,
4894
4960
  he as AreaModelObjectArrayWithColumndefs,
4895
- Ue as AreaModelObjectyArray,
4896
4961
  ne as AreaModelTree,
4897
4962
  T as AreaObjectMap,
4898
4963
  jt as AutoRestoreOptions,
@@ -4906,23 +4971,23 @@ export {
4906
4971
  Wt as CheckboxColumnDef,
4907
4972
  Ke as CheckboxModel,
4908
4973
  $t as ChunkData,
4909
- De as ColAndRowspanModel,
4910
- Ee as CollapsedExpandedData,
4911
- ho as ColorRgb,
4974
+ _e as ColAndRowspanModel,
4975
+ Ie as CollapsedExpandedData,
4976
+ co as ColorRgb,
4912
4977
  V as ColumnDef,
4913
- ye as ConvenienceDomService,
4978
+ ve as ConvenienceDomService,
4914
4979
  se as CopyService,
4915
- fe as CssVars,
4980
+ me as CssVars,
4916
4981
  Qt as DateToIntlDDMMYYYYCellRenderer,
4917
4982
  Jt as DateToIsoCellRenderer,
4918
4983
  Zt as DateToLocaleDateCellRenderer,
4919
4984
  so as DateToTecCellRenderer,
4920
4985
  H as DefaultRowHeights,
4921
- Te as EleScope,
4986
+ De as EleScope,
4922
4987
  oe as EventAdapter,
4923
4988
  re as FalseFn,
4924
4989
  Ne as FocusModel,
4925
- Fe as GeCellIndices,
4990
+ Pe as GeCellIndices,
4926
4991
  W as GeCssColorUtil,
4927
4992
  Kt as GeFilterService,
4928
4993
  Nt as GeKeyEvent,
@@ -4931,41 +4996,42 @@ export {
4931
4996
  $ as GeoData,
4932
4997
  O as Icon,
4933
4998
  Ot as IndexAndPx,
4934
- We as InputCellRenderer,
4935
- Oe as InputHandler,
4999
+ Ge as InputCellRenderer,
5000
+ Fe as InputHandler,
4936
5001
  P as LicenseManager,
4937
5002
  eo as MaleFemaleToIconCellRenderer,
4938
- Re as MouseHandler,
4939
- ve as MouseTargetData,
5003
+ Ae as MouseHandler,
5004
+ Re as MouseTargetData,
5005
+ ho as MultiRowsSelectionModel,
4940
5006
  to as NumberCellProgressBarCellRenderer,
4941
5007
  io as NumberCellRenderer,
4942
- He as OsxShortcutActionIdMapping,
5008
+ Ve as OsxShortcutActionIdMapping,
4943
5009
  de as Padding,
4944
5010
  no as PositiveAndNegativeNumberRenderer,
4945
5011
  lo as ProgressBarCellRenderer,
4946
- _e as RenderScope,
5012
+ $e as RenderScope,
4947
5013
  Ut as Renderer,
4948
5014
  qe as RequestChunk,
4949
- xe as SelectCellRenderer,
4950
- Ge as SelectionModel,
4951
- Pe as SelectionService,
4952
- Ve as ShortcutService,
4953
- Be as SimpleDomService,
5015
+ Ce as SelectCellRenderer,
5016
+ be as SelectionModel,
5017
+ Le as SelectionService,
5018
+ Be as ShortcutService,
5019
+ We as SimpleDomService,
4954
5020
  w as Size,
4955
- $e as SortItem,
5021
+ Oe as SortItem,
4956
5022
  pe as SortedOptions,
4957
5023
  ro as StarRatingCellRenderer,
4958
- Ie as StoreStateCollapsedExpandService,
4959
- Me as StoreStateScrollPosService,
4960
- ke as StoreStateSortingService,
4961
- Ae as TableApi,
5024
+ ke as StoreStateCollapsedExpandService,
5025
+ Ee as StoreStateScrollPosService,
5026
+ Te as StoreStateSortingService,
5027
+ Me as TableApi,
4962
5028
  zt as TableCellUpdateEvent,
4963
5029
  F as TableFactory,
4964
5030
  N as TableModel,
4965
5031
  _t as TableModelAndOptions,
4966
5032
  j as TableOptions,
4967
- be as TableScope,
4968
- co as ThreeColorGradientArg,
5033
+ fe as TableScope,
5034
+ uo as ThreeColorGradientArg,
4969
5035
  ae as TreeCheckboxModel,
4970
5036
  Y as TreeFactory,
4971
5037
  ge as TreeOptions,
@@ -4975,7 +5041,7 @@ export {
4975
5041
  Xe as TrueFn,
4976
5042
  ue as TwoColorGradientArg,
4977
5043
  Je as ValueLabel,
4978
- Le as WindowsShortcutActionIdMapping,
5044
+ He as WindowsShortcutActionIdMapping,
4979
5045
  Dt as actionIds,
4980
5046
  Vt as allCenter,
4981
5047
  Ht as allLeft,
@@ -4986,7 +5052,7 @@ export {
4986
5052
  ao as editInputPipeForNumber,
4987
5053
  U as getAreaIdentByString,
4988
5054
  z as isAreaModelTree,
4989
- Ce as isCheckboxColumnDef,
5055
+ ye as isCheckboxColumnDef,
4990
5056
  L as isTreeRow,
4991
5057
  Tt as px0,
4992
5058
  kt as px10,
@@ -1,4 +1,4 @@
1
- import { AreaModelObjectyArray } from "./area-model-object-array";
1
+ import { AreaModelObjectArray } from "./area-model-object-array";
2
2
  import { ColumnDefIf } from "../column/column-def.if";
3
3
  import { AreaIdent } from "../area-ident.type";
4
4
  /**
@@ -6,7 +6,7 @@ import { AreaIdent } from "../area-ident.type";
6
6
  *
7
7
  * @template T - The type of objects in the array.
8
8
  */
9
- export declare class AreaModelObjectArrayWithColumndefs<T> extends AreaModelObjectyArray<T> {
9
+ export declare class AreaModelObjectArrayWithColumndefs<T> extends AreaModelObjectArray<T> {
10
10
  areaIdent: AreaIdent;
11
11
  protected rows: T[];
12
12
  protected readonly columnDefs: ColumnDefIf[];
@@ -4,11 +4,12 @@ import { AreaIdent } from "../area-ident.type";
4
4
  import { FilterFunction } from "../../common/filter-function";
5
5
  import { SorterService } from "../../../service/sorter.service";
6
6
  import { SortItem } from "../../common/sort-item";
7
+ import { ObjectArrayHolderIf } from './object-array-holder.if';
7
8
  /**
8
9
  * Represents an area model defined by an object array.
9
10
  * @template T - The type of objects in the array
10
11
  */
11
- export declare class AreaModelObjectyArray<T> extends AbstractAreaModel<T> {
12
+ export declare class AreaModelObjectArray<T> extends AbstractAreaModel<T> implements ObjectArrayHolderIf<T> {
12
13
  areaIdent: AreaIdent;
13
14
  protected rows: T[];
14
15
  defaultRowHeight: number;
@@ -0,0 +1,4 @@
1
+ export interface ObjectArrayHolderIf<T> {
2
+ getAllRows(): T[];
3
+ getFilteredRows(): T[];
4
+ }
@@ -2,7 +2,7 @@ import { CellRendererIf } from "./cell-render.if";
2
2
  import { DomServiceIf } from "../service/dom-service.if";
3
3
  import { AreaIdent } from "../data/tablemodel/area-ident.type";
4
4
  import { RendererCleanupFnType } from "./renderer-cleanup-fn.type";
5
- import { AreaModelObjectyArray } from "../data/tablemodel/areamodel/area-model-object-array";
5
+ import { AreaModelObjectArray } from "../data/tablemodel/areamodel/area-model-object-array";
6
6
  /**
7
7
  * Works with AreaModelObjectArray only
8
8
  */
@@ -11,5 +11,5 @@ export declare class CheckboxBooleanPropertyCellRenderer<T> implements CellRende
11
11
  skipCheckableCheck: boolean;
12
12
  readonly: boolean;
13
13
  constructor(property: string, skipCheckableCheck?: boolean, readonly?: boolean);
14
- render(cellDiv: HTMLDivElement, rowIndex: number, columnIndex: number, areaIdent: AreaIdent, areaModel: AreaModelObjectyArray<T>, _cellValue: any, domService: DomServiceIf): RendererCleanupFnType | undefined;
14
+ render(cellDiv: HTMLDivElement, rowIndex: number, columnIndex: number, areaIdent: AreaIdent, areaModel: AreaModelObjectArray<T>, _cellValue: any, domService: DomServiceIf): RendererCleanupFnType | undefined;
15
15
  }