@progress/kendo-angular-intl 21.4.1-develop.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.
@@ -15,8 +15,8 @@ const packageMetadata = {
15
15
  productName: 'Kendo UI for Angular',
16
16
  productCode: 'KENDOUIANGULAR',
17
17
  productCodes: ['KENDOUIANGULAR'],
18
- publishDate: 1768386338,
19
- version: '21.4.1-develop.1',
18
+ publishDate: 1768395779,
19
+ version: '22.0.0-develop.1',
20
20
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
21
21
  };
22
22
 
@@ -167,10 +167,10 @@ class IntlService {
167
167
  notify() {
168
168
  this.changes.emit();
169
169
  }
170
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IntlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
171
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IntlService, providedIn: 'root', useFactory: cldrServiceFactory, deps: [{ token: LOCALE_ID }] });
170
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: IntlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
171
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: IntlService, providedIn: 'root', useFactory: cldrServiceFactory, deps: [{ token: LOCALE_ID }] });
172
172
  }
173
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IntlService, decorators: [{
173
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: IntlService, decorators: [{
174
174
  type: Injectable,
175
175
  args: [{
176
176
  providedIn: 'root',
@@ -376,10 +376,10 @@ class CldrIntlService extends IntlService {
376
376
  weekendRange(localeId) {
377
377
  return weekendRange(localeId || this.localeId);
378
378
  }
379
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CldrIntlService, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });
380
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CldrIntlService });
379
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: CldrIntlService, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });
380
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: CldrIntlService });
381
381
  }
382
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CldrIntlService, decorators: [{
382
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: CldrIntlService, decorators: [{
383
383
  type: Injectable
384
384
  }], ctorParameters: () => [{ type: undefined, decorators: [{
385
385
  type: Inject,
@@ -433,10 +433,10 @@ class DatePipe {
433
433
  }
434
434
  return value;
435
435
  }
436
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DatePipe, deps: [{ token: IntlService }], target: i0.ɵɵFactoryTarget.Pipe });
437
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: DatePipe, isStandalone: true, name: "kendoDate" });
436
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: DatePipe, deps: [{ token: IntlService }], target: i0.ɵɵFactoryTarget.Pipe });
437
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: DatePipe, isStandalone: true, name: "kendoDate" });
438
438
  }
439
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DatePipe, decorators: [{
439
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: DatePipe, decorators: [{
440
440
  type: Pipe,
441
441
  args: [{
442
442
  name: 'kendoDate',
@@ -484,10 +484,10 @@ class NumberPipe {
484
484
  }
485
485
  return value;
486
486
  }
487
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NumberPipe, deps: [{ token: IntlService }], target: i0.ɵɵFactoryTarget.Pipe });
488
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: NumberPipe, isStandalone: true, name: "kendoNumber" });
487
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: NumberPipe, deps: [{ token: IntlService }], target: i0.ɵɵFactoryTarget.Pipe });
488
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: NumberPipe, isStandalone: true, name: "kendoNumber" });
489
489
  }
490
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NumberPipe, decorators: [{
490
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: NumberPipe, decorators: [{
491
491
  type: Pipe,
492
492
  args: [{
493
493
  name: 'kendoNumber',
@@ -521,11 +521,11 @@ const KENDO_INTL = [
521
521
  * definition for the Intl services.
522
522
  */
523
523
  class IntlModule {
524
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IntlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
525
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: IntlModule, imports: [NumberPipe, DatePipe], exports: [NumberPipe, DatePipe] });
526
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IntlModule });
524
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: IntlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
525
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: IntlModule, imports: [NumberPipe, DatePipe], exports: [NumberPipe, DatePipe] });
526
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: IntlModule });
527
527
  }
