@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
|
@@ -238,11 +238,13 @@ var Input;
|
|
|
238
238
|
return inputObject;
|
|
239
239
|
}
|
|
240
240
|
function updateIconState(value, button, readonly) {
|
|
241
|
-
if (
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
241
|
+
if (!isNullOrUndefined(button)) {
|
|
242
|
+
if (value && !readonly) {
|
|
243
|
+
removeClass([button], CLASSNAMES.CLEARICONHIDE);
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
addClass([button], CLASSNAMES.CLEARICONHIDE);
|
|
247
|
+
}
|
|
246
248
|
}
|
|
247
249
|
}
|
|
248
250
|
function updateLabelState(value, label, element = null) {
|
|
@@ -296,7 +298,7 @@ var Input;
|
|
|
296
298
|
}
|
|
297
299
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
298
300
|
function wireClearBtnEvents(element, button, container) {
|
|
299
|
-
if (isBindClearAction === undefined || isBindClearAction) {
|
|
301
|
+
if (!isNullOrUndefined(button) && (isBindClearAction === undefined || isBindClearAction)) {
|
|
300
302
|
button.addEventListener('click', (event) => {
|
|
301
303
|
if (!(element.classList.contains(CLASSNAMES.DISABLE) || element.readOnly)) {
|
|
302
304
|
event.preventDefault();
|
|
@@ -319,7 +321,10 @@ var Input;
|
|
|
319
321
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
320
322
|
element.addEventListener('blur', (event) => {
|
|
321
323
|
setTimeout(() => {
|
|
322
|
-
|
|
324
|
+
if (!isNullOrUndefined(button)) {
|
|
325
|
+
addClass([button], CLASSNAMES.CLEARICONHIDE);
|
|
326
|
+
button = !isNullOrUndefined(element) && element.classList.contains('e-combobox') ? null : button;
|
|
327
|
+
}
|
|
323
328
|
}, 200);
|
|
324
329
|
});
|
|
325
330
|
}
|
|
@@ -3692,9 +3697,13 @@ let MaskedTextBox = class MaskedTextBox extends Component {
|
|
|
3692
3697
|
switch (prop) {
|
|
3693
3698
|
case 'value':
|
|
3694
3699
|
setMaskValue.call(this, this.value);
|
|
3695
|
-
if (this.placeholder) {
|
|
3700
|
+
if (this.placeholder && !this.isFocus) {
|
|
3696
3701
|
this.setMaskPlaceholder(false, false);
|
|
3697
3702
|
}
|
|
3703
|
+
if (this.value === "") {
|
|
3704
|
+
this.element.selectionStart = 0;
|
|
3705
|
+
this.element.selectionEnd = 0;
|
|
3706
|
+
}
|
|
3698
3707
|
break;
|
|
3699
3708
|
case 'placeholder':
|
|
3700
3709
|
this.setMaskPlaceholder(true, true);
|
|
@@ -3788,6 +3797,7 @@ let MaskedTextBox = class MaskedTextBox extends Component {
|
|
|
3788
3797
|
*/
|
|
3789
3798
|
focusIn() {
|
|
3790
3799
|
if (document.activeElement !== this.element && this.enabled) {
|
|
3800
|
+
this.isFocus = true;
|
|
3791
3801
|
this.element.focus();
|
|
3792
3802
|
addClass([this.inputObj.container], [MASKINPUT_FOCUS]);
|
|
3793
3803
|
}
|
|
@@ -3799,6 +3809,7 @@ let MaskedTextBox = class MaskedTextBox extends Component {
|
|
|
3799
3809
|
*/
|
|
3800
3810
|
focusOut() {
|
|
3801
3811
|
if (document.activeElement === this.element && this.enabled) {
|
|
3812
|
+
this.isFocus = false;
|
|
3802
3813
|
this.element.blur();
|
|
3803
3814
|
removeClass([this.inputObj.container], [MASKINPUT_FOCUS]);
|
|
3804
3815
|
}
|
|
@@ -7813,7 +7824,13 @@ let Uploader = class Uploader extends Component {
|
|
|
7813
7824
|
this.updateDirectoryAttributes();
|
|
7814
7825
|
break;
|
|
7815
7826
|
case 'template':
|
|
7816
|
-
this.
|
|
7827
|
+
const ejInstance = getValue('ej2_instances', this.element);
|
|
7828
|
+
if (ejInstance[0].isReact) {
|
|
7829
|
+
this.reRenderFileList();
|
|
7830
|
+
}
|
|
7831
|
+
else {
|
|
7832
|
+
this.clearAll();
|
|
7833
|
+
}
|
|
7817
7834
|
break;
|
|
7818
7835
|
case 'minFileSize':
|
|
7819
7836
|
case 'maxFileSize':
|
|
@@ -8919,7 +8936,6 @@ let Uploader = class Uploader extends Component {
|
|
|
8919
8936
|
}
|
|
8920
8937
|
else {
|
|
8921
8938
|
this.createFileList(fileData, true);
|
|
8922
|
-
this.filesData = this.filesData.concat(fileData);
|
|
8923
8939
|
if (!this.isForm || this.allowUpload()) {
|
|
8924
8940
|
this.checkAutoUpload(fileData);
|
|
8925
8941
|
}
|
|
@@ -9294,6 +9310,7 @@ let Uploader = class Uploader extends Component {
|
|
|
9294
9310
|
createFileList(fileData, isSelectedFile) {
|
|
9295
9311
|
/* eslint-enable valid-jsdoc, jsdoc/require-param */
|
|
9296
9312
|
this.createParentUL();
|
|
9313
|
+
this.filesData = (isSelectedFile) ? this.filesData.concat(fileData) : fileData;
|
|
9297
9314
|
if (this.template !== '' && !isNullOrUndefined(this.template)) {
|
|
9298
9315
|
if (this.isFormUpload()) {
|
|
9299
9316
|
this.uploadWrapper.classList.add(FORM_UPLOAD);
|