@guiexpert/demo-table-models 1.1.57 → 1.1.62
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 +7 -7
- package/index.js +214 -204
- package/lib/createTimeTableModel.d.ts +1 -0
- package/lib/treepeople/generateTreePeopleModel.d.ts +1 -0
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -35,6 +35,189 @@ class Re {
|
|
|
35
35
|
this.iconAsc = e, this.iconDesc = r, this.iconPlaceholder = a;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
+
class ee {
|
|
39
|
+
constructor(e, r = [], a = -1) {
|
|
40
|
+
this.areaIdent = e, this.columnDefs = r, this.defaultRowHeight = a, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = r.map((t) => t.rendererMap[e]);
|
|
41
|
+
}
|
|
42
|
+
getTextValueAt(e, r) {
|
|
43
|
+
return "" + this.getValueAt(e, r);
|
|
44
|
+
}
|
|
45
|
+
getTooltipAt(e, r) {
|
|
46
|
+
return "";
|
|
47
|
+
}
|
|
48
|
+
getCellRenderer(e, r) {
|
|
49
|
+
if (r < this.cellRenderers.length)
|
|
50
|
+
return this.cellRenderers[r];
|
|
51
|
+
}
|
|
52
|
+
getColspanAt(e, r) {
|
|
53
|
+
return 0;
|
|
54
|
+
}
|
|
55
|
+
getCustomClassesAt(e, r) {
|
|
56
|
+
return [];
|
|
57
|
+
}
|
|
58
|
+
getCustomStyleAt(e, r) {
|
|
59
|
+
}
|
|
60
|
+
getRowspanAt(e, r) {
|
|
61
|
+
return 0;
|
|
62
|
+
}
|
|
63
|
+
getRowByIndex(e) {
|
|
64
|
+
}
|
|
65
|
+
isRowCheckable(e) {
|
|
66
|
+
return !0;
|
|
67
|
+
}
|
|
68
|
+
isRowChecked(e) {
|
|
69
|
+
var a;
|
|
70
|
+
const r = this.getRowByIndex(e);
|
|
71
|
+
return (a = this.rowSelectionModel) == null ? void 0 : a.isRowChecked(r);
|
|
72
|
+
}
|
|
73
|
+
setRowChecked(e, r) {
|
|
74
|
+
if (this.rowSelectionModel) {
|
|
75
|
+
const a = this.getRowByIndex(e);
|
|
76
|
+
this.rowSelectionModel.checkRow(a, r);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
getMaxColspan() {
|
|
80
|
+
return 31;
|
|
81
|
+
}
|
|
82
|
+
getMaxRowspan() {
|
|
83
|
+
return 31;
|
|
84
|
+
}
|
|
85
|
+
getYPosByRowIndex(e) {
|
|
86
|
+
return this.defaultRowHeight > 0 ? this.defaultRowHeight * e : this.yPositions[e];
|
|
87
|
+
}
|
|
88
|
+
init() {
|
|
89
|
+
!this.yPositions.length && this.getRowCount() !== void 0 && this.defaultRowHeight === -1 && this.calcYPositions();
|
|
90
|
+
}
|
|
91
|
+
isFilterable() {
|
|
92
|
+
return this.areaIdent === "body";
|
|
93
|
+
}
|
|
94
|
+
doSort(e) {
|
|
95
|
+
return !1;
|
|
96
|
+
}
|
|
97
|
+
isEditable(e, r) {
|
|
98
|
+
var t, n;
|
|
99
|
+
const a = (t = this.columnDefs) == null ? void 0 : t[r];
|
|
100
|
+
return ((n = a == null ? void 0 : a.editable) == null ? void 0 : n.call(a)) ?? !1;
|
|
101
|
+
}
|
|
102
|
+
setValue(e, r, a) {
|
|
103
|
+
var d;
|
|
104
|
+
const t = (d = this.columnDefs[r]) == null ? void 0 : d.editInputPipe;
|
|
105
|
+
t && (a = t(a, e, r));
|
|
106
|
+
const n = this.getRowByIndex(e), m = this.columnDefs[r].property;
|
|
107
|
+
return m.includes(".") ? this.setPropertyValue(n, m.split("."), a) : (n[m] = a, !0);
|
|
108
|
+
}
|
|
109
|
+
isSelectable(e, r) {
|
|
110
|
+
return !0;
|
|
111
|
+
}
|
|
112
|
+
changeColumnOrder(e, r) {
|
|
113
|
+
this.arrayMove(this.cellRenderers, e, r);
|
|
114
|
+
}
|
|
115
|
+
setPropertyValue(e, r, a) {
|
|
116
|
+
const t = r.shift();
|
|
117
|
+
if (t) {
|
|
118
|
+
const n = e[t];
|
|
119
|
+
return n && r.length ? this.setPropertyValue(n, r, a) : (e[t] = a, !0);
|
|
120
|
+
}
|
|
121
|
+
return !1;
|
|
122
|
+
}
|
|
123
|
+
arrayMove(e, r, a) {
|
|
124
|
+
const t = e.splice(r, 1)[0];
|
|
125
|
+
return e.splice(a, 0, t), e;
|
|
126
|
+
}
|
|
127
|
+
calcYPositions() {
|
|
128
|
+
const e = this.getRowCount();
|
|
129
|
+
this.yPositions = new Array(e + 1), this.yPositions[0] = 0;
|
|
130
|
+
for (let r = 0; r < e; r++)
|
|
131
|
+
this.yPositions[r + 1] = this.getRowHeight(r) + this.yPositions[r];
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
class fe {
|
|
135
|
+
genericSortComparator(e, r, a) {
|
|
136
|
+
if (typeof e == "number" && typeof r == "number")
|
|
137
|
+
return a * (e - r);
|
|
138
|
+
if (typeof e == "string" && typeof r == "string")
|
|
139
|
+
return a * e.localeCompare(r);
|
|
140
|
+
if (typeof e == "boolean" && typeof r == "boolean")
|
|
141
|
+
return a * ((e ? -1 : 1) - (r ? -1 : 1));
|
|
142
|
+
if (e instanceof Date && r instanceof Date)
|
|
143
|
+
return a * (e.getTime() - r.getTime());
|
|
144
|
+
if (e instanceof Array && r instanceof Array) {
|
|
145
|
+
const t = e, n = r;
|
|
146
|
+
if (t.length && n.length)
|
|
147
|
+
return this.genericSortComparator(t[0], n[0], a);
|
|
148
|
+
}
|
|
149
|
+
return a * ("" + e).localeCompare("" + r);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
class De extends ee {
|
|
153
|
+
constructor(e, r, a, t = []) {
|
|
154
|
+
super(e, t, a), this.areaIdent = e, this.rows = r, this.defaultRowHeight = a, this.columnDefs = t, this.focusedRowIndex = 0, this.sorterService = new fe(), this.filteredRows = [...r], this.properties = t.map((n) => n.property);
|
|
155
|
+
}
|
|
156
|
+
setRows(e) {
|
|
157
|
+
this.rows = e, this.filteredRows = [...e];
|
|
158
|
+
}
|
|
159
|
+
filterRowsByPredict(e) {
|
|
160
|
+
this.rows = this.rows.filter(e), this.filteredRows = this.filteredRows.filter(e);
|
|
161
|
+
}
|
|
162
|
+
getRowCount() {
|
|
163
|
+
var e;
|
|
164
|
+
return ((e = this.filteredRows) == null ? void 0 : e.length) ?? 0;
|
|
165
|
+
}
|
|
166
|
+
getValueAt(e, r) {
|
|
167
|
+
const a = this.properties[r];
|
|
168
|
+
let t = this.filteredRows[e];
|
|
169
|
+
return X(t) && (t = t.data), t ? this.getValueByT(t, a) : "";
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Retrieves the filtered and sorted rows from the dataset.
|
|
173
|
+
* These rows are used for rendering the table.
|
|
174
|
+
*
|
|
175
|
+
* @return {T[]} An array containing the filtered (and sorted) rows.
|
|
176
|
+
*/
|
|
177
|
+
getFilteredRows() {
|
|
178
|
+
return this.filteredRows;
|
|
179
|
+
}
|
|
180
|
+
getAllRows() {
|
|
181
|
+
return this.rows;
|
|
182
|
+
}
|
|
183
|
+
getRowHeight(e) {
|
|
184
|
+
return this.defaultRowHeight;
|
|
185
|
+
}
|
|
186
|
+
getRowByIndex(e) {
|
|
187
|
+
return this.filteredRows[e];
|
|
188
|
+
}
|
|
189
|
+
externalFilterChanged(e) {
|
|
190
|
+
this.filteredRows = this.rows ? this.rows.filter(e) : [];
|
|
191
|
+
}
|
|
192
|
+
doSort(e) {
|
|
193
|
+
for (const r of e) {
|
|
194
|
+
const { columnIndex: a, sortState: t } = r, n = t === "asc" ? 1 : t === "desc" ? -1 : 0, m = this.properties[a];
|
|
195
|
+
this.filteredRows = this.filteredRows.sort(this.genericFlatTableSortComparator(m, n));
|
|
196
|
+
}
|
|
197
|
+
return !0;
|
|
198
|
+
}
|
|
199
|
+
getValueByT(e, r) {
|
|
200
|
+
return r.includes(".") ? this.getPropertyValue(e, r.split(".")) : e[r];
|
|
201
|
+
}
|
|
202
|
+
changeColumnOrder(e, r) {
|
|
203
|
+
this.arrayMove(this.properties, e, r), super.changeColumnOrder(e, r);
|
|
204
|
+
}
|
|
205
|
+
getCustomClassesAt(e, r) {
|
|
206
|
+
const a = super.getCustomClassesAt(e, r);
|
|
207
|
+
return this.getRowByIndex(e).selected && a.push("ge-selected-row"), this.focusedRowIndex === e && a.push("ge-focused-row"), a;
|
|
208
|
+
}
|
|
209
|
+
genericFlatTableSortComparator(e, r) {
|
|
210
|
+
const a = this.columnDefs.find((t) => t.property === e);
|
|
211
|
+
return (t, n) => {
|
|
212
|
+
const m = this.getValueByT(t, e), d = this.getValueByT(n, e);
|
|
213
|
+
return a != null && a.sortComparator ? r * a.sortComparator(m, d, t, n, r) : this.sorterService.genericSortComparator(m, d, r);
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
getPropertyValue(e, r) {
|
|
217
|
+
const a = r.shift(), t = e[a];
|
|
218
|
+
return t && r.length ? this.getPropertyValue(t, r) : t;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
38
221
|
class o {
|
|
39
222
|
/**
|
|
40
223
|
* Represents a constructor for a class.
|
|
@@ -75,7 +258,7 @@ class C {
|
|
|
75
258
|
this.header = e, this.body = r, this.footer = a;
|
|
76
259
|
}
|
|
77
260
|
}
|
|
78
|
-
class
|
|
261
|
+
class Ae {
|
|
79
262
|
render(e, r, a, t, n, m, d) {
|
|
80
263
|
if (n.isEditable(r, a)) {
|
|
81
264
|
d.addClass(e, "ge-table-row-input-div");
|
|
@@ -178,7 +361,7 @@ class q {
|
|
|
178
361
|
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());
|
|
179
362
|
}
|
|
180
363
|
}
|
|
181
|
-
class
|
|
364
|
+
class Ue {
|
|
182
365
|
constructor(e = "none") {
|
|
183
366
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
|
|
184
367
|
}
|
|
@@ -215,7 +398,7 @@ class Ae {
|
|
|
215
398
|
return [this.rowIndex, this.columnIndex];
|
|
216
399
|
}
|
|
217
400
|
}
|
|
218
|
-
class
|
|
401
|
+
class re {
|
|
219
402
|
constructor(e = new w(
|
|
220
403
|
"❯",
|
|
221
404
|
"",
|
|
@@ -229,14 +412,14 @@ class ee {
|
|
|
229
412
|
}
|
|
230
413
|
// `⊖ `, `⊕ `;
|
|
231
414
|
}
|
|
232
|
-
const
|
|
415
|
+
const Me = new q(), Be = new Ue("cell");
|
|
233
416
|
class z {
|
|
234
417
|
constructor() {
|
|
235
418
|
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 = {
|
|
236
419
|
header: 34,
|
|
237
420
|
body: 34,
|
|
238
421
|
footer: 34
|
|
239
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new ke(), this.headerGroupOptions = new
|
|
422
|
+
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new ke(), this.headerGroupOptions = new re(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new Re(), this.sortOrder = ["asc", "desc"], this.shortcutActionsDisabled = !1, this.resizeEventDebounceDelay = 500, this.getEditRenderer = (e, r) => new Ae(), this.getSelectionModel = () => Me, this.getFocusModel = () => Be;
|
|
240
423
|
}
|
|
241
424
|
}
|
|
242
425
|
const D = class D {
|
|
@@ -644,104 +827,8 @@ class y {
|
|
|
644
827
|
);
|
|
645
828
|
}
|
|
646
829
|
}
|
|
647
|
-
const
|
|
648
|
-
class
|
|
649
|
-
constructor(e, r = [], a = -1) {
|
|
650
|
-
this.areaIdent = e, this.columnDefs = r, this.defaultRowHeight = a, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = r.map((t) => t.rendererMap[e]);
|
|
651
|
-
}
|
|
652
|
-
getTextValueAt(e, r) {
|
|
653
|
-
return "" + this.getValueAt(e, r);
|
|
654
|
-
}
|
|
655
|
-
getTooltipAt(e, r) {
|
|
656
|
-
return "";
|
|
657
|
-
}
|
|
658
|
-
getCellRenderer(e, r) {
|
|
659
|
-
if (r < this.cellRenderers.length)
|
|
660
|
-
return this.cellRenderers[r];
|
|
661
|
-
}
|
|
662
|
-
getColspanAt(e, r) {
|
|
663
|
-
return 0;
|
|
664
|
-
}
|
|
665
|
-
getCustomClassesAt(e, r) {
|
|
666
|
-
return [];
|
|
667
|
-
}
|
|
668
|
-
getCustomStyleAt(e, r) {
|
|
669
|
-
}
|
|
670
|
-
getRowspanAt(e, r) {
|
|
671
|
-
return 0;
|
|
672
|
-
}
|
|
673
|
-
getRowByIndex(e) {
|
|
674
|
-
}
|
|
675
|
-
isRowCheckable(e) {
|
|
676
|
-
return !0;
|
|
677
|
-
}
|
|
678
|
-
isRowChecked(e) {
|
|
679
|
-
var a;
|
|
680
|
-
const r = this.getRowByIndex(e);
|
|
681
|
-
return (a = this.rowSelectionModel) == null ? void 0 : a.isRowChecked(r);
|
|
682
|
-
}
|
|
683
|
-
setRowChecked(e, r) {
|
|
684
|
-
if (this.rowSelectionModel) {
|
|
685
|
-
const a = this.getRowByIndex(e);
|
|
686
|
-
this.rowSelectionModel.checkRow(a, r);
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
getMaxColspan() {
|
|
690
|
-
return 31;
|
|
691
|
-
}
|
|
692
|
-
getMaxRowspan() {
|
|
693
|
-
return 31;
|
|
694
|
-
}
|
|
695
|
-
getYPosByRowIndex(e) {
|
|
696
|
-
return this.defaultRowHeight > 0 ? this.defaultRowHeight * e : this.yPositions[e];
|
|
697
|
-
}
|
|
698
|
-
init() {
|
|
699
|
-
!this.yPositions.length && this.getRowCount() !== void 0 && this.defaultRowHeight === -1 && this.calcYPositions();
|
|
700
|
-
}
|
|
701
|
-
isFilterable() {
|
|
702
|
-
return this.areaIdent === "body";
|
|
703
|
-
}
|
|
704
|
-
doSort(e) {
|
|
705
|
-
return !1;
|
|
706
|
-
}
|
|
707
|
-
isEditable(e, r) {
|
|
708
|
-
var t, n;
|
|
709
|
-
const a = (t = this.columnDefs) == null ? void 0 : t[r];
|
|
710
|
-
return ((n = a == null ? void 0 : a.editable) == null ? void 0 : n.call(a)) ?? !1;
|
|
711
|
-
}
|
|
712
|
-
setValue(e, r, a) {
|
|
713
|
-
var d;
|
|
714
|
-
const t = (d = this.columnDefs[r]) == null ? void 0 : d.editInputPipe;
|
|
715
|
-
t && (a = t(a, e, r));
|
|
716
|
-
const n = this.getRowByIndex(e), m = this.columnDefs[r].property;
|
|
717
|
-
return m.includes(".") ? this.setPropertyValue(n, m.split("."), a) : (n[m] = a, !0);
|
|
718
|
-
}
|
|
719
|
-
isSelectable(e, r) {
|
|
720
|
-
return !0;
|
|
721
|
-
}
|
|
722
|
-
changeColumnOrder(e, r) {
|
|
723
|
-
this.arrayMove(this.cellRenderers, e, r);
|
|
724
|
-
}
|
|
725
|
-
setPropertyValue(e, r, a) {
|
|
726
|
-
const t = r.shift();
|
|
727
|
-
if (t) {
|
|
728
|
-
const n = e[t];
|
|
729
|
-
return n && r.length ? this.setPropertyValue(n, r, a) : (e[t] = a, !0);
|
|
730
|
-
}
|
|
731
|
-
return !1;
|
|
732
|
-
}
|
|
733
|
-
arrayMove(e, r, a) {
|
|
734
|
-
const t = e.splice(r, 1)[0];
|
|
735
|
-
return e.splice(a, 0, t), e;
|
|
736
|
-
}
|
|
737
|
-
calcYPositions() {
|
|
738
|
-
const e = this.getRowCount();
|
|
739
|
-
this.yPositions = new Array(e + 1), this.yPositions[0] = 0;
|
|
740
|
-
for (let r = 0; r < e; r++)
|
|
741
|
-
this.yPositions[r + 1] = this.getRowHeight(r) + this.yPositions[r];
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
class S extends ae {
|
|
830
|
+
const Ie = new l(300, "px"), qe = new l(250, "px"), Te = new l(220, "px"), A = new l(200, "px"), Ve = new l(160, "px"), oe = new l(150, "px"), ae = new l(140, "px"), L = new l(120, "px"), T = new l(100, "px"), he = new l(90, "px"), Se = new l(80, "px"), He = new l(70, "px"), x = new l(60, "px"), _e = new l(50, "px");
|
|
831
|
+
class S extends ee {
|
|
745
832
|
constructor(e, r, a, t = []) {
|
|
746
833
|
super(e, t, a), this.areaIdent = e, this.arr = r, this.defaultRowHeight = a, this.columnDefs = t, this.filteredArr = [...r];
|
|
747
834
|
}
|
|
@@ -841,7 +928,7 @@ class Z {
|
|
|
841
928
|
changeColumnOrder(e, r) {
|
|
842
929
|
}
|
|
843
930
|
}
|
|
844
|
-
class
|
|
931
|
+
class $e {
|
|
845
932
|
flattenTree(e, r = []) {
|
|
846
933
|
var a;
|
|
847
934
|
for (const t of e)
|
|
@@ -852,27 +939,9 @@ class _e {
|
|
|
852
939
|
return e.parent ? e.parent.expanded ? this.isVisible(e.parent) : !1 : !0;
|
|
853
940
|
}
|
|
854
941
|
}
|
|
855
|
-
class
|
|
856
|
-
genericSortComparator(e, r, a) {
|
|
857
|
-
if (typeof e == "number" && typeof r == "number")
|
|
858
|
-
return a * (e - r);
|
|
859
|
-
if (typeof e == "string" && typeof r == "string")
|
|
860
|
-
return a * e.localeCompare(r);
|
|
861
|
-
if (typeof e == "boolean" && typeof r == "boolean")
|
|
862
|
-
return a * ((e ? -1 : 1) - (r ? -1 : 1));
|
|
863
|
-
if (e instanceof Date && r instanceof Date)
|
|
864
|
-
return a * (e.getTime() - r.getTime());
|
|
865
|
-
if (e instanceof Array && r instanceof Array) {
|
|
866
|
-
const t = e, n = r;
|
|
867
|
-
if (t.length && n.length)
|
|
868
|
-
return this.genericSortComparator(t[0], n[0], a);
|
|
869
|
-
}
|
|
870
|
-
return a * ("" + e).localeCompare("" + r);
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
|
-
class de extends ae {
|
|
942
|
+
class de extends ee {
|
|
874
943
|
constructor(e, r, a, t = []) {
|
|
875
|
-
super(e, t, a), this.areaIdent = e, this.rows = r, this.defaultRowHeight = a, this.columnDefs = t, this.type = "AreaModelTree", this.sorterService = new
|
|
944
|
+
super(e, t, a), this.areaIdent = e, this.rows = r, this.defaultRowHeight = a, this.columnDefs = t, this.type = "AreaModelTree", this.sorterService = new fe(), this.service = new $e(), this.properties = t.map((n) => n.property), this.flattenRows = this.service.flattenTree(r), this.filteredFlattenRows = [...this.flattenRows];
|
|
876
945
|
}
|
|
877
946
|
changeColumnOrder(e, r) {
|
|
878
947
|
this.arrayMove(this.properties, e, r), super.changeColumnOrder(e, r);
|
|
@@ -1040,7 +1109,7 @@ class ue {
|
|
|
1040
1109
|
this.top = e, this.right = r, this.bottom = a, this.left = t;
|
|
1041
1110
|
}
|
|
1042
1111
|
}
|
|
1043
|
-
class
|
|
1112
|
+
class Ee {
|
|
1044
1113
|
constructor() {
|
|
1045
1114
|
this.checkedRows = [];
|
|
1046
1115
|
}
|
|
@@ -1075,7 +1144,7 @@ class W {
|
|
|
1075
1144
|
constructor(e, r, a, t = 0, n = 0, m = !1, d = new R(), i = [], u = [], p = -1, c = 0, N = 400, G = () => {
|
|
1076
1145
|
}) {
|
|
1077
1146
|
var v, k, b, F;
|
|
1078
|
-
this.headerAreaModel = e, this.bodyAreaModel = r, this.footerAreaModel = a, this.fixedLeftColumnCount = t, this.fixedRightColumnCount = n, this.rowCheckboxVisible = m, this.defaultRowHeights = d, this.columnDefs = i, this.columnSizes = u, this.overridingColumnWidth = p, this.columnCount = c, this.parentSize = N, this.getSelectionModel = G, this.rowCount = 0, this.contentHeightInPx = 0, this.contentWidthInPx = 0, this.padding = new ue(0, 0, 0, 0), this.xPositions = [], e.areaIdent = "header", r.areaIdent = "body", a.areaIdent = "footer", this.columnCount || ((v = this.columnDefs) != null && v.length ? this.columnCount = this.columnDefs.length : (k = this.columnSizes) != null && k.length && (this.columnCount = (b = this.columnSizes) == null ? void 0 : b.length)), (F = this.columnDefs) != null && F.length && xe(this.columnDefs[0]) && !r.rowSelectionModel && (r.rowSelectionModel = new
|
|
1147
|
+
this.headerAreaModel = e, this.bodyAreaModel = r, this.footerAreaModel = a, this.fixedLeftColumnCount = t, this.fixedRightColumnCount = n, this.rowCheckboxVisible = m, this.defaultRowHeights = d, this.columnDefs = i, this.columnSizes = u, this.overridingColumnWidth = p, this.columnCount = c, this.parentSize = N, this.getSelectionModel = G, this.rowCount = 0, this.contentHeightInPx = 0, this.contentWidthInPx = 0, this.padding = new ue(0, 0, 0, 0), this.xPositions = [], e.areaIdent = "header", r.areaIdent = "body", a.areaIdent = "footer", this.columnCount || ((v = this.columnDefs) != null && v.length ? this.columnCount = this.columnDefs.length : (k = this.columnSizes) != null && k.length && (this.columnCount = (b = this.columnSizes) == null ? void 0 : b.length)), (F = this.columnDefs) != null && F.length && xe(this.columnDefs[0]) && !r.rowSelectionModel && (r.rowSelectionModel = new Ee());
|
|
1079
1148
|
}
|
|
1080
1149
|
init() {
|
|
1081
1150
|
this.recalcSize(this.parentSize), this.overridingColumnWidth === -1 && this.calcXPositions(), this.headerAreaModel && this.headerAreaModel.init(), this.bodyAreaModel && this.bodyAreaModel.init(), this.footerAreaModel && this.footerAreaModel.init();
|
|
@@ -1461,66 +1530,7 @@ class W {
|
|
|
1461
1530
|
return this.tableScope;
|
|
1462
1531
|
}
|
|
1463
1532
|
}
|
|
1464
|
-
class
|
|
1465
|
-
constructor(e, r, a, t = []) {
|
|
1466
|
-
super(e, t, a), this.areaIdent = e, this.rows = r, this.defaultRowHeight = a, this.columnDefs = t, this.sorterService = new Se(), this.filteredRows = [...r], this.properties = t.map((n) => n.property);
|
|
1467
|
-
}
|
|
1468
|
-
setRows(e) {
|
|
1469
|
-
this.rows = e, this.filteredRows = [...e];
|
|
1470
|
-
}
|
|
1471
|
-
filterRowsByPredict(e) {
|
|
1472
|
-
this.rows = this.rows.filter(e), this.filteredRows = this.filteredRows.filter(e);
|
|
1473
|
-
}
|
|
1474
|
-
getRowCount() {
|
|
1475
|
-
var e;
|
|
1476
|
-
return ((e = this.filteredRows) == null ? void 0 : e.length) ?? 0;
|
|
1477
|
-
}
|
|
1478
|
-
getValueAt(e, r) {
|
|
1479
|
-
const a = this.properties[r];
|
|
1480
|
-
let t = this.filteredRows[e];
|
|
1481
|
-
return X(t) && (t = t.data), t ? this.getValueByT(t, a) : "";
|
|
1482
|
-
}
|
|
1483
|
-
getFilteredRows() {
|
|
1484
|
-
return this.filteredRows;
|
|
1485
|
-
}
|
|
1486
|
-
getAllRows() {
|
|
1487
|
-
return this.rows;
|
|
1488
|
-
}
|
|
1489
|
-
getRowHeight(e) {
|
|
1490
|
-
return this.defaultRowHeight;
|
|
1491
|
-
}
|
|
1492
|
-
getRowByIndex(e) {
|
|
1493
|
-
return this.filteredRows[e];
|
|
1494
|
-
}
|
|
1495
|
-
externalFilterChanged(e) {
|
|
1496
|
-
this.filteredRows = this.rows ? this.rows.filter(e) : [];
|
|
1497
|
-
}
|
|
1498
|
-
doSort(e) {
|
|
1499
|
-
for (const r of e) {
|
|
1500
|
-
const { columnIndex: a, sortState: t } = r, n = t === "asc" ? 1 : t === "desc" ? -1 : 0, m = this.properties[a];
|
|
1501
|
-
this.filteredRows = this.filteredRows.sort(this.genericFlatTableSortComparator(m, n));
|
|
1502
|
-
}
|
|
1503
|
-
return !0;
|
|
1504
|
-
}
|
|
1505
|
-
getValueByT(e, r) {
|
|
1506
|
-
return r.includes(".") ? this.getPropertyValue(e, r.split(".")) : e[r];
|
|
1507
|
-
}
|
|
1508
|
-
changeColumnOrder(e, r) {
|
|
1509
|
-
this.arrayMove(this.properties, e, r), super.changeColumnOrder(e, r);
|
|
1510
|
-
}
|
|
1511
|
-
genericFlatTableSortComparator(e, r) {
|
|
1512
|
-
const a = this.columnDefs.find((t) => t.property === e);
|
|
1513
|
-
return (t, n) => {
|
|
1514
|
-
const m = this.getValueByT(t, e), d = this.getValueByT(n, e);
|
|
1515
|
-
return a != null && a.sortComparator ? r * a.sortComparator(m, d, t, n, r) : this.sorterService.genericSortComparator(m, d, r);
|
|
1516
|
-
};
|
|
1517
|
-
}
|
|
1518
|
-
getPropertyValue(e, r) {
|
|
1519
|
-
const a = r.shift(), t = e[a];
|
|
1520
|
-
return t && r.length ? this.getPropertyValue(t, r) : t;
|
|
1521
|
-
}
|
|
1522
|
-
}
|
|
1523
|
-
class I extends Ee {
|
|
1533
|
+
class I extends De {
|
|
1524
1534
|
constructor(e, r, a, t) {
|
|
1525
1535
|
super(
|
|
1526
1536
|
e,
|
|
@@ -2240,7 +2250,7 @@ class te {
|
|
|
2240
2250
|
}
|
|
2241
2251
|
}
|
|
2242
2252
|
const E = class E {
|
|
2243
|
-
constructor(e = new
|
|
2253
|
+
constructor(e = new re()) {
|
|
2244
2254
|
this.headerGroupOptions = e;
|
|
2245
2255
|
}
|
|
2246
2256
|
render(e, r, a, t, n, m, d) {
|
|
@@ -2281,7 +2291,7 @@ const E = class E {
|
|
|
2281
2291
|
E.toggleHeaderGroup = "toggleHeaderGroup";
|
|
2282
2292
|
let J = E;
|
|
2283
2293
|
class Ce {
|
|
2284
|
-
constructor(e = "header", r, a = [], t, n = new
|
|
2294
|
+
constructor(e = "header", r, a = [], t, n = new re()) {
|
|
2285
2295
|
this.areaIdent = e, this.groups = r, this.columnDefs = a, this.defaultRowHeight = t, this.headerGroupOptions = n, this.gammaCells = !0, this.arr = [], this.groupExts = [], this.cellGroupExtCellRenderer = new J(this.headerGroupOptions), this.groupExts = h.buildGroupExts(r), this.init();
|
|
2286
2296
|
}
|
|
2287
2297
|
init() {
|
|
@@ -5463,7 +5473,7 @@ function _r() {
|
|
|
5463
5473
|
y.create({
|
|
5464
5474
|
property: "marketCapUsd",
|
|
5465
5475
|
headerLabel: "Market Cap",
|
|
5466
|
-
width:
|
|
5476
|
+
width: Ve,
|
|
5467
5477
|
bodyClasses: ["ge-table-text-align-right"],
|
|
5468
5478
|
headerClasses: ["ge-table-text-align-right"],
|
|
5469
5479
|
bodyRenderer: r
|
|
@@ -5478,7 +5488,7 @@ function _r() {
|
|
|
5478
5488
|
y.create({
|
|
5479
5489
|
property: "circulatingSupply",
|
|
5480
5490
|
headerLabel: "Circulating Supply",
|
|
5481
|
-
width:
|
|
5491
|
+
width: ae,
|
|
5482
5492
|
bodyRenderer: n,
|
|
5483
5493
|
bodyClasses: ["ge-table-text-align-right"],
|
|
5484
5494
|
headerClasses: ["ge-table-text-align-right"]
|
|
@@ -220471,14 +220481,14 @@ function Sr() {
|
|
|
220471
220481
|
y.create({
|
|
220472
220482
|
property: "email",
|
|
220473
220483
|
headerLabel: "Email",
|
|
220474
|
-
width:
|
|
220484
|
+
width: Ie,
|
|
220475
220485
|
bodyClasses: ["ge-table-text-align-left"]
|
|
220476
220486
|
}),
|
|
220477
|
-
new y("ipAddress", "IP",
|
|
220487
|
+
new y("ipAddress", "IP", oe),
|
|
220478
220488
|
y.create({
|
|
220479
220489
|
property: "id",
|
|
220480
220490
|
headerLabel: "ID",
|
|
220481
|
-
width:
|
|
220491
|
+
width: qe,
|
|
220482
220492
|
// bodyRenderer: actionRenderer,
|
|
220483
220493
|
bodyClasses: ["ge-table-text-align-left"]
|
|
220484
220494
|
})
|
|
@@ -222723,7 +222733,7 @@ function xr() {
|
|
|
222723
222733
|
y.create({
|
|
222724
222734
|
property: "country",
|
|
222725
222735
|
headerLabel: "Country",
|
|
222726
|
-
width:
|
|
222736
|
+
width: ae,
|
|
222727
222737
|
bodyClasses: ["ge-table-text-align-left"],
|
|
222728
222738
|
headerClasses: ["ge-table-text-align-left"],
|
|
222729
222739
|
sortable: g
|
|
@@ -222754,7 +222764,7 @@ function xr() {
|
|
|
222754
222764
|
y.create({
|
|
222755
222765
|
property: "inStock",
|
|
222756
222766
|
headerLabel: "In stock",
|
|
222757
|
-
width:
|
|
222767
|
+
width: he,
|
|
222758
222768
|
bodyRenderer: new Le("inStock", !0, !0),
|
|
222759
222769
|
bodyClasses: ["ge-table-text-align-center"],
|
|
222760
222770
|
sortable: g
|
|
@@ -224365,7 +224375,7 @@ function Br(s) {
|
|
|
224365
224375
|
y.create({
|
|
224366
224376
|
property: "country",
|
|
224367
224377
|
headerLabel: "Country",
|
|
224368
|
-
width:
|
|
224378
|
+
width: ae,
|
|
224369
224379
|
bodyClasses: ["ge-table-text-align-left"],
|
|
224370
224380
|
headerClasses: ["ge-table-text-align-left"],
|
|
224371
224381
|
sortable: g,
|
|
@@ -224400,7 +224410,7 @@ function Br(s) {
|
|
|
224400
224410
|
y.create({
|
|
224401
224411
|
property: "lastVisit",
|
|
224402
224412
|
headerLabel: "Last Visit",
|
|
224403
|
-
width:
|
|
224413
|
+
width: Te,
|
|
224404
224414
|
bodyClasses: ["ge-table-text-align-center"],
|
|
224405
224415
|
sortable: g,
|
|
224406
224416
|
editable: () => s
|
|
@@ -224423,7 +224433,7 @@ function Br(s) {
|
|
|
224423
224433
|
y.create({
|
|
224424
224434
|
property: "inStock",
|
|
224425
224435
|
headerLabel: "In stock",
|
|
224426
|
-
width:
|
|
224436
|
+
width: he,
|
|
224427
224437
|
bodyRenderer: new Le("inStock", !0, !0),
|
|
224428
224438
|
bodyClasses: ["ge-table-text-align-center"],
|
|
224429
224439
|
sortable: g,
|
|
@@ -224488,7 +224498,7 @@ function Br(s) {
|
|
|
224488
224498
|
y.create({
|
|
224489
224499
|
property: "f1",
|
|
224490
224500
|
headerLabel: "F1",
|
|
224491
|
-
width:
|
|
224501
|
+
width: Se,
|
|
224492
224502
|
bodyClasses: ["ge-table-text-align-right"],
|
|
224493
224503
|
bodyRenderer: new Je(),
|
|
224494
224504
|
sortable: g,
|
|
@@ -386431,12 +386441,12 @@ function Vr(s = !1) {
|
|
|
386431
386441
|
}
|
|
386432
386442
|
function Hr() {
|
|
386433
386443
|
return [
|
|
386434
|
-
new y("lastName", "Last Name",
|
|
386444
|
+
new y("lastName", "Last Name", Te),
|
|
386435
386445
|
new y("preName", "Pre Name", L),
|
|
386436
386446
|
y.create({
|
|
386437
386447
|
property: "age",
|
|
386438
386448
|
headerLabel: "Age",
|
|
386439
|
-
width:
|
|
386449
|
+
width: Se,
|
|
386440
386450
|
bodyRenderer: new Ye(),
|
|
386441
386451
|
editable: g,
|
|
386442
386452
|
// editInputPipe: (value: any) => value ? Number(value) : ""
|
|
@@ -386452,7 +386462,7 @@ function Hr() {
|
|
|
386452
386462
|
y.create({
|
|
386453
386463
|
property: "gender",
|
|
386454
386464
|
headerLabel: " ",
|
|
386455
|
-
width:
|
|
386465
|
+
width: _e,
|
|
386456
386466
|
bodyRenderer: new Pe(),
|
|
386457
386467
|
editable: g,
|
|
386458
386468
|
getEditRenderer: () => new ne([
|
|
@@ -386460,8 +386470,8 @@ function Hr() {
|
|
|
386460
386470
|
new Y("male", "♂")
|
|
386461
386471
|
])
|
|
386462
386472
|
}),
|
|
386463
|
-
new y("address.street", "Strasse",
|
|
386464
|
-
new y("address.number", "Nr",
|
|
386473
|
+
new y("address.street", "Strasse", oe),
|
|
386474
|
+
new y("address.number", "Nr", He),
|
|
386465
386475
|
new y("address.zip", "Zip", x),
|
|
386466
386476
|
new y("address.city", "City", L),
|
|
386467
386477
|
new y("address.country", "Country", L),
|
|
@@ -44,6 +44,7 @@ export declare const tableOptions: {
|
|
|
44
44
|
sortedOptions: import('../../../table/src').SortedOptions;
|
|
45
45
|
sortOrder: import('../../../table/src').SortState[];
|
|
46
46
|
shortcutActionIdMapping?: import('../../../table/src').ShortcutActionIdMapping | undefined;
|
|
47
|
+
shortcutActionsDisabled: boolean;
|
|
47
48
|
resizeEventDebounceDelay: number;
|
|
48
49
|
getEditRenderer?: import('../../../table/src').GetEditRenderer | undefined;
|
|
49
50
|
getSelectionModel?: import('../../../table/src').GetT<import('../../../table/src').SelectionModelIf> | undefined;
|
|
@@ -42,6 +42,7 @@ export declare function createTreePeopleTableOptions(addDemoSelection?: boolean)
|
|
|
42
42
|
sortedOptions: import('../../../../table/src').SortedOptions;
|
|
43
43
|
sortOrder: import('../../../../table/src').SortState[];
|
|
44
44
|
shortcutActionIdMapping?: import('../../../../table/src').ShortcutActionIdMapping | undefined;
|
|
45
|
+
shortcutActionsDisabled: boolean;
|
|
45
46
|
resizeEventDebounceDelay: number;
|
|
46
47
|
getEditRenderer?: import('../../../../table/src').GetEditRenderer | undefined;
|
|
47
48
|
getFocusModel?: import('../../../../table/src').GetT<import('../../../../table/src').FocusModelIf> | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guiexpert/demo-table-models",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.62",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"tslib": "^2.3.0",
|
|
21
|
-
"@guiexpert/table": "^1.1.
|
|
21
|
+
"@guiexpert/table": "^1.1.62"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "^20.11.17",
|