@stemy/ngx-utils 19.9.53 → 19.9.54

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.
@@ -725,7 +725,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
725
725
  }] }, { type: i1.DeviceDetectorService }] });
726
726
 
727
727
  const emptySnapshot = new ActivatedRouteSnapshot();
728
- const emptyData = { id: "" };
728
+ const emptyData$1 = { id: "" };
729
729
  const emptyParams = {};
730
730
  const emptySegments = [];
731
731
  const emptyComponents = [];
@@ -747,7 +747,7 @@ class StateService {
747
747
  return this.snapshot.routeConfig;
748
748
  }
749
749
  get data() {
750
- return this.snapshot.data || emptyData;
750
+ return this.snapshot.data || emptyData$1;
751
751
  }
752
752
  get params() {
753
753
  return this.snapshot.params || emptyParams;
@@ -7317,12 +7317,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
7317
7317
  type: Input
7318
7318
  }] } });
7319
7319
 
7320
+ const emptyData = [];
7320
7321
  class PaginationDirective {
7321
7322
  get total() {
7322
7323
  return this.data ? this.data.total : 0;
7323
7324
  }
7324
7325
  get items() {
7325
- return this.data ? this.data.items : [];
7326
+ return this.data ? this.data.items : emptyData;
7326
7327
  }
7327
7328
  constructor(zone, renderer, element) {
7328
7329
  this.zone = zone;
@@ -7342,8 +7343,10 @@ class PaginationDirective {
7342
7343
  this.refresh();
7343
7344
  }
7344
7345
  refresh(time) {
7345
- this.renderer.addClass(this.element.nativeElement, "loading");
7346
7346
  time = isNaN(time) || time <= 0 ? this.updateTime : time;
7347
+ this.renderer.addClass(this.element.nativeElement, "loading");
7348
+ this.data = null;
7349
+ this.onRefresh.emit();
7347
7350
  this.updateTimer.time = isNaN(time) || time <= 0 ? 350 : time;
7348
7351
  Promise.resolve(this.waitFor).then(() => {
7349
7352
  this.updateTimer.run();