@progress/kendo-angular-l10n 17.0.0-develop.3 → 17.0.0-develop.30

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.
@@ -12,6 +12,8 @@ import * as i0 from "@angular/core";
12
12
  * @hidden
13
13
  */
14
14
  export class ComponentMessages {
15
+ service;
16
+ subscription;
15
17
  get override() {
16
18
  return false;
17
19
  }
@@ -34,10 +36,10 @@ export class ComponentMessages {
34
36
  this.subscription.unsubscribe();
35
37
  }
36
38
  }
39
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ComponentMessages, deps: [], target: i0.ɵɵFactoryTarget.Directive });
40
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ComponentMessages, usesOnChanges: true, ngImport: i0 });
37
41
  }
38
- ComponentMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ComponentMessages, deps: [], target: i0.ɵɵFactoryTarget.Directive });
39
- ComponentMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ComponentMessages, usesOnChanges: true, ngImport: i0 });
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ComponentMessages, decorators: [{
42
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ComponentMessages, decorators: [{
41
43
  type: Directive,
42
44
  args: [{}]
43
45
  }] });
@@ -23,12 +23,17 @@ export const L10N_PREFIX = new InjectionToken('Localization key prefix');
23
23
  * @hidden
24
24
  */
25
25
  export class LocalizationService {
26
+ prefix;
27
+ messageService;
28
+ _rtl;
29
+ changes;
30
+ subscription;
31
+ dictionary = {};
26
32
  constructor(prefix, messageService, _rtl) {
27
33
  this.prefix = prefix;
28
34
  this.messageService = messageService;
29
35
  this._rtl = _rtl;
30
36
  this.changes = new BehaviorSubject({ rtl: this._rtl });
31
- this.dictionary = {};
32
37
  if (messageService) {
33
38
  this.subscription = messageService.changes
34
39
  .pipe(map(({ rtl }) => rtl !== undefined ? rtl : this._rtl), tap(rtl => this._rtl = rtl))
@@ -74,10 +79,10 @@ export class LocalizationService {
74
79
  const alt = this.messageService.get(key);
75
80
  return (alt === undefined) ? value : alt;
76
81
  }
82
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", 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: "16.2.12", ngImport: i0, type: LocalizationService });
77
84
  }
78
- LocalizationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizationService, deps: [{ token: L10N_PREFIX }, { token: i1.MessageService, optional: true }, { token: RTL, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
79
- LocalizationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizationService });
80
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizationService, decorators: [{
85
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizationService, decorators: [{
81
86
  type: Injectable
82
87
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
83
88
  type: Inject,
@@ -15,12 +15,12 @@ export class MessageService {
15
15
  * @hidden
16
16
  */
17
17
  constructor() {
18
- /**
19
- * @hidden
20
- */
21
- this.changes = new BehaviorSubject({ rtl: undefined });
22
18
  /* noop */
23
19
  }
20
+ /**
21
+ * @hidden
22
+ */
23
+ changes = new BehaviorSubject({ rtl: undefined });
24
24
  /**
25
25
  * Notifies the components that the messages were changed.
26
26
  *
@@ -38,9 +38,9 @@ export class MessageService {
38
38
  get(_key) {
39
39
  return undefined;
40
40
  }
41
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
42
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MessageService });
41
43
  }
42
- MessageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
43
- MessageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageService });
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageService, decorators: [{
44
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MessageService, decorators: [{
45
45
  type: Injectable
46
46
  }], ctorParameters: function () { return []; } });
@@ -17,12 +17,12 @@ class MessageService {
17
17
  * @hidden
18
18
  */
19
19
  constructor() {
20
- /**
21
- * @hidden
22
- */
23
- this.changes = new BehaviorSubject({ rtl: undefined });
24
20
  /* noop */
25
21
  }
22
+ /**
23
+ * @hidden
24
+ */
25
+ changes = new BehaviorSubject({ rtl: undefined });
26
26
  /**
27
27
  * Notifies the components that the messages were changed.
28
28
  *
@@ -40,10 +40,10 @@ class MessageService {
40
40
  get(_key) {
41
41
  return undefined;
42
42
  }
43
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
44
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MessageService });
43
45
  }
44
- MessageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
45
- MessageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageService });
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageService, decorators: [{
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MessageService, decorators: [{
47
47
  type: Injectable
48
48
  }], ctorParameters: function () { return []; } });
49
49
 
@@ -54,6 +54,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
54
54
  * @hidden
55
55
  */
56
56
  class ComponentMessages {
57
+ service;
58
+ subscription;
57
59
  get override() {
58
60
  return false;
59
61
  }
@@ -76,10 +78,10 @@ class ComponentMessages {
76
78
  this.subscription.unsubscribe();
77
79
  }
78
80
  }
81
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ComponentMessages, deps: [], target: i0.ɵɵFactoryTarget.Directive });
82
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ComponentMessages, usesOnChanges: true, ngImport: i0 });
79
83
  }
80
- ComponentMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ComponentMessages, deps: [], target: i0.ɵɵFactoryTarget.Directive });
81
- ComponentMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ComponentMessages, usesOnChanges: true, ngImport: i0 });
82
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ComponentMessages, decorators: [{
84
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ComponentMessages, decorators: [{
83
85
  type: Directive,
84
86
  args: [{}]
85
87
  }] });