528
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IntlModule, decorators: [{
528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: IntlModule, decorators: [{
529
529
  type: NgModule,
530
530
  args: [{
531
531
  imports: [...KENDO_INTL],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-intl",
3
- "version": "21.4.1-develop.1",
3
+ "version": "22.0.0-develop.1",
4
4
  "description": "Kendo UI Internationalization for Angular components",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -15,13 +15,7 @@
15
15
  "i18n"
16
16
  ],
17
17
  "@progress": {
18
- "friendlyName": "Internationalization",
19
- "package": {
20
- "productName": "Kendo UI for Angular",
21
- "productCode": "KENDOUIANGULAR",
22
- "publishDate": 1768386338,
23
- "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
24
- }
18
+ "friendlyName": "Internationalization"
25
19
  },
26
20
  "assets": [
27
21
  "locales"
@@ -30,17 +24,17 @@
30
24
  "./locales/**/*"
31
25
  ],
32
26
  "peerDependencies": {
33
- "@angular/animations": "18 - 21",
34
- "@angular/common": "18 - 21",
35
- "@angular/core": "18 - 21",
36
- "@angular/platform-browser": "18 - 21",
37
- "@progress/kendo-angular-common": "21.4.1-develop.1",
27
+ "@angular/animations": "19 - 21",
28
+ "@angular/common": "19 - 21",
29
+ "@angular/core": "19 - 21",
30
+ "@angular/platform-browser": "19 - 21",
31
+ "@progress/kendo-angular-common": "22.0.0-develop.1",
38
32
  "@progress/kendo-licensing": "^1.7.0",
39
33
  "rxjs": "^6.5.3 || ^7.0.0"
40
34
  },
41
35
  "dependencies": {
42
36
  "tslib": "^2.3.1",
43
- "@progress/kendo-angular-schematics": "21.4.1-develop.1",
37
+ "@progress/kendo-angular-schematics": "22.0.0-develop.1",
44
38
  "@progress/kendo-intl": "3.2.1"
45
39
  },
46
40
  "schematics": "./schematics/collection.json",
@@ -51,8 +45,6 @@
51
45
  },
52
46
  ".": {
53
47
  "types": "./index.d.ts",
54
- "esm2022": "./esm2022/progress-kendo-angular-intl.mjs",
55
- "esm": "./esm2022/progress-kendo-angular-intl.mjs",
56
48
  "default": "./fesm2022/progress-kendo-angular-intl.mjs"
57
49
  }
58
50
  },
@@ -1,65 +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 { Pipe } from '@angular/core';
6
- import { IntlService } from './intl.service';
7
- import * as i0 from "@angular/core";
8
- import * as i1 from "./intl.service";
9
- const isNumeric = (value) => !isNaN(value - parseFloat(value));
10
- /**
11
- * Formats a date value to a string based on the requested format.
12
- * This pipe uses the [IntlService]({% slug api_intl_intlservice %}).
13
- *
14
- * @example
15
- * ```html
16
- * <ul>
17
- * <li>{{date | kendoDate }}</li>
18
- * <li>{{milliseconds | kendoDate: 'M/dd/yyy' }}</li>
19
- * <li>{{stringDate | kendoDate: 'G' }}</li>
20
- * </ul>
21
- * ```
22
- */
23
- export class DatePipe {
24
- intlService;
25
- /**
26
- * @hidden
27
- */
28
- constructor(intlService) {
29
- this.intlService = intlService;
30
- }
31
- /**
32
- * Converts a `Date` object into a string based on the specified format.
33
- * If no format is provided, the default short date format is used.
34
- *
35
- * @param value - The date to format.
36
- * @param format - The format string or options (optional).
37
- * @param localeId - The ID of the locale which will be used instead of the default one (optional).
38
- * @returns The formatted date as a string.
39
- */
40
- transform(value, format = "", localeId) {
41
- value = this.normalize(value);
42
- if (value) {
43
- return this.intlService.formatDate(value, format, localeId);
44
- }
45
- return value;
46
- }
47
- normalize(value) {
48
- if (value && typeof value === 'string') {
49
- value = this.intlService.parseDate(value);
50
- }
51
- else if (value && isNumeric(value)) {
52
- value = new Date(parseFloat(value));
53
- }
54
- return value;
55
- }
56
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DatePipe, deps: [{ token: i1.IntlService }], target: i0.ɵɵFactoryTarget.Pipe });
57
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: DatePipe, isStandalone: true, name: "kendoDate" });
58
- }
59
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DatePipe, decorators: [{
60
- type: Pipe,
61
- args: [{
62
- name: 'kendoDate',
63
- standalone: true
64
- }]
65
- }], ctorParameters: () => [{ type: i1.IntlService }] });
@@ -1,25 +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 { DatePipe } from "./date.pipe";
6
- import { NumberPipe } from "./number.pipe";
7
- /**
8
- * Utility array that contains all `kendoNumber` related components and directives.
9
- */
10
- export const KENDO_NUMBER = [
11
- NumberPipe
12
- ];
13
- /**
14
- * Utility array that contains all `kendoDate` related components and directives.
15
- */
16
- export const KENDO_DATE = [
17
- DatePipe
18
- ];
19
- /**
20
- * Utility array that contains all `@progress/kendo-angular-intl` related components and directives.
21
- */
22
- export const KENDO_INTL = [
23
- ...KENDO_NUMBER,
24
- ...KENDO_DATE
25
- ];
@@ -1,19 +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
- const DOCS_URL = 'https://www.telerik.com/kendo-angular-ui/components/internationalization/troubleshooting/';
6
- /**
7
- * @hidden
8
- */
9
- export const errorSolutions = {
10
- 'NoCurrency': `Solution: ${DOCS_URL}#toc-no-currency`,
11
- 'NoCurrencyDisplay': `Solution: ${DOCS_URL}#toc-no-currency-display`,
12
- 'NoCurrencyRegion': `Solution: ${DOCS_URL}#toc-no-currency-region`,
13
- 'NoDateFieldNames': `Solution: ${DOCS_URL}#toc-no-date-filed-names`,
14
- 'NoFirstDay': `Solution: ${DOCS_URL}#toc-no-first-day`,
15
- 'NoGMTInfo': `Solution: ${DOCS_URL}#toc-no-gmt-info`,
16
- 'NoLocale': `Solution: ${DOCS_URL}#toc-no-locale`,
17
- 'NoValidCurrency': `Solution: ${DOCS_URL}#toc-no-valid-currency`,
18
- 'NoWeekData': `Solution: ${DOCS_URL}#toc-no-week-data`
19
- };
package/esm2022/index.mjs DELETED
@@ -1,11 +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 './intl.service';
6
- export * from './date.pipe';
7
- export * from './number.pipe';
8
- export * from './intl.module';
9
- export * from './intl-members';
10
- export * from './locale-data.interface';
11
- export * from './directives';
@@ -1,106 +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 * as intl from '@progress/kendo-intl';
6
- import { errorSolutions } from './error-solutions';
7
- function formatMessage(error) {
8
- const message = error.message;
9
- const errorSolution = errorSolutions[Object.keys(errorSolutions).filter(key => message.indexOf(key) === 0)[0]];
10
- return errorSolution ? `${message} ${errorSolution}` : message;
11
- }
12
- function intlMethod(fn) {
13
- return function (...values) {
14
- try {
15
- return fn(...values);
16
- }
17
- catch (error) {
18
- error.message = formatMessage(error);
19
- throw error;
20
- }
21
- };
22
- }
23
- /**
24
- * Wraps Kendo Intl methods to provide enhanced error handling and documentation for the Kendo Angular Intl package.
25
- *
26
- * Includes utility functions for formatting, parsing, and retrieving locale data, as well as error message enhancements.
27
- *
28
- * @example
29
- * ```ts
30
- * import { formatDate, parseNumber, localeData } from '@progress/kendo-angular-intl';
31
- * const formatted = formatDate(new Date(), { date: 'short' });
32
- * ```
33
- */
34
- /**
35
- * @hidden
36
- */
37
- export const dateFormatNames = intlMethod(intl.dateFormatNames);
38
- /**
39
- * @hidden
40
- */
41
- export const dateFieldName = intlMethod(intl.dateFieldName);
42
- /**
43
- * @hidden
44
- */
45
- export const firstDay = intlMethod(intl.firstDay);
46
- /**
47
- * @hidden
48
- */
49
- export const format = intlMethod(intl.format);
50
- /**
51
- * @hidden
52
- */
53
- export const formatDate = intlMethod(intl.formatDate);
54
- /**
55
- * @hidden
56
- */
57
- export const formatNumber = intlMethod(intl.formatNumber);
58
- /**
59
- * @hidden
60
- */
61
- export const load = intlMethod(intl.load);
62
- /**
63
- * @hidden
64
- */
65
- export const numberSymbols = intlMethod(intl.numberSymbols);
66
- /**
67
- * @hidden
68
- */
69
- export const parseDate = intlMethod(intl.parseDate);
70
- /**
71
- * @hidden
72
- */
73
- export const parseNumber = intlMethod(intl.parseNumber);
74
- /**
75
- * @hidden
76
- */
77
- export const splitDateFormat = intlMethod(intl.splitDateFormat);
78
- /**
79
- * @hidden
80
- */
81
- export const toString = intlMethod(intl.toString);
82
- /**
83
- * @hidden
84
- */
85
- export const weekendRange = intlMethod(intl.weekendRange);
86
- /**
87
- * Sets a pre-built locale.
88
- *
89
- * @param data - The pre-built locale data.
90
- */
91
- export const setData = (data) => intl.setData(data);
92
- /**
93
- * Retrieves the locale data for the specified locale.
94
- *
95
- * @param locale - The locale ID.
96
- * @returns The locale data.
97
- */
98
- export const localeData = (locale) => {
99
- try {
100
- return intl.localeInfo(locale);
101
- }
102
- catch (error) {
103
- error.message = formatMessage(error);
104
- throw error;
105
- }
106
- };
@@ -1,26 +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 { NgModule } from '@angular/core';
6
- import { KENDO_INTL } from './directives';
7
- import * as i0 from "@angular/core";
8
- import * as i1 from "./number.pipe";
9
- import * as i2 from "./date.pipe";
10
- //IMPORTANT: NgModule export kept for backwards compatibility
11
- /**
12
- * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
13
- * definition for the Intl services.
14
- */
15
- export class IntlModule {
16
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IntlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
17
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: IntlModule, imports: [i1.NumberPipe, i2.DatePipe], exports: [i1.NumberPipe, i2.DatePipe] });
18
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IntlModule });
19
- }
20
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IntlModule, decorators: [{
21
- type: NgModule,
22
- args: [{
23
- imports: [...KENDO_INTL],
24
- exports: [...KENDO_INTL]
25
- }]
26
- }] });
@@ -1,257 +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, EventEmitter, Inject, LOCALE_ID } from '@angular/core';
6
- import { validatePackage } from '@progress/kendo-licensing';
7
- import { packageMetadata } from './package-metadata';
8
- import { formatDate, parseDate, dateFieldName, dateFormatNames, firstDay, splitDateFormat, weekendRange, format as intlFormat, toString, parseNumber, formatNumber, numberSymbols } from './intl-members';
9
- import * as i0 from "@angular/core";
10
- const LOCALE_REGEX = /_/g;
11
- /**
12
- * @hidden
13
- */
14
- export function cldrServiceFactory(localeId) {
15
- return new CldrIntlService(localeId);
16
- }
17
- /**
18
- * Represents the abstract base class for the Kendo UI for Angular Internationalization service.
19
- * Provides methods for formatting and parsing dates, numbers, and strings according to the current locale.
20
- *
21
- * Extend this class to implement custom internationalization logic or use the default CLDR-based implementation.
22
- */
23
- export class IntlService {
24
- /**
25
- * @hidden
26
- */
27
- changes = new EventEmitter();
28
- /**
29
- * @hidden
30
- */
31
- constructor() {
32
- validatePackage(packageMetadata);
33
- }
34
- /**
35
- * Specifies that the service was changed.
36
- */
37
- notify() {
38
- this.changes.emit();
39
- }
40
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IntlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
41
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IntlService, providedIn: 'root', useFactory: cldrServiceFactory, deps: [{ token: LOCALE_ID }] });
42
- }
43
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: IntlService, decorators: [{
44
- type: Injectable,
45
- args: [{
46
- providedIn: 'root',
47
- useFactory: cldrServiceFactory,
48
- deps: [LOCALE_ID]
49
- }]
50
- }], ctorParameters: () => [] });
51
- /**
52
- * Represents the Internationalization service implemented using the CLDR Database via the `@progress/kendo-intl` package.
53
- * Provides locale-aware formatting and parsing for dates, numbers, and strings.
54
- *
55
- * @example
56
- * ```ts
57
- * import { CldrIntlService } from '@progress/kendo-angular-intl';
58
- * const intl = new CldrIntlService('en-US');
59
- * intl.formatDate(new Date(), { date: 'short' });
60
- * ```
61
- */
62
- export class CldrIntlService extends IntlService {
63
- locale;
64
- /**
65
- * Specifies or gets the current locale ID.
66
- */
67
- get localeId() {
68
- return this.locale;
69
- }
70
- set localeId(value) {
71
- // Angular locales use underscore, for example, en_US
72
- // while IETF BCP-47 specifies a dash.
73
- // https://tools.ietf.org/html/bcp47
74
- const locale = value.replace(LOCALE_REGEX, '-');
75
- if (locale !== this.locale) {
76
- this.locale = locale;
77
- this.notify();
78
- }
79
- }
80
- /**
81
- * Creates a new instance of the service with the ID of the specified locale.
82
- *
83
- * Note that the parts of the locale ID can be separated by either `_` (underscore)
84
- * or `-` (dash).
85
- *
86
- * @param localeId - The default locale ID.
87
- */
88
- constructor(localeId) {
89
- super();
90
- this.localeId = localeId;
91
- }
92
- /**
93
- * Formats a string with placeholders such as
94
- * `Total amount {0:c}`.
95
- *
96
- * @param format - The format string.
97
- * @param values - One or more values to output in the format string placeholders.
98
- * @returns The formatted string.
99
- */
100
- format(format, ...values) {
101
- return intlFormat(format, values, this.localeId);
102
- }
103
- /**
104
- * Converts an object into a string based on the specified format.
105
- *
106
- * @param value - The value to format.
107
- * @param format - The format to use.
108
- * @param localeId - The locale ID to use in place of the default one (optional).
109
- * @returns The formatted object as a string.
110
- */
111
- toString(value, format, localeId) {
112
- return toString(value, format, localeId || this.localeId);
113
- }
114
- /**
115
- * Converts a `Date` object into a string based on the specified format.
116
- * If no format is provided, the default short date format is used.
117
- *
118
- * @param value - The date to format.
119
- * @param format - The format string or options (optional).
120
- * @param localeId - The locale ID to use in place of the default one (optional).
121
- * @returns The formatted date as a string.
122
- */
123
- formatDate(value, format, localeId) {
124
- return formatDate(value, format, localeId || this.localeId);
125
- }
126
- /**
127
- * Converts a string into a `Date` object based on the specified format.
128
- *
129
- * @param value - The string to convert.
130
- * @param format - The format strings or options (optional).
131
- * @param localeId - The locale ID to use in place of the default one (optional).
132
- * @returns The parsed date.
133
- */
134
- parseDate(value, format, localeId) {
135
- return parseDate(value, format, localeId || this.localeId);
136
- }
137
- /**
138
- * Converts a string into a `Number`.
139
- *
140
- * @param value - The string to convert.
141
- * @param format - The format string or options (optional).
142
- * @param localeId - The locale ID to use in place of the default one (optional).
143
- * @returns The parsed number.
144
- */
145
- parseNumber(value, format, localeId) {
146
- return parseNumber(value, localeId || this.localeId, format);
147
- }
148
- /**
149
- * Converts a `Number` into a string based on the specified format.
150
- *
151
- * @param value - The number to format.
152
- * @param format - The format string or options.
153
- * @param localeId - The locale ID to use in place of the default one (optional).
154
- * @returns The formatted number as a string.
155
- */
156
- formatNumber(value, format, localeId) {
157
- return formatNumber(value, format, localeId || this.localeId);
158
- }
159
- /**
160
- * Returns the date names from the current locale based on the option.
161
- *
162
- * The available `type` values are:
163
- * - `era`
164
- * - `year`
165
- * - `quarter`
166
- * - `month`
167
- * - `week`
168
- * - `day`
169
- * - `dayperiod`
170
- * - `hour`
171
- * - `minute`
172
- * - `second`
173
- * - `zone`
174
- *
175
- * The available `nameType` values are:
176
- * - `wide`
177
- * - `narrow`
178
- * - `short`
179
- *
180
- * @param options - Detailed configuration for the desired date field name.
181
- * @param localeId - The locale ID to use in place of the default one (optional).
182
- * @returns The day names from the current locale based on the option.
183
- *
184
- * @example
185
- * ```ts
186
- * dateFieldName({ type: 'day' }); //returns 'day';
187
- * dateFieldName({ type: 'day', nameType: 'wide' }); //returns 'day';
188
- * dateFieldName({ type: 'month', nameType: 'short' }); //returns 'mo.';
189
- * dateFieldName({ type: 'month', nameType: 'wide' }); //returns 'month';
190
- * ```
191
- */
192
- dateFieldName(options, localeId) {
193
- return dateFieldName(options, localeId || this.localeId);
194
- }
195
- /**
196
- * Returns a localized date field name based on specific `dateFieldName` options.
197
- *
198
- * The available type values are:
199
- * - `day`
200
- * - `dayperiod`
201
- * - `months`
202
- * - `quarters`
203
- * - `eras`
204
- *
205
- * @param options - Detailed configuration for the desired date format.
206
- * @param localeId - The locale ID to use in place of the default one (optional).
207
- * @returns The day names from the current locale based on the option.
208
- */
209
- dateFormatNames(options, localeId) {
210
- return dateFormatNames(localeId || this.localeId, options);
211
- }
212
- /**
213
- * Splits the date format into objects containing information about each part of the pattern.
214
- *
215
- * @param format - The format string or options.
216
- * @param localeId - The locale ID to use (optional). If not specified, the `"en"` locale ID is used.
217
- * @returns The date format parts.
218
- */
219
- splitDateFormat(format, localeId) {
220
- return splitDateFormat(format, localeId || this.localeId);
221
- }
222
- /**
223
- * Returns the number symbols from the current locale based on the option.
224
- *
225
- * @param localeId - The locale ID to use in place of the default one (optional).
226
- * @returns The number symbols from the current locale.
227
- */
228
- numberSymbols(localeId) {
229
- return numberSymbols(localeId || this.localeId);
230
- }
231
- /**
232
- * Returns the first day index starting from Sunday.
233
- *
234
- * @param localeId - The locale ID (optional). Defaults to the current locale ID.
235
- * @returns The index of the first day of the week (0 == Sunday).
236
- */
237
- firstDay(localeId) {
238
- return firstDay(localeId || this.localeId);
239
- }
240
- /**
241
- * Returns the start and end index of the locale weekend starting from Sunday.
242
- *
243
- * @param localeId - The locale ID (optional). Defaults to the current locale ID.
244
- * @returns The start and end index of the locale weekend (0 == Sunday).
245
- */
246
- weekendRange(localeId) {
247
- return weekendRange(localeId || this.localeId);
248
- }
249
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CldrIntlService, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });
250
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CldrIntlService });
251
- }
252
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CldrIntlService, decorators: [{
253
- type: Injectable
254
- }], ctorParameters: () => [{ type: undefined, decorators: [{
255
- type: Inject,
256
- args: [LOCALE_ID]
257
- }] }] });
@@ -1,5 +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 {};
@@ -1,58 +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 { Pipe } from '@angular/core';
6
- import { IntlService } from './intl.service';
7
- import * as i0 from "@angular/core";
8
- import * as i1 from "./intl.service";
9
- /**
10
- * Formats a number value to a string based on the requested format.
11
- * This pipe uses the [`IntlService`]({% slug api_intl_intlservice %}).
12
- *
13
- * @example
14
- * ```ng-template-no-run
15
- * <ul>
16
- * <li>{{decimal | kendoNumber:'c' }}</li>
17
- * <li>{{stringNumber | kendoNumber:'p' }}</li>
18
- * <li>{{int | kendoNumber:'##.00' }}</li>
19
- * </ul>
20
- * ```
21
- */
22
- export class NumberPipe {
23
- intlService;
24
- /**
25
- * @hidden
26
- */
27
- constructor(intlService) {
28
- this.intlService = intlService;
29
- }
30
- /**
31
- * Converts a `Number` object into a string based on the specified format.
32
- * If no format is provided, the value is formatted as decimal number using the
33
- * [`"n"`](https://github.com/telerik/kendo-intl/blob/master/docs/num-formatting/index.md#standard) format.
34
- *
35
- * @param value - The number that will be formatted.
36
- * @param format - The format string or options (optional).
37
- * @param localeId - The locale ID that will be used in place of the default one (optional).
38
- * @returns The formatted number as a string.
39
- */
40
- transform(value, format, localeId) {
41
- if (typeof value === 'string') {
42
- value = this.intlService.parseNumber(value);
43
- }
44
- if (value !== null && value !== undefined) {
45
- return this.intlService.formatNumber(value, format, localeId);
46
- }
47
- return value;
48
- }
49
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NumberPipe, deps: [{ token: i1.IntlService }], target: i0.ɵɵFactoryTarget.Pipe });
50
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: NumberPipe, isStandalone: true, name: "kendoNumber" });
51
- }
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NumberPipe, decorators: [{
53
- type: Pipe,
54
- args: [{
55
- name: 'kendoNumber',
56
- standalone: true
57
- }]
58
- }], ctorParameters: () => [{ type: i1.IntlService }] });
@@ -1,16 +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
- * @hidden
7
- */
8
- export const packageMetadata = {
9
- name: '@progress/kendo-angular-intl',
10
- productName: 'Kendo UI for Angular',
11
- productCode: 'KENDOUIANGULAR',
12
- productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1768386338,
14
- version: '21.4.1-develop.1',
15
- licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
- };
@@ -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';