Skip to content

Commit c777ce4

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent 28dc39b commit c777ce4

File tree

108 files changed

+319
-78
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+319
-78
lines changed

docs-aspnet/_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,10 +669,10 @@ navigation:
669669
baseurl: /aspnet-core
670670

671671
## The Kendo UI version used
672-
cdnVersion: "2022.3.913"
672+
cdnVersion: "2022.3.1108"
673673

674674
## The MVC Core version used
675-
mvcCoreVersion: "2022.3.913"
675+
mvcCoreVersion: "2022.3.1108"
676676

677677
ff-sheet-id: 1mottKpkbJFxkUq6rS3CsPrT8JQOE2JlUtsJBR622cxs
678678

Loading

docs-aspnet/globalization/localization.md

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,30 @@ position: 3
1313

1414
You can change the messages that are displayed in the {{ site.product }} helpers by including an additional script file in the document.
1515

16+
## Localization Files
17+
18+
Officially, the {{ site.product }} components support only the English language. The community contributes to translating the messages to other languages by adding new `messages` JavaScript files and updating the existing ones in the [Kendo UI Core repository](https://github.com/telerik/kendo-ui-core/tree/master/src/messages).
19+
20+
To display messages in different languages, {{ site.product }} uses localization (resource) files, for example, `Messages.es-ES.resx`. The localization files are generated from the `messages` JavaScript files.
21+
22+
You can find the resource files in the Telerik UI source zip bundle:
23+
24+
{% if site.core %}
25+
1. Log in to your [Telerik account](https://www.telerik.com/login/v2/telerik).
26+
27+
1. Go to the [Telerik UI for ASP.NET Core download page](https://www.telerik.com/account/downloads/product-download?product=UIASPCORE) and download the `telerik.ui.for.aspnet.core.{{ site.mvcCoreVersion }}.commercial-source.zip` file.
28+
29+
1. Extract the archive and navigate to the `\src\AspNet.Core\Kendo.Mvc\Resources\` folder that contains the resource files.
30+
{% else %}
31+
1. Log in to your [Telerik account](https://www.telerik.com/login/v2/telerik).
32+
33+
1. Go to the [Telerik UI for ASP.NET MVC download page](https://www.telerik.com/account/downloads/product-download?product=KENDOUIMVC) and download the `telerik.ui.for.aspnetmvc.{{ site.mvcCoreVersion }}.commercial-source.zip` file.
34+
35+
1. Extract the archive and navigate to the `\src\Kendo.Mvc\Kendo.Mvc\Resources\` folder that contains the resource files.
36+
{% endif %}
37+
38+
> Changes made to the `messages` files through community contribution will be reflected in the {{ site.product }} release that follows that contribution. Refer to the [section on contributing](#contribution).
39+
1640
## Setting the Current Language
1741

1842
{% if site.core %}
@@ -59,34 +83,6 @@ The following example demonstrates how to create a new localization file. The `k
5983
{% else %}
6084
The culture that is used for the localization messages in Telerik UI for ASP.NET MVC is determined by the `CurrentUICulture`, not by the `CurrentCulture` property. By default, if `CurrentUICulture` is not supported, the Telerik UI for ASP.NET MVC helpers will display their messages in American English (en-US). If `CurrentUICulture` is set from code or from the `web.config` file, Telerik UI for ASP.NET MVC will use localized user interface messages.
6185

62-
The following table lists the localized messages for the cultures which are supported by Telerik UI for ASP.NET MVC.
63-
64-
| Culture | Language | Country
65-
|:--- |:--- |:---
66-
|`ar-AE` |Arabic |U.A.E.
67-
|`bg-BG` |Bulgarian |Bulgaria
68-
|`cs-CZ` |Czech |Czech Republic
69-
|`da-DK` |Danish |Denmark
70-
|`de-DE` |German |Germany
71-
|`el-GR` |Greek |Greece
72-
|`en-US` |English |United States of America
73-
|`es-ES` |Spanish |Spain
74-
|`fr-CA` |French |Canada
75-
|`fr-FR` |French |France
76-
|`he-IL` |Hebrew |Israel
77-
|`it-IT` |Italian |Italy
78-
|`nl-NL` |Dutch |The Netherlands
79-
|`pl-PL` |Polish |Poland
80-
|`pt-BR` |Portuguese |Brazil
81-
|`pt-PT` |Portuguese |Portugal
82-
|`ro-RO` |Romanian |Romania
83-
|`ru-RU` |Russian |Russia
84-
|`sk-SK` |Slovak |Slovakia
85-
|`sv-SE` |Swedish |Sweden
86-
|`tr-TR` |Turkish |Turkish
87-
|`uk-UA` |Ukrainian |Ukraine
88-
|`zh-CN` |Chinese |People's Republic of China
89-
9086
## Customizing the Localized Messages
9187

9288
Telerik UI for ASP.NET MVC uses [satellite assemblies](https://docs.microsoft.com/en-us/dotnet/framework/resources/creating-satellite-assemblies-for-desktop-apps) to support localization (user interface messages localized for a set of cultures). To change the provided localization messages, you have to build a custom `Kendo.Mvc.dll` version because `Kendo.Mvc.dll` is a strongly named assembly and its private key is not shipped as part of the distribution.

docs-aspnet/installation/adding-client-side-resources/cdn-service.md

Lines changed: 53 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,64 @@ To access the Kendo UI CDN services, you can use either the HTTP or the HTTPS pr
2626

2727
The URLs of the Telerik CDN have the following structure:
2828

29-
* `https://kendo.cdn.telerik.com/VERSION/js/FILENAME.min.js`
30-
* `https://kendo.cdn.telerik.com/VERSION/styles/FILENAME.min.css`
29+
* `https://kendo.cdn.telerik.com/[VERSION]/styles/[FILENAME]`—The `styles` folder contains the [minified `.css` files](#adding-the-required-css-files).
30+
* `https://kendo.cdn.telerik.com/[VERSION]/mjs/[FILENAME]`—The `mjs` folder contains the [JavaScript modules](#using-javascript-modules).
31+
* `https://kendo.cdn.telerik.com/[VERSION]/js/[FILENAME]`—The `js` folder contains the [bundled Kendo UI JavaScript files](#using-bundled-javascript).
3132

32-
In the URL above, you must replace `VERSION` and `FILENAME` with the client-side resource that you need and its version. For example, to load version `{{ site.mvcCoreVersion }}` of the minified Kendo UI scripts and the related CSS files, use these URLs:
33+
In the sample URLs above, you must replace `[VERSION]` and `[FILENAME]` with the client-side resource that you need and its version. For example, to load version `{{ site.mvcCoreVersion }}` of the Kendo JavaScript modules and the CSS files for the Kendo Default visual theme, use these URLs:
3334

34-
* `https://kendo.cdn.telerik.com/{{ site.mvcCoreVersion }}/js/kendo.all.min.js`
35+
* `https://kendo.cdn.telerik.com/{{ site.cdnVersion }}/mjs/kendo.all.js`
3536
* `https://kendo.cdn.telerik.com/{{ site.mvcCoreVersion }}/styles/kendo.default-main.min.css`
3637

37-
If you prefer the HTTP protocol, replace `https` with `http` in the URLs above.
38+
## Adding the Required CSS Files
39+
40+
Adding the Kendo CSS files allows you to use the [Kendo UI visual themes]({% slug sassbasedthemes_overview %}). The minified versions of the `.css` files are available in the `styles` folder of the Kendo CDN URL—`https://kendo.cdn.telerik.com/[VERSION]/styles/[FILENAME]`.
41+
42+
To load version `{{site.cdnVersion}}` of the desired visual theme, replace `[VERSION]` and `[FILENAME]` with their actual values, for example, `https://kendo.cdn.telerik.com/{{ site.cdnVersion }}/styles/kendo.default-main.min.css`.
43+
44+
## Adding the Required JavaScript Files
45+
46+
To import the JavaScript files required for the Telerik UI components, apply either of the following approaches:
47+
48+
* [Using the JavaScript modules](#javascript-modules)[A new approach introduced with version `2022.3.1109`]({% slug core_ecmascript_overview %}).
49+
* [Using the bundled JavaScript](#bundled-javascript)—The traditional way of including the Kendo UI scripts.
50+
51+
### Using JavaScript Modules
52+
53+
The [JavaScript modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) are located in the `mjs` folder of the Kendo CDN URL—`https://kendo.cdn.telerik.com/[VERSION]/mjs/[FILENAME]`.
54+
55+
To include a Kendo JavaScript module in your project:
56+
57+
1. Use the `script` tag with the `type=module` attribute.
58+
1. Add a reference to the global `aspnetmvc.min.js` file.
59+
60+
The two examples below demonstrate how to include individual component modules and all available component modules:
61+
62+
* Including individual component modules.
63+
64+
```html
65+
<script src="https://kendo.cdn.telerik.com/{{ site.cdnVersion }}/mjs/kendo.grid.js" type="module"></script> <!-- Include the Grid module. The rest of the dependencies required by the Grid will be loaded automatically. -->
66+
<script src="https://kendo.cdn.telerik.com/{{ site.cdnVersion }}/mjs/aspnetmvc.min.js" type="module"></script> <!-- Include the global `aspnetmvc.min.js` file. -->
67+
```
68+
69+
* Including all available modules.
70+
71+
```html
72+
<script src="https://kendo.cdn.telerik.com/{{ site.cdnVersion }}/mjs/kendo.all.js" type="module"></script> <!-- Include all Kendo UI modules. -->
73+
<script src="https://kendo.cdn.telerik.com/{{ site.cdnVersion }}/mjs/aspnetmvc.min.js" type="module"></script> <!-- Include the global `aspnetmvc.min.js` file. -->
74+
```
75+
76+
### Using Bundled JavaScript
77+
78+
The Kendo UI JavaScript files for the traditional format are located in the `js` folder of the Kendo CDN URL&mdash;`https://kendo.cdn.telerik.com/[VERSION]/js/[FILENAME]`.
79+
80+
To load version `{{site.cdnVersion}}` of the bundled Kendo JavaScript files, replace `[VERSION]` and `[FILENAME]` with their actual values, for example, `https://kendo.cdn.telerik.com/{{ site.mvcCoreVersion }}/js/kendo.all.min.js`.
3881

3982
## Using the CDN in Your Project
4083

41-
> Replace the Kendo UI version from the following code snippets with the version of the product you are using&mdash;for example, `{{ site.mvcCoreVersion }}`.
84+
The following complete example demonstrates how to add the [CSS files](#adding-the-required-css-files) and the [bundled JavaScript](#using-bundled-javascript).
85+
86+
>Replace the Kendo UI version from the following code snippets with the version of the product you are using&mdash;for example, `{{ site.mvcCoreVersion }}`.
4287

4388
{% if site.core %}
4489
1. Open the layout of the application. By default, it is `~\Views\Shared\_Layout.cshtml`.
@@ -88,8 +133,7 @@ The following articles provide solutions to common issues related to the Telerik
88133
## Next Steps
89134

90135
* [Explore the helper script dependencies]({% slug script_filesfor_barcodes_widgets %})
91-
* [Check out the PDF and Excel export support]({% slug exportsupport_core %})
92-
136+
* [Using ECMAScript Modules]({% slug core_ecmascript_overview %})
93137
## See Also
94138

95139
* [Including Client-Side Resources]({% slug copyclientresources_aspnetmvc6_aspnetmvc %})
@@ -100,4 +144,4 @@ The following articles provide solutions to common issues related to the Telerik
100144
* [First Steps with CLI (Online Guide)]({% slug gettingstartedcli_aspnetmvc6_aspnetmvc %})
101145
{% else %}
102146
* [First Steps on Visual Studio for Windows (Online Guide)]({% slug gettingstarted_aspnetmvc %})
103-
{% endif %}
147+
{% endif %}
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
title: ECMAScript Modules
3+
page_title: ECMAScript Modules
4+
description: "Get started with {{ site.product }} and learn about the ECMAScript modules provided in the library."
5+
slug: core_ecmascript_overview
6+
position: 6
7+
---
8+
9+
# ECMAScript Modules
10+
11+
As of the 2022.3.1109 version, the Kendo UI code-base is available in the form of ECMAScript modules. As the Telerik UI helpers are wrappers over the [Kendo UI widgets](https://docs.telerik.com/kendo-ui/intro/first-steps), this allows you to use another method to add the client-side resources to your application.
12+
13+
## ECMAScript Modules vs. Bundled Scripts
14+
15+
The new ECMAScript modules provide the following benefits as compared to the bundled scripts which have been used up to this point:
16+
17+
* [Loading single instead of multiple script files](#loading-single-script-files)
18+
* [Dynamic script loading](#dynamic-script-loading)
19+
* [Optimized debugging](#optimized-debugging)
20+
* [Browser compatibility](#browser-compatibility)
21+
22+
### Loading Single Script Files
23+
24+
ECMAScript enables you to include a single script file to load a particular component. Taking the scripts for the Grid component as an example, previously, if you wanted to include just the Grid on the page instead of all available components, you had to also include every single script dependency related to it and in a specific order.
25+
26+
The `<head>` element of your page would've looked similar to the following code snippet:
27+
28+
```html
29+
<script src="dist/js/kendo.core.js"></script>
30+
<script src="dist/js/kendo.data.js"></script>
31+
<script src="dist/js/kendo.columnsorter.js"></script>
32+
<script src="dist/js/kendo.userevents.js"></script>
33+
<script src="dist/js/kendo.draganddrop.js"></script>
34+
<!-- And about 80 more individual scripts for every single functionality of the Grid to work properly. -->
35+
```
36+
37+
With the introduction of the ECMAScript modules, you can include just a single script file, as shown in the following example. As a result, ECMAScript will automatically load all of the required dependencies without needing any additional actions on your side, which will greatly increase productivity and decrease the chances of missing any of the script files.
38+
39+
```html
40+
<script src="dist/mjs/kendo.grid.js" type="module"></script>
41+
```
42+
43+
44+
### Dynamic Script Loading
45+
46+
Aside from using the `script` tag, you can also use the [`import()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import) call to load a module asynchronously into a potentially non-module environment.
47+
48+
The suggested approach is useful when, for example, you have a Grid inside a Window. The Grid component is not initialized nor needed before the Window is opened. Therefore, you don't need to import the module when the page first loads. Instead, you can load the module when the Window is opened and only then initialize the Grid component.
49+
50+
```javascript
51+
(async () => {
52+
let shouldGridModuleBeLoaded = true;
53+
54+
// Load the Grid module only if a condition is met.
55+
if (shouldGridModuleBeLoaded) {
56+
await import("/dist/mjs/kendo.grid.js");
57+
}
58+
})();
59+
```
60+
61+
### Optimized Debugging
62+
63+
Another benefit of using ECMAScript is that it enables you to debug the Kendo UI for jQuery source code much easier. When you navigate to the **Devtools** > **Sources** browser tab, you will be able to see the non-minified version of the source code exactly like it is in the development environment of the product.
64+
65+
Additionally, the [sourcemap](https://firefox-source-docs.mozilla.org/devtools-user/debugger/how_to/use_a_source_map/index.html) files are now downloaded only when the **Devtools** is opened.
66+
67+
The following image showcases the directory structure of the loaded scripts in the **Devtools** browser:
68+
69+
![Devtools Sources Tab](/getting-started-core/images/devtools.png)
70+
71+
### Browser Compatibility
72+
73+
[ECMAScript is supported by the majority of modern browsers](https://caniuse.com/?search=es6%20modules). If a project requires older browser support, you can choose to use either of the other two available module systems&mdash;CommonJS or UMD.
74+
75+
## Getting the ECMAScript Files
76+
77+
You can obtain the ECMAScript modules in any of the following ways:
78+
79+
* [Install {{ site.product }}](https://docs.telerik.com/{{ site.platform }}/installation/adding-client-side-resources/using-local-files)
80+
* [Download the Kendo UI bundle](https://docs.telerik.com/kendo-ui/intro/installation/hosting-kendoui)
81+
* [Use the CDN](https://docs.telerik.com/{{ site.platform }}/installation/adding-client-side-resources/cdn-service)
82+
83+
## Manually Building the Source Code
84+
85+
You can manually build the source code of the components by following these steps:
86+
87+
1. Navigate to your [downloads](https://www.telerik.com/account/my-downloads) page.
88+
1. Open the Kendo UI for jQuery page and scroll down to the **Source Code** section.
89+
1. Once you have downloaded and extracted the source code, navigate to the `src` folder and open a terminal.
90+
1. Run any of the following commands to build the source code:
91+
92+
```javascript
93+
npx run scripts // Builds the bundled(traditional) version of the scripts.
94+
npx run scripts:mjs // Builds the mjs version of the scripts.
95+
npx run scripts:modules // Builds the esm and cjs versions of the scripts.
96+
npx run scripts:all // Runs all of the above commands
97+
```
98+
99+
100+
## See Also
101+
102+
* [Using CDN]({% slug cdnservices_core %})
103+
* [Using Local Files]({% slug using_local_client_side_resources %})

docs-aspnet/installation/adding-client-side-resources/scripts/what-you-need.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,17 @@ position: 1
99

1010
# Creating Your Own Custom Bundles
1111

12-
Depending on your project, you may need to skip some of the Kendo UI utilities and install only what your application requires.
12+
Depending on your project, you may need to skip some of the Kendo UI utilities and install only what your application requires.
13+
14+
To facilitate the customization of your project, Kendo UI for jQuery delivers a set of combined and individual scripts, and also provides further options for scripts customization.
15+
16+
* The [combined scripts bundles](#combined-scripts) contain the scripts of specific types of widgets (for example, desktop, hybrid) available for the different Kendo UI distributions.
17+
18+
* The [individual scripts bundles](#individual-scripts) contain the scripts of widgets grouped by their common functionality (for example, Charts, Editors) so that you can select which individual control to add to your project.
19+
20+
* Customizing your project by [creating your custom scripts](#custom-scripts) allows you to add the specific widgets and features required by your project.
21+
22+
* [Using ECMAScript]({% slug core_ecmascript_overview %}) allows you to import individual modules in your application. The related dependencies will be automatically bundled alongside their respective modules. This will save you the trouble of having to manually select which scripts to include in your project.
1323

1424
## Combined Scripts
1525

docs-aspnet/installation/adding-client-side-resources/using-libman.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ To provide the client-side web assets by using LibMan:
2525
"libraries": [
2626
{
2727
"provider": "unpkg",
28-
"library": "@progress/kendo-ui@2021.3.914",
29-
"destination": "wwwroot/lib/kendo-ui/2021.3.914"
28+
"library": "@progress/kendo-ui@{{ site.cdnVersion }}",
29+
"destination": "wwwroot/lib/kendo-ui/{{ site.cdnVersion }}"
3030
}
3131
]
3232
}
@@ -99,10 +99,18 @@ To provide the client-side web assets by using LibMan:
9999
require("jquery")
100100
window.$ = window.jQuery = $
101101

102-
require("../lib/kendo-ui/2021.3.914/js/kendo.all")
103-
require("../lib/kendo-ui/2021.3.914/js/kendo.aspnetmvc")
102+
require("../lib/kendo-ui/{{ site.cdnVersion }}/js/kendo.all")
103+
require("../lib/kendo-ui/{{ site.cdnVersion }}/js/kendo.aspnetmvc")
104104
```
105105

106+
Since version 2022.3.1109 the Kendo UI scripts can be acquired as ECMAScript. In this case, you will replace the `js/kendo.all` part with:
107+
```javascript
108+
require("../lib/kendo-ui/{{ site.cdnVersion }}/mjs/kendo.-componentName-")
109+
```
110+
111+
Additional information you can find in the dedicated [ECMAScript Modules article]({% slug core_ecmascript_overview %})
112+
113+
106114
1. Once LibMan has fetched the Kendo UI client-side files, navigate to the **wwwroot** folder and execute the following commands:
107115
* `npm install` to install the dependencies in the local **node_modules** folder.
108116
* `npm run build` to bundle the scripts specified in the `entry.js` file.
@@ -112,7 +120,7 @@ To provide the client-side web assets by using LibMan:
112120
1. In the `_Layout.cshtml`, file add a reference to the desired theme, the bundled scripts, and the license file `kendo-ui-license.js`:
113121

114122
```_Layout.cshtml
115-
<link rel="stylesheet" href="~/lib/kendo-ui/2021.3.914/css/web/kendo.default-v2.css" />
123+
<link rel="stylesheet" href="~/lib/kendo-ui/{{ site.cdnVersion }}/css/web/kendo.default-v2.css" />
116124
<script src="~/dist/bundle.js"></script>
117125
<script src="./kendo-ui-license.js"></script>
118126
```

0 commit comments

Comments
 (0)