@syncfusion/ej2-inputs 21.2.9 → 22.1.38

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 (174) hide show
  1. package/.eslintrc.json +1 -0
  2. package/CHANGELOG.md +30 -0
  3. package/dist/ej2-inputs.min.js +2 -2
  4. package/dist/ej2-inputs.umd.min.js +2 -2
  5. package/dist/ej2-inputs.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-inputs.es2015.js +171 -134
  7. package/dist/es6/ej2-inputs.es2015.js.map +1 -1
  8. package/dist/es6/ej2-inputs.es5.js +173 -137
  9. package/dist/es6/ej2-inputs.es5.js.map +1 -1
  10. package/dist/global/ej2-inputs.min.js +2 -2
  11. package/dist/global/ej2-inputs.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +9 -9
  14. package/src/color-picker/color-picker.d.ts +1 -0
  15. package/src/color-picker/color-picker.js +3 -14
  16. package/src/form-validator/form-validator.js +21 -3
  17. package/src/input/input.js +17 -23
  18. package/src/numerictextbox/numerictextbox.js +6 -2
  19. package/src/rating/rating-model.d.ts +31 -27
  20. package/src/rating/rating.d.ts +8 -4
  21. package/src/rating/rating.js +26 -19
  22. package/src/slider/slider-model.d.ts +1 -1
  23. package/src/slider/slider.d.ts +31 -65
  24. package/src/slider/slider.js +86 -55
  25. package/src/textbox/textbox.js +3 -5
  26. package/src/uploader/uploader-model.d.ts +2 -1
  27. package/src/uploader/uploader.d.ts +4 -2
  28. package/src/uploader/uploader.js +14 -18
  29. package/styles/bootstrap-dark.css +23 -3
  30. package/styles/bootstrap.css +23 -3
  31. package/styles/bootstrap4.css +23 -4
  32. package/styles/bootstrap5-dark.css +23 -3
  33. package/styles/bootstrap5.css +23 -3
  34. package/styles/color-picker/_layout.scss +49 -5
  35. package/styles/color-picker/_material3-dark-definition.scss +1 -0
  36. package/styles/color-picker/_material3-definition.scss +141 -0
  37. package/styles/color-picker/_theme.scss +6 -1
  38. package/styles/color-picker/fluent-dark.css +1 -0
  39. package/styles/color-picker/fluent.css +1 -0
  40. package/styles/color-picker/icons/_material3-dark.scss +1 -0
  41. package/styles/color-picker/material3-dark.css +880 -0
  42. package/styles/color-picker/material3-dark.scss +12 -0
  43. package/styles/color-picker/material3.css +936 -0
  44. package/styles/color-picker/material3.scss +12 -0
  45. package/styles/fabric-dark.css +23 -3
  46. package/styles/fabric.css +23 -3
  47. package/styles/fluent-dark.css +24 -3
  48. package/styles/fluent.css +24 -3
  49. package/styles/highcontrast-light.css +23 -3
  50. package/styles/highcontrast.css +23 -3
  51. package/styles/input/_layout.scss +303 -109
  52. package/styles/input/_material3-dark-definition.scss +1 -0
  53. package/styles/input/_material3-definition.scss +548 -0
  54. package/styles/input/_theme.scss +3 -2
  55. package/styles/input/bootstrap-dark.css +15 -1
  56. package/styles/input/bootstrap.css +15 -1
  57. package/styles/input/bootstrap4.css +15 -1
  58. package/styles/input/bootstrap5-dark.css +15 -1
  59. package/styles/input/bootstrap5.css +15 -1
  60. package/styles/input/fabric-dark.css +15 -1
  61. package/styles/input/fabric.css +15 -1
  62. package/styles/input/fluent-dark.css +15 -1
  63. package/styles/input/fluent.css +15 -1
  64. package/styles/input/highcontrast-light.css +15 -1
  65. package/styles/input/highcontrast.css +15 -1
  66. package/styles/input/icons/_material3-dark.scss +1 -0
  67. package/styles/input/material-dark.css +121 -66
  68. package/styles/input/material.css +121 -66
  69. package/styles/input/material3-dark.css +12384 -0
  70. package/styles/input/material3-dark.scss +5 -0
  71. package/styles/input/material3.css +12440 -0
  72. package/styles/input/material3.scss +5 -0
  73. package/styles/input/tailwind-dark.css +15 -1
  74. package/styles/input/tailwind.css +15 -1
  75. package/styles/maskedtextbox/_material3-dark-definition.scss +1 -0
  76. package/styles/maskedtextbox/_material3-definition.scss +4 -0
  77. package/styles/maskedtextbox/material3-dark.css +104 -0
  78. package/styles/maskedtextbox/material3-dark.scss +5 -0
  79. package/styles/maskedtextbox/material3.css +160 -0
  80. package/styles/maskedtextbox/material3.scss +5 -0
  81. package/styles/material-dark.css +131 -68
  82. package/styles/material.css +131 -68
  83. package/styles/material3-dark.css +15146 -0
  84. package/styles/material3-dark.scss +11 -0
  85. package/styles/material3.css +15202 -0
  86. package/styles/material3.scss +11 -0
  87. package/styles/numerictextbox/_material3-dark-definition.scss +1 -0
  88. package/styles/numerictextbox/_material3-definition.scss +4 -0
  89. package/styles/numerictextbox/icons/_material3-dark.scss +1 -0
  90. package/styles/numerictextbox/material3-dark.css +118 -0
  91. package/styles/numerictextbox/material3-dark.scss +6 -0
  92. package/styles/numerictextbox/material3.css +174 -0
  93. package/styles/numerictextbox/material3.scss +6 -0
  94. package/styles/rating/_bootstrap-dark-definition.scss +4 -3
  95. package/styles/rating/_bootstrap-definition.scss +4 -3
  96. package/styles/rating/_bootstrap4-definition.scss +4 -3
  97. package/styles/rating/_bootstrap5-definition.scss +4 -0
  98. package/styles/rating/_fabric-dark-definition.scss +4 -3
  99. package/styles/rating/_fabric-definition.scss +4 -3
  100. package/styles/rating/_fluent-definition.scss +4 -0
  101. package/styles/rating/_fusionnew-definition.scss +4 -3
  102. package/styles/rating/_highcontrast-definition.scss +4 -3
  103. package/styles/rating/_highcontrast-light-definition.scss +4 -3
  104. package/styles/rating/_layout.scss +2 -0
  105. package/styles/rating/_material-dark-definition.scss +4 -3
  106. package/styles/rating/_material-definition.scss +4 -3
  107. package/styles/rating/_material3-dark-definition.scss +1 -0
  108. package/styles/rating/_material3-definition.scss +47 -0
  109. package/styles/rating/_tailwind-definition.scss +4 -0
  110. package/styles/rating/_theme.scss +36 -14
  111. package/styles/rating/bootstrap-dark.css +8 -2
  112. package/styles/rating/bootstrap.css +8 -2
  113. package/styles/rating/bootstrap4.css +8 -3
  114. package/styles/rating/bootstrap5-dark.css +8 -2
  115. package/styles/rating/bootstrap5.css +8 -2
  116. package/styles/rating/fabric-dark.css +8 -2
  117. package/styles/rating/fabric.css +8 -2
  118. package/styles/rating/fluent-dark.css +8 -2
  119. package/styles/rating/fluent.css +8 -2
  120. package/styles/rating/highcontrast-light.css +8 -2
  121. package/styles/rating/highcontrast.css +8 -2
  122. package/styles/rating/material-dark.css +8 -2
  123. package/styles/rating/material.css +8 -2
  124. package/styles/rating/material3-dark.css +340 -0
  125. package/styles/rating/material3-dark.scss +5 -0
  126. package/styles/rating/material3.css +396 -0
  127. package/styles/rating/material3.scss +5 -0
  128. package/styles/rating/tailwind-dark.css +8 -2
  129. package/styles/rating/tailwind.css +8 -2
  130. package/styles/signature/_material3-dark-definition.scss +1 -0
  131. package/styles/signature/_material3-definition.scss +3 -0
  132. package/styles/signature/material3-dark.css +65 -0
  133. package/styles/signature/material3-dark.scss +4 -0
  134. package/styles/signature/material3.css +121 -0
  135. package/styles/signature/material3.scss +4 -0
  136. package/styles/slider/_layout.scss +60 -15
  137. package/styles/slider/_material3-dark-definition.scss +1 -0
  138. package/styles/slider/_material3-definition.scss +97 -0
  139. package/styles/slider/_theme.scss +11 -2
  140. package/styles/slider/material-dark.css +2 -0
  141. package/styles/slider/material.css +2 -0
  142. package/styles/slider/material3-dark.css +765 -0
  143. package/styles/slider/material3-dark.scss +6 -0
  144. package/styles/slider/material3.css +821 -0
  145. package/styles/slider/material3.scss +6 -0
  146. package/styles/tailwind-dark.css +23 -3
  147. package/styles/tailwind.css +23 -3
  148. package/styles/textbox/_bootstrap-dark-definition.scss +3 -0
  149. package/styles/textbox/_bootstrap-definition.scss +3 -0
  150. package/styles/textbox/_bootstrap4-definition.scss +3 -0
  151. package/styles/textbox/_bootstrap5-definition.scss +3 -0
  152. package/styles/textbox/_fabric-dark-definition.scss +3 -0
  153. package/styles/textbox/_fabric-definition.scss +3 -0
  154. package/styles/textbox/_fluent-definition.scss +3 -0
  155. package/styles/textbox/_fusionnew-definition.scss +3 -0
  156. package/styles/textbox/_highcontrast-definition.scss +3 -0
  157. package/styles/textbox/_highcontrast-light-definition.scss +3 -0
  158. package/styles/textbox/_layout.scss +27 -0
  159. package/styles/textbox/_material-dark-definition.scss +3 -0
  160. package/styles/textbox/_material-definition.scss +3 -0
  161. package/styles/textbox/_material3-dark-definition.scss +1 -0
  162. package/styles/textbox/_material3-definition.scss +4 -0
  163. package/styles/textbox/_tailwind-definition.scss +3 -0
  164. package/styles/textbox/material3-dark.css +72 -0
  165. package/styles/textbox/material3-dark.scss +5 -0
  166. package/styles/textbox/material3.css +128 -0
  167. package/styles/textbox/material3.scss +5 -0
  168. package/styles/uploader/_material3-dark-definition.scss +1 -0
  169. package/styles/uploader/_material3-definition.scss +215 -0
  170. package/styles/uploader/icons/_material3-dark.scss +1 -0
  171. package/styles/uploader/material3-dark.css +861 -0
  172. package/styles/uploader/material3-dark.scss +7 -0
  173. package/styles/uploader/material3.css +917 -0
  174. package/styles/uploader/material3.scss +7 -0
