@progress/kendo-angular-l10n 3.0.4-dev.202202251002 → 4.0.0-dev.202204131625

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.
Files changed (32) hide show
  1. package/bundles/kendo-angular-l10n.umd.js +5 -0
  2. package/{dist/es2015/component-messages.d.ts → component-messages.d.ts} +4 -1
  3. package/{dist/es2015 → esm2015}/component-messages.js +8 -0
  4. package/{dist/es/index.js → esm2015/kendo-angular-l10n.js} +0 -0
  5. package/{dist/es2015 → esm2015}/localization.service.js +19 -12
  6. package/{dist/es → esm2015}/main.js +0 -0
  7. package/{dist/es2015 → esm2015}/message.service.js +11 -14
  8. package/{dist/es2015 → esm2015}/rtl.js +0 -0
  9. package/{dist/fesm2015/index.js → fesm2015/kendo-angular-l10n.js} +37 -24
  10. package/{dist/es2015/index.js → kendo-angular-l10n.d.ts} +1 -0
  11. package/{dist/es2015/localization.service.d.ts → localization.service.d.ts} +4 -1
  12. package/{dist/es2015/main.d.ts → main.d.ts} +0 -0
  13. package/{dist/es2015/message.service.d.ts → message.service.d.ts} +9 -2
  14. package/package.json +31 -102
  15. package/{dist/es2015/rtl.d.ts → rtl.d.ts} +0 -0
  16. package/dist/cdn/js/kendo-angular-l10n.js +0 -20
  17. package/dist/cdn/main.js +0 -5
  18. package/dist/es/component-messages.js +0 -44
  19. package/dist/es/localization.service.js +0 -94
  20. package/dist/es/message.service.js +0 -43
  21. package/dist/es/rtl.js +0 -15
  22. package/dist/es2015/index.d.ts +0 -8
  23. package/dist/es2015/index.metadata.json +0 -1
  24. package/dist/es2015/main.js +0 -8
  25. package/dist/fesm5/index.js +0 -184
  26. package/dist/npm/component-messages.js +0 -46
  27. package/dist/npm/index.js +0 -11
  28. package/dist/npm/localization.service.js +0 -96
  29. package/dist/npm/main.js +0 -11
  30. package/dist/npm/message.service.js +0 -45
  31. package/dist/npm/rtl.js +0 -17
  32. package/dist/systemjs/kendo-angular-l10n.js +0 -5
