@syncfusion/ej2-inputs 21.2.3 → 21.2.6
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 +6 -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 +27 -12
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +27 -12
- 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 +12 -9
- package/src/input/input.js +12 -7
- package/src/maskedtextbox/maskedtextbox/maskedtextbox.js +7 -1
- package/src/slider/slider.js +1 -0
- package/src/textbox/textbox.js +2 -2
- package/src/uploader/uploader.js +5 -2
- package/styles/input/_layout.scss +81 -0
- package/styles/input/material-dark.css +73 -0
- package/styles/input/material.css +73 -0
- package/styles/material-dark.css +73 -0
- package/styles/material.css +73 -0
|
@@ -239,11 +239,13 @@ var Input;
|
|
|
239
239
|
return inputObject;
|
|
240
240
|
}
|
|
241
241
|
function updateIconState(value, button, readonly) {
|
|
242
|
-
if (
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
242
|
+
if (!isNullOrUndefined(button)) {
|
|
243
|
+
if (value && !readonly) {
|
|
244
|
+
removeClass([button], CLASSNAMES.CLEARICONHIDE);
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
addClass([button], CLASSNAMES.CLEARICONHIDE);
|
|
248
|
+
}
|
|
247
249
|
}
|
|
248
250
|
}
|
|
249
251
|
function updateLabelState(value, label, element) {
|
|
@@ -298,7 +300,7 @@ var Input;
|
|
|
298
300
|
}
|
|
299
301
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
300
302
|
function wireClearBtnEvents(element, button, container) {
|
|
301
|
-
if (isBindClearAction === undefined || isBindClearAction) {
|
|
303
|
+
if (!isNullOrUndefined(button) && (isBindClearAction === undefined || isBindClearAction)) {
|
|
302
304
|
button.addEventListener('click', function (event) {
|
|
303
305
|
if (!(element.classList.contains(CLASSNAMES.DISABLE) || element.readOnly)) {
|
|
304
306
|
event.preventDefault();
|
|
@@ -321,7 +323,10 @@ var Input;
|
|
|
321
323
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
322
324
|
element.addEventListener('blur', function (event) {
|
|
323
325
|
setTimeout(function () {
|
|
324
|
-
|
|
326
|
+
if (!isNullOrUndefined(button)) {
|
|
327
|
+
addClass([button], CLASSNAMES.CLEARICONHIDE);
|
|
328
|
+
button = !isNullOrUndefined(element) && element.classList.contains('e-combobox') ? null : button;
|
|
329
|
+
}
|
|
325
330
|
}, 200);
|
|
326
331
|
});
|
|
327
332
|
}
|
|
@@ -3752,9 +3757,13 @@ var MaskedTextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
3752
3757
|
switch (prop) {
|
|
3753
3758
|
case 'value':
|
|
3754
3759
|
setMaskValue.call(this, this.value);
|
|
3755
|
-
if (this.placeholder) {
|
|
3760
|
+
if (this.placeholder && !this.isFocus) {
|
|
3756
3761
|
this.setMaskPlaceholder(false, false);
|
|
3757
3762
|
}
|
|
3763
|
+
if (this.value === "") {
|
|
3764
|
+
this.element.selectionStart = 0;
|
|
3765
|
+
this.element.selectionEnd = 0;
|
|
3766
|
+
}
|
|
3758
3767
|
break;
|
|
3759
3768
|
case 'placeholder':
|
|
3760
3769
|
this.setMaskPlaceholder(true, true);
|
|
@@ -3848,6 +3857,7 @@ var MaskedTextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
3848
3857
|
*/
|
|
3849
3858
|
MaskedTextBox.prototype.focusIn = function () {
|
|
3850
3859
|
if (document.activeElement !== this.element && this.enabled) {
|
|
3860
|
+
this.isFocus = true;
|
|
3851
3861
|
this.element.focus();
|
|
3852
3862
|
addClass([this.inputObj.container], [MASKINPUT_FOCUS]);
|
|
3853
3863
|
}
|
|
@@ -3859,6 +3869,7 @@ var MaskedTextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
3859
3869
|
*/
|
|
3860
3870
|
MaskedTextBox.prototype.focusOut = function () {
|
|
3861
3871
|
if (document.activeElement === this.element && this.enabled) {
|
|
3872
|
+
this.isFocus = false;
|
|
3862
3873
|
this.element.blur();
|
|
3863
3874
|
removeClass([this.inputObj.container], [MASKINPUT_FOCUS]);
|
|
3864
3875
|
}
|
|
@@ -6640,6 +6651,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
6640
6651
|
case 'tooltip':
|
|
6641
6652
|
if (!isNullOrUndefined(newProp.tooltip) && !isNullOrUndefined(oldProp.tooltip)) {
|
|
6642
6653
|
this.setTooltip(prop);
|
|
6654
|
+
this.wireEvents();
|
|
6643
6655
|
}
|
|
6644
6656
|
break;
|
|
6645
6657
|
case 'type':
|
|
@@ -7981,7 +7993,10 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
|
|
|
7981
7993
|
this.updateDirectoryAttributes();
|
|
7982
7994
|
break;
|
|
7983
7995
|
case 'template':
|
|
7984
|
-
this.
|
|
7996
|
+
var ejInstance = getValue('ej2_instances', this.element);
|
|
7997
|
+
if (!ejInstance[0].isReact) {
|
|
7998
|
+
this.clearAll();
|
|
7999
|
+
}
|
|
7985
8000
|
break;
|
|
7986
8001
|
case 'minFileSize':
|
|
7987
8002
|
case 'maxFileSize':
|
|
@@ -9109,7 +9124,6 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
|
|
|
9109
9124
|
}
|
|
9110
9125
|
else {
|
|
9111
9126
|
this.createFileList(fileData, true);
|
|
9112
|
-
this.filesData = this.filesData.concat(fileData);
|
|
9113
9127
|
if (!this.isForm || this.allowUpload()) {
|
|
9114
9128
|
this.checkAutoUpload(fileData);
|
|
9115
9129
|
}
|
|
@@ -9492,6 +9506,7 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
|
|
|
9492
9506
|
Uploader.prototype.createFileList = function (fileData, isSelectedFile) {
|
|
9493
9507
|
/* eslint-enable valid-jsdoc, jsdoc/require-param */
|
|
9494
9508
|
this.createParentUL();
|
|
9509
|
+
this.filesData = (isSelectedFile) ? this.filesData.concat(fileData) : fileData;
|
|
9495
9510
|
if (this.template !== '' && !isNullOrUndefined(this.template)) {
|
|
9496
9511
|
if (this.isFormUpload()) {
|
|
9497
9512
|
this.uploadWrapper.classList.add(FORM_UPLOAD);
|
|
@@ -13291,7 +13306,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
13291
13306
|
this.updateHTMLAttrToElement();
|
|
13292
13307
|
this.updateHTMLAttrToWrapper();
|
|
13293
13308
|
this.checkAttributes(true);
|
|
13294
|
-
Input.validateInputType(this.textboxWrapper.container, this.element);
|
|
13309
|
+
this.multiline && !isNullOrUndefined(this.textarea) ? Input.validateInputType(this.textboxWrapper.container, this.textarea) : Input.validateInputType(this.textboxWrapper.container, this.element);
|
|
13295
13310
|
}
|
|
13296
13311
|
break;
|
|
13297
13312
|
case 'readonly':
|
|
@@ -13556,7 +13571,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
13556
13571
|
for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
|
|
13557
13572
|
var key = _a[_i];
|
|
13558
13573
|
if (containerAttr.indexOf(key) < 0) {
|
|
13559
|
-
this.element.setAttribute(key, this.htmlAttributes["" + key]);
|
|
13574
|
+
this.multiline && !isNullOrUndefined(this.textarea) ? this.textarea.setAttribute(key, this.htmlAttributes["" + key]) : this.element.setAttribute(key, this.htmlAttributes["" + key]);
|
|
13560
13575
|
}
|
|
13561
13576
|
}
|
|
13562
13577
|
}
|