@syncfusion/ej2-inputs 33.1.44 → 33.1.49

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.
@@ -2378,7 +2378,9 @@ let NumericTextBox = class NumericTextBox extends Component {
2378
2378
  floatLabelType: this.floatLabelType,
2379
2379
  properties: this.properties
2380
2380
  }, this.clearButton);
2381
- setValue('ej2_instances', null, this.element);
2381
+ if (this.element.tagName === 'EJS-NUMERICTEXTBOX') {
2382
+ setValue('ej2_instances', null, this.element);
2383
+ }
2382
2384
  super.destroy();
2383
2385
  }
2384
2386
  /**
@@ -4154,13 +4156,15 @@ let MaskedTextBox = class MaskedTextBox extends Component {
4154
4156
  for (const prop of Object.keys(newProp)) {
4155
4157
  switch (prop) {
4156
4158
  case 'value':
4157
- setMaskValue.call(this, this.value);
4158
- if (this.placeholder && !this.isFocus) {
4159
- this.setMaskPlaceholder(false, false);
4160
- }
4161
- if (this.value === '' && oldProp.value != null) {
4162
- this.element.selectionStart = 0;
4163
- this.element.selectionEnd = 0;
4159
+ if (newProp.value !== oldProp.value) {
4160
+ setMaskValue.call(this, this.value);
4161
+ if (this.placeholder && !this.isFocus) {
4162
+ this.setMaskPlaceholder(false, false);
4163
+ }
4164
+ if (this.value === '' && oldProp.value != null) {
4165
+ this.element.selectionStart = 0;
4166
+ this.element.selectionEnd = 0;
4167
+ }
4164
4168
  }
4165
4169
  break;
4166
4170
  case 'placeholder':
@@ -4421,7 +4425,9 @@ let MaskedTextBox = class MaskedTextBox extends Component {
4421
4425
  }, this.clearButton);
4422
4426
  this.changeEventArgs = null;
4423
4427
  this.inputObj = null;
4424
- setValue('ej2_instances', null, this.element);
4428
+ if (this.element.tagName === 'EJS-MASKEDTEXTBOX') {
4429
+ setValue('ej2_instances', null, this.element);
4430
+ }
4425
4431
  super.destroy();
4426
4432
  }
4427
4433
  };
@@ -8788,7 +8794,12 @@ let Uploader = class Uploader extends Component {
8788
8794
  }
8789
8795
  }
8790
8796
  if (isNullOrUndefined(this.element.getAttribute('name'))) {
8791
- this.element.setAttribute('name', this.element.getAttribute('id'));
8797
+ if (!isNullOrUndefined(this.element.getAttribute('id')) && this.element.getAttribute('id') !== '') {
8798
+ this.element.setAttribute('name', this.element.getAttribute('id'));
8799
+ }
8800
+ else {
8801
+ this.element.setAttribute('name', 'UploadFiles');
8802
+ }
8792
8803
  }
8793
8804
  if (!this.element.hasAttribute('type')) {
8794
8805
  this.element.setAttribute('type', 'file');
@@ -11440,7 +11451,9 @@ let Uploader = class Uploader extends Component {
11440
11451
  this.keyboardModule = null;
11441
11452
  this.clearButton = null;
11442
11453
  this.uploadButton = null;
11443
- setValue('ej2_instances', null, this.element);
11454
+ if (this.element.tagName === 'EJS-UPLOADER') {
11455
+ setValue('ej2_instances', null, this.element);
11456
+ }
11444
11457
  super.destroy();
11445
11458
  }
11446
11459
  /**
@@ -14209,10 +14222,13 @@ let TextBox = class TextBox extends Component {
14209
14222
  Input.updateCssClass(newProp.cssClass, oldProp.cssClass, this.textboxWrapper.container);
14210
14223
  break;
14211
14224
  case 'locale':
14212
- this.globalize = new Internationalization(this.locale);
14213
- this.l10n.setLocale(this.locale);
14214
- this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);
14215
- Input.setPlaceholder(this.placeholder, this.respectiveElement);
14225
+ {
14226
+ this.globalize = new Internationalization(this.locale);
14227
+ this.l10n.setLocale(this.locale);
14228
+ const currentPlaceholder = (this.l10n.getConstant('placeholder') === '' ? this.placeholder : this.l10n.getConstant('placeholder'));
14229
+ this.setProperties({ placeholder: currentPlaceholder }, true);
14230
+ Input.setPlaceholder(this.placeholder, this.respectiveElement);
14231
+ }
14216
14232
  break;
14217
14233
  case 'prependTemplate':
14218
14234
  this.updatePrependTemplate();
@@ -14757,7 +14773,9 @@ let TextBox = class TextBox extends Component {
14757
14773
  floatLabelType: this.floatLabelType,
14758
14774
  properties: this.properties
14759
14775
  }, this.clearButton);
14760
- setValue('ej2_instances', null, this.element);
14776
+ if (this.element.tagName === 'EJS-TEXTBOX') {
14777
+ setValue('ej2_instances', null, this.element);
14778
+ }
14761
14779
  super.destroy();
14762
14780
  }
14763
14781
  /**
@@ -15459,7 +15477,9 @@ let TextArea = class TextArea extends Component {
15459
15477
  properties: this.properties
15460
15478
  }, this.clearButton);
15461
15479
  this.formElement = null;
15462
- setValue('ej2_instances', null, this.element);
15480
+ if (this.element.tagName === 'EJS-TEXTAREA' || this.element.tagName === 'EJS-SMARTTEXTAREA') {
15481
+ setValue('ej2_instances', null, this.element);
15482
+ }
15463
15483
  super.destroy();
15464
15484
  }
15465
15485
  focusHandler(args) {