@syncfusion/ej2-inputs 20.4.42 → 20.4.48

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 (80) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/dist/ej2-inputs.min.js +2 -2
  3. package/dist/ej2-inputs.umd.min.js +2 -2
  4. package/dist/ej2-inputs.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-inputs.es2015.js +22 -16
  6. package/dist/es6/ej2-inputs.es2015.js.map +1 -1
  7. package/dist/es6/ej2-inputs.es5.js +23 -16
  8. package/dist/es6/ej2-inputs.es5.js.map +1 -1
  9. package/dist/global/ej2-inputs.min.js +2 -2
  10. package/dist/global/ej2-inputs.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +9 -9
  13. package/src/common/signature-base.js +2 -0
  14. package/src/rating/rating-model.d.ts +13 -13
  15. package/src/rating/rating.d.ts +1 -0
  16. package/src/rating/rating.js +21 -16
  17. package/styles/bootstrap-dark.css +5 -0
  18. package/styles/bootstrap.css +5 -0
  19. package/styles/bootstrap4.css +5 -0
  20. package/styles/bootstrap5-dark.css +5 -0
  21. package/styles/bootstrap5.css +5 -0
  22. package/styles/color-picker/_layout.scss +14 -0
  23. package/styles/color-picker/fluent-dark.css +6 -0
  24. package/styles/color-picker/fluent.css +6 -0
  25. package/styles/fabric-dark.css +5 -0
  26. package/styles/fabric.css +5 -0
  27. package/styles/fluent-dark.css +12 -1
  28. package/styles/fluent.css +12 -1
  29. package/styles/highcontrast-light.css +5 -0
  30. package/styles/highcontrast.css +5 -0
  31. package/styles/input/_layout.scss +1 -0
  32. package/styles/input/bootstrap-dark.css +1 -0
  33. package/styles/input/bootstrap.css +1 -0
  34. package/styles/input/bootstrap4.css +1 -0
  35. package/styles/input/bootstrap5-dark.css +1 -0
  36. package/styles/input/bootstrap5.css +1 -0
  37. package/styles/input/fabric-dark.css +1 -0
  38. package/styles/input/fabric.css +1 -0
  39. package/styles/input/fluent-dark.css +1 -0
  40. package/styles/input/fluent.css +1 -0
  41. package/styles/input/highcontrast-light.css +1 -0
  42. package/styles/input/highcontrast.css +1 -0
  43. package/styles/input/material-dark.css +1 -0
  44. package/styles/input/material.css +1 -0
  45. package/styles/input/tailwind-dark.css +1 -0
  46. package/styles/input/tailwind.css +1 -0
  47. package/styles/material-dark.css +5 -0
  48. package/styles/material.css +5 -0
  49. package/styles/rating/_bootstrap-dark-definition.scss +1 -0
  50. package/styles/rating/_bootstrap-definition.scss +1 -0
  51. package/styles/rating/_bootstrap4-definition.scss +1 -0
  52. package/styles/rating/_bootstrap5-definition.scss +1 -0
  53. package/styles/rating/_fabric-dark-definition.scss +1 -0
  54. package/styles/rating/_fabric-definition.scss +1 -0
  55. package/styles/rating/_fluent-definition.scss +1 -0
  56. package/styles/rating/_fusionnew-definition.scss +1 -0
  57. package/styles/rating/_highcontrast-definition.scss +1 -0
  58. package/styles/rating/_highcontrast-light-definition.scss +1 -0
  59. package/styles/rating/_layout.scss +6 -1
  60. package/styles/rating/_material-dark-definition.scss +1 -0
  61. package/styles/rating/_material-definition.scss +1 -0
  62. package/styles/rating/_material3-definition.scss +1 -0
  63. package/styles/rating/_tailwind-definition.scss +1 -0
  64. package/styles/rating/bootstrap-dark.css +4 -0
  65. package/styles/rating/bootstrap.css +4 -0
  66. package/styles/rating/bootstrap4.css +4 -0
  67. package/styles/rating/bootstrap5-dark.css +4 -0
  68. package/styles/rating/bootstrap5.css +4 -0
  69. package/styles/rating/fabric-dark.css +4 -0
  70. package/styles/rating/fabric.css +4 -0
  71. package/styles/rating/fluent-dark.css +5 -1
  72. package/styles/rating/fluent.css +5 -1
  73. package/styles/rating/highcontrast-light.css +4 -0
  74. package/styles/rating/highcontrast.css +4 -0
  75. package/styles/rating/material-dark.css +4 -0
  76. package/styles/rating/material.css +4 -0
  77. package/styles/rating/tailwind-dark.css +4 -0
  78. package/styles/rating/tailwind.css +4 -0
  79. package/styles/tailwind-dark.css +5 -0
  80. package/styles/tailwind.css +5 -0
