@syncfusion/ej2-inputs 30.1.38 → 30.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.
@@ -489,14 +489,26 @@ var Input;
489
489
  return container;
490
490
  }
491
491
  function encodePlaceHolder(placeholder) {
492
- var result = '';
493
- if (!isNullOrUndefined(placeholder) && placeholder !== '') {
494
- var spanEle = document.createElement('span');
495
- spanEle.innerHTML = '<input placeholder="' + placeholder + '"/>';
496
- var hiddenInput = (spanEle.children[0]);
497
- result = hiddenInput.placeholder;
492
+ if (placeholder == null || placeholder === '') {
493
+ return '';
498
494
  }
499
- return result;
495
+ var decoded = decodeHtmlEntities(placeholder);
496
+ return decoded;
497
+ }
498
+ function decodeHtmlEntities(str) {
499
+ var entityMap = {
500
+ '&amp;': '&',
501
+ // eslint-disable-next-line quotes
502
+ '&quot;': '"',
503
+ // eslint-disable-next-line quotes
504
+ '&#39;': "'",
505
+ '&lt;': '<',
506
+ '&gt;': '>',
507
+ '&eacute;': 'é' // tslint:disable-line:comma-dangle
508
+ };
509
+ // tslint:disable-next-line:typedef
510
+ // tslint-disable-next-line security/detect-object-injection
511
+ return str.replace(/&[a-zA-Z#0-9]+;/g, function (entity) { return entityMap[entity] || entity; });
500
512
  }
501
513
  /**
502
514
  * Sets the value to the input element.
@@ -2975,7 +2987,7 @@ function maskInputHandler(event) {
2975
2987
  this.element.value = this.element.value + this.promptMask;
2976
2988
  this.element.setSelectionRange(1, 1);
2977
2989
  }
2978
- if (!this._callPasteHandler) {
2990
+ if ((!this._callPasteHandler && !Browser.isDevice) || this._callPasteHandler) {
2979
2991
  removeMaskInputValues.call(this, event);
2980
2992
  }
2981
2993
  if (this.element.value.length > this.promptMask.length) {
@@ -17406,9 +17418,6 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
17406
17418
  };
17407
17419
  Rating.prototype.updateItemValue = function (isUpdate) {
17408
17420
  if (isUpdate === void 0) { isUpdate = true; }
17409
- if (isUpdate && this.isReact) {
17410
- this.clearTemplate(['ratingEmptyTemplate', 'ratingFullTemplate']);
17411
- }
17412
17421
  for (var i = 0; i < this.itemsCount; i++) {
17413
17422
  var itemElement = this.itemElements[parseInt(i.toString(), 10)];
17414
17423
  itemElement.classList.remove(SELECTED, INTERMEDIATE, SELECTEDVALUE);
@@ -17441,7 +17450,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
17441
17450
  }
17442
17451
  var spanEle = this.itemElements[parseInt(index.toString(), 10)].querySelector('.e-rating-item');
17443
17452
  if (this.fullTemplate && ratingValue === 1) {
17444
- if (!this.isReact && spanEle.classList.contains(FULLTEMPLATE)) {
17453
+ if (spanEle.classList.contains(FULLTEMPLATE)) {
17445
17454
  return;
17446
17455
  }
17447
17456
  this.removeItemContent(spanEle);
@@ -17449,7 +17458,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
17449
17458
  append(this.fullTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate' + index), this.isStringTemplate), spanEle);
17450
17459
  }
17451
17460
  else if (this.emptyTemplate) {
17452
- if (!this.isReact && spanEle.classList.contains(EMPTYTEMPLATE)) {
17461
+ if (spanEle.classList.contains(EMPTYTEMPLATE)) {
17453
17462
  return;
17454
17463
  }
17455
17464
  this.removeItemContent(spanEle);
@@ -17732,9 +17741,6 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
17732
17741
  }
17733
17742
  };
17734
17743
  Rating.prototype.updateContent = function () {
17735
- if (this.isReact) {
17736
- this.clearTemplate(['ratingEmptyTemplate', 'ratingFullTemplate']);
17737
- }
17738
17744
  for (var i = 0; i < this.itemsCount; i++) {
17739
17745
  var itemElement = this.itemElements[parseInt(i.toString(), 10)].firstElementChild;
17740
17746
  this.renderItemContent(itemElement, this.getRatingValue(this.value, i), i, true);