@progress/kendo-angular-l10n 25.0.0-develop.2 → 25.0.0-develop.21
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.
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { Injectable, Directive, InjectionToken, Inject, Optional } from '@angular/core';
|
|
6
|
+
import { Injectable, Directive, InjectionToken, signal, Inject, Optional } from '@angular/core';
|
|
7
7
|
import { BehaviorSubject } from 'rxjs';
|
|
8
8
|
import { skip, map, tap } from 'rxjs/operators';
|
|
9
9
|
|
|
@@ -49,10 +49,10 @@ class MessageService {
|
|
|
49
49
|
get(_key) {
|
|
50
50
|
return undefined;
|
|
51
51
|
}
|
|
52
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
53
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
52
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.26", ngImport: i0, type: MessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
53
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.26", ngImport: i0, type: MessageService });
|
|
54
54
|
}
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.26", ngImport: i0, type: MessageService, decorators: [{
|
|
56
56
|
type: Injectable
|
|
57
57
|
}], ctorParameters: () => [] });
|
|
58
58
|
|
|
@@ -86,10 +86,10 @@ class ComponentMessages {
|
|
|
86
86
|
this.subscription.unsubscribe();
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
90
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
89
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.26", ngImport: i0, type: ComponentMessages, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
90
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.26", type: ComponentMessages, isStandalone: true, usesOnChanges: true, ngImport: i0 });
|
|
91
91
|
}
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.26", ngImport: i0, type: ComponentMessages, decorators: [{
|
|
93
93
|
type: Directive,
|
|
94
94
|
args: [{}]
|
|
95
95
|
}] });
|
|
@@ -129,7 +129,7 @@ class LocalizationService {
|
|
|
129
129
|
_rtl;
|
|
130
130
|
changes;
|
|
131
131
|
subscription;
|
|
132
|
-
dictionary = {};
|
|
132
|
+
dictionary = signal({}, ...(ngDevMode ? [{ debugName: "dictionary" }] : []));
|
|
133
133
|
constructor(prefix, messageService, _rtl) {
|
|
134
134
|
this.prefix = prefix;
|
|
135
135
|
this.messageService = messageService;
|
|
@@ -139,7 +139,7 @@ class LocalizationService {
|
|
|
139
139
|
this.subscription = messageService.changes
|
|
140
140
|
.pipe(map(({ rtl }) => rtl !== undefined ? rtl : this._rtl), tap(rtl => this._rtl = rtl))
|
|
141
141
|
.subscribe(rtl => {
|
|
142
|
-
this.dictionary
|
|
142
|
+
this.dictionary.set({});
|
|
143
143
|
this.changes.next({ rtl });
|
|
144
144
|
});
|
|
145
145
|
}
|
|
@@ -154,18 +154,18 @@ class LocalizationService {
|
|
|
154
154
|
}
|
|
155
155
|
get(shortKey) {
|
|
156
156
|
const key = this.key(shortKey);
|
|
157
|
-
return this.dictionary[key];
|
|
157
|
+
return this.dictionary()[key];
|
|
158
158
|
}
|
|
159
159
|
register(shortKey, value, override = false) {
|
|
160
160
|
const key = this.key(shortKey);
|
|
161
161
|
let message = value;
|
|
162
162
|
if (!override) {
|
|
163
|
-
if (Object.hasOwnProperty.call(this.dictionary, key)) {
|
|
163
|
+
if (Object.hasOwnProperty.call(this.dictionary(), key)) {
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
166
|
message = this.defaultValue(key, value);
|
|
167
167
|
}
|
|
168
|
-
this.dictionary[key]
|
|
168
|
+
this.dictionary.update(dict => ({ ...dict, [key]: message }));
|
|
169
169
|
}
|
|
170
170
|
notifyChanges() {
|
|
171
171
|
this.changes.next({ rtl: this.rtl });
|
|
@@ -180,10 +180,10 @@ class LocalizationService {
|
|
|
180
180
|
const alt = this.messageService.get(key);
|
|
181
181
|
return (alt === undefined) ? value : alt;
|
|
182
182
|
}
|
|
183
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
184
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
183
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.26", ngImport: i0, type: LocalizationService, deps: [{ token: L10N_PREFIX }, { token: MessageService, optional: true }, { token: RTL, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
184
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.26", ngImport: i0, type: LocalizationService });
|
|
185
185
|
}
|
|
186
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.26", ngImport: i0, type: LocalizationService, decorators: [{
|
|
187
187
|
type: Injectable
|
|
188
188
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
189
189
|
type: Inject,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-l10n",
|
|
3
|
-
"version": "25.0.0-develop.
|
|
3
|
+
"version": "25.0.0-develop.21",
|
|
4
4
|
"description": "Kendo UI Angular l10n component - an easily customized popup from the most trusted provider of professional Angular components.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"@angular/common": "20 - 22",
|
|
23
23
|
"@angular/core": "20 - 22",
|
|
24
24
|
"@angular/platform-browser": "20 - 22",
|
|
25
|
-
"@progress/kendo-angular-common": "25.0.0-develop.
|
|
25
|
+
"@progress/kendo-angular-common": "25.0.0-develop.21",
|
|
26
26
|
"@progress/kendo-licensing": "^1.11.0",
|
|
27
27
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"tslib": "^2.3.1",
|
|
31
|
-
"@progress/kendo-angular-schematics": "25.0.0-develop.
|
|
31
|
+
"@progress/kendo-angular-schematics": "25.0.0-develop.21"
|
|
32
32
|
},
|
|
33
33
|
"schematics": "./schematics/collection.json",
|
|
34
34
|
"module": "fesm2022/progress-kendo-angular-l10n.mjs",
|