@syncfusion/ej2-base 21.2.3 → 22.1.34

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.
Files changed (59) hide show
  1. package/.eslintrc.json +1 -0
  2. package/CHANGELOG.md +24 -0
  3. package/bin/syncfusion-license.js +1 -1
  4. package/dist/ej2-base.min.js +2 -2
  5. package/dist/ej2-base.umd.min.js +2 -2
  6. package/dist/ej2-base.umd.min.js.map +1 -1
  7. package/dist/es6/ej2-base.es2015.js +205 -58
  8. package/dist/es6/ej2-base.es2015.js.map +1 -1
  9. package/dist/es6/ej2-base.es5.js +186 -36
  10. package/dist/es6/ej2-base.es5.js.map +1 -1
  11. package/dist/global/ej2-base.min.js +2 -2
  12. package/dist/global/ej2-base.min.js.map +1 -1
  13. package/dist/global/index.d.ts +1 -1
  14. package/package.json +94 -7
  15. package/src/browser.js +1 -1
  16. package/src/draggable.js +3 -0
  17. package/src/fetch.d.ts +114 -0
  18. package/src/fetch.js +116 -0
  19. package/src/index.d.ts +1 -0
  20. package/src/index.js +1 -0
  21. package/src/intl/number-formatter.js +12 -5
  22. package/src/intl/parser-base.js +16 -16
  23. package/src/template-engine.d.ts +12 -3
  24. package/src/template-engine.js +21 -1
  25. package/src/template.d.ts +2 -2
  26. package/src/template.js +14 -9
  27. package/src/validate-lic.js +3 -3
  28. package/styles/_highcontrast-definition.scss +1 -1
  29. package/styles/_highcontrast-light-definition.scss +1 -1
  30. package/styles/_material3-dark-definition.scss +15 -0
  31. package/styles/_material3-definition.scss +16 -0
  32. package/styles/animation/_all.scss +64 -5
  33. package/styles/bootstrap-dark.css +59 -2
  34. package/styles/bootstrap.css +59 -2
  35. package/styles/bootstrap4.css +59 -2
  36. package/styles/bootstrap5-dark.css +59 -2
  37. package/styles/bootstrap5.css +59 -2
  38. package/styles/common/_core.scss +24 -4
  39. package/styles/definition/_material.scss +0 -3
  40. package/styles/definition/_material3-dark.scss +701 -0
  41. package/styles/definition/_material3.scss +782 -0
  42. package/styles/fabric-dark.css +59 -2
  43. package/styles/fabric.css +59 -2
  44. package/styles/fluent-dark.css +59 -2
  45. package/styles/fluent.css +59 -2
  46. package/styles/highcontrast-light.css +60 -3
  47. package/styles/highcontrast.css +60 -3
  48. package/styles/material-dark.css +59 -2
  49. package/styles/material.css +59 -2
  50. package/styles/material3-dark.css +2020 -0
  51. package/styles/material3-dark.scss +3 -0
  52. package/styles/material3.css +2076 -0
  53. package/styles/material3.scss +3 -0
  54. package/styles/offline-theme/material-dark.css +59 -2
  55. package/styles/offline-theme/material.css +59 -2
  56. package/styles/offline-theme/tailwind-dark.css +59 -2
  57. package/styles/offline-theme/tailwind.css +59 -2
  58. package/styles/tailwind-dark.css +59 -2
  59. package/styles/tailwind.css +59 -2
