@syncfusion/ej2-inputs 24.2.9 → 25.1.35-579988

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.
Files changed (179) hide show
  1. package/CHANGELOG.md +0 -38
  2. package/dist/ej2-inputs.min.js +2 -2
  3. package/dist/ej2-inputs.umd.min.js +2 -2
  4. package/dist/ej2-inputs.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-inputs.es2015.js +1095 -271
  6. package/dist/es6/ej2-inputs.es2015.js.map +1 -1
  7. package/dist/es6/ej2-inputs.es5.js +1121 -276
  8. package/dist/es6/ej2-inputs.es5.js.map +1 -1
  9. package/dist/global/ej2-inputs.min.js +2 -2
  10. package/dist/global/ej2-inputs.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +10 -10
  13. package/src/common/signature-base.d.ts +1 -0
  14. package/src/common/signature-base.js +4 -3
  15. package/src/index.d.ts +1 -0
  16. package/src/index.js +1 -0
  17. package/src/input/input.d.ts +18 -1
  18. package/src/input/input.js +234 -69
  19. package/src/maskedtextbox/base/mask-base.js +1 -0
  20. package/src/maskedtextbox/maskedtextbox/maskedtextbox.d.ts +1 -0
  21. package/src/maskedtextbox/maskedtextbox/maskedtextbox.js +8 -1
  22. package/src/numerictextbox/numerictextbox.d.ts +1 -0
  23. package/src/numerictextbox/numerictextbox.js +8 -1
  24. package/src/rating/rating.js +1 -0
  25. package/src/signature/signature.js +2 -0
  26. package/src/slider/slider-model.d.ts +3 -2
  27. package/src/slider/slider.d.ts +3 -2
  28. package/src/slider/slider.js +1 -1
  29. package/src/textarea/index.d.ts +5 -0
  30. package/src/textarea/index.js +4 -0
  31. package/src/textarea/textarea-model.d.ts +155 -0
  32. package/src/textarea/textarea.d.ts +231 -0
  33. package/src/textarea/textarea.js +696 -0
  34. package/src/textbox/textbox-model.d.ts +1 -1
  35. package/src/textbox/textbox.d.ts +3 -5
  36. package/src/textbox/textbox.js +21 -57
  37. package/styles/bootstrap-dark.css +69 -8
  38. package/styles/bootstrap-dark.scss +1 -0
  39. package/styles/bootstrap.css +69 -8
  40. package/styles/bootstrap.scss +1 -0
  41. package/styles/bootstrap4.css +69 -8
  42. package/styles/bootstrap4.scss +1 -0
  43. package/styles/bootstrap5-dark.css +69 -8
  44. package/styles/bootstrap5-dark.scss +1 -0
  45. package/styles/bootstrap5.css +69 -8
  46. package/styles/bootstrap5.scss +1 -0
  47. package/styles/color-picker/_bds-definition.scss +133 -0
  48. package/styles/color-picker/icons/_bds.scss +9 -0
  49. package/styles/data-form/_bds-definition.scss +41 -0
  50. package/styles/data-form/_layout.scss +3 -3
  51. package/styles/data-form/bootstrap-dark.css +8 -8
  52. package/styles/data-form/bootstrap.css +8 -8
  53. package/styles/data-form/bootstrap4.css +8 -8
  54. package/styles/data-form/bootstrap5-dark.css +8 -8
  55. package/styles/data-form/bootstrap5.css +8 -8
  56. package/styles/data-form/fabric-dark.css +8 -8
  57. package/styles/data-form/fabric.css +8 -8
  58. package/styles/data-form/fluent-dark.css +8 -8
  59. package/styles/data-form/fluent.css +8 -8
  60. package/styles/data-form/highcontrast-light.css +8 -8
  61. package/styles/data-form/highcontrast.css +8 -8
  62. package/styles/data-form/material-dark.css +8 -8
  63. package/styles/data-form/material.css +8 -8
  64. package/styles/data-form/material3-dark.css +8 -8
  65. package/styles/data-form/material3.css +8 -8
  66. package/styles/data-form/tailwind-dark.css +8 -8
  67. package/styles/data-form/tailwind.css +8 -8
  68. package/styles/fabric-dark.css +69 -8
  69. package/styles/fabric-dark.scss +1 -0
  70. package/styles/fabric.css +69 -8
  71. package/styles/fabric.scss +1 -0
  72. package/styles/fluent-dark.css +69 -8
  73. package/styles/fluent-dark.scss +1 -0
  74. package/styles/fluent.css +69 -8
  75. package/styles/fluent.scss +1 -0
  76. package/styles/highcontrast-light.css +69 -8
  77. package/styles/highcontrast-light.scss +1 -0
  78. package/styles/highcontrast.css +69 -8
  79. package/styles/highcontrast.scss +1 -0
  80. package/styles/input/_bds-definition.scss +482 -0
  81. package/styles/input/icons/_bds.scss +17 -0
  82. package/styles/maskedtextbox/_bds-definition.scss +7 -0
  83. package/styles/material-dark.css +75 -8
  84. package/styles/material-dark.scss +1 -0
  85. package/styles/material.css +83 -8
  86. package/styles/material.scss +1 -0
  87. package/styles/material3-dark.css +83 -8
  88. package/styles/material3-dark.scss +1 -0
  89. package/styles/material3.css +83 -8
  90. package/styles/material3.scss +1 -0
  91. package/styles/numerictextbox/_bds-definition.scss +3 -0
  92. package/styles/numerictextbox/icons/_bds.scss +11 -0
  93. package/styles/rating/_bds-definition.scss +47 -0
  94. package/styles/signature/_bds-definition.scss +3 -0
  95. package/styles/slider/_bds-definition.scss +88 -0
  96. package/styles/tailwind-dark.css +69 -8
  97. package/styles/tailwind-dark.scss +1 -0
  98. package/styles/tailwind.css +69 -8
  99. package/styles/tailwind.scss +1 -0
  100. package/styles/textarea/_all.scss +1 -0
  101. package/styles/textarea/_bds-definition.scss +1 -0
  102. package/styles/textarea/_bootstrap-dark-definition.scss +1 -0
  103. package/styles/textarea/_bootstrap-definition.scss +1 -0
  104. package/styles/textarea/_bootstrap4-definition.scss +1 -0
  105. package/styles/textarea/_bootstrap5-dark-definition.scss +1 -0
  106. package/styles/textarea/_bootstrap5-definition.scss +1 -0
  107. package/styles/textarea/_fabric-dark-definition.scss +1 -0
  108. package/styles/textarea/_fabric-definition.scss +1 -0
  109. package/styles/textarea/_fluent-dark-definition.scss +1 -0
  110. package/styles/textarea/_fluent-definition.scss +1 -0
  111. package/styles/textarea/_fusionnew-definition.scss +1 -0
  112. package/styles/textarea/_highcontrast-definition.scss +1 -0
  113. package/styles/textarea/_highcontrast-light-definition.scss +1 -0
  114. package/styles/textarea/_layout.scss +36 -0
  115. package/styles/textarea/_material-dark-definition.scss +1 -0
  116. package/styles/textarea/_material-definition.scss +1 -0
  117. package/styles/textarea/_material3-dark-definition.scss +1 -0
  118. package/styles/textarea/_material3-definition.scss +1 -0
  119. package/styles/textarea/_tailwind-dark-definition.scss +1 -0
  120. package/styles/textarea/_tailwind-definition.scss +1 -0
  121. package/styles/textarea/_theme.scss +1 -0
  122. package/styles/textarea/bootstrap-dark.css +33 -0
  123. package/styles/textarea/bootstrap-dark.scss +5 -0
  124. package/styles/textarea/bootstrap.css +33 -0
  125. package/styles/textarea/bootstrap.scss +5 -0
  126. package/styles/textarea/bootstrap4.css +33 -0
  127. package/styles/textarea/bootstrap4.scss +5 -0
  128. package/styles/textarea/bootstrap5-dark.css +33 -0
  129. package/styles/textarea/bootstrap5-dark.scss +5 -0
  130. package/styles/textarea/bootstrap5.css +33 -0
  131. package/styles/textarea/bootstrap5.scss +5 -0
  132. package/styles/textarea/fabric-dark.css +33 -0
  133. package/styles/textarea/fabric-dark.scss +5 -0
  134. package/styles/textarea/fabric.css +33 -0
  135. package/styles/textarea/fabric.scss +5 -0
  136. package/styles/textarea/fluent-dark.css +33 -0
  137. package/styles/textarea/fluent-dark.scss +5 -0
  138. package/styles/textarea/fluent.css +33 -0
  139. package/styles/textarea/fluent.scss +5 -0
  140. package/styles/textarea/highcontrast-light.css +33 -0
  141. package/styles/textarea/highcontrast-light.scss +5 -0
  142. package/styles/textarea/highcontrast.css +33 -0
  143. package/styles/textarea/highcontrast.scss +5 -0
  144. package/styles/textarea/material-dark.css +39 -0
  145. package/styles/textarea/material-dark.scss +5 -0
  146. package/styles/textarea/material.css +47 -0
  147. package/styles/textarea/material.scss +5 -0
  148. package/styles/textarea/material3-dark.css +102 -0
  149. package/styles/textarea/material3-dark.scss +6 -0
  150. package/styles/textarea/material3.css +158 -0
  151. package/styles/textarea/material3.scss +6 -0
  152. package/styles/textarea/tailwind-dark.css +33 -0
  153. package/styles/textarea/tailwind-dark.scss +5 -0
  154. package/styles/textarea/tailwind.css +33 -0
  155. package/styles/textarea/tailwind.scss +5 -0
  156. package/styles/textbox/_all.scss +1 -1
  157. package/styles/textbox/_bds-definition.scss +4 -0
  158. package/styles/textbox/_layout.scss +0 -11
  159. package/styles/textbox/bootstrap-dark.css +27 -1
  160. package/styles/textbox/bootstrap.css +27 -1
  161. package/styles/textbox/bootstrap4.css +27 -1
  162. package/styles/textbox/bootstrap5-dark.css +27 -1
  163. package/styles/textbox/bootstrap5.css +27 -1
  164. package/styles/textbox/fabric-dark.css +27 -1
  165. package/styles/textbox/fabric.css +27 -1
  166. package/styles/textbox/fluent-dark.css +27 -1
  167. package/styles/textbox/fluent.css +27 -1
  168. package/styles/textbox/highcontrast-light.css +27 -1
  169. package/styles/textbox/highcontrast.css +27 -1
  170. package/styles/textbox/material-dark.css +27 -1
  171. package/styles/textbox/material.css +27 -1
  172. package/styles/textbox/material3-dark.css +27 -1
  173. package/styles/textbox/material3.css +27 -1
  174. package/styles/textbox/tailwind-dark.css +27 -1
  175. package/styles/textbox/tailwind.css +27 -1
  176. package/styles/uploader/_bds-definition.scss +232 -0
  177. package/styles/uploader/icons/_bds.scss +34 -0
  178. package/textarea.d.ts +4 -0
  179. package/textarea.js +4 -0
@@ -21,6 +21,14 @@ var CLASSNAMES = {
21
21
  INPUTCUSTOMTAG: 'e-input-custom-tag',
22
22
  FLOATCUSTOMTAG: 'e-float-custom-tag'
23
23
  };
24
+ /**
25
+ * Defines the constant attributes for the input element container.
26
+ */
27
+ var containerAttributes = ['title', 'style', 'class'];
28
+ /**
29
+ * Defines the constant focus class for the input element.
30
+ */
31
+ var TEXTBOX_FOCUS = 'e-input-focus';
24
32
  /**
25
33
  * Base for Input creation through util methods.
26
34
  */
@@ -37,6 +45,7 @@ var Input;
37
45
  *
38
46
  */
39
47
  function createInput(args, internalCreateElement) {
48
+ args.element.__eventHandlers = {};
40
49
  var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;
41
50
  var inputObject = { container: null, buttons: [], clearButton: null };
42
51
  floatType = args.floatLabelType;
@@ -74,37 +83,64 @@ var Input;
74
83
  return inputObject;
75
84
  }
76
85
  Input.createInput = createInput;
