@progress/kendo-react-intl 7.0.1 → 7.0.2-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.
@@ -3,7 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as React from 'react';
6
- import * as PropTypes from 'prop-types';
6
+ import PropTypes from 'prop-types';
7
7
  import { IntlService } from './IntlService';
8
8
  import { IntlProviderProps } from './IntlProviderProps';
9
9
  /**
@@ -3,7 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as React from 'react';
6
- import * as PropTypes from 'prop-types';
6
+ import PropTypes from 'prop-types';
7
7
  import { LocalizationProviderProps } from './LocalizationProviderProps';
8
8
  import { LocalizationService } from './LocalizationService';
9
9
  /**
@@ -2,7 +2,4 @@
2
2
  * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- (function(o,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react"),require("@progress/kendo-intl"),require("@progress/kendo-licensing"),require("prop-types")):typeof define=="function"&&define.amd?define(["exports","react","@progress/kendo-intl","@progress/kendo-licensing","prop-types"],l):(o=typeof globalThis<"u"?globalThis:o||self,l(o.KendoReactIntl={},o.React,o.KendoIntl,o.KendoLicensing,o.PropTypes))})(this,function(o,l,m,N,D){"use strict";"use client";function u(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const i=u(l),r=u(m),h=u(N),v=u(D),f={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 d{constructor(e){if(this.locale=e,typeof h<"u")h.validatePackage(f);else{let n=`License activation failed for ${f.name}
6
- `;n+=`The @progress/kendo-licensing script is not loaded.
7
- `,n+=`See ${f.licensingDocsUrl} for more information.
8
- `,console.warn(n)}if(e===""&&process.env.NODE_ENV!=="production")throw"Locale should not be empty string"}format(e,...n){return n.length===1&&Array.isArray(n[0])?r.format(e,n[0],this.locale):r.format(e,n,this.locale)}formatDate(e,n){return r.formatDate(e,n,this.locale)}toString(e,n){return r.toString(e,n,this.locale)}parseNumber(e,n){return r.parseNumber(e,this.locale,n)}parseDate(e,n){return r.parseDate(e,n,this.locale)}formatNumber(e,n){return r.formatNumber(e,n,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)}}const c=Object.create({});class p{constructor(e){if(this.language=e,e===""&&process.env.NODE_ENV!=="production")throw"Language should not be an empty string"}toLanguageString(e,n){return this.language&&c[this.language]&&c[this.language].hasOwnProperty(e)?c[this.language][e]:n}}const a=i.createContext({intl:new d("en"),localization:new p});class y extends i.Component{getIntlService(){return new d(this.props.locale)}render(){return i.createElement(a.Consumer,null,e=>i.createElement(a.Provider,{value:{...e,intl:this.getIntlService()}},this.props.children))}}y.propTypes={locale:v.string};const z=(t,e,n)=>{for(const s in t)if(t.hasOwnProperty(s)){const g=[...n];if(g.push(s),typeof t[s]!="string")z(t[s],e,g);else{const C=t[s];Object.defineProperty(e,g.join("."),{value:C})}}};function P(t,e){let n=c[e]=c[e]||{};z(t,n,[])}class S extends i.Component{getLocalizationService(){return new p(this.props.language)}render(){return i.createElement(a.Consumer,null,e=>i.createElement(a.Provider,{value:{...e,localization:this.getLocalizationService()}},this.props.children))}}S.propTypes={language:v.string};function b(t){if(!t&&process.env.NODE_ENV!=="production")throw`Passed component - ${t} is invalid.`;const e=t.context;return e&&e.intl?e.intl:new d("en")}function I(t){if(!t&&process.env.NODE_ENV!=="production")throw`Passed component - ${t} is invalid.`;const e=t.context;return e&&e.localization?e.localization:new p}function L(t){t.contextType=a}function O(t){t.contextType=a}const w=()=>i.useContext(a).intl,E=()=>i.useContext(a).localization;Object.defineProperty(o,"load",{enumerable:!0,get:()=>m.load}),o.GlobalizationContext=a,o.IntlProvider=y,o.IntlService=d,o.LocalizationProvider=S,o.LocalizationService=p,o.loadMessages=P,o.localizationMessages=c,o.provideIntlService=b,o.provideLocalizationService=I,o.registerForIntl=L,o.registerForLocalization=O,o.useInternationalization=w,o.useLocalization=E,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
5
+ (function(o,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react"),require("@progress/kendo-intl"),require("@progress/kendo-react-common"),require("prop-types")):typeof define=="function"&&define.amd?define(["exports","react","@progress/kendo-intl","@progress/kendo-react-common","prop-types"],l):(o=typeof globalThis<"u"?globalThis:o||self,l(o.KendoReactIntl={},o.React,o.KendoIntl,o.KendoReactCommon,o.PropTypes))})(this,function(o,l,m,z,f){"use strict";"use client";function g(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const c=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,c.get?c:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const i=g(l),r=g(m),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 u{constructor(e){if(this.locale=e,z.validatePackage(S),e===""&&process.env.NODE_ENV!=="production")throw"Locale should not be empty string"}format(e,...n){return n.length===1&&Array.isArray(n[0])?r.format(e,n[0],this.locale):r.format(e,n,this.locale)}formatDate(e,n){return r.formatDate(e,n,this.locale)}toString(e,n){return r.toString(e,n,this.locale)}parseNumber(e,n){return r.parseNumber(e,this.locale,n)}parseDate(e,n){return r.parseDate(e,n,this.locale)}formatNumber(e,n){return r.formatNumber(e,n,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)}}const s=Object.create({});class d{constructor(e){if(this.language=e,e===""&&process.env.NODE_ENV!=="production")throw"Language should not be an empty string"}toLanguageString(e,n){return this.language&&s[this.language]&&s[this.language].hasOwnProperty(e)?s[this.language][e]:n}}const a=i.createContext({intl:new u("en"),localization:new d});class h extends i.Component{getIntlService(){return new u(this.props.locale)}render(){return i.createElement(a.Consumer,null,e=>i.createElement(a.Provider,{value:{...e,intl:this.getIntlService()}},this.props.children))}}h.propTypes={locale:f.string};const v=(t,e,n)=>{for(const c in t)if(t.hasOwnProperty(c)){const p=[...n];if(p.push(c),typeof t[c]!="string")v(t[c],e,p);else{const w=t[c];Object.defineProperty(e,p.join("."),{value:w})}}};function N(t,e){let n=s[e]=s[e]||{};v(t,n,[])}class y extends i.Component{getLocalizationService(){return new d(this.props.language)}render(){return i.createElement(a.Consumer,null,e=>i.createElement(a.Provider,{value:{...e,localization:this.getLocalizationService()}},this.props.children))}}y.propTypes={language:f.string};function b(t){if(!t&&process.env.NODE_ENV!=="production")throw`Passed component - ${t} is invalid.`;const e=t.context;return e&&e.intl?e.intl:new u("en")}function D(t){if(!t&&process.env.NODE_ENV!=="production")throw`Passed component - ${t} is invalid.`;const e=t.context;return e&&e.localization?e.localization:new d}function I(t){t.contextType=a}function O(t){t.contextType=a}const E=()=>i.useContext(a).intl,P=()=>i.useContext(a).localization;Object.defineProperty(o,"load",{enumerable:!0,get:()=>m.load}),o.GlobalizationContext=a,o.IntlProvider=h,o.IntlService=u,o.LocalizationProvider=y,o.LocalizationService=d,o.loadMessages=N,o.localizationMessages=s,o.provideIntlService=b,o.provideLocalizationService=D,o.registerForIntl=I,o.registerForLocalization=O,o.useInternationalization=E,o.useLocalization=P,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
package/index.d.mts ADDED
@@ -0,0 +1,5 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ export * from './index';
package/index.js CHANGED
@@ -2,7 +2,4 @@
2
2
  * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),m=require("@progress/kendo-intl"),b=require("@progress/kendo-licensing"),N=require("prop-types");function c(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,a.get?a:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const r=c(S),o=c(m),g=c(b),f=c(N),d={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 l{constructor(e){if(this.locale=e,typeof g<"u")g.validatePackage(d);else{let n=`License activation failed for ${d.name}
6
- `;n+=`The @progress/kendo-licensing script is not loaded.
7
- `,n+=`See ${d.licensingDocsUrl} for more information.
8
- `,console.warn(n)}if(e===""&&process.env.NODE_ENV!=="production")throw"Locale should not be empty string"}format(e,...n){return n.length===1&&Array.isArray(n[0])?o.format(e,n[0],this.locale):o.format(e,n,this.locale)}formatDate(e,n){return o.formatDate(e,n,this.locale)}toString(e,n){return o.toString(e,n,this.locale)}parseNumber(e,n){return o.parseNumber(e,this.locale,n)}parseDate(e,n){return o.parseDate(e,n,this.locale)}formatNumber(e,n){return o.formatNumber(e,n,this.locale)}dateFieldName(e){return o.dateFieldName(e,this.locale)}dateFormatNames(e){return o.dateFormatNames(this.locale,e)}splitDateFormat(e){return o.splitDateFormat(e,this.locale)}numberSymbols(){return o.numberSymbols(this.locale)}firstDay(){return o.firstDay(this.locale)}localeInfo(){return o.localeInfo(this.locale)}localeCurrency(){return o.localeCurrency(this.locale)}}const s=Object.create({});class u{constructor(e){if(this.language=e,e===""&&process.env.NODE_ENV!=="production")throw"Language should not be an empty string"}toLanguageString(e,n){return this.language&&s[this.language]&&s[this.language].hasOwnProperty(e)?s[this.language][e]:n}}const i=r.createContext({intl:new l("en"),localization:new u});class h extends r.Component{getIntlService(){return new l(this.props.locale)}render(){return r.createElement(i.Consumer,null,e=>r.createElement(i.Provider,{value:{...e,intl:this.getIntlService()}},this.props.children))}}h.propTypes={locale:f.string};const v=(t,e,n)=>{for(const a in t)if(t.hasOwnProperty(a)){const p=[...n];if(p.push(a),typeof t[a]!="string")v(t[a],e,p);else{const z=t[a];Object.defineProperty(e,p.join("."),{value:z})}}};function D(t,e){let n=s[e]=s[e]||{};v(t,n,[])}class y extends r.Component{getLocalizationService(){return new u(this.props.language)}render(){return r.createElement(i.Consumer,null,e=>r.createElement(i.Provider,{value:{...e,localization:this.getLocalizationService()}},this.props.children))}}y.propTypes={language:f.string};function P(t){if(!t&&process.env.NODE_ENV!=="production")throw`Passed component - ${t} is invalid.`;const e=t.context;return e&&e.intl?e.intl:new l("en")}function I(t){if(!t&&process.env.NODE_ENV!=="production")throw`Passed component - ${t} is invalid.`;const e=t.context;return e&&e.localization?e.localization:new u}function O(t){t.contextType=i}function w(t){t.contextType=i}const E=()=>r.useContext(i).intl,L=()=>r.useContext(i).localization;Object.defineProperty(exports,"load",{enumerable:!0,get:()=>m.load});exports.GlobalizationContext=i;exports.IntlProvider=h;exports.IntlService=l;exports.LocalizationProvider=y;exports.LocalizationService=u;exports.loadMessages=D;exports.localizationMessages=s;exports.provideIntlService=P;exports.provideLocalizationService=I;exports.registerForIntl=O;exports.registerForLocalization=w;exports.useInternationalization=E;exports.useLocalization=L;
5
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),p=require("@progress/kendo-intl"),z=require("@progress/kendo-react-common"),d=require("prop-types");function g(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const n=g(y),o=g(p),b={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 s{constructor(e){if(this.locale=e,z.validatePackage(b),e===""&&process.env.NODE_ENV!=="production")throw"Locale should not be empty string"}format(e,...r){return r.length===1&&Array.isArray(r[0])?o.format(e,r[0],this.locale):o.format(e,r,this.locale)}formatDate(e,r){return o.formatDate(e,r,this.locale)}toString(e,r){return o.toString(e,r,this.locale)}parseNumber(e,r){return o.parseNumber(e,this.locale,r)}parseDate(e,r){return o.parseDate(e,r,this.locale)}formatNumber(e,r){return o.formatNumber(e,r,this.locale)}dateFieldName(e){return o.dateFieldName(e,this.locale)}dateFormatNames(e){return o.dateFormatNames(this.locale,e)}splitDateFormat(e){return o.splitDateFormat(e,this.locale)}numberSymbols(){return o.numberSymbols(this.locale)}firstDay(){return o.firstDay(this.locale)}localeInfo(){return o.localeInfo(this.locale)}localeCurrency(){return o.localeCurrency(this.locale)}}const l=Object.create({});class c{constructor(e){if(this.language=e,e===""&&process.env.NODE_ENV!=="production")throw"Language should not be an empty string"}toLanguageString(e,r){return this.language&&l[this.language]&&l[this.language].hasOwnProperty(e)?l[this.language][e]:r}}const a=n.createContext({intl:new s("en"),localization:new c});class m extends n.Component{getIntlService(){return new s(this.props.locale)}render(){return n.createElement(a.Consumer,null,e=>n.createElement(a.Provider,{value:{...e,intl:this.getIntlService()}},this.props.children))}}m.propTypes={locale:d.string};const h=(t,e,r)=>{for(const i in t)if(t.hasOwnProperty(i)){const u=[...r];if(u.push(i),typeof t[i]!="string")h(t[i],e,u);else{const v=t[i];Object.defineProperty(e,u.join("."),{value:v})}}};function S(t,e){let r=l[e]=l[e]||{};h(t,r,[])}class f extends n.Component{getLocalizationService(){return new c(this.props.language)}render(){return n.createElement(a.Consumer,null,e=>n.createElement(a.Provider,{value:{...e,localization:this.getLocalizationService()}},this.props.children))}}f.propTypes={language:d.string};function N(t){if(!t&&process.env.NODE_ENV!=="production")throw`Passed component - ${t} is invalid.`;const e=t.context;return e&&e.intl?e.intl:new s("en")}function D(t){if(!t&&process.env.NODE_ENV!=="production")throw`Passed component - ${t} is invalid.`;const e=t.context;return e&&e.localization?e.localization:new c}function I(t){t.contextType=a}function O(t){t.contextType=a}const P=()=>n.useContext(a).intl,E=()=>n.useContext(a).localization;Object.defineProperty(exports,"load",{enumerable:!0,get:()=>p.load});exports.GlobalizationContext=a;exports.IntlProvider=m;exports.IntlService=s;exports.LocalizationProvider=f;exports.LocalizationService=c;exports.loadMessages=S;exports.localizationMessages=l;exports.provideIntlService=N;exports.provideLocalizationService=D;exports.registerForIntl=I;exports.registerForLocalization=O;exports.useInternationalization=P;exports.useLocalization=E;
package/index.mjs CHANGED
@@ -4,35 +4,26 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use client";
6
6
  import * as n from "react";
7
- import * as r from "@progress/kendo-intl";
8
- import { load as I } from "@progress/kendo-intl";
9
- import * as m from "@progress/kendo-licensing";
10
- import * as d from "prop-types";
11
- const c = {
7
+ import * as o from "@progress/kendo-intl";
8
+ import { load as L } from "@progress/kendo-intl";
9
+ import { validatePackage as d } from "@progress/kendo-react-common";
10
+ import p from "prop-types";
11
+ const g = {
12
12
  name: "@progress/kendo-react-intl",
13
13
  productName: "KendoReact",
14
14
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
15
- publishDate: 1702376580,
15
+ publishDate: 1702631316,
16
16
  version: "",
17
17
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
18
18
  };
19
- class u {
19
+ class c {
20
20
  /**
21
21
  * Creates a new instance of the internationalization service.
22
22
  *
23
23
  * @param locale - The locale that will be used by the internationalization methods.
24
24
  */
