@webtypen/webframez-core 0.3.106 → 0.3.108

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.
@@ -435,10 +435,11 @@ class Datatable {
435
435
  log("[DATATABLE_AGGREGATION" + (req.body._table ? "-" + req.body._table : "") + "]", aggr);
436
436
  }
437
437
  const connection = yield DBConnection_1.DBConnection.getConnection();
438
+ const collation = typeof this.collation === "function" ? yield this.collation(req) : this.collation;
438
439
  const results = yield DBConnection_1.DBConnection.documentStore(connection)
439
440
  .collection(yield this.getCollection(req))
440
441
  .aggregate(aggr, {
441
- collation: typeof this.collation === "function" ? yield this.collation(req) : this.collation,
442
+ collation,
442
443
  })
443
444
  .toArray();
444
445
  const sumsAfter = [];
@@ -457,7 +458,7 @@ class Datatable {
457
458
  }
458
459
  const stats = yield DBConnection_1.DBConnection.documentStore(connection)
459
460
  .collection(yield this.getCollection(req))
460
- .aggregate([...(aggregationStats ? aggregationStats : []), statsGroup])
461
+ .aggregate([...(aggregationStats ? aggregationStats : []), statsGroup], { collation })
461
462
  .toArray();
462
463
  if (this.onRow || this.onAttributes) {
463
464
  for (let i in results) {
@@ -553,10 +554,9 @@ class Datatable {
553
554
  if (!this.columns) {
554
555
  return null;
555
556
  }
556
- if (typeof this.columns === "function") {
557
- return yield this.columns(req);
558
- }
559
- return this.columns;
557
+ const columns = typeof this.columns === "function" ? yield this.columns(req) : this.columns;
558
+ // Conditional definitions are absent columns, including for saved layouts and display options.
559
+ return columns ? Object.fromEntries(Object.entries(columns).filter(([, column]) => column != null && column !== false)) : columns;
560
560
  });
561
561
  }
562
562
  getOnPressLink(req) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webtypen/webframez-core",
3
- "version": "0.3.106",
3
+ "version": "0.3.108",
4
4
  "description": "The core package of the typescript based webframez (web-framework) by webtypen.de",
5
5
  "homepage": "https://webtypen.de/",
6
6
  "license": "MIT",