@syncfusion/ej2-inputs 20.4.42 → 20.4.51

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 (86) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/GitLeaksReport.json +42 -0
  3. package/dist/ej2-inputs.min.js +2 -2
  4. package/dist/ej2-inputs.umd.min.js +2 -2
  5. package/dist/ej2-inputs.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-inputs.es2015.js +30 -19
  7. package/dist/es6/ej2-inputs.es2015.js.map +1 -1
  8. package/dist/es6/ej2-inputs.es5.js +31 -19
  9. package/dist/es6/ej2-inputs.es5.js.map +1 -1
  10. package/dist/global/ej2-inputs.min.js +2 -2
  11. package/dist/global/ej2-inputs.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/gitleaks-ci/gitleaks +0 -0
  14. package/gitleaks-ci.tar.gz +0 -0
  15. package/package.json +9 -9
  16. package/src/common/signature-base.js +2 -0
  17. package/src/input/input.d.ts +1 -1
  18. package/src/input/input.js +2 -2
  19. package/src/rating/rating-model.d.ts +13 -13
  20. package/src/rating/rating.d.ts +1 -0
  21. package/src/rating/rating.js +21 -16
  22. package/src/uploader/uploader.js +6 -1
  23. package/styles/bootstrap-dark.css +5 -0
  24. package/styles/bootstrap.css +5 -0
  25. package/styles/bootstrap4.css +5 -0
  26. package/styles/bootstrap5-dark.css +5 -0
  27. package/styles/bootstrap5.css +5 -0
  28. package/styles/color-picker/_layout.scss +14 -0
  29. package/styles/color-picker/fluent-dark.css +6 -0
  30. package/styles/color-picker/fluent.css +6 -0
  31. package/styles/fabric-dark.css +5 -0
  32. package/styles/fabric.css +5 -0
  33. package/styles/fluent-dark.css +12 -1
  34. package/styles/fluent.css +12 -1
  35. package/styles/highcontrast-light.css +5 -0
  36. package/styles/highcontrast.css +5 -0
  37. package/styles/input/_layout.scss +1 -0
  38. package/styles/input/bootstrap-dark.css +1 -0
  39. package/styles/input/bootstrap.css +1 -0
  40. package/styles/input/bootstrap4.css +1 -0
  41. package/styles/input/bootstrap5-dark.css +1 -0
  42. package/styles/input/bootstrap5.css +1 -0
  43. package/styles/input/fabric-dark.css +1 -0
  44. package/styles/input/fabric.css +1 -0
  45. package/styles/input/fluent-dark.css +1 -0
  46. package/styles/input/fluent.css +1 -0
  47. package/styles/input/highcontrast-light.css +1 -0
  48. package/styles/input/highcontrast.css +1 -0
  49. package/styles/input/material-dark.css +1 -0
  50. package/styles/input/material.css +1 -0
  51. package/styles/input/tailwind-dark.css +1 -0
  52. package/styles/input/tailwind.css +1 -0
  53. package/styles/material-dark.css +5 -0
  54. package/styles/material.css +5 -0
  55. package/styles/rating/_bootstrap-dark-definition.scss +1 -0
  56. package/styles/rating/_bootstrap-definition.scss +1 -0
  57. package/styles/rating/_bootstrap4-definition.scss +1 -0
  58. package/styles/rating/_bootstrap5-definition.scss +1 -0
  59. package/styles/rating/_fabric-dark-definition.scss +1 -0
  60. package/styles/rating/_fabric-definition.scss +1 -0
  61. package/styles/rating/_fluent-definition.scss +1 -0
  62. package/styles/rating/_fusionnew-definition.scss +1 -0
  63. package/styles/rating/_highcontrast-definition.scss +1 -0
  64. package/styles/rating/_highcontrast-light-definition.scss +1 -0
  65. package/styles/rating/_layout.scss +6 -1
  66. package/styles/rating/_material-dark-definition.scss +1 -0
  67. package/styles/rating/_material-definition.scss +1 -0
  68. package/styles/rating/_material3-definition.scss +1 -0
  69. package/styles/rating/_tailwind-definition.scss +1 -0
  70. package/styles/rating/bootstrap-dark.css +4 -0
  71. package/styles/rating/bootstrap.css +4 -0
  72. package/styles/rating/bootstrap4.css +4 -0
  73. package/styles/rating/bootstrap5-dark.css +4 -0
  74. package/styles/rating/bootstrap5.css +4 -0
  75. package/styles/rating/fabric-dark.css +4 -0
  76. package/styles/rating/fabric.css +4 -0
  77. package/styles/rating/fluent-dark.css +5 -1
  78. package/styles/rating/fluent.css +5 -1
  79. package/styles/rating/highcontrast-light.css +4 -0
  80. package/styles/rating/highcontrast.css +4 -0
  81. package/styles/rating/material-dark.css +4 -0
  82. package/styles/rating/material.css +4 -0
  83. package/styles/rating/tailwind-dark.css +4 -0
  84. package/styles/rating/tailwind.css +4 -0
  85. package/styles/tailwind-dark.css +5 -0
  86. package/styles/tailwind.css +5 -0
