@syncfusion/ej2-inputs 20.4.40 → 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/README.md +1 -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 +60 -39
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +61 -39
- 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 +57 -41
- package/src/rating/rating.d.ts +88 -56
- package/src/rating/rating.js +52 -32
- package/src/uploader/uploader.js +8 -8
- 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
|
@@ -8454,13 +8454,6 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
|
|
|
8454
8454
|
}
|
|
8455
8455
|
};
|
|
8456
8456
|
Uploader.prototype.setCSSClass = function (oldCSSClass) {
|
|
8457
|
-
var updatedCssClassValue = this.cssClass;
|
|
8458
|
-
if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
|
|
8459
|
-
updatedCssClassValue = (this.cssClass.replace(/\s+/g, ' ')).trim();
|
|
8460
|
-
}
|
|
8461
|
-
if (!isNullOrUndefined(this.cssClass) && updatedCssClassValue !== '') {
|
|
8462
|
-
addClass([this.uploadWrapper], updatedCssClassValue.split(updatedCssClassValue.indexOf(',') > -1 ? ',' : ' '));
|
|
8463
|
-
}
|
|
8464
8457
|
var updatedOldCssClass = oldCSSClass;
|
|
8465
8458
|
if (!isNullOrUndefined(oldCSSClass)) {
|
|
8466
8459
|
updatedOldCssClass = (oldCSSClass.replace(/\s+/g, ' ')).trim();
|
|
@@ -8468,6 +8461,13 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
|
|
|
8468
8461
|
if (!isNullOrUndefined(oldCSSClass) && updatedOldCssClass !== '') {
|
|
8469
8462
|
removeClass([this.uploadWrapper], updatedOldCssClass.split(' '));
|
|
8470
8463
|
}
|
|
8464
|
+
var updatedCssClassValue = this.cssClass;
|
|
8465
|
+
if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
|
|
8466
|
+
updatedCssClassValue = (this.cssClass.replace(/\s+/g, ' ')).trim();
|
|
8467
|
+
}
|
|
8468
|
+
if (!isNullOrUndefined(this.cssClass) && updatedCssClassValue !== '') {
|
|
8469
|
+
addClass([this.uploadWrapper], updatedCssClassValue.split(updatedCssClassValue.indexOf(',') > -1 ? ',' : ' '));
|
|
8470
|
+
}
|
|
8471
8471
|
};
|
|
8472
8472
|
Uploader.prototype.wireEvents = function () {
|
|
8473
8473
|
EventHandler.add(this.browseButton, 'click', this.browseButtonClick, this);
|
|
@@ -11058,7 +11058,7 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
|
|
|
11058
11058
|
var files = this.getFiles(fileData);
|
|
11059
11059
|
for (var i = 0; i < files.length; i++) {
|
|
11060
11060
|
if (files[i].statusCode === '5' || files[i].statusCode === '0') {
|
|
11061
|
-
if (this.asyncSettings.chunkSize > 0) {
|
|
11061
|
+
if (this.asyncSettings.chunkSize > 0 && this.getCurrentMetaData(files[i], null)) {
|
|
11062
11062
|
this.retryUpload(this.getCurrentMetaData(files[i], null), fromcanceledStage);
|
|
11063
11063
|
}
|
|
11064
11064
|
else {
|
|
@@ -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.
|
|
@@ -15061,49 +15063,64 @@ var EMPTYTEMPLATE = 'e-rating-empty';
|
|
|
15061
15063
|
var SELECTEDVALUE = 'e-selected-value';
|
|
15062
15064
|
var RATINGVALUE = '--rating-value';
|
|
15063
15065
|
/**
|
|
15064
|
-
* Defines
|
|
15066
|
+
* Defines where to position the label in rating
|
|
15065
15067
|
*/
|
|
15066
15068
|
var LabelPosition;
|
|
15067
15069
|
(function (LabelPosition) {
|
|
15068
15070
|
/**
|
|
15069
|
-
*
|
|
15071
|
+
* The label is positioned at the top center of the rating component.
|
|
15070
15072
|
*/
|
|
15071
15073
|
LabelPosition["Top"] = "Top";
|
|
15072
15074
|
/**
|
|
15073
|
-
*
|
|
15075
|
+
* The label is positioned at the bottom center of the rating component.
|
|
15074
15076
|
*/
|
|
15075
15077
|
LabelPosition["Bottom"] = "Bottom";
|
|
15076
15078
|
/**
|
|
15077
|
-
*
|
|
15079
|
+
* The label is positioned at the left side of the rating component.
|
|
15078
15080
|
*/
|
|
15079
15081
|
LabelPosition["Left"] = "Left";
|
|
15080
15082
|
/**
|
|
15081
|
-
*
|
|
15083
|
+
* The label is positioned at the right side of the rating component.
|
|
15082
15084
|
*/
|
|
15083
15085
|
LabelPosition["Right"] = "Right";
|
|
15084
15086
|
})(LabelPosition || (LabelPosition = {}));
|
|
15085
15087
|
/**
|
|
15086
|
-
* Defines the
|
|
15088
|
+
* Defines the precision type of the rating.
|
|
15089
|
+
* It is used to component the granularity of the rating, allowing users to provide ratings with varying levels of precision.
|
|
15087
15090
|
*/
|
|
15088
15091
|
var PrecisionType;
|
|
15089
15092
|
(function (PrecisionType) {
|
|
15090
15093
|
/**
|
|
15091
|
-
*
|
|
15094
|
+
* The rating is increased in whole number increments.
|
|
15092
15095
|
*/
|
|
15093
15096
|
PrecisionType["Full"] = "Full";
|
|
15094
15097
|
/**
|
|
15095
|
-
*
|
|
15098
|
+
* The rating is increased in increments of 0.5 (half).
|
|
15096
15099
|
*/
|
|
15097
15100
|
PrecisionType["Half"] = "Half";
|
|
15098
15101
|
/**
|
|
15099
|
-
*
|
|
15102
|
+
* The rating is increased in increments of 0.25 (quarter).
|
|
15100
15103
|
*/
|
|
15101
15104
|
PrecisionType["Quarter"] = "Quarter";
|
|
15102
15105
|
/**
|
|
15103
|
-
*
|
|
15106
|
+
* The rating is increased in increments of 0.1.
|
|
15104
15107
|
*/
|
|
15105
15108
|
PrecisionType["Exact"] = "Exact";
|
|
15106
15109
|
})(PrecisionType || (PrecisionType = {}));
|
|
15110
|
+
/**
|
|
15111
|
+
* The Rating component allows the user to rate something by clicking on a set of symbols on a numeric scale.
|
|
15112
|
+
* This allows users to provide feedback or ratings for products, services, or content.
|
|
15113
|
+
*
|
|
15114
|
+
* ```html
|
|
15115
|
+
* <input id="rating">
|
|
15116
|
+
* ```
|
|
15117
|
+
* ```typescript
|
|
15118
|
+
* <script>
|
|
15119
|
+
* let ratingObj: Rating = new Rating();
|
|
15120
|
+
* ratingObj.appendTo('#rating');
|
|
15121
|
+
* </script>
|
|
15122
|
+
* ```
|
|
15123
|
+
*/
|
|
15107
15124
|
var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
15108
15125
|
__extends$9(Rating, _super);
|
|
15109
15126
|
/**
|
|
@@ -15182,7 +15199,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15182
15199
|
attributes(this.ratingItemList, { 'aria-label': 'rating', 'role': 'slider' });
|
|
15183
15200
|
this.wrapper.appendChild(this.ratingItemList);
|
|
15184
15201
|
EventHandler.add(this.ratingItemList, 'touchmove', function (e) { return _this.touchMoveHandler(e); }, this);
|
|
15185
|
-
EventHandler.add(this.ratingItemList,
|
|
15202
|
+
EventHandler.add(this.ratingItemList, Browser.touchEndEvent, this.touchEndHandler, this);
|
|
15186
15203
|
};
|
|
15187
15204
|
Rating.prototype.touchMoveHandler = function (e) {
|
|
15188
15205
|
var rect = this.ratingItemList.getBoundingClientRect();
|
|
@@ -15268,9 +15285,9 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15268
15285
|
if (this.showTooltip) {
|
|
15269
15286
|
this.tooltipObj = new Tooltip({
|
|
15270
15287
|
target: '.e-rating-item-container', windowCollision: true,
|
|
15271
|
-
opensOn: 'Custom', cssClass: 'e-rating-tooltip'
|
|
15288
|
+
opensOn: 'Custom', cssClass: this.cssClass ? ('e-rating-tooltip ' + this.cssClass) : 'e-rating-tooltip'
|
|
15272
15289
|
});
|
|
15273
|
-
this.tooltipObj.appendTo(
|
|
15290
|
+
this.tooltipObj.appendTo(this.ratingItemList);
|
|
15274
15291
|
}
|
|
15275
15292
|
else {
|
|
15276
15293
|
if (!isNullOrUndefined(this.tooltipObj)) {
|
|
@@ -15299,14 +15316,14 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15299
15316
|
currentValue = 0;
|
|
15300
15317
|
}
|
|
15301
15318
|
else {
|
|
15302
|
-
currentValue = (this.precision === PrecisionType.Full) ? Math.round(currentValue) :
|
|
15319
|
+
currentValue = ((this.precision === PrecisionType.Full) || this.enableSingleSelection) ? Math.round(currentValue) :
|
|
15303
15320
|
(this.precision === PrecisionType.Half) ? (Math.round(currentValue * 2) / 2) :
|
|
15304
15321
|
(this.precision === PrecisionType.Quarter) ? (Math.round(currentValue * 4) / 4) : (Math.round(currentValue * 10) / 10);
|
|
15305
15322
|
}
|
|
15306
15323
|
return currentValue;
|
|
15307
15324
|
};
|
|
15308
15325
|
Rating.prototype.getRatingValue = function (value, i) {
|
|
15309
|
-
return (this.enableSingleSelection
|
|
15326
|
+
return (this.enableSingleSelection) ? (((value > i) && (value <= i + 1)) ? 1 : 0) :
|
|
15310
15327
|
(value >= i + 1) ? 1 : ((value < i) ? 0 : (value - i));
|
|
15311
15328
|
};
|
|
15312
15329
|
Rating.prototype.updateItemValue = function () {
|
|
@@ -15461,6 +15478,12 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15461
15478
|
this.updateResetButton();
|
|
15462
15479
|
}
|
|
15463
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
|
+
};
|
|
15464
15487
|
Rating.prototype.triggerChange = function (e, val, isInteracted) {
|
|
15465
15488
|
if (isInteracted === void 0) { isInteracted = true; }
|
|
15466
15489
|
val = this.validateValue(val);
|
|
@@ -15515,7 +15538,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15515
15538
|
};
|
|
15516
15539
|
Rating.prototype.calculateCurrentValue = function (index, args) {
|
|
15517
15540
|
var currentValue = index;
|
|
15518
|
-
if (this.precision
|
|
15541
|
+
if (!(this.enableSingleSelection || (this.precision === PrecisionType.Full))) {
|
|
15519
15542
|
currentValue = args.offsetX / this.itemElements[index - 1].clientWidth;
|
|
15520
15543
|
currentValue = (this.enableRtl) ? (1 - currentValue) : currentValue;
|
|
15521
15544
|
if (this.precision === PrecisionType.Quarter) {
|
|
@@ -15538,9 +15561,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15538
15561
|
};
|
|
15539
15562
|
Rating.prototype.resetClicked = function (e, isInteracted) {
|
|
15540
15563
|
if (isInteracted === void 0) { isInteracted = true; }
|
|
15541
|
-
this.
|
|
15542
|
-
this.updateItemValue();
|
|
15543
|
-
this.updateLabel();
|
|
15564
|
+
this.updateValueChange(e, this.min, isInteracted);
|
|
15544
15565
|
this.updateResetButton();
|
|
15545
15566
|
};
|
|
15546
15567
|
Rating.prototype.wireKeyboardEvent = function () {
|
|
@@ -15580,12 +15601,11 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15580
15601
|
};
|
|
15581
15602
|
Rating.prototype.handleNavigation = function (e, isIncrease) {
|
|
15582
15603
|
if ((!isIncrease && (this.value > this.min)) || (isIncrease && (this.value < this.itemsCount))) {
|
|
15583
|
-
var currentValue = (this.precision === PrecisionType.Full
|
|
15584
|
-
(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;
|
|
15585
15607
|
currentValue = isIncrease ? this.value + currentValue : this.value - currentValue;
|
|
15586
|
-
this.
|
|
15587
|
-
this.updateItemValue();
|
|
15588
|
-
this.updateLabel();
|
|
15608
|
+
this.updateValueChange(e, (currentValue));
|
|
15589
15609
|
if (this.allowReset) {
|
|
15590
15610
|
this.updateResetButton();
|
|
15591
15611
|
}
|
|
@@ -15665,9 +15685,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15665
15685
|
var prop = _a[_i];
|
|
15666
15686
|
switch (prop) {
|
|
15667
15687
|
case 'value':
|
|
15668
|
-
this.
|
|
15669
|
-
this.updateItemValue();
|
|
15670
|
-
this.updateLabel();
|
|
15688
|
+
this.updateValueChange(null, (this.value > this.min) ? this.value : this.min, false);
|
|
15671
15689
|
break;
|
|
15672
15690
|
case 'min':
|
|
15673
15691
|
this.updateMinValue();
|
|
@@ -15699,6 +15717,9 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15699
15717
|
if (newProp.cssClass) {
|
|
15700
15718
|
addClass([this.wrapper], newProp.cssClass.split(' '));
|
|
15701
15719
|
}
|
|
15720
|
+
if (this.tooltipObj) {
|
|
15721
|
+
this.tooltipObj.setProperties({ cssClass: this.cssClass ? ('e-rating-tooltip ' + this.cssClass) : 'e-rating-tooltip' });
|
|
15722
|
+
}
|
|
15702
15723
|
break;
|
|
15703
15724
|
case 'labelPosition':
|
|
15704
15725
|
this.updateLabelPosition();
|
|
@@ -15711,7 +15732,8 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15711
15732
|
this.updateLabel();
|
|
15712
15733
|
break;
|
|
15713
15734
|
case 'enableSingleSelection':
|
|
15714
|
-
|
|
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);
|
|
15715
15737
|
break;
|
|
15716
15738
|
case 'enableAnimation':
|
|
15717
15739
|
this.wrapper.classList[this.enableAnimation ? 'add' : 'remove'](ANIMATION);
|
|
@@ -15742,12 +15764,12 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
|
|
|
15742
15764
|
__decorate$8([
|
|
15743
15765
|
Property(false)
|
|
15744
15766
|
], Rating.prototype, "disabled", void 0);
|
|
15745
|
-
__decorate$8([
|
|
15746
|
-
Property(true)
|
|
15747
|
-
], Rating.prototype, "enableAnimation", void 0);
|
|
15748
15767
|
__decorate$8([
|
|
15749
15768
|
Property('')
|
|
15750
15769
|
], Rating.prototype, "emptyTemplate", void 0);
|
|
15770
|
+
__decorate$8([
|
|
15771
|
+
Property(true)
|
|
15772
|
+
], Rating.prototype, "enableAnimation", void 0);
|
|
15751
15773
|
__decorate$8([
|
|
15752
15774
|
Property(false)
|
|
15753
15775
|
], Rating.prototype, "enableSingleSelection", void 0);
|