@syncfusion/ej2-base 31.1.22 → 31.2.4
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/bin/syncfusion-license.js +1 -1
- package/dist/ej2-base.min.js +2 -2
- package/dist/ej2-base.umd.min.js +2 -2
- package/dist/ej2-base.umd.min.js.map +1 -1
- package/dist/es6/ej2-base.es2015.js +24 -5
- package/dist/es6/ej2-base.es2015.js.map +1 -1
- package/dist/es6/ej2-base.es5.js +23 -4
- package/dist/es6/ej2-base.es5.js.map +1 -1
- package/dist/global/ej2-base.min.js +2 -2
- package/dist/global/ej2-base.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +2 -2
- package/src/intl/date-parser.d.ts +7 -0
- package/src/intl/date-parser.js +16 -1
- package/src/intl/number-formatter.js +3 -0
- package/src/sanitize-helper.js +1 -0
- package/src/validate-lic.js +3 -3
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 31.
|
|
3
|
+
* version : 31.2.4
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/ej2-base",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.2.4",
|
|
4
4
|
"description": "A common package of Essential JS 2 base libraries, methods and class definitions",
|
|
5
5
|
"author": "Syncfusion Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN license",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"syncfusion-license": "bin/syncfusion-license.js"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@syncfusion/ej2-icons": "~31.
|
|
45
|
+
"@syncfusion/ej2-icons": "~31.2.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {},
|
|
48
48
|
"typings": "index.d.ts",
|
|
@@ -39,6 +39,13 @@ export declare class DateParser {
|
|
|
39
39
|
* @returns {number} ?
|
|
40
40
|
*/
|
|
41
41
|
private static internalNumberParser;
|
|
42
|
+
/**
|
|
43
|
+
* Escapes all regex metacharacters in a string, preserving the {0} placeholder.
|
|
44
|
+
*
|
|
45
|
+
* @param {string} str ? - The input string to escape.
|
|
46
|
+
* @returns {string} ? - The escaped string with {0} preserved.
|
|
47
|
+
*/
|
|
48
|
+
private static escapeRegex;
|
|
42
49
|
/**
|
|
43
50
|
* Returns parsed time zone RegExp for provided hour format and time zone
|
|
44
51
|
*
|
package/src/intl/date-parser.js
CHANGED
|
@@ -343,6 +343,19 @@ var DateParser = /** @class */ (function () {
|
|
|
343
343
|
}
|
|
344
344
|
return null;
|
|
345
345
|
};
|
|
346
|
+
/**
|
|
347
|
+
* Escapes all regex metacharacters in a string, preserving the {0} placeholder.
|
|
348
|
+
*
|
|
349
|
+
* @param {string} str ? - The input string to escape.
|
|
350
|
+
* @returns {string} ? - The escaped string with {0} preserved.
|
|
351
|
+
*/
|
|
352
|
+
DateParser.escapeRegex = function (str) {
|
|
353
|
+
var tempPlaceholder = '__TEMP__';
|
|
354
|
+
var tempStr = str.replace('{0}', tempPlaceholder);
|
|
355
|
+
var metaChars = /[.*+?^${}()|[\]\\]/g;
|
|
356
|
+
var escapedStr = tempStr.replace(metaChars, '\\$&');
|
|
357
|
+
return escapedStr.replace(tempPlaceholder, '{0}');
|
|
358
|
+
};
|
|
346
359
|
/**
|
|
347
360
|
* Returns parsed time zone RegExp for provided hour format and time zone
|
|
348
361
|
*
|
|
@@ -362,10 +375,12 @@ var DateParser = /** @class */ (function () {
|
|
|
362
375
|
else {
|
|
363
376
|
ret = ret.replace(/H|m/g, '(' + cRegex + '?)');
|
|
364
377
|
}
|
|
378
|
+
pattern = this.escapeRegex(pattern);
|
|
365
379
|
var splitStr = (ret.split(';').map(function (str) {
|
|
366
380
|
return pattern.replace('{0}', str);
|
|
367
381
|
}));
|
|
368
|
-
|
|
382
|
+
var gmtZeroFormat = this.escapeRegex(tZone.gmtZeroFormat);
|
|
383
|
+
ret = splitStr.join('|') + '|' + gmtZeroFormat;
|
|
369
384
|
return ret;
|
|
370
385
|
};
|
|
371
386
|
/**
|
|
@@ -327,6 +327,9 @@ var NumberFormat = /** @class */ (function () {
|
|
|
327
327
|
return (Math.round(value * factor) / factor).toFixed(digits);
|
|
328
328
|
};
|
|
329
329
|
NumberFormat.processFraction = function (value, min, max, option) {
|
|
330
|
+
if (value != null && (value.toString().indexOf('e') !== -1 || value.toString().indexOf('E') !== -1)) {
|
|
331
|
+
return value.toFixed(min);
|
|
332
|
+
}
|
|
330
333
|
var temp = (value + '').split('.')[1];
|
|
331
334
|
var length = temp ? temp.length : 0;
|
|
332
335
|
if (min && length < min) {
|
package/src/sanitize-helper.js
CHANGED
package/src/validate-lic.js
CHANGED
|
@@ -8,6 +8,7 @@ var bypassKey = [115, 121, 110, 99, 102, 117, 115, 105,
|
|
|
8
8
|
111, 110, 46, 105, 115, 76, 105, 99, 86, 97, 108,
|
|
9
9
|
105, 100, 97, 116, 101, 100];
|
|
10
10
|
var accountURL;
|
|
11
|
+
var banner = true;
|
|
11
12
|
/**
|
|
12
13
|
* License validation module
|
|
13
14
|
*
|
|
@@ -186,15 +187,14 @@ var LicenseValidator = /** @class */ (function () {
|
|
|
186
187
|
}
|
|
187
188
|
}
|
|
188
189
|
if (validateMsg && typeof document !== 'undefined' && !isNullOrUndefined(document)) {
|
|
189
|
-
|
|
190
|
-
if (!existingErrorDiv) {
|
|
190
|
+
if (banner) {
|
|
191
191
|
accountURL = (validateURL && validateURL !== '') ? validateURL : 'https://www.syncfusion.com/account/claim-license-key?pl=SmF2YVNjcmlwdA==&vs=MzE=&utm_source=es_license_validation_banner&utm_medium=listing&utm_campaign=license-information';
|
|
192
192
|
var error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YXRoIGlkPSJjbGlwMF8xOTlfNCI+CjxyZWN0IHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K' style=\"top: 6px;\n position: absolute;\n left: 16px;\n width: 24px;\n height: 24px;\"/>" + validateMsg + ' ' + '<a style="text-decoration: none;color: #0D6EFD;font-weight: 500;" href=' + accountURL + '>Claim your free account</a>'
|
|
195
194
|
});
|
|
196
195
|
errorDiv.setAttribute('style', "position: fixed;\n top: 10px;\n left: 10px;\n right: 10px;\n font-size: 14px;\n background: #EEF2FF;\n color: #222222;\n z-index: 999999999;\n text-align: left;\n border: 1px solid #EEEEEE;\n padding: 10px 11px 10px 50px;\n border-radius: 8px;\n font-family: Helvetica Neue, Helvetica, Arial;");
|
|
197
196
|
document.body.appendChild(errorDiv);
|
|
197
|
+
banner = false;
|
|
198
198
|
}
|
|
199
199
|
this.isLicensed = false;
|
|
200
200
|
}
|