@breadstone/mosaik-elements-angular 0.0.103 → 0.0.104
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 0.0.104 (2025-08-14)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for mosaik-elements-angular to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
1
5
|
## 0.0.103 (2025-08-13)
|
|
2
6
|
|
|
3
7
|
This was a version bump only for mosaik-elements-angular to align it with other projects, there were no code changes.
|
|
@@ -56395,8 +56395,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
56395
56395
|
* @public
|
|
56396
56396
|
*/
|
|
56397
56397
|
function provideTranslations(config) {
|
|
56398
|
-
return makeEnvironmentProviders([
|
|
56399
|
-
{
|
|
56398
|
+
return makeEnvironmentProviders([{
|
|
56400
56399
|
provide: TranslateService,
|
|
56401
56400
|
useFactory: () => {
|
|
56402
56401
|
const service = new TranslatorService(config?.defaultLanguageResolver ?? Translator.DEFAULT_LANGUAGE_RESOLVER);
|
|
@@ -56416,8 +56415,7 @@ function provideTranslations(config) {
|
|
|
56416
56415
|
TranslatorServiceLocator.set(service);
|
|
56417
56416
|
return new TranslateService(service);
|
|
56418
56417
|
}
|
|
56419
|
-
}
|
|
56420
|
-
]);
|
|
56418
|
+
}]);
|
|
56421
56419
|
}
|
|
56422
56420
|
|
|
56423
56421
|
// #region Imports
|
|
@@ -56431,7 +56429,7 @@ class TranslateDirective {
|
|
|
56431
56429
|
_vcr;
|
|
56432
56430
|
_templateRef;
|
|
56433
56431
|
_cdr;
|
|
56434
|
-
|
|
56432
|
+
_translate;
|
|
56435
56433
|
_view;
|
|
56436
56434
|
_scope;
|
|
56437
56435
|
_languageChangedSubscription;
|
|
@@ -56446,7 +56444,7 @@ class TranslateDirective {
|
|
|
56446
56444
|
this._vcr = inject(ViewContainerRef);
|
|
56447
56445
|
this._templateRef = inject((TemplateRef));
|
|
56448
56446
|
this._cdr = inject(ChangeDetectorRef);
|
|
56449
|
-
this.
|
|
56447
|
+
this._translate = inject(TranslateService);
|
|
56450
56448
|
this._languageChangedSubscription = null;
|
|
56451
56449
|
this._view = null;
|
|
56452
56450
|
this._scope = '';
|
|
@@ -56471,14 +56469,14 @@ class TranslateDirective {
|
|
|
56471
56469
|
*/
|
|
56472
56470
|
ngOnInit() {
|
|
56473
56471
|
this.invalidate();
|
|
56474
|
-
this._languageChangedSubscription = this.
|
|
56472
|
+
this._languageChangedSubscription = this._translate.languageChanged
|
|
56475
56473
|
.subscribe(() => this.onCultureChanged());
|
|
56476
56474
|
}
|
|
56477
56475
|
/**
|
|
56478
56476
|
* @public
|
|
56479
56477
|
*/
|
|
56480
56478
|
ngOnDestroy() {
|
|
56481
|
-
this._languageChangedSubscription?.
|
|
56479
|
+
this._languageChangedSubscription?.unsubscribe();
|
|
56482
56480
|
}
|
|
56483
56481
|
/**
|
|
56484
56482
|
* @private
|
|
@@ -56509,7 +56507,7 @@ class TranslateDirective {
|
|
|
56509
56507
|
const scopedKey = this._scope
|
|
56510
56508
|
? `${this._scope}.${key}`
|
|
56511
56509
|
: key;
|
|
56512
|
-
return this.
|
|
56510
|
+
return this._translate.translate(scopedKey, params);
|
|
56513
56511
|
};
|
|
56514
56512
|
}
|
|
56515
56513
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TranslateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -56535,13 +56533,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
56535
56533
|
*/
|
|
56536
56534
|
class TranslatePipe {
|
|
56537
56535
|
// #region Fields
|
|
56538
|
-
|
|
56536
|
+
_translate;
|
|
56539
56537
|
_cdr;
|
|
56540
56538
|
_lastKey;
|
|
56541
56539
|
_lastParams;
|
|
56542
56540
|
_lastScope;
|
|
56543
56541
|
_lastValue;
|
|
56544
|
-
_languageChangedSubscription
|
|
56542
|
+
_languageChangedSubscription;
|
|
56545
56543
|
// #endregion
|
|
56546
56544
|
// #region Ctor
|
|
56547
56545
|
/**
|
|
@@ -56550,13 +56548,13 @@ class TranslatePipe {
|
|
|
56550
56548
|
* @public
|
|
56551
56549
|
*/
|
|
56552
56550
|
constructor() {
|
|
56553
|
-
this.
|
|
56551
|
+
this._translate = inject(TranslateService);
|
|
56554
56552
|
this._cdr = inject(ChangeDetectorRef);
|
|
56555
56553
|
this._lastKey = null;
|
|
56556
56554
|
this._lastParams = undefined;
|
|
56557
56555
|
this._lastScope = undefined;
|
|
56558
56556
|
this._lastValue = null;
|
|
56559
|
-
this._languageChangedSubscription = this.
|
|
56557
|
+
this._languageChangedSubscription = this._translate.languageChanged.subscribe(() => {
|
|
56560
56558
|
this._lastValue = null;
|
|
56561
56559
|
this._cdr.markForCheck();
|
|
56562
56560
|
});
|
|
@@ -56579,7 +56577,7 @@ class TranslatePipe {
|
|
|
56579
56577
|
this._lastKey = scopedKey;
|
|
56580
56578
|
this._lastParams = params;
|
|
56581
56579
|
this._lastScope = scope;
|
|
56582
|
-
this._lastValue = this.
|
|
56580
|
+
this._lastValue = this._translate.translate(scopedKey, params);
|
|
56583
56581
|
}
|
|
56584
56582
|
return this._lastValue ?? '';
|
|
56585
56583
|
}
|
|
@@ -56587,7 +56585,7 @@ class TranslatePipe {
|
|
|
56587
56585
|
* @public
|
|
56588
56586
|
*/
|
|
56589
56587
|
ngOnDestroy() {
|
|
56590
|
-
this._languageChangedSubscription?.
|
|
56588
|
+
this._languageChangedSubscription?.unsubscribe();
|
|
56591
56589
|
}
|
|
56592
56590
|
/**
|
|
56593
56591
|
* Compares two objects for equality.
|