@universis/ngx-tables 6.13.9 → 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.
@@ -22,8 +22,8 @@ import { BsModalRef, BsModalService, ModalModule } from 'ngx-bootstrap/modal';
22
22
  import { ProgressbarModule } from 'ngx-bootstrap/progressbar';
23
23
  import { GroupByPipe, NgPipesModule } from 'ngx-pipes';
24
24
  import { template, at, cloneDeep, isEmpty } from 'lodash';
25
- import { __extends, __values, __awaiter, __generator, __assign, __spread } from 'tslib';
26
- import { Injectable, Directive, Optional, Input, Component, ElementRef, ViewChild, ViewEncapsulation, EventEmitter, Output, Pipe, NgModule, CUSTOM_ELEMENTS_SCHEMA, defineInjectable, inject, HostListener, ChangeDetectorRef, InjectionToken, Inject, Injector, ViewContainerRef, ChangeDetectionStrategy } from '@angular/core';
25
+ import { __extends, __awaiter, __generator, __values, __spread, __assign } from 'tslib';
26
+ import { Injectable, Directive, Optional, Input, Component, EventEmitter, Output, Pipe, ElementRef, ViewChild, ViewEncapsulation, defineInjectable, inject, NgModule, CUSTOM_ELEMENTS_SCHEMA, HostListener, ChangeDetectorRef, InjectionToken, Inject, Injector, ViewContainerRef, ErrorHandler, ChangeDetectionStrategy } from '@angular/core';
27
27
  import { ActivatedRoute, Router, NavigationStart, NavigationEnd, RouterModule } from '@angular/router';
28
28
  import { createFeatureSelector, createSelector, select, Store } from '@ngrx/store';
29
29
  import { skip, first, filter } from 'rxjs/operators';
@@ -1832,7 +1832,7 @@ function getRandomIdentifier() {
1832
1832
  return (Number(String(Math.random()).slice(2))).toString(36);
1833
1833
  }
1834
1834
  var AdvancedTableComponent = /** @class */ (function () {
1835
- function AdvancedTableComponent(_context, _columnFormatters, _activatedRoute, _translateService, _injector, _advancedFilterValueProvider, _element, _template, _loading, _http, _columnSelector, _configuration, _exportSpreadsheet, _modalService, _errorService, _viewContainerRef) {
1835
+ function AdvancedTableComponent(_context, _columnFormatters, _activatedRoute, _translateService, _injector, _advancedFilterValueProvider, _element, _template, _loading, _http, _columnSelector, _configuration, _exportSpreadsheet, _modalService, _errorService, _viewContainerRef, _errorHandler) {
1836
1836
  var _this = this;
1837
1837
  this._context = _context;
1838
1838
  this._columnFormatters = _columnFormatters;
@@ -1850,6 +1850,7 @@ var AdvancedTableComponent = /** @class */ (function () {
1850
1850
  this._modalService = _modalService;
1851
1851
  this._errorService = _errorService;
1852
1852
  this._viewContainerRef = _viewContainerRef;
1853
+ this._errorHandler = _errorHandler;
1853
1854
  this._firstLoad = true;
1854
1855
  this._showFooter = false;
1855
1856
  this._showHeader = true;
@@ -3431,6 +3432,19 @@ var AdvancedTableComponent = /** @class */ (function () {
3431
3432
  }
3432
3433
  if (err) {
3433
3434
  this.lastError = err;
3435
+ if (typeof err.status === 'number') {
3436
+ if (this._errorHandler) {
3437
+ // a backward compatibility assignment of rejection property
3438
+ // following @universis/common#ErrorsHandler.handleError contract
3439
+ Object.assign(err, {
3440
+ rejection: {
3441
+ status: err.status,
3442
+ statusText: err.statusText
3443
+ }
3444
+ });
3445
+ this._errorHandler.handleError(err);
3446
+ }
3447
+ }
3434
3448
  if (innerMessage) {
3435
3449
  innerMessage.innerHTML = err.error && err.error.message ? err.error.message : err.message;
3436
3450
  }
@@ -3789,7 +3803,8 @@ var AdvancedTableComponent = /** @class */ (function () {
3789
3803
  { type: ExportSpreadsheetService },
3790
3804
  { type: ModalService },
3791
3805
  { type: ErrorService },
3792
- { type: ViewContainerRef }
3806
+ { type: ViewContainerRef },
3807
+ { type: ErrorHandler, decorators: [{ type: Optional }] }
3793
3808
  ]; };
3794
3809
  AdvancedTableComponent.propDecorators = {
3795
3810
  table: [{ type: ViewChild, args: ['table',] }],