@syncfusion/ej2-inputs 31.1.23 → 31.2.4
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/README.md +11 -2
- 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 +86 -2
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +86 -2
- 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 +5 -5
- package/src/maskedtextbox/base/mask-base.js +7 -0
- package/src/maskedtextbox/maskedtextbox/maskedtextbox.d.ts +2 -0
- package/src/maskedtextbox/maskedtextbox/maskedtextbox.js +19 -0
- package/src/numerictextbox/numerictextbox.d.ts +2 -0
- package/src/numerictextbox/numerictextbox.js +26 -0
- package/src/textarea/textarea.d.ts +2 -0
- package/src/textarea/textarea.js +26 -0
- package/src/uploader/uploader.js +8 -2
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 31.
|
|
3
|
+
* version : 31.2.4
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/ej2-inputs",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.2.4",
|
|
4
4
|
"description": "A package of Essential JS 2 input components such as Textbox, Color-picker, Masked-textbox, Numeric-textbox, Slider, Upload, and Form-validator that is used to get input from the users.",
|
|
5
5
|
"author": "Syncfusion Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN license",
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
"module": "./index.js",
|
|
9
9
|
"es2015": "./dist/es6/ej2-inputs.es5.js",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@syncfusion/ej2-base": "~31.
|
|
12
|
-
"@syncfusion/ej2-buttons": "~31.
|
|
13
|
-
"@syncfusion/ej2-popups": "~31.
|
|
14
|
-
"@syncfusion/ej2-splitbuttons": "~31.
|
|
11
|
+
"@syncfusion/ej2-base": "~31.2.4",
|
|
12
|
+
"@syncfusion/ej2-buttons": "~31.2.3",
|
|
13
|
+
"@syncfusion/ej2-popups": "~31.2.2",
|
|
14
|
+
"@syncfusion/ej2-splitbuttons": "~31.2.2"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {},
|
|
17
17
|
"keywords": [
|
|
@@ -287,6 +287,12 @@ export function maskInputFocusHandler(event) {
|
|
|
287
287
|
if (!this.isClicked) {
|
|
288
288
|
triggerFocus.call(this, eventArgs, inputElement);
|
|
289
289
|
}
|
|
290
|
+
if (this.floatLabelType !== 'Never' && this.inputObj && this.inputObj.container) {
|
|
291
|
+
var label = this.inputObj.container.querySelector('.e-float-text');
|
|
292
|
+
if (label) {
|
|
293
|
+
label.removeAttribute('style');
|
|
294
|
+
}
|
|
295
|
+
}
|
|
290
296
|
if (this.mask) {
|
|
291
297
|
if (!(!(modelValue === null || modelValue === '') || this.floatLabelType === 'Always' ||
|
|
292
298
|
this.placeholder === null || this.placeholder === '')) {
|
|
@@ -388,6 +394,7 @@ export function maskInputBlurHandler(event) {
|
|
|
388
394
|
container: !isNullOrUndefined(this.inputObj) ? this.inputObj.container : this.inputObj
|
|
389
395
|
};
|
|
390
396
|
this.trigger('blur', this.blurEventArgs);
|
|
397
|
+
this.updateFloatLabelOverflowWidth();
|
|
391
398
|
if (this.mask) {
|
|
392
399
|
this.isFocus = false;
|
|
393
400
|
if (this.placeholder && this.element.value === this.promptMask && this.floatLabelType !== 'Always') {
|
|
@@ -255,6 +255,8 @@ export declare class MaskedTextBox extends Component<HTMLInputElement> implement
|
|
|
255
255
|
* @returns {void}
|
|
256
256
|
*/
|
|
257
257
|
focusOut(): void;
|
|
258
|
+
private getRightIconsWidth;
|
|
259
|
+
private updateFloatLabelOverflowWidth;
|
|
258
260
|
/**
|
|
259
261
|
* Removes the component from the DOM and detaches all its related event handlers.
|
|
260
262
|
* Also it maintains the initial input element from the DOM.
|
|
@@ -165,6 +165,7 @@ var MaskedTextBox = /** @class */ (function (_super) {
|
|
|
165
165
|
if (!this.element.hasAttribute('aria-labelledby') && !this.element.hasAttribute('placeholder') && !this.element.hasAttribute('aria-label')) {
|
|
166
166
|
this.element.setAttribute('aria-label', 'maskedtextbox');
|
|
167
167
|
}
|
|
168
|
+
this.updateFloatLabelOverflowWidth();
|
|
168
169
|
this.renderComplete();
|
|
169
170
|
}
|
|
170
171
|
};
|
|
@@ -441,6 +442,24 @@ var MaskedTextBox = /** @class */ (function (_super) {
|
|
|
441
442
|
removeClass([this.inputObj.container], [MASKINPUT_FOCUS]);
|
|
442
443
|
}
|
|
443
444
|
};
|
|
445
|
+
MaskedTextBox.prototype.getRightIconsWidth = function () {
|
|
446
|
+
var container = this.inputObj.container;
|
|
447
|
+
var width = 0;
|
|
448
|
+
var iconSelectors = '.e-input-group-icon, .e-clear-icon';
|
|
449
|
+
var icons = container.querySelectorAll(iconSelectors);
|
|
450
|
+
for (var index = 0; index < icons.length; index++) {
|
|
451
|
+
width += icons[index].offsetWidth;
|
|
452
|
+
}
|
|
453
|
+
return width;
|
|
454
|
+
};
|
|
455
|
+
MaskedTextBox.prototype.updateFloatLabelOverflowWidth = function () {
|
|
456
|
+
var container = this.inputObj.container;
|
|
457
|
+
var label = container.querySelector('.e-float-text-overflow') || container.querySelector('.e-float-text');
|
|
458
|
+
var calculateWidth = (container.clientWidth - this.getRightIconsWidth());
|
|
459
|
+
if (label && calculateWidth) {
|
|
460
|
+
label.style.width = calculateWidth + 'px';
|
|
461
|
+
}
|
|
462
|
+
};
|
|
444
463
|
/**
|
|
445
464
|
* Removes the component from the DOM and detaches all its related event handlers.
|
|
446
465
|
* Also it maintains the initial input element from the DOM.
|
|
@@ -380,6 +380,8 @@ export declare class NumericTextBox extends Component<HTMLInputElement> implemen
|
|
|
380
380
|
onPropertyChanged(newProp: NumericTextBoxModel, oldProp: NumericTextBoxModel): void;
|
|
381
381
|
private updateClearButton;
|
|
382
382
|
private updateSpinButton;
|
|
383
|
+
private getRightIconsWidth;
|
|
384
|
+
private updateFloatLabelOverflowWidth;
|
|
383
385
|
/**
|
|
384
386
|
* Gets the component name
|
|
385
387
|
*
|
|
@@ -165,6 +165,7 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
165
165
|
if (!isNullOrUndefined(closest(this.element, 'fieldset')) && closest(this.element, 'fieldset').disabled) {
|
|
166
166
|
this.enabled = false;
|
|
167
167
|
}
|
|
168
|
+
this.updateFloatLabelOverflowWidth();
|
|
168
169
|
this.renderComplete();
|
|
169
170
|
}
|
|
170
171
|
};
|
|
@@ -948,6 +949,12 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
948
949
|
return;
|
|
949
950
|
}
|
|
950
951
|
this.isFocused = true;
|
|
952
|
+
if (this.floatLabelType !== 'Never' && this.inputWrapper && this.inputWrapper.container) {
|
|
953
|
+
var label = this.inputWrapper.container.querySelector('.e-float-text');
|
|
954
|
+
if (label) {
|
|
955
|
+
label.removeAttribute('style');
|
|
956
|
+
}
|
|
957
|
+
}
|
|
951
958
|
this.prevValue = this.value;
|
|
952
959
|
if ((this.value || this.value === 0)) {
|
|
953
960
|
var formatValue_1 = this.formatNumber();
|
|
@@ -1004,6 +1011,7 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
1004
1011
|
EventHandler.remove(this.element, 'mousewheel DOMMouseScroll', this.mouseWheel);
|
|
1005
1012
|
}
|
|
1006
1013
|
}
|
|
1014
|
+
this.updateFloatLabelOverflowWidth();
|
|
1007
1015
|
var formElement = closest(this.element, 'form');
|
|
1008
1016
|
if (formElement) {
|
|
1009
1017
|
var element = this.element.nextElementSibling;
|
|
@@ -1366,6 +1374,24 @@ var NumericTextBox = /** @class */ (function (_super) {
|
|
|
1366
1374
|
detach(this.spinDown);
|
|
1367
1375
|
}
|
|
1368
1376
|
};
|
|
1377
|
+
NumericTextBox.prototype.getRightIconsWidth = function () {
|
|
1378
|
+
var container = this.inputWrapper.container;
|
|
1379
|
+
var width = 0;
|
|
1380
|
+
var iconSelectors = '.e-input-group-icon, .e-clear-icon';
|
|
1381
|
+
var icons = container.querySelectorAll(iconSelectors);
|
|
1382
|
+
for (var index = 0; index < icons.length; index++) {
|
|
1383
|
+
width += icons[index].offsetWidth;
|
|
1384
|
+
}
|
|
1385
|
+
return width;
|
|
1386
|
+
};
|
|
1387
|
+
NumericTextBox.prototype.updateFloatLabelOverflowWidth = function () {
|
|
1388
|
+
var container = this.inputWrapper.container;
|
|
1389
|
+
var label = container.querySelector('.e-float-text-overflow') || container.querySelector('.e-float-text');
|
|
1390
|
+
var calculateWidth = (container.clientWidth - this.getRightIconsWidth());
|
|
1391
|
+
if (label && calculateWidth) {
|
|
1392
|
+
label.style.width = calculateWidth + 'px';
|
|
1393
|
+
}
|
|
1394
|
+
};
|
|
1369
1395
|
/**
|
|
1370
1396
|
* Gets the component name
|
|
1371
1397
|
*
|
package/src/textarea/textarea.js
CHANGED
|
@@ -275,6 +275,7 @@ var TextArea = /** @class */ (function (_super) {
|
|
|
275
275
|
this.element.defaultValue = this.element.value;
|
|
276
276
|
Input.setWidth(this.width, this.textareaWrapper.container);
|
|
277
277
|
this.setWrapperWidth();
|
|
278
|
+
this.updateFloatLabelOverflowWidth();
|
|
278
279
|
this.renderComplete();
|
|
279
280
|
};
|
|
280
281
|
TextArea.prototype.getModuleName = function () {
|
|
@@ -382,6 +383,12 @@ var TextArea = /** @class */ (function (_super) {
|
|
|
382
383
|
event: args,
|
|
383
384
|
value: this.value
|
|
384
385
|
};
|
|
386
|
+
if (this.floatLabelType !== 'Never' && this.textareaWrapper && this.textareaWrapper.container) {
|
|
387
|
+
var label = this.textareaWrapper.container.querySelector('.e-float-text');
|
|
388
|
+
if (label) {
|
|
389
|
+
label.removeAttribute('style');
|
|
390
|
+
}
|
|
391
|
+
}
|
|
385
392
|
this.trigger('focus', eventArgs);
|
|
386
393
|
};
|
|
387
394
|
TextArea.prototype.focusOutHandler = function (args) {
|
|
@@ -394,6 +401,7 @@ var TextArea = /** @class */ (function (_super) {
|
|
|
394
401
|
event: args,
|
|
395
402
|
value: this.value
|
|
396
403
|
};
|
|
404
|
+
this.updateFloatLabelOverflowWidth();
|
|
397
405
|
this.trigger('blur', eventArgs);
|
|
398
406
|
};
|
|
399
407
|
TextArea.prototype.keydownHandler = function (args) {
|
|
@@ -641,6 +649,24 @@ var TextArea = /** @class */ (function (_super) {
|
|
|
641
649
|
TextArea.prototype.getCurrentResizeClass = function (resizeMode) {
|
|
642
650
|
return resizeMode === 'None' ? RESIZE_NONE : (resizeMode === 'Both' ? RESIZE_XY : resizeMode === 'Horizontal' ? RESIZE_X : RESIZE_Y);
|
|
643
651
|
};
|
|
652
|
+
TextArea.prototype.getRightIconsWidth = function () {
|
|
653
|
+
var container = this.textareaWrapper.container;
|
|
654
|
+
var width = 0;
|
|
655
|
+
var iconSelectors = '.e-input-group-icon, .e-clear-icon';
|
|
656
|
+
var icons = container.querySelectorAll(iconSelectors);
|
|
657
|
+
for (var index = 0; index < icons.length; index++) {
|
|
658
|
+
width += icons[index].offsetWidth;
|
|
659
|
+
}
|
|
660
|
+
return width;
|
|
661
|
+
};
|
|
662
|
+
TextArea.prototype.updateFloatLabelOverflowWidth = function () {
|
|
663
|
+
var container = this.textareaWrapper.container;
|
|
664
|
+
var label = container.querySelector('.e-float-text-overflow') || container.querySelector('.e-float-text');
|
|
665
|
+
var calculateWidth = (container.clientWidth - this.getRightIconsWidth());
|
|
666
|
+
if (label && calculateWidth) {
|
|
667
|
+
label.style.width = calculateWidth + 'px';
|
|
668
|
+
}
|
|
669
|
+
};
|
|
644
670
|
__decorate([
|
|
645
671
|
Property(false)
|
|
646
672
|
], TextArea.prototype, "readonly", void 0);
|
package/src/uploader/uploader.js
CHANGED
|
@@ -1227,6 +1227,12 @@ var Uploader = /** @class */ (function (_super) {
|
|
|
1227
1227
|
if (!this.enabled) {
|
|
1228
1228
|
return;
|
|
1229
1229
|
}
|
|
1230
|
+
if (!this.multiple && this.getFilesData().length > 0) {
|
|
1231
|
+
var selectedFile = this.getSelectedFiles(0);
|
|
1232
|
+
if (selectedFile) {
|
|
1233
|
+
this.remove(selectedFile, false, false, true, null);
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1230
1236
|
var targetFiles;
|
|
1231
1237
|
/* istanbul ignore next */
|
|
1232
1238
|
if (args.type === 'drop') {
|
|
@@ -1981,7 +1987,7 @@ var Uploader = /** @class */ (function (_super) {
|
|
|
1981
1987
|
var progressbarWrapper = this.createElement('span', { className: PROGRESS_WRAPPER });
|
|
1982
1988
|
var progressBar = this.createElement('progressbar', { className: PROGRESSBAR, attrs: { value: '0', max: '100' } });
|
|
1983
1989
|
var progressbarInnerWrapper = this.createElement('span', { className: PROGRESS_INNER_WRAPPER });
|
|
1984
|
-
progressBar.
|
|
1990
|
+
progressBar.style.width = '0%';
|
|
1985
1991
|
var progressbarText = this.createElement('span', { className: PROGRESSBAR_TEXT });
|
|
1986
1992
|
progressbarText.textContent = '0%';
|
|
1987
1993
|
progressbarInnerWrapper.appendChild(progressBar);
|
|
@@ -2004,7 +2010,7 @@ var Uploader = /** @class */ (function (_super) {
|
|
|
2004
2010
|
}
|
|
2005
2011
|
};
|
|
2006
2012
|
Uploader.prototype.changeProgressValue = function (li, progressValue) {
|
|
2007
|
-
li.querySelector('.' + PROGRESSBAR).
|
|
2013
|
+
li.querySelector('.' + PROGRESSBAR).style.width = progressValue;
|
|
2008
2014
|
li.querySelector('.' + PROGRESSBAR_TEXT).textContent = progressValue;
|
|
2009
2015
|
};
|
|
2010
2016
|
Uploader.prototype.uploadInProgress = function (e, files, customUI, request) {
|