@syncfusion/ej2-base 25.2.5 → 26.1.35-745115
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/{README.md → ReadMe.md} +100 -100
- package/bin/syncfusion-license.js +105 -2
- package/dist/ej2-base.min.js +1 -10
- package/dist/ej2-base.umd.min.js +1 -10
- package/dist/ej2-base.umd.min.js.map +1 -1
- package/dist/es6/ej2-base.es2015.js +268 -486
- package/dist/es6/ej2-base.es2015.js.map +1 -1
- package/dist/es6/ej2-base.es5.js +307 -522
- package/dist/es6/ej2-base.es5.js.map +1 -1
- package/dist/global/ej2-base.min.js +1 -10
- package/dist/global/ej2-base.min.js.map +1 -1
- package/dist/global/index.d.ts +0 -9
- package/dist/ts/undefined +67 -0
- package/e2e/crypto.js +16 -16
- package/e2e/index.d.ts +27 -27
- package/e2e/m.protractor.config.js +286 -286
- package/e2e/modified-protractor/protractor.config.js +316 -316
- package/e2e/protractor.config.js +389 -389
- package/helpers/e2e/index.js +3 -3
- package/license +10 -10
- package/package.json +225 -170
- package/src/ajax.d.ts +1 -1
- package/src/ajax.js +3 -7
- package/src/animation-model.d.ts +41 -41
- package/src/animation.d.ts +1 -1
- package/src/animation.js +20 -22
- package/src/base.d.ts +2 -1
- package/src/base.js +4 -13
- package/src/browser.d.ts +1 -1
- package/src/browser.js +3 -4
- package/src/child-property.d.ts +1 -0
- package/src/child-property.js +2 -2
- package/src/component-model.d.ts +16 -16
- package/src/component.d.ts +4 -0
- package/src/component.js +28 -36
- package/src/dom.js +4 -11
- package/src/draggable-model.d.ts +113 -113
- package/src/draggable.js +20 -41
- package/src/droppable-model.d.ts +23 -23
- package/src/droppable.js +19 -20
- package/src/event-handler.js +2 -6
- package/src/fetch.js +1 -2
- package/src/hijri-parser.js +3 -3
- package/src/internationalization.d.ts +4 -0
- package/src/internationalization.js +0 -5
- package/src/intl/date-formatter.js +19 -33
- package/src/intl/date-parser.js +33 -62
- package/src/intl/intl-base.d.ts +9 -1
- package/src/intl/intl-base.js +19 -18
- package/src/intl/number-formatter.js +14 -7
- package/src/intl/number-parser.js +2 -6
- package/src/intl/parser-base.js +6 -11
- package/src/keyboard-model.d.ts +16 -16
- package/src/keyboard.js +19 -20
- package/src/module-loader.js +1 -0
- package/src/notify-property-change.d.ts +0 -20
- package/src/notify-property-change.js +16 -55
- package/src/observer.js +3 -6
- package/src/sanitize-helper.js +0 -1
- package/src/template-engine.js +1 -7
- package/src/template.js +13 -18
- package/src/touch-model.d.ts +39 -39
- package/src/touch.js +22 -27
- package/src/util.d.ts +4 -4
- package/src/util.js +12 -37
- package/src/validate-lic.js +4 -3
- package/styles/_all.scss +2 -2
- package/styles/_bds-dark-definition.scss +16 -15
- package/styles/_bds-definition.scss +16 -15
- package/styles/_bootstrap-dark-definition.scss +42 -42
- package/styles/_bootstrap-definition.scss +42 -42
- package/styles/_bootstrap4-definition.scss +11 -11
- package/styles/_bootstrap5-dark-definition.scss +9 -9
- package/styles/_bootstrap5-definition.scss +8 -8
- package/styles/_bootstrap5.3-dark-definition.scss +8 -0
- package/styles/_bootstrap5.3-definition.scss +8 -0
- package/styles/_fabric-dark-definition.scss +42 -42
- package/styles/_fabric-definition.scss +42 -42
- package/styles/_fluent-dark-definition.scss +9 -9
- package/styles/_fluent-definition.scss +9 -9
- package/styles/_fluent2-dark-definition.scss +9 -0
- package/styles/_fluent2-definition.scss +9 -0
- package/styles/_fluent2-highcontrast-definition.scss +9 -0
- package/styles/_fusionnew-dark-definition.scss +8 -8
- package/styles/_fusionnew-definition.scss +8 -8
- package/styles/_highcontrast-definition.scss +42 -42
- package/styles/_highcontrast-light-definition.scss +42 -42
- package/styles/_material-dark-definition.scss +49 -48
- package/styles/_material-definition.scss +50 -49
- package/styles/_material3-dark-definition.scss +15 -14
- package/styles/_material3-definition.scss +16 -15
- package/styles/_tailwind-dark-definition.scss +16 -15
- package/styles/_tailwind-definition.scss +16 -15
- package/styles/_tailwind3-dark-definition.scss +15 -0
- package/styles/_tailwind3-definition.scss +15 -0
- package/styles/animation/_all.scss +535 -560
- package/styles/bds-lite.css +3408 -0
- package/styles/bds-lite.scss +3 -0
- package/styles/bds.css +3408 -0
- package/styles/bds.scss +3 -0
- package/styles/bootstrap-dark-lite.css +3749 -0
- package/styles/bootstrap-dark-lite.scss +3 -0
- package/styles/bootstrap-dark.css +1075 -169
- package/styles/bootstrap-lite.css +3749 -0
- package/styles/bootstrap-lite.scss +3 -0
- package/styles/bootstrap.css +1075 -169
- package/styles/bootstrap4-lite.css +3390 -0
- package/styles/bootstrap4-lite.scss +3 -0
- package/styles/bootstrap4.css +1063 -169
- package/styles/bootstrap5-dark-lite.css +2966 -0
- package/styles/bootstrap5-dark-lite.scss +3 -0
- package/styles/bootstrap5-dark.css +1068 -171
- package/styles/bootstrap5-lite.css +2966 -0
- package/styles/bootstrap5-lite.scss +3 -0
- package/styles/bootstrap5.3-lite.css +3559 -0
- package/styles/bootstrap5.3-lite.scss +3 -0
- package/styles/bootstrap5.3.css +3559 -0
- package/styles/bootstrap5.3.scss +3 -0
- package/styles/bootstrap5.css +1066 -169
- package/styles/common/_all.scss +2 -2
- package/styles/common/_core.scss +111 -117
- package/styles/common/_mixin.scss +11 -9
- package/styles/definition/_bds-dark.scss +1193 -1178
- package/styles/definition/_bds.scss +1488 -1458
- package/styles/definition/_bootstrap-dark.scss +213 -219
- package/styles/definition/_bootstrap.scss +208 -215
- package/styles/definition/_bootstrap4.scss +159 -167
- package/styles/definition/_bootstrap5-dark.scss +481 -494
- package/styles/definition/_bootstrap5.3-dark.scss +1232 -0
- package/styles/definition/_bootstrap5.3.scss +1579 -0
- package/styles/definition/_bootstrap5.scss +481 -495
- package/styles/definition/_fabric-dark.scss +194 -200
- package/styles/definition/_fabric.scss +192 -198
- package/styles/definition/_fluent-dark.scss +494 -557
- package/styles/definition/_fluent.scss +494 -558
- package/styles/definition/_fluent2-dark.scss +1523 -0
- package/styles/definition/_fluent2-highcontrast.scss +1523 -0
- package/styles/definition/_fluent2.scss +2295 -0
- package/styles/definition/_fusionnew-dark.scss +330 -362
- package/styles/definition/_fusionnew.scss +331 -363
- package/styles/definition/_highcontrast-light.scss +189 -193
- package/styles/definition/_highcontrast.scss +189 -195
- package/styles/definition/_material-dark.scss +193 -198
- package/styles/definition/_material.scss +186 -192
- package/styles/definition/_material3-dark.scss +660 -710
- package/styles/definition/_material3.scss +729 -792
- package/styles/definition/_tailwind-dark.scss +445 -488
- package/styles/definition/_tailwind.scss +443 -485
- package/styles/definition/_tailwind3-dark.scss +1622 -0
- package/styles/definition/_tailwind3.scss +2093 -0
- package/styles/fabric-dark-lite.css +3734 -0
- package/styles/fabric-dark-lite.scss +3 -0
- package/styles/fabric-dark.css +1075 -169
- package/styles/fabric-lite.css +3734 -0
- package/styles/fabric-lite.scss +3 -0
- package/styles/fabric.css +1075 -169
- package/styles/fluent-dark-lite.css +2966 -0
- package/styles/fluent-dark-lite.scss +3 -0
- package/styles/fluent-dark.css +1066 -169
- package/styles/fluent-lite.css +2966 -0
- package/styles/fluent-lite.scss +3 -0
- package/styles/fluent.css +1066 -169
- package/styles/fluent2-lite.css +4017 -0
- package/styles/fluent2-lite.scss +3 -0
- package/styles/fluent2.css +4017 -0
- package/styles/fluent2.scss +3 -0
- package/styles/highcontrast-light-lite.css +3725 -0
- package/styles/highcontrast-light-lite.scss +3 -0
- package/styles/highcontrast-light.css +1075 -169
- package/styles/highcontrast-lite.css +3725 -0
- package/styles/highcontrast-lite.scss +3 -0
- package/styles/highcontrast.css +1075 -169
- package/styles/material-dark-lite.css +3702 -0
- package/styles/material-dark-lite.scss +3 -0
- package/styles/material-dark.css +1075 -169
- package/styles/material-lite.css +3702 -0
- package/styles/material-lite.scss +3 -0
- package/styles/material.css +1075 -169
- package/styles/material3-dark-lite.css +3021 -0
- package/styles/material3-dark-lite.scss +3 -0
- package/styles/material3-dark.css +1066 -170
- package/styles/material3-lite.css +3077 -0
- package/styles/material3-lite.scss +3 -0
- package/styles/material3.css +1066 -170
- package/styles/offline-theme/material-dark.css +1075 -169
- package/styles/offline-theme/material.css +1075 -169
- package/styles/offline-theme/tailwind-dark.css +1067 -170
- package/styles/offline-theme/tailwind.css +1067 -170
- package/styles/tailwind-dark-lite.css +2967 -0
- package/styles/tailwind-dark-lite.scss +3 -0
- package/styles/tailwind-dark.css +1067 -170
- package/styles/tailwind-lite.css +2967 -0
- package/styles/tailwind-lite.scss +3 -0
- package/styles/tailwind.css +1067 -170
- package/styles/tailwind3-lite.css +3775 -0
- package/styles/tailwind3-lite.scss +3 -0
- package/styles/tailwind3.css +3775 -0
- package/styles/tailwind3.scss +3 -0
- package/.eslintrc.json +0 -260
- package/CHANGELOG.md +0 -647
- package/tslint.json +0 -111
package/{README.md → ReadMe.md}
RENAMED
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
# ej2-base
|
|
2
|
-
|
|
3
|
-
A common package of Essential JS 2 which contains base libraries, methods and class definitions.
|
|
4
|
-
|
|
5
|
-
> This is a commercial product and requires a paid license for possession or use. Syncfusion’s licensed software, including this component, is subject to the terms and conditions of [Syncfusion's EULA](https://www.syncfusion.com/eula/es/). To acquire a license, you can purchase [here](https://www.syncfusion.com/sales/products) or start a free 30-day trial [here](https://www.syncfusion.com/account/manage-trials/start-trials).
|
|
6
|
-
>
|
|
7
|
-
> A free [community license](https://www.syncfusion.com/products/communitylicense) is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue and five or fewer developers.
|
|
8
|
-
|
|
9
|
-
## Setup
|
|
10
|
-
|
|
11
|
-
To install `ej2-base`, use the following command.
|
|
12
|
-
|
|
13
|
-
```sh
|
|
14
|
-
npm install @syncfusion/ej2-base
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Resources
|
|
18
|
-
|
|
19
|
-
* [Getting Started](https://ej2.syncfusion.com/documentation/getting-started?utm_source=npm&utm_campaign=ej2-base)
|
|
20
|
-
* [View Online Demos](https://ej2.syncfusion.com/demos/?utm_source=npm&utm_campaign=ej2-base)
|
|
21
|
-
* [Product Page](https://www.syncfusion.com/products/javascript?utm_source=npm&utm_campaign=ej2-base)
|
|
22
|
-
|
|
23
|
-
## Framework highlights
|
|
24
|
-
|
|
25
|
-
### Lightweight and user friendly
|
|
26
|
-
|
|
27
|
-
The entire Essential JS 2 framework is built from scratch to be lightweight and modular. Its footprint can be reduced further by including only the specific components and features your application requires.
|
|
28
|
-
|
|
29
|
-
### Modular architecture
|
|
30
|
-
|
|
31
|
-
All components have been built as modules to enable selective referencing, so only the components and features you need are included in your application.
|
|
32
|
-
|
|
33
|
-
### Built for performance
|
|
34
|
-
|
|
35
|
-
Performance is critical for delivering a good user experience. We ensure that all our components are designed and built to achieve the best performance possible.
|
|
36
|
-
|
|
37
|
-
### Responsive and touch friendly
|
|
38
|
-
|
|
39
|
-
All Essential JS 2 controls are touch friendly and render adaptively based on the device they are on to provide optimal usage experience on phones, tablets and desktops.
|
|
40
|
-
|
|
41
|
-
### Stunning built-in themes
|
|
42
|
-
|
|
43
|
-
Pixel-perfect built-in themes are available in material, bootstrap and fabric design. In addition, it comes with Accessible high-contrast theme and an online tool "[Theme Studio](https://ej2.syncfusion.com/themestudio/)" to customize the provided built-in themes.
|
|
44
|
-
|
|
45
|
-
### Globalization simplified
|
|
46
|
-
|
|
47
|
-
Easily build applications to be used by a global audience in various language and culture settings.
|
|
48
|
-
|
|
49
|
-
### Stay current
|
|
50
|
-
|
|
51
|
-
With our commitment to at least four major updates per year, you receive the most up-to-date functionality and new components in addition to monthly service packs and bug fixes. Custom patches are available as needed.
|
|
52
|
-
|
|
53
|
-
## Supported Frameworks
|
|
54
|
-
|
|
55
|
-
The Essential JS 2 is also offered in following list of frameworks.
|
|
56
|
-
|
|
57
|
-
* [Angular](https://www.syncfusion.com/products/angular?utm_source=npm&utm_campaign=ej2-base)
|
|
58
|
-
* [React](https://www.syncfusion.com/products/react?utm_source=npm&utm_campaign=ej2-base)
|
|
59
|
-
* [Vue.js](https://www.syncfusion.com/products/vue?utm_source=npm&utm_campaign=ej2-base)
|
|
60
|
-
* [ASP.NET Core](https://www.syncfusion.com/products/aspnetcore?utm_source=npm&utm_campaign=ej2-base)
|
|
61
|
-
* [ASP.NET MVC](https://www.syncfusion.com/products/aspnetmvc?utm_source=npm&utm_campaign=ej2-base)
|
|
62
|
-
|
|
63
|
-
## Showcase Applications
|
|
64
|
-
|
|
65
|
-
* [Diagram Builder](https://ej2.syncfusion.com/showcase/angular/diagrambuilder?utm_source=npm&utm_campaign=ej2-base)
|
|
66
|
-
* [Expense Tracker](https://ej2.syncfusion.com/showcase/typescript/expensetracker?utm_source=npm&utm_campaign=ej2-base)
|
|
67
|
-
* [IT Asset Management](https://ej2.syncfusion.com/showcase/vue/assetmanagement?utm_source=npm&utm_campaign=ej2-base)
|
|
68
|
-
* [Loan Calculator](https://ej2.syncfusion.com/showcase/typescript/loancalculator?utm_source=npm&utm_campaign=ej2-base)
|
|
69
|
-
* [Stock Chart](https://ej2.syncfusion.com/showcase/angular/stockchart?utm_source=npm&utm_campaign=ej2-base)
|
|
70
|
-
* [Story Estimator](https://aspdotnetcore.syncfusion.com/showcase/aspnetcore/story-estimator/)
|
|
71
|
-
* [Web Mail](https://ej2.syncfusion.com/showcase/typescript/webmail?utm_source=npm&utm_campaign=ej2-base)
|
|
72
|
-
|
|
73
|
-
## Key Features
|
|
74
|
-
|
|
75
|
-
* Ajax
|
|
76
|
-
* Animation
|
|
77
|
-
* Drag and Drop
|
|
78
|
-
* Internationalization
|
|
79
|
-
* Localization
|
|
80
|
-
* Template Engine
|
|
81
|
-
* Right to Left
|
|
82
|
-
* State Persistence
|
|
83
|
-
|
|
84
|
-
## Support
|
|
85
|
-
|
|
86
|
-
Product support is available for through following mediums.
|
|
87
|
-
|
|
88
|
-
* Creating incident in Syncfusion [Direct-trac](https://www.syncfusion.com/support/directtrac/incidents?utm_source=npm&utm_campaign=ej2-base) support system or [Community forum](https://www.syncfusion.com/forums/essential-js2?utm_source=npm&utm_campaign=ej2-base).
|
|
89
|
-
* New [GitHub issue](https://github.com/syncfusion/ej2-javascript-ui-controls/issues/new).
|
|
90
|
-
* Ask your query in [Stack Overflow](https://stackoverflow.com/) with tag `syncfusion` and `ej2`.
|
|
91
|
-
|
|
92
|
-
## License
|
|
93
|
-
Check the license detail [here](https://github.com/syncfusion/ej2-javascript-ui-controls/blob/master/license).
|
|
94
|
-
|
|
95
|
-
## Changelog
|
|
96
|
-
|
|
97
|
-
Check the changelog [here](https://ej2.syncfusion.com/documentation/release-notes/index/?utm_source=npm&utm_campaign=ej2-base).
|
|
98
|
-
|
|
99
|
-
© Copyright
|
|
100
|
-
The Syncfusion Essential Studio license and copyright applies to this distribution.
|
|
1
|
+
# ej2-base
|
|
2
|
+
|
|
3
|
+
A common package of Essential JS 2 which contains base libraries, methods and class definitions.
|
|
4
|
+
|
|
5
|
+
> This is a commercial product and requires a paid license for possession or use. Syncfusion’s licensed software, including this component, is subject to the terms and conditions of [Syncfusion's EULA](https://www.syncfusion.com/eula/es/). To acquire a license, you can purchase [here](https://www.syncfusion.com/sales/products) or start a free 30-day trial [here](https://www.syncfusion.com/account/manage-trials/start-trials).
|
|
6
|
+
>
|
|
7
|
+
> A free [community license](https://www.syncfusion.com/products/communitylicense) is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue and five or fewer developers.
|
|
8
|
+
|
|
9
|
+
## Setup
|
|
10
|
+
|
|
11
|
+
To install `ej2-base`, use the following command.
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install @syncfusion/ej2-base
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Resources
|
|
18
|
+
|
|
19
|
+
* [Getting Started](https://ej2.syncfusion.com/documentation/getting-started?utm_source=npm&utm_campaign=ej2-base)
|
|
20
|
+
* [View Online Demos](https://ej2.syncfusion.com/demos/?utm_source=npm&utm_campaign=ej2-base)
|
|
21
|
+
* [Product Page](https://www.syncfusion.com/products/javascript?utm_source=npm&utm_campaign=ej2-base)
|
|
22
|
+
|
|
23
|
+
## Framework highlights
|
|
24
|
+
|
|
25
|
+
### Lightweight and user friendly
|
|
26
|
+
|
|
27
|
+
The entire Essential JS 2 framework is built from scratch to be lightweight and modular. Its footprint can be reduced further by including only the specific components and features your application requires.
|
|
28
|
+
|
|
29
|
+
### Modular architecture
|
|
30
|
+
|
|
31
|
+
All components have been built as modules to enable selective referencing, so only the components and features you need are included in your application.
|
|
32
|
+
|
|
33
|
+
### Built for performance
|
|
34
|
+
|
|
35
|
+
Performance is critical for delivering a good user experience. We ensure that all our components are designed and built to achieve the best performance possible.
|
|
36
|
+
|
|
37
|
+
### Responsive and touch friendly
|
|
38
|
+
|
|
39
|
+
All Essential JS 2 controls are touch friendly and render adaptively based on the device they are on to provide optimal usage experience on phones, tablets and desktops.
|
|
40
|
+
|
|
41
|
+
### Stunning built-in themes
|
|
42
|
+
|
|
43
|
+
Pixel-perfect built-in themes are available in material, bootstrap and fabric design. In addition, it comes with Accessible high-contrast theme and an online tool "[Theme Studio](https://ej2.syncfusion.com/themestudio/)" to customize the provided built-in themes.
|
|
44
|
+
|
|
45
|
+
### Globalization simplified
|
|
46
|
+
|
|
47
|
+
Easily build applications to be used by a global audience in various language and culture settings.
|
|
48
|
+
|
|
49
|
+
### Stay current
|
|
50
|
+
|
|
51
|
+
With our commitment to at least four major updates per year, you receive the most up-to-date functionality and new components in addition to monthly service packs and bug fixes. Custom patches are available as needed.
|
|
52
|
+
|
|
53
|
+
## Supported Frameworks
|
|
54
|
+
|
|
55
|
+
The Essential JS 2 is also offered in following list of frameworks.
|
|
56
|
+
|
|
57
|
+
* [Angular](https://www.syncfusion.com/products/angular?utm_source=npm&utm_campaign=ej2-base)
|
|
58
|
+
* [React](https://www.syncfusion.com/products/react?utm_source=npm&utm_campaign=ej2-base)
|
|
59
|
+
* [Vue.js](https://www.syncfusion.com/products/vue?utm_source=npm&utm_campaign=ej2-base)
|
|
60
|
+
* [ASP.NET Core](https://www.syncfusion.com/products/aspnetcore?utm_source=npm&utm_campaign=ej2-base)
|
|
61
|
+
* [ASP.NET MVC](https://www.syncfusion.com/products/aspnetmvc?utm_source=npm&utm_campaign=ej2-base)
|
|
62
|
+
|
|
63
|
+
## Showcase Applications
|
|
64
|
+
|
|
65
|
+
* [Diagram Builder](https://ej2.syncfusion.com/showcase/angular/diagrambuilder?utm_source=npm&utm_campaign=ej2-base)
|
|
66
|
+
* [Expense Tracker](https://ej2.syncfusion.com/showcase/typescript/expensetracker?utm_source=npm&utm_campaign=ej2-base)
|
|
67
|
+
* [IT Asset Management](https://ej2.syncfusion.com/showcase/vue/assetmanagement?utm_source=npm&utm_campaign=ej2-base)
|
|
68
|
+
* [Loan Calculator](https://ej2.syncfusion.com/showcase/typescript/loancalculator?utm_source=npm&utm_campaign=ej2-base)
|
|
69
|
+
* [Stock Chart](https://ej2.syncfusion.com/showcase/angular/stockchart?utm_source=npm&utm_campaign=ej2-base)
|
|
70
|
+
* [Story Estimator](https://aspdotnetcore.syncfusion.com/showcase/aspnetcore/story-estimator/)
|
|
71
|
+
* [Web Mail](https://ej2.syncfusion.com/showcase/typescript/webmail?utm_source=npm&utm_campaign=ej2-base)
|
|
72
|
+
|
|
73
|
+
## Key Features
|
|
74
|
+
|
|
75
|
+
* Ajax
|
|
76
|
+
* Animation
|
|
77
|
+
* Drag and Drop
|
|
78
|
+
* Internationalization
|
|
79
|
+
* Localization
|
|
80
|
+
* Template Engine
|
|
81
|
+
* Right to Left
|
|
82
|
+
* State Persistence
|
|
83
|
+
|
|
84
|
+
## Support
|
|
85
|
+
|
|
86
|
+
Product support is available for through following mediums.
|
|
87
|
+
|
|
88
|
+
* Creating incident in Syncfusion [Direct-trac](https://www.syncfusion.com/support/directtrac/incidents?utm_source=npm&utm_campaign=ej2-base) support system or [Community forum](https://www.syncfusion.com/forums/essential-js2?utm_source=npm&utm_campaign=ej2-base).
|
|
89
|
+
* New [GitHub issue](https://github.com/syncfusion/ej2-javascript-ui-controls/issues/new).
|
|
90
|
+
* Ask your query in [Stack Overflow](https://stackoverflow.com/) with tag `syncfusion` and `ej2`.
|
|
91
|
+
|
|
92
|
+
## License
|
|
93
|
+
Check the license detail [here](https://github.com/syncfusion/ej2-javascript-ui-controls/blob/master/license).
|
|
94
|
+
|
|
95
|
+
## Changelog
|
|
96
|
+
|
|
97
|
+
Check the changelog [here](https://ej2.syncfusion.com/documentation/release-notes/index/?utm_source=npm&utm_campaign=ej2-base).
|
|
98
|
+
|
|
99
|
+
© Copyright 2022 Syncfusion, Inc. All Rights Reserved.
|
|
100
|
+
The Syncfusion Essential Studio license and copyright applies to this distribution.
|
|
@@ -1,2 +1,105 @@
|
|
|
1
|
-
#! /usr/bin/env node
|
|
2
|
-
|
|
1
|
+
#! /usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var fs = global.fs = global.fs || require('fs');
|
|
4
|
+
const args = process.argv.slice(2);
|
|
5
|
+
const isActivate = (args[0] == 'activate');
|
|
6
|
+
const customPath = args[1];
|
|
7
|
+
|
|
8
|
+
const envKey = process.env.SYNCFUSION_LICENSE;
|
|
9
|
+
if (isActivate) {
|
|
10
|
+
var licKey = '';
|
|
11
|
+
if (fs.existsSync('./syncfusion-license.txt')) {
|
|
12
|
+
licKey = fs.readFileSync('./syncfusion-license.txt', 'UTF8');
|
|
13
|
+
} else if (envKey) {
|
|
14
|
+
licKey = envKey;
|
|
15
|
+
} else if (customPath && fs.existsSync(customPath)){
|
|
16
|
+
licKey = fs.readFileSync(customPath, 'UTF8');
|
|
17
|
+
}
|
|
18
|
+
if (licKey != '') {
|
|
19
|
+
var licKeySplit = licKey.split(';');
|
|
20
|
+
var pkey = [5439488, 7929856, 5111808, 6488064, 4587520, 7667712, 5439488,
|
|
21
|
+
6881280, 5177344, 7208960, 4194304, 4456448, 6619136, 7733248, 5242880, 7077888,
|
|
22
|
+
6356992, 7602176, 4587520, 7274496, 7471104, 7143424];
|
|
23
|
+
var decryptedStr = [];
|
|
24
|
+
var resultArray = [];
|
|
25
|
+
for (var i = 0; i < licKeySplit.length; i++) {
|
|
26
|
+
var lKey = licKeySplit[i];
|
|
27
|
+
var decodeStr = getDecryptedData(lKey);
|
|
28
|
+
if (!decodeStr) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
var k = 0;
|
|
32
|
+
var buffr = '';
|
|
33
|
+
for (var i = 0; i < decodeStr.length; i++, k++) {
|
|
34
|
+
if (k === pkey.length) {
|
|
35
|
+
k = 0;
|
|
36
|
+
}
|
|
37
|
+
var c = decodeStr.charCodeAt(i);
|
|
38
|
+
buffr += String.fromCharCode(c ^ (pkey[k] >> 16));
|
|
39
|
+
}
|
|
40
|
+
decryptedStr = buffr.split(';');
|
|
41
|
+
// checked the length to verify the key in proper structure
|
|
42
|
+
if (decryptedStr.length > 3) {
|
|
43
|
+
resultArray.push({
|
|
44
|
+
currentPlatform: decryptedStr[0],
|
|
45
|
+
version: decryptedStr[1],
|
|
46
|
+
expiryDate: decryptedStr[2]
|
|
47
|
+
});
|
|
48
|
+
var licData = resultArray[0].currentPlatform + ';' + resultArray[0].version + ';' + resultArray[0].expiryDate + ';';
|
|
49
|
+
var encryptedKey = getEncryptedKey(licData);
|
|
50
|
+
var jsFiles = ['./node_modules/@syncfusion/ej2-base/src/validate-lic.js', './node_modules/@syncfusion/ej2-base/dist/es6/ej2-base.es2015.js', './node_modules/@syncfusion/ej2-base/dist/es6/ej2-base.es5.js', './node_modules/@syncfusion/ej2-base/dist/ej2-base.umd.min.js'];
|
|
51
|
+
for (var n = 0; n < jsFiles.length; n++) {
|
|
52
|
+
if (fs.existsSync(jsFiles[n])) {
|
|
53
|
+
var content = fs.readFileSync(jsFiles[n], "UTF8");
|
|
54
|
+
const isBaseUmd = './node_modules/@syncfusion/ej2-base/dist/ej2-base.umd.min.js';
|
|
55
|
+
const regex = (jsFiles[n] === isBaseUmd) ? /i="npxKeyReplace[^"]*/ : /npxKeyReplace[^']*/;
|
|
56
|
+
const replacement = (jsFiles[n] === isBaseUmd) ? 'i="npxKeyReplace' : 'npxKeyReplace';
|
|
57
|
+
content = content.replace(regex, replacement + encryptedKey);
|
|
58
|
+
fs.writeFileSync(jsFiles[n], content);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
console.log('(INFO) Syncfusion License imported successfully.');
|
|
62
|
+
} else {
|
|
63
|
+
console.log('(Error) License key is not valid.');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
} else {
|
|
67
|
+
console.log('Please add the syncfusion-license.txt file or set environment variable SYNCFUSION_LICENSE');
|
|
68
|
+
}
|
|
69
|
+
} else {
|
|
70
|
+
console.log('Supported command: npx syncfusion-license activate');
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function getEncryptedKey(uniKey) {
|
|
74
|
+
var resKey = '';
|
|
75
|
+
var uniVal = [];
|
|
76
|
+
var alpVal = [];
|
|
77
|
+
var encString = new Array();
|
|
78
|
+
for (var i = 0; i < uniKey.length; i++) {
|
|
79
|
+
uniVal[i] = uniKey[i].charCodeAt(0);
|
|
80
|
+
}
|
|
81
|
+
for (var j = 0, m = 65; j < 26; j++, m++) {
|
|
82
|
+
alpVal[j] = String.fromCharCode(m);
|
|
83
|
+
}
|
|
84
|
+
var pos = Math.floor(Math.random() * ((alpVal.length - 1) - 0 + 1) + 0);
|
|
85
|
+
var uniAlpVal = alpVal[pos].charCodeAt(0);
|
|
86
|
+
for (var i = 0; i < uniKey.length; i++) {
|
|
87
|
+
encString[i] = parseInt(uniVal[i]) + parseInt(alpVal[pos].charCodeAt(0));
|
|
88
|
+
}
|
|
89
|
+
encString[uniVal.length] = uniAlpVal;
|
|
90
|
+
for (var i = 0; i < encString.length; i++) {
|
|
91
|
+
resKey += String.fromCharCode(encString[i]);
|
|
92
|
+
}
|
|
93
|
+
return Buffer.from(resKey, 'ascii').toString('base64');
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function getDecryptedData(key) {
|
|
97
|
+
try {
|
|
98
|
+
return Buffer.from(key, 'base64').toString('binary');
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
return '';
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
process.exit(0);
|