@progress/kendo-react-intl 9.5.0 → 10.0.0-develop.2
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/{package-metadata.js → Intl/IntlDataProvider.js} +2 -1
- package/{package-metadata.mjs → Intl/IntlDataProvider.mjs} +6 -9
- package/Intl/IntlService.js +1 -1
- package/Intl/IntlService.mjs +3 -5
- package/Intl/load.js +8 -0
- package/Intl/load.mjs +21 -0
- package/Localization/LocalizationDataProvider.js +9 -0
- package/Localization/LocalizationDataProvider.mjs +16 -0
- package/Localization/loadMessages.js +1 -1
- package/Localization/loadMessages.mjs +14 -13
- package/dist/cdn/js/kendo-react-intl.js +1 -1
- package/index.d.mts +25 -2
- package/index.d.ts +25 -2
- package/index.js +1 -1
- package/index.mjs +19 -17
- package/package.json +3 -9
- package/server/Globalization.server.js +8 -0
- package/server/Globalization.server.mjs +24 -0
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./load.js"),l=t=>{const{locale:e,data:r,children:o}=t;return e&&a.load(r),o};exports.IntlDataProvider=l;
|
|
@@ -5,15 +5,12 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
publishDate: 1741090546,
|
|
14
|
-
version: "9.5.0",
|
|
15
|
-
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
8
|
+
"use client";
|
|
9
|
+
import { load as e } from "./load.mjs";
|
|
10
|
+
const n = (o) => {
|
|
11
|
+
const { locale: r, data: t, children: a } = o;
|
|
12
|
+
return r && e(t), a;
|
|
16
13
|
};
|
|
17
14
|
export {
|
|
18
|
-
|
|
15
|
+
n as IntlDataProvider
|
|
19
16
|
};
|
package/Intl/IntlService.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@progress/kendo-intl")
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@progress/kendo-intl");function n(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:()=>o[t]})}}return e.default=o,Object.freeze(e)}const r=n(l);class c{constructor(e){if(this.locale=e,e===""&&process.env.NODE_ENV!=="production")throw"Locale should not be empty string"}format(e,...t){return t.length===1&&Array.isArray(t[0])?r.format(e,t[0],this.locale):r.format(e,t,this.locale)}formatDate(e,t){return r.formatDate(e,t,this.locale)}toString(e,t){return r.toString(e,t,this.locale)}parseNumber(e,t){return r.parseNumber(e,this.locale,t)}parseDate(e,t){return r.parseDate(e,t,this.locale)}formatNumber(e,t){return r.formatNumber(e,t,this.locale)}dateFieldName(e){return r.dateFieldName(e,this.locale)}dateFormatNames(e){return r.dateFormatNames(this.locale,e)}splitDateFormat(e){return r.splitDateFormat(e,this.locale)}numberSymbols(){return r.numberSymbols(this.locale)}firstDay(){return r.firstDay(this.locale)}localeInfo(){return r.localeInfo(this.locale)}localeCurrency(){return r.localeCurrency(this.locale)}}exports.IntlService=c;
|
package/Intl/IntlService.mjs
CHANGED
|
@@ -6,16 +6,14 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as e from "@progress/kendo-intl";
|
|
9
|
-
|
|
10
|
-
import { packageMetadata as o } from "../package-metadata.mjs";
|
|
11
|
-
class c {
|
|
9
|
+
class o {
|
|
12
10
|
/**
|
|
13
11
|
* Creates a new instance of the internationalization service.
|
|
14
12
|
*
|
|
15
13
|
* @param locale - The locale that will be used by the internationalization methods.
|
|
16
14
|
*/
|
|
17
15
|
constructor(r) {
|
|
18
|
-
if (this.locale = r,
|
|
16
|
+
if (this.locale = r, r === "" && process.env.NODE_ENV !== "production")
|
|
19
17
|
throw "Locale should not be empty string";
|
|
20
18
|
}
|
|
21
19
|
/**
|
|
@@ -135,5 +133,5 @@ class c {
|
|
|
135
133
|
}
|
|
136
134
|
}
|
|
137
135
|
export {
|
|
138
|
-
|
|
136
|
+
o as IntlService
|
|
139
137
|
};
|
package/Intl/load.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@progress/kendo-intl"),e={},n=(...t)=>{t.forEach(s=>{const c=Object.keys(s)[0];if(["main","supplemental"].includes(c)){const o=Object.keys(s[c])[0];o in e?e[o].includes(s)||(e[o]=[...e[o],s]):e[o]=[s]}}),l.load(...t)};exports.load=n;exports.locales=e;
|
package/Intl/load.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { load as c } from "@progress/kendo-intl";
|
|
9
|
+
const o = {}, l = (...i) => {
|
|
10
|
+
i.forEach((e) => {
|
|
11
|
+
const n = Object.keys(e)[0];
|
|
12
|
+
if (["main", "supplemental"].includes(n)) {
|
|
13
|
+
const s = Object.keys(e[n])[0];
|
|
14
|
+
s in o ? o[s].includes(e) || (o[s] = [...o[s], e]) : o[s] = [e];
|
|
15
|
+
}
|
|
16
|
+
}), c(...i);
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
l as load,
|
|
20
|
+
o as locales
|
|
21
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 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
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./loadMessages.js"),i=e=>{const{data:o,language:a,children:t}=e;return a&&r.loadMessages(o,a),t};exports.LocalizationDataProvider=i;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 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 { loadMessages as e } from "./loadMessages.mjs";
|
|
10
|
+
const n = (o) => {
|
|
11
|
+
const { data: r, language: a, children: t } = o;
|
|
12
|
+
return a && e(r, a), t;
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
n as LocalizationDataProvider
|
|
16
|
+
};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./messages.js"),r=(s,e,t)=>{for(const o in s)if(s.hasOwnProperty(o)){const n=[...t];if(n.push(o),typeof s[o]!="string")
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./messages.js"),r=Object.create({}),a=(s,e,t)=>{for(const o in s)if(s.hasOwnProperty(o)){const n=[...t];if(n.push(o),typeof s[o]!="string")a(s[o],e,n);else{const u=s[o];Object.defineProperty(e,n.join("."),{value:u,enumerable:!0})}}};function g(s,e){const t=c.messages[e]=c.messages[e]||{};r.lang=e,a(s,t,[])}exports.languages=r;exports.loadMessages=g;
|
|
@@ -5,23 +5,24 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { messages as
|
|
9
|
-
const
|
|
10
|
-
for (const
|
|
11
|
-
if (
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
r(
|
|
8
|
+
import { messages as c } from "./messages.mjs";
|
|
9
|
+
const p = /* @__PURE__ */ Object.create({}), r = (s, o, t) => {
|
|
10
|
+
for (const e in s)
|
|
11
|
+
if (s.hasOwnProperty(e)) {
|
|
12
|
+
const n = [...t];
|
|
13
|
+
if (n.push(e), typeof s[e] != "string")
|
|
14
|
+
r(s[e], o, n);
|
|
15
15
|
else {
|
|
16
|
-
const f =
|
|
17
|
-
Object.defineProperty(
|
|
16
|
+
const f = s[e];
|
|
17
|
+
Object.defineProperty(o, n.join("."), { value: f, enumerable: !0 });
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
-
function
|
|
22
|
-
const t =
|
|
23
|
-
r(
|
|
21
|
+
function a(s, o) {
|
|
22
|
+
const t = c[o] = c[o] || {};
|
|
23
|
+
p.lang = o, r(s, t, []);
|
|
24
24
|
}
|
|
25
25
|
export {
|
|
26
|
-
|
|
26
|
+
p as languages,
|
|
27
|
+
a as loadMessages
|
|
27
28
|
};
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@progress/kendo-intl"),require("@progress/kendo-react-common")
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@progress/kendo-intl"),require("prop-types"),require("@progress/kendo-react-common")):"function"==typeof define&&define.amd?define(["exports","react","@progress/kendo-intl","prop-types","@progress/kendo-react-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactIntl={},e.React,e.KendoIntl,e.PropTypes,e.KendoReactCommon)}(this,(function(e,t,n,o,r){"use strict";function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var l=a(t),i=a(n);let c=class{constructor(e){if(this.locale=e,""===e&&"production"!==process.env.NODE_ENV)throw"Locale should not be empty string"}format(e,...t){return 1===t.length&&Array.isArray(t[0])?i.format(e,t[0],this.locale):i.format(e,t,this.locale)}formatDate(e,t){return i.formatDate(e,t,this.locale)}toString(e,t){return i.toString(e,t,this.locale)}parseNumber(e,t){return i.parseNumber(e,this.locale,t)}parseDate(e,t){return i.parseDate(e,t,this.locale)}formatNumber(e,t){return i.formatNumber(e,t,this.locale)}dateFieldName(e){return i.dateFieldName(e,this.locale)}dateFormatNames(e){return i.dateFormatNames(this.locale,e)}splitDateFormat(e){return i.splitDateFormat(e,this.locale)}numberSymbols(){return i.numberSymbols(this.locale)}firstDay(){return i.firstDay(this.locale)}localeInfo(){return i.localeInfo(this.locale)}localeCurrency(){return i.localeCurrency(this.locale)}};const s=Object.create({});let u=class{constructor(e){if(this.language=e,""===e&&"production"!==process.env.NODE_ENV)throw"Language should not be an empty string"}toLanguageString(e,t){return this.language&&s[this.language]&&s[this.language].hasOwnProperty(e)?s[this.language][e]:t}};const p=l.createContext({intl:new c("en"),localization:new u});const d=class extends l.Component{getIntlService(){return new c(this.props.locale)}render(){return l.createElement(p.Consumer,null,(e=>l.createElement(p.Provider,{value:{...e,intl:this.getIntlService()}},this.props.children)))}};d.propTypes={locale:o.string};let m=d;const g={},f=(...e)=>{e.forEach((e=>{const t=Object.keys(e)[0];if(["main","supplemental"].includes(t)){const n=Object.keys(e[t])[0];n in g?g[n].includes(e)||(g[n]=[...g[n],e]):g[n]=[e]}})),n.load(...e)},h=e=>{const{locale:t,data:n,children:o}=e;return t&&f(n),o},y=class extends l.Component{getLocalizationService(){return new u(this.props.language)}render(){return l.createElement(p.Consumer,null,(e=>l.createElement(p.Provider,{value:{...e,localization:this.getLocalizationService()}},this.props.children)))}};y.propTypes={language:o.string};let v=y;const b=Object.create({}),E=(e,t,n)=>{for(const o in e)if(e.hasOwnProperty(o)){const r=[...n];if(r.push(o),"string"!=typeof e[o])E(e[o],t,r);else{const n=e[o];Object.defineProperty(t,r.join("."),{value:n,enumerable:!0})}}};function z(e,t){const n=s[t]=s[t]||{};b.lang=t,E(e,n,[])}const O=e=>{const{data:t,language:n,children:o}=e;return n&&z(t,n),o};e.GlobalizationContext=p,e.IntlProvider=m,e.IntlService=c,e.LocalizationProvider=v,e.LocalizationService=u,e.ServerGlobalization=e=>{var o,a,l;const{language:i="",locale:c="en",children:u}=e,p=n.localeInfo(c),d=null!=(o=s[i])?o:[],f=(null!=(a=g.version)?a:[]).concat(null!=(l=g[p.name])?l:[]),[y]=r.useCustomComponent(c?m:t.Fragment),[b]=r.useCustomComponent(i?v:t.Fragment);return t.createElement(O,{data:d,language:i},t.createElement(h,{data:f,locale:c},t.createElement(b,{language:i},t.createElement(y,{locale:c},u))))},e.load=f,e.loadMessages=z,e.localizationMessages=s,e.provideIntlService=function(e){if(!e&&"production"!==process.env.NODE_ENV)throw`Passed component - ${e} is invalid.`;const t=e.context;return t&&t.intl?t.intl:new c("en")},e.provideLocalizationService=function(e){if(!e&&"production"!==process.env.NODE_ENV)throw`Passed component - ${e} is invalid.`;const t=e.context;return t&&t.localization?t.localization:new u},e.registerForIntl=function(e){e.contextType=p},e.registerForLocalization=function(e){e.contextType=p},e.useInternationalization=()=>l.useContext(p).intl,e.useLocalization=()=>l.useContext(p).localization}));
|
package/index.d.mts
CHANGED
|
@@ -10,8 +10,8 @@ import { DateFormatNameOptions } from '@progress/kendo-intl';
|
|
|
10
10
|
import { DateFormatOptions } from '@progress/kendo-intl';
|
|
11
11
|
import { DateFormatPart } from '@progress/kendo-intl';
|
|
12
12
|
import { default as default_2 } from 'prop-types';
|
|
13
|
+
import { default as default_3 } from 'react';
|
|
13
14
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
14
|
-
import { load } from '@progress/kendo-intl';
|
|
15
15
|
import { NumberFormatOptions } from '@progress/kendo-intl';
|
|
16
16
|
import * as React_2 from 'react';
|
|
17
17
|
|
|
@@ -168,7 +168,12 @@ export declare class IntlService {
|
|
|
168
168
|
localeCurrency(): any;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
|
|
171
|
+
/**
|
|
172
|
+
* Loads CLDR data.
|
|
173
|
+
*
|
|
174
|
+
* @param data - The CLDR data to be loaded. Accepts multiple parameters.
|
|
175
|
+
*/
|
|
176
|
+
export declare const load: (...data: any[]) => void;
|
|
172
177
|
|
|
173
178
|
/**
|
|
174
179
|
* Provides mechanism to load language-specific messages for the KendoReact components.
|
|
@@ -264,6 +269,24 @@ export declare function registerForIntl(component: React_2.ComponentClass<any, a
|
|
|
264
269
|
*/
|
|
265
270
|
export declare function registerForLocalization(component: React_2.ComponentClass<any, any>): void;
|
|
266
271
|
|
|
272
|
+
/**
|
|
273
|
+
* @hidden
|
|
274
|
+
* Assembles all necessary parts for both localization and internationalization to work in a server/client environments.
|
|
275
|
+
* Combined in a single `ServerGlobalization` component for convenience.
|
|
276
|
+
* From everything that has been loaded on the server, only pass what's necessary to the client, which is loaded on the client by the `DataProvider`s.
|
|
277
|
+
* This would result in minimal amount of data being transferred to the client.
|
|
278
|
+
*/
|
|
279
|
+
export declare const ServerGlobalization: (props: ServerGlobalizationProps) => JSX_2.Element;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* @hidden Currently used only externally through the ServerGlobalization of the Grid.
|
|
283
|
+
*/
|
|
284
|
+
export declare type ServerGlobalizationProps = {
|
|
285
|
+
locale?: string;
|
|
286
|
+
language?: string;
|
|
287
|
+
children?: default_3.ReactNode;
|
|
288
|
+
};
|
|
289
|
+
|
|
267
290
|
/**
|
|
268
291
|
* A custom [React Hook](https://react.dev/reference/react/hooks) providing access to an [IntlService]({% slug api_intl_intlservice %}).
|
|
269
292
|
*/
|
package/index.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ import { DateFormatNameOptions } from '@progress/kendo-intl';
|
|
|
10
10
|
import { DateFormatOptions } from '@progress/kendo-intl';
|
|
11
11
|
import { DateFormatPart } from '@progress/kendo-intl';
|
|
12
12
|
import { default as default_2 } from 'prop-types';
|
|
13
|
+
import { default as default_3 } from 'react';
|
|
13
14
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
14
|
-
import { load } from '@progress/kendo-intl';
|
|
15
15
|
import { NumberFormatOptions } from '@progress/kendo-intl';
|
|
16
16
|
import * as React_2 from 'react';
|
|
17
17
|
|
|
@@ -168,7 +168,12 @@ export declare class IntlService {
|
|
|
168
168
|
localeCurrency(): any;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
|
|
171
|
+
/**
|
|
172
|
+
* Loads CLDR data.
|
|
173
|
+
*
|
|
174
|
+
* @param data - The CLDR data to be loaded. Accepts multiple parameters.
|
|
175
|
+
*/
|
|
176
|
+
export declare const load: (...data: any[]) => void;
|
|
172
177
|
|
|
173
178
|
/**
|
|
174
179
|
* Provides mechanism to load language-specific messages for the KendoReact components.
|
|
@@ -264,6 +269,24 @@ export declare function registerForIntl(component: React_2.ComponentClass<any, a
|
|
|
264
269
|
*/
|
|
265
270
|
export declare function registerForLocalization(component: React_2.ComponentClass<any, any>): void;
|
|
266
271
|
|
|
272
|
+
/**
|
|
273
|
+
* @hidden
|
|
274
|
+
* Assembles all necessary parts for both localization and internationalization to work in a server/client environments.
|
|
275
|
+
* Combined in a single `ServerGlobalization` component for convenience.
|
|
276
|
+
* From everything that has been loaded on the server, only pass what's necessary to the client, which is loaded on the client by the `DataProvider`s.
|
|
277
|
+
* This would result in minimal amount of data being transferred to the client.
|
|
278
|
+
*/
|
|
279
|
+
export declare const ServerGlobalization: (props: ServerGlobalizationProps) => JSX_2.Element;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* @hidden Currently used only externally through the ServerGlobalization of the Grid.
|
|
283
|
+
*/
|
|
284
|
+
export declare type ServerGlobalizationProps = {
|
|
285
|
+
locale?: string;
|
|
286
|
+
language?: string;
|
|
287
|
+
children?: default_3.ReactNode;
|
|
288
|
+
};
|
|
289
|
+
|
|
267
290
|
/**
|
|
268
291
|
* A custom [React Hook](https://react.dev/reference/react/hooks) providing access to an [IntlService]({% slug api_intl_intlservice %}).
|
|
269
292
|
*/
|
package/index.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./globalization/GlobalizationContext.js"),o=require("./Localization/messages.js"),e=require("./intlUtils.js"),r=require("./Intl/IntlProvider.js"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./globalization/GlobalizationContext.js"),o=require("./Localization/messages.js"),e=require("./intlUtils.js"),r=require("./server/Globalization.server.js"),t=require("./Intl/IntlProvider.js"),a=require("./Intl/IntlService.js"),n=require("./Intl/load.js"),l=require("./Localization/loadMessages.js"),s=require("./Localization/LocalizationProvider.js"),c=require("./Localization/LocalizationService.js"),v=require("./hooks/useInternationalization.js"),z=require("./hooks/useLocalization.js");exports.GlobalizationContext=i.GlobalizationContext;exports.localizationMessages=o.messages;exports.provideIntlService=e.provideIntlService;exports.provideLocalizationService=e.provideLocalizationService;exports.registerForIntl=e.registerForIntl;exports.registerForLocalization=e.registerForLocalization;exports.ServerGlobalization=r.ServerGlobalization;exports.IntlProvider=t.IntlProvider;exports.IntlService=a.IntlService;exports.load=n.load;exports.loadMessages=l.loadMessages;exports.LocalizationProvider=s.LocalizationProvider;exports.LocalizationService=c.LocalizationService;exports.useInternationalization=v.useInternationalization;exports.useLocalization=z.useLocalization;
|
package/index.mjs
CHANGED
|
@@ -7,28 +7,30 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { GlobalizationContext as e } from "./globalization/GlobalizationContext.mjs";
|
|
9
9
|
import { messages as i } from "./Localization/messages.mjs";
|
|
10
|
-
import { provideIntlService as l, provideLocalizationService as n, registerForIntl as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
10
|
+
import { provideIntlService as l, provideLocalizationService as n, registerForIntl as p, registerForLocalization as s } from "./intlUtils.mjs";
|
|
11
|
+
import { ServerGlobalization as x } from "./server/Globalization.server.mjs";
|
|
12
|
+
import { IntlProvider as c } from "./Intl/IntlProvider.mjs";
|
|
13
|
+
import { IntlService as z } from "./Intl/IntlService.mjs";
|
|
14
|
+
import { load as g } from "./Intl/load.mjs";
|
|
15
|
+
import { loadMessages as L } from "./Localization/loadMessages.mjs";
|
|
16
|
+
import { LocalizationProvider as b } from "./Localization/LocalizationProvider.mjs";
|
|
17
|
+
import { LocalizationService as F } from "./Localization/LocalizationService.mjs";
|
|
17
18
|
import { useInternationalization as M } from "./hooks/useInternationalization.mjs";
|
|
18
|
-
import { useLocalization as
|
|
19
|
+
import { useLocalization as C } from "./hooks/useLocalization.mjs";
|
|
19
20
|
export {
|
|
20
21
|
e as GlobalizationContext,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
c as IntlProvider,
|
|
23
|
+
z as IntlService,
|
|
24
|
+
b as LocalizationProvider,
|
|
25
|
+
F as LocalizationService,
|
|
26
|
+
x as ServerGlobalization,
|
|
27
|
+
g as load,
|
|
28
|
+
L as loadMessages,
|
|
27
29
|
i as localizationMessages,
|
|
28
30
|
l as provideIntlService,
|
|
29
31
|
n as provideLocalizationService,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
p as registerForIntl,
|
|
33
|
+
s as registerForLocalization,
|
|
32
34
|
M as useInternationalization,
|
|
33
|
-
|
|
35
|
+
C as useLocalization
|
|
34
36
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-intl",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0-develop.2",
|
|
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",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-intl": "^3.1.1",
|
|
29
29
|
"@progress/kendo-licensing": "^1.5.0",
|
|
30
|
-
"@progress/kendo-react-common": "
|
|
30
|
+
"@progress/kendo-react-common": "10.0.0-develop.2",
|
|
31
31
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
32
32
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
33
33
|
},
|
|
@@ -48,13 +48,7 @@
|
|
|
48
48
|
],
|
|
49
49
|
"@progress": {
|
|
50
50
|
"friendlyName": "Internationalization",
|
|
51
|
-
"framework": "KendoReact"
|
|
52
|
-
"package": {
|
|
53
|
-
"productName": "KendoReact",
|
|
54
|
-
"productCode": "KENDOUIREACT",
|
|
55
|
-
"publishDate": 1741090546,
|
|
56
|
-
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
57
|
-
}
|
|
51
|
+
"framework": "KendoReact"
|
|
58
52
|
},
|
|
59
53
|
"repository": {
|
|
60
54
|
"type": "git",
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),g=require("@progress/kendo-intl"),q=require("../Intl/IntlProvider.js"),z=require("../Intl/IntlDataProvider.js"),i=require("../Intl/load.js"),I=require("../Localization/LocalizationProvider.js"),D=require("../Localization/LocalizationDataProvider.js"),C=require("../Localization/messages.js"),c=require("@progress/kendo-react-common"),L=l=>{var r,a,n;const{language:o="",locale:t="en",children:s}=l,u=g.localeInfo(t),d=(r=C.messages[o])!=null?r:[],m=((a=i.locales.version)!=null?a:[]).concat((n=i.locales[u.name])!=null?n:[]),[v]=c.useCustomComponent(t?q.IntlProvider:e.Fragment),[P]=c.useCustomComponent(o?I.LocalizationProvider:e.Fragment);return e.createElement(D.LocalizationDataProvider,{data:d,language:o},e.createElement(z.IntlDataProvider,{data:m,locale:t},e.createElement(P,{language:o},e.createElement(v,{locale:t},s))))};exports.ServerGlobalization=L;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import o from "react";
|
|
9
|
+
import { localeInfo as g } from "@progress/kendo-intl";
|
|
10
|
+
import { IntlProvider as u } from "../Intl/IntlProvider.mjs";
|
|
11
|
+
import { IntlDataProvider as P } from "../Intl/IntlDataProvider.mjs";
|
|
12
|
+
import { locales as m } from "../Intl/load.mjs";
|
|
13
|
+
import { LocalizationProvider as z } from "../Localization/LocalizationProvider.mjs";
|
|
14
|
+
import { LocalizationDataProvider as D } from "../Localization/LocalizationDataProvider.mjs";
|
|
15
|
+
import { messages as E } from "../Localization/messages.mjs";
|
|
16
|
+
import { useCustomComponent as i } from "@progress/kendo-react-common";
|
|
17
|
+
const G = (l) => {
|
|
18
|
+
var r, a, n;
|
|
19
|
+
const { language: t = "", locale: e = "en", children: c } = l, s = g(e), f = (r = E[t]) != null ? r : [], p = ((a = m.version) != null ? a : []).concat((n = m[s.name]) != null ? n : []), [d] = i(e ? u : o.Fragment), [v] = i(t ? z : o.Fragment);
|
|
20
|
+
return /* @__PURE__ */ o.createElement(D, { data: f, language: t }, /* @__PURE__ */ o.createElement(P, { data: p, locale: e }, /* @__PURE__ */ o.createElement(v, { language: t }, /* @__PURE__ */ o.createElement(d, { locale: e }, c))));
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
G as ServerGlobalization
|
|
24
|
+
};
|