@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
|
@@ -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
|
|
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
|
|
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.
|
|
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
|
|
15264
|
-
(this.precision === PrecisionType.
|
|
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.
|
|
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.
|
|
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
|
-
|
|
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);
|