@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.
- package/CHANGELOG.md +9 -1
- package/GitLeaksReport.json +42 -0
- 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 +30 -19
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +31 -19
- 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/gitleaks-ci/gitleaks +0 -0
- package/gitleaks-ci.tar.gz +0 -0
- package/package.json +9 -9
- package/src/common/signature-base.js +2 -0
- package/src/input/input.d.ts +1 -1
- package/src/input/input.js +2 -2
- 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/src/uploader/uploader.js +6 -1
- 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
|
@@ -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
|
-
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
15599
|
-
(this.precision === PrecisionType.
|
|
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.
|
|
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.
|
|
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
|
-
|
|
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);
|