@guiexpert/demo-table-models 1.1.56 → 1.1.61
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 +205 -213
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -35,6 +35,179 @@ 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.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
|
+
getFilteredRows() {
|
|
172
|
+
return this.filteredRows;
|
|
173
|
+
}
|
|
174
|
+
getAllRows() {
|
|
175
|
+
return this.rows;
|
|
176
|
+
}
|
|
177
|
+
getRowHeight(e) {
|
|
178
|
+
return this.defaultRowHeight;
|
|
179
|
+
}
|
|
180
|
+
getRowByIndex(e) {
|
|
181
|
+
return this.filteredRows[e];
|
|
182
|
+
}
|
|
183
|
+
externalFilterChanged(e) {
|
|
184
|
+
this.filteredRows = this.rows ? this.rows.filter(e) : [];
|
|
185
|
+
}
|
|
186
|
+
doSort(e) {
|
|
187
|
+
for (const r of e) {
|
|
188
|
+
const { columnIndex: a, sortState: t } = r, n = t === "asc" ? 1 : t === "desc" ? -1 : 0, m = this.properties[a];
|
|
189
|
+
this.filteredRows = this.filteredRows.sort(this.genericFlatTableSortComparator(m, n));
|
|
190
|
+
}
|
|
191
|
+
return !0;
|
|
192
|
+
}
|
|
193
|
+
getValueByT(e, r) {
|
|
194
|
+
return r.includes(".") ? this.getPropertyValue(e, r.split(".")) : e[r];
|
|
195
|
+
}
|
|
196
|
+
changeColumnOrder(e, r) {
|
|
197
|
+
this.arrayMove(this.properties, e, r), super.changeColumnOrder(e, r);
|
|
198
|
+
}
|
|
199
|
+
genericFlatTableSortComparator(e, r) {
|
|
200
|
+
const a = this.columnDefs.find((t) => t.property === e);
|
|
201
|
+
return (t, n) => {
|
|
202
|
+
const m = this.getValueByT(t, e), d = this.getValueByT(n, e);
|
|
203
|
+
return a != null && a.sortComparator ? r * a.sortComparator(m, d, t, n, r) : this.sorterService.genericSortComparator(m, d, r);
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
getPropertyValue(e, r) {
|
|
207
|
+
const a = r.shift(), t = e[a];
|
|
208
|
+
return t && r.length ? this.getPropertyValue(t, r) : t;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
38
211
|
class o {
|
|
39
212
|
/**
|
|
40
213
|
* Represents a constructor for a class.
|
|
@@ -75,7 +248,7 @@ class C {
|
|
|
75
248
|
this.header = e, this.body = r, this.footer = a;
|
|
76
249
|
}
|
|
77
250
|
}
|
|
78
|
-
class
|
|
251
|
+
class Ae {
|
|
79
252
|
render(e, r, a, t, n, m, d) {
|
|
80
253
|
if (n.isEditable(r, a)) {
|
|
81
254
|
d.addClass(e, "ge-table-row-input-div");
|
|
@@ -178,7 +351,7 @@ class q {
|
|
|
178
351
|
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
352
|
}
|
|
180
353
|
}
|
|
181
|
-
class
|
|
354
|
+
class Ue {
|
|
182
355
|
constructor(e = "none") {
|
|
183
356
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
|
|
184
357
|
}
|
|
@@ -215,7 +388,7 @@ class Ae {
|
|
|
215
388
|
return [this.rowIndex, this.columnIndex];
|
|
216
389
|
}
|
|
217
390
|
}
|
|
218
|
-
class
|
|
391
|
+
class re {
|
|
219
392
|
constructor(e = new w(
|
|
220
393
|
"❯",
|
|
221
394
|
"",
|
|
@@ -229,14 +402,14 @@ class ee {
|
|
|
229
402
|
}
|
|
230
403
|
// `⊖ `, `⊕ `;
|
|
231
404
|
}
|
|
232
|
-
const
|
|
405
|
+
const Me = new q(), Be = new Ue("cell");
|
|
233
406
|
class z {
|
|
234
407
|
constructor() {
|
|
235
408
|
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
409
|
header: 34,
|
|
237
410
|
body: 34,
|
|
238
411
|
footer: 34
|
|
239
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new ke(), this.headerGroupOptions = new
|
|
412
|
+
}, 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.resizeEventDebounceDelay = 500, this.getEditRenderer = (e, r) => new Ae(), this.getSelectionModel = () => Me, this.getFocusModel = () => Be;
|
|
240
413
|
}
|
|
241
414
|
}
|
|
242
415
|
const D = class D {
|
|
@@ -644,104 +817,8 @@ class y {
|
|
|
644
817
|
);
|
|
645
818
|
}
|
|
646
819
|
}
|
|
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 {
|
|
820
|
+
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");
|
|
821
|
+
class S extends ee {
|
|
745
822
|
constructor(e, r, a, t = []) {
|
|
746
823
|
super(e, t, a), this.areaIdent = e, this.arr = r, this.defaultRowHeight = a, this.columnDefs = t, this.filteredArr = [...r];
|
|
747
824
|
}
|
|
@@ -841,7 +918,7 @@ class Z {
|
|
|
841
918
|
changeColumnOrder(e, r) {
|
|
842
919
|
}
|
|
843
920
|
}
|
|
844
|
-
class
|
|
921
|
+
class $e {
|
|
845
922
|
flattenTree(e, r = []) {
|
|
846
923
|
var a;
|
|
847
924
|
for (const t of e)
|
|
@@ -852,27 +929,9 @@ class _e {
|
|
|
852
929
|
return e.parent ? e.parent.expanded ? this.isVisible(e.parent) : !1 : !0;
|
|
853
930
|
}
|
|
854
931
|
}
|
|
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 {
|
|
932
|
+
class de extends ee {
|
|
874
933
|
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
|
|
934
|
+
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
935
|
}
|
|
877
936
|
changeColumnOrder(e, r) {
|
|
878
937
|
this.arrayMove(this.properties, e, r), super.changeColumnOrder(e, r);
|
|
@@ -937,12 +996,8 @@ class de extends ae {
|
|
|
937
996
|
genericTreeTableSortComparator(e, r) {
|
|
938
997
|
const a = this.columnDefs.find((t) => t.property === e);
|
|
939
998
|
return (t, n) => {
|
|
940
|
-
if (a != null && a.sortComparator) {
|
|
941
|
-
const i = this.getValueByT(t.data, e), u = this.getValueByT(n.data, e);
|
|
942
|
-
return r * a.sortComparator(i, u, t.data, n.data);
|
|
943
|
-
}
|
|
944
999
|
const m = this.getValueByT(t.data, e), d = this.getValueByT(n.data, e);
|
|
945
|
-
return this.sorterService.genericSortComparator(m, d, r);
|
|
1000
|
+
return a != null && a.sortComparator ? r * a.sortComparator(m, d, t.data, n.data, r) : this.sorterService.genericSortComparator(m, d, r);
|
|
946
1001
|
};
|
|
947
1002
|
}
|
|
948
1003
|
expandAllRecursive(e, r) {
|
|
@@ -1044,7 +1099,7 @@ class ue {
|
|
|
1044
1099
|
this.top = e, this.right = r, this.bottom = a, this.left = t;
|
|
1045
1100
|
}
|
|
1046
1101
|
}
|
|
1047
|
-
class
|
|
1102
|
+
class Ee {
|
|
1048
1103
|
constructor() {
|
|
1049
1104
|
this.checkedRows = [];
|
|
1050
1105
|
}
|
|
@@ -1079,7 +1134,7 @@ class W {
|
|
|
1079
1134
|
constructor(e, r, a, t = 0, n = 0, m = !1, d = new R(), i = [], u = [], p = -1, c = 0, N = 400, G = () => {
|
|
1080
1135
|
}) {
|
|
1081
1136
|
var v, k, b, F;
|
|
1082
|
-
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
|
|
1137
|
+
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());
|
|
1083
1138
|
}
|
|
1084
1139
|
init() {
|
|
1085
1140
|
this.recalcSize(this.parentSize), this.overridingColumnWidth === -1 && this.calcXPositions(), this.headerAreaModel && this.headerAreaModel.init(), this.bodyAreaModel && this.bodyAreaModel.init(), this.footerAreaModel && this.footerAreaModel.init();
|
|
@@ -1465,70 +1520,7 @@ class W {
|
|
|
1465
1520
|
return this.tableScope;
|
|
1466
1521
|
}
|
|
1467
1522
|
}
|
|
1468
|
-
class
|
|
1469
|
-
constructor(e, r, a, t = []) {
|
|
1470
|
-
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);
|
|
1471
|
-
}
|
|
1472
|
-
setRows(e) {
|
|
1473
|
-
this.rows = e, this.filteredRows = [...e];
|
|
1474
|
-
}
|
|
1475
|
-
filterRowsByPredict(e) {
|
|
1476
|
-
this.rows = this.rows.filter(e), this.filteredRows = this.filteredRows.filter(e);
|
|
1477
|
-
}
|
|
1478
|
-
getRowCount() {
|
|
1479
|
-
var e;
|
|
1480
|
-
return ((e = this.filteredRows) == null ? void 0 : e.length) ?? 0;
|
|
1481
|
-
}
|
|
1482
|
-
getValueAt(e, r) {
|
|
1483
|
-
const a = this.properties[r];
|
|
1484
|
-
let t = this.filteredRows[e];
|
|
1485
|
-
return X(t) && (t = t.data), t ? this.getValueByT(t, a) : "";
|
|
1486
|
-
}
|
|
1487
|
-
getFilteredRows() {
|
|
1488
|
-
return this.filteredRows;
|
|
1489
|
-
}
|
|
1490
|
-
getAllRows() {
|
|
1491
|
-
return this.rows;
|
|
1492
|
-
}
|
|
1493
|
-
getRowHeight(e) {
|
|
1494
|
-
return this.defaultRowHeight;
|
|
1495
|
-
}
|
|
1496
|
-
getRowByIndex(e) {
|
|
1497
|
-
return this.filteredRows[e];
|
|
1498
|
-
}
|
|
1499
|
-
externalFilterChanged(e) {
|
|
1500
|
-
this.filteredRows = this.rows ? this.rows.filter(e) : [];
|
|
1501
|
-
}
|
|
1502
|
-
doSort(e) {
|
|
1503
|
-
for (const r of e) {
|
|
1504
|
-
const { columnIndex: a, sortState: t } = r, n = t === "asc" ? 1 : t === "desc" ? -1 : 0, m = this.properties[a];
|
|
1505
|
-
this.filteredRows = this.filteredRows.sort(this.genericFlatTableSortComparator(m, n));
|
|
1506
|
-
}
|
|
1507
|
-
return !0;
|
|
1508
|
-
}
|
|
1509
|
-
getValueByT(e, r) {
|
|
1510
|
-
return r.includes(".") ? this.getPropertyValue(e, r.split(".")) : e[r];
|
|
1511
|
-
}
|
|
1512
|
-
changeColumnOrder(e, r) {
|
|
1513
|
-
this.arrayMove(this.properties, e, r), super.changeColumnOrder(e, r);
|
|
1514
|
-
}
|
|
1515
|
-
genericFlatTableSortComparator(e, r) {
|
|
1516
|
-
const a = this.columnDefs.find((t) => t.property === e);
|
|
1517
|
-
return (t, n) => {
|
|
1518
|
-
if (a != null && a.sortComparator) {
|
|
1519
|
-
const i = this.getValueByT(t, e), u = this.getValueByT(n, e);
|
|
1520
|
-
return r * a.sortComparator(i, u, t, n);
|
|
1521
|
-
}
|
|
1522
|
-
const m = this.getValueByT(t, e), d = this.getValueByT(n, e);
|
|
1523
|
-
return this.sorterService.genericSortComparator(m, d, r);
|
|
1524
|
-
};
|
|
1525
|
-
}
|
|
1526
|
-
getPropertyValue(e, r) {
|
|
1527
|
-
const a = r.shift(), t = e[a];
|
|
1528
|
-
return t && r.length ? this.getPropertyValue(t, r) : t;
|
|
1529
|
-
}
|
|
1530
|
-
}
|
|
1531
|
-
class I extends Ee {
|
|
1523
|
+
class I extends De {
|
|
1532
1524
|
constructor(e, r, a, t) {
|
|
1533
1525
|
super(
|
|
1534
1526
|
e,
|
|
@@ -2248,7 +2240,7 @@ class te {
|
|
|
2248
2240
|
}
|
|
2249
2241
|
}
|
|
2250
2242
|
const E = class E {
|
|
2251
|
-
constructor(e = new
|
|
2243
|
+
constructor(e = new re()) {
|
|
2252
2244
|
this.headerGroupOptions = e;
|
|
2253
2245
|
}
|
|
2254
2246
|
render(e, r, a, t, n, m, d) {
|
|
@@ -2289,7 +2281,7 @@ const E = class E {
|
|
|
2289
2281
|
E.toggleHeaderGroup = "toggleHeaderGroup";
|
|
2290
2282
|
let J = E;
|
|
2291
2283
|
class Ce {
|
|
2292
|
-
constructor(e = "header", r, a = [], t, n = new
|
|
2284
|
+
constructor(e = "header", r, a = [], t, n = new re()) {
|
|
2293
2285
|
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();
|
|
2294
2286
|
}
|
|
2295
2287
|
init() {
|
|
@@ -5471,7 +5463,7 @@ function _r() {
|
|
|
5471
5463
|
y.create({
|
|
5472
5464
|
property: "marketCapUsd",
|
|
5473
5465
|
headerLabel: "Market Cap",
|
|
5474
|
-
width:
|
|
5466
|
+
width: Ve,
|
|
5475
5467
|
bodyClasses: ["ge-table-text-align-right"],
|
|
5476
5468
|
headerClasses: ["ge-table-text-align-right"],
|
|
5477
5469
|
bodyRenderer: r
|
|
@@ -5486,7 +5478,7 @@ function _r() {
|
|
|
5486
5478
|
y.create({
|
|
5487
5479
|
property: "circulatingSupply",
|
|
5488
5480
|
headerLabel: "Circulating Supply",
|
|
5489
|
-
width:
|
|
5481
|
+
width: ae,
|
|
5490
5482
|
bodyRenderer: n,
|
|
5491
5483
|
bodyClasses: ["ge-table-text-align-right"],
|
|
5492
5484
|
headerClasses: ["ge-table-text-align-right"]
|
|
@@ -220479,14 +220471,14 @@ function Sr() {
|
|
|
220479
220471
|
y.create({
|
|
220480
220472
|
property: "email",
|
|
220481
220473
|
headerLabel: "Email",
|
|
220482
|
-
width:
|
|
220474
|
+
width: Ie,
|
|
220483
220475
|
bodyClasses: ["ge-table-text-align-left"]
|
|
220484
220476
|
}),
|
|
220485
|
-
new y("ipAddress", "IP",
|
|
220477
|
+
new y("ipAddress", "IP", oe),
|
|
220486
220478
|
y.create({
|
|
220487
220479
|
property: "id",
|
|
220488
220480
|
headerLabel: "ID",
|
|
220489
|
-
width:
|
|
220481
|
+
width: qe,
|
|
220490
220482
|
// bodyRenderer: actionRenderer,
|
|
220491
220483
|
bodyClasses: ["ge-table-text-align-left"]
|
|
220492
220484
|
})
|
|
@@ -222731,7 +222723,7 @@ function xr() {
|
|
|
222731
222723
|
y.create({
|
|
222732
222724
|
property: "country",
|
|
222733
222725
|
headerLabel: "Country",
|
|
222734
|
-
width:
|
|
222726
|
+
width: ae,
|
|
222735
222727
|
bodyClasses: ["ge-table-text-align-left"],
|
|
222736
222728
|
headerClasses: ["ge-table-text-align-left"],
|
|
222737
222729
|
sortable: g
|
|
@@ -222762,7 +222754,7 @@ function xr() {
|
|
|
222762
222754
|
y.create({
|
|
222763
222755
|
property: "inStock",
|
|
222764
222756
|
headerLabel: "In stock",
|
|
222765
|
-
width:
|
|
222757
|
+
width: he,
|
|
222766
222758
|
bodyRenderer: new Le("inStock", !0, !0),
|
|
222767
222759
|
bodyClasses: ["ge-table-text-align-center"],
|
|
222768
222760
|
sortable: g
|
|
@@ -224373,7 +224365,7 @@ function Br(s) {
|
|
|
224373
224365
|
y.create({
|
|
224374
224366
|
property: "country",
|
|
224375
224367
|
headerLabel: "Country",
|
|
224376
|
-
width:
|
|
224368
|
+
width: ae,
|
|
224377
224369
|
bodyClasses: ["ge-table-text-align-left"],
|
|
224378
224370
|
headerClasses: ["ge-table-text-align-left"],
|
|
224379
224371
|
sortable: g,
|
|
@@ -224408,7 +224400,7 @@ function Br(s) {
|
|
|
224408
224400
|
y.create({
|
|
224409
224401
|
property: "lastVisit",
|
|
224410
224402
|
headerLabel: "Last Visit",
|
|
224411
|
-
width:
|
|
224403
|
+
width: Te,
|
|
224412
224404
|
bodyClasses: ["ge-table-text-align-center"],
|
|
224413
224405
|
sortable: g,
|
|
224414
224406
|
editable: () => s
|
|
@@ -224431,7 +224423,7 @@ function Br(s) {
|
|
|
224431
224423
|
y.create({
|
|
224432
224424
|
property: "inStock",
|
|
224433
224425
|
headerLabel: "In stock",
|
|
224434
|
-
width:
|
|
224426
|
+
width: he,
|
|
224435
224427
|
bodyRenderer: new Le("inStock", !0, !0),
|
|
224436
224428
|
bodyClasses: ["ge-table-text-align-center"],
|
|
224437
224429
|
sortable: g,
|
|
@@ -224496,7 +224488,7 @@ function Br(s) {
|
|
|
224496
224488
|
y.create({
|
|
224497
224489
|
property: "f1",
|
|
224498
224490
|
headerLabel: "F1",
|
|
224499
|
-
width:
|
|
224491
|
+
width: Se,
|
|
224500
224492
|
bodyClasses: ["ge-table-text-align-right"],
|
|
224501
224493
|
bodyRenderer: new Je(),
|
|
224502
224494
|
sortable: g,
|
|
@@ -386439,12 +386431,12 @@ function Vr(s = !1) {
|
|
|
386439
386431
|
}
|
|
386440
386432
|
function Hr() {
|
|
386441
386433
|
return [
|
|
386442
|
-
new y("lastName", "Last Name",
|
|
386434
|
+
new y("lastName", "Last Name", Te),
|
|
386443
386435
|
new y("preName", "Pre Name", L),
|
|
386444
386436
|
y.create({
|
|
386445
386437
|
property: "age",
|
|
386446
386438
|
headerLabel: "Age",
|
|
386447
|
-
width:
|
|
386439
|
+
width: Se,
|
|
386448
386440
|
bodyRenderer: new Ye(),
|
|
386449
386441
|
editable: g,
|
|
386450
386442
|
// editInputPipe: (value: any) => value ? Number(value) : ""
|
|
@@ -386460,7 +386452,7 @@ function Hr() {
|
|
|
386460
386452
|
y.create({
|
|
386461
386453
|
property: "gender",
|
|
386462
386454
|
headerLabel: " ",
|
|
386463
|
-
width:
|
|
386455
|
+
width: _e,
|
|
386464
386456
|
bodyRenderer: new Pe(),
|
|
386465
386457
|
editable: g,
|
|
386466
386458
|
getEditRenderer: () => new ne([
|
|
@@ -386468,8 +386460,8 @@ function Hr() {
|
|
|
386468
386460
|
new Y("male", "♂")
|
|
386469
386461
|
])
|
|
386470
386462
|
}),
|
|
386471
|
-
new y("address.street", "Strasse",
|
|
386472
|
-
new y("address.number", "Nr",
|
|
386463
|
+
new y("address.street", "Strasse", oe),
|
|
386464
|
+
new y("address.number", "Nr", He),
|
|
386473
386465
|
new y("address.zip", "Zip", x),
|
|
386474
386466
|
new y("address.city", "City", L),
|
|
386475
386467
|
new y("address.country", "Country", L),
|
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.61",
|
|
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.61"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "^20.11.17",
|