@guiexpert/demo-table-models 1.0.45 → 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.
Files changed (3) hide show
  1. package/index.cjs +3 -3
  2. package/index.js +23 -16
  3. package/package.json +3 -3
package/index.js CHANGED
@@ -935,9 +935,14 @@ class de extends ae {
935
935
  return !1;
936
936
  }
937
937
  genericTreeTableSortComparator(e, r) {
938
- return (a, t) => {
939
- const n = this.getValueByT(a.data, e), m = this.getValueByT(t.data, e);
940
- return this.sorterService.genericSortComparator(n, m, r);
938
+ const a = this.columnDefs.find((t) => t.property === e);
939
+ 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
+ const m = this.getValueByT(t.data, e), d = this.getValueByT(n.data, e);
945
+ return this.sorterService.genericSortComparator(m, d, r);
941
946
  };
942
947
  }
943
948
  expandAllRecursive(e, r) {
@@ -1508,9 +1513,14 @@ class Ee extends ae {
1508
1513
  this.arrayMove(this.properties, e, r), super.changeColumnOrder(e, r);
1509
1514
  }
1510
1515
  genericFlatTableSortComparator(e, r) {
1511
- return (a, t) => {
1512
- const n = this.getValueByT(a, e), m = this.getValueByT(t, e);
1513
- return this.sorterService.genericSortComparator(n, m, 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);
1514
1524
  };
1515
1525
  }
1516
1526
  getPropertyValue(e, r) {
@@ -1616,12 +1626,11 @@ class f {
1616
1626
  e.columnDefs,
1617
1627
  e.defaultRowHeights.body
1618
1628
  );
1619
- else
1620
- e.bodyData ? e.bodyAreaModel = new S(
1621
- "body",
1622
- e.bodyData,
1623
- e.defaultRowHeights.body
1624
- ) : e.bodyAreaModel = new Z("body");
1629
+ else e.bodyData ? e.bodyAreaModel = new S(
1630
+ "body",
1631
+ e.bodyData,
1632
+ e.defaultRowHeights.body
1633
+ ) : e.bodyAreaModel = new Z("body");
1625
1634
  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 && ((v = e.tableOptions) != null && v.getSelectionModel) && (e.getSelectionModel = (k = e.tableOptions) == null ? void 0 : k.getSelectionModel), new W(
1626
1635
  e.headerAreaModel,
1627
1636
  e.bodyAreaModel,
@@ -220094,8 +220103,7 @@ class fr extends te {
220094
220103
  return;
220095
220104
  r--;
220096
220105
  const a = Q[r], t = H[e];
220097
- if (!P[a] || !P[a][t])
220098
- return;
220106
+ if (!P[a] || !P[a][t]) return;
220099
220107
  const n = P[a][t].temperature, m = new K(67, 1, 84), d = new K(31, 144, 141), i = new K(250, 230, 37), u = (Ne + be) / 2, p = new er(be, m, u, d, Ne, i);
220100
220108
  return {
220101
220109
  background: U.getThreeColorGradientRGB(n, p),
@@ -222870,8 +222878,7 @@ class Ar extends te {
222870
222878
  return r === 0 ? "id" + e : r === 1 ? this.nf.format(e) : e;
222871
222879
  }
222872
222880
  getCellRenderer(e, r) {
222873
- if (r == 2)
222874
- return this.barRenderer;
222881
+ if (r == 2) return this.barRenderer;
222875
222882
  }
222876
222883
  getYPosByRowIndex(e) {
222877
222884
  return e * this.getRowHeight(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guiexpert/demo-table-models",
3
- "version": "1.0.45",
3
+ "version": "1.1.56",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -18,11 +18,11 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "tslib": "^2.3.0",
21
- "@guiexpert/table": "^1.1.50"
21
+ "@guiexpert/table": "^1.1.56"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/node": "^20.11.17",
25
- "vite": "^5.1.1",
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",