@progress/kendo-react-intl 9.0.0-develop.2 → 9.0.0-develop.20
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.
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import { messages as
|
|
10
|
-
class
|
|
11
|
-
constructor(
|
|
12
|
-
if (this.language =
|
|
9
|
+
import { messages as e } from "./messages.mjs";
|
|
10
|
+
class s {
|
|
11
|
+
constructor(t) {
|
|
12
|
+
if (this.language = t, t === "" && process.env.NODE_ENV !== "production")
|
|
13
13
|
throw "Language should not be an empty string";
|
|
14
14
|
}
|
|
15
15
|
/* eslint-disable max-len */
|
|
@@ -22,10 +22,10 @@ class r {
|
|
|
22
22
|
* @return - The string for the current language.
|
|
23
23
|
*/
|
|
24
24
|
// tslint:enable:max-line-length
|
|
25
|
-
toLanguageString(
|
|
26
|
-
return this.language &&
|
|
25
|
+
toLanguageString(t, a) {
|
|
26
|
+
return this.language && e[this.language] && e[this.language].hasOwnProperty(t) ? e[this.language][t] : a;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
s as LocalizationService
|
|
31
31
|
};
|
|
@@ -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 client";"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")r(s[o],e,n);else{const u=s[o];Object.defineProperty(e,n.join("."),{value:u})}}};function a(s,e){
|
|
8
|
+
"use client";"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")r(s[o],e,n);else{const u=s[o];Object.defineProperty(e,n.join("."),{value:u})}}};function a(s,e){const t=c.messages[e]=c.messages[e]||{};r(s,t,[])}exports.loadMessages=a;
|
|
@@ -6,22 +6,22 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import { messages as
|
|
10
|
-
const r = (s, o,
|
|
11
|
-
for (const
|
|
12
|
-
if (s.hasOwnProperty(
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
r(s[
|
|
9
|
+
import { messages as e } from "./messages.mjs";
|
|
10
|
+
const r = (s, o, t) => {
|
|
11
|
+
for (const n in s)
|
|
12
|
+
if (s.hasOwnProperty(n)) {
|
|
13
|
+
const c = [...t];
|
|
14
|
+
if (c.push(n), typeof s[n] != "string")
|
|
15
|
+
r(s[n], o, c);
|
|
16
16
|
else {
|
|
17
|
-
const f = s[
|
|
18
|
-
Object.defineProperty(o,
|
|
17
|
+
const f = s[n];
|
|
18
|
+
Object.defineProperty(o, c.join("."), { value: f });
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
function i(s, o) {
|
|
23
|
-
|
|
24
|
-
r(s,
|
|
23
|
+
const t = e[o] = e[o] || {};
|
|
24
|
+
r(s, t, []);
|
|
25
25
|
}
|
|
26
26
|
export {
|
|
27
27
|
i as loadMessages
|
package/README.md
CHANGED
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
# KendoReact Internationalization Component for React
|
|
6
6
|
|
|
7
7
|
> **Important**
|
|
8
|
-
>
|
|
9
|
-
>
|
|
10
|
-
>
|
|
11
|
-
>
|
|
8
|
+
>
|
|
9
|
+
> - This package is а part of [KendoReact](https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-intl)—a commercial UI library.
|
|
10
|
+
> - You will need to install a license key when adding the package to your project. For more information, please refer to the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-intl).
|
|
11
|
+
> - To receive a license key, you need to either [purchase a license](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-intl) or register for a [free trial](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-intl). Doing so indicates that you [accept the KendoReact License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-intl).
|
|
12
|
+
> - The 30-day free trial gives you access to all the KendoReact components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the KendoReact dev team!
|
|
12
13
|
>
|
|
13
14
|
> [Start using KendoReact](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-intl) and speed up your development process!
|
|
14
15
|
|
|
@@ -18,19 +19,19 @@ The React Internationalization package, part of KendoReact, provides services fo
|
|
|
18
19
|
|
|
19
20
|
For any issues you might encounter while working with the KendoReact Internationalization, use any of the available support channels:
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
- Industry-leading technical support—KendoReact paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use [the dedicated KendoReact support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-intl).
|
|
23
|
+
- Product forums—The [KendoReact forums](https://www.telerik.com/forums/kendo-ui-react?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-intl) are part of the free support you can get from the community and from the KendoReact team.
|
|
24
|
+
- Feedback portal—The [KendoReact feedback portal](https://feedback.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-intl) is where you can request and vote for new features to be added.
|
|
24
25
|
|
|
25
26
|
## Resources
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
- [Getting Started with KendoReact](https://www.telerik.com/kendo-react-ui/components/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-intl)
|
|
29
|
+
- [KendoReact Roadmap](https://www.telerik.com/support/whats-new/kendo-react-ui/roadmap?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-intl)
|
|
30
|
+
- [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-intl)
|
|
31
|
+
- [Demos, documentation, and component reference](https://www.telerik.com/kendo-react-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-intl)
|
|
32
|
+
- [KendoReact pricing and licensing](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-intl)
|
|
33
|
+
- [Changelog](https://www.telerik.com/kendo-react-ui/components/changelogs/ui-for-react/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-intl)
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
_Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
_Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries._
|
|
@@ -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
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@progress/kendo-intl"),require("@progress/kendo-react-common"),require("prop-types")):"function"==typeof define&&define.amd?define(["exports","react","@progress/kendo-intl","@progress/kendo-react-common","prop-types"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactIntl={},e.React,e.KendoIntl,e.KendoReactCommon,e.PropTypes)}(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 i=a(t),l=a(n);const s={name:"@progress/kendo-react-intl",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};class c{constructor(e){if(this.locale=e,o.validatePackage(s),""===e&&"production"!==process.env.NODE_ENV)throw"Locale should not be empty string"}format(e,...t){return 1===t.length&&Array.isArray(t[0])?l.format(e,t[0],this.locale):l.format(e,t,this.locale)}formatDate(e,t){return l.formatDate(e,t,this.locale)}toString(e,t){return l.toString(e,t,this.locale)}parseNumber(e,t){return l.parseNumber(e,this.locale,t)}parseDate(e,t){return l.parseDate(e,t,this.locale)}formatNumber(e,t){return l.formatNumber(e,t,this.locale)}dateFieldName(e){return l.dateFieldName(e,this.locale)}dateFormatNames(e){return l.dateFormatNames(this.locale,e)}splitDateFormat(e){return l.splitDateFormat(e,this.locale)}numberSymbols(){return l.numberSymbols(this.locale)}firstDay(){return l.firstDay(this.locale)}localeInfo(){return l.localeInfo(this.locale)}localeCurrency(){return l.localeCurrency(this.locale)}}const u=Object.create({});let p=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&&u[this.language]&&u[this.language].hasOwnProperty(e)?u[this.language][e]:t}};const d=i.createContext({intl:new c("en"),localization:new p});const m=class extends i.Component{getIntlService(){return new c(this.props.locale)}render(){return i.createElement(d.Consumer,null,(e=>i.createElement(d.Provider,{value:{...e,intl:this.getIntlService()}},this.props.children)))}};m.propTypes={locale:r.string};let f=m;const g=(e,t,n)=>{for(const o in e)if(e.hasOwnProperty(o)){const r=[...n];if(r.push(o),"string"!=typeof e[o])g(e[o],t,r);else{const n=e[o];Object.defineProperty(t,r.join("."),{value:n})}}};const h=class extends i.Component{getLocalizationService(){return new p(this.props.language)}render(){return i.createElement(d.Consumer,null,(e=>i.createElement(d.Provider,{value:{...e,localization:this.getLocalizationService()}},this.props.children)))}};h.propTypes={language:r.string};let y=h;Object.defineProperty(e,"load",{enumerable:!0,get:function(){return n.load}}),e.GlobalizationContext=d,e.IntlProvider=f,e.IntlService=c,e.LocalizationProvider=y,e.LocalizationService=p,e.loadMessages=function(e,t){
|
|
8
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@progress/kendo-intl"),require("@progress/kendo-react-common"),require("prop-types")):"function"==typeof define&&define.amd?define(["exports","react","@progress/kendo-intl","@progress/kendo-react-common","prop-types"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactIntl={},e.React,e.KendoIntl,e.KendoReactCommon,e.PropTypes)}(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 i=a(t),l=a(n);const s={name:"@progress/kendo-react-intl",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};class c{constructor(e){if(this.locale=e,o.validatePackage(s),""===e&&"production"!==process.env.NODE_ENV)throw"Locale should not be empty string"}format(e,...t){return 1===t.length&&Array.isArray(t[0])?l.format(e,t[0],this.locale):l.format(e,t,this.locale)}formatDate(e,t){return l.formatDate(e,t,this.locale)}toString(e,t){return l.toString(e,t,this.locale)}parseNumber(e,t){return l.parseNumber(e,this.locale,t)}parseDate(e,t){return l.parseDate(e,t,this.locale)}formatNumber(e,t){return l.formatNumber(e,t,this.locale)}dateFieldName(e){return l.dateFieldName(e,this.locale)}dateFormatNames(e){return l.dateFormatNames(this.locale,e)}splitDateFormat(e){return l.splitDateFormat(e,this.locale)}numberSymbols(){return l.numberSymbols(this.locale)}firstDay(){return l.firstDay(this.locale)}localeInfo(){return l.localeInfo(this.locale)}localeCurrency(){return l.localeCurrency(this.locale)}}const u=Object.create({});let p=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&&u[this.language]&&u[this.language].hasOwnProperty(e)?u[this.language][e]:t}};const d=i.createContext({intl:new c("en"),localization:new p});const m=class extends i.Component{getIntlService(){return new c(this.props.locale)}render(){return i.createElement(d.Consumer,null,(e=>i.createElement(d.Provider,{value:{...e,intl:this.getIntlService()}},this.props.children)))}};m.propTypes={locale:r.string};let f=m;const g=(e,t,n)=>{for(const o in e)if(e.hasOwnProperty(o)){const r=[...n];if(r.push(o),"string"!=typeof e[o])g(e[o],t,r);else{const n=e[o];Object.defineProperty(t,r.join("."),{value:n})}}};const h=class extends i.Component{getLocalizationService(){return new p(this.props.language)}render(){return i.createElement(d.Consumer,null,(e=>i.createElement(d.Provider,{value:{...e,localization:this.getLocalizationService()}},this.props.children)))}};h.propTypes={language:r.string};let y=h;Object.defineProperty(e,"load",{enumerable:!0,get:function(){return n.load}}),e.GlobalizationContext=d,e.IntlProvider=f,e.IntlService=c,e.LocalizationProvider=y,e.LocalizationService=p,e.loadMessages=function(e,t){const n=u[t]=u[t]||{};g(e,n,[])},e.localizationMessages=u,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 p},e.registerForIntl=function(e){e.contextType=d},e.registerForLocalization=function(e){e.contextType=d},e.useInternationalization=()=>i.useContext(d).intl,e.useLocalization=()=>i.useContext(d).localization}));
|
package/package-metadata.mjs
CHANGED
|
@@ -10,7 +10,7 @@ const e = {
|
|
|
10
10
|
name: "@progress/kendo-react-intl",
|
|
11
11
|
productName: "KendoReact",
|
|
12
12
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
13
|
-
publishDate:
|
|
13
|
+
publishDate: 1731056517,
|
|
14
14
|
version: "",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-intl",
|
|
3
|
-
"version": "9.0.0-develop.
|
|
3
|
+
"version": "9.0.0-develop.20",
|
|
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": "9.0.0-develop.
|
|
27
|
+
"@progress/kendo-react-common": "9.0.0-develop.20",
|
|
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
|
},
|