@progress/kendo-angular-l10n 21.4.1 → 22.0.0-develop.1
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-messages.d.ts +1 -1
- package/fesm2022/progress-kendo-angular-l10n.mjs +9 -9
- package/package.json +7 -9
- package/esm2022/component-messages.mjs +0 -44
- package/esm2022/index.mjs +0 -8
- package/esm2022/localization.service.mjs +0 -97
- package/esm2022/message.service.mjs +0 -55
- package/esm2022/progress-kendo-angular-l10n.mjs +0 -8
- package/esm2022/rtl.mjs +0 -22
package/component-messages.d.ts
CHANGED
|
@@ -20,5 +20,5 @@ export declare abstract class ComponentMessages implements OnChanges, OnInit, On
|
|
|
20
20
|
protected register(changes: object): void;
|
|
21
21
|
ngOnDestroy(): void;
|
|
22
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentMessages, never>;
|
|
23
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ComponentMessages, never, never, {}, {}, never, never,
|
|
23
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComponentMessages, never, never, {}, {}, never, never, true, never>;
|
|
24
24
|
}
|
|
@@ -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: "
|
|
53
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
52
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: MessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
53
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: MessageService });
|
|
54
54
|
}
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", 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: "
|
|
90
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
89
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: ComponentMessages, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
90
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: ComponentMessages, isStandalone: true, usesOnChanges: true, ngImport: i0 });
|
|
91
91
|
}
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: ComponentMessages, decorators: [{
|
|
93
93
|
type: Directive,
|
|
94
94
|
args: [{}]
|
|
95
95
|
}] });
|
|
@@ -182,10 +182,10 @@ class LocalizationService {
|
|
|
182
182
|
const alt = this.messageService.get(key);
|
|
183
183
|
return (alt === undefined) ? value : alt;
|
|
184
184
|
}
|
|
185
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
186
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
185
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: LocalizationService, deps: [{ token: L10N_PREFIX }, { token: MessageService, optional: true }, { token: RTL, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
186
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: LocalizationService });
|
|
187
187
|
}
|
|
188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: LocalizationService, decorators: [{
|
|
189
189
|
type: Injectable
|
|
190
190
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
191
191
|
type: Inject,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-l10n",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.0.0-develop.1",
|
|
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",
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
"friendlyName": "Localization"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"@angular/animations": "
|
|
22
|
-
"@angular/common": "
|
|
23
|
-
"@angular/core": "
|
|
24
|
-
"@angular/platform-browser": "
|
|
25
|
-
"@progress/kendo-angular-common": "
|
|
21
|
+
"@angular/animations": "19 - 21",
|
|
22
|
+
"@angular/common": "19 - 21",
|
|
23
|
+
"@angular/core": "19 - 21",
|
|
24
|
+
"@angular/platform-browser": "19 - 21",
|
|
25
|
+
"@progress/kendo-angular-common": "22.0.0-develop.1",
|
|
26
26
|
"@progress/kendo-licensing": "^1.7.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": "
|
|
31
|
+
"@progress/kendo-angular-schematics": "22.0.0-develop.1"
|
|
32
32
|
},
|
|
33
33
|
"schematics": "./schematics/collection.json",
|
|
34
34
|
"module": "fesm2022/progress-kendo-angular-l10n.mjs",
|
|
@@ -39,8 +39,6 @@
|
|
|
39
39
|
},
|
|
40
40
|
".": {
|
|
41
41
|
"types": "./index.d.ts",
|
|
42
|
-
"esm2022": "./esm2022/progress-kendo-angular-l10n.mjs",
|
|
43
|
-
"esm": "./esm2022/progress-kendo-angular-l10n.mjs",
|
|
44
42
|
"default": "./fesm2022/progress-kendo-angular-l10n.mjs"
|
|
45
43
|
}
|
|
46
44
|
},
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive } from '@angular/core';
|
|
6
|
-
import { skip } from "rxjs/operators";
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
/**
|
|
9
|
-
* Base class that acts as a component messages container.
|
|
10
|
-
*
|
|
11
|
-
* For internal use.
|
|
12
|
-
* @hidden
|
|
13
|
-
*/
|
|
14
|
-
export class ComponentMessages {
|
|
15
|
-
service;
|
|
16
|
-
subscription;
|
|
17
|
-
get override() {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
ngOnChanges(changes) {
|
|
21
|
-
this.register(changes);
|
|
22
|
-
if (Object.keys(changes).some(field => !changes[field].isFirstChange())) {
|
|
23
|
-
this.service.notifyChanges();
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
ngOnInit() {
|
|
27
|
-
this.subscription = this.service.changes.pipe(skip(1)).subscribe(() => this.register(this));
|
|
28
|
-
}
|
|
29
|
-
register(changes) {
|
|
30
|
-
const keys = Object.keys(changes);
|
|
31
|
-
keys.forEach(key => this.service.register(key, this[key], this.override));
|
|
32
|
-
}
|
|
33
|
-
ngOnDestroy() {
|
|
34
|
-
if (this.subscription) {
|
|
35
|
-
this.subscription.unsubscribe();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ComponentMessages, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
39
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ComponentMessages, usesOnChanges: true, ngImport: i0 });
|
|
40
|
-
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ComponentMessages, decorators: [{
|
|
42
|
-
type: Directive,
|
|
43
|
-
args: [{}]
|
|
44
|
-
}] });
|
package/esm2022/index.mjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export * from './message.service';
|
|
6
|
-
export * from './component-messages';
|
|
7
|
-
export * from './localization.service';
|
|
8
|
-
export * from './rtl';
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Inject, Injectable, Optional, InjectionToken } from '@angular/core';
|
|
6
|
-
import { MessageService } from './message.service';
|
|
7
|
-
import { RTL } from './rtl';
|
|
8
|
-
import { BehaviorSubject } from 'rxjs';
|
|
9
|
-
import { map, tap } from 'rxjs/operators';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
import * as i1 from "./message.service";
|
|
12
|
-
/**
|
|
13
|
-
* Localization prefix for the component messages.
|
|
14
|
-
*
|
|
15
|
-
* For internal use.
|
|
16
|
-
* @hidden
|
|
17
|
-
*/
|
|
18
|
-
export const L10N_PREFIX = new InjectionToken('Localization key prefix');
|
|
19
|
-
/**
|
|
20
|
-
* Component localization service.
|
|
21
|
-
*
|
|
22
|
-
* For internal use.
|
|
23
|
-
* @hidden
|
|
24
|
-
*/
|
|
25
|
-
export class LocalizationService {
|
|
26
|
-
prefix;
|
|
27
|
-
messageService;
|
|
28
|
-
_rtl;
|
|
29
|
-
changes;
|
|
30
|
-
subscription;
|
|
31
|
-
dictionary = {};
|
|
32
|
-
constructor(prefix, messageService, _rtl) {
|
|
33
|
-
this.prefix = prefix;
|
|
34
|
-
this.messageService = messageService;
|
|
35
|
-
this._rtl = _rtl;
|
|
36
|
-
this.changes = new BehaviorSubject({ rtl: this._rtl });
|
|
37
|
-
if (messageService) {
|
|
38
|
-
this.subscription = messageService.changes
|
|
39
|
-
.pipe(map(({ rtl }) => rtl !== undefined ? rtl : this._rtl), tap(rtl => this._rtl = rtl))
|
|
40
|
-
.subscribe(rtl => {
|
|
41
|
-
this.dictionary = {};
|
|
42
|
-
this.changes.next({ rtl });
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
get rtl() {
|
|
47
|
-
return this._rtl;
|
|
48
|
-
}
|
|
49
|
-
ngOnDestroy() {
|
|
50
|
-
if (this.subscription) {
|
|
51
|
-
this.subscription.unsubscribe();
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
get(shortKey) {
|
|
55
|
-
const key = this.key(shortKey);
|
|
56
|
-
return this.dictionary[key];
|
|
57
|
-
}
|
|
58
|
-
register(shortKey, value, override = false) {
|
|
59
|
-
const key = this.key(shortKey);
|
|
60
|
-
let message = value;
|
|
61
|
-
if (!override) {
|
|
62
|
-
if (Object.hasOwnProperty.call(this.dictionary, key)) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
message = this.defaultValue(key, value);
|
|
66
|
-
}
|
|
67
|
-
this.dictionary[key] = message;
|
|
68
|
-
}
|
|
69
|
-
notifyChanges() {
|
|
70
|
-
this.changes.next({ rtl: this.rtl });
|
|
71
|
-
}
|
|
72
|
-
key(shortKey) {
|
|
73
|
-
return this.prefix + '.' + shortKey;
|
|
74
|
-
}
|
|
75
|
-
defaultValue(key, value) {
|
|
76
|
-
if (!this.messageService) {
|
|
77
|
-
return value;
|
|
78
|
-
}
|
|
79
|
-
const alt = this.messageService.get(key);
|
|
80
|
-
return (alt === undefined) ? value : alt;
|
|
81
|
-
}
|
|
82
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizationService, deps: [{ token: L10N_PREFIX }, { token: i1.MessageService, optional: true }, { token: RTL, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
83
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizationService });
|
|
84
|
-
}
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizationService, decorators: [{
|
|
86
|
-
type: Injectable
|
|
87
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
88
|
-
type: Inject,
|
|
89
|
-
args: [L10N_PREFIX]
|
|
90
|
-
}] }, { type: i1.MessageService, decorators: [{
|
|
91
|
-
type: Optional
|
|
92
|
-
}] }, { type: undefined, decorators: [{
|
|
93
|
-
type: Optional
|
|
94
|
-
}, {
|
|
95
|
-
type: Inject,
|
|
96
|
-
args: [RTL]
|
|
97
|
-
}] }] });
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Injectable } from '@angular/core';
|
|
6
|
-
import { BehaviorSubject } from 'rxjs';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
/**
|
|
9
|
-
* Represents a base class for a service that returns localized messages.
|
|
10
|
-
*
|
|
11
|
-
* For more information, refer to the section on [using the message service]({% slug messages_l10n %}#toc-using-the-message-service).
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* export class CustomMessageService extends MessageService {
|
|
16
|
-
* public get(key: string): string {
|
|
17
|
-
* return this.messages[key];
|
|
18
|
-
* }
|
|
19
|
-
* }
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export class MessageService {
|
|
23
|
-
/**
|
|
24
|
-
* @hidden
|
|
25
|
-
*/
|
|
26
|
-
constructor() {
|
|
27
|
-
/* noop */
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* @hidden
|
|
31
|
-
*/
|
|
32
|
-
changes = new BehaviorSubject({ rtl: undefined });
|
|
33
|
-
/**
|
|
34
|
-
* Notifies the components that the messages changed.
|
|
35
|
-
*
|
|
36
|
-
* @param rtl - (Optional) The new value for the [text direction token]({% slug api_l10n_rtl %}).
|
|
37
|
-
*/
|
|
38
|
-
notify(rtl) {
|
|
39
|
-
this.changes.next({ rtl });
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Returns a localized message for the supplied key.
|
|
43
|
-
*
|
|
44
|
-
* @param _key - The message key. For example, `"kendo.grid.noRecords"`.
|
|
45
|
-
* @return - The localized message for this key or `undefined` if not found.
|
|
46
|
-
*/
|
|
47
|
-
get(_key) {
|
|
48
|
-
return undefined;
|
|
49
|
-
}
|
|
50
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
51
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageService });
|
|
52
|
-
}
|
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageService, decorators: [{
|
|
54
|
-
type: Injectable
|
|
55
|
-
}], ctorParameters: () => [] });
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* Generated bundle index. Do not edit.
|
|
7
|
-
*/
|
|
8
|
-
export * from './index';
|
package/esm2022/rtl.mjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { InjectionToken } from '@angular/core';
|
|
6
|
-
/**
|
|
7
|
-
* Represents a token that specifies the text direction of Kendo UI for Angular components.
|
|
8
|
-
*
|
|
9
|
-
* {% embed_file rtl/app.module.ts preview %}
|
|
10
|
-
* {% embed_file rtl/app.component.ts %}
|
|
11
|
-
* {% embed_file shared/main.ts hidden %}
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* import { RTL } from '@progress/kendo-angular-l10n';
|
|
16
|
-
*
|
|
17
|
-
* providers: [
|
|
18
|
-
* { provide: RTL, useValue: true }
|
|
19
|
-
* ]
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export const RTL = new InjectionToken("Kendo UI Right-to-Left token");
|