@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 (var 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(function () {
86
- Input.calculateWidth(args.element, parent);
87
- }, 80);
85
+ if (args.floatLabelType === 'Auto') {
86
+ setTimeout(function () {
87
+ Input.calculateWidth(args.element, parent);
88
+ }, 80);
89
+ }
88
90
  });
89
91
  args.element.addEventListener('blur', function () {
90
92
  var 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(function () {
96
- Input.calculateWidth(args.element, parent);
97
- }, 80);
97
+ if (args.floatLabelType === 'Auto' && args.element.value === '') {
98
+ setTimeout(function () {
99
+ Input.calculateWidth(args.element, parent);
100
+ }, 80);
101
+ }
98
102
  });
99
103
  args.element.addEventListener('input', function () {
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
  }
@@ -289,10 +294,6 @@ var Input;
289
294
  inputObject.container.querySelector('.' + CLASSNAMES.FLOATTEXT) : element;
290
295
  baseElement.insertAdjacentElement('afterend', button);
291
296
  }
292
- if (!isNullOrUndefined(container) &&
293
- container.classList.contains(CLASSNAMES.FLOATINPUT)) {
294
- addClass([container], CLASSNAMES.INPUTGROUP);
295
- }
296
297
  addClass([button], CLASSNAMES.CLEARICONHIDE);
297
298
  wireClearBtnEvents(element, button, container);
298
299
  button.setAttribute('aria-label', 'close');
@@ -300,7 +301,7 @@ var Input;
300
301
  }
