@syncfusion/ej2-inputs 21.2.4 → 21.2.8
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 +8 -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 -10
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +27 -10
- 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 +7 -7
- package/src/input/input.js +12 -7
- package/src/maskedtextbox/maskedtextbox/maskedtextbox.js +7 -1
- package/src/uploader/uploader.js +8 -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
|
}
|
|
@@ -7982,7 +7993,13 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
|
|
|
7982
7993
|
this.updateDirectoryAttributes();
|
|
7983
7994
|
break;
|
|
7984
7995
|
case 'template':
|
|
7985
|
-
this.
|
|
7996
|
+
var ejInstance = getValue('ej2_instances', this.element);
|
|
7997
|
+
if (ejInstance[0].isReact) {
|
|
7998
|
+
this.reRenderFileList();
|
|
7999
|
+
}
|
|
8000
|
+
else {
|
|
8001
|
+
this.clearAll();
|
|
8002
|
+
}
|
|
7986
8003
|
break;
|
|
7987
8004
|
case 'minFileSize':
|
|
7988
8005
|
case 'maxFileSize':
|
|
@@ -9110,7 +9127,6 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
|
|
|
9110
9127
|
}
|
|
9111
9128
|
else {
|
|
9112
9129
|
this.createFileList(fileData, true);
|
|
9113
|
-
this.filesData = this.filesData.concat(fileData);
|
|
9114
9130
|
if (!this.isForm || this.allowUpload()) {
|
|
9115
9131
|
this.checkAutoUpload(fileData);
|
|
9116
9132
|
}
|
|
@@ -9493,6 +9509,7 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
|
|
|
9493
9509
|
Uploader.prototype.createFileList = function (fileData, isSelectedFile) {
|
|
9494
9510
|
/* eslint-enable valid-jsdoc, jsdoc/require-param */
|
|
9495
9511
|
this.createParentUL();
|
|
9512
|
+
this.filesData = (isSelectedFile) ? this.filesData.concat(fileData) : fileData;
|
|
9496
9513
|
if (this.template !== '' && !isNullOrUndefined(this.template)) {
|
|
9497
9514
|
if (this.isFormUpload()) {
|
|
9498
9515
|
this.uploadWrapper.classList.add(FORM_UPLOAD);
|