@@ -1,4 +1,4 @@
1
- import { Ajax, Animation, Base, Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, addClass, append, attributes, classList, closest, compile, createElement, detach, extend, formatUnit, getInstance, getNumericObject, getUniqueID, getValue, isNullOrUndefined, merge, onIntlChange, remove, removeClass, rippleEffect, select, selectAll, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
1
+ import { Ajax, Animation, Base, Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, addClass, append, attributes, classList, closest, compile, createElement, detach, extend, formatUnit, getInstance, getNumericObject, getUniqueID, getValue, initializeCSPTemplate, isNullOrUndefined, merge, onIntlChange, remove, removeClass, rippleEffect, select, selectAll, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
2
2
  import { Popup, Tooltip, createSpinner, getZindexPartial, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
3
3
  import { Deferred, SplitButton, getModel } from '@syncfusion/ej2-splitbuttons';
4
4
 
@@ -52,14 +52,14 @@ var Input;
52
52
  }
53
53
  bindInitialEvent(args);
54
54
  if (!isNullOrUndefined(args.properties) && !isNullOrUndefined(args.properties.showClearButton) &&
55
- args.properties.showClearButton && args.element.tagName !== 'TEXTAREA') {
55
+ args.properties.showClearButton) {
56
56
  setClearButton(args.properties.showClearButton, args.element, inputObject, true, makeElement);
57
57
  inputObject.clearButton.setAttribute('role', 'button');
58
58
  if (inputObject.container.classList.contains(CLASSNAMES.FLOATINPUT)) {
59
59
  addClass([inputObject.container], CLASSNAMES.INPUTGROUP);
60
60
  }
61
61
  }
62
- if (!isNullOrUndefined(args.buttons) && args.element.tagName !== 'TEXTAREA') {
62
+ if (!isNullOrUndefined(args.buttons)) {
63
63
  for (let i = 0; i < args.buttons.length; i++) {
64
64
  inputObject.buttons.push(appendSpan(args.buttons[i], inputObject.container, makeElement));
65
65
  }
@@ -82,9 +82,11 @@ var Input;
82
82
  || parent.classList.contains('e-filled')) {
83
83
  parent.classList.add('e-input-focus');
84
84
  }
85
- setTimeout(() => {
86
- Input.calculateWidth(args.element, parent);
87
- }, 80);
85
+ if (args.floatLabelType === 'Auto') {
86
+ setTimeout(() => {
87
+ Input.calculateWidth(args.element, parent);
88
+ }, 80);
89
+ }
88
90
  });
89
91
  args.element.addEventListener('blur', function () {
90
92
  const parent = getParentNode(this);
@@ -92,9 +94,11 @@ var Input;
92
94
  || parent.classList.contains('e-filled')) {
93
95
  parent.classList.remove('e-input-focus');
94
96
  }
95
- setTimeout(() => {
96
- Input.calculateWidth(args.element, parent);
97
- }, 80);
97
+ if (args.floatLabelType === 'Auto' && args.element.value === '') {
98
+ setTimeout(() => {
99
+ Input.calculateWidth(args.element, parent);
100
+ }, 80);
101
+ }
98
102
  });
99
103
  args.element.addEventListener('input', () => {
100
104
  checkInputValue(floatType, args.element);
@@ -148,6 +152,7 @@ var Input;
148
152
  }
149
153
  if (isNullOrUndefined(inputObject.container)) {
150
154
  inputObject.container = createInputContainer(args, CLASSNAMES.FLOATINPUT, CLASSNAMES.FLOATCUSTOMTAG, 'div', makeElement);
155
+ inputObject.container.classList.add(CLASSNAMES.INPUTGROUP);
151
156
  if (args.element.parentNode) {
152
157
  args.element.parentNode.insertBefore(inputObject.container, args.element);
153
158
  }
@@ -287,10 +292,6 @@ var Input;
287
292
  inputObject.container.querySelector('.' + CLASSNAMES.FLOATTEXT) : element;
288
293
  baseElement.insertAdjacentElement('afterend', button);
289
294
  }
290
- if (!isNullOrUndefined(container) &&
291
- container.classList.contains(CLASSNAMES.FLOATINPUT)) {
292
- addClass([container], CLASSNAMES.INPUTGROUP);
293
- }
294
295
  addClass([button], CLASSNAMES.CLEARICONHIDE);
295
296
  wireClearBtnEvents(element, button, container);
296
297
  button.setAttribute('aria-label', 'close');
@@ -298,7 +299,7 @@ var Input;
298
299
  }
