@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
|
@@ -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
|
}
|
|
@@ -6531,6 +6542,7 @@ let Slider = class Slider extends Component {
|
|
|
6531
6542
|
case 'tooltip':
|
|
6532
6543
|
if (!isNullOrUndefined(newProp.tooltip) && !isNullOrUndefined(oldProp.tooltip)) {
|
|
6533
6544
|
this.setTooltip(prop);
|
|
6545
|
+
this.wireEvents();
|
|
6534
6546
|
}
|
|
6535
6547
|
break;
|
|
6536
6548
|
case 'type':
|
|
@@ -7812,7 +7824,10 @@ let Uploader = class Uploader extends Component {
|
|
|
7812
7824
|
this.updateDirectoryAttributes();
|
|
7813
7825
|
break;
|
|
7814
7826
|
case 'template':
|
|
7815
|
-
this.
|
|
7827
|
+
const ejInstance = getValue('ej2_instances', this.element);
|
|
7828
|
+
if (!ejInstance[0].isReact) {
|
|
7829
|
+
this.clearAll();
|
|
7830
|
+
}
|
|
7816
7831
|
break;
|
|
7817
7832
|
case 'minFileSize':
|
|
7818
7833
|
case 'maxFileSize':
|
|
@@ -8918,7 +8933,6 @@ let Uploader = class Uploader extends Component {
|
|
|
8918
8933
|
}
|
|
8919
8934
|
else {
|
|
8920
8935
|
this.createFileList(fileData, true);
|
|
8921
|
-
this.filesData = this.filesData.concat(fileData);
|
|
8922
8936
|
if (!this.isForm || this.allowUpload()) {
|
|
8923
8937
|
this.checkAutoUpload(fileData);
|
|
8924
8938
|
}
|
|
@@ -9293,6 +9307,7 @@ let Uploader = class Uploader extends Component {
|
|
|
9293
9307
|
createFileList(fileData, isSelectedFile) {
|
|
9294
9308
|
/* eslint-enable valid-jsdoc, jsdoc/require-param */
|
|
9295
9309
|
this.createParentUL();
|
|
9310
|
+
this.filesData = (isSelectedFile) ? this.filesData.concat(fileData) : fileData;
|
|
9296
9311
|
if (this.template !== '' && !isNullOrUndefined(this.template)) {
|
|
9297
9312
|
if (this.isFormUpload()) {
|
|
9298
9313
|
this.uploadWrapper.classList.add(FORM_UPLOAD);
|
|
@@ -13017,7 +13032,7 @@ let TextBox = class TextBox extends Component {
|
|
|
13017
13032
|
this.updateHTMLAttrToElement();
|
|
13018
13033
|
this.updateHTMLAttrToWrapper();
|
|
13019
13034
|
this.checkAttributes(true);
|
|
13020
|
-
Input.validateInputType(this.textboxWrapper.container, this.element);
|
|
13035
|
+
this.multiline && !isNullOrUndefined(this.textarea) ? Input.validateInputType(this.textboxWrapper.container, this.textarea) : Input.validateInputType(this.textboxWrapper.container, this.element);
|
|
13021
13036
|
}
|
|
13022
13037
|
break;
|
|
13023
13038
|
case 'readonly':
|
|
@@ -13279,7 +13294,7 @@ let TextBox = class TextBox extends Component {
|
|
|
13279
13294
|
if (!isNullOrUndefined(this.htmlAttributes)) {
|
|
13280
13295
|
for (const key of Object.keys(this.htmlAttributes)) {
|
|
13281
13296
|
if (containerAttr.indexOf(key) < 0) {
|
|
13282
|
-
this.element.setAttribute(key, this.htmlAttributes[`${key}`]);
|
|
13297
|
+
this.multiline && !isNullOrUndefined(this.textarea) ? this.textarea.setAttribute(key, this.htmlAttributes[`${key}`]) : this.element.setAttribute(key, this.htmlAttributes[`${key}`]);
|
|
13283
13298
|
}
|
|
13284
13299
|
}
|
|
13285
13300
|
}
|