@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
|
@@ -5872,6 +5872,9 @@ class NumberFormat$1 {
|
|
|
5872
5872
|
return (Math.round(value * factor) / factor).toFixed(digits);
|
|
5873
5873
|
}
|
|
5874
5874
|
static processFraction(value, min, max, option) {
|
|
5875
|
+
if (value != null && (value.toString().indexOf('e') !== -1 || value.toString().indexOf('E') !== -1)) {
|
|
5876
|
+
return value.toFixed(min);
|
|
5877
|
+
}
|
|
5875
5878
|
const temp = (value + '').split('.')[1];
|
|
5876
5879
|
const length = temp ? temp.length : 0;
|
|
5877
5880
|
if (min && length < min) {
|
|
@@ -6270,6 +6273,19 @@ class DateParser {
|
|
|
6270
6273
|
}
|
|
6271
6274
|
return null;
|
|
6272
6275
|
}
|
|
6276
|
+
/**
|
|
6277
|
+
* Escapes all regex metacharacters in a string, preserving the {0} placeholder.
|
|
6278
|
+
*
|
|
6279
|
+
* @param {string} str ? - The input string to escape.
|
|
6280
|
+
* @returns {string} ? - The escaped string with {0} preserved.
|
|
6281
|
+
*/
|
|
6282
|
+
static escapeRegex(str) {
|
|
6283
|
+
const tempPlaceholder = '__TEMP__';
|
|
6284
|
+
const tempStr = str.replace('{0}', tempPlaceholder);
|
|
6285
|
+
const metaChars = /[.*+?^${}()|[\]\\]/g;
|
|
6286
|
+
const escapedStr = tempStr.replace(metaChars, '\\$&');
|
|
6287
|
+
return escapedStr.replace(tempPlaceholder, '{0}');
|
|
6288
|
+
}
|
|
6273
6289
|
/**
|
|
6274
6290
|
* Returns parsed time zone RegExp for provided hour format and time zone
|
|
6275
6291
|
*
|
|
@@ -6279,7 +6295,7 @@ class DateParser {
|
|
|
6279
6295
|
* @returns {string} ?
|
|
6280
6296
|
*/
|
|
6281
6297
|
static parseTimeZoneRegx(hourFormat, tZone, nRegex) {
|
|
6282
|
-
|
|
6298
|
+
let pattern = tZone.gmtFormat;
|
|
6283
6299
|
let ret;
|
|
6284
6300
|
const cRegex = '(' + nRegex + ')' + '(' + nRegex + ')';
|
|
6285
6301
|
ret = hourFormat.replace('+', '\\+');
|
|
@@ -6289,10 +6305,12 @@ class DateParser {
|
|
|
6289
6305
|
else {
|
|
6290
6306
|
ret = ret.replace(/H|m/g, '(' + cRegex + '?)');
|
|
6291
6307
|
}
|
|
6308
|
+
pattern = this.escapeRegex(pattern);
|
|
6292
6309
|
const splitStr = (ret.split(';').map((str) => {
|
|
6293
6310
|
return pattern.replace('{0}', str);
|
|
6294
6311
|
}));
|
|
6295
|
-
|
|
6312
|
+
const gmtZeroFormat = this.escapeRegex(tZone.gmtZeroFormat);
|
|
6313
|
+
ret = splitStr.join('|') + '|' + gmtZeroFormat;
|
|
6296
6314
|
return ret;
|
|
6297
6315
|
}
|
|
6298
6316
|
/**
|
|
@@ -6721,6 +6739,7 @@ const bypassKey = [115, 121, 110, 99, 102, 117, 115, 105,
|
|
|
6721
6739
|
111, 110, 46, 105, 115, 76, 105, 99, 86, 97, 108,
|
|
6722
6740
|
105, 100, 97, 116, 101, 100];
|
|
6723
6741
|
let accountURL;
|
|
6742
|
+
let banner = true;
|
|
6724
6743
|
/**
|
|
6725
6744
|
* License validation module
|
|
6726
6745
|
*
|
|
@@ -6898,11 +6917,9 @@ class LicenseValidator {
|
|
|
6898
6917
|
}
|
|
6899
6918
|
}
|
|
6900
6919
|
if (validateMsg && typeof document !== 'undefined' && !isNullOrUndefined(document)) {
|
|
6901
|
-
|
|
6902
|
-
if (!existingErrorDiv) {
|
|
6920
|
+
if (banner) {
|
|
6903
6921
|
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';
|
|
6904
6922
|
const errorDiv = createElement('div', {
|
|
6905
|
-
className: 'syncfusion-license-error',
|
|
6906
6923
|
innerHTML: `<img src='data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzE5OV80KSI+CjxwYXRoIGQ9Ik0xMiAyMUMxNi45NzA2IDIxIDIxIDE2Ljk3MDYgMjEgMTJDMjEgNy4wMjk0NCAxNi45NzA2IDMgMTIgM0M3LjAyOTQ0IDMgMyA3LjAyOTQ0IDMgMTJDMyAxNi45NzA2IDcuMDI5NDQgMjEgMTIgMjFaIiBzdHJva2U9IiM3MzczNzMiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMS4yNSAxMS4yNUgxMlYxNi41SDEyLjc1IiBmaWxsPSIjNjE2MDYzIi8+CjxwYXRoIGQ9Ik0xMS4yNSAxMS4yNUgxMlYxNi41SDEyLjc1IiBzdHJva2U9IiM3MzczNzMiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMS44MTI1IDlDMTIuNDMzOCA5IDEyLjkzNzUgOC40OTYzMiAxMi45Mzc1IDcuODc1QzEyLjkzNzUgNy4yNTM2OCAxMi40MzM4IDYuNzUgMTEuODEyNSA2Ljc1QzExLjE5MTIgNi43NSAxMC42ODc1IDcuMjUzNjggMTAuNjg3NSA3Ljg3NUMxMC42ODc1IDguNDk2MzIgMTEuMTkxMiA5IDExLjgxMjUgOVoiIGZpbGw9IiM3MzczNzMiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xOTlfNCI+CjxyZWN0IHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K' style="top: 6px;
|
|
6907
6924
|
position: absolute;
|
|
6908
6925
|
left: 16px;
|
|
@@ -6923,6 +6940,7 @@ class LicenseValidator {
|
|
|
6923
6940
|
border-radius: 8px;
|
|
6924
6941
|
font-family: Helvetica Neue, Helvetica, Arial;`);
|
|
6925
6942
|
document.body.appendChild(errorDiv);
|
|
6943
|
+
banner = false;
|
|
6926
6944
|
}
|
|
6927
6945
|
this.isLicensed = false;
|
|
6928
6946
|
}
|
|
@@ -9829,6 +9847,7 @@ const jsEvents = ['onchange',
|
|
|
9829
9847
|
'onbeforeprint',
|
|
9830
9848
|
'oncanplay',
|
|
9831
9849
|
'oncanplaythrough',
|
|
9850
|
+
'oncontentvisibilityautostatechange',
|
|
9832
9851
|
'oncontextmenu',
|
|
9833
9852
|
'ondblclick',
|
|
9834
9853
|
'ondrag',
|