@@ -14260,6 +14260,7 @@ class SignatureBase extends Component {
14260
14260
  * @returns {void}.
14261
14261
  */
14262
14262
  draw(text, fontFamily, fontSize) {
14263
+ const args = { actionName: 'draw-text' };
14263
14264
  this.canvasContext.clearRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
14264
14265
  fontFamily = fontFamily || 'Arial';
14265
14266
  fontSize = fontSize || 30;
@@ -14269,6 +14270,7 @@ class SignatureBase extends Component {
14269
14270
  this.canvasContext.fillText(text, this.element.width / 2, this.element.height / 2);
14270
14271
  this.updateSnapCollection();
14271
14272
  this.isSignatureEmpty = false;
14273
+ this.trigger('change', args);
14272
14274
  }
14273
14275
  /**
14274
14276
  * To load the signature with the given base 64 string, height and width.
@@ -14951,7 +14953,7 @@ let Rating = class Rating extends Component {
14951
14953
  if (this.showTooltip) {
14952
14954
  this.tooltipObj = new Tooltip({
14953
14955
  target: '.e-rating-item-container', windowCollision: true,
14954
- opensOn: 'Custom', cssClass: 'e-rating-tooltip'
14956
+ opensOn: 'Custom', cssClass: this.cssClass ? ('e-rating-tooltip ' + this.cssClass) : 'e-rating-tooltip'
14955
14957
  });
14956
14958
  this.tooltipObj.appendTo(this.ratingItemList);
14957
14959
  }
@@ -14982,14 +14984,14 @@ let Rating = class Rating extends Component {
14982
14984
  currentValue = 0;
14983
14985
  }
14984
14986
  else {
14985
- currentValue = (this.precision === PrecisionType.Full) ? Math.round(currentValue) :
14987
+ currentValue = ((this.precision === PrecisionType.Full) || this.enableSingleSelection) ? Math.round(currentValue) :
14986
14988
  (this.precision === PrecisionType.Half) ? (Math.round(currentValue * 2) / 2) :
14987
14989
  (this.precision === PrecisionType.Quarter) ? (Math.round(currentValue * 4) / 4) : (Math.round(currentValue * 10) / 10);
14988
14990
  }
14989
14991
  return currentValue;
14990
14992
  }
14991
14993
  getRatingValue(value, i) {
14992
- return (this.enableSingleSelection && this.precision === PrecisionType.Full) ? ((value === i + 1) ? 1 : 0) :
14994
+ return (this.enableSingleSelection) ? (((value > i) && (value <= i + 1)) ? 1 : 0) :
14993
14995
  (value >= i + 1) ? 1 : ((value < i) ? 0 : (value - i));
14994
14996
  }
14995
14997
  updateItemValue() {
@@ -15143,6 +15145,11 @@ let Rating = class Rating extends Component {
15143
15145
  this.updateResetButton();
15144
15146
  }
15145
15147
  }
15148
+ updateValueChange(e, val, isInteracted = true) {
15149
+ this.triggerChange(e, val, isInteracted);
15150
+ this.updateItemValue();
15151
+ this.updateLabel();
15152
+ }
15146
15153
  triggerChange(e, val, isInteracted = true) {
15147
15154
  val = this.validateValue(val);
15148
15155
  this.currentValue = val;
@@ -15196,7 +15203,7 @@ let Rating = class Rating extends Component {
15196
15203
  }
15197
15204
  calculateCurrentValue(index, args) {
15198
15205
  let currentValue = index;
15199
- if (this.precision !== PrecisionType.Full) {
15206
+ if (!(this.enableSingleSelection || (this.precision === PrecisionType.Full))) {
15200
15207
  currentValue = args.offsetX / this.itemElements[index - 1].clientWidth;
15201
15208
  currentValue = (this.enableRtl) ? (1 - currentValue) : currentValue;
15202
15209
  if (this.precision === PrecisionType.Quarter) {
@@ -15218,9 +15225,7 @@ let Rating = class Rating extends Component {
15218
15225
  this.resetClicked(null, false);
15219
15226
  }
15220
15227
  resetClicked(e, isInteracted = true) {
15221
- this.triggerChange(e, this.min, isInteracted);
15222
- this.updateItemValue();
15223
- this.updateLabel();
15228
+ this.updateValueChange(e, this.min, isInteracted);
15224
15229
  this.updateResetButton();
15225
15230
  }
15226
15231
  wireKeyboardEvent() {
@@ -15260,12 +15265,11 @@ let Rating = class Rating extends Component {
15260
15265
  }
15261
15266
  handleNavigation(e, isIncrease) {
15262
15267
  if ((!isIncrease && (this.value > this.min)) || (isIncrease && (this.value < this.itemsCount))) {
15263
- let currentValue = (this.precision === PrecisionType.Full) ? 1 : (this.precision === PrecisionType.Half) ? 0.5 :
15264
- (this.precision === PrecisionType.Quarter) ? 0.25 : Math.round(0.1 * 10) / 10;
15268
+ let currentValue = (this.precision === PrecisionType.Full || this.enableSingleSelection) ? 1 :
15269
+ (this.precision === PrecisionType.Half) ? 0.5 : (this.precision === PrecisionType.Quarter) ? 0.25 :
15270
+ Math.round(0.1 * 10) / 10;
15265
15271
  currentValue = isIncrease ? this.value + currentValue : this.value - currentValue;
15266
- this.triggerChange(e, (currentValue));
15267
- this.updateItemValue();
15268
- this.updateLabel();
15272
+ this.updateValueChange(e, (currentValue));
15269
15273
  if (this.allowReset) {
15270
15274
  this.updateResetButton();
15271
15275
  }
@@ -15343,9 +15347,7 @@ let Rating = class Rating extends Component {
15343
15347
  for (const prop of Object.keys(newProp)) {
15344
15348
  switch (prop) {
15345
15349
  case 'value':
15346
- this.triggerChange(null, (this.value > this.min) ? this.value : this.min, false);
15347
- this.updateItemValue();
15348
- this.updateLabel();
15350
+ this.updateValueChange(null, (this.value > this.min) ? this.value : this.min, false);
15349
15351
  break;
15350
15352
  case 'min':
15351
15353
  this.updateMinValue();
@@ -15377,6 +15379,9 @@ let Rating = class Rating extends Component {
15377
15379
  if (newProp.cssClass) {
15378
15380
  addClass([this.wrapper], newProp.cssClass.split(' '));
15379
15381
  }
15382
+ if (this.tooltipObj) {
15383
+ this.tooltipObj.setProperties({ cssClass: this.cssClass ? ('e-rating-tooltip ' + this.cssClass) : 'e-rating-tooltip' });
15384
+ }
15380
15385
  break;
15381
15386
  case 'labelPosition':
15382
15387
  this.updateLabelPosition();
@@ -15389,7 +15394,8 @@ let Rating = class Rating extends Component {
15389
15394
  this.updateLabel();
15390
15395
  break;
15391
15396
  case 'enableSingleSelection':
15392
- this.updateItemValue();
15397
+ //To validate the value against single selection and update the items, label + trigger change event if value changed
15398
+ this.updateValueChange(null, this.currentValue, false);
15393
15399
  break;
15394
15400
  case 'enableAnimation':
15395
15401
  this.wrapper.classList[this.enableAnimation ? 'add' : 'remove'](ANIMATION);