86
+ function bindFocusEventHandler(args) {
87
+ var parent = getParentNode(args.element);
88
+ if (parent.classList.contains('e-input-group') || parent.classList.contains('e-outline') || parent.classList.contains('e-filled')) {
89
+ parent.classList.add('e-input-focus');
90
+ }
91
+ if (args.floatLabelType === 'Auto') {
92
+ setTimeout(function () {
93
+ Input.calculateWidth(args.element, parent);
94
+ }, 80);
95
+ }
96
+ }
97
+ function bindBlurEventHandler(args) {
98
+ var parent = getParentNode(args.element);
99
+ if (parent.classList.contains('e-input-group') || parent.classList.contains('e-outline') || parent.classList.contains('e-filled')) {
100
+ parent.classList.remove('e-input-focus');
101
+ }
102
+ if (args.floatLabelType === 'Auto' && args.element.value === '') {
103
+ setTimeout(function () {
104
+ Input.calculateWidth(args.element, parent);
105
+ }, 80);
106
+ }
107
+ }
108
+ function bindInputEventHandler(args) {
109
+ checkInputValue(args.floatLabelType, args.element);
110
+ }
77
111
  function bindInitialEvent(args) {
78
112
  checkInputValue(args.floatLabelType, args.element);
79
- args.element.addEventListener('focus', function () {
80
- var parent = getParentNode(this);
81
- if (parent.classList.contains('e-input-group') || parent.classList.contains('e-outline')
82
- || parent.classList.contains('e-filled')) {
83
- parent.classList.add('e-input-focus');
84
- }
85
- if (args.floatLabelType === 'Auto') {
86
- setTimeout(function () {
87
- Input.calculateWidth(args.element, parent);
88
- }, 80);
89
- }
90
- });
91
- args.element.addEventListener('blur', function () {
92
- var parent = getParentNode(this);
93
- if (parent.classList.contains('e-input-group') || parent.classList.contains('e-outline')
94
- || parent.classList.contains('e-filled')) {
95
- parent.classList.remove('e-input-focus');
96
- }
97
- if (args.floatLabelType === 'Auto' && args.element.value === '') {
98
- setTimeout(function () {
99
- Input.calculateWidth(args.element, parent);
100
- }, 80);
101
- }
102
- });
103
- args.element.addEventListener('input', function () {
104
- checkInputValue(floatType, args.element);
105
- });
113
+ var focusHandler = function () { return bindFocusEventHandler(args); };
114
+ var blurHandler = function () { return bindBlurEventHandler(args); };
115
+ var inputHandler = function () { return bindInputEventHandler(args); };
116
+ args.element.addEventListener('focus', focusHandler);
117
+ args.element.addEventListener('blur', blurHandler);
118
+ args.element.addEventListener('input', inputHandler);
119
+ args.element.__eventHandlers["inputFocusHandler"] = { focusHandler: focusHandler };
120
+ args.element.__eventHandlers["inputBlurHandler"] = { blurHandler: blurHandler };
121
+ args.element.__eventHandlers["inputHandler"] = { inputHandler: inputHandler };
106
122
  }
107
123
  Input.bindInitialEvent = bindInitialEvent;
124
+ function unbindInitialEvent(args) {
125
+ if (!isNullOrUndefined(args.element)) {
126
+ if (!isNullOrUndefined(args.element.__eventHandlers)) {
127
+ if (!isNullOrUndefined(args.element.__eventHandlers["inputFocusHandler"])
128
+ && !isNullOrUndefined(args.element.__eventHandlers["inputBlurHandler"])
129
+ && !isNullOrUndefined(args.element.__eventHandlers["inputHandler"])) {
130
+ var focusHandler_1 = args.element.__eventHandlers["inputFocusHandler"].focusHandler;
131
+ var blurHandler_1 = args.element.__eventHandlers["inputBlurHandler"].blurHandler;
132
+ var inputHandler_1 = args.element.__eventHandlers["inputHandler"].inputHandler;
133
+ args.element.removeEventListener('focus', focusHandler_1);
134
+ args.element.removeEventListener('blur', blurHandler_1);
135
+ args.element.removeEventListener('input', inputHandler_1);
136
+ // Clean up stored bound functions
137
+ delete args.element.__eventHandlers["inputFocusHandler"];
138
+ delete args.element.__eventHandlers["inputBlurHandler"];
139
+ delete args.element.__eventHandlers["inputHandler"];
140
+ }
141
+ }
142
+ }
143
+ }
108
144
  function checkInputValue(floatLabelType, inputElement) {
109
145
  var inputValue = inputElement.value;
110
146
  var inputParent = inputElement.parentElement;
@@ -154,8 +190,16 @@ var Input;
154
190
  }
155
191
  Input.wireFloatingEvents = wireFloatingEvents;
156
192
  function unwireFloatingEvents(element) {
157
- element.removeEventListener('focus', _focusFn);
158
- element.removeEventListener('blur', _blurFn);
193
+ if (!isNullOrUndefined(element)) {
194
+ element.removeEventListener('focus', _focusFn);
195
+ element.removeEventListener('blur', _blurFn);
196
+ }
197
+ }
198
+ function inputEventHandler(args) {
199
+ validateLabel(args.element, args.floatLabelType);
200
+ }
201
+ function blurEventHandler(args) {
202
+ validateLabel(args.element, args.floatLabelType);
159
203
  }
160
204
  function createFloatingInput(args, inputObject, internalCreateElement) {
161
205
  var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;
@@ -211,19 +255,36 @@ var Input;
211
255
  addClass([floatLabelElement], CLASSNAMES.LABELTOP);
212
256
  }
213
257
  if (args.floatLabelType === 'Auto') {
214
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
215
- args.element.addEventListener('input', function (event) {
216
- validateLabel(args.element, args.floatLabelType);
217
- });
218
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
219
- args.element.addEventListener('blur', function (event) {
220
- validateLabel(args.element, args.floatLabelType);
221
- });
258
+ var inputFloatHandler = function () { return inputEventHandler(args); };
259
+ var blurFloatHandler = function () { return blurEventHandler(args); };
260
+ // Add event listeners using the defined functions
261
+ args.element.addEventListener('input', inputFloatHandler);
262
+ args.element.addEventListener('blur', blurFloatHandler);
263
+ // Store the event handler functions to remove them later
264
+ args.element.__eventHandlers["floatInputHandler"] = { inputFloatHandler: inputFloatHandler };
265
+ args.element.__eventHandlers["floatBlurHandler"] = { blurFloatHandler: blurFloatHandler };
266
+ }
267
+ else {
268
+ unWireFloatLabelEvents(args);
222
269
  }
223
270
  if (!isNullOrUndefined(args.element.getAttribute('id'))) {
224
271
  floatLabelElement.setAttribute('for', args.element.getAttribute('id'));
225
272
  }
226
273
  }
274
+ function unWireFloatLabelEvents(args) {
275
+ if (!isNullOrUndefined(args.element) && !isNullOrUndefined(args.element.__eventHandlers)
276
+ && !isNullOrUndefined(args.element.__eventHandlers["floatInputHandler"])
277
+ && !isNullOrUndefined(args.element.__eventHandlers["floatBlurHandler"])) {
278
+ var inputFloatHandler = args.element.__eventHandlers["floatInputHandler"].inputFloatHandler;
279
+ var blurFloatHandler = args.element.__eventHandlers["floatBlurHandler"].blurFloatHandler;
280
+ // Remove the event listeners using the defined functions
281
+ args.element.removeEventListener('input', inputFloatHandler);
282
+ args.element.removeEventListener('blur', blurFloatHandler);
283
+ // Clean up stored event handler functions
284
+ delete args.element.__eventHandlers["floatInputHandler"];
285
+ delete args.element.__eventHandlers["floatBlurHandler"];
286
+ }
287
+ }
227
288
  function checkFloatLabelType(type, container) {
228
289
  if (type === 'Always' && container.classList.contains('e-outline')) {
229
290
  container.classList.add('e-valid-input');
@@ -311,40 +372,89 @@ var Input;
311
372
  button.setAttribute('aria-label', 'close');
312
373
  return button;
313
374
  }
375
+ function clickHandler(event, element, button) {
376
+ if (!(element.classList.contains(CLASSNAMES.DISABLE) || element.readOnly)) {
377
+ event.preventDefault();
378
+ if (element !== document.activeElement) {
379
+ element.focus();
380
+ }
381
+ element.value = '';
382
+ addClass([button], CLASSNAMES.CLEARICONHIDE);
383
+ }
384
+ }
385
+ function inputHandler(element, button) {
386
+ updateIconState(element.value, button);
387
+ }
388
+ function focusHandler(element, button) {
389
+ updateIconState(element.value, button, element.readOnly);
390
+ }
391
+ function blurHandler(element, button) {
392
+ setTimeout(function () {
393
+ if (!isNullOrUndefined(button)) {
394
+ addClass([button], CLASSNAMES.CLEARICONHIDE);
395
+ button = !isNullOrUndefined(element) && element.classList.contains('e-combobox') ? null : button;
396
+ }
397
+ }, 200);
398
+ }
314
399
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
315
400
  function wireClearBtnEvents(element, button, container) {
316
401
  if (isBindClearAction === undefined || isBindClearAction) {
317
- button.addEventListener('click', function (event) {
318
- if (!(element.classList.contains(CLASSNAMES.DISABLE) || element.readOnly)) {
319
- event.preventDefault();
320
- if (element !== document.activeElement) {
321
- element.focus();
402
+ var clickHandlerEvent = function (e) { return clickHandler(e, element, button); };
403
+ button.addEventListener('click', clickHandlerEvent);
404
+ element.__eventHandlers["clearClickHandler"] = { clickHandlerEvent: clickHandlerEvent };
405
+ }
406
+ var inputHandlerEvent = function () { return inputHandler(element, button); };
407
+ var focusHandlerEvent = function () { return focusHandler(element, button); };
408
+ var blurHandlerEvent = function () { return blurHandler(element, button); };
409
+ element.addEventListener('input', inputHandlerEvent);
410
+ element.addEventListener('focus', focusHandlerEvent);
411
+ element.addEventListener('blur', blurHandlerEvent);
412
+ // Store the bound functions to remove them later
413
+ element.__eventHandlers["clearInputHandler"] = { inputHandlerEvent: inputHandlerEvent };
414
+ element.__eventHandlers["clearFocusHandler"] = { focusHandlerEvent: focusHandlerEvent };
415
+ element.__eventHandlers["clearBlurHandler"] = { blurHandlerEvent: blurHandlerEvent };
416
+ }
417
+ Input.wireClearBtnEvents = wireClearBtnEvents;
418
+ function unWireClearBtnEvents(element, button) {
419
+ if (!isNullOrUndefined(element) && !isNullOrUndefined(element.__eventHandlers)) {
420
+ if (!isNullOrUndefined(element.__eventHandlers["clearClickHandler"])) {
421
+ var clickHandlerEvent = element.__eventHandlers["clearClickHandler"].clickHandlerEvent;
422
+ if (isBindClearAction === undefined || isBindClearAction) {
423
+ if (!isNullOrUndefined(button)) {
424
+ button.removeEventListener('click', clickHandlerEvent);
322
425
  }
323
- element.value = '';
324
- addClass([button], CLASSNAMES.CLEARICONHIDE);
325
426
  }
326
- });
427
+ delete element.__eventHandlers["clearClickHandler"];
428
+ }
429
+ if (!isNullOrUndefined(element.__eventHandlers["clearInputHandler"])
430
+ && !isNullOrUndefined(element.__eventHandlers["clearFocusHandler"])
431
+ && !isNullOrUndefined(element.__eventHandlers["clearBlurHandler"])) {
432
+ var inputHandlerEvent = element.__eventHandlers["clearInputHandler"].inputHandlerEvent;
433
+ var focusHandlerEvent = element.__eventHandlers["clearFocusHandler"].focusHandlerEvent;
434
+ var blurHandlerEvent = element.__eventHandlers["clearBlurHandler"].blurHandlerEvent;
435
+ element.removeEventListener('input', inputHandlerEvent);
436
+ element.removeEventListener('focus', focusHandlerEvent);
437
+ element.removeEventListener('blur', blurHandlerEvent);
438
+ // Clean up stored Event functions
439
+ delete element.__eventHandlers["clearInputHandler"];
440
+ delete element.__eventHandlers["clearFocusHandler"];
441
+ delete element.__eventHandlers["clearBlurHandler"];
442
+ }
327
443
  }
328
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
329
- element.addEventListener('input', function (event) {
330
- updateIconState(element.value, button);
331
- });
332
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
333
- element.addEventListener('focus', function (event) {
334
- updateIconState(element.value, button, element.readOnly);
335
- });
336
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
337
- element.addEventListener('blur', function (event) {
338
- setTimeout(function () {
339
- if (!isNullOrUndefined(button)) {
340
- addClass([button], CLASSNAMES.CLEARICONHIDE);
341
- button = !isNullOrUndefined(element) && element.classList.contains('e-combobox') ? null : button;
342
- }
343
- }, 200);
344
- });
345
444
  }
346
- Input.wireClearBtnEvents = wireClearBtnEvents;
347
- function destroy() {
445
+ function destroy(args, button) {
446
+ if (button === void 0) { button = null; }
447
+ unbindInitialEvent(args);
448
+ if (args.floatLabelType === 'Auto') {
449
+ unWireFloatLabelEvents(args);
450
+ }
451
+ if (args.properties.showClearButton) {
452
+ unWireClearBtnEvents(args.element, button);
453
+ }
454
+ unwireFloatingEvents(args.element);
455
+ if (!isNullOrUndefined(args.element)) {
456
+ delete args.element.__eventHandlers;
457
+ }
348
458
 
349
459
  }
350
460
  Input.destroy = destroy;
@@ -565,7 +675,7 @@ var Input;
565
675
  * - Element to be enabled or disabled.
566
676
  */
567
677
  function setEnabled(isEnable, element, floatLabelType, inputContainer) {
568
- var disabledAttrs = { 'disabled': 'disabled', 'aria-disabled': 'true' };
678
+ var disabledAttrs = { 'disabled': '', 'aria-disabled': 'true' };
569
679
  var considerWrapper = isNullOrUndefined(inputContainer) ? false : true;
570
680
  if (isEnable) {
571
681
  element.classList.remove(CLASSNAMES.DISABLE);
@@ -680,11 +790,11 @@ var Input;
680
790
  var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;
681
791
  var container = closest(input, '.' + CLASSNAMES.INPUTGROUP);
682
792
  floatType = type;
793
+ var customTag = container.tagName;
794
+ customTag = customTag !== 'DIV' && customTag !== 'SPAN' ? customTag : null;
795
+ var args = { element: input, floatLabelType: type,
796
+ customTag: customTag, properties: { placeholder: placeholder } };
683
797
  if (type !== 'Never') {
684
- var customTag = container.tagName;
685
- customTag = customTag !== 'DIV' && customTag !== 'SPAN' ? customTag : null;
686
- var args = { element: input, floatLabelType: type,
687
- customTag: customTag, properties: { placeholder: placeholder } };
688
798
  var iconEle = container.querySelector('.e-clear-icon');
689
799
  var inputObj = { container: container };
690
800
  input.classList.remove(CLASSNAMES.INPUT);
@@ -715,6 +825,9 @@ var Input;
715
825
  wrapper.insertBefore(floatText, iconEle);
716
826
  }
717
827
  }
828
+ else {
829
+ unWireFloatLabelEvents(args);
830
+ }
718
831
  checkFloatLabelType(type, input.parentElement);
719
832
  }
720
833
  Input.addFloating = addFloating;
@@ -898,6 +1011,58 @@ var Input;
898
1011
  }
899
1012
  }
900
1013
  Input.validateInputType = validateInputType;
1014
+ function updateHTMLAttributesToElement(htmlAttributes, element) {
1015
+ if (!isNullOrUndefined(htmlAttributes)) {
1016
+ for (var _i = 0, _a = Object.keys(htmlAttributes); _i < _a.length; _i++) {
1017
+ var key = _a[_i];
1018
+ if (containerAttributes.indexOf(key) < 0) {
1019
+ element.setAttribute(key, htmlAttributes["" + key]);
1020
+ }
1021
+ }
1022
+ }
1023
+ }
1024
+ Input.updateHTMLAttributesToElement = updateHTMLAttributesToElement;
1025
+ function updateCssClass(newClass, oldClass, container) {
1026
+ setCssClass(getInputValidClassList(newClass), [container], getInputValidClassList(oldClass));
1027
+ }
1028
+ Input.updateCssClass = updateCssClass;
1029
+ function getInputValidClassList(inputClassName) {
1030
+ var result = inputClassName;
1031
+ if (!isNullOrUndefined(inputClassName) && inputClassName !== '') {
1032
+ result = (inputClassName.replace(/\s+/g, ' ')).trim();
1033
+ }
1034
+ return result;
1035
+ }
1036
+ Input.getInputValidClassList = getInputValidClassList;
1037
+ function updateHTMLAttributesToWrapper(htmlAttributes, container) {
1038
+ if (!isNullOrUndefined(htmlAttributes)) {
1039
+ for (var _i = 0, _a = Object.keys(htmlAttributes); _i < _a.length; _i++) {
1040
+ var key = _a[_i];
1041
+ if (containerAttributes.indexOf(key) > -1) {
1042
+ if (key === 'class') {
1043
+ var updatedClassValues = this.getInputValidClassList(htmlAttributes["" + key]);
1044
+ if (updatedClassValues !== '') {
1045
+ addClass([container], updatedClassValues.split(' '));
1046
+ }
1047
+ }
1048
+ else if (key === 'style') {
1049
+ var setStyle = container.getAttribute(key);
1050
+ setStyle = !isNullOrUndefined(setStyle) ? (setStyle + htmlAttributes["" + key]) :
1051
+ htmlAttributes["" + key];
1052
+ container.setAttribute(key, setStyle);
1053
+ }
1054
+ else {
1055
+ container.setAttribute(key, htmlAttributes["" + key]);
1056
+ }
1057
+ }
1058
+ }
1059
+ }
1060
+ }
1061
+ Input.updateHTMLAttributesToWrapper = updateHTMLAttributesToWrapper;
1062
+ function isBlank(inputString) {
1063
+ return (!inputString || /^\s*$/.test(inputString));
1064
+ }
1065
+ Input.isBlank = isBlank;
901
1066
  })(Input || (Input = {}));