@@ -108,12 +110,17 @@ const L10N_PREFIX = new InjectionToken('Localization key prefix');
108
110
  * @hidden
109
111
  */
110
112
  class LocalizationService {
113
+ prefix;
114
+ messageService;
115
+ _rtl;
116
+ changes;
117
+ subscription;
118
+ dictionary = {};
111
119
  constructor(prefix, messageService, _rtl) {
112
120
  this.prefix = prefix;
113
121
  this.messageService = messageService;
114
122
  this._rtl = _rtl;
115
123
  this.changes = new BehaviorSubject({ rtl: this._rtl });
116
- this.dictionary = {};
117
124
  if (messageService) {
118
125
  this.subscription = messageService.changes
119
126
  .pipe(map(({ rtl }) => rtl !== undefined ? rtl : this._rtl), tap(rtl => this._rtl = rtl))
@@ -159,10 +166,10 @@ class LocalizationService {
159
166
  const alt = this.messageService.get(key);
160
167
  return (alt === undefined) ? value : alt;
161
168
  }
169
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizationService, deps: [{ token: L10N_PREFIX }, { token: MessageService, optional: true }, { token: RTL, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
170
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizationService });
162
171
  }
163
- LocalizationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizationService, deps: [{ token: L10N_PREFIX }, { token: MessageService, optional: true }, { token: RTL, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
164
- LocalizationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizationService });
165
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizationService, decorators: [{
172
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizationService, decorators: [{
166
173
  type: Injectable
167
174
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
168
175
  type: Inject,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-l10n",
3
- "version": "17.0.0-develop.3",
3
+ "version": "17.0.0-develop.30",
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,24 +18,20 @@
18
18
  "friendlyName": "Localization"
19
19
  },
20
20
  "peerDependencies": {
21
- "@angular/animations": "15 - 18",
22
- "@angular/common": "15 - 18",
23
- "@angular/core": "15 - 18",
24
- "@angular/platform-browser": "15 - 18",
25
- "@progress/kendo-angular-common": "17.0.0-develop.3",
21
+ "@angular/animations": "16 - 18",
22
+ "@angular/common": "16 - 18",
23
+ "@angular/core": "16 - 18",
24
+ "@angular/platform-browser": "16 - 18",
25
+ "@progress/kendo-angular-common": "17.0.0-develop.30",
26
26
  "@progress/kendo-licensing": "^1.0.2",
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": "17.0.0-develop.3"
31
+ "@progress/kendo-angular-schematics": "17.0.0-develop.30"
32
32
  },
33
33
  "schematics": "./schematics/collection.json",
34
- "module": "fesm2015/progress-kendo-angular-l10n.mjs",
35
- "es2020": "fesm2020/progress-kendo-angular-l10n.mjs",
36
- "esm2020": "esm2020/progress-kendo-angular-l10n.mjs",
37
- "fesm2020": "fesm2020/progress-kendo-angular-l10n.mjs",
38
- "fesm2015": "fesm2015/progress-kendo-angular-l10n.mjs",
34
+ "module": "fesm2022/progress-kendo-angular-l10n.mjs",
39
35
  "typings": "index.d.ts",
40
36
  "exports": {
41
37
  "./package.json": {
@@ -43,11 +39,9 @@
43
39
  },
44
40
  ".": {
45
41
  "types": "./index.d.ts",
46
- "esm2020": "./esm2020/progress-kendo-angular-l10n.mjs",
47
- "es2020": "./fesm2020/progress-kendo-angular-l10n.mjs",
48
- "es2015": "./fesm2015/progress-kendo-angular-l10n.mjs",
49
- "node": "./fesm2015/progress-kendo-angular-l10n.mjs",
50
- "default": "./fesm2020/progress-kendo-angular-l10n.mjs"
42
+ "esm2022": "./esm2022/progress-kendo-angular-l10n.mjs",
43
+ "esm": "./esm2022/progress-kendo-angular-l10n.mjs",
44
+ "default": "./fesm2022/progress-kendo-angular-l10n.mjs"
51
45
  }
52
46
  },
53
47
  "sideEffects": false
@@ -1,186 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as i0 from '@angular/core';
6
- import { Injectable, Directive, InjectionToken, Inject, Optional } from '@angular/core';
7
- import { BehaviorSubject } from 'rxjs';
8
- import { skip, map, tap } from 'rxjs/operators';
9
-
10
- /**
11
- * A base class for a service that returns localized messages.
12
- *
13
- * For more information, refer to the section on [using the message service]({% slug messages_l10n %}#toc-using-the-message-service).
14
- */
15
- class MessageService {
16
- /**
17
- * @hidden
18
- */
19
- constructor() {
20
- /**
21
- * @hidden
22
- */
23
- this.changes = new BehaviorSubject({ rtl: undefined });
24
- /* noop */
25
- }
26
- /**
27
- * Notifies the components that the messages were changed.
28
- *
29
- * @param rtl - (Optional) A new value for the [text direction token]({% slug api_l10n_rtl %}).
30
- */
31
- notify(rtl) {
32
- this.changes.next({ rtl });
33
- }
34
- /**
35
- * Returns a localized message for the supplied key.
36
- *
37
- * @param _key - The message key. For example, `"kendo.grid.noRecords"`.
38
- * @return - The localized message for this key or `undefined` if not found.
39
- */
40
- get(_key) {
41
- return undefined;
42
- }
43
- }
44
- MessageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
45
- MessageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageService });
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageService, decorators: [{
47
- type: Injectable
48
- }], ctorParameters: function () { return []; } });
49
-
50
- /**
51
- * Base class that acts as a component messages container.
52
- *
53
- * For internal use.
54
- * @hidden
55
- */
56
- class ComponentMessages {
57
- get override() {
58
- return false;
59
- }
60
- ngOnChanges(changes) {
61
- this.register(changes);
62
- if (Object.keys(changes).some(field => !changes[field].isFirstChange())) {
63
- this.service.notifyChanges();
64
- }
65
- }
66
- ngOnInit() {
67
- this.subscription = this.service.changes.pipe(skip(1)).subscribe(() => this.register(this));
68
- }
69
- // eslint-disable-next-line @typescript-eslint/ban-types
70
- register(changes) {
71
- const keys = Object.keys(changes);
72
- keys.forEach(key => this.service.register(key, this[key], this.override));
73
- }
74
- ngOnDestroy() {
75
- if (this.subscription) {
76
- this.subscription.unsubscribe();
77
- }
78
- }
79
- }
80
- ComponentMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ComponentMessages, deps: [], target: i0.ɵɵFactoryTarget.Directive });
81
- ComponentMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ComponentMessages, usesOnChanges: true, ngImport: i0 });
82
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ComponentMessages, decorators: [{
83
- type: Directive,
84
- args: [{}]
85
- }] });
86
-
87
- /**
88
- * A token that specifies the text direction of Kendo UI for Angular components.
89
- *
90
- * {% embed_file rtl/app.module.ts preview %}
91
- * {% embed_file rtl/app.component.ts %}
92
- * {% embed_file shared/main.ts hidden %}
93
- *
94
- */
95
- const RTL = new InjectionToken("Kendo UI Right-to-Left token");
96
-
97
- /**
98
- * Localization prefix for the component messages.
99
- *
100
- * For internal use.
101
- * @hidden
102
- */
103
- const L10N_PREFIX = new InjectionToken('Localization key prefix');
104
- /**
105
- * Component localization service.
106
- *
107
- * For internal use.
108
- * @hidden
109
- */
110
- class LocalizationService {
111
- constructor(prefix, messageService, _rtl) {
112
- this.prefix = prefix;
113
- this.messageService = messageService;
114
- this._rtl = _rtl;
115
- this.changes = new BehaviorSubject({ rtl: this._rtl });
116
- this.dictionary = {};
117
- if (messageService) {
118
- this.subscription = messageService.changes
119
- .pipe(map(({ rtl }) => rtl !== undefined ? rtl : this._rtl), tap(rtl => this._rtl = rtl))
120
- .subscribe(rtl => {
121
- this.dictionary = {};
122
- this.changes.next({ rtl });
123
- });
124
- }
125
- }
126
- get rtl() {
127
- return this._rtl;
128
- }
129
- ngOnDestroy() {
130
- if (this.subscription) {
131
- this.subscription.unsubscribe();
132
- }
133
- }
134
- get(shortKey) {
135
- const key = this.key(shortKey);
136
- return this.dictionary[key];
137
- }
138
- register(shortKey, value, override = false) {
139
- const key = this.key(shortKey);
140
- let message = value;
141
- if (!override) {
142
- if (Object.hasOwnProperty.call(this.dictionary, key)) {
143
- return;
144
- }
145
- message = this.defaultValue(key, value);
146
- }
147
- this.dictionary[key] = message;
148
- }
149
- notifyChanges() {
150
- this.changes.next({ rtl: this.rtl });
151
- }
152
- key(shortKey) {
153
- return this.prefix + '.' + shortKey;
154
- }
155
- defaultValue(key, value) {
156
- if (!this.messageService) {
157
- return value;
158
- }
159
- const alt = this.messageService.get(key);
160
- return (alt === undefined) ? value : alt;
161
- }
162
- }
163
- LocalizationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizationService, deps: [{ token: L10N_PREFIX }, { token: MessageService, optional: true }, { token: RTL, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
164
- LocalizationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizationService });
165
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizationService, decorators: [{
166
- type: Injectable
167
- }], ctorParameters: function () {
168
- return [{ type: undefined, decorators: [{
169
- type: Inject,
170
- args: [L10N_PREFIX]
171
- }] }, { type: MessageService, decorators: [{
172
- type: Optional
173
- }] }, { type: undefined, decorators: [{
174
- type: Optional
175
- }, {
176
- type: Inject,
177
- args: [RTL]
178
- }] }];
179
- } });
180
-
181
- /**
182
- * Generated bundle index. Do not edit.
183
- */
184
-
185
- export { ComponentMessages, L10N_PREFIX, LocalizationService, MessageService, RTL };
186
-
File without changes
File without changes