@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
|
@@ -424,8 +424,8 @@ var Input;
|
|
|
424
424
|
* @param {any} element - Input element which is need to add.
|
|
425
425
|
* @param {HTMLElement} container - The parent element which is need to get the label span to calculate width
|
|
426
426
|
*/
|
|
427
|
-
function calculateWidth(element, container) {
|
|
428
|
-
let elementWidth = element.clientWidth - parseInt(getComputedStyle(element, null).getPropertyValue('padding-left'));
|
|
427
|
+
function calculateWidth(element, container, moduleName) {
|
|
428
|
+
let elementWidth = moduleName === 'multiselect' ? element : element.clientWidth - parseInt(getComputedStyle(element, null).getPropertyValue('padding-left'));
|
|
429
429
|
if (!isNullOrUndefined(container.getElementsByClassName('e-float-text-content')[0])) {
|
|
430
430
|
if (container.getElementsByClassName('e-float-text-content')[0].classList.contains('e-float-text-overflow')) {
|
|
431
431
|
container.getElementsByClassName('e-float-text-content')[0].classList.remove('e-float-text-overflow');
|
|
@@ -7903,7 +7903,12 @@ let Uploader = class Uploader extends Component {
|
|
|
7903
7903
|
const inputElement = this.createElement('input', { attrs: { type: 'file' } });
|
|
7904
7904
|
let index = 0;
|
|
7905
7905
|
for (index; index < this.element.attributes.length; index++) {
|
|
7906
|
-
|
|
7906
|
+
if (this.element.attributes[index].nodeName !== 'id') {
|
|
7907
|
+
inputElement.setAttribute(this.element.attributes[index].nodeName, this.element.attributes[index].nodeValue);
|
|
7908
|
+
}
|
|
7909
|
+
else if (this.element.attributes[index].nodeName === 'id') {
|
|
7910
|
+
inputElement.setAttribute(this.element.attributes[index].nodeName, getUniqueID('uploader'));
|
|
7911
|
+
}
|
|
7907
7912
|
inputElement.innerHTML = this.element.innerHTML;
|
|
7908
7913
|
}
|
|
7909
7914
|
if (!inputElement.hasAttribute('name')) {
|
|
@@ -14260,6 +14265,7 @@ class SignatureBase extends Component {
|
|
|
14260
14265
|
* @returns {void}.
|
|
14261
14266
|
*/
|
|
14262
14267
|
draw(text, fontFamily, fontSize) {
|
|
14268
|
+
const args = { actionName: 'draw-text' };
|
|
14263
14269
|
this.canvasContext.clearRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
|
|
14264
14270
|
fontFamily = fontFamily || 'Arial';
|
|
14265
14271
|
fontSize = fontSize || 30;
|
|
@@ -14269,6 +14275,7 @@ class SignatureBase extends Component {
|
|
|
14269
14275
|
this.canvasContext.fillText(text, this.element.width / 2, this.element.height / 2);
|
|
14270
14276
|
this.updateSnapCollection();
|
|
14271
14277
|
this.isSignatureEmpty = false;
|
|
14278
|
+
this.trigger('change', args);
|
|
14272
14279
|
}
|
|
14273
14280
|
/**
|
|
14274
14281
|
* To load the signature with the given base 64 string, height and width.
|
|
@@ -14951,7 +14958,7 @@ let Rating = class Rating extends Component {
|
|
|
14951
14958
|
if (this.showTooltip) {
|
|
14952
14959
|
this.tooltipObj = new Tooltip({
|
|
14953
14960
|
target: '.e-rating-item-container', windowCollision: true,
|
|
14954
|
-
opensOn: 'Custom', cssClass: 'e-rating-tooltip'
|
|
14961
|
+
opensOn: 'Custom', cssClass: this.cssClass ? ('e-rating-tooltip ' + this.cssClass) : 'e-rating-tooltip'
|
|
14955
14962
|
});
|
|
14956
14963
|
this.tooltipObj.appendTo(this.ratingItemList);
|
|
14957
14964
|
}
|
|
@@ -14982,14 +14989,14 @@ let Rating = class Rating extends Component {
|
|
|
14982
14989
|
currentValue = 0;
|
|
14983
14990
|
}
|
|
14984
14991
|
else {
|
|
14985
|
-
currentValue = (this.precision === PrecisionType.Full) ? Math.round(currentValue) :
|
|
14992
|
+
currentValue = ((this.precision === PrecisionType.Full) || this.enableSingleSelection) ? Math.round(currentValue) :
|
|
14986
14993
|
(this.precision === PrecisionType.Half) ? (Math.round(currentValue * 2) / 2) :
|
|
14987
14994
|
(this.precision === PrecisionType.Quarter) ? (Math.round(currentValue * 4) / 4) : (Math.round(currentValue * 10) / 10);
|
|
14988
14995
|
}
|
|
14989
14996
|
return currentValue;
|
|
14990
14997
|
}
|
|
14991
14998
|
getRatingValue(value, i) {
|
|
14992
|
-
return (this.enableSingleSelection
|
|
14999
|
+
return (this.enableSingleSelection) ? (((value > i) && (value <= i + 1)) ? 1 : 0) :
|
|
14993
15000
|
(value >= i + 1) ? 1 : ((value < i) ? 0 : (value - i));
|
|
14994
15001
|
}
|
|
14995
15002
|
updateItemValue() {
|
|
@@ -15143,6 +15150,11 @@ let Rating = class Rating extends Component {
|
|
|
15143
15150
|
this.updateResetButton();
|
|
15144
15151
|
}
|
|
15145
15152
|
}
|
|
15153
|
+
updateValueChange(e, val, isInteracted = true) {
|
|
15154
|
+
this.triggerChange(e, val, isInteracted);
|
|
15155
|
+
this.updateItemValue();
|
|
15156
|
+
this.updateLabel();
|
|
15157
|
+
}
|
|
15146
15158
|
triggerChange(e, val, isInteracted = true) {
|
|
15147
15159
|
val = this.validateValue(val);
|
|
15148
15160
|
this.currentValue = val;
|
|
@@ -15196,7 +15208,7 @@ let Rating = class Rating extends Component {
|
|
|
15196
15208
|
}
|
|
15197
15209
|
calculateCurrentValue(index, args) {
|
|
15198
15210
|
let currentValue = index;
|
|
15199
|
-
if (this.precision
|
|
15211
|
+
if (!(this.enableSingleSelection || (this.precision === PrecisionType.Full))) {
|
|
15200
15212
|
currentValue = args.offsetX / this.itemElements[index - 1].clientWidth;
|
|
15201
15213
|
currentValue = (this.enableRtl) ? (1 - currentValue) : currentValue;
|
|
15202
15214
|
if (this.precision === PrecisionType.Quarter) {
|
|
@@ -15218,9 +15230,7 @@ let Rating = class Rating extends Component {
|
|
|
15218
15230
|
this.resetClicked(null, false);
|
|
15219
15231
|
}
|
|
15220
15232
|
resetClicked(e, isInteracted = true) {
|
|
15221
|
-
this.
|
|
15222
|
-
this.updateItemValue();
|
|
15223
|
-
this.updateLabel();
|
|
15233
|
+
this.updateValueChange(e, this.min, isInteracted);
|
|
15224
15234
|
this.updateResetButton();
|
|
15225
15235
|
}
|
|
15226
15236
|
wireKeyboardEvent() {
|
|
@@ -15260,12 +15270,11 @@ let Rating = class Rating extends Component {
|
|
|
15260
15270
|
}
|
|
15261
15271
|
handleNavigation(e, isIncrease) {
|
|
15262
15272
|
if ((!isIncrease && (this.value > this.min)) || (isIncrease && (this.value < this.itemsCount))) {
|
|
15263
|
-
let currentValue = (this.precision === PrecisionType.Full
|
|
15264
|
-
(this.precision === PrecisionType.
|
|
15273
|
+
let currentValue = (this.precision === PrecisionType.Full || this.enableSingleSelection) ? 1 :
|
|
15274
|
+
(this.precision === PrecisionType.Half) ? 0.5 : (this.precision === PrecisionType.Quarter) ? 0.25 :
|
|
15275
|
+
Math.round(0.1 * 10) / 10;
|
|
15265
15276
|
currentValue = isIncrease ? this.value + currentValue : this.value - currentValue;
|
|
15266
|
-
this.
|
|
15267
|
-
this.updateItemValue();
|
|
15268
|
-
this.updateLabel();
|
|
15277
|
+
this.updateValueChange(e, (currentValue));
|
|
15269
15278
|
if (this.allowReset) {
|
|
15270
15279
|
this.updateResetButton();
|
|
15271
15280
|
}
|
|
@@ -15343,9 +15352,7 @@ let Rating = class Rating extends Component {
|
|
|
15343
15352
|
for (const prop of Object.keys(newProp)) {
|
|
15344
15353
|
switch (prop) {
|
|
15345
15354
|
case 'value':
|
|
15346
|
-
this.
|
|
15347
|
-
this.updateItemValue();
|
|
15348
|
-
this.updateLabel();
|
|
15355
|
+
this.updateValueChange(null, (this.value > this.min) ? this.value : this.min, false);
|
|
15349
15356
|
break;
|
|
15350
15357
|
case 'min':
|
|
15351
15358
|
this.updateMinValue();
|
|
@@ -15377,6 +15384,9 @@ let Rating = class Rating extends Component {
|
|
|
15377
15384
|
if (newProp.cssClass) {
|
|
15378
15385
|
addClass([this.wrapper], newProp.cssClass.split(' '));
|
|
15379
15386
|
}
|
|
15387
|
+
if (this.tooltipObj) {
|
|
15388
|
+
this.tooltipObj.setProperties({ cssClass: this.cssClass ? ('e-rating-tooltip ' + this.cssClass) : 'e-rating-tooltip' });
|
|
15389
|
+
}
|
|
15380
15390
|
break;
|
|
15381
15391
|
case 'labelPosition':
|
|
15382
15392
|
this.updateLabelPosition();
|
|
@@ -15389,7 +15399,8 @@ let Rating = class Rating extends Component {
|
|
|
15389
15399
|
this.updateLabel();
|
|
15390
15400
|
break;
|
|
15391
15401
|
case 'enableSingleSelection':
|
|
15392
|
-
|
|
15402
|
+
//To validate the value against single selection and update the items, label + trigger change event if value changed
|
|
15403
|
+
this.updateValueChange(null, this.currentValue, false);
|
|
15393
15404
|
break;
|
|
15394
15405
|
case 'enableAnimation':
|
|
15395
15406
|
this.wrapper.classList[this.enableAnimation ? 'add' : 'remove'](ANIMATION);
|