25
25
  constructor(e) {
26
- if (this.locale = e, typeof m < "u")
27
- m.validatePackage(c);
28
- else {
29
- let t = `License activation failed for ${c.name}
30
- `;
31
- t += `The @progress/kendo-licensing script is not loaded.
32
- `, t += `See ${c.licensingDocsUrl} for more information.
33
- `, console.warn(t);
34
- }
35
- if (e === "" && process.env.NODE_ENV !== "production")
26
+ if (this.locale = e, d(g), e === "" && process.env.NODE_ENV !== "production")
36
27
  throw "Locale should not be empty string";
37
28
  }
38
29
  /**
@@ -42,8 +33,8 @@ class u {
42
33
  * @param values - One or more values to output in the format string placeholders.
43
34
  * @return - The formatted string.
44
35
  */
45
- format(e, ...t) {
46
- return t.length === 1 && Array.isArray(t[0]) ? r.format(e, t[0], this.locale) : r.format(e, t, this.locale);
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);
47
38
  }
48
39
  /**
49
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.
@@ -52,8 +43,8 @@ class u {
52
43
  * @param format - The format string or options.
53
44
  * @return - The formatted date.
54
45
  */
55
- formatDate(e, t) {
56
- return r.formatDate(e, t, this.locale);
46
+ formatDate(e, r) {
47
+ return o.formatDate(e, r, this.locale);
57
48
  }
58
49
  /**
59
50
  * Converts an object to a string based on the specified format.
@@ -62,8 +53,8 @@ class u {
62
53
  * @param format - The format to use.
63
54
  * @return - The formatted object.
64
55
  */
65
- toString(e, t) {
66
- return r.toString(e, t, this.locale);
56
+ toString(e, r) {
57
+ return o.toString(e, r, this.locale);
67
58
  }
68
59
  /**
69
60
  * Converts a string to a `Number`.
@@ -72,8 +63,8 @@ class u {
72
63
  * @param format - The format string or options.
73
64
  * @return - The parsed number.
74
65
  */
75
- parseNumber(e, t) {
76
- return r.parseNumber(e, this.locale, t);
66
+ parseNumber(e, r) {
67
+ return o.parseNumber(e, this.locale, r);
77
68
  }
78
69
  /**
79
70
  * Converts a string to a `Date` object based on the specified format.
@@ -82,8 +73,8 @@ class u {
82
73
  * @param format - The format strings or options.
83
74
  * @return - The parsed date.
84
75
  */
85
- parseDate(e, t) {
86
- return r.parseDate(e, t, this.locale);
76
+ parseDate(e, r) {
77
+ return o.parseDate(e, r, this.locale);
87
78
  }
88
79
  /**
89
80
  * Converts a `Number` to a string based on the specified format.
@@ -92,8 +83,8 @@ class u {
92
83
  * @param format - The format string or options.
93
84
  * @return - The formatted number.
94
85
  */
95
- formatNumber(e, t) {
96
- return r.formatNumber(e, t, this.locale);
86
+ formatNumber(e, r) {
87
+ return o.formatNumber(e, r, this.locale);
97
88
  }
98
89
  /**
99
90
  * Returns a localized date field name based on specific `dateFieldName` options.
@@ -102,7 +93,7 @@ class u {
102
93
  * @returns - The localized date field name from the current locale based on the option.
103
94
  */
104
95
  dateFieldName(e) {
105
- return r.dateFieldName(e, this.locale);
96
+ return o.dateFieldName(e, this.locale);
106
97
  }
107
98
  /**
108
99
  * Returns the day names from the current locale based on the option.
@@ -111,7 +102,7 @@ class u {
111
102
  * @return - The day names from the current locale based on the option.
112
103
  */
113
104
  dateFormatNames(e) {
114
- return r.dateFormatNames(this.locale, e);
105
+ return o.dateFormatNames(this.locale, e);
115
106
  }
116
107
  /**
117
108
  * Splits the date format into objects which contain information about each part of the pattern.
@@ -120,7 +111,7 @@ class u {
120
111
  * @returns - The date format parts.
121
112
  */
122
113
  splitDateFormat(e) {
123
- return r.splitDateFormat(e, this.locale);
114
+ return o.splitDateFormat(e, this.locale);
124
115
  }
125
116
  /**
126
117
  * Returns the number symbols from the current locale.
@@ -128,7 +119,7 @@ class u {
128
119
  * @return - The number symbols from the current locale.
129
120
  */
130
121
  numberSymbols() {
131
- return r.numberSymbols(this.locale);
122
+ return o.numberSymbols(this.locale);
132
123
  }
133
124
  /**
134
125
  * Returns the first day index, starting from Sunday.
@@ -136,23 +127,23 @@ class u {
136
127
  * @return - The index of the first day of the week (0 == Sunday).
137
128
  */
138
129
  firstDay() {
139
- return r.firstDay(this.locale);
130
+ return o.firstDay(this.locale);
140
131
  }
141
132
  /**
142
133
  * @hidden
143
134
  */
144
135
  localeInfo() {
145
- return r.localeInfo(this.locale);
136
+ return o.localeInfo(this.locale);
146
137
  }
147
138
  /**
148
139
  * @hidden
149
140
  */
150
141
  localeCurrency() {
151
- return r.localeCurrency(this.locale);
142
+ return o.localeCurrency(this.locale);
152
143
  }
153
144
  }
154
145
  const s = /* @__PURE__ */ Object.create({});
155
- class p {
146
+ class u {
156
147
  constructor(e) {
157
148
  if (this.language = e, e === "" && process.env.NODE_ENV !== "production")
158
149
  throw "Language should not be an empty string";
@@ -167,20 +158,20 @@ class p {
167
158
  * @return - The string for the current language.
168
159
  */
169
160
  // tslint:enable:max-line-length
170
- toLanguageString(e, t) {
171
- return this.language && s[this.language] && s[this.language].hasOwnProperty(e) ? s[this.language][e] : t;
161
+ toLanguageString(e, r) {
162
+ return this.language && s[this.language] && s[this.language].hasOwnProperty(e) ? s[this.language][e] : r;
172
163
  }
173
164
  }
174
165
  const a = n.createContext({
175
- intl: new u("en"),
176
- localization: new p()
166
+ intl: new c("en"),
167
+ localization: new u()
177
168
  });
178
169
  class f extends n.Component {
179
170
  /**
180
171
  * Returns an internationalization service. The method is suitable for overriding when you implement custom internationalization behavior.
181
172
  */
182
173
  getIntlService() {
183
- return new u(this.props.locale);
174
+ return new c(this.props.locale);
184
175
  }
185
176
  /**
186
177
  * @hidden
@@ -190,30 +181,30 @@ class f extends n.Component {
190
181
  }
191
182
  }
192
183
  f.propTypes = {
193
- locale: d.string
184
+ locale: p.string
194
185
  };
195
- const g = (o, e, t) => {
196
- for (const i in o)
197
- if (o.hasOwnProperty(i)) {
198
- const l = [...t];
199
- if (l.push(i), typeof o[i] != "string")
200
- g(o[i], e, l);
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);
201
192
  else {
202
- const h = o[i];
193
+ const h = t[i];
203
194
  Object.defineProperty(e, l.join("."), { value: h });
204
195
  }
205
196
  }
206
197
  };
207
- function y(o, e) {
208
- let t = s[e] = s[e] || {};
209
- g(o, t, []);
198
+ function E(t, e) {
199
+ let r = s[e] = s[e] || {};
200
+ m(t, r, []);
210
201
  }
211
202
  class v extends n.Component {
212
203
  /**
213
204
  * Returns a localization service. The method is suitable for overriding when you implement custom localization behavior.
214
205
  */
215
206
  getLocalizationService() {
216
- return new p(this.props.language);
207
+ return new u(this.props.language);
217
208
  }
218
209
  /**
219
210
  * @hidden
@@ -223,40 +214,40 @@ class v extends n.Component {
223
214
  }
224
215
  }
225
216
  v.propTypes = {
226
- language: d.string
217
+ language: p.string
227
218
  };
228
- function N(o) {
229
- if (!o && process.env.NODE_ENV !== "production")
230
- throw `Passed component - ${o} is invalid.`;
231
- const e = o.context;
232
- return e && e.intl ? e.intl : new u("en");
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");
233
224
  }
234
- function D(o) {
235
- if (!o && process.env.NODE_ENV !== "production")
236
- throw `Passed component - ${o} is invalid.`;
237
- const e = o.context;
238
- return e && e.localization ? e.localization : new p();
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();
239
230
  }
240
- function E(o) {
241
- o.contextType = a;
231
+ function z(t) {
232
+ t.contextType = a;
242
233
  }
243
- function w(o) {
244
- o.contextType = a;
234
+ function x(t) {
235
+ t.contextType = a;
245
236
  }
246
- const z = () => n.useContext(a).intl, x = () => n.useContext(a).localization;
237
+ const C = () => n.useContext(a).intl, S = () => n.useContext(a).localization;
247
238
  export {
248
239
  a as GlobalizationContext,
249
240
  f as IntlProvider,
250
- u as IntlService,
241
+ c as IntlService,
251
242
  v as LocalizationProvider,
252
- p as LocalizationService,
253
- I as load,
254
- y as loadMessages,
243
+ u as LocalizationService,
244
+ L as load,
245
+ E as loadMessages,
255
246
  s as localizationMessages,
256
- N as provideIntlService,
257
- D as provideLocalizationService,
258
- E as registerForIntl,
259
- w as registerForLocalization,
260
- z as useInternationalization,
261
- x as useLocalization
247
+ D as provideIntlService,
248
+ w as provideLocalizationService,
249
+ z as registerForIntl,
250
+ x as registerForLocalization,
251
+ C as useInternationalization,
252
+ S as useLocalization
262
253
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-intl",
3
- "version": "7.0.1",
3
+ "version": "7.0.2-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",
@@ -10,15 +10,21 @@
10
10
  "types": "./index.d.ts",
11
11
  "exports": {
12
12
  ".": {
13
- "import": "./index.mjs",
14
- "require": "./index.js"
13
+ "import": {
14
+ "types": "./index.d.mts",
15
+ "default": "./index.mjs"
16
+ },
17
+ "require": {
18
+ "types": "./index.d.ts",
19
+ "default": "./index.js"
20
+ }
15
21
  }
16
22
  },
17
23
  "sideEffects": false,
18
24
  "peerDependencies": {
19
25
  "@progress/kendo-intl": "^3.1.1",
20
- "@progress/kendo-licensing": "^1.3.0",
21
- "@progress/kendo-react-common": "7.0.1",
26
+ "@progress/kendo-licensing": "^1.3.4",
27
+ "@progress/kendo-react-common": "7.0.2-develop.2",
22
28
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
23
29
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
24
30
  },