@@ -426,8 +426,8 @@ var Input;
426
426
  * @param {any} element - Input element which is need to add.
427
427
  * @param {HTMLElement} container - The parent element which is need to get the label span to calculate width
428
428
  */
429
- function calculateWidth(element, container) {
430
- var elementWidth = element.clientWidth - parseInt(getComputedStyle(element, null).getPropertyValue('padding-left'));
429
+ function calculateWidth(element, container, moduleName) {
430
+ var elementWidth = moduleName === 'multiselect' ? element : element.clientWidth - parseInt(getComputedStyle(element, null).getPropertyValue('padding-left'));
431
431
  if (!isNullOrUndefined(container.getElementsByClassName('e-float-text-content')[0])) {
432
432
  if (container.getElementsByClassName('e-float-text-content')[0].classList.contains('e-float-text-overflow')) {
433
433
  container.getElementsByClassName('e-float-text-content')[0].classList.remove('e-float-text-overflow');
@@ -8073,7 +8073,12 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
8073
8073
  var inputElement = this.createElement('input', { attrs: { type: 'file' } });
8074
8074
  var index = 0;
8075
8075
  for (index; index < this.element.attributes.length; index++) {
8076
- inputElement.setAttribute(this.element.attributes[index].nodeName, this.element.attributes[index].nodeValue);
8076
+ if (this.element.attributes[index].nodeName !== 'id') {
8077
+ inputElement.setAttribute(this.element.attributes[index].nodeName, this.element.attributes[index].nodeValue);
8078
+ }
8079
+ else if (this.element.attributes[index].nodeName === 'id') {
8080
+ inputElement.setAttribute(this.element.attributes[index].nodeName, getUniqueID('uploader'));
8081
+ }
8077
8082
  inputElement.innerHTML = this.element.innerHTML;
8078
8083
  }
8079
8084
  if (!inputElement.hasAttribute('name')) {
@@ -14556,6 +14561,7 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
14556
14561
  * @returns {void}.
14557
14562
  */
14558
14563
  SignatureBase.prototype.draw = function (text, fontFamily, fontSize) {
14564
+ var args = { actionName: 'draw-text' };
14559
14565
  this.canvasContext.clearRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
14560
14566
  fontFamily = fontFamily || 'Arial';
14561
14567
  fontSize = fontSize || 30;
@@ -14565,6 +14571,7 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
14565
14571
  this.canvasContext.fillText(text, this.element.width / 2, this.element.height / 2);
14566
14572
  this.updateSnapCollection();
14567
14573
  this.isSignatureEmpty = false;
14574
+ this.trigger('change', args);
14568
14575
  };
14569
14576
  /**
14570
14577
  * To load the signature with the given base 64 string, height and width.
@@ -15283,7 +15290,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15283
15290
  if (this.showTooltip) {
15284
15291
  this.tooltipObj = new Tooltip({
15285
15292
  target: '.e-rating-item-container', windowCollision: true,
15286
- opensOn: 'Custom', cssClass: 'e-rating-tooltip'
15293
+ opensOn: 'Custom', cssClass: this.cssClass ? ('e-rating-tooltip ' + this.cssClass) : 'e-rating-tooltip'
15287
15294
  });
15288
15295
  this.tooltipObj.appendTo(this.ratingItemList);
15289
15296
  }
@@ -15314,14 +15321,14 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15314
15321
  currentValue = 0;
15315
15322
  }
15316
15323
  else {
15317
- currentValue = (this.precision === PrecisionType.Full) ? Math.round(currentValue) :
15324
+ currentValue = ((this.precision === PrecisionType.Full) || this.enableSingleSelection) ? Math.round(currentValue) :
15318
15325
  (this.precision === PrecisionType.Half) ? (Math.round(currentValue * 2) / 2) :
15319
15326
  (this.precision === PrecisionType.Quarter) ? (Math.round(currentValue * 4) / 4) : (Math.round(currentValue * 10) / 10);
15320
15327
  }
15321
15328
  return currentValue;
15322
15329
  };
15323
15330
  Rating.prototype.getRatingValue = function (value, i) {
15324
- return (this.enableSingleSelection && this.precision === PrecisionType.Full) ? ((value === i + 1) ? 1 : 0) :
15331
+ return (this.enableSingleSelection) ? (((value > i) && (value <= i + 1)) ? 1 : 0) :
15325
15332
  (value >= i + 1) ? 1 : ((value < i) ? 0 : (value - i));
15326
15333
  };
15327
15334
  Rating.prototype.updateItemValue = function () {
@@ -15476,6 +15483,12 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15476
15483
  this.updateResetButton();
15477
15484
  }
15478
15485
  };
15486
+ Rating.prototype.updateValueChange = function (e, val, isInteracted) {
15487
+ if (isInteracted === void 0) { isInteracted = true; }
15488
+ this.triggerChange(e, val, isInteracted);
15489
+ this.updateItemValue();
15490
+ this.updateLabel();
15491
+ };
15479
15492
  Rating.prototype.triggerChange = function (e, val, isInteracted) {
15480
15493
  if (isInteracted === void 0) { isInteracted = true; }
15481
15494
  val = this.validateValue(val);
@@ -15530,7 +15543,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15530
15543
  };
15531
15544
  Rating.prototype.calculateCurrentValue = function (index, args) {
15532
15545
  var currentValue = index;
15533
- if (this.precision !== PrecisionType.Full) {
15546
+ if (!(this.enableSingleSelection || (this.precision === PrecisionType.Full))) {
15534
15547
  currentValue = args.offsetX / this.itemElements[index - 1].clientWidth;
15535
15548
  currentValue = (this.enableRtl) ? (1 - currentValue) : currentValue;
15536
15549
  if (this.precision === PrecisionType.Quarter) {
@@ -15553,9 +15566,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15553
15566
  };
15554
15567
  Rating.prototype.resetClicked = function (e, isInteracted) {
15555
15568
  if (isInteracted === void 0) { isInteracted = true; }
15556
- this.triggerChange(e, this.min, isInteracted);
15557
- this.updateItemValue();
15558
- this.updateLabel();
15569
+ this.updateValueChange(e, this.min, isInteracted);
15559
15570
  this.updateResetButton();
15560
15571
  };
15561
15572
  Rating.prototype.wireKeyboardEvent = function () {
@@ -15595,12 +15606,11 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15595
15606
  };
15596
15607
  Rating.prototype.handleNavigation = function (e, isIncrease) {
15597
15608
  if ((!isIncrease && (this.value > this.min)) || (isIncrease && (this.value < this.itemsCount))) {
15598
- var currentValue = (this.precision === PrecisionType.Full) ? 1 : (this.precision === PrecisionType.Half) ? 0.5 :
15599
- (this.precision === PrecisionType.Quarter) ? 0.25 : Math.round(0.1 * 10) / 10;
15609
+ var currentValue = (this.precision === PrecisionType.Full || this.enableSingleSelection) ? 1 :
15610
+ (this.precision === PrecisionType.Half) ? 0.5 : (this.precision === PrecisionType.Quarter) ? 0.25 :
15611
+ Math.round(0.1 * 10) / 10;
15600
15612
  currentValue = isIncrease ? this.value + currentValue : this.value - currentValue;
15601
- this.triggerChange(e, (currentValue));
15602
- this.updateItemValue();
15603
- this.updateLabel();
15613
+ this.updateValueChange(e, (currentValue));
15604
15614
  if (this.allowReset) {
15605
15615
  this.updateResetButton();
15606
15616
  }
@@ -15680,9 +15690,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15680
15690
  var prop = _a[_i];
15681
15691
  switch (prop) {
15682
15692
  case 'value':
15683
- this.triggerChange(null, (this.value > this.min) ? this.value : this.min, false);
15684
- this.updateItemValue();
15685
- this.updateLabel();
15693
+ this.updateValueChange(null, (this.value > this.min) ? this.value : this.min, false);
15686
15694
  break;
15687
15695
  case 'min':
15688
15696
  this.updateMinValue();
@@ -15714,6 +15722,9 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15714
15722
  if (newProp.cssClass) {
15715
15723
  addClass([this.wrapper], newProp.cssClass.split(' '));
15716
15724
  }
15725
+ if (this.tooltipObj) {
15726
+ this.tooltipObj.setProperties({ cssClass: this.cssClass ? ('e-rating-tooltip ' + this.cssClass) : 'e-rating-tooltip' });
15727
+ }
15717
15728
  break;
15718
15729
  case 'labelPosition':
15719
15730
  this.updateLabelPosition();
@@ -15726,7 +15737,8 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15726
15737
  this.updateLabel();
15727
15738
  break;
15728
15739
  case 'enableSingleSelection':
15729
- this.updateItemValue();
15740
+ //To validate the value against single selection and update the items, label + trigger change event if value changed
15741
+ this.updateValueChange(null, this.currentValue, false);
15730
15742
  break;
15731
15743
  case 'enableAnimation':
15732
15744
  this.wrapper.classList[this.enableAnimation ? 'add' : 'remove'](ANIMATION);