902
1067
  /* eslint-enable valid-jsdoc, jsdoc/require-jsdoc, jsdoc/require-returns, jsdoc/require-param */
903
1068
 
@@ -2011,6 +2176,9 @@ var NumericTextBox = /** @__PURE__ @class */ (function (_super) {
2011
2176
  */
2012
2177
  NumericTextBox.prototype.destroy = function () {
2013
2178
  this.unwireEvents();
2179
+ if (this.showClearButton) {
2180
+ this.clearButton = document.getElementsByClassName('e-clear-icon')[0];
2181
+ }
2014
2182
  detach(this.hiddenInput);
2015
2183
  if (this.showSpinButton) {
2016
2184
  this.unwireSpinBtnEvents();
@@ -2034,7 +2202,11 @@ var NumericTextBox = /** @__PURE__ @class */ (function (_super) {
2034
2202
  this.blurEventArgs = null;
2035
2203
  this.focusEventArgs = null;
2036
2204
  this.inputWrapper = null;
2037
- Input.destroy();
2205
+ Input.destroy({
2206
+ element: this.element,
2207
+ floatLabelType: this.floatLabelType,
2208
+ properties: this.properties
2209
+ }, this.clearButton);
2038
2210
  _super.prototype.destroy.call(this);
2039
2211
  };
2040
2212
  /* eslint-disable valid-jsdoc, jsdoc/require-returns */
@@ -2460,6 +2632,7 @@ function unwireEvents() {
2460
2632
  EventHandler.remove(this.element, 'focus', maskInputFocusHandler);
2461
2633
  EventHandler.remove(this.element, 'blur', maskInputBlurHandler);
2462
2634
  EventHandler.remove(this.element, 'paste', maskInputPasteHandler);
2635
+ EventHandler.remove(this.element, 'drop', maskInputDropHandler);
2463
2636
  EventHandler.remove(this.element, 'cut', maskInputCutHandler);
2464
2637
  EventHandler.remove(this.element, 'mousedown', maskInputMouseDownHandler);
2465
2638
  EventHandler.remove(this.element, 'mouseup', maskInputMouseUpHandler);
@@ -3901,6 +4074,9 @@ var MaskedTextBox = /** @__PURE__ @class */ (function (_super) {
3901
4074
  */
3902
4075
  MaskedTextBox.prototype.destroy = function () {
3903
4076
  unwireEvents.call(this);
4077
+ if (this.showClearButton) {
4078
+ this.clearButton = document.getElementsByClassName('e-clear-icon')[0];
4079
+ }
3904
4080
  var attrArray = ['aria-labelledby', 'role', 'autocomplete', 'aria-readonly',
3905
4081
  'aria-disabled', 'autocapitalize', 'spellcheck', 'aria-autocomplete', 'aria-live', 'aria-invalid'];
3906
4082
  for (var i = 0; i < attrArray.length; i++) {
@@ -3912,7 +4088,11 @@ var MaskedTextBox = /** @__PURE__ @class */ (function (_super) {
3912
4088
  detach(this.inputObj.container);
3913
4089
  }
3914
4090
  this.blurEventArgs = null;
3915
- Input.destroy();
4091
+ Input.destroy({
4092
+ element: this.element,
4093
+ floatLabelType: this.floatLabelType,
4094
+ properties: this.properties
4095
+ }, this.clearButton);
3916
4096
  this.changeEventArgs = null;
3917
4097
  this.inputObj = null;
3918
4098
  _super.prototype.destroy.call(this);
@@ -6967,7 +7147,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
6967
7147
  Property('')
6968
7148
  ], Slider.prototype, "cssClass", void 0);
6969
7149
  __decorate$2([
6970
- Property(false)
7150
+ Property(true)
6971
7151
  ], Slider.prototype, "enableHtmlSanitizer", void 0);
6972
7152
  __decorate$2([
6973
7153
  Event()
@@ -13446,8 +13626,6 @@ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators,
13446
13626
  return c > 3 && r && Object.defineProperty(target, key, r), r;
13447
13627
  };
13448
13628
  var HIDE_CLEAR = 'e-clear-icon-hide';
13449
- var TEXTBOX_FOCUS = 'e-input-focus';
13450
- var containerAttr = ['title', 'style', 'class'];
13451
13629
  /**
13452
13630
  * Represents the TextBox component that allows the user to enter the values based on it's type.
13453
13631
  * ```html
@@ -13506,7 +13684,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
13506
13684
  {
13507
13685
  var prevOnChange = this.isProtectedOnChange;
13508
13686
  this.isProtectedOnChange = true;
13509
- if (!this.isBlank(this.value)) {
13687
+ if (!Input.isBlank(this.value)) {
13510
13688
  this.value = this.value.toString();
13511
13689
  }
13512
13690
  this.isProtectedOnChange = prevOnChange;
@@ -13528,8 +13706,8 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
13528
13706
  break;
13529
13707
  case 'htmlAttributes':
13530
13708
  {
13531
- this.updateHTMLAttrToElement();
13532
- this.updateHTMLAttrToWrapper();
13709
+ this.updateHTMLAttributesToElement();
13710
+ this.updateHTMLAttributesToWrapper();
13533
13711
  this.checkAttributes(true);
13534
13712
  this.multiline && !isNullOrUndefined(this.textarea) ? Input.validateInputType(this.textboxWrapper.container, this.textarea) : Input.validateInputType(this.textboxWrapper.container, this.element);
13535
13713
  }
@@ -13564,7 +13742,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
13564
13742
  }
13565
13743
  break;
13566
13744
  case 'cssClass':
13567
- this.updateCssClass(newProp.cssClass, oldProp.cssClass);
13745
+ Input.updateCssClass(newProp.cssClass, oldProp.cssClass, this.textboxWrapper.container);
13568
13746
  break;
13569
13747
  case 'locale':
13570
13748
  this.globalize = new Internationalization(this.locale);
@@ -13584,9 +13762,6 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
13584
13762
  TextBox.prototype.getModuleName = function () {
13585
13763
  return 'textbox';
13586
13764
  };
13587
- TextBox.prototype.isBlank = function (str) {
13588
- return (!str || /^\s*$/.test(str));
13589
- };
13590
13765
  TextBox.prototype.preRender = function () {
13591
13766
  this.cloneElement = this.element.cloneNode(true);
13592
13767
  this.formElement = closest(this.element, 'form');
@@ -13617,7 +13792,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
13617
13792
  this.element = inputElement;
13618
13793
  setValue('ej2_instances', ejInstance, this.element);
13619
13794
  }
13620
- this.updateHTMLAttrToElement();
13795
+ this.updateHTMLAttributesToElement();
13621
13796
  this.checkAttributes(false);
13622
13797
  if ((isNullOrUndefined(this.textboxOptions) || (this.textboxOptions['value'] === undefined)) && this.element.value !== '') {
13623
13798
  this.setProperties({ value: this.element.value }, true);
@@ -13653,7 +13828,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
13653
13828
  var apiAttributes = ['placeholder', 'disabled', 'value', 'readonly', 'type', 'autocomplete'];
13654
13829
  for (var index = 0; index < this.element.attributes.length; index++) {
13655
13830
  var attributeName = this.element.attributes[index].nodeName;
13656
- if (this.element.hasAttribute(attributeName) && containerAttr.indexOf(attributeName) < 0 &&
13831
+ if (this.element.hasAttribute(attributeName) && containerAttributes.indexOf(attributeName) < 0 &&
13657
13832
  !(attributeName === 'id' || attributeName === 'type' || attributeName === 'e-mappinguid')) {
13658
13833
  // e-mappinguid attribute is handled for Grid component.
13659
13834
  this.textarea.setAttribute(attributeName, this.element.attributes[index].nodeValue);
@@ -13720,7 +13895,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
13720
13895
  TextBox.prototype.render = function () {
13721
13896
  var updatedCssClassValue = this.cssClass;
13722
13897
  if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
13723
- updatedCssClassValue = this.getInputValidClassList(this.cssClass);
13898
+ updatedCssClassValue = Input.getInputValidClassList(this.cssClass);
13724
13899
  }
13725
13900
  this.respectiveElement = (this.isHiddenInput) ? this.textarea : this.element;
13726
13901
  this.textboxWrapper = Input.createInput({
@@ -13735,7 +13910,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
13735
13910
  showClearButton: this.showClearButton
13736
13911
  }
13737
13912
  });
13738
- this.updateHTMLAttrToWrapper();
13913
+ this.updateHTMLAttributesToWrapper();
13739
13914
  if (this.isHiddenInput) {
13740
13915
  this.respectiveElement.parentNode.insertBefore(this.element, this.respectiveElement);
13741
13916
  }
@@ -13765,49 +13940,11 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
13765
13940
  }
13766
13941
  this.renderComplete();
13767
13942
  };
13768
- TextBox.prototype.updateHTMLAttrToWrapper = function () {
13769
- if (!isNullOrUndefined(this.htmlAttributes)) {
13770
- for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
13771
- var key = _a[_i];
13772
- if (containerAttr.indexOf(key) > -1) {
13773
- if (key === 'class') {
13774
- var updatedClassValues = this.getInputValidClassList(this.htmlAttributes["" + key]);
13775
- if (updatedClassValues !== '') {
13776
- addClass([this.textboxWrapper.container], updatedClassValues.split(' '));
13777
- }
13778
- }
13779
- else if (key === 'style') {
13780
- var setStyle = this.textboxWrapper.container.getAttribute(key);
13781
- setStyle = !isNullOrUndefined(setStyle) ? (setStyle + this.htmlAttributes["" + key]) :
13782
- this.htmlAttributes["" + key];
13783
- this.textboxWrapper.container.setAttribute(key, setStyle);
13784
- }
13785
- else {
13786
- this.textboxWrapper.container.setAttribute(key, this.htmlAttributes["" + key]);
13787
- }
13788
- }
13789
- }
13790
- }
13791
- };
13792
- TextBox.prototype.updateHTMLAttrToElement = function () {
13793
- if (!isNullOrUndefined(this.htmlAttributes)) {
13794
- for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
13795
- var key = _a[_i];
13796
- if (containerAttr.indexOf(key) < 0) {
13797
- this.multiline && !isNullOrUndefined(this.textarea) ? this.textarea.setAttribute(key, this.htmlAttributes["" + key]) : this.element.setAttribute(key, this.htmlAttributes["" + key]);
13798
- }
13799
- }
13800
- }
13801
- };
13802
- TextBox.prototype.updateCssClass = function (newClass, oldClass) {
13803
- Input.setCssClass(this.getInputValidClassList(newClass), [this.textboxWrapper.container], this.getInputValidClassList(oldClass));
13943
+ TextBox.prototype.updateHTMLAttributesToWrapper = function () {
13944
+ Input.updateHTMLAttributesToWrapper(this.htmlAttributes, this.textboxWrapper.container);
13804
13945
  };
13805
- TextBox.prototype.getInputValidClassList = function (inputClassName) {
13806
- var result = inputClassName;
13807
- if (!isNullOrUndefined(inputClassName) && inputClassName !== '') {
13808
- result = (inputClassName.replace(/\s+/g, ' ')).trim();
13809
- }
13810
- return result;
13946
+ TextBox.prototype.updateHTMLAttributesToElement = function () {
13947
+ Input.updateHTMLAttributesToElement(this.htmlAttributes, this.respectiveElement ? this.respectiveElement : (this.multiline && !isNullOrUndefined(this.textarea) ? this.textarea : this.element));
13811
13948
  };
13812
13949
  TextBox.prototype.setInitialValue = function () {
13813
13950
  if (!this.isAngular) {
@@ -13999,6 +14136,9 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
13999
14136
  */
14000
14137
  TextBox.prototype.destroy = function () {
14001
14138
  this.unWireEvents();
14139
+ if (this.showClearButton) {
14140
+ this.clearButton = document.getElementsByClassName('e-clear-icon')[0];
14141
+ }
14002
14142
  if (this.element.tagName === 'INPUT' && this.multiline) {
14003
14143
  detach(this.textboxWrapper.container.getElementsByTagName('textarea')[0]);
14004
14144
  this.respectiveElement = this.element;
@@ -14012,7 +14152,11 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
14012
14152
  detach(this.textboxWrapper.container);
14013
14153
  }
14014
14154
  this.textboxWrapper = null;
14015
- Input.destroy();
14155
+ Input.destroy({
14156
+ element: this.respectiveElement,
14157
+ floatLabelType: this.floatLabelType,
14158
+ properties: this.properties
14159
+ }, this.clearButton);
14016
14160
  _super.prototype.destroy.call(this);
14017
14161
  };
14018
14162
  /**
@@ -14191,7 +14335,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
14191
14335
  * Uploader modules
14192
14336
  */
14193
14337
 
14194
- var __extends$8 = (undefined && undefined.__extends) || (function () {
14338
+ var __extends$7 = (undefined && undefined.__extends) || (function () {
14195
14339
  var extendStatics = function (d, b) {
14196
14340
  extendStatics = Object.setPrototypeOf ||
14197
14341
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -14204,110 +14348,808 @@ var __extends$8 = (undefined && undefined.__extends) || (function () {
14204
14348
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14205
14349
  };
14206
14350
  })();
14207
- var SignatureBase = /** @__PURE__ @class */ (function (_super) {
14208
- __extends$8(SignatureBase, _super);
14209
- function SignatureBase() {
14210
- var _this = _super !== null && _super.apply(this, arguments) || this;
14211
- /* minDistance(distance between the two point) was calaculated for smoothness.*/
14212
- _this.minDistance = 5;
14213
- _this.previous = 0;
14214
- /* interval handles for the smoothness in the mouse move event.*/
14215
- _this.interval = 30;
14216
- _this.timeout = null;
14217
- _this.isSignatureEmpty = true;
14218
- _this.backgroundLoaded = null;
14219
- _this.isBlazor = false;
14220
- _this.isResponsive = false;
14221
- _this.signPointsColl = [];
14222
- _this.signRatioPointsColl = [];
14351
+ var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
14352
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
14353
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
14354
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
14355
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
14356
+ };
14357
+ var HIDE_CLEAR$1 = 'e-clear-icon-hide';
14358
+ var AUTO_WIDTH = 'e-auto-width';
14359
+ var RESIZE_X = 'e-resize-x';
14360
+ var RESIZE_Y = 'e-resize-y';
14361
+ var RESIZE_XY = 'e-resize-xy';
14362
+ var RESIZE_NONE = 'e-resize-none';
14363
+ var TextArea = /** @__PURE__ @class */ (function (_super) {
14364
+ __extends$7(TextArea, _super);
14365
+ function TextArea(options, element) {
14366
+ var _this = _super.call(this, options, element) || this;
14367
+ _this.previousValue = null;
14368
+ _this.isForm = false;
14369
+ _this.inputPreviousValue = null;
14370
+ _this.isAngular = false;
14371
+ _this.isVue = false;
14372
+ _this.textareaOptions = options;
14223
14373
  return _this;
14224
14374
  }
14225
14375
  /**
14226
- * To Initialize the component rendering
14376
+ * Calls internally if any of the property value is changed.
14227
14377
  *
14228
- * @private
14229
- * @param {HTMLCanvasElement} element - Specifies the canvas element.
14230
- * @param {BlazorDotnetObject} dotnetRef - Specifies for blazor client to server communication.
14378
+ * @param {TextAreaModel} newProp - Returns the dynamic property value of the component.
14379
+ * @param {TextAreaModel} oldProp - Returns the previous property value of the component.
14231
14380
  * @returns {void}
14381
+ * @private
14232
14382
  */
14233
- SignatureBase.prototype.initialize = function (element, dotnetRef) {
14234
- this.clearArray = [];
14235
- this.element = element;
14236
- this.canvasContext = this.element.getContext('2d');
14237
- this.canvasContext.canvas.tabIndex = -1;
14238
- if (dotnetRef) {
14239
- this.dotnetRef = dotnetRef;
14240
- this.isBlazor = true;
14241
- if (this.signatureValue) {
14242
- this.loadPersistedSignature();
14243
- }
14244
- }
14245
- this.setHTMLProperties();
14246
- if (isNullOrUndefined(this.signatureValue)) {
14247
- this.updateSnapCollection(true);
14248
- }
14249
- this.wireEvents();
14250
- if (!this.isBlazor) {
14251
- this.trigger('created', null);
14252
- }
14253
- };
14254
- SignatureBase.prototype.wireEvents = function () {
14255
- if (isNullOrUndefined(this.pointColl) && !this.isReadOnly && !this.disabled) {
14256
- EventHandler.add(this.canvasContext.canvas, 'mousedown touchstart', this.mouseDownHandler, this);
14257
- EventHandler.add(this.canvasContext.canvas, 'keydown', this.keyboardHandler, this);
14258
- window.addEventListener('resize', this.resizeHandler.bind(this));
14259
- }
14260
- else if (this.pointColl) {
14261
- EventHandler.add(this.canvasContext.canvas, 'mousemove touchmove', this.mouseMoveHandler, this);
14262
- EventHandler.add(this.canvasContext.canvas, 'mouseup touchend', this.mouseUpHandler, this);
14263
- EventHandler.add(document, 'mouseup', this.mouseUpHandler, this);
14264
- }
14265
- };
14266
- SignatureBase.prototype.unwireEvents = function (type) {
14267
- if (type === 'mouseup' || type === 'touchend') {
14268
- EventHandler.remove(this.canvasContext.canvas, 'mousemove touchmove', this.mouseMoveHandler);
14269
- EventHandler.remove(this.canvasContext.canvas, 'mouseup touchend', this.mouseUpHandler);
14270
- EventHandler.remove(document, 'mouseup', this.mouseUpHandler);
14271
- }
14272
- else {
14273
- EventHandler.remove(this.canvasContext.canvas, 'mousedown touchstart', this.mouseDownHandler);
14274
- EventHandler.remove(this.canvasContext.canvas, 'keydown', this.keyboardHandler);
14275
- window.removeEventListener('resize', this.resizeHandler);
14276
- }
14277
- };
14278
- SignatureBase.prototype.setHTMLProperties = function () {
14279
- if (this.element.height === 150 && this.element.width === 300 && this.element.offsetHeight !== 0 && this.element.offsetWidth !== 0) {
14280
- this.element.height = this.element.offsetHeight;
14281
- this.element.width = this.element.offsetWidth;
14282
- this.isResponsive = true;
14283
- }
14284
- else if ((this.element.height !== this.element.offsetHeight - 1 || this.element.width !== this.element.offsetWidth - 1)
14285
- && this.element.offsetHeight !== 0 && this.element.offsetWidth !== 0) {
14286
- this.element.height = this.element.offsetHeight;
14287
- this.element.width = this.element.offsetWidth;
14288
- }
14289
- this.canvasContext.fillStyle = this.strokeColor;
14290
- this.tempCanvas = this.createElement('canvas', { className: 'e-' + this.getModuleName() + '-temp' });
14291
- this.tempContext = this.tempCanvas.getContext('2d');
14292
- this.tempCanvas.width = this.element.width;
14293
- this.tempCanvas.height = this.element.height;
14294
- if (this.backgroundImage) {
14295
- this.canvasContext.canvas.style.backgroundImage = 'url(' + this.backgroundImage + ')';
14296
- this.canvasContext.canvas.style.backgroundRepeat = 'no-repeat';
14297
- if (this.saveWithBackground) {
14298
- this.setBackgroundImage(this.backgroundImage, 'temp');
14299
- }
14300
- }
14301
- else if (this.backgroundColor) {
14302
- this.canvasContext.canvas.style.backgroundColor = this.backgroundColor;
14303
- }
14304
- };
14305
- // eslint-disable-next-line
14306
- SignatureBase.prototype.mouseDownHandler = function (e) {
14307
- if (e.buttons === 1 || e.buttons === 2 || e.type === 'touchstart') {
14308
- if (e.type === 'touchstart') {
14309
- e.preventDefault();
14310
- e.stopPropagation();
14383
+ TextArea.prototype.onPropertyChanged = function (newProp, oldProp) {
14384
+ for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
14385
+ var prop = _a[_i];
14386
+ switch (prop) {
14387
+ case 'floatLabelType':
14388
+ Input.removeFloating(this.textareaWrapper);
14389
+ Input.addFloating(this.element, this.floatLabelType, this.placeholder);
14390
+ if (this.floatLabelType === 'Never') {
14391
+ this.element.removeAttribute('aria-labelledby');
14392
+ }
14393
+ break;
14394
+ case 'enabled':
14395
+ Input.setEnabled(this.enabled, this.element, this.floatLabelType, this.textareaWrapper.container);
14396
+ this.bindClearEvent();
14397
+ if (!this.enabled && this.resizeMode !== 'None') {
14398
+ this.element.classList.remove(this.getCurrentResizeClass(this.resizeMode));
14399
+ this.element.classList.add(RESIZE_NONE);
14400
+ }
14401
+ else {
14402
+ this.element.classList.add(this.getCurrentResizeClass(this.resizeMode));
14403
+ }
14404
+ break;
14405
+ case 'width':
14406
+ if (this.resizeMode !== 'None' && this.resizeMode !== 'Vertical') {
14407
+ this.setElementWidth(newProp.width);
14408
+ this.textareaWrapper.container.classList.add(AUTO_WIDTH);
14409
+ }
14410
+ else {
14411
+ if (this.textareaWrapper.container.classList.contains(AUTO_WIDTH)) {
14412
+ this.textareaWrapper.container.classList.remove(AUTO_WIDTH);
14413
+ }
14414
+ Input.setWidth(newProp.width, this.textareaWrapper.container);
14415
+ }
14416
+ break;
14417
+ case 'value':
14418
+ {
14419
+ var prevOnChange = this.isProtectedOnChange;
14420
+ this.isProtectedOnChange = true;
14421
+ if (!Input.isBlank(this.value)) {
14422
+ this.value = this.value.toString();
14423
+ }
14424
+ this.isProtectedOnChange = prevOnChange;
14425
+ Input.setValue(this.value, this.element, this.floatLabelType, this.showClearButton);
14426
+ this.inputPreviousValue = this.element.value;
14427
+ /* istanbul ignore next */
14428
+ if ((this.isAngular || this.isVue) && this.preventChange === true) {
14429
+ this.previousValue = this.isAngular ? this.value : this.previousValue;
14430
+ this.preventChange = false;
14431
+ }
14432
+ else if (isNullOrUndefined(this.isAngular) || !this.isAngular
14433
+ || (this.isAngular && !this.preventChange) || (this.isAngular && isNullOrUndefined(this.preventChange))) {
14434
+ this.raiseChangeEvent();
14435
+ }
14436
+ }
14437
+ break;
14438
+ case 'htmlAttributes':
14439
+ {
14440
+ this.updateHTMLAttributesToElement();
14441
+ this.updateHTMLAttributesToWrapper();
14442
+ this.checkAttributes(true);
14443
+ Input.validateInputType(this.textareaWrapper.container, this.element);
14444
+ }
14445
+ break;
14446
+ case 'readonly':
14447
+ Input.setReadonly(this.readonly, this.element);
14448
+ if (this.readonly) {
14449
+ this.element.setAttribute('aria-readonly', 'true');
14450
+ }
14451
+ else {
14452
+ this.element.removeAttribute('aria-readonly');
14453
+ }
14454
+ break;
14455
+ case 'showClearButton':
14456
+ Input.setClearButton(this.showClearButton, this.element, this.textareaWrapper);
14457
+ this.bindClearEvent();
14458
+ break;
14459
+ case 'enableRtl':
14460
+ Input.setEnableRtl(this.enableRtl, [this.textareaWrapper.container]);
14461
+ break;
14462
+ case 'placeholder':
14463
+ Input.setPlaceholder(this.placeholder, this.element);
14464
+ Input.calculateWidth(this.element, this.textareaWrapper.container);
14465
+ break;
14466
+ case 'cssClass':
14467
+ Input.updateCssClass(newProp.cssClass, oldProp.cssClass, this.textareaWrapper.container);
14468
+ break;
14469
+ case 'locale':
14470
+ this.globalize = new Internationalization(this.locale);
14471
+ this.l10n.setLocale(this.locale);
14472
+ this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);
14473
+ Input.setPlaceholder(this.placeholder, this.element);
14474
+ break;
14475
+ case 'rowsCount':
14476
+ if (this.rowsCount) {
14477
+ this.element.setAttribute('rows', this.rowsCount.toString());
14478
+ }
14479
+ break;
14480
+ case 'columnsCount':
14481
+ if (this.columnsCount) {
14482
+ this.element.setAttribute('cols', this.columnsCount.toString());
14483
+ if (this.width == null) {
14484
+ this.textareaWrapper.container.classList.add(AUTO_WIDTH);
14485
+ }
14486
+ }
14487
+ break;
14488
+ case 'maxLength':
14489
+ if (this.maxLength) {
14490
+ this.element.setAttribute('maxlength', this.maxLength.toString());
14491
+ }
14492
+ break;
14493
+ case 'resizeMode':
14494
+ if (this.enabled) {
14495
+ if (this.element.classList.contains(this.getCurrentResizeClass(oldProp.resizeMode))) {
14496
+ this.element.classList.remove(this.getCurrentResizeClass(oldProp.resizeMode));
14497
+ }
14498
+ this.element.classList.add(this.getCurrentResizeClass(this.resizeMode));
14499
+ if (this.element.style.width && (this.resizeMode === 'None' || this.resizeMode === 'Vertical')) {
14500
+ Input.setWidth(this.element.style.width, this.textareaWrapper.container);
14501
+ }
14502
+ else {
14503
+ var currentWidth = this.element.offsetWidth;
14504
+ this.element.style.width = currentWidth + 'px';
14505
+ if (this.textareaWrapper.container.style.width) {
14506
+ this.textareaWrapper.container.style.width = '';
14507
+ }
14508
+ }
14509
+ this.setWrapperWidth();
14510
+ }
14511
+ break;
14512
+ }
14513
+ }
14514
+ };
14515
+ TextArea.prototype.preRender = function () {
14516
+ this.formElement = closest(this.element, 'form');
14517
+ if (!isNullOrUndefined(this.formElement)) {
14518
+ this.isForm = true;
14519
+ }
14520
+ /* istanbul ignore next */
14521
+ if (this.element.tagName === 'EJS-TEXTAREA') {
14522
+ var ejInstance = getValue('ej2_instances', this.element);
14523
+ var inputElement = this.createElement('textarea');
14524
+ var index = 0;
14525
+ for (index; index < this.element.attributes.length; index++) {
14526
+ var attributeName = this.element.attributes[index].nodeName;
14527
+ if (attributeName !== 'id' && attributeName !== 'class') {
14528
+ inputElement.setAttribute(attributeName, this.element.attributes[index].nodeValue);
14529
+ inputElement.innerHTML = this.element.innerHTML;
14530
+ if (attributeName === 'name') {
14531
+ this.element.removeAttribute('name');
14532
+ }
14533
+ }
14534
+ else if (attributeName === 'class') {
14535
+ inputElement.setAttribute(attributeName, this.element.className.split(' ').filter(function (item) { return item.indexOf('ng-') !== 0; }).join(' '));
14536
+ }
14537
+ }
14538
+ this.element.appendChild(inputElement);
14539
+ this.element = inputElement;
14540
+ setValue('ej2_instances', ejInstance, this.element);
14541
+ }
14542
+ this.updateHTMLAttributesToElement();
14543
+ this.checkAttributes(false);
14544
+ if ((isNullOrUndefined(this.textareaOptions) || (this.textareaOptions['value'] === undefined)) && this.element.value !== '') {
14545
+ this.setProperties({ value: this.element.value }, true);
14546
+ }
14547
+ this.globalize = new Internationalization(this.locale);
14548
+ var localeText = { placeholder: this.placeholder };
14549
+ this.l10n = new L10n('textarea', localeText, this.locale);
14550
+ if (this.l10n.getConstant('placeholder') !== '') {
14551
+ this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);
14552
+ }
14553
+ if (!this.element.hasAttribute('id')) {
14554
+ this.element.setAttribute('id', getUniqueID('textbox'));
14555
+ }
14556
+ if (!this.element.hasAttribute('name')) {
14557
+ this.element.setAttribute('name', this.element.getAttribute('id'));
14558
+ }
14559
+ if (this.rowsCount) {
14560
+ this.element.setAttribute('rows', this.rowsCount.toString());
14561
+ }
14562
+ if (this.columnsCount) {
14563
+ this.element.setAttribute('cols', this.columnsCount.toString());
14564
+ }
14565
+ if (this.maxLength) {
14566
+ this.element.setAttribute('maxlength', this.maxLength.toString());
14567
+ }
14568
+ if (!this.element.style.resize && this.enabled) {
14569
+ this.element.classList.add(this.getCurrentResizeClass(this.resizeMode));
14570
+ }
14571
+ if (this.enabled) {
14572
+ this.element.setAttribute('aria-multiline', 'true');
14573
+ }
14574
+ };
14575
+ /**
14576
+ * To Initialize the control rendering
14577
+ *
14578
+ * @returns {void}
14579
+ * @private
14580
+ */
14581
+ TextArea.prototype.render = function () {
14582
+ var updatedCssClassValue = this.cssClass;
14583
+ if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
14584
+ updatedCssClassValue = Input.getInputValidClassList(this.cssClass);
14585
+ }
14586
+ this.textareaWrapper = Input.createInput({
14587
+ element: this.element,
14588
+ floatLabelType: this.floatLabelType,
14589
+ properties: {
14590
+ enabled: this.enabled,
14591
+ enableRtl: this.enableRtl,
14592
+ cssClass: updatedCssClassValue,
14593
+ readonly: this.readonly,
14594
+ placeholder: this.placeholder,
14595
+ showClearButton: this.showClearButton
14596
+ }
14597
+ });
14598
+ this.updateHTMLAttributesToWrapper();
14599
+ this.wireEvents();
14600
+ if (!isNullOrUndefined(this.value)) {
14601
+ Input.setValue(this.value, this.element, this.floatLabelType, this.showClearButton);
14602
+ }
14603
+ if (!isNullOrUndefined(this.value)) {
14604
+ this.initialValue = this.value;
14605
+ if (!this.isAngular) {
14606
+ this.element.setAttribute('value', this.initialValue);
14607
+ }
14608
+ }
14609
+ this.previousValue = this.value;
14610
+ this.inputPreviousValue = this.value;
14611
+ this.element.defaultValue = this.element.value;
14612
+ Input.setWidth(this.width, this.textareaWrapper.container);
14613
+ this.setWrapperWidth();
14614
+ this.renderComplete();
14615
+ };
14616
+ TextArea.prototype.getModuleName = function () {
14617
+ return 'textarea';
14618
+ };
14619
+ /* eslint-disable valid-jsdoc, jsdoc/require-returns */
14620
+ /**
14621
+ * Gets the properties to be maintained in the persisted state.
14622
+ *
14623
+ */
14624
+ TextArea.prototype.getPersistData = function () {
14625
+ var keyEntity = ['value'];
14626
+ return this.addOnPersist(keyEntity);
14627
+ };
14628
+ TextArea.prototype.checkAttributes = function (isDynamic) {
14629
+ var attrs = isDynamic ? isNullOrUndefined(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) :
14630
+ ['placeholder', 'disabled', 'value', 'readonly'];
14631
+ for (var _i = 0, attrs_1 = attrs; _i < attrs_1.length; _i++) {
14632
+ var key = attrs_1[_i];
14633
+ if (!isNullOrUndefined(this.element.getAttribute(key))) {
14634
+ switch (key) {
14635
+ case 'disabled':
14636
+ if ((isNullOrUndefined(this.textareaOptions) || (this.textareaOptions['enabled'] === undefined)) || isDynamic) {
14637
+ var enabled = this.element.getAttribute(key) === 'disabled' || this.element.getAttribute(key) === '' ||
14638
+ this.element.getAttribute(key) === 'true' ? false : true;
14639
+ this.setProperties({ enabled: enabled }, !isDynamic);
14640
+ }
14641
+ break;
14642
+ case 'readonly':
14643
+ if ((isNullOrUndefined(this.textareaOptions) || (this.textareaOptions['readonly'] === undefined)) || isDynamic) {
14644
+ var readonly = this.element.getAttribute(key) === 'readonly' || this.element.getAttribute(key) === ''
14645
+ || this.element.getAttribute(key) === 'true' ? true : false;
14646
+ this.setProperties({ readonly: readonly }, !isDynamic);
14647
+ }
14648
+ break;
14649
+ case 'placeholder':
14650
+ if ((isNullOrUndefined(this.textareaOptions) || (this.textareaOptions['placeholder'] === undefined)) || isDynamic) {
14651
+ this.setProperties({ placeholder: this.element.placeholder }, !isDynamic);
14652
+ }
14653
+ break;
14654
+ case 'value':
14655
+ if (((isNullOrUndefined(this.textareaOptions) || (this.textareaOptions['value'] === undefined)) || isDynamic) && this.element.value !== '') {
14656
+ this.setProperties({ value: this.element.value }, !isDynamic);
14657
+ }
14658
+ break;
14659
+ }
14660
+ }
14661
+ }
14662
+ };
14663
+ TextArea.prototype.wireEvents = function () {
14664
+ EventHandler.add(this.element, 'focus', this.focusHandler, this);
14665
+ EventHandler.add(this.element, 'blur', this.focusOutHandler, this);
14666
+ EventHandler.add(this.element, 'keydown', this.keydownHandler, this);
14667
+ EventHandler.add(this.element, 'input', this.inputHandler, this);
14668
+ EventHandler.add(this.element, 'change', this.changeHandler, this);
14669
+ if (this.isForm) {
14670
+ EventHandler.add(this.formElement, 'reset', this.resetForm, this);
14671
+ }
14672
+ this.bindClearEvent();
14673
+ };
14674
+ TextArea.prototype.unWireEvents = function () {
14675
+ EventHandler.remove(this.element, 'focus', this.focusHandler);
14676
+ EventHandler.remove(this.element, 'blur', this.focusOutHandler);
14677
+ EventHandler.remove(this.element, 'keydown', this.keydownHandler);
14678
+ EventHandler.remove(this.element, 'input', this.inputHandler);
14679
+ EventHandler.remove(this.element, 'change', this.changeHandler);
14680
+ if (this.isForm) {
14681
+ EventHandler.remove(this.formElement, 'reset', this.resetForm);
14682
+ }
14683
+ };
14684
+ /**
14685
+ * Removes the component from the DOM and detaches all its related event handlers.
14686
+ * Also, it maintains the initial TextArea element from the DOM.
14687
+ *
14688
+ * @method destroy
14689
+ * @returns {void}
14690
+ */
14691
+ TextArea.prototype.destroy = function () {
14692
+ this.unWireEvents();
14693
+ if (this.showClearButton) {
14694
+ this.clearButton = document.getElementsByClassName('e-clear-icon')[0];
14695
+ }
14696
+ this.element.value = this.element.defaultValue;
14697
+ this.element.classList.remove('e-input', RESIZE_X, RESIZE_Y, RESIZE_XY, RESIZE_NONE);
14698
+ this.removeAttributes(['aria-disabled', 'aria-readonly', 'aria-labelledby', 'aria-multiline']);
14699
+ if (!isNullOrUndefined(this.textareaWrapper)) {
14700
+ this.textareaWrapper.container.insertAdjacentElement('afterend', this.element);
14701
+ detach(this.textareaWrapper.container);
14702
+ }
14703
+ this.textareaWrapper = null;
14704
+ this.formElement = null;
14705
+ Input.destroy({
14706
+ element: this.element,
14707
+ floatLabelType: this.floatLabelType,
14708
+ properties: this.properties
14709
+ }, this.clearButton);
14710
+ _super.prototype.destroy.call(this);
14711
+ };
14712
+ TextArea.prototype.focusHandler = function (args) {
14713
+ var eventArgs = {
14714
+ container: this.textareaWrapper.container,
14715
+ event: args,
14716
+ value: this.value
14717
+ };
14718
+ this.trigger('focus', eventArgs);
14719
+ };
14720
+ TextArea.prototype.focusOutHandler = function (args) {
14721
+ if (!(this.previousValue === null && this.value === null) &&
14722
+ (this.previousValue !== this.value)) {
14723
+ this.raiseChangeEvent(args, true);
14724
+ }
14725
+ var eventArgs = {
14726
+ container: this.textareaWrapper.container,
14727
+ event: args,
14728
+ value: this.value
14729
+ };
14730
+ this.trigger('blur', eventArgs);
14731
+ };
14732
+ TextArea.prototype.keydownHandler = function (args) {
14733
+ if ((args.keyCode === 13 || args.keyCode === 9) && !((this.previousValue === null || this.previousValue === '') && (this.value === null || this.value === '') && this.element.value === '')) {
14734
+ this.setProperties({ value: this.element.value }, true);
14735
+ }
14736
+ };
14737
+ TextArea.prototype.inputHandler = function (args) {
14738
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-this-alias
14739
+ var textareaObj = this;
14740
+ var eventArgs = {
14741
+ event: args,
14742
+ value: this.element.value,
14743
+ previousValue: this.inputPreviousValue,
14744
+ container: this.textareaWrapper.container
14745
+ };
14746
+ this.inputPreviousValue = this.element.value;
14747
+ /* istanbul ignore next */
14748
+ if (this.isAngular) {
14749
+ textareaObj.localChange({ value: this.element.value });
14750
+ this.preventChange = true;
14751
+ }
14752
+ if (this.isVue) {
14753
+ this.preventChange = true;
14754
+ }
14755
+ this.trigger('input', eventArgs);
14756
+ args.stopPropagation();
14757
+ };
14758
+ TextArea.prototype.changeHandler = function (args) {
14759
+ this.setProperties({ value: this.element.value }, true);
14760
+ if (this.previousValue !== this.value) {
14761
+ this.raiseChangeEvent(args, true);
14762
+ }
14763
+ args.stopPropagation();
14764
+ };
14765
+ TextArea.prototype.raiseChangeEvent = function (event, interaction) {
14766
+ var eventArgs = {
14767
+ event: event,
14768
+ value: this.value,
14769
+ previousValue: this.previousValue,
14770
+ container: this.textareaWrapper.container,
14771
+ isInteraction: interaction ? interaction : false,
14772
+ isInteracted: interaction ? interaction : false
14773
+ };
14774
+ this.preventChange = false;
14775
+ this.trigger('change', eventArgs);
14776
+ this.previousValue = this.value;
14777
+ };
14778
+ TextArea.prototype.updateHTMLAttributesToWrapper = function () {
14779
+ Input.updateHTMLAttributesToWrapper(this.htmlAttributes, this.textareaWrapper.container);
14780
+ };
14781
+ TextArea.prototype.updateHTMLAttributesToElement = function () {
14782
+ Input.updateHTMLAttributesToElement(this.htmlAttributes, this.element);
14783
+ };
14784
+ TextArea.prototype.bindClearEvent = function () {
14785
+ if (this.showClearButton) {
14786
+ if (this.enabled) {
14787
+ EventHandler.add(this.textareaWrapper.clearButton, 'mousedown touchstart', this.resetInputHandler, this);
14788
+ }
14789
+ else {
14790
+ EventHandler.remove(this.textareaWrapper.clearButton, 'mousedown touchstart', this.resetInputHandler);
14791
+ }
14792
+ }
14793
+ };
14794
+ TextArea.prototype.resetInputHandler = function (event) {
14795
+ event.preventDefault();
14796
+ if (!(this.textareaWrapper.clearButton.classList.contains(HIDE_CLEAR$1)) || this.textareaWrapper.container.classList.contains('e-static-clear')) {
14797
+ Input.setValue('', this.element, this.floatLabelType, this.showClearButton);
14798
+ this.setProperties({ value: this.element.value }, true);
14799
+ }
14800
+ var eventArgs = {
14801
+ event: event,
14802
+ value: this.element.value,
14803
+ previousValue: this.inputPreviousValue,
14804
+ container: this.textareaWrapper.container
14805
+ };
14806
+ this.trigger('input', eventArgs);
14807
+ this.inputPreviousValue = this.element.value;
14808
+ this.raiseChangeEvent(event, true);
14809
+ if (closest(this.element, 'form')) {
14810
+ var element = this.element;
14811
+ var keyupEvent = document.createEvent('KeyboardEvent');
14812
+ keyupEvent.initEvent('keyup', false, true);
14813
+ element.dispatchEvent(keyupEvent);
14814
+ }
14815
+ };
14816
+ /* eslint-enable valid-jsdoc, jsdoc/require-returns */
14817
+ /**
14818
+ * Adding the multiple attributes as key-value pair to the TextArea element.
14819
+ *
14820
+ * @param {string} attributes - Specifies the attributes to be add to TextArea element.
14821
+ * @returns {void}
14822
+ */
14823
+ TextArea.prototype.addAttributes = function (attributes$$1) {
14824
+ for (var _i = 0, _a = Object.keys(attributes$$1); _i < _a.length; _i++) {
14825
+ var key = _a[_i];
14826
+ if (key === 'disabled') {
14827
+ this.setProperties({ enabled: false }, true);
14828
+ Input.setEnabled(this.enabled, this.element, this.floatLabelType, this.textareaWrapper.container);
14829
+ }
14830
+ else if (key === 'readonly') {
14831
+ this.setProperties({ readonly: true }, true);
14832
+ Input.setReadonly(this.readonly, this.element);
14833
+ }
14834
+ else if (key === 'class') {
14835
+ this.element.classList.add(attributes$$1["" + key]);
14836
+ }
14837
+ else if (key === 'placeholder') {
14838
+ this.setProperties({ placeholder: attributes$$1["" + key] }, true);
14839
+ Input.setPlaceholder(this.placeholder, this.element);
14840
+ }
14841
+ else {
14842
+ this.element.setAttribute(key, attributes$$1["" + key]);
14843
+ }
14844
+ }
14845
+ };
14846
+ /**
14847
+ * Removing the multiple attributes as key-value pair to the TextArea element.
14848
+ *
14849
+ * @param { string[] } attributes - Specifies the attributes name to be removed from TextArea element.
14850
+ * @returns {void}
14851
+ */
14852
+ TextArea.prototype.removeAttributes = function (attributes$$1) {
14853
+ for (var _i = 0, attributes_1 = attributes$$1; _i < attributes_1.length; _i++) {
14854
+ var key = attributes_1[_i];
14855
+ if (key === 'disabled') {
14856
+ this.setProperties({ enabled: true }, true);
14857
+ Input.setEnabled(this.enabled, this.element, this.floatLabelType, this.textareaWrapper.container);
14858
+ }
14859
+ else if (key === 'readonly') {
14860
+ this.setProperties({ readonly: false }, true);
14861
+ Input.setReadonly(this.readonly, this.element);
14862
+ }
14863
+ else if (key === 'placeholder') {
14864
+ this.setProperties({ placeholder: null }, true);
14865
+ Input.setPlaceholder(this.placeholder, this.element);
14866
+ }
14867
+ else {
14868
+ this.element.removeAttribute(key);
14869
+ }
14870
+ }
14871
+ };
14872
+ /**
14873
+ * Sets the focus to widget for interaction.
14874
+ *
14875
+ * @returns {void}
14876
+ */
14877
+ TextArea.prototype.focusIn = function () {
14878
+ if (document.activeElement !== this.element && this.enabled) {
14879
+ this.element.focus();
14880
+ if (this.textareaWrapper.container.classList.contains('e-input-group')
14881
+ || this.textareaWrapper.container.classList.contains('e-outline')
14882
+ || this.textareaWrapper.container.classList.contains('e-filled')) {
14883
+ addClass([this.textareaWrapper.container], [TEXTBOX_FOCUS]);
14884
+ }
14885
+ }
14886
+ };
14887
+ /**
14888
+ * Remove the focus from widget, if the widget is in focus state.
14889
+ *
14890
+ * @returns {void}
14891
+ */
14892
+ TextArea.prototype.focusOut = function () {
14893
+ if (document.activeElement === this.element && this.enabled) {
14894
+ this.element.blur();
14895
+ if (this.textareaWrapper.container.classList.contains('e-input-group')
14896
+ || this.textareaWrapper.container.classList.contains('e-outline')
14897
+ || this.textareaWrapper.container.classList.contains('e-filled')) {
14898
+ removeClass([this.textareaWrapper.container], [TEXTBOX_FOCUS]);
14899
+ }
14900
+ }
14901
+ };
14902
+ /**
14903
+ * Sets up the width for the textarea wrapper.
14904
+ *
14905
+ * @returns {void}
14906
+ */
14907
+ TextArea.prototype.setWrapperWidth = function () {
14908
+ if (this.enabled && ((this.resizeMode !== 'None' && this.resizeMode !== 'Vertical') || (this.columnsCount || this.element.getAttribute('cols')))) {
14909
+ if (this.resizeMode !== 'None' && this.resizeMode !== 'Vertical') {
14910
+ if (this.textareaWrapper.container.style.width) {
14911
+ this.setElementWidth(this.textareaWrapper.container.style.width);
14912
+ this.textareaWrapper.container.style.width = '';
14913
+ this.textareaWrapper.container.classList.add(AUTO_WIDTH);
14914
+ }
14915
+ }
14916
+ this.textareaWrapper.container.classList.add(AUTO_WIDTH);
14917
+ }
14918
+ else {
14919
+ if (this.textareaWrapper.container.classList.contains(AUTO_WIDTH)) {
14920
+ this.textareaWrapper.container.classList.remove(AUTO_WIDTH);
14921
+ }
14922
+ }
14923
+ };
14924
+ TextArea.prototype.resetForm = function () {
14925
+ if (this.isAngular) {
14926
+ this.resetValue('');
14927
+ }
14928
+ else {
14929
+ this.resetValue(this.initialValue);
14930
+ }
14931
+ if (!isNullOrUndefined(this.textareaWrapper)) {
14932
+ var label = this.textareaWrapper.container.querySelector('.e-float-text');
14933
+ if (!isNullOrUndefined(label) && this.floatLabelType !== 'Always') {
14934
+ if ((isNullOrUndefined(this.initialValue) || this.initialValue === '')) {
14935
+ label.classList.add('e-label-bottom');
14936
+ label.classList.remove('e-label-top');
14937
+ }
14938
+ else if (this.initialValue !== '') {
14939
+ label.classList.add('e-label-top');
14940
+ label.classList.remove('e-label-bottom');
14941
+ }
14942
+ }
14943
+ }
14944
+ };
14945
+ TextArea.prototype.resetValue = function (value) {
14946
+ var prevOnChange = this.isProtectedOnChange;
14947
+ this.isProtectedOnChange = true;
14948
+ this.value = value;
14949
+ if (value == null && this.textareaWrapper.container.classList.contains('e-valid-input')) {
14950
+ this.textareaWrapper.container.classList.remove('e-valid-input');
14951
+ }
14952
+ this.isProtectedOnChange = prevOnChange;
14953
+ };
14954
+ TextArea.prototype.setElementWidth = function (width) {
14955
+ if (typeof width === 'number') {
14956
+ this.element.style.width = formatUnit(width);
14957
+ }
14958
+ else if (typeof width === 'string') {
14959
+ this.element.style.width = (width.match(/px|%|em/)) ? (width) : (formatUnit(width));
14960
+ }
14961
+ };
14962
+ TextArea.prototype.getCurrentResizeClass = function (resizeMode) {
14963
+ return resizeMode === 'None' ? RESIZE_NONE : (resizeMode === 'Both' ? RESIZE_XY : resizeMode === 'Horizontal' ? RESIZE_X : RESIZE_Y);
14964
+ };
14965
+ __decorate$7([
14966
+ Property(false)
14967
+ ], TextArea.prototype, "readonly", void 0);
14968
+ __decorate$7([
14969
+ Property(null)
14970
+ ], TextArea.prototype, "value", void 0);
14971
+ __decorate$7([
14972
+ Property('Never')
14973
+ ], TextArea.prototype, "floatLabelType", void 0);
14974
+ __decorate$7([
14975
+ Property('')
14976
+ ], TextArea.prototype, "cssClass", void 0);
14977
+ __decorate$7([
14978
+ Property(null)
14979
+ ], TextArea.prototype, "placeholder", void 0);
14980
+ __decorate$7([
14981
+ Property({})
14982
+ ], TextArea.prototype, "htmlAttributes", void 0);
14983
+ __decorate$7([
14984
+ Property(true)
14985
+ ], TextArea.prototype, "enabled", void 0);
14986
+ __decorate$7([
14987
+ Property(false)
14988
+ ], TextArea.prototype, "showClearButton", void 0);
14989
+ __decorate$7([
14990
+ Property(false)
14991
+ ], TextArea.prototype, "enablePersistence", void 0);
14992
+ __decorate$7([
14993
+ Property(null)
14994
+ ], TextArea.prototype, "width", void 0);
14995
+ __decorate$7([
14996
+ Property('Vertical')
14997
+ ], TextArea.prototype, "resizeMode", void 0);
14998
+ __decorate$7([
14999
+ Property(null)
15000
+ ], TextArea.prototype, "maxLength", void 0);
15001
+ __decorate$7([
15002
+ Property(null)
15003
+ ], TextArea.prototype, "columnsCount", void 0);
15004
+ __decorate$7([
15005
+ Property(null)
15006
+ ], TextArea.prototype, "rowsCount", void 0);
15007
+ __decorate$7([
15008
+ Event()
15009
+ ], TextArea.prototype, "created", void 0);
15010
+ __decorate$7([
15011
+ Event()
15012
+ ], TextArea.prototype, "destroyed", void 0);
15013
+ __decorate$7([
15014
+ Event()
15015
+ ], TextArea.prototype, "change", void 0);
15016
+ __decorate$7([
15017
+ Event()
15018
+ ], TextArea.prototype, "blur", void 0);
15019
+ __decorate$7([
15020
+ Event()
15021
+ ], TextArea.prototype, "focus", void 0);
15022
+ __decorate$7([
15023
+ Event()
15024
+ ], TextArea.prototype, "input", void 0);
15025
+ TextArea = __decorate$7([
15026
+ NotifyPropertyChanges
15027
+ ], TextArea);
15028
+ return TextArea;
15029
+ }(Component));
15030
+
15031
+ /**
15032
+ * Uploader modules
15033
+ */
15034
+
15035
+ var __extends$9 = (undefined && undefined.__extends) || (function () {
15036
+ var extendStatics = function (d, b) {
15037
+ extendStatics = Object.setPrototypeOf ||
15038
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
15039
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
15040
+ return extendStatics(d, b);
15041
+ };
15042
+ return function (d, b) {
15043
+ extendStatics(d, b);
15044
+ function __() { this.constructor = d; }
15045
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15046
+ };
15047
+ })();
15048
+ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
15049
+ __extends$9(SignatureBase, _super);
15050
+ function SignatureBase() {
15051
+ var _this = _super !== null && _super.apply(this, arguments) || this;
15052
+ /* minDistance(distance between the two point) was calaculated for smoothness.*/
15053
+ _this.minDistance = 5;
15054
+ _this.previous = 0;
15055
+ /* interval handles for the smoothness in the mouse move event.*/
15056
+ _this.interval = 30;
15057
+ _this.timeout = null;
15058
+ _this.isSignatureEmpty = true;
15059
+ _this.backgroundLoaded = null;
15060
+ _this.isBlazor = false;
15061
+ _this.isResponsive = false;
15062
+ _this.signPointsColl = [];
15063
+ _this.signRatioPointsColl = [];
15064
+ _this.canRedraw = true;
15065
+ return _this;
15066
+ }
15067
+ /**
15068
+ * To Initialize the component rendering
15069
+ *
15070
+ * @private
15071
+ * @param {HTMLCanvasElement} element - Specifies the canvas element.
15072
+ * @param {BlazorDotnetObject} dotnetRef - Specifies for blazor client to server communication.
15073
+ * @returns {void}
15074
+ */
15075
+ SignatureBase.prototype.initialize = function (element, dotnetRef) {
15076
+ this.clearArray = [];
15077
+ this.element = element;
15078
+ this.canvasContext = this.element.getContext('2d');
15079
+ this.canvasContext.canvas.tabIndex = -1;
15080
+ if (dotnetRef) {
15081
+ this.dotnetRef = dotnetRef;
15082
+ this.isBlazor = true;
15083
+ if (this.signatureValue) {
15084
+ this.loadPersistedSignature();
15085
+ }
15086
+ }
15087
+ this.setHTMLProperties();
15088
+ if (isNullOrUndefined(this.signatureValue)) {
15089
+ this.updateSnapCollection(true);
15090
+ }
15091
+ this.wireEvents();
15092
+ if (!this.isBlazor) {
15093
+ this.trigger('created', null);
15094
+ }
15095
+ };
15096
+ SignatureBase.prototype.wireEvents = function () {
15097
+ if (isNullOrUndefined(this.pointColl) && !this.isReadOnly && !this.disabled) {
15098
+ EventHandler.add(this.canvasContext.canvas, 'mousedown touchstart', this.mouseDownHandler, this);
15099
+ EventHandler.add(this.canvasContext.canvas, 'keydown', this.keyboardHandler, this);
15100
+ window.addEventListener('resize', this.resizeHandler.bind(this));
15101
+ }
15102
+ else if (this.pointColl) {
15103
+ EventHandler.add(this.canvasContext.canvas, 'mousemove touchmove', this.mouseMoveHandler, this);
15104
+ EventHandler.add(this.canvasContext.canvas, 'mouseup touchend', this.mouseUpHandler, this);
15105
+ EventHandler.add(document, 'mouseup', this.mouseUpHandler, this);
15106
+ }
15107
+ };
15108
+ SignatureBase.prototype.unwireEvents = function (type) {
15109
+ if (type === 'mouseup' || type === 'touchend') {
15110
+ EventHandler.remove(this.canvasContext.canvas, 'mousemove touchmove', this.mouseMoveHandler);
15111
+ EventHandler.remove(this.canvasContext.canvas, 'mouseup touchend', this.mouseUpHandler);
15112
+ EventHandler.remove(document, 'mouseup', this.mouseUpHandler);
15113
+ }
15114
+ else {
15115
+ EventHandler.remove(this.canvasContext.canvas, 'mousedown touchstart', this.mouseDownHandler);
15116
+ EventHandler.remove(this.canvasContext.canvas, 'keydown', this.keyboardHandler);
15117
+ window.removeEventListener('resize', this.resizeHandler);
15118
+ }
15119
+ };
15120
+ SignatureBase.prototype.setHTMLProperties = function () {
15121
+ if (this.element.height === 150 && this.element.width === 300 && this.element.offsetHeight !== 0 && this.element.offsetWidth !== 0) {
15122
+ this.element.height = this.element.offsetHeight;
15123
+ this.element.width = this.element.offsetWidth;
15124
+ this.isResponsive = true;
15125
+ }
15126
+ else if ((this.element.height !== this.element.offsetHeight - 1 || this.element.width !== this.element.offsetWidth - 1)
15127
+ && this.element.offsetHeight !== 0 && this.element.offsetWidth !== 0) {
15128
+ this.element.height = this.element.offsetHeight;
15129
+ this.element.width = this.element.offsetWidth;
15130
+ }
15131
+ this.canvasContext.fillStyle = this.strokeColor;
15132
+ this.tempCanvas = this.createElement('canvas', { className: 'e-' + this.getModuleName() + '-temp' });
15133
+ this.tempContext = this.tempCanvas.getContext('2d');
15134
+ this.tempCanvas.width = this.element.width;
15135
+ this.tempCanvas.height = this.element.height;
15136
+ if (this.backgroundImage) {
15137
+ this.canvasContext.canvas.style.backgroundImage = 'url(' + this.backgroundImage + ')';
15138
+ this.canvasContext.canvas.style.backgroundRepeat = 'no-repeat';
15139
+ if (this.saveWithBackground) {
15140
+ this.setBackgroundImage(this.backgroundImage, 'temp');
15141
+ }
15142
+ }
15143
+ else if (this.backgroundColor) {
15144
+ this.canvasContext.canvas.style.backgroundColor = this.backgroundColor;
15145
+ }
15146
+ };
15147
+ // eslint-disable-next-line
15148
+ SignatureBase.prototype.mouseDownHandler = function (e) {
15149
+ if (e.buttons === 1 || e.buttons === 2 || e.type === 'touchstart') {
15150
+ if (e.type === 'touchstart') {
15151
+ e.preventDefault();
15152
+ e.stopPropagation();
14311
15153
  }
14312
15154
  this.beginStroke(e);
14313
15155
  this.wireEvents();
@@ -14381,7 +15223,7 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
14381
15223
  SignatureBase.prototype.resizeHandler = function () {
14382
15224
  // eslint-disable-next-line @typescript-eslint/no-this-alias
14383
15225
  var proxy = this;
14384
- if (this.isResponsive) {
15226
+ if (this.isResponsive && this.canRedraw) {
14385
15227
  this.canvasContext.canvas.width = this.element.offsetWidth;
14386
15228
  this.canvasContext.canvas.height = this.element.offsetHeight;
14387
15229
  this.canvasContext.scale(1, 1);
@@ -14761,7 +15603,7 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
14761
15603
  this.internalRefresh();
14762
15604
  this.signRatioPointsColl = [];
14763
15605
  this.updateSnapCollection(true);
14764
- this.isSignatureEmpty = true;
15606
+ this.isSignatureEmpty = this.canRedraw = true;
14765
15607
  if (!this.isBlazor) {
14766
15608
  this.trigger('change', args);
14767
15609
  }
@@ -14925,7 +15767,7 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
14925
15767
  proxy.updateSnapCollection();
14926
15768
  });
14927
15769
  };
14928
- this.isSignatureEmpty = false;
15770
+ this.isSignatureEmpty = this.canRedraw = false;
14929
15771
  };
14930
15772
  SignatureBase.prototype.saveBackground = function (savebg) {
14931
15773
  var imageSrc;
@@ -15176,7 +16018,7 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
15176
16018
  return SignatureBase;
15177
16019
  }(Component));
15178
16020
 
15179
- var __extends$7 = (undefined && undefined.__extends) || (function () {
16021
+ var __extends$8 = (undefined && undefined.__extends) || (function () {
15180
16022
  var extendStatics = function (d, b) {
15181
16023
  extendStatics = Object.setPrototypeOf ||
15182
16024
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -15189,7 +16031,7 @@ var __extends$7 = (undefined && undefined.__extends) || (function () {
15189
16031
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15190
16032
  };
15191
16033
  })();
15192
- var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
16034
+ var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
15193
16035
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15194
16036
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
15195
16037
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -15211,7 +16053,7 @@ var __decorate$7 = (undefined && undefined.__decorate) || function (decorators,
15211
16053
  * ```
15212
16054
  */
15213
16055
  var Signature = /** @__PURE__ @class */ (function (_super) {
15214
- __extends$7(Signature, _super);
16056
+ __extends$8(Signature, _super);
15215
16057
  /**
15216
16058
  * Constructor for creating the widget.
15217
16059
  *
@@ -15235,6 +16077,8 @@ var Signature = /** @__PURE__ @class */ (function (_super) {
15235
16077
  this.initialize();
15236
16078
  };
15237
16079
  Signature.prototype.initialize = function () {
16080
+ this.element.setAttribute('role', 'img');
16081
+ this.element.setAttribute('aria-label', 'signature');
15238
16082
  addClass([this.element], 'e-' + this.getModuleName());
15239
16083
  _super.prototype.initialize.call(this, this.element);
15240
16084
  if (this.enablePersistence) {
@@ -15293,52 +16137,52 @@ var Signature = /** @__PURE__ @class */ (function (_super) {
15293
16137
  }
15294
16138
  }
15295
16139
  };
15296
- __decorate$7([
16140
+ __decorate$8([
15297
16141
  Property('')
15298
16142
  ], Signature.prototype, "backgroundColor", void 0);
15299
- __decorate$7([
16143
+ __decorate$8([
15300
16144
  Property('')
15301
16145
  ], Signature.prototype, "backgroundImage", void 0);
15302
- __decorate$7([
16146
+ __decorate$8([
15303
16147
  Property(false)
15304
16148
  ], Signature.prototype, "disabled", void 0);
15305
- __decorate$7([
16149
+ __decorate$8([
15306
16150
  Property(false)
15307
16151
  ], Signature.prototype, "isReadOnly", void 0);
15308
- __decorate$7([
16152
+ __decorate$8([
15309
16153
  Property(true)
15310
16154
  ], Signature.prototype, "saveWithBackground", void 0);
15311
- __decorate$7([
16155
+ __decorate$8([
15312
16156
  Property('#000000')
15313
16157
  ], Signature.prototype, "strokeColor", void 0);
15314
- __decorate$7([
16158
+ __decorate$8([
15315
16159
  Property(0.5)
15316
16160
  ], Signature.prototype, "minStrokeWidth", void 0);
15317
- __decorate$7([
16161
+ __decorate$8([
15318
16162
  Property(2)
15319
16163
  ], Signature.prototype, "maxStrokeWidth", void 0);
15320
- __decorate$7([
16164
+ __decorate$8([
15321
16165
  Property(0.7)
15322
16166
  ], Signature.prototype, "velocity", void 0);
15323
- __decorate$7([
16167
+ __decorate$8([
15324
16168
  Property('en-US')
15325
16169
  ], Signature.prototype, "locale", void 0);
15326
- __decorate$7([
16170
+ __decorate$8([
15327
16171
  Property(false)
15328
16172
  ], Signature.prototype, "enableRtl", void 0);
15329
- __decorate$7([
16173
+ __decorate$8([
15330
16174
  Property(false)
15331
16175
  ], Signature.prototype, "enablePersistence", void 0);
15332
- __decorate$7([
16176
+ __decorate$8([
15333
16177
  Event()
15334
16178
  ], Signature.prototype, "beforeSave", void 0);
15335
- __decorate$7([
16179
+ __decorate$8([
15336
16180
  Event()
15337
16181
  ], Signature.prototype, "change", void 0);
15338
- __decorate$7([
16182
+ __decorate$8([
15339
16183
  Event()
15340
16184
  ], Signature.prototype, "created", void 0);
15341
- Signature = __decorate$7([
16185
+ Signature = __decorate$8([
15342
16186
  NotifyPropertyChanges
15343
16187
  ], Signature);
15344
16188
  return Signature;
@@ -15348,7 +16192,7 @@ var Signature = /** @__PURE__ @class */ (function (_super) {
15348
16192
  * Signature modules
15349
16193
  */
15350
16194
 
15351
- var __extends$9 = (undefined && undefined.__extends) || (function () {
16195
+ var __extends$10 = (undefined && undefined.__extends) || (function () {
15352
16196
  var extendStatics = function (d, b) {
15353
16197
  extendStatics = Object.setPrototypeOf ||
15354
16198
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -15361,7 +16205,7 @@ var __extends$9 = (undefined && undefined.__extends) || (function () {
15361
16205
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15362
16206
  };
15363
16207
  })();
15364
- var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
16208
+ var __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
15365
16209
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15366
16210
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
15367
16211
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -15443,7 +16287,7 @@ var PrecisionType;
15443
16287
  * ```
15444
16288
  */
15445
16289
  var Rating = /** @__PURE__ @class */ (function (_super) {
15446
- __extends$9(Rating, _super);
16290
+ __extends$10(Rating, _super);
15447
16291
  /**
15448
16292
  * Constructor for creating the widget
15449
16293
  *
@@ -15934,6 +16778,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15934
16778
  });
15935
16779
  };
15936
16780
  Rating.prototype.keyActionHandler = function (e) {
16781
+ e.preventDefault();
15937
16782
  if (this.disabled || this.readOnly) {
15938
16783
  return;
15939
16784
  }
@@ -16121,73 +16966,73 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
16121
16966
  }
16122
16967
  }
16123
16968
  };
16124
- __decorate$8([
16969
+ __decorate$9([
16125
16970
  Property(false)
16126
16971
  ], Rating.prototype, "allowReset", void 0);
16127
- __decorate$8([
16972
+ __decorate$9([
16128
16973
  Property('')
16129
16974
  ], Rating.prototype, "cssClass", void 0);
16130
- __decorate$8([
16975
+ __decorate$9([
16131
16976
  Property(false)
16132
16977
  ], Rating.prototype, "disabled", void 0);
16133
- __decorate$8([
16978
+ __decorate$9([
16134
16979
  Property('')
16135
16980
  ], Rating.prototype, "emptyTemplate", void 0);
16136
- __decorate$8([
16981
+ __decorate$9([
16137
16982
  Property(true)
16138
16983
  ], Rating.prototype, "enableAnimation", void 0);
16139
- __decorate$8([
16984
+ __decorate$9([
16140
16985
  Property(false)
16141
16986
  ], Rating.prototype, "enableSingleSelection", void 0);
16142
- __decorate$8([
16987
+ __decorate$9([
16143
16988
  Property('')
16144
16989
  ], Rating.prototype, "fullTemplate", void 0);
16145
- __decorate$8([
16990
+ __decorate$9([
16146
16991
  Property(5)
16147
16992
  ], Rating.prototype, "itemsCount", void 0);
16148
- __decorate$8([
16993
+ __decorate$9([
16149
16994
  Property(LabelPosition.Right)
16150
16995
  ], Rating.prototype, "labelPosition", void 0);
16151
- __decorate$8([
16996
+ __decorate$9([
16152
16997
  Property('')
16153
16998
  ], Rating.prototype, "labelTemplate", void 0);
16154
- __decorate$8([
16999
+ __decorate$9([
16155
17000
  Property(0.0)
16156
17001
  ], Rating.prototype, "min", void 0);
16157
- __decorate$8([
17002
+ __decorate$9([
16158
17003
  Property(PrecisionType.Full)
16159
17004
  ], Rating.prototype, "precision", void 0);
16160
- __decorate$8([
17005
+ __decorate$9([
16161
17006
  Property(false)
16162
17007
  ], Rating.prototype, "readOnly", void 0);
16163
- __decorate$8([
17008
+ __decorate$9([
16164
17009
  Property(false)
16165
17010
  ], Rating.prototype, "showLabel", void 0);
16166
- __decorate$8([
17011
+ __decorate$9([
16167
17012
  Property(true)
16168
17013
  ], Rating.prototype, "showTooltip", void 0);
16169
- __decorate$8([
17014
+ __decorate$9([
16170
17015
  Property('')
16171
17016
  ], Rating.prototype, "tooltipTemplate", void 0);
16172
- __decorate$8([
17017
+ __decorate$9([
16173
17018
  Property(0.0)
16174
17019
  ], Rating.prototype, "value", void 0);
16175
- __decorate$8([
17020
+ __decorate$9([
16176
17021
  Property(true)
16177
17022
  ], Rating.prototype, "visible", void 0);
16178
- __decorate$8([
17023
+ __decorate$9([
16179
17024
  Event()
16180
17025
  ], Rating.prototype, "beforeItemRender", void 0);
16181
- __decorate$8([
17026
+ __decorate$9([
16182
17027
  Event()
16183
17028
  ], Rating.prototype, "created", void 0);
16184
- __decorate$8([
17029
+ __decorate$9([
16185
17030
  Event()
16186
17031
  ], Rating.prototype, "onItemHover", void 0);
16187
- __decorate$8([
17032
+ __decorate$9([
16188
17033
  Event()
16189
17034
  ], Rating.prototype, "valueChanged", void 0);
16190
- Rating = __decorate$8([
17035
+ Rating = __decorate$9([
16191
17036
  NotifyPropertyChanges
16192
17037
  ], Rating);
16193
17038
  return Rating;
@@ -16205,5 +17050,5 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
16205
17050
  * NumericTextBox all modules
16206
17051
  */
16207
17052
 
16208
- export { NumericTextBox, regularExpressions, createMask, applyMask, wireEvents, unwireEvents, bindClearEvent, unstrippedValue, strippedValue, maskInputMouseDownHandler, maskInputMouseUpHandler, maskInputFocusHandler, triggerFocus, escapeRegExp, maskInputBlurHandler, maskInputDropHandler, mobileRemoveFunction, setMaskValue, setElementValue, maskInput, getVal, getMaskedVal, MaskUndo, MaskedTextBox, Input, TicksData, ColorRangeData, LimitData, TooltipData, Slider, regex, ErrorOption, FormValidator, FilesProp, ButtonsProps, AsyncSettings, Uploader, ColorPicker, TextBox, Signature, LabelPosition, PrecisionType, Rating, SignatureBase };
17053
+ export { NumericTextBox, regularExpressions, createMask, applyMask, wireEvents, unwireEvents, bindClearEvent, unstrippedValue, strippedValue, maskInputMouseDownHandler, maskInputMouseUpHandler, maskInputFocusHandler, triggerFocus, escapeRegExp, maskInputBlurHandler, maskInputDropHandler, mobileRemoveFunction, setMaskValue, setElementValue, maskInput, getVal, getMaskedVal, MaskUndo, MaskedTextBox, containerAttributes, TEXTBOX_FOCUS, Input, TicksData, ColorRangeData, LimitData, TooltipData, Slider, regex, ErrorOption, FormValidator, FilesProp, ButtonsProps, AsyncSettings, Uploader, ColorPicker, TextBox, TextArea, Signature, LabelPosition, PrecisionType, Rating, SignatureBase };
16209
17054
  //# sourceMappingURL=ej2-inputs.es5.js.map