@universis/ngx-tables 6.13.8 → 6.14.0

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/README.md CHANGED
@@ -62,7 +62,7 @@ and load a table configuration:
62
62
  "criteria": [
63
63
  {
64
64
  "name": "studentName",
65
- "filter": "(indexof(person/familyName, '${value}') ge 0 or indexof(person/givenName, '${value}') ge 0)",
65
+ "filter": "(indexof(person/familyName, '${value}') ge 0 or indexof(person/givenName, '${value}') ge 0 or indexof(concat(person/familyName, ' ', person/givenName),'${value}') ge 0)",
66
66
  "type": "text"
67
67
  },
68
68
  {
@@ -2044,7 +2044,7 @@
2044
2044
  return (Number(String(Math.random()).slice(2))).toString(36);
2045
2045
  }
2046
2046
  var AdvancedTableComponent = /** @class */ (function () {
2047
- function AdvancedTableComponent(_context, _columnFormatters, _activatedRoute, _translateService, _injector, _advancedFilterValueProvider, _element, _template, _loading, _http, _columnSelector, _configuration, _exportSpreadsheet, _modalService, _errorService, _viewContainerRef) {
2047
+ function AdvancedTableComponent(_context, _columnFormatters, _activatedRoute, _translateService, _injector, _advancedFilterValueProvider, _element, _template, _loading, _http, _columnSelector, _configuration, _exportSpreadsheet, _modalService, _errorService, _viewContainerRef, _errorHandler) {
2048
2048
  var _this = this;
2049
2049
  this._context = _context;
2050
2050
  this._columnFormatters = _columnFormatters;
@@ -2062,6 +2062,7 @@
2062
2062
  this._modalService = _modalService;
2063
2063
  this._errorService = _errorService;
2064
2064
  this._viewContainerRef = _viewContainerRef;
2065
+ this._errorHandler = _errorHandler;
2065
2066
  this._firstLoad = true;
2066
2067
  this._showFooter = false;
2067
2068
  this._showHeader = true;
@@ -3428,7 +3429,11 @@
3428
3429
  return;
3429
3430
  }
3430
3431
  /** @type {?} */
3431
- var q = this._context.model(this.config.model).asQueryable();
3432
+ var queryModel = this._query && this._query.getModel();
3433
+ /** @type {?} */
3434
+ var model = queryModel ? queryModel : this.config.model;
3435
+ /** @type {?} */
3436
+ var q = this._context.model(model).asQueryable();
3432
3437
  Object.keys(this.lastQueryParams).forEach(function (key) {
3433
3438
  q.setParam(key, _this.lastQueryParams && _this.lastQueryParams[key]);
3434
3439
  });
@@ -3624,6 +3629,19 @@
3624
3629
  }
3625
3630
  if (err) {
3626
3631
  this.lastError = err;
3632
+ if (typeof err.status === 'number') {
3633
+ if (this._errorHandler) {
3634
+ // a backward compatibility assignment of rejection property
3635
+ // following @universis/common#ErrorsHandler.handleError contract
3636
+ Object.assign(err, {
3637
+ rejection: {
3638
+ status: err.status,
3639
+ statusText: err.statusText
3640
+ }
3641
+ });
3642
+ this._errorHandler.handleError(err);
3643
+ }
3644
+ }
3627
3645
  if (innerMessage) {
3628
3646
  innerMessage.innerHTML = err.error && err.error.message ? err.error.message : err.message;
3629
3647
  }
@@ -3984,7 +4002,8 @@
3984
4002
  { type: i2.ExportSpreadsheetService },
3985
4003
  { type: i2.ModalService },
3986
4004
  { type: i2.ErrorService },
3987
- { type: i0.ViewContainerRef }
4005
+ { type: i0.ViewContainerRef },
4006
+ { type: i0.ErrorHandler, decorators: [{ type: i0.Optional }] }
3988
4007
  ];
3989
4008
  };
3990
4009
  AdvancedTableComponent.propDecorators = {