@@ -1,94 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 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 tslib_1 from "tslib";
6
- import { Inject, Injectable, Optional, InjectionToken } from '@angular/core';
7
- import { MessageService } from './message.service';
8
- import { RTL } from './rtl';
9
- import { BehaviorSubject } from 'rxjs';
10
- import { map, tap } from 'rxjs/operators';
11
- /**
12
- * Localization prefix for the component messages.
13
- *
14
- * For internal use.
15
- * @hidden
16
- */
17
- export var L10N_PREFIX = new InjectionToken('Localization key prefix');
18
- /**
19
- * Component localization service.
20
- *
21
- * For internal use.
22
- * @hidden
23
- */
24
- var LocalizationService = /** @class */ (function () {
25
- function LocalizationService(prefix, messageService, _rtl) {
26
- var _this = this;
27
- this.prefix = prefix;
28
- this.messageService = messageService;
29
- this._rtl = _rtl;
30
- this.changes = new BehaviorSubject({ rtl: this._rtl });
31
- this.dictionary = {};
32
- if (messageService) {
33
- this.subscription = messageService.changes
34
- .pipe(map(function (_a) {
35
- var rtl = _a.rtl;
36
- return rtl !== undefined ? rtl : _this._rtl;
37
- }), tap(function (rtl) { return _this._rtl = rtl; }))
38
- .subscribe(function (rtl) {
39
- _this.dictionary = {};
40
- _this.changes.next({ rtl: rtl });
41
- });
42
- }
43
- }
44
- Object.defineProperty(LocalizationService.prototype, "rtl", {
45
- get: function () {
46
- return this._rtl;
47
- },
48
- enumerable: true,
49
- configurable: true
50
- });
51
- LocalizationService.prototype.ngOnDestroy = function () {
52
- if (this.subscription) {
53
- this.subscription.unsubscribe();
54
- }
55
- };
56
- LocalizationService.prototype.get = function (shortKey) {
57
- var key = this.key(shortKey);
58
- return this.dictionary[key];
59
- };
60
- LocalizationService.prototype.register = function (shortKey, value, override) {
61
- if (override === void 0) { override = false; }
62
- var key = this.key(shortKey);
63
- var message = value;
64
- if (!override) {
65
- if (this.dictionary.hasOwnProperty(key)) {
66
- return;
67
- }
68
- message = this.defaultValue(key, value);
69
- }
70
- this.dictionary[key] = message;
71
- };
72
- LocalizationService.prototype.notifyChanges = function () {
73
- this.changes.next({ rtl: this.rtl });
74
- };
75
- LocalizationService.prototype.key = function (shortKey) {
76
- return this.prefix + '.' + shortKey;
77
- };
78
- LocalizationService.prototype.defaultValue = function (key, value) {
79
- if (!this.messageService) {
80
- return value;
81
- }
82
- var alt = this.messageService.get(key);
83
- return (alt === undefined) ? value : alt;
84
- };
85
- LocalizationService = tslib_1.__decorate([
86
- Injectable(),
87
- tslib_1.__param(0, Inject(L10N_PREFIX)),
88
- tslib_1.__param(1, Optional()),
89
- tslib_1.__param(2, Optional()), tslib_1.__param(2, Inject(RTL)),
90
- tslib_1.__metadata("design:paramtypes", [String, MessageService, Boolean])
91
- ], LocalizationService);
92
- return LocalizationService;
93
- }());
94
- export { LocalizationService };
@@ -1,43 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 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 tslib_1 from "tslib";
6
- import { Injectable } from '@angular/core';
7
- import { BehaviorSubject } from 'rxjs';
8
- /* tslint:disable:max-line-length */
9
- /**
10
- * A base class for a service that returns localized messages.
11
- *
12
- * For more information, refer to the section on [using the message service]({% slug messages_l10n %}#toc-using-the-message-service).
13
- */
14
- var MessageService = /** @class */ (function () {
15
- function MessageService() {
16
- /**
17
- * @hidden
18
- */
19
- this.changes = new BehaviorSubject({ rtl: undefined });
20
- }
21
- /**
22
- * Notifies the components that the messages were changed.
23
- *
24
- * @param rtl - (Optional) A new value for the [text direction token]({% slug api_l10n_rtl %}).
25
- */
26
- MessageService.prototype.notify = function (rtl) {
27
- this.changes.next({ rtl: rtl });
28
- };
29
- /**
30
- * Returns a localized message for the supplied key.
31
- *
32
- * @param key - The message key. For example, `"kendo.grid.noRecords"`.
33
- * @return - The localized message for this key or `undefined` if not found.
34
- */
35
- MessageService.prototype.get = function (key) {
36
- return undefined;
37
- };
38
- MessageService = tslib_1.__decorate([
39
- Injectable()
40
- ], MessageService);
41
- return MessageService;
42
- }());
43
- export { MessageService };
package/dist/es/rtl.js DELETED
@@ -1,15 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 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
- * A token that specifies the text direction of Kendo UI for Angular components.
8
- *
9
- * @example
10
- * {% embed_file rtl/app.module.ts preview %}
11
- * {% embed_file rtl/app.component.ts %}
12
- * {% embed_file shared/main.ts hidden %}
13
- *
14
- */
15
- export var RTL = new InjectionToken("Kendo UI Right-to-Left token");
@@ -1,8 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 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 './main';
@@ -1 +0,0 @@
1
- {"__symbolic":"module","version":4,"metadata":{"MessageService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":10,"character":1}}],"members":{"notify":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"}]}},"ComponentMessages":{"__symbolic":"class","members":{"ngOnChanges":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"register":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}},"L10N_PREFIX":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":13,"character":31},"arguments":["Localization key prefix"]},"LocalizationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":21,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":29,"character":5},"arguments":[{"__symbolic":"reference","name":"L10N_PREFIX"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":30,"character":5}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":31,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":31,"character":17},"arguments":[{"__symbolic":"reference","name":"RTL"}]}]],"parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"MessageService"},{"__symbolic":"reference","name":"boolean"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"}],"register":[{"__symbolic":"method"}],"notifyChanges":[{"__symbolic":"method"}],"key":[{"__symbolic":"method"}],"defaultValue":[{"__symbolic":"method"}]}},"RTL":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":11,"character":23},"arguments":["Kendo UI Right-to-Left token"]}},"origins":{"MessageService":"./message.service","ComponentMessages":"./component-messages","L10N_PREFIX":"./localization.service","LocalizationService":"./localization.service","RTL":"./rtl"},"importAs":"@progress/kendo-angular-l10n"}
@@ -1,8 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 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,184 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { __decorate, __param, __metadata } from 'tslib';
6
- import { Injectable, InjectionToken, Inject, Optional } from '@angular/core';
7
- import { BehaviorSubject } from 'rxjs';
8
- import { skip, map, tap } from 'rxjs/operators';
9
-
10
- /* tslint:disable:max-line-length */
11
- /**
12
- * A base class for a service that returns localized messages.
13
- *
14
- * For more information, refer to the section on [using the message service]({% slug messages_l10n %}#toc-using-the-message-service).
15
- */
16
- var MessageService = /** @class */ (function () {
17
- function MessageService() {
18
- /**
19
- * @hidden
20
- */
21
- this.changes = new BehaviorSubject({ rtl: undefined });
22
- }
23
- /**
24
- * Notifies the components that the messages were changed.
25
- *
26
- * @param rtl - (Optional) A new value for the [text direction token]({% slug api_l10n_rtl %}).
27
- */
28
- MessageService.prototype.notify = function (rtl) {
29
- this.changes.next({ rtl: rtl });
30
- };
31
- /**
32
- * Returns a localized message for the supplied key.
33
- *
34
- * @param key - The message key. For example, `"kendo.grid.noRecords"`.
35
- * @return - The localized message for this key or `undefined` if not found.
36
- */
37
- MessageService.prototype.get = function (key) {
38
- return undefined;
39
- };
40
- MessageService = __decorate([
41
- Injectable()
42
- ], MessageService);
43
- return MessageService;
44
- }());
45
-
46
- /**
47
- * Base class that acts as a component messages container.
48
- *
49
- * For internal use.
50
- * @hidden
51
- */
52
- var ComponentMessages = /** @class */ (function () {
53
- function ComponentMessages() {
54
- }
55
- Object.defineProperty(ComponentMessages.prototype, "override", {
56
- get: function () {
57
- return false;
58
- },
59
- enumerable: true,
60
- configurable: true
61
- });
62
- ComponentMessages.prototype.ngOnChanges = function (changes) {
63
- this.register(changes);
64
- if (Object.keys(changes).some(function (field) { return !changes[field].isFirstChange(); })) {
65
- this.service.notifyChanges();
66
- }
67
- };
68
- ComponentMessages.prototype.ngOnInit = function () {
69
- var _this = this;
70
- this.subscription = this.service.changes.pipe(skip(1)).subscribe(function () { return _this.register(_this); });
71
- };
72
- ComponentMessages.prototype.register = function (changes) {
73
- var _this = this;
74
- var keys = Object.keys(changes);
75
- keys.forEach(function (key) { return _this.service.register(key, _this[key], _this.override); });
76
- };
77
- ComponentMessages.prototype.ngOnDestroy = function () {
78
- if (this.subscription) {
79
- this.subscription.unsubscribe();
80
- }
81
- };
82
- return ComponentMessages;
83
- }());
84
-
85
- /**
86
- * A token that specifies the text direction of Kendo UI for Angular components.
87
- *
88
- * @example
89
- * {% embed_file rtl/app.module.ts preview %}
90
- * {% embed_file rtl/app.component.ts %}
91
- * {% embed_file shared/main.ts hidden %}
92
- *
93
- */
94
- var RTL = new InjectionToken("Kendo UI Right-to-Left token");
95
-
96
- /**
97
- * Localization prefix for the component messages.
98
- *
99
- * For internal use.
100
- * @hidden
101
- */
102
- var L10N_PREFIX = new InjectionToken('Localization key prefix');
103
- /**
104
- * Component localization service.
105
- *
106
- * For internal use.
107
- * @hidden
108
- */
109
- var LocalizationService = /** @class */ (function () {
110
- function LocalizationService(prefix, messageService, _rtl) {
111
- var _this = this;
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(function (_a) {
120
- var rtl = _a.rtl;
121
- return rtl !== undefined ? rtl : _this._rtl;
122
- }), tap(function (rtl) { return _this._rtl = rtl; }))
123
- .subscribe(function (rtl) {
124
- _this.dictionary = {};
125
- _this.changes.next({ rtl: rtl });
126
- });
127
- }
128
- }
129
- Object.defineProperty(LocalizationService.prototype, "rtl", {
130
- get: function () {
131
- return this._rtl;
132
- },
133
- enumerable: true,
134
- configurable: true
135
- });
136
- LocalizationService.prototype.ngOnDestroy = function () {
137
- if (this.subscription) {
138
- this.subscription.unsubscribe();
139
- }
140
- };
141
- LocalizationService.prototype.get = function (shortKey) {
142
- var key = this.key(shortKey);
143
- return this.dictionary[key];
144
- };
145
- LocalizationService.prototype.register = function (shortKey, value, override) {
146
- if (override === void 0) { override = false; }
147
- var key = this.key(shortKey);
148
- var message = value;
149
- if (!override) {
150
- if (this.dictionary.hasOwnProperty(key)) {
151
- return;
152
- }
153
- message = this.defaultValue(key, value);
154
- }
155
- this.dictionary[key] = message;
156
- };
157
- LocalizationService.prototype.notifyChanges = function () {
158
- this.changes.next({ rtl: this.rtl });
159
- };
160
- LocalizationService.prototype.key = function (shortKey) {
161
- return this.prefix + '.' + shortKey;
162
- };
163
- LocalizationService.prototype.defaultValue = function (key, value) {
164
- if (!this.messageService) {
165
- return value;
166
- }
167
- var alt = this.messageService.get(key);
168
- return (alt === undefined) ? value : alt;
169
- };
170
- LocalizationService = __decorate([
171
- Injectable(),
172
- __param(0, Inject(L10N_PREFIX)),
173
- __param(1, Optional()),
174
- __param(2, Optional()), __param(2, Inject(RTL)),
175
- __metadata("design:paramtypes", [String, MessageService, Boolean])
176
- ], LocalizationService);
177
- return LocalizationService;
178
- }());
179
-
180
- /**
181
- * Generated bundle index. Do not edit.
182
- */
183
-
184
- export { MessageService, ComponentMessages, L10N_PREFIX, LocalizationService, RTL };
@@ -1,46 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var operators_1 = require("rxjs/operators");
8
- /**
9
- * Base class that acts as a component messages container.
10
- *
11
- * For internal use.
12
- * @hidden
13
- */
14
- var ComponentMessages = /** @class */ (function () {
15
- function ComponentMessages() {
16
- }
17
- Object.defineProperty(ComponentMessages.prototype, "override", {
18
- get: function () {
19
- return false;
20
- },
21
- enumerable: true,
22
- configurable: true
23
- });
24
- ComponentMessages.prototype.ngOnChanges = function (changes) {
25
- this.register(changes);
26
- if (Object.keys(changes).some(function (field) { return !changes[field].isFirstChange(); })) {
27
- this.service.notifyChanges();
28
- }
29
- };
30
- ComponentMessages.prototype.ngOnInit = function () {
31
- var _this = this;
32
- this.subscription = this.service.changes.pipe(operators_1.skip(1)).subscribe(function () { return _this.register(_this); });
33
- };
34
- ComponentMessages.prototype.register = function (changes) {
35
- var _this = this;
36
- var keys = Object.keys(changes);
37
- keys.forEach(function (key) { return _this.service.register(key, _this[key], _this.override); });
38
- };
39
- ComponentMessages.prototype.ngOnDestroy = function () {
40
- if (this.subscription) {
41
- this.subscription.unsubscribe();
42
- }
43
- };
44
- return ComponentMessages;
45
- }());
46
- exports.ComponentMessages = ComponentMessages;
package/dist/npm/index.js DELETED
@@ -1,11 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- /**
7
- * Generated bundle index. Do not edit.
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- var tslib_1 = require("tslib");
11
- tslib_1.__exportStar(require("./main"), exports);
@@ -1,96 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- var message_service_1 = require("./message.service");
10
- var rtl_1 = require("./rtl");
11
- var rxjs_1 = require("rxjs");
12
- var operators_1 = require("rxjs/operators");
13
- /**
14
- * Localization prefix for the component messages.
15
- *
16
- * For internal use.
17
- * @hidden
18
- */
19
- exports.L10N_PREFIX = new core_1.InjectionToken('Localization key prefix');
20
- /**
21
- * Component localization service.
22
- *
23
- * For internal use.
24
- * @hidden
25
- */
26
- var LocalizationService = /** @class */ (function () {
27
- function LocalizationService(prefix, messageService, _rtl) {
28
- var _this = this;
29
- this.prefix = prefix;
30
- this.messageService = messageService;
31
- this._rtl = _rtl;
32
- this.changes = new rxjs_1.BehaviorSubject({ rtl: this._rtl });
33
- this.dictionary = {};
34
- if (messageService) {
35
- this.subscription = messageService.changes
36
- .pipe(operators_1.map(function (_a) {
37
- var rtl = _a.rtl;
38
- return rtl !== undefined ? rtl : _this._rtl;
39
- }), operators_1.tap(function (rtl) { return _this._rtl = rtl; }))
40
- .subscribe(function (rtl) {
41
- _this.dictionary = {};
42
- _this.changes.next({ rtl: rtl });
43
- });
44
- }
45
- }
46
- Object.defineProperty(LocalizationService.prototype, "rtl", {
47
- get: function () {
48
- return this._rtl;
49
- },
50
- enumerable: true,
51
- configurable: true
52
- });
53
- LocalizationService.prototype.ngOnDestroy = function () {
54
- if (this.subscription) {
55
- this.subscription.unsubscribe();
56
- }
57
- };
58
- LocalizationService.prototype.get = function (shortKey) {
59
- var key = this.key(shortKey);
60
- return this.dictionary[key];
61
- };
62
- LocalizationService.prototype.register = function (shortKey, value, override) {
63
- if (override === void 0) { override = false; }
64
- var key = this.key(shortKey);
65
- var message = value;
66
- if (!override) {
67
- if (this.dictionary.hasOwnProperty(key)) {
68
- return;
69
- }
70
- message = this.defaultValue(key, value);
71
- }
72
- this.dictionary[key] = message;
73
- };
74
- LocalizationService.prototype.notifyChanges = function () {
75
- this.changes.next({ rtl: this.rtl });
76
- };
77
- LocalizationService.prototype.key = function (shortKey) {
78
- return this.prefix + '.' + shortKey;
79
- };
80
- LocalizationService.prototype.defaultValue = function (key, value) {
81
- if (!this.messageService) {
82
- return value;
83
- }
84
- var alt = this.messageService.get(key);
85
- return (alt === undefined) ? value : alt;
86
- };
87
- LocalizationService = tslib_1.__decorate([
88
- core_1.Injectable(),
89
- tslib_1.__param(0, core_1.Inject(exports.L10N_PREFIX)),
90
- tslib_1.__param(1, core_1.Optional()),
91
- tslib_1.__param(2, core_1.Optional()), tslib_1.__param(2, core_1.Inject(rtl_1.RTL)),
92
- tslib_1.__metadata("design:paramtypes", [String, message_service_1.MessageService, Boolean])
93
- ], LocalizationService);
94
- return LocalizationService;
95
- }());
96
- exports.LocalizationService = LocalizationService;
package/dist/npm/main.js DELETED
@@ -1,11 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- tslib_1.__exportStar(require("./message.service"), exports);
9
- tslib_1.__exportStar(require("./component-messages"), exports);
10
- tslib_1.__exportStar(require("./localization.service"), exports);
11
- tslib_1.__exportStar(require("./rtl"), exports);
@@ -1,45 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var core_1 = require("@angular/core");
9
- var rxjs_1 = require("rxjs");
10
- /* tslint:disable:max-line-length */
11
- /**
12
- * A base class for a service that returns localized messages.
13
- *
14
- * For more information, refer to the section on [using the message service]({% slug messages_l10n %}#toc-using-the-message-service).
15
- */
16
- var MessageService = /** @class */ (function () {
17
- function MessageService() {
18
- /**
19
- * @hidden
20
- */
21
- this.changes = new rxjs_1.BehaviorSubject({ rtl: undefined });
22
- }
23
- /**
24
- * Notifies the components that the messages were changed.
25
- *
26
- * @param rtl - (Optional) A new value for the [text direction token]({% slug api_l10n_rtl %}).
27
- */
28
- MessageService.prototype.notify = function (rtl) {
29
- this.changes.next({ rtl: rtl });
30
- };
31
- /**
32
- * Returns a localized message for the supplied key.
33
- *
34
- * @param key - The message key. For example, `"kendo.grid.noRecords"`.
35
- * @return - The localized message for this key or `undefined` if not found.
36
- */
37
- MessageService.prototype.get = function (key) {
38
- return undefined;
39
- };
40
- MessageService = tslib_1.__decorate([
41
- core_1.Injectable()
42
- ], MessageService);
43
- return MessageService;
44
- }());
45
- exports.MessageService = MessageService;
package/dist/npm/rtl.js DELETED
@@ -1,17 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var core_1 = require("@angular/core");
8
- /**
9
- * A token that specifies the text direction of Kendo UI for Angular components.
10
- *
11
- * @example
12
- * {% embed_file rtl/app.module.ts preview %}
13
- * {% embed_file rtl/app.component.ts %}
14
- * {% embed_file shared/main.ts hidden %}
15
- *
16
- */
17
- exports.RTL = new core_1.InjectionToken("Kendo UI Right-to-Left token");
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- System.register("@progress/kendo-angular-l10n",["tslib","@angular/core","rxjs","rxjs/operators"],function(s){var o,c,u,a;function e(t){return t.__useDefault?t.default:t}return{setters:[function(t){o=e(t)},function(t){c=e(t)},function(t){u=e(t)},function(t){a=e(t)}],execute:function(){function r(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}var n,i;n=[function(t,e){t.exports=c},function(t,e){t.exports=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});n=n(0);e.RTL=new n.InjectionToken("Kendo UI Right-to-Left token")},function(t,e){t.exports=a},function(t,e){t.exports=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),o=n(4),n=(s.prototype.notify=function(t){this.changes.next({rtl:t})},s.prototype.get=function(t){},r.__decorate([i.Injectable()],s));function s(){this.changes=new o.BehaviorSubject({rtl:void 0})}e.MessageService=n},function(a,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=e(1),r=e(0),i=e(5),o=e(2),s=e(4),c=e(3),e=(t.L10N_PREFIX=new r.InjectionToken("Localization key prefix"),Object.defineProperty(u.prototype,"rtl",{get:function(){return this._rtl},enumerable:!0,configurable:!0}),u.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},u.prototype.get=function(t){t=this.key(t);return this.dictionary[t]},u.prototype.register=function(t,e,n){void 0===n&&(n=!1);var t=this.key(t),r=e;if(!n){if(this.dictionary.hasOwnProperty(t))return;r=this.defaultValue(t,e)}this.dictionary[t]=r},u.prototype.notifyChanges=function(){this.changes.next({rtl:this.rtl})},u.prototype.key=function(t){return this.prefix+"."+t},u.prototype.defaultValue=function(t,e){if(!this.messageService)return e;t=this.messageService.get(t);return void 0===t?e:t},n.__decorate([r.Injectable(),n.__param(0,r.Inject(t.L10N_PREFIX)),n.__param(1,r.Optional()),n.__param(2,r.Optional()),n.__param(2,r.Inject(o.RTL)),n.__metadata("design:paramtypes",[String,i.MessageService,Boolean])],u));function u(t,e,n){var r=this;this.prefix=t,this.messageService=e,this._rtl=n,this.changes=new s.BehaviorSubject({rtl:this._rtl}),this.dictionary={},e&&(this.subscription=e.changes.pipe(c.map(function(t){t=t.rtl;return void 0!==t?t:r._rtl}),c.tap(function(t){return r._rtl=t})).subscribe(function(t){r.dictionary={},r.changes.next({rtl:t})}))}t.LocalizationService=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3);function i(){}Object.defineProperty(i.prototype,"override",{get:function(){return!1},enumerable:!0,configurable:!0}),i.prototype.ngOnChanges=function(e){this.register(e),Object.keys(e).some(function(t){return!e[t].isFirstChange()})&&this.service.notifyChanges()},i.prototype.ngOnInit=function(){var t=this;this.subscription=this.service.changes.pipe(r.skip(1)).subscribe(function(){return t.register(t)})},i.prototype.register=function(t){var e=this;Object.keys(t).forEach(function(t){return e.service.register(t,e[t],e.override)})},i.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.ComponentMessages=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(1),o=(i.__exportStar(n(5),e),i.__exportStar(n(7),e),i.__exportStar(n(6),e),i.__exportStar(n(2),e),e);for(r in o)s(r,o[r])}],i={},r.m=n,r.c=i,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=8)}}});