@ts-core/angular 13.1.7 → 13.1.10

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.
@@ -2571,18 +2571,20 @@ class LanguagePipe extends DestroyableContainer {
2571
2571
  // Constructor
2572
2572
  //
2573
2573
  // --------------------------------------------------------------------------
2574
- constructor(language) {
2574
+ constructor(detection, language) {
2575
2575
  super();
2576
+ this.detection = detection;
2576
2577
  this.language = language;
2577
2578
  // --------------------------------------------------------------------------
2578
2579
  //
2579
2580
  // Private Methods
2580
2581
  //
2581
2582
  // --------------------------------------------------------------------------
2582
- this.valueUpdate = () => {
2583
- this._value = this.language.translate(this.key, this.params);
2583
+ this.lastValueUpdate = () => {
2584
+ this.lastValue = this.language.translate(this.lastKey, this.lastParams);
2585
+ this.detection.markForCheck();
2584
2586
  };
2585
- language.completed.pipe(takeUntil(this.destroyed)).subscribe(this.valueUpdate);
2587
+ language.completed.pipe(takeUntil(this.destroyed)).subscribe(this.lastValueUpdate);
2586
2588
  }
2587
2589
  // --------------------------------------------------------------------------
2588
2590
  //
@@ -2603,12 +2605,15 @@ class LanguagePipe extends DestroyableContainer {
2603
2605
  //
2604
2606
  // --------------------------------------------------------------------------
2605
2607
  transform(key, params) {
2606
- this.key = key;
2607
- this.params = params;
2608
- if (_.isNil(this._value)) {
2609
- this.valueUpdate();
2608
+ if (key === this.lastKey) {
2609
+ if (params === this.lastParams || (_.isNil(params) && _.isNil(this.lastParams))) {
2610
+ return this.lastValue;
2611
+ }
2610
2612
  }
2611
- return this._value;
2613
+ this.lastKey = key;
2614
+ this.lastParams = params;
2615
+ this.lastValueUpdate();
2616
+ return this.lastValue;
2612
2617
  }
2613
2618
  destroy() {
2614
2619
  if (this.isDestroyed) {
@@ -2616,11 +2621,13 @@ class LanguagePipe extends DestroyableContainer {
2616
2621
  }
2617
2622
  super.destroy();
2618
2623
  this.language = null;
2619
- this.key = null;
2620
- this.params = null;
2624
+ this.detection = null;
2625
+ this.lastKey = null;
2626
+ this.lastParams = null;
2627
+ this.lastValue = null;
2621
2628
  }
2622
2629
  }
2623
- LanguagePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LanguagePipe, deps: [{ token: i1$1.LanguageService }], target: i0.ɵɵFactoryTarget.Pipe });
2630
+ LanguagePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LanguagePipe, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.LanguageService }], target: i0.ɵɵFactoryTarget.Pipe });
2624
2631
  LanguagePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LanguagePipe, name: "viTranslate", pure: false });
2625
2632
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LanguagePipe, decorators: [{
2626
2633
  type: Pipe,
@@ -2628,7 +2635,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2628
2635
  name: 'viTranslate',
2629
2636
  pure: false
2630
2637
  }]
2631
- }], ctorParameters: function () { return [{ type: i1$1.LanguageService }]; } });
2638
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.LanguageService }]; } });
2632
2639
 
2633
2640
  class HTMLTitleDirective extends Destroyable {
2634
2641
  // --------------------------------------------------------------------------
@@ -7725,10 +7732,9 @@ class CdkTableCellValuePipe extends DestroyableContainer {
7725
7732
  // Constructor
7726
7733
  //
7727
7734
  // --------------------------------------------------------------------------
7728
- constructor(detection, ngZone) {
7735
+ constructor(detection) {
7729
7736
  super();
7730
7737
  this.detection = detection;
7731
- this.ngZone = ngZone;
7732
7738
  }
7733
7739
  // --------------------------------------------------------------------------
7734
7740
  //
@@ -7737,33 +7743,33 @@ class CdkTableCellValuePipe extends DestroyableContainer {
7737
7743
  // --------------------------------------------------------------------------
7738
7744
  transform(item, column) {
7739
7745
  if (item === this.lastItem && column === this.lastColumn) {
7740
- return this.formattedValue;
7746
+ return this.lastValue;
7741
7747
  }
7742
- this.formattedValue = CdkTableCellValuePipe.PENDING_SYMBOL;
7743
7748
  if (_.isNil(column.format)) {
7744
- this.formattedValue = item[column.name];
7745
- return this.formattedValue;
7749
+ this.lastValue = item[column.name];
7750
+ return this.lastValue;
7746
7751
  }
7752
+ this.lastItem = item;
7753
+ this.lastColumn = column;
7754
+ this.lastValue = CdkTableCellValuePipe.PENDING_SYMBOL;
7747
7755
  let result = column.format(item, column);
7748
7756
  if (!(result instanceof Promise)) {
7749
- this.formattedValue = result;
7750
- return this.formattedValue;
7757
+ this.lastValue = result;
7758
+ return this.lastValue;
7751
7759
  }
7752
7760
  result
7753
7761
  .then(item => {
7754
- if (!_.isNil(this.detection)) {
7755
- this.formattedValue = item;
7756
- }
7762
+ this.lastValue = item;
7757
7763
  })
7758
7764
  .catch(error => {
7759
- this.formattedValue = CdkTableCellValuePipe.ERROR_SYMBOL;
7765
+ this.lastValue = CdkTableCellValuePipe.ERROR_SYMBOL;
7760
7766
  })
7761
7767
  .finally(() => {
7762
7768
  if (!_.isNil(this.detection)) {
7763
7769
  this.detection.markForCheck();
7764
7770
  }
7765
7771
  });
7766
- return this.formattedValue;
7772
+ return this.lastValue;
7767
7773
  }
7768
7774
  destroy() {
7769
7775
  if (this.isDestroyed) {
@@ -7773,7 +7779,7 @@ class CdkTableCellValuePipe extends DestroyableContainer {
7773
7779
  this.detection = null;
7774
7780
  this.lastItem = null;
7775
7781
  this.lastColumn = null;
7776
- this.formattedValue = null;
7782
+ this.lastValue = null;
7777
7783
  }
7778
7784
  }
7779
7785
  // --------------------------------------------------------------------------
@@ -7783,7 +7789,7 @@ class CdkTableCellValuePipe extends DestroyableContainer {
7783
7789
  // --------------------------------------------------------------------------
7784
7790
  CdkTableCellValuePipe.ERROR_SYMBOL = 'x';
7785
7791
  CdkTableCellValuePipe.PENDING_SYMBOL = '⧗';
7786
- CdkTableCellValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CdkTableCellValuePipe, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Pipe });
7792
+ CdkTableCellValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CdkTableCellValuePipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });
7787
7793
  CdkTableCellValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CdkTableCellValuePipe, name: "viCdkTableCellValue", pure: false });
7788
7794
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CdkTableCellValuePipe, decorators: [{
7789
7795
  type: Pipe,
@@ -7791,7 +7797,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
7791
7797
  name: 'viCdkTableCellValue',
7792
7798
  pure: false
7793
7799
  }]
7794
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.NgZone }]; } });
7800
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
7795
7801
 
7796
7802
  class CdkTableCellValuePipePure {
7797
7803
  // --------------------------------------------------------------------------