@stemy/ngx-utils 19.0.6 → 19.0.8

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.
@@ -3386,7 +3386,7 @@ class StaticLanguageService {
3386
3386
  if (!expr || !params)
3387
3387
  return expr;
3388
3388
  return expr.replace(/{{\s?([^{}\s]*)\s?}}/g, (substring, b) => {
3389
- const r = ObjectUtils.getValue(params, b);
3389
+ const r = ObjectUtils.getValue(params, b, "");
3390
3390
  return ObjectUtils.isDefined(r) ? r : substring;
3391
3391
  });
3392
3392
  }
@@ -5434,6 +5434,11 @@ class DynamicTableComponent {
5434
5434
  }, {});
5435
5435
  this.cols = Object.keys(this.realColumns);
5436
5436
  this.orderBy = this.orderBy in this.realColumns ? this.orderBy : this.cols[0];
5437
+ this.query = this.cols.reduce((res, c) => {
5438
+ const col = this.realColumns[c];
5439
+ res[c] = col.filterType == "checkbox" ? false : "";
5440
+ return res;
5441
+ }, {});
5437
5442
  }
5438
5443
  this.hasQuery = this.cols.some(col => this.realColumns[col].filter);
5439
5444
  if (changes.orderBy && this.realColumns) {
@@ -5457,12 +5462,18 @@ class DynamicTableComponent {
5457
5462
  this.orderBy = column;
5458
5463
  this.refresh();
5459
5464
  }
5460
- updateQuery(col, value) {
5461
- if (!value) {
5462
- delete this.query[col];
5465
+ updateQuery(c, value) {
5466
+ const col = this.realColumns[c];
5467
+ if (!col)
5468
+ return;
5469
+ if (col.filterType === "checkbox") {
5470
+ this.query[c] = !this.query[c];
5471
+ }
5472
+ else if (!value) {
5473
+ delete this.query[c];
5463
5474
  }
5464
5475
  else {
5465
- this.query[col] = value;
5476
+ this.query[c] = value;
5466
5477
  }
5467
5478
  this.refresh(this.filterTime ?? 300);
5468
5479
  }