@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.
@@ -486,14 +486,26 @@ var Input;
486
486
  return container;
487
487
  }
488
488
  function encodePlaceHolder(placeholder) {
489
- let result = '';
490
- if (!isNullOrUndefined(placeholder) && placeholder !== '') {
491
- const spanEle = document.createElement('span');
492
- spanEle.innerHTML = '<input placeholder="' + placeholder + '"/>';
493
- const hiddenInput = (spanEle.children[0]);
494
- result = hiddenInput.placeholder;
489
+ if (placeholder == null || placeholder === '') {
490
+ return '';
495
491
  }
496
- return result;
492
+ const decoded = decodeHtmlEntities(placeholder);
493
+ return decoded;
494
+ }
495
+ function decodeHtmlEntities(str) {
496
+ const entityMap = {
497
+ '&amp;': '&',
498
+ // eslint-disable-next-line quotes
499
+ '&quot;': '"',
500
+ // eslint-disable-next-line quotes
501
+ '&#39;': "'",
502
+ '&lt;': '<',
503
+ '&gt;': '>',
504
+ '&eacute;': 'é' // tslint:disable-line:comma-dangle
505
+ };
506
+ // tslint:disable-next-line:typedef
507
+ // tslint-disable-next-line security/detect-object-injection
508
+ return str.replace(/&[a-zA-Z#0-9]+;/g, (entity) => entityMap[entity] || entity);
497
509
  }
498
510
  /**
499
511
  * Sets the value to the input element.
@@ -2935,7 +2947,7 @@ function maskInputHandler(event) {
2935
2947
  this.element.value = this.element.value + this.promptMask;
2936
2948
  this.element.setSelectionRange(1, 1);
2937
2949
  }
2938
- if (!this._callPasteHandler) {
2950
+ if ((!this._callPasteHandler && !Browser.isDevice) || this._callPasteHandler) {
2939
2951
  removeMaskInputValues.call(this, event);
2940
2952
  }
2941
2953
  if (this.element.value.length > this.promptMask.length) {
@@ -16965,9 +16977,6 @@ let Rating = class Rating extends Component {
16965
16977
  (value >= i + 1) ? 1 : ((value < i) ? 0 : (value - i));
16966
16978
  }
16967
16979
  updateItemValue(isUpdate = true) {
16968
- if (isUpdate && this.isReact) {
16969
- this.clearTemplate(['ratingEmptyTemplate', 'ratingFullTemplate']);
16970
- }
16971
16980
  for (let i = 0; i < this.itemsCount; i++) {
16972
16981
  const itemElement = this.itemElements[parseInt(i.toString(), 10)];
16973
16982
  itemElement.classList.remove(SELECTED, INTERMEDIATE, SELECTEDVALUE);
@@ -17000,7 +17009,7 @@ let Rating = class Rating extends Component {
17000
17009
  }
17001
17010
  const spanEle = this.itemElements[parseInt(index.toString(), 10)].querySelector('.e-rating-item');
17002
17011
  if (this.fullTemplate && ratingValue === 1) {
17003
- if (!this.isReact && spanEle.classList.contains(FULLTEMPLATE)) {
17012
+ if (spanEle.classList.contains(FULLTEMPLATE)) {
17004
17013
  return;
17005
17014
  }
17006
17015
  this.removeItemContent(spanEle);
@@ -17008,7 +17017,7 @@ let Rating = class Rating extends Component {
17008
17017
  append(this.fullTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate' + index), this.isStringTemplate), spanEle);
17009
17018
  }
17010
17019
  else if (this.emptyTemplate) {
17011
- if (!this.isReact && spanEle.classList.contains(EMPTYTEMPLATE)) {
17020
+ if (spanEle.classList.contains(EMPTYTEMPLATE)) {
17012
17021
  return;
17013
17022
  }
17014
17023
  this.removeItemContent(spanEle);
@@ -17285,9 +17294,6 @@ let Rating = class Rating extends Component {
17285
17294
  }
17286
17295
  }
17287
17296
  updateContent() {
17288
- if (this.isReact) {
17289
- this.clearTemplate(['ratingEmptyTemplate', 'ratingFullTemplate']);
17290
- }
17291
17297
  for (let i = 0; i < this.itemsCount; i++) {
17292
17298
  const itemElement = this.itemElements[parseInt(i.toString(), 10)].firstElementChild;
17293
17299
  this.renderItemContent(itemElement, this.getRatingValue(this.value, i), i, true);