@@ -704,28 +704,28 @@ const blazorCurrencyData = {
704
704
  'XAF': 'FCFA',
705
705
  'GHS': 'GH₵',
706
706
  'XDR': 'XDR',
707
- 'AED': 'د.إ.‏',
708
- 'BHD': 'د.ب.‏',
709
- 'DZD': 'د.ج.‏',
710
- 'EGP': 'ج.م.‏',
707
+ 'AED': 'د.إ.',
708
+ 'BHD': 'د.ب.',
709
+ 'DZD': 'د.ج.',
710
+ 'EGP': 'ج.م.',
711
711
  'ILS': '₪',
712
- 'IQD': 'د.ع.‏',
713
- 'JOD': 'د.ا.‏',
712
+ 'IQD': 'د.ع.',
713
+ 'JOD': 'د.ا.',
714
714
  'KMF': 'CF',
715
- 'KWD': 'د.ك.‏',
716
- 'LBP': 'ل.ل.‏',
717
- 'LYD': 'د.ل.‏',
718
- 'MAD': 'د.م.‏',
715
+ 'KWD': 'د.ك.',
716
+ 'LBP': 'ل.ل.',
717
+ 'LYD': 'د.ل.',
718
+ 'MAD': 'د.م.',
719
719
  'MRU': 'أ.م.',
720
- 'OMR': 'ر.ع.‏',
721
- 'QAR': 'ر.ق.‏',
722
- 'SAR': 'ر.س.‏',
720
+ 'OMR': 'ر.ع.',
721
+ 'QAR': 'ر.ق.',
722
+ 'SAR': 'ر.س.',
723
723
  'SDG': 'ج.س.',
724
724
  'SOS': 'S',
725
725
  'SSP': '£',
726
- 'SYP': 'ل.س.‏',
727
- 'TND': 'د.ت.‏',
728
- 'YER': 'ر.ي.‏',
726
+ 'SYP': 'ل.س.',
727
+ 'TND': 'د.ت.',
728
+ 'YER': 'ر.ي.',
729
729
  'CLP': '$',
730
730
  'INR': '₹',
731
731
  'TZS': 'TSh',
@@ -1466,7 +1466,7 @@ class NumberFormat {
1466
1466
  else if (!isFinite(value)) {
1467
1467
  return symbols[mapper$1[0]];
1468
1468
  }
1469
- return this.intNumberFormatter(value, cOptions, dOptions);
1469
+ return this.intNumberFormatter(value, cOptions, dOptions, option);
1470
1470
  };
1471
1471
  }
1472
1472
  /**
@@ -1550,7 +1550,7 @@ class NumberFormat {
1550
1550
  * @param {CommonOptions} dOptions ?
1551
1551
  * @returns {string} ?
1552
1552
  */
