@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.
- package/CHANGELOG.md +7 -1
- package/dist/ej2-inputs.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js.map +1 -1
- package/dist/es6/ej2-inputs.es2015.js +22 -16
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +23 -16
- package/dist/es6/ej2-inputs.es5.js.map +1 -1
- package/dist/global/ej2-inputs.min.js +2 -2
- package/dist/global/ej2-inputs.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +9 -9
- package/src/common/signature-base.js +2 -0
- package/src/rating/rating-model.d.ts +13 -13
- package/src/rating/rating.d.ts +1 -0
- package/src/rating/rating.js +21 -16
- package/styles/bootstrap-dark.css +5 -0
- package/styles/bootstrap.css +5 -0
- package/styles/bootstrap4.css +5 -0
- package/styles/bootstrap5-dark.css +5 -0
- package/styles/bootstrap5.css +5 -0
- package/styles/color-picker/_layout.scss +14 -0
- package/styles/color-picker/fluent-dark.css +6 -0
- package/styles/color-picker/fluent.css +6 -0
- package/styles/fabric-dark.css +5 -0
- package/styles/fabric.css +5 -0
- package/styles/fluent-dark.css +12 -1
- package/styles/fluent.css +12 -1
- package/styles/highcontrast-light.css +5 -0
- package/styles/highcontrast.css +5 -0
- package/styles/input/_layout.scss +1 -0
- package/styles/input/bootstrap-dark.css +1 -0
- package/styles/input/bootstrap.css +1 -0
- package/styles/input/bootstrap4.css +1 -0
- package/styles/input/bootstrap5-dark.css +1 -0
- package/styles/input/bootstrap5.css +1 -0
- package/styles/input/fabric-dark.css +1 -0
- package/styles/input/fabric.css +1 -0
- package/styles/input/fluent-dark.css +1 -0
- package/styles/input/fluent.css +1 -0
- package/styles/input/highcontrast-light.css +1 -0
- package/styles/input/highcontrast.css +1 -0
- package/styles/input/material-dark.css +1 -0
- package/styles/input/material.css +1 -0
- package/styles/input/tailwind-dark.css +1 -0
- package/styles/input/tailwind.css +1 -0
- package/styles/material-dark.css +5 -0
- package/styles/material.css +5 -0
- package/styles/rating/_bootstrap-dark-definition.scss +1 -0
- package/styles/rating/_bootstrap-definition.scss +1 -0
- package/styles/rating/_bootstrap4-definition.scss +1 -0
- package/styles/rating/_bootstrap5-definition.scss +1 -0
- package/styles/rating/_fabric-dark-definition.scss +1 -0
- package/styles/rating/_fabric-definition.scss +1 -0
- package/styles/rating/_fluent-definition.scss +1 -0
- package/styles/rating/_fusionnew-definition.scss +1 -0
- package/styles/rating/_highcontrast-definition.scss +1 -0
- package/styles/rating/_highcontrast-light-definition.scss +1 -0
- package/styles/rating/_layout.scss +6 -1
- package/styles/rating/_material-dark-definition.scss +1 -0
- package/styles/rating/_material-definition.scss +1 -0
- package/styles/rating/_material3-definition.scss +1 -0
- package/styles/rating/_tailwind-definition.scss +1 -0
- package/styles/rating/bootstrap-dark.css +4 -0
- package/styles/rating/bootstrap.css +4 -0
- package/styles/rating/bootstrap4.css +4 -0
- package/styles/rating/bootstrap5-dark.css +4 -0
- package/styles/rating/bootstrap5.css +4 -0
- package/styles/rating/fabric-dark.css +4 -0
- package/styles/rating/fabric.css +4 -0
- package/styles/rating/fluent-dark.css +5 -1
- package/styles/rating/fluent.css +5 -1
- package/styles/rating/highcontrast-light.css +4 -0
- package/styles/rating/highcontrast.css +4 -0
- package/styles/rating/material-dark.css +4 -0
- package/styles/rating/material.css +4 -0
- package/styles/rating/tailwind-dark.css +4 -0
- package/styles/rating/tailwind.css +4 -0
- package/styles/tailwind-dark.css +5 -0
- package/styles/tailwind.css +5 -0
|
@@ -14556,6 +14556,7 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
14556
14556
|
* @returns {void}.
|
|
14557
14557
|
*/
|
|
14558
14558
|
SignatureBase.prototype.draw = function (text, fontFamily, fontSize) {
|
|
14559
|
+
var args = { actionName: 'draw-text' };
|
|
14559
14560
|
this.canvasContext.clearRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
|
|
14560
14561
|
fontFamily = fontFamily || 'Arial';
|
|
14561
14562
|
fontSize = fontSize || 30;
|
|
@@ -14565,6 +14566,7 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
14565
14566
|
this.canvasContext.fillText(text, this.element.width / 2, this.element.height / 2);
|
|
14566
14567
|
this.updateSnapCollection();
|
|
14567
14568
|
this.isSignatureEmpty = false;
|
|
14569
|
+
this.trigger('change', args);
|
|
14568
14570
|
};
|
|
14569
14571
|
/**
|
|
14570
14572
|
* To load the signature with the given base 64 string, height and width.
|
|
@@ -15283,7 +15285,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15283
15285
|
if (this.showTooltip) {
|
|
15284
15286
|
this.tooltipObj = new Tooltip({
|
|
15285
15287
|
target: '.e-rating-item-container', windowCollision: true,
|
|
15286
|
-
opensOn: 'Custom', cssClass: 'e-rating-tooltip'
|
|
15288
|
+
opensOn: 'Custom', cssClass: this.cssClass ? ('e-rating-tooltip ' + this.cssClass) : 'e-rating-tooltip'
|
|
15287
15289
|
});
|
|
15288
15290
|
this.tooltipObj.appendTo(this.ratingItemList);
|
|
15289
15291
|
}
|
|
@@ -15314,14 +15316,14 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15314
15316
|
currentValue = 0;
|
|
15315
15317
|
}
|
|
15316
15318
|
else {
|
|
15317
|
-
currentValue = (this.precision === PrecisionType.Full) ? Math.round(currentValue) :
|
|
15319
|
+
currentValue = ((this.precision === PrecisionType.Full) || this.enableSingleSelection) ? Math.round(currentValue) :
|
|
15318
15320
|
(this.precision === PrecisionType.Half) ? (Math.round(currentValue * 2) / 2) :
|
|
15319
15321
|
(this.precision === PrecisionType.Quarter) ? (Math.round(currentValue * 4) / 4) : (Math.round(currentValue * 10) / 10);
|
|
15320
15322
|
}
|
|
15321
15323
|
return currentValue;
|
|
15322
15324
|
};
|
|
15323
15325
|
Rating.prototype.getRatingValue = function (value, i) {
|
|
15324
|
-
return (this.enableSingleSelection
|
|
15326
|
+
return (this.enableSingleSelection) ? (((value > i) && (value <= i + 1)) ? 1 : 0) :
|
|
15325
15327
|
(value >= i + 1) ? 1 : ((value < i) ? 0 : (value - i));
|
|
15326
15328
|
};
|
|
15327
15329
|
Rating.prototype.updateItemValue = function () {
|
|
@@ -15476,6 +15478,12 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15476
15478
|
this.updateResetButton();
|
|
15477
15479
|
}
|
|
15478
15480
|
};
|
|
15481
|
+
Rating.prototype.updateValueChange = function (e, val, isInteracted) {
|
|
15482
|
+
if (isInteracted === void 0) { isInteracted = true; }
|
|
15483
|
+
this.triggerChange(e, val, isInteracted);
|
|
15484
|
+
this.updateItemValue();
|
|
15485
|
+
this.updateLabel();
|
|
15486
|
+
};
|
|
15479
15487
|
Rating.prototype.triggerChange = function (e, val, isInteracted) {
|
|
15480
15488
|
if (isInteracted === void 0) { isInteracted = true; }
|
|
15481
15489
|
val = this.validateValue(val);
|
|
@@ -15530,7 +15538,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15530
15538
|
};
|
|
15531
15539
|
Rating.prototype.calculateCurrentValue = function (index, args) {
|
|
15532
15540
|
var currentValue = index;
|
|
15533
|
-
if (this.precision
|
|
15541
|
+
if (!(this.enableSingleSelection || (this.precision === PrecisionType.Full))) {
|
|
15534
15542
|
currentValue = args.offsetX / this.itemElements[index - 1].clientWidth;
|
|
15535
15543
|
currentValue = (this.enableRtl) ? (1 - currentValue) : currentValue;
|
|
15536
15544
|
if (this.precision === PrecisionType.Quarter) {
|
|
@@ -15553,9 +15561,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15553
15561
|
};
|
|
15554
15562
|
Rating.prototype.resetClicked = function (e, isInteracted) {
|
|
15555
15563
|
if (isInteracted === void 0) { isInteracted = true; }
|
|
15556
|
-
this.
|
|
15557
|
-
this.updateItemValue();
|
|
15558
|
-
this.updateLabel();
|
|
15564
|
+
this.updateValueChange(e, this.min, isInteracted);
|
|
15559
15565
|
this.updateResetButton();
|
|
15560
15566
|
};
|
|
15561
15567
|
Rating.prototype.wireKeyboardEvent = function () {
|
|
@@ -15595,12 +15601,11 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15595
15601
|
};
|
|
15596
15602
|
Rating.prototype.handleNavigation = function (e, isIncrease) {
|
|
15597
15603
|
if ((!isIncrease && (this.value > this.min)) || (isIncrease && (this.value < this.itemsCount))) {
|
|
15598
|
-
var currentValue = (this.precision === PrecisionType.Full
|
|
15599
|
-
(this.precision === PrecisionType.
|
|
15604
|
+
var currentValue = (this.precision === PrecisionType.Full || this.enableSingleSelection) ? 1 :
|
|
15605
|
+
(this.precision === PrecisionType.Half) ? 0.5 : (this.precision === PrecisionType.Quarter) ? 0.25 :
|
|
15606
|
+
Math.round(0.1 * 10) / 10;
|
|
15600
15607
|
currentValue = isIncrease ? this.value + currentValue : this.value - currentValue;
|
|
15601
|
-
this.
|
|
15602
|
-
this.updateItemValue();
|
|
15603
|
-
this.updateLabel();
|
|
15608
|
+
this.updateValueChange(e, (currentValue));
|
|
15604
15609
|
if (this.allowReset) {
|
|
15605
15610
|
this.updateResetButton();
|
|
15606
15611
|
}
|
|
@@ -15680,9 +15685,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15680
15685
|
var prop = _a[_i];
|
|
15681
15686
|
switch (prop) {
|
|
15682
15687
|
case 'value':
|
|
15683
|
-
this.
|
|
15684
|
-
this.updateItemValue();
|
|
15685
|
-
this.updateLabel();
|
|
15688
|
+
this.updateValueChange(null, (this.value > this.min) ? this.value : this.min, false);
|
|
15686
15689
|
break;
|
|
15687
15690
|
case 'min':
|
|
15688
15691
|
this.updateMinValue();
|
|
@@ -15714,6 +15717,9 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15714
15717
|
if (newProp.cssClass) {
|
|
15715
15718
|
addClass([this.wrapper], newProp.cssClass.split(' '));
|
|
15716
15719
|
}
|
|
15720
|
+
if (this.tooltipObj) {
|
|
15721
|
+
this.tooltipObj.setProperties({ cssClass: this.cssClass ? ('e-rating-tooltip ' + this.cssClass) : 'e-rating-tooltip' });
|
|
15722
|
+
}
|
|
15717
15723
|
break;
|
|
15718
15724
|
case 'labelPosition':
|
|
15719
15725
|
this.updateLabelPosition();
|
|
@@ -15726,7 +15732,8 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15726
15732
|
this.updateLabel();
|
|
15727
15733
|
break;
|
|
15728
15734
|
case 'enableSingleSelection':
|
|
15729
|
-
|
|
15735
|
+
//To validate the value against single selection and update the items, label + trigger change event if value changed
|
|
15736
|
+
this.updateValueChange(null, this.currentValue, false);
|
|
15730
15737
|
break;
|
|
15731
15738
|
case 'enableAnimation':
|
|
15732
15739
|
this.wrapper.classList[this.enableAnimation ? 'add' : 'remove'](ANIMATION);
|