@universis/ngx-tables 6.13.9 → 6.14.2

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.
@@ -23,7 +23,7 @@ import { BsModalRef, BsModalService, ModalModule } from 'ngx-bootstrap/modal';
23
23
  import { ProgressbarModule } from 'ngx-bootstrap/progressbar';
24
24
  import { GroupByPipe, NgPipesModule } from 'ngx-pipes';
25
25
  import { template, at, cloneDeep, isEmpty } from 'lodash';
26
- import { Injectable, Directive, Optional, Input, Output, EventEmitter, Component, ElementRef, ViewChild, ViewEncapsulation, Pipe, ChangeDetectorRef, NgModule, CUSTOM_ELEMENTS_SCHEMA, defineInjectable, inject, HostListener, InjectionToken, Inject, Injector, ViewContainerRef, ChangeDetectionStrategy } from '@angular/core';
26
+ import { Injectable, Directive, Optional, Input, Output, EventEmitter, Component, ElementRef, ViewChild, ViewEncapsulation, Pipe, ChangeDetectorRef, NgModule, CUSTOM_ELEMENTS_SCHEMA, defineInjectable, inject, HostListener, 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';
@@ -1421,8 +1421,9 @@ class AdvancedTableComponent {
1421
1421
  * @param {?} _modalService
1422
1422
  * @param {?} _errorService
1423
1423
  * @param {?} _viewContainerRef
1424
+ * @param {?} _errorHandler
1424
1425
  */
1425
- constructor(_context, _columnFormatters, _activatedRoute, _translateService, _injector, _advancedFilterValueProvider, _element, _template, _loading, _http, _columnSelector, _configuration, _exportSpreadsheet, _modalService, _errorService, _viewContainerRef) {
1426
+ constructor(_context, _columnFormatters, _activatedRoute, _translateService, _injector, _advancedFilterValueProvider, _element, _template, _loading, _http, _columnSelector, _configuration, _exportSpreadsheet, _modalService, _errorService, _viewContainerRef, _errorHandler) {
1426
1427
  this._context = _context;
1427
1428
  this._columnFormatters = _columnFormatters;
1428
1429
  this._activatedRoute = _activatedRoute;
@@ -1439,6 +1440,7 @@ class AdvancedTableComponent {
1439
1440
  this._modalService = _modalService;
1440
1441
  this._errorService = _errorService;
1441
1442
  this._viewContainerRef = _viewContainerRef;
1443
+ this._errorHandler = _errorHandler;
1442
1444
  this._firstLoad = true;
1443
1445
  this._showFooter = false;
1444
1446
  this._showHeader = true;
@@ -2879,6 +2881,19 @@ class AdvancedTableComponent {
2879
2881
  }
2880
2882
  if (err) {
2881
2883
  this.lastError = err;
2884
+ if (typeof err.status === 'number') {
2885
+ if (this._errorHandler) {
2886
+ // a backward compatibility assignment of rejection property
2887
+ // following @universis/common#ErrorsHandler.handleError contract
2888
+ Object.assign(err, {
2889
+ rejection: {
2890
+ status: err.status,
2891
+ statusText: err.statusText
2892
+ }
2893
+ });
2894
+ this._errorHandler.handleError(err);
2895
+ }
2896
+ }
2882
2897
  if (innerMessage) {
2883
2898
  innerMessage.innerHTML = err.error && err.error.message ? err.error.message : err.message;
2884
2899
  }
@@ -3222,7 +3237,8 @@ AdvancedTableComponent.ctorParameters = () => [
3222
3237
  { type: ExportSpreadsheetService },
3223
3238
  { type: ModalService },
3224
3239
  { type: ErrorService },
3225
- { type: ViewContainerRef }
3240
+ { type: ViewContainerRef },
3241
+ { type: ErrorHandler, decorators: [{ type: Optional }] }
3226
3242
  ];
3227
3243
  AdvancedTableComponent.propDecorators = {
3228
3244
  table: [{ type: ViewChild, args: ['table',] }],
@@ -3319,7 +3335,7 @@ class AdvancedListComponent {
3319
3335
  /**
3320
3336
  * @return {?}
3321
3337
  */
3322
- ngOnInit() {
3338
+ ngAfterViewInit() {
3323
3339
  return __awaiter(this, void 0, void 0, function* () {
3324
3340
  try {
3325
3341
  if (this.table == null) {