@guiexpert/table 1.1.51 → 1.1.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js
CHANGED
|
@@ -132,8 +132,7 @@ class Bt {
|
|
|
132
132
|
} else
|
|
133
133
|
u = " bodyRenderer: new SimpleArrayCellRenderer(),";
|
|
134
134
|
d = 250;
|
|
135
|
-
} else
|
|
136
|
-
n.type === ae ? (u = " bodyRenderer: new NumberCellRenderer(),", f = "ge-table-text-align-right") : n.type === ce && (u = " bodyRenderer: new TrueFalseCellRenderer(),", f = "ge-table-text-align-center", d = 80);
|
|
135
|
+
} else n.type === ae ? (u = " bodyRenderer: new NumberCellRenderer(),", f = "ge-table-text-align-right") : n.type === ce && (u = " bodyRenderer: new TrueFalseCellRenderer(),", f = "ge-table-text-align-center", d = 80);
|
|
137
136
|
e.push(` ColumnDef.create({
|
|
138
137
|
property: "${l}",
|
|
139
138
|
headerLabel: "${c}",
|
|
@@ -276,8 +275,7 @@ function Ye(h) {
|
|
|
276
275
|
return e.includes(ye) || (e = e + ye), e;
|
|
277
276
|
}
|
|
278
277
|
function Ke(h) {
|
|
279
|
-
if (!h || h.length === 0)
|
|
280
|
-
return h;
|
|
278
|
+
if (!h || h.length === 0) return h;
|
|
281
279
|
const e = ["Array", "Arr", "List", "s"];
|
|
282
280
|
for (const t of e)
|
|
283
281
|
if (h.endsWith(t))
|
|
@@ -521,8 +519,7 @@ class Ht {
|
|
|
521
519
|
n = !0;
|
|
522
520
|
for (const c of o.propertyItem.types)
|
|
523
521
|
a.items.push(c);
|
|
524
|
-
} else
|
|
525
|
-
a instanceof D && (n = !0, a.properties.push(o.propertyItem));
|
|
522
|
+
} else a instanceof D && (n = !0, a.properties.push(o.propertyItem));
|
|
526
523
|
}
|
|
527
524
|
if (!n)
|
|
528
525
|
for (const a of o.propertyItem.types)
|
|
@@ -589,11 +586,10 @@ class Ht {
|
|
|
589
586
|
const d = r ? `${r}/${c}` : c;
|
|
590
587
|
o(i[c], d, a);
|
|
591
588
|
}
|
|
592
|
-
} else
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
});
|
|
589
|
+
} else Array.isArray(i) && i.forEach((c, d) => {
|
|
590
|
+
const u = `${r}/[]`;
|
|
591
|
+
o(c, u, a);
|
|
592
|
+
});
|
|
597
593
|
};
|
|
598
594
|
return o(e, "root", t), s.sort((i, r) => i.path.localeCompare(r.path));
|
|
599
595
|
}
|
|
@@ -623,8 +619,7 @@ class Vt {
|
|
|
623
619
|
}
|
|
624
620
|
}
|
|
625
621
|
renderTypeScriptInterfacesRecursive(e = this.rootPropertyType, t = [], s = this.rootName) {
|
|
626
|
-
if (!e)
|
|
627
|
-
return t;
|
|
622
|
+
if (!e) return t;
|
|
628
623
|
if (e instanceof B) {
|
|
629
624
|
for (const o of e.items)
|
|
630
625
|
if (this.renderTypeScriptInterfacesRecursive(o, t, s), o instanceof D) {
|
|
@@ -654,10 +649,8 @@ class Vt {
|
|
|
654
649
|
}
|
|
655
650
|
propertyItem2InterfaceDateType(e) {
|
|
656
651
|
var s, o;
|
|
657
|
-
if (((s = e.types) == null ? void 0 : s.length) === 0)
|
|
658
|
-
|
|
659
|
-
if (((o = e.types) == null ? void 0 : o.length) === 1)
|
|
660
|
-
return this.renderType(e.types[0], e);
|
|
652
|
+
if (((s = e.types) == null ? void 0 : s.length) === 0) return "any";
|
|
653
|
+
if (((o = e.types) == null ? void 0 : o.length) === 1) return this.renderType(e.types[0], e);
|
|
661
654
|
const t = e.types.map((i) => this.renderType(i, e)).filter((i) => i !== z).sort((i, r) => K.includes(i) ? 100 : K.includes(r) ? -100 : i.localeCompare(r)).join(this.orOperator);
|
|
662
655
|
return t.includes(this.orOperator) ? "(" + t + ")" : t;
|
|
663
656
|
}
|
|
@@ -670,8 +663,7 @@ class Vt {
|
|
|
670
663
|
}
|
|
671
664
|
containsUndefinedPropertyType(e) {
|
|
672
665
|
for (const t of e.types)
|
|
673
|
-
if (t.type === z)
|
|
674
|
-
return !0;
|
|
666
|
+
if (t.type === z) return !0;
|
|
675
667
|
return !1;
|
|
676
668
|
}
|
|
677
669
|
}
|
|
@@ -1908,26 +1900,17 @@ class lt extends rt {
|
|
|
1908
1900
|
*/
|
|
1909
1901
|
getArea(e, t) {
|
|
1910
1902
|
if (e === "header") {
|
|
1911
|
-
if (t === "west")
|
|
1912
|
-
|
|
1913
|
-
if (t === "
|
|
1914
|
-
return this.areaHeaderCenter;
|
|
1915
|
-
if (t === "east")
|
|
1916
|
-
return this.areaHeaderEast;
|
|
1903
|
+
if (t === "west") return this.areaHeaderWest;
|
|
1904
|
+
if (t === "center") return this.areaHeaderCenter;
|
|
1905
|
+
if (t === "east") return this.areaHeaderEast;
|
|
1917
1906
|
} else if (e === "body") {
|
|
1918
|
-
if (t === "west")
|
|
1919
|
-
|
|
1920
|
-
if (t === "
|
|
1921
|
-
return this.areaBodyCenter;
|
|
1922
|
-
if (t === "east")
|
|
1923
|
-
return this.areaBodyEast;
|
|
1907
|
+
if (t === "west") return this.areaBodyWest;
|
|
1908
|
+
if (t === "center") return this.areaBodyCenter;
|
|
1909
|
+
if (t === "east") return this.areaBodyEast;
|
|
1924
1910
|
} else if (e === "footer") {
|
|
1925
|
-
if (t === "west")
|
|
1926
|
-
|
|
1927
|
-
if (t === "
|
|
1928
|
-
return this.areaFooterCenter;
|
|
1929
|
-
if (t === "east")
|
|
1930
|
-
return this.areaFooterEast;
|
|
1911
|
+
if (t === "west") return this.areaFooterWest;
|
|
1912
|
+
if (t === "center") return this.areaFooterCenter;
|
|
1913
|
+
if (t === "east") return this.areaFooterEast;
|
|
1931
1914
|
}
|
|
1932
1915
|
throw Error(`Wrong area identifier: row:${e}, col:${t}`);
|
|
1933
1916
|
}
|
|
@@ -1953,8 +1936,7 @@ class lt extends rt {
|
|
|
1953
1936
|
var s;
|
|
1954
1937
|
if (e) {
|
|
1955
1938
|
const o = (s = e.closest("[" + t + "]")) == null ? void 0 : s.getAttribute(t);
|
|
1956
|
-
if (o)
|
|
1957
|
-
return Number(o);
|
|
1939
|
+
if (o) return Number(o);
|
|
1958
1940
|
}
|
|
1959
1941
|
return -1;
|
|
1960
1942
|
}
|
|
@@ -1970,8 +1952,7 @@ class lt extends rt {
|
|
|
1970
1952
|
var s;
|
|
1971
1953
|
if (e) {
|
|
1972
1954
|
const o = (s = e.closest("[" + t + "]")) == null ? void 0 : s.getAttribute(t);
|
|
1973
|
-
if (o)
|
|
1974
|
-
return o;
|
|
1955
|
+
if (o) return o;
|
|
1975
1956
|
}
|
|
1976
1957
|
return "";
|
|
1977
1958
|
}
|
|
@@ -4933,12 +4914,11 @@ class _ {
|
|
|
4933
4914
|
e.columnDefs,
|
|
4934
4915
|
e.defaultRowHeights.body
|
|
4935
4916
|
);
|
|
4936
|
-
else
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
) : e.bodyAreaModel = new F("body");
|
|
4917
|
+
else e.bodyData ? e.bodyAreaModel = new P(
|
|
4918
|
+
"body",
|
|
4919
|
+
e.bodyData,
|
|
4920
|
+
e.defaultRowHeights.body
|
|
4921
|
+
) : e.bodyAreaModel = new F("body");
|
|
4942
4922
|
return e.fixedLeftColumnCount === void 0 && (e.fixedLeftColumnCount = 0), e.fixedRightColumnCount === void 0 && (e.fixedRightColumnCount = 0), e.rowCheckboxVisible === void 0 && (e.rowCheckboxVisible = !1), e.overridingColumnWidth === void 0 && (e.overridingColumnWidth = -1), !e.getSelectionModel && ((p = e.tableOptions) != null && p.getSelectionModel) && (e.getSelectionModel = (m = e.tableOptions) == null ? void 0 : m.getSelectionModel), new se(
|
|
4943
4923
|
e.headerAreaModel,
|
|
4944
4924
|
e.bodyAreaModel,
|
|
@@ -6328,8 +6308,7 @@ class Lt {
|
|
|
6328
6308
|
<td>${r ?? ""}</td>
|
|
6329
6309
|
</tr>`;
|
|
6330
6310
|
for (const i in e) {
|
|
6331
|
-
if (!e.hasOwnProperty(i))
|
|
6332
|
-
continue;
|
|
6311
|
+
if (!e.hasOwnProperty(i)) continue;
|
|
6333
6312
|
const r = e[i], n = this.getCombinedKey(t, i), l = this.getLabel(n);
|
|
6334
6313
|
typeof r == "object" && r !== null ? (s.push(o(l, null, !0)), s.push(this.generateTableRows(r, n))) : s.push(o(l, String(r)));
|
|
6335
6314
|
}
|
|
@@ -6365,8 +6344,7 @@ class oe {
|
|
|
6365
6344
|
generateForm(e, t = "") {
|
|
6366
6345
|
const s = [];
|
|
6367
6346
|
for (const o in e) {
|
|
6368
|
-
if (!e.hasOwnProperty(o) || this.idKey === o)
|
|
6369
|
-
continue;
|
|
6347
|
+
if (!e.hasOwnProperty(o) || this.idKey === o) continue;
|
|
6370
6348
|
const i = this.getCombinedKey(t, o), r = this.getLabel(i), n = e[o];
|
|
6371
6349
|
if (typeof n == "object" && n !== null)
|
|
6372
6350
|
s.push(this.generateForm(n, i));
|
|
@@ -13,9 +13,6 @@ import { editInputPipe } from "../../../renderer/edit/edit-input-pipe.if";
|
|
|
13
13
|
* If the result is positive, it means 'valueB' comes before 'valueA' in the sorted order.
|
|
14
14
|
* If the result is zero, it means the two values are considered equal for sorting purposes.
|
|
15
15
|
*
|
|
16
|
-
* @typeparam T The type of values being compared.
|
|
17
|
-
* @typeparam U The type of row objects that contain the values.
|
|
18
|
-
*
|
|
19
16
|
* @param valueA The first value to be compared.
|
|
20
17
|
* @param valueB The second value to be compared.
|
|
21
18
|
* @param rowA Optional. The row object containing valueA.
|
|
@@ -23,7 +20,7 @@ import { editInputPipe } from "../../../renderer/edit/edit-input-pipe.if";
|
|
|
23
20
|
*
|
|
24
21
|
* @returns A number indicating the relative order of 'valueA' and 'valueB'.
|
|
25
22
|
*/
|
|
26
|
-
export type ValueRowSortComparator =
|
|
23
|
+
export type ValueRowSortComparator = (valueA: any, valueB: any, rowA?: any, rowB?: any) => number;
|
|
27
24
|
/**
|
|
28
25
|
* Represents a column definition of one table column.
|
|
29
26
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guiexpert/table",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.56",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "^20.11.17",
|
|
25
|
-
"vite": "
|
|
25
|
+
"vite": "6.3.4",
|
|
26
26
|
"vite-plugin-dts": "^3.7.2",
|
|
27
27
|
"vite-plugin-eslint": "^1.8.1",
|
|
28
28
|
"vite-plugin-static-copy": "^0.17.0",
|