@progress/kendo-vue-intl 5.3.0-dev.202409130647 → 5.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 +64 -0
- package/Intl/IntlService.js +8 -0
- package/Intl/IntlService.mjs +128 -0
- package/Localization/LocalizationProvider.js +8 -0
- package/Localization/LocalizationProvider.mjs +60 -0
- package/Localization/LocalizationService.js +8 -0
- package/Localization/LocalizationService.mjs +30 -0
- package/Localization/loadMessages.js +8 -0
- package/Localization/loadMessages.mjs +27 -0
- package/Localization/messages.js +8 -0
- package/Localization/messages.mjs +11 -0
- package/README.md +28 -20
- package/dist/cdn/js/kendo-vue-intl.js +8 -1
- package/index.d.mts +246 -0
- package/index.d.ts +246 -0
- package/index.js +8 -0
- package/index.mjs +24 -0
- package/intlUtils.js +8 -0
- package/intlUtils.mjs +25 -0
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +18 -0
- package/package.json +28 -34
- package/dist/es/Intl/IntlProvider.d.ts +0 -49
- package/dist/es/Intl/IntlProvider.js +0 -91
- package/dist/es/Intl/IntlProviderProps.d.ts +0 -9
- package/dist/es/Intl/IntlProviderProps.js +0 -1
- package/dist/es/Intl/IntlService.d.ts +0 -98
- package/dist/es/Intl/IntlService.js +0 -134
- package/dist/es/Intl/main.d.ts +0 -4
- package/dist/es/Intl/main.js +0 -8
- package/dist/es/Localization/LocalizationProvider.d.ts +0 -49
- package/dist/es/Localization/LocalizationProvider.js +0 -88
- package/dist/es/Localization/LocalizationProviderProps.d.ts +0 -9
- package/dist/es/Localization/LocalizationProviderProps.js +0 -1
- package/dist/es/Localization/LocalizationService.d.ts +0 -18
- package/dist/es/Localization/LocalizationService.js +0 -39
- package/dist/es/Localization/loadMessages.d.ts +0 -7
- package/dist/es/Localization/loadMessages.js +0 -35
- package/dist/es/Localization/main.d.ts +0 -5
- package/dist/es/Localization/main.js +0 -9
- package/dist/es/Localization/messages.d.ts +0 -4
- package/dist/es/Localization/messages.js +0 -4
- package/dist/es/additionalTypes.ts +0 -21
- package/dist/es/coreExports.d.ts +0 -1
- package/dist/es/coreExports.js +0 -1
- package/dist/es/intlUtils.d.ts +0 -21
- package/dist/es/intlUtils.js +0 -37
- package/dist/es/main.d.ts +0 -4
- package/dist/es/main.js +0 -4
- package/dist/es/package-metadata.d.ts +0 -5
- package/dist/es/package-metadata.js +0 -11
- package/dist/esm/Intl/IntlProvider.d.ts +0 -49
- package/dist/esm/Intl/IntlProvider.js +0 -91
- package/dist/esm/Intl/IntlProviderProps.d.ts +0 -9
- package/dist/esm/Intl/IntlProviderProps.js +0 -1
- package/dist/esm/Intl/IntlService.d.ts +0 -98
- package/dist/esm/Intl/IntlService.js +0 -134
- package/dist/esm/Intl/main.d.ts +0 -4
- package/dist/esm/Intl/main.js +0 -8
- package/dist/esm/Localization/LocalizationProvider.d.ts +0 -49
- package/dist/esm/Localization/LocalizationProvider.js +0 -88
- package/dist/esm/Localization/LocalizationProviderProps.d.ts +0 -9
- package/dist/esm/Localization/LocalizationProviderProps.js +0 -1
- package/dist/esm/Localization/LocalizationService.d.ts +0 -18
- package/dist/esm/Localization/LocalizationService.js +0 -39
- package/dist/esm/Localization/loadMessages.d.ts +0 -7
- package/dist/esm/Localization/loadMessages.js +0 -35
- package/dist/esm/Localization/main.d.ts +0 -5
- package/dist/esm/Localization/main.js +0 -9
- package/dist/esm/Localization/messages.d.ts +0 -4
- package/dist/esm/Localization/messages.js +0 -4
- package/dist/esm/additionalTypes.ts +0 -21
- package/dist/esm/coreExports.d.ts +0 -1
- package/dist/esm/coreExports.js +0 -1
- package/dist/esm/intlUtils.d.ts +0 -21
- package/dist/esm/intlUtils.js +0 -37
- package/dist/esm/main.d.ts +0 -4
- package/dist/esm/main.js +0 -4
- package/dist/esm/package-metadata.d.ts +0 -5
- package/dist/esm/package-metadata.js +0 -11
- package/dist/esm/package.json +0 -3
- package/dist/npm/Intl/IntlProvider.d.ts +0 -49
- package/dist/npm/Intl/IntlProvider.js +0 -98
- package/dist/npm/Intl/IntlProviderProps.d.ts +0 -9
- package/dist/npm/Intl/IntlProviderProps.js +0 -2
- package/dist/npm/Intl/IntlService.d.ts +0 -98
- package/dist/npm/Intl/IntlService.js +0 -137
- package/dist/npm/Intl/main.d.ts +0 -4
- package/dist/npm/Intl/main.js +0 -13
- package/dist/npm/Localization/LocalizationProvider.d.ts +0 -49
- package/dist/npm/Localization/LocalizationProvider.js +0 -95
- package/dist/npm/Localization/LocalizationProviderProps.d.ts +0 -9
- package/dist/npm/Localization/LocalizationProviderProps.js +0 -2
- package/dist/npm/Localization/LocalizationService.d.ts +0 -18
- package/dist/npm/Localization/LocalizationService.js +0 -42
- package/dist/npm/Localization/loadMessages.d.ts +0 -7
- package/dist/npm/Localization/loadMessages.js +0 -39
- package/dist/npm/Localization/main.d.ts +0 -5
- package/dist/npm/Localization/main.js +0 -15
- package/dist/npm/Localization/messages.d.ts +0 -4
- package/dist/npm/Localization/messages.js +0 -7
- package/dist/npm/additionalTypes.ts +0 -21
- package/dist/npm/coreExports.d.ts +0 -1
- package/dist/npm/coreExports.js +0 -5
- package/dist/npm/intlUtils.d.ts +0 -21
- package/dist/npm/intlUtils.js +0 -42
- package/dist/npm/main.d.ts +0 -4
- package/dist/npm/main.js +0 -20
- package/dist/npm/package-metadata.d.ts +0 -5
- package/dist/npm/package-metadata.js +0 -14
|
@@ -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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),n=require("./IntlService.js"),r=require("@progress/kendo-vue-common"),i=require("../package-metadata.js"),l=t.defineComponent({props:{locale:String},data(){return this.getChildContext()},setup(e){const o=t.ref(new n.IntlService(e.locale));t.provide("kendoIntlService",o)},watch:{locale:function(e){this.$data.kendoIntlService.locale=e}},provide:function(){return{kendoIntlService:this.$data.kendoIntlService}},methods:{getIntlService(){return new n.IntlService(this.$props.locale)},getChildContext(){return{kendoIntlService:this.getIntlService()}}},created:function(){r.validatePackage(i.packageMetadata)},render(){const e=r.getDefaultSlots(this);return t.createVNode("div",null,[e])}});exports.IntlProvider=l;
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
import { defineComponent as n, ref as o, provide as i, createVNode as l } from "vue";
|
|
9
|
+
import { IntlService as t } from "./IntlService.mjs";
|
|
10
|
+
import { validatePackage as a, getDefaultSlots as c } from "@progress/kendo-vue-common";
|
|
11
|
+
import { packageMetadata as d } from "../package-metadata.mjs";
|
|
12
|
+
const S = /* @__PURE__ */ n({
|
|
13
|
+
props: {
|
|
14
|
+
locale: String
|
|
15
|
+
},
|
|
16
|
+
data() {
|
|
17
|
+
return this.getChildContext();
|
|
18
|
+
},
|
|
19
|
+
setup(e) {
|
|
20
|
+
const r = o(new t(e.locale));
|
|
21
|
+
i("kendoIntlService", r);
|
|
22
|
+
},
|
|
23
|
+
watch: {
|
|
24
|
+
locale: function(e) {
|
|
25
|
+
this.$data.kendoIntlService.locale = e;
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
provide: function() {
|
|
29
|
+
return {
|
|
30
|
+
kendoIntlService: this.$data.kendoIntlService
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
methods: {
|
|
34
|
+
/**
|
|
35
|
+
* Returns an internationalization service.
|
|
36
|
+
* The method is suitable for overriding when you
|
|
37
|
+
* implement custom internationalization behavior.
|
|
38
|
+
*/
|
|
39
|
+
getIntlService() {
|
|
40
|
+
return new t(this.$props.locale);
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* @hidden
|
|
44
|
+
*/
|
|
45
|
+
getChildContext() {
|
|
46
|
+
return {
|
|
47
|
+
kendoIntlService: this.getIntlService()
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
created: function() {
|
|
52
|
+
a(d);
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* @hidden
|
|
56
|
+
*/
|
|
57
|
+
render() {
|
|
58
|
+
const e = c(this);
|
|
59
|
+
return l("div", null, [e]);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
export {
|
|
63
|
+
S as IntlProvider
|
|
64
|
+
};
|
|
@@ -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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@progress/kendo-intl");function n(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const r=n(l);class i{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)}}exports.IntlService=i;
|
|
@@ -0,0 +1,128 @@
|
|
|
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
|
+
import * as e from "@progress/kendo-intl";
|
|
9
|
+
class o {
|
|
10
|
+
/**
|
|
11
|
+
* Creates a new instance of the internationalization service.
|
|
12
|
+
*
|
|
13
|
+
* @param locale - The locale that will be used by the internationalization methods.
|
|
14
|
+
*/
|
|
15
|
+
constructor(t) {
|
|
16
|
+
if (this.locale = t, t === "" && process.env.NODE_ENV !== "production")
|
|
17
|
+
throw "Locale should not be empty string";
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Formats a string with placeholders such as
|
|
21
|
+
* `Total amount {0:c}`.
|
|
22
|
+
*
|
|
23
|
+
* @param format - The format string.
|
|
24
|
+
* @param values - One or more values to output in the format string placeholders.
|
|
25
|
+
* @return - The formatted string.
|
|
26
|
+
*/
|
|
27
|
+
format(t, ...r) {
|
|
28
|
+
return r.length === 1 && Array.isArray(r[0]) ? e.format(t, r[0], this.locale) : e.format(t, r, this.locale);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Converts a `Date` object to a string based on the specified format.
|
|
32
|
+
* If no format is provided, the default short date format is used.
|
|
33
|
+
*
|
|
34
|
+
* @param value - The date which will be formatted.
|
|
35
|
+
* @param format - The format string or options.
|
|
36
|
+
* @return - The formatted date.
|
|
37
|
+
*/
|
|
38
|
+
formatDate(t, r) {
|
|
39
|
+
return e.formatDate(t, r, this.locale);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Converts an object to a string based on the specified format.
|
|
43
|
+
*
|
|
44
|
+
* @param value - The value which will be formatted.
|
|
45
|
+
* @param format - The format to use.
|
|
46
|
+
* @return - The formatted object.
|
|
47
|
+
*/
|
|
48
|
+
toString(t, r) {
|
|
49
|
+
return e.toString(t, r, this.locale);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Converts a string to a `Number`.
|
|
53
|
+
*
|
|
54
|
+
* @param value - The string which will be parsed.
|
|
55
|
+
* @param format - The format string or options.
|
|
56
|
+
* @return - The parsed number.
|
|
57
|
+
*/
|
|
58
|
+
parseNumber(t, r) {
|
|
59
|
+
return e.parseNumber(t, this.locale, r);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Converts a string to a `Date` object based on the specified format.
|
|
63
|
+
*
|
|
64
|
+
* @param value - The string which will be converted.
|
|
65
|
+
* @param format - The format strings or options.
|
|
66
|
+
* @return - The parsed date.
|
|
67
|
+
*/
|
|
68
|
+
parseDate(t, r) {
|
|
69
|
+
return e.parseDate(t, r, this.locale);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Converts a `Number` to a string based on the specified format.
|
|
73
|
+
*
|
|
74
|
+
* @param value - The number which will be formatted.
|
|
75
|
+
* @param format - The format string or options.
|
|
76
|
+
* @return - The formatted number.
|
|
77
|
+
*/
|
|
78
|
+
formatNumber(t, r) {
|
|
79
|
+
return e.formatNumber(t, r, this.locale);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Returns a localized date field name based on specific `dateFieldName` options.
|
|
83
|
+
*
|
|
84
|
+
* @param options - The detailed configuration for the desired date field name.
|
|
85
|
+
* @returns - The localized date field name from the current locale based on the option.
|
|
86
|
+
*/
|
|
87
|
+
dateFieldName(t) {
|
|
88
|
+
return e.dateFieldName(t, this.locale);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Returns the day names from the current locale based on the option.
|
|
92
|
+
*
|
|
93
|
+
* @param options - The detailed configuration for the desired date format.
|
|
94
|
+
* @return - The day names from the current locale based on the option.
|
|
95
|
+
*/
|
|
96
|
+
dateFormatNames(t) {
|
|
97
|
+
return e.dateFormatNames(this.locale, t);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Splits the date format into objects which contain
|
|
101
|
+
* information about each part of the pattern.
|
|
102
|
+
*
|
|
103
|
+
* @param format - The format string or options.
|
|
104
|
+
* @returns - The date format parts.
|
|
105
|
+
*/
|
|
106
|
+
splitDateFormat(t) {
|
|
107
|
+
return e.splitDateFormat(t, this.locale);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Returns the number symbols from the current locale.
|
|
111
|
+
*
|
|
112
|
+
* @return - The number symbols from the current locale.
|
|
113
|
+
*/
|
|
114
|
+
numberSymbols() {
|
|
115
|
+
return e.numberSymbols(this.locale);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Returns the first day index, starting from Sunday.
|
|
119
|
+
*
|
|
120
|
+
* @return - The index of the first day of the week (0 == Sunday).
|
|
121
|
+
*/
|
|
122
|
+
firstDay() {
|
|
123
|
+
return e.firstDay(this.locale);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
export {
|
|
127
|
+
o as IntlService
|
|
128
|
+
};
|
|
@@ -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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),o=require("./LocalizationService.js"),n=require("@progress/kendo-vue-common"),a=i.defineComponent({props:{language:String},data(){return this.getChildContext()},watch:{language:function(e){this.$data.kendoLocalizationService.language=e}},setup(e){const t=i.ref(new o.LocalizationService(e.language));i.provide("kendoLocalizationService",t)},provide:function(){return{kendoLocalizationService:this.$data.kendoLocalizationService}},methods:{getLocalizationService(){return new o.LocalizationService(this.$props.language)},getChildContext(){return{kendoLocalizationService:this.getLocalizationService()}}},render(){const e=n.getDefaultSlots(this);return i.createVNode("div",null,[e])}});exports.LocalizationProvider=a;
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
import { defineComponent as i, ref as n, provide as a, createVNode as r } from "vue";
|
|
9
|
+
import { LocalizationService as t } from "./LocalizationService.mjs";
|
|
10
|
+
import { getDefaultSlots as c } from "@progress/kendo-vue-common";
|
|
11
|
+
const u = /* @__PURE__ */ i({
|
|
12
|
+
props: {
|
|
13
|
+
language: String
|
|
14
|
+
},
|
|
15
|
+
data() {
|
|
16
|
+
return this.getChildContext();
|
|
17
|
+
},
|
|
18
|
+
watch: {
|
|
19
|
+
language: function(e) {
|
|
20
|
+
this.$data.kendoLocalizationService.language = e;
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
setup(e) {
|
|
24
|
+
const o = n(new t(e.language));
|
|
25
|
+
a("kendoLocalizationService", o);
|
|
26
|
+
},
|
|
27
|
+
provide: function() {
|
|
28
|
+
return {
|
|
29
|
+
kendoLocalizationService: this.$data.kendoLocalizationService
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
methods: {
|
|
33
|
+
/**
|
|
34
|
+
* Returns a localization service.
|
|
35
|
+
* The method is suitable for overriding when you
|
|
36
|
+
* implement custom localization behavior.
|
|
37
|
+
*/
|
|
38
|
+
getLocalizationService() {
|
|
39
|
+
return new t(this.$props.language);
|
|
40
|
+
},
|
|
41
|
+
/**
|
|
42
|
+
* @hidden
|
|
43
|
+
*/
|
|
44
|
+
getChildContext() {
|
|
45
|
+
return {
|
|
46
|
+
kendoLocalizationService: this.getLocalizationService()
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* @hidden
|
|
52
|
+
*/
|
|
53
|
+
render() {
|
|
54
|
+
const e = c(this);
|
|
55
|
+
return r("div", null, [e]);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
export {
|
|
59
|
+
u as LocalizationProvider
|
|
60
|
+
};
|
|
@@ -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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./messages.js");class a{constructor(e){if(this.language=e,e===""&&process.env.NODE_ENV!=="production")throw"Language should not be an empty string"}toLanguageString(e,t){return this.language&&s.messages[this.language]&&s.messages[this.language].hasOwnProperty(e)?s.messages[this.language][e]:Object.keys(this)[0]&&s.messages[Object.values(this)[0]]&&s.messages[Object.values(this)[0]].hasOwnProperty(e)?s.messages[Object.values(this)[0]][e]:t}}exports.LocalizationService=a;
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
import { messages as e } from "./messages.mjs";
|
|
9
|
+
class i {
|
|
10
|
+
constructor(t) {
|
|
11
|
+
if (this.language = t, t === "" && process.env.NODE_ENV !== "production")
|
|
12
|
+
throw "Language should not be an empty string";
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Provides a string based on a key for the current language.
|
|
16
|
+
* When no string for the current language is available under this key,
|
|
17
|
+
* the `defaultValue` is returned.
|
|
18
|
+
*
|
|
19
|
+
* @param key - The key which identifies the string for the current language.
|
|
20
|
+
* @param defaultValue - The default value which will be returned when no string
|
|
21
|
+
* for the current language is available under the key.
|
|
22
|
+
* @return - The string for the current language.
|
|
23
|
+
*/
|
|
24
|
+
toLanguageString(t, s) {
|
|
25
|
+
return this.language && e[this.language] && e[this.language].hasOwnProperty(t) ? e[this.language][t] : Object.keys(this)[0] && e[Object.values(this)[0]] && e[Object.values(this)[0]].hasOwnProperty(t) ? e[Object.values(this)[0]][t] : s;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
i as LocalizationService
|
|
30
|
+
};
|
|
@@ -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 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 a=s[o];Object.defineProperty(e,n.join("."),{value:a})}}};function u(s,e){let t=c.messages[e]=c.messages[e]||{};r(s,t,[])}exports.loadMessages=u;
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
import { messages as c } from "./messages.mjs";
|
|
9
|
+
const r = (o, s, n) => {
|
|
10
|
+
for (const t in o)
|
|
11
|
+
if (o.hasOwnProperty(t)) {
|
|
12
|
+
const e = [...n];
|
|
13
|
+
if (e.push(t), typeof o[t] != "string")
|
|
14
|
+
r(o[t], s, e);
|
|
15
|
+
else {
|
|
16
|
+
const f = o[t];
|
|
17
|
+
Object.defineProperty(s, e.join("."), { value: f });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
function i(o, s) {
|
|
22
|
+
let n = c[s] = c[s] || {};
|
|
23
|
+
r(o, n, []);
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
i as loadMessages
|
|
27
|
+
};
|
|
@@ -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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.create({});exports.messages=e;
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
const e = /* @__PURE__ */ Object.create({});
|
|
9
|
+
export {
|
|
10
|
+
e as messages
|
|
11
|
+
};
|
package/README.md
CHANGED
|
@@ -1,38 +1,46 @@
|
|
|
1
|
-
<a href="https://www.telerik.com/kendo-vue-ui/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-
|
|
1
|
+
<a href="https://www.telerik.com/kendo-vue-ui/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-utils&utm_content=banner" target="_blank">
|
|
2
2
|
<img src="https://www.telerik.com/kendo-vue-ui/npm-banner.svg" alt="Kendo UI for Vue NPM Banner">
|
|
3
3
|
</a>
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
## Kendo UI for Vue Internationalization Component for Vue
|
|
5
|
+
## Kendo UI for Vue Intl Package for Vue
|
|
7
6
|
|
|
8
7
|
> **Important**
|
|
9
|
-
> * This package is а part of [Kendo UI for Vue](https://www.telerik.com/kendo-vue-ui/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-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 [Kendo UI for Vue My License page](https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-intl).
|
|
11
|
-
> * To receive a license key, you need to either [purchase a license](https://www.telerik.com/purchase/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-intl) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-vue-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-intl). Doing so indicates that you [accept the Kendo UI for Vue License Agreement](https://www.telerik.com/purchase/license-agreement/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-intl).
|
|
12
|
-
> * The 30-day free trial gives you access to all the Kendo UI for Vue components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Vue dev team!
|
|
13
8
|
>
|
|
14
|
-
>
|
|
9
|
+
> - This package is а part of [Kendo UI for Vue](https://www.telerik.com/kendo-vue-ui/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmintl)—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 [Kendo UI for Vue My License page](https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmintl).
|
|
11
|
+
> - To receive a license key, you need to either [purchase a license](https://www.telerik.com/purchase/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmintl) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-vue-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmintl). Doing so indicates that you [accept the Kendo UI for Vue License Agreement](https://www.telerik.com/kendo-vue-ui-develop/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmintl).
|
|
12
|
+
> - The 30-day free trial gives you access to all the Kendo UI for Vue components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Vue dev team!
|
|
13
|
+
>
|
|
14
|
+
> [Start using Kendo UI for Vue](https://www.telerik.com/download-login-v2-kendo-vue-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmintl) and speed up your development process!
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
## Vue Intl
|
|
17
17
|
|
|
18
18
|
> Historically, all Kendo UI for Vue Native components support both **Vue 2** and **Vue 3**, however, Vue 2 is currently in its end-of-support phase till Nov 2024. After our last major release for 2024, Vue 2 will no longer be supported in the new versions of the Kendo UI for Vue components. Please check our [Vue 2 End of Support article](https://www.telerik.com/kendo-vue-ui/components/vue2-deprecation/) for more details.
|
|
19
19
|
|
|
20
|
+
Among the many features which the Kendo UI for Vue Intl deliver are:
|
|
21
|
+
|
|
22
|
+
- TODO 1
|
|
23
|
+
- TODO 2
|
|
24
|
+
- TODO 3
|
|
25
|
+
|
|
20
26
|
## Support Options
|
|
21
27
|
|
|
22
|
-
For any issues you might encounter while working with the Kendo UI for Vue
|
|
28
|
+
For any issues you might encounter while working with the Kendo UI for Vue Intl, use any of the available support channels:
|
|
23
29
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
30
|
+
- Industry-leading technical support—Kendo UI for Vue 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 Kendo UI for Vue support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmintl).
|
|
31
|
+
- Product forums—The [Kendo UI for Vue forums](https://www.telerik.com/forums/kendo-ui-vue?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmintl) are part of the free support you can get from the community and from the Kendo UI for Vue team.
|
|
32
|
+
- Feedback portal—The [Kendo UI for Vue feedback portal](https://feedback.telerik.com/kendo-vue-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmintl) is where you can request and vote for new features to be added.
|
|
27
33
|
|
|
28
34
|
## Resources
|
|
29
35
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
- [Getting Started with Kendo UI for Vue](https://www.telerik.com/kendo-vue-ui/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmintl)
|
|
37
|
+
- [Getting Started with the Kendo UI for Vue Intl](https://www.telerik.com/kendo-vue-ui/components/intl/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmintl)
|
|
38
|
+
- [API Reference of the Kendo UI for Vue Intl](https://www.telerik.com/kendo-vue-ui/components/intl/api/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmintl)
|
|
39
|
+
- [Kendo UI for Vue Roadmap](https://www.telerik.com/kendo-vue-ui/roadmap/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmintl)
|
|
40
|
+
- [Blogs](https://www.telerik.com/blogs/tag/vue?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmintl)
|
|
41
|
+
- [Demos, documentation, and component reference](https://www.telerik.com/kendo-vue-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmintl)
|
|
42
|
+
- [Kendo UI for Vue pricing and licensing](https://www.telerik.com/purchase/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmintl)
|
|
35
43
|
|
|
36
|
-
|
|
44
|
+
_Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._
|
|
37
45
|
|
|
38
|
-
|
|
46
|
+
_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._
|