301
302
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
302
303
  function wireClearBtnEvents(element, button, container) {
303
- if (!isNullOrUndefined(button) && (isBindClearAction === undefined || isBindClearAction)) {
304
+ if (isBindClearAction === undefined || isBindClearAction) {
304
305
  button.addEventListener('click', function (event) {
305
306
  if (!(element.classList.contains(CLASSNAMES.DISABLE) || element.readOnly)) {
306
307
  event.preventDefault();
@@ -381,7 +382,9 @@ var Input;
381
382
  */
382
383
  function setValue$$1(value, element, floatLabelType, clearButton) {
383
384
  element.value = value;
384
- calculateWidth(element, element.parentElement);
385
+ if (floatLabelType === 'Auto' && value === '') {
386
+ calculateWidth(element, element.parentElement);
387
+ }
385
388
  if ((!isNullOrUndefined(floatLabelType)) && floatLabelType === 'Auto') {
386
389
  validateLabel(element, floatLabelType);
387
390
  }
@@ -690,9 +693,6 @@ var Input;
690
693
  if (isPrependIcon) {
691
694
  iconEle = container.querySelector('.e-input-group-icon');
692
695
  }
693
- if (isNullOrUndefined(iconEle)) {
694
- container.classList.remove(CLASSNAMES.INPUTGROUP);
695
- }
696
696
  }
697
697
  else {
698
698
  var floatLine = container.querySelector('.' + CLASSNAMES.FLOATLINE);
@@ -849,9 +849,6 @@ var Input;
849
849
  }
850
850
  }
851
851
  innerWrapper.parentNode.insertBefore(button, innerWrapper);
852
- if (!container.classList.contains(CLASSNAMES.INPUTGROUP)) {
853
- container.classList.add(CLASSNAMES.INPUTGROUP);
854
- }
855
852
  _internalRipple(true, container, button);
856
853
  return button;
857
854
  }
@@ -869,9 +866,6 @@ var Input;
869
866
  function appendSpan(iconClass, container, internalCreateElement) {
870
867
  var makeElement = !isNullOrUndefined(internalCreateElement) ? internalCreateElement : createElement;
871
868
  var button = createIconEle(iconClass, makeElement);
872
- if (!container.classList.contains(CLASSNAMES.INPUTGROUP)) {
873
- container.classList.add(CLASSNAMES.INPUTGROUP);
874
- }
875
869
  var wrap = (container.classList.contains('e-float-icon-left')) ? container.querySelector('.e-input-in-wrap') :
876
870
  container;
877
871
  wrap.appendChild(button);
@@ -1958,8 +1952,12 @@ var NumericTextBox = /** @__PURE__ @class */ (function (_super) {
1958
1952
  event.stopPropagation();
1959
1953
  clearInterval(this.timeOut);
1960
1954
  this.isCalled = false;
1961
- EventHandler.remove(this.spinUp, 'mouseleave', this.mouseUpClick);
1962
- EventHandler.remove(this.spinDown, 'mouseleave', this.mouseUpClick);
1955
+ if (this.spinUp) {
1956
+ EventHandler.remove(this.spinUp, 'mouseleave', this.mouseUpClick);
1957
+ }
1958
+ if (this.spinDown) {
1959
+ EventHandler.remove(this.spinDown, 'mouseleave', this.mouseUpClick);
1960
+ }
1963
1961
  };
1964
1962
  /**
1965
1963
  * Increments the NumericTextBox value with the specified step value.
@@ -4400,13 +4398,15 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
4400
4398
  Slider.prototype.getThemeInitialization = function () {
4401
4399
  this.isMaterial = this.getTheme(this.sliderContainer) === 'material'
4402
4400
  || this.getTheme(this.sliderContainer) === 'material-dark';
4401
+ this.isMaterial3 = this.getTheme(this.sliderContainer) === 'Material3'
4402
+ || this.getTheme(this.sliderContainer) === 'Material3-dark';
4403
4403
  this.isBootstrap = this.getTheme(this.sliderContainer) === 'bootstrap'
4404
4404
  || this.getTheme(this.sliderContainer) === 'bootstrap-dark';
4405
4405
  this.isBootstrap4 = this.getTheme(this.sliderContainer) === 'bootstrap4';
4406
4406
  this.isTailwind = this.getTheme(this.sliderContainer) === 'tailwind' || this.getTheme(this.sliderContainer) === 'tailwind-dark';
4407
4407
  this.isBootstrap5 = this.getTheme(this.sliderContainer) === 'bootstrap5';
4408
4408
  this.isFluent = this.getTheme(this.sliderContainer) === 'FluentUI';
4409
- this.isMaterialTooltip = this.isMaterial && this.type !== 'Range' && this.tooltip.isVisible;
4409
+ this.isMaterialTooltip = (this.isMaterial || this.isMaterial3) && this.type !== 'Range' && this.tooltip.isVisible;
4410
4410
  };
4411
4411
  Slider.prototype.createRangeBar = function () {
4412
4412
  if (this.type !== 'Default') {
@@ -4560,7 +4560,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
4560
4560
  if (this.type !== 'Default') {
4561
4561
  this.rangeBar.style.transition = 'none';
4562
4562
  }
4563
- if (this.isMaterial && this.tooltip.isVisible && this.type === 'Default') {
4563
+ if ((this.isMaterial || this.isMaterial3) && this.tooltip.isVisible && this.type === 'Default') {
4564
4564
  this.tooltipElement.style.transition = this.transition.handle;
4565
4565
  }
4566
4566
  this.tooltipToggle(this.getHandle());
@@ -4607,9 +4607,6 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
4607
4607
  }
4608
4608
  };
4609
4609
  Slider.prototype.setHandler = function () {
4610
- if (this.min > this.max) {
4611
- this.min = this.max;
4612
- }
4613
4610
  this.createFirstHandle();
4614
4611
  if (this.type === 'Range') {
4615
4612
  this.createSecondHandle();
@@ -4648,12 +4645,21 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
4648
4645
  if (this.initialTooltip) {
4649
4646
  this.initialTooltip = false;
4650
4647
  this.setTooltipContent();
4651
- args.text = text = this.tooltipObj.content;
4648
+ args.text = text = (typeof (this.tooltipObj.content) === 'function' ? this.tooltipObj.content() : this.tooltipObj.content);
4652
4649
  this.trigger('tooltipChange', args, function (observedArgs) {
4653
4650
  _this.addTooltipClass(observedArgs.text);
4654
4651
  if (text !== observedArgs.text) {
4655
4652
  _this.customAriaText = observedArgs.text;
4656
- _this.tooltipObj.content = observedArgs.text;
4653
+ if (_this.enableHtmlSanitizer) {
4654
+ observedArgs.text = SanitizeHtmlHelper.sanitize(observedArgs.text.toString());
4655
+ }
4656
+ else {
4657
+ observedArgs.text = observedArgs.text.toString();
4658
+ }
4659
+ var contentTemp = function () {
4660
+ return observedArgs.text;
4661
+ };
4662
+ _this.tooltipObj.content = initializeCSPTemplate(contentTemp);
4657
4663
  _this.setAriaAttrValue(_this.firstHandle);
4658
4664
  if (_this.type === 'Range') {
4659
4665
  _this.setAriaAttrValue(_this.secondHandle);
@@ -4668,7 +4674,10 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
4668
4674
  Slider.prototype.setTooltipContent = function () {
4669
4675
  var content;
4670
4676
  content = this.formatContent(this.tooltipFormatInfo, false);
4671
- this.tooltipObj.content = content;
4677
+ var contentTemp = function () {
4678
+ return content;
4679
+ };
4680
+ this.tooltipObj.content = initializeCSPTemplate(contentTemp);
4672
4681
  };
4673
4682
  Slider.prototype.formatContent = function (formatInfo, ariaContent) {
4674
4683
  var content = '';
@@ -4760,7 +4769,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
4760
4769
  }
4761
4770
  };
4762
4771
  Slider.prototype.tooltipCollision = function (position) {
4763
- if (this.isBootstrap || this.isBootstrap4 || (this.isMaterial && !this.isMaterialTooltip)) {
4772
+ if (this.isBootstrap || this.isBootstrap4 || ((this.isMaterial || this.isMaterial3) && !this.isMaterialTooltip)) {
4764
4773
  var tooltipOffsetValue = this.isBootstrap4 ? bootstrap4TooltipOffset : bootstrapTooltipOffset;
4765
4774
  switch (position) {
4766
4775
  case 'TopCenter':
@@ -4900,9 +4909,9 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
4900
4909
  };
4901
4910
  Slider.prototype.renderTooltip = function () {
4902
4911
  this.tooltipObj = new Tooltip({
4903
- showTipPointer: this.isBootstrap || this.isMaterial || this.isBootstrap4 || this.isTailwind || this.isBootstrap5 || this.isFluent,
4912
+ showTipPointer: this.isBootstrap || this.isMaterial || this.isMaterial3 || this.isBootstrap4 || this.isTailwind || this.isBootstrap5 || this.isFluent,
4904
4913
  cssClass: classNames.sliderTooltip,
4905
- height: this.isMaterial ? 30 : 'auto',
4914
+ height: (this.isMaterial || this.isMaterial3) ? 30 : 'auto',
4906
4915
  animation: { open: { effect: 'None' }, close: { effect: 'FadeOut', duration: 500 } },
4907
4916
  opensOn: 'Custom',
4908
4917
  beforeOpen: this.tooltipBeforeOpen.bind(this),
@@ -4962,7 +4971,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
4962
4971
  attributes(enabledRTL ? this.firstBtn : this.secondBtn, { 'aria-label': incrementTitle, title: incrementTitle });
4963
4972
  };
4964
4973
  Slider.prototype.buttonFocusOut = function () {
4965
- if (this.isMaterial) {
4974
+ if (this.isMaterial || this.isMaterial3) {
4966
4975
  this.getHandle().classList.remove('e-large-thumb-size');
4967
4976
  }
4968
4977
  };
@@ -5139,7 +5148,12 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
5139
5148
  start = this.makeRoundNumber(start + smallStep, decimalPoints);
5140
5149
  }
5141
5150
  else {
5142
- start = this.makeRoundNumber(start - smallStep, decimalPoints);
5151
+ if (this.min > this.max) {
5152
+ start = this.makeRoundNumber(start + smallStep, decimalPoints);
5153
+ }
5154
+ else {
5155
+ start = this.makeRoundNumber(start - smallStep, decimalPoints);
5156
+ }
5143
5157
  }
5144
5158
  left = this.makeRoundNumber(left + smallStep, decimalPoints);
5145
5159
  }
@@ -5382,16 +5396,16 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
5382
5396
  (value = this.add(hVal, parseFloat(this.ticks.largeStep.toString()), false));
5383
5397
  }
5384
5398
  else if ((args.keyCode === 36)) {
5385
- value = parseFloat(this.min.toString());
5399
+ value = parseFloat(this.min < this.max ? this.min.toString() : this.max.toString());
5386
5400
  }
5387
5401
  else if ((args.keyCode === 35)) {
5388
- value = parseFloat(this.max.toString());
5402
+ value = parseFloat(this.min < this.max ? this.max.toString() : this.min.toString());
5389
5403
  }
5390
5404
  if (this.limits.enabled) {
5391
5405
  value = this.getLimitCorrectedValues(value);
5392
5406
  }
5393
5407
  this.changeHandleValue(value);
5394
- if (this.isMaterial && !this.tooltip.isVisible &&
5408
+ if ((this.isMaterial || this.isMaterial3) && !this.tooltip.isVisible &&
5395
5409
  !this.getHandle().classList.contains(classNames.sliderTabHandle)) {
5396
5410
  this.materialChange();
5397
5411
  }
@@ -5440,12 +5454,12 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
5440
5454
  }
5441
5455
  else {
5442
5456
  if (this.type === 'MinRange') {
5443
- this.rangeBar.style.bottom = '0px';
5444
- setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + 'px' });
5457
+ this.rangeBar.style.bottom = this.min > this.max ? this.handlePos1 + 'px' : '0px';
5458
+ setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.min > this.max ? this.element.clientHeight - this.handlePos1 + 'px' : this.handlePos1 + 'px' });
5445
5459
  }
5446
5460
  else {
5447
- this.rangeBar.style.bottom = this.handlePos1 + 'px';
5448
- setStyleAttribute(this.rangeBar, { 'height': this.handlePos2 - this.handlePos1 + 'px' });
5461
+ this.rangeBar.style.bottom = this.min > this.max ? this.handlePos2 + 'px' : this.handlePos1 + 'px';
5462
+ setStyleAttribute(this.rangeBar, { 'height': this.min > this.max ? this.handlePos1 - this.handlePos2 + 'px' : this.handlePos2 - this.handlePos1 + 'px' });
5449
5463
  }
5450
5464
  }
5451
5465
  };
@@ -5466,8 +5480,8 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
5466
5480
  }
5467
5481
  }
5468
5482
  else {
5469
- this.limitBarFirst.style.bottom = fromMinPostion + 'px';
5470
- this.limitBarFirst.style.height = (fromMaxpostion - fromMinPostion) + 'px';
5483
+ this.limitBarFirst.style.bottom = (this.min < this.max ? fromMinPostion : fromMaxpostion) + 'px';
5484
+ this.limitBarFirst.style.height = (this.min < this.max ? (fromMaxpostion - fromMinPostion) : (fromMinPostion - fromMaxpostion)) + 'px';
5471
5485
  }
5472
5486
  if (this.type === 'Range') {
5473
5487
  if (this.orientation === 'Horizontal') {
@@ -5481,8 +5495,8 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
5481
5495
  }
5482
5496
  }
5483
5497
  else {
5484
- this.limitBarSecond.style.bottom = toMinPostion + 'px';
5485
- this.limitBarSecond.style.height = (toMaxpostion - toMinPostion) + 'px';
5498
+ this.limitBarSecond.style.bottom = (this.min < this.max ? toMinPostion : toMaxpostion) + 'px';
5499
+ this.limitBarSecond.style.height = (this.min < this.max ? (toMaxpostion - toMinPostion) : (toMinPostion - toMaxpostion)) + 'px';
5486
5500
  }
5487
5501
  }
5488
5502
  };
@@ -5508,13 +5522,13 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
5508
5522
  };
5509
5523
  Slider.prototype.getLimitValueAndPosition = function (currentValue, minValue, maxValue, limitBar) {
5510
5524
  if (isNullOrUndefined(minValue)) {
5511
- minValue = this.min;
5525
+ minValue = this.min < this.max ? this.min : this.max;
5512
5526
  if (isNullOrUndefined(currentValue) && limitBar) {
5513
5527
  currentValue = minValue;
5514
5528
  }
5515
5529
  }
5516
5530
  if (isNullOrUndefined(maxValue)) {
5517
- maxValue = this.max;
5531
+ maxValue = this.min < this.max ? this.max : this.min;
5518
5532
  if (isNullOrUndefined(currentValue) && limitBar) {
5519
5533
  currentValue = maxValue;
5520
5534
  }
@@ -5655,7 +5669,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
5655
5669
  eventArgs = {
5656
5670
  value: this.value,
5657
5671
  previousValue: eventName === 'change' ? this.previousVal : this.previousChanged,
5658
- action: eventName, text: this.tooltipObj.content, isInteracted: isNullOrUndefined(e) ? false : true
5672
+ action: eventName, text: (typeof (this.tooltipObj.content) === 'function' ? this.tooltipObj.content() : this.tooltipObj.content), isInteracted: isNullOrUndefined(e) ? false : true
5659
5673
  };
5660
5674
  }
5661
5675
  else {
@@ -5697,10 +5711,14 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
5697
5711
  }
5698
5712
  this.handlePos1 = this.checkHandlePosition(this.handleVal1);
5699
5713
  this.handlePos2 = this.checkHandlePosition(this.handleVal2);
5700
- if (this.handlePos1 > this.handlePos2) {
5714
+ if (this.min < this.max && this.handlePos1 > this.handlePos2) {
5701
5715
  this.handlePos1 = this.handlePos2;
5702
5716
  this.handleVal1 = this.handleVal2;
5703
5717
  }
5718
+ if (this.min > this.max && this.handlePos1 < this.handlePos2) {
5719
+ this.handlePos2 = this.handlePos1;
5720
+ this.handleVal2 = this.handleVal1;
5721
+ }
5704
5722
  this.preHandlePos1 = this.handlePos1;
5705
5723
  this.preHandlePos2 = this.handlePos2;
5706
5724
  if (this.limits.enabled) {
@@ -5737,9 +5755,6 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
5737
5755
  return pos;
5738
5756
  };
5739
5757
  Slider.prototype.checkHandleValue = function (value) {
5740
- if (this.min > this.max) {
5741
- this.min = this.max;
5742
- }
5743
5758
  if (this.min === this.max) {
5744
5759
  return (parseFloat(formatUnit(this.max)));
5745
5760
  }
@@ -5800,13 +5815,13 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
5800
5815
  this.materialHandle.style.bottom = this.handlePos1 + "px";
5801
5816
  }
5802
5817
  if (this.type === 'MinRange') {
5803
- this.rangeBar.style.bottom = '0px';
5804
- setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + 'px' });
5818
+ this.rangeBar.style.bottom = this.min > this.max ? this.handlePos1 + 'px' : '0px';
5819
+ setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.min > this.max ? this.element.clientHeight - this.handlePos1 + 'px' : this.handlePos1 + 'px' });
5805
5820
  }
5806
5821
  else if (this.type === 'Range') {
5807
5822
  this.secondHandle.style.bottom = this.handlePos2 + "px";
5808
- this.rangeBar.style.bottom = this.handlePos1 + 'px';
5809
- setStyleAttribute(this.rangeBar, { 'height': this.handlePos2 - this.handlePos1 + 'px' });
5823
+ this.rangeBar.style.bottom = this.min > this.max ? this.handlePos2 + 'px' : this.handlePos1 + 'px';
5824
+ setStyleAttribute(this.rangeBar, { 'height': this.min > this.max ? this.handlePos1 - this.handlePos2 + 'px' : this.handlePos2 - this.handlePos1 + 'px' });
5810
5825
  }
5811
5826
  }
5812
5827
  if (this.limits.enabled) {
@@ -5835,7 +5850,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
5835
5850
  if (!(this.limits.enabled && this.limits.startHandleFixed)) {
5836
5851
  this.handleVal1 = this.checkHandleValue(value);
5837
5852
  this.handlePos1 = this.checkHandlePosition(this.handleVal1);
5838
- if (this.type === 'Range' && this.handlePos1 > this.handlePos2) {
5853
+ if (this.type === 'Range' && ((this.handlePos1 > this.handlePos2 && this.min < this.max) || (this.handlePos1 < this.handlePos2 && this.min > this.max))) {
5839
5854
  this.handlePos1 = this.handlePos2;
5840
5855
  this.handleVal1 = this.handleVal2;
5841
5856
  }
@@ -5849,7 +5864,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
5849
5864
  if (!(this.limits.enabled && this.limits.endHandleFixed)) {
5850
5865
  this.handleVal2 = this.checkHandleValue(value);
5851
5866
  this.handlePos2 = this.checkHandlePosition(this.handleVal2);
5852
- if (this.type === 'Range' && this.handlePos2 < this.handlePos1) {
5867
+ if (this.type === 'Range' && ((this.handlePos2 < this.handlePos1 && this.min < this.max) || (this.handlePos2 > this.handlePos1 && this.min > this.max))) {
5853
5868
  this.handlePos2 = this.handlePos1;
5854
5869
  this.handleVal2 = this.handleVal1;
5855
5870
  }
@@ -5967,7 +5982,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
5967
5982
  }
5968
5983
  var handlepos = this.xyToPosition(pos);
5969
5984
  var handleVal = this.positionToValue(handlepos);
5970
- if (this.type === 'Range' && (this.handlePos2 - handlepos) < (handlepos - this.handlePos1)) {
5985
+ if (this.type === 'Range' && (this.min < (this.max) && (this.handlePos2 - handlepos) < (handlepos - this.handlePos1) || (this.min > this.max) && (this.handlePos1 - handlepos) > (handlepos - this.handlePos2))) {
5971
5986
  this.activeHandle = 2;
5972
5987
  if (!(this.limits.enabled && this.limits.endHandleFixed)) {
5973
5988
  if (this.limits.enabled) {
@@ -6011,7 +6026,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
6011
6026
  behindElement = document.elementFromPoint(eventX, eventY);
6012
6027
  }
6013
6028
  if (evt.target === handle && behindElement != handle) {
6014
- if (this.isMaterial && !this.tooltip.isVisible &&
6029
+ if ((this.isMaterial || this.isMaterial3) && !this.tooltip.isVisible &&
6015
6030
  !this.getHandle().classList.contains(classNames.sliderTabHandle)) {
6016
6031
  this.materialChange();
6017
6032
  }
@@ -6022,7 +6037,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
6022
6037
  if (!this.checkRepeatedValue(handleVal)) {
6023
6038
  return;
6024
6039
  }
6025
- var transition = this.isMaterial && this.tooltip.isVisible ?
6040
+ var transition = (this.isMaterial || this.isMaterial3) && this.tooltip.isVisible ?
6026
6041
  this.transitionOnMaterialTooltip : this.transition;
6027
6042
  this.getHandle().style.transition = transition.handle;
6028
6043
  if (this.type !== 'Default') {
@@ -6074,16 +6089,28 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
6074
6089
  else {
6075
6090
  pos = { x: xPostion + this.secondPartRemain, y: yPostion + this.secondPartRemain };
6076
6091
  }
6077
- this.handlePos1 = this.xyToPosition(pos);
6078
- this.handleVal1 = this.positionToValue(this.handlePos1);
6092
+ if (this.min > this.max) {
6093
+ this.handlePos2 = this.xyToPosition(pos);
6094
+ this.handleVal2 = this.positionToValue(this.handlePos2);
6095
+ }
6096
+ else {
6097
+ this.handlePos1 = this.xyToPosition(pos);
6098
+ this.handleVal1 = this.positionToValue(this.handlePos1);
6099
+ }
6079
6100
  if (!this.enableRtl) {
6080
6101
  pos = { x: xPostion + this.secondPartRemain, y: yPostion - this.firstPartRemain };
6081
6102
  }
6082
6103
  else {
6083
6104
  pos = { x: xPostion - this.firstPartRemain, y: yPostion - this.firstPartRemain };
6084
6105
  }
6085
- this.handlePos2 = this.xyToPosition(pos);
6086
- this.handleVal2 = this.positionToValue(this.handlePos2);
6106
+ if (this.min > this.max) {
6107
+ this.handlePos1 = this.xyToPosition(pos);
6108
+ this.handleVal1 = this.positionToValue(this.handlePos1);
6109
+ }
6110
+ else {
6111
+ this.handlePos2 = this.xyToPosition(pos);
6112
+ this.handleVal2 = this.positionToValue(this.handlePos2);
6113
+ }
6087
6114
  if (this.limits.enabled) {
6088
6115
  var value = this.getLimitValueAndPosition(this.handleVal1, this.limits.minStart, this.limits.minEnd);
6089
6116
  this.handleVal1 = value[0];
@@ -6104,11 +6131,11 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
6104
6131
  this.handleValueAdjust(this.handleVal2, this.limits.maxEnd, 2);
6105
6132
  }
6106
6133
  }
6107
- if (this.handleVal2 === this.max) {
6108
- this.handleValueAdjust(this.handleVal2, this.max, 2);
6134
+ if (this.handleVal2 === (this.min > this.max ? this.min : this.max)) {
6135
+ this.handleValueAdjust(this.handleVal2, (this.min > this.max ? this.min : this.max), 2);
6109
6136
  }
6110
- if (this.handleVal1 === this.min) {
6111
- this.handleValueAdjust(this.handleVal1, this.min, 1);
6137
+ if (this.handleVal1 === (this.min > this.max ? this.max : this.min)) {
6138
+ this.handleValueAdjust(this.handleVal1, (this.min > this.max ? this.max : this.min), 1);
6112
6139
  }
6113
6140
  }
6114
6141
  this.activeHandle = 1;
@@ -6127,7 +6154,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
6127
6154
  this.secondHandle.classList.remove(classNames.sliderActiveHandle);
6128
6155
  }
6129
6156
  this.closeTooltip();
6130
- if (this.isMaterial) {
6157
+ if (this.isMaterial || this.isMaterial3) {
6131
6158
  this.getHandle().classList.remove('e-large-thumb-size');
6132
6159
  if (this.isMaterialTooltip) {
6133
6160
  this.tooltipElement.classList.remove(classNames.materialTooltipActive);
@@ -6166,7 +6193,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
6166
6193
  if (this.activeHandle === 1) {
6167
6194
  this.firstHandle.classList.add(classNames.sliderActiveHandle);
6168
6195
  if (!(this.limits.enabled && this.limits.startHandleFixed)) {
6169
- if (handlepos > this.handlePos2) {
6196
+ if ((this.min < this.max && handlepos > this.handlePos2 || (this.min > this.max && handlepos < this.handlePos2))) {
6170
6197
  handlepos = this.handlePos2;
6171
6198
  handleVal = this.handleVal2;
6172
6199
  }
@@ -6185,7 +6212,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
6185
6212
  else if (this.activeHandle === 2) {
6186
6213
  this.secondHandle.classList.add(classNames.sliderActiveHandle);
6187
6214
  if (!(this.limits.enabled && this.limits.endHandleFixed)) {
6188
- if (handlepos < this.handlePos1) {
6215
+ if ((this.min < this.max && handlepos < this.handlePos1) || (this.min > this.max && handlepos > this.handlePos1)) {
6189
6216
  handlepos = this.handlePos1;
6190
6217
  handleVal = this.handleVal1;
6191
6218
  }
@@ -6210,7 +6237,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
6210
6237
  this.rangeBar.style.transition = 'none';
6211
6238
  }
6212
6239
  this.setHandlePosition(evt);
6213
- if (this.isMaterial && !this.tooltip.isVisible &&
6240
+ if ((this.isMaterial || this.isMaterial3) && !this.tooltip.isVisible &&
6214
6241
  !this.getHandle().classList.contains(classNames.sliderTabHandle)) {
6215
6242
  this.materialChange();
6216
6243
  }
@@ -6651,7 +6678,9 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
6651
6678
  case 'tooltip':
6652
6679
  if (!isNullOrUndefined(newProp.tooltip) && !isNullOrUndefined(oldProp.tooltip)) {
6653
6680
  this.setTooltip(prop);
6654
- this.wireEvents();
6681
+ if (!this.showButtons) {
6682
+ this.wireEvents();
6683
+ }
6655
6684
  }
6656
6685
  break;
6657
6686
  case 'type':
@@ -6769,7 +6798,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
6769
6798
  this.ul.style.zIndex = (this.zIndex + -7) + '';
6770
6799
  this.element.style.zIndex = (this.zIndex + 2) + '';
6771
6800
  }
6772
- if (!this.isMaterial && !isNullOrUndefined(this.ticks) && this.ticks.placement === 'Both') {
6801
+ if (!this.isMaterial && !this.isMaterial3 && !isNullOrUndefined(this.ticks) && this.ticks.placement === 'Both') {
6773
6802
  this.element.style.zIndex = (this.zIndex + 2) + '';
6774
6803
  }
6775
6804
  this.firstHandle.style.zIndex = (this.zIndex + 3) + '';
@@ -7586,7 +7615,17 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
7586
7615
  this.customPlacement.call(this, this.inputElement, errorElement);
7587
7616
  }
7588
7617
  else {
7589
- this.inputElement.parentNode.insertBefore(errorElement, this.inputElement.nextSibling);
7618
+ var inputParent = this.inputElement.parentElement;
7619
+ var grandParent = inputParent.parentElement;
7620
+ if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper')) {
7621
+ grandParent.insertBefore(errorElement, inputParent.nextSibling);
7622
+ }
7623
+ else if (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper')) {
7624
+ grandParent.parentElement.insertBefore(errorElement, grandParent.nextSibling);
7625
+ }
7626
+ else {
7627
+ inputParent.insertBefore(errorElement, this.inputElement.nextSibling);
7628
+ }
7590
7629
  }
7591
7630
  errorElement.style.display = 'block';
7592
7631
  this.getErrorElement(name);
@@ -7681,7 +7720,15 @@ var FormValidator = /** @__PURE__ @class */ (function (_super) {
7681
7720
  return !isNaN(Number(option.value)) && Number(option.value) >= param[0] && Number(option.value) <= param[1];
7682
7721
  },
7683
7722
  date: function (option) {
7684
- return !isNaN(new Date(option.value).getTime());
7723
+ if (!isNullOrUndefined(option.param) && (typeof (option.param) === 'string' && option.param !== '')) {
7724
+ var globalize = new Internationalization;
7725
+ var dateOptions = { format: option.param.toString(), type: 'dateTime', skeleton: 'yMd' };
7726
+ var dateValue = globalize.parseDate(option.value, dateOptions);
7727
+ return (!isNullOrUndefined(dateValue) && dateValue instanceof Date && !isNaN(+dateValue));
7728
+ }
7729
+ else {
7730
+ return !isNaN(new Date(option.value).getTime());
7731
+ }
7685
7732
  },
7686
7733
  max: function (option) {
7687
7734
  if (!isNaN(Number(option.value))) {
@@ -8079,7 +8126,7 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
8079
8126
  detach(this.listParent);
8080
8127
  this.listParent = null;
8081
8128
  this.fileList = [];
8082
- this.createFileList(this.filesData);
8129
+ this.internalCreateFileList(this.filesData);
8083
8130
  if (this.actionButtons) {
8084
8131
  this.removeActionButtons();
8085
8132
  this.renderActionButtons();
@@ -8316,7 +8363,7 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
8316
8363
  Uploader.prototype.renderPreLoadFiles = function () {
8317
8364
  if (this.files.length) {
8318
8365
  if (this.enablePersistence && this.filesData.length) {
8319
- this.createFileList(this.filesData);
8366
+ this.internalCreateFileList(this.filesData);
8320
8367
  return;
8321
8368
  }
8322
8369
  if (isNullOrUndefined(this.files[0].size)) {
@@ -8343,7 +8390,7 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
8343
8390
  filesData.push(fileData);
8344
8391
  this.filesData.push(fileData);
8345
8392
  }
8346
- this.createFileList(filesData);
8393
+ this.internalCreateFileList(filesData);
8347
8394
  if (!this.autoUpload && this.listParent && !this.actionButtons && (!this.isForm || this.allowUpload()) && this.showFileList) {
8348
8395
  this.renderActionButtons();
8349
8396
  }
@@ -9120,13 +9167,14 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
9120
9167
  var dataFiles = this.allTypes ? eventArgs.modifiedFilesData :
9121
9168
  this.checkExtension(eventArgs.modifiedFilesData);
9122
9169
  this.updateSortedFileList(dataFiles);
9123
- this.filesData = dataFiles;
9170
+ this.filesData = this.filesData.concat(dataFiles);
9124
9171
  if (!this.isForm || this.allowUpload()) {
9125
9172
  this.checkAutoUpload(dataFiles);
9126
9173
  }
9127
9174
  }
9128
9175
  else {
9129
- this.createFileList(fileData, true);
9176
+ this.internalCreateFileList(fileData);
9177
+ this.filesData = this.filesData.concat(fileData);
9130
9178
  if (!this.isForm || this.allowUpload()) {
9131
9179
  this.checkAutoUpload(fileData);
9132
9180
  }
@@ -9175,22 +9223,13 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
9175
9223
  Uploader.prototype.updateSortedFileList = function (filesData) {
9176
9224
  var previousListClone = this.createElement('div', { id: 'clonewrapper' });
9177
9225
  var added = -1;
9178
- var removedList;
9179
9226
  if (this.listParent) {
9180
9227
  for (var i = 0; i < this.listParent.querySelectorAll('li').length; i++) {
9181
9228
  var liElement = this.listParent.querySelectorAll('li')[i];
9182
9229
  previousListClone.appendChild(liElement.cloneNode(true));
9183
9230
  }
9184
- removedList = this.listParent.querySelectorAll('li');
9185
- for (var _i = 0, removedList_1 = removedList; _i < removedList_1.length; _i++) {
9186
- var item = removedList_1[_i];
9187
- detach(item);
9188
- }
9189
9231
  this.removeActionButtons();
9190
9232
  var oldList = [].slice.call(previousListClone.childNodes);
9191
- detach(this.listParent);
9192
- this.listParent = null;
9193
- this.fileList = [];
9194
9233
  this.createParentUL();
9195
9234
  for (var index = 0; index < filesData.length; index++) {
9196
9235
  for (var j = 0; j < this.filesData.length; j++) {
@@ -9202,12 +9241,12 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
9202
9241
  }
9203
9242
  }
9204
9243
  if (added !== index) {
9205
- this.createFileList([filesData[index]]);
9244
+ this.internalCreateFileList([filesData[index]]);
9206
9245
  }
9207
9246
  }
9208
9247
  }
9209
9248
  else {
9210
- this.createFileList(filesData);
9249
+ this.internalCreateFileList(filesData);
9211
9250
  }
9212
9251
  };
9213
9252
  Uploader.prototype.isBlank = function (str) {
@@ -9506,10 +9545,13 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
9506
9545
  * @param { FileInfo[] } fileData - Specifies the files data for file list creation.
9507
9546
  * @returns {void}
9508
9547
  */
9509
- Uploader.prototype.createFileList = function (fileData, isSelectedFile) {
9548
+ Uploader.prototype.createFileList = function (fileData) {
9549
+ this.filesData = this.filesData && this.filesData.length > 0 ? this.filesData.concat(fileData) : fileData;
9550
+ this.internalCreateFileList(fileData);
9551
+ };
9552
+ Uploader.prototype.internalCreateFileList = function (fileData) {
9510
9553
  /* eslint-enable valid-jsdoc, jsdoc/require-param */
9511
9554
  this.createParentUL();
9512
- this.filesData = (isSelectedFile) ? this.filesData.concat(fileData) : fileData;
9513
9555
  if (this.template !== '' && !isNullOrUndefined(this.template)) {
9514
9556
  if (this.isFormUpload()) {
9515
9557
  this.uploadWrapper.classList.add(FORM_UPLOAD);
@@ -10030,7 +10072,7 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
10030
10072
  Uploader.prototype.templateComplier = function (uploadTemplate) {
10031
10073
  if (uploadTemplate) {
10032
10074
  try {
10033
- if (selectAll(uploadTemplate, document).length) {
10075
+ if (typeof uploadTemplate !== 'function' && selectAll(uploadTemplate, document).length) {
10034
10076
  return compile(select(uploadTemplate, document).innerHTML.trim());
10035
10077
  }
10036
10078
  else {
@@ -12460,23 +12502,12 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
12460
12502
  };
12461
12503
  ColorPicker.prototype.paletteKeyDown = function (e) {
12462
12504
  var target = e.target;
12505
+ if (!target.classList.contains(PALETTES)) {
12506
+ return;
12507
+ }
12463
12508
  var selectedEle;
12464
12509
  var idx;
12465
12510
  var tiles = [].slice.call(selectAll('.' + TILE, target));
12466
- if ((target.classList.contains('e-palette') || target.classList.contains('e-tile')) && (e.keyCode === 9 && !e.shiftKey)) {
12467
- if (this.modeSwitcher || this.showButtons) {
12468
- this.getPopupEle().querySelector('.e-btn').focus();
12469
- e.preventDefault();
12470
- e.stopPropagation();
12471
- }
12472
- }
12473
- else if ((target.classList.contains('e-palette') || target.classList.contains('e-tile')) && (e.keyCode === 9 && e.shiftKey)) {
12474
- if (this.splitBtn) {
12475
- this.splitBtn.element.focus();
12476
- e.preventDefault();
12477
- e.stopPropagation();
12478
- }
12479
- }
12480
12511
  var prevSelectedEle = (tiles.filter(function (tile) { return tile.classList.contains('e-selected'); })).pop();
12481
12512
  switch (!e.altKey && e.keyCode) {
12482
12513
  case 39:
@@ -13338,10 +13369,8 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
13338
13369
  }
13339
13370
  break;
13340
13371
  case 'showClearButton':
13341
- if (this.respectiveElement.tagName !== 'TEXTAREA') {
13342
- Input.setClearButton(this.showClearButton, this.respectiveElement, this.textboxWrapper);
13343
- this.bindClearEvent();
13344
- }
13372
+ Input.setClearButton(this.showClearButton, this.respectiveElement, this.textboxWrapper);
13373
+ this.bindClearEvent();
13345
13374
  break;
13346
13375
  case 'enableRtl':
13347
13376
  Input.setEnableRtl(this.enableRtl, [this.textboxWrapper.container]);
@@ -13727,7 +13756,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
13727
13756
  }
13728
13757
  };
13729
13758
  TextBox.prototype.bindClearEvent = function () {
13730
- if (this.showClearButton && this.respectiveElement.tagName !== 'TEXTAREA') {
13759
+ if (this.showClearButton) {
13731
13760
  if (this.enabled) {
13732
13761
  EventHandler.add(this.textboxWrapper.clearButton, 'mousedown touchstart', this.resetInputHandler, this);
13733
13762
  }
@@ -15296,8 +15325,8 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15296
15325
  return;
15297
15326
  }
15298
15327
  var previousValue = this.currentValue;
15299
- this.updateCurrentValue(currValue);
15300
15328
  this.triggerChange(e, currValue);
15329
+ this.updateCurrentValue(currValue);
15301
15330
  if (this.showTooltip) {
15302
15331
  if (element) {
15303
15332
  if (Math.ceil(currValue) !== Math.ceil(previousValue)) {
@@ -15341,11 +15370,11 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15341
15370
  }
15342
15371
  if (this.fullTemplate && val === 1) {
15343
15372
  spanEle.classList.add(FULLTEMPLATE);
15344
- spanEle.append(this.fullTemplateFunction({ index: index, ratingValue: val }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate'), this.isStringTemplate)[0]);
15373
+ append(this.fullTemplateFunction({ index: index, ratingValue: val }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate'), this.isStringTemplate), spanEle);
15345
15374
  }
15346
15375
  else if (this.emptyTemplate) {
15347
15376
  spanEle.classList.add(EMPTYTEMPLATE);
15348
- spanEle.append(this.emptyTemplateFunction({ index: index, ratingValue: val }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate'), this.isStringTemplate)[0]);
15377
+ append(this.emptyTemplateFunction({ index: index, ratingValue: val }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate'), this.isStringTemplate), spanEle);
15349
15378
  }
15350
15379
  else {
15351
15380
  addClass([spanEle], ICONCSS.split(' '));
@@ -15355,7 +15384,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15355
15384
  spanEle.classList.remove(FULLTEMPLATE, EMPTYTEMPLATE);
15356
15385
  removeClass([spanEle], ICONCSS.split(' '));
15357
15386
  if (spanEle.firstChild) {
15358
- spanEle.removeChild(spanEle.firstChild);
15387
+ spanEle.innerHTML = '';
15359
15388
  }
15360
15389
  };
15361
15390
  Rating.prototype.updateTooltip = function () {
@@ -15440,7 +15469,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15440
15469
  }
15441
15470
  this.removeItemContent(spanEle);
15442
15471
  spanEle.classList.add(FULLTEMPLATE);
15443
- spanEle.append(this.fullTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate' + index), this.isStringTemplate)[0]);
15472
+ append(this.fullTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate' + index), this.isStringTemplate), spanEle);
15444
15473
  }
15445
15474
  else if (this.emptyTemplate) {
15446
15475
  if (!this.isReact && spanEle.classList.contains(EMPTYTEMPLATE)) {
@@ -15448,7 +15477,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15448
15477
  }
15449
15478
  this.removeItemContent(spanEle);
15450
15479
  spanEle.classList.add(EMPTYTEMPLATE);
15451
- spanEle.append(this.emptyTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate' + index), this.isStringTemplate)[0]);
15480
+ append(this.emptyTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate' + index), this.isStringTemplate), spanEle);
15452
15481
  }
15453
15482
  else {
15454
15483
  this.removeItemContent(spanEle);
@@ -15460,25 +15489,32 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15460
15489
  if (this.isReact) {
15461
15490
  this.clearTemplate(['ratingTooltipTemplate']);
15462
15491
  }
15463
- var content = void 0;
15492
+ var content_1;
15464
15493
  if (this.tooltipTemplate) {
15494
+ content_1 = this.createElement('span', { className: 'e-rating-tooltip-content' });
15465
15495
  var templateFunction = this.getTemplateString(this.tooltipTemplate);
15466
- content = templateFunction({ value: this.currentValue }, this, 'ratingTooltipTemplate', (this.element.id + 'tooltipTemplate'), this.isStringTemplate)[0];
15496
+ append(templateFunction({ value: this.currentValue }, this, 'ratingTooltipTemplate', (this.element.id + 'tooltipTemplate'), this.isStringTemplate), content_1);
15497
+ this.tooltipObj.setProperties({ content: content_1 }, isChange);
15467
15498
  }
15468
15499
  else {
15469
- content = this.currentValue.toString();
15500
+ content_1 = this.currentValue.toString();
15501
+ this.tooltipObj.setProperties({ content: initializeCSPTemplate(function () { return content_1; }) }, isChange);
15470
15502
  }
15471
- this.tooltipObj.setProperties({ content: content }, isChange);
15472
15503
  this.renderReactTemplates();
15473
15504
  }
15474
15505
  };
15475
15506
  Rating.prototype.getTemplateString = function (template) {
15476
15507
  var stringContent = '';
15477
15508
  try {
15478
- var tempEle = select(template);
15479
- if (tempEle) {
15480
- //Return innerHTML incase of jsrenderer script else outerHTML
15481
- stringContent = tempEle.tagName === 'SCRIPT' ? tempEle.innerHTML : tempEle.outerHTML;
15509
+ if (typeof template !== 'function') {
15510
+ var tempEle = select(template);
15511
+ if (tempEle) {
15512
+ //Return innerHTML incase of jsrenderer script else outerHTML
15513
+ stringContent = tempEle.tagName === 'SCRIPT' ? tempEle.innerHTML : tempEle.outerHTML;
15514
+ }
15515
+ else {
15516
+ stringContent = template;
15517
+ }
15482
15518
  }
15483
15519
  else {
15484
15520
  stringContent = template;
@@ -15509,10 +15545,10 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15509
15545
  this.clearTemplate(['ratingLabelTemplate']);
15510
15546
  }
15511
15547
  if (this.spanLabel.firstChild) {
15512
- this.spanLabel.removeChild(this.spanLabel.firstChild);
15548
+ this.spanLabel.innerHTML = '';
15513
15549
  }
15514
15550
  var templateFunction = this.getTemplateString(this.labelTemplate);
15515
- this.spanLabel.append(templateFunction({ value: this.currentValue }, this, 'ratingLabelTemplate', (this.element.id + 'labelTemplate'), this.isStringTemplate)[0]);
15551
+ append(templateFunction({ value: this.currentValue }, this, 'ratingLabelTemplate', (this.element.id + 'labelTemplate'), this.isStringTemplate), this.spanLabel);
15516
15552
  this.renderReactTemplates();
15517
15553
  }
15518
15554
  else {
@@ -15600,7 +15636,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15600
15636
  if (this.showTooltip) {
15601
15637
  if (!this.tooltipOpen) {
15602
15638
  this.updateTooltipContent(false);
15603
- this.tooltipObj.open(element); //eslint-disable-line
15639
+ this.tooltipObj.open(element);
15604
15640
  this.tooltipOpen = true;
15605
15641
  }
15606
15642
  else if (isChange) {