299
300
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
300
301
  function wireClearBtnEvents(element, button, container) {
301
- if (!isNullOrUndefined(button) && (isBindClearAction === undefined || isBindClearAction)) {
302
+ if (isBindClearAction === undefined || isBindClearAction) {
302
303
  button.addEventListener('click', (event) => {
303
304
  if (!(element.classList.contains(CLASSNAMES.DISABLE) || element.readOnly)) {
304
305
  event.preventDefault();
@@ -379,7 +380,9 @@ var Input;
379
380
  */
380
381
  function setValue$$1(value, element, floatLabelType, clearButton) {
381
382
  element.value = value;
382
- calculateWidth(element, element.parentElement);
383
+ if (floatLabelType === 'Auto' && value === '') {
384
+ calculateWidth(element, element.parentElement);
385
+ }
383
386
  if ((!isNullOrUndefined(floatLabelType)) && floatLabelType === 'Auto') {
384
387
  validateLabel(element, floatLabelType);
385
388
  }
@@ -686,9 +689,6 @@ var Input;
686
689
  if (isPrependIcon) {
687
690
  iconEle = container.querySelector('.e-input-group-icon');
688
691
  }
689
- if (isNullOrUndefined(iconEle)) {
690
- container.classList.remove(CLASSNAMES.INPUTGROUP);
691
- }
692
692
  }
693
693
  else {
694
694
  const floatLine = container.querySelector('.' + CLASSNAMES.FLOATLINE);
@@ -843,9 +843,6 @@ var Input;
843
843
  }
844
844
  }
845
845
  innerWrapper.parentNode.insertBefore(button, innerWrapper);
846
- if (!container.classList.contains(CLASSNAMES.INPUTGROUP)) {
847
- container.classList.add(CLASSNAMES.INPUTGROUP);
848
- }
849
846
  _internalRipple(true, container, button);
850
847
  return button;
851
848
  }
@@ -863,9 +860,6 @@ var Input;
863
860
  function appendSpan(iconClass, container, internalCreateElement) {
864
861
  const makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;
865
862
  const button = createIconEle(iconClass, makeElement);
866
- if (!container.classList.contains(CLASSNAMES.INPUTGROUP)) {
867
- container.classList.add(CLASSNAMES.INPUTGROUP);
868
- }
869
863
  const wrap = (container.classList.contains('e-float-icon-left')) ? container.querySelector('.e-input-in-wrap') :
870
864
  container;
871
865
  wrap.appendChild(button);
@@ -1928,8 +1922,12 @@ let NumericTextBox = class NumericTextBox extends Component {
1928
1922
  event.stopPropagation();
1929
1923
  clearInterval(this.timeOut);
1930
1924
  this.isCalled = false;
1931
- EventHandler.remove(this.spinUp, 'mouseleave', this.mouseUpClick);
1932
- EventHandler.remove(this.spinDown, 'mouseleave', this.mouseUpClick);
1925
+ if (this.spinUp) {
1926
+ EventHandler.remove(this.spinUp, 'mouseleave', this.mouseUpClick);
1927
+ }
1928
+ if (this.spinDown) {
1929
+ EventHandler.remove(this.spinDown, 'mouseleave', this.mouseUpClick);
1930
+ }
1933
1931
  }
1934
1932
  /**
1935
1933
  * Increments the NumericTextBox value with the specified step value.
@@ -4303,13 +4301,15 @@ let Slider = class Slider extends Component {
4303
4301
  getThemeInitialization() {
4304
4302
  this.isMaterial = this.getTheme(this.sliderContainer) === 'material'
4305
4303
  || this.getTheme(this.sliderContainer) === 'material-dark';
4304
+ this.isMaterial3 = this.getTheme(this.sliderContainer) === 'Material3'
4305
+ || this.getTheme(this.sliderContainer) === 'Material3-dark';
4306
4306
  this.isBootstrap = this.getTheme(this.sliderContainer) === 'bootstrap'
4307
4307
  || this.getTheme(this.sliderContainer) === 'bootstrap-dark';
4308
4308
  this.isBootstrap4 = this.getTheme(this.sliderContainer) === 'bootstrap4';
4309
4309
  this.isTailwind = this.getTheme(this.sliderContainer) === 'tailwind' || this.getTheme(this.sliderContainer) === 'tailwind-dark';
4310
4310
  this.isBootstrap5 = this.getTheme(this.sliderContainer) === 'bootstrap5';
4311
4311
  this.isFluent = this.getTheme(this.sliderContainer) === 'FluentUI';
4312
- this.isMaterialTooltip = this.isMaterial && this.type !== 'Range' && this.tooltip.isVisible;
4312
+ this.isMaterialTooltip = (this.isMaterial || this.isMaterial3) && this.type !== 'Range' && this.tooltip.isVisible;
4313
4313
  }
4314
4314
  createRangeBar() {
4315
4315
  if (this.type !== 'Default') {
@@ -4462,7 +4462,7 @@ let Slider = class Slider extends Component {
4462
4462
  if (this.type !== 'Default') {
4463
4463
  this.rangeBar.style.transition = 'none';
4464
4464
  }
4465
- if (this.isMaterial && this.tooltip.isVisible && this.type === 'Default') {
4465
+ if ((this.isMaterial || this.isMaterial3) && this.tooltip.isVisible && this.type === 'Default') {
4466
4466
  this.tooltipElement.style.transition = this.transition.handle;
4467
4467
  }
4468
4468
  this.tooltipToggle(this.getHandle());
@@ -4509,9 +4509,6 @@ let Slider = class Slider extends Component {
4509
4509
  }
4510
4510
  }
4511
4511
  setHandler() {
4512
- if (this.min > this.max) {
4513
- this.min = this.max;
4514
- }
4515
4512
  this.createFirstHandle();
4516
4513
  if (this.type === 'Range') {
4517
4514
  this.createSecondHandle();
@@ -4549,12 +4546,21 @@ let Slider = class Slider extends Component {
4549
4546
  if (this.initialTooltip) {
4550
4547
  this.initialTooltip = false;
4551
4548
  this.setTooltipContent();
4552
- args.text = text = this.tooltipObj.content;
4549
+ args.text = text = (typeof (this.tooltipObj.content) === 'function' ? this.tooltipObj.content() : this.tooltipObj.content);
4553
4550
  this.trigger('tooltipChange', args, (observedArgs) => {
4554
4551
  this.addTooltipClass(observedArgs.text);
4555
4552
  if (text !== observedArgs.text) {
4556
4553
  this.customAriaText = observedArgs.text;
4557
- this.tooltipObj.content = observedArgs.text;
4554
+ if (this.enableHtmlSanitizer) {
4555
+ observedArgs.text = SanitizeHtmlHelper.sanitize(observedArgs.text.toString());
4556
+ }
4557
+ else {
4558
+ observedArgs.text = observedArgs.text.toString();
4559
+ }
4560
+ const contentTemp = function () {
4561
+ return observedArgs.text;
4562
+ };
4563
+ this.tooltipObj.content = initializeCSPTemplate(contentTemp);
4558
4564
  this.setAriaAttrValue(this.firstHandle);
4559
4565
  if (this.type === 'Range') {
4560
4566
  this.setAriaAttrValue(this.secondHandle);
@@ -4569,7 +4575,10 @@ let Slider = class Slider extends Component {
4569
4575
  setTooltipContent() {
4570
4576
  let content;
4571
4577
  content = this.formatContent(this.tooltipFormatInfo, false);
4572
- this.tooltipObj.content = content;
4578
+ const contentTemp = function () {
4579
+ return content;
4580
+ };
4581
+ this.tooltipObj.content = initializeCSPTemplate(contentTemp);
4573
4582
  }
4574
4583
  formatContent(formatInfo, ariaContent) {
4575
4584
  let content = '';
@@ -4661,7 +4670,7 @@ let Slider = class Slider extends Component {
4661
4670
  }
4662
4671
  }
4663
4672
  tooltipCollision(position) {
4664
- if (this.isBootstrap || this.isBootstrap4 || (this.isMaterial && !this.isMaterialTooltip)) {
4673
+ if (this.isBootstrap || this.isBootstrap4 || ((this.isMaterial || this.isMaterial3) && !this.isMaterialTooltip)) {
4665
4674
  const tooltipOffsetValue = this.isBootstrap4 ? bootstrap4TooltipOffset : bootstrapTooltipOffset;
4666
4675
  switch (position) {
4667
4676
  case 'TopCenter':
@@ -4799,9 +4808,9 @@ let Slider = class Slider extends Component {
4799
4808
  }
4800
4809
  renderTooltip() {
4801
4810
  this.tooltipObj = new Tooltip({
4802
- showTipPointer: this.isBootstrap || this.isMaterial || this.isBootstrap4 || this.isTailwind || this.isBootstrap5 || this.isFluent,
4811
+ showTipPointer: this.isBootstrap || this.isMaterial || this.isMaterial3 || this.isBootstrap4 || this.isTailwind || this.isBootstrap5 || this.isFluent,
4803
4812
  cssClass: classNames.sliderTooltip,
4804
- height: this.isMaterial ? 30 : 'auto',
4813
+ height: (this.isMaterial || this.isMaterial3) ? 30 : 'auto',
4805
4814
  animation: { open: { effect: 'None' }, close: { effect: 'FadeOut', duration: 500 } },
4806
4815
  opensOn: 'Custom',
4807
4816
  beforeOpen: this.tooltipBeforeOpen.bind(this),
@@ -4861,7 +4870,7 @@ let Slider = class Slider extends Component {
4861
4870
  attributes(enabledRTL ? this.firstBtn : this.secondBtn, { 'aria-label': incrementTitle, title: incrementTitle });
4862
4871
  }
4863
4872
  buttonFocusOut() {
4864
- if (this.isMaterial) {
4873
+ if (this.isMaterial || this.isMaterial3) {
4865
4874
  this.getHandle().classList.remove('e-large-thumb-size');
4866
4875
  }
4867
4876
  }
@@ -5038,7 +5047,12 @@ let Slider = class Slider extends Component {
5038
5047
  start = this.makeRoundNumber(start + smallStep, decimalPoints);
5039
5048
  }
5040
5049
  else {
5041
- start = this.makeRoundNumber(start - smallStep, decimalPoints);
5050
+ if (this.min > this.max) {
5051
+ start = this.makeRoundNumber(start + smallStep, decimalPoints);
5052
+ }
5053
+ else {
5054
+ start = this.makeRoundNumber(start - smallStep, decimalPoints);
5055
+ }
5042
5056
  }
5043
5057
  left = this.makeRoundNumber(left + smallStep, decimalPoints);
5044
5058
  }
@@ -5279,16 +5293,16 @@ let Slider = class Slider extends Component {
5279
5293
  (value = this.add(hVal, parseFloat(this.ticks.largeStep.toString()), false));
5280
5294
  }
5281
5295
  else if ((args.keyCode === 36)) {
5282
- value = parseFloat(this.min.toString());
5296
+ value = parseFloat(this.min < this.max ? this.min.toString() : this.max.toString());
5283
5297
  }
5284
5298
  else if ((args.keyCode === 35)) {
5285
- value = parseFloat(this.max.toString());
5299
+ value = parseFloat(this.min < this.max ? this.max.toString() : this.min.toString());
5286
5300
  }
5287
5301
  if (this.limits.enabled) {
5288
5302
  value = this.getLimitCorrectedValues(value);
5289
5303
  }
5290
5304
  this.changeHandleValue(value);
5291
- if (this.isMaterial && !this.tooltip.isVisible &&
5305
+ if ((this.isMaterial || this.isMaterial3) && !this.tooltip.isVisible &&
5292
5306
  !this.getHandle().classList.contains(classNames.sliderTabHandle)) {
5293
5307
  this.materialChange();
5294
5308
  }
@@ -5337,12 +5351,12 @@ let Slider = class Slider extends Component {
5337
5351
  }
5338
5352
  else {
5339
5353
  if (this.type === 'MinRange') {
5340
- this.rangeBar.style.bottom = '0px';
5341
- setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + 'px' });
5354
+ this.rangeBar.style.bottom = this.min > this.max ? this.handlePos1 + 'px' : '0px';
5355
+ setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.min > this.max ? this.element.clientHeight - this.handlePos1 + 'px' : this.handlePos1 + 'px' });
5342
5356
  }
5343
5357
  else {
5344
- this.rangeBar.style.bottom = this.handlePos1 + 'px';
5345
- setStyleAttribute(this.rangeBar, { 'height': this.handlePos2 - this.handlePos1 + 'px' });
5358
+ this.rangeBar.style.bottom = this.min > this.max ? this.handlePos2 + 'px' : this.handlePos1 + 'px';
5359
+ setStyleAttribute(this.rangeBar, { 'height': this.min > this.max ? this.handlePos1 - this.handlePos2 + 'px' : this.handlePos2 - this.handlePos1 + 'px' });
5346
5360
  }
5347
5361
  }
5348
5362
  }
@@ -5363,8 +5377,8 @@ let Slider = class Slider extends Component {
5363
5377
  }
5364
5378
  }
5365
5379
  else {
5366
- this.limitBarFirst.style.bottom = fromMinPostion + 'px';
5367
- this.limitBarFirst.style.height = (fromMaxpostion - fromMinPostion) + 'px';
5380
+ this.limitBarFirst.style.bottom = (this.min < this.max ? fromMinPostion : fromMaxpostion) + 'px';
5381
+ this.limitBarFirst.style.height = (this.min < this.max ? (fromMaxpostion - fromMinPostion) : (fromMinPostion - fromMaxpostion)) + 'px';
5368
5382
  }
5369
5383
  if (this.type === 'Range') {
5370
5384
  if (this.orientation === 'Horizontal') {
@@ -5378,8 +5392,8 @@ let Slider = class Slider extends Component {
5378
5392
  }
5379
5393
  }
5380
5394
  else {
5381
- this.limitBarSecond.style.bottom = toMinPostion + 'px';
5382
- this.limitBarSecond.style.height = (toMaxpostion - toMinPostion) + 'px';
5395
+ this.limitBarSecond.style.bottom = (this.min < this.max ? toMinPostion : toMaxpostion) + 'px';
5396
+ this.limitBarSecond.style.height = (this.min < this.max ? (toMaxpostion - toMinPostion) : (toMinPostion - toMaxpostion)) + 'px';
5383
5397
  }
5384
5398
  }
5385
5399
  }
@@ -5405,13 +5419,13 @@ let Slider = class Slider extends Component {
5405
5419
  }
5406
5420
  getLimitValueAndPosition(currentValue, minValue, maxValue, limitBar) {
5407
5421
  if (isNullOrUndefined(minValue)) {
5408
- minValue = this.min;
5422
+ minValue = this.min < this.max ? this.min : this.max;
5409
5423
  if (isNullOrUndefined(currentValue) && limitBar) {
5410
5424
  currentValue = minValue;
5411
5425
  }
5412
5426
  }
5413
5427
  if (isNullOrUndefined(maxValue)) {
5414
- maxValue = this.max;
5428
+ maxValue = this.min < this.max ? this.max : this.min;
5415
5429
  if (isNullOrUndefined(currentValue) && limitBar) {
5416
5430
  currentValue = maxValue;
5417
5431
  }
@@ -5551,7 +5565,7 @@ let Slider = class Slider extends Component {
5551
5565
  eventArgs = {
5552
5566
  value: this.value,
5553
5567
  previousValue: eventName === 'change' ? this.previousVal : this.previousChanged,
5554
- action: eventName, text: this.tooltipObj.content, isInteracted: isNullOrUndefined(e) ? false : true
5568
+ action: eventName, text: (typeof (this.tooltipObj.content) === 'function' ? this.tooltipObj.content() : this.tooltipObj.content), isInteracted: isNullOrUndefined(e) ? false : true
5555
5569
  };
5556
5570
  }
5557
5571
  else {
@@ -5593,10 +5607,14 @@ let Slider = class Slider extends Component {
5593
5607
  }
5594
5608
  this.handlePos1 = this.checkHandlePosition(this.handleVal1);
5595
5609
  this.handlePos2 = this.checkHandlePosition(this.handleVal2);
5596
- if (this.handlePos1 > this.handlePos2) {
5610
+ if (this.min < this.max && this.handlePos1 > this.handlePos2) {
5597
5611
  this.handlePos1 = this.handlePos2;
5598
5612
  this.handleVal1 = this.handleVal2;
5599
5613
  }
5614
+ if (this.min > this.max && this.handlePos1 < this.handlePos2) {
5615
+ this.handlePos2 = this.handlePos1;
5616
+ this.handleVal2 = this.handleVal1;
5617
+ }
5600
5618
  this.preHandlePos1 = this.handlePos1;
5601
5619
  this.preHandlePos2 = this.handlePos2;
5602
5620
  if (this.limits.enabled) {
@@ -5633,9 +5651,6 @@ let Slider = class Slider extends Component {
5633
5651
  return pos;
5634
5652
  }
5635
5653
  checkHandleValue(value) {
5636
- if (this.min > this.max) {
5637
- this.min = this.max;
5638
- }
5639
5654
  if (this.min === this.max) {
5640
5655
  return (parseFloat(formatUnit(this.max)));
5641
5656
  }
@@ -5695,13 +5710,13 @@ let Slider = class Slider extends Component {
5695
5710
  this.materialHandle.style.bottom = `${this.handlePos1}px`;
5696
5711
  }
5697
5712
  if (this.type === 'MinRange') {
5698
- this.rangeBar.style.bottom = '0px';
5699
- setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + 'px' });
5713
+ this.rangeBar.style.bottom = this.min > this.max ? this.handlePos1 + 'px' : '0px';
5714
+ setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.min > this.max ? this.element.clientHeight - this.handlePos1 + 'px' : this.handlePos1 + 'px' });
5700
5715
  }
5701
5716
  else if (this.type === 'Range') {
5702
5717
  this.secondHandle.style.bottom = `${this.handlePos2}px`;
5703
- this.rangeBar.style.bottom = this.handlePos1 + 'px';
5704
- setStyleAttribute(this.rangeBar, { 'height': this.handlePos2 - this.handlePos1 + 'px' });
5718
+ this.rangeBar.style.bottom = this.min > this.max ? this.handlePos2 + 'px' : this.handlePos1 + 'px';
5719
+ setStyleAttribute(this.rangeBar, { 'height': this.min > this.max ? this.handlePos1 - this.handlePos2 + 'px' : this.handlePos2 - this.handlePos1 + 'px' });
5705
5720
  }
5706
5721
  }
5707
5722
  if (this.limits.enabled) {
@@ -5730,7 +5745,7 @@ let Slider = class Slider extends Component {
5730
5745
  if (!(this.limits.enabled && this.limits.startHandleFixed)) {
5731
5746
  this.handleVal1 = this.checkHandleValue(value);
5732
5747
  this.handlePos1 = this.checkHandlePosition(this.handleVal1);
5733
- if (this.type === 'Range' && this.handlePos1 > this.handlePos2) {
5748
+ if (this.type === 'Range' && ((this.handlePos1 > this.handlePos2 && this.min < this.max) || (this.handlePos1 < this.handlePos2 && this.min > this.max))) {
5734
5749
  this.handlePos1 = this.handlePos2;
5735
5750
  this.handleVal1 = this.handleVal2;
5736
5751
  }
@@ -5744,7 +5759,7 @@ let Slider = class Slider extends Component {
5744
5759
  if (!(this.limits.enabled && this.limits.endHandleFixed)) {
5745
5760
  this.handleVal2 = this.checkHandleValue(value);
5746
5761
  this.handlePos2 = this.checkHandlePosition(this.handleVal2);
5747
- if (this.type === 'Range' && this.handlePos2 < this.handlePos1) {
5762
+ if (this.type === 'Range' && ((this.handlePos2 < this.handlePos1 && this.min < this.max) || (this.handlePos2 > this.handlePos1 && this.min > this.max))) {
5748
5763
  this.handlePos2 = this.handlePos1;
5749
5764
  this.handleVal2 = this.handleVal1;
5750
5765
  }
@@ -5862,7 +5877,7 @@ let Slider = class Slider extends Component {
5862
5877
  }
5863
5878
  let handlepos = this.xyToPosition(pos);
5864
5879
  let handleVal = this.positionToValue(handlepos);
5865
- if (this.type === 'Range' && (this.handlePos2 - handlepos) < (handlepos - this.handlePos1)) {
5880
+ if (this.type === 'Range' && (this.min < (this.max) && (this.handlePos2 - handlepos) < (handlepos - this.handlePos1) || (this.min > this.max) && (this.handlePos1 - handlepos) > (handlepos - this.handlePos2))) {
5866
5881
  this.activeHandle = 2;
5867
5882
  if (!(this.limits.enabled && this.limits.endHandleFixed)) {
5868
5883
  if (this.limits.enabled) {
@@ -5906,7 +5921,7 @@ let Slider = class Slider extends Component {
5906
5921
  behindElement = document.elementFromPoint(eventX, eventY);
5907
5922
  }
5908
5923
  if (evt.target === handle && behindElement != handle) {
5909
- if (this.isMaterial && !this.tooltip.isVisible &&
5924
+ if ((this.isMaterial || this.isMaterial3) && !this.tooltip.isVisible &&
5910
5925
  !this.getHandle().classList.contains(classNames.sliderTabHandle)) {
5911
5926
  this.materialChange();
5912
5927
  }
@@ -5917,7 +5932,7 @@ let Slider = class Slider extends Component {
5917
5932
  if (!this.checkRepeatedValue(handleVal)) {
5918
5933
  return;
5919
5934
  }
5920
- let transition = this.isMaterial && this.tooltip.isVisible ?
5935
+ let transition = (this.isMaterial || this.isMaterial3) && this.tooltip.isVisible ?
5921
5936
  this.transitionOnMaterialTooltip : this.transition;
5922
5937
  this.getHandle().style.transition = transition.handle;
5923
5938
  if (this.type !== 'Default') {
@@ -5968,16 +5983,28 @@ let Slider = class Slider extends Component {
5968
5983
  else {
5969
5984
  pos = { x: xPostion + this.secondPartRemain, y: yPostion + this.secondPartRemain };
5970
5985
  }
5971
- this.handlePos1 = this.xyToPosition(pos);
5972
- this.handleVal1 = this.positionToValue(this.handlePos1);
5986
+ if (this.min > this.max) {
5987
+ this.handlePos2 = this.xyToPosition(pos);
5988
+ this.handleVal2 = this.positionToValue(this.handlePos2);
5989
+ }
5990
+ else {
5991
+ this.handlePos1 = this.xyToPosition(pos);
5992
+ this.handleVal1 = this.positionToValue(this.handlePos1);
5993
+ }
5973
5994
  if (!this.enableRtl) {
5974
5995
  pos = { x: xPostion + this.secondPartRemain, y: yPostion - this.firstPartRemain };
5975
5996
  }
5976
5997
  else {
5977
5998
  pos = { x: xPostion - this.firstPartRemain, y: yPostion - this.firstPartRemain };
5978
5999
  }
5979
- this.handlePos2 = this.xyToPosition(pos);
5980
- this.handleVal2 = this.positionToValue(this.handlePos2);
6000
+ if (this.min > this.max) {
6001
+ this.handlePos1 = this.xyToPosition(pos);
6002
+ this.handleVal1 = this.positionToValue(this.handlePos1);
6003
+ }
6004
+ else {
6005
+ this.handlePos2 = this.xyToPosition(pos);
6006
+ this.handleVal2 = this.positionToValue(this.handlePos2);
6007
+ }
5981
6008
  if (this.limits.enabled) {
5982
6009
  let value = this.getLimitValueAndPosition(this.handleVal1, this.limits.minStart, this.limits.minEnd);
5983
6010
  this.handleVal1 = value[0];
@@ -5998,11 +6025,11 @@ let Slider = class Slider extends Component {
5998
6025
  this.handleValueAdjust(this.handleVal2, this.limits.maxEnd, 2);
5999
6026
  }
6000
6027
  }
6001
- if (this.handleVal2 === this.max) {
6002
- this.handleValueAdjust(this.handleVal2, this.max, 2);
6028
+ if (this.handleVal2 === (this.min > this.max ? this.min : this.max)) {
6029
+ this.handleValueAdjust(this.handleVal2, (this.min > this.max ? this.min : this.max), 2);
6003
6030
  }
6004
- if (this.handleVal1 === this.min) {
6005
- this.handleValueAdjust(this.handleVal1, this.min, 1);
6031
+ if (this.handleVal1 === (this.min > this.max ? this.max : this.min)) {
6032
+ this.handleValueAdjust(this.handleVal1, (this.min > this.max ? this.max : this.min), 1);
6006
6033
  }
6007
6034
  }
6008
6035
  this.activeHandle = 1;
@@ -6021,7 +6048,7 @@ let Slider = class Slider extends Component {
6021
6048
  this.secondHandle.classList.remove(classNames.sliderActiveHandle);
6022
6049
  }
6023
6050
  this.closeTooltip();
6024
- if (this.isMaterial) {
6051
+ if (this.isMaterial || this.isMaterial3) {
6025
6052
  this.getHandle().classList.remove('e-large-thumb-size');
6026
6053
  if (this.isMaterialTooltip) {
6027
6054
  this.tooltipElement.classList.remove(classNames.materialTooltipActive);
@@ -6060,7 +6087,7 @@ let Slider = class Slider extends Component {
6060
6087
  if (this.activeHandle === 1) {
6061
6088
  this.firstHandle.classList.add(classNames.sliderActiveHandle);
6062
6089
  if (!(this.limits.enabled && this.limits.startHandleFixed)) {
6063
- if (handlepos > this.handlePos2) {
6090
+ if ((this.min < this.max && handlepos > this.handlePos2 || (this.min > this.max && handlepos < this.handlePos2))) {
6064
6091
  handlepos = this.handlePos2;
6065
6092
  handleVal = this.handleVal2;
6066
6093
  }
@@ -6079,7 +6106,7 @@ let Slider = class Slider extends Component {
6079
6106
  else if (this.activeHandle === 2) {
6080
6107
  this.secondHandle.classList.add(classNames.sliderActiveHandle);
6081
6108
  if (!(this.limits.enabled && this.limits.endHandleFixed)) {
6082
- if (handlepos < this.handlePos1) {
6109
+ if ((this.min < this.max && handlepos < this.handlePos1) || (this.min > this.max && handlepos > this.handlePos1)) {
6083
6110
  handlepos = this.handlePos1;
6084
6111
  handleVal = this.handleVal1;
6085
6112
  }
@@ -6104,7 +6131,7 @@ let Slider = class Slider extends Component {
6104
6131
  this.rangeBar.style.transition = 'none';
6105
6132
  }
6106
6133
  this.setHandlePosition(evt);
6107
- if (this.isMaterial && !this.tooltip.isVisible &&
6134
+ if ((this.isMaterial || this.isMaterial3) && !this.tooltip.isVisible &&
6108
6135
  !this.getHandle().classList.contains(classNames.sliderTabHandle)) {
6109
6136
  this.materialChange();
6110
6137
  }
@@ -6542,7 +6569,9 @@ let Slider = class Slider extends Component {
6542
6569
  case 'tooltip':
6543
6570
  if (!isNullOrUndefined(newProp.tooltip) && !isNullOrUndefined(oldProp.tooltip)) {
6544
6571
  this.setTooltip(prop);
6545
- this.wireEvents();
6572
+ if (!this.showButtons) {
6573
+ this.wireEvents();
6574
+ }
6546
6575
  }
6547
6576
  break;
6548
6577
  case 'type':
@@ -6659,7 +6688,7 @@ let Slider = class Slider extends Component {
6659
6688
  this.ul.style.zIndex = (this.zIndex + -7) + '';
6660
6689
  this.element.style.zIndex = (this.zIndex + 2) + '';
6661
6690
  }
6662
- if (!this.isMaterial && !isNullOrUndefined(this.ticks) && this.ticks.placement === 'Both') {
6691
+ if (!this.isMaterial && !this.isMaterial3 && !isNullOrUndefined(this.ticks) && this.ticks.placement === 'Both') {
6663
6692
  this.element.style.zIndex = (this.zIndex + 2) + '';
6664
6693
  }
6665
6694
  this.firstHandle.style.zIndex = (this.zIndex + 3) + '';
@@ -7450,7 +7479,17 @@ let FormValidator = FormValidator_1 = class FormValidator extends Base {
7450
7479
  this.customPlacement.call(this, this.inputElement, errorElement);
7451
7480
  }
7452
7481
  else {
7453
- this.inputElement.parentNode.insertBefore(errorElement, this.inputElement.nextSibling);
7482
+ const inputParent = this.inputElement.parentElement;
7483
+ const grandParent = inputParent.parentElement;
7484
+ if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper')) {
7485
+ grandParent.insertBefore(errorElement, inputParent.nextSibling);
7486
+ }
7487
+ else if (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper')) {
7488
+ grandParent.parentElement.insertBefore(errorElement, grandParent.nextSibling);
7489
+ }
7490
+ else {
7491
+ inputParent.insertBefore(errorElement, this.inputElement.nextSibling);
7492
+ }
7454
7493
  }
7455
7494
  errorElement.style.display = 'block';
7456
7495
  this.getErrorElement(name);
@@ -7545,7 +7584,15 @@ FormValidator.checkValidator = {
7545
7584
  return !isNaN(Number(option.value)) && Number(option.value) >= param[0] && Number(option.value) <= param[1];
7546
7585
  },
7547
7586
  date: (option) => {
7548
- return !isNaN(new Date(option.value).getTime());
7587
+ if (!isNullOrUndefined(option.param) && (typeof (option.param) === 'string' && option.param !== '')) {
7588
+ var globalize = new Internationalization;
7589
+ var dateOptions = { format: option.param.toString(), type: 'dateTime', skeleton: 'yMd' };
7590
+ var dateValue = globalize.parseDate(option.value, dateOptions);
7591
+ return (!isNullOrUndefined(dateValue) && dateValue instanceof Date && !isNaN(+dateValue));
7592
+ }
7593
+ else {
7594
+ return !isNaN(new Date(option.value).getTime());
7595
+ }
7549
7596
  },
7550
7597
  max: (option) => {
7551
7598
  if (!isNaN(Number(option.value))) {
@@ -7909,7 +7956,7 @@ let Uploader = class Uploader extends Component {
7909
7956
  detach(this.listParent);
7910
7957
  this.listParent = null;
7911
7958
  this.fileList = [];
7912
- this.createFileList(this.filesData);
7959
+ this.internalCreateFileList(this.filesData);
7913
7960
  if (this.actionButtons) {
7914
7961
  this.removeActionButtons();
7915
7962
  this.renderActionButtons();
@@ -8146,7 +8193,7 @@ let Uploader = class Uploader extends Component {
8146
8193
  renderPreLoadFiles() {
8147
8194
  if (this.files.length) {
8148
8195
  if (this.enablePersistence && this.filesData.length) {
8149
- this.createFileList(this.filesData);
8196
+ this.internalCreateFileList(this.filesData);
8150
8197
  return;
8151
8198
  }
8152
8199
  if (isNullOrUndefined(this.files[0].size)) {
@@ -8172,7 +8219,7 @@ let Uploader = class Uploader extends Component {
8172
8219
  filesData.push(fileData);
8173
8220
  this.filesData.push(fileData);
8174
8221
  }
8175
- this.createFileList(filesData);
8222
+ this.internalCreateFileList(filesData);
8176
8223
  if (!this.autoUpload && this.listParent && !this.actionButtons && (!this.isForm || this.allowUpload()) && this.showFileList) {
8177
8224
  this.renderActionButtons();
8178
8225
  }
@@ -8929,13 +8976,14 @@ let Uploader = class Uploader extends Component {
8929
8976
  const dataFiles = this.allTypes ? eventArgs.modifiedFilesData :
8930
8977
  this.checkExtension(eventArgs.modifiedFilesData);
8931
8978
  this.updateSortedFileList(dataFiles);
8932
- this.filesData = dataFiles;
8979
+ this.filesData = this.filesData.concat(dataFiles);
8933
8980
  if (!this.isForm || this.allowUpload()) {
8934
8981
  this.checkAutoUpload(dataFiles);
8935
8982
  }
8936
8983
  }
8937
8984
  else {
8938
- this.createFileList(fileData, true);
8985
+ this.internalCreateFileList(fileData);
8986
+ this.filesData = this.filesData.concat(fileData);
8939
8987
  if (!this.isForm || this.allowUpload()) {
8940
8988
  this.checkAutoUpload(fileData);
8941
8989
  }
@@ -8984,21 +9032,13 @@ let Uploader = class Uploader extends Component {
8984
9032
  updateSortedFileList(filesData) {
8985
9033
  const previousListClone = this.createElement('div', { id: 'clonewrapper' });
8986
9034
  let added = -1;
8987
- let removedList;
8988
9035
  if (this.listParent) {
8989
9036
  for (let i = 0; i < this.listParent.querySelectorAll('li').length; i++) {
8990
9037
  const liElement = this.listParent.querySelectorAll('li')[i];
8991
9038
  previousListClone.appendChild(liElement.cloneNode(true));
8992
9039
  }
8993
- removedList = this.listParent.querySelectorAll('li');
8994
- for (const item of removedList) {
8995
- detach(item);
8996
- }
8997
9040
  this.removeActionButtons();
8998
9041
  const oldList = [].slice.call(previousListClone.childNodes);
8999
- detach(this.listParent);
9000
- this.listParent = null;
9001
- this.fileList = [];
9002
9042
  this.createParentUL();
9003
9043
  for (let index = 0; index < filesData.length; index++) {
9004
9044
  for (let j = 0; j < this.filesData.length; j++) {
@@ -9010,12 +9050,12 @@ let Uploader = class Uploader extends Component {
9010
9050
  }
9011
9051
  }
9012
9052
  if (added !== index) {
9013
- this.createFileList([filesData[index]]);
9053
+ this.internalCreateFileList([filesData[index]]);
9014
9054
  }
9015
9055
  }
9016
9056
  }
9017
9057
  else {
9018
- this.createFileList(filesData);
9058
+ this.internalCreateFileList(filesData);
9019
9059
  }
9020
9060
  }
9021
9061
  isBlank(str) {
@@ -9307,10 +9347,13 @@ let Uploader = class Uploader extends Component {
9307
9347
  * @param { FileInfo[] } fileData - Specifies the files data for file list creation.
9308
9348
  * @returns {void}
9309
9349
  */
9310
- createFileList(fileData, isSelectedFile) {
9350
+ createFileList(fileData) {
9351
+ this.filesData = this.filesData && this.filesData.length > 0 ? this.filesData.concat(fileData) : fileData;
9352
+ this.internalCreateFileList(fileData);
9353
+ }
9354
+ internalCreateFileList(fileData) {
9311
9355
  /* eslint-enable valid-jsdoc, jsdoc/require-param */
9312
9356
  this.createParentUL();
9313
- this.filesData = (isSelectedFile) ? this.filesData.concat(fileData) : fileData;
9314
9357
  if (this.template !== '' && !isNullOrUndefined(this.template)) {
9315
9358
  if (this.isFormUpload()) {
9316
9359
  this.uploadWrapper.classList.add(FORM_UPLOAD);
@@ -9823,7 +9866,7 @@ let Uploader = class Uploader extends Component {
9823
9866
  templateComplier(uploadTemplate) {
9824
9867
  if (uploadTemplate) {
9825
9868
  try {
9826
- if (selectAll(uploadTemplate, document).length) {
9869
+ if (typeof uploadTemplate !== 'function' && selectAll(uploadTemplate, document).length) {
9827
9870
  return compile(select(uploadTemplate, document).innerHTML.trim());
9828
9871
  }
9829
9872
  else {
@@ -12211,23 +12254,12 @@ let ColorPicker = class ColorPicker extends Component {
12211
12254
  }
12212
12255
  paletteKeyDown(e) {
12213
12256
  const target = e.target;
12257
+ if (!target.classList.contains(PALETTES)) {
12258
+ return;
12259
+ }
12214
12260
  let selectedEle;
12215
12261
  let idx;
12216
12262
  const tiles = [].slice.call(selectAll('.' + TILE, target));
12217
- if ((target.classList.contains('e-palette') || target.classList.contains('e-tile')) && (e.keyCode === 9 && !e.shiftKey)) {
12218
- if (this.modeSwitcher || this.showButtons) {
12219
- this.getPopupEle().querySelector('.e-btn').focus();
12220
- e.preventDefault();
12221
- e.stopPropagation();
12222
- }
12223
- }
12224
- else if ((target.classList.contains('e-palette') || target.classList.contains('e-tile')) && (e.keyCode === 9 && e.shiftKey)) {
12225
- if (this.splitBtn) {
12226
- this.splitBtn.element.focus();
12227
- e.preventDefault();
12228
- e.stopPropagation();
12229
- }
12230
- }
12231
12263
  const prevSelectedEle = (tiles.filter((tile) => tile.classList.contains('e-selected'))).pop();
12232
12264
  switch (!e.altKey && e.keyCode) {
12233
12265
  case 39:
@@ -13064,10 +13096,8 @@ let TextBox = class TextBox extends Component {
13064
13096
  }
13065
13097
  break;
13066
13098
  case 'showClearButton':
13067
- if (this.respectiveElement.tagName !== 'TEXTAREA') {
13068
- Input.setClearButton(this.showClearButton, this.respectiveElement, this.textboxWrapper);
13069
- this.bindClearEvent();
13070
- }
13099
+ Input.setClearButton(this.showClearButton, this.respectiveElement, this.textboxWrapper);
13100
+ this.bindClearEvent();
13071
13101
  break;
13072
13102
  case 'enableRtl':
13073
13103
  Input.setEnableRtl(this.enableRtl, [this.textboxWrapper.container]);
@@ -13450,7 +13480,7 @@ let TextBox = class TextBox extends Component {
13450
13480
  }
13451
13481
  }
13452
13482
  bindClearEvent() {
13453
- if (this.showClearButton && this.respectiveElement.tagName !== 'TEXTAREA') {
13483
+ if (this.showClearButton) {
13454
13484
  if (this.enabled) {
13455
13485
  EventHandler.add(this.textboxWrapper.clearButton, 'mousedown touchstart', this.resetInputHandler, this);
13456
13486
  }
@@ -14966,8 +14996,8 @@ let Rating = class Rating extends Component {
14966
14996
  return;
14967
14997
  }
14968
14998
  const previousValue = this.currentValue;
14969
- this.updateCurrentValue(currValue);
14970
14999
  this.triggerChange(e, currValue);
15000
+ this.updateCurrentValue(currValue);
14971
15001
  if (this.showTooltip) {
14972
15002
  if (element) {
14973
15003
  if (Math.ceil(currValue) !== Math.ceil(previousValue)) {
@@ -15010,11 +15040,11 @@ let Rating = class Rating extends Component {
15010
15040
  }
15011
15041
  if (this.fullTemplate && val === 1) {
15012
15042
  spanEle.classList.add(FULLTEMPLATE);
15013
- spanEle.append(this.fullTemplateFunction({ index: index, ratingValue: val }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate'), this.isStringTemplate)[0]);
15043
+ append(this.fullTemplateFunction({ index: index, ratingValue: val }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate'), this.isStringTemplate), spanEle);
15014
15044
  }
15015
15045
  else if (this.emptyTemplate) {
15016
15046
  spanEle.classList.add(EMPTYTEMPLATE);
15017
- spanEle.append(this.emptyTemplateFunction({ index: index, ratingValue: val }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate'), this.isStringTemplate)[0]);
15047
+ append(this.emptyTemplateFunction({ index: index, ratingValue: val }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate'), this.isStringTemplate), spanEle);
15018
15048
  }
15019
15049
  else {
15020
15050
  addClass([spanEle], ICONCSS.split(' '));
@@ -15024,7 +15054,7 @@ let Rating = class Rating extends Component {
15024
15054
  spanEle.classList.remove(FULLTEMPLATE, EMPTYTEMPLATE);
15025
15055
  removeClass([spanEle], ICONCSS.split(' '));
15026
15056
  if (spanEle.firstChild) {
15027
- spanEle.removeChild(spanEle.firstChild);
15057
+ spanEle.innerHTML = '';
15028
15058
  }
15029
15059
  }
15030
15060
  updateTooltip() {
@@ -15108,7 +15138,7 @@ let Rating = class Rating extends Component {
15108
15138
  }
15109
15139
  this.removeItemContent(spanEle);
15110
15140
  spanEle.classList.add(FULLTEMPLATE);
15111
- spanEle.append(this.fullTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate' + index), this.isStringTemplate)[0]);
15141
+ append(this.fullTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate' + index), this.isStringTemplate), spanEle);
15112
15142
  }
15113
15143
  else if (this.emptyTemplate) {
15114
15144
  if (!this.isReact && spanEle.classList.contains(EMPTYTEMPLATE)) {
@@ -15116,7 +15146,7 @@ let Rating = class Rating extends Component {
15116
15146
  }
15117
15147
  this.removeItemContent(spanEle);
15118
15148
  spanEle.classList.add(EMPTYTEMPLATE);
15119
- spanEle.append(this.emptyTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate' + index), this.isStringTemplate)[0]);
15149
+ append(this.emptyTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate' + index), this.isStringTemplate), spanEle);
15120
15150
  }
15121
15151
  else {
15122
15152
  this.removeItemContent(spanEle);
@@ -15130,23 +15160,30 @@ let Rating = class Rating extends Component {
15130
15160
  }
15131
15161
  let content;
15132
15162
  if (this.tooltipTemplate) {
15163
+ content = this.createElement('span', { className: 'e-rating-tooltip-content' });
15133
15164
  const templateFunction = this.getTemplateString(this.tooltipTemplate);
15134
- content = templateFunction({ value: this.currentValue }, this, 'ratingTooltipTemplate', (this.element.id + 'tooltipTemplate'), this.isStringTemplate)[0];
15165
+ append(templateFunction({ value: this.currentValue }, this, 'ratingTooltipTemplate', (this.element.id + 'tooltipTemplate'), this.isStringTemplate), content);
15166
+ this.tooltipObj.setProperties({ content: content }, isChange);
15135
15167
  }
15136
15168
  else {
15137
15169
  content = this.currentValue.toString();
15170
+ this.tooltipObj.setProperties({ content: initializeCSPTemplate(function () { return content; }) }, isChange);
15138
15171
  }
15139
- this.tooltipObj.setProperties({ content: content }, isChange);
15140
15172
  this.renderReactTemplates();
15141
15173
  }
15142
15174
  }
15143
15175
  getTemplateString(template) {
15144
15176
  let stringContent = '';
15145
15177
  try {
15146
- const tempEle = select(template);
15147
- if (tempEle) {
15148
- //Return innerHTML incase of jsrenderer script else outerHTML
15149
- stringContent = tempEle.tagName === 'SCRIPT' ? tempEle.innerHTML : tempEle.outerHTML;
15178
+ if (typeof template !== 'function') {
15179
+ const tempEle = select(template);
15180
+ if (tempEle) {
15181
+ //Return innerHTML incase of jsrenderer script else outerHTML
15182
+ stringContent = tempEle.tagName === 'SCRIPT' ? tempEle.innerHTML : tempEle.outerHTML;
15183
+ }
15184
+ else {
15185
+ stringContent = template;
15186
+ }
15150
15187
  }
15151
15188
  else {
15152
15189
  stringContent = template;
@@ -15177,10 +15214,10 @@ let Rating = class Rating extends Component {
15177
15214
  this.clearTemplate(['ratingLabelTemplate']);
15178
15215
  }
15179
15216
  if (this.spanLabel.firstChild) {
15180
- this.spanLabel.removeChild(this.spanLabel.firstChild);
15217
+ this.spanLabel.innerHTML = '';
15181
15218
  }
15182
15219
  const templateFunction = this.getTemplateString(this.labelTemplate);
15183
- this.spanLabel.append(templateFunction({ value: this.currentValue }, this, 'ratingLabelTemplate', (this.element.id + 'labelTemplate'), this.isStringTemplate)[0]);
15220
+ append(templateFunction({ value: this.currentValue }, this, 'ratingLabelTemplate', (this.element.id + 'labelTemplate'), this.isStringTemplate), this.spanLabel);
15184
15221
  this.renderReactTemplates();
15185
15222
  }
15186
15223
  else {
@@ -15265,7 +15302,7 @@ let Rating = class Rating extends Component {
15265
15302
  if (this.showTooltip) {
15266
15303
  if (!this.tooltipOpen) {
15267
15304
  this.updateTooltipContent(false);
15268
- this.tooltipObj.open(element); //eslint-disable-line
15305
+ this.tooltipObj.open(element);
15269
15306
  this.tooltipOpen = true;
15270
15307
  }
15271
15308
  else if (isChange) {