@ts-core/angular 13.1.6 → 13.1.7
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/component/cdk-table/cell/CdkTableCellValuePipe.d.ts +10 -7
- package/esm2020/component/cdk-table/cell/CdkTableCellValuePipe.mjs +20 -15
- package/fesm2015/ts-core-angular.mjs +19 -14
- package/fesm2015/ts-core-angular.mjs.map +1 -1
- package/fesm2020/ts-core-angular.mjs +19 -14
- package/fesm2020/ts-core-angular.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -7725,9 +7725,10 @@ class CdkTableCellValuePipe extends DestroyableContainer {
|
|
|
7725
7725
|
// Constructor
|
|
7726
7726
|
//
|
|
7727
7727
|
// --------------------------------------------------------------------------
|
|
7728
|
-
constructor(detection) {
|
|
7728
|
+
constructor(detection, ngZone) {
|
|
7729
7729
|
super();
|
|
7730
7730
|
this.detection = detection;
|
|
7731
|
+
this.ngZone = ngZone;
|
|
7731
7732
|
}
|
|
7732
7733
|
// --------------------------------------------------------------------------
|
|
7733
7734
|
//
|
|
@@ -7735,40 +7736,44 @@ class CdkTableCellValuePipe extends DestroyableContainer {
|
|
|
7735
7736
|
//
|
|
7736
7737
|
// --------------------------------------------------------------------------
|
|
7737
7738
|
transform(item, column) {
|
|
7738
|
-
if (
|
|
7739
|
-
return this.
|
|
7739
|
+
if (item === this.lastItem && column === this.lastColumn) {
|
|
7740
|
+
return this.formattedValue;
|
|
7740
7741
|
}
|
|
7741
|
-
|
|
7742
|
+
this.formattedValue = CdkTableCellValuePipe.PENDING_SYMBOL;
|
|
7742
7743
|
if (_.isNil(column.format)) {
|
|
7743
|
-
|
|
7744
|
-
return
|
|
7744
|
+
this.formattedValue = item[column.name];
|
|
7745
|
+
return this.formattedValue;
|
|
7745
7746
|
}
|
|
7746
7747
|
let result = column.format(item, column);
|
|
7747
7748
|
if (!(result instanceof Promise)) {
|
|
7748
|
-
|
|
7749
|
-
return
|
|
7749
|
+
this.formattedValue = result;
|
|
7750
|
+
return this.formattedValue;
|
|
7750
7751
|
}
|
|
7751
7752
|
result
|
|
7752
7753
|
.then(item => {
|
|
7753
|
-
|
|
7754
|
+
if (!_.isNil(this.detection)) {
|
|
7755
|
+
this.formattedValue = item;
|
|
7756
|
+
}
|
|
7754
7757
|
})
|
|
7755
7758
|
.catch(error => {
|
|
7756
|
-
|
|
7759
|
+
this.formattedValue = CdkTableCellValuePipe.ERROR_SYMBOL;
|
|
7757
7760
|
})
|
|
7758
7761
|
.finally(() => {
|
|
7759
7762
|
if (!_.isNil(this.detection)) {
|
|
7760
7763
|
this.detection.markForCheck();
|
|
7761
7764
|
}
|
|
7762
7765
|
});
|
|
7763
|
-
return
|
|
7766
|
+
return this.formattedValue;
|
|
7764
7767
|
}
|
|
7765
7768
|
destroy() {
|
|
7766
7769
|
if (this.isDestroyed) {
|
|
7767
7770
|
return;
|
|
7768
7771
|
}
|
|
7769
7772
|
super.destroy();
|
|
7770
|
-
this.value = null;
|
|
7771
7773
|
this.detection = null;
|
|
7774
|
+
this.lastItem = null;
|
|
7775
|
+
this.lastColumn = null;
|
|
7776
|
+
this.formattedValue = null;
|
|
7772
7777
|
}
|
|
7773
7778
|
}
|
|
7774
7779
|
// --------------------------------------------------------------------------
|
|
@@ -7778,7 +7783,7 @@ class CdkTableCellValuePipe extends DestroyableContainer {
|
|
|
7778
7783
|
// --------------------------------------------------------------------------
|
|
7779
7784
|
CdkTableCellValuePipe.ERROR_SYMBOL = 'x';
|
|
7780
7785
|
CdkTableCellValuePipe.PENDING_SYMBOL = '⧗';
|
|
7781
|
-
CdkTableCellValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CdkTableCellValuePipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
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 });
|
|
7782
7787
|
CdkTableCellValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CdkTableCellValuePipe, name: "viCdkTableCellValue", pure: false });
|
|
7783
7788
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CdkTableCellValuePipe, decorators: [{
|
|
7784
7789
|
type: Pipe,
|
|
@@ -7786,7 +7791,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
7786
7791
|
name: 'viCdkTableCellValue',
|
|
7787
7792
|
pure: false
|
|
7788
7793
|
}]
|
|
7789
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
|
|
7794
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.NgZone }]; } });
|
|
7790
7795
|
|
|
7791
7796
|
class CdkTableCellValuePipePure {
|
|
7792
7797
|
// --------------------------------------------------------------------------
|