1553
- static intNumberFormatter(value, fOptions, dOptions) {
1553
+ static intNumberFormatter(value, fOptions, dOptions, option) {
1554
1554
  let curData;
1555
1555
  if (isUndefined(fOptions.nData.type)) {
1556
1556
  return undefined;
@@ -1574,7 +1574,7 @@ class NumberFormat {
1574
1574
  fValue = this.processSignificantDigits(value, curData.minimumSignificantDigits, curData.maximumSignificantDigits);
1575
1575
  }
1576
1576
  else {
1577
- fValue = this.processFraction(value, curData.minimumFractionDigits, curData.maximumFractionDigits);
1577
+ fValue = this.processFraction(value, curData.minimumFractionDigits, curData.maximumFractionDigits, option);
1578
1578
  if (curData.minimumIntegerDigits) {
1579
1579
  fValue = this.processMinimumIntegers(fValue, curData.minimumIntegerDigits);
1580
1580
  }
@@ -1609,6 +1609,9 @@ class NumberFormat {
1609
1609
  return curData.nlead;
1610
1610
  }
1611
1611
  else {
1612
+ if (fValue === '0' && option && option.format === '0') {
1613
+ return fValue + curData.nend;
1614
+ }
1612
1615
  return curData.nlead + fValue + curData.nend;
1613
1616
  }
1614
1617
  }
@@ -1670,7 +1673,7 @@ class NumberFormat {
1670
1673
  * @param {number} max ?
1671
1674
  * @returns {string} ?
1672
1675
  */
1673
- static processFraction(value, min, max) {
1676
+ static processFraction(value, min, max, option) {
1674
1677
  const temp = (value + '').split('.')[1];
1675
1678
  const length = temp ? temp.length : 0;
1676
1679
  if (min && length < min) {
@@ -1690,7 +1693,11 @@ class NumberFormat {
1690
1693
  else if (!isNullOrUndefined(max) && (length > max || max === 0)) {
1691
1694
  return value.toFixed(max);
1692
1695
  }
1693
- return value + '';
1696
+ let str = value + '';
1697
+ if (str[0] === '0' && option && option.format === '###.00') {
1698
+ str = str.slice(1);
1699
+ }
1700
+ return str;
1694
1701
  }
1695
1702
  /**
1696
1703
  * Returns integer processed numeric string
@@ -4130,6 +4137,118 @@ class Ajax {
4130
4137
  }
4131
4138
  }
4132
4139
 
4140
+ /**
4141
+ * The Fetch class provides a way to make asynchronous network requests, typically to retrieve resources from a server.
4142
+ * ```typescript
4143
+ * var fetchApi = new Fetch('index.html', 'GET');
4144
+ * fetchApi.send()
4145
+ * .then((value) => {
4146
+ * console.log(value);
4147
+ * }).catch((error) => {
4148
+ * console.log(error);
4149
+ * });
4150
+ * ```
4151
+ */
4152
+ class Fetch {
4153
+ /**
4154
+ * Constructor for Fetch class.
4155
+ *
4156
+ * @param {string|Object} options - Specifies the URL or Request object with URL to which the request is to be sent.
4157
+ * @param {string} type - Specifies which request method is to be used, such as GET, POST, etc.
4158
+ * @param {string} contentType - Specifies the content type of the request, which is used to indicate the original media type of the resource.
4159
+ */
4160
+ constructor(options, type, contentType) {
4161
+ /**
4162
+ * Specifies which request method is to be used, such as GET, POST, etc.
4163
+ *
4164
+ * @default GET
4165
+ */
4166
+ this.type = 'GET';
4167
+ /**
4168
+ * A boolean value indicating whether to reject the promise or not.
4169
+ *
4170
+ * @private
4171
+ * @default true
4172
+ */
4173
+ this.emitError = true;
4174
+ if (typeof options === 'string') {
4175
+ this.url = options;
4176
+ this.type = !isNullOrUndefined(type) ? type.toUpperCase() : this.type;
4177
+ this.contentType = contentType;
4178
+ }
4179
+ else if (isObject(options) && Object.keys(options).length > 0) {
4180
+ merge(this, options);
4181
+ }
4182
+ this.contentType = !isNullOrUndefined(this.contentType) ? this.contentType : 'application/json; charset=utf-8';
4183
+ }
4184
+ /**
4185
+ * Send the request to server.
4186
+ *
4187
+ * @param {string|Object} data - Specifies the data that needs to be added to the request.
4188
+ * @returns {Promise<Response>} - Returns the response to a request.
4189
+ */
4190
+ send(data) {
4191
+ const contentTypes = {
4192
+ 'application/json': 'json',
4193
+ 'multipart/form-data': 'formData',
4194
+ 'application/octet-stream': 'blob',
4195
+ 'application/x-www-form-urlencoded': 'formData'
4196
+ };
4197
+ try {
4198
+ if (isNullOrUndefined(this.fetchRequest) && this.type === 'GET') {
4199
+ this.fetchRequest = new Request(this.url, { method: this.type });
4200
+ }
4201
+ else if (isNullOrUndefined(this.fetchRequest)) {
4202
+ this.data = !isNullOrUndefined(data) ? data : this.data;
4203
+ this.fetchRequest = new Request(this.url, {
4204
+ method: this.type,
4205
+ headers: { 'Content-Type': this.contentType },
4206
+ body: this.data
4207
+ });
4208
+ }
4209
+ const eventArgs = { cancel: false, fetchRequest: this.fetchRequest };
4210
+ this.triggerEvent(this['beforeSend'], eventArgs);
4211
+ if (eventArgs.cancel) {
4212
+ return null;
4213
+ }
4214
+ this.fetchResponse = fetch(this.fetchRequest);
4215
+ return this.fetchResponse.then((response) => {
4216
+ this.triggerEvent(this['onLoad'], response);
4217
+ if (!response.ok) {
4218
+ throw new Error(response.statusText);
4219
+ }
4220
+ let responseType = 'text';
4221
+ for (const key of Object.keys(contentTypes)) {
4222
+ if (response.headers.get('Content-Type').indexOf(key) !== -1) {
4223
+ responseType = contentTypes[key];
4224
+ }
4225
+ }
4226
+ return response[responseType]();
4227
+ // eslint-disable-next-line
4228
+ }).then((data) => {
4229
+ this.triggerEvent(this['onSuccess'], data, this);
4230
+ return data;
4231
+ // eslint-disable-next-line
4232
+ }).catch((error) => {
4233
+ let returnVal = {};
4234
+ if (this.emitError) {
4235
+ this.triggerEvent(this['onFailure'], error);
4236
+ returnVal = Promise.reject(error);
4237
+ }
4238
+ return returnVal;
4239
+ });
4240
+ }
4241
+ catch (error) {
4242
+ return error;
4243
+ }
4244
+ }
4245
+ triggerEvent(callback, data, instance) {
4246
+ if (!isNullOrUndefined(callback) && typeof callback === 'function') {
4247
+ callback(data, instance);
4248
+ }
4249
+ }
4250
+ }
4251
+
4133
4252
  const REGX_MOBILE = /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i;
4134
4253
  const REGX_IE = /msie|trident/i;
4135
4254
  const REGX_IE11 = /Trident\/7\./;
@@ -4260,7 +4379,7 @@ class Browser {
4260
4379
  */
4261
4380
  static getValue(key, regX) {
4262
4381
  const browserDetails = typeof window !== 'undefined' ? window.browserDetails : {};
4263
- if (typeof navigator !== 'undefined' && navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 && Browser.isTouch === true) {
4382
+ if (typeof navigator !== 'undefined' && navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 && Browser.isTouch === true && !REGX_BROWSER.CHROME.test(navigator.userAgent)) {
4264
4383
  browserDetails['isIos'] = true;
4265
4384
  browserDetails['isDevice'] = true;
4266
4385
  browserDetails['isTouch'] = true;
@@ -6647,8 +6766,8 @@ class LicenseValidator {
6647
6766
  constructor(key) {
6648
6767
  this.isValidated = false;
6649
6768
  this.isLicensed = true;
6650
- this.version = '21';
6651
- this.platform = /JavaScript|ASPNET|ASPNETCORE|ASPNETMVC|FileFormats/i;
6769
+ this.version = '22';
6770
+ this.platform = /JavaScript|ASPNET|ASPNETCORE|ASPNETMVC|FileFormats|essentialstudio/i;
6652
6771
  this.errors = {
6653
6772
  noLicense: '<span>This application was built using a trial version of Syncfusion Essential Studio.' +
6654
6773
  ' To remove the license validation message permanently, a valid license key must be included.</span>',
@@ -6748,7 +6867,7 @@ class LicenseValidator {
6748
6867
  }
6749
6868
  }
6750
6869
  if (validateMsg && typeof document !== 'undefined' && !isNullOrUndefined(document)) {
6751
- accountURL = (validateURL && validateURL !== '') ? validateURL : "https://www.syncfusion.com/account/claim-license-key?pl=SmF2YVNjcmlwdA==&vs=MjE=";
6870
+ accountURL = (validateURL && validateURL !== '') ? validateURL : "https://www.syncfusion.com/account/claim-license-key?pl=SmF2YVNjcmlwdA==&vs=MjI=";
6752
6871
  const errorDiv = createElement('div', {
6753
6872
  innerHTML: `<img src='data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzE5OV80KSI+CjxwYXRoIGQ9Ik0xMiAyMUMxNi45NzA2IDIxIDIxIDE2Ljk3MDYgMjEgMTJDMjEgNy4wMjk0NCAxNi45NzA2IDMgMTIgM0M3LjAyOTQ0IDMgMyA3LjAyOTQ0IDMgMTJDMyAxNi45NzA2IDcuMDI5NDQgMjEgMTIgMjFaIiBzdHJva2U9IiM3MzczNzMiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMS4yNSAxMS4yNUgxMlYxNi41SDEyLjc1IiBmaWxsPSIjNjE2MDYzIi8+CjxwYXRoIGQ9Ik0xMS4yNSAxMS4yNUgxMlYxNi41SDEyLjc1IiBzdHJva2U9IiM3MzczNzMiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMS44MTI1IDlDMTIuNDMzOCA5IDEyLjkzNzUgOC40OTYzMiAxMi45Mzc1IDcuODc1QzEyLjkzNzUgNy4yNTM2OCAxMi40MzM4IDYuNzUgMTEuODEyNSA2Ljc1QzExLjE5MTIgNi43NSAxMC42ODc1IDcuMjUzNjggMTAuNjg3NSA3Ljg3NUMxMC42ODc1IDguNDk2MzIgMTEuMTkxMiA5IDExLjgxMjUgOVoiIGZpbGw9IiM3MzczNzMiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xOTlfNCI+CjxyZWN0IHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K' style="top: 6px;
6754
6873
  position: absolute;
@@ -7874,6 +7993,9 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7874
7993
  const dTop = this.position.top - this.diffY;
7875
7994
  const styles = getComputedStyle(helperElement);
7876
7995
  if (this.dragArea) {
7996
+ if (this.enableAutoScroll) {
7997
+ this.setDragArea();
7998
+ }
7877
7999
  if (this.pageX !== pagex || this.skipDistanceCheck) {
7878
8000
  const helperWidth = helperElement.offsetWidth + (parseFloat(styles.marginLeft)
7879
8001
  + parseFloat(styles.marginRight));
@@ -9152,48 +9274,53 @@ const WINDOWFUNC = /\window\./gm;
9152
9274
  /**
9153
9275
  * Compile the template string into template function.
9154
9276
  *
9155
- * @param {string} template - The template string which is going to convert.
9277
+ * @param {string | Function} template - The template string which is going to convert.
9156
9278
  * @param {Object} helper - Helper functions as an object.
9157
9279
  * @param {boolean} ignorePrefix ?
9158
9280
  * @returns {string} ?
9159
9281
  * @private
9160
9282
  */
9161
9283
  function compile$1(template, helper, ignorePrefix) {
9162
- const argName = 'data';
9163
- const evalExpResult = evalExp(template, argName, helper, ignorePrefix);
9164
- // eslint-disable-next-line
9165
- const condtion = `var valueRegEx = (/value=\\'([A-Za-z0-9 _]*)((.)([\\w)(!-;?-■\\s]+)['])/g);
9166
- var hrefRegex = (/(?:href)([\\s='"./]+)([\\w-./?=&\\\\#"]+)((.)([\\w)(!-;/?-■\\s]+)['])/g);
9167
- if(str.match(valueRegEx)){
9168
- var check = str.match(valueRegEx);
9169
- var str1 = str;
9170
- for (var i=0; i < check.length; i++) {
9171
- var check1 = str.match(valueRegEx)[i].split('value=')[1];
9172
- var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;
9173
- change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;
9174
- str1 = str1.replace(check1, change);
9175
- }
9176
- str = str.replace(str, str1);
9177
- }
9178
- else if (str.match(/(?:href='')/) === null) {
9179
- if(str.match(hrefRegex)) {
9180
- var check = str.match(hrefRegex);
9284
+ if (typeof template === 'function') {
9285
+ return template;
9286
+ }
9287
+ else {
9288
+ const argName = 'data';
9289
+ const evalExpResult = evalExp(template, argName, helper, ignorePrefix);
9290
+ // eslint-disable-next-line
9291
+ const condtion = `var valueRegEx = (/value=\\'([A-Za-z0-9 _]*)((.)([\\w)(!-;?-■\\s]+)['])/g);
9292
+ var hrefRegex = (/(?:href)([\\s='"./]+)([\\w-./?=&\\\\#"]+)((.)([\\w)(!-;/?-■\\s]+)['])/g);
9293
+ if(str.match(valueRegEx)){
9294
+ var check = str.match(valueRegEx);
9181
9295
  var str1 = str;
9182
9296
  for (var i=0; i < check.length; i++) {
9183
- var check1 = str.match(hrefRegex)[i].split('href=')[1];
9184
- if (check1) {
9185
- var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;
9186
- change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;
9187
- str1 = str1.replace(check1, change);
9188
- }
9297
+ var check1 = str.match(valueRegEx)[i].split('value=')[1];
9298
+ var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;
9299
+ change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;
9300
+ str1 = str1.replace(check1, change);
9189
9301
  }
9190
9302
  str = str.replace(str, str1);
9191
9303
  }
9304
+ else if (str.match(/(?:href='')/) === null) {
9305
+ if(str.match(hrefRegex)) {
9306
+ var check = str.match(hrefRegex);
9307
+ var str1 = str;
9308
+ for (var i=0; i < check.length; i++) {
9309
+ var check1 = str.match(hrefRegex)[i].split('href=')[1];
9310
+ if (check1) {
9311
+ var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;
9312
+ change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;
9313
+ str1 = str1.replace(check1, change);
9314
+ }
9315
+ }
9316
+ str = str.replace(str, str1);
9317
+ }
9318
+ }
9319
+ `;
9320
+ const fnCode = 'var str=\"' + evalExpResult + '\";' + condtion + ' return str;';
9321
+ const fn = new Function(argName, fnCode);
9322
+ return fn.bind(helper);
9192
9323
  }
9193
- `;
9194
- const fnCode = 'var str=\"' + evalExpResult + '\";' + condtion + ' return str;';
9195
- const fn = new Function(argName, fnCode);
9196
- return fn.bind(helper);
9197
9324
  }
9198
9325
  /** function used to evaluate the function expression
9199
9326
  *
@@ -9320,7 +9447,7 @@ function evalExp(str, nameSpace, helper, ignorePrefix) {
9320
9447
  * @returns {string} ?
9321
9448
  */
9322
9449
  function addNameSpace(str, addNS, nameSpace, ignoreList, ignorePrefix) {
9323
- return ((addNS && !(NOT_NUMBER.test(str)) && ignoreList.indexOf(str.split('.')[0]) === -1 && !ignorePrefix) ? nameSpace + '.' + str : str);
9450
+ return ((addNS && !(NOT_NUMBER.test(str)) && ignoreList.indexOf(str.split('.')[0]) === -1 && !ignorePrefix && str !== "true" && str !== "false") ? nameSpace + '.' + str : str);
9324
9451
  }
9325
9452
  /**
9326
9453
  *
@@ -9407,7 +9534,7 @@ function getRandomId() {
9407
9534
  /**
9408
9535
  * Compile the template string into template function.
9409
9536
  *
9410
- * @param {string} templateString - The template string which is going to convert.
9537
+ * @param {string | Function} templateString - The template string which is going to convert.
9411
9538
  * @param {Object} helper - Helper functions as an object.
9412
9539
  * @param {boolean} ignorePrefix ?
9413
9540
  * @returns {NodeList} ?
@@ -9534,6 +9661,26 @@ function setTemplateEngine(classObj) {
9534
9661
  function getTemplateEngine() {
9535
9662
  return engineObj.compile;
9536
9663
  }
9664
+ /**
9665
+ * Set the current template function to support Content Security Policy.
9666
+ *
9667
+ * @param {Function} template - The template function that is going to render.
9668
+ * @param {any} helper - The data utilized by the template from the helper.
9669
+ * @returns {Function} ?
9670
+ * @private
9671
+ */
9672
+ function initializeCSPTemplate(template, helper) {
9673
+ let boundFunc;
9674
+ template.prototype.CSPTemplate = true;
9675
+ if (!isNullOrUndefined(helper)) {
9676
+ boundFunc = template.bind(helper);
9677
+ boundFunc.prototype = Object.create(template.prototype);
9678
+ }
9679
+ else {
9680
+ boundFunc = template;
9681
+ }
9682
+ return boundFunc;
9683
+ }
9537
9684
  //Default Engine Class
9538
9685
  class Engine {
9539
9686
  // eslint-disable-next-line
@@ -9731,5 +9878,5 @@ class SanitizeHtmlHelper {
9731
9878
  * Base modules
9732
9879
  */
9733
9880
 
9734
- export { blazorCultureFormats, IntlBase, Ajax, Animation, rippleEffect, isRippleEnabled, enableRipple, animationMode, setGlobalAnimation, Base, getComponent, removeChildInstance, Browser, versionBasedStatePersistence, enableVersionBasedPersistence, Component, ChildProperty, Position, Draggable, Droppable, EventHandler, onIntlChange, rightToLeft, cldrData, defaultCulture, defaultCurrencyCode, Internationalization, setCulture, setCurrencyCode, loadCldr, enableRtl, getNumericObject, getNumberDependable, getDefaultDateObject, KeyboardEvents, L10n, ModuleLoader, Property, Complex, ComplexFactory, Collection, CollectionFactory, Event$1 as Event, NotifyPropertyChanges, CreateBuilder, SwipeSettings, Touch, HijriParser, blazorTemplates, getRandomId, compile$$1 as compile, updateBlazorTemplate, resetBlazorTemplate, setTemplateEngine, getTemplateEngine, disableBlazorMode, createInstance, setImmediate, getValue, setValue, deleteObject, containerObject, isObject, getEnumValue, merge, extend, isNullOrUndefined, isUndefined, getUniqueID, debounce, queryParams, isObjectArray, compareElementParent, throwError, print, formatUnit, enableBlazorMode, isBlazor, getElement, getInstance, addInstance, uniqueID, createElement, addClass, removeClass, isVisible, prepend, append, detach, remove, attributes, select, selectAll, closest, siblings, getAttributeOrDefault, setStyleAttribute, classList, matches, includeInnerHTML, containsClass, cloneNode, Observer, SanitizeHtmlHelper, componentList, registerLicense, validateLicense, getVersion, createLicenseOverlay };
9881
+ export { blazorCultureFormats, IntlBase, Ajax, Fetch, Animation, rippleEffect, isRippleEnabled, enableRipple, animationMode, setGlobalAnimation, Base, getComponent, removeChildInstance, Browser, versionBasedStatePersistence, enableVersionBasedPersistence, Component, ChildProperty, Position, Draggable, Droppable, EventHandler, onIntlChange, rightToLeft, cldrData, defaultCulture, defaultCurrencyCode, Internationalization, setCulture, setCurrencyCode, loadCldr, enableRtl, getNumericObject, getNumberDependable, getDefaultDateObject, KeyboardEvents, L10n, ModuleLoader, Property, Complex, ComplexFactory, Collection, CollectionFactory, Event$1 as Event, NotifyPropertyChanges, CreateBuilder, SwipeSettings, Touch, HijriParser, blazorTemplates, getRandomId, compile$$1 as compile, updateBlazorTemplate, resetBlazorTemplate, setTemplateEngine, getTemplateEngine, initializeCSPTemplate, disableBlazorMode, createInstance, setImmediate, getValue, setValue, deleteObject, containerObject, isObject, getEnumValue, merge, extend, isNullOrUndefined, isUndefined, getUniqueID, debounce, queryParams, isObjectArray, compareElementParent, throwError, print, formatUnit, enableBlazorMode, isBlazor, getElement, getInstance, addInstance, uniqueID, createElement, addClass, removeClass, isVisible, prepend, append, detach, remove, attributes, select, selectAll, closest, siblings, getAttributeOrDefault, setStyleAttribute, classList, matches, includeInnerHTML, containsClass, cloneNode, Observer, SanitizeHtmlHelper, componentList, registerLicense, validateLicense, getVersion, createLicenseOverlay };
9735
9882
  //# sourceMappingURL=ej2-base.es2015.js.map