@syncfusion/ej2-base 20.1.57 → 20.2.36

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/CHANGELOG.md CHANGED
@@ -2,46 +2,24 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
- ## 20.1.56 (2022-05-17)
6
-
7
- ### Common
8
-
9
- #### Bug Fixes
10
-
11
- - `F173666` - The issue with sanitize html while creating a appointment in scheduler has been resolve.
12
-
13
- ## 20.1.55 (2022-05-12)
14
-
15
- ### Common
16
-
17
- #### Bug Fixes
18
-
19
- - `SF-376600` - The issue with "`IsDevice` value return as false only for Safari browser in iPad" has been resolved.
20
-
21
- ## 20.1.50 (2022-04-19)
22
-
23
5
  ### Common
24
6
 
25
- #### Bug Fixes
26
-
27
- - `I370803` - The issue with "Script error occurs while opening the popup in the DropDownList" has been resolved.
28
-
29
- ## 20.1.48 (2022-04-12)
30
-
31
- ### Common
7
+ #### New Features
32
8
 
33
- #### Bug Fixes
9
+ - Provided the TypeScript 4.7 compatible support for the EJ2 components.
34
10
 
35
- - `I374390` - Resolved window undefined in server side rendering with React next JS.
11
+ - Provided option to register the license key by using the `npx` command. Follow these steps to register the license using the `npx` command:
12
+ - - Install the Syncfusion packages from npm.
13
+ - - Add the license key either in the environment variable `SYNCFUSION_LICENSE` or in the `syncfusion-license.txt` text file.
14
+ - - Run the command `npx syncfusion-license activate` to register the license automatically.
36
15
 
37
- ## 20.1.47 (2022-04-04)
16
+ - `#I376821` - Provided support to compile the Sass files using [Dart Sass](https://sass-lang.com/dart-sass) instead of [node-sass](https://github.com/sass/node-sass). This change has been made since `node-sass` has been deprecated.
38
17
 
39
18
  ### Common
40
19
 
41
20
  #### Bug Fixes
42
21
 
43
22
  - `I324684` - Resolved the `Treeview` check box issues in safari browser.
44
- - `I342741`, `F172105`, `SF-365783`, `F172867`, `SF-367588`, `SF-358914` - Provided the `draggable` support for the mobile and touch devices.
45
23
 
46
24
  ## 17.4.51 (2020-02-25)
47
25
 
@@ -97,5 +97,5 @@ Check the license detail [here](https://github.com/syncfusion/ej2-base/blob/mast
97
97
 
98
98
  Check the changelog [here](https://ej2.syncfusion.com/documentation/release-notes?utm_source=npm&utm_campaign=ej2-base)
99
99
 
100
- © Copyright 2021 Syncfusion, Inc. All Rights Reserved.
100
+ © Copyright 2022 Syncfusion, Inc. All Rights Reserved. The Syncfusion Essential Studio license and copyright applies to this distribution.
101
101
  The Syncfusion Essential Studio license and copyright applies to this distribution.
@@ -0,0 +1,97 @@
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 envKey = process.env.SYNCFUSION_LICENSE;
6
+ if (args == 'activate') {
7
+ var licKey = '';
8
+ if (fs.existsSync('./syncfusion-license.txt')) {
9
+ licKey = fs.readFileSync('./syncfusion-license.txt', 'UTF8');
10
+ } else if (envKey) {
11
+ licKey = envKey;
12
+ }
13
+ if (licKey != '') {
14
+ var licKeySplit = licKey.split(';');
15
+ var pkey = [5439488, 7929856, 5111808, 6488064, 4587520, 7667712, 5439488,
16
+ 6881280, 5177344, 7208960, 4194304, 4456448, 6619136, 7733248, 5242880, 7077888,
17
+ 6356992, 7602176, 4587520, 7274496, 7471104, 7143424];
18
+ var decryptedStr = [];
19
+ var resultArray = [];
20
+ for (var i = 0; i < licKeySplit.length; i++) {
21
+ var lKey = licKeySplit[i];
22
+ var decodeStr = getDecryptedData(lKey);
23
+ if (!decodeStr) {
24
+ continue;
25
+ }
26
+ var k = 0;
27
+ var buffr = '';
28
+ for (var i = 0; i < decodeStr.length; i++, k++) {
29
+ if (k === pkey.length) {
30
+ k = 0;
31
+ }
32
+ var c = decodeStr.charCodeAt(i);
33
+ buffr += String.fromCharCode(c ^ (pkey[k] >> 16));
34
+ }
35
+ decryptedStr = buffr.split(';');
36
+ // checked the length to verify the key in proper structure
37
+ if (decryptedStr.length > 3) {
38
+ resultArray.push({
39
+ currentPlatform: decryptedStr[0],
40
+ version: decryptedStr[1],
41
+ expiryDate: decryptedStr[2]
42
+ });
43
+ var licData = resultArray[0].currentPlatform + ';' + resultArray[0].version + ';' + resultArray[0].expiryDate + ';';
44
+ var encryptedKey = getEncryptedKey(licData);
45
+ 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'];
46
+ for (var n = 0; n < jsFiles.length; n++) {
47
+ if (fs.existsSync(jsFiles[n])) {
48
+ var content = fs.readFileSync(jsFiles[n], "UTF8");
49
+ content = content.replace(/npxKeyReplace[^"]*/, 'npxKeyReplace' + encryptedKey);
50
+ fs.writeFileSync(jsFiles[n], content);
51
+ }
52
+ }
53
+ console.log('(INFO) Syncfusion License imported successfully.');
54
+ } else {
55
+ console.log('(Error) License key is not valid.');
56
+ }
57
+ }
58
+ } else {
59
+ console.log('Please add the syncfusion-license.txt file or set environment variable SYNCFUSION_LICENSE');
60
+ }
61
+ } else {
62
+ console.log('Supported command: npx syncfusion-license activate');
63
+ }
64
+
65
+ function getEncryptedKey(uniKey) {
66
+ var resKey = '';
67
+ var uniVal = [];
68
+ var alpVal = [];
69
+ var encString = new Array();
70
+ for (var i = 0; i < uniKey.length; i++) {
71
+ uniVal[i] = uniKey[i].charCodeAt(0);
72
+ }
73
+ for (var j = 0, m = 65; j < 26; j++, m++) {
74
+ alpVal[j] = String.fromCharCode(m);
75
+ }
76
+ var pos = Math.floor(Math.random() * ((alpVal.length - 1) - 0 + 1) + 0);
77
+ var uniAlpVal = alpVal[pos].charCodeAt(0);
78
+ for (var i = 0; i < uniKey.length; i++) {
79
+ encString[i] = parseInt(uniVal[i]) + parseInt(alpVal[pos].charCodeAt(0));
80
+ }
81
+ encString[uniVal.length] = uniAlpVal;
82
+ for (var i = 0; i < encString.length; i++) {
83
+ resKey += String.fromCharCode(encString[i]);
84
+ }
85
+ return Buffer.from(resKey, 'ascii').toString('base64');
86
+ }
87
+
88
+ function getDecryptedData(key) {
89
+ try {
90
+ return Buffer.from(key, 'base64').toString('binary');
91
+ }
92
+ catch (error) {
93
+ return '';
94
+ }
95
+ };
96
+
97
+ process.exit(0);