@progress/kendo-react-intl 7.2.4-develop.3 → 7.3.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/Intl/IntlProvider.js +8 -0
- package/Intl/IntlProvider.mjs +33 -0
- package/Intl/IntlService.js +8 -0
- package/Intl/IntlService.mjs +140 -0
- package/Localization/LocalizationProvider.js +8 -0
- package/Localization/LocalizationProvider.mjs +33 -0
- package/Localization/LocalizationService.js +8 -0
- package/Localization/LocalizationService.mjs +31 -0
- package/Localization/loadMessages.js +8 -0
- package/Localization/loadMessages.mjs +28 -0
- package/Localization/messages.js +8 -0
- package/Localization/messages.mjs +12 -0
- package/dist/cdn/js/kendo-react-intl.js +8 -5
- package/globalization/GlobalizationContext.js +8 -0
- package/globalization/GlobalizationContext.mjs +18 -0
- package/hooks/useInternationalization.js +8 -0
- package/hooks/useInternationalization.mjs +14 -0
- package/hooks/useLocalization.js +8 -0
- package/hooks/useLocalization.mjs +14 -0
- package/index.d.mts +277 -5
- package/index.d.ts +277 -11
- package/index.js +8 -5
- package/index.mjs +32 -250
- package/intlUtils.js +8 -0
- package/intlUtils.mjs +35 -0
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +19 -0
- package/package.json +2 -2
- package/Intl/IntlProvider.d.ts +0 -27
- package/Intl/IntlProviderProps.d.ts +0 -17
- package/Intl/IntlService.d.ts +0 -106
- package/Intl/main.d.ts +0 -8
- package/Localization/LocalizationProvider.d.ts +0 -27
- package/Localization/LocalizationProviderProps.d.ts +0 -17
- package/Localization/LocalizationService.d.ts +0 -20
- package/Localization/loadMessages.d.ts +0 -11
- package/Localization/main.d.ts +0 -9
- package/Localization/messages.d.ts +0 -8
- package/coreExports.d.ts +0 -6
- package/globalization/GlobalizationContext.d.ts +0 -14
- package/hooks/index.d.ts +0 -6
- package/hooks/useInternationalization.d.ts +0 -9
- package/hooks/useLocalization.d.ts +0 -9
- package/intlUtils.d.ts +0 -31
- package/package-metadata.d.ts +0 -9
package/index.mjs
CHANGED
|
@@ -1,253 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
5
8
|
"use client";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
18
|
-
};
|
|
19
|
-
class c {
|
|
20
|
-
/**
|
|
21
|
-
* Creates a new instance of the internationalization service.
|
|
22
|
-
*
|
|
23
|
-
* @param locale - The locale that will be used by the internationalization methods.
|
|
24
|
-
*/
|
|
25
|
-
constructor(e) {
|
|
26
|
-
if (this.locale = e, d(g), e === "" && process.env.NODE_ENV !== "production")
|
|
27
|
-
throw "Locale should not be empty string";
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Formats a string with placeholders such as `Total amount {0:c}`.
|
|
31
|
-
*
|
|
32
|
-
* @param format - The format string.
|
|
33
|
-
* @param values - One or more values to output in the format string placeholders.
|
|
34
|
-
* @return - The formatted string.
|
|
35
|
-
*/
|
|
36
|
-
format(e, ...r) {
|
|
37
|
-
return r.length === 1 && Array.isArray(r[0]) ? o.format(e, r[0], this.locale) : o.format(e, r, this.locale);
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Converts a `Date` object to a string based on the specified format. If no format is provided, the default short date format is used.
|
|
41
|
-
*
|
|
42
|
-
* @param value - The date which will be formatted.
|
|
43
|
-
* @param format - The format string or options.
|
|
44
|
-
* @return - The formatted date.
|
|
45
|
-
*/
|
|
46
|
-
formatDate(e, r) {
|
|
47
|
-
return o.formatDate(e, r, this.locale);
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Converts an object to a string based on the specified format.
|
|
51
|
-
*
|
|
52
|
-
* @param value - The value which will be formatted.
|
|
53
|
-
* @param format - The format to use.
|
|
54
|
-
* @return - The formatted object.
|
|
55
|
-
*/
|
|
56
|
-
toString(e, r) {
|
|
57
|
-
return o.toString(e, r, this.locale);
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Converts a string to a `Number`.
|
|
61
|
-
*
|
|
62
|
-
* @param value - The string which will be parsed.
|
|
63
|
-
* @param format - The format string or options.
|
|
64
|
-
* @return - The parsed number.
|
|
65
|
-
*/
|
|
66
|
-
parseNumber(e, r) {
|
|
67
|
-
return o.parseNumber(e, this.locale, r);
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Converts a string to a `Date` object based on the specified format.
|
|
71
|
-
*
|
|
72
|
-
* @param value - The string which will be converted.
|
|
73
|
-
* @param format - The format strings or options.
|
|
74
|
-
* @return - The parsed date.
|
|
75
|
-
*/
|
|
76
|
-
parseDate(e, r) {
|
|
77
|
-
return o.parseDate(e, r, this.locale);
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Converts a `Number` to a string based on the specified format.
|
|
81
|
-
*
|
|
82
|
-
* @param value - The number which will be formatted.
|
|
83
|
-
* @param format - The format string or options.
|
|
84
|
-
* @return - The formatted number.
|
|
85
|
-
*/
|
|
86
|
-
formatNumber(e, r) {
|
|
87
|
-
return o.formatNumber(e, r, this.locale);
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Returns a localized date field name based on specific `dateFieldName` options.
|
|
91
|
-
*
|
|
92
|
-
* @param options - The detailed configuration for the desired date field name.
|
|
93
|
-
* @returns - The localized date field name from the current locale based on the option.
|
|
94
|
-
*/
|
|
95
|
-
dateFieldName(e) {
|
|
96
|
-
return o.dateFieldName(e, this.locale);
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Returns the day names from the current locale based on the option.
|
|
100
|
-
*
|
|
101
|
-
* @param options - The detailed configuration for the desired date format.
|
|
102
|
-
* @return - The day names from the current locale based on the option.
|
|
103
|
-
*/
|
|
104
|
-
dateFormatNames(e) {
|
|
105
|
-
return o.dateFormatNames(this.locale, e);
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Splits the date format into objects which contain information about each part of the pattern.
|
|
109
|
-
*
|
|
110
|
-
* @param format - The format string or options.
|
|
111
|
-
* @returns - The date format parts.
|
|
112
|
-
*/
|
|
113
|
-
splitDateFormat(e) {
|
|
114
|
-
return o.splitDateFormat(e, this.locale);
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Returns the number symbols from the current locale.
|
|
118
|
-
*
|
|
119
|
-
* @return - The number symbols from the current locale.
|
|
120
|
-
*/
|
|
121
|
-
numberSymbols() {
|
|
122
|
-
return o.numberSymbols(this.locale);
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Returns the first day index, starting from Sunday.
|
|
126
|
-
*
|
|
127
|
-
* @return - The index of the first day of the week (0 == Sunday).
|
|
128
|
-
*/
|
|
129
|
-
firstDay() {
|
|
130
|
-
return o.firstDay(this.locale);
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* @hidden
|
|
134
|
-
*/
|
|
135
|
-
localeInfo() {
|
|
136
|
-
return o.localeInfo(this.locale);
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* @hidden
|
|
140
|
-
*/
|
|
141
|
-
localeCurrency() {
|
|
142
|
-
return o.localeCurrency(this.locale);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
const s = /* @__PURE__ */ Object.create({});
|
|
146
|
-
class u {
|
|
147
|
-
constructor(e) {
|
|
148
|
-
if (this.language = e, e === "" && process.env.NODE_ENV !== "production")
|
|
149
|
-
throw "Language should not be an empty string";
|
|
150
|
-
}
|
|
151
|
-
/* eslint-disable max-len */
|
|
152
|
-
/**
|
|
153
|
-
* Provides a string based on a key for the current language. When no string for the current language is available under this key, the `defaultValue` is returned.
|
|
154
|
-
*
|
|
155
|
-
* @param key - The key which identifies the string for the current language.
|
|
156
|
-
* @param defaultValue - The default value which will be returned when no string
|
|
157
|
-
* for the current language is available under the key.
|
|
158
|
-
* @return - The string for the current language.
|
|
159
|
-
*/
|
|
160
|
-
// tslint:enable:max-line-length
|
|
161
|
-
toLanguageString(e, r) {
|
|
162
|
-
return this.language && s[this.language] && s[this.language].hasOwnProperty(e) ? s[this.language][e] : r;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
const a = n.createContext({
|
|
166
|
-
intl: new c("en"),
|
|
167
|
-
localization: new u()
|
|
168
|
-
});
|
|
169
|
-
class f extends n.Component {
|
|
170
|
-
/**
|
|
171
|
-
* Returns an internationalization service. The method is suitable for overriding when you implement custom internationalization behavior.
|
|
172
|
-
*/
|
|
173
|
-
getIntlService() {
|
|
174
|
-
return new c(this.props.locale);
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* @hidden
|
|
178
|
-
*/
|
|
179
|
-
render() {
|
|
180
|
-
return /* @__PURE__ */ n.createElement(a.Consumer, null, (e) => /* @__PURE__ */ n.createElement(a.Provider, { value: { ...e, intl: this.getIntlService() } }, this.props.children));
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
f.propTypes = {
|
|
184
|
-
locale: p.string
|
|
185
|
-
};
|
|
186
|
-
const m = (t, e, r) => {
|
|
187
|
-
for (const i in t)
|
|
188
|
-
if (t.hasOwnProperty(i)) {
|
|
189
|
-
const l = [...r];
|
|
190
|
-
if (l.push(i), typeof t[i] != "string")
|
|
191
|
-
m(t[i], e, l);
|
|
192
|
-
else {
|
|
193
|
-
const h = t[i];
|
|
194
|
-
Object.defineProperty(e, l.join("."), { value: h });
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
function E(t, e) {
|
|
199
|
-
let r = s[e] = s[e] || {};
|
|
200
|
-
m(t, r, []);
|
|
201
|
-
}
|
|
202
|
-
class v extends n.Component {
|
|
203
|
-
/**
|
|
204
|
-
* Returns a localization service. The method is suitable for overriding when you implement custom localization behavior.
|
|
205
|
-
*/
|
|
206
|
-
getLocalizationService() {
|
|
207
|
-
return new u(this.props.language);
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* @hidden
|
|
211
|
-
*/
|
|
212
|
-
render() {
|
|
213
|
-
return /* @__PURE__ */ n.createElement(a.Consumer, null, (e) => /* @__PURE__ */ n.createElement(a.Provider, { value: { ...e, localization: this.getLocalizationService() } }, this.props.children));
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
v.propTypes = {
|
|
217
|
-
language: p.string
|
|
218
|
-
};
|
|
219
|
-
function D(t) {
|
|
220
|
-
if (!t && process.env.NODE_ENV !== "production")
|
|
221
|
-
throw `Passed component - ${t} is invalid.`;
|
|
222
|
-
const e = t.context;
|
|
223
|
-
return e && e.intl ? e.intl : new c("en");
|
|
224
|
-
}
|
|
225
|
-
function w(t) {
|
|
226
|
-
if (!t && process.env.NODE_ENV !== "production")
|
|
227
|
-
throw `Passed component - ${t} is invalid.`;
|
|
228
|
-
const e = t.context;
|
|
229
|
-
return e && e.localization ? e.localization : new u();
|
|
230
|
-
}
|
|
231
|
-
function z(t) {
|
|
232
|
-
t.contextType = a;
|
|
233
|
-
}
|
|
234
|
-
function x(t) {
|
|
235
|
-
t.contextType = a;
|
|
236
|
-
}
|
|
237
|
-
const C = () => n.useContext(a).intl, S = () => n.useContext(a).localization;
|
|
9
|
+
import { GlobalizationContext as r } from "./globalization/GlobalizationContext.mjs";
|
|
10
|
+
import { messages as i } from "./Localization/messages.mjs";
|
|
11
|
+
import { provideIntlService as l, provideLocalizationService as n, registerForIntl as s, registerForLocalization as p } from "./intlUtils.mjs";
|
|
12
|
+
import { IntlProvider as x } from "./Intl/IntlProvider.mjs";
|
|
13
|
+
import { IntlService as f } from "./Intl/IntlService.mjs";
|
|
14
|
+
import { loadMessages as z } from "./Localization/loadMessages.mjs";
|
|
15
|
+
import { LocalizationProvider as g } from "./Localization/LocalizationProvider.mjs";
|
|
16
|
+
import { LocalizationService as L } from "./Localization/LocalizationService.mjs";
|
|
17
|
+
import { load as u } from "@progress/kendo-intl";
|
|
18
|
+
import { useInternationalization as M } from "./hooks/useInternationalization.mjs";
|
|
19
|
+
import { useLocalization as b } from "./hooks/useLocalization.mjs";
|
|
238
20
|
export {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
21
|
+
r as GlobalizationContext,
|
|
22
|
+
x as IntlProvider,
|
|
23
|
+
f as IntlService,
|
|
24
|
+
g as LocalizationProvider,
|
|
25
|
+
L as LocalizationService,
|
|
26
|
+
u as load,
|
|
27
|
+
z as loadMessages,
|
|
28
|
+
i as localizationMessages,
|
|
29
|
+
l as provideIntlService,
|
|
30
|
+
n as provideLocalizationService,
|
|
31
|
+
s as registerForIntl,
|
|
32
|
+
p as registerForLocalization,
|
|
33
|
+
M as useInternationalization,
|
|
34
|
+
b as useLocalization
|
|
253
35
|
};
|
package/intlUtils.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./Intl/IntlService.js"),n=require("./Localization/LocalizationService.js"),t=require("./globalization/GlobalizationContext.js");function r(e){if(!e&&process.env.NODE_ENV!=="production")throw`Passed component - ${e} is invalid.`;const i=e.context;return i&&i.intl?i.intl:new o.IntlService("en")}function c(e){if(!e&&process.env.NODE_ENV!=="production")throw`Passed component - ${e} is invalid.`;const i=e.context;return i&&i.localization?i.localization:new n.LocalizationService}function l(e){e.contextType=t.GlobalizationContext}function a(e){e.contextType=t.GlobalizationContext}exports.provideIntlService=r;exports.provideLocalizationService=c;exports.registerForIntl=l;exports.registerForLocalization=a;
|
package/intlUtils.mjs
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import { IntlService as n } from "./Intl/IntlService.mjs";
|
|
10
|
+
import { LocalizationService as e } from "./Localization/LocalizationService.mjs";
|
|
11
|
+
import { GlobalizationContext as o } from "./globalization/GlobalizationContext.mjs";
|
|
12
|
+
function a(t) {
|
|
13
|
+
if (!t && process.env.NODE_ENV !== "production")
|
|
14
|
+
throw `Passed component - ${t} is invalid.`;
|
|
15
|
+
const i = t.context;
|
|
16
|
+
return i && i.intl ? i.intl : new n("en");
|
|
17
|
+
}
|
|
18
|
+
function s(t) {
|
|
19
|
+
if (!t && process.env.NODE_ENV !== "production")
|
|
20
|
+
throw `Passed component - ${t} is invalid.`;
|
|
21
|
+
const i = t.context;
|
|
22
|
+
return i && i.localization ? i.localization : new e();
|
|
23
|
+
}
|
|
24
|
+
function p(t) {
|
|
25
|
+
t.contextType = o;
|
|
26
|
+
}
|
|
27
|
+
function v(t) {
|
|
28
|
+
t.contextType = o;
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
a as provideIntlService,
|
|
32
|
+
s as provideLocalizationService,
|
|
33
|
+
p as registerForIntl,
|
|
34
|
+
v as registerForLocalization
|
|
35
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-intl",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
const e = {
|
|
10
|
+
name: "@progress/kendo-react-intl",
|
|
11
|
+
productName: "KendoReact",
|
|
12
|
+
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
13
|
+
publishDate: 1709715150,
|
|
14
|
+
version: "",
|
|
15
|
+
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
e as packageMetadata
|
|
19
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-intl",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0-develop.1",
|
|
4
4
|
"description": "React Internationalization package provides services for parsing and formatting of dates and numbers. KendoReact Internationalization package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@progress/kendo-intl": "^3.1.1",
|
|
26
26
|
"@progress/kendo-licensing": "^1.3.4",
|
|
27
|
-
"@progress/kendo-react-common": "7.
|
|
27
|
+
"@progress/kendo-react-common": "7.3.0-develop.1",
|
|
28
28
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
29
29
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|
|
30
30
|
},
|
package/Intl/IntlProvider.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
|
-
import { IntlService } from './IntlService';
|
|
8
|
-
import { IntlProviderProps } from './IntlProviderProps';
|
|
9
|
-
/**
|
|
10
|
-
* A React component which provides an internationalization service. Expects a locale string as a property of the component.
|
|
11
|
-
*/
|
|
12
|
-
export declare class IntlProvider extends React.Component<IntlProviderProps, {}> {
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
static propTypes: {
|
|
17
|
-
locale: PropTypes.Requireable<string>;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Returns an internationalization service. The method is suitable for overriding when you implement custom internationalization behavior.
|
|
21
|
-
*/
|
|
22
|
-
getIntlService(): IntlService;
|
|
23
|
-
/**
|
|
24
|
-
* @hidden
|
|
25
|
-
*/
|
|
26
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* Represents the props of the KendoReact IntlProvider component.
|
|
7
|
-
*/
|
|
8
|
-
export interface IntlProviderProps {
|
|
9
|
-
/**
|
|
10
|
-
* The locale that will be used by the child components.
|
|
11
|
-
*/
|
|
12
|
-
locale: string;
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
children?: React.ReactNode;
|
|
17
|
-
}
|
package/Intl/IntlService.d.ts
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { DateFormatOptions, NumberFormatOptions, DateFieldNameOptions, DateFormatNameOptions, DateFormatPart } from './../coreExports';
|
|
6
|
-
/**
|
|
7
|
-
* A service which provides internationalization methods and is bound to a specific locale.
|
|
8
|
-
*/
|
|
9
|
-
export declare class IntlService {
|
|
10
|
-
locale: string;
|
|
11
|
-
/**
|
|
12
|
-
* Creates a new instance of the internationalization service.
|
|
13
|
-
*
|
|
14
|
-
* @param locale - The locale that will be used by the internationalization methods.
|
|
15
|
-
*/
|
|
16
|
-
constructor(locale: string);
|
|
17
|
-
/**
|
|
18
|
-
* Formats a string with placeholders such as `Total amount {0:c}`.
|
|
19
|
-
*
|
|
20
|
-
* @param format - The format string.
|
|
21
|
-
* @param values - One or more values to output in the format string placeholders.
|
|
22
|
-
* @return - The formatted string.
|
|
23
|
-
*/
|
|
24
|
-
format(format: string, ...values: any[]): string;
|
|
25
|
-
/**
|
|
26
|
-
* Converts a `Date` object to a string based on the specified format. If no format is provided, the default short date format is used.
|
|
27
|
-
*
|
|
28
|
-
* @param value - The date which will be formatted.
|
|
29
|
-
* @param format - The format string or options.
|
|
30
|
-
* @return - The formatted date.
|
|
31
|
-
*/
|
|
32
|
-
formatDate(value: Date, format?: string | DateFormatOptions): string;
|
|
33
|
-
/**
|
|
34
|
-
* Converts an object to a string based on the specified format.
|
|
35
|
-
*
|
|
36
|
-
* @param value - The value which will be formatted.
|
|
37
|
-
* @param format - The format to use.
|
|
38
|
-
* @return - The formatted object.
|
|
39
|
-
*/
|
|
40
|
-
toString(value: any, format: string | any): string;
|
|
41
|
-
/**
|
|
42
|
-
* Converts a string to a `Number`.
|
|
43
|
-
*
|
|
44
|
-
* @param value - The string which will be parsed.
|
|
45
|
-
* @param format - The format string or options.
|
|
46
|
-
* @return - The parsed number.
|
|
47
|
-
*/
|
|
48
|
-
parseNumber(value: string, format?: string | NumberFormatOptions): number;
|
|
49
|
-
/**
|
|
50
|
-
* Converts a string to a `Date` object based on the specified format.
|
|
51
|
-
*
|
|
52
|
-
* @param value - The string which will be converted.
|
|
53
|
-
* @param format - The format strings or options.
|
|
54
|
-
* @return - The parsed date.
|
|
55
|
-
*/
|
|
56
|
-
parseDate(value: string, format?: string | DateFormatOptions | string[] | DateFormatOptions[]): Date;
|
|
57
|
-
/**
|
|
58
|
-
* Converts a `Number` to a string based on the specified format.
|
|
59
|
-
*
|
|
60
|
-
* @param value - The number which will be formatted.
|
|
61
|
-
* @param format - The format string or options.
|
|
62
|
-
* @return - The formatted number.
|
|
63
|
-
*/
|
|
64
|
-
formatNumber(value: number, format: string | NumberFormatOptions): string;
|
|
65
|
-
/**
|
|
66
|
-
* Returns a localized date field name based on specific `dateFieldName` options.
|
|
67
|
-
*
|
|
68
|
-
* @param options - The detailed configuration for the desired date field name.
|
|
69
|
-
* @returns - The localized date field name from the current locale based on the option.
|
|
70
|
-
*/
|
|
71
|
-
dateFieldName(options: DateFieldNameOptions): string;
|
|
72
|
-
/**
|
|
73
|
-
* Returns the day names from the current locale based on the option.
|
|
74
|
-
*
|
|
75
|
-
* @param options - The detailed configuration for the desired date format.
|
|
76
|
-
* @return - The day names from the current locale based on the option.
|
|
77
|
-
*/
|
|
78
|
-
dateFormatNames(options: DateFormatNameOptions): any;
|
|
79
|
-
/**
|
|
80
|
-
* Splits the date format into objects which contain information about each part of the pattern.
|
|
81
|
-
*
|
|
82
|
-
* @param format - The format string or options.
|
|
83
|
-
* @returns - The date format parts.
|
|
84
|
-
*/
|
|
85
|
-
splitDateFormat(format: string | DateFormatOptions): DateFormatPart[];
|
|
86
|
-
/**
|
|
87
|
-
* Returns the number symbols from the current locale.
|
|
88
|
-
*
|
|
89
|
-
* @return - The number symbols from the current locale.
|
|
90
|
-
*/
|
|
91
|
-
numberSymbols(): any;
|
|
92
|
-
/**
|
|
93
|
-
* Returns the first day index, starting from Sunday.
|
|
94
|
-
*
|
|
95
|
-
* @return - The index of the first day of the week (0 == Sunday).
|
|
96
|
-
*/
|
|
97
|
-
firstDay(): number;
|
|
98
|
-
/**
|
|
99
|
-
* @hidden
|
|
100
|
-
*/
|
|
101
|
-
localeInfo(): any;
|
|
102
|
-
/**
|
|
103
|
-
* @hidden
|
|
104
|
-
*/
|
|
105
|
-
localeCurrency(): any;
|
|
106
|
-
}
|
package/Intl/main.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { IntlProvider } from './IntlProvider';
|
|
6
|
-
import { type IntlProviderProps } from './IntlProviderProps';
|
|
7
|
-
import { IntlService } from './IntlService';
|
|
8
|
-
export { IntlProvider, IntlProviderProps, IntlService };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
|
-
import { LocalizationProviderProps } from './LocalizationProviderProps';
|
|
8
|
-
import { LocalizationService } from './LocalizationService';
|
|
9
|
-
/**
|
|
10
|
-
* A React component which provides a localization service. Expects a language string as a property of the component.
|
|
11
|
-
*/
|
|
12
|
-
export declare class LocalizationProvider extends React.Component<LocalizationProviderProps, {}> {
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
static propTypes: {
|
|
17
|
-
language: PropTypes.Requireable<string>;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Returns a localization service. The method is suitable for overriding when you implement custom localization behavior.
|
|
21
|
-
*/
|
|
22
|
-
getLocalizationService(): LocalizationService;
|
|
23
|
-
/**
|
|
24
|
-
* @hidden
|
|
25
|
-
*/
|
|
26
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* Represents the props of the KendoReact LocalizationProvider component.
|
|
7
|
-
*/
|
|
8
|
-
export interface LocalizationProviderProps {
|
|
9
|
-
/**
|
|
10
|
-
* The language that will be used by the child components.
|
|
11
|
-
*/
|
|
12
|
-
language: string;
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
children?: React.ReactNode;
|
|
17
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* A service which provides localization methods.
|
|
7
|
-
*/
|
|
8
|
-
export declare class LocalizationService {
|
|
9
|
-
language?: string | undefined;
|
|
10
|
-
constructor(language?: string | undefined);
|
|
11
|
-
/**
|
|
12
|
-
* Provides a string based on a key for the current language. When no string for the current language is available under this key, the `defaultValue` is returned.
|
|
13
|
-
*
|
|
14
|
-
* @param key - The key which identifies the string for the current language.
|
|
15
|
-
* @param defaultValue - The default value which will be returned when no string
|
|
16
|
-
* for the current language is available under the key.
|
|
17
|
-
* @return - The string for the current language.
|
|
18
|
-
*/
|
|
19
|
-
toLanguageString(key: string, defaultValue: string): string;
|
|
20
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* Provides mechanism to load language-specific messages for the KendoReact components.
|
|
7
|
-
*
|
|
8
|
-
* @param messages - An iterable object which contains key-value pairs.
|
|
9
|
-
* @param languages - The language to which the messages are associated.
|
|
10
|
-
*/
|
|
11
|
-
export declare function loadMessages(messages: any, language: string): void;
|
package/Localization/main.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { loadMessages } from './loadMessages';
|
|
6
|
-
import { LocalizationProvider } from './LocalizationProvider';
|
|
7
|
-
import { type LocalizationProviderProps } from './LocalizationProviderProps';
|
|
8
|
-
import { LocalizationService } from './LocalizationService';
|
|
9
|
-
export { loadMessages, LocalizationProvider, LocalizationProviderProps, LocalizationService };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export declare const messages: any;
|
package/coreExports.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export type { DateFormatOptions, NumberFormatOptions, DateFieldNameOptions, DateFormatNameOptions, DateFormatPart } from '@progress/kendo-intl';
|
|
6
|
-
export { load } from '@progress/kendo-intl';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import { IntlService } from '../Intl/IntlService';
|
|
7
|
-
import { LocalizationService } from '../Localization/LocalizationService';
|
|
8
|
-
/** @hidden */
|
|
9
|
-
export type GlobalizationContextType = {
|
|
10
|
-
intl: IntlService;
|
|
11
|
-
localization: LocalizationService;
|
|
12
|
-
};
|
|
13
|
-
/** @hidden */
|
|
14
|
-
export declare const GlobalizationContext: React.Context<GlobalizationContextType>;
|