@ts-core/angular 13.1.9 → 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.
- package/component/cdk-table/cell/CdkTableCellValuePipe.d.ts +3 -4
- package/esm2020/component/cdk-table/cell/CdkTableCellValuePipe.mjs +5 -6
- package/esm2020/language/LanguagePipe.mjs +21 -14
- package/fesm2015/ts-core-angular.mjs +24 -18
- package/fesm2015/ts-core-angular.mjs.map +1 -1
- package/fesm2020/ts-core-angular.mjs +24 -18
- package/fesm2020/ts-core-angular.mjs.map +1 -1
- package/language/LanguagePipe.d.ts +7 -6
- package/package.json +1 -1
|
@@ -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.
|
|
2583
|
-
this.
|
|
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.
|
|
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.
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2608
|
+
if (key === this.lastKey) {
|
|
2609
|
+
if (params === this.lastParams || (_.isNil(params) && _.isNil(this.lastParams))) {
|
|
2610
|
+
return this.lastValue;
|
|
2611
|
+
}
|
|
2610
2612
|
}
|
|
2611
|
-
|
|
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.
|
|
2620
|
-
this.
|
|
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
|
|
7735
|
+
constructor(detection) {
|
|
7729
7736
|
super();
|
|
7730
7737
|
this.detection = detection;
|
|
7731
|
-
this.ngZone = ngZone;
|
|
7732
7738
|
}
|
|
7733
7739
|
// --------------------------------------------------------------------------
|
|
7734
7740
|
//
|
|
@@ -7772,8 +7778,8 @@ class CdkTableCellValuePipe extends DestroyableContainer {
|
|
|
7772
7778
|
super.destroy();
|
|
7773
7779
|
this.detection = null;
|
|
7774
7780
|
this.lastItem = null;
|
|
7775
|
-
this.lastValue = null;
|
|
7776
7781
|
this.lastColumn = 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 }
|
|
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 }
|
|
7800
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
|
|
7795
7801
|
|
|
7796
7802
|
class CdkTableCellValuePipePure {
|
|
7797
7803
|
// --------------------------------------------------------------------------
|