@guiexpert/table 1.1.15 → 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.cjs +9 -9
- package/index.d.ts +2 -0
- package/index.js +146 -95
- package/lib/table/data/tablemodel/areamodel/area-model-object-array-with-columndefs.d.ts +2 -2
- package/lib/table/data/tablemodel/areamodel/area-model-object-array.d.ts +2 -1
- package/lib/table/data/tablemodel/areamodel/object-array-holder.if.d.ts +4 -0
- package/lib/table/renderer/checkbox-boolean-property-cell-renderer.d.ts +2 -2
- package/lib/table/renderer/number-cell-progress-bar-cell-renderer.d.ts +2 -2
- package/lib/table/renderer/progress-bar-cell-renderer.d.ts +2 -2
- package/lib/table/renderer/star-rating-cell-renderer.d.ts +2 -2
- package/lib/table/selection/multi-rows-selection-model.d.ts +42 -0
- package/lib/table/selection/selection-model.d.ts +8 -7
- package/lib/table/selection/selection-model.if.d.ts +1 -0
- package/package.json +1 -1
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
700
|
+
class ke extends q {
|
|
701
701
|
constructor(e) {
|
|
702
|
-
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
1883
|
+
class Oe {
|
|
1884
1884
|
constructor(e, t) {
|
|
1885
1885
|
this.columnIndex = e, this.sortState = t;
|
|
1886
1886
|
}
|
|
1887
1887
|
}
|
|
1888
|
-
class
|
|
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
|
|
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
|
|
1920
|
+
return new J([new Pe(e, t)]);
|
|
1921
1921
|
}
|
|
1922
1922
|
}
|
|
1923
|
-
class
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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,7 +2166,22 @@ 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;
|
|
@@ -2189,18 +2204,6 @@ class Ge {
|
|
|
2189
2204
|
isSelected(e, t) {
|
|
2190
2205
|
return this.getSelectionCount(e, t) > 0;
|
|
2191
2206
|
}
|
|
2192
|
-
/**
|
|
2193
|
-
* Retrieves the merged row indices from the given range selection.
|
|
2194
|
-
*
|
|
2195
|
-
* @returns {number[]} Array of merged row indices
|
|
2196
|
-
*/
|
|
2197
|
-
getMergedRowIndices() {
|
|
2198
|
-
const e = [];
|
|
2199
|
-
for (const t of this.ranges)
|
|
2200
|
-
for (let o = t.r1; o <= t.r2; o++)
|
|
2201
|
-
!e.includes(o) && !this.isInNegativeRange(o, 0) && e.push(o);
|
|
2202
|
-
return e;
|
|
2203
|
-
}
|
|
2204
2207
|
addRange(e) {
|
|
2205
2208
|
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));
|
|
2206
2209
|
}
|
|
@@ -2242,14 +2245,14 @@ class Q {
|
|
|
2242
2245
|
}
|
|
2243
2246
|
// `⊖ `, `⊕ `;
|
|
2244
2247
|
}
|
|
2245
|
-
const ze = new
|
|
2248
|
+
const ze = new be(), je = new Ne("cell");
|
|
2246
2249
|
class j {
|
|
2247
2250
|
constructor() {
|
|
2248
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 = {
|
|
2249
2252
|
header: 34,
|
|
2250
2253
|
body: 34,
|
|
2251
2254
|
footer: 34
|
|
2252
|
-
}, 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
|
|
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;
|
|
2253
2256
|
}
|
|
2254
2257
|
}
|
|
2255
2258
|
const Z = class X {
|
|
@@ -2338,19 +2341,19 @@ Z.columnSeparatorChar = " ";
|
|
|
2338
2341
|
Z.rowSeparatorChar = `
|
|
2339
2342
|
`;
|
|
2340
2343
|
let se = Z;
|
|
2341
|
-
class
|
|
2344
|
+
class fe extends $e {
|
|
2342
2345
|
constructor(e, t, o, s, i, r = new se()) {
|
|
2343
2346
|
var n;
|
|
2344
2347
|
if (super(
|
|
2345
2348
|
e,
|
|
2346
2349
|
t,
|
|
2347
|
-
new
|
|
2350
|
+
new ve(o),
|
|
2348
2351
|
s
|
|
2349
|
-
), this.eventListener = i, this.copyService = r, this.licenseManager = P.getInstance(), this.selectionService = new
|
|
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) {
|
|
2350
2353
|
const l = this.tableOptions.autoRestoreOptions, d = l.getStorageKeyFn;
|
|
2351
|
-
d && (l.autoRestoreScrollPosition && (this.storeScrollPosStateService = new
|
|
2354
|
+
d && (l.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Ee(d)), l.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new ke(d)), l.autoRestoreSortingState && (this.storeSortingService = new Te(d)));
|
|
2352
2355
|
}
|
|
2353
|
-
this.mouseHandler = new
|
|
2356
|
+
this.mouseHandler = new Ae(this), this.inputHandler = new Fe(this), this.shortcutService = new Be(this), this.shortcutService.addListener(this.selectionService);
|
|
2354
2357
|
}
|
|
2355
2358
|
/**
|
|
2356
2359
|
* Creates a TableScope instance.
|
|
@@ -2363,8 +2366,8 @@ class be extends _e {
|
|
|
2363
2366
|
*
|
|
2364
2367
|
* @return {TableScope} - The newly created TableScope instance.
|
|
2365
2368
|
*/
|
|
2366
|
-
static create(e, t, o = new j(), s = new oe(), i = new
|
|
2367
|
-
return new
|
|
2369
|
+
static create(e, t, o = new j(), s = new oe(), i = new We(), r = new se()) {
|
|
2370
|
+
return new fe(
|
|
2368
2371
|
e,
|
|
2369
2372
|
t,
|
|
2370
2373
|
i,
|
|
@@ -2562,7 +2565,7 @@ class be extends _e {
|
|
|
2562
2565
|
const s = this.tableModel.getColumnDef(o);
|
|
2563
2566
|
if (s != null && s.sortable && s.sortable()) {
|
|
2564
2567
|
e.preventDefault(), e.stopPropagation();
|
|
2565
|
-
const n = s.sortStatesOrder ? s.sortStatesOrder : this.tableOptions.sortOrder, l = s.sortState ?? "", d = n[(n.indexOf(l) + 1) % n.length], a = new
|
|
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);
|
|
2566
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]);
|
|
2567
2570
|
}
|
|
2568
2571
|
}
|
|
@@ -2728,10 +2731,10 @@ class be extends _e {
|
|
|
2728
2731
|
}
|
|
2729
2732
|
}
|
|
2730
2733
|
}
|
|
2731
|
-
class
|
|
2734
|
+
class me {
|
|
2732
2735
|
}
|
|
2733
|
-
|
|
2734
|
-
|
|
2736
|
+
me.themes = ["light", "combat", "paper", "blackboard"];
|
|
2737
|
+
me.vars = {
|
|
2735
2738
|
light: `html[data-theme="light"] {
|
|
2736
2739
|
--ge-table-bg: rgba(255,255,255, 0.5);
|
|
2737
2740
|
--ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
|
|
@@ -3256,7 +3259,7 @@ class Ye {
|
|
|
3256
3259
|
return e.parent ? e.parent.expanded ? this.isVisible(e.parent) : !1 : !0;
|
|
3257
3260
|
}
|
|
3258
3261
|
}
|
|
3259
|
-
class
|
|
3262
|
+
class we {
|
|
3260
3263
|
genericSortComparator(e, t, o) {
|
|
3261
3264
|
if (typeof e == "number" && typeof t == "number")
|
|
3262
3265
|
return o * (e - t);
|
|
@@ -3276,7 +3279,7 @@ class me {
|
|
|
3276
3279
|
}
|
|
3277
3280
|
class ne extends ee {
|
|
3278
3281
|
constructor(e, t, o, s = []) {
|
|
3279
|
-
super(e, s, o), this.areaIdent = e, this.rows = t, this.defaultRowHeight = o, this.columnDefs = s, this.type = "AreaModelTree", this.sorterService = new
|
|
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];
|
|
3280
3283
|
}
|
|
3281
3284
|
changeColumnOrder(e, t) {
|
|
3282
3285
|
this.arrayMove(this.properties, e, t), super.changeColumnOrder(e, t);
|
|
@@ -3478,7 +3481,7 @@ class N {
|
|
|
3478
3481
|
constructor(e, t, o, s = 0, i = 0, r = !1, n = new H(), l = [], d = [], a = -1, h = 0, u = 400, m = () => {
|
|
3479
3482
|
}) {
|
|
3480
3483
|
var b, f, g, p;
|
|
3481
|
-
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 &&
|
|
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());
|
|
3482
3485
|
}
|
|
3483
3486
|
init() {
|
|
3484
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();
|
|
@@ -3831,7 +3834,7 @@ class N {
|
|
|
3831
3834
|
}
|
|
3832
3835
|
class Ue extends ee {
|
|
3833
3836
|
constructor(e, t, o, s = []) {
|
|
3834
|
-
super(e, s, o), this.areaIdent = e, this.rows = t, this.defaultRowHeight = o, this.columnDefs = s, this.sorterService = new
|
|
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);
|
|
3835
3838
|
}
|
|
3836
3839
|
setRows(e) {
|
|
3837
3840
|
this.rows = e, this.filteredRows = [...e];
|
|
@@ -3880,8 +3883,7 @@ class Ue extends ee {
|
|
|
3880
3883
|
};
|
|
3881
3884
|
}
|
|
3882
3885
|
getPropertyValue(e, t) {
|
|
3883
|
-
const o = t.shift();
|
|
3884
|
-
let s = e[o];
|
|
3886
|
+
const o = t.shift(), s = e[o];
|
|
3885
3887
|
return s && t.length ? this.getPropertyValue(s, t) : s;
|
|
3886
3888
|
}
|
|
3887
3889
|
}
|
|
@@ -4453,14 +4455,14 @@ class Xt {
|
|
|
4453
4455
|
return !1;
|
|
4454
4456
|
}
|
|
4455
4457
|
}
|
|
4456
|
-
const
|
|
4458
|
+
const Se = class xe {
|
|
4457
4459
|
constructor(e = new Q()) {
|
|
4458
4460
|
this.headerGroupOptions = e;
|
|
4459
4461
|
}
|
|
4460
4462
|
render(e, t, o, s, i, r, n) {
|
|
4461
4463
|
const l = r != null && r.data ? r.data : "";
|
|
4462
4464
|
if (r) {
|
|
4463
|
-
const { toggle: d, visibility: a, closed: h } = r, u = d ?
|
|
4465
|
+
const { toggle: d, visibility: a, closed: h } = r, u = d ? xe.toggleHeaderGroup : "";
|
|
4464
4466
|
this.addText(e, s, t, o, l, u), d && a !== "always" && this.addArrowDiv(n, e, !h, t, o, s, u);
|
|
4465
4467
|
} else
|
|
4466
4468
|
this.addText(e, s, t, o, l, "");
|
|
@@ -4492,8 +4494,8 @@ const we = class Se {
|
|
|
4492
4494
|
}
|
|
4493
4495
|
}
|
|
4494
4496
|
};
|
|
4495
|
-
|
|
4496
|
-
let et =
|
|
4497
|
+
Se.toggleHeaderGroup = "toggleHeaderGroup";
|
|
4498
|
+
let et = Se;
|
|
4497
4499
|
class Yt {
|
|
4498
4500
|
constructor(e = "header", t, o = [], s, i = new Q()) {
|
|
4499
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();
|
|
@@ -4838,12 +4840,12 @@ class no {
|
|
|
4838
4840
|
const ao = function(c, e, t) {
|
|
4839
4841
|
return c ? Number(c) : "";
|
|
4840
4842
|
};
|
|
4841
|
-
class
|
|
4843
|
+
class Ce {
|
|
4842
4844
|
constructor(e) {
|
|
4843
4845
|
this.options = e;
|
|
4844
4846
|
}
|
|
4845
4847
|
static create(e) {
|
|
4846
|
-
return new
|
|
4848
|
+
return new Ce(
|
|
4847
4849
|
e.map((t) => new Je(t, t))
|
|
4848
4850
|
);
|
|
4849
4851
|
}
|
|
@@ -4872,7 +4874,55 @@ class xe {
|
|
|
4872
4874
|
}
|
|
4873
4875
|
}
|
|
4874
4876
|
}
|
|
4875
|
-
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 {
|
|
4876
4926
|
constructor(e, t, o) {
|
|
4877
4927
|
this.r = e, this.g = t, this.b = o;
|
|
4878
4928
|
}
|
|
@@ -4894,7 +4944,7 @@ class W {
|
|
|
4894
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})`;
|
|
4895
4945
|
}
|
|
4896
4946
|
}
|
|
4897
|
-
class
|
|
4947
|
+
class uo {
|
|
4898
4948
|
constructor(e, t, o, s, i, r) {
|
|
4899
4949
|
this.minValue = e, this.minColor = t, this.middleValue = o, this.middleColor = s, this.maxValue = i, this.maxColor = r;
|
|
4900
4950
|
}
|
|
@@ -4906,8 +4956,8 @@ export {
|
|
|
4906
4956
|
D as AreaModelArrayOfArrays,
|
|
4907
4957
|
Yt as AreaModelCellGroups,
|
|
4908
4958
|
_ as AreaModelHidden,
|
|
4959
|
+
Ue as AreaModelObjectArray,
|
|
4909
4960
|
he as AreaModelObjectArrayWithColumndefs,
|
|
4910
|
-
Ue as AreaModelObjectyArray,
|
|
4911
4961
|
ne as AreaModelTree,
|
|
4912
4962
|
T as AreaObjectMap,
|
|
4913
4963
|
jt as AutoRestoreOptions,
|
|
@@ -4921,23 +4971,23 @@ export {
|
|
|
4921
4971
|
Wt as CheckboxColumnDef,
|
|
4922
4972
|
Ke as CheckboxModel,
|
|
4923
4973
|
$t as ChunkData,
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4974
|
+
_e as ColAndRowspanModel,
|
|
4975
|
+
Ie as CollapsedExpandedData,
|
|
4976
|
+
co as ColorRgb,
|
|
4927
4977
|
V as ColumnDef,
|
|
4928
|
-
|
|
4978
|
+
ve as ConvenienceDomService,
|
|
4929
4979
|
se as CopyService,
|
|
4930
|
-
|
|
4980
|
+
me as CssVars,
|
|
4931
4981
|
Qt as DateToIntlDDMMYYYYCellRenderer,
|
|
4932
4982
|
Jt as DateToIsoCellRenderer,
|
|
4933
4983
|
Zt as DateToLocaleDateCellRenderer,
|
|
4934
4984
|
so as DateToTecCellRenderer,
|
|
4935
4985
|
H as DefaultRowHeights,
|
|
4936
|
-
|
|
4986
|
+
De as EleScope,
|
|
4937
4987
|
oe as EventAdapter,
|
|
4938
4988
|
re as FalseFn,
|
|
4939
4989
|
Ne as FocusModel,
|
|
4940
|
-
|
|
4990
|
+
Pe as GeCellIndices,
|
|
4941
4991
|
W as GeCssColorUtil,
|
|
4942
4992
|
Kt as GeFilterService,
|
|
4943
4993
|
Nt as GeKeyEvent,
|
|
@@ -4946,41 +4996,42 @@ export {
|
|
|
4946
4996
|
$ as GeoData,
|
|
4947
4997
|
O as Icon,
|
|
4948
4998
|
Ot as IndexAndPx,
|
|
4949
|
-
|
|
4950
|
-
|
|
4999
|
+
Ge as InputCellRenderer,
|
|
5000
|
+
Fe as InputHandler,
|
|
4951
5001
|
P as LicenseManager,
|
|
4952
5002
|
eo as MaleFemaleToIconCellRenderer,
|
|
4953
|
-
|
|
4954
|
-
|
|
5003
|
+
Ae as MouseHandler,
|
|
5004
|
+
Re as MouseTargetData,
|
|
5005
|
+
ho as MultiRowsSelectionModel,
|
|
4955
5006
|
to as NumberCellProgressBarCellRenderer,
|
|
4956
5007
|
io as NumberCellRenderer,
|
|
4957
|
-
|
|
5008
|
+
Ve as OsxShortcutActionIdMapping,
|
|
4958
5009
|
de as Padding,
|
|
4959
5010
|
no as PositiveAndNegativeNumberRenderer,
|
|
4960
5011
|
lo as ProgressBarCellRenderer,
|
|
4961
|
-
|
|
5012
|
+
$e as RenderScope,
|
|
4962
5013
|
Ut as Renderer,
|
|
4963
5014
|
qe as RequestChunk,
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
5015
|
+
Ce as SelectCellRenderer,
|
|
5016
|
+
be as SelectionModel,
|
|
5017
|
+
Le as SelectionService,
|
|
5018
|
+
Be as ShortcutService,
|
|
5019
|
+
We as SimpleDomService,
|
|
4969
5020
|
w as Size,
|
|
4970
|
-
|
|
5021
|
+
Oe as SortItem,
|
|
4971
5022
|
pe as SortedOptions,
|
|
4972
5023
|
ro as StarRatingCellRenderer,
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
5024
|
+
ke as StoreStateCollapsedExpandService,
|
|
5025
|
+
Ee as StoreStateScrollPosService,
|
|
5026
|
+
Te as StoreStateSortingService,
|
|
5027
|
+
Me as TableApi,
|
|
4977
5028
|
zt as TableCellUpdateEvent,
|
|
4978
5029
|
F as TableFactory,
|
|
4979
5030
|
N as TableModel,
|
|
4980
5031
|
_t as TableModelAndOptions,
|
|
4981
5032
|
j as TableOptions,
|
|
4982
|
-
|
|
4983
|
-
|
|
5033
|
+
fe as TableScope,
|
|
5034
|
+
uo as ThreeColorGradientArg,
|
|
4984
5035
|
ae as TreeCheckboxModel,
|
|
4985
5036
|
Y as TreeFactory,
|
|
4986
5037
|
ge as TreeOptions,
|
|
@@ -4990,7 +5041,7 @@ export {
|
|
|
4990
5041
|
Xe as TrueFn,
|
|
4991
5042
|
ue as TwoColorGradientArg,
|
|
4992
5043
|
Je as ValueLabel,
|
|
4993
|
-
|
|
5044
|
+
He as WindowsShortcutActionIdMapping,
|
|
4994
5045
|
Dt as actionIds,
|
|
4995
5046
|
Vt as allCenter,
|
|
4996
5047
|
Ht as allLeft,
|
|
@@ -5001,7 +5052,7 @@ export {
|
|
|
5001
5052
|
ao as editInputPipeForNumber,
|
|
5002
5053
|
U as getAreaIdentByString,
|
|
5003
5054
|
z as isAreaModelTree,
|
|
5004
|
-
|
|
5055
|
+
ye as isCheckboxColumnDef,
|
|
5005
5056
|
L as isTreeRow,
|
|
5006
5057
|
Tt as px0,
|
|
5007
5058
|
kt as px10,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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
|
|
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;
|